@spikonado/sprocket 0.4.1 → 0.4.2

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 (208) hide show
  1. package/README.md +4 -11
  2. package/THIRD_PARTY_NOTICES.md +14 -0
  3. package/lib/launcher.js +96 -46
  4. package/lib/native.js +57 -0
  5. package/lib/update.js +40 -15
  6. package/package.json +6 -6
  7. package/web/_app/immutable/{angular-html-4GjfXERL.js → angular-html-C20omHsE.js} +1 -1
  8. package/web/_app/immutable/{angular-ts-CMIe06P5.js → angular-ts-DzF16VU8.js} +1 -1
  9. package/web/_app/immutable/{apl-C_n2qsRM.js → apl-Bopwo-P_.js} +1 -1
  10. package/web/_app/immutable/apl-gfMMiTNf.js +1 -0
  11. package/web/_app/immutable/asciiarmor-C_eisQCp.js +1 -0
  12. package/web/_app/immutable/asn1-DCl_8MCW.js +1 -0
  13. package/web/_app/immutable/asterisk-BEn0Cwpx.js +1 -0
  14. package/web/_app/immutable/{astro-DVbyChwj.js → astro-CYomU0N_.js} +1 -1
  15. package/web/_app/immutable/{blade-fXxNj9V7.js → blade-CHAXU93U.js} +1 -1
  16. package/web/_app/immutable/brainfuck-D5EjA2JK.js +1 -0
  17. package/web/_app/immutable/{c-BN2Efy0k.js → c-Vn6ejSG8.js} +1 -1
  18. package/web/_app/immutable/{chapel-BRkNuByD.js → chapel-DmTJmwJp.js} +1 -1
  19. package/web/_app/immutable/clike-xvONpD0Z.js +1 -0
  20. package/web/_app/immutable/clojure-BflJGmDX.js +1 -0
  21. package/web/_app/immutable/cmake-84nbDH0I.js +1 -0
  22. package/web/_app/immutable/cobol-DHLQUbN7.js +1 -0
  23. package/web/_app/immutable/{cobol-C5lGhzFi.js → cobol-twYq0nKG.js} +1 -1
  24. package/web/_app/immutable/{code-highlighting-client-Kw4BuD-0.js → code-highlighting-client-CFnhHok6.js} +1 -1
  25. package/web/_app/immutable/{code-highlighting-worker-DggeS8YA.js → code-highlighting-worker-CrdU_PI0.js} +4 -4
  26. package/web/_app/immutable/{coffee-B6MzRpQ_.js → coffee-CM7N7KyB.js} +1 -1
  27. package/web/_app/immutable/coffeescript-De_zI4J0.js +1 -0
  28. package/web/_app/immutable/commonlisp-DgAKBe0r.js +1 -0
  29. package/web/_app/immutable/{cpp-DEVtvotx.js → cpp-Di9GpqBY.js} +1 -1
  30. package/web/_app/immutable/{crystal-DY2QsCJ5.js → crystal-8NOnHfUA.js} +1 -1
  31. package/web/_app/immutable/crystal-Bsdphhtm.js +1 -0
  32. package/web/_app/immutable/css-CnaYoQib.js +1 -0
  33. package/web/_app/immutable/{css-ButQfvJ9.js → css-ndguaaOL.js} +1 -1
  34. package/web/_app/immutable/cypher-p9eYesGn.js +1 -0
  35. package/web/_app/immutable/d-DWkQyNnU.js +1 -0
  36. package/web/_app/immutable/diff-ChtP43wD.js +1 -0
  37. package/web/_app/immutable/dist-9Huo6_io.js +1 -0
  38. package/web/_app/immutable/dist-BLfNihLx.js +9 -0
  39. package/web/_app/immutable/dist-BW-uqzJI.js +1 -0
  40. package/web/_app/immutable/dist-BZT89qLB.js +1 -0
  41. package/web/_app/immutable/dist-BZdq_joy.js +6 -0
  42. package/web/_app/immutable/dist-BbYNxbL_.js +1 -0
  43. package/web/_app/immutable/dist-BfBCUuTm.js +1 -0
  44. package/web/_app/immutable/dist-Bh0ebl-W.js +23 -0
  45. package/web/_app/immutable/dist-BlBqfmmv.js +1 -0
  46. package/web/_app/immutable/dist-BwGKucqO.js +1 -0
  47. package/web/_app/immutable/dist-C7DbTQb-.js +1 -0
  48. package/web/_app/immutable/dist-CC7L_HKl.js +11 -0
  49. package/web/_app/immutable/dist-CU3sfboa.js +1 -0
  50. package/web/_app/immutable/dist-CW1k1yYz.js +1 -0
  51. package/web/_app/immutable/dist-CyRevOBs.js +1 -0
  52. package/web/_app/immutable/dist-D2IDjEGT.js +1 -0
  53. package/web/_app/immutable/dist-DRen8gOr.js +2 -0
  54. package/web/_app/immutable/dist-DXvgx-fv.js +1 -0
  55. package/web/_app/immutable/dist-DoyuFT6b.js +1 -0
  56. package/web/_app/immutable/dist-Dxj34LDO.js +1 -0
  57. package/web/_app/immutable/dist-DyD8ayXh.js +1 -0
  58. package/web/_app/immutable/dist-wMY6Z_yW.js +1 -0
  59. package/web/_app/immutable/dockerfile-DJkHQgkl.js +1 -0
  60. package/web/_app/immutable/dtd-DTF72YNO.js +1 -0
  61. package/web/_app/immutable/dylan-S7ucR4pR.js +1 -0
  62. package/web/_app/immutable/ebnf-D4c0_ac3.js +1 -0
  63. package/web/_app/immutable/ecl-BVIeWmwY.js +1 -0
  64. package/web/_app/immutable/{edge-CUJd9T1a.js → edge-CZbv_n-U.js} +1 -1
  65. package/web/_app/immutable/eiffel-BEjRio4Q.js +1 -0
  66. package/web/_app/immutable/{elixir-DIdSb3yA.js → elixir-Cefx1i8D.js} +1 -1
  67. package/web/_app/immutable/{elm-M8_LX84X.js → elm-CNDuIlIO.js} +1 -1
  68. package/web/_app/immutable/elm-Cshzl8qu.js +1 -0
  69. package/web/_app/immutable/{erb-zGFWLWtt.js → erb-Cscw6dKF.js} +1 -1
  70. package/web/_app/immutable/erlang-BV0c4Hdn.js +1 -0
  71. package/web/_app/immutable/factor-LKH5gN8L.js +1 -0
  72. package/web/_app/immutable/fcl-ClOhbFR7.js +1 -0
  73. package/web/_app/immutable/forth-D6RzAl64.js +1 -0
  74. package/web/_app/immutable/fortran-Bt6PBEDR.js +1 -0
  75. package/web/_app/immutable/gas-BHEdbvp9.js +1 -0
  76. package/web/_app/immutable/gherkin-oBAE_ms0.js +1 -0
  77. package/web/_app/immutable/{git-rebase-CC2D0L3b.js → git-rebase-pzmKr7TV.js} +1 -1
  78. package/web/_app/immutable/{glimmer-js-BcY5kv6g.js → glimmer-js-D70IowcQ.js} +1 -1
  79. package/web/_app/immutable/{glimmer-ts-Di8deFFz.js → glimmer-ts-DB1_b6V0.js} +1 -1
  80. package/web/_app/immutable/{glsl-BRJcCqLP.js → glsl-Dnd6Jfn4.js} +1 -1
  81. package/web/_app/immutable/{graphql-C_JO00Ae.js → graphql-Bh8CEOJ1.js} +1 -1
  82. package/web/_app/immutable/groovy-CUpZ7dEl.js +1 -0
  83. package/web/_app/immutable/{hack-G3VVQMXb.js → hack-CDyPjqmy.js} +1 -1
  84. package/web/_app/immutable/{haml-D2MeFmBN.js → haml-DgPyDh2c.js} +1 -1
  85. package/web/_app/immutable/{handlebars-D90wEzz2.js → handlebars-DY59w9Zt.js} +1 -1
  86. package/web/_app/immutable/haskell-BRsoo5mP.js +1 -0
  87. package/web/_app/immutable/haxe-DjVOVvNP.js +1 -0
  88. package/web/_app/immutable/{html-Bh1WMhz0.js → html-D9VLXeeS.js} +1 -1
  89. package/web/_app/immutable/{html-derivative-PuQZwSU6.js → html-derivative-CoBDi6W1.js} +1 -1
  90. package/web/_app/immutable/{http-Ca96onGD.js → http-Bcrx42oV.js} +1 -1
  91. package/web/_app/immutable/http-CLVgA2GD.js +1 -0
  92. package/web/_app/immutable/{hurl-B6pjbC8I.js → hurl-CoCTOBkn.js} +1 -1
  93. package/web/_app/immutable/idl-BUZw3wgd.js +1 -0
  94. package/web/_app/immutable/index-CoMB7Dmc.css +1 -0
  95. package/web/_app/immutable/index-DSbp_RPr.js +1832 -0
  96. package/web/_app/immutable/{java-arvjb7dT.js → java-DOksgUAN.js} +1 -1
  97. package/web/_app/immutable/{javascript-BZ1jt5sy.js → javascript-B4fHYqKG.js} +1 -1
  98. package/web/_app/immutable/javascript-Bu8mWwtz.js +1 -0
  99. package/web/_app/immutable/{jinja-CpnHkcj3.js → jinja-DlPpy45a.js} +1 -1
  100. package/web/_app/immutable/{jison-BPHKadT3.js → jison-B6gNEleR.js} +1 -1
  101. package/web/_app/immutable/{json-DSjaFVfj.js → json-CYwPJhCu.js} +1 -1
  102. package/web/_app/immutable/{jsx-BUqYaOvu.js → jsx-DQ1GitDu.js} +1 -1
  103. package/web/_app/immutable/julia-CQfgDRfP.js +1 -0
  104. package/web/_app/immutable/{julia-BcfWwmw0.js → julia-Cj2ISyOE.js} +1 -1
  105. package/web/_app/immutable/{just-BXyEegjy.js → just-CXuOImRn.js} +1 -1
  106. package/web/_app/immutable/{latex-CU7LUjt5.js → latex-C9zWpp_6.js} +1 -1
  107. package/web/_app/immutable/{liquid-CRzX7bbg.js → liquid-CJws5Urp.js} +1 -1
  108. package/web/_app/immutable/livescript-BXxG0Yva.js +1 -0
  109. package/web/_app/immutable/lua-DPCEkfD_.js +1 -0
  110. package/web/_app/immutable/{lua-BSDiLMEb.js → lua-DzECmq2B.js} +1 -1
  111. package/web/_app/immutable/{marko-DnR7eH34.js → marko-DY53VURG.js} +1 -1
  112. package/web/_app/immutable/mathematica-u8YMmbU0.js +1 -0
  113. package/web/_app/immutable/mbox-BEMVcqjs.js +1 -0
  114. package/web/_app/immutable/{mdc-CcZh7-T1.js → mdc-B1BZSQO7.js} +1 -1
  115. package/web/_app/immutable/mirc-C9zpzAZU.js +1 -0
  116. package/web/_app/immutable/mllike-B45xgp2S.js +1 -0
  117. package/web/_app/immutable/modelica-CqHI_q-D.js +1 -0
  118. package/web/_app/immutable/mscgen-qgSLujhx.js +1 -0
  119. package/web/_app/immutable/mumps-BSzj6Xyz.js +1 -0
  120. package/web/_app/immutable/nginx-8H7HVH4w.js +1 -0
  121. package/web/_app/immutable/{nginx-BwbdCB4h.js → nginx-JNdgK5R6.js} +1 -1
  122. package/web/_app/immutable/{nim-xocOj6ZV.js → nim-DxIQj5-c.js} +1 -1
  123. package/web/_app/immutable/nsis-viPvXFiq.js +1 -0
  124. package/web/_app/immutable/ntriples-CzMBulkp.js +1 -0
  125. package/web/_app/immutable/octave-D2Q8cUp1.js +1 -0
  126. package/web/_app/immutable/{org-0-F7ov1Z.js → org-C_axAQFp.js} +1 -1
  127. package/web/_app/immutable/oz-BwTct_5T.js +1 -0
  128. package/web/_app/immutable/pascal-Dp_KdFgX.js +1 -0
  129. package/web/_app/immutable/perl-BkSkiI9m.js +1 -0
  130. package/web/_app/immutable/{perl-DeAhIPOw.js → perl-CmH3S23F.js} +1 -1
  131. package/web/_app/immutable/{php-kXpePHVd.js → php-CX5ZySYs.js} +1 -1
  132. package/web/_app/immutable/pig-AF4Hwhju.js +1 -0
  133. package/web/_app/immutable/powershell-D8WpQPaX.js +1 -0
  134. package/web/_app/immutable/properties-C357ku5U.js +1 -0
  135. package/web/_app/immutable/protobuf-D1ij_kNL.js +1 -0
  136. package/web/_app/immutable/{pug-BYrzANIX.js → pug-Do87ZXFS.js} +1 -1
  137. package/web/_app/immutable/pug-Dwd_FmgJ.js +1 -0
  138. package/web/_app/immutable/puppet-BZyAS7I4.js +1 -0
  139. package/web/_app/immutable/python-B_1Jd8HM.js +1 -0
  140. package/web/_app/immutable/q-B9NhS7L_.js +1 -0
  141. package/web/_app/immutable/{qml-CX-IPlpg.js → qml-PO_mFEPK.js} +1 -1
  142. package/web/_app/immutable/{r-B6Ii5NsL.js → r-BgEOZNPk.js} +1 -1
  143. package/web/_app/immutable/r-CxDmU1I4.js +1 -0
  144. package/web/_app/immutable/{razor-B-rT9_rK.js → razor-RqmQ3ngM.js} +1 -1
  145. package/web/_app/immutable/{regexp-DTgu7pRI.js → regexp-BmtAp960.js} +1 -1
  146. package/web/_app/immutable/rpm-gpDK5sbt.js +1 -0
  147. package/web/_app/immutable/{rst-9klPfdbW.js → rst-D8oMEcXw.js} +1 -1
  148. package/web/_app/immutable/ruby-ChfNwlCY.js +1 -0
  149. package/web/_app/immutable/{ruby-VdW5O0lU.js → ruby-OoN__8XM.js} +1 -1
  150. package/web/_app/immutable/{sas-BcoVW2jh.js → sas-Bvlb0Bob.js} +1 -1
  151. package/web/_app/immutable/sas-C2OyD2Y6.js +1 -0
  152. package/web/_app/immutable/scheme-D9qYN0V5.js +1 -0
  153. package/web/_app/immutable/{scss-CThZiyk2.js → scss-CVcKVU_v.js} +1 -1
  154. package/web/_app/immutable/shell-DwuoZtxw.js +1 -0
  155. package/web/_app/immutable/{shellscript-kDqMi17D.js → shellscript-CweRfVvC.js} +1 -1
  156. package/web/_app/immutable/{shellsession-DhVMa4wd.js → shellsession-B6dlQfc8.js} +1 -1
  157. package/web/_app/immutable/sieve-tLWDfEkZ.js +1 -0
  158. package/web/_app/immutable/simple-mode-DXiLM1-G.js +1 -0
  159. package/web/_app/immutable/smalltalk-BLp5-jwC.js +1 -0
  160. package/web/_app/immutable/solr-B78wSQJQ.js +1 -0
  161. package/web/_app/immutable/{soy-BRlK1riv.js → soy-BXoHw2KB.js} +1 -1
  162. package/web/_app/immutable/sparql-Dz-mlCAC.js +1 -0
  163. package/web/_app/immutable/spreadsheet-CTIncYxj.js +1 -0
  164. package/web/_app/immutable/sql-DuQMFDvy.js +1 -0
  165. package/web/_app/immutable/{sql-9_1rLYi9.js → sql-ze9wVaXg.js} +1 -1
  166. package/web/_app/immutable/{stata-CvZbhBNs.js → stata-BoFbKY4D.js} +1 -1
  167. package/web/_app/immutable/stex-DNzd62Q_.js +1 -0
  168. package/web/_app/immutable/stylus-BOVgKnng.js +1 -0
  169. package/web/_app/immutable/{surrealql-BLPIhFjZ.js → surrealql-dM__PJgH.js} +1 -1
  170. package/web/_app/immutable/{svelte-CXRnxaHV.js → svelte-ClSxXkyL.js} +1 -1
  171. package/web/_app/immutable/swift-DKB6_1j6.js +1 -0
  172. package/web/_app/immutable/tcl-BGfruO1u.js +1 -0
  173. package/web/_app/immutable/{templ-BIXbEjSv.js → templ-CqzzE9WX.js} +1 -1
  174. package/web/_app/immutable/{tex-CTC47p_4.js → tex-ClJ30QU-.js} +1 -1
  175. package/web/_app/immutable/textile-C4jVoHG1.js +1 -0
  176. package/web/_app/immutable/tiddlywiki-VlUiK86J.js +1 -0
  177. package/web/_app/immutable/tiki-DTszW0OQ.js +1 -0
  178. package/web/_app/immutable/toml-BPTmHmyx.js +1 -0
  179. package/web/_app/immutable/troff-C2dAgh7P.js +1 -0
  180. package/web/_app/immutable/{ts-tags-q6t1QP-k.js → ts-tags-MI0_89c8.js} +1 -1
  181. package/web/_app/immutable/{tsx-BACYK5_7.js → tsx-D-xUy4Xs.js} +1 -1
  182. package/web/_app/immutable/ttcn-PPSTk1ow.js +1 -0
  183. package/web/_app/immutable/ttcn-cfg-2b4Gb5sE.js +1 -0
  184. package/web/_app/immutable/turtle-Cx3rYX2g.js +1 -0
  185. package/web/_app/immutable/{twig-du-FAu_S.js → twig-C1N-sXjS.js} +1 -1
  186. package/web/_app/immutable/{typescript-UdazT59i.js → typescript-BPzkPzWf.js} +1 -1
  187. package/web/_app/immutable/{typst-CwQmdlPz.js → typst-BLmdxzG5.js} +1 -1
  188. package/web/_app/immutable/vb-BthdM_4N.js +1 -0
  189. package/web/_app/immutable/vbscript-D9f6rSsU.js +1 -0
  190. package/web/_app/immutable/velocity-CqftRsjg.js +1 -0
  191. package/web/_app/immutable/verilog-CjI9Y6RI.js +1 -0
  192. package/web/_app/immutable/vhdl-kS471soi.js +1 -0
  193. package/web/_app/immutable/{vue-Bl_ifCwv.js → vue-Cb-Oh7gL.js} +1 -1
  194. package/web/_app/immutable/{vue-html-Jt0TggoH.js → vue-html-CokEUcEZ.js} +1 -1
  195. package/web/_app/immutable/{vue-vine-BCOElGNY.js → vue-vine-C9qhSF4z.js} +1 -1
  196. package/web/_app/immutable/webidl-D5jiJvOU.js +1 -0
  197. package/web/_app/immutable/{xml-CwHcdUOz.js → xml-xaPpMw_l.js} +1 -1
  198. package/web/_app/immutable/xquery-BKJx4mf9.js +1 -0
  199. package/web/_app/immutable/{xsl-CR7B95n6.js → xsl-C_0yvEBX.js} +1 -1
  200. package/web/_app/immutable/yacas-CXXgtw0p.js +1 -0
  201. package/web/_app/immutable/{yaml-1d7XLDFm.js → yaml-Dccr9MS0.js} +1 -1
  202. package/web/_app/immutable/z80-Co3PbHdE.js +1 -0
  203. package/web/index.html +3 -3
  204. package/web/logo.svg +1 -0
  205. package/web/_app/immutable/index-D6bVq7o9.css +0 -1
  206. package/web/_app/immutable/index-Dn3e-0Et.js +0 -488
  207. package/web/favicon.png +0 -0
  208. package/web/logo.png +0 -0
@@ -1,488 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();for(var l=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,ee());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ee():S=!1}}}var ee;if(typeof y==`function`)ee=function(){y(D)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=D,ee=function(){te.postMessage(null)}}else ee=function(){_(D,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ee()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return D(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=k(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function A(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function se(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else se(ce.bind(null,e))}var le={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=le,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ce,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),m=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=u(),n=f(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,ee=Symbol.for(`react.element`),O=Symbol.for(`react.transitional.element`),te=Symbol.for(`react.portal`),ne=Symbol.for(`react.fragment`),re=Symbol.for(`react.strict_mode`),ie=Symbol.for(`react.profiler`),k=Symbol.for(`react.consumer`),ae=Symbol.for(`react.context`),A=Symbol.for(`react.forward_ref`),oe=Symbol.for(`react.suspense`),se=Symbol.for(`react.suspense_list`),ce=Symbol.for(`react.memo`),le=Symbol.for(`react.lazy`),ue=Symbol.for(`react.activity`),de=Symbol.for(`react.legacy_hidden`),fe=Symbol.for(`react.memo_cache_sentinel`),pe=Symbol.for(`react.view_transition`),me=Symbol.for(`react.recoverable`),he=Symbol.iterator;function ge(e){return typeof e!=`object`||!e?null:(e=he&&e[he]||e[`@@iterator`],typeof e==`function`?e:null)}var _e=Symbol.for(`react.client.reference`);function ve(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ne:return`Fragment`;case ie:return`Profiler`;case re:return`StrictMode`;case oe:return`Suspense`;case se:return`SuspenseList`;case ue:return`Activity`;case pe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case te:return`Portal`;case ae:return e.displayName||`Context`;case k:return(e._context.displayName||`Context`)+`.Consumer`;case A:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ce:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case le:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ye=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},xe=[],N=-1;function Se(e){return{current:e}}function Ce(e){0>N||(e.current=xe[N],xe[N]=null,N--)}function we(e,t){N++,xe[N]=e.current,e.current=t}var Te=Se(null),Ee=Se(null),De=Se(null),Oe=Se(null);function ke(e,t){switch(we(De,t),we(Ee,e),we(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ep(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ep(t),e=Dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ce(Te),we(Te,e)}function Ae(){Ce(Te),Ce(Ee),Ce(De)}function je(e){var t=e.memoizedState;t!==null&&(Ch._currentValue=t.memoizedState,we(Oe,e)),t=Te.current;var n=Dp(t,e.type);t!==n&&(we(Ee,e),we(Te,n))}function Me(e){Ee.current===e&&(Ce(Te),Ce(Ee)),Oe.current===e&&(Ce(Oe),Ch._currentValue=be)}var Ne,Pe;function Fe(e){if(Ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||``,Pe=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+Ne+e+Pe}var Ie=!1;function Le(e,t){if(!e||Ie)return``;Ie=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ie=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Fe(n):``}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Fe(e.type);case 16:return Fe(`Lazy`);case 13:return e.child!==t&&t!==null?Fe(`Suspense Fallback`):Fe(`Suspense`);case 19:return Fe(`SuspenseList`);case 0:case 15:return Le(e.type,!1);case 11:return Le(e.type.render,!1);case 1:return Le(e.type,!0);case 31:return Fe(`Activity`);case 30:return Fe(`ViewTransition`);default:return``}}function ze(e){try{var t=``,n=null;do t+=Re(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var Be=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,P=t.unstable_shouldYield,Ue=t.unstable_requestPaint,We=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,Ke=t.unstable_ImmediatePriority,qe=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ye=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,Ze=t.log,Qe=t.unstable_setDisableYieldValue,$e=null,et=null;function tt(e){if(typeof Ze==`function`&&Qe(e),et&&typeof et.setStrictMode==`function`)try{et.setStrictMode($e,e)}catch{}}var nt=Math.clz32?Math.clz32:at,rt=Math.log,it=Math.LN2;function at(e){return e>>>=0,e===0?32:31-(rt(e)/it|0)|0}var ot=256,st=262144,ct=4194304;function lt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ut(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=lt(n))):i=lt(o):i=lt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=lt(n))):i=lt(o)):i=lt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function dt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-nt(n),i=1<<r;t|=e[r],n&=~i}return t}function pt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mt(){var e=ct;return ct<<=1,!(ct&62914560)&&(ct=4194304),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-nt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&vt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function vt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-nt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function bt(e,t){var n=t&-t;return n=n&42?1:xt(n),(n&(e.suspendedLanes|t))===0?n:0}function xt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function St(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ct(){var e=M.p;return e===0?(e=window.event,e===void 0?32:zh(e.type)):e}function wt(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Tt=Math.random().toString(36).slice(2),Et=`__reactFiber$`+Tt,Dt=`__reactProps$`+Tt,Ot=`__reactContainer$`+Tt,kt=`__reactEvents$`+Tt,At=`__reactListeners$`+Tt,jt=`__reactHandles$`+Tt,Mt=`__reactResources$`+Tt,Nt=`__reactMarker$`+Tt,Pt=`__reactLoad$`+Tt;function Ft(e){delete e[Et],delete e[Dt],delete e[At],delete e[jt]}function It(e){var t;if(t=e[Et])return t;for(var n=e.parentNode;n;){if(t=n[Ot]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Om(e);e!==null;){if(n=e[Et])return n;e=Om(e)}return t}e=n,n=e.parentNode}return null}function Lt(e){if(e=e[Et]||e[Ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Rt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function zt(e){var t=e[Mt];return t||=e[Mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Bt(e){e[Nt]=!0}function Vt(e){e[Pt]=void 0}var Ht=new Set,Ut={};function Wt(e,t){Gt(e,t),Gt(e+`Capture`,t)}function Gt(e,t){for(Ut[e]=t,e=0;e<t.length;e++)Ht.add(t[e])}var Kt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),qt={},Jt={};function Yt(e){return Be.call(Jt,e)?!0:Be.call(qt,e)?!1:Kt.test(e)?Jt[e]=!0:(qt[e]=!0,!1)}var Xt=!1;function Zt(){var e=Xt;return Xt=!1,e}function Qt(e,t,n){if(Yt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function $t(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function en(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function tn(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function nn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function rn(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function an(e){if(!e._valueTracker){var t=nn(e)?`checked`:`value`;e._valueTracker=rn(e,t,``+e[t])}}function on(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=nn(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var sn=/[\n"\\]/g;function cn(e){return e.replace(sn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function ln(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+tn(t)):e.value!==``+tn(t)&&(e.value=``+tn(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):dn(e,tn(n)):o===`number`&&e.value==t?dn(e,tn(e.value)):dn(e,tn(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+tn(s):e.removeAttribute(`name`)}function un(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){an(e);return}n=n==null?``:``+tn(n),t=t==null?n:``+tn(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),an(e)}function dn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function fn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+tn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function pn(e,t,n){if(t!=null&&(t=``+tn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+tn(n)}function mn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ye(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=tn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),an(e)}function hn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var gn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function _n(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||gn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function vn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Xt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(_n(e,a,r),Xt=!0)}else for(var o in t)t.hasOwnProperty(o)&&_n(e,o,t[o])}function yn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var bn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),xn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Sn(e){return xn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Cn(){}var wn=null;function Tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var En=null,Dn=null;function On(e){var t=Lt(e);if(t&&(e=t.stateNode)){var n=e[Dt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(ln(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+cn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Dt]||null;if(!a)throw Error(i(90));ln(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&on(r)}break a;case`textarea`:pn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&fn(e,!!n.multiple,t,!1)}}}var kn=!1;function An(e,t,n){if(kn)return e(t,n);kn=!0;try{return e(t)}finally{if(kn=!1,(En!==null||Dn!==null)&&(Qd(),En&&(t=En,e=Dn,Dn=En=null,On(t),e)))for(t=0;t<e.length;t++)On(e[t])}}function jn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Dt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Mn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Nn=!1;if(Mn)try{var Pn={};Object.defineProperty(Pn,"passive",{get:function(){Nn=!0}}),window.addEventListener(`test`,Pn,Pn),window.removeEventListener(`test`,Pn,Pn)}catch{Nn=!1}var Fn=null,F=null,In=null;function Ln(){if(In)return In;var e,t=F,n=t.length,r,i=`value`in Fn?Fn.value:Fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return In=i.slice(e,1<r?1-r:void 0)}function Rn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zn(){return!0}function Bn(){return!1}function Vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?zn:Bn,this.isPropagationStopped=Bn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=zn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=zn)},persist:function(){},isPersistent:zn}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Un=Vn(Hn),Wn=D({},Hn,{view:0,detail:0}),Gn=Vn(Wn),Kn,qn,Jn,Yn=D({},Wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:or,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Jn&&(Jn&&e.type===`mousemove`?(Kn=e.screenX-Jn.screenX,qn=e.screenY-Jn.screenY):qn=Kn=0,Jn=e),Kn)},movementY:function(e){return`movementY`in e?e.movementY:qn}}),Xn=Vn(Yn),Zn=Vn(D({},Yn,{dataTransfer:0})),Qn=Vn(D({},Wn,{relatedTarget:0})),$n=Vn(D({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0})),er=Vn(D({},Hn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),tr=Vn(D({},Hn,{data:0})),nr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},rr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},ir={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ar(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ir[e])?!!t[e]:!1}function or(){return ar}var sr=Vn(D({},Wn,{key:function(e){if(e.key){var t=nr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Rn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?rr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:or,charCode:function(e){return e.type===`keypress`?Rn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Rn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),cr=Vn(D({},Yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),lr=Vn(D({},Hn,{submitter:0})),ur=Vn(D({},Wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:or})),dr=Vn(D({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),fr=Vn(D({},Yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),pr=Vn(D({},Hn,{newState:0,oldState:0,source:0})),mr=[9,13,27,32],hr=Mn&&`CompositionEvent`in window,gr=null;Mn&&`documentMode`in document&&(gr=document.documentMode);var _r=Mn&&`TextEvent`in window&&!gr,vr=Mn&&(!hr||gr&&8<gr&&11>=gr),yr=` `,br=!1;function xr(e,t){switch(e){case`keyup`:return mr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Cr=!1;function wr(e,t){switch(e){case`compositionend`:return Sr(t);case`keypress`:return t.which===32?(br=!0,yr):null;case`textInput`:return e=t.data,e===yr&&br?null:e;default:return null}}function Tr(e,t){if(Cr)return e===`compositionend`||!hr&&xr(e,t)?(e=Ln(),In=F=Fn=null,Cr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return vr&&t.locale!==`ko`?null:t.data;default:return null}}var Er={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Er[e.type]:t===`textarea`}function Or(e,t,n,r){En?Dn?Dn.push(r):Dn=[r]:En=r,t=lp(t,`onChange`),0<t.length&&(n=new Un(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var kr=null,Ar=null;function jr(e){tp(e,0)}function Mr(e){if(on(Rt(e)))return e}function Nr(e,t){if(e===`change`)return t}var Pr=!1;if(Mn){var Fr;if(Mn){var Ir=`oninput`in document;if(!Ir){var Lr=document.createElement(`div`);Lr.setAttribute(`oninput`,`return;`),Ir=typeof Lr.oninput==`function`}Fr=Ir}else Fr=!1;Pr=Fr&&(!document.documentMode||9<document.documentMode)}function Rr(){kr&&(kr.detachEvent(`onpropertychange`,zr),Ar=kr=null)}function zr(e){if(e.propertyName===`value`&&Mr(Ar)){var t=[];Or(t,Ar,e,Tn(e)),An(jr,t)}}function Br(e,t,n){e===`focusin`?(Rr(),kr=t,Ar=n,kr.attachEvent(`onpropertychange`,zr)):e===`focusout`&&Rr()}function Vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Mr(Ar)}function Hr(e,t){if(e===`click`)return Mr(t)}function Ur(e,t){if(e===`input`||e===`change`)return Mr(t)}function Wr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Gr=typeof Object.is==`function`?Object.is:Wr;function Kr(e,t){if(Gr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Be.call(t,i)||!Gr(e[i],t[i]))return!1}return!0}function qr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Jr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yr(e,t){var n=Jr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Jr(n)}}function Xr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=qr(e.document)}return t}function Qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var $r=Mn&&`documentMode`in document&&11>=document.documentMode,ei=null,ti=null,ni=null,ri=!1;function ii(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ri||ei==null||ei!==qr(r)||(r=ei,`selectionStart`in r&&Qr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ni&&Kr(ni,r)||(ni=r,r=lp(ti,`onSelect`),0<r.length&&(t=new Un(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=ei)))}function ai(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var oi={animationend:ai(`Animation`,`AnimationEnd`),animationiteration:ai(`Animation`,`AnimationIteration`),animationstart:ai(`Animation`,`AnimationStart`),transitionrun:ai(`Transition`,`TransitionRun`),transitionstart:ai(`Transition`,`TransitionStart`),transitioncancel:ai(`Transition`,`TransitionCancel`),transitionend:ai(`Transition`,`TransitionEnd`)},si={},ci={};Mn&&(ci=document.createElement(`div`).style,`AnimationEvent`in window||(delete oi.animationend.animation,delete oi.animationiteration.animation,delete oi.animationstart.animation),`TransitionEvent`in window||delete oi.transitionend.transition);function li(e){if(si[e])return si[e];if(!oi[e])return e;var t=oi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ci)return si[e]=t[n];return e}var ui=li(`animationend`),di=li(`animationiteration`),fi=li(`animationstart`),pi=li(`transitionrun`),mi=li(`transitionstart`),hi=li(`transitioncancel`),gi=li(`transitionend`),_i=new Map,vi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);vi.push(`scrollEnd`);function yi(e,t){_i.set(e,t),Wt(t,[e])}var bi=0;function xi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Nd.identifierPrefix;var n=bi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function Si(e){if(e==null||typeof e==`string`)return e;var t=null,n=Vd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function Ci(e,t){return e=Si(e),t=Si(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var wi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ti=[],Ei=0,Di=0;function I(){for(var e=Ei,t=Di=Ei=0;t<e;){var n=Ti[t];Ti[t++]=null;var r=Ti[t];Ti[t++]=null;var i=Ti[t];Ti[t++]=null;var a=Ti[t];if(Ti[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ji(n,i,a)}}function Oi(e,t,n,r){Ti[Ei++]=e,Ti[Ei++]=t,Ti[Ei++]=n,Ti[Ei++]=r,Di|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ki(e,t,n,r){return Oi(e,t,n,r),Mi(e)}function Ai(e,t){return Oi(e,null,null,t),Mi(e)}function ji(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-nt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Mi(e){if(50<Hd)throw Hd=0,Ud=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ni={};function Pi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fi(e,t,n,r){return new Pi(e,t,n,r)}function Ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Li(e,t){var n=e.alternate;return n===null?(n=Fi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ri(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ii(r)&&(s=1);else if(typeof r==`string`)s=lh(e,n,Te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ue:return e=Fi(31,n,t,a),e.elementType=ue,e.lanes=o,e;case ne:return Bi(n.children,a,o,t);case re:s=8,a|=24;break;case ie:return e=Fi(12,n,t,a|2),e.elementType=ie,e.lanes=o,e;case oe:return e=Fi(13,n,t,a),e.elementType=oe,e.lanes=o,e;case se:return e=Fi(19,n,t,a),e.elementType=se,e.lanes=o,e;case de:case pe:return e=a|32,e=Fi(30,n,t,e),e.elementType=pe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ae:s=10;break a;case k:s=9;break a;case A:s=11;break a;case ce:s=14;break a;case le:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Bi(e,t,n,r){return e=Fi(7,e,r,t),e.lanes=n,e}function Vi(e,t,n){return e=Fi(6,e,null,t),e.lanes=n,e}function Hi(e){var t=Fi(18,null,null,0);return t.stateNode=e,t}function Ui(e,t,n){return t=Fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wi=new WeakMap;function Gi(e,t){if(typeof e==`object`&&e){var n=Wi.get(e);return n===void 0?(t={value:e,source:t,stack:ze(t)},Wi.set(e,t),t):n}return{value:e,source:t,stack:ze(t)}}var Ki=[],qi=0,Ji=null,Yi=0,Xi=[],Zi=0,Qi=null,$i=1,ea=``;function ta(e,t){Ki[qi++]=Yi,Ki[qi++]=Ji,Ji=e,Yi=t}function na(e,t,n){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,Qi=e;var r=$i;e=ea;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var a=32-nt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,$i=1<<32-nt(t)+i|n<<i|r,ea=a+e}else $i=1<<a|n<<i|r,ea=e}function ra(e){e.return!==null&&(ta(e,1),na(e,1,0))}function ia(e){for(;e===Ji;)Ji=Ki[--qi],Ki[qi]=null,Yi=Ki[--qi],Ki[qi]=null;for(;e===Qi;)Qi=Xi[--Zi],Xi[Zi]=null,ea=Xi[--Zi],Xi[Zi]=null,$i=Xi[--Zi],Xi[Zi]=null}function aa(e,t){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,$i=t.id,ea=t.overflow,Qi=e}var oa=null,sa=null,ca=!1,la=null,ua=!1,da=Error(i(519));function fa(e){throw va(Gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),da}function pa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Et]=e,t[Dt]=r,n){case`dialog`:np(`cancel`,t),np(`close`,t);break;case`iframe`:case`object`:case`embed`:np(`load`,t);break;case`video`:case`audio`:for(n=0;n<$f.length;n++)np($f[n],t);break;case`source`:np(`error`,t);break;case`img`:case`image`:case`link`:np(`error`,t),np(`load`,t);break;case`details`:np(`toggle`,t);break;case`input`:np(`invalid`,t),un(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:np(`invalid`,t);break;case`textarea`:np(`invalid`,t),mn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||hp(t.textContent,n)?(r.popover!=null&&(np(`beforetoggle`,t),np(`toggle`,t)),r.onScroll!=null&&np(`scroll`,t),r.onScrollEnd!=null&&np(`scrollend`,t),r.onClick!=null&&(t.onclick=Cn),t=!0):t=!1,t||fa(e,!0)}function ma(e){for(oa=e.return;oa;)switch(oa.tag){case 5:case 31:case 13:ua=!1;return;case 27:case 3:ua=!0;return;default:oa=oa.return}}function ha(e){if(e!==oa)return!1;if(!ca)return ma(e),ca=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||kp(e.type,e.memoizedProps)),n=!n),n&&sa&&fa(e),ma(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=Dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=Dm(e)}else t===27?(t=sa,Rp(e.type)?(e=Em,Em=null,sa=e):sa=t):sa=oa?Tm(e.stateNode.nextSibling):null;return!0}function ga(){sa=oa=null,ca=!1}function _a(){var e=la;return e!==null&&(Td===null?Td=e:Td.push.apply(Td,e),la=null),e}function va(e){la===null?la=[e]:la.push(e)}var ya=Se(null),ba=null,xa=null;function Sa(e,t,n){we(ya,t._currentValue),t._currentValue=n}function Ca(e){e._currentValue=ya.current,Ce(ya)}function wa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ta(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),wa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),wa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),wa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Gr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Ch]:e.push(Ch))}a=a.return}return e!==null&&Ta(t,e,n,r),t.flags|=262144,e!==null}function Da(e){for(e=e.firstContext;e!==null;){if(!Gr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Oa(e){ba=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ka(e){return ja(ba,e)}function Aa(e,t){return ba===null&&Oa(e),ja(e,t)}function ja(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},xa===null){if(e===null)throw Error(i(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return n}var Ma=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Na=t.unstable_scheduleCallback,Pa=t.unstable_NormalPriority,Fa={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ia(){return{controller:new Ma,data:new Map,refCount:0}}function La(e){e.refCount--,e.refCount===0&&Na(Pa,function(){e.controller.abort()})}function Ra(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var za=null;function Ba(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Va=null,Ha=0,Ua=0,Wa=null;function Ga(e,t){if(Va===null){var n=Va=[];Ha=0,Ua=Jf(),Wa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ha++,t.then(Ka,Ka),t}function Ka(){if(--Ha===0&&(za=null,Va!==null)){Wa!==null&&(Wa.status=`fulfilled`);var e=Va;Va=null,Ua=0,Wa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ja=j.S;j.S=function(e,t){if(Od=We(),typeof t==`object`&&t&&typeof t.then==`function`&&Ga(e,t),za!==null)for(var n=Pf;n!==null;)Ra(n,za),n=n.next;if(n=e.types,n!==null){for(var r=Pf;r!==null;)Ra(r,n),r=r.next;if(Ua!==0){r=za,r===null&&(r=za=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ja!==null&&Ja(e,t)};var Ya=Se(null);function Xa(){var e=Ya.current;return e===null?ld.pooledCache:e}function Za(e,t){t===null?we(Ya,Ya.current):we(Ya,t.pool)}function Qa(){var e=Xa();return e===null?null:{parent:Fa._currentValue,pool:e}}var $a=Error(i(460)),eo=Error(i(474)),to=Error(i(542)),no={then:function(){}};function ro(e){return e=e.status,e===`fulfilled`||e===`rejected`}function io(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Cn,Cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,co(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Cn,Cn);else{if(e=ld,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,co(e),e}throw oo=t,$a}}function ao(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(oo=e,$a):e}}var oo=null;function so(){if(oo===null)throw Error(i(459));var e=oo;return oo=null,e}function co(e){if(e===$a||e===to)throw Error(i(483))}var lo=null,uo=0;function fo(e){var t=uo;return uo+=1,lo===null&&(lo=[]),io(lo,e,t)}function po(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function mo(e,t){throw t.$$typeof===ee?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ho(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===ne?(e=d(e,t,n.props.children,r,n.key),po(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===le&&ao(i)===t.type)?(t=a(t,n.props),po(t,n),t.return=e,t):(t=zi(n.type,n.key,n.props,null,e.mode,r),po(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ui(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case O:return n=zi(t.type,t.key,t.props,null,e.mode,n),po(n,t),n.return=e,n;case te:return t=Ui(t,e.mode,n),t.return=e,t;case le:return t=ao(t),f(e,t,n)}if(ye(t)||ge(t))return t=Bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,fo(t),n);if(t.$$typeof===ae)return f(e,Aa(e,t),n);mo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case O:return n.key===i?l(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null;case le:return n=ao(n),p(e,t,n,r)}if(ye(n)||ge(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,fo(n),r);if(n.$$typeof===ae)return p(e,t,Aa(e,n),r);mo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case O:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case te:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case le:return r=ao(r),m(e,t,n,r,i)}if(ye(r)||ge(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,fo(r),i);if(r.$$typeof===ae)return m(e,t,n,Aa(t,r),i);mo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ca&&ta(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ca&&ta(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ca&&ta(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ca&&ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ca&&ta(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ca&&ta(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ne&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case O:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ne){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),po(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===le&&ao(l)===r.type){n(e,r.sibling),c=a(r,o.props),po(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ne?(c=Bi(o.props.children,e.mode,c,o.key),po(c,o),c.return=e,e=c):(c=zi(o.type,o.key,o.props,null,e.mode,c),po(c,o),c.return=e,e=c)}return s(e);case te:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ui(o,e.mode,c),c.return=e,e=c}return s(e);case le:return o=ao(o),_(e,r,o,c)}if(ye(o))return h(e,r,o,c);if(ge(o)){if(l=ge(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,fo(o),c);if(o.$$typeof===ae)return _(e,r,Aa(e,o),c);mo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{uo=0;var i=_(e,t,n,r);return lo=null,i}catch(t){if(t===$a||t===to)throw t;var a=Fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var go=ho(!0),_o=ho(!1),vo=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function So(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,cd&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Mi(e),ji(e,null,n),t}return Oi(e,r,t,n),Mi(e)}function Co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var To=!1;function Eo(){if(To){var e=Wa;if(e!==null)throw e}}function Do(e,t,n,r){To=!1;var i=e.updateQueue;vo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(dd&f)===f:(r&f)===f){f!==0&&f===Ua&&(To=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:vo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),yd|=o,e.lanes=o,e.memoizedState=d}}function Oo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ko(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Oo(n[e],t)}var Ao=Se(null),jo=Se(0);function Mo(e,t){e=_d,we(jo,e),we(Ao,t),_d=e|t.baseLanes}function No(){we(jo,_d),we(Ao,Ao.current)}function Po(){_d=jo.current,Ce(Ao),Ce(jo)}var Fo=Se(null),Io=null;function Lo(e){var t=e.alternate;we(Ho,Ho.current&1),we(Fo,e),Io===null&&(t===null||Ao.current!==null||t.memoizedState!==null)&&(Io=e)}function Ro(e){we(Ho,Ho.current),we(Fo,e),Io===null&&(Io=e)}function zo(e){e.tag===22?(we(Ho,Ho.current),we(Fo,e),Io===null&&(Io=e)):Bo()}function Bo(){we(Ho,Ho.current),we(Fo,Fo.current)}function Vo(e){Ce(Fo),Io===e&&(Io=null),Ce(Ho)}var Ho=Se(0);function Uo(e,t){we(Fo,Fo.current),we(Ho,t)}function Wo(e){Ce(Ho),Ce(Fo),Io===e&&(Io=null)}function Go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Sm(n)||Cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ko=0,qo=null,Jo=null,Yo=null,Xo=!1,Zo=!1,Qo=!1,$o=0,es=0,ts=null,ns=0;function rs(){throw Error(i(321))}function is(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gr(e[n],t[n]))return!1;return!0}function as(e,t,n,r,i,a){return Ko=a,qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Sc:Cc,Qo=!1,a=n(r,i),Qo=!1,Zo&&(a=ss(t,n,r,i)),os(e),a}function os(e){j.H=xc;var t=Jo!==null&&Jo.next!==null;if(Ko=0,Yo=Jo=qo=null,Xo=!1,es=0,ts=null,t)throw Error(i(300));e===null||Bc||(e=e.dependencies,e!==null&&Da(e)&&(Bc=!0))}function ss(e,t,n,r){qo=e;var a=0;do{if(Zo&&(ts=null),es=0,Zo=!1,25<=a)throw Error(i(301));if(a+=1,Yo=Jo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=wc,o=t(n,r)}while(Zo);return o}function cs(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?hs(t):t,e=e.useState()[0],(Jo===null?null:Jo.memoizedState)!==e&&(qo.flags|=1024),t}function ls(){var e=$o!==0;return $o=0,e}function us(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ds(e){if(Xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xo=!1}Ko=0,Yo=Jo=qo=null,Zo=!1,es=$o=0,ts=null}function fs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yo===null?qo.memoizedState=Yo=e:Yo=Yo.next=e,Yo}function ps(){if(Jo===null){var e=qo.alternate;e=e===null?null:e.memoizedState}else e=Jo.next;var t=Yo===null?qo.memoizedState:Yo.next;if(t!==null)Yo=t,Jo=e;else{if(e===null)throw qo.alternate===null?Error(i(467)):Error(i(310));Jo=e,e={memoizedState:Jo.memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},Yo===null?qo.memoizedState=Yo=e:Yo=Yo.next=e}return Yo}function ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hs(e){var t=es;return es+=1,ts===null&&(ts=[]),e=io(ts,e,t),t=qo,(Yo===null?t.memoizedState:Yo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Sc:Cc),e}function gs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return hs(e);if(e.$$typeof===me)return;if(e.$$typeof===ae)return ka(e)}throw Error(i(438,String(e)))}function _s(e){var t=null,n=qo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=qo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ms(),qo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=fe;return t.index++,n}function vs(e,t){return typeof t==`function`?t(e):t}function ys(e){return bs(ps(),Jo,e)}function bs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Ko&f)===f:(dd&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ua&&(d=!0);else if((Ko&p)===p){u=u.next,p===Ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,qo.lanes|=p,yd|=p;f=u.action,Qo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,qo.lanes|=f,yd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Gr(o,e.memoizedState)&&(Bc=!0,d&&(n=Wa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function xs(e){var t=ps(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Gr(o,t.memoizedState)||(Bc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ss(e,t,n){var r=qo,a=ps(),o=ca;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Gr((Jo||a).memoizedState,n);if(s&&(a.memoizedState=n,Bc=!0),a=a.queue,qs(Ts.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Yo!==null&&!!(Yo.memoizedState.tag&1),Hs(e?9:8,{destroy:void 0},ws.bind(null,r,a,n,t),null),e){if(r.flags|=2048,ld===null)throw Error(i(349));o||Ko&127||Cs(r,t,n)}return n}function Cs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qo.updateQueue,t===null?(t=ms(),qo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ws(e,t,n,r){t.value=n,t.getSnapshot=r,Es(t)&&Ds(e)}function Ts(e,t,n){return n(function(){Es(t)&&Ds(e)})}function Es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gr(e,n)}catch{return!0}}function Ds(e){var t=Ai(e,2);t!==null&&qd(t,e,2)}function Os(e){var t=fs();if(typeof e==`function`){var n=e;if(e=n(),Qo){tt(!0);try{n()}finally{tt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:e},t}function ks(e,t,n,r){return e.baseState=n,bs(e,Jo,typeof r==`function`?r:vs)}function As(e,t,n,r,a){if(vc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,js(t,o)):(o.next=n.next,t.pending=n.next=o)}}function js(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};o.types=a===null?null:a.types,j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Ms(e,t,s)}catch(n){Ps(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Ms(e,t,a)}catch(n){Ps(e,t,n)}}function Ms(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ns(e,t,n)},function(n){return Ps(e,t,n)}):Ns(e,t,n)}function Ns(e,t,n){t.status=`fulfilled`,t.value=n,Fs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,js(e,n)))}function Ps(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Fs(t),t=t.next;while(t!==r)}e.action=null}function Fs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Is(e,t){return t}function Ls(e,t){if(ca){var n=ld.formState;if(n!==null){a:{var r=qo;if(ca){if(sa){b:{for(var i=sa,a=ua;i.nodeType!==8;){if(!a){i=null;break b}if(i=Tm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){sa=Tm(i.nextSibling),r=i.data===`F!`;break a}}fa(r)}r=!1}r&&(t=n[0])}}return n=fs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:t},n.queue=r,n=hc.bind(null,qo,r),r.dispatch=n,r=Os(!1),a=_c.bind(null,qo,!1,r.queue),r=fs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=As.bind(null,qo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Rs(e){return zs(ps(),Jo,e)}function zs(e,t,n){if(t=bs(e,t,Is)[0],e=ys(vs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=hs(t)}catch(e){throw e===$a?to:e}else r=t;t=ps();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(qo.flags|=2048,Hs(9,{destroy:void 0},Bs.bind(null,i,n),null)),[r,a,e]}function Bs(e,t){e.action=t}function Vs(e){var t=ps(),n=Jo;if(n!==null)return zs(t,n,e);ps(),t=t.memoizedState,n=ps();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Hs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=qo.updateQueue,t===null&&(t=ms(),qo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Us(){return ps().memoizedState}function Ws(e,t,n,r){var i=fs();qo.flags|=e,i.memoizedState=Hs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Gs(e,t,n,r){var i=ps();r=r===void 0?null:r;var a=i.memoizedState.inst;Jo!==null&&r!==null&&is(r,Jo.memoizedState.deps)?i.memoizedState=Hs(t,a,n,r):(qo.flags|=e,i.memoizedState=Hs(1|t,a,n,r))}function Ks(e,t){Ws(8390656,8,e,t)}function qs(e,t){Gs(2048,8,e,t)}function Js(e){qo.flags|=4;var t=qo.updateQueue;if(t===null)t=ms(),qo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ys(e){var t=ps().memoizedState;return Js({ref:t,nextImpl:e}),function(){if(cd&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Xs(e,t){return Gs(4,2,e,t)}function Zs(e,t){return Gs(4,4,e,t)}function Qs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $s(e,t,n){n=n==null?null:n.concat([e]),Gs(4,4,Qs.bind(null,t,e),n)}function ec(){}function tc(e,t){var n=ps();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&is(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nc(e,t){var n=ps();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&is(t,r[1]))return r[0];if(r=e(),Qo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r}function rc(e,t,n){return n===void 0||Ko&1073741824&&!(dd&261930)?e.memoizedState=t:(e.memoizedState=n,e=Gd(),qo.lanes|=e,yd|=e,n)}function ic(e,t,n,r){return Gr(n,t)?n:Ao.current===null?!(Ko&106)||Ko&1073741824&&!(dd&261930)?(Bc=!0,e.memoizedState=n):(e=Gd(),qo.lanes|=e,yd|=e,t):(e=rc(e,n,r),Gr(e,t)||(Bc=!0),e)}function ac(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};s.types=o===null?null:o.types,j.T=s,_c(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?gc(e,t,qa(c,r),Wd(e)):gc(e,t,r,Wd(e))}catch(n){gc(e,t,{then:function(){},status:`rejected`,reason:n},Wd())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function oc(){}function sc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=cc(e).queue;ac(e,a,t,be,n===null?oc:function(){return lc(e),n(r)})}function cc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:be},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function lc(e){var t=cc(e);t.next===null&&(t=e.alternate.memoizedState),gc(e,t.next.queue,{},Wd())}function uc(){return ka(Ch)}function dc(){return ps().memoizedState}function fc(){return ps().memoizedState}function pc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Wd();e=xo(n);var r=So(t,e,n);r!==null&&(qd(r,t,n),Co(r,t,n)),t={cache:Ia()},e.payload=t;return}t=t.return}}function mc(e,t,n){var r=Wd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vc(e)?yc(t,n):(n=ki(e,t,n,r),n!==null&&(qd(n,e,r),bc(n,t,r)))}function hc(e,t,n){gc(e,t,n,Wd())}function gc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(vc(e))yc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Gr(s,o))return Oi(e,t,i,0),ld===null&&I(),!1}catch{}if(n=ki(e,t,i,r),n!==null)return qd(n,e,r),bc(n,t,r),!0}return!1}function _c(e,t,n,r){if(r={lane:2,revertLane:Jf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},vc(e)){if(t)throw Error(i(479))}else t=ki(e,n,r,2),t!==null&&qd(t,e,2)}function vc(e){var t=e.alternate;return e===qo||t!==null&&t===qo}function yc(e,t){Zo=Xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}var xc={readContext:ka,use:gs,useCallback:rs,useContext:rs,useEffect:rs,useImperativeHandle:rs,useLayoutEffect:rs,useInsertionEffect:rs,useMemo:rs,useReducer:rs,useRef:rs,useState:rs,useDebugValue:rs,useDeferredValue:rs,useTransition:rs,useSyncExternalStore:rs,useId:rs,useHostTransitionStatus:rs,useFormState:rs,useActionState:rs,useOptimistic:rs,useMemoCache:rs,useCacheRefresh:rs,useEffectEvent:rs},Sc={readContext:ka,use:gs,useCallback:function(e,t){return fs().memoizedState=[e,t===void 0?null:t],e},useContext:ka,useEffect:Ks,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ws(4194308,4,Qs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ws(4194308,4,e,t)},useInsertionEffect:function(e,t){Ws(4,2,e,t)},useMemo:function(e,t){var n=fs();t=t===void 0?null:t;var r=e();if(Qo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fs();if(n!==void 0){var i=n(t);if(Qo){tt(!0);try{n(t)}finally{tt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=mc.bind(null,qo,e),[r.memoizedState,e]},useRef:function(e){var t=fs();return e={current:e},t.memoizedState=e},useState:function(e){e=Os(e);var t=e.queue,n=hc.bind(null,qo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ec,useDeferredValue:function(e,t){return rc(fs(),e,t)},useTransition:function(){var e=Os(!1);return e=ac.bind(null,qo,e.queue,!0,!1),fs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=qo,a=fs();if(ca){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ld===null)throw Error(i(349));dd&127||Cs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ks(Ts.bind(null,r,o,e),[e]),r.flags|=2048,Hs(9,{destroy:void 0},ws.bind(null,r,o,n,t),null),n},useId:function(){var e=fs(),t=ld.identifierPrefix;if(ca){var n=ea,r=$i;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=$o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ns++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:uc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e){var t=fs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=_c.bind(null,qo,!0,n),n.dispatch=t,[e,t]},useMemoCache:_s,useCacheRefresh:function(){return fs().memoizedState=pc.bind(null,qo)},useEffectEvent:function(e){var t=fs(),n={impl:e};return t.memoizedState=n,function(){if(cd&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Cc={readContext:ka,use:gs,useCallback:tc,useContext:ka,useEffect:qs,useImperativeHandle:$s,useInsertionEffect:Xs,useLayoutEffect:Zs,useMemo:nc,useReducer:ys,useRef:Us,useState:function(){return ys(vs)},useDebugValue:ec,useDeferredValue:function(e,t){return ic(ps(),Jo.memoizedState,e,t)},useTransition:function(){var e=ys(vs)[0],t=ps().memoizedState;return[typeof e==`boolean`?e:hs(e),t]},useSyncExternalStore:Ss,useId:dc,useHostTransitionStatus:uc,useFormState:Rs,useActionState:Rs,useOptimistic:function(e,t){return ks(ps(),Jo,e,t)},useMemoCache:_s,useCacheRefresh:fc,useEffectEvent:Ys},wc={readContext:ka,use:gs,useCallback:tc,useContext:ka,useEffect:qs,useImperativeHandle:$s,useInsertionEffect:Xs,useLayoutEffect:Zs,useMemo:nc,useReducer:xs,useRef:Us,useState:function(){return xs(vs)},useDebugValue:ec,useDeferredValue:function(e,t){var n=ps();return Jo===null?rc(n,e,t):ic(n,Jo.memoizedState,e,t)},useTransition:function(){var e=xs(vs)[0],t=ps().memoizedState;return[typeof e==`boolean`?e:hs(e),t]},useSyncExternalStore:Ss,useId:dc,useHostTransitionStatus:uc,useFormState:Vs,useActionState:Vs,useOptimistic:function(e,t){var n=ps();return Jo===null?(n.baseState=e,[e,n.queue.dispatch]):ks(n,Jo,e,t)},useMemoCache:_s,useCacheRefresh:fc,useEffectEvent:Ys};function Tc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ec={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wd(),i=xo(r);i.payload=t,n!=null&&(i.callback=n),t=So(e,i,r),t!==null&&(qd(t,e,r),Co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wd(),i=xo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=So(e,i,r),t!==null&&(qd(t,e,r),Co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wd(),r=xo(n);r.tag=2,t!=null&&(r.callback=t),t=So(e,r,n),t!==null&&(qd(t,e,n),Co(t,e,n))}};function Dc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Kr(n,r)||!Kr(i,a):!0}function Oc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function kc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ac(e){wi(e)}function jc(e){console.error(e)}function Mc(e){wi(e)}function Nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Pc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Fc(e,t,n){return n=xo(n),n.tag=3,n.payload={element:null},n.callback=function(){Nc(e,t)},n}function Ic(e){return e=xo(e),e.tag=3,e}function Lc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Pc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Pc(t,n,r),typeof i!=`function`&&(jd===null?jd=new Set([this]):jd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Rc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ea(t,n,a,!0),n=Fo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Io===null?of():n.alternate===null&&vd===0&&(vd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===no?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Of(e,r,a)),!1;case 22:return n.flags|=65536,r===no?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Of(e,r,a)),!1}throw Error(i(435,n.tag))}return Of(e,r,a),of(),!1}if(ca)return t=Fo.current,t===null?(r!==da&&(t=Error(i(423),{cause:r}),va(Gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Gi(r,n),a=Fc(e.stateNode,r,a),wo(e,a),vd!==4&&(vd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==da&&(e=Error(i(422),{cause:r}),va(Gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Gi(o,n),wd===null?wd=[o]:wd.push(o),vd!==4&&(vd=2),t===null)return!0;r=Gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Fc(n.stateNode,r,e),wo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(jd===null||!jd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ic(a),Lc(a,e,n,r),wo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var zc=Error(i(461)),Bc=!1;function Vc(e,t,n,r){t.child=e===null?_o(t,null,n,r):go(t,e.child,n,r)}function Hc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Oa(t),r=as(e,t,n,o,a,i),s=ls(),e!==null&&!Bc?(us(e,t,i),gl(e,t,i)):(ca&&s&&ra(t),t.flags|=1,Vc(e,t,r,i),t.child)}function Uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Wc(e,t,a,r,i)):(e=zi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!_l(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Kr:n,n(o,r)&&e.ref===t.ref)return gl(e,t,i)}return t.flags|=1,e=Li(a,r),e.ref=t.ref,e.return=t,t.child=e}function Wc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Kr(a,r)&&e.ref===t.ref){if(Bc=!1,t.pendingProps=r=a,_l(e,i))e.flags&131072&&(Bc=!0);else return t.lanes=e.lanes,gl(e,t,i)}}return Qc(e,t,n,r,i)}function Gc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return qc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Za(t,a===null?null:a.cachePool),a===null?No():Mo(t,a),zo(t);else return r=t.lanes=536870912,qc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Za(t,null),No(),Bo()):(Za(t,a.cachePool),Mo(t,a),Bo(),t.memoizedState=null);return Vc(e,t,i,n),t.child}function Kc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function qc(e,t,n,r,i){var a=Xa();return a=a===null?null:{parent:Fa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Za(t,null),No(),zo(t),e!==null&&Ea(e,t,r,!0),t.childLanes=i,null}function Jc(e,t){return t=sl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yc(e,t,n){return go(t,e.child,null,n),e=Jc(t,t.pendingProps),e.flags|=2,Vo(t),t.memoizedState=null,e}function Xc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(ca){if(r.mode===`hidden`)return e=Jc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Kc(null,e);if(Ro(t),(e=sa)?(e=xm(e,ua),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=536870912,null}return Jc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ro(t),a){if(t.flags&256)t.flags&=-257,t=Yc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Bc||Ea(e,t,n,!1),a=(n&e.childLanes)!==0,Bc||a){if(Ao.current===null){if(r=ld,r!==null&&(s=bt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ai(e,s),qd(r,e,s),zc;of()}t=Yc(e,t,n)}else e=o.treeContext,sa=Tm(s.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=Jc(t,r),t.flags|=134221824;return t}return e=Li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Qc(e,t,n,r,i){return Oa(t),n=as(e,t,n,r,void 0,i),r=ls(),e!==null&&!Bc?(us(e,t,i),gl(e,t,i)):(ca&&r&&ra(t),t.flags|=1,Vc(e,t,n,i),t.child)}function $c(e,t,n,r,i,a){return Oa(t),t.updateQueue=null,n=ss(t,r,n,i),os(e),r=ls(),e!==null&&!Bc?(us(e,t,a),gl(e,t,a)):(ca&&r&&ra(t),t.flags|=1,Vc(e,t,n,a),t.child)}function el(e,t,n,r,i){if(Oa(t),t.stateNode===null){var a=Ni,o=n.contextType;typeof o==`object`&&o&&(a=ka(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ec,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},yo(t),o=n.contextType,a.context=typeof o==`object`&&o?ka(o):Ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Tc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ec.enqueueReplaceState(a,a.state,null),Do(t,r,a,i),Eo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=kc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ni,typeof u==`object`&&u&&(o=ka(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Oc(t,a,r,o),vo=!1;var f=t.memoizedState;a.state=f,Do(t,r,a,i),Eo(),l=t.memoizedState,s||f!==l||vo?(typeof d==`function`&&(Tc(t,n,d,r),l=t.memoizedState),(c=vo||Dc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,bo(e,t),o=t.memoizedProps,u=kc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ni,typeof l==`object`&&l&&(c=ka(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Oc(t,a,r,c),vo=!1,f=t.memoizedState,a.state=f,Do(t,r,a,i),Eo();var p=t.memoizedState;o!==d||f!==p||vo||e!==null&&e.dependencies!==null&&Da(e.dependencies)?(typeof s==`function`&&(Tc(t,n,s,r),p=t.memoizedState),(u=vo||Dc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Da(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Zc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=go(t,e.child,null,i),t.child=go(t,null,n,i)):Vc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=gl(e,t,i),e}function tl(e,t,n,r){return ga(),t.flags|=256,Vc(e,t,n,r),t.child}var nl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rl(e){return{baseLanes:e,cachePool:Qa()}}function il(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Sd),e}function al(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Ho.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(ca){if(i?Lo(t):Bo(),(e=sa)?(e=xm(e,ua),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=Cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Bo(),i=t.mode,a=sl({mode:`hidden`,children:a},i),r=Bi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=rl(n),r.childLanes=il(e,o,n),t.memoizedState=nl,Kc(null,r)):(Lo(t),ol(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return ll(e,t,a,o,r,c,s,n)}return i?(Bo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Li(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Bi(i,a,n,null),i.flags|=2):i=Li(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Kc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=rl(n):(a=i.cachePool,a===null?a=Qa():(s=Fa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=il(e,o,n),t.memoizedState=nl,Kc(e.child,r)):(Lo(t),n=e.child,e=n.sibling,n=Li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function ol(e,t){return t=sl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function sl(e,t){return e=Fi(22,e,null,t),e.lanes=0,e}function cl(e,t,n){return go(t,e.child,null,n),e=ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ll(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Lo(t),t.flags&=-257,cl(e,t,c)):t.memoizedState===null?(Bo(),o=a.fallback,s=t.mode,a=sl({mode:`visible`,children:a.children},s),o=Bi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,go(t,e.child,null,c),a=t.child,a.memoizedState=rl(c),a.childLanes=il(e,r,c),t.memoizedState=nl,Kc(null,a)):(Bo(),t.child=e.child,t.flags|=128,null);if(Lo(t),Cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,va({value:a,source:null,stack:null})),cl(e,t,c)}if(Bc||Ea(e,t,c,!1),r=(c&e.childLanes)!==0,Bc||r){if(Ao.current!==null)return cl(e,t,c);if(r=ld,r!==null&&(a=bt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ai(e,a),qd(r,e,a),zc;return Sm(o)||of(),cl(e,t,c)}return Sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,sa=Tm(o.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=ol(t,a.children),t.flags|=134221824,t)}function ul(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),wa(e.return,t,n)}function dl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Go(n)===null&&(t=e),e=e.sibling}return t}function fl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function pl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ml(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Ho.current;if(t.flags&128)return Uo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Uo(t,o),i===`backwards`&&e!==null?(pl(e),Vc(e,t,r,n),pl(e)):Vc(e,t,r,n),r=ca?Yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ul(e,n,t);else if(e.tag===19)ul(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=dl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,pl(t)),fl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fl(t,!0,n,null,a,r);break;case`together`:fl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=dl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fl(t,!1,i,n,a,r)}return t.child}function hl(e,t,n){var r=t.pendingProps;return Sa(t,t.type,r.value),Vc(e,t,r.children,n),t.child}function gl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _l(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Da(e)))}function vl(e,t,n){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),Sa(t,Fa,e.memoizedState.cache),ga();break;case 27:case 5:je(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:Sa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Lo(t),t.flags|=128,null;r=Ea(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?al(e,t,n):(Lo(t),e=gl(e,t,n),e===null?null:e.sibling)}Lo(t);break;case 19:if(t.flags&128)return ml(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ml(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Uo(t,Ho.current),r)break;return null;case 22:return t.lanes=0,Gc(e,t,n,t.pendingProps);case 24:Sa(t,Fa,e.memoizedState.cache)}return gl(e,t,n)}function yl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Bc=!0;else{if(!_l(e,n)&&!(t.flags&128))return Bc=!1,vl(e,t,n);Bc=!!(e.flags&131072)}}else Bc=!1,ca&&t.flags&1048576&&na(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ao(t.elementType),t.type=e,typeof e==`function`)Ii(e)?(r=kc(e,r),t.tag=1,t=el(null,t,e,r,n)):(t.tag=0,t=Qc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===A){t.tag=11,t=Hc(null,t,e,r,n);break a}if(a===ce){t.tag=14,t=Uc(null,t,e,r,n);break a}if(a===ae){t.tag=10,t.type=e,t=hl(null,t,n);break a}}throw t=ve(e)||e,Error(i(306,t,``))}}return t;case 0:return Qc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=kc(r,t.pendingProps),el(e,t,r,a,n);case 3:a:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,bo(e,t),Do(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Sa(t,Fa,r),r!==o.cache&&Ta(t,[Fa],n,!0),Eo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=tl(e,t,r,n);break a}if(r!==a){a=Gi(Error(i(424)),t),va(a),t=tl(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(sa=Tm(e.firstChild),oa=t,ca=!0,la=null,ua=!0,n=_o(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ga(),r===a){t=gl(e,t,n);break a}Vc(e,t,r,n)}t=t.child}return t;case 26:return Zc(e,t),e===null?(n=Ym(t.type,null,t.pendingProps,null))?t.memoizedState=n:ca||(t.stateNode=Op(t.type,t.pendingProps,De.current,t)):t.memoizedState=Ym(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&ca&&(r=t.stateNode=jm(t.type,t.pendingProps,De.current),oa=t,ua=!0,a=sa,Rp(t.type)?(Em=a,sa=Tm(r.firstChild)):sa=a),Vc(e,t,t.pendingProps.children,n),Zc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ca&&((a=r=sa)&&(r=ym(r,t.type,t.pendingProps,ua),r===null?a=!1:(t.stateNode=r,oa=t,sa=Tm(r.firstChild),ua=!1,a=!0)),a||fa(t)),je(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,kp(a,o)?r=null:s!==null&&kp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=as(e,t,cs,null,null,n),Ch._currentValue=a),Zc(e,t),Vc(e,t,r,n),t.child;case 6:return e===null&&ca&&((e=n=sa)&&(n=bm(n,t.pendingProps,ua),n===null?e=!1:(t.stateNode=n,oa=t,sa=null,e=!0)),e||fa(t)),null;case 13:return al(e,t,n);case 4:return ke(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=go(t,null,r,n):Vc(e,t,r,n),t.child;case 11:return Hc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Zc(e,t),Vc(e,t,r,n),t.child;case 8:return Vc(e,t,t.pendingProps.children,n),t.child;case 12:return Vc(e,t,t.pendingProps.children,n),t.child;case 10:return hl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Oa(t),a=ka(a),r=r(a),t.flags|=1,Vc(e,t,r,n),t.child;case 14:return Uc(e,t,t.type,t.pendingProps,n);case 15:return Wc(e,t,t.type,t.pendingProps,n);case 19:return ml(e,t,n);case 31:return Xc(e,t,n);case 22:return Gc(e,t,n,t.pendingProps);case 24:return Oa(t),r=ka(Fa),e===null?(a=Xa(),a===null&&(a=ld,o=Ia(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},yo(t),Sa(t,Fa,a)):((e.lanes&n)!==0&&(bo(e,t),Do(t,null,null,n),Eo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Sa(t,Fa,r),r!==a.cache&&Ta(t,[Fa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Sa(t,Fa,r))),Vc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:ca&&ra(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Zc(e,t),Vc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function bl(e){e.flags|=4}function xl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?uh(t,r):uh(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(nf())e.flags|=8192;else throw oo=no,eo}}else e.flags&=-16777217}function Sl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!dh(t)){if(nf())e.flags|=8192;else throw oo=no,eo}}function Cl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:mt(),e.lanes|=t,Cd|=t)}function wl(e,t){if(!ca)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Tl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function El(e,t,n){var r=t.pendingProps;switch(ia(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tl(t),null;case 1:return Tl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ca(Fa),Ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ha(t)?bl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_a())),Tl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(bl(t),o===null?(Tl(t),xl(t,a,null,r,n)):(Tl(t),Sl(t,o))):o?o===e.memoizedState?(Tl(t),t.flags&=-16777217):(bl(t),Tl(t),Sl(t,o)):(e=e.memoizedProps,e!==r&&bl(t),Tl(t),xl(t,a,e,r,n)),null;case 27:if(Me(t),n=De.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&bl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Tl(t),t.subtreeFlags&=-33554433,null}e=Te.current,ha(t)?pa(t,e):(e=jm(a,r,n),t.stateNode=e,bl(t))}return Tl(t),t.subtreeFlags&=-33554433,null;case 5:if(Me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&bl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Tl(t),t.subtreeFlags&=-33554433,null}if(o=Te.current,ha(t))pa(t,o);else{var s=Tp(De.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Et]=t,o[Dt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(vp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&bl(t)}}return Tl(t),t.subtreeFlags&=-33554433,xl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&bl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=De.current,ha(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=oa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||hp(e.nodeValue,n)),e||fa(t,!0)}else e=Tp(e).createTextNode(r),e[Et]=t,t.stateNode=e}return Tl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ha(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Et]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tl(t),e=!1}else n=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Vo(t),t):(Vo(t),null);if(t.flags&128)throw Error(i(558))}return Tl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ha(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Et]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tl(t),a=!1}else a=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Vo(t),t):(Vo(t),null)}return Vo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Cl(t,t.updateQueue),Tl(t),null);case 4:return Ae(),e===null&&ap(t.stateNode.containerInfo),t.flags|=67108864,Tl(t),null;case 10:return Ca(t.type),Tl(t),null;case 19:if(Wo(t),r=t.memoizedState,r===null)return Tl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)wl(r,!1);else{if(vd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Go(e),o!==null){for(t.flags|=128,wl(r,!1),e=o.updateQueue,t.updateQueue=e,Cl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ri(n,e),n=n.sibling;return Uo(t,Ho.current&1|2),ca&&ta(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&We()>kd&&(t.flags|=128,a=!0,wl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Cl(t,e),wl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!ca)return Tl(t),null}else 2*We()-r.renderingStartTime>kd&&n!==536870912&&(t.flags|=128,a=!0,wl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=We(),e.sibling=null,o=Ho.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||ca?Uo(t,o):(n=o,we(Fo,t),we(Ho,n),Io===null&&(Io=t)),ca&&ta(t,r.treeForkCount),e}return Tl(t),null;case 22:case 23:return Vo(t),Po(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Tl(t),t.subtreeFlags&6&&(t.flags|=8192)):Tl(t),n=t.updateQueue,n!==null&&Cl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Ce(Ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ca(Fa),Tl(t),null;case 25:return null;case 30:return t.flags|=33554432,Tl(t),null}throw Error(i(156,t.tag))}function Dl(e,t){switch(ia(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(Fa),Ae(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 31:if(t.memoizedState!==null){if(Vo(t),t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ae(),null;case 10:return Ca(t.type),null;case 22:case 23:return Vo(t),Po(),e!==null&&Ce(Ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ca(Fa),null;case 25:return null;default:return null}}function Ol(e,t){switch(ia(t),t.tag){case 3:Ca(Fa),Ae();break;case 26:case 27:case 5:Me(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&Vo(t);break;case 13:Vo(t);break;case 19:Wo(t);break;case 10:Ca(t.type);break;case 22:case 23:Vo(t),Po(),e!==null&&Ce(Ya);break;case 24:Ca(Fa)}}function kl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Df(t,t.return,e)}}function Al(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Df(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Df(t,t.return,e)}}function jl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ko(t,n)}catch(t){Df(e,e.return,t)}}}function Ml(e,t,n){n.props=kc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Df(e,t,n)}}function Nl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=xi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Xp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Zp(e);h(e.child,!1,mm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Df(e,t,n)}}function Pl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Df(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Df(e,t,n)}else n.current=null}}function Fl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)gm(e.stateNode,t[n])}function Il(e){for(var t=e.return;t!==null&&(zl(t)&&gm(e.stateNode,t.stateNode),!Rl(t));)t=t.return}function Ll(e){for(var t=e.return;t!==null&&(zl(t)&&_m(e.stateNode,t.stateNode),!Rl(t));)t=t.return}function Rl(e){return e.tag===5||e.tag===3||e.tag===27}function zl(e){return e&&e.tag===7&&e.stateNode!==null}function Bl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Df(e,e.return,t)}}function Vl(e,t,n){try{var r=e.stateNode;bp(r,e.type,n,t),r[Dt]=t}catch(t){Df(e,e.return,t)}}function Hl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Rp(e.type)||e.tag===4}function Ul(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Hl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Rp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cn)),Fl(e,r),Xt=!0;else if(i!==4&&(i===27&&(Fl(e,r),r=null,Rp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Wl(e,t,n,r),e=e.sibling;e!==null;)Wl(e,t,n,r),e=e.sibling}function Gl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Fl(e,r),Xt=!0;else if(i!==4&&(i===27&&(Fl(e,r),r=null,Rp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Gl(e,t,n,r),e=e.sibling;e!==null;)Gl(e,t,n,r),e=e.sibling}function Kl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);vp(t,r,n),t[Et]=e,t[Dt]=n}catch(t){Df(e,e.return,t)}}var ql=!1,Jl=null;function Yl(e){(e.tag===30||e.subtreeFlags&33554432)&&(ql=!0)}var Xl=null;function Zl(){var e=Xl;return Xl=null,e}var Ql=0;function $l(e,t,n,r,i){return Ql=0,eu(e.child,t,n,r,i)}function eu(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Wp(o);r.push(s),s.view&&(a=!0)}else a||Wp(o).view&&(a=!0);ql=!0,Vp(o,Ql===0?t:t+`_`+Ql,n),Ql++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||eu(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function tu(e,t){for(;e!==null;)e.tag===5?Hp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||tu(e.child,t)),e=e.sibling}function nu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(nu(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=Ci(t.default,t.share),t!==`none`&&($l(e,n,t,null,!1)||tu(e.child,!1))}e=e.sibling}}function ru(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=xi(r,n),a=Ci(r.default,n.paired?r.share:r.enter);a===`none`?nu(e):$l(e,i,a,null,!1)?(nu(e),n.paired||t||Kd(e,r.onEnter)):tu(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ru(e,t),e=e.sibling;else nu(e)}function iu(e){if(Jl!==null&&Jl.size!==0){var t=Jl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=Ci(n.default,n.share);if(a!==`none`&&($l(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Kd(e,n.onShare)):tu(e.child,!1)),t.delete(r),t.size===0)break}}}iu(e)}e=e.sibling}}}function au(e){if(e.tag===30){var t=e.memoizedProps,n=xi(t,e.stateNode),r=Jl===null?void 0:Jl.get(n),i=Ci(t.default,r===void 0?t.exit:t.share);i!==`none`&&($l(e,n,i,null,!1)?r===void 0?Kd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Jl.delete(n),Kd(e,t.onShare)):tu(e.child,!1)),Jl!==null&&iu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)au(e),e=e.sibling;else Jl!==null&&iu(e)}function ou(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=xi(t,e.stateNode);t=Ci(t.default,t.update),e.flags&=-5,t!==`none`&&$l(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&ou(e);e=e.sibling}}function su(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,tu(e.child,!1))}su(e)}e=e.sibling}}function cu(e){if(e.tag===30)e.stateNode.paired=null,tu(e.child,!1),su(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)cu(e),e=e.sibling;else su(e)}function lu(e){for(e=e.child;e!==null;)e.tag===30?tu(e.child,!1):e.subtreeFlags&33554432&&lu(e),e=e.sibling}function uu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ql<a.length){var l=a[Ql],u=Wp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Vp(c,Ql===0?n:n+`_`+Ql,i),s&&e.flags&4||(Xl===null&&(Xl=[]),Xl.push(c,Ql===0?r:r+`_`+Ql,t.memoizedProps)),Ql++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:uu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function du(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=xi(n,r),a=Ci(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Gp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ql=0,i=uu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Kd(e,n.onUpdate))}else e.subtreeFlags&33554432&&du(e,t);e=e.sibling}}var fu=!1,pu=!1,mu=!1,hu=!1,gu=typeof WeakSet==`function`?WeakSet:Set,_u=null,vu=!1,yu=!1,bu=!1,xu=!1;function Su(e,t,n){if(e=e.containerInfo,Cp=Mh,e=Zr(e),Qr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(wp={focusedElem:e,selectionRange:r},Mh=!1,n=(n&335544064)===n,_u=t,t=n?9270:1024;_u!==null;){if(e=_u,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&au(r[a]);if(e.alternate===null&&e.flags&2)n&&Yl(e),Cu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&au(r),Cu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Yl(e),Cu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,_u=r):(n&&ou(e),Cu(n))}}Jl=null}function Cu(e){for(;_u!==null;){var t=_u,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=kc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Df(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)vm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:vm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=xi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Ci(a.default,a.update),a!==`none`&&$l(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,_u=r;break}_u=t.return}}function wu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Uu(e,n),r&4&&kl(5,n);break;case 1:if(Uu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Df(n,n.return,e)}else{var i=kc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Df(n,n.return,e)}}}r&64&&jl(n),r&512&&Nl(n,n.return);break;case 3:if(Uu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ko(e,t)}catch(e){Df(n,n.return,e)}}break;case 27:t===null&&r&4&&Kl(n);case 26:case 5:Uu(e,n),t===null&&r&4&&Bl(n),r&512&&Nl(n,n.return);break;case 12:Uu(e,n);break;case 31:Uu(e,n),r&4&&Nu(e,n);break;case 13:Uu(e,n),r&4&&Pu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=jf.bind(null,n),wm(e,n))));break;case 22:if(r=n.memoizedState!==null||fu,!r){var a=t!==null&&t.memoizedState!==null||pu;t=fu,i=pu,fu=r,(pu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Gu(e,n,r)):Uu(e,n),fu=t,pu=i}break;case 30:Uu(e,n),r&512&&Nl(n,n.return);break;case 7:r&512&&Nl(n,n.return);default:Uu(e,n)}}function Tu(e,t){for(e=e.child;e!==null;)Eu(e,t),e=e.sibling}function Eu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){Df(e,e.return,t)}Du(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Xt=!0}catch(t){Df(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Bp(s,!0):Bp(e.stateNode,!1)}catch(t){Df(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Tu(e,t);break;default:Tu(e,t)}}function Du(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:Eu(n,r);break a;case 22:n.memoizedState===null&&Du(n,r);break a;default:Du(n,r)}}e=e.sibling}}function Ou(e){var t=e.alternate;t!==null&&(e.alternate=null,Ou(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ku=null,Au=!1;function ju(e,t,n){for(n=n.child;n!==null;)Mu(e,t,n),n=n.sibling}function Mu(e,t,n){if(et&&typeof et.onCommitFiberUnmount==`function`)try{et.onCommitFiberUnmount($e,n)}catch{}switch(n.tag){case 26:pu||Pl(n,t),ju(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!pu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:pu||Pl(n,t),Ll(n);var r=ku,i=Au;Rp(n.type)&&(ku=n.stateNode,Au=!1),ju(e,t,n),Mm(n.stateNode,n.type,n.memoizedProps),ku=r,Au=i;break;case 5:pu||Pl(n,t),Ll(n);case 6:if(n.tag===6&&Ll(n),r=ku,i=Au,ku=null,ju(e,t,n),ku=r,Au=i,ku!==null){if(Au)try{(ku.nodeType===9?ku.body:ku.nodeName===`HTML`?ku.ownerDocument.body:ku).removeChild(n.stateNode),Xt=!0}catch(e){Df(n,t,e)}else try{ku.removeChild(n.stateNode),Xt=!0}catch(e){Df(n,t,e)}}break;case 18:ku!==null&&(Au?(e=ku,zp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),ig(e)):zp(ku,n.stateNode));break;case 4:r=ku,i=Au,ku=n.stateNode.containerInfo,Au=!0,ju(e,t,n),ku=r,Au=i;break;case 0:case 11:case 14:case 15:Al(2,n,t),pu||Al(4,n,t),ju(e,t,n);break;case 1:pu||(Pl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ml(n,t,r)),ju(e,t,n);break;case 21:ju(e,t,n);break;case 22:pu=(r=pu)||n.memoizedState!==null,ju(e,t,n),pu=r;break;case 30:Pl(n,t),ju(e,t,n);break;case 7:pu||Pl(n,t),ju(e,t,n);break;default:ju(e,t,n)}}function Nu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ig(e)}catch(e){Df(t,t.return,e)}}}function Pu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ig(e)}catch(e){Df(t,t.return,e)}}function Fu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new gu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new gu),t;default:throw Error(i(435,e.tag))}}function Iu(e,t){var n=Fu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Mf.bind(null,e,t);t.then(r,r)}})}function Lu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Rp(l.type)){ku=l.stateNode,Au=!1;break a}break;case 5:ku=l.stateNode,Au=!1;break a;case 3:case 4:ku=l.stateNode.containerInfo,Au=!0;break a}l=l.return}if(ku===null)throw Error(i(160));Mu(s,c,o),ku=null,Au=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zu(t,e,n),t=t.sibling}var Ru=null;function zu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Lu(t,e,n),Bu(e),a&4&&(Al(3,e,e.return),kl(3,e),Al(5,e,e.return));break;case 1:Lu(t,e,n),Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),a&64&&fu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Ru,Lu(t,e,n),Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(fu)e.stateNode=Op(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Nt]||r[Et]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),vp(r,t,n),r[Et]=e,Bt(r),t=r;break a;case`link`:if(o=sh(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),vp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=sh(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),vp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Et]=e,Bt(r),t=r}e.stateNode=t}}else fu||ch(o,e.type,e.stateNode)}else e.stateNode=nh(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Vl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||pu||t.parentNode.removeChild(t)):a.count--,n===null?fu||ch(o,e.type,e.stateNode):nh(o,n,e.memoizedProps))}break;case 27:Lu(t,e,n),Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),r!==null&&a&4&&Vl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=mu,mu=!1,Lu(t,e,n),mu=o,Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),e.flags&32){t=e.stateNode;try{hn(t,``),Xt=!0}catch(t){Df(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Vl(e,t,r===null?t:r.memoizedProps)),a&1024&&(hu=!0);break;case 6:if(Lu(t,e,n),Bu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Xt=!0}catch(t){Df(e,e.return,t)}}break;case 3:if(Xt=!1,oh=null,o=Ru,Ru=Im(t.containerInfo),Lu(t,e,n),Ru=o,Bu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{ig(t.containerInfo)}catch(t){Df(e,e.return,t)}hu&&(hu=!1,L(e)),Xt=!1;break;case 4:a=mu,mu=fu,r=Zt(),o=Ru,Ru=Im(e.stateNode.containerInfo),Lu(t,e,n),Bu(e),Ru=o,Xt&&yu&&(bu=!0),Xt=r,mu=a;break;case 12:Lu(t,e,n),Bu(e);break;case 31:Lu(t,e,n),Bu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Iu(e,t)));break;case 13:Lu(t,e,n),Bu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Dd=We()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Iu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=fu,l=pu,u=mu;fu=c||o,mu=u||o,pu=l||s,Lu(t,e,n),pu=l,mu=u,fu=c,Bu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||fu||pu||(t=s||pu,n=fu,r=pu,fu=o||fu,pu=t,Wu(e,2),fu=n,pu=r),!o&&mu||Tu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Iu(e,n))));break;case 19:Lu(t,e,n),Bu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Iu(e,t)));break;case 30:a&512&&(pu||r===null||Pl(r,r.return)),a=Zt(),o=yu,s=(n&335544064)===n,c=e.memoizedProps,yu=s&&Ci(c.default,c.update)!==`none`,Lu(t,e,n),Bu(e),s&&r!==null&&Xt&&(e.flags|=4),yu=o,Xt=a;break;case 21:break;case 7:a&512&&(pu||r===null||Pl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Lu(t,e,n),Bu(e)}}function Bu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Hl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(zl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Rl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Gl(e,Ul(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(hn(l,``),n.flags&=-33),Gl(e,Ul(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Wl(e,Ul(e),u,s);break;default:throw Error(i(161))}}catch(t){Df(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function L(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;L(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Mh=!0,t.reset(),Mh=!1),e=e.sibling}}function Vu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Hu(t,e),t=t.sibling;else du(t,!1)}function Hu(e,t){var n=e.alternate;if(n===null)ru(e,!1);else switch(e.tag){case 3:if(xu=vu=!1,Zl(),Vu(t,e),!vu&&!bu){if(e=Xl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Hp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),xu=!0}Xl=null;break;case 5:Vu(t,e);break;case 4:r=vu,vu=!1,Vu(t,e),vu&&(bu=!0),vu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Vu(t,e):ru(e,!1));break;case 30:r=vu,i=Zl(),vu=!1,Vu(t,e),vu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=xi(a,o),o=xi(n.memoizedProps,o);var s=Ci(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ql=0,t=uu(e,n,t,o,s,a,!0),Ql!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Kd(e,e.memoizedProps.onUpdate),Xl=i):i!==null&&(i.push.apply(i,Xl),Xl=i),vu=e.flags&32?!0:r;break;default:Vu(t,e)}}function Uu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wu(e,t.alternate,t),t=t.sibling}function Wu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Al(4,n,n.return),Wu(n,r);break;case 1:Pl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ml(n,n.return,i),Wu(n,r);break;case 27:r&2&&Mm(n.stateNode,n.type,n.memoizedProps);case 5:Pl(n,n.return),n.tag!==5&&n.tag!==27||Ll(n),Wu(n,r);break;case 6:Ll(n);break;case 26:Pl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||pu||i.parentNode.removeChild(i),Wu(n,r);break;case 22:n.memoizedState===null&&Wu(n,r);break;case 30:Pl(n,n.return),Wu(n,r);break;case 7:Pl(n,n.return);default:Wu(n,r)}e=e.sibling}}function Gu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Gu(i,a,n),kl(4,a);break;case 1:if(Gu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Df(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Oo(l[i],c)}catch(e){Df(r,r.return,e)}}s&&o&64&&jl(a),Nl(a,a.return);break;case 27:n&2&&Kl(a);case 5:a.tag!==5&&a.tag!==27||Il(a),Gu(i,a,n),s&&r===null&&o&4&&Bl(a),Nl(a,a.return);break;case 6:Il(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||fu||ch(Im(c.ownerDocument),a.type,c),Gu(i,a,n),s&&r===null&&o&4&&Bl(a),Nl(a,a.return);break;case 12:Gu(i,a,n);break;case 31:Gu(i,a,n),s&&o&4&&Nu(i,a);break;case 13:Gu(i,a,n),s&&o&4&&Pu(i,a);break;case 22:a.memoizedState===null&&Gu(i,a,n),Nl(a,a.return);break;case 30:Gu(i,a,n),Nl(a,a.return);break;case 7:Nl(a,a.return);default:Gu(i,a,n)}t=t.sibling}}function Ku(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&La(n))}function qu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&La(e))}function Ju(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Yu(e,t,n,r),t=t.sibling;else i&&lu(t)}function Yu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&cu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ju(e,t,n,r),a&2048&&kl(9,t);break;case 1:Ju(e,t,n,r);break;case 3:Ju(e,t,n,r),i&&xu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&La(a)));break;case 12:if(a&2048){Ju(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){Df(t,t.return,e)}}else Ju(e,t,n,r);break;case 31:Ju(e,t,n,r);break;case 13:Ju(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&cu(t),o._visibility&2?Ju(e,t,n,r):(o._visibility|=2,Xu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&cu(s),o._visibility&2?Ju(e,t,n,r):Zu(e,t)),a&2048&&Ku(s,t);break;case 24:Ju(e,t,n,r),a&2048&&qu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(tu(a.child,!0),tu(t.child,!0))),Ju(e,t,n,r);break;default:Ju(e,t,n,r)}}function Xu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Xu(a,o,s,c,i),kl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Xu(a,o,s,c,i)):u._visibility&2?Xu(a,o,s,c,i):Zu(a,o),i&&l&2048&&Ku(o.alternate,o);break;case 24:Xu(a,o,s,c,i),i&&l&2048&&qu(o.alternate,o);break;default:Xu(a,o,s,c,i)}t=t.sibling}}function Zu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Zu(n,r),i&2048&&Ku(r.alternate,r);break;case 24:Zu(n,r),i&2048&&qu(r.alternate,r);break;default:Zu(n,r)}t=t.sibling}}var Qu=8192;function $u(e,t,n){if(e.subtreeFlags&Qu)for(e=e.child;e!==null;)ed(e,t,n),e=e.sibling}function ed(e,t,n){switch(e.tag){case 26:$u(e,t,n),e.flags&Qu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&ph(n,e)):mh(n,Ru,e.memoizedState,e.memoizedProps));break;case 5:$u(e,t,n),e.flags&Qu&&(e=e.stateNode,(t&335544128)===t&&ph(n,e));break;case 3:case 4:var r=Ru;Ru=Im(e.stateNode.containerInfo),$u(e,t,n),Ru=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Qu,Qu=16777216,$u(e,t,n),Qu=r):$u(e,t,n));break;case 30:if((e.flags&Qu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Jl===null&&(Jl=new Map),Jl.set(r,i)}$u(e,t,n);break;default:$u(e,t,n)}}function td(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function nd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_u=r,ad(r,e)}td(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)rd(e),e=e.sibling}function rd(e){switch(e.tag){case 0:case 11:case 15:nd(e),e.flags&2048&&Al(9,e,e.return);break;case 3:nd(e);break;case 12:nd(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,id(e)):nd(e);break;default:nd(e)}}function id(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_u=r,ad(r,e)}td(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Al(8,t,t.return),id(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,id(t));break;default:id(t)}e=e.sibling}}function ad(e,t){for(;_u!==null;){var n=_u;switch(n.tag){case 0:case 11:case 15:Al(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:La(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,_u=r;else a:for(n=e;_u!==null;){r=_u;var i=r.sibling,a=r.return;if(Ou(r),r===n){_u=null;break a}if(i!==null){i.return=a,_u=i;break a}_u=a}}}var od={getCacheForType:function(e){var t=ka(Fa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ka(Fa).controller.signal}},sd=typeof WeakMap==`function`?WeakMap:Map,cd=0,ld=null,ud=null,dd=0,fd=0,pd=null,md=!1,hd=!1,gd=!1,_d=0,vd=0,yd=0,bd=0,xd=0,Sd=0,Cd=0,wd=null,Td=null,Ed=!1,Dd=0,Od=0,kd=1/0,Ad=null,jd=null,Md=0,Nd=null,Pd=null,Fd=0,Id=0,Ld=null,Rd=null,zd=null,Bd=null,Vd=null,Hd=0,Ud=null;function Wd(){return cd&2&&dd!==0?dd&-dd:j.T===null?Ct():Jf()}function Gd(){if(Sd===0){if(!(dd&536870912)||ca){var e=st;st<<=1,!(st&3932160)&&(st=262144),Sd=e}else Sd=536870912}return e=Fo.current,e!==null&&(e.flags|=32),Sd}function Kd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Xp(xi(e.memoizedProps,n))),Bd===null&&(Bd=[]),Bd.push(t.bind(null,r))}}function qd(e,t,n){(e===ld&&(fd===2||fd===9)||e.cancelPendingCommit!==null)&&(ef(e,0),Zd(e,dd,Sd,!1)),gt(e,n),(!(cd&2)||e!==ld)&&(e===ld&&(!(cd&2)&&(bd|=n),vd===4&&Zd(e,dd,Sd,!1)),Bf(e))}function Jd(e,t,n){if(cd&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||dt(e,t),a=r?lf(e,t):sf(e,t,!0),o=r;do{if(a===0){hd&&!r&&Zd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Xd(n)){a=sf(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=wd;var l=c.current.memoizedState.isDehydrated;if(l&&(ef(c,s).flags|=256),s=sf(c,s,!1),s!==2&&s!==6){if(gd&&!l){c.errorRecoveryDisabledLanes|=o,bd|=o,a=4;break a}o=Td,Td=a,o!==null&&(Td===null?Td=o:Td.push.apply(Td,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ef(e,0),Zd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Zd(r,t,Sd,!md);break a;case 2:Td=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Dd+300-We(),10<a)){if(Zd(r,t,Sd,!md),ut(r,0,!0)!==0)break a;Fd=t,r.timeoutHandle=Mp(Yd.bind(null,r,n,Td,Ad,Ed,t,Sd,bd,Cd,md,o,`Throttled`,-0,0),a);break a}Yd(r,n,Td,Ad,Ed,t,Sd,bd,Cd,md,o,null,-0,0)}break}while(1);Bf(e)}function Yd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cn},Jl=null,ed(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=vh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?Dd-We():(a&4194048)===a?Od-We():0,m=gh(d,m),m!==null)){Fd=a,e.cancelPendingCommit=m(gf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Zd(e,a,o,!l);return}gf(e,t,a,n,r,i,o,s,c,l,u,d)}function Xd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Gr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zd(e,t,n,r){t=ft(e,t),t&=~xd,t&=~bd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-nt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&vt(e,n,t)}function Qd(){return cd&6?!0:(Vf(0,!1),!1)}function $d(){if(ud!==null){if(fd===0)var e=ud.return;else e=ud,xa=ba=null,ds(e),lo=null,uo=0,e=ud;for(;e!==null;)Ol(e.alternate,e),e=e.return;ud=null}}function ef(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Np(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Fd=0,$d(),ld=e,ud=n=Li(e.current,null),dd=t,fd=0,pd=null,md=!1,hd=dt(e,t),gd=!1,Cd=Sd=xd=bd=yd=vd=0,Td=wd=null,Ed=!1,_d=ft(e,t),I(),n}function tf(e,t){qo=null,j.H=xc,t===$a||t===to?(t=so(),fd=3):t===eo?(t=so(),fd=4):fd=t===zc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,pd=t,ud===null&&(vd=1,Nc(e,Gi(t,e.current)))}function nf(){var e=Fo.current;return e===null?!0:(dd&4194048)===dd?Io===null:(dd&62914560)===dd||dd&536870912?e===Io:!1}function rf(){var e=j.H;return j.H=xc,e===null?xc:e}function af(){var e=j.A;return j.A=od,e}function of(){vd=4,md||(dd&4194048)!==dd&&Fo.current!==null||(hd=!0),!(yd&134217727)&&!(bd&134217727)||ld===null||Zd(ld,dd,Sd,!1)}function sf(e,t,n){var r=cd;cd|=2;var i=rf(),a=af();(ld!==e||dd!==t)&&(Ad=null,ef(e,t)),t=!1;var o=vd;a:do try{if(fd!==0&&ud!==null){var s=ud,c=pd;switch(fd){case 8:$d(),o=6;break a;case 3:case 2:case 9:case 6:Fo.current===null&&(t=!0);var l=fd;if(fd=0,pd=null,pf(e,s,c,l),n&&hd){o=0;break a}break;default:l=fd,fd=0,pd=null,pf(e,s,c,l)}}cf(),o=vd;break}catch(t){tf(e,t)}while(1);return t&&e.shellSuspendCounter++,xa=ba=null,cd=r,j.H=i,j.A=a,ud===null&&(ld=null,dd=0,I()),o}function cf(){for(;ud!==null;)df(ud)}function lf(e,t){var n=cd;cd|=2;var r=rf(),a=af();ld!==e||dd!==t?(Ad=null,kd=We()+500,ef(e,t)):hd=dt(e,t);a:do try{if(fd!==0&&ud!==null){t=ud;var o=pd;b:switch(fd){case 1:fd=0,pd=null,pf(e,t,o,1);break;case 2:case 9:if(ro(o)){fd=0,pd=null,ff(t);break}t=function(){fd!==2&&fd!==9||ld!==e||(fd=7),Bf(e)},o.then(t,t);break a;case 3:fd=7;break a;case 4:fd=5;break a;case 7:ro(o)?(fd=0,pd=null,ff(t)):(fd=0,pd=null,pf(e,t,o,7));break;case 5:var s=null;switch(ud.tag){case 26:s=ud.memoizedState;case 5:case 27:var c=ud;if(s?dh(s):c.stateNode.complete){fd=0,pd=null;var l=c.sibling;if(l!==null)ud=l;else{var u=c.return;u===null?ud=null:(ud=u,mf(u))}break b}}fd=0,pd=null,pf(e,t,o,5);break;case 6:fd=0,pd=null,pf(e,t,o,6);break;case 8:$d(),vd=6;break a;default:throw Error(i(462))}}uf();break}catch(t){tf(e,t)}while(1);return xa=ba=null,j.H=r,j.A=a,cd=n,ud===null?(ld=null,dd=0,I(),vd):0}function uf(){for(;ud!==null&&!P();)df(ud)}function df(e){var t=yl(e.alternate,e,_d);e.memoizedProps=e.pendingProps,t===null?mf(e):ud=t}function ff(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=$c(n,t,t.pendingProps,t.type,void 0,dd);break;case 11:t=$c(n,t,t.pendingProps,t.type.render,t.ref,dd);break;case 5:ds(t);var r=t;r===oa&&(ca?(ma(r),r.tag===5&&r.stateNode!=null&&(sa=r.stateNode)):(ma(r),ca=!0));default:Ol(n,t),t=ud=Ri(t,_d),t=yl(n,t,_d)}e.memoizedProps=e.pendingProps,t===null?mf(e):ud=t}function pf(e,t,n,r){xa=ba=null,ds(t),lo=null,uo=0;var i=t.return;try{if(Rc(e,i,t,n,dd)){vd=1,Nc(e,Gi(n,e.current)),ud=null;return}}catch(t){if(i!==null)throw ud=i,t;vd=1,Nc(e,Gi(n,e.current)),ud=null;return}t.flags&32768?(ca||r===1?e=!0:hd||dd&536870912?e=!1:(md=e=!0,(r===2||r===9||r===3||r===6)&&(r=Fo.current,r!==null&&r.tag===13&&(r.flags|=16384))),hf(t,e)):mf(t)}function mf(e){var t=e;do{if(t.flags&32768){hf(t,md);return}e=t.return;var n=El(t.alternate,t,_d);if(n!==null){ud=n;return}if(t=t.sibling,t!==null){ud=t;return}ud=t=e}while(t!==null);vd===0&&(vd=5)}function hf(e,t){do{var n=Dl(e.alternate,e);if(n!==null){n.flags&=32767,ud=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ud=e;return}ud=e=n}while(e!==null);vd=6,ud=null}function gf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do wf();while(Md!==0);if(cd&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===ld&&(ud=ld=null,dd=0),Pd=t,Nd=e,Fd=n,Ld=a,Rd=r,_f(e,t,n,s,c,l,f)}}function _f(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Id=s,s|=Di,_t(e,n,s,r,i,a),Bd=null,(n&335544064)===n?(Vd=Ba(e),r=10262):(Vd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Nf(Je,function(){return Tf(),null})):(e.callbackNode=null,e.callbackPriority=0),ql=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=j.T,j.T=null,i=M.p,M.p=2,a=cd,cd|=4;try{Su(e,t,n)}finally{cd=a,M.p=i,j.T=r}}Md=1,ql?zd=Jp(o,e.containerInfo,Vd,bf,xf,yf,Sf,Tf,vf,null,null):(bf(),xf(),Sf())}function vf(e){if(Md!==0){var t=Nd.onRecoverableError;t(e,{componentStack:null})}}function yf(){Md===3&&(Md=0,Hu(Pd,Nd),Md=4)}function bf(){if(Md===1){Md=0;var e=Nd,t=Pd,n=Fd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=j.T,j.T=null;var i=M.p;M.p=2;var a=cd;cd|=4;try{yu=bu=!1,zu(t,e,n),n=wp;var o=Zr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Xr(s.ownerDocument.documentElement,s)){if(c!==null&&Qr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Yr(s,h),v=Yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Mh=!!Cp,wp=Cp=null}finally{cd=a,M.p=i,j.T=r}}e.current=t,Md=2}}function xf(){if(Md===2){Md=0;var e=Nd,t=Pd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=cd;cd|=4;try{wu(e,t.alternate,t)}finally{cd=i,M.p=r,j.T=n}}Md=3}}function Sf(){if(Md===4||Md===3){Md=0;var e=zd;zd=null,Ue();var t=Nd,n=Pd,r=Fd,i=Rd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Md=5:(Md=0,Pd=Nd=null,Cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(jd=null),St(r),n=n.stateNode,et&&typeof et.onCommitFiberRoot==`function`)try{et.onCommitFiberRoot($e,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=j.T,a=M.p,M.p=2,j.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{j.T=n,M.p=a}}if(i=Bd,o=Vd,Vd=null,i!==null&&(Bd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Fd&3&&wf(),Bf(t),a=t.pendingLanes,r&261930&&a&42?t===Ud?Hd++:(Hd=0,Ud=t):(Hd=0,Ud=null),Vf(0,!1)}}function Cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,La(t)))}function wf(){return zd!==null&&(zd.skipTransition(),zd=null),bf(),xf(),Sf(),Tf()}function Tf(){if(Md!==5)return!1;var e=Nd,t=Id;Id=0;var n=St(Fd),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=Ld,Ld=null;var o=Nd,s=Fd;if(Md=0,Pd=Nd=null,Fd=0,cd&6)throw Error(i(331));var c=cd;if(cd|=4,rd(o.current),Yu(o,o.current,s,n),cd=c,Vf(0,!1),et&&typeof et.onPostCommitFiberRoot==`function`)try{et.onPostCommitFiberRoot($e,o)}catch{}return!0}finally{M.p=a,j.T=r,Cf(e,t)}}function Ef(e,t,n){t=Gi(n,t),t=Fc(e.stateNode,t,2),e=So(e,t,2),e!==null&&(gt(e,2),Bf(e))}function Df(e,t,n){if(e.tag===3)Ef(e,e,n);else for(;t!==null;){if(t.tag===3){Ef(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(jd===null||!jd.has(r))){e=Gi(n,e),n=Ic(2),r=So(t,n,2),r!==null&&(Lc(n,r,t,e),gt(r,2),Bf(r));break}}t=t.return}}function Of(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sd;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(gd=!0,i.add(n),e=kf.bind(null,e,t,n),t.then(e,e))}function kf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ld===e&&(dd&n)===n&&(vd===4||vd===3&&(dd&62914560)===dd&&300>We()-Dd?cd&2?xd|=n:ef(e,0):xd|=n,Cd===dd&&(Cd=0)),Bf(e)}function Af(e,t){t===0&&(t=mt()),e=Ai(e,t),e!==null&&(gt(e,t),Bf(e))}function jf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Af(e,n)}function Mf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Af(e,n)}function Nf(e,t){return Ve(e,t)}var Pf=null,Ff=null,If=!1,Lf=!1,Rf=!1,zf=0;function Bf(e){e!==Ff&&e.next===null&&(Ff===null?Pf=Ff=e:Ff=Ff.next=e),Lf=!0,If||(If=!0,qf())}function Vf(e,t){if(!Rf&&Lf){Rf=!0;do for(var n=!1,r=Pf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-nt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Kf(r,a))}else a=dd,a=ut(r,r===ld?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||dt(r,a)||(n=!0,Kf(r,a))}r=r.next}while(n);Rf=!1}}function Hf(){Uf()}function Uf(){Lf=If=!1;var e=0;zf!==0&&jp()&&(e=zf);for(var t=We(),n=null,r=Pf;r!==null;){var i=r.next,a=Wf(r,t);a===0?(r.next=null,n===null?Pf=i:n.next=i,i===null&&(Ff=n)):(n=r,(e!==0||a&3)&&(Lf=!0)),r=i}Md!==0&&Md!==5||Vf(e,!1),zf!==0&&(zf=0)}function Wf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-nt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=pt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ld,n=dd,n=ut(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(fd===2||fd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&He(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||dt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&He(r),St(n)){case 2:case 8:n=qe;break;case 32:n=Je;break;case 268435456:n=Xe;break;default:n=Je}return r=Gf.bind(null,e),n=Ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&He(r),e.callbackPriority=2,e.callbackNode=null,2}function Gf(e,t){if(Md!==0&&Md!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wf()&&e.callbackNode!==n)return null;var r=dd;return r=ut(e,e===ld?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Jd(e,r,t),Wf(e,We()),e.callbackNode!=null&&e.callbackNode===n?Gf.bind(null,e):null)}function Kf(e,t){if(wf())return null;Jd(e,t,!0)}function qf(){Ip(function(){cd&6?Ve(Ke,Hf):Uf()})}function Jf(){if(zf===0){var e=Ua;e===0&&(e=ot,ot<<=1,!(ot&261888)&&(ot=256)),zf=e}return zf}function Yf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Sn(e)}function Xf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Yf((i[Dt]||null).action),o=r.submitter;o&&(t=(t=o[Dt]||null)?Yf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Un(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(zf!==0){var e=new FormData(i,o);sc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),sc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Zf=0;Zf<vi.length;Zf++){var Qf=vi[Zf];yi(Qf.toLowerCase(),`on`+(Qf[0].toUpperCase()+Qf.slice(1)))}yi(ui,`onAnimationEnd`),yi(di,`onAnimationIteration`),yi(fi,`onAnimationStart`),yi(`dblclick`,`onDoubleClick`),yi(`focusin`,`onFocus`),yi(`focusout`,`onBlur`),yi(pi,`onTransitionRun`),yi(mi,`onTransitionStart`),yi(hi,`onTransitionCancel`),yi(gi,`onTransitionEnd`),Gt(`onMouseEnter`,[`mouseout`,`mouseover`]),Gt(`onMouseLeave`,[`mouseout`,`mouseover`]),Gt(`onPointerEnter`,[`pointerout`,`pointerover`]),Gt(`onPointerLeave`,[`pointerout`,`pointerover`]),Wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var $f=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),ep=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat($f));function tp(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){wi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){wi(e)}i.currentTarget=null,a=c}}}}function np(e,t){var n=t[kt];n===void 0&&(n=t[kt]=new Set);var r=e+`__bubble`;n.has(r)||(op(t,e,2,!1),n.add(r))}function rp(e,t,n){var r=0;t&&(r|=4),op(n,e,r,t)}var ip=`_reactListening`+Math.random().toString(36).slice(2);function ap(e){if(!e[ip]){e[ip]=!0,Ht.forEach(function(t){t!==`selectionchange`&&(ep.has(t)||rp(t,!1,e),rp(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ip]||(t[ip]=!0,rp(`selectionchange`,!1,t))}}function op(e,t,n,r){switch(zh(t)){case 2:var i=Nh;break;case 8:i=Ph;break;default:i=Fh}n=i.bind(null,t,n,e),i=void 0,!Nn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function sp(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=It(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}An(function(){var r=a,i=Tn(n),s=[];a:{var c=_i.get(e);if(c!==void 0){var l=Un,u=e;switch(e){case`keypress`:if(Rn(n)===0)break a;case`keydown`:case`keyup`:l=sr;break;case`focusin`:u=`focus`,l=Qn;break;case`focusout`:u=`blur`,l=Qn;break;case`beforeblur`:case`afterblur`:l=Qn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Zn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ur;break;case ui:case di:case fi:l=$n;break;case gi:l=dr;break;case`scroll`:case`scrollend`:l=Gn;break;case`wheel`:l=fr;break;case`copy`:case`cut`:case`paste`:l=er;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=cr;break;case`submit`:l=lr;break;case`toggle`:case`beforetoggle`:l=pr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=jn(m,p),g!=null&&d.push(cp(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==wn&&(u=n.relatedTarget||n.fromElement)&&(It(u)||u[Ot]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?It(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=cr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Rt(c),h=l==null?u:Rt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,It(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,up):null,c!==null&&dp(s,u,c,d,!1),l!==null&&f!==null&&dp(s,f,l,d,!0)))}a:{if(c=r?Rt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Nr;else if(Dr(c)){if(Pr)_=Ur;else{_=Vr;var v=Br}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&yn(r.elementType)&&(_=Nr):_=Hr;if(_&&=_(e,r)){Or(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Rt(r):window,e){case`focusin`:(Dr(v)||v.contentEditable===`true`)&&(ei=v,ti=r,ni=null);break;case`focusout`:ni=ti=ei=null;break;case`mousedown`:ri=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ri=!1,ii(s,n,i);break;case`selectionchange`:if($r)break;case`keydown`:case`keyup`:ii(s,n,i)}var y;if(hr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else Cr?xr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(vr&&n.locale!==`ko`&&(Cr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Cr&&(y=Ln()):(Fn=i,F=`value`in Fn?Fn.value:Fn.textContent,Cr=!0)),v=lp(r,b),0<v.length&&(b=new tr(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=Sr(n),y!==null&&(b.data=y)))),(y=_r?wr(e,n):Tr(e,n))&&(b=lp(r,`onBeforeInput`),0<b.length&&(v=new tr(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Xf(s,e,r,n,i)}tp(s,t)})}function cp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lp(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=jn(e,n),i!=null&&r.unshift(cp(e,i,a)),i=jn(e,t),i!=null&&r.push(cp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function up(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dp(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=jn(n,a),l!=null&&o.unshift(cp(n,l,c))):i||(l=jn(n,a),l!=null&&o.push(cp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var fp=/\r\n?/g,pp=/\u0000|\uFFFD/g;function mp(e){return(typeof e==`string`?e:``+e).replace(fp,`
9
- `).replace(pp,``)}function hp(e,t){return t=mp(t),mp(e)===t}function gp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||hn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&hn(e,``+r);else return;break;case`className`:$t(e,`class`,r);break;case`tabIndex`:$t(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:$t(e,n,r);break;case`style`:vn(e,r,o);return;case`data`:if(t!==`object`){$t(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Sn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&gp(e,t,`name`,a.name,a,null),gp(e,t,`formEncType`,a.formEncType,a,null),gp(e,t,`formMethod`,a.formMethod,a,null),gp(e,t,`formTarget`,a.formTarget,a,null)):(gp(e,t,`encType`,a.encType,a,null),gp(e,t,`method`,a.method,a,null),gp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Sn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Cn);return;case`onScroll`:r!=null&&np(`scroll`,e);return;case`onScrollEnd`:r!=null&&np(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Sn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:np(`beforetoggle`,e),np(`toggle`,e),Qt(e,`popover`,r);break;case`xlinkActuate`:en(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:en(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:en(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:en(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:en(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:en(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:en(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:en(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:en(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=bn.get(n)||n,Qt(e,n,r);else return}Xt=!0}function _p(e,t,n,r,a,o){switch(n){case`style`:vn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)hn(e,r);else if(typeof r==`number`||typeof r==`bigint`)hn(e,``+r);else return;break;case`onScroll`:r!=null&&np(`scroll`,e);return;case`onScrollEnd`:r!=null&&np(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Cn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Dt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Xt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Qt(e,n,r)}return}Xt=!0}function vp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:np(`error`,e),np(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:gp(e,t,o,s,n,null)}}a&&gp(e,t,`srcSet`,n.srcSet,n,null),r&&gp(e,t,`src`,n.src,n,null);return;case`input`:np(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:gp(e,t,r,d,n,null)}}un(e,o,c,l,u,s,a,!1);return;case`select`:for(a in np(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:gp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&fn(e,!!r,n,!0):fn(e,!!r,t,!1);return;case`textarea`:for(s in np(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:gp(e,t,s,c,n,null)}mn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:gp(e,t,l,r,n,null)}return;case`dialog`:np(`beforetoggle`,e),np(`toggle`,e),np(`cancel`,e),np(`close`,e);break;case`iframe`:case`object`:np(`load`,e);break;case`video`:case`audio`:for(r=0;r<$f.length;r++)np($f[r],e);break;case`image`:np(`error`,e),np(`load`,e);break;case`details`:np(`toggle`,e);break;case`embed`:case`source`:case`link`:np(`error`,e),np(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:gp(e,t,u,r,n,null)}return;default:if(yn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&_p(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&gp(e,t,c,r,n,null))}var yp={};function bp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||gp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Xt=!0),o=m;break;case`name`:m!==f&&(Xt=!0),a=m;break;case`checked`:m!==f&&(Xt=!0),u=m;break;case`defaultChecked`:m!==f&&(Xt=!0),d=m;break;case`value`:m!==f&&(Xt=!0),s=m;break;case`defaultValue`:m!==f&&(Xt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&gp(e,t,p,m,r,f)}}ln(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||gp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Xt=!0),p=o;break;case`defaultValue`:o!==l&&(Xt=!0),c=o;break;case`multiple`:o!==l&&(Xt=!0),s=o;default:o!==l&&gp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?fn(e,!!n,n?[]:``,!1):fn(e,!!n,t,!0)):fn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:gp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Xt=!0),p=a;break;case`defaultValue`:a!==o&&(Xt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&gp(e,t,s,a,r,o)}pn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:gp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Xt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:gp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&gp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:gp(e,t,u,p,r,m)}return;default:if(yn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&_p(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||_p(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&gp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||gp(e,t,f,p,r,m)}function xp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Sp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&xp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&xp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Cp=null,wp=null;function Tp(e){return e.nodeType===9?e:e.ownerDocument}function Ep(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Op(e,t,n,r){return n=Tp(n).createElement(e),n[Et]=r,n[Dt]=t,vp(n,e,t),Bt(n),n}function kp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ap=null;function jp(){var e=window.event;return e&&e.type===`popstate`?e!==Ap&&(Ap=e,!0):(Ap=null,!1)}var Mp=typeof setTimeout==`function`?setTimeout:void 0,Np=typeof clearTimeout==`function`?clearTimeout:void 0,Pp=typeof Promise==`function`?Promise:void 0,Fp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Mp,Ip=typeof queueMicrotask==`function`?queueMicrotask:Pp===void 0?Mp:function(e){return Pp.resolve(null).then(e).catch(Lp)};function Lp(e){setTimeout(function(){throw e})}function Rp(e){return e===`head`}function zp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),ig(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Nm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Nm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Nm(e.ownerDocument.body)}n=i}while(n);ig(t)}function Bp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Vp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Hp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Up(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Wp(e){return Up(e.getBoundingClientRect(),getComputedStyle(e),e)}function Gp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Up(t,n,e)}function Kp(e){return e.documentElement.clientHeight}function qp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Jp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Kp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=fh(f),u>hh){s.length=o;break}f=new Promise(qp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Yp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Yp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Yp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Yp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Xp(e){return{name:e,group:new Yp(`group`,e),imagePair:new Yp(`image-pair`,e),old:new Yp(`old`,e),new:new Yp(`new`,e)}}function Zp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Zp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(nm(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=em(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Qp,e,s,r)}this._eventListeners=a}};function Qp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Zp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=nm(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=em(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,$p,e,n,i),r.splice(t,1),a!==null&&a()}};function $p(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function em(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function tm(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function nm(e,t,n,r){if(e.length===0)return-1;r=tm(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&tm(a.optionsOrUseCapture)===r)return i}return-1}Zp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,em(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,em(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Zp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,rm,e,void 0,void 0)};function rm(e,t){return e.tag!==6&&(e=b(e),km(e,t))}Zp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,im,t,void 0,void 0);for(var n=t.length-1;0<=n&&!rm(t[n],e);n--);};function im(e,t){return t.push(e),!1}Zp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=Tp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,am,e,void 0,void 0))};function am(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Zp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,om,e,void 0,void 0)};function om(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Zp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,sm,e,void 0,void 0);for(var n=t=0;n<cm.length;n++){var r=cm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):cm[t++]=r}cm.length=t}};function sm(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var cm=[],lm=!1;function um(e,t,n){cm.push({fragmentInstance:e,observer:t,instance:n}),lm||(lm=!0,Am(function(){lm=!1;var e=cm;cm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Zp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,dm,e,void 0,void 0),e};function dm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Zp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Zp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,im,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||fm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function fm(e,t,n,r,i){var a=It(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function pm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Zp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,im,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),pm(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),pm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function mm(e,t){return e=b(e),hm(e,t),!1}function hm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function gm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,em(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<cm.length;i++){var a=cm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(cm[r++]=a)}cm.length=r,n.observe(e)}),hm(e,t))}function _m(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,em(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?um(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function vm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:vm(n),Ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ym(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Nt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Tm(e.nextSibling),e===null)break}return null}function bm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Tm(e.nextSibling),e===null))return null;return e}function xm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Tm(e.nextSibling),e===null))return null;return e}function Sm(e){return e.data===`$?`||e.data===`$~`}function Cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function wm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Tm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Em=null;function Dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Tm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Om(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function km(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Am(e){Fp(function(){Fp(function(t){return e(t)})})}function jm(e,t,n){switch(t=Tp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Mm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&gp(e,t,r,null,yp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===Cn&&(e.onclick=null),Ft(e)}function Nm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ft(e)}var Pm=new Map,Fm=new Set;function Im(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Lm=M.d;M.d={f:Rm,r:zm,D:Hm,C:Um,L:Wm,m:Gm,X:qm,S:Km,M:Jm};function Rm(){var e=Lm.f(),t=Qd();return e||t}function zm(e){var t=Lt(e);t!==null&&t.tag===5&&t.type===`form`?lc(t):Lm.r(e)}var Bm=typeof document>`u`?null:document;function Vm(e,t,n){var r=Bm;if(r&&typeof t==`string`&&t){var i=cn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Fm.has(i)||(Fm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),vp(t,`link`,e),Bt(t),r.head.appendChild(t)))}}function Hm(e){Lm.D(e),Vm(`dns-prefetch`,e,null)}function Um(e,t){Lm.C(e,t),Vm(`preconnect`,e,t)}function Wm(e,t,n){Lm.L(e,t,n);var r=Bm;if(r&&e&&t){var i=`link[rel="preload"][as="`+cn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+cn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+cn(n.imageSizes)+`"]`)):i+=`[href="`+cn(e)+`"]`;var a=i;switch(t){case`style`:a=Xm(e);break;case`script`:a=eh(e)}if(!(Pm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Pm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Zm(a))||t===`script`&&r.querySelector(th(a))))){var o=r.createElement(`link`);vp(o,`link`,e),t===`style`&&(o[Pt]=!0,o.onload=o.onerror=function(){Vt(o)}),Bt(o),r.head.appendChild(o)}}}function Gm(e,t){Lm.m(e,t);var n=Bm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+cn(r)+`"][href="`+cn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=eh(e)}if(!Pm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Pm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(th(a)))return}r=n.createElement(`link`),vp(r,`link`,e),Bt(r),n.head.appendChild(r)}}}function Km(e,t,n){Lm.S(e,t,n);var r=Bm;if(r&&e){var i=zt(r).hoistableStyles,a=Xm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Zm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Pm.get(a))&&ih(e,n);var c=o=r.createElement(`link`);Bt(c),vp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,rh(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function qm(e,t){Lm.X(e,t);var n=Bm;if(n&&e){var r=zt(n).hoistableScripts,i=eh(e),a=r.get(i);a||(a=n.querySelector(th(i)),a||(e=D({src:e,async:!0},t),(t=Pm.get(i))&&ah(e,t),a=n.createElement(`script`),Bt(a),vp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Jm(e,t){Lm.M(e,t);var n=Bm;if(n&&e){var r=zt(n).hoistableScripts,i=eh(e),a=r.get(i);a||(a=n.querySelector(th(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Pm.get(i))&&ah(e,t),a=n.createElement(`script`),Bt(a),vp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ym(e,t,n,r){var a=(a=De.current)?Im(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Xm(n.href),t=zt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Xm(n.href);var o=zt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Pm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Pm.set(e,o)),$m(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=eh(n),t=zt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Xm(e){return`href="`+cn(e)+`"`}function Zm(e){return`link[rel="stylesheet"][`+e+`]`}function Qm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function $m(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Pt]){r.loading=1;return}}else t=e.createElement(`link`),t[Pt]=!0,t.onload=t.onerror=Vt.bind(null,t),vp(t,`link`,n),Bt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function eh(e){return`[src="`+cn(e)+`"]`}function th(e){return`script[async]`+e}function nh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+cn(n.href)+`"]`);if(r)return t.instance=r,Bt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Bt(r),vp(r,`style`,a),rh(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Xm(n.href);var o=e.querySelector(Zm(a));if(o)return t.state.loading|=4,t.instance=o,Bt(o),o;r=Qm(n),(a=Pm.get(a))&&ih(r,a),o=(e.ownerDocument||e).createElement(`link`),Bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),vp(o,`link`,r),t.state.loading|=4,rh(o,n.precedence,e),t.instance=o;case`script`:return o=eh(n.src),(a=e.querySelector(th(o)))?(t.instance=a,Bt(a),a):(r=n,(a=Pm.get(o))&&(r=D({},n),ah(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Bt(a),vp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,rh(r,n.precedence,e));return t.instance}function rh(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ih(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function ah(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var oh=null;function sh(e,t,n){if(oh===null){var r=new Map,i=oh=new Map;i.set(n,r)}else i=oh,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Nt]||a[Et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function ch(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function lh(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function uh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function dh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function fh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function ph(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=fh(t),e.suspenseyImages.push(t)),e=yh.bind(e),t.decode().then(e,e))}function mh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Xm(r.href),a=t.querySelector(Zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=vh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Bt(a);return}a=t.ownerDocument||t,r=Qm(r),(i=Pm.get(i))&&ih(r,i),a=a.createElement(`link`),Bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),vp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=vh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var hh=0;function gh(e,t){return e.stylesheets&&e.count===0&&xh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&xh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&hh===0&&(hh=62500*Sp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>hh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function _h(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)xh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function vh(){this.count--,_h(this)}function yh(){this.imgCount--,_h(this)}var bh=null;function xh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bh=new Map,t.forEach(Sh,e),bh=null,vh.call(e))}function Sh(e,t){if(!(t.state.loading&4)){var n=bh.get(e);if(n)var r=n.get(null);else{n=new Map,bh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=vh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ch={$$typeof:ae,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function wh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function Th(e,t,n,r,i,a,o,s,c,l,u,d){return e=new wh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Fi(3,null,null,t),e.current=a,a.stateNode=e,t=Ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},yo(a),e}function Eh(e){return e?(e=Ni,e):Ni}function Dh(e,t,n,r,i,a){i=Eh(i),r.context===null?r.context=i:r.pendingContext=i,r=xo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=So(e,r,t),n!==null&&(qd(n,e,t),Co(n,e,t))}function Oh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kh(e,t){Oh(e,t),(e=e.alternate)&&Oh(e,t)}function Ah(e){if(e.tag===13||e.tag===31){var t=Ai(e,67108864);t!==null&&qd(t,e,67108864),kh(e,67108864)}}function jh(e){if(e.tag===13||e.tag===31){var t=Wd();t=xt(t);var n=Ai(e,t);n!==null&&qd(n,e,t),kh(e,t)}}var Mh=!0;function Nh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,Fh(e,t,n,r)}finally{M.p=a,j.T=i}}function Ph(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,Fh(e,t,n,r)}finally{M.p=a,j.T=i}}function Fh(e,t,n,r){if(Mh){var i=Ih(r);if(i===null)sp(e,t,r,Lh,n),Jh(e,r);else if(Xh(i,e,t,n,r))r.stopPropagation();else if(Jh(e,r),t&4&&-1<qh.indexOf(e)){for(;i!==null;){var a=Lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=lt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-nt(o);s.entanglements[1]|=c,o&=~c}Bf(a),!(cd&6)&&(kd=We()+500,Vf(0,!1))}}break;case 31:case 13:s=Ai(a,2),s!==null&&qd(s,a,2),Qd(),kh(a,2)}if(a=Ih(r),a===null&&sp(e,t,r,Lh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else sp(e,t,r,null,n)}}function Ih(e){return e=Tn(e),Rh(e)}var Lh=null;function Rh(e){if(Lh=null,e=It(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Lh=e,null}function zh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ge()){case Ke:return 2;case qe:return 8;case Je:case Ye:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Bh=!1,Vh=null,Hh=null,Uh=null,Wh=new Map,Gh=new Map,Kh=[],qh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Jh(e,t){switch(e){case`focusin`:case`focusout`:Vh=null;break;case`dragenter`:case`dragleave`:Hh=null;break;case`mouseover`:case`mouseout`:Uh=null;break;case`pointerover`:case`pointerout`:Wh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Gh.delete(t.pointerId)}}function Yh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Lt(t),t!==null&&Ah(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Xh(e,t,n,r,i){switch(t){case`focusin`:return Vh=Yh(Vh,e,t,n,r,i),!0;case`dragenter`:return Hh=Yh(Hh,e,t,n,r,i),!0;case`mouseover`:return Uh=Yh(Uh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Wh.set(a,Yh(Wh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Gh.set(a,Yh(Gh.get(a)||null,e,t,n,r,i)),!0}return!1}function Zh(e){var t=It(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,wt(e.priority,function(){jh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,wt(e.priority,function(){jh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ih(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);wn=r,n.target.dispatchEvent(r),wn=null}else return t=Lt(n),t!==null&&Ah(t),e.blockedOn=n,!1;t.shift()}return!0}function $h(e,t,n){Qh(e)&&n.delete(t)}function eg(){Bh=!1,Vh!==null&&Qh(Vh)&&(Vh=null),Hh!==null&&Qh(Hh)&&(Hh=null),Uh!==null&&Qh(Uh)&&(Uh=null),Wh.forEach($h),Gh.forEach($h)}function tg(e,n){e.blockedOn===n&&(e.blockedOn=null,Bh||(Bh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,eg)))}var ng=null;function rg(e){ng!==e&&(ng=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ng===e&&(ng=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Rh(r||n)===null)continue;break}var a=Lt(n);a!==null&&(e.splice(t,3),t-=3,sc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function ig(e){function t(t){return tg(t,e)}Vh!==null&&tg(Vh,e),Hh!==null&&tg(Hh,e),Uh!==null&&tg(Uh,e),Wh.forEach(t),Gh.forEach(t);for(var n=0;n<Kh.length;n++){var r=Kh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Kh.length&&(n=Kh[0],n.blockedOn===null);)Zh(n),n.blockedOn===null&&Kh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Dt]||null;if(typeof a==`function`)o||rg(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Dt]||null)s=o.formAction;else if(Rh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),rg(n)}}}function ag(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function og(e){this._internalRoot=e}sg.prototype.render=og.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;Dh(n,Wd(),e,t,null,null)},sg.prototype.unmount=og.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dh(e.current,2,null,e,null,null),Qd(),t[Ot]=null}};function sg(e){this._internalRoot=e}sg.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kh.length&&t!==0&&t<Kh[n].priority;n++);Kh.splice(n,0,e),n===0&&Zh(e)}};var cg=n.version;if(cg!==`19.3.0`)throw Error(i(527,cg,`19.3.0`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var lg={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ug=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ug.isDisabled&&ug.supportsFiber)try{$e=ug.inject(lg),et=ug}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ac,s=jc,c=Mc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Th(e,1,!1,null,null,n,r,null,o,s,c,ag),e[Ot]=t.current,ap(e),new og(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=[],v=[],y=Uint8Array,b=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,x=0,S=b.length;x<S;++x)_[x]=b[x],v[b.charCodeAt(x)]=x;v[45]=62,v[95]=63;function C(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function w(e,t,n){return(t+n)*3/4-n}function T(e){for(var t,n=C(e),r=n[0],i=n[1],a=new y(w(e,r,i)),o=0,s=i>0?r-4:r,c=0;c<s;c+=4)t=v[e.charCodeAt(c)]<<18|v[e.charCodeAt(c+1)]<<12|v[e.charCodeAt(c+2)]<<6|v[e.charCodeAt(c+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=v[e.charCodeAt(c)]<<2|v[e.charCodeAt(c+1)]>>4,a[o++]=t&255),i===1&&(t=v[e.charCodeAt(c)]<<10|v[e.charCodeAt(c+1)]<<4|v[e.charCodeAt(c+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function E(e){return _[e>>18&63]+_[e>>12&63]+_[e>>6&63]+_[e&63]}function D(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(E(r));return i.join(``)}function ee(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(D(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(_[t>>2]+_[t<<4&63]+`==`)):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(_[t>>10]+_[t>>4&63]+_[t<<2&63]+`=`)),i.join(``)}function O(e){if(e===void 0)return{};if(!ne(e))throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);return e}function te(e){if(e===void 0)throw Error(`Client created with undefined deployment address. If you used an environment variable, check that it's set.`);if(typeof e!=`string`)throw Error(`Invalid deployment address: found ${e}".`);if(!(e.startsWith(`http:`)||e.startsWith(`https:`)))throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);try{new URL(e)}catch{throw Error(`Invalid deployment address: "${e}" is not a valid URL. If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}if(e.endsWith(`.convex.site`))throw Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}function ne(e){let t=typeof e==`object`,n=Object.getPrototypeOf(e),r=n===null||n===Object.prototype||n?.constructor?.name===`Object`;return t&&r}var re=!0,ie=BigInt(`-9223372036854775808`),k=BigInt(`9223372036854775807`),ae=BigInt(`0`),A=BigInt(`8`),oe=BigInt(`256`),se=`This commit timestamp is unresolved: its value is assigned when the mutation commits. Read the document after the mutation completes to get its value.`,ce=class{[Symbol.toPrimitive](e){if(e===`string`)return this.toString();throw Error(se)}valueOf(){throw Error(se)}toJSON(){throw Error(se)}toString(){return`[unresolved commit timestamp]`}},le=new ce;function ue(e){return Number.isNaN(e)||!Number.isFinite(e)||Object.is(e,-0)}function de(e){e<ae&&(e-=ie+ie);let t=e.toString(16);t.length%2==1&&(t=`0`+t);let n=new Uint8Array(new ArrayBuffer(8)),r=0;for(let i of t.match(/.{2}/g).reverse())n.set([parseInt(i,16)],r++),e>>=A;return ee(n)}function fe(e){let t=T(e);if(t.byteLength!==8)throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);let n=ae,r=ae;for(let e of t)n+=BigInt(e)*oe**r,r++;return n>k&&(n+=ie+ie),n}function pe(e){if(e<ie||k<e)throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);let t=new ArrayBuffer(8);return new DataView(t).setBigInt64(0,e,!0),ee(new Uint8Array(t))}function me(e){let t=T(e);if(t.byteLength!==8)throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);return new DataView(t.buffer).getBigInt64(0,!0)}var he=DataView.prototype.setBigInt64?pe:de,ge=DataView.prototype.getBigInt64?me:fe,_e=1024;function ve(e){if(e.length>_e)throw Error(`Field name ${e} exceeds maximum field name length ${_e}.`);if(e.startsWith(`$`))throw Error(`Field name ${e} starts with a '$', which is reserved.`);for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n<32||n>=127)throw Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`)}}function ye(e){if(e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`)return e;if(Array.isArray(e))return e.map(e=>ye(e));if(typeof e!=`object`)throw Error(`Unexpected type of ${e}`);let t=Object.entries(e);if(t.length===1){let n=t[0][0];if(n===`$bytes`){if(typeof e.$bytes!=`string`)throw Error(`Malformed $bytes field on ${e}`);return T(e.$bytes).buffer}if(n===`$integer`){if(typeof e.$integer!=`string`)throw Error(`Malformed $integer field on ${e}`);return ge(e.$integer)}if(n===`$float`){if(typeof e.$float!=`string`)throw Error(`Malformed $float field on ${e}`);let t=T(e.$float);if(t.byteLength!==8)throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);let n=new DataView(t.buffer).getFloat64(0,re);if(!ue(n))throw Error(`Float ${n} should be encoded as a number`);return n}if(n===`$commitTs`){if(e.$commitTs!==null)throw Error(`Malformed $commitTs field on ${e}`);return le}if(n===`$set`)throw Error(`Received a Set which is no longer supported as a Convex type.`);if(n===`$map`)throw Error(`Received a Map which is no longer supported as a Convex type.`)}let n={};for(let[t,r]of Object.entries(e))ve(t),n[t]=ye(r);return n}var j=16384;function M(e){let t=JSON.stringify(e,(e,t)=>t===void 0?`undefined`:typeof t==`bigint`?`${t.toString()}n`:t);if(t.length>j){let e=16370,n=t.codePointAt(e-1);return n!==void 0&&n>65535&&--e,t.substring(0,e)+`[...truncated]`}return t}function be(e,t,n,r){if(e===void 0){let e=n&&` (present at path ${n} in original object ${M(t)})`;throw Error(`undefined is not a valid Convex value${e}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(e===null)return e;if(typeof e==`bigint`){if(e<ie||k<e)throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);return{$integer:he(e)}}if(typeof e==`number`){if(ue(e)){let t=new ArrayBuffer(8);return new DataView(t).setFloat64(0,e,re),{$float:ee(new Uint8Array(t))}}return e}if(typeof e==`boolean`||typeof e==`string`)return e;if(e instanceof ArrayBuffer)return{$bytes:ee(new Uint8Array(e))};if(e instanceof ce)return{$commitTs:null};if(Array.isArray(e))return e.map((e,r)=>be(e,t,n+`[${r}]`,!1));if(e instanceof Set)throw Error(xe(n,`Set`,[...e],t));if(e instanceof Map)throw Error(xe(n,`Map`,[...e],t));if(!ne(e)){let r=e?.constructor?.name,i=r?`${r} `:``;throw Error(xe(n,i,e,t))}let i={},a=Object.entries(e);a.sort(([e,t],[n,r])=>e===n?0:e<n?-1:1);for(let[e,o]of a)o===void 0?r&&(ve(e),i[e]=N(o,t,n+`.${e}`)):(ve(e),i[e]=be(o,t,n+`.${e}`,!1));return i}function xe(e,t,n,r){return e?`${t}${M(n)} is not a supported Convex type (present at path ${e} in original object ${M(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${t}${M(n)} is not a supported Convex type.`}function N(e,t,n){if(e===void 0)return{$undefined:null};if(t===void 0)throw Error(`Programming error. Current value is ${M(e)} but original value is undefined`);return be(e,t,n,!1)}function Se(e){return be(e,e,``,!1)}var Ce=Object.defineProperty,we=(e,t,n)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Te=(e,t,n)=>we(e,typeof t==`symbol`?t:t+``,n),Ee=`https://docs.convex.dev/error#undefined-validator`;function De(e,t){let n=t===void 0?``:` for field "${t}"`;throw Error(`A validator is undefined${n} in ${e}. This is often caused by circular imports. See ${Ee} for details.`)}var Oe=class{constructor({isOptional:e}){Te(this,`type`),Te(this,`fieldPaths`),Te(this,`isOptional`),Te(this,`isConvexValidator`),this.isOptional=e,this.isConvexValidator=!0}},ke=class e extends Oe{constructor({isOptional:e,tableName:t}){if(super({isOptional:e}),Te(this,`tableName`),Te(this,`kind`,`id`),typeof t!=`string`)throw Error(`v.id(tableName) requires a string`);this.tableName=t}get json(){return{type:`id`,tableName:this.tableName}}optional(){return new e({isOptional:`optional`,tableName:this.tableName})}asOptional(){return this.optional()}},Ae=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`float64`)}get json(){return{type:`number`}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},je=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`int64`)}get json(){return{type:`bigint`}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},Me=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`commitTs`)}get json(){return{type:this.kind}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},Ne=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`boolean`)}get json(){return{type:this.kind}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},Pe=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`bytes`)}get json(){return{type:this.kind}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},Fe=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`string`)}get json(){return{type:this.kind}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},Ie=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`null`)}get json(){return{type:this.kind}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},Le=class e extends Oe{constructor(){super(...arguments),Te(this,`kind`,`any`)}get json(){return{type:this.kind}}optional(){return new e({isOptional:`optional`})}asOptional(){return this.optional()}},Re=class e extends Oe{constructor({isOptional:e,fields:t}){super({isOptional:e}),Te(this,`fields`),Te(this,`kind`,`object`),globalThis.Object.entries(t).forEach(([e,t])=>{if(t===void 0&&De(`v.object()`,e),!t.isConvexValidator)throw Error(`v.object() entries must be validators`)}),this.fields=t}get json(){return{type:this.kind,value:globalThis.Object.fromEntries(globalThis.Object.entries(this.fields).map(([e,t])=>[e,{fieldType:t.json,optional:t.isOptional===`optional`}]))}}optional(){return new e({isOptional:`optional`,fields:this.fields})}asOptional(){return this.optional()}omit(...t){let n={...this.fields};for(let e of t)delete n[e];return new e({isOptional:this.isOptional,fields:n})}pick(...t){let n={};for(let e of t)n[e]=this.fields[e];return new e({isOptional:this.isOptional,fields:n})}partial(){let t={};for(let[e,n]of globalThis.Object.entries(this.fields))t[e]=n.asOptional();return new e({isOptional:this.isOptional,fields:t})}extend(t){return new e({isOptional:this.isOptional,fields:{...this.fields,...t}})}},ze=class e extends Oe{constructor({isOptional:e,value:t}){if(super({isOptional:e}),Te(this,`value`),Te(this,`kind`,`literal`),typeof t!=`string`&&typeof t!=`boolean`&&typeof t!=`number`&&typeof t!=`bigint`)throw Error(`v.literal(value) must be a string, number, or boolean`);this.value=t}get json(){return{type:this.kind,value:Se(this.value)}}optional(){return new e({isOptional:`optional`,value:this.value})}asOptional(){return this.optional()}},Be=class e extends Oe{constructor({isOptional:e,element:t}){super({isOptional:e}),Te(this,`element`),Te(this,`kind`,`array`),t===void 0&&De(`v.array()`),this.element=t}get json(){return{type:this.kind,value:this.element.json}}optional(){return new e({isOptional:`optional`,element:this.element})}asOptional(){return this.optional()}},Ve=class e extends Oe{constructor({isOptional:e,key:t,value:n}){if(super({isOptional:e}),Te(this,`key`),Te(this,`value`),Te(this,`kind`,`record`),t===void 0&&De(`v.record()`,`key`),n===void 0&&De(`v.record()`,`value`),t.isOptional===`optional`)throw Error(`Record validator cannot have optional keys`);if(n.isOptional===`optional`)throw Error(`Record validator cannot have optional values`);if(!t.isConvexValidator||!n.isConvexValidator)throw Error(`Key and value of v.record() but be validators`);this.key=t,this.value=n}get json(){return{type:this.kind,keys:this.key.json,values:{fieldType:this.value.json,optional:!1}}}optional(){return new e({isOptional:`optional`,key:this.key,value:this.value})}asOptional(){return this.optional()}},He=class e extends Oe{constructor({isOptional:e,members:t}){super({isOptional:e}),Te(this,`members`),Te(this,`kind`,`union`),t.forEach((e,t)=>{if(e===void 0&&De(`v.union()`,`member at index ${t}`),!e.isConvexValidator)throw Error(`All members of v.union() must be validators`)}),this.members=t}get json(){return{type:this.kind,value:this.members.map(e=>e.json)}}optional(){return new e({isOptional:`optional`,members:this.members})}asOptional(){return this.optional()}},P={id:e=>new ke({isOptional:`required`,tableName:e}),null:()=>new Ie({isOptional:`required`}),number:()=>new Ae({isOptional:`required`}),float64:()=>new Ae({isOptional:`required`}),bigint:()=>new je({isOptional:`required`}),int64:()=>new je({isOptional:`required`}),commitTs:()=>new Me({isOptional:`required`}),boolean:()=>new Ne({isOptional:`required`}),string:()=>new Fe({isOptional:`required`}),bytes:()=>new Pe({isOptional:`required`}),literal:e=>new ze({isOptional:`required`,value:e}),array:e=>new Be({isOptional:`required`,element:e}),object:e=>new Re({isOptional:`required`,fields:e}),record:(e,t)=>new Ve({isOptional:`required`,key:e,value:t}),union:(...e)=>new He({isOptional:`required`,members:e}),any:()=>new Le({isOptional:`required`}),optional:e=>e.asOptional(),nullable:e=>P.union(e,P.null())},Ue=Object.defineProperty,We=(e,t,n)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ge=(e,t,n)=>We(e,typeof t==`symbol`?t:t+``,n),Ke,qe,Je=Symbol.for(`ConvexError`),Ye=class extends (qe=Error,Ke=Je,qe){constructor(e){super(typeof e==`string`?e:M(e)),Ge(this,`name`,`ConvexError`),Ge(this,`data`),Ge(this,Ke,!0),this.data=e}},Xe=`1.46.0`,Ze=Object.defineProperty,Qe=(e,t,n)=>t in e?Ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$e=(e,t,n)=>Qe(e,typeof t==`symbol`?t:t+``,n),et=`color:rgb(0, 145, 255)`;function tt(e){switch(e){case`query`:return`Q`;case`mutation`:return`M`;case`action`:return`A`;case`any`:return`?`}}var nt=class{constructor(e){$e(this,`_onLogLineFuncs`),$e(this,`_verbose`),this._onLogLineFuncs={},this._verbose=e.verbose}addLogLineListener(e){let t=Math.random().toString(36).substring(2,15);for(let e=0;e<10&&this._onLogLineFuncs[t]!==void 0;e++)t=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[t]=e,()=>{delete this._onLogLineFuncs[t]}}logVerbose(...e){if(this._verbose)for(let t of Object.values(this._onLogLineFuncs))t(`debug`,`${new Date().toISOString()}`,...e)}log(...e){for(let t of Object.values(this._onLogLineFuncs))t(`info`,...e)}warn(...e){for(let t of Object.values(this._onLogLineFuncs))t(`warn`,...e)}error(...e){for(let t of Object.values(this._onLogLineFuncs))t(`error`,...e)}};function rt(e){let t=new nt(e);return t.addLogLineListener((e,...t)=>{switch(e){case`debug`:console.debug(...t);break;case`info`:console.log(...t);break;case`warn`:console.warn(...t);break;case`error`:console.error(...t);break;default:console.log(...t)}}),t}function it(e){return new nt(e)}function at(e,t,n,r,i){let a=tt(n);if(typeof i==`object`&&(i=`ConvexError ${JSON.stringify(i.errorData,null,2)}`),t===`info`){let t=i.match(/^\[.*?\] /);if(t===null){e.error(`[CONVEX ${a}(${r})] Could not parse console.log`);return}let n=i.slice(1,t[0].length-2),o=i.slice(t[0].length);e.log(`%c[CONVEX ${a}(${r})] [${n}]`,et,o)}else e.error(`[CONVEX ${a}(${r})] ${i}`)}function ot(e,t){let n=`[CONVEX FATAL ERROR] ${t}`;return e.error(n),Error(n)}function st(e,t,n){return`[CONVEX ${tt(e)}(${t})] ${n.errorMessage}
10
- Called by client`}function ct(e,t){return t.data=e.errorData,t}function lt(e){let t=e.split(`:`),n,r;return t.length===1?(n=t[0],r=`default`):(n=t.slice(0,t.length-1).join(`:`),r=t[t.length-1]),n.endsWith(`.js`)&&(n=n.slice(0,-3)),`${n}:${r}`}function ut(e,t){return JSON.stringify({udfPath:lt(e),args:Se(t)})}function dt(e,t,n){let{initialNumItems:r,id:i}=n;return JSON.stringify({type:`paginated`,udfPath:lt(e),args:Se(t),options:Se({initialNumItems:r,id:i})})}var ft=Object.defineProperty,pt=(e,t,n)=>t in e?ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mt=(e,t,n)=>pt(e,typeof t==`symbol`?t:t+``,n),ht=class{constructor(){mt(this,`nextQueryId`),mt(this,`querySetVersion`),mt(this,`querySet`),mt(this,`queryIdToToken`),mt(this,`identityVersion`),mt(this,`auth`),mt(this,`outstandingQueriesOlderThanRestart`),mt(this,`outstandingAuthOlderThanRestart`),mt(this,`paused`),mt(this,`pendingQuerySetModifications`),this.nextQueryId=0,this.querySetVersion=0,this.identityVersion=0,this.querySet=new Map,this.queryIdToToken=new Map,this.outstandingQueriesOlderThanRestart=new Set,this.outstandingAuthOlderThanRestart=!1,this.paused=!1,this.pendingQuerySetModifications=new Map}hasSyncedPastLastReconnect(){return this.outstandingQueriesOlderThanRestart.size===0&&!this.outstandingAuthOlderThanRestart}markAuthCompletion(){this.outstandingAuthOlderThanRestart=!1}subscribe(e,t,n,r){let i=lt(e),a=ut(i,t),o=this.querySet.get(a);if(o!==void 0)return o.numSubscribers+=1,{queryToken:a,modification:null,unsubscribe:()=>this.removeSubscriber(a)};{let e=this.nextQueryId++,o={id:e,canonicalizedUdfPath:i,args:t,numSubscribers:1,journal:n,componentPath:r};this.querySet.set(a,o),this.queryIdToToken.set(e,a);let s=this.querySetVersion,c=this.querySetVersion+1,l={type:`Add`,queryId:e,udfPath:i,args:[Se(t)],journal:n,componentPath:r};return this.paused?this.pendingQuerySetModifications.set(e,l):this.querySetVersion=c,{queryToken:a,modification:{type:`ModifyQuerySet`,baseVersion:s,newVersion:c,modifications:[l]},unsubscribe:()=>this.removeSubscriber(a)}}}transition(e){for(let t of e.modifications)switch(t.type){case`QueryUpdated`:case`QueryFailed`:{this.outstandingQueriesOlderThanRestart.delete(t.queryId);let e=t.journal;if(e!==void 0){let n=this.queryIdToToken.get(t.queryId);n!==void 0&&(this.querySet.get(n).journal=e)}break}case`QueryRemoved`:this.outstandingQueriesOlderThanRestart.delete(t.queryId);break;default:throw Error(`Invalid modification ${t.type}`)}}queryId(e,t){let n=ut(lt(e),t),r=this.querySet.get(n);return r===void 0?null:r.id}isCurrentOrNewerAuthVersion(e){return e>=this.identityVersion}getAuth(){return this.auth}setAuth(e){this.auth={tokenType:`User`,value:e};let t=this.identityVersion;return this.paused||(this.identityVersion=t+1),{type:`Authenticate`,baseVersion:t,...this.auth}}setAdminAuth(e,t){let n={tokenType:`Admin`,value:e,impersonating:t};this.auth=n;let r=this.identityVersion;return this.paused||(this.identityVersion=r+1),{type:`Authenticate`,baseVersion:r,...n}}clearAuth(){this.auth=void 0,this.markAuthCompletion();let e=this.identityVersion;return this.paused||(this.identityVersion=e+1),{type:`Authenticate`,tokenType:`None`,baseVersion:e}}hasAuth(){return!!this.auth}isNewAuth(e){return this.auth?.value!==e}queryPath(e){let t=this.queryIdToToken.get(e);return t?this.querySet.get(t).canonicalizedUdfPath:null}queryArgs(e){let t=this.queryIdToToken.get(e);return t?this.querySet.get(t).args:null}queryToken(e){return this.queryIdToToken.get(e)??null}queryJournal(e){return this.querySet.get(e)?.journal}restart(){this.unpause(),this.outstandingQueriesOlderThanRestart.clear();let e=[];for(let t of this.querySet.values()){let n={type:`Add`,queryId:t.id,udfPath:t.canonicalizedUdfPath,args:[Se(t.args)],journal:t.journal,componentPath:t.componentPath};e.push(n),this.outstandingQueriesOlderThanRestart.add(t.id)}this.querySetVersion=1;let t={type:`ModifyQuerySet`,baseVersion:0,newVersion:1,modifications:e};if(!this.auth)return this.identityVersion=0,[t,void 0];this.outstandingAuthOlderThanRestart=!0;let n={type:`Authenticate`,baseVersion:0,...this.auth};return this.identityVersion=1,[t,n]}pause(){this.paused=!0}resume(){let e=this.pendingQuerySetModifications.size>0?{type:`ModifyQuerySet`,baseVersion:this.querySetVersion,newVersion:++this.querySetVersion,modifications:Array.from(this.pendingQuerySetModifications.values())}:void 0,t=this.auth===void 0?void 0:{type:`Authenticate`,baseVersion:this.identityVersion++,...this.auth};return this.unpause(),[e,t]}unpause(){this.paused=!1,this.pendingQuerySetModifications.clear()}removeSubscriber(e){let t=this.querySet.get(e);if(t.numSubscribers>1)return--t.numSubscribers,null;{this.querySet.delete(e),this.queryIdToToken.delete(t.id),this.outstandingQueriesOlderThanRestart.delete(t.id);let n=this.querySetVersion,r=this.querySetVersion+1,i={type:`Remove`,queryId:t.id};return this.paused?this.pendingQuerySetModifications.has(t.id)?this.pendingQuerySetModifications.delete(t.id):this.pendingQuerySetModifications.set(t.id,i):this.querySetVersion=r,{type:`ModifyQuerySet`,baseVersion:n,newVersion:r,modifications:[i]}}}},gt=Object.defineProperty,_t=(e,t,n)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t,n)=>_t(e,typeof t==`symbol`?t:t+``,n),yt=class{constructor(e,t){this.logger=e,this.markConnectionStateDirty=t,vt(this,`inflightRequests`),vt(this,`requestsOlderThanRestart`),vt(this,`inflightMutationsCount`,0),vt(this,`inflightActionsCount`,0),this.inflightRequests=new Map,this.requestsOlderThanRestart=new Set}request(e,t){let n=new Promise(n=>{let r=t?`Requested`:`NotSent`;this.inflightRequests.set(e.requestId,{message:e,status:{status:r,requestedAt:new Date,onResult:n}}),e.type===`Mutation`?this.inflightMutationsCount++:e.type===`Action`&&this.inflightActionsCount++});return this.markConnectionStateDirty(),n}onResponse(e){let t=this.inflightRequests.get(e.requestId);if(t===void 0||t.status.status===`Completed`)return null;let n=t.message.type===`Mutation`?`mutation`:`action`,r=t.message.udfPath;for(let t of e.logLines)at(this.logger,`info`,n,r,t);let i=t.status,a,o;if(e.success)a={success:!0,logLines:e.logLines,value:ye(e.result)},o=()=>i.onResult(a);else{let t=e.result,{errorData:s}=e;at(this.logger,`error`,n,r,t),a={success:!1,errorMessage:t,errorData:s===void 0?void 0:ye(s),logLines:e.logLines},o=()=>i.onResult(a)}return e.type===`ActionResponse`||!e.success?(o(),this.inflightRequests.delete(e.requestId),this.requestsOlderThanRestart.delete(e.requestId),t.message.type===`Action`?this.inflightActionsCount--:t.message.type===`Mutation`&&this.inflightMutationsCount--,this.markConnectionStateDirty(),{requestId:e.requestId,result:a}):(t.status={status:`Completed`,result:a,ts:e.ts,onResolve:o},null)}removeCompleted(e){let t=new Map;for(let[n,r]of this.inflightRequests.entries()){let i=r.status;i.status===`Completed`&&i.ts.lessThanOrEqual(e)&&(i.onResolve(),t.set(n,i.result),r.message.type===`Mutation`?this.inflightMutationsCount--:r.message.type===`Action`&&this.inflightActionsCount--,this.inflightRequests.delete(n),this.requestsOlderThanRestart.delete(n))}return t.size>0&&this.markConnectionStateDirty(),t}restart(){this.requestsOlderThanRestart=new Set(this.inflightRequests.keys());let e=[];for(let[t,n]of this.inflightRequests){if(n.status.status===`NotSent`){n.status.status=`Requested`,e.push(n.message);continue}if(n.message.type===`Mutation`)e.push(n.message);else if(n.message.type===`Action`){if(this.inflightRequests.delete(t),this.requestsOlderThanRestart.delete(t),this.inflightActionsCount--,n.status.status===`Completed`)throw Error(`Action should never be in 'Completed' state`);n.status.onResult({success:!1,errorMessage:`Connection lost while action was in flight`,logLines:[]})}}return this.markConnectionStateDirty(),e}resume(){let e=[];for(let[,t]of this.inflightRequests)if(t.status.status===`NotSent`){t.status.status=`Requested`,e.push(t.message);continue}return e}hasIncompleteRequests(){for(let e of this.inflightRequests.values())if(e.status.status===`Requested`)return!0;return!1}hasInflightRequests(){return this.inflightRequests.size>0}hasSyncedPastLastReconnect(){return this.requestsOlderThanRestart.size===0}timeOfOldestInflightRequest(){if(this.inflightRequests.size===0)return null;let e=Date.now();for(let t of this.inflightRequests.values())t.status.status!==`Completed`&&t.status.requestedAt.getTime()<e&&(e=t.status.requestedAt.getTime());return new Date(e)}inflightMutations(){return this.inflightMutationsCount}inflightActions(){return this.inflightActionsCount}},bt=Symbol.for(`functionName`),xt=Symbol.for(`toReferencePath`);function St(e){return e[xt]??null}function Ct(e){return e.startsWith(`function://`)}function wt(e){let t;if(typeof e==`string`)t=Ct(e)?{functionHandle:e}:{name:e};else if(e[bt])t={name:e[bt]};else{let n=St(e);if(!n)throw Error(`${e} is not a functionReference`);t={reference:n}}return t}function Tt(e){let t=wt(e);if(t.name===void 0)throw t.functionHandle===void 0?t.reference===void 0?Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`):Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`):Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`);if(typeof e==`string`)return e;let n=e[bt];if(!n)throw Error(`${e} is not a functionReference`);return n}function Et(e){return{[bt]:e}}function Dt(e=[]){return new Proxy({},{get(t,n){if(typeof n==`string`)return Dt([...e,n]);if(n===bt){if(e.length<2){let t=[`api`,...e].join(`.`);throw Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${t}\``)}let t=e.slice(0,-1).join(`/`),n=e[e.length-1];return n==="default"?t:t+`:`+n}if(n===Symbol.toStringTag)return`FunctionReference`}})}var Ot=Dt(),kt=Object.defineProperty,At=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jt=(e,t,n)=>At(e,typeof t==`symbol`?t:t+``,n),Mt=class e{constructor(e){jt(this,`queryResults`),jt(this,`modifiedQueries`),this.queryResults=e,this.modifiedQueries=[]}getQuery(t,...n){let r=O(n[0]),i=Tt(t),a=this.queryResults.get(ut(i,r));if(a!==void 0)return e.queryValue(a.result)}getAllQueries(t){let n=[],r=Tt(t);for(let t of this.queryResults.values())t.udfPath===lt(r)&&n.push({args:t.args,value:e.queryValue(t.result)});return n}setQuery(e,t,n){let r=O(t),i=Tt(e),a=ut(i,r),o;o=n===void 0?void 0:{success:!0,value:n,logLines:[]};let s={udfPath:i,args:r,result:o};this.queryResults.set(a,s),this.modifiedQueries.push(a)}static queryValue(e){if(e!==void 0&&e.success)return e.value}},Nt=class{constructor(){jt(this,`queryResults`),jt(this,`optimisticUpdates`),this.queryResults=new Map,this.optimisticUpdates=[]}ingestQueryResultsFromServer(e,t){this.optimisticUpdates=this.optimisticUpdates.filter(e=>!t.has(e.mutationId));let n=this.queryResults;this.queryResults=new Map(e);let r=new Mt(this.queryResults);for(let e of this.optimisticUpdates)e.update(r);let i=[];for(let[e,t]of this.queryResults){let r=n.get(e);(r===void 0||r.result!==t.result)&&i.push(e)}return i}applyOptimisticUpdate(e,t){this.optimisticUpdates.push({update:e,mutationId:t});let n=new Mt(this.queryResults);return e(n),n.modifiedQueries}rawQueryResult(e){let t=this.queryResults.get(e);if(t!==void 0)return t.result}queryResult(e){let t=this.queryResults.get(e);if(t===void 0)return;let n=t.result;if(n!==void 0){if(n.success)return n.value;throw n.errorData===void 0?Error(st(`query`,t.udfPath,n)):ct(n,new Ye(st(`query`,t.udfPath,n)))}}hasQueryResult(e){return this.queryResults.get(e)!==void 0}queryLogs(e){return this.queryResults.get(e)?.result?.logLines}},Pt=Object.defineProperty,Ft=(e,t,n)=>t in e?Pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,It=(e,t,n)=>Ft(e,typeof t==`symbol`?t:t+``,n),Lt=class e{constructor(e,t){It(this,`low`),It(this,`high`),It(this,`__isUnsignedLong__`),this.low=e|0,this.high=t|0,this.__isUnsignedLong__=!0}static isLong(e){return(e&&e.__isUnsignedLong__)===!0}static fromBytesLE(t){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24)}toBytesLE(){let e=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]}static fromNumber(t){return isNaN(t)||t<0?Rt:t>=Vt?Ht:new e(t%Bt|0,t/Bt|0)}toString(){return(BigInt(this.high)*BigInt(Bt)+BigInt(this.low)).toString()}equals(t){return e.isLong(t)||(t=e.fromValue(t)),this.high>>>31==1&&t.high>>>31==1?!1:this.high===t.high&&this.low===t.low}notEquals(e){return!this.equals(e)}comp(t){return e.isLong(t)||(t=e.fromValue(t)),this.equals(t)?0:t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1}lessThanOrEqual(e){return this.comp(e)<=0}static fromValue(t){return typeof t==`number`?e.fromNumber(t):new e(t.low,t.high)}},Rt=new Lt(0,0),zt=65536,Bt=zt*zt,Vt=Bt*Bt,Ht=new Lt(-1,-1),Ut=Object.defineProperty,Wt=(e,t,n)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gt=(e,t,n)=>Wt(e,typeof t==`symbol`?t:t+``,n),Kt=class{constructor(e,t){Gt(this,`version`),Gt(this,`remoteQuerySet`),Gt(this,`queryPath`),Gt(this,`logger`),this.version={querySet:0,ts:Lt.fromNumber(0),identity:0},this.remoteQuerySet=new Map,this.queryPath=e,this.logger=t}transition(e){let t=e.startVersion;if(this.version.querySet!==t.querySet||this.version.ts.notEquals(t.ts)||this.version.identity!==t.identity)throw Error(`Invalid start version: ${t.ts.toString()}:${t.querySet}:${t.identity}, transitioning from ${this.version.ts.toString()}:${this.version.querySet}:${this.version.identity}`);for(let t of e.modifications)switch(t.type){case`QueryUpdated`:{let e=this.queryPath(t.queryId);if(e)for(let n of t.logLines)at(this.logger,`info`,`query`,e,n);let n=ye(t.value??null);this.remoteQuerySet.set(t.queryId,{success:!0,value:n,logLines:t.logLines});break}case`QueryFailed`:{let e=this.queryPath(t.queryId);if(e)for(let n of t.logLines)at(this.logger,`info`,`query`,e,n);let{errorData:n}=t;this.remoteQuerySet.set(t.queryId,{success:!1,errorMessage:t.errorMessage,errorData:n===void 0?void 0:ye(n),logLines:t.logLines});break}case`QueryRemoved`:this.remoteQuerySet.delete(t.queryId);break;default:throw Error(`Invalid modification ${t.type}`)}this.version=e.endVersion}remoteQueryResults(){return this.remoteQuerySet}timestamp(){return this.version.ts}};function qt(e){let t=T(e);return Lt.fromBytesLE(Array.from(t))}function Jt(e){return ee(new Uint8Array(e.toBytesLE()))}function Yt(e){switch(e.type){case`FatalError`:case`AuthError`:case`ActionResponse`:case`TransitionChunk`:case`Ping`:return{...e};case`MutationResponse`:return e.success?{...e,ts:qt(e.ts)}:{...e};case`Transition`:return{...e,startVersion:{...e.startVersion,ts:qt(e.startVersion.ts)},endVersion:{...e.endVersion,ts:qt(e.endVersion.ts)}}}}function Xt(e){switch(e.type){case`Authenticate`:case`ModifyQuerySet`:case`Mutation`:case`Action`:case`Event`:return{...e};case`Connect`:return e.maxObservedTimestamp===void 0?{...e,maxObservedTimestamp:void 0}:{...e,maxObservedTimestamp:Jt(e.maxObservedTimestamp)}}}var Zt=Object.defineProperty,Qt=(e,t,n)=>t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$t=(e,t,n)=>Qt(e,typeof t==`symbol`?t:t+``,n),en=1e3,tn=1001,nn=1005,rn=4040,an;function on(){return an===void 0&&(an=Date.now()),typeof performance>`u`||!performance.now?Date.now():Math.round(an+performance.now())}function sn(){return`t=${Math.round((on()-an)/100)/10}s`}var cn={InternalServerError:{timeout:1e3},SubscriptionsWorkerFullError:{timeout:3e3},TooManyConcurrentRequests:{timeout:3e3},CommitterFullError:{timeout:3e3},AwsTooManyRequestsException:{timeout:3e3},ExecuteFullError:{timeout:3e3},SystemTimeoutError:{timeout:3e3},ExpiredInQueue:{timeout:3e3},VectorIndexesUnavailable:{timeout:1e3},SearchIndexesUnavailable:{timeout:1e3},TableSummariesUnavailable:{timeout:1e3},VectorIndexTooLarge:{timeout:3e3},SearchIndexTooLarge:{timeout:3e3},TooManyWritesInTimePeriod:{timeout:3e3}};function ln(e){if(e===void 0)return`Unknown`;for(let t of Object.keys(cn))if(e.startsWith(t))return t;return`Unknown`}var un=class{constructor(e,t,n,r,i,a){this.markConnectionStateDirty=i,this.debug=a,$t(this,`socket`),$t(this,`connectionCount`),$t(this,`_hasEverConnected`,!1),$t(this,`lastCloseReason`),$t(this,`transitionChunkBuffer`,null),$t(this,`defaultInitialBackoff`),$t(this,`maxBackoff`),$t(this,`retries`),$t(this,`serverInactivityThreshold`),$t(this,`reconnectDueToServerInactivityTimeout`),$t(this,`scheduledReconnect`,null),$t(this,`networkOnlineHandler`,null),$t(this,`pendingNetworkRecoveryInfo`,null),$t(this,`uri`),$t(this,`onOpen`),$t(this,`onResume`),$t(this,`onMessage`),$t(this,`webSocketConstructor`),$t(this,`logger`),$t(this,`onServerDisconnectError`),this.webSocketConstructor=n,this.socket={state:`disconnected`},this.connectionCount=0,this.lastCloseReason=`InitialConnect`,this.defaultInitialBackoff=1e3,this.maxBackoff=16e3,this.retries=0,this.serverInactivityThreshold=6e4,this.reconnectDueToServerInactivityTimeout=null,this.uri=e,this.onOpen=t.onOpen,this.onResume=t.onResume,this.onMessage=t.onMessage,this.onServerDisconnectError=t.onServerDisconnectError,this.logger=r,this.setupNetworkListener(),this.connect()}setSocketState(e){this.socket=e,this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${`paused`in this.socket?this.socket.paused:void 0}`),this.markConnectionStateDirty()}setupNetworkListener(){typeof window<`u`&&typeof window.addEventListener==`function`&&this.networkOnlineHandler===null&&(this.networkOnlineHandler=()=>{this._logVerbose(`network online event detected`),this.tryReconnectImmediately()},window.addEventListener(`online`,this.networkOnlineHandler),this._logVerbose(`network online event listener registered`))}cleanupNetworkListener(){this.networkOnlineHandler&&typeof window<`u`&&typeof window.removeEventListener==`function`&&(window.removeEventListener(`online`,this.networkOnlineHandler),this.networkOnlineHandler=null,this._logVerbose(`network online event listener removed`))}assembleTransition(e){if(e.partNumber<0||e.partNumber>=e.totalParts||e.totalParts===0||this.transitionChunkBuffer&&(this.transitionChunkBuffer.totalParts!==e.totalParts||this.transitionChunkBuffer.transitionId!==e.transitionId))throw this.transitionChunkBuffer=null,Error(`Invalid TransitionChunk`);if(this.transitionChunkBuffer===null&&(this.transitionChunkBuffer={chunks:[],totalParts:e.totalParts,transitionId:e.transitionId}),e.partNumber!==this.transitionChunkBuffer.chunks.length){let t=this.transitionChunkBuffer.chunks.length;throw this.transitionChunkBuffer=null,Error(`TransitionChunk received out of order: expected part ${t}, got ${e.partNumber}`)}if(this.transitionChunkBuffer.chunks.push(e.chunk),this.transitionChunkBuffer.chunks.length===e.totalParts){let e=this.transitionChunkBuffer.chunks.join(``);this.transitionChunkBuffer=null;let t=Yt(JSON.parse(e));if(t.type!==`Transition`)throw Error(`Expected Transition, got ${t.type} after assembling chunks`);return t}return null}connect(){if(this.socket.state===`terminated`)return;if(this.socket.state!==`disconnected`&&this.socket.state!==`stopped`)throw Error(`Didn't start connection from disconnected state: `+this.socket.state);let e=new this.webSocketConstructor(this.uri);this._logVerbose(`constructed WebSocket`),this.setSocketState({state:`connecting`,ws:e,paused:`no`}),this.resetServerInactivityTimeout(),e.onopen=()=>{if(this.logger.logVerbose(`begin ws.onopen`),this.socket.state!==`connecting`)throw Error(`onopen called with socket not in connecting state`);if(this.setSocketState({state:`ready`,ws:e,paused:this.socket.paused===`yes`?`uninitialized`:`no`}),this.resetServerInactivityTimeout(),this.socket.paused===`no`&&(this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:on()})),this.lastCloseReason!==`InitialConnect`&&(this.lastCloseReason?this.logger.log(`WebSocket reconnected at`,sn(),`after disconnect due to`,this.lastCloseReason):this.logger.log(`WebSocket reconnected at`,sn())),this.connectionCount+=1,this.lastCloseReason=null,this.pendingNetworkRecoveryInfo!==null){let{timeSavedMs:e}=this.pendingNetworkRecoveryInfo;this.pendingNetworkRecoveryInfo=null,this.sendMessage({type:`Event`,eventType:`NetworkRecoveryReconnect`,event:{timeSavedMs:e}}),this.logger.log(`Network recovery reconnect saved ~${Math.round(e/1e3)}s of waiting`)}},e.onerror=e=>{this.transitionChunkBuffer=null;let t=e.message;t&&this.logger.log(`WebSocket error message: ${t}`)},e.onmessage=e=>{this.resetServerInactivityTimeout();let t=e.data.length,n=Yt(JSON.parse(e.data));if(this._logVerbose(`received ws message with type ${n.type}`),n.type!==`Ping`){if(n.type===`TransitionChunk`){let e=this.assembleTransition(n);if(!e)return;n=e,this._logVerbose(`assembled full ws message of type ${n.type}`)}this.transitionChunkBuffer!==null&&(this.transitionChunkBuffer=null,this.logger.log(`Received unexpected ${n.type} while buffering TransitionChunks`)),n.type===`Transition`&&this.reportLargeTransition({messageLength:t,transition:n}),this.onMessage(n).hasSyncedPastLastReconnect&&(this.retries=0,this.markConnectionStateDirty())}},e.onclose=e=>{if(this._logVerbose(`begin ws.onclose`),this.transitionChunkBuffer=null,this.lastCloseReason===null&&(this.lastCloseReason=e.reason||`closed with code ${e.code}`),e.code!==en&&e.code!==tn&&e.code!==nn&&e.code!==rn){let t=`WebSocket closed with code ${e.code}`;e.reason&&(t+=`: ${e.reason}`),this.logger.log(t),this.onServerDisconnectError&&e.reason&&this.onServerDisconnectError(t)}let t=ln(e.reason);this.scheduleReconnect(t)}}socketState(){return this.socket.state}sendMessage(e){let t={type:e.type,...e.type===`Authenticate`&&e.tokenType===`User`?{value:`...${e.value.slice(-7)}`}:{}};if(this.socket.state===`ready`&&this.socket.paused===`no`){let n=Xt(e),r=JSON.stringify(n),i=!1;try{this.socket.ws.send(r),i=!0}catch(e){this.logger.log(`Failed to send message on WebSocket, reconnecting: ${e}`),this.closeAndReconnect(`FailedToSendMessage`)}return this._logVerbose(`${i?`sent`:`failed to send`} message with type ${e.type}: ${JSON.stringify(t)}`),!0}return this._logVerbose(`message not sent (socket state: ${this.socket.state}, paused: ${`paused`in this.socket?this.socket.paused:void 0}): ${JSON.stringify(t)}`),!1}resetServerInactivityTimeout(){this.socket.state!==`terminated`&&(this.reconnectDueToServerInactivityTimeout!==null&&(clearTimeout(this.reconnectDueToServerInactivityTimeout),this.reconnectDueToServerInactivityTimeout=null),this.reconnectDueToServerInactivityTimeout=setTimeout(()=>{this.closeAndReconnect(`InactiveServer`)},this.serverInactivityThreshold))}scheduleReconnect(e){this.scheduledReconnect&&=(clearTimeout(this.scheduledReconnect.timeout),null),this.socket={state:`disconnected`};let t=this.nextBackoff(e);this.markConnectionStateDirty(),this.logger.log(`Attempting reconnect in ${Math.round(t)}ms`);let n=on(),r=setTimeout(()=>{this.scheduledReconnect?.timeout===r&&(this.scheduledReconnect=null,this.connect())},t);this.scheduledReconnect={timeout:r,scheduledAt:n,backoffMs:t}}closeAndReconnect(e){switch(this._logVerbose(`begin closeAndReconnect with reason ${e}`),this.socket.state){case`disconnected`:case`terminated`:case`stopped`:return;case`connecting`:case`ready`:this.lastCloseReason=e,this.close(),this.scheduleReconnect(`client`);return;default:this.socket}}close(){switch(this.transitionChunkBuffer=null,this.socket.state){case`disconnected`:case`terminated`:case`stopped`:return Promise.resolve();case`connecting`:{let e=this.socket.ws;return e.onmessage=e=>{this._logVerbose(`Ignoring message received after close`)},new Promise(t=>{e.onclose=()=>{this._logVerbose(`Closed after connecting`),t()},e.onopen=()=>{this._logVerbose(`Opened after connecting`),e.close()}})}case`ready`:{this._logVerbose(`ws.close called`);let e=this.socket.ws;e.onmessage=e=>{this._logVerbose(`Ignoring message received after close`)};let t=new Promise(t=>{e.onclose=()=>{t()}});return e.close(),t}default:return this.socket,Promise.resolve()}}terminate(){switch(this.reconnectDueToServerInactivityTimeout&&clearTimeout(this.reconnectDueToServerInactivityTimeout),this.scheduledReconnect&&=(clearTimeout(this.scheduledReconnect.timeout),null),this.cleanupNetworkListener(),this.socket.state){case`terminated`:case`stopped`:case`disconnected`:case`connecting`:case`ready`:{let e=this.close();return this.setSocketState({state:`terminated`}),e}default:throw this.socket,Error(`Invalid websocket state: ${this.socket.state}`)}}stop(){switch(this.socket.state){case`terminated`:return Promise.resolve();case`connecting`:case`stopped`:case`disconnected`:case`ready`:{this.cleanupNetworkListener();let e=this.close();return this.socket={state:`stopped`},e}default:return this.socket,Promise.resolve()}}tryRestart(){switch(this.socket.state){case`stopped`:break;case`terminated`:case`connecting`:case`ready`:case`disconnected`:this.logger.logVerbose(`Restart called without stopping first`);return;default:this.socket}this.setupNetworkListener(),this.connect()}pause(){switch(this.socket.state){case`disconnected`:case`stopped`:case`terminated`:return;case`connecting`:case`ready`:this.socket={...this.socket,paused:`yes`};return;default:this.socket;return}}tryReconnectImmediately(){if(this._logVerbose(`tryReconnectImmediately called`),this.socket.state!==`disconnected`){this._logVerbose(`tryReconnectImmediately called but socket state is ${this.socket.state}, no action taken`);return}let e=null;if(this.scheduledReconnect){let t=on()-this.scheduledReconnect.scheduledAt;e=Math.max(0,this.scheduledReconnect.backoffMs-t),this._logVerbose(`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(t)}ms)`),clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null,this._logVerbose(`canceled scheduled reconnect`)}this.logger.log(`Network recovery detected, reconnecting immediately`),this.pendingNetworkRecoveryInfo=e===null?null:{timeSavedMs:e},this.connect()}resume(){switch(this.socket.state){case`connecting`:this.socket={...this.socket,paused:`no`};return;case`ready`:this.socket.paused===`uninitialized`?(this.socket={...this.socket,paused:`no`},this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:on()})):this.socket.paused===`yes`&&(this.socket={...this.socket,paused:`no`},this.onResume());return;case`terminated`:case`stopped`:case`disconnected`:return;default:this.socket}this.connect()}connectionState(){return{isConnected:this.socket.state===`ready`,hasEverConnected:this._hasEverConnected,connectionCount:this.connectionCount,connectionRetries:this.retries}}_logVerbose(e){this.logger.logVerbose(e)}nextBackoff(e){let t=(e===`client`?100:e===`Unknown`?this.defaultInitialBackoff:cn[e].timeout)*2**this.retries;this.retries+=1;let n=Math.min(t,this.maxBackoff);return n+n*(Math.random()-.5)}reportLargeTransition({transition:e,messageLength:t}){if(e.clientClockSkew===void 0||e.serverTs===void 0)return;let n=on()-e.clientClockSkew-e.serverTs/1e6,r=`${Math.round(n)}ms`,i=`${Math.round(t/1e4)/100}MB`,a=t/(n/1e3),o=`${Math.round(a/1e4)/100}MB per second`;this._logVerbose(`received ${i} transition in ${r} at ${o}`),t>2e7?this.logger.log(`received query results totaling more that 20MB (${i}) which will take a long time to download on slower connections`):n>2e4&&this.logger.log(`received query results totaling ${i} which took more than 20s to arrive (${r})`),this.debug&&this.sendMessage({type:`Event`,eventType:`ClientReceivedTransition`,event:{transitionTransitTime:n,messageLength:t}})}};function dn(){return fn()}function fn(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var pn=class extends Error{};pn.prototype.name=`InvalidTokenError`;function mn(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=`0`+n),`%`+n}))}function hn(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`base64 string is not of the correct length`)}try{return mn(t)}catch{return atob(t)}}function gn(e,t){if(typeof e!=`string`)throw new pn(`Invalid token specified: must be a string`);t||={};let n=t.header===!0?0:1,r=e.split(`.`)[n];if(typeof r!=`string`)throw new pn(`Invalid token specified: missing part #${n+1}`);let i;try{i=hn(r)}catch(e){throw new pn(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new pn(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}var _n=Object.defineProperty,vn=(e,t,n)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yn=(e,t,n)=>vn(e,typeof t==`symbol`?t:t+``,n),bn=1728e6,xn=2,Sn=class{constructor(e,t,n){yn(this,`authState`,{state:`noAuth`}),yn(this,`configVersion`,0),yn(this,`syncState`),yn(this,`authenticate`),yn(this,`stopSocket`),yn(this,`tryRestartSocket`),yn(this,`pauseSocket`),yn(this,`resumeSocket`),yn(this,`clearAuth`),yn(this,`logger`),yn(this,`refreshTokenLeewaySeconds`),yn(this,`initialAuthTokenReuse`),yn(this,`lastRefreshChange`),yn(this,`tokenConfirmationAttempts`,0),this.syncState=e,this.authenticate=t.authenticate,this.stopSocket=t.stopSocket,this.tryRestartSocket=t.tryRestartSocket,this.pauseSocket=t.pauseSocket,this.resumeSocket=t.resumeSocket,this.clearAuth=t.clearAuth,this.logger=n.logger,this.refreshTokenLeewaySeconds=n.refreshTokenLeewaySeconds,this.initialAuthTokenReuse=n.initialAuthTokenReuse,this.lastRefreshChange=!1}notifyRefreshChange(e){this.authState.state!==`noAuth`&&this.authState.state!==`initialRefetch`&&this.authState.config.onRefreshChange&&this.lastRefreshChange!==e&&(this.lastRefreshChange=e,this.authState.config.onRefreshChange(e))}async setConfig(e,t,n){this.resetAuthState(),this._logVerbose(`pausing WS for auth token fetch`),this.pauseSocket();let r=await this.fetchTokenAndGuardAgainstRace(e,{forceRefreshToken:!1});if(r.isFromOutdatedConfig)return;let i={fetchToken:e,onAuthChange:t,onRefreshChange:n};r.value?(this.setAuthState({state:`waitingForServerConfirmationOfCachedToken`,config:i,hasRetried:!1}),this.authenticate(r.value)):(this.setAuthState({state:`initialRefetch`,config:i}),await this.refetchToken()),this._logVerbose(`resuming WS after auth token fetch`),this.resumeSocket()}onTransition(e){if(this.syncState.isCurrentOrNewerAuthVersion(e.endVersion.identity)&&!(e.endVersion.identity<=e.startVersion.identity)){if(this._logVerbose(`auth state is ${this.authState.state} when handling transition`),this.syncState.markAuthCompletion(),this.authState.state===`waitingForServerConfirmationOfCachedToken`){this._logVerbose(`server confirmed auth token is valid`);let t=this.syncState.getAuth()?.value;this.initialAuthTokenReuse&&t?this.scheduleTokenRefetch(t,e.clientClockSkew):this.refetchToken(),this.authState.config.onAuthChange(!0);return}this.authState.state===`waitingForServerConfirmationOfFreshToken`&&(this._logVerbose(`server confirmed new auth token is valid`),this.notifyRefreshChange(!1),this.scheduleTokenRefetch(this.authState.token),this.tokenConfirmationAttempts=0,this.authState.hadAuth||this.authState.config.onAuthChange(!0))}}onAuthError(e){if(e.authUpdateAttempted===!1&&(this.authState.state===`waitingForServerConfirmationOfFreshToken`||this.authState.state===`waitingForServerConfirmationOfCachedToken`)){this._logVerbose(`ignoring non-auth token expired error`);return}let{baseVersion:t}=e;if(!this.syncState.isCurrentOrNewerAuthVersion(t+1)){this._logVerbose(`ignoring auth error for previous auth attempt`);return}this.tryToReauthenticate(e)}async tryToReauthenticate(e){if(this._logVerbose(`attempting to reauthenticate: ${e.error}`),this.authState.state===`noAuth`||this.authState.state===`waitingForServerConfirmationOfFreshToken`&&this.tokenConfirmationAttempts>=xn){this.logger.error(`Failed to authenticate: "${e.error}", check your server auth config`),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.authState.state!==`noAuth`&&this.setAndReportAuthFailed(this.authState.config.onAuthChange);return}if(this.authState.state===`waitingForServerConfirmationOfFreshToken`&&(this.tokenConfirmationAttempts++,this._logVerbose(`retrying reauthentication, ${xn-this.tokenConfirmationAttempts} attempts remaining`)),this.notifyRefreshChange(!0),await this.stopSocket(),this.authState.state===`noAuth`)return;let t=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});t.isFromOutdatedConfig||(t.value&&this.syncState.isNewAuth(t.value)?(this.authenticate(t.value),this.setAuthState({state:`waitingForServerConfirmationOfFreshToken`,config:this.authState.config,token:t.value,hadAuth:this.authState.state===`notRefetching`||this.authState.state===`waitingForScheduledRefetch`})):(this._logVerbose(`reauthentication failed, could not fetch a new token`),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this.tryRestartSocket())}async refetchToken(){if(this.authState.state===`noAuth`)return;this._logVerbose(`refetching auth token`);let e=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});e.isFromOutdatedConfig||(e.value?this.syncState.isNewAuth(e.value)?(this.setAuthState({state:`waitingForServerConfirmationOfFreshToken`,hadAuth:this.syncState.hasAuth(),token:e.value,config:this.authState.config}),this.authenticate(e.value)):this.setAuthState({state:`notRefetching`,config:this.authState.config}):(this._logVerbose(`refetching token failed`),this.syncState.hasAuth()&&this.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this._logVerbose(`restarting WS after auth token fetch (if currently stopped)`),this.tryRestartSocket())}scheduleTokenRefetch(e,t){if(this.authState.state===`noAuth`)return;let n=this.decodeToken(e);if(!n){this.logger.error(`Auth token is not a valid JWT, cannot refetch the token`);return}let{iat:r,exp:i}=n;if(!r||!i){this.logger.error(`Auth token does not have required fields, cannot refetch the token`);return}let a=i-r;if(a<=2){this.logger.error(`Auth token does not live long enough, cannot refetch the token`);return}let o;t===void 0?o=a:(o=i-(Date.now()-t)/1e3,o<=0&&(o=0));let s=Math.min(bn,(o-this.refreshTokenLeewaySeconds)*1e3);s<=0&&(this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${o}s`),s=0);let c=setTimeout(()=>{this._logVerbose(`running scheduled token refetch`),this.refetchToken()},s);this.setAuthState({state:`waitingForScheduledRefetch`,refetchTokenTimeoutId:c,config:this.authState.config}),this._logVerbose(`scheduled preemptive auth token refetching in ${s}ms`)}async fetchTokenAndGuardAgainstRace(e,t){let n=++this.configVersion;this._logVerbose(`fetching token with config version ${n}`);let r=await e(t);return this.configVersion===n?{isFromOutdatedConfig:!1,value:r}:(this._logVerbose(`stale config version, expected ${n}, got ${this.configVersion}`),{isFromOutdatedConfig:!0})}stop(){this.resetAuthState(),this.configVersion++,this._logVerbose(`config version bumped to ${this.configVersion}`)}setAndReportAuthFailed(e){e(!1),this.resetAuthState()}resetAuthState(){this.notifyRefreshChange(!1),this.setAuthState({state:`noAuth`})}setAuthState(e){let t=e.state===`waitingForServerConfirmationOfFreshToken`?{hadAuth:e.hadAuth,state:e.state,token:`...${e.token.slice(-7)}`}:{state:e.state};switch(this._logVerbose(`setting auth state to ${JSON.stringify(t)}`),e.state){case`waitingForScheduledRefetch`:case`notRefetching`:case`noAuth`:this.tokenConfirmationAttempts=0}this.authState.state===`waitingForScheduledRefetch`&&clearTimeout(this.authState.refetchTokenTimeoutId),this.authState=e}decodeToken(e){try{return gn(e)}catch(e){return this._logVerbose(`Error decoding token: ${e instanceof Error?e.message:`Unknown error`}`),null}}_logVerbose(e){this.logger.logVerbose(`${e} [v${this.configVersion}]`)}},Cn=[`convexClientConstructed`,`convexWebSocketOpen`,`convexFirstMessageReceived`];function wn(e,t){let n={sessionId:t};typeof performance<`u`&&performance.mark&&performance.mark(e,{detail:n})}function Tn(e){let t=e.name.slice(6);return t=t.charAt(0).toLowerCase()+t.slice(1),{name:t,startTime:e.startTime}}function En(e){if(typeof performance>`u`||!performance.getEntriesByName)return[];let t=[];for(let n of Cn){let r=performance.getEntriesByName(n).filter(e=>e.entryType===`mark`).filter(t=>t.detail.sessionId===e);t.push(...r)}return t.map(Tn)}var Dn=Object.defineProperty,On=(e,t,n)=>t in e?Dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t,n)=>On(e,typeof t==`symbol`?t:t+``,n),An=class{constructor(e,t,n){if(kn(this,`address`),kn(this,`state`),kn(this,`requestManager`),kn(this,`webSocketManager`),kn(this,`authenticationManager`),kn(this,`remoteQuerySet`),kn(this,`optimisticQueryResults`),kn(this,`_transitionHandlerCounter`,0),kn(this,`_nextRequestId`),kn(this,`_onTransitionFns`,new Map),kn(this,`_sessionId`),kn(this,`firstMessageReceived`,!1),kn(this,`debug`),kn(this,`logger`),kn(this,`maxObservedTimestamp`),kn(this,`connectionStateSubscribers`,new Map),kn(this,`nextConnectionStateSubscriberId`,0),kn(this,`_lastPublishedConnectionState`),kn(this,`markConnectionStateDirty`,()=>{Promise.resolve().then(()=>{let e=this.connectionState();if(JSON.stringify(e)!==JSON.stringify(this._lastPublishedConnectionState)){this._lastPublishedConnectionState=e;for(let t of this.connectionStateSubscribers.values())t(e)}})}),kn(this,`mark`,e=>{this.debug&&wn(e,this.sessionId)}),typeof e==`object`)throw Error(`Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.`);n?.skipConvexDeploymentUrlCheck!==!0&&te(e),n={...n};let r=n.authRefreshTokenLeewaySeconds??10,i=n.webSocketConstructor;if(!i&&typeof WebSocket>`u`)throw Error(`No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient`);i||=WebSocket,this.debug=n.reportDebugInfoToConvex??!1,this.address=e,this.logger=n.logger===!1?it({verbose:n.verbose??!1}):n.logger!==!0&&n.logger?n.logger:rt({verbose:n.verbose??!1});let a=e.search(`://`);if(a===-1)throw Error(`Provided address was not an absolute URL.`);let o=e.substring(a+3),s=e.substring(0,a),c;if(s===`http`)c=`ws`;else if(s===`https`)c=`wss`;else throw Error(`Unknown parent protocol ${s}`);let l=`${c}://${o}/api/${Xe}/sync`;this.state=new ht,this.remoteQuerySet=new Kt(e=>this.state.queryPath(e),this.logger),this.requestManager=new yt(this.logger,this.markConnectionStateDirty);let u=()=>{this.webSocketManager.pause(),this.state.pause()};this.authenticationManager=new Sn(this.state,{authenticate:e=>{let t=this.state.setAuth(e);return this.webSocketManager.sendMessage(t),t.baseVersion},stopSocket:()=>this.webSocketManager.stop(),tryRestartSocket:()=>this.webSocketManager.tryRestart(),pauseSocket:u,resumeSocket:()=>this.webSocketManager.resume(),clearAuth:()=>{this.clearAuth()}},{logger:this.logger,refreshTokenLeewaySeconds:r,initialAuthTokenReuse:n.initialAuthTokenReuse??!1}),this.optimisticQueryResults=new Nt,this.addOnTransitionHandler(e=>{t(e.queries.map(e=>e.token))}),this._nextRequestId=0,this._sessionId=dn();let{unsavedChangesWarning:d}=n;if(typeof window>`u`||window.addEventListener===void 0){if(d===!0)throw Error(`unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.`)}else d!==!1&&window.addEventListener(`beforeunload`,e=>{if(this.requestManager.hasIncompleteRequests()){e.preventDefault();let t=`Are you sure you want to leave? Your changes may not be saved.`;return(e||window.event).returnValue=t,t}});this.webSocketManager=new un(l,{onOpen:e=>{this.mark(`convexWebSocketOpen`),this.webSocketManager.sendMessage({...e,type:`Connect`,sessionId:this._sessionId,maxObservedTimestamp:this.maxObservedTimestamp}),this.remoteQuerySet=new Kt(e=>this.state.queryPath(e),this.logger);let[t,n]=this.state.restart();n&&this.webSocketManager.sendMessage(n),this.webSocketManager.sendMessage(t);for(let e of this.requestManager.restart())this.webSocketManager.sendMessage(e)},onResume:()=>{let[e,t]=this.state.resume();t&&this.webSocketManager.sendMessage(t),e&&this.webSocketManager.sendMessage(e);for(let e of this.requestManager.resume())this.webSocketManager.sendMessage(e)},onMessage:e=>{switch(this.firstMessageReceived||(this.firstMessageReceived=!0,this.mark(`convexFirstMessageReceived`),this.reportMarks()),e.type){case`Transition`:{this.observedTimestamp(e.endVersion.ts),this.authenticationManager.onTransition(e),this.remoteQuerySet.transition(e),this.state.transition(e);let t=this.requestManager.removeCompleted(this.remoteQuerySet.timestamp());this.notifyOnQueryResultChanges(t);break}case`MutationResponse`:{e.success&&this.observedTimestamp(e.ts);let t=this.requestManager.onResponse(e);t!==null&&this.notifyOnQueryResultChanges(new Map([[t.requestId,t.result]]));break}case`ActionResponse`:this.requestManager.onResponse(e);break;case`AuthError`:this.authenticationManager.onAuthError(e);break;case`FatalError`:{let t=ot(this.logger,e.error);throw this.webSocketManager.terminate(),t}}return{hasSyncedPastLastReconnect:this.hasSyncedPastLastReconnect()}},onServerDisconnectError:n.onServerDisconnectError},i,this.logger,this.markConnectionStateDirty,this.debug),this.mark(`convexClientConstructed`),n.expectAuth&&u()}hasSyncedPastLastReconnect(){return this.requestManager.hasSyncedPastLastReconnect()&&this.state.hasSyncedPastLastReconnect()}observedTimestamp(e){(this.maxObservedTimestamp===void 0||this.maxObservedTimestamp.lessThanOrEqual(e))&&(this.maxObservedTimestamp=e)}getMaxObservedTimestamp(){return this.maxObservedTimestamp}notifyOnQueryResultChanges(e){let t=this.remoteQuerySet.remoteQueryResults(),n=new Map;for(let[e,r]of t){let t=this.state.queryToken(e);if(t!==null){let i={result:r,udfPath:this.state.queryPath(e),args:this.state.queryArgs(e)};n.set(t,i)}}let r=this.optimisticQueryResults.ingestQueryResultsFromServer(n,new Set(e.keys()));this.handleTransition({queries:r.map(e=>({token:e,modification:{kind:`Updated`,result:this.optimisticQueryResults.rawQueryResult(e)}})),reflectedMutations:Array.from(e).map(([e,t])=>({requestId:e,result:t})),timestamp:this.remoteQuerySet.timestamp()})}handleTransition(e){for(let t of this._onTransitionFns.values())t(e)}addOnTransitionHandler(e){let t=this._transitionHandlerCounter++;return this._onTransitionFns.set(t,e),()=>this._onTransitionFns.delete(t)}getCurrentAuthClaims(){let e=this.state.getAuth(),t={};if(e&&e.tokenType===`User`)try{t=e?gn(e.value):{}}catch{t={}}else return;return{token:e.value,decoded:t}}setAuth(e,t,n){this.authenticationManager.setConfig(e,t,n)}hasAuth(){return this.state.hasAuth()}setAdminAuth(e,t){let n=this.state.setAdminAuth(e,t);this.webSocketManager.sendMessage(n)}clearAuth(){let e=this.state.clearAuth();this.webSocketManager.sendMessage(e)}subscribe(e,t,n){let r=O(t),{modification:i,queryToken:a,unsubscribe:o}=this.state.subscribe(e,r,n?.journal,n?.componentPath);return i!==null&&this.webSocketManager.sendMessage(i),{queryToken:a,unsubscribe:()=>{let e=o();e&&this.webSocketManager.sendMessage(e)}}}localQueryResult(e,t){let n=ut(e,O(t));return this.optimisticQueryResults.queryResult(n)}localQueryResultByToken(e){return this.optimisticQueryResults.queryResult(e)}hasLocalQueryResultByToken(e){return this.optimisticQueryResults.hasQueryResult(e)}localQueryLogs(e,t){let n=ut(e,O(t));return this.optimisticQueryResults.queryLogs(n)}queryJournal(e,t){let n=ut(e,O(t));return this.state.queryJournal(n)}connectionState(){let e=this.webSocketManager.connectionState();return{hasInflightRequests:this.requestManager.hasInflightRequests(),isWebSocketConnected:e.isConnected,hasEverConnected:e.hasEverConnected,connectionCount:e.connectionCount,connectionRetries:e.connectionRetries,timeOfOldestInflightRequest:this.requestManager.timeOfOldestInflightRequest(),inflightMutations:this.requestManager.inflightMutations(),inflightActions:this.requestManager.inflightActions()}}subscribeToConnectionState(e){let t=this.nextConnectionStateSubscriberId++;return this.connectionStateSubscribers.set(t,e),()=>{this.connectionStateSubscribers.delete(t)}}async mutation(e,t,n){let r=await this.mutationInternal(e,t,n);if(!r.success)throw r.errorData===void 0?Error(st(`mutation`,e,r)):ct(r,new Ye(st(`mutation`,e,r)));return r.value}async mutationInternal(e,t,n,r){let{mutationPromise:i}=this.enqueueMutation(e,t,n,r);return i}enqueueMutation(e,t,n,r){let i=O(t);this.tryReportLongDisconnect();let a=this.nextRequestId;if(this._nextRequestId++,n!==void 0){let e=n.optimisticUpdate;if(e!==void 0){let t=this.optimisticQueryResults.applyOptimisticUpdate(t=>{e(t,i)instanceof Promise&&this.logger.warn(`Optimistic update handler returned a Promise. Optimistic updates should be synchronous.`)},a).map(e=>{let t=this.localQueryResultByToken(e);return{token:e,modification:{kind:`Updated`,result:t===void 0?void 0:{success:!0,value:t,logLines:[]}}}});this.handleTransition({queries:t,reflectedMutations:[],timestamp:this.remoteQuerySet.timestamp()})}}let o={type:`Mutation`,requestId:a,udfPath:e,componentPath:r,args:[Se(i)]},s=this.webSocketManager.sendMessage(o);return{requestId:a,mutationPromise:this.requestManager.request(o,s)}}async action(e,t){let n=await this.actionInternal(e,t);if(!n.success)throw n.errorData===void 0?Error(st(`action`,e,n)):ct(n,new Ye(st(`action`,e,n)));return n.value}async actionInternal(e,t,n){let r=O(t),i=this.nextRequestId;this._nextRequestId++,this.tryReportLongDisconnect();let a={type:`Action`,requestId:i,udfPath:e,componentPath:n,args:[Se(r)]},o=this.webSocketManager.sendMessage(a);return this.requestManager.request(a,o)}async close(){return this.authenticationManager.stop(),this.webSocketManager.terminate()}get url(){return this.address}get nextRequestId(){return this._nextRequestId}get sessionId(){return this._sessionId}reportMarks(){if(this.debug){let e=En(this.sessionId);this.webSocketManager.sendMessage({type:`Event`,eventType:`ClientConnect`,event:e})}}tryReportLongDisconnect(){if(!this.debug)return;let e=this.connectionState().timeOfOldestInflightRequest;if(e===null||Date.now()-e.getTime()<=6e4)return;let t=`${this.address}/api/debug_event`;fetch(t,{method:`POST`,headers:{"Content-Type":`application/json`,"Convex-Client":`npm-${Xe}`},body:JSON.stringify({event:`LongWebsocketDisconnect`})}).then(e=>{e.ok||this.logger.warn(`Analytics request failed with response:`,e.body)}).catch(e=>{this.logger.warn(`Analytics response failed with error:`,e)})}};function jn(e){if(typeof e!=`object`||!e||!Array.isArray(e.page)||typeof e.isDone!=`boolean`||typeof e.continueCursor!=`string`)throw Error(`Not a valid paginated query result: ${e?.toString()}`);return e}var Mn=Object.defineProperty,Nn=(e,t,n)=>t in e?Mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pn=(e,t,n)=>Nn(e,typeof t==`symbol`?t:t+``,n),Fn=class{constructor(e,t){this.client=e,this.onTransition=t,Pn(this,`paginatedQuerySet`,new Map),Pn(this,`lastTransitionTs`),this.lastTransitionTs=Lt.fromNumber(0),this.client.addOnTransitionHandler(e=>this.onBaseTransition(e))}subscribe(e,t,n){let r=lt(e),i=dt(r,t,n),a=()=>this.removePaginatedQuerySubscriber(i),o=this.paginatedQuerySet.get(i);return o?(o.numSubscribers+=1,{paginatedQueryToken:i,unsubscribe:a}):(this.paginatedQuerySet.set(i,{token:i,canonicalizedUdfPath:r,args:t,numSubscribers:1,options:{initialNumItems:n.initialNumItems},nextPageKey:0,pageKeys:[],pageKeyToQuery:new Map,ongoingSplits:new Map,skip:!1,id:n.id}),this.addPageToPaginatedQuery(i,null,n.initialNumItems),{paginatedQueryToken:i,unsubscribe:a})}localQueryResult(e,t,n){let r=dt(lt(e),t,n);return this.localQueryResultByToken(r)}localQueryResultByToken(e){let t=this.paginatedQuerySet.get(e);if(!t)return;let n=this.activePageQueryTokens(t);if(n.length===0)return{results:[],status:`LoadingFirstPage`,loadMore:t=>this.loadMoreOfPaginatedQuery(e,t)};let r=[],i=!1,a=!1;for(let e of n){let t=this.client.localQueryResultByToken(e);if(t===void 0){i=!0,a=!1;continue}let n=jn(t);r=r.concat(n.page),a=!!n.isDone}let o;return o=i?r.length===0?`LoadingFirstPage`:`LoadingMore`:a?`Exhausted`:`CanLoadMore`,{results:r,status:o,loadMore:t=>this.loadMoreOfPaginatedQuery(e,t)}}onBaseTransition(e){let t=e.queries.map(e=>e.token),n=this.queriesContainingTokens(t),r=[];n.length>0&&(this.processPaginatedQuerySplits(n,e=>this.client.localQueryResultByToken(e)),r=n.map(e=>({token:e,modification:{kind:`Updated`,result:this.localQueryResultByToken(e)}})));let i={...e,paginatedQueries:r};this.onTransition(i)}loadMoreOfPaginatedQuery(e,t){this.mustGetPaginatedQuery(e);let n=this.queryTokenForLastPageOfPaginatedQuery(e),r=this.client.localQueryResultByToken(n);if(!r)return!1;let i=jn(r);if(i.isDone)return!1;this.addPageToPaginatedQuery(e,i.continueCursor,t);let a={timestamp:this.lastTransitionTs,reflectedMutations:[],queries:[],paginatedQueries:[{token:e,modification:{kind:`Updated`,result:this.localQueryResultByToken(e)}}]};return this.onTransition(a),!0}queriesContainingTokens(e){if(e.length===0)return[];let t=[],n=new Set(e);for(let[e,r]of this.paginatedQuerySet)for(let i of this.allQueryTokens(r))if(n.has(i)){t.push(e);break}return t}processPaginatedQuerySplits(e,t){for(let n of e){let e=this.mustGetPaginatedQuery(n),{ongoingSplits:r,pageKeyToQuery:i,pageKeys:a}=e;for(let[n,[a,o]]of r)t(i.get(a).queryToken)!==void 0&&t(i.get(o).queryToken)!==void 0&&this.completePaginatedQuerySplit(e,n,a,o);for(let n of a){if(r.has(n))continue;let a=i.get(n);if(!a)throw Error(`No page query for active pageKey ${n}`);let o=t(a.queryToken);if(!o)continue;let s=jn(o);s.splitCursor&&(s.pageStatus===`SplitRecommended`||s.pageStatus===`SplitRequired`||s.page.length>e.options.initialNumItems*2)&&this.splitPaginatedQueryPage(e,n,a.cursor,s.splitCursor,s.continueCursor)}}}splitPaginatedQueryPage(e,t,n,r,i){let a=e.nextPageKey++,o=e.nextPageKey++,s={numItems:e.options.initialNumItems,id:e.id},c=this.client.subscribe(e.canonicalizedUdfPath,{...e.args,paginationOpts:{...s,cursor:n,endCursor:r}});e.pageKeyToQuery.set(a,{...c,cursor:n});let l=this.client.subscribe(e.canonicalizedUdfPath,{...e.args,paginationOpts:{...s,cursor:r,endCursor:i}});e.pageKeyToQuery.set(o,{...l,cursor:r}),e.ongoingSplits.set(t,[a,o])}addPageToPaginatedQuery(e,t,n){let r=this.mustGetPaginatedQuery(e),i=r.nextPageKey++,a={cursor:t,numItems:n,id:r.id},o={...r.args,paginationOpts:a},s=this.client.subscribe(r.canonicalizedUdfPath,o);return r.pageKeys.push(i),r.pageKeyToQuery.set(i,{...s,cursor:t}),s}removePaginatedQuerySubscriber(e){let t=this.paginatedQuerySet.get(e);if(t&&(--t.numSubscribers,!(t.numSubscribers>0))){for(let e of t.pageKeyToQuery.values())e.unsubscribe();this.paginatedQuerySet.delete(e)}}completePaginatedQuerySplit(e,t,n,r){let i=e.pageKeyToQuery.get(t);e.pageKeyToQuery.delete(t);let a=e.pageKeys.indexOf(t);e.pageKeys.splice(a,1,n,r),e.ongoingSplits.delete(t),i.unsubscribe()}activePageQueryTokens(e){return e.pageKeys.map(t=>e.pageKeyToQuery.get(t).queryToken)}allQueryTokens(e){return Array.from(e.pageKeyToQuery.values()).map(e=>e.queryToken)}queryTokenForLastPageOfPaginatedQuery(e){let t=this.mustGetPaginatedQuery(e),n=t.pageKeys[t.pageKeys.length-1];if(n===void 0)throw Error(`No pages for paginated query ${e}`);return t.pageKeyToQuery.get(n).queryToken}mustGetPaginatedQuery(e){let t=this.paginatedQuerySet.get(e);if(!t)throw Error(`paginated query no longer exists for token `+e);return t}},F=c(f(),1);function In({getCurrentValue:e,subscribe:t}){let[n,r]=(0,F.useState)(()=>({getCurrentValue:e,subscribe:t,value:e()})),i=n.value;return(n.getCurrentValue!==e||n.subscribe!==t)&&(i=e(),r({getCurrentValue:e,subscribe:t,value:i})),(0,F.useEffect)(()=>{let n=!1,i=()=>{n||r(n=>{if(n.getCurrentValue!==e||n.subscribe!==t)return n;let r=e();return n.value===r?n:{...n,value:r}})},a=t(i);return i(),()=>{n=!0,a()}},[e,t]),i}var Ln=Object.defineProperty,Rn=(e,t,n)=>t in e?Ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zn=(e,t,n)=>Rn(e,typeof t==`symbol`?t:t+``,n),Bn=5e3;if(F.default===void 0)throw Error(`Required dependency 'react' not found`);function Vn(e,t,n){function r(r){return Xn(r),t.mutation(e,r,{optimisticUpdate:n})}return r.withOptimisticUpdate=function(r){if(n!==void 0)throw Error(`Already specified optimistic update for mutation ${Tt(e)}`);return Vn(e,t,r)},r}function Hn(e,t){return function(n){return t.action(e,n)}}var Un=class{constructor(e,t){if(zn(this,`address`),zn(this,`cachedSync`),zn(this,`cachedPaginatedQueryClient`),zn(this,`listeners`),zn(this,`options`),zn(this,`closed`,!1),zn(this,`_logger`),zn(this,`adminAuth`),zn(this,`fakeUserIdentity`),e===void 0)throw Error(`No address provided to ConvexReactClient.
11
- If trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/
12
- If running locally, make sure to run \`convex dev\` and ensure the .env.local file is populated.`);if(typeof e!=`string`)throw Error(`ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud', received something of type ${typeof e} instead.`);if(!e.includes(`://`))throw Error(`Provided address was not an absolute URL.`);this.address=e,this.listeners=new Map,this._logger=t?.logger===!1?it({verbose:t?.verbose??!1}):t?.logger!==!0&&t?.logger?t.logger:rt({verbose:t?.verbose??!1}),this.options={...t,logger:this._logger}}get url(){return this.address}get sync(){if(this.closed)throw Error(`ConvexReactClient has already been closed.`);return this.cachedSync?this.cachedSync:(this.cachedSync=this.options.baseClient??new An(this.address,()=>{},this.options),this.adminAuth&&this.cachedSync.setAdminAuth(this.adminAuth,this.fakeUserIdentity),this.cachedPaginatedQueryClient=new Fn(this.cachedSync,e=>this.handleTransition(e)),this.cachedSync)}get paginatedQueryClient(){if(this.sync,this.cachedPaginatedQueryClient)return this.cachedPaginatedQueryClient;throw Error(`Should already be instantiated`)}setAuth(e,t,n){if(typeof e==`string`)throw Error(`Passing a string to ConvexReactClient.setAuth is no longer supported, please upgrade to passing in an async function to handle reauthentication.`);this.sync.setAuth(e,t??(()=>{}),n)}clearAuth(){this.sync.clearAuth()}setAdminAuth(e,t){if(this.adminAuth=e,this.fakeUserIdentity=t,this.closed)throw Error(`ConvexReactClient has already been closed.`);this.cachedSync&&this.sync.setAdminAuth(e,t)}watchQuery(e,...t){let[n,r]=t,i=Tt(e);return{onUpdate:e=>{let{queryToken:t,unsubscribe:a}=this.sync.subscribe(i,n,r),o=this.listeners.get(t);return o===void 0?this.listeners.set(t,new Set([e])):o.add(e),()=>{if(this.closed)return;let n=this.listeners.get(t);n.delete(e),n.size===0&&this.listeners.delete(t),a()}},localQueryResult:()=>{if(this.cachedSync)return this.cachedSync.localQueryResult(i,n)},localQueryLogs:()=>{if(this.cachedSync)return this.cachedSync.localQueryLogs(i,n)},journal:()=>{if(this.cachedSync)return this.cachedSync.queryJournal(i,n)}}}prewarmQuery(e){let t=e.extendSubscriptionFor??Bn,n=this.watchQuery(e.query,e.args||{}).onUpdate(()=>{});setTimeout(n,t)}watchPaginatedQuery(e,t,n){let r=Tt(e);return{onUpdate:e=>{let{paginatedQueryToken:i,unsubscribe:a}=this.paginatedQueryClient.subscribe(r,t||{},n),o=this.listeners.get(i);return o===void 0?this.listeners.set(i,new Set([e])):o.add(e),()=>{if(this.closed)return;let t=this.listeners.get(i);t.delete(e),t.size===0&&this.listeners.delete(i),a()}},localQueryResult:()=>this.paginatedQueryClient.localQueryResult(r,t,n)}}mutation(e,...t){let[n,r]=t,i=Tt(e);return this.sync.mutation(i,n,r)}action(e,...t){let n=Tt(e);return this.sync.action(n,...t)}query(e,...t){let n=this.watchQuery(e,...t),r=n.localQueryResult();return r===void 0?new Promise((e,t)=>{let r=n.onUpdate(()=>{r();try{e(n.localQueryResult())}catch(e){t(e)}})}):Promise.resolve(r)}connectionState(){return this.sync.connectionState()}subscribeToConnectionState(e){return this.sync.subscribeToConnectionState(e)}get logger(){return this._logger}async close(){if(this.closed=!0,this.listeners=new Map,this.cachedPaginatedQueryClient&&=void 0,this.cachedSync){let e=this.cachedSync;this.cachedSync=void 0,await e.close()}}handleTransition(e){let t=e.queries.map(e=>e.token),n=e.paginatedQueries.map(e=>e.token);this.transition([...t,...n])}transition(e){for(let t of e){let e=this.listeners.get(t);if(e)for(let t of e)t()}}},Wn=F.createContext(void 0);function Gn(){return(0,F.useContext)(Wn)}var Kn=({client:e,children:t})=>F.createElement(Wn.Provider,{value:e},t);function qn(e){let t=e.throwOnError??!1,n=typeof e.query==`string`?Et(e.query):e.query,r=e.args===`skip`,i=r?{}:O(e.args),a=Tt(n),o=tr((0,F.useMemo)(()=>r?{}:{query:{query:n,args:i}},[JSON.stringify(Se(i)),a,r])).query;if(o instanceof Error){if(t)throw o;return{error:o,status:`error`}}return o===void 0?{status:`pending`}:{data:o,status:`success`}}function Jn(e){let t=typeof e==`string`?Et(e):e,n=(0,F.useContext)(Wn);if(n===void 0)throw Error("Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return(0,F.useMemo)(()=>Vn(t,n),[n,Tt(t)])}function Yn(e){let t=(0,F.useContext)(Wn),n=typeof e==`string`?Et(e):e;if(t===void 0)throw Error("Could not find Convex client! `useAction` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return(0,F.useMemo)(()=>Hn(n,t),[t,Tt(n)])}function Xn(e){if(typeof e==`object`&&e&&`bubbles`in e&&`persist`in e&&`isDefaultPrevented`in e)throw Error("Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler.")}var Zn=Object.defineProperty,Qn=(e,t,n)=>t in e?Zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t,n)=>Qn(e,typeof t==`symbol`?t:t+``,n),er=class{constructor(e){$n(this,`createWatch`),$n(this,`queries`),$n(this,`listeners`),this.createWatch=e,this.queries={},this.listeners=new Set}setQueries(e){for(let t of Object.keys(e)){let{query:n,args:r,paginationOptions:i}=e[t];if(Tt(n),this.queries[t]===void 0)this.addQuery(t,n,r,i?{paginationOptions:i}:{});else{let e=this.queries[t];(Tt(n)!==Tt(e.query)||JSON.stringify(Se(r))!==JSON.stringify(Se(e.args))||JSON.stringify(i)!==JSON.stringify(e.paginationOptions))&&(this.removeQuery(t),this.addQuery(t,n,r,i?{paginationOptions:i}:{}))}}for(let t of Object.keys(this.queries))e[t]===void 0&&this.removeQuery(t)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}getLocalResults(e){let t={};for(let n of Object.keys(e)){let{query:r,args:i}=e[n],a=e[n].paginationOptions;Tt(r);let o=this.createWatch(r,i,a?{paginationOptions:a}:{}),s;try{s=o.localQueryResult()}catch(e){if(e instanceof Error)s=e;else throw e}t[n]=s}return t}setCreateWatch(e){this.createWatch=e;for(let e of Object.keys(this.queries)){let{query:t,args:n,watch:r,paginationOptions:i}=this.queries[e],a=`journal`in r?r.journal():void 0;this.removeQuery(e),this.addQuery(e,t,n,{...a?{journal:a}:[],...i?{paginationOptions:i}:{}})}}destroy(){for(let e of Object.keys(this.queries))this.removeQuery(e);this.listeners=new Set}addQuery(e,t,n,{paginationOptions:r,journal:i}){if(this.queries[e]!==void 0)throw Error(`Tried to add a new query with identifier ${e} when it already exists.`);let a=this.createWatch(t,n,{...i?{journal:i}:[],...r?{paginationOptions:r}:{}}),o=a.onUpdate(()=>this.notifyListeners());this.queries[e]={query:t,args:n,watch:a,unsubscribe:o,...r?{paginationOptions:r}:{}}}removeQuery(e){let t=this.queries[e];if(t===void 0)throw Error(`No query found with identifier ${e}.`);t.unsubscribe(),delete this.queries[e]}notifyListeners(){for(let e of this.listeners)e()}};function tr(e){let t=Gn();if(t===void 0)throw Error("Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return nr(e,(0,F.useMemo)(()=>(e,n,{journal:r,paginationOptions:i})=>i?t.watchPaginatedQuery(e,n,i):t.watchQuery(e,n,r?{journal:r}:{}),[t]))}function nr(e,t){let[n]=(0,F.useState)(()=>new er(t));return n.createWatch!==t&&n.setCreateWatch(t),(0,F.useEffect)(()=>()=>n.destroy(),[n]),In((0,F.useMemo)(()=>({getCurrentValue:()=>n.getLocalResults(e),subscribe:t=>(n.setQueries(e),n.subscribe(t))}),[n,e]))}function rr(e,t,n){let r=typeof e==`object`&&!!e&&`query`in e,i=r?e.query:e,a=r?e.args:t,o=r?e.throwOnError??!1:!0,s=r?{initialNumItems:e.initialNumItems}:n;if(typeof s?.initialNumItems!=`number`||s.initialNumItems<0)throw Error(`\`options.initialNumItems\` must be a positive number. Received \`${s?.initialNumItems}\`.`);let c=a===`skip`,l=c?{}:a,u=Gn().logger,d=()=>{let e=or();return{query:i,args:l,id:e,queries:c?{}:{paginatedQuery:{query:i,args:{...l},paginationOptions:{initialNumItems:s.initialNumItems,id:e}}},skip:c}},[f,p]=(0,F.useState)(d),m=f;(Tt(i)!==Tt(f.query)||JSON.stringify(Se(l))!==JSON.stringify(Se(f.args))||c!==f.skip)&&(m=d(),p(m));let h=tr(m.queries);if(!(`paginatedQuery`in h)){if(!c)throw Error(`Why is it missing?`);let e={results:[],status:`LoadingFirstPage`,isLoading:!0,loadMore:function(e){return!1}};return r?ir(e):e}let g=h.paginatedQuery;if(g===void 0){let e={results:[],loadMore:()=>!1,isLoading:!0,status:`LoadingFirstPage`};return r?ir(e):e}if(g instanceof Error){if(g.message.includes(`InvalidCursor`)||g instanceof Ye&&typeof g.data==`object`&&g.data?.isConvexSystemError===!0&&g.data?.paginationError===`InvalidCursor`){u.warn(`usePaginatedQuery hit error, resetting pagination state: `+g.message),p(d);let e={results:[],loadMore:()=>!1,isLoading:!0,status:`LoadingFirstPage`};return r?ir(e):e}{if(o)throw g;let e={results:[],loadMore:()=>!1,isLoading:!1,status:`Error`,error:g};return r?ir(e):e}}let _={...g,loadMore:e=>g.loadMore(e),isLoading:g.status===`LoadingFirstPage`||g.status===`LoadingMore`};return r?ir(_):_}function ir(e){let{results:t,loadMore:n}=e;return e.status===`Error`&&`error`in e?{data:t,status:`error`,canLoadMore:!1,isLoading:!1,error:e.error,loadMore:n}:e.status===`LoadingFirstPage`||e.status===`LoadingMore`?{data:e.status===`LoadingFirstPage`?void 0:t,status:`pending`,canLoadMore:!1,isLoading:!0,error:void 0,loadMore:n}:{data:t,status:`success`,canLoadMore:e.status===`CanLoadMore`,isLoading:!1,error:void 0,loadMore:n}}var ar=0;function or(){return ar++,ar}var sr=(0,F.createContext)(void 0);function cr(){let e=(0,F.useContext)(sr);if(e===void 0)throw Error("Could not find `ConvexProviderWithAuth` (or `ConvexProviderWithClerk` or `ConvexProviderWithAuth0`) as an ancestor component. This component may be missing, or you might have two instances of the `convex/react` module loaded in your project.");return e}function lr({children:e,client:t,useAuth:n}){let{isLoading:r,isAuthenticated:i,fetchAccessToken:a}=n(),[o,s]=(0,F.useState)(null),[c,l]=(0,F.useState)(!1);r&&o!==null&&(s(null),l(!1)),!r&&!i&&o!==!1&&(s(!1),l(!1));let u=i&&(o??!1),d=o===null,f=c&&u,p=(0,F.useMemo)(()=>({isLoading:d,isAuthenticated:u,isRefreshing:f}),[d,u,f]);return F.createElement(sr.Provider,{value:p},F.createElement(ur,{authProviderAuthenticated:i,fetchAccessToken:a,authProviderLoading:r,client:t,setIsConvexAuthenticated:s,setIsRefreshing:l}),F.createElement(Kn,{client:t},e),F.createElement(dr,{authProviderAuthenticated:i,fetchAccessToken:a,authProviderLoading:r,client:t,setIsConvexAuthenticated:s,setIsRefreshing:l}))}function ur({authProviderAuthenticated:e,fetchAccessToken:t,authProviderLoading:n,client:r,setIsConvexAuthenticated:i,setIsRefreshing:a}){return(0,F.useEffect)(()=>{let n=!0;if(e)return r.setAuth(t,e=>{n&&i(()=>e)},e=>{n&&a(e)}),()=>{n=!1,i(e=>!e&&null),a(!1)}},[e,t,n,r,i,a]),null}function dr({authProviderAuthenticated:e,fetchAccessToken:t,authProviderLoading:n,client:r,setIsConvexAuthenticated:i,setIsRefreshing:a}){return(0,F.useEffect)(()=>{if(e)return()=>{r.clearAuth(),i(()=>null),a(!1)}},[e,t,n,r,i,a]),null}var fr=g();function pr(e,t){return t||[`127.0.0.1`,`localhost`,`[::1]`].includes(e)}function mr(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function hr(e,t=`|`){return e.map(e=>Vr(e)).join(t)}function gr(e,t){return typeof t==`bigint`?t.toString():t}var _r=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function vr(e){return new _r(e)}function yr(e){return e==null}function br(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function xr(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function Sr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Cr(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function wr(e){return Cr(e._zod.def)??e._zod.def.shape}function Tr(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Sr(this,t,e),e},enumerable:!0,configurable:!0})}function Er(e,t,n){t in e?Sr(e,t,n):e[t]=n}function Dr(e,t,n,r){let i=wr(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Tr(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Er(e,a,r?r(n.value,a):n.value))}}function Or(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Tr(e,n,()=>t[n]):Er(e,n,r.value))}}function kr(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ar(e){return JSON.stringify(e)}function jr(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Mr=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Nr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Pr=vr(()=>{if(Ai.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Fr(e){if(Nr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Nr(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Ir(e){return Fr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Lr=new Set([`string`,`number`,`symbol`]);function Rr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function zr(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Br(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Vr(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Hr(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ur={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Wr={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Gr(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Dr(i,e,Kr(e,t)),zr(e,kr(n,{shape:i,checks:[]}))}function Kr(e,t){let n=wr(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function qr(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Kr(e,t)),a={};return Dr(a,e,Reflect.ownKeys(wr(e)).filter(e=>!i.has(e))),zr(e,kr(n,{shape:a,checks:[]}))}function Jr(e,t){if(!Fr(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=wr(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return zr(e,kr(e._zod.def,{shape:Yr(e,t)}))}function Yr(e,t){let n={};return Dr(n,e,Reflect.ownKeys(wr(e))),Or(n,t),n}function Xr(e,t){if(!Fr(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return zr(e,kr(e._zod.def,{shape:Yr(e,t)}))}function Zr(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Dr(n,e,Reflect.ownKeys(wr(e))),Dr(n,t,Reflect.ownKeys(wr(t))),zr(e,kr(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Qr(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Kr(t,n)):void 0,o={};return Dr(o,t,Reflect.ownKeys(wr(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),zr(t,kr(t._zod.def,{shape:o,checks:[]}))}function $r(e,t,n){let r=n?new Set(Kr(t,n)):void 0,i={};return Dr(i,t,Reflect.ownKeys(wr(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),zr(t,kr(t._zod.def,{shape:i}))}function ei(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ti(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ni(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ri(e){return typeof e==`string`?e:e?.message}function ii(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ai(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:ri(e.inst?._zod.def?.error?.(e))??ri(a?.(e))??ri(t?.error?.(e))??ri(n.customError?.(e))??ri(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var oi=/[\uD800-\uDBFF]/;function si(e){let t=e.length;if(!oi.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function ci(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function li(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function ui(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function di(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):hi(e,n,r.value)}}function fi(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function pi(e,t,n){return fi(e,t,n,!1)}function mi(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return fi(this,n,r(this))},set(e){fi(this,n,e)}})}return t}function hi(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:fi(this,t,n.bind(this))},set(e){fi(this,t,e)}})}function gi(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var _i,vi=!1,yi={configurable:!0,get(){vi=!0}};function bi(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&_i!==e._zod){_i=void 0;return}_i=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,yi);let e=vi;vi=!1;try{let r=n(this);return vi?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),vi||=e,r}catch(n){throw delete this[t],vi||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function xi(e,t,n,r){let i=gi(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Si=`~constantCatch`;function Ci(e){let t=()=>e;return t[Si]=!0,t}var wi,Ti={value:void 0,enumerable:!1},Ei=`captureStackTrace`in Error?Error:null;function Di(e){let t=Ei;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ei=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function I(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ti.value=new a(r);try{Object.defineProperty(n,"_zod",Ti)}finally{Ti.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),di(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Di(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Oi=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ki=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(wi=globalThis).__zod_globalConfig??(wi.__zod_globalConfig={});var Ai=globalThis.__zod_globalConfig;function ji(e){return e&&Object.assign(Ai,e),Ai}function Mi(){let e=this._zod;return e.message??=JSON.stringify(e.def,gr,2),e.message}function Ni(e){this._zod.message=e}var Pi={get:Mi,set:Ni,enumerable:!0,configurable:!0},Fi={value:void 0,enumerable:!1},Ii=new WeakSet([Object.prototype,Error.prototype]),Li=(e,t)=>{e.name=`$ZodError`,Fi.value=t,Object.defineProperty(e,"issues",Fi),Fi.value=void 0,Object.defineProperty(e,"message",Pi);let n=Object.getPrototypeOf(e);Ii.has(n)||(Ii.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Ri=I(`$ZodError`,Li);I(`$ZodError`,Li,void 0,{Parent:Error});function zi(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Bi(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?zi(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Vi(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Hi(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ui=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Oi;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ai(e,o,ji())));throw Mr(n,a?.callee??t),n}return s.value};return t},Wi=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ai(e,o,ji())));throw Mr(n,a?.callee??t),n}return s.value};return t},Gi=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Oi;return a.issues.length?Ki(e,a.issues,i):{success:!0,data:a.value}};function Ki(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>ai(e,n,ji()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var qi=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Ki(e,a.issues,i):{success:!0,data:a.value}},Ji=Symbol.for(`zod.compile.invalid`),Yi=Symbol.for(`zod.compile.fallback`),Xi=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Ji)return!0;if(r.definite===!0&&n===void 0)return!1}return Zi(e,t,n)});function Zi(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Yi]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Oi;return a.issues.length===0}var Qi=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},$i=e=>{let t=Ui(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Hi(n,a))};return n},ea=e=>{let t=Ui(e),n=(e,r,i,a)=>t(e,r,i,Hi(n,a));return n},ta=e=>{let t=Wi(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Hi(n,a))};return n},na=e=>{let t=Wi(e),n=async(e,r,i,a)=>await t(e,r,i,Hi(n,a));return n},ra=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Gi(e)(t,n,i)},ia=e=>(t,n,r)=>Gi(e)(t,n,r),aa=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return qi(e)(t,n,i)},oa=e=>async(t,n,r)=>qi(e)(t,n,r),sa=/^[cC][0-9a-z]{6,}$/,ca=/^[0-9a-z]+$/,la=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,ua=/^[0-9a-vA-V]{20}$/,da=/^[A-Za-z0-9]{27}$/,fa=/^[a-zA-Z0-9_-]{21}$/;function pa(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var ma=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ha=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ga=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_a=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,va=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function ya(){return new RegExp(va,`u`)}var ba=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xa=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Sa=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ca=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wa=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ta=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Ea=/^https?$/,Da=/^\+[1-9]\d{6,14}$/,Oa=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function ka(e){return RegExp(`^${e}$`)}var Aa=ka(Oa);function ja(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ma(e){return RegExp(`^${ja(e)}$`)}function Na(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${ja({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${ja({precision:e.precision})}`:n;return RegExp(`^${Oa}T(?:${r})$`)}var Pa=/^[\s\S]{0,}$/,Fa=/^-?\d+$/,Ia=/^-?\d+(?:\.\d+)?$/,La=/^(?:true|false)$/i,Ra=/^null$/i,za=/^[^A-Z]*$/,Ba=/^[^a-z]*$/,Va=I(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ha=e=>{let t=e.value;return!yr(t)&&t.length!==void 0},Ua={number:`number`,bigint:`bigint`,object:`date`},Wa=I(`$ZodCheckLessThan`,(e,t)=>{Va.init(e,t);let n=Ua[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Ua[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ga=I(`$ZodCheckGreaterThan`,(e,t)=>{Va.init(e,t);let n=Ua[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Ua[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ka=I(`$ZodCheckMultipleOf`,(e,t)=>{Va.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):xr(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),qa=I(`$ZodCheckNumberFormat`,(e,t)=>{Va.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ur[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Ja=I(`$ZodCheckMaxLength`,(e,t)=>{var n;Va.init(e,t),(n=e._zod.def).when??(n.when=Ha),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?si(r):i)<=t.maximum)return;let a=ci(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ya=I(`$ZodCheckMinLength`,(e,t)=>{var n;Va.init(e,t),(n=e._zod.def).when??(n.when=Ha),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?si(r):i)>=t.minimum)return;let a=ci(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xa=I(`$ZodCheckLengthEquals`,(e,t)=>{var n;Va.init(e,t),(n=e._zod.def).when??(n.when=Ha),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?si(r):i;if(a===t.length)return;let o=ci(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Za=I(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Va.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Qa=I(`$ZodCheckRegex`,(e,t)=>{Za.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),$a=I(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=za,Za.init(e,t)}),eo=I(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Ba,Za.init(e,t)}),to=I(`$ZodCheckIncludes`,(e,t)=>{Va.init(e,t);let n=Rr(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),no=I(`$ZodCheckStartsWith`,(e,t)=>{Va.init(e,t);let n=RegExp(`^${Rr(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ro=I(`$ZodCheckEndsWith`,(e,t)=>{Va.init(e,t);let n=RegExp(`.*${Rr(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function io(e,t,n){e.issues.length&&t.issues.push(...ni(n,e.issues))}var ao=I(`$ZodCheckProperties`,(e,t)=>{Va.init(e,t),pi(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:`object`,code:`invalid_type`,input:r.value,inst:e});return}n??=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]);let i=r.value,a;for(let[e,t]of n){let n=t._zod.run({value:i[e],issues:[]},{});n instanceof Promise?(a??=[],a.push(n.then(t=>io(t,r,e)))):io(n,r,e)}if(a)return Promise.all(a).then(()=>void 0)}}),oo=I(`$ZodCheckOverwrite`,(e,t)=>{Va.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),so=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
13
- `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
14
- `)}\n};`)(...Object.values(this.closed))}},co={major:4,minor:6,patch:5},lo=I(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=co;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=ei(t),a;for(let o of n){if(o._zod.def.when){if(ti(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Oi;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(ii(t.issues,n,e),i||=ei(t,n))});else{if(t.issues.length===n)continue;ii(t.issues,n,e),i||=ei(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(ei(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Oi;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Oi;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return pi(this,`~standard`,po(this))},set"~standard"(e){fi(this,`~standard`,e)}}),uo=(e,t)=>e.issues.length?{issues:e.issues.map(e=>ai(e,t,ji()))}:{value:e.value};async function fo(e,t){let n={async:!0};return uo(await e._zod.run({value:t,issues:[]},n),n)}function po(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return uo(r,n)}catch{}return fo(e,t)},vendor:`zod`,version:1}}var mo=I(`$ZodString`,(e,t)=>{lo.init(e,t),e._zod.pattern=t.pattern??Pa,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),ho=I(`$ZodStringFormat`,(e,t)=>{Za.init(e,t),mo.init(e,t)}),go=I(`$ZodGUID`,(e,t)=>{t.pattern??=ha,ho.init(e,t)}),_o=I(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ga(e)}else t.pattern??=ga();ho.init(e,t)}),vo=I(`$ZodEmail`,(e,t)=>{t.pattern??=_a,ho.init(e,t)});function yo(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function bo(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?yo(e)||2:xo(e,t)}function xo(e,t){if(!t.normalize&&t.protocol?.source===Ea.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var So=/[\t\n\r]/g;function Co(e){return e.replace(So,``)}function wo(e,t){return t.lastIndex=0,t.test(e.hostname)}function To(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Eo=I(`$ZodURL`,(e,t)=>{ho.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=bo(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Co(r);return}t.hostname&&!wo(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!To(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Co(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Do=I(`$ZodEmoji`,(e,t)=>{t.pattern??=ya(),ho.init(e,t)}),Oo=I(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?fa:pa(t.length),ho.init(e,t)}),ko=I(`$ZodCUID`,(e,t)=>{t.pattern??=sa,ho.init(e,t)}),Ao=I(`$ZodCUID2`,(e,t)=>{t.pattern??=ca,ho.init(e,t)}),jo=I(`$ZodULID`,(e,t)=>{t.pattern??=la,ho.init(e,t)}),Mo=I(`$ZodXID`,(e,t)=>{t.pattern??=ua,ho.init(e,t)}),No=I(`$ZodKSUID`,(e,t)=>{t.pattern??=da,ho.init(e,t)}),Po=I(`$ZodISODateTime`,(e,t)=>{t.pattern??=Na(t),ho.init(e,t)}),Fo=I(`$ZodISODate`,(e,t)=>{t.pattern??=Aa,ho.init(e,t)}),Io=I(`$ZodISOTime`,(e,t)=>{t.pattern??=Ma(t),ho.init(e,t)}),Lo=I(`$ZodISODuration`,(e,t)=>{t.pattern??=ma,ho.init(e,t)}),Ro=I(`$ZodIPv4`,(e,t)=>{t.pattern??=ba,ho.init(e,t)}),zo=/^[0-9a-fA-F:.]+$/;function Bo(e){return zo.test(e)?yo(`http://[${e}]`):!1}var Vo=I(`$ZodIPv6`,(e,t)=>{t.pattern??=xa,ho.init(e,t),e._zod.check=n=>{Bo(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Ho=I(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Sa,ho.init(e,t)});function Uo(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Bo(n)}var Wo=I(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ca,ho.init(e,t),e._zod.check=n=>{Uo(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Go(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Ko=/^[0-9a-zA-Z+/]*={0,2}$/,qo=I(`$ZodBase64`,(e,t)=>{t.pattern??=Ko,ho.init(e,t),e._zod.check=n=>{Go(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Jo=/^[A-Za-z0-9_-]*$/;function Yo(e){if(!Jo.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Go(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Xo=I(`$ZodBase64URL`,(e,t)=>{t.pattern??=Jo,ho.init(e,t),e._zod.check=n=>{Yo(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Zo=I(`$ZodE164`,(e,t)=>{t.pattern??=Da,ho.init(e,t)});function Qo(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var $o=I(`$ZodJWT`,(e,t)=>{ho.init(e,t),e._zod.check=n=>{Qo(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),es=I(`$ZodNumber`,(e,t)=>{lo.init(e,t),e._zod.pattern=Ia,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ts=I(`$ZodNumberFormat`,(e,t)=>{qa.init(e,t),es.init(e,t)}),ns=I(`$ZodBoolean`,(e,t)=>{lo.init(e,t),e._zod.pattern=La,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),rs=I(`$ZodNull`,(e,t)=>{lo.init(e,t),e._zod.pattern=Ra,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),is=I(`$ZodUnknown`,(e,t)=>{lo.init(e,t),e._zod.parse=e=>e}),as=I(`$ZodNever`,(e,t)=>{lo.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function os(e,t,n){e.issues.length&&t.issues.push(...ni(n,e.issues)),t.value[n]=e.value}var ss=I(`$ZodArray`,(e,t)=>{lo.init(e,t);let n=Ai.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>os(t,r,e)));else if(os(c,r,e),s&&c.issues.length!==0&&ei(c))break}return o.length?Promise.all(o).then(()=>r):r}});function cs(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...ni(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ls=[];function us(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ls,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Hr(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ds(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(ei(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>cs(e,n,i,t,d,f))):cs(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var fs=I(`$ZodObject`,(e,t)=>{lo.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=vr(()=>us(t));bi(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Sr(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Nr,o=t.catchall,s,c=Ai.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(ei(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>cs(n,t,e,r,a,o))):cs(s,t,e,r,a,o)}return o?ds(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ps=I(`$ZodObjectJIT`,(e,t)=>{fs.init(e,t);let n=e._zod.parse,r=vr(()=>us(t)),i=Ai.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new so([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
15
- let ${e}_ab = false;
16
- for (let i = 0; i < ${e}.issues.length; i++) {
17
- const iss = ${e}.issues[i];
18
- iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
19
- payload.issues.push(iss);
20
- if (iss.continue !== true) ${e}_ab = true;
21
- }
22
- if (${e}_ab && ctx && ctx.abortEarly) {
23
- payload.value = newResult;
24
- return payload;
25
- }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Ar(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
26
- const ${n}_present = ${i};
27
- if (!${n}.issues.length || ${n}_present) {
28
- if (${n}.issues.length) {${c(n,r)}
29
- }
30
-
31
- if (${e}) {
32
- newResult[${r}] = ${n}.value;
33
- }
34
- }
35
-
36
- `)}else f?(o.write(`
37
- if (${n}.issues.length) {${c(n,r)}
38
- }
39
- `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
40
- if (${n}.value !== undefined || ${i}) {
41
- newResult[${r}] = ${n}.value;
42
- }
43
- `)):o.write(`
44
- const ${n}_present = ${i};
45
- if (${n}.issues.length) {${c(n,r)}
46
- }
47
- if (!${n}_present && !${n}.issues.length) {
48
- payload.issues.push({
49
- code: "invalid_type",
50
- expected: "nonoptional",
51
- input: undefined,
52
- path: [${r}]
53
- });
54
- if (ctx && ctx.abortEarly) {
55
- payload.value = newResult;
56
- return payload;
57
- }
58
- }
59
-
60
- if (${n}_present) {
61
- newResult[${r}] = ${n}.value;
62
- }
63
-
64
- `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Nr,c=!Ai.jitless,l=c&&Pr.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ds([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function ms(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ei(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ai(e,r,ji())))}),t)}var hs=I(`$ZodUnion`,(e,t)=>{lo.init(e,t),bi(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),bi(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),bi(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),bi(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>br(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>ms(t,r,e,i)):ms(o,r,e,i)}});function gs(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var _s=I(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,hs.init(e,t);let n=e._zod.parse;bi(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||Sr(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=Cr(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=vr(()=>gs(t));e._zod.parse=(i,a)=>{let o=i.value;if(!Nr(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),vs=I(`$ZodIntersection`,(e,t)=>{lo.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>bs(e,t,n)):bs(e,i,a)}});function ys(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fr(e)&&Fr(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=ys(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ys(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bs(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=ys(t.value,n.value);if(!c.valid){if(ei(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var xs=I(`$ZodRecord`,(e,t)=>{lo.init(e,t);let n=Ai.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Fr(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>ai(e,i,ji())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...ni(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...ni(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Ia.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>ai(e,i,ji())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...ni(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...ni(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Ss=I(`$ZodEnum`,(e,t)=>{lo.init(e,t);let n=mr(t.entries),r=new Set(n);e._zod.values=r,bi(e,`pattern`,e=>{let t=mr(e.def.entries).filter(e=>Lr.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Rr(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Cs=I(`$ZodLiteral`,(e,t)=>{lo.init(e,t);let n=new Set(t.values);e._zod.values=n,bi(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Rr(e):e?Rr(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),ws=I(`$ZodTransform`,(e,t)=>{lo.init(e,t),e._zod.optin=`optional`,Ai.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ki(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Oi;return n.value=i,n}});function Ts(e,t){return e.value=t.issues.length?void 0:t.value,e}var Es=I(`$ZodOptional`,(e,t)=>{lo.init(e,t),bi(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,bi(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),bi(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${br(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ts(e,t)):Ts(e,r)}return t.innerType._zod.run(e,n)}}),Ds=I(`$ZodExactOptional`,(e,t)=>{Es.init(e,t),bi(e,`values`,e=>e.def.innerType._zod.values),bi(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Os=I(`$ZodNullable`,(e,t)=>{lo.init(e,t),bi(e,`optin`,e=>e.def.innerType._zod.optin),bi(e,`optout`,e=>e.def.innerType._zod.optout),bi(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${br(t.source)}|null)$`):void 0}),bi(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ks=I(`$ZodDefault`,(e,t)=>{lo.init(e,t),e._zod.optin=`defaulted`,bi(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>As(e,t)):As(r,t)}});function As(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var js=I(`$ZodPrefault`,(e,t)=>{lo.init(e,t),e._zod.optin=`defaulted`,bi(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ms=I(`$ZodNonOptional`,(e,t)=>{lo.init(e,t),bi(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ns(t,e)):Ns(i,e)}});function Ns(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ps(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>ai(e,r,ji()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Fs=I(`$ZodCatch`,(e,t)=>{lo.init(e,t),bi(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),bi(e,`optout`,e=>e.def.innerType._zod.optout),bi(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ps(e,r,t,n)):Ps(e,r,t,n)}}),Is=I(`$ZodPipe`,(e,t)=>{lo.init(e,t),bi(e,`values`,e=>e.def.in._zod.values),bi(e,`optin`,e=>e.def.in._zod.optin),bi(e,`optout`,e=>e.def.out._zod.optout),bi(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ls(e,t.in,n)):Ls(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ls(e,t.out,n)):Ls(r,t.out,n)}});function Ls(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Rs=I(`$ZodReadonly`,(e,t)=>{lo.init(e,t),bi(e,`propValues`,e=>e.def.innerType._zod.propValues),bi(e,`values`,e=>e.def.innerType._zod.values),bi(e,`optin`,e=>e.def.innerType?._zod?.optin),bi(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(zs):zs(r)}});function zs(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Bs=I(`$ZodCustom`,(e,t)=>{Va.init(e,t),lo.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Vs(t,n,r,e));Vs(i,n,r,e)}});function Vs(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ui(e))}}var Hs=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Us=`~memo`,Ws=[];function Gs(e){return typeof e==`object`&&!!e}function Ks(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var qs=new WeakMap,Js=0,Ys=1,Xs=2;function Zs(e,t,n){let r=qs.get(e);if(r!==void 0)return r?Xs:Js;if(t.has(e))return Xs;t.add(e);let i=Js,a=e=>{if(i!==Xs&&e?._zod){let r=Zs(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Js;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Ys:o.value?._zod?Zs(o.value,t,n):Js;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Cr(c);s(e?o(e,!0):Ys),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Zs(r,t,!1):Ys);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Qs(e,i)}function Qs(e,t){return t!==Ys&&qs.set(e,t===Xs),t}function $s(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var ec,tc=[],nc={alloc(e,t,n){let r=ec;if(!r)return n;ec=void 0;let i={value:n,issues:null};return r.set(t.value,i),tc.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&ic(n,e.value))throw new Hs;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Zs(e,new Set,!1);if(i===Js)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Xs||r?n=!0:r=!0}let l=s.value;if(!Gs(l))return t(s,c);let u=c[Us];u||(u={buckets:new WeakMap,backEdges:void 0},c[Us]=u);let d;i===c?d=a:(d=$s(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Ks(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;ec=d;let p=tc.length,m=t(s,c);ec=void 0;let h=tc.length>p?tc.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Ks(e.issues):Ws),e)):(h&&(h.issues=m.issues.length?Ks(m.issues):Ws),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function rc(){return nc}function ic(e,t){let n=e[Us]?.backEdges;return n!==void 0&&Gs(t)&&n.has(t)}var ac=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(li(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Vr(e.values[0])}`:`Invalid option: expected one of ${hr(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${hr(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function oc(){return{localeError:ac()}}var sc,cc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function lc(){return new cc}(sc=globalThis).__zod_globalRegistry??(sc.__zod_globalRegistry=lc());var uc=globalThis.__zod_globalRegistry;function dc(e){return e.checks&&=[...e.checks],e}function fc(e,t){return new e(dc({type:`string`,...Br(t)}))}function pc(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Br(t)})}function mc(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Br(t)})}function hc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Br(t)})}function gc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Br(t)})}function _c(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Br(t)})}function vc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Br(t)})}function yc(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Br(t)})}function bc(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Br(t)})}function xc(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Br(t)})}function Sc(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Br(t)})}function Cc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Br(t)})}function wc(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Br(t)})}function Tc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Br(t)})}function Ec(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Br(t)})}function Dc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Br(t)})}function Oc(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Br(t)})}function kc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Br(t)})}function Ac(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Br(t)})}function jc(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Br(t)})}function Mc(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Br(t)})}function Nc(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Br(t)})}function Pc(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Br(t)})}function Fc(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Br(t)})}function Ic(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Br(t)})}function Lc(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Br(t)})}function Rc(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Br(t)})}function zc(e,t){return new e(dc({type:`number`,checks:[],...Br(t)}))}function Bc(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Br(t)})}function Vc(e,t){return new e({type:`boolean`,...Br(t)})}function Hc(e,t){return new e({type:`null`,...Br(t)})}function Uc(e){return new e({type:`unknown`})}function Wc(e,t){return new e({type:`never`,...Br(t)})}function Gc(e,t){return new Wa({check:`less_than`,...Br(t),value:e,inclusive:!1})}function Kc(e,t){return new Wa({check:`less_than`,...Br(t),value:e,inclusive:!0})}function qc(e,t){return new Ga({check:`greater_than`,...Br(t),value:e,inclusive:!1})}function Jc(e,t){return new Ga({check:`greater_than`,...Br(t),value:e,inclusive:!0})}function Yc(e,t){return new Ka({check:`multiple_of`,...Br(t),value:e})}function Xc(e,t){return new Ja({check:`max_length`,...Br(t),maximum:e})}function Zc(e,t){return new Ya({check:`min_length`,...Br(t),minimum:e})}function Qc(e,t){return new Xa({check:`length_equals`,...Br(t),length:e})}function $c(e,t){return new Qa({check:`string_format`,format:`regex`,...Br(t),pattern:e})}function el(e){return new $a({check:`string_format`,format:`lowercase`,...Br(e)})}function tl(e){return new eo({check:`string_format`,format:`uppercase`,...Br(e)})}function nl(e,t){return new to({check:`string_format`,format:`includes`,...Br(t),includes:e})}function rl(e,t){return new no({check:`string_format`,format:`starts_with`,...Br(t),prefix:e})}function il(e,t){return new ro({check:`string_format`,format:`ends_with`,...Br(t),suffix:e})}function al(e,t){return new ao({check:`properties`,shape:e,...Br(t)})}function ol(e){return new oo({check:`overwrite`,tx:e})}function sl(e){return ol(t=>t.normalize(e))}function cl(){return ol(e=>e.trim())}function ll(){return ol(e=>e.toLowerCase())}function ul(){return ol(e=>e.toUpperCase())}function dl(){return ol(e=>jr(e))}function fl(e,t,n){return new e({type:`array`,element:t,...Br(n)})}function pl(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Br(n)})}function ml(e,t){let n=hl(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ui(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(ui(r))}},e(t.value,t)),t);return n}function hl(e,t){let n=new Va({check:`custom`,...Br(t)});return n._zod.check=e,n}function gl(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Sr(e,t,n[t]);return e}function _l(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??uc,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function vl(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function yl(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,yl(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&gl(o.schema,c),t.io===`input`&&kl(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function bl(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function xl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${bl(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+bl(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
65
-
66
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Sl(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Sl(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Cl=new Set([`type`,`properties`,`required`,`additionalProperties`]),wl=[`oneOf`,`anyOf`];function Tl(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function El(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Cl.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Tl(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Sr(n,r,e.length===1?e[0]:El(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Tl(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Dl(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Cl)if(t in e)return;let n=t.filter(e=>wl.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=El(t);else{let e=n[0],i=wl.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>El([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,gl(e,r))}function Ol(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):gl(i,s),gl(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Sl(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Dl(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}gl(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Sr(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:jl(t,`input`,e.processors),output:jl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function kl(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return kl(r.element,n);if(r.type===`set`)return kl(r.valueType,n);if(r.type===`lazy`)return kl(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return kl(r.innerType,n);if(r.type===`intersection`)return kl(r.left,n)||kl(r.right,n);if(r.type===`record`||r.type===`map`)return kl(r.keyType,n)||kl(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:kl(r.in,n)||kl(r.out,n);if(r.type===`object`){for(let e in r.shape)if(kl(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(kl(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(kl(e,n))return!0;return!!(r.rest&&kl(r.rest,n))}return!1}var Al=(e,t={})=>n=>{let r=_l({...n,processors:t});return yl(e,r),xl(r,e),Ol(r,e)},jl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=_l({...i??{},target:a,io:t,processors:n});return yl(e,o),xl(o,e),Ol(o,e)},Ml=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Nl=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Pl=(e,t)=>{Ml(e,`minimum`,t),Nl(e,`maximum`,t)},Fl=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Il=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Ll=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Rl=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},zl=(e,t)=>Ml(e,`minimum`,t.minimum),Bl=(e,t)=>Nl(e,`maximum`,t.maximum),Vl=e=>(t,n)=>{Rl(t,n.format);let[r,i]=e[n.format];Ml(t,`minimum`,r),Nl(t,`maximum`,i)},Hl={greater_than:(e,t)=>Ml(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Nl(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Fl(e,t.value),number_format:Vl(Ur),bigint_format:Vl(Wr),min_length:zl,max_length:Bl,length_equals:(e,t)=>Pl(e,t.length),min_size:zl,max_size:Bl,size_equals:(e,t)=>Pl(e,t.size),string_format:(e,t)=>{Rl(e,t.format),t.pattern&&Il(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Ll(e,t.mime)};function Ul(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Hl[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Ml(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Ml(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Nl(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Nl(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Fl(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Ll(t,i.mime);for(let e of i.patterns??[])Il(t,e);return t}var Wl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Gl=new Map([[Ko,wa],[Jo,Ta]]),Kl=e=>Gl.get(e)??e,ql=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Ul(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Wl[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Kl);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Jl=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Ul(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):vl(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Yl=(e,t,n,r)=>{n.type=`boolean`},Xl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Zl=(e,t,n,r)=>{n.not={}},Ql=(e,t,n,r)=>{let i=e._zod.def,a=mr(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},$l=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(vl(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(vl(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},eu=(e,t,n,r)=>{vl(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},tu=(e,t,n,r)=>{vl(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},nu=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Ul(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=yl(a.element,t,{...r,path:[...r.path,`items`]})};function ru(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?ru(t.out):t.type===`catch`?ru(t.innerType):e._zod.optin}var iu=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&vl(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Sr(i.properties,e,yl(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?ru(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=yl(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},au=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>yl(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ou=(e,t,n,r)=>{let i=e._zod.def,a=yl(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=yl(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function su(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=su(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>su(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Ia:Fa).source),p):p}var cu=new WeakMap;function lu(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of cu.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=su(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var uu=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Ul(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=yl(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Sr(i.patternProperties,Kl(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=yl(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=cu.get(t);n||(n=[],cu.set(t,n),t.deferred.push(()=>lu(t))),n.push(e)}i.additionalProperties=yl(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&ru(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},du=(e,t,n,r)=>{let i=e._zod.def,a=yl(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},fu=(e,t,n,r)=>{let i=e._zod.def;yl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},pu=Symbol();function mu(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(vl(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),pu):JSON.parse(o)}var hu=(e,t,n,r)=>{let i=e._zod.def;yl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=mu(i.defaultValue,e,t,n,r);o!==pu&&(n.default=o)},gu=(e,t,n,r)=>{let i=e._zod.def;yl(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=mu(i.defaultValue,e,t,n,r);o!==pu&&(n._prefault=o)},_u=(e,t,n,r)=>{let i=e._zod.def;yl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{vl(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},vu=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;yl(o,t,r);let s=t.seen.get(e);s.ref=o},yu=(e,t,n,r)=>{let i=e._zod.def;yl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},bu=(e,t,n,r)=>{let i=e._zod.def;yl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},xu=new WeakSet([Object.prototype,Error.prototype]);function Su(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Cu=I(`ZodError`,(e,t)=>{Ri.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);xu.has(n)||(xu.add(n),Su(n,`format`,e=>t=>Vi(e,t)),Su(n,`flatten`,e=>t=>Bi(e,t)),Su(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,gr,2)}),Su(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,gr,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),wu=Ui(Cu),Tu=Wi(Cu),Eu=Gi(Cu),Du=qi(Cu),Ou=$i(Cu),ku=ea(Cu),Au=ta(Cu),ju=na(Cu),Mu=ra(Cu),Nu=ia(Cu),Pu=aa(Cu),Fu=oa(Cu);function Iu(){Ai.localeError||ji(oc())}function Lu(){Ai.memoizer||ji({memoizer:rc()})}var Ru=I(`ZodType`,(e,t)=>(Iu(),lo.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(kr(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return zr(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(uf(e,t))},superRefine(e,t){return this.check(df(e,t))},overwrite(e){return this.check(ol(e))},optional(){return Gd(this)},exactOptional(){return qd(this)},nullable(){return Yd(this)},nullish(){return Gd(Yd(this))},nonoptional(e){return tf(this,e)},array(){return Ed(this)},or(e){return jd([this,e])},and(e){return Fd(this,e)},transform(e){return of(this,Ud(e))},default(e){return Zd(this,e)},prefault(e){return $d(this,e)},catch(e){return rf(this,e)},pipe(e){return of(this,e)},readonly(){return cf(this)},describe(e){let t=this.clone();return uc.add(t,{description:e}),t},meta(...e){if(e.length===0)return uc.get(this);let t=this.clone();return uc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return pi(this,`~standard`,{...po(this),jsonSchema:{input:jl(this,`input`),output:jl(this,`output`)}})},set"~standard"(e){fi(this,`~standard`,e)},parse:function e(t,n){return wu(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Tu(this,t,n,{callee:e})},safeParse(e,t){return Eu(this,e,t)},async safeParseAsync(e,t){return Du(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){fi(this,`spa`,e)},validate(e,t){return Xi(this,e,t)},validateAsync(e,t){return Qi(this,e,t)},encode:function e(t,n){return Ou(this,t,n,{callee:e})},decode:function e(t,n){return ku(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Au(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await ju(this,t,n,{callee:e})},safeEncode(e,t){return Mu(this,e,t)},safeDecode(e,t){return Nu(this,e,t)},async safeEncodeAsync(e,t){return Pu(this,e,t)},async safeDecodeAsync(e,t){return Fu(this,e,t)},toJSONSchema(e){return Al(this,{})(e)},get description(){return uc.get(this)?.description},get _def(){return this._zod.def}}),zu=I(`_ZodString`,(e,t)=>{mo.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ql(e,t,n,r)},mi({format:e=>Ul(e).format??null,minLength:e=>Ul(e).minimum??null,maxLength:e=>Ul(e).maximum??null},{regex(...e){return this.check($c(...e))},includes(...e){return this.check(nl(...e))},startsWith(...e){return this.check(rl(...e))},endsWith(...e){return this.check(il(...e))},min(...e){return this.check(Zc(...e))},max(...e){return this.check(Xc(...e))},length(...e){return this.check(Qc(...e))},nonempty(...e){return this.check(Zc(1,...e))},lowercase(e){return this.check(el(e))},uppercase(e){return this.check(tl(e))},trim(){return this.check(cl())},normalize(...e){return this.check(sl(...e))},toLowerCase(){return this.check(ll())},toUpperCase(){return this.check(ul())},slugify(){return this.check(dl())}})),Bu=I(`ZodString`,(e,t)=>{mo.init(e,t),zu.init(e,t)},{email(e){return this.check(pc(Ku,e))},url(e){return this.check(yc(Xu,e))},jwt(e){return this.check(Pc(fd,e))},emoji(e){return this.check(bc(Qu,e))},guid(e){return this.check(mc(Ju,e))},uuid(e){return this.check(hc(Yu,e))},uuidv4(e){return this.check(gc(Yu,e))},uuidv6(e){return this.check(_c(Yu,e))},uuidv7(e){return this.check(vc(Yu,e))},nanoid(e){return this.check(xc($u,e))},cuid(e){return this.check(Sc(ed,e))},cuid2(e){return this.check(Cc(td,e))},ulid(e){return this.check(wc(nd,e))},base64(e){return this.check(jc(ld,e))},base64url(e){return this.check(Mc(ud,e))},xid(e){return this.check(Tc(rd,e))},ksuid(e){return this.check(Ec(id,e))},ipv4(e){return this.check(Dc(ad,e))},ipv6(e){return this.check(Oc(od,e))},cidrv4(e){return this.check(kc(sd,e))},cidrv6(e){return this.check(Ac(cd,e))},e164(e){return this.check(Nc(dd,e))},datetime(e){return this.check(Fc(Hu,e))},date(e){return this.check(Ic(Uu,e))},time(e){return this.check(Lc(Wu,e))},duration(e){return this.check(Rc(Gu,e))}});function L(e){return fc(Bu,e)}var Vu=I(`ZodStringFormat`,(e,t)=>{ho.init(e,t),zu.init(e,t)}),Hu=I(`ZodISODateTime`,(e,t)=>{Po.init(e,t),Vu.init(e,t)}),Uu=I(`ZodISODate`,(e,t)=>{Fo.init(e,t),Vu.init(e,t)}),Wu=I(`ZodISOTime`,(e,t)=>{Io.init(e,t),Vu.init(e,t)}),Gu=I(`ZodISODuration`,(e,t)=>{Lo.init(e,t),Vu.init(e,t)}),Ku=I(`ZodEmail`,(e,t)=>{vo.init(e,t),Vu.init(e,t)});function qu(e){return pc(Ku,e)}var Ju=I(`ZodGUID`,(e,t)=>{go.init(e,t),Vu.init(e,t)}),Yu=I(`ZodUUID`,(e,t)=>{_o.init(e,t),Vu.init(e,t)}),Xu=I(`ZodURL`,(e,t)=>{Eo.init(e,t),Vu.init(e,t)});function Zu(e){return yc(Xu,e)}var Qu=I(`ZodEmoji`,(e,t)=>{Do.init(e,t),Vu.init(e,t)}),$u=I(`ZodNanoID`,(e,t)=>{Oo.init(e,t),Vu.init(e,t)}),ed=I(`ZodCUID`,(e,t)=>{ko.init(e,t),Vu.init(e,t)}),td=I(`ZodCUID2`,(e,t)=>{Ao.init(e,t),Vu.init(e,t)}),nd=I(`ZodULID`,(e,t)=>{jo.init(e,t),Vu.init(e,t)}),rd=I(`ZodXID`,(e,t)=>{Mo.init(e,t),Vu.init(e,t)}),id=I(`ZodKSUID`,(e,t)=>{No.init(e,t),Vu.init(e,t)}),ad=I(`ZodIPv4`,(e,t)=>{Ro.init(e,t),Vu.init(e,t)}),od=I(`ZodIPv6`,(e,t)=>{Vo.init(e,t),Vu.init(e,t)}),sd=I(`ZodCIDRv4`,(e,t)=>{Ho.init(e,t),Vu.init(e,t)}),cd=I(`ZodCIDRv6`,(e,t)=>{Wo.init(e,t),Vu.init(e,t)}),ld=I(`ZodBase64`,(e,t)=>{qo.init(e,t),Vu.init(e,t)}),ud=I(`ZodBase64URL`,(e,t)=>{Xo.init(e,t),Vu.init(e,t)}),dd=I(`ZodE164`,(e,t)=>{Zo.init(e,t),Vu.init(e,t)}),fd=I(`ZodJWT`,(e,t)=>{$o.init(e,t),Vu.init(e,t)}),pd=I(`ZodNumber`,(e,t)=>{es.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jl(e,t,n,r),e.isFinite=!0},mi({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Ul(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Ul(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Ul(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Ul(e).format??null},{gt(e,t){return this.check(qc(e,t))},gte(e,t){return this.check(Jc(e,t))},min(e,t){return this.check(Jc(e,t))},lt(e,t){return this.check(Gc(e,t))},lte(e,t){return this.check(Kc(e,t))},max(e,t){return this.check(Kc(e,t))},int(e){return this.check(gd(e))},safe(e){return this.check(gd(e))},positive(e){return this.check(qc(0,e))},nonnegative(e){return this.check(Jc(0,e))},negative(e){return this.check(Gc(0,e))},nonpositive(e){return this.check(Kc(0,e))},multipleOf(e,t){return this.check(Yc(e,t))},step(e,t){return this.check(Yc(e,t))},finite(){return this}}));function md(e){return zc(pd,e)}var hd=I(`ZodNumberFormat`,(e,t)=>{ts.init(e,t),pd.init(e,t)});function gd(e){return Bc(hd,e)}var _d=I(`ZodBoolean`,(e,t)=>{ns.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yl(e,t,n,r)});function vd(e){return Vc(_d,e)}var yd=I(`ZodNull`,(e,t)=>{rs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xl(e,t,n,r)});function bd(e){return Hc(yd,e)}var xd=I(`ZodUnknown`,(e,t)=>{is.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Sd(){return Uc(xd)}var Cd=I(`ZodNever`,(e,t)=>{as.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zl(e,t,n,r)});function wd(e){return Wc(Cd,e)}var Td=I(`ZodArray`,(e,t)=>{Lu(),ss.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nu(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Zc(e,t))},nonempty(e){return this.check(Zc(1,e))},max(e,t){return this.check(Xc(e,t))},length(e,t){return this.check(Qc(e,t))},unwrap(){return this.element}});function Ed(e,t){return fl(Td,e,t)}var Dd=I(`ZodObject`,(e,t)=>{Lu(),ps.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iu(e,t,n,r),xi(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return zd(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(kr(this._zod.def,{catchall:e}))},passthrough(){return this.clone(kr(this._zod.def,{catchall:Sd()}))},loose(){return this.clone(kr(this._zod.def,{catchall:Sd()}))},strict(){return this.clone(kr(this._zod.def,{catchall:wd()}))},strip(){return this.clone(kr(this._zod.def,{catchall:void 0}))},extend(e){return Jr(this,e)},safeExtend(e){return Xr(this,e)},merge(e){return Zr(this,e)},pick(e){return Gr(this,e)},omit(e){return qr(this,e)},partial(...e){return Qr(Wd,this,e[0])},exactPartial(...e){return Qr(Kd,this,e[0],`exactPartial`)},required(...e){return $r(ef,this,e[0])}});function Od(e,t){return new Dd({type:`object`,shape:e??{},...Br(t)})}function kd(e,t){return new Dd({type:`object`,shape:e,catchall:Sd(),...Br(t)})}var Ad=I(`ZodUnion`,(e,t)=>{hs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>au(e,t,n,r),e.options=t.options});function jd(e,t){return new Ad({type:`union`,options:e,...Br(t)})}var Md=I(`ZodDiscriminatedUnion`,(e,t)=>{Ad.init(e,t),_s.init(e,t)});function Nd(e,t,n){return new Md({type:`union`,options:t,discriminator:e,...Br(n)})}var Pd=I(`ZodIntersection`,(e,t)=>{vs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ou(e,t,n,r)});function Fd(e,t){return new Pd({type:`intersection`,left:e,right:t})}var Id=I(`ZodRecord`,(e,t)=>{Lu(),xs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uu(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ld(e,t,n){return!t||!t._zod?new Id({type:`record`,keyType:L(),valueType:e,...Br(t)}):new Id({type:`record`,keyType:e,valueType:t,...Br(n)})}var Rd=I(`ZodEnum`,(e,t)=>{Ss.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ql(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Rd({...t,checks:[],...Br(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Rd({...t,checks:[],...Br(r),entries:i})}});function zd(e,t){return new Rd({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Br(t)})}var Bd=I(`ZodLiteral`,(e,t)=>{Cs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$l(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Vd(e,t){return new Bd({type:`literal`,values:Array.isArray(e)?e:[e],...Br(t)})}var Hd=I(`ZodTransform`,(e,t)=>{Lu(),ws.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tu(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ki(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ui(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(ui(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ud(e){return new Hd({type:`transform`,transform:e})}var Wd=I(`ZodOptional`,(e,t)=>{Es.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Gd(e){return new Wd({type:`optional`,innerType:e})}var Kd=I(`ZodExactOptional`,(e,t)=>{Ds.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qd(e){return new Kd({type:`optional`,innerType:e})}var Jd=I(`ZodNullable`,(e,t)=>{Os.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>du(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yd(e){return new Jd({type:`nullable`,innerType:e})}var Xd=I(`ZodDefault`,(e,t)=>{ks.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Zd(e,t){return new Xd({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ir(t)}})}var Qd=I(`ZodPrefault`,(e,t)=>{js.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $d(e,t){return new Qd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ir(t)}})}var ef=I(`ZodNonOptional`,(e,t)=>{Ms.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tf(e,t){return new ef({type:`nonoptional`,innerType:e,...Br(t)})}var nf=I(`ZodCatch`,(e,t)=>{Fs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_u(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rf(e,t){return new nf({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ci(t)})}var af=I(`ZodPipe`,(e,t)=>{Is.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vu(e,t,n,r),e.in=t.in,e.out=t.out});function of(e,t){return new af({type:`pipe`,in:e,out:t})}var sf=I(`ZodReadonly`,(e,t)=>{Rs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cf(e){return new sf({type:`readonly`,innerType:e})}var lf=I(`ZodCustom`,(e,t)=>{Bs.init(e,t),Ru.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eu(e,t,n,r)});function uf(e,t={}){return pl(lf,e,t)}function df(e,t){return ml(e,t)}var ff=I(`ZodInstanceOf`,(e,t)=>{lf.init(e,t)},{properties(e,t){return this.check(al(e,t))}});function pf(e,t={}){let n=new ff({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...Br(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var mf=Od({env:Ld(L(),L()),machine:vd().optional().default(!1)});async function hf(e=fetch){let t=await e(`/api/config`);if(!t.ok)throw Error(`Failed to load Sprocket runtime config.`);let n=mf.safeParse(await t.json());if(!n.success)throw Error(`Failed to load Sprocket runtime config.`);return n.data}var gf=e=>{throw TypeError(e)},_f=(e,t,n)=>t.has(e)||gf(`Cannot `+n),vf=(e,t,n)=>(_f(e,t,`read from private field`),n?n.call(e):t.get(e)),yf=(e,t,n)=>t.has(e)?gf(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),bf=(e,t,n,r)=>(_f(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),xf=(e,t,n)=>(_f(e,t,`access private method`),n),Sf=class extends Error{constructor(){super(...arguments),this.status=500,this.name=`NoClientIdProvidedException`,this.message=`Missing Client ID. Pass it to the constructor (createClient("client_01HXRMBQ9BJ3E7QSTQ9X2PHVB7"))`}};function Cf(e,t){if(!t.has(`code`))return!1;let{pathname:n}=window.location,r=new URL(e).pathname;return n===r||n===`${r}/`}function wf(){let e={};function t(t,n){e[t]=n}function n(t){return e[t]}function r(t){delete e[t]}function i(){e={}}return{setItem:t,getItem:n,removeItem:r,reset:i}}var Tf=wf();async function Ef(){let e=Df();return{codeVerifier:e,codeChallenge:await Of(e)}}function Df(){return kf(crypto.getRandomValues(new Uint32Array(96)))}async function Of(e){return kf(await Af(e))}function kf(e){return btoa(Array.from(new Uint8Array(e),e=>String.fromCharCode(e)).join(``)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function Af(e){let t=new TextEncoder().encode(e);return crypto.subtle.digest(`SHA-256`,t)}function jf(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=`=`.repeat((4-t.length%4)%4);return atob(t+n)}function Mf(e){let t=e.split(`.`);if(t.length!==3)throw Error(`Invalid JWT format`);try{return{header:JSON.parse(jf(t[0])),payload:JSON.parse(jf(t[1]))}}catch(e){throw Error(`Failed to decode JWT: ${e instanceof Error?e.message:String(e)}`)}}var Nf={codeVerifier:`workos:code-verifier`,user:`workos:user`,accessToken:`workos:access-token`,refreshToken:`workos:refresh-token`,expiresAt:`workos:expires-at`,authenticationMethod:`workos:authentication-method`};function Pf(e){return Mf(e).payload}function Ff(e){return`${Nf.refreshToken}:${e}`}function If(e,{devMode:t=!1,clientId:n}){let{user:r,accessToken:i,refreshToken:a,authenticationMethod:o}=e;Tf.setItem(Nf.user,r),Tf.setItem(Nf.accessToken,i),Tf.setItem(Nf.authenticationMethod,o),(t?window.localStorage:Tf).setItem(Ff(n),a);let{exp:s,iat:c}=Pf(i),l=s-c,u=Date.now()+l*1e3;Tf.setItem(Nf.expiresAt,u)}function Lf({devMode:e=!1,clientId:t}){Tf.removeItem(Nf.user),Tf.removeItem(Nf.accessToken),Tf.removeItem(Nf.authenticationMethod);let n=e?window.localStorage:Tf;n.removeItem(Ff(t)),n.removeItem(Nf.refreshToken)}function Rf({devMode:e=!1,clientId:t}){let n=e?window.localStorage:Tf,r=n.getItem(Ff(t))??n.getItem(Nf.refreshToken);return typeof r==`string`?r:void 0}function zf(e){let t=new URLSearchParams,n=Object.keys(e).sort();for(let r of n){let n=e[r];n&&t.append(r,n)}return t.toString()}var Bf=class extends Error{},Vf=class extends Bf{constructor(e,t={}){super(e,t.cause==null?void 0:{cause:t.cause}),this.name=`RefreshError`,this.status=t.status,this.error=t.error,this.isTransient=t.isTransient??!1}},Hf=class extends Bf{},Uf=class extends Bf{constructor(){super(...arguments),this.message=`No access token available`}},Wf=class extends Vf{constructor(e=`Timed out waiting to refresh the session.`,t){super(e,{cause:t?.cause,isTransient:!0}),this.name=`RefreshTimeoutError`}},Gf=class extends Bf{constructor(){super(...arguments),this.message=`SignOut() called without an active session. Provide a returnTo URL to redirect anyway.`}},Kf=class e{constructor(){this.locked=new Map,this.addToLocked=(e,t)=>{let n=this.locked.get(e);n===void 0?t===void 0?this.locked.set(e,[]):this.locked.set(e,[t]):t!==void 0&&(n.unshift(t),this.locked.set(e,n))},this.isLocked=e=>this.locked.has(e),this.lock=e=>new Promise((t,n)=>{this.isLocked(e)?this.addToLocked(e,t):(this.addToLocked(e),t())}),this.unlock=e=>{let t=this.locked.get(e);if(t===void 0||t.length===0){this.locked.delete(e);return}let n=t.pop();this.locked.set(e,t),n!==void 0&&setTimeout(n,0)}}static getInstance(){return e.instance===void 0&&(e.instance=new e),e.instance}};function qf(){return Kf.getInstance()}var Jf=`browser-tabs-lock-key`,Yf={key:async e=>{throw Error(`Unsupported`)},getItem:async e=>{throw Error(`Unsupported`)},clear:async()=>window.localStorage.clear(),removeItem:async e=>{throw Error(`Unsupported`)},setItem:async(e,t)=>{throw Error(`Unsupported`)},keySync:e=>window.localStorage.key(e),getItemSync:e=>window.localStorage.getItem(e),clearSync:()=>window.localStorage.clear(),removeItemSync:e=>window.localStorage.removeItem(e),setItemSync:(e,t)=>window.localStorage.setItem(e,t)};function Xf(e){return new Promise(t=>setTimeout(t,e))}function Zf(e){let t=``;for(let n=0;n<e;n++){let e=Math.floor(Math.random()*61);t+=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz`[e]}return t}function Qf(){return Date.now().toString()+Zf(15)}var $f=class e{constructor(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Qf(),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,e.waiters===void 0&&(e.waiters=[])}async acquireLock(t,n=5e3){let r=Date.now()+Zf(4),i=Date.now()+n,a=`${Jf}-${t}`,o=this.storageHandler===void 0?Yf:this.storageHandler;for(;Date.now()<i;){if(await Xf(30),o.getItemSync(a)===null){let e=`${this.id}-${t}-${r}`;await Xf(Math.floor(Math.random()*25)),o.setItemSync(a,JSON.stringify({id:this.id,iat:r,timeoutKey:e,timeAcquired:Date.now(),timeRefreshed:Date.now()})),await Xf(30);let n=o.getItemSync(a);if(n!==null){let e=JSON.parse(n);if(e.id===this.id&&e.iat===r)return this.acquiredIatSet.add(r),this.refreshLockWhileAcquired(a,r),!0}}else e.lockCorrector(this.storageHandler===void 0?Yf:this.storageHandler),await this.waitForSomethingToChange(i);r=Date.now()+Zf(4)}return!1}async refreshLockWhileAcquired(e,t){setTimeout(async()=>{if(await qf().lock(t),!this.acquiredIatSet.has(t)){qf().unlock(t);return}let n=this.storageHandler===void 0?Yf:this.storageHandler,r=n.getItemSync(e);if(r!==null){let i=JSON.parse(r);i.timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(i)),qf().unlock(t)}else{qf().unlock(t);return}this.refreshLockWhileAcquired(e,t)},1e3)}async waitForSomethingToChange(t){await new Promise(n=>{let r=!1,i=Date.now(),a=!1;function o(){if(a||=(window.removeEventListener(`storage`,o),e.removeFromWaiting(o),clearTimeout(s),!0),!r){r=!0;let e=50-(Date.now()-i);e>0?setTimeout(n,e):n(null)}}window.addEventListener(`storage`,o),e.addToWaiting(o);let s=setTimeout(o,Math.max(0,t-Date.now()))})}static addToWaiting(t){this.removeFromWaiting(t),e.waiters!==void 0&&e.waiters.push(t)}static removeFromWaiting(t){e.waiters!==void 0&&(e.waiters=e.waiters.filter(e=>e!==t))}static notifyWaiters(){e.waiters!==void 0&&[...e.waiters].forEach(e=>e())}async releaseLock(e){return await this.releaseLock__private__(e)}async releaseLock__private__(t){let n=this.storageHandler===void 0?Yf:this.storageHandler,r=`${Jf}-${t}`,i=n.getItemSync(r);if(i===null)return;let a=JSON.parse(i);a.id===this.id&&(await qf().lock(a.iat),this.acquiredIatSet.delete(a.iat),n.removeItemSync(r),qf().unlock(a.iat),e.notifyWaiters())}static lockCorrector(t){let n=Date.now()-5e3,r=t,i=[],a=0;for(;;){let e=r.keySync(a);if(e===null)break;i.push(e),a++}let o=!1;for(let e=0;e<i.length;e++){let t=i[e];if(t.includes(Jf)){let e=r.getItemSync(t);if(e!==null){let i=JSON.parse(e);(i.timeRefreshed===void 0&&i.timeAcquired<n||i.timeRefreshed!==void 0&&i.timeRefreshed<n)&&(r.removeItemSync(t),o=!0)}}}o&&e.notifyWaiters()}};$f.waiters=void 0;var ep=$f,tp=1e4;function np(e,t,{timeout:n=tp}={}){if(!e)throw TypeError(`lockName is required and must be a non-empty string.`);return`locks`in navigator?rp(e,t,n):ip(e,t,n)}async function rp(e,t,n){try{return await navigator.locks.request(e,{signal:AbortSignal.timeout(n)},t)}catch(t){if(t instanceof DOMException)switch(t.name){case`TimeoutError`:case`AbortError`:throw new ap(`AcquisitionTimeoutError`,e,`Native`)}throw t}}async function ip(e,t,n){let r=new ep;try{if(await r.acquireLock(e,n))return await t();throw new ap(`AcquisitionTimeoutError`,e,`Vendor`)}finally{await r.releaseLock(e)}}var ap=class extends Error{constructor(e,t,n){super(`Lock acquisition timed out for "${t}" (${n})`),this.name=e,this.lockName=t}},op=e=>({object:e.object,id:e.id,email:e.email,emailVerified:e.email_verified,firstName:e.first_name,profilePictureUrl:e.profile_picture_url,lastName:e.last_name,lastSignInAt:e.last_sign_in_at,externalId:e.external_id,createdAt:e.created_at,updatedAt:e.updated_at}),sp=e=>{let{user:t,organization_id:n,access_token:r,refresh_token:i,authentication_method:a,impersonator:o,...s}=e;return{user:op(t),organizationId:n,accessToken:r,refreshToken:i,authenticationMethod:a,impersonator:o,...s}},cp=`api.workos.com`,lp=new Set([408,429,500,502,503,504]),up,dp,fp,pp,mp,hp=class{constructor({clientId:e,hostname:t=cp,port:n,https:r=!0}){yf(this,fp),yf(this,up),yf(this,dp),bf(this,up,`${r?`https`:`http`}://${t}${n?`:${n}`:``}`),bf(this,dp,e)}async authenticateWithRefreshToken({refreshToken:e,organizationId:t,useCookie:n}){let r=await xf(this,fp,mp).call(this,`/user_management/authenticate`,{useCookie:n,body:{client_id:vf(this,dp),grant_type:`refresh_token`,...!n&&{refresh_token:e},organization_id:t}});if(r.ok)return sp(await r.json());let{status:i}=r,a=await xf(this,fp,pp).call(this,r);throw new Vf(a.error_description,{status:i,error:a.error,isTransient:lp.has(i)})}async authenticateWithCode({code:e,codeVerifier:t,useCookie:n}){let r=await xf(this,fp,mp).call(this,`/user_management/authenticate`,{useCookie:n,body:{code:e,client_id:vf(this,dp),grant_type:`authorization_code`,code_verifier:t}});if(r.ok)return sp(await r.json());throw new Hf((await r.json()).error_description)}getAuthorizationUrl({connectionId:e,context:t,domainHint:n,loginHint:r,organizationId:i,provider:a=`authkit`,redirectUri:o,state:s,screenHint:c,passwordResetToken:l,invitationToken:u,codeChallenge:d,codeChallengeMethod:f}){if(!a&&!e&&!i)throw TypeError(`Incomplete arguments. Need to specify either a 'connectionId', 'organizationId', or 'provider'.`);if(a!==`authkit`&&c)throw TypeError(`'screenHint' is only supported for 'authkit' provider`);t&&console.warn("`context` is deprecated. We previously required initiate login endpoints to return the\n`context` query parameter when getting the authorization URL. This is no longer necessary.");let p=zf({connection_id:e,organization_id:i,domain_hint:n,login_hint:r,provider:a,client_id:vf(this,dp),redirect_uri:o,response_type:`code`,state:s,screen_hint:c,invitation_token:u,password_reset_token:l,code_challenge:d,code_challenge_method:f});return`${vf(this,up)}/user_management/authorize?${p}`}getLogoutUrl({sessionId:e,returnTo:t}){let n=new URL(`/user_management/sessions/logout`,vf(this,up));return n.searchParams.set(`session_id`,e),t&&n.searchParams.set(`return_to`,t),n}};up=new WeakMap,dp=new WeakMap,fp=new WeakSet,pp=async function(e){try{return await e.json()}catch{return{}}},mp=function(e,{body:t,useCookie:n}){return fetch(new URL(e,vf(this,up)),{method:`POST`,...n&&{credentials:`include`},headers:{Accept:`application/json, text/plain, */*`,"Content-Type":`application/json`},body:JSON.stringify(t)})};var gp=`workos_organization_id`;function _p(e){return`workos-org-id:${e}`}var vp=`WORKOS_REFRESH_SESSION`;function yp(e){let t=document.cookie.matchAll(/(?:^|;\s*)workos-has-session=([^;]*)/g);for(let[,n]of t)if(n===`1`||n.split(`.`).includes(e))return!0;return!1}var bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp=class{constructor(e,{apiHostname:t,https:n,port:r,redirectUri:i=window.origin,devMode:a=location.hostname===`localhost`||location.hostname===`127.0.0.1`,onBeforeAutoRefresh:o=()=>!document.hidden,onRedirectCallback:s=e=>{},onRefresh:c,onRefreshFailure:l,refreshBufferInterval:u=10}={}){if(yf(this,jp),yf(this,bp),yf(this,xp),yf(this,Sp),yf(this,Cp),yf(this,wp),yf(this,Tp),yf(this,Ep),yf(this,Dp),yf(this,Op),yf(this,kp),yf(this,Ap),!e)throw new Sf;bf(this,Sp,e),bf(this,Cp,new hp({clientId:e,hostname:t,port:r,https:n})),bf(this,Tp,a),bf(this,wp,i),bf(this,bp,{tag:`INITIAL`}),bf(this,Ep,o),bf(this,Dp,s),bf(this,Op,c),bf(this,kp,l),bf(this,Ap,u)}async initialize(){if(vf(this,bp).tag!==`INITIAL`)return;let e=new URLSearchParams(window.location.search);if(Cf(vf(this,wp),e))await xf(this,jp,Mp).call(this);else if(yp(vf(this,Sp))||Rf({devMode:vf(this,Tp),clientId:vf(this,Sp)}))try{await xf(this,jp,Fp).call(this),xf(this,jp,Pp).call(this)}catch{xf(this,jp,Np).call(this)}}async getSignInUrl(e={}){return await xf(this,jp,zp).call(this,{...e})}async getSignUpUrl(e={}){return await xf(this,jp,zp).call(this,{...e,screenHint:`sign-up`})}async signIn(e={}){let t=await xf(this,jp,zp).call(this,{...e});window.location.assign(t)}async signUp(e={}){let t=await xf(this,jp,zp).call(this,{...e,screenHint:`sign-up`});window.location.assign(t)}signOut(e={navigate:!0}){let{navigate:t=!0,returnTo:n}=e,r=Tf.getItem(Nf.accessToken);if(typeof r!=`string`){if(t)throw new Gf;return Promise.reject(new Gf)}let{sid:i}=Pf(r),a=vf(this,Cp).getLogoutUrl({sessionId:i,returnTo:n});if(a){if(bf(this,bp,{tag:`SIGNED_OUT`}),clearTimeout(vf(this,xp)),Lf({devMode:vf(this,Tp),clientId:vf(this,Sp)}),sessionStorage.removeItem(_p(vf(this,Sp))),sessionStorage.removeItem(gp),t)window.location.assign(a);else return new Promise(async e=>{fetch(a,{mode:`no-cors`,credentials:`include`}).catch(e=>{console.warn(`AuthKit: Failed to send logout request`,e)}).finally(e)})}}async getAccessToken(e){if(e?.forceRefresh||xf(this,jp,Rp).call(this))try{await xf(this,jp,Fp).call(this)}catch(t){if(t instanceof Wf){let t=e?.forceRefresh?void 0:xf(this,jp,Vp).call(this);if(t)return t;try{await xf(this,jp,Fp).call(this)}catch(e){throw e instanceof Wf?e:e instanceof Vf?e.isTransient?e:new Uf:e}}else if(t instanceof Vf){if(t.isTransient){let n=e?.forceRefresh?void 0:xf(this,jp,Vp).call(this);if(n)return n;throw t}throw new Uf}else throw t}let t=xf(this,jp,Bp).call(this);if(!t)throw new Uf;return t}getUser(){return Tf.getItem(Nf.user)||null}dispose(){clearTimeout(vf(this,xp)),Tf.reset()}async switchToOrganization({organizationId:e,signInOpts:t={}}){try{await xf(this,jp,Fp).call(this,{organizationId:e})}catch(n){if(n instanceof Wf)console.warn(`Couldn't switch organization: lock acquisition timed out.`);else if(n instanceof Vf){if(n.isTransient)throw n;this.signIn({...t,organizationId:e})}else throw n}}};bp=new WeakMap,xp=new WeakMap,Sp=new WeakMap,Cp=new WeakMap,wp=new WeakMap,Tp=new WeakMap,Ep=new WeakMap,Dp=new WeakMap,Op=new WeakMap,kp=new WeakMap,Ap=new WeakMap,jp=new WeakSet,Mp=async function(){if(vf(this,bp).tag!==`INITIAL`)return;let e=new URL(window.location.href),t=e.searchParams.get(`code`),n=e.searchParams.get(`state`),r;if(n)try{r=JSON.parse(n)}catch{console.warn("AuthKit: ignoring malformed `state` parameter")}let i=window.sessionStorage.getItem(Nf.codeVerifier);if(t){if(i)try{bf(this,bp,{tag:`AUTHENTICATING`,response:vf(this,Cp).authenticateWithCode({code:t,codeVerifier:i,useCookie:vf(this,jp,Hp)})});let e=await vf(this,bp).response;e&&(bf(this,bp,{tag:`AUTHENTICATED`}),xf(this,jp,Pp).call(this),If(e,{devMode:vf(this,Tp),clientId:vf(this,Sp)}),xf(this,jp,Up).call(this,e),vf(this,Dp).call(this,{state:r,...e}))}catch(e){bf(this,bp,{tag:`ERROR`}),console.error(e)}else bf(this,bp,{tag:`ERROR`}),console.error(`Couldn't exchange code.
67
-
68
- An authorization_code was supplied for a login which did not originate at the application. This could happen for various reasons:
69
-
70
- * This could have been an attempted Login CSRF attack. You were not affected.
71
- * The developer may not have configured a Login Initiation endpoint.`)}let a=new URL(window.location.toString());a.searchParams.delete(`code`),a.searchParams.delete(`state`),window.sessionStorage.removeItem(Nf.codeVerifier),window.history.replaceState({},``,a)},Np=function(){vf(this,bp).tag===`AUTHENTICATED`&&xf(this,jp,Pp).call(this)},Pp=async function(){vf(this,bp).tag!==`SIGNED_OUT`&&bf(this,xp,setTimeout(()=>{xf(this,jp,Rp).call(this)&&vf(this,Ep).call(this)?xf(this,jp,Fp).call(this).catch(e=>{vf(this,bp).tag!==`SIGNED_OUT`&&console.debug(e)}).finally(()=>xf(this,jp,Pp).call(this)):xf(this,jp,Pp).call(this)},1e3))},Fp=async function({organizationId:e}={}){if(xf(this,jp,Lp).call(this),vf(this,bp).tag===`AUTHENTICATING`){await vf(this,bp).response;return}let t=vf(this,bp);bf(this,bp,{tag:`AUTHENTICATING`,response:xf(this,jp,Ip).call(this,{organizationId:e,beginningState:t})}),await vf(this,bp).response},Ip=async function({organizationId:e,beginningState:t}){try{return await np(vp,async()=>{if(xf(this,jp,Lp).call(this),e)sessionStorage.setItem(_p(vf(this,Sp)),e);else{let t=xf(this,jp,Bp).call(this);e=t?Pf(t)?.org_id:sessionStorage.getItem(_p(vf(this,Sp)))??sessionStorage.getItem(gp)??void 0}let t=await vf(this,Cp).authenticateWithRefreshToken({refreshToken:Rf({devMode:vf(this,Tp),clientId:vf(this,Sp)}),organizationId:e,useCookie:vf(this,jp,Hp)});return xf(this,jp,Lp).call(this),bf(this,bp,{tag:`AUTHENTICATED`}),If(t,{devMode:vf(this,Tp),clientId:vf(this,Sp)}),xf(this,jp,Up).call(this,t),t})}catch(e){throw xf(this,jp,Lp).call(this),e instanceof ap&&e.name===`AcquisitionTimeoutError`?(console.warn(`Couldn't acquire refresh lock.`),bf(this,bp,t),new Wf(void 0,{cause:e})):(t.tag!==`INITIAL`&&console.debug(e),e instanceof Vf&&!e.isTransient?(Lf({devMode:vf(this,Tp),clientId:vf(this,Sp)}),sessionStorage.removeItem(_p(vf(this,Sp))),sessionStorage.removeItem(gp),t.tag!==`INITIAL`&&vf(this,kp)&&vf(this,kp).call(this,{signIn:this.signIn.bind(this)}),bf(this,bp,{tag:`ERROR`})):bf(this,bp,{tag:`AUTHENTICATED`}),e)}},Lp=function(){if(vf(this,bp).tag===`SIGNED_OUT`)throw new Uf},Rp=function(){switch(vf(this,bp).tag){case`INITIAL`:case`AUTHENTICATING`:return!0;case`SIGNED_OUT`:case`ERROR`:return!1;case`AUTHENTICATED`:let e=Tf.getItem(Nf.accessToken),t=Tf.getItem(Nf.expiresAt);return!e||!t||t-vf(this,Ap)*1e3<Date.now()}},zp=async function({context:e,invitationToken:t,loginHint:n,organizationId:r,passwordResetToken:i,state:a,screenHint:o}){let{codeVerifier:s,codeChallenge:c}=await Ef();return window.sessionStorage.setItem(Nf.codeVerifier,s),vf(this,Cp).getAuthorizationUrl({codeChallenge:c,codeChallengeMethod:`S256`,context:e,invitationToken:t,loginHint:n,organizationId:r,passwordResetToken:i,redirectUri:vf(this,wp),screenHint:o,state:a?JSON.stringify(a):void 0})},Bp=function(){return Tf.getItem(Nf.accessToken)},Vp=function(){let e=xf(this,jp,Bp).call(this),t=Tf.getItem(Nf.expiresAt);return e&&t&&t>Date.now()?e:void 0},Hp=function(){return!vf(this,Tp)},Up=async function(e){if(vf(this,Op)){let{refreshToken:t,...n}=e;vf(this,Op).call(this,n)}};async function Gp(e,t={}){let n=new Wp(e,t);return await n.initialize(),n}function Kp(e,t){return new Proxy({},{get(n,r){if(typeof r==`string`)return Kp(e,[...t,r]);if(r===xt){if(t.length<1){let n=[e,...t].join(`.`);throw Error(`API path is expected to be of the form \`${e}.childComponent.functionName\`. Found: \`${n}\``)}return`_reference/childComponent/`+t.join(`/`)}}})}var qp=()=>Kp(`components`,[]),Jp=Ot;qp();var Yp=Od({error:L().optional()});function Xp(e,t){let n=e.trim().slice(0,120);return n.startsWith(`<!`)?Error(`The Sprocket API at ${t} returned a web page instead of JSON. Make sure the server is running correctly.`):Error(n.length>0?`Local API returned an unexpected response: ${n}`:`Local API returned an empty response.`)}async function Zp(e,t,n){let r=await e.text();if(!(e.headers.get(`content-type`)??``).includes(`application/json`))throw Xp(r,n);let i;try{i=JSON.parse(r)}catch{throw Xp(r,n)}let a=t.safeParse(i);if(!a.success)throw Error(`Local API returned an unexpected response.`);return a.data}async function Qp(e,t){let n=await e.text(),r;try{r=JSON.parse(n)}catch{return Xp(n,t)}let i=Yp.safeParse(r);return i.success?Error(i.data.error?i.data.error:`Local request failed (${e.status}).`):Error(`Local API returned an unexpected response.`)}async function $p(e,t){if(!e.ok)throw await Qp(e,t);return e}function em(e){let t=e.split(`
72
- `).map(e=>e.endsWith(`\r`)?e.slice(0,-1):e).filter(e=>e===`data`||e.startsWith(`data:`)).map(e=>e===`data`?``:e.slice(5).replace(/^ /,``));return t.length>0?t.join(`
73
- `):null}async function tm(e,t,n){if(!e.body)return;let r=e.body.getReader(),i=new TextDecoder,a=``,o=()=>void r.cancel(t.reason).catch(()=>void 0);t.addEventListener(`abort`,o,{once:!0});try{for(;!t.aborted;){let{done:e,value:o}=await r.read();a+=i.decode(o,{stream:!e});let s=/\r?\n\r?\n/.exec(a);for(;s;){let e=em(a.slice(0,s.index));a=a.slice(s.index+s[0].length),e!==null&&!t.aborted&&n(e),s=/\r?\n\r?\n/.exec(a)}if(e)break}}catch(e){if(!t.aborted)throw e}finally{t.removeEventListener(`abort`,o),await r.cancel().catch(()=>void 0),r.releaseLock()}}function nm(e){async function t(t,n){return await fetch(`${e}${t}`,{...n,credentials:`include`,headers:{"content-type":`application/json`,...n?.headers}})}return{async request(n,r,i){let a=await $p(await t(n,i),e);if(a.status===204)throw Error(`Local API returned an empty response.`);return await Zp(a,r,e)},async response(n,r){return await $p(await t(n,r),e)},async postEventStream(n,r,i,a){await tm(await $p(await t(n,{method:`POST`,body:JSON.stringify(r),signal:i}),e),i,a)}}}var rm=Od({error:L().optional()}),im=Od({authenticated:vd().optional()}),am=Od({parentPath:L(),entries:Ed(Od({name:L(),fullPath:L()})),volumeList:vd().optional()}),om=Od({skills:Ed(Od({name:L(),description:L()})),warnings:Ed(L())}),sm=Od({entries:Ed(Od({path:L(),kind:zd([`file`,`directory`])})),scanning:vd()}),cm=Od({workspacePath:L(),displayName:L(),repositoryKey:L()}),lm=Od({workspacePath:L(),repositoryKey:L(),attachmentKey:L(),displayName:L(),availability:zd([`available`,`unavailable`]),lastValidatedAt:gd(),lastUsedAt:gd(),lastMessageSentAt:gd().optional(),unavailableReason:L().optional()}),um=Od({commands:Ed(Od({sessionId:L(),command:L(),workdir:L(),startedAt:md()}))}),dm=Od({runId:L(),threadId:L()}),fm=Od({storageId:L(),name:L(),mediaType:L(),size:gd(),url:Zu().optional()}),pm=jd([Od({storageId:L(),name:L(),mediaType:L(),size:md(),url:L()}),Od({error:L()})]);function mm(e){let t=`userId=${encodeURIComponent(e.userId)}&name=${encodeURIComponent(e.name)}`;return e.threadId&&(t+=`&threadId=${encodeURIComponent(e.threadId)}`),`/api/transcript/upload?${t}`}var hm=Od({id:L(),threadId:L(),runId:L(),sequence:gd().nonnegative(),kind:zd([`prompt`,`text`,`work`,`approval`]),text:L().optional(),attachments:Ed(fm).optional(),mandateId:L().optional(),approvalUrl:L().optional(),itemCount:gd().nonnegative(),pendingTools:gd().nonnegative(),provisional:vd().optional(),startedAt:md().optional(),completedAt:md().optional(),closed:vd(),revision:gd().nonnegative()}).transform(e=>({...e,threadId:Em(e.threadId),runId:Em(e.runId),attachments:e.attachments?.map(e=>({...e,storageId:Em(e.storageId)}))})),gm=Od({replicaId:L(),rows:Ed(hm),indexing:vd(),stale:vd(),nextBefore:gd().nonnegative().optional(),endSequence:gd().nonnegative(),revision:gd().nonnegative(),persistedStreams:Ed(Od({runId:L().transform(e=>Em(e)),streamId:L()})),changes:Ed(Od({id:L(),row:hm.nullable()})),changesCursor:Od({revision:gd().nonnegative(),sequence:gd().min(-1)}),moreChanges:vd()}),_m=Od({parts:Ed(Sd()),indexing:vd(),nextAfter:gd().nonnegative().optional(),previousBefore:gd().nonnegative().optional(),revision:gd().nonnegative(),stale:vd()}),vm=Od({eventType:L(),totalParts:gd().optional(),stale:vd()}),ym=Od({threadId:L(),runId:L(),runStatus:zd([`queued`,`running`,`completed`,`failed`,`cancelled`]),streamId:L().min(1),text:L(),parts:Ed(Sd()),runStartedAt:gd()}),bm=Nd(`eventType`,[Od({eventType:Vd(`updated`),live:ym}),Od({eventType:Vd(`cleared`)})]),xm=Od({artifacts:Ed(Od({_id:L(),userId:L(),repositoryKey:L(),localPath:L().optional(),content:L(),type:zd([`markdown`,`html`,`react`]),title:L(),revision:md(),createdAt:md(),updatedAt:md(),localError:L().optional()})),stale:vd(),error:L().optional()}),Sm=Od({accounts:Ed(Od({connectionId:L(),label:L(),connected:vd()})),activeConnectionId:L().nullable(),loginAvailable:vd(),error:L().optional()}),Cm=Od({state:L(),authorizeUrl:L()}),wm=Od({status:zd([`pending`,`complete`,`error`]),error:L().optional()}),Tm=Od({warning:L().nullable()});function Em(e){return e}function Dm(e){return e}function Om(e){return{threadId:Em(e.threadId),runId:Em(e.runId),runStatus:e.runStatus,streamId:e.streamId,text:e.text,parts:e.parts,runStartedAt:e.runStartedAt}}function km(e){return e.eventType===`updated`?{eventType:`updated`,live:Om(e.live)}:{eventType:`cleared`}}function Am(e){return{artifacts:e.artifacts,stale:e.stale,error:e.error}}function jm(){return globalThis.window?globalThis.window.location.origin:null}function Mm(e){if(!globalThis.window)return null;let t=globalThis.window.location.hash.startsWith(`#`)?globalThis.window.location.hash.slice(1):globalThis.window.location.hash;return new URLSearchParams(t).get(e)}function Nm(){return Mm(`workspace`)}function Pm(){if(!globalThis.window)return;let e=new URL(globalThis.window.location.href);e.hash=``,globalThis.window.history.replaceState(null,``,`${e.pathname}${e.search}`)}async function Fm(e){let t=await fetch(`${e}/api/auth/bootstrap`,{method:`POST`,credentials:`include`});if(!t.ok){let e=rm.safeParse(await t.json().catch(()=>null));throw Error(e.success?e.data.error??`Failed to authenticate with the Sprocket server.`:`Failed to authenticate with the Sprocket server.`)}}async function Im(e){let t=await fetch(`${e}/api/auth/session`,{credentials:`include`});if(!t.ok)return!1;let n=im.safeParse(await t.json());return n.success?!!n.data.authenticated:!1}var Lm=new Map;async function Rm(e){let t=Lm.get(e);if(t)return await t;let n=zm(e);Lm.set(e,n);try{await n}finally{Lm.delete(e)}}async function zm(e){await Im(e)||await Fm(e)}function Bm(e){let t=nm(e),{request:n}=t;return{browseFilesystem:e=>{let t=e.cwd?{partialPath:e.partialPath,cwd:e.cwd}:{partialPath:e.partialPath};return n(`/api/workspace/browse`,am,{method:`POST`,body:JSON.stringify(t)})},listWorkspaceSkills:e=>n(`/api/workspace/skills`,om,{method:`POST`,body:JSON.stringify({workspacePath:e.workspacePath})}),searchWorkspace:(e,t)=>n(`/api/workspace/search`,sm,{method:`POST`,body:JSON.stringify(e),signal:t}),resolveWorkspacePath:e=>{let t=e.createIfMissing?{workspacePath:e.workspacePath,createIfMissing:!0}:{workspacePath:e.workspacePath};return n(`/api/workspace/resolve`,cm,{method:`POST`,body:JSON.stringify(t)})},listProjectAttachments:async()=>(await n(`/api/workspace/projects`,Ed(lm))).map(Dm),attachProject:async e=>Dm(await n(`/api/workspace/projects`,lm,{method:`POST`,body:JSON.stringify(e)})),listRunningCommands:(e,t)=>n(`/api/agent/commands`,um,{method:`POST`,body:JSON.stringify(e),signal:t}),terminateCommand:e=>n(`/api/agent/commands/terminate`,Od({terminated:vd()}),{method:`POST`,body:JSON.stringify(e)}),runAgent:async e=>{let t=await n(`/api/agent/run`,dm,{method:`POST`,body:JSON.stringify(e)});return{runId:Em(t.runId),threadId:Em(t.threadId)}},fetchTranscriptDisplay:async(e,t)=>await n(`/api/transcript/display`,gm,{method:`POST`,body:JSON.stringify(e),signal:t}),fetchTranscriptDisplayDetails:async(e,t)=>{let r=await n(`/api/transcript/display-details`,_m,{method:`POST`,body:JSON.stringify(e),signal:t});return{...r,parts:r.parts}},watchTranscript:async(e,n)=>{await t.postEventStream(`/api/transcript/watch`,e,n.signal,e=>{let t=vm.safeParse(JSON.parse(e));t.success&&n.onEvent(t.data)})},watchLiveCompletion:async(e,n)=>{await t.postEventStream(`/api/agent/live`,e,n.signal,e=>{let t=bm.safeParse(JSON.parse(e));t.success&&n.onEvent(km(t.data))})},clearTranscriptReplica:async e=>{await t.response(`/api/transcript/clear`,{method:`POST`,body:JSON.stringify(e)})},fetchTranscriptAttachment:async t=>{let n=await fetch(`${e}/api/transcript/attachment`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`},body:JSON.stringify(t)});return n.status===404||!n.ok?null:await n.blob()},uploadTranscriptAttachment:async e=>{let t=await n(mm({userId:e.userId,name:e.name,threadId:e.threadId}),pm,{method:`POST`,headers:{"content-type":e.file.type.trim()||`application/octet-stream`},body:e.file});return`error`in t?t:{storageId:Em(t.storageId),name:t.name,mediaType:t.mediaType,size:t.size,url:t.url}},discardTranscriptAttachment:async e=>await n(`/api/transcript/discard`,vd(),{method:`POST`,body:JSON.stringify({userId:e.userId,storageId:e.storageId,threadId:e.threadId})}),deleteArtifact:async e=>{await n(`/api/artifacts/delete`,bd(),{method:`POST`,body:JSON.stringify(e)})},watchArtifacts:async(e,n)=>{await t.postEventStream(`/api/artifacts/watch`,e,n.signal,e=>{let t=xm.parse(JSON.parse(e));n.onEvent(Am(t))})},requestRunCancellation:async e=>{await n(`/api/threads/cancel`,vd(),{method:`POST`,body:JSON.stringify(e)})},startAccountSession:async e=>{await n(`/api/threads/account-session/start`,bd(),{method:`POST`,body:JSON.stringify(e)})},endAccountSession:async e=>{await n(`/api/threads/account-session/end`,bd(),{method:`POST`,body:JSON.stringify(e)})},fetchChatGptStatus:async e=>await n(`/api/chatgpt/status`,Sm,{method:`POST`,body:JSON.stringify(e)}),startChatGptBrowserLogin:async e=>await n(`/api/chatgpt/browser/start`,Cm,{method:`POST`,body:JSON.stringify(e)}),fetchChatGptBrowserLoginResult:async e=>await n(`/api/chatgpt/browser/result`,wm,{method:`POST`,body:JSON.stringify(e)}),cancelChatGptBrowserLogin:async e=>{await n(`/api/chatgpt/browser/cancel`,bd(),{method:`POST`,body:JSON.stringify(e)})},selectChatGptAccount:async e=>{await n(`/api/chatgpt/select`,bd(),{method:`POST`,body:JSON.stringify(e)})},disconnectChatGptAccount:async e=>{let{warning:t}=await n(`/api/chatgpt/disconnect`,Tm,{method:`POST`,body:JSON.stringify(e)});return t}}}async function Vm(){let e=jm();if(!e)throw Error(`Unable to resolve the Sprocket server URL.`);return await Rm(e),Bm(e)}function Hm(e){let t=e,n=new Set,r=e=>{if(!Object.is(t,e)){t=e;for(let e of n)e()}};return{getSnapshot:()=>t,subscribe(e){return n.add(e),()=>{n.delete(e)}},set:r,update:e=>r(e(t))}}function Um(e,t){let n=e.getSnapshot(),r=t(n);return{subscribe:e.subscribe,getSnapshot(){let i=e.getSnapshot();return Object.is(n,i)||(n=i,r=t(i)),r}}}function Wm(e){return(0,F.useSyncExternalStore)(e.subscribe,e.getSnapshot)}var Gm=Hm({isLoading:!0,isReady:!1,isConfigured:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,user:null,nativeSession:`notRequired`,error:null}),Km=Um(Gm,e=>e.user?.id??null),qm=Um(Gm,e=>!e.isReady||e.isLoading),Jm=Hm(0),Ym=Hm(!1),Xm=1500,Zm=3e5,Qm=`Native sign-in is temporarily unavailable. Try again.`,$m=null,eh=`This device is signed in with a different account. Sign out, then sign in with the same account.`,th={createAuthKitClient:Gp,resolveLocalApiBaseUrl:jm,ensureLocalSession:Rm},nh=!1;function rh(){return globalThis.window??null}var ih=null,ah=null,oh=null,sh=!1,ch=null,lh=Promise.resolve(),uh=0,dh=null,fh=null,ph=Od({error:L().optional()}),mh=Od({authorizationUrl:Zu(),loginId:L()}),hh=Od({id:L(),email:qu(),firstName:L().nullable().optional(),lastName:L().nullable().optional(),profilePictureUrl:L().nullable().optional()}),gh=Od({accessToken:L(),user:hh}).nullable(),_h=Nd(`status`,[Od({status:Vd(`signedOut`)}),Od({status:Vd(`pending`)}),Od({status:Vd(`authenticated`),user:Od({id:L(),email:qu()})}),Od({status:Vd(`unavailable`),error:L()}),Od({status:Vd(`failed`),error:L()})]);function vh(e){return{id:e.id,email:e.email,firstName:e.firstName??null,lastName:e.lastName??null,profilePictureUrl:e.profilePictureUrl??null}}function yh(e={}){return{isLoading:!1,isReady:!0,isConfigured:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,user:null,nativeSession:`notRequired`,error:null,...e}}function bh(e){return e===408||e===429||e===500||e===502||e===503||e===504}function xh(){return!!(nh||Dh()||Oh())}function Sh(){return nh&&!Dh()&&!Oh()}function Ch(){ag(),uh+=1,fh=null}function wh(){if(oh)return oh;throw Error(`Auth bootstrap is not initialized.`)}async function Th(){if(ah)return await ah;ah=wh().query(Jp.authBootstrap.getClientConfig,{});try{return await ah}catch(e){throw ah=null,e}}async function Eh(){return(await Th()).workosClientId?.trim()||void 0}function Dh(){let e=rh();if(!e)return null;let t=e.sprocketDesktopBridge;return!t?.openExternal||!t.focusWindow?null:t}function Oh(){let e=rh();return e?pr(e.location.hostname,!1):!1}async function kh(){let e=th.resolveLocalApiBaseUrl();if(!e)throw Error(`Unable to resolve the Sprocket server URL.`);await th.ensureLocalSession(e)}async function Ah(){return rh()?(ih||=(async()=>{let e=await Eh();if(!e)return Gm.set(yh({isConfigured:!1})),null;let t=null;try{t=await th.createAuthKitClient(e,{redirectUri:`${rh()?.location.origin}/callback`,onRedirectCallback:()=>{window.location.replace(`/`)},onRefresh:()=>{let e=t?.getUser()??null;Gm.update(t=>({...t,user:e?vh(e):null,error:null}))},onRefreshFailure:()=>{let e=t?.getUser()??null;Gm.update(t=>({...t,user:e?vh(e):null,error:t.user&&!e&&!sh?`Session refresh failed. Sign in again.`:t.error}))}});let n=t.getUser();return Gm.set({isLoading:!1,isReady:!0,isConfigured:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,user:n?vh(n):null,nativeSession:Gm.getSnapshot().nativeSession,error:null}),t}catch(e){throw ih=null,e}})(),await ih):null}async function jh(e,t={}){nh=t.machine===!0,oh=e;let n=uh,r=Gm.getSnapshot();Gm.set({...r,isLoading:!0,nativeSession:xh()&&!r.user?`loading`:r.nativeSession});try{if(xh()){if(Sh()&&rh()?.location.protocol!==`https:`)throw Error(`Remote Sprocket access requires HTTPS.`);if(await kh(),n!==uh)return;await Ph(n),Mh();return}await Nh()}catch(e){if(n!==uh)return;Gm.update(t=>({...t,isLoading:!1,isReady:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,nativeSession:t.nativeSession===`loading`?`unavailable`:t.nativeSession,error:e instanceof Error?e.message:`Failed to initialize authentication.`}))}}function Mh(){if(dh||!globalThis.EventSource)return;let e=new EventSource(`/api/auth/changes`);dh=e,e.onmessage=()=>{dh!==e||sh||(Ch(),Ph(uh))}}async function Nh(){let e=(await Ah())?.getUser()??null;Gm.update(t=>t.isConfigured?{isLoading:!1,isReady:!0,isConfigured:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,user:e?vh(e):null,nativeSession:`notRequired`,error:null}:{...t,isLoading:!1,isReady:!0})}async function Ph(e){let t=await zh(!1,e);e===uh&&Fh(t)}function Fh(e){switch(e.kind){case`session`:Gm.set({isLoading:!1,isReady:!0,isConfigured:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,user:e.user,nativeSession:`ready`,error:null});return;case`signedOut`:Gm.set(yh());return;case`transient`:Gm.update(t=>({...t,isLoading:!1,isReady:!0,nativeSession:t.nativeSession===`loading`?`unavailable`:t.nativeSession,error:t.nativeSession===`loading`?e.error:t.error}));return;case`unauthorized`:Gm.update(t=>({...t,isLoading:!1,isReady:!0,nativeSession:`unavailable`,error:e.error}));return;case`mismatch`:Gm.update(t=>({...t,isLoading:!1,isReady:!0,nativeSession:`mismatch`,error:e.error}));return;case`stale`:return;case`error`:Gm.update(t=>({...t,isLoading:!1,isReady:!0,nativeSession:t.nativeSession===`loading`?`unavailable`:t.nativeSession,error:e.error}))}}async function Ih(){let e=await fetch(`/api/auth/native-session`,{method:`DELETE`,credentials:`include`});if(!e.ok)throw Error(await Vh(e,`Failed to clear native session.`))}async function Lh(){let e=await fetch(`/api/auth/session`,{method:`DELETE`,credentials:`include`});if(!e.ok)throw Error(await Vh(e,`Failed to clear browser session.`))}async function Rh(){if(!xh())return;let e=uh,t=await zh(!1,e);e===uh&&Fh(t)}async function zh(e,t){if(t!==uh)return{kind:`stale`};let n=fh;if(n&&n.generation===t){let r=await n.promise;if(t!==uh)return{kind:`stale`};if(!e||n.forceRefreshToken)return r}let r=Bh(e);fh={generation:t,forceRefreshToken:e,promise:r};try{let e=await r;return t===uh?e:{kind:`stale`}}finally{fh?.promise===r&&(fh=null)}}async function Bh(e){let t;try{t=await fetch(`/api/auth/native-session/token`,{method:`POST`,credentials:`include`,signal:AbortSignal.timeout(3e4),headers:{"content-type":`application/json`},body:JSON.stringify({forceRefreshToken:e})})}catch(e){return{kind:`transient`,error:e instanceof Error?e.message:Qm}}if(t.status===401)return{kind:`unauthorized`,error:await Vh(t,`Your local Sprocket session is unavailable. Reload the app to reconnect.`)};if(t.status===409)return{kind:`mismatch`,error:await Vh(t,eh)};if(bh(t.status))return{kind:`transient`,error:await Vh(t,Qm)};if(!t.ok)return{kind:`error`,error:await Vh(t,`Failed to read the native session.`)};let n=gh.safeParse(await t.json().catch(()=>void 0));return n.success?n.data===null?{kind:`signedOut`}:{kind:`session`,accessToken:n.data.accessToken,user:vh(n.data.user)}:{kind:`error`,error:`Local server returned an invalid native session.`}}async function Vh(e,t){let n=ph.safeParse(await e.json().catch(()=>null));return n.success?n.data.error??t:t}async function Hh(e){let t=await fetch(`/api/auth/desktop-login/start`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`},body:JSON.stringify({flow:e})});if(!t.ok)throw Error(await Vh(t,`Failed to start desktop sign-in.`));let n=mh.safeParse(await t.json());if(!n.success)throw Error(`Local server returned an invalid desktop sign-in URL.`);return n.data}function Uh(e){return ch===e&&!e.abort.signal.aborted}function Wh(e){if(!Uh(e))throw new DOMException(`Aborted`,`AbortError`)}async function Gh(e,t){let n=lh,r;lh=new Promise(e=>{r=e}),await n;try{Wh(e);let{authorizationUrl:n,loginId:r}=await Hh(t);return e.loginId=r,Wh(e),n}finally{r()}}async function Kh(e){let t;try{t=await fetch(`/api/auth/desktop-login/result`,{method:`POST`,credentials:`include`,signal:AbortSignal.any([e,AbortSignal.timeout(15e3)])})}catch(t){if(e.aborted)throw t;return null}if(bh(t.status))return null;if(!t.ok)throw Error(await Vh(t,`Failed to check desktop sign-in status.`));return _h.parse(await t.json())}async function qh(e){let t=Date.now();for(;!e.aborted;){if(Date.now()-t>Zm)throw Error(`Sign-in timed out. Try again.`);let n=await Kh(e);if(n?.status===`failed`)throw Error(n.error||`Desktop sign-in failed.`);if(n?.status===`authenticated`)return n.user;await new Promise((t,n)=>{let r=setTimeout(()=>{e.removeEventListener(`abort`,i),t()},Xm);function i(){clearTimeout(r),n(new DOMException(`Aborted`,`AbortError`))}e.addEventListener(`abort`,i,{once:!0})})}throw new DOMException(`Aborted`,`AbortError`)}async function Jh(e){let t=Dh();if(!xh())throw Error(`Machine browser sign-in is unavailable.`);Zh();let n={abort:new AbortController,loginId:null};ch=n,Gm.update(e=>({...e,isWaitingForBrowserSignIn:!0,browserSignInUrl:null,error:null}));try{await kh(),Wh(n);let r=await Gh(n,e);if(Wh(n),Gm.update(e=>({...e,browserSignInUrl:r})),Wh(n),t)t.openExternal(r).catch(e=>{if(!Uh(n))return;let t=e instanceof Error?e.message.trim():``;Gm.update(e=>({...e,error:t||`Automatic browser open failed.`}))});else{let e=window.open(r,`_blank`);if(e)try{e.opener=null}catch{}else Gm.update(e=>({...e,error:`Your browser blocked the sign-in window.`}))}let i=await qh(n.abort.signal);if(Wh(n),t)try{await t.focusWindow()}catch(e){Uh(n)&&console.warn(`Failed to focus desktop window after sign-in`,e)}Wh(n),await Yh(n,i)}catch(e){if(ch!==n)return;if(e instanceof DOMException&&e.name===`AbortError`){Gm.update(e=>({...e,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,error:null}));return}Gm.update(t=>({...t,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,error:e instanceof Error?e.message:`Failed to sign in with the browser.`}))}finally{ch===n&&(ch=null)}}async function Yh(e,t){Ch();let n=await zh(!1,uh);Wh(e),n.kind!==`stale`&&Xh(n,vh(t))}function Xh(e,t){switch(e.kind){case`session`:Gm.set({isLoading:!1,isReady:!0,isConfigured:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,user:e.user,nativeSession:`ready`,error:null});return;case`transient`:Gm.set({isLoading:!1,isReady:!0,isConfigured:!0,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,user:t,nativeSession:`ready`,error:null});return;case`signedOut`:Gm.set(yh({error:`Native sign-in finished without a session. Try again.`}));return;case`unauthorized`:Gm.update(t=>({...t,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,nativeSession:`unavailable`,error:e.error}));return;case`mismatch`:Gm.update(t=>({...t,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,nativeSession:`mismatch`,error:e.error}));return;case`error`:Gm.update(t=>({...t,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,nativeSession:`unavailable`,error:e.error}));return;case`stale`:return}}function Zh(){ch?.abort.abort(),ch=null}function Qh(){let e=ch,t=lh;Zh(),Gm.update(e=>({...e,isWaitingForBrowserSignIn:!1,browserSignInUrl:null,error:null})),e&&t.then(async()=>{e.loginId&&await fetch(`/api/auth/desktop-login/cancel`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`},body:JSON.stringify({loginId:e.loginId})})}).catch(()=>{})}function $h(){Gm.update(e=>!e.isWaitingForBrowserSignIn||e.error===null?e:{...e,error:null})}async function eg(e){if(xh()){await Jh(e);return}let t=await Ah();if(t&&await Eh()){if(e===`signUp`){await t.signUp();return}await t.signIn()}}async function tg(){await eg(`signIn`)}async function ng(){await eg(`signUp`)}async function rg(){Qh(),sh=!0,Ch(),Gm.update(e=>({...e,isLoading:!0}));let e=[],t=!1,n=null;try{if(xh())try{Sh()?await Lh():await Ih()}catch(t){e.push(t instanceof Error?t.message:`Failed to clear native session.`)}else{let r=await Ah();if(!r){Gm.set(yh());return}try{await r.signOut({navigate:!1,returnTo:window.location.origin})}catch(i){t=!0;let a=r.getUser();n=a?vh(a):null,e.push(i instanceof Error?i.message:`Failed to clear browser session.`)}}Ym.set(!1),Gm.set(yh({user:t?n:null,nativeSession:e.length===0?`notRequired`:`unavailable`,error:e.length===0?null:e.join(` `)}))}catch(e){Gm.update(t=>({...t,isLoading:!1,error:e instanceof Error?e.message:`Failed to sign out.`}))}finally{sh=!1}}async function ig({forceRefreshToken:e=!1}={}){if(xh()){let t=uh,n=await zh(e,t);return t!==uh||n.kind===`stale`?null:sg(n,t)}return await cg({forceRefreshToken:e})}function ag(){$m!==null&&(clearTimeout($m),$m=null)}async function og(e){let t=uh;try{if(xh()&&Gm.getSnapshot().nativeSession===`unavailable`&&(await kh(),t!==uh))return null;let n=await ig(e);return t===uh?(ag(),n):null}catch(e){if(t!==uh)return null;Gm.update(t=>({...t,error:e instanceof Error?e.message:`Session refresh is temporarily unavailable.`}));let n=Gm.getSnapshot();return n.user&&n.nativeSession!==`mismatch`&&$m===null&&($m=setTimeout(()=>{$m=null,t===uh&&Gm.getSnapshot().user&&Jm.update(e=>e+1)},5e3)),null}}function sg(e,t){if(t!==uh)return null;switch(e.kind){case`session`:return Gm.update(t=>({...t,user:e.user,nativeSession:`ready`,error:null})),e.accessToken;case`signedOut`:return Gm.update(e=>({...e,user:null,nativeSession:`notRequired`,error:null})),null;case`transient`:throw Error(e.error);case`unauthorized`:throw Gm.update(t=>({...t,nativeSession:`unavailable`,error:e.error})),Error(e.error);case`mismatch`:throw Gm.update(t=>({...t,nativeSession:`mismatch`,error:e.error})),Error(e.error);case`error`:throw Error(e.error);case`stale`:return null}}async function cg({forceRefreshToken:e}){let t=await Ah();if(!t)return null;try{return await t.getAccessToken({forceRefresh:e})}catch(e){if(e instanceof Error&&e.name===`LoginRequiredError`)return Gm.update(e=>({...e,user:null})),null;throw e}}function lg(e){return e.retryPending?e.isAuthenticated?{clearPending:!0,sawLoadingDuringRetry:e.sawLoadingDuringRetry}:e.isLoading?{clearPending:!1,sawLoadingDuringRetry:!0}:e.sawLoadingDuringRetry?{clearPending:!0,sawLoadingDuringRetry:!0}:{clearPending:!1,sawLoadingDuringRetry:!1}:{clearPending:!1,sawLoadingDuringRetry:!1}}async function ug(){let e=uh;Gm.update(e=>({...e,isLoading:!0,error:null})),Ym.set(!0);try{if(xh()&&(await kh(),e!==uh))return;let t=await ig({forceRefreshToken:!0});if(e!==uh)return;if(!t)throw Error(`Your session has expired. Sign in again.`);Jm.update(e=>e+1),Gm.update(e=>({...e,isLoading:!1,error:null}))}catch(t){if(e!==uh)return;Ym.set(!1),Gm.update(e=>({...e,isLoading:!1,error:t instanceof Error?t.message:`Failed to refresh authentication.`}))}}var dg=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),R=o(((e,t)=>{t.exports=dg()}))();function fg(){let e=Wm(qm),t=Wm(Km),n=Wm(Jm),r=(0,F.useCallback)(e=>og(e),[n,t]);return{isLoading:e,isAuthenticated:!!t,fetchAccessToken:r}}function pg({client:e,machine:t,children:n}){return(0,F.useEffect)(()=>{jh(e,{machine:t})},[e,t]),(0,R.jsx)(lr,{client:e,useAuth:fg,children:n})}var mg=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function hg(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:mg(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var gg=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},_g=e=>{let t=gg(e);return t.charAt(0).toUpperCase()+t.slice(1)},vg=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),yg={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function bg(e){return e!=null}function xg(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??yg.width,a=e.size??e.height??yg.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?vg(...c):vg(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??yg[`stroke-width`])*Number(e.size??e.width??yg.width)/Number(t.size??t.width??yg.width):t.strokeWidth??yg[`stroke-width`];return[`svg`,{...Object.entries(yg).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&bg(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&bg(t.width)&&{[r(`width`)]:t.width},...`height`in t&&bg(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Sg(e,t={}){return xg(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Cg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},wg=(0,F.createContext)({}),Tg=()=>(0,F.useContext)(wg),Eg=(0,F.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Tg()??{},y=!!c||Cg(d),[b,x,S=[]]=Sg(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:vg(v,s),hasA11yProp:y,attributes:d});return(0,F.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,F.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Dg(e,t=[],n=[]){let r=typeof e==`string`?hg(e,t,n):e,i=(0,F.forwardRef)(({className:e,...t},n)=>(0,F.createElement)(Eg,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=_g(r.name)),i}var Og={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Og.node;var kg=Dg(Og),Ag={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Ag.node;var jg=Dg(Ag),Mg={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Mg.node;var Ng=Dg(Mg),Pg={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Pg.node;var Fg=Dg(Pg),Ig={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};Ig.node;var Lg=Dg(Ig),Rg={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]};Rg.node;var zg=Dg(Rg),Bg={name:`chart-no-axes-column`,size:24,node:[[`path`,{d:`M5 21v-6`,key:`1hz6c0`}],[`path`,{d:`M12 21V3`,key:`1lcnhd`}],[`path`,{d:`M19 21V9`,key:`unv183`}]],aliases:[`bar-chart-2`]};Bg.node;var Vg=Dg(Bg),Hg={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Hg.node;var Ug=Dg(Hg),Wg={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Wg.node;var Gg=Dg(Wg),Kg={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Kg.node;var qg=Dg(Kg),Jg={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Jg.node;var Yg=Dg(Jg),Xg={name:`circle-dollar-sign`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`,key:`1h4pet`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}]]};Xg.node;var Zg=Dg(Xg),Qg={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};Qg.node;var $g=Dg(Qg),e_={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};e_.node;var t_=Dg(e_),n_={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};n_.node;var r_=Dg(n_),i_={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};i_.node;var a_=Dg(i_),o_={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};o_.node;var s_=Dg(o_),c_={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};c_.node;var l_=Dg(c_),u_={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]};u_.node;var d_=Dg(u_),f_={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};f_.node;var p_=Dg(f_),m_={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};m_.node;var h_=Dg(m_),g_={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};g_.node;var __=Dg(g_),v_={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};v_.node;var y_=Dg(v_),b_={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]};b_.node;var x_=Dg(b_),S_={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};S_.node;var C_=Dg(S_),w_={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};w_.node;var T_=Dg(w_),E_={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};E_.node;var D_=Dg(E_),O_={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};O_.node;var k_=Dg(O_),A_={name:`fullscreen`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`rect`,{width:`10`,height:`8`,x:`7`,y:`8`,rx:`1`,key:`vys8me`}]]};A_.node;var j_=Dg(A_),M_={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};M_.node;var N_=Dg(M_),P_={name:`hourglass`,size:24,node:[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]};P_.node;var F_=Dg(P_),I_={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};I_.node;var L_=Dg(I_),R_={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};R_.node;var z_=Dg(R_),B_={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};B_.node;var V_=Dg(B_),H_={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};H_.node;var U_=Dg(H_),W_={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};W_.node;var G_=Dg(W_),K_={name:`notebook-pen`,size:24,node:[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]};K_.node;var q_=Dg(K_),J_={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};J_.node;var Y_=Dg(J_),X_={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};X_.node;var Z_=Dg(X_),Q_={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Q_.node;var $_=Dg(Q_),ev={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};ev.node;var tv=Dg(ev),nv={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};nv.node;var rv=Dg(nv),iv={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};iv.node;var av=Dg(iv),ov={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};ov.node;var sv=Dg(ov),cv={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};cv.node;var lv=Dg(cv),uv={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};uv.node;var dv=Dg(uv),fv={name:`shrink`,size:24,node:[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`,key:`17vawe`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`,key:`chjx8e`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`,key:`lav6yq`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`,key:`1pxi2q`}]]};fv.node;var pv=Dg(fv),mv={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};mv.node;var hv=Dg(mv),gv={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};gv.node;var _v=Dg(gv),vv={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};vv.node;var yv=Dg(vv),bv={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};bv.node;var xv=Dg(bv),Sv={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};Sv.node;var Cv=Dg(Sv),wv={name:`text-wrap`,size:24,node:[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]],aliases:[`wrap-text`]};wv.node;var Tv=Dg(wv),Ev={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Ev.node;var Dv=Dg(Ev),Ov={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};Ov.node;var kv=Dg(Ov),Av={name:`wallet`,size:24,node:[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]};Av.node;var jv=Dg(Av),Mv={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Mv.node;var Nv=Dg(Mv),Pv={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Pv.node;var Fv=Dg(Pv),Iv={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};Iv.node;var Lv=Dg(Iv);function Rv(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rv(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function zv(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rv(e))&&(r&&(r+=` `),r+=t);return r}var Bv=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Vv=(e,t)=>({classGroupId:e,validator:t}),Hv=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Uv=`-`,Wv=[],Gv=`arbitrary..`,Kv=e=>{let t=Yv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Jv(e);let n=e.split(Uv);return qv(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Bv(i,t):t:i||Wv}return n[e]||Wv}}},qv=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=qv(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Uv):e.slice(t).join(Uv),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Jv=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Gv+r:void 0})(),Yv=e=>{let{theme:t,classGroups:n}=e;return Xv(n,t)},Xv=(e,t)=>{let n=Hv();for(let r in e){let i=e[r];Zv(i,n,r,t)}return n},Zv=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Qv(i,t,n,r)}},Qv=(e,t,n,r)=>{if(typeof e==`string`){$v(e,t,n);return}if(typeof e==`function`){ey(e,t,n,r);return}ty(e,t,n,r)},$v=(e,t,n)=>{let r=e===``?t:ny(t,e);r.classGroupId=n},ey=(e,t,n,r)=>{if(ry(e)){Zv(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Vv(n,e))},ty=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Zv(o,ny(t,a),n,r)}},ny=(e,t)=>{let n=e,r=t.split(Uv),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Hv(),n.nextPart.set(t,i)),n=i}return n},ry=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,iy=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},ay=`!`,oy=`:`,sy=[],cy=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ly=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===oy){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(ay)?(c=s.slice(0,-1),l=!0):s.startsWith(ay)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return cy(t,l,c,u)};if(t){let e=t+oy,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):cy(sy,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},uy=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},dy=e=>({cache:iy(e.cacheSize),parseClassName:ly(e),sortModifiers:uy(e),postfixLookupClassGroupIds:fy(e),...Kv(e)}),fy=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},py=/\s+/,my=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(py),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+ay:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},hy=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=gy(n))&&(i&&(i+=` `),i+=r);return i},gy=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=gy(e[r]))&&(n&&(n+=` `),n+=t);return n},_y=(e,...t)=>{let n,r,i,a,o=o=>(n=dy(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=my(e,n);return i(e,a),a};return a=o,(...e)=>a(hy(...e))},vy=[],yy=e=>{let t=t=>t[e]||vy;return t.isThemeGetter=!0,t.themeKey=e,t},by=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sy=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Cy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ty=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Ey=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oy=e=>Sy.test(e),ky=e=>!!e&&!Number.isNaN(Number(e)),Ay=e=>!!e&&Number.isInteger(Number(e)),jy=e=>e.endsWith(`%`)&&ky(e.slice(0,-1)),My=e=>Cy.test(e),Ny=()=>!0,Py=e=>wy.test(e)&&!Ty.test(e),Fy=()=>!1,Iy=e=>Ey.test(e),Ly=e=>Dy.test(e),Ry=e=>!z(e)&&!Jy(e),zy=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),By=e=>nb(e,ob,Fy),z=e=>by.test(e),Vy=e=>nb(e,sb,Py),Hy=e=>nb(e,cb,ky),Uy=e=>nb(e,ub,Ny),Wy=e=>nb(e,lb,Fy),Gy=e=>nb(e,ib,Fy),Ky=e=>nb(e,ab,Ly),qy=e=>nb(e,db,Iy),Jy=e=>xy.test(e),Yy=e=>rb(e,sb),Xy=e=>rb(e,lb),Zy=e=>rb(e,ib),Qy=e=>rb(e,ob),$y=e=>rb(e,ab),eb=e=>rb(e,db,!0),tb=e=>rb(e,ub,!0),nb=(e,t,n)=>{let r=by.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rb=(e,t,n=!1)=>{let r=xy.exec(e);return r?r[1]?t(r[1]):n:!1},ib=e=>e===`position`||e===`percentage`,ab=e=>e===`image`||e===`url`,ob=e=>e===`length`||e===`size`||e===`bg-size`,sb=e=>e===`length`,cb=e=>e===`number`,lb=e=>e===`family-name`,ub=e=>e===`number`||e===`weight`,db=e=>e===`shadow`,fb=_y(()=>{let e=yy(`color`),t=yy(`font`),n=yy(`text`),r=yy(`font-weight`),i=yy(`tracking`),a=yy(`leading`),o=yy(`breakpoint`),s=yy(`container`),c=yy(`spacing`),l=yy(`radius`),u=yy(`shadow`),d=yy(`inset-shadow`),f=yy(`text-shadow`),p=yy(`drop-shadow`),m=yy(`blur`),h=yy(`perspective`),g=yy(`aspect`),_=yy(`ease`),v=yy(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Jy,z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Jy,z,c],T=()=>[Oy,`full`,`auto`,...w()],E=()=>[Ay,`none`,`subgrid`,Jy,z],D=()=>[`auto`,{span:[`full`,Ay,Jy,z]},Ay,Jy,z],ee=()=>[Ay,`auto`,Jy,z],O=()=>[`auto`,`min`,`max`,`fr`,Jy,z],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],re=()=>[`auto`,...w()],ie=()=>[Oy,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[s,Oy,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[Oy,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,Jy,z],oe=()=>[...b(),Zy,Gy,{position:[Jy,z]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,Qy,By,{size:[Jy,z]}],le=()=>[jy,Yy,Vy],ue=()=>[``,`none`,`full`,l,Jy,z],de=()=>[``,ky,Yy,Vy],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[ky,jy,Zy,Gy],he=()=>[``,`none`,m,Jy,z],ge=()=>[`none`,ky,Jy,z],_e=()=>[`none`,ky,Jy,z],ve=()=>[ky,Jy,z],ye=()=>[Oy,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[My],breakpoint:[My],color:[Ny],container:[My],"drop-shadow":[My],ease:[`in`,`out`,`in-out`],font:[Ry],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[My],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[My],shadow:[My],spacing:[`px`,ky],text:[My],"text-shadow":[My],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Oy,z,Jy,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Jy,z]}],"container-named":[zy],columns:[{columns:[ky,`auto`,z,Jy,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ay,`auto`,Jy,z]}],basis:[{basis:[Oy,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ky,Oy,`auto`,`initial`,`none`,z]}],grow:[{grow:[``,ky,Jy,z]}],shrink:[{shrink:[``,ky,Jy,z]}],order:[{order:[Ay,`first`,`last`,`none`,Jy,z]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...k()]}],"min-inline-size":[{"min-inline":[`auto`,...k()]}],"max-inline-size":[{"max-inline":[`none`,...k()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...ie()]}],"font-size":[{text:[`base`,n,Yy,Vy]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,tb,Uy]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,jy,z]}],"font-family":[{font:[Xy,Wy,t]}],"font-features":[{"font-features":[z]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Jy,z]}],"line-clamp":[{"line-clamp":[ky,`none`,Jy,Hy]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,Jy,z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Jy,z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[ky,`from-font`,`auto`,Jy,Vy]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ky,`auto`,Jy,z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Ay,Jy,z]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Jy,z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Jy,z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ay,Jy,z],radial:[``,Jy,z],conic:[``,Ay,Jy,z]},$y,Ky]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ky,Jy,z]}],"outline-w":[{outline:[``,ky,Yy,Vy]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`inner`,`none`,u,eb,qy]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,eb,qy]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ky,Vy]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,eb,qy]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ky,Jy,z]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ky]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Jy,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ky]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Jy,z]}],filter:[{filter:[``,`none`,Jy,z]}],blur:[{blur:he()}],brightness:[{brightness:[ky,Jy,z]}],contrast:[{contrast:[ky,Jy,z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,eb,qy]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,ky,Jy,z]}],"hue-rotate":[{"hue-rotate":[ky,Jy,z]}],invert:[{invert:[``,ky,Jy,z]}],saturate:[{saturate:[ky,Jy,z]}],sepia:[{sepia:[``,ky,Jy,z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Jy,z]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[ky,Jy,z]}],"backdrop-contrast":[{"backdrop-contrast":[ky,Jy,z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ky,Jy,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ky,Jy,z]}],"backdrop-invert":[{"backdrop-invert":[``,ky,Jy,z]}],"backdrop-opacity":[{"backdrop-opacity":[ky,Jy,z]}],"backdrop-saturate":[{"backdrop-saturate":[ky,Jy,z]}],"backdrop-sepia":[{"backdrop-sepia":[``,ky,Jy,z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Jy,z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ky,`initial`,Jy,z]}],ease:[{ease:[`linear`,`initial`,_,Jy,z]}],delay:[{delay:[ky,Jy,z]}],animate:[{animate:[`none`,v,Jy,z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Jy,z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Jy,z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[Ay,Jy,z]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Jy,z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Jy,z]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[ky,Yy,Vy,Hy]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function pb(...e){return fb(zv(e))}function mb({type:e=`button`,variant:t=`default`,className:n=``,disabled:r=!1,href:i,onclick:a,children:o}){let s=pb(`focus-visible:ring-ring/50 inline-flex h-10 items-center justify-center gap-2 rounded-full border border-transparent px-5 py-2 text-sm font-medium transition-opacity focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,t===`outline`?`border-border bg-surface/80 text-foreground hover:bg-hover-fill`:`bg-primary text-primary-foreground hover:opacity-90`,n);return i&&!r?(0,R.jsx)(`a`,{href:i,className:s,onClick:a,children:o}):(0,R.jsx)(`button`,{type:e,disabled:r,className:s,onClick:a,children:o})}function hb({class:e=``,size:t=`md`,onclick:n,label:r}){let i=t===`sm`?`h-6 w-6`:`h-7 w-7`,a=t===`sm`?`text-lg`:`text-[1.15rem]`,o=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`img`,{src:`/logo.png`,alt:``,className:pb(`shrink-0`,i)}),(0,R.jsx)(`span`,{className:pb(`font-brand text-foreground truncate font-semibold tracking-tight`,a),children:`Sprocket`})]});return n?(0,R.jsx)(`button`,{type:`button`,className:pb(`flex min-w-0 items-center gap-2`,e),"aria-label":r,title:r,onClick:n,children:o}):(0,R.jsx)(`div`,{className:pb(`flex min-w-0 items-center gap-2`,e),children:o})}function gb(e){return e===`light`||e===`dark`}function _b(e){return e??`light`}var vb=0,yb=null;function bb(e){document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e}function xb(e){if(globalThis.document){if(vb>0){yb=e;return}bb(e)}}function Sb(){return globalThis.document?(vb===0&&(yb=gb(document.documentElement.dataset.theme)?document.documentElement.dataset.theme:_b(null),bb(`light`)),vb+=1,()=>{if(vb=Math.max(0,vb-1),vb===0){let e=yb??_b(null);yb=null,bb(e)}}):()=>{}}function Cb({title:e,description:t=null,busy:n=!1,class:r=``,children:i,actions:a}){return(0,F.useLayoutEffect)(Sb,[]),(0,R.jsx)(`div`,{className:pb(`app-entry-shell relative flex min-h-screen items-center justify-center px-8 py-10 text-center`,r),children:(0,R.jsxs)(`div`,{className:`relative z-10 w-full max-w-md`,"aria-busy":n||void 0,"aria-live":n?`polite`:void 0,children:[(0,R.jsx)(`div`,{className:`mb-8 flex justify-center`,children:(0,R.jsx)(hb,{})}),(0,R.jsx)(`h1`,{className:`font-brand text-foreground text-[1.5rem] font-semibold tracking-tight`,children:e}),t&&(0,R.jsx)(`p`,{className:`text-muted-foreground mt-3 text-sm leading-[1.55]`,children:t}),i&&(0,R.jsx)(`div`,{className:`mt-5 space-y-4 text-left [&:not(:has(*))]:mt-0 [&:not(:has(*))]:hidden`,children:i}),a&&(0,R.jsx)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-3 [&:not(:has(*))]:mt-0 [&:not(:has(*))]:hidden`,children:a})]})})}function wb({authState:e,overlayOpen:t=!1,onSignIn:n,onSignOut:r,onRetry:i,retryLabel:a=`Retry`,onSignUp:o}){let s=e.isAuthenticated&&(e.isLoading||!e.connectionFailed),c=!e.isAuthenticated&&e.isLoading,l=e.isConfigured?s?`Confirming your session`:e.connectionFailed?`Couldn’t connect your account`:c?`Preparing sign-in`:`Sign in to continue`:`Sign-in unavailable`,u=e.isConfigured?s?`Verifying your secure connection before opening your projects.`:e.connectionFailed?`Your session could not be confirmed. Retry when the connection is available.`:c?`Getting account sign-in ready. This usually takes a moment.`:`Sign in to sync your coding threads, streaming responses, and projects.`:`Account sign-in is not configured on this deployment, so account actions are disabled.`;return(0,R.jsx)(`div`,{inert:t,"aria-hidden":t||void 0,children:(0,R.jsxs)(Cb,{title:l,description:u,actions:(0,R.jsxs)(R.Fragment,{children:[e.connectionFailed&&e.isConfigured&&(0,R.jsx)(mb,{onclick:i,disabled:e.isLoading,children:a}),e.isAuthenticated?(0,R.jsx)(mb,{variant:`outline`,onclick:r,children:`Sign Out`}):e.isConfigured&&!e.connectionFailed&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(mb,{onclick:n,disabled:e.isLoading,children:`Sign In`}),(0,R.jsx)(mb,{variant:`outline`,onclick:o,disabled:e.isLoading,children:`Create Account`})]})]}),children:[e.isConfigured&&e.error&&!t&&(0,R.jsx)(`p`,{className:`text-destructive text-center text-sm`,role:`alert`,children:e.error}),e.isLoading&&(0,R.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-center gap-2 text-sm`,"aria-live":`polite`,"aria-busy":`true`,children:[(0,R.jsx)(V_,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{children:e.isAuthenticated?`Almost there`:`One moment`})]})]})})}function Tb({open:e,signInUrl:t,error:n=null,onCancel:r,onClearOpenError:i}){let[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(null),l=(0,F.useRef)(null),u=(0,F.useRef)(null),d=(0,F.useRef)(r),f=(0,F.useRef)(i);(0,F.useEffect)(()=>{d.current=r,f.current=i}),(0,F.useEffect)(()=>{if(!e){o(!1),c(null);return}let t=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();function n(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),d.current();return}let t=l.current;if(e.key!==`Tab`||!t)return;let n=Array.from(t.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`hidden`)&&e.offsetParent!==null);if(n.length===0){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===t||a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===t||a===i||!t.contains(a))&&(e.preventDefault(),r.focus())}return window.addEventListener(`keydown`,n,!0),()=>{window.removeEventListener(`keydown`,n,!0),u.current!==null&&(window.clearTimeout(u.current),u.current=null),t?.isConnected&&t.focus()}},[e]);async function p(){if(t)try{await navigator.clipboard.writeText(t),o(!0),c(null),u.current!==null&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{o(!1),u.current=null},2e3)}catch{o(!1),c(`Could not copy the sign-in link. Select it above and copy manually.`)}}function m(){if(!t)return;let e=window.open(t,`_blank`);if(e){try{e.opener=null}catch{}f.current?.()}}if(!e)return null;let h=t?n?{title:`Open the sign-in link`,description:`Your browser didn’t open automatically. Continue with the options below.`}:{title:`Finish signing in`,description:`We opened your browser to complete sign-in. Waiting for you to finish there.`}:{title:`Preparing sign-in`,description:`Preparing a secure sign-in link. This usually takes a moment.`};return(0,R.jsx)(`div`,{className:`app-entry-shell fixed inset-0 z-50 flex items-center justify-center px-6`,role:`presentation`,onClick:e=>{e.target===e.currentTarget&&r()},children:(0,R.jsxs)(`div`,{ref:l,className:`border-border/70 bg-surface relative z-10 w-full max-w-md rounded-2xl border p-8 text-center shadow-[0_18px_50px_-28px_oklch(0.2_0.02_260/0.45)] outline-none`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`browser-signin-title`,"aria-describedby":`browser-signin-desc`,tabIndex:-1,children:[!t&&(0,R.jsx)(`div`,{className:`text-muted-foreground mb-4 flex justify-center`,"aria-hidden":`true`,children:(0,R.jsx)(V_,{className:`size-5 animate-spin`})}),(0,R.jsx)(`h2`,{id:`browser-signin-title`,className:`font-brand text-foreground text-[1.35rem] font-semibold tracking-tight`,children:h.title}),(0,R.jsx)(`p`,{id:`browser-signin-desc`,className:`text-muted-foreground mt-3 text-sm leading-[1.55]`,children:h.description}),t&&(0,R.jsx)(`p`,{className:`text-muted-foreground mt-6 max-h-24 overflow-y-auto font-mono text-[11px] leading-5 break-all select-all`,title:t,children:t}),n&&(0,R.jsx)(`p`,{className:`text-destructive mt-4 text-sm`,role:`alert`,children:n}),s&&(0,R.jsx)(`p`,{className:`mt-4 text-sm text-amber-700`,role:`alert`,children:s}),(0,R.jsx)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-3`,children:t?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(mb,{onclick:m,children:[(0,R.jsx)(p_,{className:`size-4`,"aria-hidden":`true`}),`Open browser`]}),(0,R.jsx)(mb,{variant:`outline`,onclick:()=>void p(),children:a?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Ug,{className:`size-4`,"aria-hidden":`true`}),`Copied`]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(r_,{className:`size-4`,"aria-hidden":`true`}),`Copy link`]})})]}):(0,R.jsx)(`span`,{className:`text-muted-foreground border-border inline-flex h-10 items-center justify-center gap-2 rounded-full border px-4 text-sm`,children:`Preparing link…`})}),(0,R.jsx)(`div`,{className:`mt-6`,children:(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground decoration-foreground/30 hover:decoration-foreground text-[13px] underline underline-offset-4 transition-colors`,onClick:r,children:`Cancel`})})]})})}var Eb=`agent_decide`;function Db(e){return!!e.selectedOptionId?.trim()||!!e.text.trim()}var Ob=[`none`,`low`,`medium`,`high`,`xhigh`,`max`],kb=`gpt-5.6-sol`,Ab=`high`;function jb(e){return e.key===`Enter`&&!e.shiftKey&&!e.isComposing}function Mb(e){return e!==null&&Array.from(e.types).includes(`Files`)}var Nb=/(^|\s)@([^\s"@]*|"(?:[^"\\]|\\.)*)$/,Pb=/\\(["\\])/g,Fb=/[\\[\]`*_<>&~]/g,Ib=/[!'()*]/g;function Lb(e){return e.path+(e.kind===`directory`?`/`:``)}function Rb(e){return e.replace(Fb,e=>e===`&`?`&amp;`:`&#${e.charCodeAt(0)};`)}function zb(e){return encodeURIComponent(e).replace(Ib,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}function Bb(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t).match(Nb);if(!n||n.index===void 0)return null;let r=n[2],i=r.startsWith(`"`);return{query:i?r.slice(1).replace(Pb,`$1`):r,quoted:i,start:n.index+n[1].length}}function Vb(e,t,n){let r=Bb(e,t);if(!r)return null;let i=t;if(r.quoted){for(;i<e.length&&e[i]!==`"`;)i+=e[i]===`\\`&&i+1<e.length?2:1;e[i]===`"`&&(i+=1)}else for(;i<e.length&&!/\s/.test(e[i]);)i+=1;e[i]===` `&&(i+=1);let a=Lb(n),o=`[${Rb(n.path.slice(n.path.lastIndexOf(`/`)+1))}](${a.split(`/`).map(zb).join(`/`)}) `;return{text:e.slice(0,r.start)+o+e.slice(i),caret:r.start+o.length}}var Hb=/(^|\s)\$([a-z0-9-]*)$/i;function Ub(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t).match(Hb);return!n||n.index===void 0?null:{query:n[2].toLowerCase(),tokenStart:n.index+n[1].length}}function Wb(e,t){return Ub(e,t)?.query??null}function Gb(e,t){let n=t.toLowerCase(),r=[],i=[];for(let t of e){let e=t.name.toLowerCase();e.startsWith(n)?r.push(t):n.length>0&&e.includes(n)&&i.push(t)}return r.sort((e,t)=>e.name.localeCompare(t.name)),i.sort((e,t)=>e.name.localeCompare(t.name)),[...r,...i]}function Kb(e,t,n){let r=Ub(e,t);if(!r)return null;let i=t;for(;i<e.length&&/[a-z0-9-]/i.test(e[i]??``);)i+=1;e[i]===` `&&(i+=1);let a=`$${n} `;return{text:`${e.slice(0,r.tokenStart)}${a}${e.slice(i)}`,caret:r.tokenStart+a.length}}var qb=`/api`,Jb=`Model catalog is unavailable.`;function Yb(e,t){return e.models.find(e=>e.id===t)}function Xb(e){return e.reasoningEfforts.length!==1||e.reasoningEfforts[0]!==`none`}function Zb(e,t){return e.models.filter(e=>t===`spikonado`||e.provider===`openai`).map(e=>({id:e.id,label:e.label,provider:e.provider}))}function Qb(e,t,n){let r=Zb(e,t);return r.some(e=>e.id===n)?n:r.some(t=>t.id===e.defaultModelId)?e.defaultModelId:r[0]?.id}function $b(e){switch(e){case`none`:return`None`;case`low`:return`Low`;case`medium`:return`Medium`;case`high`:return`High`;case`xhigh`:return`Extra High`;case`max`:return`Max`;default:return e}}var ex=kd({id:L().min(1),label:L().min(1),provider:L().min(1),supportsImages:vd(),contextWindowTokens:gd(),autoCompactTokenLimit:gd(),reasoningEfforts:Ed(L()).min(1),defaultReasoningEffort:L().min(1),serviceTiers:Ed(L()).min(1),usagePolicy:Vd(`unlimited`).optional()}),tx=Od({sprocket:Od({protocolVersion:gd(),catalogVersion:L().min(1),defaultModelId:L().min(1),defaultReasoningEffort:L().min(1),defaultServiceTier:L().min(1),models:Ed(ex).min(1)})});function nx(e){let t=e.sprocket;if(t.protocolVersion!==1)throw Error(`${Jb} Unsupported protocol version ${t.protocolVersion}.`);return{protocolVersion:t.protocolVersion,catalogVersion:t.catalogVersion,defaultModelId:t.defaultModelId,defaultReasoningEffort:t.defaultReasoningEffort,models:t.models.map(e=>({id:e.id,label:e.label,provider:e.provider,supportsImages:e.supportsImages,contextWindowTokens:e.contextWindowTokens,autoHandoffTokenLimit:e.autoCompactTokenLimit,reasoningEfforts:e.reasoningEfforts,defaultReasoningEffort:e.defaultReasoningEffort,supportsFastMode:e.serviceTiers.includes(`fast`),usagePolicy:e.usagePolicy}))}}async function rx(e){let t=e.replace(/\/+$/,``);if(!t)throw Error(Jb);let n=await fetch(`${t}${qb}/v1/models`,{headers:{accept:`application/json`}});if(!n.ok)throw Error(Jb);let r=tx.safeParse(await n.json());if(!r.success)throw Error(Jb);return nx(r.data)}function ix(e){let t=Math.floor(e/60),n=e%60;return t===0?`${n}s`:`${t}m ${n}s`}function ax(e){let t=Math.max(0,e),n=Math.ceil(t/36e5);if(n>=24){let e=Math.floor(n/24),t=n%24;return t>0?`${e}d ${t}h`:`${e}d`}return t>=36e5?`${n}h`:`${Math.max(1,Math.ceil(t/6e4))}m`}function ox(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return n>0?r>0?`${n}d ${r}h`:`${n}d`:r>0?i>0?`${r}h ${i}m`:`${r}h`:i>0?`${i}m ${a}s`:`${a}s`}function sx(){let[e,t]=(0,F.useState)(()=>Date.now());return(0,F.useEffect)(()=>{let e=setInterval(()=>t(Date.now()),6e4);return()=>clearInterval(e)},[]),e}function cx({question:e,options:t,selectedOptionId:n,onToggleOption:r}){return(0,R.jsxs)(`div`,{className:`mb-3`,role:`group`,"aria-label":`Agent question`,children:[(0,R.jsx)(`p`,{className:`text-foreground text-[14px] leading-6 font-medium`,children:e}),(0,R.jsx)(`ul`,{className:`mt-2 flex flex-col gap-1.5`,"aria-label":`Answer options`,children:t.map(e=>{let t=e.id===Eb,i=n===e.id;return(0,R.jsx)(`li`,{children:(0,R.jsx)(`button`,{type:`button`,className:`w-full rounded-lg border px-3 py-2 text-left text-[13px] leading-5 transition ${i?`border-foreground/40 bg-hover-fill-strong text-foreground`:t?`border-border/70 text-muted-foreground/80 hover:text-muted-foreground hover:bg-hover-fill`:`border-border text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`,"aria-pressed":i,onClick:()=>r(e.id),children:e.label})},e.id)})})]})}function lx(e){let[t,n]=(0,F.useState)(Date.now);return(0,F.useEffect)(()=>{if(!e)return;n(Date.now());let t=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(t)},[e]),t}function ux(e,t){if(!(e===void 0||e<=0||t===void 0||!Number.isFinite(e)||!Number.isFinite(t)))return Math.max(0,Math.floor((t-e)/1e3))}function dx({startedAt:e}){let t=ux(e,lx(!0));return t===void 0?null:ix(t)}function fx(e,{userId:t,threadId:n}){let[r,i]=(0,F.useState)(null);(0,F.useEffect)(()=>{let r=new AbortController,a={api:e,controller:r,stopping:new Set},o;async function s(){try{let{commands:o}=await e.listRunningCommands({userId:t,threadId:n},r.signal);r.signal.aborted||i(e=>({lifetime:a,commands:o,refreshError:null,stopError:e?.lifetime===a&&o.some(t=>t.sessionId===e.stopError?.sessionId)?e.stopError:null,stopping:[...a.stopping]}))}catch{r.signal.aborted||i(e=>e?.lifetime===a?{...e,refreshError:`Unable to refresh running commands. Reconnecting…`}:null)}finally{r.signal.aborted||(o=setTimeout(s,1e3))}}return s(),()=>{r.abort(),clearTimeout(o)}},[e,t,n]);let a=r?.lifetime.api===e&&!r.lifetime.controller.signal.aborted?r:null;async function o(r){let o=a?.lifetime;if(!(!o||o.controller.signal.aborted||o.stopping.has(r))){o.stopping.add(r),i(e=>e?.lifetime===o?{...e,stopping:[...o.stopping],stopError:null}:e);try{await e.terminateCommand({userId:t,threadId:n,sessionId:r})}catch(e){o.controller.signal.aborted||i(t=>t?.lifetime===o?{...t,stopError:{sessionId:r,message:e instanceof Error?e.message:`Unable to stop command.`}}:t)}finally{o.stopping.delete(r),o.controller.signal.aborted||i(e=>e?.lifetime===o?{...e,stopping:[...o.stopping]}:e)}}}return{commands:a?.commands??[],error:a?.stopError?.message??a?.refreshError??null,stopping:a?.stopping??[],terminate:o}}function px({api:e,scope:t,collapseWhen:n=!1}){let{commands:r,stopping:i,error:a,terminate:o}=fx(e,t),[s,c]=(0,F.useState)(!1),[l,u]=(0,F.useState)(n),d=(0,F.useId)();return n!==l&&(u(n),n&&c(!1)),r.length===0?null:(0,R.jsx)(`section`,{"aria-label":`Running commands`,className:`mx-auto mb-3 w-full max-w-[48rem] shrink-0 px-4`,children:(0,R.jsxs)(`div`,{className:`border-hairline bg-surface overflow-hidden rounded-xl border`,children:[(0,R.jsxs)(`button`,{type:`button`,"aria-label":`Running commands`,"aria-expanded":s,"aria-controls":d,onClick:()=>c(e=>!e),className:`text-muted-foreground hover:bg-hover-fill focus-visible:ring-ring flex w-full items-center gap-2 px-3 py-2 text-left text-xs transition focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset`,children:[(0,R.jsx)(Gg,{className:`size-3.5 shrink-0 transition-transform ${s?``:`-rotate-90`}`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`font-medium`,children:`Running commands`}),(0,R.jsx)(`span`,{className:`bg-muted rounded px-1.5 py-0.5 text-[10px] tabular-nums`,children:r.length})]}),(0,R.jsx)(`div`,{id:d,children:s&&(0,R.jsx)(`ul`,{className:`divide-hairline border-hairline max-h-40 divide-y overflow-y-auto border-t`,children:r.map(e=>(0,R.jsxs)(`li`,{className:`flex items-center gap-3 px-3 py-2`,children:[(0,R.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-emerald-500`,"aria-hidden":`true`}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-foreground truncate font-mono text-xs`,title:e.command,children:e.command}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-0.5 truncate text-[11px]`,title:e.workdir,children:e.workdir})]}),(0,R.jsx)(`button`,{type:`button`,"aria-label":`Stop command: ${e.command}`,title:`Stop command`,disabled:i.includes(e.sessionId),onClick:()=>void o(e.sessionId),className:`text-muted-foreground hover:bg-destructive/10 hover:text-destructive focus-visible:ring-ring flex size-8 shrink-0 items-center justify-center rounded-md transition focus-visible:ring-2 focus-visible:outline-none disabled:opacity-40`,children:(0,R.jsx)(Dv,{className:`size-3.5`,"aria-hidden":`true`})})]},e.sessionId))})}),a&&(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive border-hairline border-t px-3 py-2 text-xs`,children:a})]})})}function mx(e){return(0,R.jsx)(px,{...e},`${e.scope.userId}:${e.scope.threadId}`)}function hx(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>e===r[t])}var gx=new Set([`image/jpeg`,`image/png`,`image/gif`,`image/webp`]);function _x(e){return gx.has(e.toLowerCase())}function vx(e){let t=e.trim();return t.length>0?t:`application/octet-stream`}function yx(e){let t=e.name.trim();return t.length>0?t:`Attached file`}function bx(e){return e<1024?`${e} B`:e<1048576?`${Math.max(1,Math.round(e/1024))} KiB`:`${(e/1048576).toFixed(1).replace(/\.0$/,``)} MiB`}function xx(e){e?.startsWith(`blob:`)&&URL.revokeObjectURL(e)}function Sx(e){return!e.url&&_x(e.mediaType)}function Cx(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,n.rel=`noopener`,document.body.append(n),n.click(),n.remove()}function wx({attachments:e,disabled:t,onRemove:n}){return(0,R.jsx)(`ul`,{className:`mb-3 flex max-h-36 flex-wrap items-center gap-2 overflow-y-auto`,"aria-label":`Attached files`,children:e.map(e=>{let r=_x(e.mediaType)&&!!e.previewUrl;return(0,R.jsxs)(`li`,{className:r?`group relative size-14 overflow-hidden rounded-xl border ${e.status===`error`?`border-rose-500/60`:`border-border`}`:`group relative flex h-14 max-w-56 items-center gap-2 overflow-hidden rounded-xl border pr-7 pl-2 ${e.status===`error`?`border-rose-500/60`:`border-border`}`,title:e.error??`${e.name} · ${bx(e.size)}`,children:[r?(0,R.jsx)(`img`,{src:e.previewUrl,alt:e.name,className:`size-full object-cover ${e.status===`uploading`?`opacity-50`:``}`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C_,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsxs)(`span`,{className:`min-w-0 text-[12px] leading-4`,children:[(0,R.jsx)(`span`,{className:`text-foreground block truncate`,children:e.name}),(0,R.jsx)(`span`,{className:`text-muted-foreground block`,children:bx(e.size)})]})]}),e.status===`uploading`?(0,R.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center ${r?``:`bg-background/60`}`,role:`status`,"aria-label":`Uploading ${e.name}`,children:(0,R.jsx)(`span`,{className:`border-border border-t-foreground/80 size-3.5 animate-spin rounded-full border-2`})}):e.status===`error`?(0,R.jsx)(`span`,{className:`text-destructive absolute inset-x-0 bottom-0 bg-rose-950/80 px-1 py-0.5 text-center text-[9px] leading-3`,role:`alert`,children:`Failed`}):null,(0,R.jsx)(`button`,{type:`button`,className:`bg-foreground/70 text-background hover:bg-foreground/90 absolute top-1 right-1 flex size-4.5 cursor-pointer items-center justify-center rounded-full transition disabled:cursor-not-allowed disabled:opacity-40`,"aria-label":`Remove ${e.name}`,disabled:t,onClick:()=>n(e.localId),children:(0,R.jsx)(Fv,{className:`size-3`,"aria-hidden":`true`})})]},e.localId)})})}function Tx({loadState:e,skills:t,highlightedIndex:n,onRetry:r,onHighlight:i,onSelect:a}){let o=(0,F.useRef)([]);return(0,F.useEffect)(()=>{t.length>0&&o.current[n]?.scrollIntoView({block:`nearest`})},[t,n]),(0,R.jsx)(`div`,{className:`border-border bg-popover absolute inset-x-0 bottom-full z-30 mb-2 max-h-56 overflow-y-auto rounded-xl border py-1 shadow-2xl`,id:`composer-skills-listbox`,"aria-label":`Available skills`,role:e===`ready`&&t.length>0?`listbox`:`status`,children:e===`loading`?(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 py-2 text-sm`,children:`Loading skills…`}):e===`error`?(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-2`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Couldn’t load skills`}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground text-sm underline-offset-2 hover:underline`,onClick:r,children:`Retry`})]}):t.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 py-2 text-sm`,children:`No matching skills`}):t.map((e,t)=>(0,R.jsxs)(`button`,{ref:e=>{o.current[t]=e},type:`button`,id:`composer-skill-option-${t}`,className:`flex w-full flex-col gap-0.5 px-3 py-2 text-left transition ${n===t?`text-foreground bg-hover-fill-strong`:`text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`,role:`option`,"aria-selected":n===t,onPointerEnter:()=>i(t),onClick:()=>a(e),children:[(0,R.jsxs)(`span`,{className:`text-sm font-medium`,children:[`$`,e.name]}),(0,R.jsx)(`span`,{className:`text-muted-foreground line-clamp-2 text-[12px]`,children:e.description})]},e.name))})}function Ex({loadState:e,entries:t,scanning:n,highlightedIndex:r,onRetry:i,onHighlight:a,onSelect:o}){let s=(0,F.useRef)([]);return(0,F.useEffect)(()=>{s.current[r]?.scrollIntoView({block:`nearest`})},[t,r]),(0,R.jsx)(`div`,{className:`border-border bg-popover absolute inset-x-0 bottom-full z-30 mb-2 max-h-56 overflow-y-auto rounded-xl border py-1 shadow-2xl`,id:`composer-paths-listbox`,"aria-label":`Workspace files and directories`,role:`listbox`,"aria-busy":e===`loading`||n,children:e===`unavailable`?(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 py-2 text-sm`,role:`status`,children:`Select a workspace and connect its server to tag files.`}):e===`error`?(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-2`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:`Couldn't search workspace files`}),(0,R.jsx)(`button`,{type:`button`,className:`text-sm hover:underline`,onClick:i,children:`Retry`})]}):e===`loading`||n&&t.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 py-2 text-sm`,role:`status`,children:`Searching workspace files...`}):t.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 py-2 text-sm`,role:`status`,children:`No matching files or directories`}):t.map((e,t)=>{let n=e.kind===`directory`?k_:T_;return(0,R.jsxs)(`button`,{ref:e=>{s.current[t]=e},type:`button`,id:`composer-path-option-${t}`,className:`flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition ${r===t?`text-foreground bg-hover-fill-strong`:`text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`,role:`option`,"aria-selected":r===t,onPointerEnter:()=>a(t),onMouseDown:e=>e.preventDefault(),onClick:()=>o(e),children:[(0,R.jsx)(n,{className:`size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`break-all`,children:Lb(e)})]},`${e.kind}:${e.path}`)})})}function Dx({title:e,children:t,tone:n=`warning`,action:r}){return(0,R.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-xl border px-3.5 py-3 ${n===`error`?`border-rose-500/25 bg-rose-500/10 text-rose-800 dark:text-rose-200`:`border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-200`}`,role:n===`status`?`status`:`alert`,children:[(0,R.jsx)(Yg,{className:`mt-0.5 size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[(0,R.jsx)(`p`,{className:`text-[13px] leading-5 font-medium`,children:e}),(0,R.jsx)(`div`,{className:`text-[12.5px] leading-5 opacity-90`,children:t}),r?(0,R.jsx)(`div`,{className:`mt-2`,children:r}):null]})]})}function Ox(e,t){let[n,r]=(0,F.useState)(null),[i,a]=(0,F.useState)(0);(0,F.useEffect)(()=>{if(!e||t===null)return;let n=new AbortController,i;async function a(){if(e&&t!==null)try{let o=await e.search(t,n.signal);if(n.signal.aborted)return;r({source:e,query:t,result:o,error:!1}),o.scanning&&(i=setTimeout(a,250))}catch{n.signal.aborted||r({source:e,query:t,result:null,error:!0})}}return i=setTimeout(a,100),()=>{n.abort(),clearTimeout(i)}},[e,t,i]);let o=n?.source===e&&n.query===t?n:null;return{loadState:e?o?.error?`error`:o?.result?`ready`:`loading`:`unavailable`,entries:o?.result?.entries??[],scanning:o?.result?.scanning??!1,retry:()=>{r(null),a(e=>e+1)}}}function kx(e){function t(t){let n=t.target;n instanceof Node&&(e.getRoot()?.contains(n)||e.onOutside())}function n(t){t.key===`Escape`&&e.onEscape()}return document.addEventListener(`pointerdown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`pointerdown`,t),document.removeEventListener(`keydown`,n)}}function Ax({title:e,onDismiss:t,children:n,footer:r,returnFocusRef:i}){let a=(0,F.useRef)(null);return(0,F.useEffect)(()=>{let e=a.current,t=i.current;return e?.showModal(),()=>{e?.close(),t?.focus()}},[i]),(0,R.jsx)(`dialog`,{ref:a,"aria-label":e,className:`bg-popover text-foreground fixed inset-x-0 top-auto bottom-0 m-0 max-h-[85dvh] w-full max-w-none overflow-hidden rounded-t-[28px] border border-[var(--hairline)] p-0 shadow-2xl backdrop:bg-black/45 backdrop:backdrop-blur-sm`,onCancel:e=>{e.preventDefault(),t()},onClick:e=>{if(e.target!==e.currentTarget)return;let n=e.currentTarget.getBoundingClientRect();(e.clientY<n.top||e.clientY>n.bottom)&&t()},children:(0,R.jsxs)(`div`,{className:`flex max-h-[85dvh] flex-col pb-[max(1rem,env(safe-area-inset-bottom))]`,children:[(0,R.jsx)(`div`,{className:`bg-muted-foreground/25 mx-auto mt-3 h-1 w-9 shrink-0 rounded-full`,"aria-hidden":`true`}),(0,R.jsxs)(`header`,{className:`flex shrink-0 items-center justify-between px-5 py-2`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:bg-hover-fill focus-visible:ring-ring flex size-11 items-center justify-center rounded-full outline-none focus-visible:ring-2`,"aria-label":`Close ${e.toLocaleLowerCase()}`,onClick:t,children:(0,R.jsx)(Fv,{className:`size-5`})})]}),(0,R.jsx)(`div`,{className:`min-h-0 overflow-y-auto overscroll-contain px-4`,children:n}),r?(0,R.jsx)(`footer`,{className:`shrink-0 border-t border-[var(--hairline)] px-5 pt-4`,children:r}):null]})})}function jx(){let[e,t]=(0,F.useState)(()=>window.matchMedia?.(`(max-width: 639px)`).matches??!1);return(0,F.useEffect)(()=>{let e=window.matchMedia?.(`(max-width: 639px)`);if(!e)return;function n(){t(e.matches)}return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[]),e}function Mx({value:e,options:t,ariaLabel:n,menuTitle:r,disabled:i=!1,className:a=``,triggerClassName:o=``,searchable:s=!1,compactOnMobile:c=!1,onValueChange:l,optionIcon:u}){let[d,f]=(0,F.useState)(!1),p=jx(),m=c&&p,[h,g]=(0,F.useState)(``),_=(0,F.useRef)(null),v=(0,F.useRef)(null),y=(0,F.useRef)(null),b=(0,F.useRef)(null),[x,S]=(0,F.useState)({left:0,bottom:0,maxHeight:0}),C=t.find(t=>t.id===e)??t[0]??null,w=s&&h.trim()?t.filter(e=>e.label.toLocaleLowerCase().includes(h.trim().toLocaleLowerCase())):t;function T(){if(i)return;let e=!d;f(e),e&&s?queueMicrotask(()=>y.current?.focus()):g(``)}function E(n){t.find(e=>e.id===n)&&(n!==e&&l?.(n),f(!1),g(``),v.current?.focus())}function D(e){e.key!==`Enter`||e.nativeEvent.isComposing||w.length!==0&&(e.preventDefault(),E(w[0].id))}return(0,F.useLayoutEffect)(()=>{if(!d||!c||m)return;function e(){let e=v.current?.getBoundingClientRect(),t=b.current?.getBoundingClientRect();e&&t&&S({left:Math.max(8,Math.min(e.left,window.innerWidth-t.width-8)),bottom:window.innerHeight-e.top+12,maxHeight:Math.max(0,e.top-20)})}return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[d,c,m]),(0,F.useEffect)(()=>{if(!d){g(``);return}if(!m)return kx({getRoot:()=>_.current,onOutside:()=>{f(!1)},onEscape:()=>{f(!1),v.current?.focus()}})},[d,m]),(0,F.useEffect)(()=>{i&&f(!1)},[i]),(0,R.jsxs)(`div`,{ref:_,className:pb(`relative`,a),children:[(0,R.jsxs)(`button`,{ref:v,type:`button`,className:pb(`focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-8 shrink-0 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-sm font-medium transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50`,!u&&`gap-1`,o),"aria-haspopup":`dialog`,"aria-expanded":d,"aria-label":n,title:c?C?.label??e:void 0,disabled:i,onClick:T,children:[u&&C?u(C):null,(0,R.jsx)(`span`,{className:pb(`truncate`,c&&`hidden sm:inline`),children:C?.triggerLabel??C?.label??e}),(0,R.jsx)(Gg,{className:pb(`text-muted-foreground size-3 shrink-0 transition-transform`,d&&`rotate-180`)})]}),d&&m?(0,R.jsx)(Ax,{title:r,onDismiss:()=>f(!1),returnFocusRef:v,children:(0,R.jsx)(`div`,{className:`space-y-1 pb-2`,children:t.map(t=>(0,R.jsxs)(`button`,{type:`button`,"aria-label":t.label,"aria-pressed":t.id===e,className:pb(`focus-visible:ring-ring flex min-h-16 w-full items-center gap-3 rounded-2xl px-4 py-3 text-left outline-none focus-visible:ring-2`,t.id===e?`bg-hover-fill`:`hover:bg-hover-fill`),onClick:()=>E(t.id),children:[u?(0,R.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center`,children:u(t)}):null,(0,R.jsx)(`span`,{className:`min-w-0 flex-1 text-[15px] font-medium`,children:t.label}),t.id===e?(0,R.jsx)(Ug,{className:`text-accent-strong size-5 shrink-0`}):null]},t.id))})}):d?(0,R.jsxs)(`div`,{ref:b,className:pb(`bg-popover/96 z-50 rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl`,c?`fixed w-[min(19rem,calc(100vw-1rem))] overflow-y-auto`:`absolute bottom-[calc(100%+0.75rem)] left-0 min-w-[19rem]`),style:c?x:void 0,role:`dialog`,"aria-label":r,children:[s?(0,R.jsxs)(`label`,{className:`text-muted-foreground flex h-10 items-center gap-2 border-b border-[var(--hairline)] px-2`,children:[(0,R.jsx)(lv,{className:`size-4 shrink-0`}),(0,R.jsxs)(`span`,{className:`sr-only`,children:[`Search `,r.toLocaleLowerCase()]}),(0,R.jsx)(`input`,{ref:y,value:h,onChange:e=>g(e.target.value),className:`text-foreground placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none`,placeholder:`Search ${r.toLocaleLowerCase()}…`,onKeyDown:D})]}):(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 pt-1 pb-2 text-[11px] font-medium`,children:r}),(0,R.jsxs)(`div`,{className:pb(`space-y-0.5`,s&&`pt-1.5`),children:[w.map(t=>(0,R.jsxs)(`button`,{type:`button`,className:pb(`focus-visible:ring-ring/60 hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none focus-visible:ring-2`,t.id===e&&`bg-hover-fill`),"aria-pressed":t.id===e,onClick:()=>{E(t.id)},children:[u?(0,R.jsx)(`span`,{className:pb(`flex size-7 shrink-0 items-center justify-center`,`text-muted-foreground`),children:u(t)}):null,(0,R.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:t.label}),(0,R.jsx)(Ug,{className:pb(`text-accent-strong size-4 shrink-0 transition-opacity`,t.id===e?`opacity-100`:`opacity-0`)})]},t.id)),w.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 py-5 text-center text-sm`,children:`No matches found`}):null]})]}):null]})}function Nx({className:e=``,title:t=`OpenAI`}){return(0,R.jsxs)(`svg`,{viewBox:`146.694 227.042 267.198 264.812`,xmlns:`http://www.w3.org/2000/svg`,className:pb(`size-4`,e),role:`img`,"aria-hidden":!t||void 0,fill:`none`,children:[t?(0,R.jsx)(`title`,{children:t}):null,(0,R.jsx)(`path`,{d:`M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z`,fill:`currentColor`})]})}function Px({provider:e,className:t=``}){return e===`spikonado`?(0,R.jsx)(`img`,{src:`/logo.png`,alt:``,className:pb(`size-4 shrink-0`,t)}):e===`openai`||e===`chatgpt`?(0,R.jsx)(Nx,{className:pb(`text-foreground size-4`,t)}):e===`anthropic`?(0,R.jsx)(`svg`,{viewBox:`0 0 24 24`,className:pb(`size-4 text-[#D97757]`,t),role:`img`,"aria-label":`Anthropic`,fill:`currentColor`,children:(0,R.jsx)(`path`,{d:`M17.304 3.541h-3.672l6.696 16.918H24Zm-10.608 0L0 20.459h3.744l1.37-3.553h7.005l1.369 3.553h3.744L10.536 3.541Zm-.371 10.223 2.291-5.945 2.292 5.945Z`})}):e===`xai`?(0,R.jsx)(`svg`,{viewBox:`0 0 24 24`,className:pb(`text-foreground size-4`,t),role:`img`,"aria-label":`xAI`,fill:`currentColor`,children:(0,R.jsx)(`path`,{d:`M6.469 8.776 16.512 23h-4.464L2.005 8.776H6.47Zm-.004 7.9 2.233 3.164L6.467 23H2l4.465-6.324ZM22 2.582V23h-3.659V7.764L22 2.582ZM22 1l-9.952 14.095-2.233-3.163L17.533 1H22Z`})}):e===`zai`?(0,R.jsx)(`svg`,{viewBox:`0 0 24 24`,className:pb(`text-foreground size-4`,t),role:`img`,"aria-label":`Z.AI`,fill:`currentColor`,children:(0,R.jsx)(`path`,{d:`M12.606 1.806l-1.677 2.388c-0.258 0.374-0.697 0.606-1.161 0.606h-9.162V1.794C0.594 1.806 12.606 1.806 12.606 1.806zM24 1.806L9.6 22.206 0 22.206 14.4 1.806zM11.394 22.206l1.69-2.4c0.258-0.374 0.697-0.606 1.161-0.606h9.149v3.006H11.394z`})}):e===`deepseek`?(0,R.jsx)(`svg`,{viewBox:`0 0 24 24`,className:pb(`size-4 text-[#4D6BFE]`,t),role:`img`,"aria-label":`DeepSeek`,fill:`currentColor`,children:(0,R.jsx)(`path`,{d:`M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45`})}):e===`kimi`||e===`moonshotai`?(0,R.jsx)(`svg`,{viewBox:`0 0 465 465`,className:pb(`text-foreground size-4`,t),role:`img`,"aria-label":`Moonshot AI`,fill:`currentColor`,children:(0,R.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M418.766 93.78C388.626 53.17 345.086 22.07 292.446 7.97C239.806 -6.13 186.536 -0.97 140.136 19.13L418.766 93.78ZM40.7758 100.85C61.3758 70.84 88.5858 46.43 119.776 29.15L325.036 84.15C311.566 91.92 297.136 105.31 285.966 120.03L454.736 165.25C459.526 181.08 462.646 197.49 463.956 214.24L40.7758 100.85ZM456.686 292.45C454.306 301.35 451.436 309.99 448.116 318.34L2.44584 198.93C3.74584 190.03 5.58584 181.12 7.96584 172.22C13.5658 151.31 21.8458 131.84 32.3458 114.08L250.436 172.52C241.706 185 233.756 198.56 226.756 213.07L460.516 275.71C459.446 281.3 458.166 286.88 456.676 292.47L456.686 292.45ZM13.4858 310.23C2.67584 279.96 -1.93416 247.22 0.745843 213.95L206.426 269.06C204.946 273.74 203.556 278.48 202.266 283.29C199.646 293.08 197.506 302.85 195.846 312.55L417.946 372.06C407.606 385.79 395.826 398.23 382.896 409.21L13.4858 310.23ZM172.206 456.69C102.096 437.9 48.1158 388.98 20.4758 327.59L187.846 372.44C187.576 388.05 188.546 403.26 190.676 417.85L312.286 450.43C268.876 466.39 220.286 469.57 172.206 456.69Z`})}):(0,R.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:pb(`text-muted-foreground size-4`,t),role:`img`,"aria-label":e||`Unknown provider`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,children:[(0,R.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,R.jsx)(`path`,{d:`M12 8v4l2.5 1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Fx({model:e,reasoningEffort:t,onSelect:n}){return e.reasoningEfforts.map(r=>(0,R.jsxs)(`button`,{type:`button`,className:`focus-visible:ring-ring/60 text-foreground hover:bg-hover-fill flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-left text-sm outline-none focus-visible:ring-2`,"aria-label":`${$b(r)}${r===e.defaultReasoningEffort?` (default)`:``}`,"aria-pressed":r===t,"data-default-reasoning":r===e.defaultReasoningEffort?``:void 0,title:r===e.defaultReasoningEffort?`Default reasoning`:void 0,onClick:()=>n(r),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=Array.from(e.currentTarget.parentElement?.querySelectorAll(`button`)??[]);t[(t.indexOf(e.currentTarget)+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus()}},children:[(0,R.jsx)(`span`,{className:`min-w-0 flex-1`,children:$b(r)}),r===e.defaultReasoningEffort?(0,R.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:`Default`}):null,r===t?(0,R.jsx)(Ug,{className:`text-accent-strong size-3 shrink-0`}):null]},r))}function Ix({models:e,modelId:t,reasoningEffort:n,fastMode:r,allowsFastMode:i,onApply:a,onDismiss:o,returnFocusRef:s}){let[c,l]=(0,F.useState)(t),[u,d]=(0,F.useState)(n),[f,p]=(0,F.useState)(r),m=e.find(e=>e.id===c)??e[0],h=i&&m?.supportsFastMode;return(0,R.jsxs)(Ax,{title:`Model settings`,onDismiss:o,returnFocusRef:s,footer:(0,R.jsx)(`button`,{type:`button`,className:`bg-primary text-primary-foreground focus-visible:ring-ring h-12 w-full rounded-2xl text-base font-semibold outline-none focus-visible:ring-2 disabled:opacity-40`,disabled:!m,onClick:()=>{m&&a(m,u,!!(h&&f))},children:`Done`}),children:[(0,R.jsx)(`div`,{role:`group`,"aria-label":`Models`,className:`space-y-1 pb-4`,children:e.map(e=>(0,R.jsxs)(`button`,{type:`button`,"aria-pressed":e.id===m?.id,className:pb(`focus-visible:ring-ring flex min-h-14 w-full items-center gap-3 rounded-2xl px-4 py-3 text-left outline-none focus-visible:ring-2`,e.id===m?.id?`bg-hover-fill`:`hover:bg-hover-fill`),onClick:()=>{e.id!==m?.id&&(l(e.id),d(e.defaultReasoningEffort),e.supportsFastMode||p(!1))},children:[(0,R.jsx)(Px,{provider:e.provider,className:`size-5 shrink-0`}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 text-[15px] leading-5 font-medium`,children:e.label}),e.id===m?.id?(0,R.jsx)(Ug,{className:`text-accent-strong size-5 shrink-0`}):null]},e.id))}),m&&Xb(m)?(0,R.jsxs)(`div`,{role:`group`,"aria-label":`Reasoning for ${m.label}`,className:`border-t border-[var(--hairline)] px-1 py-4`,children:[(0,R.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold`,children:`Reasoning`}),(0,R.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Default: `,$b(m.defaultReasoningEffort)]})]}),(0,R.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:m.reasoningEfforts.map(e=>(0,R.jsx)(`button`,{type:`button`,"aria-label":$b(e),"aria-pressed":e===u,className:pb(`focus-visible:ring-ring flex min-h-11 items-center justify-center rounded-xl border px-2 py-2 text-sm outline-none focus-visible:ring-2`,e===u?`border-accent-strong bg-accent/15`:`hover:bg-hover-fill border-[var(--hairline)]`),onClick:()=>d(e),children:(0,R.jsx)(`span`,{children:$b(e)})},e))})]}):null,h?(0,R.jsxs)(`button`,{type:`button`,role:`switch`,"aria-checked":f,"aria-label":`Fast mode`,className:`focus-visible:ring-ring flex min-h-14 w-full items-center gap-3 border-t border-[var(--hairline)] px-1 py-4 text-left outline-none focus-visible:ring-2`,onClick:()=>p(!f),children:[(0,R.jsx)(Lv,{className:`size-5 shrink-0 text-amber-500`}),(0,R.jsx)(`span`,{className:`flex-1 text-sm font-semibold`,children:`Fast mode`}),(0,R.jsx)(`span`,{className:pb(`inline-flex h-6 w-11 shrink-0 items-center rounded-full p-0.5`,f?`bg-accent-strong`:`bg-hover-fill-strong`),"aria-hidden":`true`,children:(0,R.jsx)(`span`,{className:pb(`bg-background size-5 rounded-full transition-transform`,f&&`translate-x-5`)})})]}):null]})}function Lx({models:e,modelId:t,reasoningEffort:n,fastMode:r,allowsFastMode:i,disabled:a,onSelect:o,onFastModeChange:s}){let[c,l]=(0,F.useState)(!1),u=jx(),[d,f]=(0,F.useState)(null),[p,m]=(0,F.useState)({left:0,bottom:0,maxHeight:0}),[h,g]=(0,F.useState)(0),_=(0,F.useRef)(null),v=(0,F.useRef)(null),y=(0,F.useRef)(null),b=(0,F.useRef)(new Map),x=(0,F.useRef)(null),S=(0,F.useRef)(!1),C=e.find(e=>e.id===t),w=i&&C?.supportsFastMode,T=e.find(e=>e.id===d),E=[C&&Xb(C)?$b(n):null,w&&r?`Fast`:null].filter(Boolean).join(` · `);function D(){l(!1),f(null)}function ee(e,t=e.defaultReasoningEffort){o(e.id,t),D(),v.current?.focus()}function O(t){let n=e[(t+e.length)%e.length];n&&b.current.get(n.id)?.focus()}return(0,F.useLayoutEffect)(()=>{if(!c||u)return;function e(){let e=v.current?.getBoundingClientRect(),t=y.current?.getBoundingClientRect();if(!e||!t)return;m({left:Math.max(8,Math.min(e.left,window.innerWidth-t.width-8)),bottom:window.innerHeight-e.top+12,maxHeight:Math.max(0,e.top-20)});let n=d?b.current.get(d)?.getBoundingClientRect():null,r=x.current,i=r?.querySelector(`[data-default-reasoning]`);if(!n||!r||!i)return;let a=e.top-12-t.height,o=n.top-t.top+n.height/2-i.offsetTop-i.offsetHeight/2;g(Math.max(8-a,Math.min(o,window.innerHeight-a-r.offsetHeight-8)))}return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[c,u,d,w,p.maxHeight]),(0,F.useEffect)(()=>{if(c&&!u)return(b.current.get(t)??b.current.values().next().value)?.focus(),kx({getRoot:()=>_.current,onOutside:D,onEscape:()=>{D(),v.current?.focus()}})},[c,u,t]),(0,F.useEffect)(()=>{a&&D()},[a]),(0,R.jsxs)(`div`,{ref:_,className:pb(`relative min-w-0 flex-1 sm:flex-none`,c?`z-30`:`z-20`),children:[(0,R.jsxs)(`button`,{ref:v,type:`button`,className:`text-foreground focus-visible:ring-ring/60 inline-flex h-11 max-w-full items-center gap-2 rounded-lg px-2 text-[15px] outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 sm:h-9`,"aria-label":`Select model`,title:[C?.label??t,E].filter(Boolean).join(` · `),"aria-haspopup":`dialog`,"aria-expanded":c,disabled:a,onClick:()=>c?D():l(!0),children:[C?(0,R.jsx)(Px,{provider:C.provider,className:`size-4 shrink-0`}):null,(0,R.jsxs)(`span`,{className:`truncate`,children:[C?.label??t,E?(0,R.jsxs)(`span`,{className:`hidden sm:inline`,children:[` · `,E]}):null]}),(0,R.jsx)(Gg,{className:pb(`text-muted-foreground size-3 shrink-0`,c&&`rotate-180`)})]}),c&&u?(0,R.jsx)(Ix,{models:e,modelId:t,reasoningEffort:n,fastMode:r,allowsFastMode:i,onDismiss:D,returnFocusRef:v,onApply:(e,t,n)=>{ee(e,t),s?.(n)}}):c?(0,R.jsxs)(`div`,{ref:y,role:`dialog`,"aria-label":`Model`,className:`fixed z-50 flex w-[min(19rem,calc(100vw-1rem))] flex-col gap-1 overflow-y-auto sm:block sm:w-[30.75rem] sm:overflow-visible`,style:p,children:[(0,R.jsxs)(`div`,{className:`bg-popover/96 flex min-h-0 shrink-0 flex-col overflow-hidden rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl sm:w-[19rem]`,style:{maxHeight:p.maxHeight},children:[(0,R.jsx)(`div`,{role:`group`,"aria-label":`Models`,className:`min-h-0 space-y-0.5 overflow-y-auto`,children:e.map((e,n)=>(0,R.jsxs)(`button`,{ref:t=>{t?b.current.set(e.id,t):b.current.delete(e.id)},type:`button`,"aria-label":e.label,"aria-pressed":e.id===t,"aria-haspopup":Xb(e)?`true`:void 0,className:pb(`text-foreground focus-visible:ring-ring/60 hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm outline-none focus-visible:ring-2`,e.id===d&&`bg-hover-fill`),onMouseEnter:()=>f(e.id),onFocus:()=>f(e.id),onPointerDown:t=>{S.current=t.pointerType===`touch`&&Xb(e)&&d!==e.id},onClick:()=>{if(S.current){S.current=!1,f(e.id);return}ee(e)},onKeyDown:t=>{t.key===`ArrowDown`||t.key===`ArrowUp`?(t.preventDefault(),O(n+(t.key===`ArrowDown`?1:-1))):t.key===`ArrowRight`&&Xb(e)&&(t.preventDefault(),x.current?.querySelector(`[data-default-reasoning]`)?.focus())},children:[(0,R.jsx)(Px,{provider:e.provider,className:`size-4 shrink-0`}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.label}),e.id===t?(0,R.jsx)(Ug,{className:`text-accent-strong size-3.5 shrink-0`}):null,Xb(e)?(0,R.jsx)(qg,{className:`text-muted-foreground size-3 shrink-0`}):null]},e.id))}),w?(0,R.jsx)(`div`,{role:`group`,"aria-label":`Speed`,className:`shrink-0 border-t border-[var(--hairline)] pt-1`,children:(0,R.jsxs)(`button`,{type:`button`,role:`switch`,className:`focus-visible:ring-ring/60 text-foreground hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm outline-none focus-visible:ring-2`,"aria-checked":r,onClick:()=>s?.(!r),children:[(0,R.jsx)(Lv,{className:`size-3.5 shrink-0 text-amber-400`}),(0,R.jsx)(`span`,{children:`Fast`}),(0,R.jsx)(`span`,{className:pb(`relative ml-auto inline-flex h-5 w-9 shrink-0 items-center rounded-full transition`,r?`bg-foreground`:`bg-hover-fill-strong`),"aria-hidden":`true`,children:(0,R.jsx)(`span`,{className:pb(`bg-background inline-block size-3.5 rounded-full transition`,r?`translate-x-[18px]`:`translate-x-[3px]`)})})]})}):null]}),T&&Xb(T)?(0,R.jsx)(`div`,{ref:x,role:`group`,"aria-label":`Reasoning for ${T.label}`,className:`bg-popover/96 max-h-[50vh] shrink-0 overflow-y-auto rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl sm:absolute sm:right-0 sm:w-46`,style:{top:h},onKeyDown:e=>{e.key===`ArrowLeft`&&(e.preventDefault(),b.current.get(T.id)?.focus())},children:(0,R.jsx)(Fx,{model:T,reasoningEffort:T.id===t?n:``,onSelect:e=>ee(T,e)})}):null]}):null]})}var Rx=68,zx=160,Bx=!!globalThis.CSS?.supports(`field-sizing`,`content`),Vx=`Attach files`,Hx=`composer-shell mx-auto w-full max-w-[48rem] rounded-[28px] p-px transition-colors duration-200`,Ux=`composer-inner rounded-[27px] border border-[var(--hairline)] transition-colors duration-200`;function Wx({notices:e,prompt:t=``,onPromptChange:n,attachments:r,onAttachFiles:i,onRemoveAttachment:a,modelCatalog:o,selectedModel:s=kb,onSelectedModelChange:c,configuredProviders:l=[`spikonado`],providersReady:u=!0,selectedCompletionProvider:d=`spikonado`,onSelectedCompletionProviderChange:f,selectedReasoningEffort:p=Ab,onSelectedReasoningEffortChange:m,fastMode:h=!1,onFastModeChange:g,pendingQuestion:_=null,showContinueWorking:v=!1,onContinueWorking:y,runningCommands:b=null,selectedQuestionOptionId:x=null,onSelectedQuestionOptionIdChange:S,canSend:C,isSubmitting:w,isStarting:T,isRunning:E,runStartedAt:D,projectSkills:ee=null,projectPaths:O=null,onSubmit:te,onCancel:ne,usage:re,usageFailed:ie}){let[k,ae]=(0,F.useState)(()=>Date.now()),A=v&&!!y;(0,F.useEffect)(()=>{let e=setInterval(()=>{ae(Date.now())},1e3);return()=>{clearInterval(e)}},[]);let oe=l.map(e=>({id:e,label:e===`spikonado`?`Spikonado`:e===`chatgpt`?`ChatGPT Subscription`:`OpenAI API`})),se=o?Zb(o,d):[],ce=o?Yb(o,s):void 0,le=(d===`spikonado`||u&&l.includes(d))&&ce!==void 0&&(d===`spikonado`?ie||re!==void 0:ce.provider===`openai`),ue=(0,F.useRef)(null),de=(0,F.useRef)(null),[fe,pe]=(0,F.useState)(null),[me,he]=(0,F.useState)([]),[ge,_e]=(0,F.useState)(`idle`),[ve,ye]=(0,F.useState)(!1),[j,M]=(0,F.useState)(0),[be,xe]=(0,F.useState)(0),[N,Se]=(0,F.useState)(!1),[Ce,we]=(0,F.useState)(0),Te=(0,F.useRef)(0),Ee=(0,F.useRef)(void 0),[De,Oe]=(0,F.useState)(!1),[ke,Ae]=(0,F.useState)(null),je=_!=null,Me=E&&!je||w,Ne=ce?.usagePolicy===`unlimited`,Pe=re?.exhausted===!0&&(re.resetsAt===null||re.resetsAt>k)&&!Ne&&d===`spikonado`,Fe=o?se.find(e=>Yb(o,e.id)?.usagePolicy===`unlimited`)?.label??null:null,Ie=(()=>{if(!Pe||re===void 0)return null;let e=Fe===null?`Upgrade your subscription to keep going.`:`Switch to ${Fe} or upgrade your subscription to keep going.`;return re.resetsAt===null?e:`Your limit resets in ${ox(re.resetsAt-k)}. ${e}`})(),Le=!!t.trim()||r.length>0,Re=Db({selectedOptionId:x,text:t}),ze=je?Re:Le,Be=r.some(e=>e.status!==`ready`),Ve=!Me&&!je,He=Wb(t,be),P=Bb(t,be),Ue=P?.query??null,We=He!==null&&Ue===null&&!ve&&!je,Ge=Ue!==null&&!N&&!je&&!w,Ke=Ox(O,Ge?Ue:null),qe=Math.min(Ce,Math.max(0,Ke.entries.length-1)),Je=We||Ge,Ye=(0,F.useMemo)(()=>He===null?[]:Gb(me,He),[He,me]),Xe=Ge&&Ke.entries[qe]?`composer-path-option-${qe}`:We&&Ye.length>0?`composer-skill-option-${j}`:void 0,Ze=(0,F.useCallback)(()=>{xe(ue.current?.selectionStart??t.length)},[t.length]),Qe=(0,F.useCallback)(()=>{let e=ue.current;if(!e||Bx)return;e.style.height=`${Rx}px`;let t=Math.min(Math.max(e.scrollHeight,Rx),zx);e.style.height=`${t}px`,e.style.overflowY=e.scrollHeight>t?`auto`:`hidden`},[]),$e=(0,F.useCallback)(()=>{he([]),_e(`idle`),ye(!1),M(0),Te.current+=1},[]),et=(0,F.useCallback)(async(e=!1)=>{if(ge===`loading`||(ge===`ready`||ge===`error`)&&!e)return;if(!ee?.load){he([]),_e(`ready`);return}let t=++Te.current;_e(`loading`);try{let e=await ee.load();if(t!==Te.current)return;he(e),_e(`ready`)}catch{if(t!==Te.current)return;he([]),_e(`error`)}},[ee,ge]);function tt(e){let r=Kb(t,be,e.name);r&&(n?.(r.text),xe(r.caret),ye(!0),queueMicrotask(()=>{let e=ue.current;e&&(e.focus(),e.setSelectionRange(r.caret,r.caret),Qe())}))}function nt(e){let r=Vb(t,be,e);r&&(n?.(r.text),xe(r.caret),Se(!0),queueMicrotask(()=>{let e=ue.current;e&&(e.focus(),e.setSelectionRange(r.caret,r.caret),Qe())}))}function rt(e){let t=e.currentTarget,n=Array.from(t.files??[]);t.value=``,n.length>0&&i(n)}function it(e){let t=Array.from(e.clipboardData.files);t.length!==0&&Ve&&(e.clipboardData.getData(`text/plain`)||e.preventDefault(),i(t))}function at(e){Mb(e.dataTransfer)&&(e.preventDefault(),Ve&&Oe(!0))}function ot(e){Mb(e.dataTransfer)&&(e.preventDefault(),e.dataTransfer.dropEffect=Ve?`copy`:`none`)}function st(e){let t=e.currentTarget,n=e.relatedTarget;n instanceof Node&&t.contains(n)||Oe(!1)}function ct(e){if(!Mb(e.dataTransfer)||(e.preventDefault(),Oe(!1),!Ve))return;let t=Array.from(e.dataTransfer.files);t.length>0&&i(t)}function lt(e){let t=e.currentTarget;if(t.disabled)return;let n=t.getBoundingClientRect();pe({top:n.top-8,left:n.left+n.width/2})}function ut(){pe(null)}function dt(e){if(!e.nativeEvent.isComposing&&!(e.key===`Enter`&&window.matchMedia?.(`(pointer: coarse)`).matches)){if(Ge){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=Ke.entries.length;if(t>0){let n=e.key===`ArrowDown`?1:-1;we((qe+n+t)%t)}return}if(e.key===`Escape`){e.preventDefault(),Se(!0);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){let t=Ke.entries[qe];if(t){e.preventDefault(),nt(t);return}}}if(We){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),Ye.length===0)return;let t=e.key===`ArrowDown`?1:-1;M(e=>(e+t+Ye.length)%Ye.length);return}if(e.key===`Escape`){e.preventDefault(),ye(!0);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault();let t=Ye[j];t&&tt(t);return}}!C||!je&&!le||!je&&Pe||w||Me||!ze||!je&&Be||jb({key:e.key,shiftKey:e.shiftKey,isComposing:e.nativeEvent.isComposing})&&(e.preventDefault(),te())}}function ft(e){S?.(x===e?null:e)}function pt(e,t){o&&(c?.(e),Yb(o,e)&&m?.(t))}function mt(e){if(!o)return;f?.(e);let t=Qb(o,e,s);t&&(c?.(t),m?.(Yb(o,t)?.defaultReasoningEffort??o.defaultReasoningEffort),g?.(!1))}return(0,F.useEffect)(()=>{if(!o)return;let e=u&&!l.includes(d)?`spikonado`:d;e!==d&&f?.(e);let t=Qb(o,e,s);t&&t!==s&&(c?.(t),m?.(Yb(o,t)?.defaultReasoningEffort??o.defaultReasoningEffort),g?.(!1))},[o,u,l,d,s,f,c,m,g]),(0,F.useEffect)(()=>{d!==`spikonado`&&h&&g?.(!1)},[d,h,g]),(0,F.useEffect)(()=>{ce&&(ce.reasoningEfforts.includes(p)||m?.(ce.defaultReasoningEffort),h&&!ce.supportsFastMode&&g?.(!1))},[ce,p,m,h,g]),(0,F.useEffect)(()=>{Qe()},[t,Qe]),(0,F.useEffect)(()=>{Ve||Oe(!1)},[Ve]),(0,F.useEffect)(()=>{let e=_?.questionId??null;e!==ke&&(Ae(e),x!==null&&S?.(null),t.trim()&&n?.(``))},[_,ke,x,t,S,n]),(0,F.useEffect)(()=>{let e=ee?.workspacePath??null;if(Ee.current!==e&&(Ee.current=e,$e()),He===null){ye(!1);return}ve||et()},[ee,He,ve,et,$e]),(0,F.useEffect)(()=>{M(0)},[Ye]),(0,F.useEffect)(()=>{Se(!1),we(0)},[Ue,P?.start,O]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`footer`,{className:`shrink-0 px-2 pt-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] sm:px-6 sm:py-4`,children:(0,R.jsxs)(`div`,{className:`mx-auto max-w-336`,children:[D!==null&&D>0&&Number.isFinite(D)?(0,R.jsxs)(`div`,{className:`text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]`,children:[(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-0.75`,children:[(0,R.jsx)(`span`,{className:`bg-foreground/28 size-1 animate-pulse rounded-full`}),(0,R.jsx)(`span`,{className:`bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:200ms]`}),(0,R.jsx)(`span`,{className:`bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:400ms]`})]}),(0,R.jsxs)(`span`,{children:[`Working for `,(0,R.jsx)(dx,{startedAt:D})]})]}):w?(0,R.jsxs)(`div`,{className:`text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]`,role:`status`,"aria-live":`polite`,children:[(0,R.jsx)(`span`,{className:`bg-foreground/28 size-1.5 animate-pulse rounded-full`}),(0,R.jsx)(`span`,{children:T?`Starting agent…`:`Sending request…`})]}):null,b&&(0,R.jsx)(mx,{...b,collapseWhen:A}),A?(0,R.jsx)(`div`,{className:`mx-auto mb-3 w-full max-w-[48rem] px-4`,children:(0,R.jsx)(`button`,{type:`button`,className:`border-border bg-surface/80 text-foreground hover:bg-hover-fill rounded-full border px-3 py-1.5 text-[13px] font-medium transition`,onClick:y,disabled:w,children:`Continue working`})}):null,(0,R.jsx)(`div`,{className:Hx,role:`group`,"aria-label":`Message composer`,onDragEnter:at,onDragOver:ot,onDragLeave:st,onDrop:ct,children:(0,R.jsxs)(`div`,{className:`${Ux} relative`,children:[De?(0,R.jsxs)(`div`,{className:`bg-surface/90 border-primary/70 pointer-events-none absolute inset-0 z-30 flex items-center justify-center gap-2 rounded-[27px] border-2 border-dashed backdrop-blur-sm`,role:`status`,"aria-live":`polite`,children:[(0,R.jsx)($_,{className:`text-primary size-5`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`text-foreground text-sm font-medium`,children:`Drop files to attach`})]}):null,(0,R.jsxs)(`div`,{className:`relative flex min-h-33 flex-col px-4 pt-4 pb-2.5`,children:[(0,R.jsxs)(`div`,{className:`mb-3 max-h-[min(30vh,16rem)] space-y-2 overflow-y-auto empty:hidden`,role:`region`,"aria-label":`Conversation notices`,tabIndex:0,children:[e,Ie?(0,R.jsx)(Dx,{title:`You're out of usage`,children:Ie}):null]}),_?(0,R.jsx)(cx,{question:_.question,options:_.options,selectedOptionId:x,onToggleOption:ft}):null,r.length>0&&!je?(0,R.jsx)(wx,{attachments:r,disabled:Me,onRemove:a}):null,(0,R.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[Ge?(0,R.jsx)(Ex,{loadState:Ke.loadState,entries:Ke.entries,scanning:Ke.scanning,highlightedIndex:qe,onRetry:()=>{Ke.retry(),ue.current?.focus()},onHighlight:we,onSelect:nt}):null,We?(0,R.jsx)(Tx,{loadState:ge,skills:Ye,highlightedIndex:j,onRetry:()=>void et(!0),onHighlight:e=>{M(e)},onSelect:tt}):null,(0,R.jsx)(`textarea`,{ref:ue,value:t,rows:1,className:`text-foreground placeholder:text-muted-foreground field-sizing-content max-h-40 min-h-17 w-full resize-none overflow-y-auto border-0 bg-transparent px-0 py-0 text-base leading-6 outline-none sm:text-[14px]`,placeholder:je?`Add detail, or type a custom answer`:`Ask anything, use / for commands, @ to tag files/folders, and $ for skills`,disabled:w,role:`combobox`,"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-expanded":Je,"aria-controls":Ge?`composer-paths-listbox`:We?`composer-skills-listbox`:void 0,"aria-activedescendant":Xe,autoComplete:`off`,enterKeyHint:`enter`,onKeyDown:dt,onPaste:it,onFocus:Ze,onChange:e=>{n?.(e.target.value),Ze(),Qe()},onKeyUp:Ze,onClick:Ze,onSelect:Ze})]}),(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-1 overflow-visible pt-2.5 sm:gap-3`,children:[(0,R.jsxs)(`div`,{className:`-m-1 flex min-w-0 flex-1 items-center gap-1 overflow-visible p-1`,children:[(0,R.jsx)(`input`,{ref:de,type:`file`,className:`hidden`,multiple:!0,onChange:rt}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground enabled:hover:text-foreground flex size-11 shrink-0 items-center justify-center rounded-lg transition enabled:cursor-pointer disabled:opacity-40 sm:size-9`,"aria-label":Vx,disabled:!Ve,onMouseEnter:lt,onMouseLeave:ut,onFocus:lt,onBlur:ut,onClick:()=>{ut(),de.current?.click()},children:(0,R.jsx)($_,{className:`size-4`,"aria-hidden":`true`})}),(0,R.jsx)(`div`,{className:`bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block`}),(0,R.jsx)(Lx,{modelId:s,models:o?.models.filter(e=>se.some(t=>t.id===e.id))??[],reasoningEffort:p,fastMode:h,allowsFastMode:d===`spikonado`,disabled:Me||je||o===void 0,onSelect:pt,onFastModeChange:g}),(0,R.jsx)(`div`,{className:`bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block`}),(0,R.jsx)(Mx,{value:d,options:oe,ariaLabel:`Select provider`,menuTitle:`Provider`,compactOnMobile:!0,disabled:Me||je||!u,onValueChange:mt,className:`z-20 shrink-0`,triggerClassName:`h-11 border-0 bg-transparent px-2 text-[15px] text-foreground shadow-none hover:bg-transparent sm:h-9`,optionIcon:e=>(0,R.jsx)(Px,{provider:e.id,className:`size-4 shrink-0`})})]}),(0,R.jsxs)(`div`,{className:`flex shrink-0 flex-nowrap items-center justify-end gap-2.5`,children:[E?(0,R.jsx)(`button`,{type:`button`,className:`flex size-11 cursor-pointer items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:scale-105 hover:bg-rose-500 disabled:pointer-events-none disabled:opacity-60 disabled:hover:scale-100 sm:size-10`,"aria-label":`Stop generation`,title:`Stop`,onClick:ne,children:(0,R.jsx)(yv,{className:`size-3.5 fill-current`})}):null,je||!E?(0,R.jsx)(`button`,{type:`button`,className:`bg-primary/90 text-primary-foreground hover:bg-primary flex size-11 items-center justify-center rounded-full transition-all duration-150 hover:scale-105 enabled:cursor-pointer disabled:pointer-events-none disabled:opacity-30 disabled:hover:scale-100 sm:size-10`,onClick:te,disabled:!C||!je&&!le||!je&&Pe||w||!ze||!je&&Be,"aria-label":je?`Submit answer`:`Send message`,children:(0,R.jsx)(jg,{className:`size-4`})}):null]})]})]})]})})]})}),fe?(0,R.jsx)(`div`,{className:`bg-tooltip text-tooltip-foreground ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1`,style:{top:fe.top,left:fe.left},role:`tooltip`,children:Vx}):null]})}function Gx(e){let t=cr(),n=sx(),r=qn({query:Jp.usage.getMyUsage,args:t.isAuthenticated&&!t.isLoading?{now:n}:`skip`});return(0,R.jsx)(Wx,{...e,usage:r.status===`success`?r.data:void 0,usageFailed:r.status===`error`})}function Kx({error:e,runError:t,reconnecting:n,catalogError:r,catalogLoading:i,onRetryCatalog:a}){return(0,R.jsxs)(R.Fragment,{children:[e?(0,R.jsx)(Dx,{title:`Something went wrong`,tone:`error`,children:e}):null,t&&t!==e?(0,R.jsx)(Dx,{title:`Run couldn't continue`,children:t}):null,n?(0,R.jsx)(Dx,{title:`Reconnecting`,tone:`status`,children:`Reconnecting to conversation history.`}):null,r?(0,R.jsx)(Dx,{title:`Models unavailable`,tone:`error`,action:(0,R.jsx)(mb,{variant:`outline`,className:`h-8 px-3`,disabled:i,onclick:a,children:i?`Retrying…`:`Retry`}),children:Jb}):null]})}function qx({projects:e,workspacePath:t,onProject:n,onAddProject:r}){let i=e.find(e=>e.workspacePath===t)?.displayName??`Choose a project`,a=e.findIndex(e=>e.workspacePath===t),[o,s]=(0,F.useState)(!1),[c,l]=(0,F.useState)(0),u=(0,F.useRef)(null),d=(0,F.useRef)(null),f=(0,F.useRef)([]);function p(t){return e.some(e=>e.workspacePath!==t.workspacePath&&e.displayName===t.displayName)}function m(e){return p(e)?`${e.displayName}, ${e.workspacePath}`:e.displayName}let h=(0,F.useCallback)(t=>{let n=e.length+1,r=(t+n)%n;l(r),queueMicrotask(()=>f.current[r]?.focus())},[e.length]),g=(0,F.useCallback)(e=>{s(!0),h(e??(a>=0?a:0))},[h,a]),_=(0,F.useCallback)(e=>{s(!1),e&&queueMicrotask(()=>d.current?.focus())},[]);function v(e){_(!0),e.workspacePath!==t&&n(e.workspacePath)}function y(){_(!1),r()}function b(t){let n=e[t];if(n){v(n);return}y()}function x(t){(t.key===`ArrowDown`||t.key===`ArrowUp`)&&(t.preventDefault(),g(t.key===`ArrowUp`?e.length:void 0))}function S(t,n){switch(t.key){case`ArrowDown`:t.preventDefault(),h(n+1);break;case`ArrowUp`:t.preventDefault(),h(n-1);break;case`Home`:t.preventDefault(),h(0);break;case`End`:t.preventDefault(),h(e.length);break;case`Enter`:case` `:t.preventDefault(),b(n);break;case`Tab`:s(!1)}}return(0,F.useEffect)(()=>{if(o)return kx({getRoot:()=>u.current,onOutside:()=>_(!1),onEscape:()=>_(!0)})},[o,_]),(0,F.useEffect)(()=>{e.length===0&&s(!1)},[e.length]),(0,R.jsx)(`div`,{ref:u,className:`create-thread-heading`,children:e.length?(0,R.jsxs)(`h1`,{children:[`What should we build in`,` `,(0,R.jsxs)(`span`,{className:`create-thread-project-phrase`,children:[(0,R.jsxs)(`span`,{className:`create-thread-project-control`,children:[(0,R.jsxs)(`button`,{ref:d,type:`button`,className:`create-thread-project-trigger`,"aria-label":`Select project. Current project: ${i}`,"aria-haspopup":`menu`,"aria-expanded":o,"aria-controls":o?`create-thread-project-menu`:void 0,onClick:()=>{o?_(!1):g()},onKeyDown:x,children:[(0,R.jsx)(`span`,{children:i}),(0,R.jsx)(Gg,{className:o?`is-open`:``,"aria-hidden":`true`})]}),o?(0,R.jsxs)(`span`,{id:`create-thread-project-menu`,className:`create-thread-project-menu`,role:`menu`,"aria-label":`Projects`,children:[(0,R.jsx)(`span`,{className:`create-thread-project-options`,children:e.map((e,n)=>(0,R.jsxs)(`button`,{ref:e=>{f.current[n]=e},type:`button`,className:pb(c===n&&`active`,e.workspacePath===t&&`selected`),role:`menuitemradio`,"aria-checked":e.workspacePath===t,"aria-label":m(e),onPointerEnter:()=>{l(n)},onKeyDown:e=>S(e,n),onClick:()=>v(e),children:[(0,R.jsxs)(`span`,{className:`create-thread-project-option-label`,children:[(0,R.jsx)(`span`,{children:e.displayName}),p(e)?(0,R.jsx)(`small`,{title:e.workspacePath,children:e.workspacePath}):null]}),(0,R.jsx)(Ug,{"aria-hidden":`true`})]},e.workspacePath))}),(0,R.jsx)(`span`,{className:`create-thread-project-menu-footer`,children:(0,R.jsxs)(`button`,{ref:t=>{f.current[e.length]=t},type:`button`,className:pb(c===e.length&&`active`),role:`menuitem`,onPointerEnter:()=>{l(e.length)},onKeyDown:t=>S(t,e.length),onClick:y,children:[(0,R.jsx)(D_,{"aria-hidden":`true`}),(0,R.jsx)(`span`,{children:`Add project`})]})})]}):null]}),(0,R.jsx)(`span`,{"aria-hidden":`true`,children:`?`})]})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`h1`,{children:`What should we work on?`}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-3 text-sm`,children:`Add a project to start your first thread.`}),(0,R.jsx)(`button`,{type:`button`,className:`mt-5 rounded-lg border border-[var(--hairline)] px-4 py-2 text-sm`,onClick:r,children:`Add project`})]})})}P.union(P.literal(`unsettled`),P.literal(`settled`));function Jx(e){return e.archivedAt===void 0?`unsettled`:`settled`}function Yx(e){return e.parentThreadId===void 0}function Xx(e,t,n){let r=new Set([t]),i=[t];for(;i.length>0;){let e=i.pop();for(let t of n.get(e)??[])r.has(t)||(r.add(t),i.push(t))}return e.filter(e=>!r.has(e))}function Zx(e,t,n){return t>0?`${Qx(t)} · Working`:e>0&&!n?Qx(e):null}function Qx(e){return`${e} ${e===1?`subagent`:`subagents`}`}function $x(e){return`sprocket.inbox.expanded-threads:${e}`}var eS=20;function tS(e,t){let n=(0,F.useRef)(null),{rows:r,loading:i,canLoadMore:a,error:o,loadMore:s}=t;(0,F.useEffect)(()=>{!e||i||o||!a||r.some(t=>t._id===e)||(n.current?.threadId!==e||n.current.rows!==r)&&(n.current={threadId:e,rows:r},s())},[e,r,i,a,o,s])}function nS(e){let t=rr({query:Jp.threads.listChildren,args:{threadId:e},initialNumItems:eS});return{rows:t.data??[],loading:t.isLoading,canLoadMore:t.canLoadMore,error:t.error?.message,loadMore:()=>t.loadMore(eS)}}function rS({threadId:e,enabled:t}){let n=qn({query:Jp.threads.subtreeSummaryForThread,args:t&&e?{threadId:e}:`skip`});return n.status===`success`?n.data:void 0}function iS(e){try{let t=localStorage.getItem($x(e)),n=t?Ed(L()).safeParse(JSON.parse(t)):null;return n?.success?n.data:[]}catch{return[]}}function aS(e,t){try{localStorage.setItem($x(e),JSON.stringify(t))}catch{}}function oS(e){let[t,n]=(0,F.useState)([]),r=(0,F.useRef)(null),i=(0,F.useRef)(new Map);(0,F.useEffect)(()=>{r.current!==e&&(r.current=e,n(e?iS(e):[]))},[e]);let a=t=>{t.length!==0&&n(n=>{let r=[...new Set([...n,...t])];return r.length===n.length?n:(e&&aS(e,r),r)})};return{isExpanded:e=>t.includes(e),expand:e=>a([e]),revealAncestors:a,registerChildren:(e,t)=>{let n=i.current.get(e);n||(n=new Set,i.current.set(e,n));for(let e of t)n.add(e._id)},collapse:t=>{n(n=>{if(!n.includes(t))return n;let r=Xx(n,t,i.current);return e&&aS(e,r),r})}}}function sS({currentThreadId:e,enabled:t,expansion:n}){let r=qn({query:Jp.threads.ancestorChain,args:t&&e?{threadId:e}:`skip`}),i=r.status===`success`?r.data:void 0,a=n.revealAncestors,o=(0,F.useRef)(null);return(0,F.useEffect)(()=>{if(!e||!i||i.length===0){o.current=null;return}let t=`${e}:${i.join(`,`)}`;o.current!==t&&(o.current=t,a(i))},[e,i,a]),(0,F.useMemo)(()=>t&&e&&i?[...i,e]:[],[t,e,i])}var cS=Od({method:zd([`desktop`,`package`]),status:zd([`unavailable`,`idle`,`checking`,`available`,`downloading`,`downloaded`,`installing`,`installed`,`error`]),currentVersion:L(),version:L().nullable(),progress:md().nullable().optional(),error:L().nullable(),message:L().nullable().optional()});function lS(e){switch(e.status){case`available`:return`Update available`;case`downloading`:return e.progress==null?`Downloading update…`:`Downloading… ${e.progress}%`;case`downloaded`:return`Restart to update`;case`installing`:return`Installing update…`;case`installed`:return`Update installed`;case`error`:return e.version?`Retry update`:null;default:return null}}async function uS(e){let t=jm();if(!t)return null;let n=await fetch(`${t}/api/update${e?`/install`:``}`,{method:e?`POST`:`GET`,credentials:`include`,headers:{"content-type":`application/json`},signal:AbortSignal.timeout(3e4)});if(!n.ok){let e=Od({error:L()}).safeParse(await n.json().catch(()=>null));throw Error(e.success?e.data.error:`Update request failed (${n.status}). Try again.`)}return cS.parse(await n.json())}var dS=[`downloading`,`downloaded`,`installing`,`installed`];function fS(){let[e,t]=(0,F.useState)(null),[n,r]=(0,F.useState)(null),[i,a]=(0,F.useState)(!1),o=(0,F.useRef)(!1),s=(0,F.useRef)(0),c=e?lS(e):null,l=i||e?.status===`downloading`||e?.status===`installing`,u=e=>{o.current=e,a(e)},d=(0,F.useCallback)(e=>{t(e),e&&dS.includes(e.status)&&r(null)},[]);(0,F.useEffect)(()=>{let e=!1,t=!1,n=!1,r=window.sprocketDesktopBridge?.updates,i=r?.onState(e=>{s.current+=1,d(e)});async function a(){if(t||e||o.current||n)return;t=!0;let i=s.current;try{let t=r?await r.getState():await uS(!1);!e&&s.current===i&&(d(t),n=t===null||t.status===`unavailable`)}catch{}finally{t=!1}}a();let c=setInterval(()=>void a(),5e3);return()=>{e=!0,clearInterval(c),i?.()}},[d]);async function f(){if(!e||l)return;let t=++s.current;u(!0),r(null);try{let n=window.sprocketDesktopBridge?.updates;if(e.method===`desktop`&&n){let r=await(e.status===`downloaded`?n.install():n.download());s.current===t&&d(r)}else e.method===`package`&&d(await uS(!0))}catch(e){r(e instanceof Error?e.message:String(e))}finally{u(!1)}}return!c||!e?null:(0,R.jsxs)(`div`,{className:`mb-1`,"aria-live":`polite`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`text-foreground hover:bg-hover-fill flex min-h-9 w-full min-w-0 items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-[13px] font-medium tracking-[-0.02em] transition disabled:cursor-default disabled:opacity-70`,disabled:l||e.status===`installed`,onClick:()=>void f(),title:e.version?`Sprocket ${e.version}`:void 0,"aria-busy":l,children:[l?(0,R.jsx)(V_,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":`true`}):e.status===`downloaded`?(0,R.jsx)(tv,{className:`size-4 shrink-0`,"aria-hidden":`true`}):(0,R.jsx)(s_,{className:`size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{children:c})]}),e.status===`installed`&&(0,R.jsx)(`p`,{className:`text-muted-foreground px-2 pb-2 text-xs`,children:`Wait for active agents to finish, then stop Sprocket in your terminal and launch it again.`}),(n||e.error)&&(0,R.jsx)(`p`,{className:`text-destructive px-2 pb-2 text-xs break-words`,role:`alert`,children:n||e.error})]})}function pS({section:e}){return(0,R.jsx)(`div`,{className:`inbox-load-more`,"aria-live":`polite`,children:e.error?(0,R.jsx)(`span`,{role:`alert`,children:e.error}):e.loading?(0,R.jsx)(`span`,{children:`Loading...`}):e.canLoadMore?(0,R.jsx)(`button`,{type:`button`,onClick:e.loadMore,children:`Show more`}):null})}var mS=`text-muted-foreground hover:text-foreground hover:bg-hover-fill inline-flex size-7 shrink-0 items-center justify-center rounded-md transition`;function hS({theme:e,onThemeChange:t,onClose:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{type:`button`,className:mS,"aria-label":e===`dark`?`Switch to light mode`:`Switch to dark mode`,title:e===`dark`?`Light mode`:`Dark mode`,onClick:()=>t(e===`dark`?`light`:`dark`),children:e===`dark`?(0,R.jsx)(xv,{className:`size-3.5`,"aria-hidden":`true`}):(0,R.jsx)(G_,{className:`size-3.5`,"aria-hidden":`true`})}),n&&(0,R.jsx)(`button`,{type:`button`,className:mS,"aria-label":`Close sidebar`,title:`Close sidebar`,onClick:n,children:(0,R.jsx)(Y_,{className:`size-3.5`,"aria-hidden":`true`})})]})}var gS=`sprocket.inbox.settled-open`,_S={unsettled:`Unsettled`,settled:`Settled Threads`};function vS({sections:e,projects:t,models:n,selectedProjects:r,currentThreadId:i,settledOpen:a=!1,onSettledOpenChange:o,mutationsEnabled:s,theme:c,onThemeChange:l,onFilter:u,onSelect:d,onNew:f,onAddProject:p,onSettings:m,onClose:h,onChange:g,onRename:_,expansion:v,resolveChildren:y,readTreeSummary:b=rS}){let[x,S]=(0,F.useState)(null),[C,w]=(0,F.useState)(null),[T,E]=(0,F.useState)(null),[D,ee]=(0,F.useState)(!1),[O,te]=(0,F.useState)(null),[ne,re]=(0,F.useState)(``),[ie,k]=(0,F.useState)(``),ae=(0,F.useRef)(!1),A=(0,F.useRef)(null),oe=(0,F.useRef)(null),se=(0,F.useRef)(null),ce=(0,F.useRef)(o),le=(0,F.useCallback)(()=>{let e=A.current;A.current=null,w(null),e?.focus()},[]),ue=e.flatMap(e=>e.rows),de=t.filter(e=>e.displayName.toLocaleLowerCase().includes(ie.trim().toLocaleLowerCase())),fe=e.filter(e=>e.rows.length||e.loading||e.error||e.canLoadMore||e.state===`settled`&&!a),pe=r.length===0?`All projects`:r.length===1?t.find(e=>e.repositoryKey===r[0])?.displayName??`All projects`:`${r.length} projects`,me=C?.thread??null,he=b({threadId:me?._id??null,enabled:s}),ge=b({threadId:x?._id??null,enabled:s});(0,F.useEffect)(()=>{ce.current=o}),(0,F.useEffect)(()=>{try{let e=localStorage.getItem(gS);e!==null&&ce.current(e===`true`)}catch{}},[]),(0,F.useEffect)(()=>{O&&oe.current&&(oe.current.focus(),oe.current.select())},[O]),(0,F.useEffect)(()=>{C&&document.querySelector(`.inbox-context-menu button:not(:disabled)`)?.focus()},[C]);function _e(e){return t.find(t=>t.repositoryKey===e.repositoryKey)?.displayName??e.repositoryKey}function ve(e){return n.find(t=>t.id===e.selectedModel)}function ye(){se.current&&(se.current.open=!1),k(``)}function j(e){u(e),ye()}function M(){ye(),p()}function be(){let e=!a;o(e);try{localStorage.setItem(gS,String(e))}catch{}}function xe(e){w(null),te(e),re(e.title??``)}function N(){te(null),re(``)}async function Se(){if(!O)return;let e=O,t=ne.trim();if(!t||t===(e.title??``)){N();return}N();try{await _(e,t)}catch(e){E(e instanceof Error?e.message:`Could not rename thread.`)}}function Ce(e,t,n){return Jx(e)===t||!Yx(e)?!1:t!==`settled`||xS(e,n)}async function we(e,t,n){if(s&&!ae.current){if(le(),ae.current=!0,ee(!0),E(null),!Ce(e,t,n)){ae.current=!1,ee(!1);return}try{await g(e,t)}catch(e){E(e instanceof Error?e.message:`Could not update thread.`)}finally{ae.current=!1,ee(!1)}}}function Te(e){return s&&!D&&x!==null&&Ce(x,e,ge?.anyActive===!0)}function Ee(e,t){e.preventDefault(),x&&Te(t)&&we(x,t,ge?.anyActive===!0),S(null)}function De(e,t){e.preventDefault();let n=e.currentTarget instanceof HTMLElement?e.currentTarget:null;A.current=n;let r=n?.getBoundingClientRect(),i=e.clientX,a=e.clientY;w({thread:t,x:Math.min(i||r?.left||8,window.innerWidth-230),y:Math.min(a||r?.bottom||8,window.innerHeight-260)})}let Oe=(e,t,n)=>(0,R.jsx)(yS,{thread:e,sectionState:t,depth:n,selected:e._id===i,mutationsEnabled:s,busy:D,renaming:O?._id===e._id,renameTitle:ne,renameInputRef:oe,expansion:v,resolveChildren:y,readTreeSummary:b,projectName:_e(e),model:ve(e),renderChildren:e=>(0,R.jsx)(R.Fragment,{children:e.map(e=>Oe(e,t,n+1))}),onChoose:d,onOpenMenu:De,onBeginRename:xe,onCancelRename:N,onCommitRename:Se,onRenameTitleChange:re,onChange:we,onDragStart:e=>S(e),onDragEnd:()=>S(null)},e._id);function ke(e){if(e.key===`Tab`||e.key===`Escape`){e.preventDefault(),le();return}if(![`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled)`)],n=t.findIndex(e=>e===document.activeElement);t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowUp`?-1:1)+t.length)%t.length]?.focus()}let Ae=(0,F.useCallback)(e=>{if(!e.defaultPrevented){if(e.key===`Escape`){C&&le();return}if(e.altKey&&e.key.toLowerCase()===`n`&&(e.preventDefault(),f()),!(e.target instanceof Element&&e.target.closest(`input, textarea, [contenteditable="true"], dialog`))&&e.altKey&&[`ArrowUp`,`ArrowDown`].includes(e.key)){let t=ue.findIndex(e=>e._id===i),n=ue[t+(e.key===`ArrowDown`?1:-1)];n&&(e.preventDefault(),d(n))}}},[C,le,f,ue,i,d]);return(0,F.useEffect)(()=>(window.addEventListener(`keydown`,Ae),()=>window.removeEventListener(`keydown`,Ae)),[Ae]),(0,R.jsxs)(`aside`,{className:`inbox-sidebar`,"aria-label":`Thread inbox`,children:[(0,R.jsxs)(`header`,{className:`flex items-center gap-2 px-4 pt-4 pb-3`,children:[(0,R.jsx)(hb,{size:`sm`,class:`mr-auto`,label:`Close sidebar`,onclick:()=>h()}),(0,R.jsx)(hS,{theme:c,onThemeChange:l,onClose:h})]}),(0,R.jsxs)(`div`,{className:`px-3 pb-3`,children:[(0,R.jsxs)(`button`,{className:`inbox-menu-item inbox-primary-navigation`,type:`button`,onClick:f,children:[(0,R.jsx)(hv,{size:15}),`New thread`]}),(0,R.jsxs)(`div`,{className:`inbox-project-controls`,children:[(0,R.jsxs)(`details`,{ref:se,children:[(0,R.jsxs)(`summary`,{className:`inbox-filter inbox-primary-navigation`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:pe}),(0,R.jsx)(Gg,{size:14})]}),(0,R.jsxs)(`div`,{className:`inbox-project-menu`,children:[(0,R.jsxs)(`label`,{className:`inbox-project-search`,children:[(0,R.jsx)(lv,{size:14}),(0,R.jsx)(`input`,{value:ie,onChange:e=>k(e.currentTarget.value),"aria-label":`Search projects`,placeholder:`Search projects`})]}),(0,R.jsxs)(`div`,{className:`inbox-project-list`,children:[(0,R.jsx)(`button`,{className:pb(`inbox-project-option`,{"inbox-project-selected":r.length===0}),type:`button`,"aria-pressed":r.length===0,onClick:()=>j([]),children:`All projects`}),de.map(e=>{let t=r.length===1&&r[0]===e.repositoryKey;return(0,R.jsx)(`button`,{className:pb(`inbox-project-option`,{"inbox-project-selected":t}),type:`button`,"aria-pressed":t,onClick:()=>j([e.repositoryKey]),children:e.displayName},e.repositoryKey)})]})]})]}),(0,R.jsx)(`button`,{className:`inbox-icon inbox-add-project-button`,type:`button`,"aria-label":`Create or add project`,onClick:M,children:(0,R.jsx)(D_,{size:17})})]})]}),(0,R.jsx)(`div`,{className:`inbox-scroll`,children:fe.map(e=>(0,R.jsxs)(`section`,{id:`inbox-${e.state}`,onDragOver:t=>{Te(e.state)&&t.preventDefault()},onDrop:t=>Ee(t,e.state),"aria-label":_S[e.state],children:[e.state===`settled`&&(0,R.jsxs)(`button`,{className:`inbox-section-heading inbox-primary-navigation`,type:`button`,"aria-expanded":a,"aria-controls":`inbox-settled-threads`,onClick:be,children:[(0,R.jsx)(`span`,{children:`Settled Threads`}),(0,R.jsx)(Gg,{className:a?`inbox-section-chevron-open`:void 0,size:14})]}),(0,R.jsx)(`div`,{id:e.state===`settled`?`inbox-settled-threads`:void 0,children:(e.state!==`settled`||a)&&(0,R.jsxs)(R.Fragment,{children:[e.rows.map(t=>Oe(t,e.state,0)),(0,R.jsx)(pS,{section:e})]})})]},e.state))}),T&&(0,R.jsxs)(`div`,{className:`inbox-notice`,role:`status`,children:[(0,R.jsx)(`span`,{children:T}),(0,R.jsx)(`button`,{type:`button`,"aria-label":`Dismiss notification`,onClick:()=>E(null),children:(0,R.jsx)(Fv,{size:13})})]}),(0,R.jsxs)(`footer`,{className:`inbox-footer`,children:[(0,R.jsxs)(`button`,{className:`inbox-menu-item inbox-primary-navigation`,type:`button`,onClick:m,children:[(0,R.jsx)(dv,{size:15}),`Settings`]}),(0,R.jsx)(fS,{})]}),C&&me&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{className:`fixed inset-0 z-[200] cursor-default`,type:`button`,"aria-label":`Close thread actions`,onClick:le}),(0,R.jsxs)(`div`,{className:`inbox-context-menu`,style:{left:`${Math.max(8,C.x)}px`,top:`${Math.max(8,C.y)}px`},role:`menu`,tabIndex:-1,onKeyDown:ke,children:[Yx(me)&&(Jx(me)===`unsettled`?(0,R.jsxs)(`button`,{type:`button`,role:`menuitem`,disabled:!s||D||!Ce(me,`settled`,he?.anyActive===!0),onClick:()=>void we(me,`settled`,he?.anyActive===!0),children:[(0,R.jsx)(Ug,{size:14}),`Settle`]}):(0,R.jsxs)(`button`,{type:`button`,role:`menuitem`,disabled:!s||D,onClick:()=>void we(me,`unsettled`,!1),children:[(0,R.jsx)(rv,{size:14}),`Unsettle`]})),(0,R.jsxs)(`button`,{type:`button`,role:`menuitem`,disabled:!s,onClick:()=>xe(me),children:[(0,R.jsx)(hv,{size:14}),`Rename`]}),(0,R.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{navigator.clipboard.writeText(me._id).catch(()=>{E(`Could not copy thread ID.`)}),w(null)},children:[(0,R.jsx)(r_,{size:14}),`Copy thread ID`]})]})]})]})}function yS({thread:e,sectionState:t,depth:n,selected:r,mutationsEnabled:i,busy:a,renaming:o,renameTitle:s,renameInputRef:c,expansion:l,resolveChildren:u,readTreeSummary:d=rS,projectName:f,model:p,renderChildren:m,onChoose:h,onOpenMenu:g,onBeginRename:_,onCancelRename:v,onCommitRename:y,onRenameTitleChange:b,onChange:x,onDragStart:S,onDragEnd:C}){let w=d({threadId:e._id,enabled:i}),T=bS(e),E=w?.descendantCount??0,D=w?.workingDescendantCount??0,ee=Zx(E,D,w?.descendantsActive??!1),O=l.isExpanded(e._id),te=Yx(e),ne=n>0?{marginLeft:`${n*14}px`}:void 0;return(0,R.jsxs)(`div`,{className:`inbox-tree-node`,children:[(0,R.jsxs)(`div`,{className:pb(`inbox-row`,{"inbox-row-selected":r}),style:ne,draggable:i&&!a&&!o&&te,onDragStart:t=>S(e,t),onDragEnd:C,onContextMenu:t=>g(t,e),role:`group`,"aria-label":e.title??`New thread`,children:[o?(0,R.jsxs)(`form`,{className:`inbox-row-main`,onSubmit:e=>{e.preventDefault(),y()},children:[(0,R.jsxs)(`span`,{className:`inbox-row-meta`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:f}),T&&(0,R.jsx)(`span`,{className:pb(`inbox-status shrink-0`,T.className),children:T.label})]}),(0,R.jsx)(`input`,{ref:c,value:s,onChange:e=>b(e.currentTarget.value),className:`inbox-row-rename-input`,"aria-label":`Rename thread`,maxLength:300,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),v())},onBlur:()=>void y()}),(0,R.jsx)(`span`,{className:`inbox-row-model`,children:p?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Px,{provider:p.provider,className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:p.label})]}):(0,R.jsx)(`span`,{className:`truncate`,children:`Unknown model`})})]}):(0,R.jsxs)(`button`,{className:`inbox-row-main`,type:`button`,title:`${e.title??`New thread`}\n${f}`,onClick:()=>h(e),onDoubleClick:()=>{i&&!a&&_(e)},"aria-current":r?`page`:void 0,children:[(0,R.jsxs)(`span`,{className:`inbox-row-meta`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:f}),T&&(0,R.jsx)(`span`,{className:pb(`inbox-status shrink-0`,T.className),children:T.label})]}),(0,R.jsx)(`span`,{className:`inbox-row-title truncate`,children:e.title??`New thread`}),(0,R.jsx)(`span`,{className:`inbox-row-model`,children:p?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Px,{provider:p.provider,className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:p.label})]}):(0,R.jsx)(`span`,{className:`truncate`,children:`Unknown model`})})]}),!o&&te&&(0,R.jsx)(`div`,{className:`inbox-row-actions`,children:t===`unsettled`?(0,R.jsx)(`button`,{className:`inbox-icon inbox-row-state-action`,type:`button`,disabled:!i||a||!xS(e,w?.anyActive===!0),"aria-label":`Settle ${e.title??`thread`}`,"data-tooltip":`Settle`,onClick:()=>void x(e,`settled`,w?.anyActive===!0),children:(0,R.jsx)(Ug,{size:14})}):(0,R.jsx)(`button`,{className:`inbox-icon inbox-row-state-action`,type:`button`,disabled:!i||a,"aria-label":`Unsettle ${e.title??`thread`}`,"data-tooltip":`Unsettle`,onClick:()=>void x(e,`unsettled`,!1),children:(0,R.jsx)(rv,{size:14})})}),E>0&&!o&&(0,R.jsxs)(`button`,{className:`inbox-subagents`,type:`button`,"aria-expanded":O,"aria-label":`${O?`Collapse`:`Expand`} subagents of ${e.title??`thread`}${ee?`: ${ee}`:``}`,onClick:()=>{O?l.collapse(e._id):l.expand(e._id)},children:[O?(0,R.jsx)(Gg,{size:13}):(0,R.jsx)(qg,{size:13}),ee&&(0,R.jsx)(`span`,{className:pb(`inbox-row-subagents`,{"inbox-working":D>0}),children:ee})]})]}),O&&(0,R.jsx)(`div`,{className:`inbox-children`,children:u({threadId:e._id,renderRows:m})})]})}function bS(e){return e.status===`queued`?{label:`Starting`,className:`inbox-working`}:e.status===`running`?{label:`Working`,className:`inbox-working`}:e.status===`failed`?{label:`Failed`,className:`inbox-attention`}:null}function xS(e,t){return!t&&e.status!==`running`&&e.status!==`queued`}function SS({user:e,onSignOut:t}){let[n,r]=(0,F.useState)(!1),i=cr(),a=qn({query:Jp.billing.getMySubscription,args:i.isAuthenticated&&!i.isLoading?{}:`skip`}),o=a.status===`success`?a.data:null,s=a.status===`error`,c=[e?.firstName,e?.lastName].filter(Boolean).join(` `).trim()||null;return(0,R.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,R.jsx)(`header`,{className:`flex h-12 shrink-0 items-center px-6`,children:(0,R.jsx)(`h1`,{className:`text-foreground text-[1rem] font-medium tracking-[-0.03em]`,children:`Account`})}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 py-8`,children:(0,R.jsxs)(`div`,{className:`max-w-xl space-y-10`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase`,children:`Profile`}),c||e?.email?(0,R.jsxs)(`div`,{className:`mt-3 space-y-1`,children:[c&&(0,R.jsx)(`p`,{className:`text-foreground text-[15px]`,children:c}),e?.email&&(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground block text-left text-sm transition`,"aria-pressed":n,"aria-label":n?`Hide email address`:`Show email address`,onClick:()=>r(e=>!e),children:(0,R.jsx)(`span`,{className:n?void 0:`blur-[5px] select-none`,children:e.email})})]}):(0,R.jsx)(`p`,{className:`text-muted-foreground mt-3 text-sm`,children:`You’re signed in to Sprocket.`})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase`,children:`Spikonado Subscription Tier`}),o?(0,R.jsx)(`p`,{className:`text-foreground mt-3 text-[15px]`,children:o.tierLabel}):s?(0,R.jsx)(`p`,{className:`text-muted-foreground mt-3 text-sm`,children:`Couldn’t load your subscription right now.`}):(0,R.jsx)(`div`,{className:`bg-hover-fill mt-3.5 h-4 w-16 animate-pulse rounded`,"aria-hidden":`true`})]}),(0,R.jsx)(`div`,{children:(0,R.jsxs)(mb,{variant:`outline`,onclick:t,children:[(0,R.jsx)(U_,{className:`mr-2 size-4`,"aria-hidden":`true`}),`Sign Out`]})})]})})]})}function CS(){let e=cr(),t=qn({query:Jp.uiPreferences.getMine,args:e.isAuthenticated&&!e.isLoading?{}:`skip`}),n=Jn(Jp.uiPreferences.setAutomaticThreadTitles),[r,i]=(0,F.useState)(null),[a,o]=(0,F.useState)(null),s=r??(t.status===`success`?t.data?.automaticThreadTitles??!0:!0),c=t.status!==`success`||r!==null;async function l(){if(c)return;let e=!s;i(e),o(null);try{await n({enabled:e})}catch{o(`Couldn't save your preference. Try again.`)}finally{i(null)}}return(0,R.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,R.jsx)(`header`,{className:`flex h-12 shrink-0 items-center px-6`,children:(0,R.jsx)(`h1`,{className:`text-foreground text-[1rem] font-medium tracking-[-0.03em]`,children:`General`})}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 py-8`,children:(0,R.jsxs)(`div`,{className:`max-w-xl space-y-4`,children:[(0,R.jsxs)(`button`,{type:`button`,role:`switch`,"aria-checked":s,"aria-label":`Automatically name threads`,"aria-describedby":`automatic-thread-titles-description`,disabled:c,className:`focus-visible:ring-ring/60 text-foreground hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm outline-none focus-visible:ring-2 disabled:cursor-wait disabled:opacity-50`,onClick:()=>void l(),children:[(0,R.jsxs)(`span`,{className:`flex-1`,children:[(0,R.jsx)(`span`,{className:`block font-medium`,children:`Automatically name threads`}),(0,R.jsx)(`span`,{id:`automatic-thread-titles-description`,className:`text-muted-foreground mt-1 block text-[13px]`,children:`Name and update threads after every user prompt.`})]}),(0,R.jsx)(`span`,{className:pb(`relative ml-auto inline-flex h-5 w-9 shrink-0 items-center rounded-full transition`,s?`bg-foreground`:`bg-hover-fill-strong`),"aria-hidden":`true`,children:(0,R.jsx)(`span`,{className:pb(`bg-background inline-block size-3.5 rounded-full transition`,s?`translate-x-[18px]`:`translate-x-[3px]`)})})]}),t.status===`pending`&&(0,R.jsx)(`p`,{role:`status`,className:`text-muted-foreground px-3 text-sm`,children:`Loading preferences...`}),t.status===`error`&&(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive px-3 text-sm`,children:`Couldn't load your preferences right now.`}),a&&(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive px-3 text-sm`,children:a})]})})]})}function wS({approval:e}){return(0,R.jsxs)(`div`,{className:`max-w-md`,children:[(0,R.jsxs)(`p`,{className:`text-foreground text-sm`,children:[`Approve spending`,e.label?` · ${e.label}`:``]}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-xs leading-5`,children:`Opens Prava in a new tab so you can confirm with your passkey.`}),(0,R.jsx)(`a`,{href:e.approvalUrl,target:`_blank`,rel:`noopener noreferrer`,className:`border-border bg-surface/80 text-foreground hover:bg-hover-fill mt-3 inline-flex h-9 items-center rounded-full border px-4 text-xs font-medium transition`,children:`Approve mandate`})]})}var TS=`Uncaught ConvexError: `,ES=`Uncaught Error: `;function DS(e,t){if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`
74
- `),i=r===-1?n:n.slice(0,r),a=i.indexOf(`(`);return(a===-1?i:i.slice(0,a)).trim()||null}function OS(e){if(e instanceof Ye){let t=e.data.trim();if(t)return t}let t=e.message.trim();return t?DS(t,TS)??DS(t,ES)??t:null}function kS(e,t){return OS(e)||t}function AS(e,t){return e instanceof Error?kS(e,t):t}var jS=`border-border bg-hover-fill text-foreground placeholder:text-muted-foreground focus:border-ring h-9 w-full rounded-lg border px-3 text-[13px] outline-none`,MS=`text-muted-foreground text-[12px]`,NS=`text-muted-foreground hover:text-foreground text-[12px] transition disabled:pointer-events-none disabled:opacity-40`,PS={pause:{idle:`Pause`,busy:`Pausing…`},resume:{idle:`Resume`,busy:`Resuming…`},cancel:{idle:`Cancel`,busy:`Cancelling…`}},FS=[{value:`one_time`,label:`One time`},{value:`weekly`,label:`Weekly`},{value:`monthly`,label:`Monthly`},{value:`yearly`,label:`Yearly`}],IS=[{value:`listed`,label:`Listed merchant`},{value:`any`,label:`Any merchant`}];function LS(e,t){return e.find(e=>e.value===t)?.value??null}function RS(){let e=cr(),t=Yn(Jp.payments.listMyMandates),n=Yn(Jp.payments.setupMyMandate),r=Yn(Jp.payments.setMyMandateLifecycle),[i,a]=(0,F.useState)(``),[o,s]=(0,F.useState)(``),[c,l]=(0,F.useState)(`US`),[u,d]=(0,F.useState)(``),[f,p]=(0,F.useState)(`USD`),[m,h]=(0,F.useState)(`monthly`),[g,_]=(0,F.useState)(`listed`),[v,y]=(0,F.useState)(``),[b,x]=(0,F.useState)(!1),[S,C]=(0,F.useState)(null),[w,T]=(0,F.useState)(null),[E,D]=(0,F.useState)([]),[ee,O]=(0,F.useState)(!1),[te,ne]=(0,F.useState)(null),[re,ie]=(0,F.useState)(null),[k,ae]=(0,F.useState)(null),A=(0,F.useRef)(null),oe=e=>{A.current=e,T(e)};(0,F.useEffect)(()=>{g===`any`&&m!==`one_time`&&h(`one_time`)},[g,m]);let se=(0,F.useCallback)(async()=>{O(!0),ne(null);try{let e=await t({});D(e.mandates);let n=A.current?.mandateId;n&&e.mandates.some(e=>e.mandateId===n&&(e.status===`active`||e.status===`paused`))&&(A.current=null,T(null))}catch(e){ne(AS(e,`Couldn’t load mandates.`))}finally{O(!1)}},[t]);(0,F.useEffect)(()=>{e.isAuthenticated&&!e.isLoading&&se()},[e.isAuthenticated,e.isLoading,se]),(0,F.useEffect)(()=>{if(!w||!e.isAuthenticated)return;let t=()=>{document.visibilityState&&document.visibilityState!==`visible`||se()};return window.addEventListener(`focus`,t),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`focus`,t),document.removeEventListener(`visibilitychange`,t)}},[w,e.isAuthenticated,se]);async function ce(e){e.preventDefault(),x(!0),C(null),oe(null);let t=g===`listed`;try{let e=await n({merchantName:t&&i.trim()||void 0,merchantUrl:t&&o.trim()||void 0,countryCode:t&&c.trim()||void 0,amountCap:u.trim(),currency:f.trim(),frequency:m,scope:g,description:v.trim()});oe({mandateId:e.mandateId,approvalUrl:e.approvalUrl,label:v.trim()}),await se()}catch(e){C(AS(e,`Couldn’t set up mandate.`))}finally{x(!1)}}async function le(e,t){if(e.mandateId&&re===null){ie(e.pravaMandateId),ae(t),ne(null);try{await r({mandateId:e.mandateId,action:t}),await se()}catch(e){ne(AS(e,`Couldn’t ${t} mandate.`))}finally{ie(null),ae(null)}}}return(0,R.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,R.jsx)(`header`,{className:`flex h-12 shrink-0 items-center px-6`,children:(0,R.jsx)(`h1`,{className:`text-foreground text-[1rem] font-medium tracking-[-0.03em]`,children:`Payments`})}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 py-8`,children:(0,R.jsxs)(`div`,{className:`max-w-xl space-y-10`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase`,children:`Set up a spending mandate`}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-2 text-sm leading-6`,children:`Create a Prava mandate, then approve it in a new tab with your passkey.`}),(0,R.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:e=>void ce(e),children:[(0,R.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,R.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,R.jsx)(`span`,{className:MS,children:`Merchant name`}),(0,R.jsx)(`input`,{className:jS,value:i,onChange:e=>a(e.currentTarget.value),placeholder:`Example Shop`,disabled:b||g===`any`})]}),(0,R.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,R.jsx)(`span`,{className:MS,children:`Merchant URL`}),(0,R.jsx)(`input`,{className:jS,value:o,onChange:e=>s(e.currentTarget.value),placeholder:`https://example.com`,disabled:b||g===`any`})]}),(0,R.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,R.jsx)(`span`,{className:MS,children:`Country code`}),(0,R.jsx)(`input`,{className:jS,value:c,onChange:e=>l(e.currentTarget.value),placeholder:`US`,disabled:b||g===`any`})]}),(0,R.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,R.jsx)(`span`,{className:MS,children:`Amount cap`}),(0,R.jsx)(`input`,{className:jS,value:u,onChange:e=>d(e.currentTarget.value),placeholder:`120.00`,required:!0,disabled:b})]}),(0,R.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,R.jsx)(`span`,{className:MS,children:`Currency`}),(0,R.jsx)(`input`,{className:jS,value:f,onChange:e=>p(e.currentTarget.value),placeholder:`USD`,required:!0,disabled:b})]}),(0,R.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,R.jsx)(`span`,{className:MS,children:`Frequency`}),(0,R.jsx)(`select`,{className:jS,value:m,onChange:e=>{let t=LS(FS,e.currentTarget.value);t&&h(t)},disabled:b||g===`any`,children:FS.map(e=>(0,R.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,R.jsxs)(`label`,{className:`block space-y-1.5 sm:col-span-2`,children:[(0,R.jsx)(`span`,{className:MS,children:`Scope`}),(0,R.jsx)(`select`,{className:jS,value:g,onChange:e=>{let t=LS(IS,e.currentTarget.value);t&&_(t)},disabled:b,children:IS.map(e=>(0,R.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,R.jsxs)(`label`,{className:`block space-y-1.5 sm:col-span-2`,children:[(0,R.jsx)(`span`,{className:MS,children:`Description`}),(0,R.jsx)(`input`,{className:jS,value:v,onChange:e=>y(e.currentTarget.value),placeholder:`Agent shopping budget`,required:!0,disabled:b})]})]}),S&&(0,R.jsx)(`p`,{className:`text-destructive text-sm`,children:S}),(0,R.jsx)(mb,{type:`submit`,variant:`outline`,disabled:b,children:b?`Setting up…`:`Set up mandate`})]}),w&&(0,R.jsx)(`div`,{className:`mt-4`,children:(0,R.jsx)(wS,{approval:w})})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase`,children:`Your mandates`}),te&&(0,R.jsx)(`p`,{className:`text-destructive mt-3 text-sm`,children:te}),ee&&E.length===0?(0,R.jsx)(`div`,{className:`mt-4 animate-pulse space-y-4`,"aria-hidden":`true`,children:[0,1].map(e=>(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`div`,{className:`bg-hover-fill h-3.5 w-40 rounded`}),(0,R.jsx)(`div`,{className:`bg-hover-fill h-3 w-56 rounded`})]},e))}):E.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground mt-3 text-sm leading-6`,children:`No mandates yet.`}):(0,R.jsx)(`ul`,{className:`mt-3 space-y-1`,children:E.map(e=>{let t=re===e.pravaMandateId?k:null,n=!!e.mandateId&&e.status===`active`,r=!!e.mandateId&&e.status===`paused`,i=[n?`pause`:`resume`,`cancel`];return(0,R.jsxs)(`li`,{className:`py-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,R.jsx)(`p`,{className:`text-foreground truncate text-[14px]`,children:e.description?.trim()||e.merchantName?.trim()||`Spending mandate`}),(0,R.jsx)(`p`,{className:`text-muted-foreground shrink-0 text-[12px] capitalize`,children:e.status})]}),(0,R.jsxs)(`p`,{className:`text-muted-foreground mt-0.5 text-[12px]`,children:[e.approvedAmount,` `,e.currency,e.remaining!==void 0&&(0,R.jsxs)(R.Fragment,{children:[` · `,e.remaining,` remaining`]}),e.validUntil&&(0,R.jsxs)(R.Fragment,{children:[` · until `,e.validUntil]}),e.renewsAt&&(0,R.jsxs)(R.Fragment,{children:[` · renews `,e.renewsAt]})]}),(n||r)&&(0,R.jsx)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1`,children:i.map(n=>(0,R.jsx)(`button`,{type:`button`,className:NS,disabled:re!==null,onClick:()=>void le(e,n),children:t===n?PS[n].busy:PS[n].idle},n))})]},e.pravaMandateId)})})]})]})})]})}function zS({userId:e,desktopApi:t,openAiConfigured:n,chatGptStatus:r,chatGptLoading:i,chatGptStatusError:a,loading:o,loadError:s,onChatGptStatusChange:c,onConfigurationChange:l}){let u=Yn(Jp.providerCredentials.saveOpenAiKey),d=Yn(Jp.providerCredentials.removeOpenAiKey),[f,p]=(0,F.useState)(``),[m,h]=(0,F.useState)(!1),[g,_]=(0,F.useState)(!1),[v,y]=(0,F.useState)(!1),[b,x]=(0,F.useState)(null),[S,C]=(0,F.useState)(!1),[w,T]=(0,F.useState)(!1),[E,D]=(0,F.useState)(!1),[ee,O]=(0,F.useState)(null),[te,ne]=(0,F.useState)(null),re=(0,F.useRef)(null),ie=(0,F.useRef)(null),k=(0,F.useRef)(0),ae=r?.accounts.find(e=>e.connectionId===r.activeConnectionId)??null,A=(e,t)=>{re.current=t?{userId:e,login:t}:null,D(!!t),t||oe()};function oe(){ie.current?.close(),ie.current=null}function se(e,t){return OS(e)??t}function ce(e){t?.cancelChatGptBrowserLogin({userId:e.userId,state:e.login.state}).catch(()=>{})}function le(){k.current+=1;let e=re.current;return re.current=null,D(!1),oe(),T(!1),e}(0,F.useEffect)(()=>(D(!1),T(!1),ne(null),O(null),()=>{k.current+=1;let e=re.current;re.current=null,oe(),e&&t?.cancelChatGptBrowserLogin({userId:e.userId,state:e.login.state}).catch(()=>{})}),[t,e]);async function ue(e,n,r){for(;;){if(await new Promise(e=>setTimeout(e,1500)),r!==k.current)return;try{let i=await n.fetchChatGptBrowserLoginResult({userId:e.userId,state:e.login.state});if(r!==k.current)return;if(i.status===`pending`)continue;if(A(e.userId,null),T(!1),i.status===`error`){ne(i.error??`ChatGPT sign-in failed.`);return}let a=await n.fetchChatGptStatus({userId:e.userId});if(r!==k.current||n!==t)return;c(a);return}catch(t){if(r!==k.current)return;A(e.userId,null),T(!1),ne(se(pf(Error).catch(Error()).parse(t),`Couldn’t complete ChatGPT sign-in. Check your connection status.`));return}}}async function de(n){let r=t;if(!r||w)return;T(!0),D(!0),ne(null),O(null);let i=e,a=++k.current,o=window.sprocketDesktopBridge,s=null,c=null;try{if(!o){if(s=window.open(`about:blank`,`_blank`),ie.current=s,!s)throw Error(`Your browser blocked the sign-in window. Allow popups and try again.`);s.opener=null}let e=await r.startChatGptBrowserLogin(n?{userId:i,connectionId:n}:{userId:i});if(c={userId:i,login:e},a!==k.current){ce(c);return}if(o?await o.openExternal(e.authorizeUrl):s?.location.replace(e.authorizeUrl),a!==k.current){ce(c);return}A(i,e),ue(c,r,a)}catch(e){if(ie.current===s&&oe(),c&&ce(c),a!==k.current)return;D(!1),ne(se(pf(Error).catch(Error()).parse(e),`Couldn’t start ChatGPT sign-in.`)),T(!1)}}function fe(){let e=le();e&&ce(e)}async function pe(n){let r=t;if(!r||w)return;T(!0),ne(null),O(null);let i=e,a=++k.current;try{await r.selectChatGptAccount({userId:i,connectionId:n});let e=await r.fetchChatGptStatus({userId:i});if(a!==k.current||r!==t)return;c(e)}catch(e){if(a!==k.current)return;ne(se(pf(Error).catch(Error()).parse(e),`Couldn’t switch ChatGPT account.`))}finally{a===k.current&&T(!1)}}async function me(){let n=t;if(!n||w)return;let r=++k.current;T(!0),ne(null);try{let t=await n.fetchChatGptStatus({userId:e});r===k.current&&c(t)}catch(e){r===k.current&&ne(se(pf(Error).catch(Error()).parse(e),`Could not refresh ChatGPT status.`))}finally{r===k.current&&T(!1)}}async function he(n){let i=t;if(!i||w)return;let a=le();a&&ce(a),T(!0),ne(null),O(null);let o=e,s=++k.current;try{let e=await i.disconnectChatGptAccount({userId:o,connectionId:n});if(s!==k.current||i!==t)return;if(O(e),r){let e=r.activeConnectionId===n?null:r.activeConnectionId;c({accounts:r.accounts.filter(e=>e.connectionId!==n),activeConnectionId:e,loginAvailable:r.loginAvailable})}let a=await i.fetchChatGptStatus({userId:o});if(s!==k.current||i!==t)return;c(a)}catch(e){if(s!==k.current)return;ne(se(pf(Error).catch(Error()).parse(e),`Couldn’t sign out of ChatGPT.`))}finally{s===k.current&&T(!1)}}async function ge(e){if(e.preventDefault(),f.trim()&&!g){_(!0),x(null),C(!1);try{await u({apiKey:f}),p(``),h(!1),C(!0),l({provider:`openai`,configured:!0})}catch(e){x(se(pf(Error).catch(Error()).parse(e),`Couldn’t save the OpenAI key.`))}finally{_(!1)}}}async function _e(){if(!g){_(!0),x(null),C(!1);try{await d({}),y(!1),l({provider:`openai`,configured:!1})}catch(e){x(se(pf(Error).catch(Error()).parse(e),`Couldn’t remove the OpenAI key.`))}finally{_(!1)}}}let ve=i?`Checking connection…`:a?`Connection status unavailable`:ae?.connected?`Connected as ${ae.label}`:r&&r.accounts.length>0?`Signed out`:`Not connected`;return(0,R.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,R.jsx)(`header`,{className:`flex h-12 shrink-0 items-center px-6`,children:(0,R.jsx)(`h1`,{className:`text-foreground text-[1rem] font-medium tracking-[-0.03em]`,children:`BYOK/BYOS`})}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 py-8`,children:(0,R.jsxs)(`div`,{className:`max-w-xl space-y-4`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground mb-5 text-sm leading-6`,children:`Use your own API keys or subscriptions. ChatGPT credentials stay in a protected file on this computer. OpenAI API keys are encrypted in WorkOS Vault.`}),(0,R.jsxs)(`div`,{className:`border-border rounded-xl border p-5`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(Px,{provider:`openai`,className:`size-5`}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-foreground text-[15px] font-medium`,children:`ChatGPT Subscription`}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-[12px]`,children:ve})]}),(0,R.jsx)(`button`,{type:`button`,className:`text-primary text-[13px] disabled:opacity-50`,disabled:!t||w||i,onClick:()=>void me(),children:`Refresh`})]}),E?(0,R.jsxs)(`div`,{className:`mt-5 flex items-center gap-3`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground text-[12px]`,children:`Signing in…`}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground text-[13px]`,onClick:fe,children:`Cancel`})]}):(0,R.jsxs)(`div`,{className:`mt-5 space-y-4`,children:[r&&r.accounts.length>0&&(0,R.jsx)(`ul`,{className:`space-y-2`,children:r.accounts.map(e=>{let t=e.connectionId===r.activeConnectionId;return(0,R.jsxs)(`li`,{className:`border-border flex items-center gap-3 rounded-lg border px-3 py-2`,children:[(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-foreground truncate text-[13px] font-medium`,children:e.label}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-[12px]`,children:t?`Active`:e.connected?`Signed in`:`Signed out`})]}),!t&&e.connected&&(0,R.jsx)(`button`,{type:`button`,className:`text-primary text-[13px] disabled:opacity-50`,disabled:w,onClick:()=>void pe(e.connectionId),children:`Use`}),!e.connected&&(0,R.jsx)(`button`,{type:`button`,className:`text-primary text-[13px] disabled:opacity-50`,disabled:w||!r.loginAvailable,onClick:()=>void de(e.connectionId),children:`Reconnect`}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground text-[13px] disabled:opacity-50`,disabled:w,onClick:()=>void he(e.connectionId),children:`Sign out`})]},e.connectionId)})}),r?.loginAvailable===!1?(0,R.jsx)(`p`,{className:`text-muted-foreground text-[12px] leading-5`,children:`ChatGPT sign-in runs through the local Sprocket server, which isn’t available for this window. Open Sprocket on your desktop to sign in.`}):(0,R.jsx)(mb,{disabled:w||i||!t,onclick:()=>void de(),children:w?`Starting…`:r?.accounts.length?`Add account`:`Continue with ChatGPT`})]}),ee&&(0,R.jsx)(`p`,{className:`text-muted-foreground mt-4 text-[12px]`,role:`status`,children:ee}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-4 text-[12px] leading-5`,children:`Usage counts against your ChatGPT Codex allowance.`}),te&&(0,R.jsx)(`p`,{className:`text-destructive mt-4 text-sm`,role:`alert`,children:te}),a&&(0,R.jsx)(`p`,{className:`text-destructive mt-4 text-sm`,role:`alert`,children:a})]}),(0,R.jsxs)(`div`,{className:`border-border rounded-xl border p-5`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(Px,{provider:`openai`,className:`size-5`}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-foreground text-[15px] font-medium`,children:`OpenAI API`}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-[12px]`,children:o?`Checking configuration…`:n?`Connected`:`Not configured`})]})]}),(0,R.jsxs)(`form`,{className:`mt-5 space-y-3`,onSubmit:e=>void ge(e),children:[(0,R.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground text-[12px]`,children:`API key`}),(0,R.jsxs)(`div`,{className:`relative`,children:[(0,R.jsx)(`input`,{type:m?`text`:`password`,value:f,onChange:e=>p(e.currentTarget.value),autoComplete:`off`,spellCheck:!1,placeholder:n?`Enter a replacement key`:`sk-…`,disabled:g||o,className:`border-border bg-hover-fill text-foreground placeholder:text-muted-foreground focus:border-ring h-10 w-full rounded-lg border pr-10 pl-3 font-mono text-[13px] outline-none disabled:opacity-50`}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground absolute inset-y-0 right-0 flex w-10 items-center justify-center`,"aria-label":m?`Hide API key`:`Show API key`,disabled:g||o,onClick:()=>h(e=>!e),children:m?(0,R.jsx)(h_,{className:`size-4`}):(0,R.jsx)(__,{className:`size-4`})})]})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,R.jsx)(mb,{type:`submit`,disabled:g||o||!f.trim(),children:g?`Saving…`:n?`Replace key`:`Connect API key`}),n&&!v?(0,R.jsx)(mb,{type:`button`,variant:`outline`,disabled:g,onclick:()=>y(!0),children:`Remove`}):v?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(mb,{type:`button`,variant:`outline`,disabled:g,onclick:()=>void _e(),children:g?`Removing…`:`Confirm removal`}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground text-[13px]`,disabled:g,onClick:()=>y(!1),children:`Cancel`})]}):null,S&&(0,R.jsx)(`span`,{className:`text-muted-foreground text-[12px]`,children:`Saved`})]})]}),b&&(0,R.jsx)(`p`,{className:`text-destructive mt-4 text-sm`,role:`alert`,children:b})]}),s&&(0,R.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:s})]})})]})}var BS=[{id:`general`,label:`General`,icon:dv},{id:`account`,label:`Account`,icon:kv},{id:`usage`,label:`Usage`,icon:Vg},{id:`providers`,label:`BYOK/BYOS`,icon:L_},{id:`payments`,label:`Payments`,icon:a_}],VS=`flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-[13px] transition`,HS=`bg-hover-fill-strong text-foreground`,US=`text-muted-foreground hover:bg-hover-fill hover:text-foreground`;function WS({activePage:e,theme:t,onThemeChange:n,onBack:r,onNavigate:i}){return(0,R.jsx)(`aside`,{className:`app-sidebar-panel`,children:(0,R.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3.5 pt-3 pb-3`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground hover:bg-hover-fill inline-flex h-8 items-center gap-2 rounded-lg px-2 text-[13px] transition`,onClick:r,children:[(0,R.jsx)(kg,{className:`size-3.5`,"aria-hidden":`true`}),`Back`]}),(0,R.jsx)(hS,{theme:t,onThemeChange:n})]}),(0,R.jsx)(`nav`,{className:`hide-scrollbar min-h-0 flex-1 space-y-0.5 overflow-y-auto px-2.5 pb-4`,"aria-label":`Settings`,children:BS.map(t=>(0,R.jsxs)(`button`,{type:`button`,className:`${VS} ${e===t.id?HS:US}`,"aria-current":e===t.id?`page`:void 0,onClick:()=>{i(t.id)},children:[(0,R.jsx)(t.icon,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`truncate`,children:t.label})]},t.id))})]})})}var GS=[{id:`modelUsage`,label:`Model usage`,noun:`model usage`,description:`More expensive models use up more usage.`}],KS=[`weekly`,`monthly`],qS=1e9,JS=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2}),YS={weekly:`Weekly`,monthly:`Monthly`};function XS(e){return JS.format(e/qS)}function ZS(e,t){return e?`bg-rose-400/90`:t?`bg-amber-400/90`:`bg-foreground/25`}function QS(){let e=cr(),t=sx(),n=qn({query:Jp.usage.getMyUsage,args:e.isAuthenticated&&!e.isLoading?{now:t}:`skip`}),r=n.status===`success`?n.data:null,i=n.status===`error`;return(0,R.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,R.jsx)(`header`,{className:`flex h-12 shrink-0 items-center px-6`,children:(0,R.jsx)(`h1`,{className:`text-foreground text-[1rem] font-medium tracking-[-0.03em]`,children:`Usage`})}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 py-8`,children:(0,R.jsx)(`div`,{className:`max-w-xl space-y-10`,children:i?(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm leading-6`,children:`Couldn’t load your usage right now. Try again in a moment.`}):r===null?(0,R.jsxs)(`div`,{className:`animate-pulse space-y-10`,"aria-hidden":`true`,children:[(0,R.jsx)(`div`,{className:`bg-hover-fill h-4 w-24 rounded`}),GS.map(e=>(0,R.jsxs)(`div`,{className:`space-y-5`,children:[(0,R.jsx)(`div`,{className:`bg-hover-fill h-3 w-28 rounded`}),KS.map(e=>(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`div`,{className:`bg-hover-fill h-3.5 w-full rounded`}),(0,R.jsx)(`div`,{className:`bg-hover-fill h-1.5 w-full rounded-full`})]},e))]},e.id))]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-[11px] tracking-[0.18em] uppercase`,children:`Subscription Tier`}),(0,R.jsx)(`p`,{className:`text-foreground mt-3 text-[15px]`,children:r.tierLabel})]}),r.meters.map(e=>(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-[11px] tracking-[0.18em] uppercase`,children:e.label}),e.description&&(0,R.jsx)(`p`,{className:`text-muted-foreground mt-1 text-[12px]`,children:e.description}),(0,R.jsx)(`div`,{className:`mt-4 space-y-6`,children:e.windows.map(n=>{let r=n.limit>0,i=r?Math.round(n.used/n.limit*100):0,a=r&&n.used>=n.limit,o=r&&n.used>=n.limit*.9;return(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-[13px]`,children:YS[n.period]}),r&&(0,R.jsxs)(`p`,{className:`text-[12px] ${a?`text-destructive`:o?`text-amber-800 dark:text-amber-300`:`text-muted-foreground`}`,children:[i,`% used`]})]}),(0,R.jsxs)(`p`,{className:`text-muted-foreground mt-0.5 text-[12px]`,children:[XS(r?n.used:0),` /`,` `,XS(r?n.limit:0)]}),(0,R.jsx)(`div`,{className:`bg-hover-fill mt-2 h-1.5 overflow-hidden rounded-full`,role:`progressbar`,"aria-label":`${e.label} — ${YS[n.period]}`,"aria-valuemin":0,"aria-valuemax":r?n.limit:0,"aria-valuenow":r?Math.min(n.used,n.limit):0,"aria-valuetext":r?`${i}% used`:`0 / 0`,children:(0,R.jsx)(`div`,{className:`h-full rounded-full transition-[width] duration-300 ${ZS(a,o)}`,style:{width:`${r?Math.min(100,Math.max(0,i)):0}%`}})}),n.resetsAt!==null&&(0,R.jsxs)(`p`,{className:`text-muted-foreground mt-1.5 text-[12px]`,children:[`Resets in `,ax(n.resetsAt-t)]})]},n.period)})})]},e.id))]})})})]})}function $S(e){return Object.prototype.toString.call(e)===`[object String]`&&!(e instanceof String)}function eC(e){return e!=null&&!Array.isArray(e)&&Object(e)===e}var tC=P.union(P.string(),P.number(),P.boolean(),P.null()),nC=8;function rC(e){return e===0?tC:P.union(tC,P.array(rC(e-1)),P.record(P.string(),rC(e-1)))}var iC=rC(nC);function aC(e){if(eC(e)&&$S(e.error)&&(e.status===`cancelled`||e.status===`failed`))return{error:e.error,status:e.status}}function oC(e){let t=``,n,r=!1;for(let i of e)i.type===`text`&&i.text.length!==0&&(r&&n!==void 0&&i.turnId!==void 0&&i.turnId!==n&&(t+=`
75
-
76
- `),t+=i.text,i.turnId!==void 0&&(n=i.turnId),r=!0);return t}function sC(e,t){let n=new Map,r=new Set,i=t.filter(t=>{if(!t.callId)return!0;let i=e.find(e=>e.callId===t.callId&&!r.has(e.callId));return i?(n.set(t.id,i.callId),r.add(i.callId),!1):!1}),a=t=>{let a=e.filter(e=>!r.has(e.callId)),o=new Map(i.flatMap(e=>n.has(e.id)?[]:[[e.id,a.filter(n=>t(n,e))]]));for(let e of i){if(n.has(e.id))continue;let t=o.get(e.id)??[];if(t.length!==1)continue;let[a]=t;i.filter(e=>!n.has(e.id)&&(o.get(e.id)??[]).some(e=>e.callId===a.callId)).length===1&&(n.set(e.id,a.callId),r.add(a.callId))}};return a((e,t)=>e.name===t.kind&&cC(e.input,t.payload)),a((e,t)=>e.name===t.kind),n}function cC(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>cC(e,t[n]));if(!eC(e)||!eC(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.hasOwn(t,n)&&cC(e[n],t[n]))}var lC=new Set([`exec_cmd`,`exec_command`]),uC=new Set([`control_cmd`,`control_command`,`poll_cmd`,`poll_command`,`write_stdin`]);function dC(e){return lC.has(e)}function fC(e){return uC.has(e)}function pC(e){return dC(e)||fC(e)}function mC(e){return $S(e)?e:void 0}function hC(e,t){return eC(e)?mC(e[t]):void 0}function gC(e,t){return e.runId===t}function _C(e){return e.name||e.job?.kind||`tool`}function vC(e){let t=[];for(let n of e){if(n.type===`text`||n.type===`reasoning`){t.push(n);continue}let e=_C(n),r=t.at(-1);if(r?.type===`tool-group`&&r.toolKey===e){r.tools.push(n);continue}t.push({type:`tool-group`,toolKey:e,tools:[n]})}return t}function yC(e){return`${e.type}:${e.turnId??``}:${e.id}`}function bC(e){return e.type===`reasoning`?yC(e):e.tools[0]?.callId??e.toolKey}function xC(e){let t=[];for(let n of e){if(n.type===`text`){t.push(n);continue}let e=t.at(-1);if(e?.type===`work`){e.blocks.push(n);continue}t.push({type:`work`,key:bC(n),blocks:[n]})}return t}function SC(e,t){let n,r=t.endedAt;for(let i of e.blocks){let e=i.type===`tool-group`?i.tools:[i];for(let i of e){if(i.startedAt==null)return{};if(n=Math.min(n??i.startedAt,i.startedAt),!t.inProgress){let e=i.completedAt??t.endedAt;if(e===void 0)return{};r=Math.max(r??e,e)}}}return t.inProgress?{startedAtMs:n}:{startedAtMs:n,completedAtMs:r}}function CC(e){return e.output===void 0?!e.job||e.job.status===`pending`||e.job.status===`claimed`:!1}function wC(e){let t=_C(e);return pC(t)||t===`ask_question`||t===`await_question`||t===`poll_question`||t===`spawn_subagent`||t===`control_subagent`||t===`poll_subagent`}function TC(e,t){return t&&wC(e)&&CC(e)}function EC(e){return hC(e.output,`sessionId`)??hC(e.input,`sessionId`)??hC(e.job?.payload,`sessionId`)}function DC(e){let t=new Map;for(let n of e){let e=EC(n);if(!e)continue;let r=hC(n.output,`command`)??(dC(_C(n))?hC(n.input,`cmd`)??hC(n.job?.payload,`cmd`):void 0);r&&t.set(e,r)}return t}function OC(e,t){let n=EC(e);return hC(e.output,`command`)??(n?t.get(n):void 0)}function kC(e,t){let n=[],r=[];for(let i of e){if(i.type===`reasoning`){n.push(i);continue}let e=[];for(let n of i.tools)TC(n,t)?r.push(n):(!t||!CC(n))&&e.push(n);e.length>0&&n.push({type:`tool-group`,toolKey:i.toolKey,tools:e})}return{settledBlocks:n,runningTools:r}}function AC(e,t){return!t&&CC(e)?`interrupted`:e.job?.status===`cancelled`||e.job?.status===`failed`?e.job.status:aC(e.output)?.status}function jC(e,t){if(!t&&CC(e))return`The agent stopped before this tool call finished.`;let n=aC(e.output)?.error;return e.job?e.job.status===`cancelled`?e.job.error??n??`Tool stopped before completion.`:e.job.status===`failed`?e.job.error??n??`Executor job failed.`:void 0:n}function MC(e,t){let n=new Map;e.forEach(e=>{e.type===`tool-result`&&n.set(e.callId,e)});let r=sC(e.filter(e=>e.type===`tool-call`),t.map(e=>({id:e._id,kind:e.kind,callId:e.callId,payload:e.payload}))),i=new Map;for(let e of t){let t=r.get(e._id);t&&i.set(t,e)}let a=[],o=new Set;for(let t of e){if(t.type===`tool-result`)continue;if(t.type===`reasoning`||t.type===`text`){t.text.trim().length>0&&a.push(t);continue}let e=n.get(t.callId),r=i.get(t.callId);r&&o.add(r._id);let s={type:`tool`,callId:t.callId,name:t.name,input:t.input,startedAt:t.startedAt??r?.enqueuedAt,completedAt:e?.completedAt??r?.completedAt};e?s.output=e.output:r?.result!==void 0&&(s.output=r.result),r&&(s.job=r),a.push(s)}for(let e of t){if(o.has(e._id))continue;let t={type:`tool`,callId:e.callId??`executor-job:${e._id}`,name:e.kind,input:e.payload,startedAt:e.enqueuedAt,completedAt:e.completedAt,job:e};e.result!==void 0&&(t.output=e.result),a.push(t)}return a}function NC(e){return e.type===`reasoning`?[yC(e)]:e.tools.map(e=>`tool:${e.callId}`)}var PC=class{messages=new Map;nextId=0;retain(e){let t=new Set(e);for(let e of this.messages.keys())t.has(e)||this.messages.delete(e)}reconcile(e,t){let n=this.reconcileMembers(e,t.map(e=>e.type===`text`?[yC(e)]:e.blocks.flatMap(NC)));return t.map((e,t)=>({...e,renderKey:e.type===`text`?yC(e):n[t]}))}reconcileBlocks(e,t){let n=this.reconcileMembers(e,t.map(NC));return t.map((e,t)=>({block:e,renderKey:n[t]}))}reconcileMembers(e,t){let n=this.messages.get(e),r=new Map,i=new Set,a=t.map(e=>{let t=e.map(e=>n?.get(e)).find(e=>e!==void 0&&!i.has(e))??`work:${this.nextId++}`;i.add(t);for(let n of e)r.set(n,t);return t});return this.messages.set(e,r),a}};function FC(e,t){this.v=e,this.k=t}function IC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LC(e){if(Array.isArray(e))return e}function RC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function zC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
77
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BC(e,t){return LC(e)||RC(e,t)||VC(e,t)||zC()}function VC(e,t){if(e){if(typeof e==`string`)return IC(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IC(e,t):void 0}}function HC(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof FC;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}HC.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},HC.prototype.next=function(e){return this._invoke(`next`,e)},HC.prototype.throw=function(e){return this._invoke(`throw`,e)},HC.prototype.return=function(e){return this._invoke(`return`,e)};var UC=Object.entries,WC=Object.setPrototypeOf,GC=Object.isFrozen,KC=Object.getPrototypeOf,qC=Object.getOwnPropertyDescriptor,JC=Object.freeze,YC=Object.seal,XC=Object.create,ZC=typeof Reflect<`u`&&Reflect,QC=ZC.apply,$C=ZC.construct;JC||=function(e){return e},YC||=function(e){return e},QC||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},$C||=function(e){return new e(...[...arguments].slice(1))};var ew=bw(Array.prototype.forEach);Array.prototype.indexOf;var tw=bw(Array.prototype.lastIndexOf),nw=bw(Array.prototype.pop),rw=bw(Array.prototype.push);Array.prototype.slice;var iw=bw(Array.prototype.splice),aw=Array.isArray,ow=bw(String.prototype.toLowerCase),sw=bw(String.prototype.toString),cw=bw(String.prototype.match),lw=bw(String.prototype.replace),uw=bw(String.prototype.indexOf),dw=bw(String.prototype.trim),fw=bw(Number.prototype.toString),pw=bw(Boolean.prototype.toString),mw=typeof BigInt>`u`?null:bw(BigInt.prototype.toString),hw=typeof Symbol>`u`?null:bw(Symbol.prototype.toString),gw=bw(Object.prototype.hasOwnProperty),_w=bw(Object.prototype.toString),vw=bw(RegExp.prototype.test),yw=xw(TypeError);function bw(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return QC(e,t,n)}}function xw(e){return function(){return $C(e,[...arguments])}}function Sw(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ow;if(WC&&WC(e,null),!aw(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(GC(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Cw(e){for(let t=0;t<e.length;t++)gw(e,t)||(e[t]=null);return e}function ww(e){let t=XC(null);for(let r of UC(e)){var n=BC(r,2);let i=n[0],a=n[1];gw(e,i)&&(t[i]=aw(a)?Cw(a):a&&typeof a==`object`&&a.constructor===Object?ww(a):a)}return t}function Tw(e){switch(typeof e){case`string`:return e;case`number`:return fw(e);case`boolean`:return pw(e);case`bigint`:return mw?mw(e):`0`;case`symbol`:return hw?hw(e):`Symbol()`;case`undefined`:return _w(e);case`function`:case`object`:{if(e===null)return _w(e);let t=e,n=Ew(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:_w(e)}return _w(e)}default:return _w(e)}}function Ew(e,t){for(;e!==null;){let n=qC(e,t);if(n){if(n.get)return bw(n.get);if(typeof n.value==`function`)return bw(n.value)}e=KC(e)}function n(){return null}return n}function Dw(e){try{return vw(e,``),!0}catch{return!1}}var Ow=JC(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),kw=JC(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Aw=JC([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),jw=JC([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Mw=JC(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Nw=JC([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Pw=JC([`#text`]),Fw=JC(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Iw=JC(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Lw=JC(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Rw=JC([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),zw=YC(/{{[\w\W]*|^[\w\W]*}}/g),Bw=YC(/<%[\w\W]*|^[\w\W]*%>/g),Vw=YC(/\${[\w\W]*/g),Hw=YC(/^data-[\-\w.\u00B7-\uFFFF]+$/),Uw=YC(/^aria-[\-\w]+$/),Ww=YC(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gw=YC(/^(?:\w+script|data):/i),Kw=YC(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qw=YC(/^html$/i),Jw=YC(/^[a-z][.\w]*(-[.\w]+)+$/i),Yw=YC(/<[/\w!]/g),Xw=YC(/<[/\w]/g),Zw=YC(/<\/no(script|embed|frames)/i),Qw=YC(/\/>/i),$w={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},eT=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],tT=JC(Sw({},eT)),nT=function(){let e={};return ew(eT,t=>{e[t]=YC(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),JC(e)}(),rT=function(){return typeof window>`u`?null:window},iT=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},aT=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},oT=function(e,t,n,r){return gw(e,t)&&aw(e[t])?Sw(r.base?ww(r.base):{},e[t],r.transform):n},sT=function(e,t,n){let r=gw(e,t)?e[t]:void 0;return r&&typeof r==`object`?ww(r):n()};function cT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rT(),t=e=>cT(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==$w.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Ew(d,`cloneNode`),p=Ew(d,`remove`),m=Ew(d,`removeAttributeNode`),h=Ew(d,`nextSibling`),g=Ew(d,`childNodes`),_=Ew(d,`parentNode`),v=Ew(d,`shadowRoot`),y=Ew(d,`attributes`),b=o&&o.prototype?Ew(o.prototype,`nodeType`):null,x=o&&o.prototype?Ew(o.prototype,`nodeName`):null,S=o&&o.prototype?Ew(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,ee=!1,O=0,te=function(){if(O>0)throw yw(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ne=function(e){te(),O++;try{return T.createHTML(e)}finally{O--}},re=function(e){te(),O++;try{return T.createScriptURL(e)}finally{O--}},ie=function(){return ee||=(D=iT(u,i),!0),D},k=n,ae=k.implementation,A=k.createNodeIterator,oe=k.createDocumentFragment,se=k.getElementsByTagName,ce=r.importNode,le=aT();t.isSupported=typeof UC==`function`&&typeof _==`function`&&ae&&ae.createHTMLDocument!==void 0;let ue=zw,de=Bw,fe=Vw,pe=Hw,me=Uw,he=Gw,ge=Kw,_e=Jw,ve=Ww,ye=null,j=Sw({},[...Ow,...kw,...Aw,...Mw,...Pw]),M=null,be=Sw({},[...Fw,...Iw,...Lw,...Rw]),xe=Object.seal(XC(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),N=null,Se=null,Ce=Object.seal(XC(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),we=!0,Te=!0,Ee=!1,De=!0,Oe=!1,ke=!0,Ae=!1,je=!1,Me=null,Ne=null,Pe=!1,Fe=!1,Ie=!1,Le=!1,Re=!0,ze=!1,Be=`user-content-`,Ve=!0,He=!1,P={},Ue=null,We=Sw({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ge=null,Ke=Sw({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qe=null,Je=Sw({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ye=`http://www.w3.org/1998/Math/MathML`,Xe=`http://www.w3.org/2000/svg`,Ze=`http://www.w3.org/1999/xhtml`,Qe=Ze,$e=!1,et=null,tt=Sw({},[Ye,Xe,Ze],sw),nt=JC([`mi`,`mo`,`mn`,`ms`,`mtext`]),rt=Sw({},nt),it=JC([`annotation-xml`]),at=Sw({},it),ot=Sw({},[`title`,`style`,`font`,`a`,`script`]),st=null,ct=[`application/xhtml+xml`,`text/html`],lt=null,ut=null,dt=n.createElement(`form`),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ut&&ut===e)return;(!e||typeof e!=`object`)&&(e={}),e=ww(e),st=ct.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,lt=st===`application/xhtml+xml`?sw:ow,ye=oT(e,`ALLOWED_TAGS`,j,{transform:lt}),M=oT(e,`ALLOWED_ATTR`,be,{transform:lt}),et=oT(e,`ALLOWED_NAMESPACES`,tt,{transform:sw}),qe=oT(e,`ADD_URI_SAFE_ATTR`,Je,{transform:lt,base:Je}),Ge=oT(e,`ADD_DATA_URI_TAGS`,Ke,{transform:lt,base:Ke}),Ue=oT(e,`FORBID_CONTENTS`,We,{transform:lt}),N=oT(e,`FORBID_TAGS`,ww({}),{transform:lt}),Se=oT(e,`FORBID_ATTR`,ww({}),{transform:lt}),P=gw(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?ww(e.USE_PROFILES):e.USE_PROFILES:!1,we=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Oe=e.SAFE_FOR_TEMPLATES||!1,ke=e.SAFE_FOR_XML!==!1,Ae=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Le=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Re=e.SANITIZE_DOM!==!1,ze=e.SANITIZE_NAMED_PROPS||!1,Ve=e.KEEP_CONTENT!==!1,He=e.IN_PLACE||!1,ve=Dw(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ww,Qe=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ze,rt=sT(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>Sw({},nt)),at=sT(e,`HTML_INTEGRATION_POINTS`,()=>Sw({},it));let t=sT(e,`CUSTOM_ELEMENT_HANDLING`,()=>XC(null));if(xe=XC(null),gw(t,`tagNameCheck`)&&ft(t.tagNameCheck)&&(xe.tagNameCheck=t.tagNameCheck),gw(t,`attributeNameCheck`)&&ft(t.attributeNameCheck)&&(xe.attributeNameCheck=t.attributeNameCheck),gw(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(xe.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),YC(xe),Oe&&(Te=!1),Ie&&(Fe=!0),P&&(ye=Sw({},Pw),M=XC(null),P.html===!0&&(Sw(ye,Ow),Sw(M,Fw)),P.svg===!0&&(Sw(ye,kw),Sw(M,Iw),Sw(M,Rw)),P.svgFilters===!0&&(Sw(ye,Aw),Sw(M,Iw),Sw(M,Rw)),P.mathMl===!0&&(Sw(ye,Mw),Sw(M,Lw),Sw(M,Rw))),Ce.tagCheck=null,Ce.attributeCheck=null,gw(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Ce.tagCheck=e.ADD_TAGS:aw(e.ADD_TAGS)&&(ye===j&&(ye=ww(ye)),Sw(ye,e.ADD_TAGS,lt))),gw(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Ce.attributeCheck=e.ADD_ATTR:aw(e.ADD_ATTR)&&(M===be&&(M=ww(M)),Sw(M,e.ADD_ATTR,lt))),gw(e,`ADD_FORBID_CONTENTS`)&&aw(e.ADD_FORBID_CONTENTS)&&(Ue===We&&(Ue=ww(Ue)),Sw(Ue,e.ADD_FORBID_CONTENTS,lt)),Ve&&(ye[`#text`]=!0),Ae&&Sw(ye,[`html`,`head`,`body`]),ye.table&&(Sw(ye,[`tbody`]),delete N.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw yw(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw yw(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=ne(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ie()),T&&typeof E==`string`&&(E=ne(``)));JC&&JC(e),ut=e},mt=Sw({},[...kw,...Aw,...jw]),ht=Sw({},[...Mw,...Nw]),gt=function(e,t,n){return t.namespaceURI===Ze?e===`svg`:t.namespaceURI===Ye?e===`svg`&&(n===`annotation-xml`||rt[n]):!!mt[e]},_t=function(e,t,n){return t.namespaceURI===Ze?e===`math`:t.namespaceURI===Xe?e===`math`&&at[n]:!!ht[e]},vt=function(e,t,n){return t.namespaceURI===Xe&&!at[n]||t.namespaceURI===Ye&&!rt[n]?!1:!ht[e]&&(ot[e]||!mt[e])},yt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Qe,tagName:`template`});let n=ow(e.tagName),r=ow(t.tagName);return et[e.namespaceURI]?e.namespaceURI===Xe?gt(n,t,r):e.namespaceURI===Ye?_t(n,t,r):e.namespaceURI===Ze?vt(n,t,r):!!(st===`application/xhtml+xml`&&et[e.namespaceURI]):!1},bt=function(e){rw(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw yw(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},xt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},St=function(e){Tt(e);let t=g(e);if(t){let e=[];ew(t,t=>{rw(e,t)}),ew(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&xt(e,r,i)}},Ct=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}rw(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Fe||Ie)try{bt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},wt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||M[lt(i)]||xt(e,r,i)}},Tt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===$w.element&&wt(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Et=function(e,t){return ke?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Dt=function(e){if(!ke)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===$w.processingInstruction||n===$w.comment&&vw(Xw,e.data)){try{p(e)}catch{}continue}if(n===$w.element){let t=e,n=lt(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Et(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Ot=function(e){let t=null,r=null;if(Pe)e=`<remove></remove>`+e;else{let t=cw(e,/^[\r\n\t ]+/);r=t&&t[0]}st===`application/xhtml+xml`&&Qe===Ze&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?ne(e):e;if(Qe===Ze)try{t=new l().parseFromString(i,st)}catch{}if(!t||!t.documentElement){t=ae.createDocument(Qe,`template`,null);try{t.documentElement.innerHTML=$e?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Qe===Ze?se.call(t,Ae?`html`:`body`)[0]:Ae?t.documentElement:a},kt=function(e){let t=S?S(e):e.ownerDocument;return A.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},At=function(e){return e=lw(e,ue,` `),e=lw(e,de,` `),e=lw(e,fe,` `),e},jt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=A.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=At(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ew(i,e=>{Nt(e.content)&&jt(e.content)})},Mt=function(e){let t=x?x(e):null;return typeof t!=`string`||lt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Nt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===$w.documentFragment}catch{return!1}},Pt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Ft(e,n,r){e.length!==0&&ew(e,e=>{e.call(t,n,r,ut)})}let It=function(e,t){return!!(ke&&e.hasChildNodes()&&!Pt(e.firstElementChild)&&vw(Yw,e.textContent)&&vw(Yw,e.innerHTML)||ke&&e.namespaceURI===Ze&&tT[t]&&(Pt(e.firstElementChild)||typeof e.textContent==`string`&&vw(nT[t],e.textContent))||e.nodeType===$w.processingInstruction||ke&&e.nodeType===$w.comment&&vw(Xw,e.data))},Lt=function(e,t){return e instanceof RegExp?vw(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Rt=function(e,t,n){if(!N[t]&&Wt(t)&&Lt(xe.tagNameCheck,t))return!1;if(Ve&&!Ue[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return bt(e),!0},zt=function(e,t,n,r){return e.length===0?t:t===n||t===r?ww(t):t},Bt=function(e,t){return e===t||_(e)!==null?!1:(He&&Tt(e),!0)},Vt=function(e,n){if(Ft(le.beforeSanitizeElements,e,null),Bt(e,n))return!0;if(Mt(e))return bt(e),!0;let r=lt(w(e));if(ye=zt(le.uponSanitizeElement,ye,j,Me),Ft(le.uponSanitizeElement,e,{tagName:r,allowedTags:ye}),Bt(e,n))return!0;if(It(e,r))return bt(e),!0;if(N[r]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(r))&&!ye[r]){let t=Rt(e,r,n);return t===!1&&(Ft(le.afterSanitizeElements,e,null),Bt(e,n))?!0:t}if(C(e)===$w.element&&!yt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&vw(Zw,e.innerHTML))return bt(e),!0;if(Oe&&e.nodeType===$w.text){let n=At(e.textContent);e.textContent!==n&&(rw(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Ft(le.afterSanitizeElements,e,null),Bt(e,n)},Ht=function(e,t,r){if(Se[t]||Et(t,e)||Re&&(t===`id`||t===`name`)&&(r in n||r in dt))return!1;let i=M[t]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(t,e);return Te&&vw(pe,t)||we&&vw(me,t)?!0:i?qe[t]||vw(ve,lw(r,ge,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&uw(r,`data:`)===0&&Ge[e]||Ee&&!vw(he,lw(r,ge,``))?!0:!r:Wt(e)&&Lt(xe.tagNameCheck,e)&&Lt(xe.attributeNameCheck,t,e)||t===`is`&&xe.allowCustomizedBuiltInElements&&Lt(xe.tagNameCheck,r)},Ut=Sw({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Wt=function(e){return!Ut[ow(e)]&&vw(_e,e)},Gt=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ne(r);case`TrustedScriptURL`:return re(r)}return r},Kt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Mt(e)||(bt(e),!1)}catch{return Ct(t,e),!1}},qt=function(e,n){if(Ft(le.beforeSanitizeAttributes,e,null),Bt(e,n))return;let r=e.attributes;if(!r||Mt(e))return;M=zt(le.uponSanitizeAttribute,M,be,Ne);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:M,forceKeepAttr:void 0},a=r.length,o=lt(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=lt(s),d=l,f=s===`value`?d:dw(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Ft(le.uponSanitizeAttribute,e,i),f=i.attrValue,ze&&(u===`id`||u===`name`)&&uw(f,Be)!==0&&(Ct(s,e,n),f=Be+f,p=!0),ke&&vw(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Ct(s,e,n);continue}if(u===`attributename`&&cw(f,`href`)){Ct(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){Ct(s,e,n);continue}if(!De&&vw(Qw,f)){Ct(s,e,n);continue}if(Oe&&(f=At(f)),!Ht(o,u,f)){Ct(s,e,n);continue}f=Gt(o,u,c,f),f!==d&&Kt(e,s,c,f)&&p&&nw(t.removed)}}Ft(le.afterSanitizeAttributes,e,null),Bt(e,n)},Jt=function(e){let t=null,n=kt(e);for(Ft(le.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Ft(le.uponSanitizeShadowNode,t,null),Vt(t,e),qt(t,e),Nt(t.content)&&Jt(t.content),C(t)===$w.element){let e=v(t);Nt(e)&&(Yt(e),Jt(e))}Ft(le.afterSanitizeShadowDOM,e,null)},Yt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Jt(e.shadow);continue}let n=e.node,r=C(n)===$w.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&lt(e)===`template`){let e=n.content;Nt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Nt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if($e=!e,$e&&(e=`<!-->`),typeof e!=`string`&&!Pt(e)&&(e=Tw(e),typeof e!=`string`))throw yw(`dirty is not a string, aborting`);if(!t.isSupported)return e;je?(ye=Me,M=Ne):pt(n),(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&(ye=ww(ye)),le.uponSanitizeAttribute.length>0&&(M=ww(M)),t.removed=[];let c=He&&typeof e!=`string`&&Pt(e);if(c){Dt(e);let t=w(e);if(typeof t==`string`){let n=lt(t);if(!ye[n]||N[n])throw St(e),yw(`root node is forbidden and cannot be sanitized in-place`)}if(Mt(e))throw St(e),yw(`root node is clobbered and cannot be sanitized in-place`);try{Yt(e)}catch(t){throw St(e),t}}else if(Pt(e))i=Ot(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===$w.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Yt(i);else{if(!Fe&&!Oe&&!Ae&&e.indexOf(`<`)===-1)return T&&Le?ne(e):e;if(i=Ot(e),!i)return Fe?null:Le?E:``}i&&Pe&&bt(i.firstChild);let l=c?e:i;try{let e=kt(l);for(;o=e.nextNode();)Vt(o,l),qt(o,l),Nt(o.content)&&Jt(o.content)}catch(n){throw c&&(St(e),ew(t.removed,e=>{e.element&&Tt(e.element)})),n}if(c){let n=!1;if(ew(t.removed,t=>{t.element&&(t.element===e&&(n=!0),Tt(t.element))}),n)throw yw(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Oe&&jt(e),e}if(Fe){if(Oe&&jt(i),Ie)for(s=oe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(M.shadowroot||M.shadowrootmode)&&(s=ce.call(r,s,!0)),s}let u=Ae?i.outerHTML:i.innerHTML;return Ae&&ye[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&vw(qw,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
78
- `+u),Oe&&(u=At(u)),T&&Le?ne(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(e),je=!0,Me=ye,Ne=M},t.clearConfig=function(){ut=null,je=!1,Me=null,Ne=null,T=D,E=``},t.isValidAttribute=function(e,t,n){ut||pt({});let r=lt(e),i=lt(t);return Ht(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&gw(le,e)&&rw(le[e],t)},t.removeHook=function(e,t){if(gw(le,e)){if(t!==void 0){let n=tw(le[e],t);return n===-1?void 0:iw(le[e],n,1)[0]}return nw(le[e])}},t.removeHooks=function(e){gw(le,e)&&(le[e]=[])},t.removeAllHooks=function(){le=aT()},t}var lT=cT(),uT=lT;lT.sanitize.bind(lT),lT.isSupported,lT.addHook.bind(lT),lT.removeHook.bind(lT),lT.removeHooks.bind(lT),lT.removeAllHooks.bind(lT),lT.setConfig.bind(lT),lT.clearConfig.bind(lT),lT.isValidAttribute.bind(lT),lT.version,lT.removed;function dT(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var fT=dT();function pT(e){fT=e}var mT={exec:()=>null};function hT(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function gT(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(vT.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var _T=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),vT={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:hT(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:hT(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:hT(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:hT(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:hT(e=>RegExp(`^ {0,${e}}(?:</?(?:${NT})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:hT(e=>RegExp(`^ {0,${e}}>`))},yT=/^(?:[ \t]*(?:\n|$))+/,bT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ST=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,CT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wT=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,TT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ET=gT(TT).replace(/bull/g,wT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),DT=gT(TT).replace(/bull/g,wT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),OT=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,kT=/^[^\n]+/,AT=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jT=gT(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,AT).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),MT=gT(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wT).getRegex(),NT=`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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,PT=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,FT=gT(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,PT).replace(`tag`,NT).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),IT=e=>gT(OT).replace(`hr`,ST).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,NT).getRegex(),LT=IT(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),RT=IT(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),zT={blockquote:gT(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,RT).getRegex(),code:bT,def:jT,fences:xT,heading:CT,hr:ST,html:FT,lheading:ET,list:MT,newline:yT,paragraph:LT,table:mT,text:kT},BT=gT(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,ST).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,NT).getRegex(),VT={...zT,lheading:DT,table:BT,paragraph:gT(OT).replace(`hr`,ST).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,BT).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,NT).getRegex()},HT={...zT,html:gT(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,PT).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mT,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gT(OT).replace(`hr`,ST).replace(`heading`,` *#{1,6} *[^
79
- ]`).replace(`lheading`,ET).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},UT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,WT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,GT=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,KT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qT=/[\p{P}\p{S}]/u,JT=/[\s\p{P}\p{S}]/u,YT=/[^\s\p{P}\p{S}]/u,XT=gT(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,JT).getRegex(),ZT=/[\p{Pi}\p{Ps}"']/u,QT=/(?!~)[\p{P}\p{S}]/u,$T=/(?!~)[\s\p{P}\p{S}]/u,eE=/(?:[^\s\p{P}\p{S}]|~)/u,tE=gT(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,_T?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),nE=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,rE=gT(nE,`u`).replace(/punct/g,qT).getRegex(),iE=gT(nE,`u`).replace(/punct/g,QT).getRegex(),aE=gT(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,ZT).replace(/punct/g,qT).getRegex(),oE=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,sE=gT(oE,`gu`).replace(/notPunctSpace/g,YT).replace(/punctSpace/g,JT).replace(/punct/g,qT).getRegex(),cE=gT(oE,`gu`).replace(/notPunctSpace/g,eE).replace(/punctSpace/g,$T).replace(/punct/g,QT).getRegex(),lE=gT(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,YT).replace(/punctSpace/g,JT).replace(/punct/g,qT).getRegex(),uE=gT(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,YT).replace(/punctSpace/g,JT).replace(/punct/g,qT).getRegex(),dE=gT(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,YT).replace(/punctSpace/g,JT).replace(/punct/g,qT).getRegex(),fE=gT(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,qT).getRegex(),pE=gT(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,YT).replace(/punctSpace/g,JT).replace(/punct/g,qT).getRegex(),mE=gT(/\\(punct)/,`gu`).replace(/punct/g,qT).getRegex(),hE=gT(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gE=gT(PT).replace(`(?:-->|$)`,`-->`).getRegex(),_E=gT(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,gE).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vE=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,yE=gT(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,vE).getRegex(),bE=gT(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,yE).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xE=gT(/^!?\[(label)\]\[(ref)\]/).replace(`label`,yE).replace(`ref`,AT).getRegex(),SE=gT(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,AT).getRegex(),CE=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,wE=gT(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,vE).getRegex(),TE=gT(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,gT(/^!?\[(label)\]\[(ref)\]/).replace(`label`,wE).replace(`ref`,CE).getRegex()).replace(`nolink`,gT(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,CE).getRegex()).getRegex(),EE=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,DE=gT(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),OE={_backpedal:mT,anyPunctuation:mE,autolink:hE,blockSkip:tE,br:GT,code:WT,del:mT,delLDelim:mT,delRDelim:mT,emStrongLDelim:rE,emStrongRDelimAst:sE,emStrongRDelimUnd:uE,escape:UT,link:bE,nolink:SE,punctuation:XT,reflink:xE,reflinkSearch:TE,tag:_E,text:KT,url:mT},kE={...OE,emStrongLDelim:aE,emStrongRDelimAst:lE,emStrongRDelimUnd:dE,link:gT(/^!?\[(label)\]\((.*?)\)/).replace(`label`,yE).getRegex(),reflink:gT(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,yE).getRegex()},AE={...OE,emStrongRDelimAst:cE,emStrongLDelim:iE,delLDelim:fE,delRDelim:pE,url:gT(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,DE).replace(`protocol`,EE).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:gT(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,EE).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},jE={...AE,br:gT(GT).replace(`{2,}`,`*`).getRegex(),text:gT(AE.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},ME={normal:zT,gfm:VT,pedantic:HT},NE={normal:OE,gfm:AE,breaks:jE,pedantic:kE},PE={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},FE=e=>PE[e];function IE(e,t){if(t){if(vT.escapeTest.test(e))return e.replace(vT.escapeReplace,FE)}else if(vT.escapeTestNoEncode.test(e))return e.replace(vT.escapeReplaceNoEncode,FE);return e}function LE(e){return e.replace(vT.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function RE(e){try{e=encodeURI(e).replace(vT.percentDecode,`%`)}catch{return null}return e}function zE(e,t){let n=e.replace(vT.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(vT.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(vT.slashPipe,`|`);return n}function BE(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function VE(e){let t=e.split(`
80
- `),n=t.length-1;for(;n>=0&&vT.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
81
- `)}function HE(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function UE(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function WE(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function GE(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function KE(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
82
- `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
83
- `)}function qE(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var JE=class{options;rules;lexer;constructor(e){this.options=e||fT}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:VE(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=KE(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=BE(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:BE(t[0],`
84
- `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:BE(t[0],`
85
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=BE(t[0],`
86
- `).split(`
87
- `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
88
- `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
89
- $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
90
- ${s}`:s,r=r?`${r}
91
- ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
92
- `),o=t.raw+`
93
- `+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
94
- `).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
95
- ${d.join(`
96
- `)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
97
- `+e.join(`
98
- `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
99
- `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
100
- `,1)[0],l=t[1].length,u=this.options.pedantic?WE(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>WE(e,l)),d=e.split(`
101
- `,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
102
- `,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
103
- `,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
104
- `+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
105
- `+d}f=!d.trim(),r+=l+`
106
- `,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=VE(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=HE(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:BE(t[0],`
107
- `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=zE(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
108
- `):[],a={type:`table`,raw:BE(t[0],`
109
- `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(zE(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:BE(t[0],`
110
- `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
111
- `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&qE(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=BE(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=UE(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),GE(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&qE(e,n[1],r,this.rules))return;let i=t[HE((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return GE(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:LE(t[0]),escaped:e}}}},YE=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||fT,this.options.tokenizer=this.options.tokenizer||new JE,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:vT,block:ME.normal,inline:NE.normal};this.options.pedantic?(t.block=ME.pedantic,t.inline=NE.pedantic):this.options.gfm&&(t.block=ME.gfm,t.inline=this.options.breaks?NE.breaks:NE.gfm),this.tokenizer.rules=t}static get rules(){return{block:ME,inline:NE}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(vT.carriageReturn,`
112
- `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(vT.tabCharGlobal,` `).replace(vT.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
113
- `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
114
- `)?``:`
115
- `)+i.raw,n.text+=`
116
- `+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
117
- `)?``:`
118
- `)+i.raw,n.text+=`
119
- `+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
120
- `)?``:`
121
- `)+i.raw,r.text+=`
122
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
123
- `)?``:`
124
- `)+i.raw,n.text+=`
125
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,HE(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,HE(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},XE=class{options;parser;constructor(e){this.options=e||fT}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(vT.notSpaceStart)?.[0],i=e?e.replace(vT.endingNewline,``)+`
126
- `:``;return r?`<pre><code class="language-`+IE(r)+`">`+(n?i:IE(i,!0))+`</code></pre>
127
- `:`<pre><code>`+(n?i:IE(i,!0))+`</code></pre>
128
- `}blockquote({tokens:e}){return`<blockquote>
129
- ${this.parser.parse(e)}</blockquote>
130
- `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
131
- `}hr(e){return`<hr>
132
- `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
133
- `+r+`</`+i+`>
134
- `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
135
- `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
136
- `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
137
- <thead>
138
- `+t+`</thead>
139
- `+r+`</table>
140
- `}tablerow({text:e}){return`<tr>
141
- ${e}</tr>
142
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
143
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${IE(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?IE(n,!0):this.parser.parseInline(r),o=RE(e);if(o===null)return a;e=IE(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+IE(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=RE(e);if(i===null)return IE(n);e=i;let a=`<img src="${IE(e)}" alt="${IE(n)}"`;return t&&(a+=` title="${IE(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:IE(e.text)}},ZE=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},QE=class e{options;renderer;textRenderer;constructor(e){this.options=e||fT,this.options.renderer=this.options.renderer||new XE,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ZE}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},$E=class{options;block;constructor(e){this.options=e||fT}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?YE.lex:YE.lexInline}provideParser(e=this.block){return e?QE.parse:QE.parseInline}},eD=class{defaults=dT();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=QE;Renderer=XE;TextRenderer=ZE;Lexer=YE;Tokenizer=JE;Hooks=$E;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new XE(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new JE(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new $E;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=$E.passThroughHooks.has(n)?e=>{if(this.defaults.async&&$E.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return YE.lex(e,t??this.defaults)}parser(e,t){return QE.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?YE.lex:YE.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?QE.parse:QE.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?YE.lex:YE.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?QE.parse:QE.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
144
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+IE(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},tD=new eD;function nD(e,t){return tD.parse(e,t)}nD.options=nD.setOptions=function(e){return tD.setOptions(e),nD.defaults=tD.defaults,pT(nD.defaults),nD},nD.getDefaults=dT,nD.defaults=fT;function rD(...e){return tD.use(...e),nD.defaults=tD.defaults,pT(nD.defaults),nD}nD.use=rD,nD.walkTokens=function(e,t){return tD.walkTokens(e,t)},nD.parseInline=tD.parseInline,nD.Parser=QE,nD.parser=QE.parse,nD.Renderer=XE,nD.TextRenderer=ZE,nD.Lexer=YE,nD.lexer=YE.lex,nD.Tokenizer=JE,nD.Hooks=$E,nD.parse=nD,nD.options,nD.setOptions,nD.walkTokens,nD.parseInline,QE.parse,YE.lex;function iD(e){return e.replace(/^file:\/\/\/([a-z]:[\\/])/i,`$1`).replace(/^file:\/\//i,``)}function aD(e){return/^[a-z]:[\\/]/i.test(e)}function oD(e){return/^[\\/]/.test(e)||aD(e)}var B=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},sD=/([A-Z])/g,cD=e=>e.replace(sD,`-$1`).toLowerCase(),lD={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},uD=/[&><"']/g,dD=e=>String(e).replace(uD,e=>lD[e]),fD=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?fD(e.body[0]):e:e.type===`font`?fD(e.body):e,pD=new Set([`mathord`,`textord`,`atom`]),mD=e=>pD.has(fD(e).type),hD=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},gD={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function _D(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function vD(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:_D(Array.isArray(e.type)?e.type[0]:e.type)}function yD(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?vD(r):a?a(i):i}var bD=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(gD)){var n=gD[t];n&&yD(this,t,e,n)}}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=hD(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},xD=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return AD[jD[this.id]]}sub(){return AD[MD[this.id]]}fracNum(){return AD[ND[this.id]]}fracDen(){return AD[PD[this.id]]}cramp(){return AD[FD[this.id]]}text(){return AD[ID[this.id]]}isTight(){return this.size>=2}},SD=0,CD=1,wD=2,TD=3,ED=4,DD=5,OD=6,kD=7,AD=[new xD(SD,0,!1),new xD(CD,0,!0),new xD(wD,1,!1),new xD(TD,1,!0),new xD(ED,2,!1),new xD(DD,2,!0),new xD(OD,3,!1),new xD(kD,3,!0)],jD=[ED,DD,ED,DD,OD,kD,OD,kD],MD=[DD,DD,DD,DD,kD,kD,kD,kD],ND=[wD,TD,ED,DD,OD,kD,OD,kD],PD=[TD,TD,DD,DD,kD,kD,kD,kD],FD=[CD,CD,TD,TD,DD,DD,kD,kD],ID=[SD,CD,wD,TD,wD,TD,wD,TD],LD={DISPLAY:AD[SD],TEXT:AD[wD],SCRIPT:AD[ED],SCRIPTSCRIPT:AD[OD]},RD=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function zD(e){for(var t=0;t<RD.length;t++)for(var n=RD[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var BD=[];RD.forEach(e=>e.blocks.forEach(e=>BD.push(...e)));function VD(e){for(var t=0;t<BD.length;t+=2)if(e>=BD[t]&&e<=BD[t+1])return!0;return!1}var HD=e=>e+` `+e,UD=80,WD=function(e,t){return`M95,`+(622+e+t)+`
145
- c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
146
- c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
147
- c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
148
- s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
149
- c69,-144,104.5,-217.7,106.5,-221
150
- l`+e/2.075+` -`+e+`
151
- c5.3,-9.3,12,-14,20,-14
152
- H400000v`+(40+e)+`H845.2724
153
- s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
154
- c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
155
- M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},GD=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
156
- c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
157
- c340,-704.7,510.7,-1060.3,512,-1067
158
- l`+e/2.084+` -`+e+`
159
- c4.7,-7.3,11,-11,19,-11
160
- H40000v`+(40+e)+`H1012.3
161
- s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
162
- c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
163
- s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
164
- c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
165
- M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},KD=function(e,t){return`M983 `+(10+e+t)+`
166
- l`+e/3.13+` -`+e+`
167
- c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
168
- H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
169
- s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
170
- c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
171
- c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
172
- c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
173
- c53.7,-170.3,84.5,-266.8,92.5,-289.5z
174
- M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},qD=function(e,t){return`M424,`+(2398+e+t)+`
175
- c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
176
- c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
177
- s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
178
- s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
179
- l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
180
- v`+(40+e)+`H1014.6
181
- s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
182
- c-2,6,-10,9,-24,9
183
- c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
184
- h400000v`+(40+e)+`h-400000z`},JD=function(e,t){return`M473,`+(2713+e+t)+`
185
- c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
186
- c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
187
- s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
188
- c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
189
- c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
190
- s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
191
- 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},YD=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},XD=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
192
- H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
193
- h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
194
- c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
195
- 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},ZD=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=WD(t,UD);break;case`sqrtSize1`:r=GD(t,UD);break;case`sqrtSize2`:r=KD(t,UD);break;case`sqrtSize3`:r=qD(t,UD);break;case`sqrtSize4`:r=JD(t,UD);break;case`sqrtTall`:r=XD(t,UD,n)}return r},QD=function(e,t){switch(e){case`⎜`:return HD(`M291 0 H417 V`+t+` H291z`);case`∣`:return HD(`M145 0 H188 V`+t+` H145z`);case`∥`:return HD(`M145 0 H188 V`+t+` H145z`)+HD(`M367 0 H410 V`+t+` H367z`);case`⎟`:return HD(`M457 0 H583 V`+t+` H457z`);case`⎢`:return HD(`M319 0 H403 V`+t+` H319z`);case`⎥`:return HD(`M263 0 H347 V`+t+` H263z`);case`⎪`:return HD(`M384 0 H504 V`+t+` H384z`);case`⏐`:return HD(`M312 0 H355 V`+t+` H312z`);case`‖`:return HD(`M257 0 H300 V`+t+` H257z`)+HD(`M478 0 H521 V`+t+` H478z`);default:return``}},$D={doubleleftarrow:`M262 157
196
- l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
197
- 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
198
- 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
199
- c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
200
- 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
201
- -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
202
- -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
203
- m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
204
- -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
205
- 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
206
- -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
207
- -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
208
- -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
209
- c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
210
- -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
211
- 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
212
- -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
213
- c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
214
- 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
215
- 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
216
- l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
217
- -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
218
- 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
219
- 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
220
- 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
221
- -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
222
- H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
223
- 435 0h399565z`,leftgroupunder:`M400000 262
224
- H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
225
- 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
226
- -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
227
- -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
228
- -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
229
- 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
230
- -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
231
- -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
232
- m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
233
- 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
234
- 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
235
- -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
236
- 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
237
- -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
238
- v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
239
- -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
240
- -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
241
- 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:HD(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:HD(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:HD(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:HD(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
242
- -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
243
- c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
244
- 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:HD(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
245
- c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
246
- -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
247
- 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
248
- 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
249
- c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
250
- 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
251
- 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
252
- -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
253
- -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
254
- m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
255
- 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
256
- -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
257
- m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
258
- c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
259
- -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
260
- m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
261
- 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
262
- -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
263
- m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
264
- c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
265
- -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
266
- 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
267
- 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
268
- -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
269
- -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
270
- 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
271
- -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
272
- s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
273
- c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
274
- 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
275
- -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
276
- 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
277
- 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
278
- -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
279
- -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
280
- 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
281
- -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
282
- 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
283
- m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
284
- 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
285
- -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
286
- -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
287
- 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
288
- 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
289
- -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
290
- m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
291
- 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
292
- -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
293
- 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:HD(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:HD(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:HD(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
294
- 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
295
- -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
296
- -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
297
- 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
298
- -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
299
- -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
300
- -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
301
- 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
302
- c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
303
- 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
304
- 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
305
- -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
306
- 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
307
- -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
308
- 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
309
- 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
310
- -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
311
- -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
312
- 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
313
- c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
314
- 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
315
- -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
316
- 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
317
- 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
318
- -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
319
- -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
320
- 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
321
- 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
322
- -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
323
- 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
324
- 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
325
- -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
326
- -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
327
- H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
328
- c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
329
- c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
330
- -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
331
- -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
332
- -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
333
- -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
334
- -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
335
- -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
336
- -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
337
- c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
338
- c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
339
- s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
340
- 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
341
- s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
342
- c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
343
- M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
344
- -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
345
- 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
346
- -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
347
- -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
348
- -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
349
- 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
350
- c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
351
- c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
352
- c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
353
- c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
354
- M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
355
- c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
356
- -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
357
- c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
358
- M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
359
- c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
360
- 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
361
- -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
362
- M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
363
- c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
364
- -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
365
- c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
366
- M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},eO=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
367
- H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
368
- M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
369
- c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
370
- c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
371
- c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
372
- c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
373
- M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
374
- c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
375
- c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
376
- MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
377
- MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
378
- M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
379
- M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
380
- c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
381
- -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
382
- 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
383
- c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
384
- -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
385
- l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
386
- -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
387
- 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
388
- c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
389
- c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
390
- c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
391
- c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
392
- c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
393
- l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
394
- -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function tO(e){return`toText`in e}var nO=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(tO(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},rO={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},iO={ex:!0,em:!0,mu:!0},aO=function(e){return typeof e!=`string`&&(e=e.unit),e in rO||e in iO||e===`ex`},oO=function(e,t){var n;if(e.unit in rO)n=rO[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new B(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},V=function(e){return+e.toFixed(4)+`em`},sO=function(e){return e.filter(e=>e).join(` `)},cO=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=cD(n)+`:`+r+`;`)}return t},lO=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},uO=function(e){var t=document.createElement(e);t.className=sO(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},dO=/[\s"'>/=\x00-\x1f]/,fO=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+dD(sO(this.classes))+`"`);var n=cO(this.style);n&&(t+=` style="`+dD(n)+`"`);for(var r of Object.keys(this.attributes)){if(dO.test(r))throw new B(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+dD(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},pO=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,lO.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return uO.call(this,`span`)}toMarkup(){return fO.call(this,`span`)}},mO=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,lO.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return uO.call(this,`a`)}toMarkup(){return fO.call(this,`a`)}},hO=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+dD(this.src)+`"`+(` alt="`+dD(this.alt)+`"`),t=cO(this.style);return t&&(e+=` style="`+dD(t)+`"`),e+=`'/>`,e}},gO={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},_O=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=zD(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=gO[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=V(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=sO(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=dD(sO(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+V(this.italic)+`;`),n+=cO(this.style),n&&(e=!0,t+=` style="`+dD(n)+`"`);var r=dD(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},vO=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+dD(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},yO=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,$D[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+dD(this.alternate)+`"/>`:`<path d="`+dD($D[this.pathName])+`"/>`}},bO=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+dD(this.attributes[t])+`"`;return e+=`/>`,e}};function xO(e){if(e instanceof _O)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function SO(e){if(e instanceof pO)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var CO=e=>e instanceof pO||e instanceof mO||e instanceof nO,wO={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},TO={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},EO={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function DO(e,t){wO[e]=t}function OO(e,t,n){if(!wO[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=wO[t][r];if(!i&&e[0]in EO&&(r=EO[e[0]].charCodeAt(0),i=wO[t][r]),!i&&n===`text`&&VD(r)&&(i=wO[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var kO={};function AO(e){var t=e>=5?0:e>=3?1:2;if(!kO[t]){var n=kO[t]={cssEmPerMu:TO.quad[t]/18};for(var r of Object.keys(TO))n[r]=TO[r][t]}return kO[t]}var jO={math:{},text:{}};function H(e,t,n,r,i,a){jO[e][i]={font:t,group:n,replace:r},a&&r&&(jO[e][r]=jO[e][i])}var U=`math`,W=`text`,G=`main`,K=`ams`,MO=`accent-token`,q=`bin`,NO=`close`,PO=`inner`,FO=`mathord`,IO=`op-token`,LO=`open`,RO=`punct`,J=`rel`,zO=`spacing`,Y=`textord`;H(U,G,J,`≡`,`\\equiv`,!0),H(U,G,J,`≺`,`\\prec`,!0),H(U,G,J,`≻`,`\\succ`,!0),H(U,G,J,`∼`,`\\sim`,!0),H(U,G,J,`⊥`,`\\perp`),H(U,G,J,`⪯`,`\\preceq`,!0),H(U,G,J,`⪰`,`\\succeq`,!0),H(U,G,J,`≃`,`\\simeq`,!0),H(U,G,J,`∣`,`\\mid`,!0),H(U,G,J,`≪`,`\\ll`,!0),H(U,G,J,`≫`,`\\gg`,!0),H(U,G,J,`≍`,`\\asymp`,!0),H(U,G,J,`∥`,`\\parallel`),H(U,G,J,`⋈`,`\\bowtie`,!0),H(U,G,J,`⌣`,`\\smile`,!0),H(U,G,J,`⊑`,`\\sqsubseteq`,!0),H(U,G,J,`⊒`,`\\sqsupseteq`,!0),H(U,G,J,`≐`,`\\doteq`,!0),H(U,G,J,`⌢`,`\\frown`,!0),H(U,G,J,`∋`,`\\ni`,!0),H(U,G,J,`∝`,`\\propto`,!0),H(U,G,J,`⊢`,`\\vdash`,!0),H(U,G,J,`⊣`,`\\dashv`,!0),H(U,G,J,`∋`,`\\owns`),H(U,G,RO,`.`,`\\ldotp`),H(U,G,RO,`⋅`,`\\cdotp`),H(U,G,RO,`⋅`,`·`),H(W,G,Y,`⋅`,`·`),H(U,G,Y,`#`,`\\#`),H(W,G,Y,`#`,`\\#`),H(U,G,Y,`&`,`\\&`),H(W,G,Y,`&`,`\\&`),H(U,G,Y,`ℵ`,`\\aleph`,!0),H(U,G,Y,`∀`,`\\forall`,!0),H(U,G,Y,`ℏ`,`\\hbar`,!0),H(U,G,Y,`∃`,`\\exists`,!0),H(U,G,Y,`∇`,`\\nabla`,!0),H(U,G,Y,`♭`,`\\flat`,!0),H(U,G,Y,`ℓ`,`\\ell`,!0),H(U,G,Y,`♮`,`\\natural`,!0),H(U,G,Y,`♣`,`\\clubsuit`,!0),H(U,G,Y,`℘`,`\\wp`,!0),H(U,G,Y,`♯`,`\\sharp`,!0),H(U,G,Y,`♢`,`\\diamondsuit`,!0),H(U,G,Y,`ℜ`,`\\Re`,!0),H(U,G,Y,`♡`,`\\heartsuit`,!0),H(U,G,Y,`ℑ`,`\\Im`,!0),H(U,G,Y,`♠`,`\\spadesuit`,!0),H(U,G,Y,`§`,`\\S`,!0),H(W,G,Y,`§`,`\\S`),H(U,G,Y,`¶`,`\\P`,!0),H(W,G,Y,`¶`,`\\P`),H(U,G,Y,`†`,`\\dag`),H(W,G,Y,`†`,`\\dag`),H(W,G,Y,`†`,`\\textdagger`),H(U,G,Y,`‡`,`\\ddag`),H(W,G,Y,`‡`,`\\ddag`),H(W,G,Y,`‡`,`\\textdaggerdbl`),H(U,G,NO,`⎱`,`\\rmoustache`,!0),H(U,G,LO,`⎰`,`\\lmoustache`,!0),H(U,G,NO,`⟯`,`\\rgroup`,!0),H(U,G,LO,`⟮`,`\\lgroup`,!0),H(U,G,q,`∓`,`\\mp`,!0),H(U,G,q,`⊖`,`\\ominus`,!0),H(U,G,q,`⊎`,`\\uplus`,!0),H(U,G,q,`⊓`,`\\sqcap`,!0),H(U,G,q,`∗`,`\\ast`),H(U,G,q,`⊔`,`\\sqcup`,!0),H(U,G,q,`◯`,`\\bigcirc`,!0),H(U,G,q,`∙`,`\\bullet`,!0),H(U,G,q,`‡`,`\\ddagger`),H(U,G,q,`≀`,`\\wr`,!0),H(U,G,q,`⨿`,`\\amalg`),H(U,G,q,`&`,`\\And`),H(U,G,J,`⟵`,`\\longleftarrow`,!0),H(U,G,J,`⇐`,`\\Leftarrow`,!0),H(U,G,J,`⟸`,`\\Longleftarrow`,!0),H(U,G,J,`⟶`,`\\longrightarrow`,!0),H(U,G,J,`⇒`,`\\Rightarrow`,!0),H(U,G,J,`⟹`,`\\Longrightarrow`,!0),H(U,G,J,`↔`,`\\leftrightarrow`,!0),H(U,G,J,`⟷`,`\\longleftrightarrow`,!0),H(U,G,J,`⇔`,`\\Leftrightarrow`,!0),H(U,G,J,`⟺`,`\\Longleftrightarrow`,!0),H(U,G,J,`↦`,`\\mapsto`,!0),H(U,G,J,`⟼`,`\\longmapsto`,!0),H(U,G,J,`↗`,`\\nearrow`,!0),H(U,G,J,`↩`,`\\hookleftarrow`,!0),H(U,G,J,`↪`,`\\hookrightarrow`,!0),H(U,G,J,`↘`,`\\searrow`,!0),H(U,G,J,`↼`,`\\leftharpoonup`,!0),H(U,G,J,`⇀`,`\\rightharpoonup`,!0),H(U,G,J,`↙`,`\\swarrow`,!0),H(U,G,J,`↽`,`\\leftharpoondown`,!0),H(U,G,J,`⇁`,`\\rightharpoondown`,!0),H(U,G,J,`↖`,`\\nwarrow`,!0),H(U,G,J,`⇌`,`\\rightleftharpoons`,!0),H(U,K,J,`≮`,`\\nless`,!0),H(U,K,J,``,`\\@nleqslant`),H(U,K,J,``,`\\@nleqq`),H(U,K,J,`⪇`,`\\lneq`,!0),H(U,K,J,`≨`,`\\lneqq`,!0),H(U,K,J,``,`\\@lvertneqq`),H(U,K,J,`⋦`,`\\lnsim`,!0),H(U,K,J,`⪉`,`\\lnapprox`,!0),H(U,K,J,`⊀`,`\\nprec`,!0),H(U,K,J,`⋠`,`\\npreceq`,!0),H(U,K,J,`⋨`,`\\precnsim`,!0),H(U,K,J,`⪹`,`\\precnapprox`,!0),H(U,K,J,`≁`,`\\nsim`,!0),H(U,K,J,``,`\\@nshortmid`),H(U,K,J,`∤`,`\\nmid`,!0),H(U,K,J,`⊬`,`\\nvdash`,!0),H(U,K,J,`⊭`,`\\nvDash`,!0),H(U,K,J,`⋪`,`\\ntriangleleft`),H(U,K,J,`⋬`,`\\ntrianglelefteq`,!0),H(U,K,J,`⊊`,`\\subsetneq`,!0),H(U,K,J,``,`\\@varsubsetneq`),H(U,K,J,`⫋`,`\\subsetneqq`,!0),H(U,K,J,``,`\\@varsubsetneqq`),H(U,K,J,`≯`,`\\ngtr`,!0),H(U,K,J,``,`\\@ngeqslant`),H(U,K,J,``,`\\@ngeqq`),H(U,K,J,`⪈`,`\\gneq`,!0),H(U,K,J,`≩`,`\\gneqq`,!0),H(U,K,J,``,`\\@gvertneqq`),H(U,K,J,`⋧`,`\\gnsim`,!0),H(U,K,J,`⪊`,`\\gnapprox`,!0),H(U,K,J,`⊁`,`\\nsucc`,!0),H(U,K,J,`⋡`,`\\nsucceq`,!0),H(U,K,J,`⋩`,`\\succnsim`,!0),H(U,K,J,`⪺`,`\\succnapprox`,!0),H(U,K,J,`≆`,`\\ncong`,!0),H(U,K,J,``,`\\@nshortparallel`),H(U,K,J,`∦`,`\\nparallel`,!0),H(U,K,J,`⊯`,`\\nVDash`,!0),H(U,K,J,`⋫`,`\\ntriangleright`),H(U,K,J,`⋭`,`\\ntrianglerighteq`,!0),H(U,K,J,``,`\\@nsupseteqq`),H(U,K,J,`⊋`,`\\supsetneq`,!0),H(U,K,J,``,`\\@varsupsetneq`),H(U,K,J,`⫌`,`\\supsetneqq`,!0),H(U,K,J,``,`\\@varsupsetneqq`),H(U,K,J,`⊮`,`\\nVdash`,!0),H(U,K,J,`⪵`,`\\precneqq`,!0),H(U,K,J,`⪶`,`\\succneqq`,!0),H(U,K,J,``,`\\@nsubseteqq`),H(U,K,q,`⊴`,`\\unlhd`),H(U,K,q,`⊵`,`\\unrhd`),H(U,K,J,`↚`,`\\nleftarrow`,!0),H(U,K,J,`↛`,`\\nrightarrow`,!0),H(U,K,J,`⇍`,`\\nLeftarrow`,!0),H(U,K,J,`⇏`,`\\nRightarrow`,!0),H(U,K,J,`↮`,`\\nleftrightarrow`,!0),H(U,K,J,`⇎`,`\\nLeftrightarrow`,!0),H(U,K,J,`△`,`\\vartriangle`),H(U,K,Y,`ℏ`,`\\hslash`),H(U,K,Y,`▽`,`\\triangledown`),H(U,K,Y,`◊`,`\\lozenge`),H(U,K,Y,`Ⓢ`,`\\circledS`),H(U,K,Y,`®`,`\\circledR`),H(W,K,Y,`®`,`\\circledR`),H(U,K,Y,`∡`,`\\measuredangle`,!0),H(U,K,Y,`∄`,`\\nexists`),H(U,K,Y,`℧`,`\\mho`),H(U,K,Y,`Ⅎ`,`\\Finv`,!0),H(U,K,Y,`⅁`,`\\Game`,!0),H(U,K,Y,`‵`,`\\backprime`),H(U,K,Y,`▲`,`\\blacktriangle`),H(U,K,Y,`▼`,`\\blacktriangledown`),H(U,K,Y,`■`,`\\blacksquare`),H(U,K,Y,`⧫`,`\\blacklozenge`),H(U,K,Y,`★`,`\\bigstar`),H(U,K,Y,`∢`,`\\sphericalangle`,!0),H(U,K,Y,`∁`,`\\complement`,!0),H(U,K,Y,`ð`,`\\eth`,!0),H(W,G,Y,`ð`,`ð`),H(U,K,Y,`╱`,`\\diagup`),H(U,K,Y,`╲`,`\\diagdown`),H(U,K,Y,`□`,`\\square`),H(U,K,Y,`□`,`\\Box`),H(U,K,Y,`◊`,`\\Diamond`),H(U,K,Y,`¥`,`\\yen`,!0),H(W,K,Y,`¥`,`\\yen`,!0),H(U,K,Y,`✓`,`\\checkmark`,!0),H(W,K,Y,`✓`,`\\checkmark`),H(U,K,Y,`ℶ`,`\\beth`,!0),H(U,K,Y,`ℸ`,`\\daleth`,!0),H(U,K,Y,`ℷ`,`\\gimel`,!0),H(U,K,Y,`ϝ`,`\\digamma`,!0),H(U,K,Y,`ϰ`,`\\varkappa`),H(U,K,LO,`┌`,`\\@ulcorner`,!0),H(U,K,NO,`┐`,`\\@urcorner`,!0),H(U,K,LO,`└`,`\\@llcorner`,!0),H(U,K,NO,`┘`,`\\@lrcorner`,!0),H(U,K,J,`≦`,`\\leqq`,!0),H(U,K,J,`⩽`,`\\leqslant`,!0),H(U,K,J,`⪕`,`\\eqslantless`,!0),H(U,K,J,`≲`,`\\lesssim`,!0),H(U,K,J,`⪅`,`\\lessapprox`,!0),H(U,K,J,`≊`,`\\approxeq`,!0),H(U,K,q,`⋖`,`\\lessdot`),H(U,K,J,`⋘`,`\\lll`,!0),H(U,K,J,`≶`,`\\lessgtr`,!0),H(U,K,J,`⋚`,`\\lesseqgtr`,!0),H(U,K,J,`⪋`,`\\lesseqqgtr`,!0),H(U,K,J,`≑`,`\\doteqdot`),H(U,K,J,`≓`,`\\risingdotseq`,!0),H(U,K,J,`≒`,`\\fallingdotseq`,!0),H(U,K,J,`∽`,`\\backsim`,!0),H(U,K,J,`⋍`,`\\backsimeq`,!0),H(U,K,J,`⫅`,`\\subseteqq`,!0),H(U,K,J,`⋐`,`\\Subset`,!0),H(U,K,J,`⊏`,`\\sqsubset`,!0),H(U,K,J,`≼`,`\\preccurlyeq`,!0),H(U,K,J,`⋞`,`\\curlyeqprec`,!0),H(U,K,J,`≾`,`\\precsim`,!0),H(U,K,J,`⪷`,`\\precapprox`,!0),H(U,K,J,`⊲`,`\\vartriangleleft`),H(U,K,J,`⊴`,`\\trianglelefteq`),H(U,K,J,`⊨`,`\\vDash`,!0),H(U,K,J,`⊪`,`\\Vvdash`,!0),H(U,K,J,`⌣`,`\\smallsmile`),H(U,K,J,`⌢`,`\\smallfrown`),H(U,K,J,`≏`,`\\bumpeq`,!0),H(U,K,J,`≎`,`\\Bumpeq`,!0),H(U,K,J,`≧`,`\\geqq`,!0),H(U,K,J,`⩾`,`\\geqslant`,!0),H(U,K,J,`⪖`,`\\eqslantgtr`,!0),H(U,K,J,`≳`,`\\gtrsim`,!0),H(U,K,J,`⪆`,`\\gtrapprox`,!0),H(U,K,q,`⋗`,`\\gtrdot`),H(U,K,J,`⋙`,`\\ggg`,!0),H(U,K,J,`≷`,`\\gtrless`,!0),H(U,K,J,`⋛`,`\\gtreqless`,!0),H(U,K,J,`⪌`,`\\gtreqqless`,!0),H(U,K,J,`≖`,`\\eqcirc`,!0),H(U,K,J,`≗`,`\\circeq`,!0),H(U,K,J,`≜`,`\\triangleq`,!0),H(U,K,J,`∼`,`\\thicksim`),H(U,K,J,`≈`,`\\thickapprox`),H(U,K,J,`⫆`,`\\supseteqq`,!0),H(U,K,J,`⋑`,`\\Supset`,!0),H(U,K,J,`⊐`,`\\sqsupset`,!0),H(U,K,J,`≽`,`\\succcurlyeq`,!0),H(U,K,J,`⋟`,`\\curlyeqsucc`,!0),H(U,K,J,`≿`,`\\succsim`,!0),H(U,K,J,`⪸`,`\\succapprox`,!0),H(U,K,J,`⊳`,`\\vartriangleright`),H(U,K,J,`⊵`,`\\trianglerighteq`),H(U,K,J,`⊩`,`\\Vdash`,!0),H(U,K,J,`∣`,`\\shortmid`),H(U,K,J,`∥`,`\\shortparallel`),H(U,K,J,`≬`,`\\between`,!0),H(U,K,J,`⋔`,`\\pitchfork`,!0),H(U,K,J,`∝`,`\\varpropto`),H(U,K,J,`◀`,`\\blacktriangleleft`),H(U,K,J,`∴`,`\\therefore`,!0),H(U,K,J,`∍`,`\\backepsilon`),H(U,K,J,`▶`,`\\blacktriangleright`),H(U,K,J,`∵`,`\\because`,!0),H(U,K,J,`⋘`,`\\llless`),H(U,K,J,`⋙`,`\\gggtr`),H(U,K,q,`⊲`,`\\lhd`),H(U,K,q,`⊳`,`\\rhd`),H(U,K,J,`≂`,`\\eqsim`,!0),H(U,G,J,`⋈`,`\\Join`),H(U,K,J,`≑`,`\\Doteq`,!0),H(U,K,q,`∔`,`\\dotplus`,!0),H(U,K,q,`∖`,`\\smallsetminus`),H(U,K,q,`⋒`,`\\Cap`,!0),H(U,K,q,`⋓`,`\\Cup`,!0),H(U,K,q,`⩞`,`\\doublebarwedge`,!0),H(U,K,q,`⊟`,`\\boxminus`,!0),H(U,K,q,`⊞`,`\\boxplus`,!0),H(U,K,q,`⋇`,`\\divideontimes`,!0),H(U,K,q,`⋉`,`\\ltimes`,!0),H(U,K,q,`⋊`,`\\rtimes`,!0),H(U,K,q,`⋋`,`\\leftthreetimes`,!0),H(U,K,q,`⋌`,`\\rightthreetimes`,!0),H(U,K,q,`⋏`,`\\curlywedge`,!0),H(U,K,q,`⋎`,`\\curlyvee`,!0),H(U,K,q,`⊝`,`\\circleddash`,!0),H(U,K,q,`⊛`,`\\circledast`,!0),H(U,K,q,`⋅`,`\\centerdot`),H(U,K,q,`⊺`,`\\intercal`,!0),H(U,K,q,`⋒`,`\\doublecap`),H(U,K,q,`⋓`,`\\doublecup`),H(U,K,q,`⊠`,`\\boxtimes`,!0),H(U,K,J,`⇢`,`\\dashrightarrow`,!0),H(U,K,J,`⇠`,`\\dashleftarrow`,!0),H(U,K,J,`⇇`,`\\leftleftarrows`,!0),H(U,K,J,`⇆`,`\\leftrightarrows`,!0),H(U,K,J,`⇚`,`\\Lleftarrow`,!0),H(U,K,J,`↞`,`\\twoheadleftarrow`,!0),H(U,K,J,`↢`,`\\leftarrowtail`,!0),H(U,K,J,`↫`,`\\looparrowleft`,!0),H(U,K,J,`⇋`,`\\leftrightharpoons`,!0),H(U,K,J,`↶`,`\\curvearrowleft`,!0),H(U,K,J,`↺`,`\\circlearrowleft`,!0),H(U,K,J,`↰`,`\\Lsh`,!0),H(U,K,J,`⇈`,`\\upuparrows`,!0),H(U,K,J,`↿`,`\\upharpoonleft`,!0),H(U,K,J,`⇃`,`\\downharpoonleft`,!0),H(U,G,J,`⊶`,`\\origof`,!0),H(U,G,J,`⊷`,`\\imageof`,!0),H(U,K,J,`⊸`,`\\multimap`,!0),H(U,K,J,`↭`,`\\leftrightsquigarrow`,!0),H(U,K,J,`⇉`,`\\rightrightarrows`,!0),H(U,K,J,`⇄`,`\\rightleftarrows`,!0),H(U,K,J,`↠`,`\\twoheadrightarrow`,!0),H(U,K,J,`↣`,`\\rightarrowtail`,!0),H(U,K,J,`↬`,`\\looparrowright`,!0),H(U,K,J,`↷`,`\\curvearrowright`,!0),H(U,K,J,`↻`,`\\circlearrowright`,!0),H(U,K,J,`↱`,`\\Rsh`,!0),H(U,K,J,`⇊`,`\\downdownarrows`,!0),H(U,K,J,`↾`,`\\upharpoonright`,!0),H(U,K,J,`⇂`,`\\downharpoonright`,!0),H(U,K,J,`⇝`,`\\rightsquigarrow`,!0),H(U,K,J,`⇝`,`\\leadsto`),H(U,K,J,`⇛`,`\\Rrightarrow`,!0),H(U,K,J,`↾`,`\\restriction`),H(U,G,Y,`‘`,"`"),H(U,G,Y,`$`,`\\$`),H(W,G,Y,`$`,`\\$`),H(W,G,Y,`$`,`\\textdollar`),H(U,G,Y,`%`,`\\%`),H(W,G,Y,`%`,`\\%`),H(U,G,Y,`_`,`\\_`),H(W,G,Y,`_`,`\\_`),H(W,G,Y,`_`,`\\textunderscore`),H(U,G,Y,`∠`,`\\angle`,!0),H(U,G,Y,`∞`,`\\infty`,!0),H(U,G,Y,`′`,`\\prime`),H(U,G,Y,`△`,`\\triangle`),H(U,G,Y,`Γ`,`\\Gamma`,!0),H(U,G,Y,`Δ`,`\\Delta`,!0),H(U,G,Y,`Θ`,`\\Theta`,!0),H(U,G,Y,`Λ`,`\\Lambda`,!0),H(U,G,Y,`Ξ`,`\\Xi`,!0),H(U,G,Y,`Π`,`\\Pi`,!0),H(U,G,Y,`Σ`,`\\Sigma`,!0),H(U,G,Y,`Υ`,`\\Upsilon`,!0),H(U,G,Y,`Φ`,`\\Phi`,!0),H(U,G,Y,`Ψ`,`\\Psi`,!0),H(U,G,Y,`Ω`,`\\Omega`,!0),H(U,G,Y,`A`,`Α`),H(U,G,Y,`B`,`Β`),H(U,G,Y,`E`,`Ε`),H(U,G,Y,`Z`,`Ζ`),H(U,G,Y,`H`,`Η`),H(U,G,Y,`I`,`Ι`),H(U,G,Y,`K`,`Κ`),H(U,G,Y,`M`,`Μ`),H(U,G,Y,`N`,`Ν`),H(U,G,Y,`O`,`Ο`),H(U,G,Y,`P`,`Ρ`),H(U,G,Y,`T`,`Τ`),H(U,G,Y,`X`,`Χ`),H(U,G,Y,`¬`,`\\neg`,!0),H(U,G,Y,`¬`,`\\lnot`),H(U,G,Y,`⊤`,`\\top`),H(U,G,Y,`⊥`,`\\bot`),H(U,G,Y,`∅`,`\\emptyset`),H(U,K,Y,`∅`,`\\varnothing`),H(U,G,FO,`α`,`\\alpha`,!0),H(U,G,FO,`β`,`\\beta`,!0),H(U,G,FO,`γ`,`\\gamma`,!0),H(U,G,FO,`δ`,`\\delta`,!0),H(U,G,FO,`ϵ`,`\\epsilon`,!0),H(U,G,FO,`ζ`,`\\zeta`,!0),H(U,G,FO,`η`,`\\eta`,!0),H(U,G,FO,`θ`,`\\theta`,!0),H(U,G,FO,`ι`,`\\iota`,!0),H(U,G,FO,`κ`,`\\kappa`,!0),H(U,G,FO,`λ`,`\\lambda`,!0),H(U,G,FO,`μ`,`\\mu`,!0),H(U,G,FO,`ν`,`\\nu`,!0),H(U,G,FO,`ξ`,`\\xi`,!0),H(U,G,FO,`ο`,`\\omicron`,!0),H(U,G,FO,`π`,`\\pi`,!0),H(U,G,FO,`ρ`,`\\rho`,!0),H(U,G,FO,`σ`,`\\sigma`,!0),H(U,G,FO,`τ`,`\\tau`,!0),H(U,G,FO,`υ`,`\\upsilon`,!0),H(U,G,FO,`ϕ`,`\\phi`,!0),H(U,G,FO,`χ`,`\\chi`,!0),H(U,G,FO,`ψ`,`\\psi`,!0),H(U,G,FO,`ω`,`\\omega`,!0),H(U,G,FO,`ε`,`\\varepsilon`,!0),H(U,G,FO,`ϑ`,`\\vartheta`,!0),H(U,G,FO,`ϖ`,`\\varpi`,!0),H(U,G,FO,`ϱ`,`\\varrho`,!0),H(U,G,FO,`ς`,`\\varsigma`,!0),H(U,G,FO,`φ`,`\\varphi`,!0),H(U,G,q,`∗`,`*`,!0),H(U,G,q,`+`,`+`),H(U,G,q,`−`,`-`,!0),H(U,G,q,`⋅`,`\\cdot`,!0),H(U,G,q,`∘`,`\\circ`,!0),H(U,G,q,`÷`,`\\div`,!0),H(U,G,q,`±`,`\\pm`,!0),H(U,G,q,`×`,`\\times`,!0),H(U,G,q,`∩`,`\\cap`,!0),H(U,G,q,`∪`,`\\cup`,!0),H(U,G,q,`∖`,`\\setminus`,!0),H(U,G,q,`∧`,`\\land`),H(U,G,q,`∨`,`\\lor`),H(U,G,q,`∧`,`\\wedge`,!0),H(U,G,q,`∨`,`\\vee`,!0),H(U,G,Y,`√`,`\\surd`),H(U,G,LO,`⟨`,`\\langle`,!0),H(U,G,LO,`∣`,`\\lvert`),H(U,G,LO,`∥`,`\\lVert`),H(U,G,NO,`?`,`?`),H(U,G,NO,`!`,`!`),H(U,G,NO,`⟩`,`\\rangle`,!0),H(U,G,NO,`∣`,`\\rvert`),H(U,G,NO,`∥`,`\\rVert`),H(U,G,J,`=`,`=`),H(U,G,J,`:`,`:`),H(U,G,J,`≈`,`\\approx`,!0),H(U,G,J,`≅`,`\\cong`,!0),H(U,G,J,`≥`,`\\ge`),H(U,G,J,`≥`,`\\geq`,!0),H(U,G,J,`←`,`\\gets`),H(U,G,J,`>`,`\\gt`,!0),H(U,G,J,`∈`,`\\in`,!0),H(U,G,J,``,`\\@not`),H(U,G,J,`⊂`,`\\subset`,!0),H(U,G,J,`⊃`,`\\supset`,!0),H(U,G,J,`⊆`,`\\subseteq`,!0),H(U,G,J,`⊇`,`\\supseteq`,!0),H(U,K,J,`⊈`,`\\nsubseteq`,!0),H(U,K,J,`⊉`,`\\nsupseteq`,!0),H(U,G,J,`⊨`,`\\models`),H(U,G,J,`←`,`\\leftarrow`,!0),H(U,G,J,`≤`,`\\le`),H(U,G,J,`≤`,`\\leq`,!0),H(U,G,J,`<`,`\\lt`,!0),H(U,G,J,`→`,`\\rightarrow`,!0),H(U,G,J,`→`,`\\to`),H(U,K,J,`≱`,`\\ngeq`,!0),H(U,K,J,`≰`,`\\nleq`,!0),H(U,G,zO,`\xA0`,`\\ `),H(U,G,zO,`\xA0`,`\\space`),H(U,G,zO,`\xA0`,`\\nobreakspace`),H(W,G,zO,`\xA0`,`\\ `),H(W,G,zO,`\xA0`,` `),H(W,G,zO,`\xA0`,`\\space`),H(W,G,zO,`\xA0`,`\\nobreakspace`),H(U,G,zO,``,`\\nobreak`),H(U,G,zO,``,`\\allowbreak`),H(U,G,RO,`,`,`,`),H(U,G,RO,`;`,`;`),H(U,K,q,`⊼`,`\\barwedge`,!0),H(U,K,q,`⊻`,`\\veebar`,!0),H(U,G,q,`⊙`,`\\odot`,!0),H(U,G,q,`⊕`,`\\oplus`,!0),H(U,G,q,`⊗`,`\\otimes`,!0),H(U,G,Y,`∂`,`\\partial`,!0),H(U,G,q,`⊘`,`\\oslash`,!0),H(U,K,q,`⊚`,`\\circledcirc`,!0),H(U,K,q,`⊡`,`\\boxdot`,!0),H(U,G,q,`△`,`\\bigtriangleup`),H(U,G,q,`▽`,`\\bigtriangledown`),H(U,G,q,`†`,`\\dagger`),H(U,G,q,`⋄`,`\\diamond`),H(U,G,q,`⋆`,`\\star`),H(U,G,q,`◃`,`\\triangleleft`),H(U,G,q,`▹`,`\\triangleright`),H(U,G,LO,`{`,`\\{`),H(W,G,Y,`{`,`\\{`),H(W,G,Y,`{`,`\\textbraceleft`),H(U,G,NO,`}`,`\\}`),H(W,G,Y,`}`,`\\}`),H(W,G,Y,`}`,`\\textbraceright`),H(U,G,LO,`{`,`\\lbrace`),H(U,G,NO,`}`,`\\rbrace`),H(U,G,LO,`[`,`\\lbrack`,!0),H(W,G,Y,`[`,`\\lbrack`,!0),H(U,G,NO,`]`,`\\rbrack`,!0),H(W,G,Y,`]`,`\\rbrack`,!0),H(U,G,LO,`(`,`\\lparen`,!0),H(U,G,NO,`)`,`\\rparen`,!0),H(W,G,Y,`<`,`\\textless`,!0),H(W,G,Y,`>`,`\\textgreater`,!0),H(U,G,LO,`⌊`,`\\lfloor`,!0),H(U,G,NO,`⌋`,`\\rfloor`,!0),H(U,G,LO,`⌈`,`\\lceil`,!0),H(U,G,NO,`⌉`,`\\rceil`,!0),H(U,G,Y,`\\`,`\\backslash`),H(U,G,Y,`∣`,`|`),H(U,G,Y,`∣`,`\\vert`),H(W,G,Y,`|`,`\\textbar`,!0),H(U,G,Y,`∥`,`\\|`),H(U,G,Y,`∥`,`\\Vert`),H(W,G,Y,`∥`,`\\textbardbl`),H(W,G,Y,`~`,`\\textasciitilde`),H(W,G,Y,`\\`,`\\textbackslash`),H(W,G,Y,`^`,`\\textasciicircum`),H(U,G,J,`↑`,`\\uparrow`,!0),H(U,G,J,`⇑`,`\\Uparrow`,!0),H(U,G,J,`↓`,`\\downarrow`,!0),H(U,G,J,`⇓`,`\\Downarrow`,!0),H(U,G,J,`↕`,`\\updownarrow`,!0),H(U,G,J,`⇕`,`\\Updownarrow`,!0),H(U,G,IO,`∐`,`\\coprod`),H(U,G,IO,`⋁`,`\\bigvee`),H(U,G,IO,`⋀`,`\\bigwedge`),H(U,G,IO,`⨄`,`\\biguplus`),H(U,G,IO,`⋂`,`\\bigcap`),H(U,G,IO,`⋃`,`\\bigcup`),H(U,G,IO,`∫`,`\\int`),H(U,G,IO,`∫`,`\\intop`),H(U,G,IO,`∬`,`\\iint`),H(U,G,IO,`∭`,`\\iiint`),H(U,G,IO,`∏`,`\\prod`),H(U,G,IO,`∑`,`\\sum`),H(U,G,IO,`⨂`,`\\bigotimes`),H(U,G,IO,`⨁`,`\\bigoplus`),H(U,G,IO,`⨀`,`\\bigodot`),H(U,G,IO,`∮`,`\\oint`),H(U,G,IO,`∯`,`\\oiint`),H(U,G,IO,`∰`,`\\oiiint`),H(U,G,IO,`⨆`,`\\bigsqcup`),H(U,G,IO,`∫`,`\\smallint`),H(W,G,PO,`…`,`\\textellipsis`),H(U,G,PO,`…`,`\\mathellipsis`),H(W,G,PO,`…`,`\\ldots`,!0),H(U,G,PO,`…`,`\\ldots`,!0),H(U,G,PO,`⋯`,`\\@cdots`,!0),H(U,G,PO,`⋱`,`\\ddots`,!0),H(U,G,Y,`⋮`,`\\varvdots`),H(W,G,Y,`⋮`,`\\varvdots`),H(U,G,MO,`ˊ`,`\\acute`),H(U,G,MO,`ˋ`,`\\grave`),H(U,G,MO,`¨`,`\\ddot`),H(U,G,MO,`~`,`\\tilde`),H(U,G,MO,`ˉ`,`\\bar`),H(U,G,MO,`˘`,`\\breve`),H(U,G,MO,`ˇ`,`\\check`),H(U,G,MO,`^`,`\\hat`),H(U,G,MO,`⃗`,`\\vec`),H(U,G,MO,`˙`,`\\dot`),H(U,G,MO,`˚`,`\\mathring`),H(U,G,FO,``,`\\@imath`),H(U,G,FO,``,`\\@jmath`),H(U,G,Y,`ı`,`ı`),H(U,G,Y,`ȷ`,`ȷ`),H(W,G,Y,`ı`,`\\i`,!0),H(W,G,Y,`ȷ`,`\\j`,!0),H(W,G,Y,`ß`,`\\ss`,!0),H(W,G,Y,`æ`,`\\ae`,!0),H(W,G,Y,`œ`,`\\oe`,!0),H(W,G,Y,`ø`,`\\o`,!0),H(W,G,Y,`Æ`,`\\AE`,!0),H(W,G,Y,`Œ`,`\\OE`,!0),H(W,G,Y,`Ø`,`\\O`,!0),H(W,G,MO,`ˊ`,`\\'`),H(W,G,MO,`ˋ`,"\\`"),H(W,G,MO,`ˆ`,`\\^`),H(W,G,MO,`˜`,`\\~`),H(W,G,MO,`ˉ`,`\\=`),H(W,G,MO,`˘`,`\\u`),H(W,G,MO,`˙`,`\\.`),H(W,G,MO,`¸`,`\\c`),H(W,G,MO,`˚`,`\\r`),H(W,G,MO,`ˇ`,`\\v`),H(W,G,MO,`¨`,`\\"`),H(W,G,MO,`˝`,`\\H`),H(W,G,MO,`◯`,`\\textcircled`);var BO={"--":!0,"---":!0,"``":!0,"''":!0};H(W,G,Y,`–`,`--`,!0),H(W,G,Y,`–`,`\\textendash`),H(W,G,Y,`—`,`---`,!0),H(W,G,Y,`—`,`\\textemdash`),H(W,G,Y,`‘`,"`",!0),H(W,G,Y,`‘`,`\\textquoteleft`),H(W,G,Y,`’`,`'`,!0),H(W,G,Y,`’`,`\\textquoteright`),H(W,G,Y,`“`,"``",!0),H(W,G,Y,`“`,`\\textquotedblleft`),H(W,G,Y,`”`,`''`,!0),H(W,G,Y,`”`,`\\textquotedblright`),H(U,G,Y,`°`,`\\degree`,!0),H(W,G,Y,`°`,`\\degree`),H(W,G,Y,`°`,`\\textdegree`,!0),H(U,G,Y,`£`,`\\pounds`),H(U,G,Y,`£`,`\\mathsterling`,!0),H(W,G,Y,`£`,`\\pounds`),H(W,G,Y,`£`,`\\textsterling`,!0),H(U,K,Y,`✠`,`\\maltese`),H(W,K,Y,`✠`,`\\maltese`);for(var VO=`0123456789/@."`,HO=0;HO<VO.length;HO++){var UO=VO.charAt(HO);H(U,G,Y,UO,UO)}for(var WO=`0123456789!@*()-=+";:?/.,`,GO=0;GO<WO.length;GO++){var KO=WO.charAt(GO);H(W,G,Y,KO,KO)}for(var qO=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,JO=0;JO<qO.length;JO++){var YO=qO.charAt(JO);H(U,G,FO,YO,YO),H(W,G,Y,YO,YO)}H(U,K,Y,`C`,`ℂ`),H(W,K,Y,`C`,`ℂ`),H(U,K,Y,`H`,`ℍ`),H(W,K,Y,`H`,`ℍ`),H(U,K,Y,`N`,`ℕ`),H(W,K,Y,`N`,`ℕ`),H(U,K,Y,`P`,`ℙ`),H(W,K,Y,`P`,`ℙ`),H(U,K,Y,`Q`,`ℚ`),H(W,K,Y,`Q`,`ℚ`),H(U,K,Y,`R`,`ℝ`),H(W,K,Y,`R`,`ℝ`),H(U,K,Y,`Z`,`ℤ`),H(W,K,Y,`Z`,`ℤ`),H(U,G,FO,`h`,`ℎ`),H(W,G,FO,`h`,`ℎ`);for(var XO,ZO=0;ZO<qO.length;ZO++){var QO=qO.charAt(ZO);XO=String.fromCharCode(55349,56320+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56372+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56424+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56580+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56684+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56736+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56788+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56840+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56944+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),ZO<26&&(XO=String.fromCharCode(55349,56632+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO),XO=String.fromCharCode(55349,56476+ZO),H(U,G,FO,QO,XO),H(W,G,Y,QO,XO))}XO=String.fromCharCode(55349,56668),H(U,G,FO,`k`,XO),H(W,G,Y,`k`,XO);for(var $O=0;$O<10;$O++){var ek=$O.toString();XO=String.fromCharCode(55349,57294+$O),H(U,G,FO,ek,XO),H(W,G,Y,ek,XO),XO=String.fromCharCode(55349,57314+$O),H(U,G,FO,ek,XO),H(W,G,Y,ek,XO),XO=String.fromCharCode(55349,57324+$O),H(U,G,FO,ek,XO),H(W,G,Y,ek,XO),XO=String.fromCharCode(55349,57334+$O),H(U,G,FO,ek,XO),H(W,G,Y,ek,XO)}for(var tk=`ÐÞþ`,nk=0;nk<tk.length;nk++){var rk=tk.charAt(nk);H(U,G,FO,rk,rk),H(W,G,Y,rk,rk)}var ik={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},ak={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},ok={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},sk={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},ck={mathClass:``,textClass:``,font:``},lk={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},uk={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},dk={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},fk={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},pk={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},mk={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},hk={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},gk=[ik,ik,ak,ak,ok,ok,sk,ck,ck,ck,lk,lk,uk,uk,dk,dk,fk,fk,pk,pk,mk,mk,ck,ck,hk,hk],_k=[ik,ck,fk,pk,hk],vk=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return gk[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return _k[Math.floor((r-120782)/10)];if(r===120485||r===120486)return gk[0];if(120486<r&&r<120782)return ck;throw new B(`Unsupported character: `+e)};function yk(e){var t=e.strict,n=e.errorCode,r=e.errorMsg,i=e.token,a=e.report,o=t;if(typeof t==`function`){if(a)o=t(n,r,i);else try{o=t(n,r,i)}catch{o=`error`}}switch(o){case!0:case`error`:if(a)throw new B(`LaTeX-incompatible input and strict mode is set to 'error': `+(r+` [`+n+`]`),i);return!0;case!1:case`ignore`:if(!a)return!1;break;default:if(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(r+` [`+n+`]`)),!a)return!1}}var bk=function(e,t,n){if(jO[n][e]){var r=jO[n][e].replace;r&&(e=r)}return{value:e,metrics:OO(e,t,n)}},xk=function(e,t,n,r,i){var a=bk(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new _O(e,o.height,o.depth,c,o.skew,o.width,i)}else yk({strict:r.strict,errorCode:`symbolNotInFont`,errorMsg:`No character metrics for '`+e+`' in style '`+t+`' and mode '`+n+`'`,report:!0}),s=new _O(e,0,0,0,0,0,i);s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();return l&&(s.style.color=l),s},Sk=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&bk(e,`Main-Bold`,t).metrics?xk(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||jO[t][e].font===`main`?xk(e,`Main-Regular`,t,n,r):xk(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},Ck=function(e,t,n){return n!==`textord`&&bk(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},wk=function(e,t){var n=e.type===`mathord`?`mathord`:`textord`,r=e.mode,i=e.text,a=[`mord`],o=t.font,s=t.fontFamily,c=t.fontWeight,l=t.fontShape,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=vk(i);f=m.font,p=m[r+`Class`]}if(f)return xk(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=Ck(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=Lk[o].fontName,g=[o]):(h=Ik(s,c,l),g=[s,c,l]);if(bk(i,h,r).metrics)return xk(i,h,r,t,a.concat(g));if(Object.prototype.hasOwnProperty.call(BO,i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(xk(i[y],h,r,t,a.concat(g)));return jk(v)}}if(n===`mathord`)return xk(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=jO[r][i]&&jO[r][i].font;if(b===`ams`)return xk(i,Ik(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return xk(i,Ik(`textrm`,c,l),r,t,a.concat(c,l));var x=Ik(b,c,l);return xk(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},Tk=(e,t)=>{if(sO(e.classes)!==sO(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},Ek=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof _O&&r instanceof _O&&Tk(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},Dk=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},X=function(e,t,n,r){var i=new pO(e,t,n,r);return Dk(i),i},Ok=(e,t,n,r)=>new pO(e,t,n,r),kk=function(e,t,n){var r=X([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=V(r.height),r.maxFontSize=1,r},Ak=function(e,t,n,r){var i=new mO(e,t,n,r);return Dk(i),i},jk=function(e){var t=new nO(e);return Dk(t),t},Mk=function(e,t){return e instanceof nO?X([],[e],t):e},Nk=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},Pk=function(e,t){for(var n=Nk(e),r=n.children,i=n.depth,a=0,o=0;o<r.length;o++){var s=r[o];if(s.type===`elem`){var c=s.elem;a=Math.max(a,c.maxFontSize,c.height)}}a+=2;var l=X([`pstrut`],[]);l.style.height=V(a);for(var u=[],d=i,f=i,p=i,m=0;m<r.length;m++){var h=r[m];if(h.type===`kern`)p+=h.size;else{var g=h.elem,_=h.wrapperClasses||[],v=h.wrapperStyle||{},y=X(_,[l,g],void 0,v);y.style.top=V(-a-p-g.depth),h.marginLeft&&(y.style.marginLeft=h.marginLeft),h.marginRight&&(y.style.marginRight=h.marginRight),u.push(y),p+=g.height+g.depth}d=Math.min(d,p),f=Math.max(f,p)}var b=X([`vlist`],u);b.style.height=V(f);var x;if(d<0){var S=X([`vlist`],[X([],[])]);S.style.height=V(-d),x=[X([`vlist-r`],[b,X([`vlist-s`],[new _O(`​`)])]),X([`vlist-r`],[S])]}else x=[X([`vlist-r`],[b])];var C=X([`vlist-t`],x);return x.length===2&&C.classes.push(`vlist-t2`),C.height=f,C.depth=-d,C},Fk=(e,t)=>{var n=X([`mspace`],[],t),r=oO(e,t);return n.style.marginRight=V(r),n},Ik=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},Lk={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},Rk={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},zk=function(e,t){var n=Rk[e],r=n[0],i=n[1],a=n[2],o=Ok([`katex-overlay`],[new vO([new yO(r)],{width:V(i),height:V(a),style:`width:`+V(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return o.height=a,o.style.height=V(a),o.style.width=V(i),o},Bk={number:3,unit:`mu`},Vk={number:4,unit:`mu`},Hk={number:5,unit:`mu`},Uk={mord:{mop:Bk,mbin:Vk,mrel:Hk,minner:Bk},mop:{mord:Bk,mop:Bk,mrel:Hk,minner:Bk},mbin:{mord:Vk,mop:Vk,mopen:Vk,minner:Vk},mrel:{mord:Hk,mop:Hk,mopen:Hk,minner:Hk},mopen:{},mclose:{mop:Bk,mbin:Vk,mrel:Hk,minner:Bk},mpunct:{mord:Bk,mop:Bk,mrel:Hk,mopen:Bk,mclose:Bk,mpunct:Bk,minner:Bk},minner:{mord:Bk,mop:Bk,mbin:Vk,mrel:Hk,mopen:Bk,mpunct:Bk,minner:Bk}},Wk={mord:{mop:Bk},mop:{mord:Bk,mop:Bk},mbin:{},mrel:{},mopen:{},mclose:{mop:Bk},mpunct:{},minner:{mop:Bk}},Gk={},Kk={},qk={};function Z(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a<n.length;++a)Gk[n[a]]=e;t&&(r&&(Kk[t]=r),i&&(qk[t]=i))}function Jk(e){var t=e.type,n=e.htmlBuilder,r=e.mathmlBuilder;n&&(Kk[t]=n),r&&(qk[t]=r)}var Yk=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},Xk=function(e){return e.type===`ordgroup`?e.body:[e]},Zk=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),Qk=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),$k={display:LD.DISPLAY,text:LD.TEXT,script:LD.SCRIPT,scriptscript:LD.SCRIPTSCRIPT},eA={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},tA=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=sA(e[a],t);if(o instanceof nO){var s=o.children;i.push(...s)}else i.push(o)}if(Ek(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle($k[l.style]))}var u=X([r[0]||`leftmost`],[],t),d=X([r[1]||`rightmost`],[],t),f=n===`root`;return nA(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&Qk.has(r)?t.classes[0]=`mord`:r===`mbin`&&Zk.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),nA(i,(e,t)=>{var n=aA(t),r=aA(e),i=n&&r?e.hasClass(`mtight`)?Wk[n]?.[r]:Uk[n]?.[r]:null;if(i)return Fk(i,c)},{node:u},d,f),i},nA=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=rA(o);if(s){nA(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`katex-newline`)&&(n.node=X([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},rA=function(e){return e instanceof nO||e instanceof mO||e instanceof pO&&e.hasClass(`enclosing`)?e:null},iA=function(e,t){var n=rA(e);if(n){var r=n.children;if(r.length){if(t===`right`)return iA(r[r.length-1],`right`);if(t===`left`)return iA(r[0],`left`)}}return e},aA=function(e,t){return e?(t&&(e=iA(e,t)),eA[e.classes[0]]||null):null},oA=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return X(t.concat(n))},sA=function(e,t,n){if(!e)return X();if(Kk[e.type]){var r=Kk[e.type](e,t);if(n&&t.size!==n.size){r=X(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new B(`Got group of unknown type: '`+e.type+`'`)};function cA(e,t){var n=X([`katex-base`],e,t),r=X([`katex-strut`]);return r.style.height=V(n.height+n.depth),n.depth&&(r.style.verticalAlign=V(-n.depth)),n.children.unshift(r),n}function lA(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=tA(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`katex-newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(cA(o,t)),o=[])}else r[s].hasClass(`katex-newline`)&&(o.pop(),o.length>0&&(a.push(cA(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(cA(o,t));var l;n?(l=cA(tA(n,t,!0),t),l.classes=[`katex-tag`],a.push(l)):i&&a.push(i);var u=X([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=V(u.height+u.depth),u.depth&&(d.style.verticalAlign=V(-u.depth))}return u}function uA(e){return new nO(e)}var Q=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=sO(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof dA&&this.children[i+1]instanceof dA){for(var a=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof dA;)a+=this.children[++i].toText();e.appendChild(new dA(a).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=` `+n+`="`,e+=dD(r),e+=`"`}this.classes.length>0&&(e+=` class ="`+dD(sO(this.classes))+`"`),e+=`>`;for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},dA=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return dD(this.toText())}toText(){return this.text}},fA=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,V(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+V(this.width)+`"/>`}toText(){return this.character?this.character:` `}},pA=new Set([`\\imath`,`\\jmath`]),mA=new Set([`mrow`,`mtable`]),hA=function(e,t,n){var r,i;return jO[t][e]&&jO[t][e].replace&&e.charCodeAt(0)!==55349&&(!Object.prototype.hasOwnProperty.call(BO,e)||(n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))!==`tt`&&(n==null||(i=n.font)==null?void 0:i.slice(4,6))!==`tt`)&&(e=jO[t][e].replace),new dA(e)},gA=function(e){return e.length===1?e[0]:new Q(`mrow`,e)},_A={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},vA=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=_A[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(pA.has(a))return null;if(jO[r][a]){var o=jO[r][a].replace;o&&(a=o)}var s=Lk[n].fontName;return OO(a,s,r)?Lk[n].variant:null};function yA(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof dA&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof dA&&n.text===`,`}return!1}var bA=function(e,t,n){if(e.length===1){var r=SA(e[0],t);return n&&r instanceof Q&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=SA(e[o],t);if(s instanceof Q&&a instanceof Q){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}if(yA(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&yA(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||yA(a))){var c=s.children[0];c instanceof Q&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof dA&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof dA&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},xA=function(e,t,n){return gA(bA(e,t,n))},SA=function(e,t){if(!e)return new Q(`mrow`);if(qk[e.type])return qk[e.type](e,t);throw new B(`Got group of unknown type: '`+e.type+`'`)};function CA(e,t,n,r,i){var a=bA(e,n),o=a.length===1&&a[0]instanceof Q&&mA.has(a[0].type)?a[0]:new Q(`mrow`,a),s=new Q(`annotation`,[new dA(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Q(`math`,[new Q(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),X([i?`katex`:`katex-mathml`],[c])}var wA=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],TA=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],EA=function(e,t){return t.size<2?e:wA[e-1][t.size-1]},DA=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=TA[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this.strict=t.strict,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:EA(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:TA[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=EA(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=AO(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};DA.BASESIZE=6;var OA=e=>new DA({style:e.displayMode?LD.DISPLAY:LD.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),kA=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=X(n,[e])}return e},AA=function(e,t,n){var r=OA(n),i;return n.output===`mathml`?CA(e,t,r,n.displayMode,!0):(i=n.output===`html`?X([`katex`],[lA(e,r)]):X([`katex`],[CA(e,t,r,n.displayMode,!1),lA(e,r)]),kA(i,n))},jA=function(e,t){return kA(X([`katex`],[lA(e,OA(t))]),t)},MA={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},NA=function(e){var t=new Q(`mo`,[new dA(MA[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},PA={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},FA=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),IA=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(FA.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:Ok([],[new vO([new yO(o)],{width:`100%`,height:V(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=PA[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var d=u[0],f=u[1],p=u[2],m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
395
- `+h+` children.`);for(var v=0;v<h;v++){var y=new vO([new yO(d[v])],{width:`400em`,height:V(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=Ok([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=V(m),l.push(b)}return{span:X([`katex-stretchy`],l,t),minWidth:f,height:m}}var r=n(),i=r.span,a=r.minWidth,o=r.height;return i.height=o,i.style.height=V(o),a>0&&(i.style.minWidth=V(a)),i},LA=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=X([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new bO({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new bO({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Ok([],[new vO(c,{width:`100%`,height:V(o)})],i)}return a.height=o,a.style.height=V(o),a},RA=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],zA=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],BA=new Set(RA),VA=new Set(zA);function HA(e){return BA.has(e)}function UA(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function WA(e){var t=GA(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function GA(e){return e.type===`atom`||VA.has(e.type)?e:null}function KA(e,t,n){var r=``;for(var i of e.body)if(i.type===`textord`)r+=i.text;else if(n&&i.type===`spacing`&&i.text===` `)r+=` `;else throw new B(t,e);return r}var qA=e=>{if(e instanceof _O)return e;if(CO(e)&&e.children.length===1)return qA(e.children[0])},JA=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=UA(e.base,`accent`),n=r.base,e.base=n,i=SO(sA(e,t)),e.base=r):(r=UA(e,`accent`),n=r.base);var a=sA(n,t.havingCrampedStyle()),o=r.isShifty&&mD(n),s=0;o&&(s=qA(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=IA(r,t),u=Pk({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+V(2*s)+`)`,marginLeft:V(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=zk(`vec`,t),f=Rk.vec[1]):(d=wk({type:`textord`,mode:r.mode,text:r.label},t),d=xO(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=X([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=V(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=Pk({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=X([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},YA=(e,t)=>{var n=e.isStretchy?NA(e.label):new Q(`mo`,[hA(e.label,e.mode)]),r=new Q(`mover`,[SA(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},XA=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));Z({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],numArgs:1,handler:(e,t)=>{var n=Yk(t[0]),r=!XA.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:JA,mathmlBuilder:YA}),Z({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(yk({strict:e.parser.settings.strict,errorCode:`mathVsTextAccents`,errorMsg:`LaTeX's accent `+e.funcName+` works only in text mode`,report:!0}),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),Z({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=sA(e.base,t),r=IA(e,t),i=e.label===`\\utilde`?.12:0;return X([`mord`,`accentunder`],[Pk({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=NA(e.label),r=new Q(`munder`,[SA(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var ZA=e=>{var t=new Q(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};Z({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Mk(sA(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Mk(sA(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=IA(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return X([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=NA(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=ZA(SA(e.body,t));r=e.below?new Q(`munderover`,[n,ZA(SA(e.below,t)),i]):new Q(`mover`,[n,i])}else e.below?r=new Q(`munder`,[n,ZA(SA(e.below,t))]):(r=ZA(),r=new Q(`mover`,[n,r]));return r}});function QA(e,t){var n=tA(e.body,t,!0);return X([e.mclass],n,t)}function $A(e,t){var n,r=bA(e.body,t);return e.mclass===`minner`?n=new Q(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Q(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Q(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}Z({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:Xk(i),isCharacterBox:mD(i)}},htmlBuilder:QA,mathmlBuilder:$A});var ej=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};Z({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:ej(t[0]),body:Xk(t[1]),isCharacterBox:mD(t[1])}}}),Z({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:ej(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:Xk(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:mD(c)}}}),Z({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:ej(t[0]),body:Xk(t[0])}},htmlBuilder(e,t){var n=tA(e.body,t,!0),r=X([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Q(`mstyle`,bA(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var tj={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},nj=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),rj=e=>e.type===`textord`&&e.text===`@`,ij=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function aj(e,t,n){var r=tj[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function oj(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new B(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=nj(),c=0;c<o.length;c++)if(!rj(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=WA(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(ij(o[p],l)){f=!1,c=p;break}if(rj(o[p]))throw new B(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new B(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new B(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[aj(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=nj()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}Z({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Mk(sA(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=V(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Q(`mrow`,[SA(e.label,t)]);return n=new Q(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Q(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),Z({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Mk(sA(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Q(`mrow`,[SA(e.fragment,t)])}}),Z({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=KA(UA(t[0],`ordgroup`),`\\@char has non-numeric argument`),i=parseInt(r),a;if(isNaN(i))throw new B(`\\@char has non-numeric argument `+r);if(i<0||i>1114111)throw new B(`\\@char with invalid code point `+r);return i<=65535?a=String.fromCharCode(i):(i-=65536,a=String.fromCharCode((i>>10)+55296,(i&1023)+56320)),{type:`textord`,mode:n.mode,text:a}}}),Z({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=UA(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:Xk(i)}},htmlBuilder:(e,t)=>jk(tA(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new Q(`mstyle`,bA(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),Z({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=UA(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),Z({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text===`[`?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!yk({strict:t.settings.strict,errorCode:`newLineInDisplayMode`,errorMsg:`In LaTeX, \\\\ or \\newline does nothing in display mode`,report:!1});return{type:`cr`,mode:t.mode,newLine:r,size:n&&UA(n,`size`).value}},htmlBuilder(e,t){var n=X([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=V(oO(e.size,t)))),n},mathmlBuilder(e,t){var n=new Q(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,V(oO(e.size,t)))),n}});var sj={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},cj=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new B(`Expected a control sequence`,e);return t},lj=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},uj=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};Z({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(sj[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=sj[r.text]),UA(t.parseFunction(),`internal`);throw new B(`Invalid token after macro prefix`,r)}}),Z({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new B(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new B(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new B(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new B(`Expected a macro definition`);else s[a].push(r.text);var c=t.gullet.consumeArg().tokens;return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===sj[n]),{type:`internal`,mode:t.mode}}}),Z({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=cj(t.gullet.popToken());return t.gullet.consumeSpaces(),uj(t,r,lj(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),Z({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=cj(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return uj(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var dj=function(e,t,n){var r=OO(jO.math[e]&&jO.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},fj=function(e,t,n,r){var i=n.havingBaseStyle(t),a=X(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},pj=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=V(i),e.height-=i,e.depth+=i},mj=function(e,t,n,r,i,a){var o=fj(xk(e,`Main-Regular`,i,r),t,r,a);return n&&pj(o,r,t),o},hj=function(e,t,n,r){return xk(e,`Size`+t+`-Regular`,n,r)},gj=function(e,t,n,r,i,a){var o=hj(e,t,i,r),s=fj(X([`delimsizing`,`size`+t],[o],r),LD.TEXT,r,a);return n&&pj(s,r,LD.TEXT),s},_j=function(e,t,n,r){return{type:`elem`,elem:X([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[X([],[xk(e,t,n,r)])])}},vj=function(e,t,n){var r=wO[`Size4-Regular`][e.charCodeAt(0)]?wO[`Size4-Regular`][e.charCodeAt(0)][4]:wO[`Size1-Regular`][e.charCodeAt(0)][4],i=Ok([],[new vO([new yO(`inner`,QD(e,Math.round(1e3*t)))],{width:V(r),height:V(t),style:`width:`+V(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=V(t),i.style.width=V(r),{type:`elem`,elem:i}},yj=.008,bj={type:`kern`,size:-1*yj},xj=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Sj=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Cj=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):xj.has(e)?(c=`∣`,u=`vert`,d=333):Sj.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=dj(o,f,i),m=p.height+p.depth,h=dj(c,f,i),g=h.height+h.depth,_=dj(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=dj(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var D=C-m-v,ee=Math.round(C*1e3),O=eO(u,Math.round(D*1e3)),te=new yO(u,O),ne=V(d/1e3),re=V(ee/1e3),ie=Ok([],[new vO([te],{width:ne,height:re,viewBox:`0 0 `+d+` `+ee})],r);ie.height=ee/1e3,ie.style.width=ne,ie.style.height=re,E.push({type:`elem`,elem:ie})}else{if(E.push(_j(l,f,i,r)),E.push(bj),s===null){var k=C-m-v+2*yj;E.push(vj(c,k,r))}else{var ae=(C-m-v-y)/2+2*yj;E.push(vj(c,ae,r)),E.push(bj),E.push(_j(s,f,i,r)),E.push(bj),E.push(vj(c,ae,r))}E.push(bj),E.push(_j(o,f,i,r))}var A=r.havingBaseStyle(LD.TEXT);return fj(X([`delimsizing`,`mult`],[Pk({positionType:`bottom`,positionData:T,children:E})],A),LD.TEXT,r,a)},wj=80,Tj=.08,Ej=function(e,t,n,r,i){return Ok([`hide-tail`],[new vO([new yO(e,ZD(e,r,n))],{width:`400em`,height:V(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Dj=function(e,t){var n=t.havingBaseSizing(),r=Lj(`\\surd`,e*n.sizeMultiplier,Fj,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+wj,e<1?i=1:e<1.4&&(i=.7),s=(1+a+Tj)/i,c=(1+a)/i,o=Ej(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+wj)*jj[r.size],c=(jj[r.size]+a)/i,s=(jj[r.size]+a+Tj)/i,o=Ej(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+Tj,c=e+a,l=Math.floor(1e3*e+a)+wj,o=Ej(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=V(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Oj=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),kj=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Aj=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),jj=[0,1.2,1.8,2.4,3],Mj=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Oj.has(e)||Aj.has(e))return gj(e,t,!1,n,r,i);if(kj.has(e))return Cj(e,jj[t],!1,n,r,i);throw new B(`Illegal delimiter: '`+e+`'`)},Nj=[{type:`small`,style:LD.SCRIPTSCRIPT},{type:`small`,style:LD.SCRIPT},{type:`small`,style:LD.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Pj=[{type:`small`,style:LD.SCRIPTSCRIPT},{type:`small`,style:LD.SCRIPT},{type:`small`,style:LD.TEXT},{type:`stack`}],Fj=[{type:`small`,style:LD.SCRIPTSCRIPT},{type:`small`,style:LD.SCRIPT},{type:`small`,style:LD.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Ij=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Lj=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=dj(e,Ij(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},Rj=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Aj.has(e)?Nj:Oj.has(e)?Fj:Pj,s=Lj(e,t,o,r);return s.type===`small`?mj(e,s.style,n,r,i,a):s.type===`large`?gj(e,s.size,n,r,i,a):Cj(e,t,n,r,i,a)},zj=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return Rj(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},Bj={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},Vj=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function Hj(e){return`isMiddle`in e}function Uj(e,t){var n=GA(e);if(n&&Vj.has(n.text))return n;throw n?new B(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new B(`Invalid delimiter type '`+e.type+`'`,e)}Z({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=Uj(Yk(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:Bj[e.funcName].size,mclass:Bj[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?X([e.mclass]):Mj(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(hA(e.delim,e.mode));var n=new Q(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=V(jj[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Wj(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}Z({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new B(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:Uj(t[0],e).text,color:n}}}),Z({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Uj(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=UA(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Wj(e);for(var n=tA(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];Hj(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?oA(t,[`mopen`]):zj(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(Hj(u)){var d=u.isMiddle;n[l]=zj(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=oA(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=zj(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),X([`minner`],n,t)},mathmlBuilder:(e,t)=>{Wj(e);var n=bA(e.body,t);if(e.left!==`.`){var r=new Q(`mo`,[hA(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Q(`mo`,[hA(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return gA(n)}}),Z({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=Uj(t[0],e);if(!e.parser.leftrightDepth)throw new B(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=oA(t,[]):(n=Mj(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new Q(`mo`,[e.delim===`\\vert`||e.delim===`|`?hA(`|`,`text`):hA(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),Z({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=UA(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=Mk(sA(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=mD(e.body);if(r===`sout`)a=X([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=oO({number:.6,unit:`pt`},t),l=oO({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=V(d/2+c);var f=Math.floor(1e3*d*i);a=Ok([`hide-tail`],[new vO([new yO(`phase`,YD(f))],{width:`400em`,height:V(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=V(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=LA(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=V(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=V(h),a.style.borderRightWidth=V(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?X([`mord`,`cancel-lap`],[g],t):X([`mord`],[g],t)},mathmlBuilder:(e,t)=>{var n,r=new Q(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[SA(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+V(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),Z({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=UA(t[0],`color-token`).color,o=UA(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),Z({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),Z({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),Z({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&yk({strict:n.settings.strict,errorCode:`mathVsSout`,errorMsg:`LaTeX's \\sout works only in text mode`,report:!0});var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),Z({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});var Gj={};function Kj(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)Gj[n[c]]=s;a&&(Kk[t]=a),o&&(qk[t]=o)}var qj={};function $(e,t){qj[e]=t}var Jj=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},Yj=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,Jj.range(this,t))}};function Xj(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var Zj=e=>{if(!e.parser.settings.displayMode)throw new B(`{`+e.envName+`} can be used only in display mode.`)},Qj=new Set([`gather`,`gather*`]);function $j(e){if(!e.includes(`ed`))return!e.includes(`*`)}function eM(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,a=t.cols,o=t.arraystretch,s=t.colSeparationType,c=t.autoTag,l=t.singleRow,u=t.emptySingleRow,d=t.maxNumCols,f=t.leqno;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new B(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new Yj(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(Xj(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new B(`Too many tab characters: &`,e.nextToken);yk({strict:e.settings.strict,errorCode:`textEnv`,errorMsg:`Too few columns specified in the {array} column argument.`,report:!0})}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&!Array.isArray(v?.[v.length-1])&&!(c&&v?.[v.length-1]===!0)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(Xj(e)),m=[],h.push(m),y()}else throw new B(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function tM(e){return e.slice(0,1)===`d`?`display`:`text`}var nM=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(LD.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?oO({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=sA(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=oO(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,D=e.cols||[],ee=[],O,te,ne=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var re=s[n],ie=re.pos-E,k=e.tags[n],ae=void 0;ae=k===!0?X([`eqn-num`],[],t):k===!1?X([],[],t):X([],tA(k,t,!0),t),ae.depth=re.depth,ae.height=re.height,ne.push({type:`elem`,elem:ae,shift:ie})}for(r=0,te=0;r<o||te<D.length;++r,++te){for(var A=D[te],oe=!0;(se=A)?.type===`separator`;){var se;if(oe||(O=X([`arraycolsep`],[]),O.style.width=V(t.fontMetrics().doubleRuleSep),ee.push(O)),A.separator===`|`||A.separator===`:`){var ce=A.separator===`|`?`solid`:`dashed`,le=X([`vertical-separator`],[],t);le.style.height=V(_),le.style.borderRightWidth=V(l),le.style.borderRightStyle=ce,le.style.margin=`0 `+V(-l/2);var ue=_-E;ue&&(le.style.verticalAlign=V(-ue)),ee.push(le)}else throw new B(`Invalid separator type: `+A.separator);te++,A=D[te],oe=!1}if(!(r>=o)){var de=void 0;(r>0||e.hskipBeforeAndAfter)&&(de=A?.pregap??d,de!==0&&(O=X([`arraycolsep`],[]),O.style.width=V(de),ee.push(O)));var fe=[];for(n=0;n<i;++n){var pe=s[n],me=pe.cells[r];if(me){var he=pe.pos-E;me.depth=pe.depth,me.height=pe.height,fe.push({type:`elem`,elem:me,shift:he})}}var ge=Pk({positionType:`individualShift`,children:fe}),_e=X([`col-align-`+(A?.align||`c`)],[ge]);ee.push(_e),(r<o-1||e.hskipBeforeAndAfter)&&(de=A?.postgap??d,de!==0&&(O=X([`arraycolsep`],[]),O.style.width=V(de),ee.push(O)))}}var ve=X([`mtable`],ee);if(c.length>0){for(var ye=kk(`katex-hline`,t,l),j=kk(`katex-hdashline`,t,l),M=[{type:`elem`,elem:ve,shift:0}];c.length>0;){var be=c.pop(),xe=be.pos-E;be.isDashed?M.push({type:`elem`,elem:j,shift:xe}):M.push({type:`elem`,elem:ye,shift:xe})}ve=Pk({positionType:`individualShift`,children:M})}if(ne.length===0)return X([`mord`],[ve],t);var N=X([`katex-tag`],[Pk({positionType:`individualShift`,children:ne})],t);return jk([ve,N])},rM={c:`center `,l:`left `,r:`right `},iM=function(e,t){for(var n=[],r=new Q(`mtd`,[],[`mtr-glue`]),i=new Q(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new Q(`mtd`,[SA(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new Q(`mtr`,s))}var l=new Q(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,V(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=rM[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new Q(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new Q(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},aM=function(e,t){e.envName.includes(`ed`)||Zj(e);var n=[],r=e.envName===`split`,i=eM(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:$j(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes(`at`)?`alignat`:`align`,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},`display`),a=0,o=0,s={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){var c=`Number of columns should be a positive integer`,l=KA(t[0],c);if(!/^[0-9]+$/.test(l)||Number(l)<1)throw new B(c,t[0]);a=Number(l),o=a*2}var u=!o;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2)UA(UA(e[t],`styling`).body[0],`ordgroup`).body.unshift(s);if(u)o<e.length&&(o=e.length);else{var n=e.length/2;if(a<n)throw new B(`Too many math in a row: `+(`expected `+a+`, but got `+n),e[0])}});for(var d=0;d<o;++d){var f=`r`,p=0;d%2==1?f=`l`:d>0&&u&&(p=1),n[d]={type:`align`,align:f,pregap:p,postgap:0}}return i.colSeparationType=u?`align`:`alignat`,i};Kj({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(GA(t[0])?[t[0]]:UA(t[0],`ordgroup`).body).map(function(e){var t=WA(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new B(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return eM(e.parser,r,tM(e.envName))},htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new B(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=eM(e.parser,r,tM(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=eM(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(GA(t[0])?[t[0]]:UA(t[0],`ordgroup`).body).map(function(e){var t=WA(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new B(`Unknown column alignment: `+t,e)});if(n.length>1)throw new B(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=eM(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new B(`{subarray} can contain only one column`);return i},htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=eM(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},tM(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:aM,htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Qj.has(e.envName)&&Zj(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:$j(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return eM(e.parser,t,`display`)},htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:aM,htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){Zj(e);var t={autoTag:$j(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return eM(e.parser,t,`display`)},htmlBuilder:nM,mathmlBuilder:iM}),Kj({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return Zj(e),oj(e.parser)},htmlBuilder:nM,mathmlBuilder:iM}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),Z({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new B(e.funcName+` valid only within array environment`)}});var oM=Gj;Z({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new B(`Invalid environment name`,i);var a=KA(i,`Environment name should contain only text characters and spaces`,!0);if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(oM,a))throw new B(`No such environment: `+a,i);var o=oM[a],s=n.parseArguments(`\\begin{`+a+`}`,o),c=s.args,l=s.optArgs,u={mode:n.mode,envName:a,parser:n},d=o.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=UA(n.parseFunction(),`environment`);if(p.name!==a)throw new B(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var sM=(e,t)=>{var n=e.font,r=t.withFont(n);return sA(e.body,r)},cM=(e,t)=>{var n=e.font,r=t.withFont(n);return SA(e.body,r)},lM={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};Z({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=Yk(t[0]),a=r in lM?lM[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:sM,mathmlBuilder:cM}),Z({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:ej(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:mD(r)}}}),Z({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var uM=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=sA(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=sA(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=oO(e.barSize,t),u=kk(`frac-line`,t,d)):u=kk(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===LD.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===LD.DISPLAY.size?t.fontMetrics().delim1:n.size===LD.SCRIPTSCRIPT.size?t.havingStyle(LD.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?oA(t,[`mopen`]):Rj(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?X([]):e.rightDelim==null?oA(t,[`mclose`]):Rj(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return X([`mord`].concat(a.sizingClasses(t)),[x,X([`mfrac`],[g]),S],t)},dM=(e,t)=>{var n=new Q(`mfrac`,[SA(e.numer,t),SA(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=oO(e.barSize,t);n.setAttribute(`linethickness`,V(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Q(`mo`,[new dA(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Q(`mo`,[new dA(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return gA(i)}return n},fM=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;Z({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),fM({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:uM,mathmlBuilder:dM}),Z({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var pM=[`display`,`text`,`script`,`scriptscript`],mM=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};Z({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=Yk(t[0]),o=a.type===`atom`&&a.family===`open`?mM(a.text):null,s=Yk(t[1]),c=s.type===`atom`&&s.family===`close`?mM(s.text):null,l=UA(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=UA(p.body[0],`textord`);f=pM[Number(m.text)]}}else p=UA(p,`textord`),f=pM[Number(p.text)];return fM({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),Z({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:UA(t[0],`size`).value,token:r}}}),Z({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=UA(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var hM=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?sA(e.sup,t.havingStyle(n.sup()),t):sA(e.sub,t.havingStyle(n.sub()),t),i=UA(e.base,`horizBrace`)):i=UA(e,`horizBrace`);var a=sA(i.base,t.havingBaseStyle(LD.DISPLAY)),o=IA(i,t),s=i.isOver?Pk({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):Pk({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=X([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?Pk({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):Pk({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return X([`minner`,i.isOver?`mover`:`munder`],[s],t)};Z({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:hM,mathmlBuilder:(e,t)=>{var n=NA(e.label);return new Q(e.isOver?`mover`:`munder`,[SA(e.base,t),n])}}),Z({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=UA(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:Xk(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=tA(e.body,t,!1);return Ak(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=xA(e.body,t);return n instanceof Q||(n=new Q(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),Z({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=UA(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:Xk(s)}}}),Z({type:`hbox`,names:[`\\hbox`],numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0,handler(e,t){return{type:`hbox`,mode:e.parser.mode,body:Xk(t[0])}},htmlBuilder(e,t){return jk(tA(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new Q(`mrow`,bA(e.body,t.withFont(``)))}}),Z({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName;e.token;var i=UA(t[0],`raw`).string,a=t[1];n.settings.strict&&yk({strict:n.settings.strict,errorCode:`htmlExtension`,errorMsg:`HTML extension is disabled on strict mode`,report:!0});var o,s={};switch(r){case`\\htmlClass`:s.class=i,o={command:`\\htmlClass`,class:i};break;case`\\htmlId`:s.id=i,o={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:s.style=i,o={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var c=`{,}`,l=[],u=``,d=0;d<i.length;d++)i.startsWith(c,d)?(u+=`,`,d+=c.length-1):i[d]===`,`?(l.push(u),u=``):u+=i[d];l.push(u);for(var f=0;f<l.length;f++){var p=l[f],m=p.indexOf(`=`);if(m<0)throw new B(`\\htmlData key/value '`+p+`' missing equals sign`);var h=p.slice(0,m),g=p.slice(m+1);s[`data-`+h.trim()]=g}o={command:`\\htmlData`,attributes:s};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(o)?{type:`html`,mode:n.mode,attributes:s,body:Xk(a)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=tA(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=X(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>xA(e.body,t)}),Z({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:Xk(t[0]),mathml:Xk(t[1])}),htmlBuilder:(e,t)=>jk(tA(e.html,t,!1)),mathmlBuilder:(e,t)=>xA(e.mathml,t)});var gM=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new B(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!aO(n))throw new B(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};Z({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=UA(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=gM(d);break;case`height`:a=gM(d);break;case`totalheight`:o=gM(d);break;default:throw new B(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=UA(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=oO(e.height,t),r=0;e.totalheight.number>0&&(r=oO(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=oO(e.width,t));var a={height:V(n+r)};i>0&&(a.width=V(i)),r>0&&(a.verticalAlign=V(-r));var o=new hO(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Q(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=oO(e.height,t),i=0;if(e.totalheight.number>0&&(i=oO(e.totalheight,t)-r,n.setAttribute(`valign`,V(-i))),n.setAttribute(`height`,V(r+i)),e.width.number>0){var a=oO(e.width,t);n.setAttribute(`width`,V(a))}return n.setAttribute(`src`,e.src),n}}),Z({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=UA(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||yk({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`),report:!0}),n.mode!==`math`&&yk({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` works only in math mode`,report:!0})):o&&yk({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` doesn't support mu units`,report:!0})}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Fk(e.dimension,t)},mathmlBuilder(e,t){return new fA(oO(e.dimension,t))}}),Z({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=X([],[sA(e.body,t)]),n=X([`katex-inner`],[n],t)):n=X([`katex-inner`],[sA(e.body,t)]);var r=X([`katex-fix`],[]),i=X([e.alignment],[n,r],t),a=X([`katex-strut`]);return a.style.height=V(i.height+i.depth),i.depth&&(a.style.verticalAlign=V(-i.depth)),i.children.unshift(a),i=X([`katex-thinbox`],[i],t),X([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[SA(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),Z({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),Z({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new B(`Mismatched `+e.funcName)}});var _M=(e,t)=>{switch(t.style.size){case LD.DISPLAY.size:return e.display;case LD.TEXT.size:return e.text;case LD.SCRIPT.size:return e.script;case LD.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Z({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:Xk(t[0]),text:Xk(t[1]),script:Xk(t[2]),scriptscript:Xk(t[3])}),htmlBuilder:(e,t)=>jk(tA(_M(e,t),t,!1)),mathmlBuilder:(e,t)=>xA(_M(e,t),t)});var vM=(e,t,n,r,i,a,o)=>{e=X([],[e]);var s=n&&mD(n),c,l;if(t){var u=sA(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=sA(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=Pk({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:V(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:V(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=Pk({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:V(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=Pk({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:V(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=X([`mspace`],[],r);m.style.marginRight=V(a),p.unshift(m)}return X([`mop`,`op-limits`],p,r)},yM=new Set([`\\smallint`]),bM=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=UA(e.base,`op`),i=!0):a=UA(e,`op`);var o=t.style,s=!1;o.size===LD.DISPLAY.size&&a.symbol&&!yM.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=xk(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=zk(d+`Size`+(s?`2`:`1`),t);c=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=tA(a.body,t,!0);p.length===1&&p[0]instanceof _O?(c=p[0],c.classes[0]=`mop`):c=X([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(Sk(a.name[h],a.mode,t));c=X([`mop`],m,t)}var g=0,_=0;return(c instanceof _O||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?vM(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=V(g)),c)},xM=(e,t)=>{var n;if(e.symbol)n=new Q(`mo`,[hA(e.name,e.mode)]),yM.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Q(`mo`,bA(e.body,t));else{n=new Q(`mi`,[new dA(e.name.slice(1))]);var r=new Q(`mo`,[hA(`⁡`,`text`)]);n=e.parentIsSupSub?new Q(`mrow`,[n,r]):uA([n,r])}return n},SM={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};Z({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=SM[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:bM,mathmlBuilder:xM}),Z({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Xk(r)}}});var CM={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};Z({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),Z({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),Z({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=CM[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});var wM=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=UA(e.base,`operatorname`),i=!0):a=UA(e,`operatorname`);var o;if(a.body.length>0){for(var s=tA(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof _O&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=X([`mop`],s,t)}else o=X([`mop`],[],t);return i?vM(o,n,r,t,t.style,0,0):o};Z({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:Xk(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:wM,mathmlBuilder:(e,t)=>{for(var n=bA(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof fA)){if(a instanceof Q)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof dA?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new dA(n.map(e=>e.toText()).join(``))]);var s=new Q(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Q(`mo`,[hA(`⁡`,`text`)]);return e.parentIsSupSub?new Q(`mrow`,[s,c]):uA([s,c])}}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),Jk({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?jk(tA(e.body,t,!1)):X([`mord`],tA(e.body,t,!0),t)},mathmlBuilder(e,t){return xA(e.body,t,!0)}}),Z({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=sA(e.body,t.havingCrampedStyle()),r=kk(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`katex-overline`],[Pk({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new dA(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`mover`,[SA(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),Z({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:Xk(r)}},htmlBuilder:(e,t)=>jk(tA(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Q(`mphantom`,bA(e.body,t))}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),Z({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>X([`mord`,`rlap`],[X([`katex-inner`],[sA(e.body,t.withPhantom())]),X([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[new Q(`mphantom`,bA(Xk(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),Z({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=UA(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=sA(e.body,t);return Pk({positionType:`shift`,positionData:-oO(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Q(`mpadded`,[SA(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}});var TM=(e,t)=>({type:`reflectbox`,mode:e.parser.mode,body:t[0]});Z({type:`reflectbox`,names:[`\\reflectbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler:TM,htmlBuilder(e,t){return X([`mord`,`reflectbox`],[sA(e.body,t)],t)},mathmlBuilder(e,t){return SA(e.body,t)}}),Z({type:`reflectbox`,names:[`\\mathreflectbox`],numArgs:1,argTypes:[`math`],handler:TM}),Z({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),Z({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=UA(t[0],`size`),o=UA(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&UA(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=X([`mord`,`katex-rule`],[],t),r=oO(e.width,t),i=oO(e.height,t),a=e.shift?oO(e.shift,t):0;return n.style.borderRightWidth=V(r),n.style.borderTopWidth=V(i),n.style.bottom=V(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=oO(e.width,t),r=oO(e.height,t),i=e.shift?oO(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Q(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,V(n)),o.setAttribute(`height`,V(r));var s=new Q(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,V(i)):(s.setAttribute(`height`,V(i)),s.setAttribute(`depth`,V(-i))),s.setAttribute(`voffset`,V(i)),s}});function EM(e,t,n){for(var r=tA(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`katex-sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return jk(r)}var DM=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];Z({type:`sizing`,names:DM,numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:DM.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return EM(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Q(`mstyle`,bA(e.body,n));return r.setAttribute(`mathsize`,V(n.sizeMultiplier)),r}}),Z({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&UA(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=WA(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=X([],[sA(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return X([`mord`,`katex-smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return X([`mord`],[Pk({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[SA(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),Z({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=sA(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Mk(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<LD.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,o=Dj(n.height+n.depth+a+r,t),s=o.span,c=o.ruleWidth,l=o.advanceWidth,u=s.height-c;u>n.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=V(l);var f=Pk({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]});if(e.index){var p=t.havingStyle(LD.SCRIPTSCRIPT),m=sA(e.index,p,t);return X([`mord`,`sqrt`],[X([`katex-root`],[Pk({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}return X([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new Q(`mroot`,[SA(n,t),SA(r,t)]):new Q(`msqrt`,[SA(n,t)])}});var OM={display:LD.DISPLAY,text:LD.TEXT,script:LD.SCRIPT,scriptscript:LD.SCRIPTSCRIPT};function kM(e){return e in OM}Z({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!kM(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=OM[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),EM(e.body,r,t)},mathmlBuilder(e,t){var n=OM[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Q(`mstyle`,bA(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var AM=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===LD.DISPLAY.size||n.alwaysHandleSupSub)?bM:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===LD.DISPLAY.size||n.limits)?wM:null:n.type===`accent`?mD(n.base)?JA:null:n.type===`horizBrace`&&!e.sub===n.isOver?hM:null:null};Jk({type:`supsub`,htmlBuilder(e,t){var n=AM(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=sA(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&mD(r);if(i){var p=t.havingStyle(t.style.sup());s=sA(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=sA(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===LD.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=V(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof _O||y)&&(v=V(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=Pk({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=Pk({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=Pk({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return X([aA(o,`right`)||`mord`],[o,X([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[SA(e.base,t)];e.sub&&a.push(SA(e.sub,t)),e.sup&&a.push(SA(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===LD.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===LD.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===LD.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===LD.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===LD.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===LD.DISPLAY)?`munder`:`msub`}return new Q(o,a)}}),Jk({type:`atom`,htmlBuilder(e,t){return Sk(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Q(`mo`,[hA(e.text,e.mode)]);if(e.family===`bin`){var r=vA(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var jM={mi:`italic`,mn:`normal`,mtext:`normal`};Jk({type:`mathord`,htmlBuilder(e,t){return wk(e,t)},mathmlBuilder(e,t){var n=new Q(`mi`,[hA(e.text,e.mode,t)]),r=vA(e,t)||`italic`;return r!==jM[n.type]&&n.setAttribute(`mathvariant`,r),n}}),Jk({type:`textord`,htmlBuilder(e,t){return wk(e,t)},mathmlBuilder(e,t){var n=hA(e.text,e.mode,t),r=vA(e,t)||`normal`,i=e.mode===`text`?new Q(`mtext`,[n]):/[0-9]/.test(e.text)?new Q(`mn`,[n]):e.text===`\\prime`?new Q(`mo`,[n]):new Q(`mi`,[n]);return r!==jM[i.type]&&i.setAttribute(`mathvariant`,r),i}});var MM=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),NM=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);Jk({type:`spacing`,htmlBuilder(e,t){var n=NM.get(e.text),r=MM.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var a=wk(e,t);return a.classes.push(i),a}return X([`mspace`,i],[Sk(e.text,e.mode,t)],t)}if(r)return X([`mspace`,r],[],t);throw new B(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(NM.has(e.text))n=new Q(`mtext`,[new dA(`\xA0`)]);else if(MM.has(e.text))return new Q(`mspace`);else throw new B(`Unknown type of space "`+e.text+`"`);return n}});var PM=()=>{var e=new Q(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};Jk({type:`tag`,mathmlBuilder(e,t){var n=new Q(`mtable`,[new Q(`mtr`,[PM(),new Q(`mtd`,[xA(e.body,t)]),PM(),new Q(`mtd`,[xA(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var FM={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},IM={"\\textbf":`textbf`,"\\textmd":`textmd`},LM={"\\textit":`textit`,"\\textup":`textup`},RM=(e,t)=>{var n=e.font;return n?FM[n]?t.withTextFontFamily(FM[n]):IM[n]?t.withTextFontWeight(IM[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(LM[n]):t};Z({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:Xk(i),font:r}},htmlBuilder(e,t){var n=RM(e,t);return X([`mord`,`text`],tA(e.body,n,!0),n)},mathmlBuilder(e,t){var n=RM(e,t);return xA(e.body,n)}}),Z({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=sA(e.body,t),r=kk(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`katex-underline`],[Pk({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new dA(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`munder`,[SA(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),Z({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=sA(e.body,t),r=t.fontMetrics().axisHeight;return Pk({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Q(`mrow`,[new Q(`mpadded`,[SA(e.body,t)],[`vcenter`])])}}),Z({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new B(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=zM(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(xk(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return X([`mord`,`text`].concat(i.sizingClasses(t)),Ek(r),i)},mathmlBuilder(e,t){var n=new Q(`mtext`,[new dA(zM(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var zM=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),BM=Gk,VM=`[ \r
396
- ]`,HM=`\\\\[a-zA-Z@]+`,UM=`\\\\[^\ud800-\udfff]`,WM=`(`+HM+`)`+VM+`*`,GM=`\\\\(
397
- |[ \r ]+
398
- ?)[ \r ]*`,KM=`[̀-ͯ]`,qM=RegExp(KM+`+$`),JM=`(`+VM+`+)|`+(GM+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(KM+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(KM+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+WM)+(`|`+UM+`)`),YM=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(JM,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Yj(`EOF`,new Jj(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new B(`Unexpected character: '`+e[t]+`'`,new Yj(e[t],new Jj(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
399
- `,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,yk({strict:this.settings.strict,errorCode:`commentAtEnd`,errorMsg:`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`,report:!0})):this.tokenRegex.lastIndex=i+1,this.lex()}return new Yj(r,new Jj(this,t,this.tokenRegex.lastIndex))}},XM=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new B(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},ZM=qj;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var QM={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new B("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=QM[t.text],r==null||r>=n)throw new B(`Invalid base-`+n+` digit `+t.text);for(var i;(i=QM[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var $M=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new B(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new B(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new B(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new B(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};$(`\\newcommand`,e=>$M(e,!1,!0,!1)),$(`\\renewcommand`,e=>$M(e,!0,!1,!1)),$(`\\providecommand`,e=>$M(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),BM[n],jO.math[n],jO.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var eN={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},tN=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in eN?t=eN[n]:(n.slice(0,4)===`\\not`||n in jO.math&&tN.has(jO.math[n].group))&&(t=`\\dotsb`),t});var nN={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in nN?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in nN&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in nN?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new B(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var rN=V(wO[`Main-Regular`][84][1]-.7*wO[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+rN+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+rN+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`↤`,`\\mapsfrom`),$(`\\mapsfrom`,"\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var iN=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,iN(!1)),$(`\\bra@set`,iN(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var aN={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},oN=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new XM(ZM,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new YM(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new Yj(`EOF`,n.loc)),this.pushTokens(r),new Yj(``,Jj.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new B(`Extra }`,i)}else if(i.text===`EOF`)throw new B(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new B(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new B(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new B(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new B(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new B(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new B(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Yj(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new YM(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(BM,e)||Object.prototype.hasOwnProperty.call(jO.math,e)||Object.prototype.hasOwnProperty.call(jO.text,e)||Object.prototype.hasOwnProperty.call(aN,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(BM,e)&&!BM[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},sN=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,cN=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),lN={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},uN={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},dN=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new oN(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new B(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Yj(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&BM[i.text]&&BM[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new B(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new B(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new B(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new B(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new B(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new B(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(cN[i.text]){var s=sN.test(i.text),c=[];for(c.push(new Yj(cN[i.text])),this.consume();;){var l=this.fetch().text;if(!cN[l]||sN.test(l)!==s)break;c.unshift(new Yj(cN[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=BM[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new B(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new B(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new B(`Can't use function '`+r+`' in math mode`,n);var a=this.parseArguments(r,i),o=a.args,s=a.optArgs;return this.callFunction(r,o,s,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=BM[e];if(o&&o.handler)return o.handler(a,t,n);throw new B(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],c=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,s,c);if(c)a.push(l);else if(l!=null)i.push(l);else throw new B(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new B(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new B(`Expected group as `+e,this.fetch());return a;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new B(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new B(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new B(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new B(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!aO(i))throw new B(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:Jj.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Object.prototype.hasOwnProperty.call(aN,r)){if(this.settings.throwOnError)throw new B(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:Jj.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:Jj.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:Jj.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new B(`\\verb assertion failed --
400
- please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(uN,t[0])&&!jO[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&yk({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Accented Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e}),t=uN[t[0]]+t.slice(1));var i=qM.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(jO[this.mode][t]){this.settings.strict&&this.mode===`math`&&tk.includes(t)&&yk({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e});var o=jO[this.mode][t].group,s=Jj.range(e);a=HA(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(VD(t.charCodeAt(0))?this.mode===`math`&&yk({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e}):yk({strict:this.settings.strict,errorCode:`unknownSymbol`,errorMsg:`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),report:!0,token:e})),a={type:`textord`,mode:`text`,loc:Jj.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!lN[l])throw new B(`Unknown accent ' `+l+`'`,e);var u=lN[l][this.mode]||lN[l].text;if(!u)throw new B(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:Jj.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};dN.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var fN=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new dN(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new B(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new Yj(`\\df@tag`)])}]}return r},pN=function(e,t,n){t.textContent=``;var r=_N(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),pN=function(){throw new B(`KaTeX doesn't work in quirks mode.`)});var mN=function(e,t){return _N(e,t).toMarkup()},hN=function(e,t){return fN(e,new bD(t))},gN=function(e,t,n){if(n.throwOnError||!(e instanceof B))throw e;var r=X([`katex-error`],[new _O(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},_N=function(e,t){var n=new bD(t);try{return AA(fN(e,n),e,n)}catch(t){return gN(t,e,n)}},vN={version:`0.19.0`,render:pN,renderToString:mN,ParseError:B,SETTINGS_SCHEMA:gD,__parse:hN,__renderToDomTree:_N,__renderToHTMLTree:function(e,t){var n=new bD(t);try{return jA(fN(e,n),n)}catch(t){return gN(t,e,n)}},__setFontMetrics:DO,__defineSymbol:H,__defineFunction:Z,__defineMacro:$,__domTree:{Span:pO,Anchor:mO,SymbolNode:_O,SvgNode:vO,PathNode:yO,LineNode:bO}},yN=/^ {0,3}(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])[ \t]*(?:\n|$)/,bN=/^\$(?![\s$])((?:\\[^`\n]|[^\\$`\n])+?)(?<!\s)\$(?![\d$])/,xN=/(`+)[\s\S]*?\1(?!`)|(?<math>\$\$[^`]+?\$\$|\\\[[^`]+?\\\]|\\\([^`]+?\\\)|\$(?![\s$])(?:\\[^`\n]|[^\\$`\n])+?(?<!\s)\$(?![\d$]))|\\[^\n]/g,SN=new JE;function CN(e,t){let n=t.length-e.length,r=``,i=0;for(let a of e.matchAll(xN)){if(!a.groups?.math)continue;let e=n+a.index;r+=t.slice(i,e)+`a`.repeat(a[0].length),i=e+a[0].length}return r+t.slice(i)}function wN(e){return vN.renderToString(e.text,{displayMode:e.displayMode,throwOnError:!1,trust:!1,maxSize:20,maxExpand:1e3})}var TN=new eD({gfm:!0,breaks:!0},{tokenizer:{emStrong(e,t,n){if(/^[*_]/.test(e))return SN.emStrong.call(this,e,CN(e,t),n)},del(e,t,n){if(e.startsWith(`~`))return SN.del.call(this,e,CN(e,t),n)}},extensions:[{name:`blockMath`,level:`block`,start:e=>e.search(/^ {0,3}(?:\$\$|\\\[)/m),tokenizer(e){let t=yN.exec(e);if(t)return{type:`blockMath`,raw:t[0],text:(t[1]??t[2]).trim(),displayMode:!0}},renderer:wN},{name:`inlineMath`,level:`inline`,start:e=>e.search(/\$|\\[([]/),tokenizer(e){if(this.lexer.state.inRawBlock)return;let t=/^(?:\$\$([^`]+?)\$\$|\\\[([^`]+?)\\\])/.exec(e),n=t??/^\\\(([^`]+?)\\\)/.exec(e)??bN.exec(e);if(n)return{type:`inlineMath`,raw:n[0],text:(n[1]??n[2]).trim(),displayMode:!!t}},renderer:wN}]});uT.addHook(`uponSanitizeAttribute`,(e,t)=>{if(e.nodeName!==`IMG`||t.attrName!==`src`)return;let n=iD(t.attrValue);t.attrValue=aD(n)?`${n[0]}%3A${n.slice(2)}`:n});function EN(e,t=!1){let n=uT.sanitize(e,{ADD_FORBID_CONTENTS:[`annotation`],ADD_ATTR:[`target`,`rel`],FORBID_ATTR:t?[`target`,`rel`]:[]});return t?n.replace(/<a(?=[\s>])/gi,`<a target="_blank" rel="noopener noreferrer"`):n}var DN=/^\s*artifact:([A-Za-z0-9_-]+)\s*$/;function ON(e,t,n=!1){let r=[],i=[],a=()=>{if(i.length===0)return;let e=EN(TN.parser(i),n);e&&r.push({type:`html`,html:e}),i=[]};for(let n of TN.lexer(e)){let e=(n.type===`paragraph`?DN.exec(n.raw):null)?.[1];if(!e||!t.has(e)){i.push(n);continue}a(),r.push({type:`artifact`,artifactId:e})}return a(),r}var kN={markdown:C_,html:N_,react:y_};function AN({artifact:e,onOpen:t}){let n=kN[e.artifactType];return(0,R.jsxs)(`div`,{"data-artifact-reference":e.key,className:`bg-card my-3 flex min-w-0 items-center gap-3 rounded-lg border p-3 shadow-xs`,children:[(0,R.jsx)(`div`,{className:`bg-muted flex size-10 shrink-0 items-center justify-center rounded-md border`,children:(0,R.jsx)(n,{className:`text-muted-foreground size-4`,"aria-hidden":`true`})}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`div`,{className:`text-foreground truncate text-sm font-medium`,children:e.title}),(0,R.jsx)(`div`,{className:`text-muted-foreground mt-0.5 text-xs`,children:`Artifact`})]}),(0,R.jsx)(`button`,{type:`button`,className:`bg-background text-foreground hover:bg-muted shrink-0 rounded-md border px-3 py-1.5 text-sm font-medium transition`,onClick:t,"aria-label":`View ${e.title}`,children:`View`})]})}var jN=m(),MN=[{name:`TypeScript`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#fff" d="M22.67 47h99.67v73.67H22.67z"/><path data-name="original" fill="#007acc" d="M1.5 63.91v62.5h125v-125H1.5zm100.73-5a15.56 15.56 0 017.82 4.5 20.58 20.58 0 013 4c0 .16-5.4 3.81-8.69 5.85-.12.08-.6-.44-1.13-1.23a7.09 7.09 0 00-5.87-3.53c-3.79-.26-6.23 1.73-6.21 5a4.58 4.58 0 00.54 2.34c.83 1.73 2.38 2.76 7.24 4.86 8.95 3.85 12.78 6.39 15.16 10 2.66 4 3.25 10.46 1.45 15.24-2 5.2-6.9 8.73-13.83 9.9a38.32 38.32 0 01-9.52-.1 23 23 0 01-12.72-6.63c-1.15-1.27-3.39-4.58-3.25-4.82a9.34 9.34 0 011.15-.73L82 101l3.59-2.08.75 1.11a16.78 16.78 0 004.74 4.54c4 2.1 9.46 1.81 12.16-.62a5.43 5.43 0 00.69-6.92c-1-1.39-3-2.56-8.59-5-6.45-2.78-9.23-4.5-11.77-7.24a16.48 16.48 0 01-3.43-6.25 25 25 0 01-.22-8c1.33-6.23 6-10.58 12.82-11.87a31.66 31.66 0 019.49.26zm-29.34 5.24v5.12H56.66v46.23H45.15V69.26H28.88v-5a49.19 49.19 0 01.12-5.17C29.08 59 39 59 51 59h21.83z"/></svg>`,languages:[`ts`,`tsx`,`typescript`]},{name:`JavaScript`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#F0DB4F" d="M1.408 1.408h125.184v125.185H1.408z"/><path fill="#323330" d="M116.347 96.736c-.917-5.711-4.641-10.508-15.672-14.981-3.832-1.761-8.104-3.022-9.377-5.926-.452-1.69-.512-2.642-.226-3.665.821-3.32 4.784-4.355 7.925-3.403 2.023.678 3.938 2.237 5.093 4.724 5.402-3.498 5.391-3.475 9.163-5.879-1.381-2.141-2.118-3.129-3.022-4.045-3.249-3.629-7.676-5.498-14.756-5.355l-3.688.477c-3.534.893-6.902 2.748-8.877 5.235-5.926 6.724-4.236 18.492 2.975 23.335 7.104 5.332 17.54 6.545 18.873 11.531 1.297 6.104-4.486 8.08-10.234 7.378-4.236-.881-6.592-3.034-9.139-6.949-4.688 2.713-4.688 2.713-9.508 5.485 1.143 2.499 2.344 3.63 4.26 5.795 9.068 9.198 31.76 8.746 35.83-5.176.165-.478 1.261-3.666.38-8.581zM69.462 58.943H57.753l-.048 30.272c0 6.438.333 12.34-.714 14.149-1.713 3.558-6.152 3.117-8.175 2.427-2.059-1.012-3.106-2.451-4.319-4.485-.333-.584-.583-1.036-.667-1.071l-9.52 5.83c1.583 3.249 3.915 6.069 6.902 7.901 4.462 2.678 10.459 3.499 16.731 2.059 4.082-1.189 7.604-3.652 9.448-7.401 2.666-4.915 2.094-10.864 2.07-17.444.06-10.735.001-21.468.001-32.237z"/></svg>`,languages:[`js`,`jsx`,`javascript`]},{name:`Python`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="python-original-a" gradientUnits="userSpaceOnUse" x1="70.252" y1="1237.476" x2="170.659" y2="1151.089" gradientTransform="matrix(.563 0 0 -.568 -29.215 707.817)"><stop offset="0" stop-color="#5A9FD4"/><stop offset="1" stop-color="#306998"/></linearGradient><linearGradient id="python-original-b" gradientUnits="userSpaceOnUse" x1="209.474" y1="1098.811" x2="173.62" y2="1149.537" gradientTransform="matrix(.563 0 0 -.568 -29.215 707.817)"><stop offset="0" stop-color="#FFD43B"/><stop offset="1" stop-color="#FFE873"/></linearGradient><path fill="url(#python-original-a)" d="M63.391 1.988c-4.222.02-8.252.379-11.8 1.007-10.45 1.846-12.346 5.71-12.346 12.837v9.411h24.693v3.137H29.977c-7.176 0-13.46 4.313-15.426 12.521-2.268 9.405-2.368 15.275 0 25.096 1.755 7.311 5.947 12.519 13.124 12.519h8.491V67.234c0-8.151 7.051-15.34 15.426-15.34h24.665c6.866 0 12.346-5.654 12.346-12.548V15.833c0-6.693-5.646-11.72-12.346-12.837-4.244-.706-8.645-1.027-12.866-1.008zM50.037 9.557c2.55 0 4.634 2.117 4.634 4.721 0 2.593-2.083 4.69-4.634 4.69-2.56 0-4.633-2.097-4.633-4.69-.001-2.604 2.073-4.721 4.633-4.721z" transform="translate(0 10.26)"/><path fill="url(#python-original-b)" d="M91.682 28.38v10.966c0 8.5-7.208 15.655-15.426 15.655H51.591c-6.756 0-12.346 5.783-12.346 12.549v23.515c0 6.691 5.818 10.628 12.346 12.547 7.816 2.297 15.312 2.713 24.665 0 6.216-1.801 12.346-5.423 12.346-12.547v-9.412H63.938v-3.138h37.012c7.176 0 9.852-5.005 12.348-12.519 2.578-7.735 2.467-15.174 0-25.096-1.774-7.145-5.161-12.521-12.348-12.521h-9.268zM77.809 87.927c2.561 0 4.634 2.097 4.634 4.692 0 2.602-2.074 4.719-4.634 4.719-2.55 0-4.633-2.117-4.633-4.719 0-2.595 2.083-4.692 4.633-4.692z" transform="translate(0 10.26)"/><radialGradient id="python-original-c" cx="1825.678" cy="444.45" r="26.743" gradientTransform="matrix(0 -.24 -1.055 0 532.979 557.576)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#B8B8B8" stop-opacity=".498"/><stop offset="1" stop-color="#7F7F7F" stop-opacity="0"/></radialGradient><path opacity=".444" fill="url(#python-original-c)" d="M97.309 119.597c0 3.543-14.816 6.416-33.091 6.416-18.276 0-33.092-2.873-33.092-6.416 0-3.544 14.815-6.417 33.092-6.417 18.275 0 33.091 2.872 33.091 6.417z"/></svg>
401
- `,languages:[`py`,`python`]},{name:`Rust`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path d="M62.96.242c-.232.135-1.203 1.528-2.16 3.097-2.4 3.94-2.426 3.942-5.65.55-2.098-2.208-2.605-2.612-3.28-2.607-.44.002-.995.152-1.235.332-.24.18-.916 1.612-1.504 3.183-1.346 3.6-1.41 3.715-2.156 3.86-.46.086-1.343-.407-3.463-1.929-1.565-1.125-3.1-2.045-3.411-2.045-1.291 0-1.655.706-2.27 4.4-.78 4.697-.754 4.681-4.988 2.758-1.71-.776-3.33-1.41-3.603-1.41-.274 0-.792.293-1.15.652-.652.652-.653.655-.475 4.246l.178 3.595-.68.364c-.602.322-1.017.283-3.684-.348-3.48-.822-4.216-.8-4.92.15l-.516.693.692 2.964c.38 1.63.745 3.2.814 3.487.067.287-.05.746-.26 1.02-.348.448-.717.49-3.94.44-5.452-.086-5.761.382-3.51 5.3.718 1.56 1.305 2.98 1.305 3.15 0 .898-.717 1.224-3.794 1.727-1.722.28-3.218.51-3.326.51-.107 0-.43.235-.717.522-.937.936-.671 1.816 1.453 4.814 2.646 3.735 2.642 3.75-1.73 5.421-4.971 1.902-5.072 2.37-1.287 5.96 3.525 3.344 3.53 3.295-.461 5.804C.208 62.8.162 62.846.085 63.876c-.093 1.253-.071 1.275 3.538 3.48 3.57 2.18 3.57 2.246.067 5.56C-.078 76.48.038 77 5.013 78.877c4.347 1.64 4.353 1.66 1.702 5.394-1.502 2.117-1.981 3-1.981 3.653 0 1.223.637 1.535 4.44 2.174 3.206.54 3.92.857 3.92 1.741 0 .182-.588 1.612-1.307 3.177-2.236 4.87-1.981 5.275 3.31 5.275 4.93 0 4.799-.15 3.737 4.294-.8 3.35-.813 3.992-.088 4.715.554.556 1.6.494 4.87-.289 2.499-.596 2.937-.637 3.516-.328l.66.354-.177 3.594c-.178 3.593-.177 3.595.475 4.248.358.36.884.652 1.165.652.282 0 1.903-.63 3.604-1.404 4.22-1.916 4.194-1.932 4.973 2.75.617 3.711.977 4.4 2.294 4.4.327 0 1.83-.88 3.34-1.958 2.654-1.893 3.342-2.19 4.049-1.74.182.115.89 1.67 1.572 3.455 1.003 2.625 1.37 3.31 1.929 3.576 1.062.51 1.72.1 4.218-2.62 3.016-3.286 3.14-3.27 5.602.72 2.72 4.406 3.424 4.396 6.212-.089 2.402-3.864 2.374-3.862 5.621-.47 2.157 2.25 2.616 2.61 3.343 2.61.464 0 1.019-.175 1.23-.388.214-.213.92-1.786 1.568-3.496.649-1.71 1.321-3.2 1.495-3.31.687-.436 1.398-.13 4.048 1.752 1.56 1.108 3.028 1.96 3.377 1.96 1.296 0 1.764-.92 2.302-4.535.46-3.082.554-3.378 1.16-3.685.596-.302.954-.2 3.75 1.07 1.701.77 3.323 1.402 3.604 1.402.282 0 .816-.302 1.184-.672l.672-.67-.184-3.448c-.177-3.29-.16-3.468.364-3.943.54-.488.596-.486 3.615.204 3.656.835 4.338.857 5.025.17.671-.67.664-.818-.254-4.69-1.03-4.346-1.168-4.19 3.78-4.19 3.374 0 3.75-.049 4.18-.523.718-.793.547-1.702-.896-4.779-.729-1.55-1.32-2.96-1.315-3.135.024-.914.743-1.227 4.065-1.767 2.033-.329 3.553-.71 3.829-.96.923-.833.584-1.918-1.523-4.873-2.642-3.703-2.63-3.738 1.599-5.297 5.064-1.866 5.209-2.488 1.419-6.09-3.51-3.335-3.512-3.317.333-5.677 4.648-2.853 4.655-3.496.082-6.335-3.933-2.44-3.93-2.406-.405-5.753 3.78-3.593 3.678-4.063-1.295-5.965-4.388-1.679-4.402-1.72-1.735-5.38 1.588-2.18 1.982-2.903 1.982-3.65 0-1.306-.586-1.598-4.436-2.22-3.216-.52-3.924-.835-3.924-1.75 0-.174.588-1.574 1.307-3.113 1.406-3.013 1.604-4.22.808-4.94-.428-.387-1-.443-4.067-.392-3.208.054-3.618.008-4.063-.439-.486-.488-.48-.557.278-3.725.931-3.88.935-3.975.17-4.694-.777-.73-1.262-.718-4.826.121-2.597.612-3.027.653-3.617.337l-.67-.36.185-3.582.186-3.58-.67-.67c-.369-.37-.891-.67-1.163-.67-.27 0-1.884.64-3.583 1.421-2.838 1.306-3.143 1.393-3.757 1.072-.612-.32-.714-.637-1.237-3.829-.603-3.693-.977-4.412-2.288-4.412-.311 0-1.853.925-3.426 2.055-2.584 1.856-2.93 2.032-3.574 1.807-.533-.186-.843-.59-1.221-1.599-.28-.742-.817-2.172-1.194-3.177-.762-2.028-1.187-2.482-2.328-2.482-.637 0-1.213.458-3.28 2.604-3.25 3.375-3.261 3.374-5.65-.545C66.073 1.78 65.075.382 64.81.24c-.597-.32-1.3-.32-1.85.002m2.96 11.798c2.83 2.014 1.326 6.75-2.144 6.75-3.368 0-5.064-4.057-2.66-6.36 1.358-1.3 3.304-1.459 4.805-.39m-3.558 12.507c1.855.705 2.616.282 6.852-3.8l3.182-3.07 1.347.18c4.225.56 12.627 4.25 17.455 7.666 4.436 3.14 10.332 9.534 12.845 13.93l.537.942-2.38 5.364c-1.31 2.95-2.382 5.673-2.382 6.053 0 .878.576 2.267 1.13 2.726.234.195 2.457 1.265 4.939 2.378l4.51 2.025.178 1.148c.23 1.495.26 5.167.052 6.21l-.163.816h-2.575c-2.987 0-2.756-.267-2.918 3.396-.118 2.656-.76 4.124-2.22 5.075-2.377 1.551-6.304 1.27-7.97-.57-.255-.284-.752-1.705-1.105-3.16-1.03-4.254-2.413-6.64-5.193-8.965-.878-.733-1.595-1.418-1.595-1.522 0-.102.965-.915 2.145-1.803 4.298-3.24 6.77-7.012 7.04-10.747.519-7.126-5.158-13.767-13.602-15.92-2.002-.51-2.857-.526-27.624-.526-14.057 0-25.56-.092-25.56-.204 0-.263 3.125-3.295 4.965-4.816 5.054-4.178 11.618-7.465 18.417-9.22l2.35-.61 3.34 3.387c1.839 1.863 3.64 3.5 4.003 3.637M20.3 46.34c1.539 1.008 2.17 3.54 1.26 5.062-1.405 2.356-4.966 2.455-6.373.178-2.046-3.309 1.895-7.349 5.113-5.24m90.672.13c4.026 2.454.906 8.493-3.404 6.586-2.877-1.273-2.97-5.206-.155-6.64 1.174-.6 2.523-.579 3.56.053M32.163 61.5v15.02h-13.28l-.526-2.285c-1.036-4.5-1.472-9.156-1.211-12.969l.182-2.679 4.565-2.047c2.864-1.283 4.706-2.262 4.943-2.625 1.038-1.584.94-2.715-.518-5.933l-.68-1.502h6.523V61.5M70.39 47.132c2.843.74 4.345 2.245 4.349 4.355.002 1.55-.765 2.52-2.67 3.38-1.348.61-1.562.625-10.063.708l-8.686.084v-8.92h7.782c6.078 0 8.112.086 9.288.393m-2.934 21.554c1.41.392 3.076 1.616 3.93 2.888.898 1.337 1.423 3.076 2.667 8.836 1.05 4.87 1.727 6.46 3.62 8.532 2.345 2.566 1.8 2.466 13.514 2.466 5.61 0 10.198.09 10.198.2 0 .197-3.863 4.764-4.03 4.764-.048 0-2.066-.422-4.484-.939-6.829-1.458-7.075-1.287-8.642 6.032l-1.008 4.702-.91.448c-1.518.75-6.453 2.292-9.01 2.82-4.228.87-8.828 1.162-12.871.821-6.893-.585-16.02-3.259-16.377-4.8-.075-.327-.535-2.443-1.018-4.704-.485-2.26-1.074-4.404-1.31-4.764-1.13-1.724-2.318-1.83-7.547-.674-1.98.44-3.708.796-3.84.796-.248 0-3.923-4.249-3.923-4.535 0-.09 8.728-.194 19.396-.23l19.395-.066.07-6.89c.05-4.865-.018-6.997-.23-7.25-.234-.284-1.485-.358-6.011-.358H53.32v-8.36l6.597.001c3.626.002 7.02.12 7.539.264M37.57 100.02c3.084 1.88 1.605 6.804-2.043 6.8-3.74 0-5.127-4.88-1.94-6.826 1.055-.643 2.908-.63 3.983.026m56.48.206c1.512 1.108 2.015 3.413 1.079 4.95-2.46 4.034-8.612.827-6.557-3.419 1.01-2.085 3.695-2.837 5.478-1.53"/></svg>
402
- `,languages:[`rs`,`rust`],monochrome:!0},{name:`Go`,svg:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 128"><defs><path id="go-original-a" d="M18.8 1h90.5v126H18.8z"/></defs><clipPath id="go-original-b"><use xlink:href="#go-original-a" overflow="visible"/></clipPath><path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" d="M21.1 68.7c.2 3.5 3.7 1.9 5.3.8 1.5-1.1 2-.2 2.1-2.3.1-1.4.2-2.7.2-4.1-2.3-.2-4.8.3-6.7 1.7-.9.7-2.8 3-.9 3.9" clip-path="url(#go-original-b)"/><path d="M23 71.2c-.7 0-2-.3-2.2-2.3-.6-.4-.8-.9-.8-1.2-.1-1.2 1.2-2.6 1.9-3.1 1.6-1.2 3.7-1.8 5.9-1.8h1.3v.3c.1 1.1 0 2.2-.1 3.2 0 .3 0 .6-.1.9-.1 1.5-.4 1.7-1.1 2-.3.1-.6.2-1.1.6-.5.3-2.2 1.4-3.7 1.4zm4.8-7.8c-2.1 0-4 .6-5.5 1.7-.7.5-1.7 1.7-1.6 2.5 0 .3.2.6.6.8l.2.1v.2c.1 1.6.9 1.8 1.5 1.8 1 0 2.4-.7 3.3-1.3.6-.4 1-.5 1.3-.6.5-.2.6-.2.7-1.4 0-.3 0-.6.1-.9.1-.9.1-1.9.1-2.8-.3-.1-.5-.1-.7-.1z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#C6B198" d="M21.1 68.7c.5-.2 1.1-.3 1.4-.8" clip-path="url(#go-original-b)"/><path d="M21.1 69c-.1 0-.3-.1-.3-.2-.1-.2 0-.4.2-.4.1 0 .2-.1.2-.1.4-.2.8-.3 1-.6.1-.1.3-.2.5-.1.1.1.2.3.1.5-.4.5-.9.7-1.3.8l-.2.1h-.2z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#6AD7E5" d="M29.3 26.4c-13.6-3.8-3.5-21.1 7.4-14l-7.4 14z" clip-path="url(#go-original-b)"/><path d="M29.5 26.8l-.3-.1c-7-2-6.9-7-6.7-8.5.5-3.8 4.1-7.8 8.9-7.8 1.9 0 3.7.6 5.5 1.8l.3.2-7.7 14.4zm1.9-15.7c-4.5 0-7.8 3.7-8.3 7.2-.5 3.6 1.7 6.4 6 7.7l7.1-13.5c-1.5-.9-3.1-1.4-4.8-1.4z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#6AD7E5" d="M89.6 11.1c10.7-7.5 20.5 9.5 8 13.8l-8-13.8z" clip-path="url(#go-original-b)"/><path d="M97.5 25.3L89.2 11l.3-.2c1.9-1.3 3.8-2 5.7-2 4.6 0 7.9 3.8 8.6 7.5.3 1.5.6 6.6-6 8.8l-.3.2zm-7.4-14l7.7 13.3c3.9-1.4 5.9-4.4 5.3-8-.6-3.4-3.7-6.9-7.9-6.9-1.7-.1-3.4.4-5.1 1.6z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" d="M92 112.3c2.7 1.7 7.7 6.8 3.6 9.3-3.9 3.6-6.1-4-9.6-5 1.5-2 3.4-3.9 6-4.3" clip-path="url(#go-original-b)"/><path d="M93.5 122.9c-1.6 0-3-1.6-4.2-3.1-1.1-1.2-2.2-2.5-3.4-2.9l-.5-.1.3-.4c1.2-1.7 3.2-3.9 6.2-4.4h.1l.1.1c1.7 1.1 5.4 4.2 5.3 7.1 0 1.1-.6 2-1.7 2.7-.7.7-1.4 1-2.2 1zm-7-6.5c1.2.5 2.2 1.8 3.2 2.9 1.2 1.5 2.4 2.8 3.7 2.8.6 0 1.2-.3 1.8-.9h.1c.9-.6 1.4-1.3 1.4-2.2 0-2.3-2.9-5.2-4.9-6.5-1.8.5-3.6 1.7-5.3 3.9zm9.1 5.5c-.1 0-.2-.1-.3-.2-.2-.4-.4-.9-.5-1.3-.3-.8-.6-1.6-1.2-2.2-.1-.1-.1-.3 0-.5.1-.1.3-.1.5 0 .7.7 1.1 1.6 1.4 2.5l.5 1.2c.1.2 0 .4-.1.5h-.3z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" d="M43.2 118.1c-3.2.5-5 3.4-7.7 4.9-2.5 1.5-3.5-.5-3.7-.9-.4-.2-.4.2-1-.4-2.3-3.7 2.4-6.4 4.9-8.2 3.5-.8 5.7 2.2 7.5 4.6" clip-path="url(#go-original-b)"/><path d="M33.8 123.8c-1.3 0-2-1.1-2.2-1.5h-.1c-.3 0-.5-.1-.9-.5v-.1c-2.2-3.5 1.6-6.2 4.1-8l.9-.6h.2c.4-.1.7-.1 1.1-.1 3 0 4.9 2.6 6.5 4.7l.5.7-.6.1c-1.9.3-3.3 1.5-4.7 2.7-.9.8-1.8 1.5-2.8 2.1-.8.3-1.4.5-2 .5zm-2.2-2.1c.1 0 .2 0 .4.1h.1l.1.1c.2.3.7 1.2 1.7 1.2.5 0 1-.2 1.5-.5 1-.5 1.9-1.3 2.7-2 1.3-1.1 2.7-2.3 4.5-2.8-1.5-2-3.3-4.2-5.8-4.2-.3 0-.6 0-.9.1l-.8.6c-2.6 1.8-5.8 4.1-3.9 7.1.1.2.2.3.4.3zm.2.7c-.2 0-.4-.2-.3-.4.1-1 .6-1.7 1.1-2.5.3-.4.5-.8.7-1.2.1-.2.3-.2.4-.2.2.1.2.3.2.4-.2.5-.5.9-.8 1.3-.5.7-.9 1.3-1 2.1 0 .4-.1.5-.3.5z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M29.9 21.7c-1.8-.9-3.1-2.2-2-4.3 1-1.9 2.9-1.7 4.7-.8l-2.7 5.1zm64.9-1.8c1.8-.9 3.1-2.2 2-4.3-1-1.9-2.9-1.7-4.7-.8l2.7 5.1z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" d="M107.1 68.2c-.2 3.5-3.7 1.9-5.3.8-1.5-1.1-2-.2-2.1-2.3-.1-1.4-.2-2.7-.2-4.1 2.3-.2 4.8.3 6.7 1.7 1 .8 2.8 3 .9 3.9" clip-path="url(#go-original-b)"/><path d="M105.3 70.7c-1.5 0-3.2-1.1-3.7-1.4-.5-.3-.8-.5-1.1-.6-.8-.3-1-.5-1.1-2 0-.3 0-.6-.1-.9-.1-1-.2-2.1-.1-3.2v-.3h1.3c2.2 0 4.3.6 5.9 1.8.7.5 2 1.9 1.9 3.1 0 .4-.2.9-.8 1.2-.2 2-1.5 2.3-2.2 2.3zM99.8 63c0 .9 0 1.9.1 2.8 0 .3 0 .6.1.9.1 1.2.2 1.2.7 1.4.3.1.7.3 1.3.6.9.6 2.3 1.3 3.3 1.3.6 0 1.4-.2 1.5-1.8V68l.2-.1c.4-.2.6-.4.6-.8.1-.8-.9-2-1.6-2.5-1.5-1.1-3.5-1.7-5.5-1.7-.2.1-.4.1-.7.1z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#C6B198" d="M107.1 68.2c-.5-.2-1.1-.3-1.4-.8" clip-path="url(#go-original-b)"/><path d="M107.1 68.6h-.1l-.2-.1c-.5-.2-1-.3-1.3-.8-.1-.1-.1-.4.1-.5.1-.1.4-.1.5.1.2.3.6.4 1 .6.1 0 .2.1.2.1.2.1.3.3.2.4-.1.1-.3.2-.4.2z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#6AD7E5" d="M62.8 4c13.6 0 26.3 1.9 33 15 6 14.6 3.8 30.4 4.8 45.9.8 13.3 2.5 28.6-3.6 40.9-6.5 12.9-22.7 16.2-36 15.7-10.5-.4-23.1-3.8-29.1-13.4-6.9-11.2-3.7-27.9-3.2-40.4.6-14.8-4-29.7.9-44.1C34.5 8.5 48.1 5.1 62.8 4" clip-path="url(#go-original-b)"/><path d="M63.3 121.9h-2.5c-4.1-.1-10.3-.8-16.4-3.3-5.9-2.4-10.2-5.8-13-10.3-5.6-9.1-4.6-21.6-3.7-32.7.2-2.8.4-5.4.5-7.9.2-5.2-.2-10.6-.7-15.7-.8-9.4-1.6-19.1 1.5-28.5 2.4-7 6.7-12 13.2-15.2 5.1-2.5 11.4-3.9 20.4-4.6C76 3.6 89.3 5.5 96 18.8c4.4 10.7 4.4 22.2 4.5 33.3 0 4.2 0 8.5.3 12.7.1 1.3.2 2.6.2 3.9.8 12.2 1.7 26-3.9 37.2-2.8 5.7-7.7 9.9-14.4 12.6-5.4 2.2-12.2 3.4-19.4 3.4zM62.8 4.3c-14.1 1.1-27.9 4.2-33 19.4-3.1 9.3-2.3 18.9-1.5 28.2.4 5.2.9 10.5.7 15.8-.1 2.5-.3 5.1-.5 7.9-.9 11-1.9 23.4 3.6 32.3 2.3 3.7 9.7 12.5 28.8 13.2h2.5c22.1 0 30.3-9.8 33.3-15.6 5.5-11 4.6-24.8 3.9-36.9-.1-1.3-.2-2.6-.2-3.9-.2-4.2-.3-8.5-.3-12.7-.1-11-.1-22.5-4.4-33.1C92.7 13 88.2 9 82 6.7c-6.4-2.1-13.6-2.4-19.2-2.4z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#fff" d="M65.2 22.2c2.4 14.2 25.6 10.4 22.3-3.9-3-12.8-23.1-9.2-22.3 3.9" clip-path="url(#go-original-b)"/><path d="M76.2 31.5c-4.5 0-10.2-2.4-11.4-9.2-.2-3.2.8-6.1 2.9-8.3 2.3-2.5 5.8-3.9 9.4-3.9 4.2 0 9.2 2.2 10.6 8.3.8 3.4.2 6.4-1.7 8.8-2.1 2.6-5.8 4.3-9.8 4.3zm-10.7-9.3c.5 2.8 1.8 5 3.9 6.6 1.8 1.4 4.3 2.1 6.8 2.1 3.7 0 7.3-1.6 9.3-4.1 1.8-2.2 2.3-5.1 1.6-8.3-1.3-5.7-6-7.7-10-7.7-3.4 0-6.7 1.4-8.9 3.7-1.9 2-2.9 4.7-2.7 7.7z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#fff" d="M37.5 24.5c3.2 12.3 22.9 9.2 22.2-3.2-.9-14.8-25.3-12-22.2 3.2" clip-path="url(#go-original-b)"/><path d="M48 32.7c-4.3 0-9.3-2.1-10.9-8.1-.7-3.5 0-6.7 2-9.1 2.2-2.7 5.8-4.3 9.7-4.3 5.2 0 10.7 3.1 11.1 10.1.2 2.9-.7 5.5-2.7 7.6-2.1 2.3-5.6 3.8-9.2 3.8zm.8-20.8c-3.7 0-7.1 1.5-9.2 4-1.9 2.3-2.5 5.2-1.8 8.5C39.2 30 44 32 48 32c3.4 0 6.7-1.3 8.8-3.6 1.8-1.9 2.7-4.4 2.5-7.1-.2-4.3-3.1-9.4-10.5-9.4z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#fff" d="M68 39.2c0 1.8.4 3.9.1 5.9-.5.9-1.4 1-2.2 1.3-1.1-.2-2-.9-2.5-1.9-.3-2.2.1-4.4.2-6.6l4.4 1.3z" clip-path="url(#go-original-b)"/><path d="M65.9 46.8c-1.3-.2-2.3-1-2.8-2.1-.2-1.6-.1-3.1 0-4.6.1-.7.1-1.4.1-2.1v-.4l5.1 1.6v.2c0 .6.1 1.2.1 1.9.1 1.3.2 2.7 0 4v.1c-.4.8-1.1 1-1.8 1.3-.2-.1-.4 0-.7.1zm-2.2-2.4c.4.9 1.2 1.5 2.1 1.7.2-.1.4-.1.5-.2.6-.2 1.1-.4 1.4-.9.2-1.2.1-2.5 0-3.8 0-.6-.1-1.2-.1-1.7l-3.8-1.2c0 .6-.1 1.2-.1 1.7-.1 1.6-.2 3 0 4.4z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M46.3 22.5c0 2-1.5 3.6-3.3 3.6-1.8 0-3.3-1.6-3.3-3.6s1.5-3.6 3.3-3.6c1.8 0 3.3 1.6 3.3 3.6" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#fff" d="M45.2 23.3c0 .5-.4.9-.8.9s-.8-.4-.8-.9.4-.9.8-.9c.5 0 .8.4.8.9" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M74.2 21.6c0 2-1.5 3.6-3.3 3.6-1.8 0-3.3-1.6-3.3-3.6s1.5-3.6 3.3-3.6c1.8 0 3.3 1.6 3.3 3.6" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#fff" d="M73.2 22.4c0 .5-.3.9-.8.9-.4 0-.8-.4-.8-.9s.3-.9.8-.9c.4 0 .8.4.8.9M58.4 39c-1.5 3.5.8 10.6 4.8 5.4-.3-2.2.1-4.4.2-6.6l-5 1.2z" clip-path="url(#go-original-b)"/><path d="M60.5 46.6c-.7 0-1.4-.4-1.9-1.2-1.1-1.6-1.3-4.6-.5-6.5l.1-.2 5.5-1.4v.4l-.1 2.2c-.1 1.5-.2 2.9 0 4.4v.1l-.1.1c-1 1.4-2 2.1-3 2.1zm-1.8-7.3c-.6 1.7-.4 4.4.5 5.7.4.6.8.9 1.3.9.7 0 1.5-.6 2.3-1.6-.2-1.5-.1-3 .1-4.4l.1-1.7-4.3 1.1z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#F6D2A2" d="M58.9 32.2c-2.7.2-4.9 3.5-3.5 6 1.9 3.4 6-.3 8.6 0 3 .1 5.4 3.2 7.8.6 2.7-2.9-1.2-5.7-4.1-7l-8.8.4z" clip-path="url(#go-original-b)"/><path fill="#231F20" d="M69.7 40.2c-.9 0-1.8-.4-2.7-.8-.9-.4-1.9-.8-3-.8h-.3c-.8 0-1.7.3-2.7.7-1.1.4-2.2.7-3.2.7-1.2 0-2.1-.5-2.7-1.6-.7-1.2-.6-2.6.1-3.9.8-1.5 2.2-2.4 3.7-2.6l8.9-.4h.1c2.2.9 4.7 2.6 5.2 4.6.2 1-.1 2-.9 2.9-.8.9-1.6 1.2-2.5 1.2zM64.1 38c1.1 0 2.2.5 3.2.9.9.4 1.7.7 2.5.7.7 0 1.3-.3 1.9-.9.7-.7.9-1.5.8-2.3-.4-1.7-2.8-3.3-4.7-4.1l-8.7.4c-1.3.1-2.5 1-3.2 2.2-.6 1.1-.6 2.3-.1 3.3.5.9 1.1 1.3 2.1 1.3.9 0 1.9-.4 2.9-.7 1.1-.4 2-.7 3-.7 0-.2.1-.2.3-.1z" clip-path="url(#go-original-b)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M58.6 32.1c-.2-4.7 8.8-5.3 9.8-1.4 1.1 4-9.4 4.9-9.8 1.4" clip-path="url(#go-original-b)"/></svg>
403
- `,languages:[`go`,`golang`]},{name:`C`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#a9bacd" d="M125 50c-4-32-24-50-62-50C29 0 3 24 3 64c0 39 24 64 64 64 32 0 55-19 58-50H87c-2 11-8 20-20 20-21 0-24-16-24-33 0-23 8-35 22-35 13 0 20 7 22 20z" /></svg>
404
- `,languages:[`c`]},{name:`C++`,svg:`<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
405
- <path fill="#00599c" d="M118.766 95.82c.89-1.543 1.441-3.28 1.441-4.843V36.78c0-1.558-.55-3.297-1.441-4.84l-55.32 31.94Zm0 0"/>
406
- <path fill="#004482" d="m68.36 126.586 46.933-27.094c1.352-.781 2.582-2.129 3.473-3.672l-55.32-31.94L8.12 95.82c.89 1.543 2.121 2.89 3.473 3.672l46.933 27.094c2.703 1.562 7.13 1.562 9.832 0Zm0 0"/>
407
- <path fill="#659ad2" d="M118.766 31.941c-.891-1.546-2.121-2.894-3.473-3.671L68.359 1.172c-2.703-1.563-7.129-1.563-9.832 0L11.594 28.27C8.89 29.828 6.68 33.66 6.68 36.78v54.196c0 1.562.55 3.3 1.441 4.843L63.445 63.88Zm0 0"/>
408
- <path fill="#fff" d="M63.445 26.035c-20.867 0-37.843 16.977-37.843 37.844s16.976 37.844 37.843 37.844c13.465 0 26.024-7.247 32.77-18.91L79.84 73.335c-3.38 5.84-9.66 9.465-16.395 9.465-10.433 0-18.922-8.488-18.922-18.922 0-10.434 8.49-18.922 18.922-18.922 6.73 0 13.017 3.629 16.39 9.465l16.38-9.477c-6.75-11.664-19.305-18.91-32.77-18.91zM92.88 57.57v4.207h-4.207v4.203h4.207v4.207h4.203V65.98h4.203v-4.203h-4.203V57.57H92.88zm15.766 0v4.207h-4.204v4.203h4.204v4.207h4.207V65.98h4.203v-4.203h-4.203V57.57h-4.207z"/>
409
- </svg>
410
- `,languages:[`cpp`,`c++`,`cxx`]},{name:`C#`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#9B4F96" d="M115.4 30.7L67.1 2.9c-.8-.5-1.9-.7-3.1-.7-1.2 0-2.3.3-3.1.7l-48 27.9c-1.7 1-2.9 3.5-2.9 5.4v55.7c0 1.1.2 2.4 1 3.5l106.8-62c-.6-1.2-1.5-2.1-2.4-2.7z"/><path fill="#68217A" d="M10.7 95.3c.5.8 1.2 1.5 1.9 1.9l48.2 27.9c.8.5 1.9.7 3.1.7 1.2 0 2.3-.3 3.1-.7l48-27.9c1.7-1 2.9-3.5 2.9-5.4V36.1c0-.9-.1-1.9-.6-2.8l-106.6 62z"/><path fill="#fff" d="M85.3 76.1C81.1 83.5 73.1 88.5 64 88.5c-13.5 0-24.5-11-24.5-24.5s11-24.5 24.5-24.5c9.1 0 17.1 5 21.3 12.5l13-7.5c-6.8-11.9-19.6-20-34.3-20-21.8 0-39.5 17.7-39.5 39.5s17.7 39.5 39.5 39.5c14.6 0 27.4-8 34.2-19.8l-12.9-7.6zM97 66.2l.9-4.3h-4.2v-4.7h5.1L100 51h4.9l-1.2 6.1h3.8l1.2-6.1h4.8l-1.2 6.1h2.4v4.7h-3.3l-.9 4.3h4.2v4.7h-5.1l-1.2 6h-4.9l1.2-6h-3.8l-1.2 6h-4.8l1.2-6h-2.4v-4.7H97zm4.8 0h3.8l.9-4.3h-3.8l-.9 4.3z"/></svg>`,languages:[`cs`,`c#`,`csharp`]},{name:`Java`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#0074BD" d="M47.617 98.12s-4.767 2.774 3.397 3.71c9.892 1.13 14.947.968 25.845-1.092 0 0 2.871 1.795 6.873 3.351-24.439 10.47-55.308-.607-36.115-5.969zm-2.988-13.665s-5.348 3.959 2.823 4.805c10.567 1.091 18.91 1.18 33.354-1.6 0 0 1.993 2.025 5.132 3.131-29.542 8.64-62.446.68-41.309-6.336z"/><path fill="#EA2D2E" d="M69.802 61.271c6.025 6.935-1.58 13.17-1.58 13.17s15.289-7.891 8.269-17.777c-6.559-9.215-11.587-13.792 15.635-29.58 0 .001-42.731 10.67-22.324 34.187z"/><path fill="#0074BD" d="M102.123 108.229s3.529 2.91-3.888 5.159c-14.102 4.272-58.706 5.56-71.094.171-4.451-1.938 3.899-4.625 6.526-5.192 2.739-.593 4.303-.485 4.303-.485-4.953-3.487-32.013 6.85-13.743 9.815 49.821 8.076 90.817-3.637 77.896-9.468zM49.912 70.294s-22.686 5.389-8.033 7.348c6.188.828 18.518.638 30.011-.326 9.39-.789 18.813-2.474 18.813-2.474s-3.308 1.419-5.704 3.053c-23.042 6.061-67.544 3.238-54.731-2.958 10.832-5.239 19.644-4.643 19.644-4.643zm40.697 22.747c23.421-12.167 12.591-23.86 5.032-22.285-1.848.385-2.677.72-2.677.72s.688-1.079 2-1.543c14.953-5.255 26.451 15.503-4.823 23.725 0-.002.359-.327.468-.617z"/><path fill="#EA2D2E" d="M76.491 1.587S89.459 14.563 64.188 34.51c-20.266 16.006-4.621 25.13-.007 35.559-11.831-10.673-20.509-20.07-14.688-28.815C58.041 28.42 81.722 22.195 76.491 1.587z"/><path fill="#0074BD" d="M52.214 126.021c22.476 1.437 57-.8 57.817-11.436 0 0-1.571 4.032-18.577 7.231-19.186 3.612-42.854 3.191-56.887.874 0 .001 2.875 2.381 17.647 3.331z"/></svg>`,languages:[`java`]},{name:`Kotlin`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
411
- <defs>
412
- <linearGradient id="a" x1="500.003" x2="-.097" y1="579.106" y2="1079.206" gradientTransform="translate(15.534 -96.774) scale(.1939)" gradientUnits="userSpaceOnUse">
413
- <stop offset=".003" stop-color="#e44857"/>
414
- <stop offset=".469" stop-color="#c711e1"/>
415
- <stop offset="1" stop-color="#7f52ff"/>
416
- </linearGradient>
417
- </defs>
418
- <path fill="url(#a)" d="M112.484 112.484H15.516V15.516h96.968L64 64Zm0 0"/>
419
- </svg>
420
- `,languages:[`kt`,`kts`,`kotlin`]},{name:`Swift`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#f05138" d="M126.33 34.06a39.32 39.32 0 00-.79-7.83 28.78 28.78 0 00-2.65-7.58 28.84 28.84 0 00-4.76-6.32 23.42 23.42 0 00-6.62-4.55 27.27 27.27 0 00-7.68-2.53c-2.65-.51-5.56-.51-8.21-.76H30.25a45.46 45.46 0 00-6.09.51 21.82 21.82 0 00-5.82 1.52c-.53.25-1.32.51-1.85.76a33.82 33.82 0 00-5 3.28c-.53.51-1.06.76-1.59 1.26a22.41 22.41 0 00-4.76 6.32 23.61 23.61 0 00-2.65 7.58 78.5 78.5 0 00-.79 7.83v60.39a39.32 39.32 0 00.79 7.83 28.78 28.78 0 002.65 7.58 28.84 28.84 0 004.76 6.32 23.42 23.42 0 006.62 4.55 27.27 27.27 0 007.68 2.53c2.65.51 5.56.51 8.21.76h63.22a45.08 45.08 0 008.21-.76 27.27 27.27 0 007.68-2.53 30.13 30.13 0 006.62-4.55 22.41 22.41 0 004.76-6.32 23.61 23.61 0 002.65-7.58 78.49 78.49 0 00.79-7.83V34.06z"/><path fill="#fefefe" d="M85 96.5c-11.11 6.13-26.38 6.76-41.75.47A64.53 64.53 0 0113.84 73a50 50 0 0010.85 6.32c15.87 7.1 31.73 6.61 42.9 0-15.9-11.66-29.4-26.82-39.46-39.2a43.47 43.47 0 01-5.29-6.82c12.16 10.61 31.5 24 38.38 27.79a271.77 271.77 0 01-27-32.34 266.8 266.8 0 0044.47 34.87c.71.38 1.26.7 1.7 1a32.7 32.7 0 001.21-3.51c3.71-12.89-.53-27.54-9.79-39.67C93.25 33.81 106 57.05 100.66 76.51c-.14.53-.29 1-.45 1.55l.19.22c10.59 12.63 7.68 26 6.35 23.5C101 91 90.37 94.33 85 96.5z"/></svg>`,languages:[`swift`]},{name:`Ruby`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="ruby-original-a" gradientUnits="userSpaceOnUse" x1="157.08" y1="2382.05" x2="131.682" y2="2426.892" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#FB7655"/><stop offset="0" stop-color="#FB7655"/><stop offset=".41" stop-color="#E42B1E"/><stop offset=".99" stop-color="#900"/><stop offset="1" stop-color="#900"/></linearGradient><path fill="url(#ruby-original-a)" d="M97.078 83.214L28.34 124.031l89.003-6.04 6.855-89.745z"/><linearGradient id="ruby-original-b" gradientUnits="userSpaceOnUse" x1="169.731" y1="2419.72" x2="136.998" y2="2441.685" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#871101"/><stop offset="0" stop-color="#871101"/><stop offset=".99" stop-color="#911209"/><stop offset="1" stop-color="#911209"/></linearGradient><path fill="url(#ruby-original-b)" d="M117.488 117.93l-7.649-52.799-20.837 27.514z"/><linearGradient id="ruby-original-c" gradientUnits="userSpaceOnUse" x1="143.542" y1="2380.69" x2="110.81" y2="2402.655" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#871101"/><stop offset="0" stop-color="#871101"/><stop offset=".99" stop-color="#911209"/><stop offset="1" stop-color="#911209"/></linearGradient><path fill="url(#ruby-original-c)" d="M117.592 117.93l-56.044-4.399-32.91 10.385z"/><linearGradient id="ruby-original-d" gradientUnits="userSpaceOnUse" x1="74.817" y1="2435.622" x2="79.891" y2="2402.644" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#fff"/><stop offset="0" stop-color="#fff"/><stop offset=".23" stop-color="#E57252"/><stop offset=".46" stop-color="#DE3B20"/><stop offset=".99" stop-color="#A60003"/><stop offset="1" stop-color="#A60003"/></linearGradient><path fill="url(#ruby-original-d)" d="M28.717 123.928l14.001-45.867-30.81 6.588z"/><linearGradient id="ruby-original-e" gradientUnits="userSpaceOnUse" x1="109.719" y1="2466.413" x2="111.589" y2="2432.757" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#fff"/><stop offset="0" stop-color="#fff"/><stop offset=".23" stop-color="#E4714E"/><stop offset=".56" stop-color="#BE1A0D"/><stop offset=".99" stop-color="#A80D00"/><stop offset="1" stop-color="#A80D00"/></linearGradient><path fill="url(#ruby-original-e)" d="M88.996 92.797l-12.882-50.46-36.866 34.558z"/><linearGradient id="ruby-original-f" gradientUnits="userSpaceOnUse" x1="140.691" y1="2497.523" x2="146.289" y2="2473.401" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#fff"/><stop offset="0" stop-color="#fff"/><stop offset=".18" stop-color="#E46342"/><stop offset=".4" stop-color="#C82410"/><stop offset=".99" stop-color="#A80D00"/><stop offset="1" stop-color="#A80D00"/></linearGradient><path fill="url(#ruby-original-f)" d="M121.275 43.047L86.426 14.585l-9.704 31.373z"/><linearGradient id="ruby-original-g" gradientUnits="userSpaceOnUse" x1="123.6" y1="2506.018" x2="147.719" y2="2518.077" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#fff"/><stop offset="0" stop-color="#fff"/><stop offset=".54" stop-color="#C81F11"/><stop offset=".99" stop-color="#BF0905"/><stop offset="1" stop-color="#BF0905"/></linearGradient><path fill="url(#ruby-original-g)" d="M104.978 4.437L84.481 15.764 71.551 4.285z"/><linearGradient id="ruby-original-h" gradientUnits="userSpaceOnUse" x1="53.674" y1="2444.028" x2="55.66" y2="2424.153" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#fff"/><stop offset="0" stop-color="#fff"/><stop offset=".31" stop-color="#DE4024"/><stop offset=".99" stop-color="#BF190B"/><stop offset="1" stop-color="#BF190B"/></linearGradient><path fill="url(#ruby-original-h)" d="M3.802 100.034l8.586-15.659L5.442 65.72z"/><path fill="#fff" d="M4.981 65.131l6.987 19.821 30.365-6.812L77 45.922l9.783-31.075L71.38 3.969l-26.19 9.802c-8.252 7.675-24.263 22.86-24.84 23.146-.573.291-10.575 19.195-15.369 28.214z"/><linearGradient id="ruby-original-i" gradientUnits="userSpaceOnUse" x1="40.026" y1="2418.781" x2="133.345" y2="2514.739" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#BD0012"/><stop offset="0" stop-color="#BD0012"/><stop offset=".07" stop-color="#fff"/><stop offset=".17" stop-color="#fff"/><stop offset=".27" stop-color="#C82F1C"/><stop offset=".33" stop-color="#820C01"/><stop offset=".46" stop-color="#A31601"/><stop offset=".72" stop-color="#B31301"/><stop offset=".99" stop-color="#E82609"/><stop offset="1" stop-color="#E82609"/></linearGradient><path fill="url(#ruby-original-i)" d="M29.519 29.521c17.882-17.73 40.937-28.207 49.785-19.28 8.843 8.926-.534 30.62-18.418 48.345-17.884 17.725-40.653 28.779-49.493 19.852-8.849-8.92.242-31.191 18.126-48.917z"/><linearGradient id="ruby-original-j" gradientUnits="userSpaceOnUse" x1="111.507" y1="2409.102" x2="83.398" y2="2416.039" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#8C0C01"/><stop offset="0" stop-color="#8C0C01"/><stop offset=".54" stop-color="#990C00"/><stop offset=".99" stop-color="#A80D0E"/><stop offset="1" stop-color="#A80D0E"/></linearGradient><path fill="url(#ruby-original-j)" d="M28.717 123.909l13.89-46.012 46.135 14.82c-16.68 15.642-35.233 28.865-60.025 31.192z"/><linearGradient id="ruby-original-k" gradientUnits="userSpaceOnUse" x1="159.785" y1="2442.837" x2="134.814" y2="2465.217" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#7E110B"/><stop offset="0" stop-color="#7E110B"/><stop offset=".99" stop-color="#9E0C00"/><stop offset="1" stop-color="#9E0C00"/></linearGradient><path fill="url(#ruby-original-k)" d="M77.062 45.831l11.844 46.911c13.934-14.65 26.439-30.401 32.563-49.883l-44.407 2.972z"/><linearGradient id="ruby-original-l" gradientUnits="userSpaceOnUse" x1="168.959" y1="2483.901" x2="156.521" y2="2497.199" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#79130D"/><stop offset="0" stop-color="#79130D"/><stop offset=".99" stop-color="#9E120B"/><stop offset="1" stop-color="#9E120B"/></linearGradient><path fill="url(#ruby-original-l)" d="M121.348 43.097c4.74-14.305 5.833-34.825-16.517-38.635l-18.339 10.13 34.856 28.505z"/><path fill="#9E1209" d="M3.802 99.828c.656 23.608 17.689 23.959 24.945 24.167l-16.759-39.14-8.186 14.973z"/><radialGradient id="ruby-original-m" cx="138.703" cy="2464.789" r="30.601" gradientTransform="matrix(1 0 0 -1 -47.5 2517)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#A80D00"/><stop offset="0" stop-color="#A80D00"/><stop offset=".99" stop-color="#7E0E08"/><stop offset="1" stop-color="#7E0E08"/></radialGradient><path fill="url(#ruby-original-m)" d="M77.128 45.904c10.708 6.581 32.286 19.798 32.723 20.041.68.383 9.304-14.542 11.261-22.976l-43.984 2.935z"/><radialGradient id="ruby-original-n" cx="96.325" cy="2424.465" r="40.679" gradientTransform="matrix(1 0 0 -1 -47.5 2517)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#A30C00"/><stop offset="0" stop-color="#A30C00"/><stop offset=".99" stop-color="#800E08"/><stop offset="1" stop-color="#800E08"/></radialGradient><path fill="url(#ruby-original-n)" d="M42.589 77.897l18.57 35.828c10.98-5.955 19.579-13.211 27.454-20.983L42.589 77.897z"/><linearGradient id="ruby-original-o" gradientUnits="userSpaceOnUse" x1="67.509" y1="2393.115" x2="57.373" y2="2427.506" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#8B2114"/><stop offset="0" stop-color="#8B2114"/><stop offset=".43" stop-color="#9E100A"/><stop offset=".99" stop-color="#B3100C"/><stop offset="1" stop-color="#B3100C"/></linearGradient><path fill="url(#ruby-original-o)" d="M11.914 84.904l-2.631 31.331c4.964 6.781 11.794 7.371 18.96 6.842-5.184-12.9-15.538-38.696-16.329-38.173z"/><linearGradient id="ruby-original-p" gradientUnits="userSpaceOnUse" x1="145.272" y1="2507.076" x2="167.996" y2="2497.045" gradientTransform="matrix(1 0 0 -1 -47.5 2517)"><stop offset="0" stop-color="#B31000"/><stop offset="0" stop-color="#B31000"/><stop offset=".44" stop-color="#910F08"/><stop offset=".99" stop-color="#791C12"/><stop offset="1" stop-color="#791C12"/></linearGradient><path fill="url(#ruby-original-p)" d="M86.384 14.67l36.891 5.177c-1.969-8.343-8.015-13.727-18.32-15.41L86.384 14.67z"/></svg>`,languages:[`rb`,`ruby`]},{name:`PHP`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="url(#a)" d="M0 64c0 18.593 28.654 33.667 64 33.667 35.346 0 64-15.074 64-33.667 0-18.593-28.655-33.667-64-33.667C28.654 30.333 0 45.407 0 64Z"/><path fill="#777bb3" d="M64 95.167c33.965 0 61.5-13.955 61.5-31.167 0-17.214-27.535-31.167-61.5-31.167S2.5 46.786 2.5 64c0 17.212 27.535 31.167 61.5 31.167Z"/><path d="M34.772 67.864c2.793 0 4.877-.515 6.196-1.53 1.306-1.006 2.207-2.747 2.68-5.175.44-2.27.272-3.854-.5-4.71-.788-.874-2.493-1.317-5.067-1.317h-4.464l-2.473 12.732zM20.173 83.547a.694.694 0 0 1-.68-.828l6.557-33.738a.695.695 0 0 1 .68-.561h14.134c4.442 0 7.748 1.206 9.827 3.585 2.088 2.39 2.734 5.734 1.917 9.935-.333 1.711-.905 3.3-1.7 4.724a15.818 15.818 0 0 1-3.128 3.92c-1.531 1.432-3.264 2.472-5.147 3.083-1.852.604-4.232.91-7.07.91h-5.724l-1.634 8.408a.695.695 0 0 1-.682.562z"/><path fill="#fff" d="M34.19 55.826h3.891c3.107 0 4.186.682 4.553 1.089.607.674.723 2.097.331 4.112-.439 2.257-1.253 3.858-2.42 4.756-1.194.92-3.138 1.386-5.773 1.386h-2.786l2.205-11.342zm6.674-8.1H26.731a1.39 1.39 0 0 0-1.364 1.123L18.81 82.588a1.39 1.39 0 0 0 1.363 1.653h7.35a1.39 1.39 0 0 0 1.363-1.124l1.525-7.846h5.151c2.912 0 5.364-.318 7.287-.944 1.977-.642 3.796-1.731 5.406-3.237a16.522 16.522 0 0 0 3.259-4.087c.831-1.487 1.429-3.147 1.775-4.931.86-4.423.161-7.964-2.076-10.524-2.216-2.537-5.698-3.823-10.349-3.823zM30.301 68.557h4.471c2.963 0 5.17-.557 6.62-1.675 1.451-1.116 2.428-2.98 2.938-5.591.485-2.508.264-4.277-.665-5.308-.931-1.03-2.791-1.546-5.584-1.546h-5.036l-2.743 14.12m10.563-19.445c4.252 0 7.353 1.117 9.303 3.348 1.95 2.232 2.536 5.347 1.76 9.346-.322 1.648-.863 3.154-1.625 4.518-.764 1.366-1.76 2.614-2.991 3.747-1.468 1.373-3.097 2.352-4.892 2.935-1.794.584-4.08.875-6.857.875h-6.296l-1.743 8.97h-7.35l6.558-33.739h14.133"/><path d="M69.459 74.577a.694.694 0 0 1-.682-.827l2.9-14.928c.277-1.42.209-2.438-.19-2.87-.245-.263-.979-.704-3.15-.704h-5.256l-3.646 18.768a.695.695 0 0 1-.683.56h-7.29a.695.695 0 0 1-.683-.826l6.558-33.739a.695.695 0 0 1 .682-.561h7.29a.695.695 0 0 1 .683.826L64.41 48.42h5.653c4.307 0 7.227.758 8.928 2.321 1.733 1.593 2.275 4.14 1.608 7.573l-3.051 15.702a.695.695 0 0 1-.682.56h-7.407z"/><path fill="#fff" d="M65.31 38.755h-7.291a1.39 1.39 0 0 0-1.364 1.124l-6.557 33.738a1.39 1.39 0 0 0 1.363 1.654h7.291a1.39 1.39 0 0 0 1.364-1.124l3.537-18.205h4.682c2.168 0 2.624.463 2.641.484.132.14.305.795.019 2.264l-2.9 14.927a1.39 1.39 0 0 0 1.364 1.654h7.408a1.39 1.39 0 0 0 1.363-1.124l3.051-15.7c.715-3.686.103-6.45-1.82-8.217-1.836-1.686-4.91-2.505-9.398-2.505h-4.81l1.421-7.315a1.39 1.39 0 0 0-1.364-1.655zm0 1.39-1.743 8.968h6.496c4.087 0 6.907.714 8.457 2.14 1.553 1.426 2.017 3.735 1.398 6.93l-3.052 15.699h-7.407l2.901-14.928c.33-1.698.208-2.856-.365-3.474-.573-.617-1.793-.926-3.658-.926h-5.829l-3.756 19.327H51.46l6.558-33.739h7.292z"/><path d="M92.136 67.864c2.793 0 4.878-.515 6.198-1.53 1.304-1.006 2.206-2.747 2.679-5.175.44-2.27.273-3.854-.5-4.71-.788-.874-2.493-1.317-5.067-1.317h-4.463l-2.475 12.732zM77.54 83.547a.694.694 0 0 1-.682-.828l6.557-33.738a.695.695 0 0 1 .682-.561H98.23c4.442 0 7.748 1.206 9.826 3.585 2.089 2.39 2.734 5.734 1.917 9.935a15.878 15.878 0 0 1-1.699 4.724 15.838 15.838 0 0 1-3.128 3.92c-1.53 1.432-3.265 2.472-5.147 3.083-1.852.604-4.232.91-7.071.91h-5.723l-1.633 8.408a.695.695 0 0 1-.683.562z"/><path fill="#fff" d="M91.555 55.826h3.891c3.107 0 4.186.682 4.552 1.089.61.674.724 2.097.333 4.112-.44 2.257-1.254 3.858-2.421 4.756-1.195.92-3.139 1.386-5.773 1.386h-2.786l2.204-11.342zm6.674-8.1H84.096a1.39 1.39 0 0 0-1.363 1.123l-6.558 33.739a1.39 1.39 0 0 0 1.364 1.653h7.35a1.39 1.39 0 0 0 1.363-1.124l1.525-7.846h5.15c2.911 0 5.364-.318 7.286-.944 1.978-.642 3.797-1.731 5.408-3.238a16.52 16.52 0 0 0 3.258-4.086c.832-1.487 1.428-3.147 1.775-4.931.86-4.423.162-7.964-2.076-10.524-2.216-2.537-5.697-3.823-10.35-3.823zM87.666 68.557h4.47c2.964 0 5.17-.557 6.622-1.675 1.45-1.116 2.428-2.98 2.936-5.591.487-2.508.266-4.277-.665-5.308-.93-1.03-2.791-1.546-5.583-1.546h-5.035Zm10.563-19.445c4.251 0 7.354 1.117 9.303 3.348 1.95 2.232 2.537 5.347 1.759 9.346-.32 1.648-.862 3.154-1.624 4.518-.763 1.366-1.76 2.614-2.992 3.747-1.467 1.373-3.097 2.352-4.892 2.935-1.793.584-4.078.875-6.856.875h-6.295l-1.745 8.97h-7.35l6.558-33.739h14.133"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(84.04136 0 0 84.04136 38.426 42.169)" gradientUnits="userSpaceOnUse"><stop stop-color="#AEB2D5"/><stop offset=".3" stop-color="#AEB2D5"/><stop offset=".75" stop-color="#484C89"/><stop offset="1" stop-color="#484C89"/></radialGradient></defs></svg>
421
-
422
- `,languages:[`php`]},{name:`Dart`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#00c4b3" d="M35.2 34.9l-8.3-8.3v59.7l.1 2.8c0 1.3.2 2.8.7 4.3l65.6 23.1 16.3-7.2-74.4-74.4z"/><path d="M27.7 93.4zm81.9 15.9l-16.3 7.2-65.4-23.1c1.3 4.8 4 10.1 7 13.2l21.3 21.2 47.6.1 5.8-18.6z" fill="#22d3c5"/><path fill="#0075c9" d="M1.7 65.1C-.4 67.3.7 72 4 75.5l14.7 14.8 9.2 3.3c-.3-1.5-.7-3-.7-4.3l-.1-2.8-.2-59.8m82.7 82.6l7.2-16.4-23-65.6c-1.5-.3-3-.6-4.3-.7l-2.9-.1-59.6.1"/><path d="M93.6 27.3c.2 0 .2 0 0 0 .2 0 .2 0 0 0zm16 82l17.7-5.8V54.8l-20.4-20.5c-3-3-8.3-5.8-13.2-7l23.1 65.6" fill="#00a8e1"/><path fill="#00c4b3" d="M90.5 18.2L75.7 3.5c-3.4-3.4-8-4.4-10.4-2.3L26.9 26.6h59.5l2.9.1c1.3 0 2.8.2 4.3.7l-3.1-9.2z"/></svg>`,languages:[`dart`]},{name:`HTML`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#E44D26" d="M19.037 113.876L9.032 1.661h109.936l-10.016 112.198-45.019 12.48z"/><path fill="#F16529" d="M64 116.8l36.378-10.086 8.559-95.878H64z"/><path fill="#EBEBEB" d="M64 52.455H45.788L44.53 38.361H64V24.599H29.489l.33 3.692 3.382 37.927H64zm0 35.743l-.061.017-15.327-4.14-.979-10.975H33.816l1.928 21.609 28.193 7.826.063-.017z"/><path fill="#fff" d="M63.952 52.455v13.763h16.947l-1.597 17.849-15.35 4.143v14.319l28.215-7.82.207-2.325 3.234-36.233.335-3.696h-3.708zm0-27.856v13.762h33.244l.276-3.092.628-6.978.329-3.692z"/></svg>`,languages:[`html`,`html5`]},{name:`CSS`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#1572B6" d="M18.814 114.123L8.76 1.352h110.48l-10.064 112.754-45.243 12.543-45.119-12.526z"/><path fill="#33A9DC" d="M64.001 117.062l36.559-10.136 8.601-96.354h-45.16v106.49z"/><path fill="#fff" d="M64.001 51.429h18.302l1.264-14.163H64.001V23.435h34.682l-.332 3.711-3.4 38.114h-30.95V51.429z"/><path fill="#EBEBEB" d="M64.083 87.349l-.061.018-15.403-4.159-.985-11.031H33.752l1.937 21.717 28.331 7.863.063-.018v-14.39z"/><path fill="#fff" d="M81.127 64.675l-1.666 18.522-15.426 4.164v14.39l28.354-7.858.208-2.337 2.406-26.881H81.127z"/><path fill="#EBEBEB" d="M64.048 23.435v13.831H30.64l-.277-3.108-.63-7.012-.331-3.711h34.646zm-.047 27.996v13.831H48.792l-.277-3.108-.631-7.012-.33-3.711h16.447z"/></svg>`,languages:[`css`,`css3`]},{name:`Sass`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" clip-rule="evenodd" fill="#CB6699" d="M1.219 56.156c0 .703.207 1.167.323 1.618.756 2.933 2.381 5.45 4.309 7.746 2.746 3.272 6.109 5.906 9.554 8.383 2.988 2.148 6.037 4.248 9.037 6.38.515.366 1.002.787 1.561 1.236-.481.26-.881.489-1.297.7-3.959 2.008-7.768 4.259-11.279 6.986-2.116 1.644-4.162 3.391-5.607 5.674-2.325 3.672-3.148 7.584-1.415 11.761.506 1.22 1.278 2.274 2.367 3.053.353.252.749.502 1.162.6 1.058.249 2.136.412 3.207.609l3.033-.002c3.354-.299 6.407-1.448 9.166-3.352 4.312-2.976 7.217-6.966 8.466-12.087.908-3.722.945-7.448-.125-11.153a11.696 11.696 0 00-.354-1.014c-.13-.333-.283-.657-.463-1.072l6.876-3.954.103.088c-.125.409-.258.817-.371 1.23-.817 2.984-1.36 6.02-1.165 9.117.208 3.3 1.129 6.389 3.061 9.146 1.562 2.23 5.284 2.313 6.944.075.589-.795 1.16-1.626 1.589-2.513 1.121-2.315 2.159-4.671 3.23-7.011l.187-.428c-.077 1.108-.167 2.081-.208 3.055-.064 1.521.025 3.033.545 4.48.445 1.238 1.202 2.163 2.62 2.326.97.111 1.743-.333 2.456-.896a10.384 10.384 0 002.691-3.199c1.901-3.491 3.853-6.961 5.576-10.54 1.864-3.871 3.494-7.855 5.225-11.792l.286-.698c.409 1.607.694 3.181 1.219 4.671.61 1.729 1.365 3.417 2.187 5.058.389.775.344 1.278-.195 1.928-2.256 2.72-4.473 5.473-6.692 8.223-.491.607-.98 1.225-1.389 1.888a3.701 3.701 0 00-.48 1.364 1.737 1.737 0 001.383 1.971 9.661 9.661 0 002.708.193c3.097-.228 5.909-1.315 8.395-3.157 3.221-2.386 4.255-5.642 3.475-9.501-.211-1.047-.584-2.065-.947-3.074-.163-.455-.174-.774.123-1.198 2.575-3.677 4.775-7.578 6.821-11.569.081-.157.164-.314.306-.482.663 3.45 1.661 6.775 3.449 9.792-.912.879-1.815 1.676-2.632 2.554-1.799 1.934-3.359 4.034-4.173 6.595-.35 1.104-.619 2.226-.463 3.405.242 1.831 1.742 3.021 3.543 2.604 3.854-.892 7.181-2.708 9.612-5.925 1.636-2.166 1.785-4.582 1.1-7.113-.188-.688-.411-1.365-.651-2.154.951-.295 1.878-.649 2.837-.868 4.979-1.136 9.904-.938 14.702.86 2.801 1.05 5.064 2.807 6.406 5.571 1.639 3.379.733 6.585-2.452 8.721-.297.199-.637.356-.883.605a.869.869 0 00-.205.67c.021.123.346.277.533.275 1.047-.008 1.896-.557 2.711-1.121 2.042-1.413 3.532-3.314 3.853-5.817l.063-.188-.077-1.63c-.031-.094.023-.187.016-.258-.434-3.645-2.381-6.472-5.213-8.688-3.28-2.565-7.153-3.621-11.249-3.788a25.401 25.401 0 00-9.765 1.503c-.897.325-1.786.71-2.688 1.073-.121-.219-.251-.429-.358-.646-.926-1.896-2.048-3.708-2.296-5.882-.176-1.544-.392-3.086-.025-4.613.353-1.469.813-2.913 1.246-4.362.223-.746.066-1.164-.646-1.5a2.854 2.854 0 00-.786-.258c-1.75-.254-3.476-.109-5.171.384-.6.175-1.036.511-1.169 1.175-.076.381-.231.746-.339 1.122-.443 1.563-.757 3.156-1.473 4.645-1.794 3.735-3.842 7.329-5.938 10.897-.227.385-.466.763-.752 1.23-.736-1.54-1.521-2.922-1.759-4.542-.269-1.832-.481-3.661-.025-5.479.339-1.356.782-2.687 1.19-4.025.193-.636.104-.97-.472-1.305-.291-.169-.62-.319-.948-.368a11.643 11.643 0 00-5.354.438c-.543.176-.828.527-.994 1.087-.488 1.652-.904 3.344-1.589 4.915-2.774 6.36-5.628 12.687-8.479 19.013-.595 1.321-1.292 2.596-1.963 3.882-.17.326-.418.613-.63.919-.17-.201-.236-.339-.235-.477.005-.813-.092-1.65.063-2.436a172.189 172.189 0 011.578-7.099c.47-1.946 1.017-3.874 1.538-5.807.175-.647.178-1.252-.287-1.796-.781-.911-2.413-1.111-3.381-.409l-.428.242.083-.69c.204-1.479.245-2.953-.161-4.41-.506-1.816-1.802-2.861-3.686-2.803-.878.027-1.8.177-2.613.497-3.419 1.34-6.048 3.713-8.286 6.568a2.592 2.592 0 01-.757.654c-2.893 1.604-5.795 3.188-8.696 4.778l-3.229 1.769c-.866-.826-1.653-1.683-2.546-2.41-2.727-2.224-5.498-4.393-8.244-6.592-2.434-1.949-4.792-3.979-6.596-6.56-1.342-1.92-2.207-4.021-2.29-6.395-.105-3.025.753-5.789 2.293-8.362 1.97-3.292 4.657-5.934 7.611-8.327 3.125-2.53 6.505-4.678 10.008-6.639 4.901-2.743 9.942-5.171 15.347-6.774 5.542-1.644 11.165-2.585 16.965-1.929 2.28.258 4.494.78 6.527 1.895 1.557.853 2.834 1.97 3.428 3.716.586 1.718.568 3.459.162 5.204-.825 3.534-2.76 6.447-5.195 9.05-3.994 4.267-8.866 7.172-14.351 9.091a39.478 39.478 0 01-9.765 2.083c-2.729.229-5.401-.013-7.985-.962-1.711-.629-3.201-1.591-4.399-2.987-.214-.25-.488-.521-.887-.287-.391.23-.46.602-.329.979.219.626.421 1.278.762 1.838.857 1.405 2.107 2.424 3.483 3.298 2.643 1.681 5.597 2.246 8.66 2.377 4.648.201 9.183-.493 13.654-1.74 6.383-1.78 11.933-4.924 16.384-9.884 3.706-4.13 6.353-8.791 6.92-14.419.277-2.747-.018-5.438-1.304-7.944-1.395-2.715-3.613-4.734-6.265-6.125C68.756 18.179 64.588 17 60.286 17h-4.31c-5.21 0-10.247 1.493-15.143 3.274-3.706 1.349-7.34 2.941-10.868 4.703-7.683 3.839-14.838 8.468-20.715 14.833-2.928 3.171-5.407 6.67-6.833 10.79a40.494 40.494 0 00-1.111 3.746m27.839 36.013c-.333 4.459-2.354 8.074-5.657 11.002-1.858 1.646-3.989 2.818-6.471 3.23-.9.149-1.821.185-2.694-.188-1.245-.532-1.524-1.637-1.548-2.814-.037-1.876.62-3.572 1.521-5.186 1.176-2.104 2.9-3.708 4.741-5.206 2.9-2.361 6.046-4.359 9.268-6.245l.243-.1c.498 1.84.735 3.657.597 5.507zM54.303 70.98c-.235 1.424-.529 2.849-.945 4.229-1.438 4.777-3.285 9.406-5.282 13.973-.369.845-.906 1.616-1.373 2.417a1.689 1.689 0 01-.283.334c-.578.571-1.126.541-1.418-.206-.34-.868-.549-1.797-.729-2.716-.121-.617-.092-1.265-.13-1.897.039-4.494 1.41-8.578 3.736-12.38.959-1.568 2.003-3.062 3.598-4.054a6.27 6.27 0 011.595-.706c.85-.239 1.372.154 1.231 1.006zm17.164 21.868l6.169-7.203c.257 2.675-4.29 8.015-6.169 7.203zm19.703-4.847c-.436.25-.911.43-1.358.661-.409.212-.544-.002-.556-.354a2.385 2.385 0 01.093-.721c.833-2.938 2.366-5.446 4.647-7.486l.16-.082c1.085 3.035-.169 6.368-2.986 7.982z"/></svg>`,languages:[`sass`,`scss`]},{name:`Bash`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#293138" d="M112.205 26.129 71.8 2.142A15.326 15.326 0 0 0 64.005 0c-2.688 0-5.386.717-7.796 2.152L15.795 26.14C10.976 28.999 8 34.289 8 40.018v47.975c0 5.729 2.967 11.019 7.796 13.878L56.2 125.858A15.193 15.193 0 0 0 63.995 128a15.32 15.32 0 0 0 7.796-2.142l40.414-23.987c4.819-2.86 7.796-8.16 7.796-13.878V40.007c0-5.718-2.967-11.019-7.796-13.878zm-31.29 74.907.063 3.448c0 .418-.267.889-.588 1.06l-2.046 1.178c-.321.16-.6-.032-.6-.45l-.032-3.394c-1.745.728-3.523.9-4.647.45-.214-.086-.31-.397-.225-.76l.739-3.117c.064-.246.193-.493.364-.643a.726.726 0 0 1 .193-.139c.117-.064.235-.075.332-.032 1.22.407 2.773.214 4.272-.535 1.907-.964 3.18-2.913 3.16-4.84-.022-1.757-.964-2.474-3.267-2.496-2.934.01-5.675-.567-5.718-4.894-.032-3.555 1.81-7.26 4.744-9.595l-.032-3.48c0-.428.257-.9.589-1.07l1.98-1.264c.322-.161.6.042.6.46l.033 3.48c1.456-.578 2.72-.738 3.865-.47.247.063.364.406.257.802l-.77 3.084a1.372 1.372 0 0 1-.354.622.825.825 0 0 1-.203.15c-.108.053-.204.064-.3.053-.525-.118-1.767-.385-3.727.6-2.056 1.038-2.773 2.827-2.763 4.155.022 1.585.825 2.066 3.63 2.11 3.738.063 5.344 1.691 5.387 5.45.053 3.684-1.917 7.657-4.937 10.077zm28.206-64.787L70.89 59.86c-4.765 2.784-8.278 5.911-8.288 11.662v47.107c0 3.437 1.392 5.665 3.523 6.318a12.81 12.81 0 0 1-2.12.204c-2.239 0-4.445-.61-6.383-1.757L17.219 99.408c-3.951-2.345-6.403-6.725-6.403-11.426V40.007c0-4.7 2.452-9.08 6.403-11.426L57.634 4.594a12.555 12.555 0 0 1 6.382-1.756c2.238 0 4.444.61 6.382 1.756l40.415 23.987c3.33 1.981 5.579 5.397 6.21 9.242-1.36-2.86-4.38-3.63-7.902-1.574z"/><path fill="#4fa847" d="m101.614 92.619-10.066 6.018c-.268.16-.46.332-.46.653v2.635c0 .32.214.46.481.3l10.216-6.212c.268-.16.31-.45.31-.77v-2.324c0-.322-.213-.45-.481-.3z"/></svg>
423
- `,languages:[`bash`,`sh`,`shell`,`shellscript`]},{name:`PowerShell`,svg:`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 128 128"><linearGradient id="a" x1="96.306" x2="25.454" y1="35.144" y2="98.431" gradientTransform="matrix(1 0 0 -1 0 128)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a9c8ff"/><stop offset="1" stop-color="#c7e6ff"/></linearGradient><path fill="url(#a)" fill-rule="evenodd" d="M7.2 110.5c-1.7 0-3.1-.7-4.1-1.9-1-1.2-1.3-2.9-.9-4.6l18.6-80.5c.8-3.4 4-6 7.4-6h92.6c1.7 0 3.1.7 4.1 1.9 1 1.2 1.3 2.9.9 4.6l-18.6 80.5c-.8 3.4-4 6-7.4 6H7.2z" clip-rule="evenodd" opacity=".8"/><linearGradient id="b" x1="25.336" x2="94.569" y1="98.33" y2="36.847" gradientTransform="matrix(1 0 0 -1 0 128)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2d4664"/><stop offset=".169" stop-color="#29405b"/><stop offset=".445" stop-color="#1e2f43"/><stop offset=".79" stop-color="#0c131b"/><stop offset="1"/></linearGradient><path fill="url(#b)" fill-rule="evenodd" d="M120.3 18.5H28.5c-2.9 0-5.7 2.3-6.4 5.2L3.7 104.3c-.7 2.9 1.1 5.2 4 5.2h91.8c2.9 0 5.7-2.3 6.4-5.2l18.4-80.5c.7-2.9-1.1-5.3-4-5.3z" clip-rule="evenodd"/><path fill="#2C5591" fill-rule="evenodd" d="M64.2 88.3h22.3c2.6 0 4.7 2.2 4.7 4.9s-2.1 4.9-4.7 4.9H64.2c-2.6 0-4.7-2.2-4.7-4.9s2.1-4.9 4.7-4.9zM78.7 66.5c-.4.8-1.2 1.6-2.6 2.6L34.6 98.9c-2.3 1.6-5.5 1-7.3-1.4-1.7-2.4-1.3-5.7.9-7.3l37.4-27.1v-.6l-23.5-25c-1.9-2-1.7-5.3.4-7.4 2.2-2 5.5-2 7.4 0l28.2 30c1.7 1.9 1.8 4.5.6 6.4z" clip-rule="evenodd"/><path fill="#FFF" fill-rule="evenodd" d="M77.6 65.5c-.4.8-1.2 1.6-2.6 2.6L33.6 97.9c-2.3 1.6-5.5 1-7.3-1.4-1.7-2.4-1.3-5.7.9-7.3l37.4-27.1v-.6l-23.5-25c-1.9-2-1.7-5.3.4-7.4 2.2-2 5.5-2 7.4 0l28.2 30c1.7 1.8 1.8 4.4.5 6.4zM63.5 87.8h22.3c2.6 0 4.7 2.1 4.7 4.6 0 2.6-2.1 4.6-4.7 4.6H63.5c-2.6 0-4.7-2.1-4.7-4.6 0-2.6 2.1-4.6 4.7-4.6z" clip-rule="evenodd"/></svg>
424
- `,languages:[`ps`,`ps1`,`powershell`]},{name:`JSON`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="a" x1="-670.564" x2="-583.105" y1="-280.831" y2="-368.306" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#a)" fill-rule="evenodd" d="M63.895 94.303c27.433 37.398 54.281-10.438 54.241-39.205-.046-34.012-34.518-53.021-54.263-53.021C32.182 2.077 2 28.269 2 64.105 2 103.937 36.596 126 63.873 126c-6.172-.889-26.742-5.296-27.019-52.674-.186-32.044 10.453-44.846 26.974-39.214.37.137 18.223 7.18 18.223 30.187 0 22.908-18.156 30.004-18.156 30.004z" clip-rule="evenodd"/><linearGradient id="b" x1="-579.148" x2="-666.607" y1="-364.34" y2="-276.873" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#b)" fill-rule="evenodd" d="M63.863 34.086C45.736 27.838 23.53 42.778 23.53 72.703 23.53 121.565 59.739 126 64.128 126 95.818 126 126 99.808 126 63.972 126 24.14 91.404 2.077 64.127 2.077c7.555-1.046 40.719 8.176 40.719 53.504 0 29.559-24.764 45.651-40.87 38.776-.37-.137-18.223-7.18-18.223-30.187 0-22.91 18.11-30.085 18.11-30.084z" clip-rule="evenodd"/></svg>
425
- `,languages:[`json`,`jsonc`,`json5`],monochrome:!0},{name:`YAML`,svg:`<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
426
- <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="87.702 137.67 0 0 63.25 0 119.02 88.646 175.24 0 235.79 0 143.98 137.67 143.98 224.95 87.702 224.95"/>
427
- <path d="m82.428 49.149h-25.266l-5.1388 12.408h-11.188l23.659-55.798h11.444l22.699 55.798h-11.956l-4.2525-12.408zm-4.197-11.14-7.7455-20.476-8.6412 20.476z" fill="#cb171e"/>
428
- <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="87.701 250.18 87.701 470.65 135 470.65 135 318.57 184.51 420.79 221.74 420.79 272.94 314.98 272.94 470.6 318.32 470.6 318.32 250.18 256.36 250.18 201.38 349.88 149.02 250.18"/>
429
- <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="512 422.74 512 422.74 395.64 422.74 395.64 250.12 347.44 250.12 347.44 469.65 512 469.65"/>
430
- </svg>`,languages:[`yaml`,`yml`]},{name:`Markdown`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" d="M11.95 24.348c-5.836 0-10.618 4.867-10.618 10.681v57.942c0 5.814 4.782 10.681 10.617 10.681h104.102c5.835 0 10.617-4.867 10.617-10.681V35.03c0-5.814-4.783-10.681-10.617-10.681H14.898l-.002-.002H11.95zm-.007 9.543h104.108c.625 0 1.076.423 1.076 1.14v57.94c0 .717-.453 1.14-1.076 1.14H11.949c-.623 0-1.076-.423-1.076-1.14V35.029c0-.715.451-1.135 1.07-1.138z" color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/><path d="M20.721 84.1V43.9H32.42l11.697 14.78L55.81 43.9h11.696v40.2H55.81V61.044l-11.694 14.78-11.698-14.78V84.1H20.722zm73.104 0L76.28 64.591h11.697V43.9h11.698v20.69h11.698zm0 0"/></svg>
431
- `,languages:[`md`,`markdown`],monochrome:!0},{name:`Lua`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#000080" d="M112.956.708c-7.912 0-14.335 6.424-14.335 14.336s6.424 14.335 14.335 14.335 14.335-6.41 14.335-14.335c0-7.912-6.424-14.336-14.335-14.336zM64 15.058c-27.02 0-48.956 21.935-48.956 48.955S36.979 112.97 64 112.97c27.02 0 48.956-21.935 48.956-48.956 0-27.02-21.936-48.956-48.956-48.956z"/><path fill="#fff" d="M84.285 29.392c-7.91 0-14.335 6.424-14.335 14.335s6.424 14.336 14.335 14.336 14.336-6.424 14.336-14.336-6.424-14.335-14.335-14.335zM30.773 56.36v32.119h19.961v-3.611H34.87V56.359Zm57.584 8.37c-3.354 0-6.126.975-7.668 2.692-1.055 1.19-1.488 2.516-1.582 4.801h3.705c.311-2.826 1.988-4.098 5.423-4.098 3.3 0 5.153 1.231 5.153 3.435v.974c0 1.542-.92 2.205-3.827 2.556-5.193.663-5.991.839-7.398 1.407-2.69 1.095-4.057 3.164-4.057 6.166 0 4.193 2.908 6.83 7.574 6.83 2.907 0 5.247-1.014 7.843-3.395.257 2.34 1.407 3.395 3.787 3.395.757 0 1.325-.081 2.515-.392v-2.773a2.917 2.917 0 0 1-.798.095c-1.284 0-1.988-.663-1.988-1.812V71.032c0-4.098-3.002-6.302-8.682-6.302zm-33.742.664V83.19c0 3.84 2.867 6.302 7.357 6.302 3.395 0 5.545-1.19 7.709-4.233v3.219h3.3V65.393h-3.652v13.09c0 4.72-2.475 7.804-6.302 7.804-2.907 0-4.76-1.772-4.76-4.544v-16.35Zm38.773 11.67v4.139c0 1.244-.365 1.988-1.46 3.002-1.502 1.366-3.3 2.07-5.464 2.07-2.867 0-4.544-1.367-4.544-3.706 0-2.42 1.636-3.665 5.558-4.233 3.881-.528 4.68-.703 5.91-1.271z"/><path fill="#808080" d="M61.733 0a64.06 64.06 0 0 0-5.57.436l.179 1.458a62.596 62.596 0 0 1 5.442-.426zm5.585.046-.075 1.468a62.432 62.432 0 0 1 5.433.52L72.88.578a63.91 63.91 0 0 0-5.561-.532Zm-16.665 1.31a63.301 63.301 0 0 0-5.409 1.398l.43 1.405a61.835 61.835 0 0 1 5.284-1.367Zm27.72.237-.33 1.431a62.536 62.536 0 0 1 5.262 1.455l.452-1.397a63.998 63.998 0 0 0-5.384-1.489ZM39.98 4.623a63.447 63.447 0 0 0-5.081 2.323l.668 1.308a61.98 61.98 0 0 1 4.964-2.27zm49.012.41-.573 1.353a62.539 62.539 0 0 1 4.929 2.346l.688-1.298a64.012 64.012 0 0 0-5.044-2.4ZM30.04 9.706a63.95 63.95 0 0 0-4.6 3.17l.886 1.173a62.484 62.484 0 0 1 4.494-3.098zm-8.906 6.728a64.247 64.247 0 0 0-3.983 3.918l1.075 1.001a62.774 62.774 0 0 1 3.891-3.827zm-7.61 8.165a64.04 64.04 0 0 0-3.247 4.546l1.231.8a62.571 62.571 0 0 1 3.172-4.44zm-6.086 9.357a63.459 63.459 0 0 0-2.408 5.042l1.352.574a61.99 61.99 0 0 1 2.352-4.925zm113.623.973-1.31.667a62.616 62.616 0 0 1 2.263 4.967l1.362-.55a64.073 64.073 0 0 0-2.315-5.083zM3.075 44.23a63.382 63.382 0 0 0-1.49 5.385l1.432.328a61.91 61.91 0 0 1 1.455-5.26Zm122.166 1.049-1.404.429a62.513 62.513 0 0 1 1.366 5.285l1.437-.306a63.983 63.983 0 0 0-1.399-5.409zM.574 55.108a64.093 64.093 0 0 0-.528 5.561l1.467.075a62.622 62.622 0 0 1 .516-5.434Zm126.988 1.088-1.458.179a62.465 62.465 0 0 1 .428 5.441l1.468-.05a63.916 63.916 0 0 0-.438-5.57zM1.468 66.205 0 66.255a64.082 64.082 0 0 0 .435 5.57l1.458-.179a62.61 62.61 0 0 1-.425-5.441Zm125.018 1.071a62.63 62.63 0 0 1-.518 5.434l1.455.203a64.16 64.16 0 0 0 .53-5.561zM2.79 77.031l-1.437.304a63.332 63.332 0 0 0 1.398 5.41l1.405-.43A61.864 61.864 0 0 1 2.79 77.03Zm122.188 1.046a61.966 61.966 0 0 1-1.457 5.26l1.397.454a63.43 63.43 0 0 0 1.492-5.384zM5.981 87.459l-1.362.551a63.434 63.434 0 0 0 2.323 5.082l1.307-.669a61.968 61.968 0 0 1-2.268-4.964Zm115.627.99a61.98 61.98 0 0 1-2.354 4.925l1.296.69a63.447 63.447 0 0 0 2.41-5.04zM10.944 97.17l-1.245.78a63.949 63.949 0 0 0 3.17 4.6l1.172-.885a62.481 62.481 0 0 1-3.097-4.495zm105.534.904a62.546 62.546 0 0 1-3.173 4.44l1.156.906a64.024 64.024 0 0 0 3.249-4.545zm-98.96 7.8-1.092.983a64.235 64.235 0 0 0 3.917 3.983l1.002-1.074a62.77 62.77 0 0 1-3.827-3.892zm92.24.79a62.76 62.76 0 0 1-3.893 3.826l.983 1.092a64.221 64.221 0 0 0 3.984-3.916zm-84.263 6.648-.906 1.157a64.026 64.026 0 0 0 4.546 3.248l.8-1.232a62.554 62.554 0 0 1-4.44-3.173zm76.16.654a62.475 62.475 0 0 1-4.495 3.096l.78 1.245a63.945 63.945 0 0 0 4.6-3.17zm-67.018 5.294-.691 1.296a63.45 63.45 0 0 0 5.04 2.409l.575-1.352a61.984 61.984 0 0 1-4.924-2.353zm57.775.496a61.956 61.956 0 0 1-4.964 2.268l.551 1.362a63.425 63.425 0 0 0 5.082-2.322zm-47.74 3.77-.453 1.396a63.419 63.419 0 0 0 5.385 1.49l.329-1.43a61.949 61.949 0 0 1-5.26-1.456zm37.632.322a62.05 62.05 0 0 1-5.284 1.365l.304 1.437a63.361 63.361 0 0 0 5.41-1.398zm-27.003 2.122-.203 1.455a64.093 64.093 0 0 0 5.561.529l.075-1.467a62.605 62.605 0 0 1-5.433-.517zm16.335.139a62.635 62.635 0 0 1-5.442.424l.05 1.468a64.114 64.114 0 0 0 5.57-.434z"/></svg>
432
- `,languages:[`lua`]},{name:`R`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><defs><linearGradient id="a" x1=".741" x2="590.86" y1="3.666" y2="593.79" gradientTransform="matrix(.2169 0 0 .14527 -.16 14.112)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#cbced0"/><stop offset="1" stop-color="#84838b"/></linearGradient><linearGradient id="b" x1="301.03" x2="703.07" y1="151.4" y2="553.44" gradientTransform="matrix(.17572 0 0 .17931 -.16 14.112)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#276dc3"/><stop offset="1" stop-color="#165caa"/></linearGradient></defs><path fill="url(#a)" fill-rule="evenodd" d="M64 100.38c-35.346 0-64-19.19-64-42.863 0-23.672 28.654-42.863 64-42.863s64 19.19 64 42.863c0 23.672-28.654 42.863-64 42.863zm9.796-68.967c-26.866 0-48.646 13.119-48.646 29.303 0 16.183 21.78 29.303 48.646 29.303s46.693-8.97 46.693-29.303c0-20.327-19.827-29.303-46.693-29.303z"/><path fill="url(#b)" fill-rule="evenodd" d="M97.469 81.033s3.874 1.169 6.124 2.308c.78.395 2.132 1.183 3.106 2.219a8.388 8.388 0 0 1 1.42 2.04l15.266 25.74-24.674.01-11.537-21.666s-2.363-4.06-3.817-5.237c-1.213-.982-1.73-1.331-2.929-1.331h-5.862l.004 28.219-21.833.009V41.26h43.844s19.97.36 19.97 19.359c0 18.999-19.082 20.413-19.082 20.413zm-9.497-24.137-13.218-.009-.006 12.258 13.224-.005s6.124-.019 6.124-6.235c0-6.34-6.124-6.009-6.124-6.009z"/></svg>
433
- `,languages:[`r`]},{name:`Scala`,svg:`<svg version="1.0" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"><path d="M25 110.437V94.874h5.616c3.113 0 8.052-.203 11.03-.474l5.278-.406-7.038-1.894c-3.924-1.015-8.864-2.504-10.961-3.316L25 87.364V55.627h6.293c3.383 0 8.323-.203 10.894-.473l4.737-.406-8.323-2.233C34 51.366 29.128 49.809 27.639 49.2L25 47.982v-30.72l2.098-.473c1.15-.203 3.992-.406 6.293-.406 11.367 0 38.366-3.722 51.628-7.105 9.27-2.436 15.698-4.872 17.931-6.902 1.15-1.015 1.218-.406 1.218 14.548v15.63l-1.624 1.219-1.624 1.285 3.248 2.842v33.9l-1.624 1.218-1.624 1.286 3.248 2.842v33.9l-1.76 1.353c-1.894 1.489-9.202 3.993-17.524 6.09C71.892 121.737 40.157 126 29.33 126H25z" fill="#390d09"/><g fill="#de3423"><path d="M25 110.572V95.077l11.842-.474c12.315-.473 21.45-1.488 34.847-3.789 15.225-2.639 30.246-7.375 31.803-10.082.406-.677.676 4.534.676 14.616v15.698l-1.76 1.353c-1.894 1.489-9.202 3.993-17.524 6.09C71.892 121.737 40.157 126 29.33 126H25zM25 71.327V55.83l11.842-.406c13.127-.541 23.344-1.691 36.877-4.195 15.157-2.842 28.96-7.443 29.976-9.947.203-.473.406 6.09.406 14.616.067 13.533-.068 15.698-1.083 16.78-2.368 2.64-20.638 7.376-39.449 10.286-11.435 1.76-30.381 3.79-35.66 3.79H25zM25 32.352V17.195l2.098-.406c1.15-.203 3.992-.406 6.293-.406 11.367 0 38.366-3.722 51.628-7.105 9.27-2.436 15.698-4.872 17.931-6.902 1.15-1.015 1.218-.406 1.218 14.48 0 14.548-.067 15.63-1.285 16.714-1.827 1.691-14.345 5.548-24.09 7.51-15.765 3.113-41.951 6.429-50.883 6.429H25z"/></g></svg>`,languages:[`scala`]},{name:`Elixir`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="elixir-original-a" gradientUnits="userSpaceOnUse" x1="835.592" y1="-36.546" x2="821.211" y2="553.414" gradientTransform="matrix(.1297 0 0 .2 -46.03 17.198)"><stop offset="0" stop-color="#d9d8dc"/><stop offset="1" stop-color="#fff" stop-opacity=".385"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#elixir-original-a)" d="M64.4.5C36.7 13.9 1.9 83.4 30.9 113.9c26.8 33.5 85.4 1.3 68.4-40.5-21.5-36-35-37.9-34.9-72.9z"/><linearGradient id="elixir-original-b" gradientUnits="userSpaceOnUse" x1="942.357" y1="-40.593" x2="824.692" y2="472.243" gradientTransform="matrix(.1142 0 0 .2271 -47.053 17.229)"><stop offset="0" stop-color="#8d67af" stop-opacity=".672"/><stop offset="1" stop-color="#9f8daf"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#elixir-original-b)" d="M64.4.2C36.8 13.6 1.9 82.9 31 113.5c10.7 12.4 28 16.5 37.7 9.1 26.4-18.8 7.4-53.1 10.4-78.5C68.1 33.9 64.2 11.3 64.4.2z"/><linearGradient id="elixir-original-c" gradientUnits="userSpaceOnUse" x1="924.646" y1="120.513" x2="924.646" y2="505.851" gradientTransform="matrix(.1227 0 0 .2115 -46.493 17.206)"><stop offset="0" stop-color="#26053d" stop-opacity=".762"/><stop offset="1" stop-color="#b7b4b4" stop-opacity=".278"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#elixir-original-c)" d="M56.7 4.3c-22.3 15.9-28.2 75-24.1 94.2 8.2 48.1 75.2 28.3 69.6-16.5-6-29.2-48.8-39.2-45.5-77.7z"/><linearGradient id="elixir-original-d" gradientUnits="userSpaceOnUse" x1="428.034" y1="198.448" x2="607.325" y2="559.255" gradientTransform="matrix(.1848 0 0 .1404 -42.394 17.138)"><stop offset="0" stop-color="#91739f" stop-opacity=".46"/><stop offset="1" stop-color="#32054f" stop-opacity=".54"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#elixir-original-d)" d="M78.8 49.8c10.4 13.4 12.7 22.6 6.8 27.9-27.7 19.4-61.3 7.4-54-37.3C22.1 63 4.5 96.8 43.3 101.6c20.8 3.6 54 2 58.9-16.1-.2-15.9-10.8-22.9-23.4-35.7z"/><linearGradient id="elixir-original-e" gradientUnits="userSpaceOnUse" x1="907.895" y1="540.636" x2="590.242" y2="201.281" gradientTransform="matrix(.1418 0 0 .1829 -45.23 17.18)"><stop offset="0" stop-color="#463d49" stop-opacity=".331"/><stop offset="1" stop-color="#340a50" stop-opacity=".821"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#elixir-original-e)" d="M38.1 36.4c-2.9 21.2 35.1 77.9 58.3 71-17.7 35.6-56.9-21.2-64-41.7 1.5-11 2.2-16.4 5.7-29.3z"/><linearGradient id="elixir-original-f" gradientUnits="userSpaceOnUse" x1="1102.297" y1="100.542" x2="1008.071" y2="431.648" gradientTransform="matrix(.106 0 0 .2448 -47.595 17.242)"><stop offset="0" stop-color="#715383" stop-opacity=".145"/><stop offset="1" stop-color="#f4f4f4" stop-opacity=".234"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#elixir-original-f)" d="M60.4 49.7c.8 7.9 3.9 20.5 0 28.8S38.7 102 43.6 115.3c11.4 24.8 37.1-4.4 36.9-19 1.1-11.8-6.6-38.7-1.8-52.5L76.5 41l-13.6-4c-2.2 3.2-3 7.5-2.5 12.7z"/><linearGradient id="elixir-original-g" gradientUnits="userSpaceOnUse" x1="1354.664" y1="140.06" x2="1059.233" y2="84.466" gradientTransform="matrix(.09173 0 0 .2828 -48.536 17.28)"><stop offset="0" stop-color="#a5a1a8" stop-opacity=".356"/><stop offset="1" stop-color="#370c50" stop-opacity=".582"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#elixir-original-g)" d="M65.3 10.8C36 27.4 48 53.4 49.3 81.6l19.1-55.4c-1.4-5.7-2.3-9.5-3.1-15.4z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#330A4C" fill-opacity=".316" d="M68.3 26.1c-14.8 11.7-14.1 31.3-18.6 54 8.1-21.3 4.1-38.2 18.6-54z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" d="M45.8 119.7c8 1.1 12.1 2.2 12.5 3 .3 4.2-11.1 1.2-12.5-3z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#EDEDED" fill-opacity=".603" d="M49.8 10.8c-6.9 7.7-14.4 21.8-18.2 29.7-1 6.5-.5 15.7.6 23.5.9-18.2 7.5-39.2 17.6-53.2z"/></svg>`,languages:[`elixir`,`ex`]},{name:`Haskell`,svg:`<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"><path fill="#463B63" d="M0 110.2L30.1 65 0 19.9h22.6L52.7 65l-30.1 45.1H0z"/><path fill="#5E5187" d="M30.1 110.2L60.2 65 30.1 19.9h22.6l60.2 90.3H90.4L71.5 81.9l-18.8 28.2H30.1z"/><path fill="#904F8C" d="M102.9 83.8l-10-15.1H128v15.1h-25.1zM87.8 61.3l-10-15.1H128v15.1H87.8z"/></svg>`,languages:[`haskell`,`hs`]},{name:`Perl`,svg:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128"><path d="M121.172 62.878c0-34.048-26.473-61.648-59.135-61.648C29.379 1.23 2.9 28.83 2.9 62.878s26.478 61.651 59.136 61.651c32.662 0 59.135-27.603 59.135-61.651z" fill="#fff"/><path d="M53.34 127.516c-13.91-2.461-25.842-8.812-35.703-19.006C9.25 99.842 3.477 88.928.853 76.763c-1.137-5.256-1.137-20.287 0-25.54C2.629 43 6.075 34.835 10.776 27.714 13.89 23 23.004 13.888 27.716 10.773c7.123-4.7 15.293-8.15 23.514-9.921 5.253-1.137 20.286-1.137 25.543 0C89.58 3.617 100.225 9.4 109.41 18.585c9.187 9.186 14.97 19.828 17.739 32.639 1.133 5.252 1.133 20.283 0 25.54-2.769 12.806-8.552 23.448-17.739 32.634-9.038 9.041-19.55 14.812-32.147 17.65-4.467 1.009-19.238 1.297-23.923.468zm11.567-12.772c0-4.194-.062-4.497-.907-4.497-.838 0-.904.288-.869 3.897.043 4.264.343 5.572 1.211 5.284.401-.132.565-1.491.565-4.684zm-6.757 1.445c1.192-1.196 1.542-1.92 1.542-3.209 0-1.316-.16-1.635-.763-1.519-.417.078-.919.76-1.114 1.507-.194.748-1 1.904-1.783 2.57-1.418 1.196-1.472 2.192-.125 2.192.386 0 1.394-.697 2.243-1.541zm14.943 1.047c.167-.269-.339-1.036-1.122-1.698-.786-.666-1.589-1.822-1.783-2.57-.199-.747-.701-1.429-1.118-1.507-.6-.116-.76.203-.76 1.519 0 2.609 3.743 5.942 4.783 4.256zm-20.66-8.146c0-.261-.634-.822-1.41-1.246-5.054-2.769-10.985-7.176-14.28-10.61-6.433-6.71-9.33-13.388-9.4-21.678-.048-5.54.665-8.43 3.364-13.605 2.609-5.004 5.631-8.78 13.95-17.421 9.287-9.653 11.425-12.2 13.038-15.533 1.148-2.367 1.3-3.231 1.46-8.235.199-6.215-.18-10.506-.927-10.506-.339 0-.401 1.612-.21 5.234.623 11.592-1.53 15.19-14.892 24.881-9.202 6.674-13.424 10.3-16.613 14.264-4.518 5.61-6.52 10.466-7.018 17.05-1.207 15.868 8.848 29.629 26.59 36.385 3.914 1.487 6.348 1.881 6.348 1.02zm30.7-1.285c6.098-2.543 10.736-5.615 15.11-10.007 6.667-6.701 9.439-12.967 9.856-22.242.362-8.134-1.402-13.515-6.437-19.61-3.45-4.173-7.162-7.16-17.174-13.81-13.47-8.953-16.633-12.516-16.633-18.746 0-1.658.3-4.006.662-5.217.623-2.068.608-3.493-.02-1.862-.591 1.546-1.947.837-2.675-1.41l-.7-2.152.264 2.04c.942 7.242 1.06 10.276.642 16.615-.564 8.57-1.616 14.427-4.51 25.076-2.87 10.572-3.387 14.404-3.029 22.476.3 6.825 1.254 11.93 3.474 18.593 2.06 6.183 2.445 6.654 6.235 7.624 2.083.533 4.058 1.433 5.627 2.566 1.476 1.067 2.952 1.76 3.781 1.775.748.012 3.237-.755 5.526-1.709zm-1.371-3.076c-.565-.565-.3-1.048 1.912-3.493 6.97-7.694 10.094-15.641 10.183-25.906.063-6.993-1.483-11.627-6.2-18.593-2.13-3.15-9.634-11.008-13.263-13.893-2.66-2.114-5.398-5.72-5.885-7.76-.494-2.068.892-1.523 2.496.98.787 1.227 2.493 3.03 3.79 4.004 1.296.977 5.132 3.835 8.524 6.355 11.664 8.671 16.859 16.066 18.023 25.672.678 5.556-.397 11.3-3.107 16.634-2.812 5.525-7.937 11.545-12.326 14.477-2.703 1.803-3.556 2.115-4.147 1.523zm-22.837.584c.133-.343-1.036-2.535-2.593-4.875-4.128-6.191-5.924-9.606-7.598-14.454-1.414-4.085-1.492-4.641-1.504-10.883-.015-9.431 1.005-12.422 8.49-24.85 7.057-11.718 8.015-16.258 7.22-34.286-.288-6.46-.611-11.838-.72-11.95-.744-.744-.904 1.172-.627 7.67.545 12.94-.292 20.147-3.018 26.062-1.858 4.026-3.938 7.075-9.53 14.002-7.788 9.637-9.985 14.75-9.946 23.126.031 5.743.806 9.275 3.127 14.185 2.512 5.32 7.135 10.689 12.93 15.011 2.667 1.994 3.391 2.231 3.77 1.242z" fill="#212178"/></svg>`,languages:[`perl`,`pl`]}];function NN({language:e}){let t=e?.toLowerCase()||`text`,n=MN.find(e=>e.languages.includes(t));return(0,R.jsx)(`span`,{className:`markdown-code-language`,title:n?.name||e||`Plain text`,children:n?(0,R.jsx)(`span`,{className:n.monochrome?`markdown-code-language-icon monochrome`:`markdown-code-language-icon`,role:`img`,"aria-label":n.name,dangerouslySetInnerHTML:{__html:n.svg}}):t})}function PN({code:e,language:t,pre:n,target:r}){let[i,a]=(0,F.useState)({status:`idle`}),o=(0,F.useRef)(!1),s=(0,F.useRef)(void 0);(0,F.useEffect)(()=>(o.current=!1,()=>{o.current=!0,clearTimeout(s.current)}),[]);async function c(){let t=e;clearTimeout(s.current),a({status:`copying`});try{if(await navigator.clipboard.writeText(t),o.current)return;a({status:`copied`,code:t}),s.current=setTimeout(()=>a({status:`idle`}),2e3)}catch{o.current||a({status:`failed`})}}let l=i.status===`copied`&&i.code!==e,u=i.status===`failed`?`Retry copying code`:l?`Copy current code`:`Copy code`,d=i.status===`copied`?l?`Copied earlier`:`Copied`:i.status===`failed`?`Copy failed`:i.status===`copying`?`Copying`:`Copy`,[f,p]=(0,F.useState)(!1),m=f?`Disable line wrapping`:`Enable line wrapping`;return(0,F.useEffect)(()=>(n.classList.toggle(`markdown-code-wrap`,f),()=>n.classList.remove(`markdown-code-wrap`)),[n,f]),(0,jN.createPortal)((0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(NN,{language:t}),(0,R.jsxs)(`div`,{className:`markdown-code-actions`,children:[(0,R.jsx)(`button`,{type:`button`,className:`markdown-code-action`,"aria-label":m,"aria-pressed":f,title:m,onClick:()=>p(e=>!e),children:(0,R.jsx)(Tv,{size:16,"aria-hidden":`true`})}),(0,R.jsxs)(`button`,{type:`button`,className:`markdown-code-action`,"aria-label":u,title:d===`Copy`?u:`${d}. ${u}`,disabled:i.status===`copying`,onClick:()=>void c(),children:[i.status===`copied`&&!l?(0,R.jsx)(Ug,{size:16,"aria-hidden":`true`}):i.status===`failed`?(0,R.jsx)(Yg,{size:16,"aria-hidden":`true`}):(0,R.jsx)(r_,{size:16,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`sr-only`,role:`status`,children:d})]})]})]}),r)}function FN(e){switch(e){case`image/jpeg`:return`jpg`;case`image/png`:return`png`;case`image/gif`:return`gif`;case`image/webp`:return`webp`;case`image/svg+xml`:return`svg`;case`image/avif`:return`avif`;case`image/bmp`:return`bmp`;default:return}}function IN(e){let t=e.name.trim()||`image`,n=FN(e.mediaType);if(!n)return t;let r=t.match(/\.([a-z0-9]{2,5})$/i);return r?(e.mediaType===`image/jpeg`?[`jpg`,`jpeg`]:[n]).includes(r[1].toLowerCase())?t:`${t.slice(0,-r[0].length)}.${n}`:`${t}.${n}`}async function LN(e){let t=await fetch(e.url,{referrerPolicy:`no-referrer`,credentials:new URL(e.url,window.location.href).pathname===`/api/workspace/image`?`include`:`same-origin`});if(!t.ok)throw Error(`Fetch failed with status ${t.status}`);return t.blob()}async function RN(e){if(e.type===`image/png`)return e;let t=await createImageBitmap(e);try{let e=document.createElement(`canvas`);e.width=t.width,e.height=t.height;let n=e.getContext(`2d`);if(!n)throw Error(`Canvas 2D context unavailable`);return n.drawImage(t,0,0),await new Promise((t,n)=>{e.toBlob(e=>e?t(e):n(Error(`PNG encoding failed`)),`image/png`)})}finally{t.close()}}var zN=`inline-flex size-9 items-center justify-center rounded-lg border border-white/15 bg-black/65 text-white shadow-lg backdrop-blur-sm transition hover:bg-black/80 focus-visible:ring-2 focus-visible:ring-white/50 focus-visible:outline-none aria-disabled:cursor-wait aria-disabled:opacity-60`;function BN({image:e,onClose:t}){let n=(0,F.useRef)(null),[r,i]=(0,F.useState)(!1),[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(!1),[l,u]=(0,F.useState)(null),[d,f]=(0,F.useState)(null),p=(0,F.useRef)(null),m=(0,F.useRef)(0),h=(0,F.useRef)(t);(0,F.useLayoutEffect)(()=>{h.current=t},[t]),(0,F.useEffect)(()=>{if(m.current+=1,!e)return;i(!1),o(!1),c(!1),u(null),f(null);let t=document.activeElement instanceof HTMLElement?document.activeElement:null,r=!1;queueMicrotask(()=>{r||n.current?.focus()});let a=document.body.style.overflow;document.body.style.overflow=`hidden`,document.fullscreenElement&&document.querySelector(`[data-artifact-screen-fullscreen]`)&&document.exitFullscreen?.().catch(()=>{});function s(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),h.current();return}let t=n.current;if(e.key!==`Tab`||!t)return;let r=Array.from(t.querySelectorAll(`button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`hidden`));if(r.length===0){e.preventDefault(),t.focus();return}let i=r[0],a=r[r.length-1],o=document.activeElement;e.shiftKey&&(o===t||o===i||!t.contains(o))?(e.preventDefault(),a.focus()):!e.shiftKey&&(o===t||o===a||!t.contains(o))&&(e.preventDefault(),i.focus())}return window.addEventListener(`keydown`,s,!0),()=>{r=!0,window.removeEventListener(`keydown`,s,!0),document.body.style.overflow=a,p.current!==null&&(window.clearTimeout(p.current),p.current=null),t?.isConnected&&t.focus()}},[e]);async function g(e){if(a)return;let t=m.current;o(!0),u(null),f(null);try{if(!globalThis.ClipboardItem)throw Error(`Clipboard images unsupported`);let n=LN(e).then(RN);if(await navigator.clipboard.write([new ClipboardItem({"image/png":n})]),t!==m.current)return;i(!0),p.current!==null&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{i(!1),p.current=null},2e3)}catch{t===m.current&&(i(!1),u(`Could not copy the image to the clipboard.`))}finally{t===m.current&&o(!1)}}async function _(e){if(s)return;let t=m.current;c(!0),u(null),f(null);try{let n=await LN(e);if(t!==m.current)return;let r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=IN({...e,mediaType:n.type||e.mediaType}),document.body.append(i);try{i.click()}finally{i.remove(),window.setTimeout(()=>URL.revokeObjectURL(r),1e4)}}catch{t===m.current&&f(`Could not download the image.`)}finally{t===m.current&&c(!1)}}if(!e)return null;let v=e;return(0,R.jsx)(`div`,{className:`bg-background/92 fixed inset-0 z-300 flex items-center justify-center px-3 py-4 sm:px-6 sm:py-12`,"data-image-viewer":``,role:`presentation`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,R.jsxs)(`div`,{ref:n,className:`relative inline-flex max-h-full max-w-full outline-none`,role:`dialog`,"aria-modal":`true`,"aria-label":`Image preview: ${v.name}`,tabIndex:-1,children:[(0,R.jsx)(`img`,{src:v.url,alt:v.name,referrerPolicy:`no-referrer`,className:`border-border block max-h-[calc(100dvh-2rem)] max-w-full rounded-2xl border object-contain sm:max-h-[calc(100dvh-6rem)]`}),(0,R.jsx)(`button`,{type:`button`,className:`${zN} absolute top-3 right-3`,"aria-label":`Close image preview`,onClick:t,children:(0,R.jsx)(Fv,{className:`size-4`,"aria-hidden":`true`})}),(0,R.jsx)(`div`,{className:`absolute right-3 bottom-3 flex items-center gap-2`,children:v.readActions===!1?(0,R.jsx)(`a`,{className:`${zN} w-auto px-3 text-sm`,href:v.url,target:`_blank`,rel:`noopener noreferrer`,referrerPolicy:`no-referrer`,children:`Open original image`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{type:`button`,className:zN,"aria-disabled":a,"aria-label":a?`Copying image`:r?`Image copied`:`Copy image`,title:a?`Copying image`:r?`Image copied`:`Copy image`,onClick:()=>void g(v),children:a?(0,R.jsx)(V_,{className:`size-4 animate-spin`,"aria-hidden":`true`}):r?(0,R.jsx)(Ug,{className:`size-4`,"aria-hidden":`true`}):(0,R.jsx)(r_,{className:`size-4`,"aria-hidden":`true`})}),(0,R.jsx)(`button`,{type:`button`,className:zN,"aria-disabled":s,"aria-label":s?`Downloading image`:`Download image`,title:s?`Downloading image`:`Download image`,onClick:()=>void _(v),children:s?(0,R.jsx)(V_,{className:`size-4 animate-spin`,"aria-hidden":`true`}):(0,R.jsx)(s_,{className:`size-4`,"aria-hidden":`true`})})]})}),(0,R.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:a?`Copying image`:r?`Image copied`:s?`Downloading image`:``}),l||d?(0,R.jsx)(`p`,{className:`border-border absolute right-3 bottom-14 max-w-[min(20rem,calc(100%-1.5rem))] rounded-lg border bg-black/80 px-3 py-2 text-xs text-amber-100 shadow-lg backdrop-blur-sm`,role:`alert`,children:l??d}):null]})})}function VN(e){let t=e.split(/[?#]/,1)[0];try{return decodeURIComponent(t)}catch{return t}}function HN(e,t){if(e=iD(e),/^(?:https?:|data:image\/|blob:|\/\/)/i.test(e))return e;if(!e||/^[a-z][a-z\d+.-]*:/i.test(e)&&!aD(e))return null;let n=VN(e),r=t?.documentPath?.replaceAll(`\\`,`/`),i=r?.slice(0,r.lastIndexOf(`/`)+1)??``,a=oD(n)?n:i+n,o=n.replace(/^(?:\.\/)+/,``),s=!r&&/^(?:parse_file|screenshot_url|scrape_url)\//.test(o)?t?.transcript:void 0;if(!oD(a)&&!t?.workspacePath&&!s)return null;let c=new URLSearchParams;s&&(c.set(`userId`,s.userId),c.set(`threadId`,s.threadId)),t?.workspacePath&&c.set(`workspacePath`,t.workspacePath),c.set(`path`,s?o:a);let l=jm(),u=`/api/workspace/image?${c}`;return l&&l!==globalThis.window?.location.origin?`${l}${u}`:u}function UN(e,t){let n=document.createElement(`template`);n.innerHTML=e;for(let e of n.content.querySelectorAll(`a[href]`)){let n=e.getAttribute(`href`)??``;if(/^[a-z][a-z\d+.-]*:/i.test(n)&&!/^https?:/i.test(n)&&!aD(n)||!/\.(?:avif|bmp|gif|jpe?g|png|svg|webp)$/i.test(VN(n)))continue;if(e.querySelector(`img`)){let r=HN(n,t);r&&e.setAttribute(`href`,r);continue}let r=document.createElement(`img`);r.setAttribute(`src`,n),r.alt=e.textContent||`Image`;let i=e.getAttribute(`title`);i&&(r.title=i),e.replaceWith(r)}for(let e of n.content.querySelectorAll(`img`)){let n=HN(e.getAttribute(`src`)??``,t);if(e.setAttribute(`loading`,`lazy`),e.setAttribute(`decoding`,`async`),e.setAttribute(`referrerpolicy`,`no-referrer`),e.removeAttribute(`srcset`),e.removeAttribute(`data-local-image-url`),n){e.src=n;let t=new URL(n,window.location.href);t.pathname===`/api/workspace/image`&&t.origin===jm()&&e.setAttribute(`data-local-image-url`,n)}else e.removeAttribute(`src`),e.alt=`${e.alt||`Image`} (unavailable)`;n&&n.startsWith(`${jm()}/api/workspace/image?`)&&(e.crossOrigin=`use-credentials`),!e.closest(`a`)&&n&&(e.tabIndex=0,e.setAttribute(`role`,`button`),e.setAttribute(`aria-label`,`View ${e.alt||`image`}`))}return n.innerHTML}var WN=new Map,GN=L().nullable(),KN=2e3,qN,JN;function YN(){WN.size&&!qN&&!JN&&(qN=setTimeout(XN,KN))}async function XN(){if(qN=void 0,document.visibilityState===`hidden`){YN();return}let e=new AbortController;JN=e;let t=[...WN.entries()];async function n(){for(;t.length&&!e.signal.aborted;){let n=t.shift();if(!n)return;let[r,i]=n;if(WN.get(r)!==i)continue;let a=new URL(r,window.location.href);a.searchParams.set(`revisionOnly`,`true`);try{let t=await fetch(a.href,{credentials:`include`,cache:`no-store`,signal:AbortSignal.any([e.signal,AbortSignal.timeout(5e3)])});if(!t.ok)continue;let n=GN.parse(await t.json());if(e.signal.aborted||WN.get(r)!==i||n===i.revision||(i.revision=n,n===null))continue;a.searchParams.delete(`revisionOnly`),a.searchParams.set(`revision`,n);for(let e of i.listeners)e(a.href)}catch{}}}try{await Promise.all(Array.from({length:Math.min(4,t.length)},()=>n()))}finally{JN===e&&(JN=void 0),YN()}}function ZN(e,t){let n=WN.get(e);if(n||(n={listeners:new Set},WN.set(e,n)),n.listeners.add(t),n.revision){let r=new URL(e,window.location.href);r.searchParams.set(`revision`,n.revision),t(r.href)}return YN(),()=>{n.listeners.delete(t),n.listeners.size||WN.delete(e),WN.size||(clearTimeout(qN),qN=void 0,JN?.abort())}}var QN=`modulepreload`,$N=function(e){return`/`+e},eP={},tP=function(e){return e.pathname.endsWith(`.css`)},nP=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=$N(t,n);let r=s(t);if(r.href in eP)return;eP[r.href]=!0;let i=tP(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:QN,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function rP({html:e,imageScope:t}){let n=t?.workspacePath,r=t?.documentPath,i=t?.transcript?.userId,a=t?.transcript?.threadId,o=(0,F.useMemo)(()=>UN(e,{workspacePath:n,documentPath:r,transcript:i&&a?{userId:i,threadId:a}:void 0}),[e,n,r,i,a]),s=(0,F.useRef)(null),[c,l]=(0,F.useState)(null);(0,F.useEffect)(()=>{let e=[...s.current?.querySelectorAll(`img[data-local-image-url]`)??[]].map(e=>{let t=e.getAttribute(`data-local-image-url`);if(!t)return()=>{};let n=e.alt;return ZN(t,t=>{let r=e.src;e.classList.remove(`markdown-image-error`),e.alt=n,e.closest(`a`)||(e.tabIndex=0,e.setAttribute(`role`,`button`),e.setAttribute(`aria-label`,`View ${n||`image`}`)),e.src=t,l(e=>e?.url===r?{...e,url:t}:e)})});return()=>{for(let t of e)t()}},[o]);let[u,d]=(0,F.useState)({html:o,blocks:[]});(0,F.useEffect)(()=>{let e=s.current?.querySelectorAll(`pre > code`)??[];if(!e.length){d({html:o,blocks:[]});return}let t=new AbortController,n=[];for(let r of e){let e=r.parentElement;if(!e)continue;let i=document.createElement(`div`);i.className=`markdown-code-block`;let a=document.createElement(`div`);a.className=`markdown-code-header`,e.replaceWith(i),i.append(a,e);let o=r.textContent,s=[...r.classList].find(e=>e.startsWith(`language-`))?.slice(9).toLowerCase();n.push({target:a,wrapper:i,pre:e,code:o,language:s}),s&&(o.length>5e4||nP(async()=>{let{highlightCodeInWorker:e}=await import(`./code-highlighting-client-Kw4BuD-0.js`);return{highlightCodeInWorker:e}},[]).then(({highlightCodeInWorker:e})=>t.signal.aborted?null:e(o,s,t.signal)).then(e=>{if(!e||t.signal.aborted)return;let n=document.createDocumentFragment();for(let[t,r]of e.entries()){t>0&&n.append(`
434
- `);for(let e of r){let t=document.createElement(`span`);t.textContent=e.content;for(let[n,r]of Object.entries(e.htmlStyle??{}))t.style.setProperty(n,String(r));n.append(t)}}r.replaceChildren(n),r.classList.add(`shiki`)}).catch(()=>{}))}return d({html:o,blocks:n}),()=>{t.abort();for(let{wrapper:e,pre:t}of n)e.replaceWith(t)}},[o]);function f(e){if(!e.getAttribute(`src`)||e.closest(`a`)||e.classList.contains(`markdown-image-error`))return;let t=new URL(e.src),n=e.src.startsWith(`${jm()}/api/workspace/image?`);l({url:e.src,name:e.alt||`Image`,mediaType:``,readActions:n||!/^https?:$/.test(t.protocol)||t.origin===window.location.origin})}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{ref:s,className:`chat-markdown-html`,onClick:e=>{e.target instanceof HTMLImageElement&&f(e.target)},onKeyDown:e=>{e.target instanceof HTMLImageElement&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f(e.target))},onErrorCapture:e=>{if(!(e.target instanceof HTMLImageElement)||e.target.classList.contains(`markdown-image-error`))return;let t=e.target;t.classList.add(`markdown-image-error`),t.alt=`${t.alt||`Image`} (unavailable)`,t.removeAttribute(`role`),t.removeAttribute(`tabindex`),t.removeAttribute(`aria-label`)},dangerouslySetInnerHTML:{__html:o}}),u.blocks.map(({target:e,code:t,language:n,pre:r},i)=>(0,R.jsx)(PN,{target:e,code:t,language:n,pre:r},i)),c?(0,jN.createPortal)((0,R.jsx)(BN,{image:c,onClose:()=>l(null)}),document.body):null]})}var iP=new Set;function aP({content:e,className:t=``,artifacts:n=[],onOpenArtifact:r,openLinksInNewTab:i=!1,imageScope:a}){let o=(0,F.useMemo)(()=>new Map(n.map(e=>[e.key,e])),[n]),s=(0,F.useMemo)(()=>ON(e,r?new Set(o.keys()):iP,i),[e,r,o,i]);return(0,R.jsx)(`div`,{className:pb(`chat-markdown`,t),children:s.map((e,t)=>{if(e.type===`artifact`){let n=o.get(e.artifactId);return n&&r?(0,R.jsx)(AN,{artifact:n,onOpen:()=>r(e.artifactId)},`${e.type}-${t}`):null}return(0,R.jsx)(rP,{html:e.html,imageScope:a},`${e.type}-${t}`)})})}var oP=`border-border hover:border-border focus-visible:ring-ring/40 text-foreground inline-flex h-14 max-w-56 items-center gap-2 rounded-xl border px-3 py-2 text-xs transition focus-visible:ring-2 focus-visible:outline-none`;function sP({attachment:e,loadAttachment:t,onOpen:n}){let[r,i]=(0,F.useState)(null),[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(!1),l=(0,F.useRef)(0),u=(0,F.useRef)(t);(0,F.useLayoutEffect)(()=>{u.current=t},[t]);let d=r??e.url??null,f=_x(e.mediaType);(0,F.useEffect)(()=>{let e=r;return()=>xx(e??void 0)},[r]),(0,F.useEffect)(()=>{let t=e.storageId,n=e.mediaType;if(!Sx({mediaType:n,url:e.url}))return;let r=u.current;if(!r)return;let a=!1;return o(!1),r(t).then(e=>{if(a){xx(e??void 0);return}i(e),o(e==null)}).catch(()=>{a||o(!0)}),()=>{a=!0}},[e.storageId,e.mediaType,e.url]),(0,F.useEffect)(()=>()=>{l.current+=1},[]);async function p(){if(s)return;let n=d;if(n?.startsWith(`blob:`)){Cx(n,e.name);return}if(!t&&!n){o(!0);return}let r=l.current;c(!0),o(!1);try{let a=null;if(t)a=await t(e.storageId);else if(n){let e=await fetch(n);if(!e.ok)throw Error(`Download failed`);a=URL.createObjectURL(await e.blob())}if(r!==l.current){xx(a??void 0);return}if(!a){o(!0);return}i(a),Cx(a,e.name)}catch{r===l.current&&o(!0)}finally{r===l.current&&c(!1)}}return d&&f?(0,R.jsx)(`button`,{type:`button`,className:`border-border hover:border-border focus-visible:ring-ring/40 block size-14 cursor-zoom-in overflow-hidden rounded-xl border transition focus-visible:ring-2 focus-visible:outline-none`,"aria-label":`View ${e.name}`,title:e.name,onClick:()=>{n({url:d,name:e.name,mediaType:e.mediaType})},children:(0,R.jsx)(`img`,{src:d,alt:``,loading:`lazy`,className:`size-full object-cover`})}):f&&t&&!a?(0,R.jsx)(`span`,{className:`border-hairline bg-hover-fill inline-flex size-14 animate-pulse rounded-xl border`,"aria-label":`Loading ${e.name}`}):f?(0,R.jsx)(`span`,{className:`text-muted-foreground border-hairline bg-hover-fill inline-flex items-center rounded-xl border px-3 py-2 text-xs`,children:`${e.name} (unavailable)`}):s?(0,R.jsxs)(`span`,{className:`${oP} pointer-events-none animate-pulse`,"aria-label":`Downloading ${e.name}`,role:`status`,children:[(0,R.jsx)(C_,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name})]}):a?(0,R.jsxs)(`button`,{type:`button`,className:`${oP} cursor-pointer`,"aria-label":`Retry download of ${e.name}`,title:e.name,onClick:()=>{p()},children:[(0,R.jsx)(C_,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:`${e.name} (unavailable)`})]}):t||d?(0,R.jsxs)(`button`,{type:`button`,className:`${oP} cursor-pointer`,"aria-label":`Download ${e.name}`,title:e.name,onClick:()=>{p()},children:[(0,R.jsx)(C_,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name})]}):(0,R.jsx)(`span`,{className:`text-muted-foreground border-hairline bg-hover-fill inline-flex items-center rounded-xl border px-3 py-2 text-xs`,children:`${e.name} (unavailable)`})}var cP=`user-bubble w-fit max-w-[33rem] rounded-xl border px-5 py-3.5 text-[15.5px] leading-7 text-foreground`;function lP({message:e,imageScope:t,copied:n,loadAttachment:r,onCopy:i,onOpenImage:a}){let o=e.attachments??[];return(0,R.jsxs)(`div`,{"data-message-id":e.id,"data-transcript-anchor":e.id,className:`flex flex-col items-end gap-1.5`,children:[o.length>0?(0,R.jsx)(`ul`,{className:`flex max-w-132 flex-wrap justify-end gap-2`,"aria-label":`Attached files`,children:o.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsx)(sP,{attachment:{...e,url:null},loadAttachment:r,onOpen:a})},e.storageId))}):null,e.text||o.length===0?(0,R.jsx)(`div`,{className:cP,children:(0,R.jsx)(aP,{imageScope:t,content:e.text||` `,className:`text-foreground`,openLinksInNewTab:!0})}):null,e.text?(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-muted-foreground inline-flex size-6 items-center justify-center rounded-md transition`,"aria-label":n?`Copied`:`Copy message`,onClick:i,children:n?(0,R.jsx)(Ug,{className:`size-3.5`,"aria-hidden":`true`}):(0,R.jsx)(r_,{className:`size-3.5`,"aria-hidden":`true`})}):null]})}function uP(e){let[t,n]=(0,F.useState)(!1),[r,i]=(0,F.useState)(!1),a=(0,F.useRef)(e);return(0,F.useEffect)(()=>{e!==a.current&&(a.current=e,e?i(!1):n(!1))},[e]),{expanded:e?!r:t,toggle:(0,F.useCallback)(()=>{e?i(e=>!e):n(e=>!e)},[e])}}function dP({text:e,inProgress:t}){let n=uP(t),r=t?`Reasoning`:`Reasoned`;return(0,R.jsxs)(`div`,{className:`text-muted-foreground text-sm`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-muted-foreground inline-flex items-center gap-1.5 transition`,onClick:n.toggle,"aria-expanded":n.expanded,children:[(0,R.jsx)(Lg,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,R.jsx)(`span`,{children:r}),(0,R.jsx)(qg,{className:`size-3.5 shrink-0 transition-transform ${n.expanded?`rotate-90`:``}`,"aria-hidden":`true`})]}),n.expanded?(0,R.jsx)(`div`,{className:`text-muted-foreground mt-1.5 text-[13px] leading-6 [overflow-wrap:anywhere] whitespace-pre-wrap`,children:e}):null]})}function fP(e){return e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function pP(e){if(!pC(e))switch(e){case`apply_patch`:case`ask_question`:case`await_question`:case`poll_question`:case`read_skill`:case`scrape_url`:case`web_search`:return;case`spawn_subagent`:return`Delegated Tasks`;case`control_subagent`:return`Controlled Subagents`;case`poll_subagent`:return`Polled Subagents`;case`list_subagents`:return`Listed Subagents`;case`list_subagent_models`:return`Listed Subagent Models`;case`check_docs`:return`Checked Docs`;case`add_artifact`:case`create_artifact`:return`Created Artifact`;case`edit_artifact`:case`update_artifact`:return`Updated Artifact`;case`list_artifacts`:return`Listed Artifacts`;case`save_artifact`:return`Saved Artifact`;case`delete_artifact`:return`Deleted Artifact`;case`get_workspace_instructions`:return`Read Instructions`;case`mandate_charge`:return`Charged Card`;case`mandate_list`:return`Listed Mandates`;case`mandate_report`:return`Settled Charge`;case`mandate_setup`:return`Set Up Mandate`;case`mandate_status`:return`Checked Mandate`;case`parse_file`:return`Parsed File`;case`screenshot_url`:return`Captured Screenshot`;default:return fP(e)}}function mP(e){let t=eC(e)?mC(e.workdir):void 0;return t&&t.trim().length>0&&t!==`.`?` (cwd ${t})`:``}function hP(e,t){let n=eC(t)?t:void 0;switch(e){case`apply_patch`:return CP(t)??`Patch`;case`ask_question`:return mC(n?.question)??`Question`;case`await_question`:case`poll_question`:return`Waiting for answer`;case`spawn_subagent`:return mC(n?.prompt)??`Child agent`;case`control_subagent`:return n?.action===`send`?mC(n.prompt)??`Message child agent`:n?.action===`stop`?`Stop child agent`:n?.action===`answer_question`?`Answered question`:mC(n?.threadId)??`Child agent`;case`poll_subagent`:return mC(n?.threadId)??`Child agent`;case`list_subagents`:case`list_subagent_models`:return``;case`check_docs`:return mC(n?.query)??mC(n?.path)??`Docs`;case`add_artifact`:case`create_artifact`:case`edit_artifact`:case`save_artifact`:case`delete_artifact`:return xP(t);case`list_artifacts`:return`Artifacts`;case`exec_command`:case`exec_cmd`:{let e=mC(n?.cmd);return e?`${e}${mP(t)}`:`Command`}case`control_command`:case`control_cmd`:{let e=mC(n?.sessionId),t=e?`Session ${e}`:`Command session`;return n?.action===`terminate`?`Terminate ${t}`:`Write to ${t}`}case`poll_command`:case`poll_cmd`:case`write_stdin`:{let e=mC(n?.sessionId);return e?`Session ${e}`:`Command session`}case`get_workspace_instructions`:return`Workspace instructions`;case`mandate_charge`:return _P(n);case`mandate_list`:return`Standing mandates`;case`mandate_report`:return n?.outcome===`approved`?`Charge approved`:`Charge declined`;case`mandate_setup`:return gP(n);case`mandate_status`:return`Mandate status`;case`read_skill`:{let e=mC(n?.name);return e?`$${e}`:`Skill`}case`scrape_url`:case`screenshot_url`:return mC(n?.url)??`URL`;case`parse_file`:return mC(n?.path)??mC(n?.url)??`File`;case`update_artifact`:return mC(n?.title)??`Updated artifact`;case`web_search`:return mC(n?.query)??`Web search`;default:return fP(e)}}function gP(e){let t=mC(e?.merchantName)??`Any merchant`,n=mC(e?.amountCap),r=mC(e?.currency)??``,i=mC(e?.frequency)??``;return`${t}${n?` · ${n} ${r}`.trimEnd():``}${i&&i!==`one_time`?` ${i}`:``}`}function _P(e){let t=mC(e?.description)??`Charge`,n=mC(e?.amount),r=mC(e?.currency)??``;return n?`${t} · ${n} ${r}`.trimEnd():t}var vP=[`*** Add File: `,`*** Copy File: `,`*** Delete File: `,`*** Update File: `],yP=[`*** Copy to: `,`*** Move to: `];function bP(e){let t=e.lastIndexOf(` "b/`);if(t>=0)return e.slice(t+4).replace(/"$/,``);let n=e.lastIndexOf(` b/`);return n>=0?e.slice(n+3):null}function xP(e,t){let n=eC(e)?e:void 0,r=eC(t)?t:void 0;return mC(n?.path)??mC(n?.localPath)??mC(r?.localPath)??mC(r?.path)??mC(r?.title)??mC(n?.title)??mC(n?.artifactId)??`Artifact`}function SP(e){let t=Array.isArray(e)?e:eC(e)&&Array.isArray(e.artifacts)?e.artifacts:void 0;if(t===void 0)return`Artifacts`;let n=t.length;return n===1?`1 artifact`:`${n} artifacts`}function CP(e){let t=eC(e)?mC(e.patch):void 0;if(!t)return null;let n=[];for(let e of t.split(`
435
- `)){if(e.startsWith(`diff --git `)){let t=bP(e);t!==null&&n.push(t);continue}let t=vP.find(t=>e.startsWith(t));if(t){n.push(e.slice(t.length).trim());continue}let r=yP.find(t=>e.startsWith(t));r&&n.length>0&&(n[n.length-1]=e.slice(r.length).trim())}let r=[...new Set(n)];return r.length>0?r.join(`
436
- `):null}function wP(e){if(!eC(e)||!Array.isArray(e.changes))return null;let t=e.changes.flatMap(e=>{if(!eC(e))return[];let t=mC(e.path);return t?[t]:[]});return t.length===0?null:[...new Set(t)].join(`
437
- `)}function TP(e){return e.job?.kind===`apply_patch`?wP(e.job.result)??CP(e.job.payload):e.name===`apply_patch`?CP(e.input):null}function EP(e,t){if(e===`web_search`&&eC(t)&&Array.isArray(t.results)){let e=t.results.length;return` (${e} result${e===1?``:`s`})`}return``}function DP(e,t){let n=e.job?.kind??e.name;return fC(n)?OC(e,t)??hP(n,e.job?.payload??e.input):n===`list_artifacts`?SP(e.job?.result??e.output):n===`add_artifact`||n===`edit_artifact`||n===`save_artifact`||n===`delete_artifact`||n===`create_artifact`?xP(e.job?.payload??e.input,e.job?.result??e.output):e.job?TP(e)||hP(e.job.kind,e.job.payload)+EP(e.job.kind,e.job.result):hP(e.name,e.input)}function OP(e){switch(e){case`apply_patch`:return x_;case`ask_question`:return $g;case`await_question`:case`poll_question`:return F_;case`spawn_subagent`:case`control_subagent`:case`poll_subagent`:return Fg;case`list_subagents`:case`list_subagent_models`:return z_;case`check_docs`:return Ng;case`add_artifact`:case`create_artifact`:return y_;case`delete_artifact`:return Dv;case`save_artifact`:return av;case`exec_command`:case`exec_cmd`:return Cv;case`control_command`:case`control_cmd`:case`poll_command`:case`poll_cmd`:return _v;case`get_workspace_instructions`:return sv;case`mandate_charge`:return Zg;case`mandate_list`:return z_;case`mandate_report`:return jv;case`mandate_setup`:return a_;case`mandate_status`:return z_;case`read_skill`:return q_;case`scrape_url`:return N_;case`screenshot_url`:return zg;case`edit_artifact`:case`list_artifacts`:case`update_artifact`:case`parse_file`:return C_;case`web_search`:return lv;case`write_stdin`:return _v;default:return Nv}}function kP(e){return OP(e.job?.kind??e.name)}function AP({tools:e,inProgress:t,commands:n}){return(0,R.jsx)(`div`,{className:`text-muted-foreground space-y-1.5 text-[13px] leading-6`,children:e.map(e=>{let r=e.job?.kind??e.name,i=kP(e),a=DP(e,n),o=r===`apply_patch`?a.split(`
438
- `):[a],s=pP(r),c=jC(e,t),l=AC(e,t),u=l===`failed`?`text-destructive`:`text-amber-800 dark:text-amber-200`;return(0,R.jsxs)(`div`,{"data-tool-kind":r,className:`min-w-0 space-y-1.5`,children:[o.map((e,t)=>(0,R.jsxs)(`div`,{"data-tool-row":!0,"data-work-detail":!0,className:`flex min-w-0 items-start gap-1.5`,children:[(0,R.jsx)(i,{className:`mt-1 size-3.5 shrink-0`,"aria-hidden":`true`}),s?(0,R.jsxs)(`span`,{className:`shrink-0`,children:[s,e?`:`:``]}):null,e?(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:e}):null,c&&l&&t===o.length-1?(0,R.jsxs)(`span`,{className:`shrink-0 ${u}`,children:[`(`,l===`cancelled`?`stopped`:l,`)`]}):null]},t)),c&&l?(0,R.jsx)(`p`,{"data-work-detail":!0,className:`pl-5 text-xs leading-5 wrap-break-word whitespace-pre-wrap ${u}`,role:`status`,children:c}):null]},e.callId)})})}function jP({inProgress:e,startedAtMs:t,completedAtMs:n,children:r}){let[i,a]=(0,F.useState)(!1),o=lx(e),s=ux(t,e?o:n),c=`${e?`Working`:`Worked`}${s===void 0?``:` for ${ix(s)}`}`;return(0,R.jsxs)(`div`,{className:`text-muted-foreground text-sm`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-muted-foreground inline-flex items-center gap-1 transition`,onClick:()=>a(e=>!e),"aria-expanded":i,children:[(0,R.jsx)(`span`,{children:c}),(0,R.jsx)(qg,{className:`size-3.5 shrink-0 transition-transform ${i?`rotate-90`:``}`,"aria-hidden":`true`})]}),i?(0,R.jsx)(`div`,{className:`mt-1.5 space-y-2`,children:r}):null]})}function MP(e){return e.type===`tool-call`||e.type===`tool-result`?`${e.type}:${e.callId}`:`${e.type}:${e.turnId??``}:${e.id}`}var NP=class{load;changed;commit;parts=[];previousBefore;nextAfter;loading=!1;indexing=!1;stale=!1;error=!1;start={};initialized=!1;stopped=!1;refreshPending=!1;failedDirection;request;retry;constructor(e,t,n){this.load=e,this.changed=t,this.commit=n}stop(){this.stopped=!0,this.request?.abort(),clearTimeout(this.retry)}refresh(){if(this.loading){this.refreshPending=!0;return}return this.fetch()}more(e){if(!(!this.initialized||this.loading||this.error||this.indexing)&&(e===`older`?this.previousBefore:this.nextAfter)!==void 0)return this.fetch(e)}retryFailed(){if(!this.loading)return this.fetch(this.failedDirection)}async fetch(e){if(this.stopped)return;clearTimeout(this.retry);let t=new AbortController;this.request=t,this.loading=!0,this.indexing=!1,this.error=!1,this.failedDirection=e,this.changed();try{let n=e===`older`?{before:this.previousBefore}:e===`newer`?{after:this.nextAfter}:this.start,r=this.parts.length?MP(this.parts[this.parts.length-1]):void 0,i=[];for(;;){let a=await this.load(n,t.signal);if(t.signal.aborted)return;if(a.indexing||a.stale&&!a.parts.length||i.length&&a.revision<i[i.length-1].revision){this.stale=a.stale,this.indexing=!0,this.retry=setTimeout(()=>void this.fetch(e),500);return}if(n.after!==void 0&&a.nextAfter!==void 0&&a.nextAfter<=n.after||n.before!==void 0&&a.previousBefore!==void 0&&a.previousBefore>=n.before)throw Error(`Work detail cursor did not advance.`);if(i.push(a),e||!r||a.parts.some(e=>MP(e)===r)||a.nextAfter===void 0||this.nextAfter!==void 0&&a.nextAfter>=this.nextAfter)break;if(i.length>this.parts.length)throw Error(`Work detail range changed too much.`);n={after:a.nextAfter}}let a=i[0],o=i[i.length-1],s=i.flatMap(e=>e.parts);await this.commit(()=>{if(t.signal.aborted)return;let n=e===`older`?[...s,...this.parts]:e===`newer`?[...this.parts,...s]:s,r=new Map(s.map(e=>[MP(e),e]));this.parts=[...new Map(n.map(e=>[MP(e),r.get(MP(e))??e])).values()],e!==`newer`&&(this.previousBefore=a.previousBefore,this.start=a.previousBefore===void 0?{}:{after:a.previousBefore-1}),e!==`older`&&(this.nextAfter=o.nextAfter),this.initialized=!0,this.stale=i.some(e=>e.stale),this.changed()},e),!this.stopped&&this.stale&&(this.retry=setTimeout(()=>void this.refresh(),2e3))}catch{t.signal.aborted||(this.error=!0)}finally{this.loading=!1,this.stopped||(this.changed(),this.refreshPending&&(this.refreshPending=!1,this.refresh()))}}},PP=3,FP=2;function IP({row:e,load:t,inProgress:n,commands:r,viewport:i,beforeChange:a}){let[o,s]=(0,F.useState)(0),c=(0,F.useRef)(null),l=(0,F.useRef)(null),u=(0,F.useRef)(null),d=(0,F.useRef)(0),f=(0,F.useRef)(`newer`),p=(0,F.useRef)({older:0,newer:0}),m=(0,F.useRef)(t),h=(0,F.useRef)(e),g=(0,F.useRef)(n),_=(0,F.useRef)(a),v=(0,F.useRef)(i);(0,F.useLayoutEffect)(()=>{m.current=t,h.current=e,g.current=n,_.current=a,v.current=i});function y(e){let t=v.current;if(!t||!e)return 1/0;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.bottom<n.top?n.top-r.bottom:r.top>n.bottom?r.top-n.bottom:0}let b=(0,F.useRef)(null);b.current||=new NP((e,t)=>m.current(h.current,e,t),()=>s(e=>e+1),async(e,t)=>{let n=p.current,r=t?y(t===`older`?l.current:u.current):void 0,i=_.current(g.current&&t!==`older`);(0,jN.flushSync)(e),i(),d.current=v.current?.scrollTop??0,t&&r!==void 0&&(n[t]=y(t===`older`?l.current:u.current)<=r+1?n[t]+1:0)});let x=b.current,S={parts:x.parts,loading:x.loading,indexing:x.indexing,error:x.error,stale:x.stale,previousBefore:x.previousBefore,nextAfter:x.nextAfter},C=MC(S.parts,[]),w=C.filter(e=>e.type===`tool`),T=kC(vC(C).filter(e=>e.type!==`text`),n),E=new Map([...r,...DC(w)]),D=(0,F.useRef)(null);D.current||=new PC;let ee=D.current.reconcileBlocks(e.id,T.settledBlocks);function O(){let e=p.current;if(!i||i.clientHeight<=0||x.loading||x.error||x.indexing)return;let t=f.current===`older`?[`older`,`newer`]:[`newer`,`older`];for(let n of t)if(!((n===`older`?x.previousBefore:x.nextAfter)===void 0||e[n]>=FP)&&!(y(n===`older`?l.current:u.current)>i.clientHeight*PP)){x.more(n);return}}let te=(0,F.useRef)(O);return(0,F.useLayoutEffect)(()=>{te.current=O}),(0,F.useLayoutEffect)(()=>{n&&(p.current.newer=0),x.refresh()},[x,n,e.revision]),(0,F.useEffect)(()=>()=>x.stop(),[x]),(0,F.useLayoutEffect)(()=>{te.current()},[o]),(0,F.useLayoutEffect)(()=>{let e=i,t=l.current,n=u.current;if(!e||!t||!n)return;let r=p.current;d.current=e.scrollTop;function a(){if(!e||e.scrollTop===d.current)return;let t=e.scrollTop<d.current?`older`:`newer`;d.current=e.scrollTop,f.current=t,r[t]=0,te.current()}let o=globalThis.IntersectionObserver?new IntersectionObserver(()=>te.current(),{root:e,rootMargin:`${e.clientHeight*PP}px 0px`}):void 0,s=globalThis.ResizeObserver?new ResizeObserver(()=>{r.older=0,r.newer=0,te.current()}):void 0;return o?.observe(t),o?.observe(n),c.current&&s?.observe(c.current),s?.observe(e),e.addEventListener(`scroll`,a),()=>{o?.disconnect(),s?.disconnect(),e.removeEventListener(`scroll`,a)}},[i]),(0,R.jsxs)(`div`,{ref:c,"aria-busy":S.loading||S.indexing,children:[(0,R.jsx)(`div`,{ref:l,"data-work-edge":`older`,className:`h-px`,"aria-hidden":`true`}),S.stale?(0,R.jsx)(`p`,{role:`status`,children:`Showing saved details while reconnecting.`}):null,(0,R.jsxs)(`div`,{className:`space-y-2`,children:[ee.map(({block:e,renderKey:t})=>(0,R.jsx)(`div`,{"data-work-detail":!0,children:e.type===`reasoning`?(0,R.jsx)(dP,{text:e.text,inProgress:!1}):(0,R.jsx)(AP,{tools:e.tools,inProgress:n,commands:E})},t)),T.runningTools.length>0?(0,R.jsx)(`div`,{"data-work-detail":!0,children:(0,R.jsx)(AP,{tools:T.runningTools,inProgress:n,commands:E})}):null]}),S.error?(0,R.jsxs)(`p`,{role:`status`,children:[`Could not load these details.`,` `,(0,R.jsx)(`button`,{className:`underline`,onClick:()=>{p.current.older=0,p.current.newer=0,x.retryFailed()},children:`Retry`})]}):(S.loading||S.indexing)&&S.parts.length===0?(0,R.jsx)(`p`,{role:`status`,children:`Loading details...`}):null,(0,R.jsx)(`div`,{ref:u,"data-work-edge":`newer`,className:`h-px`,"aria-hidden":`true`})]})}function LP(e){if((e.job?.kind??e.name)!==`mandate_setup`)return;let t=e.output;if(!eC(t))return;let n=mC(t.mandateId),r=mC(t.approvalUrl);if(n&&r)return{mandateId:n,approvalUrl:r}}function RP(e){let t=e.job?.payload??e.input;if(!eC(t))return;let n=mC(t.description)?.trim();if(n)return n;let r=mC(t.merchantName)?.trim();if(r)return r}function zP(e){return e.flatMap(e=>{let t=LP(e);return t?[{...t,label:RP(e)}]:[]})}var BP=28,VP=3,HP=3;function UP(e,t){return e===void 0?t:t===void 0?e:Math.min(e,t)}function WP(e,t){return e===void 0?t:t===void 0?e:Math.max(e,t)}function GP({userId:e,messages:t,actions:n,activeRunId:r,project:i,emptyStateMessage:a=i?`Start a thread and ask Sprocket to inspect code, edit files, or run project commands.`:`Add a project to begin.`,loadingOlder:o=!1,nextBefore:s,onLoadOlder:c,loadAttachment:l,loadSectionDetails:u,artifacts:d=[],onOpenArtifact:f}){let p=(0,F.useRef)(null),m=(0,F.useRef)(null),[h,g]=(0,F.useState)(null),_=(0,F.useRef)(!0),v=(0,F.useRef)(0),y=(0,F.useRef)(void 0),b=(0,F.useRef)(void 0),x=(0,F.useRef)(HP),[S,C]=(0,F.useState)(null),[w,T]=(0,F.useState)(null),E=(0,F.useRef)(null),[D,ee]=(0,F.useState)(()=>new Map),O=(0,F.useCallback)(e=>{e.size!==0&&ee(t=>[...e].every(([e,n])=>t.get(e)===n)?t:new Map([...t,...e]))},[]),te=(0,F.useMemo)(()=>DC([...MC([],n),...t.flatMap(e=>e.kind===`live`?MC(e.parts,[]):[])].filter(e=>e.type===`tool`)),[t,n]);(0,F.useLayoutEffect)(()=>O(te),[te,O]);let ne=(0,F.useMemo)(()=>new Map([...D,...te]),[D,te]),re=(0,F.useMemo)(()=>u?async(e,t,n)=>{let r=await u(e,t,n);if(!n.aborted){let e=MC(r.parts,[]).filter(e=>e.type===`tool`);O(DC(e))}return r}:void 0,[u,O]),ie=(0,F.useRef)(null);ie.current||=new PC;let k=ie.current;function ae(e){let t=n.filter(t=>t.runId===e.runId&&e.parts.some(e=>e.type===`tool-call`&&e.callId===t.callId)),i=MC(e.parts,t);return{timeline:i,sections:k.reconcile(e.id,xC(vC(i))),isStreaming:gC(e,r)}}function A(e,t,n){let{settledBlocks:r,runningTools:i}=kC(t.blocks,e.isStreaming),a=e.isStreaming&&(n===e.sections.length-1||i.length>0),o=e.sections[n+1];return{settledBlocks:r,lastBlock:t.blocks.at(-1),runningTools:i,workInProgress:a,approvals:r.flatMap(e=>e.type===`tool-group`?zP(e.tools):[]),timing:SC(t,{inProgress:a,endedAt:o?.type===`text`?o.startedAt??void 0:void 0})}}function oe(e,n){for(let r of t.slice(e+1))if(r.kind!==`approval`||r.runId!==n)return r.kind===`live`&&r.runId===n?ae(r):void 0}function se(e,n){for(let r=e-1;r>=0;--r){let e=t[r];if(e.kind!==`approval`||e.runId!==n)return e.kind===`work`&&e.runId===n&&!e.closed}return!1}function ce(e){let t=[...e.querySelectorAll(`[data-transcript-anchor], [data-work-detail]`)].filter(e=>!e.querySelector(`[data-work-detail]`)),n=e.getBoundingClientRect().top,r=0,i=t.length;for(;r<i;){let e=Math.floor((r+i)/2);t[e].getBoundingClientRect().bottom<=n?r=e+1:i=e}return t[r]}function le(e,t){e.scrollTop!==t&&(e.scrollTop=t),v.current=e.scrollTop}function ue(){let e=p.current;if(!e||!_.current)return;let t=Math.max(0,e.scrollHeight-e.clientHeight);if(e.scrollTop+1<Math.min(v.current,t)){_.current=!1;return}le(e,t)}function de(){let e=p.current;e&&s!==void 0&&s!==b.current&&!o&&c&&x.current>0&&e.clientHeight>0&&e.scrollTop<=e.clientHeight*VP&&(--x.current,b.current=s,c())}function fe(){_.current=!1,x.current=HP,de()}function pe(){let e=p.current;if(!e)return;if(e.scrollTop===v.current){de();return}let t=Math.max(0,e.scrollHeight-e.clientHeight),n=e.scrollTop<v.current,r=v.current>t&&Math.abs(e.scrollTop-t)<1;if(v.current=e.scrollTop,x.current=HP,!r){let r=t-e.scrollTop;_.current=!n&&r<=BP,n&&fe()}de()}function me(e){e.target instanceof Element&&e.target.closest(`input, textarea, button, [contenteditable="true"]`)||(e.key===`ArrowUp`||e.key===`PageUp`||e.key===`Home`||e.key===` `&&e.shiftKey)&&fe()}function he(e){e||(_.current=!1);let t=p.current,n=t&&!_.current?ce(t):void 0,r=n?.getBoundingClientRect().top,i=t?.scrollTop;return()=>{t&&t===p.current&&(_.current?ue():n?.isConnected&&r!==void 0&&t.scrollTop===i&&le(t,t.scrollTop+n.getBoundingClientRect().top-r))}}let ge=(0,F.useRef)(ue),_e=(0,F.useRef)(de);(0,F.useLayoutEffect)(()=>{ge.current=ue,_e.current=de}),(0,F.useLayoutEffect)(()=>{_e.current()},[t,s,o,h]),(0,F.useLayoutEffect)(()=>{let e=h,t=m.current;if(!e||!t||!globalThis.ResizeObserver)return;let n=new ResizeObserver(()=>{ge.current(),_e.current()});return n.observe(e),n.observe(t),()=>{n.disconnect()}},[h]);let ve=(0,F.useRef)(t),ye=(0,F.useRef)(n),j=(0,F.useRef)(null);if(ve.current!==t||ye.current!==n){ve.current=t,ye.current=n;let e=p.current,r=e&&!_.current?ce(e):void 0;j.current=e&&r?{anchor:r,offset:r.getBoundingClientRect().top,scrollTop:e.scrollTop,scrollHeight:e.scrollHeight}:null}(0,F.useLayoutEffect)(()=>{let e=p.current;if(!e)return;if(_.current){ge.current();return}let t=j.current;if(j.current=null,!t)return;let{anchor:n,offset:r,scrollTop:i,scrollHeight:a}=t;n.isConnected&&e.scrollTop===i?le(e,i+n.getBoundingClientRect().top-r):!n.isConnected&&e.scrollTop===i&&le(e,i+e.scrollHeight-a)},[t,n]);async function M(e,t){try{await navigator.clipboard.writeText(t),T(e),E.current!==null&&clearTimeout(E.current),E.current=setTimeout(()=>{T(t=>t===e?null:t),E.current=null},1500)}catch{T(null)}}(0,F.useLayoutEffect)(()=>()=>{E.current!==null&&clearTimeout(E.current)},[]),(0,F.useLayoutEffect)(()=>{k.retain(t.filter(e=>e.kind===`live`).map(e=>e.id))},[t,k]);let be=(0,F.useCallback)(e=>{p.current=e,g(e)},[]);function xe(e,t){return(0,R.jsxs)(R.Fragment,{children:[e.settledBlocks.map((n,r)=>{let i=`${n.type}-${n.type===`tool-group`?n.tools.map(e=>e.callId).join(`,`):n.id}-${r}`;if(n.type===`reasoning`){let t=e.workInProgress&&e.runningTools.length===0&&n===e.lastBlock;return(0,R.jsx)(dP,{text:n.text,inProgress:t},i)}return(0,R.jsx)(AP,{tools:n.tools,inProgress:t.isStreaming,commands:ne},i)}),e.runningTools.length>0?(0,R.jsx)(AP,{tools:e.runningTools,inProgress:t.isStreaming,commands:ne}):null]})}function N(t,n){let a={workspacePath:i?.workspacePath,transcript:e?{userId:e,threadId:t.threadId}:void 0};if(t.kind===`prompt`)return(0,R.jsx)(lP,{message:t,imageScope:a,copied:w===t.id,loadAttachment:l,onCopy:()=>void M(t.id,t.text??``),onOpenImage:C},t.id);if(t.kind===`work`){let e=t,i=e.closed?void 0:oe(n,e.runId),a=i?.sections[0],o=i&&a?.type===`work`?A(i,a,0):void 0,s=o?o.workInProgress:a?.type!==`text`&&e.runId===r&&(!e.closed||e.pendingTools>0),c=UP(e.startedAt,o?.timing.startedAtMs),l=WP(e.completedAt,o?.timing.completedAtMs??(a?.type===`text`?a.startedAt??void 0:void 0));return(0,R.jsx)(`div`,{"data-message-id":t.id,"data-transcript-anchor":t.id,"data-message-kind":`work`,children:(0,R.jsxs)(jP,{inProgress:s,startedAtMs:c,completedAtMs:l,children:[re?(0,R.jsx)(IP,{row:e,load:re,commands:ne,inProgress:s,viewport:h,beforeChange:he}):null,o&&i?xe(o,i):null]})},t.id)}if(t.kind===`approval`)return!t.mandateId||!t.approvalUrl?null:(0,R.jsx)(`div`,{"data-transcript-anchor":t.id,children:(0,R.jsx)(wS,{approval:{mandateId:t.mandateId,approvalUrl:t.approvalUrl}})},t.id);if(t.kind===`text`)return(0,R.jsx)(`div`,{"data-message-id":t.id,"data-transcript-anchor":t.id,"data-message-kind":`text`,children:(0,R.jsx)(aP,{imageScope:a,content:t.text||` `,className:`text-foreground`,artifacts:d,onOpenArtifact:f,openLinksInNewTab:!0})},t.id);if(t.kind!==`live`)return null;let o=ae(t),s=se(n,t.runId),c=o.timeline.some(e=>e.type===`text`||e.type===`reasoning`);return(0,R.jsx)(`div`,{"data-message-id":t.id,className:`w-full min-w-0`,role:o.isStreaming?`log`:void 0,"aria-live":o.isStreaming?`polite`:void 0,"aria-atomic":`false`,"aria-relevant":`additions text`,children:(0,R.jsxs)(`div`,{className:`space-y-3`,children:[!c&&(t.text||o.isStreaming&&o.timeline.length===0)?(0,R.jsx)(aP,{imageScope:a,content:t.text||`...`,className:`text-foreground`,artifacts:d,onOpenArtifact:f,openLinksInNewTab:!0}):null,o.sections.map((e,n)=>{if(e.type===`text`)return(0,R.jsx)(`div`,{"data-transcript-anchor":`${t.id}:${yC(e)}`,children:(0,R.jsx)(aP,{imageScope:a,content:e.text||` `,className:`text-foreground`,artifacts:d,onOpenArtifact:f,openLinksInNewTab:!0})},e.renderKey);let r=A(o,e,n);return r.settledBlocks.length===0&&!r.workInProgress&&r.runningTools.length===0?null:(0,R.jsxs)(`div`,{className:`space-y-3`,"data-transcript-anchor":`${t.id}:${e.renderKey}`,children:[s&&n===0?null:(0,R.jsx)(jP,{inProgress:r.workInProgress,startedAtMs:r.timing.startedAtMs,completedAtMs:r.timing.completedAtMs,children:xe(r,o)}),r.approvals.map(e=>(0,R.jsx)(wS,{approval:e},e.mandateId))]},e.renderKey)}),!o.isStreaming&&t.runStartedAt>0&&t.runCompletedAt!==void 0?(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Worked for ${ix(Math.max(0,Math.floor((t.runCompletedAt-t.runStartedAt)/1e3)))}`}):null]})},t.id)}return(0,R.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,R.jsx)(`div`,{className:`hide-scrollbar h-full overflow-x-hidden overflow-y-auto`,role:`region`,"aria-label":`Conversation history`,tabIndex:0,ref:be,onScroll:pe,onWheel:e=>{e.deltaY<0&&fe()},onKeyDown:me,onTouchStart:e=>{y.current=e.touches[0]?.clientY},onTouchMove:e=>{let t=e.touches[0]?.clientY;t!==void 0&&y.current!==void 0&&t>y.current&&fe(),y.current=t},children:(0,R.jsx)(`div`,{ref:m,className:`mx-auto flex min-h-full w-full max-w-[48rem] flex-col px-4 py-8`,children:t.length===0?a?(0,R.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,R.jsx)(`div`,{className:`max-w-2xl text-center`,children:(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm leading-7`,children:a})})}):null:(0,R.jsx)(`div`,{className:`transcript-messages space-y-8 pb-14`,children:t.map((e,t)=>N(e,t))})})}),(0,R.jsx)(`div`,{className:`transcript-fade pointer-events-none absolute inset-x-0 bottom-0 h-16`}),(0,R.jsx)(BN,{image:S,onClose:()=>C(null)})]})}function KP({title:e,onDelete:t,trigger:n,children:r}){let i=(0,F.useId)(),[a,o]=(0,F.useState)(null),[s,c]=(0,F.useState)(!1),[l,u]=(0,F.useState)(null),d=(0,F.useRef)(!1),f=(0,F.useRef)(null),p=(0,F.useRef)(null),m=(0,F.useCallback)(()=>{let e=f.current?.contains(document.activeElement);o(null),e&&p.current?.isConnected&&p.current.focus({preventScroll:!0})},[]);(0,F.useEffect)(()=>{if(!a)return;let e=f.current?.querySelector(`button`);e&&!e.disabled?e.focus():f.current?.focus()},[a,s]),(0,F.useEffect)(()=>{if(!a)return;function e(e){e.target instanceof Node&&(f.current?.contains(e.target)||n===`button`&&p.current?.contains(e.target)||m())}function t(e){e.key===`Escape`?(e.preventDefault(),e.stopImmediatePropagation(),m()):e.key===`Tab`&&m()}function r(){o(null)}return document.addEventListener(`mousedown`,e),window.addEventListener(`blur`,r),window.addEventListener(`keydown`,t,!0),window.addEventListener(`resize`,m),window.addEventListener(`scroll`,m,!0),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`blur`,r),window.removeEventListener(`keydown`,t,!0),window.removeEventListener(`resize`,m),window.removeEventListener(`scroll`,m,!0)}},[a,m,n]);function h(e,t,n){p.current=e,o({x:Math.max(8,Math.min(t,window.innerWidth-240)),y:Math.max(8,Math.min(n,window.innerHeight-140))})}function g(e){let t=e.getBoundingClientRect();h(e,t.right-224,t.bottom+4)}async function _(){if(t&&!d.current){d.current=!0,c(!0),u(null);try{await t(),m()}catch(e){u(e instanceof Error?e.message:`Unable to delete artifact.`)}finally{d.current=!1,c(!1)}}}return(0,R.jsxs)(`div`,{className:`contents`,onContextMenu:e=>{if(!t||n!==`context`)return;let r=e.currentTarget.querySelector(`button`);r&&(e.preventDefault(),e.stopPropagation(),h(r,e.clientX,e.clientY))},onKeyDown:e=>{if(!t||n!==`context`||!(e.key===`ContextMenu`||e.shiftKey&&e.key===`F10`))return;let r=e.currentTarget.querySelector(`button`);if(!r)return;e.preventDefault(),e.stopPropagation();let i=r.getBoundingClientRect();h(r,i.left,i.bottom)},children:[n===`context`?r:(0,R.jsx)(`button`,{type:`button`,"aria-label":`${e} actions`,title:`Artifact actions`,"aria-haspopup":`menu`,"aria-expanded":!!a,"aria-controls":a?i:void 0,className:`text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:ring-ring shrink-0 rounded-md p-1.5 transition outline-none focus-visible:ring-2`,onClick:e=>{if(a){m();return}g(e.currentTarget)},onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),g(e.currentTarget))},children:(0,R.jsx)(l_,{className:`size-4`,"aria-hidden":`true`})}),l&&!a&&(0,jN.createPortal)((0,R.jsxs)(`div`,{role:`alert`,className:`bg-popover text-popover-foreground fixed right-4 bottom-4 z-250 w-80 max-w-[calc(100vw-2rem)] rounded-md border p-3 shadow-md`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(`p`,{className:`text-destructive text-sm font-medium`,children:`Artifact deletion failed`}),(0,R.jsx)(`button`,{type:`button`,"aria-label":`Dismiss deletion error`,className:`text-muted-foreground hover:text-foreground focus-visible:ring-ring rounded-sm p-1 outline-none focus-visible:ring-2`,onClick:()=>{u(null),p.current?.focus({preventScroll:!0})},children:(0,R.jsx)(Fv,{className:`size-3.5`,"aria-hidden":`true`})})]}),(0,R.jsxs)(`p`,{className:`mt-1 text-sm wrap-break-word`,children:[e,`: `,l]}),(0,R.jsx)(`p`,{className:`text-muted-foreground mt-2 text-xs`,children:`Open the artifact menu to try again.`})]}),document.body),a&&(0,jN.createPortal)((0,R.jsxs)(`div`,{id:i,ref:f,role:`menu`,tabIndex:-1,"aria-label":`${e} actions`,className:`bg-popover text-popover-foreground fixed z-250 w-56 rounded-md border p-1 shadow-md`,style:{left:a.x,top:a.y},children:[(0,R.jsxs)(`button`,{type:`button`,role:`menuitem`,disabled:s,className:`text-destructive hover:bg-muted focus:bg-muted flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none disabled:opacity-50`,onClick:()=>void _(),children:[(0,R.jsx)(Dv,{className:`size-4`,"aria-hidden":`true`}),s?`Deleting…`:`Delete artifact`]}),l&&(0,R.jsx)(`p`,{role:`alert`,className:`px-2 py-1 text-xs`,children:l})]}),document.body)]})}zd([`markdown`,`html`,`react`]);function qP(e){return e.replace(/<\/(script)/gi,`<\\/$1`).replace(/<!--/g,`<\\!--`)}function JP(e,t){return`<!DOCTYPE html>
439
- <html lang="en">
440
- <head>
441
- <meta charset="utf-8" />
442
- <meta name="viewport" content="width=device-width, initial-scale=1" />
443
- ${e}</head>
444
- <body>
445
- ${t}
446
- </body>
447
- </html>`}function YP(e){return JP(`<style>
448
- html, body, #root { margin: 0; min-height: 100%; }
449
- body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
450
- #artifact-error { margin: 16px; padding: 12px; border: 1px solid #f87171; border-radius: 8px; color: #b91c1c; font: 13px/1.5 ui-monospace, monospace; white-space: pre-wrap; }
451
- </style>
452
- <script src="https://unpkg.com/@babel/standalone@7.26.5/babel.min.js"><\/script>
453
- <script>
454
- window.addEventListener('error', (event) => {
455
- const root = document.getElementById('root');
456
- if (!root || root.hasChildNodes()) return;
457
- const el = document.createElement('div');
458
- el.id = 'artifact-error';
459
- el.textContent = 'Artifact failed to render: ' + (event.message || 'unknown error');
460
- root.appendChild(el);
461
- });
462
- <\/script>
463
- `,`<div id="root"></div>
464
- <script type="module">
465
- import * as React from "https://esm.sh/react@19.1.0";
466
- import { createRoot } from "https://esm.sh/react-dom@19.1.0/client";
467
- window.React = React;
468
- window.createRoot = createRoot;
469
- window.exports = {};
470
- window.require = (name) => {
471
- if (name === 'react') return React;
472
- if (name === 'react-dom' || name === 'react-dom/client') return { createRoot };
473
- if (name === 'react/jsx-runtime')
474
- return { jsx: React.createElement, jsxs: React.createElement, Fragment: React.Fragment };
475
- throw new Error('Artifact previews cannot import "' + name + '"');
476
- };
477
- <\/script>
478
- <script type="text/babel" data-presets="react" data-plugins="transform-modules-commonjs">
479
- ${qP(e.trim())}
480
-
481
- const __root = document.getElementById('root');
482
- const __App = typeof App !== 'undefined' ? App : exports.default;
483
- if (!__App) {
484
- __root.textContent = 'React artifact must define a function/component named App.';
485
- } else {
486
- window.createRoot(__root).render(window.React.createElement(__App));
487
- }
488
- <\/script>`)}function XP(e){let t=e.trim();return/^<!DOCTYPE html>/i.test(t)||/^<html[\s>]/i.test(t)?t:JP(``,t)}function ZP(e,t){return e===`react`?YP(t):e===`html`?XP(t):null}function QP({title:e,artifactType:t,content:n,localPath:r,workspacePath:i,localError:a,variant:o=`card`,onOpenFullscreen:s,onBack:c,onDelete:l}){let u=(0,F.useMemo)(()=>ZP(t,n),[t,n]),[d,f]=(0,F.useState)(!1),[p,m]=(0,F.useState)(!1),h=(0,F.useRef)(null);async function g(){try{await navigator.clipboard.writeText(n),m(!0),h.current!==null&&clearTimeout(h.current),h.current=setTimeout(()=>{m(!1),h.current=null},1500)}catch{m(!1)}}(0,F.useEffect)(()=>()=>{h.current!==null&&clearTimeout(h.current)},[]);function _(t){return(0,R.jsxs)(`div`,{className:`relative min-h-0 flex-1 border-t`,children:[u&&!d?(0,R.jsx)(`iframe`,{title:`${e} preview`,srcDoc:u,sandbox:`allow-scripts`,className:`block w-full bg-white ${t}`}):u?(0,R.jsx)(`pre`,{className:`h-full overflow-auto p-3 pr-10 text-[13px] leading-6`,children:(0,R.jsx)(`code`,{children:n})}):(0,R.jsx)(`div`,{className:`h-full overflow-auto p-3 pr-10`,children:(0,R.jsx)(aP,{content:n,className:`text-foreground text-sm`,imageScope:{workspacePath:i,documentPath:r}})}),(0,R.jsx)(`button`,{type:`button`,className:`bg-card text-muted-foreground hover:text-foreground absolute top-2 right-2 rounded-md border p-1 transition`,"aria-label":p?`Copied`:`Copy`,onClick:()=>void g(),children:p?(0,R.jsx)(Ug,{className:`size-3.5`,"aria-hidden":`true`}):(0,R.jsx)(r_,{className:`size-3.5`,"aria-hidden":`true`})})]})}return(0,R.jsxs)(`div`,{className:o===`full`?`bg-card flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border`:`bg-card rounded-lg border`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[c?(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground shrink-0 transition`,onClick:c,"aria-label":`Back to artifacts`,children:(0,R.jsx)(kg,{className:`size-4`,"aria-hidden":`true`})}):null,(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-sm font-medium`,children:e}),(0,R.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-[11px]`,children:t})]}),r?(0,R.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate text-[11px]`,children:r}):null]}),u?(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground inline-flex shrink-0 items-center gap-1 rounded-md border px-2 py-1 text-[11px] transition`,onClick:()=>f(e=>!e),"aria-label":d?`Show preview`:`Show source`,children:d?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(__,{className:`size-3.5`,"aria-hidden":`true`}),`Preview`]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(t_,{className:`size-3.5`,"aria-hidden":`true`}),`Source`]})}):null,s?(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground shrink-0 transition`,onClick:s,"aria-label":`Open fullscreen`,title:`Open fullscreen`,children:(0,R.jsx)(j_,{className:`size-4`,"aria-hidden":`true`})}):null,l?(0,R.jsx)(KP,{title:e,trigger:`button`,onDelete:l}):null]}),a?(0,R.jsx)(`p`,{role:`alert`,className:`px-3 pb-2 text-[11px] text-amber-800 dark:text-amber-200`,children:a}):null,_(o===`full`?`h-full`:`h-64`)]})}var $P=`Browser sessions are not available yet.`,eF=async()=>{throw Error($P)},tF=async()=>{throw Error($P)};function nF(e){return`Closes by ${new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}`}function rF(e,t){return e instanceof Error&&e.message||t}function iF({liveView:e,active:t}){let[n,r]=(0,F.useState)(null),[i,a]=(0,F.useState)(null),o=e?.threadId,s=e?.id,c=e?.providerSessionId??null,l=e?.humanControl===!0,u=e?.url??null,d=e?.interactiveUrl??null,f=l&&d!==null,p=f?d:u,m=e?.ended===!0,h=o!=null,g=n!==null||m||d==null&&!l,_=e==null?null:nF(e.expiresAt),v=(()=>{let e=[];return _&&e.push(_),l&&!f&&e.push(`Waiting for the interactive view`),e.join(` · `)||null})(),y=l?`You have control`:t?`The agent is browsing`:`Browser session`,b=i!==null&&i.recordId===s&&i.providerId===c?i.message:null;(0,F.useEffect)(()=>{a(null)},[s,c]);async function x(e){if(!(o==null||g)){r(`control`),a(null);try{await eF()}catch(t){a({recordId:s,providerId:c,message:rF(t,e?`Couldn’t take control.`:`Couldn’t give control back.`)})}finally{r(null)}}}async function S(){if(!(s==null||m||n!==null)){r(`stop`),a(null);try{await tF()}catch(e){a({recordId:s,providerId:c,message:rF(e,`Couldn’t stop the browser session.`)})}finally{r(null)}}}return(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:e&&!m?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 border-b px-3 py-1.5`,children:[(0,R.jsx)(`span`,{className:`relative flex size-2 shrink-0`,"aria-hidden":`true`,children:l?(0,R.jsx)(`span`,{className:`relative inline-flex size-2 rounded-full bg-amber-500`}):t?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-500 opacity-60`}),(0,R.jsx)(`span`,{className:`relative inline-flex size-2 rounded-full bg-emerald-500`})]}):(0,R.jsx)(`span`,{className:`bg-muted-foreground/40 relative inline-flex size-2 rounded-full`})}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`span`,{role:`status`,className:`text-muted-foreground text-xs`,children:y}),v?(0,R.jsx)(`p`,{className:`text-muted-foreground text-[10px]`,children:v}):null]}),h?(0,R.jsx)(`button`,{type:`button`,className:`text-foreground hover:bg-muted rounded-md px-2 py-0.5 text-xs font-medium transition disabled:pointer-events-none disabled:opacity-50`,disabled:g,"aria-busy":n===`control`,onClick:()=>{x(!l)},children:n===`control`?l?`Giving control back…`:`Taking control…`:l?`Give control back`:`Take control`}):null,u?(0,R.jsx)(`a`,{href:u,target:`_blank`,rel:`noopener noreferrer`,className:`text-muted-foreground hover:text-foreground rounded-md p-1 transition`,"aria-label":`Open watch-only live view in a new tab`,title:`Open watch-only live view in a new tab`,children:(0,R.jsx)(p_,{className:`size-3.5`,"aria-hidden":`true`})}):null,(0,R.jsx)(`button`,{type:`button`,className:`flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:scale-105 hover:bg-rose-500 disabled:pointer-events-none disabled:opacity-60 disabled:hover:scale-100`,"aria-label":`Stop browser session`,title:`Stop browser session`,"aria-busy":n===`stop`,disabled:n!==null,onClick:()=>{S()},children:n===`stop`?(0,R.jsx)(V_,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}):(0,R.jsx)(yv,{className:`size-3 fill-current`,"aria-hidden":`true`})})]}),b?(0,R.jsx)(`p`,{className:`text-destructive border-b px-3 py-1.5 text-xs`,role:`alert`,children:b}):null,p?(0,R.jsx)(`iframe`,{src:p,title:f?`Agent browser (interactive)`:`Agent browser`,className:`min-h-0 w-full flex-1 border-0`,allow:`clipboard-read; clipboard-write`},p):(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-2 p-6 text-center`,children:[(0,R.jsx)(V_,{className:`text-muted-foreground size-5 animate-spin`,"aria-hidden":`true`}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Starting the live view…`}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`The agent is browsing in the meantime.`})]})]}):m||e===null?(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-2 p-6 text-center`,children:[(0,R.jsx)(N_,{className:`text-muted-foreground size-5`,"aria-hidden":`true`}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:`${m?`Browser session ended.`:`No active browser session.`} When the agent browses again, a new session will appear here.`})]}):(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center`,children:(0,R.jsx)(V_,{className:`text-muted-foreground size-5 animate-spin`,"aria-hidden":`true`})})})}var aF={markdown:C_,html:N_,react:y_},oF=[{id:`artifacts`,label:`Artifacts`},{id:`live`,label:`Live view`}];function sF({artifacts:e,workspacePath:t,onDeleteArtifact:n,selectedKey:r,tab:i,liveView:a,liveActive:o,expanded:s,stale:c=!1,error:l=null,onSelect:u,onBack:d,onTabChange:f,onOpenFullscreen:p,onToggleExpanded:m,onClose:h}){let g=e.find(e=>e.key===r)??null;function _(e){document.getElementById(`side-panel-tab-${e}`)?.focus()}function v(e){let t=oF.findIndex(e=>e.id===i),n=-1;e.key===`ArrowRight`?n=(t+1)%oF.length:e.key===`ArrowLeft`?n=(t-1+oF.length)%oF.length:e.key===`Home`?n=0:e.key===`End`&&(n=oF.length-1),n!==-1&&(e.preventDefault(),f(oF[n].id),_(oF[n].id))}return(0,F.useEffect)(()=>{if(!s)return;let e=e=>{e.key===`Escape`&&(document.fullscreenElement||document.querySelector(`[data-artifact-screen-fullscreen]`)||document.querySelector(`[data-image-viewer]`)||(e.preventDefault(),m()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,m]),(0,R.jsxs)(`aside`,{className:`bg-background flex h-full min-h-0 w-full flex-col ${s?``:`border-l`}`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1 border-b px-2 py-1.5`,children:[(0,R.jsx)(`div`,{role:`tablist`,"aria-label":`Side panel views`,className:`flex items-center gap-1`,children:oF.map(e=>(0,R.jsx)(`button`,{type:`button`,role:`tab`,id:`side-panel-tab-${e.id}`,"aria-controls":`side-panel-tabpanel`,"aria-selected":i===e.id,tabIndex:i===e.id?0:-1,className:`rounded-md px-2.5 py-1 text-xs font-medium transition ${i===e.id?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`}`,onClick:()=>f(e.id),onKeyDown:v,children:(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[e.id===`live`&&o&&i!==`live`?(0,R.jsx)(`span`,{className:`size-1.5 animate-pulse rounded-full bg-emerald-500`,"aria-hidden":`true`}):null,e.label]})},e.id))}),(0,R.jsx)(`div`,{className:`flex-1`}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground rounded-md p-1 transition`,onClick:m,"aria-label":s?`Exit full workspace`:`Expand to full workspace`,title:s?`Exit full workspace`:`Expand to full workspace`,"aria-pressed":s,children:s?(0,R.jsx)(pv,{className:`size-4`,"aria-hidden":`true`}):(0,R.jsx)(d_,{className:`size-4`,"aria-hidden":`true`})}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground rounded-md p-1 transition`,onClick:h,"aria-label":`Close panel`,children:(0,R.jsx)(Fv,{className:`size-4`,"aria-hidden":`true`})})]}),(0,R.jsx)(`div`,{role:`tabpanel`,id:`side-panel-tabpanel`,"aria-labelledby":`side-panel-tab-${i}`,className:`flex min-h-0 flex-1 flex-col`,children:i===`live`?(0,R.jsx)(iF,{liveView:a,active:o}):(0,R.jsxs)(R.Fragment,{children:[l||c?(0,R.jsxs)(`div`,{className:`space-y-1 border-b px-3 py-2`,children:[l?(0,R.jsx)(`p`,{role:`alert`,className:`text-xs text-amber-800 dark:text-amber-200`,children:l}):null,c?(0,R.jsx)(`p`,{role:`status`,className:`text-muted-foreground text-xs`,children:`Showing last known artifacts while Sprocket reconnects.`}):null]}):null,g?(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col p-3`,children:(0,R.jsx)(QP,{title:g.title,artifactType:g.artifactType,content:g.content,localPath:g.localPath,workspacePath:t,localError:g.localError,variant:`full`,onOpenFullscreen:()=>p(g.key),onBack:d,onDelete:n?()=>n(g.key):void 0})}):(0,R.jsx)(`div`,{className:`min-h-0 flex-1 space-y-0.5 overflow-y-auto p-2`,children:e.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground p-3 text-sm`,children:`No artifacts yet.`}):e.map(e=>{let t=aF[e.artifactType];return(0,R.jsxs)(`div`,{className:`group hover:bg-muted focus-within:bg-muted flex items-center gap-2 rounded-md px-2 py-1.5`,children:[(0,R.jsx)(KP,{trigger:`context`,title:e.title,onDelete:n?()=>n(e.key):void 0,children:(0,R.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-2 text-left`,onClick:()=>u(e.key),children:[(0,R.jsx)(t,{className:`text-muted-foreground size-3.5 shrink-0`,"aria-hidden":`true`}),(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-sm`,children:e.title}),(0,R.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-[11px]`,children:e.artifactType})]}),(0,R.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate text-[11px]`,children:e.localPath??`Stored in cloud`}),e.localError?(0,R.jsx)(`span`,{className:`text-[11px] text-amber-800 dark:text-amber-200`,children:e.localError}):null]})]})}),(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground shrink-0 opacity-0 transition group-focus-within:opacity-100 group-hover:opacity-100 focus:opacity-100`,onClick:()=>p(e.key),"aria-label":`Open ${e.title} fullscreen`,title:`Open fullscreen`,children:(0,R.jsx)(j_,{className:`size-3.5`,"aria-hidden":`true`})})]},e.key)})})]})})]})}function cF({artifact:e,workspacePath:t,onClose:n}){let r=(0,F.useMemo)(()=>ZP(e.artifactType,e.content),[e.artifactType,e.content]),i=(0,F.useRef)(null),[a,o]=(0,F.useState)(!1),s=(0,F.useRef)(n);return(0,F.useLayoutEffect)(()=>{s.current=n},[n]),(0,F.useEffect)(()=>{let e=i.current;if(!e)return;let t=!0,n=!!document.fullscreenElement,r=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>{t&&(t=!1,s.current())},c=()=>{if(document.fullscreenElement){n=!0,o(!1);return}if(n){if(document.querySelector(`[data-image-viewer]`)){n=!1,o(!0);return}a()}},l=e=>{document.querySelector(`[data-image-viewer]`)||e.key===`Escape`&&(e.stopImmediatePropagation(),!(document.fullscreenElement||n)&&(e.preventDefault(),a()))};document.addEventListener(`fullscreenchange`,c),window.addEventListener(`keydown`,l,!0),queueMicrotask(()=>{t&&e.focus()});let u=window.setTimeout(()=>{t&&!document.fullscreenElement&&o(!0)},250);return()=>{t=!1,window.clearTimeout(u),document.removeEventListener(`fullscreenchange`,c),window.removeEventListener(`keydown`,l,!0),document.fullscreenElement&&document.exitFullscreen?.().catch(()=>{});let e=r;queueMicrotask(()=>{e?.isConnected&&e.focus()})}},[]),(0,R.jsxs)(`div`,{ref:i,"data-artifact-screen-fullscreen":``,className:`bg-background fixed inset-0 z-200 flex h-screen w-screen flex-col outline-none`,role:`dialog`,"aria-modal":`true`,"aria-label":`${e.title} fullscreen. Press Escape to exit.`,tabIndex:-1,children:[r?(0,R.jsx)(`iframe`,{title:`${e.title} preview`,srcDoc:r,sandbox:`allow-scripts`,className:`block h-full w-full flex-1 bg-white`}):(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-6`,children:(0,R.jsx)(aP,{content:e.content,className:`text-foreground text-sm`,imageScope:{workspacePath:t,documentPath:e.localPath}})}),a?(0,R.jsx)(`button`,{type:`button`,className:`bg-background/90 text-muted-foreground hover:text-foreground absolute top-3 right-3 z-10 rounded-md border p-2 transition`,onClick:n,"aria-label":`Exit fullscreen`,children:(0,R.jsx)(Fv,{className:`size-4`,"aria-hidden":`true`})}):null]})}var lF={artifacts:[],stale:!1,error:null};function uF(e){return[e.userId,e.repositoryKey,e.workspacePath].join(`\0`)}function dF(e){return{key:e._id,title:e.title,artifactType:e.type,content:e.content,localPath:e.localPath,localError:e.localError}}function fF(e){return!e.aborted&&e.generation===e.currentGeneration&&e.currentScopeKey===e.eventScopeKey}function pF(e){return{artifacts:e.artifacts,stale:e.stale,error:e.error??null}}function mF(e,t){let n=new Map(e.artifacts.map(e=>[e._id,e]));for(let r of t?.artifacts??[])(e.stale||n.has(r._id))&&(r.localPath||!n.has(r._id))&&n.set(r._id,r);return{artifacts:[...n.values()],stale:e.stale&&(!t||t.stale),error:t?.error??e.error}}function hF(e,t,n){let{userId:r,...i}=t,a=!1,o=0,s,c=[];async function l(t){try{let s=[],l=null,u;for(;;){let n=await e.query(Jp.artifacts.listArtifacts,{...i,cursor:l});if(a||o!==t)return;if(u!==void 0&&u!==n.revision)throw Error(`Artifact registry changed during loading; retrying.`);if(u=n.revision,s.push(...n.page.filter(e=>e.userId===r)),n.isDone)break;if(l===n.continueCursor)throw Error(`Artifact page cursor did not advance.`);l=n.continueCursor}c=s,n({artifacts:s,stale:!1,error:null})}catch(e){if(a||o!==t)return;n({artifacts:c,stale:!0,error:e instanceof Error?e.message:`Unable to load artifacts.`}),s=setTimeout(()=>{l(t)},2e3)}}let u=e.onUpdate(Jp.artifacts.getArtifactState,{repositoryKey:t.repositoryKey},()=>{clearTimeout(s),l(++o)},e=>{o++,clearTimeout(s),c=[],n({artifacts:[],stale:!0,error:e.message})});return()=>{a=!0,clearTimeout(s),u()}}var gF={open:!1,expanded:!1,tab:`artifacts`,selectedKey:null},_F=class{watchState={...lF};panel={...gF};fullscreenKey=null;#e=0;#t=null;#n=new Map;#r=null;#i=0;#a=new Set;getSnapshot=()=>this.#i;subscribe=e=>(this.#a.add(e),()=>{this.#a.delete(e)});get artifacts(){return this.watchState.artifacts.map(dF)}get fullscreenArtifact(){return this.artifacts.find(e=>e.key===this.fullscreenKey)??null}selectScope(e){let t=e?uF(e):null;t!==this.#r&&(this.#r&&this.#n.set(this.#r,this.panel),this.#r=t,this.fullscreenKey=null,this.panel={...t&&this.#n.get(t)||gF},this.#o())}watch(e){let t=++this.#e;if(this.watchState={...lF},this.#o(),!e.scope){this.#t=null;return}let n=uF(e.scope);this.#t=n;let r=new AbortController,i={artifacts:[],stale:!0,error:null},a=null,o=()=>{r.signal.aborted||t!==this.#e||(this.watchState=mF(i,a),this.#o())},s={userId:e.scope.userId,repositoryKey:e.scope.repositoryKey},c=e.cloudReady?hF(e.artifactClient,s,e=>{i=e,o()}):()=>{};return this.#s(e.localApi,e.scope.workspacePath,e.scope,{ac:r,generation:t,scopeKey:n,setLocal:e=>{a=e,o()}}),()=>{r.abort(),c()}}reset(){this.#n.clear(),this.#r=null,this.#t=null,this.panel={...gF},this.fullscreenKey=null,this.#o()}update(e){this.panel={...this.panel,...e},this.#o()}setFullscreenKey(e){this.fullscreenKey!==e&&(this.fullscreenKey=e,this.#o())}#o(){this.#i+=1;for(let e of this.#a)e()}async#s(e,t,n,r){if(e&&t)for(;!r.ac.signal.aborted;)await e.watchArtifacts(n,{signal:r.ac.signal,onEvent:e=>{fF({aborted:r.ac.signal.aborted,generation:r.generation,currentGeneration:this.#e,eventScopeKey:r.scopeKey,currentScopeKey:this.#t})&&r.setLocal(pF(e))}}).catch(()=>void 0),!r.ac.signal.aborted&&r.generation===this.#e&&this.#t===r.scopeKey&&r.setLocal(null),r.ac.signal.aborted||await new Promise(e=>setTimeout(e,1e3))}};function vF(){let[e]=(0,F.useState)(()=>new _F);return Wm(e),e}function yF(e){return{query:(t,n)=>e.query(t,n),onUpdate:(t,n,r,i)=>{let a=e.watchQuery(t,n),o=()=>{try{let e=a.localQueryResult();e!==void 0&&r(e)}catch(e){i(e instanceof Error?e:Error(String(e)))}};return o(),a.onUpdate(o)}}}function bF(e){return e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`.\\`)||e.startsWith(`..\\`)||e.startsWith(`/`)||e.startsWith(`\\`)||e.startsWith(`~/`)||e===`~`||/^[a-zA-Z]:([\\/]|$)/.test(e)}function xF(e){if(e.endsWith(`/`)||e.endsWith(`\\`))return e;let t=e.lastIndexOf(`/`),n=e.lastIndexOf(`\\`),r=Math.max(t,n);return r<0?e:e.slice(0,r+1)}function SF(e){let t=xF(e);return e.slice(t.length)}function CF(e){return!e||EF(e)?e:`${e}${TF(e)}`}function wF(e){let t=e.trim();return t===`/`||t===`\\`||/^[a-zA-Z]:?$/.test(t)||/^[\\/][a-zA-Z]:?$/.test(t)}function TF(e){return e.includes(`\\`)||/^[a-zA-Z]:$/.test(e)?`\\`:`/`}function EF(e){return/[\\/]$/.test(e)}function DF(e){return e.replace(/[\\/]+$/,``)}function OF(e){if(!e.leaf)return;let t=e.browseEntries.find(t=>t.name!==`..`&&t.name===e.leaf);if(t)return t.fullPath;if(e.browseParentPath){let t=e.browseParentPath.split(/[/\\]/).filter(Boolean).at(-1);if(t&&t.toLowerCase()===e.leaf.toLowerCase())return e.browseParentPath}}function kF(e){let t=e.query.trim();return t?EF(t)?e.browseParentPath||DF(t):OF({leaf:SF(t),browseParentPath:e.browseParentPath,browseEntries:e.browseEntries})??t:``}function AF(e){let t=e.query.trim();if(!t||EF(t))return!1;let n=SF(t);return n?OF({leaf:n,browseParentPath:e.browseParentPath,browseEntries:e.browseEntries})===void 0:!1}function jF({open:e,desktopApi:t,mode:n=`add`,expectedDisplayName:r,recentProjectPaths:i=[],onClose:a,onSelect:o}){let[s,c]=(0,F.useState)(`~/`),[l,u]=(0,F.useState)([]),[d,f]=(0,F.useState)(``),[p,m]=(0,F.useState)(!1),[h,g]=(0,F.useState)(null),[_,v]=(0,F.useState)(!1),[y,b]=(0,F.useState)(!1),[x,S]=(0,F.useState)(null),[C,w]=(0,F.useState)(null),[T,E]=(0,F.useState)(!1),D=(0,F.useRef)(`~/`),ee=(0,F.useRef)(!1),O=(0,F.useRef)(null),te=(0,F.useRef)(null),ne=(0,F.useRef)(0),re=(0,F.useRef)(null),ie=(0,F.useRef)(!1),k=(0,F.useCallback)(e=>{D.current=e,c(e)},[]),ae=(0,F.useCallback)(e=>{ee.current=e,m(e)},[]),A=(0,F.useCallback)(async e=>{let n=++ne.current;re.current=e,v(!0);try{let r=await t.browseFilesystem({partialPath:e.trim().length>0?e:`~/`});if(n!==ne.current||e!==D.current)return;f(r.parentPath),u(r.entries),ae(r.volumeList===!0),w(e),S(null)}catch(t){if(n!==ne.current||e!==D.current)return;f(``),u([]),ae(!1),w(e),re.current=null,S(t instanceof Error?t.message:`Failed to browse directories.`)}finally{n===ne.current&&v(!1)}},[t,ae]),oe=SF(s).toLowerCase(),se=s===C,ce=se?d:``,le=se?l:[],ue=(0,F.useMemo)(()=>{if(!se)return[];if(p){let e=s.trim().replace(/^[\\/]+/,``).toLowerCase();return l.filter(t=>t.name.toLowerCase().startsWith(e)||t.fullPath.toLowerCase().startsWith(e))}let e=oe.startsWith(`.`);return l.filter(t=>t.name!==`..`&&t.name.toLowerCase().startsWith(oe)&&(e||!t.name.startsWith(`.`)))},[se,p,s,l,oe]),de=s.trim(),fe=kF({query:s,browseParentPath:ce,browseEntries:le}),pe=AF({query:s,browseParentPath:ce,browseEntries:le}),me=se&&!p&&!x&&fe.length>0&&(bF(de)||ce.length>0),he=n===`reconnect`?`Reconnect`:pe?`Create & add`:`Add`,ge=le.find(e=>e.name===`..`),_e=(0,F.useMemo)(()=>{if(ue.length>0)return ue;let e=SF(s).replace(/[\\/]+$/,``);if(!e||oe.length===0)return ue;let t=ce.split(/[/\\]/).filter(Boolean).at(-1);return t&&t.toLowerCase()===e.toLowerCase()?[{name:t,fullPath:ce}]:ue},[ue,s,oe,ce]),ve=_||!se?`Loading directories…`:p?`Select a drive.`:fe.length>0&&!pe?n===`reconnect`?`Press Ctrl+Enter to reconnect this directory.`:`Press Ctrl+Enter to add this directory.`:pe?n===`reconnect`?`Press Ctrl+Enter to create and reconnect this directory.`:`Press Ctrl+Enter to create and add this directory.`:`No matching directories in this path.`,ye=_e.findIndex(e=>e.fullPath===h),j=ye<0?void 0:_e[ye];(0,F.useEffect)(()=>{if(!e){E(!1);return}T||(E(!0),k(`~/`),g(null),S(null),ae(!1),w(null),A(`~/`))},[e,T,A,k,ae]),(0,F.useEffect)(()=>{T&&O.current?.focus()},[T]),(0,F.useEffect)(()=>{if(!e||!T)return;let t=s;if(t===re.current)return;let n=window.setTimeout(()=>{ee.current&&wF(t)||A(t)},180);return()=>{window.clearTimeout(n)}},[e,T,s,A]),(0,F.useEffect)(()=>{e&&!_&&_e.length!==0&&(_e.some(e=>e.fullPath===h)||g(_e[0]?.fullPath??null))},[e,_,_e,h]),(0,F.useEffect)(()=>{e&&ie.current&&(ie.current=!1,(te.current?.querySelector(`[aria-selected="true"]`))?.scrollIntoView?.({block:`nearest`}))},[e,h,_e]);function M(e){let t=CF(e.fullPath);k(t),g(null),A(t)}function be(e){let t=CF(e.workspacePath);k(t),g(e.workspacePath),A(t)}async function xe(){if(p)return;let e=fe;if(!e){S(`Enter a project directory path.`);return}b(!0),S(null);try{let n=await t.resolveWorkspacePath({workspacePath:e,createIfMissing:pe});await o({workspacePath:n.workspacePath,displayName:n.displayName,repositoryKey:n.repositoryKey}),a()}catch(e){S(e instanceof Error?e.message:`Failed to open the selected project.`)}finally{b(!1)}}function N(e){if(_e.length===0)return;let t=((ye<0?e===1?-1:0:ye)+e+_e.length)%_e.length;ie.current=!0,g(_e[t]?.fullPath??null)}function Se(){ge&&!_&&M(ge)}function Ce(e){return e.target instanceof HTMLInputElement?oe.length===0:!0}function we(e){if(!(e.defaultPrevented||e.nativeEvent.isComposing)){if(e.key===`Escape`){e.preventDefault(),a();return}if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&me&&!y){e.preventDefault(),xe();return}if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)&&!_){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),N(e.key===`ArrowDown`?1:-1);return}if(e.key===`Enter`&&j){if(e.target instanceof Element&&e.target.closest(`[data-project-submit]`))return;e.preventDefault(),M(j);return}e.key===`Backspace`&&ge&&Ce(e)&&(e.preventDefault(),Se())}}}return e?(0,R.jsx)(`div`,{className:`bg-overlay fixed inset-0 z-50 flex items-start justify-center px-4 pt-[7vh] backdrop-blur-[2px]`,role:`presentation`,onClick:e=>{e.target===e.currentTarget&&a()},children:(0,R.jsxs)(`div`,{className:`border-border bg-popover text-foreground flex h-[min(34rem,80vh)] w-full max-w-3xl min-w-0 flex-col overflow-hidden rounded-[1.4rem] border shadow-2xl`,role:`dialog`,"aria-modal":`true`,"aria-label":n===`reconnect`?`Reconnect project`:`Add project`,tabIndex:-1,onKeyDown:we,children:[(0,R.jsxs)(`header`,{className:`flex-none px-4 pt-3 pb-2`,children:[(0,R.jsxs)(`div`,{className:`flex min-h-10 items-center gap-1.5`,children:[(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground hover:bg-hover-fill flex size-8 shrink-0 items-center justify-center rounded-lg transition disabled:pointer-events-none disabled:opacity-30`,"aria-label":`Go to parent directory`,disabled:!ge||_,onClick:Se,children:(0,R.jsx)(kg,{className:`size-4`,strokeWidth:2})}),(0,R.jsx)(`input`,{className:`text-foreground placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent py-2 text-base outline-none`,ref:O,value:s,onChange:e=>k(e.currentTarget.value),placeholder:`Enter a project path`,"aria-label":`Project directory path`,"aria-controls":`project-picker-directories`,"aria-activedescendant":ye<0?void 0:`project-picker-directory-${ye}`,"aria-autocomplete":`list`,"aria-expanded":`true`,role:`combobox`,autoComplete:`off`,spellCheck:!1}),_&&(0,R.jsx)(V_,{className:`text-muted-foreground pointer-events-none size-4 shrink-0 animate-spin`}),(0,R.jsxs)(`button`,{type:`button`,className:`border-border text-foreground bg-hover-fill hover:bg-hover-fill-strong flex shrink-0 items-center gap-1.5 rounded-lg border px-2.5 py-1 text-sm transition disabled:cursor-not-allowed disabled:opacity-40`,"data-project-submit":!0,disabled:!me||y,onClick:()=>{xe()},children:[(0,R.jsx)(`span`,{children:y?`Working…`:he}),!y&&(0,R.jsx)(`kbd`,{className:`text-muted-foreground font-sans text-xs`,children:`Ctrl Enter`})]})]}),n===`reconnect`&&r&&(0,R.jsxs)(`p`,{className:`text-muted-foreground px-9 pb-1 text-xs`,children:[`Reconnect `,(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:r}),` to a local directory`]})]}),i.length>0&&(0,R.jsx)(`div`,{className:`border-hairline flex flex-wrap gap-1.5 border-b px-5 py-2`,children:i.map(e=>(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground hover:bg-hover-fill rounded-md px-2 py-0.5 text-[11px] transition`,onClick:()=>{be(e)},children:e.displayName},e.workspacePath))}),(0,R.jsx)(`div`,{className:`text-muted-foreground flex-none px-6 pt-3 pb-1 text-sm`,children:`Directories`}),(0,R.jsx)(`div`,{id:`project-picker-directories`,className:`min-h-0 flex-1 overflow-y-auto px-2 pb-2`,ref:te,role:`listbox`,"aria-label":`Directories`,"aria-busy":_,children:_e.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground px-3 py-8 text-center text-sm`,children:ve}):_e.map((e,t)=>(0,R.jsxs)(`button`,{id:`project-picker-directory-${t}`,type:`button`,className:`flex min-h-10 w-full items-center gap-2.5 rounded-lg px-3 py-1.5 text-left text-base transition ${h===e.fullPath?`text-foreground bg-hover-fill-strong`:`text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`,role:`option`,"aria-selected":h===e.fullPath,onClick:()=>{M(e)},onPointerMove:()=>{g(e.fullPath)},children:[(0,R.jsx)(k_,{className:`text-muted-foreground size-5 shrink-0`,strokeWidth:1.8}),(0,R.jsx)(`span`,{className:`truncate`,children:e.name})]},e.fullPath))}),x&&(0,R.jsx)(`p`,{className:`text-destructive border-t border-rose-500/20 bg-rose-500/10 px-3 py-2 text-sm`,children:x}),(0,R.jsx)(`footer`,{className:`text-muted-foreground border-hairline flex-none border-t px-5 py-3 text-sm`,children:(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`kbd`,{className:`shortcut-key`,children:`↑`}),(0,R.jsx)(`kbd`,{className:`shortcut-key`,children:`↓`}),` Navigate`]}),(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`kbd`,{className:`shortcut-key`,children:`Enter`}),` Select`]}),(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`kbd`,{className:`shortcut-key`,children:`Backspace`}),` Back`]}),(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`kbd`,{className:`shortcut-key`,children:`Esc`}),` Close`]})]})})]})}):null}function MF(e){return e.map(e=>P.literal(e))}var NF=P.union(...MF(Ob)),PF=P.union(...MF([`spikonado`,`openai`,`chatgpt`]));P.string(),P.union(P.literal(`monthly`),P.literal(`annual`)),P.union(P.literal(`test`),P.literal(`live`)),P.union(P.literal(`active`),P.literal(`on_hold`),P.literal(`cancelled`),P.literal(`expired`),P.literal(`failed`)),P.union(P.literal(`awaiting_payment`),P.literal(`pending`),P.literal(`succeeded`),P.literal(`failed`),P.literal(`expired`),P.literal(`unknown`));var FF=P.object({path:P.string(),directory:P.string(),contents:P.string(),truncated:P.boolean()}),IF=P.object({patch:P.string()}),LF=P.object({cmd:P.string(),workdir:P.optional(P.string()),shell:P.optional(P.string()),timeoutMs:P.optional(P.number()),yieldTimeMs:P.optional(P.number()),maxOutputChars:P.optional(P.number())}),RF=P.object({url:P.string()}),zF=RF.pick(`url`),BF=P.object({query:P.string(),numResults:P.optional(P.number())}),VF=P.object({sessionId:P.string(),chars:P.optional(P.string()),terminate:P.optional(P.boolean()),yieldTimeMs:P.optional(P.number())}),HF=P.object({sessionId:P.string(),action:P.union(P.literal(`write`),P.literal(`terminate`)),chars:P.optional(P.string()),yieldTimeMs:P.optional(P.number())}),UF=VF.pick(`sessionId`,`yieldTimeMs`),WF=P.union(P.literal(`markdown`),P.literal(`html`),P.literal(`react`)),GF=P.union(P.literal(`thread`),P.literal(`project`)),KF=P.object({scope:P.optional(GF)}),qF=P.object({artifactId:P.string()}),JF=P.object({title:P.string(),contentType:WF,content:P.string()}),YF=P.object({artifactId:P.string(),content:P.string()}),XF=P.object({name:P.string()}),ZF=P.object({instruction:P.optional(P.string()),action:P.optional(P.object({selector:P.string(),description:P.string(),method:P.optional(P.string()),arguments:P.optional(P.array(P.string()))})),startUrl:P.optional(P.string())}),QF=P.object({command:P.string(),enforce_saving:P.optional(P.boolean())}),$F=P.union(...MF([`one_time`,`weekly`,`monthly`,`yearly`])),eI=P.union(P.literal(`listed`),P.literal(`any`)),tI=P.union(...MF([`pending`,`active`,`paused`,`consumed`,`cancelled`,`expired`]));P.union(P.literal(`awaiting_result`),P.literal(`completed`),P.literal(`declined`),P.literal(`failed`));var nI=P.union(P.literal(`approved`),P.literal(`declined`)),rI=P.object({userEmail:P.optional(P.string()),merchantName:P.optional(P.string()),merchantUrl:P.optional(P.string()),countryCode:P.optional(P.string()),amountCap:P.string(),currency:P.string(),frequency:$F,scope:eI,description:P.string(),maxCharges:P.optional(P.number()),validUntil:P.optional(P.string())}),iI=P.object({mandateId:P.string()}),aI=P.object({mandateId:P.string(),amount:P.string(),currency:P.string(),description:P.string(),reference:P.optional(P.string())}),oI=P.object({chargeId:P.string(),outcome:nI,amountPaid:P.optional(P.string())}),sI=P.object({id:P.string(),label:P.string()}),cI=P.object({question:P.string(),options:P.array(sI),yieldTimeMs:P.optional(P.number()),timeoutMs:P.optional(P.union(P.number(),P.null()))}),lI=P.object({questionId:P.id(`agentQuestions`),yieldTimeMs:P.optional(P.number())}),uI=P.union(P.object({path:P.string()}),P.object({url:P.string()})),dI=P.object({threadId:P.optional(P.id(`threadRecords`)),prompt:P.string(),model:P.optional(P.string()),reasoning:P.optional(P.string()),fast:P.optional(P.boolean()),yieldTimeMs:P.optional(P.number()),timeoutMs:P.optional(P.number())}),fI=dI.partial().extend({threadId:P.id(`threadRecords`),action:P.union(P.literal(`send`),P.literal(`stop`),P.literal(`answer_question`)),questionId:P.optional(P.id(`agentQuestions`)),optionId:P.optional(P.string()),text:P.optional(P.string())}),pI=P.object({threadId:P.id(`threadRecords`),cursor:P.optional(P.string()),yieldTimeMs:P.optional(P.number())}),mI=P.object({parentThreadId:P.optional(P.id(`threadRecords`)),cursor:P.optional(P.string())}),hI=P.union(P.object({}),uI,dI,fI,pI,mI,IF,cI,lI,LF,XF,RF,zF,BF,VF,HF,UF,KF,qF,JF,YF,rI,iI,aI,oI);P.union(hI,ZF,QF);var gI=P.object({changes:P.array(P.object({path:P.string(),source:P.optional(P.string()),operation:P.union(P.literal(`created`),P.literal(`updated`),P.literal(`deleted`),P.literal(`renamed`),P.literal(`copied`))}))}),_I=P.object({command:P.string(),cwd:P.string(),output:P.string(),sessionId:P.optional(P.string()),exitCode:P.optional(P.number()),success:P.boolean(),running:P.boolean(),timedOut:P.boolean(),truncated:P.boolean(),error:P.optional(P.string())}),vI=P.object({output:P.string(),exitCode:P.optional(P.number()),success:P.boolean(),running:P.boolean(),timedOut:P.boolean(),completeLogPath:P.string(),eventsPath:P.string(),error:P.optional(P.string())}),yI=vI.extend({sessionId:P.optional(P.string())}),bI=vI.extend({command:P.string(),workdir:P.string()}),xI=P.object({url:P.string(),markdown:P.string(),truncated:P.optional(P.boolean()),summary:P.optional(P.string()),images:P.optional(P.array(P.string()))});P.union(P.object({url:P.string(),markdown:P.string(),summary:P.string(),images:P.array(P.string())}),P.object({url:P.string(),summary:P.string(),scrapeUrl:P.string()})),P.object({url:P.string(),screenshotUrl:P.string()});var SI=P.object({outputType:P.literal(`image`),url:P.string(),path:P.string(),mediaType:P.string(),byteSize:P.number(),width:P.number(),height:P.number()}),CI=P.object({results:P.array(P.object({title:P.optional(P.string()),url:P.string(),publishedDate:P.optional(P.string()),author:P.optional(P.string()),text:P.optional(P.string())}))}),wI=P.object({mandateId:P.id(`mandates`),approvalUrl:P.string(),expiresAt:P.string()}),TI=P.object({mandateId:P.id(`mandates`),pravaMandateId:P.optional(P.string()),status:tI,description:P.optional(P.string()),merchantName:P.optional(P.string()),amountCap:P.string(),remaining:P.optional(P.string()),currency:P.string(),frequency:$F,scope:eI,approvalUrl:P.optional(P.string()),validUntil:P.optional(P.string()),renewsAt:P.optional(P.string())}),EI=P.object({mandates:P.array(P.object({mandateId:P.optional(P.id(`mandates`)),pravaMandateId:P.string(),status:P.string(),description:P.optional(P.string()),merchantName:P.optional(P.string()),approvedAmount:P.string(),remaining:P.optional(P.string()),currency:P.string(),validUntil:P.optional(P.string()),renewsAt:P.optional(P.string())}))}),DI=P.object({chargeId:P.id(`mandateCharges`),transactionId:P.string(),token:P.optional(P.string()),dynamicCvv:P.optional(P.string()),expiryMonth:P.optional(P.string()),expiryYear:P.optional(P.string())}),OI=P.object({reported:P.boolean(),alreadyReported:P.optional(P.boolean()),inFlight:P.optional(P.boolean())}),kI=P.object({text:P.string(),truncated:P.boolean()}),AI=P.object({mediaType:P.literal(`image/png`),dataBase64:P.string(),byteLength:P.number(),truncated:P.boolean(),url:P.optional(P.string())}),jI=SI.omit(`url`).extend({mediaType:P.literal(`image/png`)}),MI=P.object({selector:P.string(),description:P.string(),method:P.optional(P.string()),arguments:P.optional(P.array(P.string()))}),NI=P.object({actions:P.array(MI),text:P.string(),truncated:P.boolean()}),PI=P.object({name:P.string(),description:P.string(),content:P.string(),dir:P.optional(P.string()),truncated:P.optional(P.boolean())}),FI=P.object({optionId:P.optional(P.string()),optionLabel:P.optional(P.string()),text:P.optional(P.string())}),II=P.object({pending:P.boolean(),timedOut:P.boolean(),answer:P.optional(FI)}),LI=II.extend({questionId:P.id(`agentQuestions`),question:P.optional(P.string()),options:P.optional(P.array(sI))}),RI=P.union(P.literal(`queued`),P.literal(`running`),P.literal(`completed`),P.literal(`failed`),P.literal(`cancelled`));P.object({queued:P.number(),running:P.number(),completed:P.number(),failed:P.number(),cancelled:P.number()});var zI=P.object({model:P.string(),reasoning:NF,fast:P.boolean(),completionProvider:PF}),BI=P.object({questionId:P.id(`agentQuestions`),question:P.string(),options:P.array(sI)}),VI=P.union(P.object({type:P.literal(`prompt`),id:P.string(),text:P.string()}),P.object({type:P.literal(`text`),id:P.string(),text:P.string()}),P.object({type:P.literal(`patch`),id:P.string(),ok:P.boolean(),changes:P.array(P.object({operation:P.string(),path:P.string(),sourcePath:P.optional(P.string())}))})),HI=P.object({status:RI,lastError:P.optional(P.union(P.string(),P.null())),pendingQuestions:P.array(BI)}),UI=HI.extend({entries:P.array(VI),nextCursor:P.string(),hasMore:P.boolean()}),WI={threadId:P.id(`threadRecords`),settings:zI},GI=P.union(HI.extend(WI),UI.extend(WI)),KI={answer:P.optional(FI),alreadyAnswered:P.optional(P.literal(!0))},qI=P.union(GI,HI.extend(KI),UI.extend(KI)),JI=P.object({children:P.array(P.object({threadId:P.id(`threadRecords`),parentThreadId:P.id(`threadRecords`),title:P.optional(P.union(P.string(),P.null())),status:RI,lastError:P.optional(P.union(P.string(),P.null())),settings:zI})),nextCursor:P.union(P.string(),P.null()),hasMore:P.boolean()}),YI=P.object({defaultModelId:P.string(),defaultFast:P.boolean(),models:P.array(P.object({id:P.string(),label:P.string(),reasoningEfforts:P.array(P.string()),defaultReasoningEffort:P.string(),serviceTiers:P.array(P.string()),supportsImages:P.boolean()}))}),XI=P.object({artifactId:P.string(),revision:P.optional(P.number()),scope:P.optional(GF),title:P.optional(P.string()),contentType:P.optional(WF),version:P.optional(P.number())}),ZI=P.object({artifacts:P.array(P.object({artifactId:P.string(),scope:P.optional(GF),repositoryKey:P.string(),threadId:P.optional(P.id(`threadRecords`)),type:WF,title:P.string(),revision:P.number(),createdAt:P.number(),updatedAt:P.number()}))}),QI=P.union(P.object({type:P.literal(`path`),path:P.string()}),P.object({type:P.literal(`url`),url:P.string()})),$I=P.union(P.object({outputType:P.literal(`image`),mediaType:P.string(),path:P.string(),source:QI,byteSize:P.number(),width:P.number(),height:P.number()}),P.object({outputType:P.literal(`text`),path:P.string(),source:QI,format:P.string(),charCount:P.number(),preview:P.string(),truncated:P.boolean()}));P.union(P.string(),$I,P.array(FF),gI,LI,II,GI,qI,UI,JI,YI,yI,bI,_I,PI,xI,SI,CI,XI,ZI,kI,AI,jI,NI,wI,TI,EI,DI,OI);var eL=[`cancelled`,`completed`,`failed`];P.union(...MF(eL));function tL(e){return eL.some(t=>t===e)}var nL=P.union(P.literal(`apply_patch`),P.literal(`ask_question`),P.literal(`poll_question`),P.literal(`await_question`),P.literal(`exec_cmd`),P.literal(`exec_command`),P.literal(`get_workspace_instructions`),P.literal(`mandate_setup`),P.literal(`mandate_status`),P.literal(`mandate_list`),P.literal(`mandate_charge`),P.literal(`mandate_report`),P.literal(`read_skill`),P.literal(`parse_file`),P.literal(`scrape_url`),P.literal(`screenshot_url`),P.literal(`web_search`),P.literal(`write_stdin`),P.literal(`control_cmd`),P.literal(`control_command`),P.literal(`poll_cmd`),P.literal(`poll_command`),P.literal(`add_artifact`),P.literal(`list_artifacts`),P.literal(`list_subagent_models`),P.literal(`list_subagents`),P.literal(`edit_artifact`),P.literal(`delete_artifact`),P.literal(`save_artifact`),P.literal(`spawn_subagent`),P.literal(`control_subagent`),P.literal(`poll_subagent`)),rL=P.union(nL,P.literal(`browser_interact`),P.literal(`browser_screenshot`),P.literal(`browser_observe`),P.literal(`browser_act`),P.literal(`browser_extract`));P.union(rL,P.literal(`create_artifact`),P.literal(`update_artifact`)),P.union(P.literal(`pending`),P.literal(`answered`),P.literal(`timedOut`),P.literal(`cancelled`)),P.union(P.literal(`pending`),P.literal(`claimed`),P.literal(`completed`),P.literal(`failed`),P.literal(`cancelled`));var iL=P.optional(P.union(P.number(),P.null())),aL=P.object({type:P.literal(`text`),id:P.string(),text:P.string(),startedAt:iL,completedAt:iL,turnId:P.optional(P.string()),providerMetadata:P.optional(iC)}),oL=P.object({type:P.literal(`reasoning`),id:P.string(),text:P.string(),startedAt:iL,completedAt:iL,turnId:P.optional(P.string()),providerMetadata:P.optional(iC)}),sL=P.object({type:P.literal(`tool-call`),partId:P.optional(P.string()),callId:P.string(),name:P.string(),input:iC,turnId:P.optional(P.string()),startedAt:iL,completedAt:iL,providerMetadata:P.optional(iC)}),cL=P.union(...MF([`cancelled`,`failed`]));P.object({error:P.string(),status:cL});var lL=P.object({type:P.literal(`tool-result`),callId:P.string(),name:P.optional(P.string()),completedAt:iL,output:iC});P.union(aL,oL,sL,lL),P.union(P.literal(`prompt`),P.literal(`completion`),P.literal(`tool`));var uL=P.object({imageUploadId:P.optional(P.id(`imageUploads`)),name:P.string(),mediaType:P.string(),size:P.number(),storageId:P.id(`_storage`),url:P.optional(P.string())}),dL=P.union(aL,oL,sL);P.object({text:P.string(),imageUploads:P.array(uL)}),P.object({streamId:P.optional(P.string()),items:P.array(dL)});var fL=P.union(P.literal(`started`),P.literal(`completed`),P.literal(`failed`),P.literal(`cancelled`));P.object({jobId:P.optional(P.id(`executorJobs`)),toolInvocationId:P.optional(P.string()),callId:P.string(),name:P.string(),input:P.optional(iC),output:P.optional(iC),status:fL});var pL=P.union(P.literal(`system`),P.literal(`user`),P.literal(`assistant`)),mL=P.union(P.object({type:P.literal(`text`),text:P.string()}),P.object({type:P.literal(`image`),imageJson:P.string()})),hL=P.union(P.object({type:P.literal(`text`),text:P.string(),additionalParamsJson:P.optional(P.string())}),P.object({type:P.literal(`reasoning`),id:P.optional(P.string()),blocksJson:P.string()}),P.object({type:P.literal(`toolCall`),id:P.string(),callId:P.optional(P.string()),name:P.string(),argumentsJson:P.string(),signature:P.optional(P.string()),additionalParamsJson:P.optional(P.string())}),P.object({type:P.literal(`toolResult`),id:P.string(),callId:P.optional(P.string()),items:P.array(mL)}),P.object({type:P.literal(`image`),imageJson:P.string()}),P.object({type:P.literal(`audio`),audioJson:P.string()}),P.object({type:P.literal(`video`),videoJson:P.string()}),P.object({type:P.literal(`document`),documentJson:P.string()}));P.object({role:pL,assistantId:P.optional(P.string()),contents:P.array(hL)});function gL(e,t){return(t.lastMessageSentAt??0)-(e.lastMessageSentAt??0)||t.lastUsedAt-e.lastUsedAt||(e.workspacePath<t.workspacePath?-1:+(e.workspacePath>t.workspacePath))}function _L(e){return{repositoryKey:e.repositoryKey,displayName:e.displayName,workspacePath:e.workspacePath,localAttachmentAvailability:e.availability,localAttachmentError:e.unavailableReason}}function vL(e){let t=e.recoveredSubmission,n=e.latestRun;return(n===null||n.runId!==void 0&&n.runId===t?.continuationOfRunId||n.submissionId===t?.submissionId&&!tL(n.status))&&t?.prompt===e.prompt&&t.selectedModel===e.selectedModel&&t.reasoningEffort===e.reasoningEffort&&t.fastMode===e.fastMode&&(t.completionProvider??`spikonado`)===(e.completionProvider??`spikonado`)&&t.continuationOfRunId===e.continuationOfRunId&&hx(t.storageIds,e.storageIds)?t.submissionId:e.newSubmissionId}function yL(e,t){return e===`cancelled`?`cancelled`:e===`failed`?t===`The local agent stopped responding before this run finished.`?`crash`:`failed`:null}function bL(e){let t={userId:e.userId,prompt:e.prompt,storageIds:e.storageIds,selectedModel:e.selectedModel,reasoningEffort:e.reasoningEffort,fastMode:e.fastMode,submissionId:e.submissionId,workspacePath:e.workspacePath};return e.completionProvider&&(t.completionProvider=e.completionProvider),e.threadId&&(t.threadId=e.threadId),e.repositoryKey&&(t.repositoryKey=e.repositoryKey),e.continuationOfRunId&&(t.continuationOfRunId=e.continuationOfRunId),e.desktopApi.runAgent(t).then(({runId:t,threadId:n})=>{e.onStarted(t,n)}).catch(t=>{let n=t instanceof Error?t:Error(String(t));console.error(`Failed to run agent`,n),e.onError(n)})}function xL(e,t){return e.availability===t.availability?e.lastUsedAt===t.lastUsedAt?e.workspacePath<t.workspacePath:e.lastUsedAt<t.lastUsedAt:e.availability===`available`}function SL(e){let t=new Map;for(let n of e){let e=n.attachmentKey,r=t.get(e);(!r||xL(n,r))&&t.set(e,n)}return Object.fromEntries([...t.values()].map(e=>[e.workspacePath,e]))}function CL(e,t){let n=e[t.workspacePath];return n?.availability===`available`&&n.repositoryKey===t.repositoryKey?n:Object.values(e).find(e=>e.availability===`available`&&e.repositoryKey===t.repositoryKey)}function wL(e,t,n){let r=Object.fromEntries(Object.entries(e).filter(([e,r])=>e!==n&&e!==t.workspacePath&&r.attachmentKey!==t.attachmentKey));return r[t.workspacePath]=t,r}async function TL(e){return e?SL(await e.listProjectAttachments()):{}}async function EL(e){let t={workspacePath:e.workspacePath};return e.replaceWorkspacePath&&(t.replaceWorkspacePath=e.replaceWorkspacePath),await e.desktopApi.attachProject(t)}async function DL(e){if(e.desktopApi)try{let t=(await e.desktopApi.listProjectAttachments()).find(t=>t.workspacePath===e.workspacePath);if(!t||t.availability!==`available`)throw Error(t?.unavailableReason??`Workspace path is unavailable.`);await e.refreshDesktopProjectAttachments()}catch(t){throw await e.refreshDesktopProjectAttachments(),t}}var OL=class{dependencies;items=[];#e=new Set;constructor(e){this.dependencies=e}getSnapshot=()=>this.items;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});add(e){for(let t of e){let e=crypto.randomUUID(),n=yx(t),r=vx(t.type);this.#t([...this.items,{localId:e,name:n,mediaType:r,size:t.size,previewUrl:_x(r)?URL.createObjectURL(t):void 0,status:`uploading`}]),this.#i(e,t,n)}}remove(e){let t=this.items.find(t=>t.localId===e);if(t&&(xx(t.previewUrl),this.#t(this.items.filter(t=>t.localId!==e)),t.storageId)){let{userId:e,threadId:n}=this.dependencies.getContext();this.#r({storageId:t.storageId,userId:e,threadId:n})}}clear(e){let t=this.dependencies.getContext(),n=e.userId===void 0?t.userId:e.userId,r=e.threadId===void 0?t.threadId:e.threadId;for(let t of this.items)xx(t.previewUrl),e.discard&&t.storageId&&this.#r({userId:n,threadId:r,storageId:t.storageId});this.#t([])}replace(e){this.#t(e.map(e=>({...e})))}snapshot(){return this.items.map(e=>({...e}))}#t(e){this.items=e;for(let e of this.#e)e()}#n(e,t){return this.items.some(t=>t.localId===e)?(this.#t(this.items.map(n=>n.localId===e?{...n,...t}:n)),!0):!1}#r(e){try{let t=this.dependencies.getContext(),n=e.api??t.api,r=e.userId??t.userId;if(!n||!r)return;n.discardTranscriptAttachment({userId:r,storageId:e.storageId,threadId:e.threadId??void 0}).catch(()=>{})}catch{return}}async#i(e,t,n){let{api:r,userId:i,threadId:a}=this.dependencies.getContext();try{if(!r)throw Error(this.dependencies.localServerRequiredMessage);if(!i)throw Error(`Sign in to attach files.`);let o=await r.uploadTranscriptAttachment({userId:i,name:n,file:t,threadId:a??void 0});if(`error`in o)throw Error(o.error);xx(this.items.find(t=>t.localId===e)?.previewUrl),this.#n(e,{status:`ready`,storageId:o.storageId,name:o.name,mediaType:o.mediaType,size:o.size,previewUrl:_x(o.mediaType)?o.url:void 0})||this.#r({api:r,userId:i,threadId:a,storageId:o.storageId})}catch(t){let n=t instanceof Error?t.message:`Upload failed.`;this.#n(e,{status:`error`,error:n}),this.dependencies.onError(n)}}};function kL(e){let t=(0,F.useRef)(e);(0,F.useLayoutEffect)(()=>{t.current=e},[e]);let[n]=(0,F.useState)(()=>new OL({getContext:()=>t.current.context,onError:e=>t.current.onError(e),localServerRequiredMessage:e.localServerRequiredMessage}));return Wm(n),n}var AL=P.union(P.literal(`idle`),P.literal(`queued`),P.literal(`running`),P.literal(`waiting_for_input`),P.literal(`cancellation_requested`),P.literal(`completed`),P.literal(`failed`),P.literal(`cancelled`)),jL=P.object({runId:P.id(`runs`),startedAt:P.number(),completedAt:P.optional(P.number()),lastError:P.optional(P.string()),executorFriendlyName:P.optional(P.string())});P.object({threadId:P.id(`threadRecords`),phase:AL,run:P.union(jL,P.null())});var ML=new Set([`queued`,`running`,`waiting_for_input`,`cancellation_requested`]);function NL(e){return ML.has(e)}function PL(e){return{threadId:e.threadId,repositoryKey:e.repositoryKey,title:e.title,selectedModel:e.selectedModel,completionProvider:e.completionProvider,reasoningEffort:e.reasoningEffort,fastMode:e.fastMode,lastMessageAt:e.lastMessageAt,threadStatus:e.threadStatus,status:e.status}}function FL(e){return PL({threadId:e._id,repositoryKey:e.repositoryKey,title:e.title??`New thread`,selectedModel:e.selectedModel,completionProvider:e.completionProvider,reasoningEffort:e.reasoningEffort,fastMode:e.fastMode??!1,lastMessageAt:e.lastMessageAt,threadStatus:e.archivedAt===void 0?`active`:`archived`,status:e.status??`completed`})}function IL(e,t){return t?e.find(e=>e.repositoryKey===t)??null:null}function LL(e,t){return t?e.find(e=>e.workspacePath===t)??null:null}function RL(e){return e.threadStatus!==`archived`}function zL(e,t){return t?e.find(e=>e.threadId===t)??null:null}function BL(e){return e.hasResolvedInitialSelection||!e.initialProjectLaunchResolved||e.hasPendingProjectLaunches||e.projectLaunchInFlight||!e.hasLoadedProjects||!e.signedInUserId?null:{workspacePath:e.projects[0]?.workspacePath??null}}function VL(e,t){return t&&(e?.threadId??e?._id)===t?e:null}function HL(e){let{pendingCreatedThreadId:t,threads:n}=e;return!t||zL(n,t)?null:t}function UL(e){return!e.threadId||e.threadId===e.pendingCreatedThreadId||e.hasLatestRunData}function WL(e,t){return!!(t&&e[t])}function GL(e,t,n){return{...e,[t]:n}}function KL(e,t,n){let r=e[t];if(!r||n!==void 0&&r.launchId!==n)return e;let i={...e};return delete i[t],i}function qL(e,t,n,r){return!!(t&&(t!==e.previousRunId||n!=null&&n!==e.previousClaimExpiresAt||r!=null&&r!==e.previousStartedAt))}function JL(e,t,n,r,i){let a=e[t];return!a||!qL(a,n,r,i)?e:KL(e,t,a.launchId)}function YL(e){let{threads:t,currentThreadId:n,currentWorkspacePath:r,draftWorkspacePath:i}=e;return r&&i===r?null:n||(t[0]?.threadId??null)}var XL=10;function ZL(e){return[...new Set(e)].sort()}function QL(e,t){let n=t({query:Jp.inbox.list,args:e.enabled&&e.sectionOpen&&e.repositoryKeys.length>0?{state:e.state,repositoryKeys:e.repositoryKeys}:`skip`,initialNumItems:XL});return{state:e.state,rows:n.data??[],loading:n.isLoading,canLoadMore:n.canLoadMore,error:n.error?.message,loadMore:()=>n.loadMore(XL)}}function $L(e,t=rr){let n={enabled:e.enabled,repositoryKeys:ZL(e.repositoryKeys)};return{sections:[QL({state:`unsettled`,sectionOpen:!0,...n},t),QL({state:`settled`,sectionOpen:e.settledOpen,...n},t)]}}function eR(e,t,n){let r=e&&t.includes(e.repositoryKey)?e:null,i={rows:[],loading:!1,canLoadMore:!1,loadMore:()=>{}},a=r?.archivedAt===void 0?`unsettled`:`settled`;return tS(r?._id??null,n.find(e=>e.state===a)??i),r}function tR(e){return`${e.runId}:${e.streamId}`}function nR(e,t){let n=new Set(t.map(e=>e.runId));return e.filter(e=>!e.provisional||!n.has(e.runId))}var rR=class{fetchPage;changed;messages=[];nextBefore;loading=!0;loadingOlder=!1;windowVersion=0;stale=!1;error=null;stopped=!1;refreshing=!1;refreshPending=!1;olderPending=!1;retry;rows=new Map;persistedStreams=new Set;checkedStreams=new Set;overlays=[];revision=0;replicaId;changesCursor;constructor(e,t){this.fetchPage=e,this.changed=t}stop(){this.stopped=!0,clearTimeout(this.retry)}retryRefresh(e){clearTimeout(this.retry),this.retry=setTimeout(()=>{this.retry=void 0,this.refresh()},e)}retryOlder(e){this.olderPending=!0,this.retryRefresh(e)}unpersisted(e){return e.filter(e=>!this.persistedStreams.has(tR(e)))}visibleOverlays(e){return this.unpersisted(e).filter(e=>this.checkedStreams.has(tR(e)))}setOverlays(e){let t=new Set(this.overlays.map(tR));this.overlays=e;let n=new Set(e.map(tR));for(let e of this.checkedStreams)n.has(e)||this.checkedStreams.delete(e);e.some(e=>!t.has(tR(e)))&&this.refresh()}streamRequest(){let e=new Map;for(let t of this.unpersisted(this.overlays))if(e.set(tR(t),{runId:t.runId,streamId:t.streamId}),e.size===64)break;let t=[...e.values()];return t.length?{streams:t}:{}}async refresh(){if(this.stopped)return;if(this.refreshing){this.refreshPending=!0;return}this.refreshing=!0;let e=!1;clearTimeout(this.retry);try{do{this.refreshPending=!1;let t=this.streamRequest(),n=await this.fetchPage({limit:12,changesAfter:this.changesCursor,...t});if(this.stopped)return;if(this.replicaId!==n.replicaId&&(this.replicaId!==void 0&&(this.windowVersion+=1),this.rows.clear(),this.messages=[],this.persistedStreams.clear(),this.checkedStreams.clear(),this.changesCursor=void 0,this.nextBefore=void 0,this.revision=0,this.replicaId=n.replicaId,this.loading=!0,this.changed()),n.indexing){this.stale=n.stale,this.changed(),this.retryRefresh(500);break}if(n.stale?this.retryRefresh(2e3):(clearTimeout(this.retry),this.retry=void 0),n.revision<this.revision){this.stale=n.stale,this.retryRefresh(500),this.changed();break}let r=n.nextBefore??0,i=this.messages.at(-1)?.sequence;i!==void 0&&i<r&&(this.rows.clear(),this.windowVersion+=1);let a=this.messages[0]?.sequence,o=a!==void 0&&n.changes.some(e=>e.row!==null&&e.row.sequence<a&&!this.messages.some(t=>t.id===e.id));!this.rows.size||r===0||r<=(a??0)?this.nextBefore=n.nextBefore:this.nextBefore===void 0&&o&&(this.nextBefore=a);for(let e of this.rows.keys())e>=r&&this.rows.delete(e);this.commit(n);for(let e of t.streams??[])this.checkedStreams.add(tR(e));this.changesCursor=n.changesCursor,this.refreshPending||=n.moreChanges,this.refreshPending||=n.persistedStreams.length>0&&this.unpersisted(this.overlays).some(e=>!this.checkedStreams.has(tR(e))),e=!0,this.loading=!1,this.error=null,this.changed()}while(this.refreshPending&&!this.stopped)}catch{this.stopped||(this.stale=!0,this.loading=!1,this.error=this.messages.length?null:`Could not load conversation history.`,this.changed(),this.retryRefresh(2e3))}finally{this.refreshing=!1,e&&this.olderPending&&!this.stopped&&(this.olderPending=!1,this.loadOlder())}}async loadOlder(){if(this.stopped||this.loadingOlder)return;if(this.refreshing){this.olderPending=!0;return}if(this.nextBefore===void 0)return;let e=this.nextBefore,t=this.windowVersion;this.loadingOlder=!0,this.changed();try{let n=await this.fetchPage({before:e,limit:40,...this.streamRequest()});if(this.stopped||t!==this.windowVersion)return;if(this.replicaId!==n.replicaId){this.refresh();return}if(n.indexing){this.retryOlder(500);return}if(n.revision<this.revision){this.retryOlder(500);return}if(n.persistedStreams.some(e=>!this.persistedStreams.has(tR(e)))){this.olderPending=!0,this.refresh();return}if(n.nextBefore!==void 0&&n.nextBefore>=e)throw Error(`History cursor did not advance.`);if(this.nextBefore!==e){this.nextBefore!==void 0&&this.retryOlder(500);return}this.commit(n),this.nextBefore=n.nextBefore,n.stale&&this.retryRefresh(2e3)}catch{!this.stopped&&t===this.windowVersion&&(this.stale=!0,this.retryOlder(2e3))}finally{this.loadingOlder=!1,this.stopped||this.changed()}}commit(e){let t=new Map(this.messages.map(e=>[e.id,e])),n=this.rows.size?this.messages[0]?.sequence:void 0;for(let r of e.changes){let e=t.get(r.id);if(!e){r.row&&n!==void 0&&r.row.sequence>=n&&this.rows.set(r.row.sequence,r.row);continue}r.row?r.row.revision>e.revision&&this.rows.set(r.row.sequence,r.row):this.rows.delete(e.sequence)}for(let n of e.rows){let e=this.rows.get(n.sequence)??t.get(n.id);this.rows.set(n.sequence,e&&e.revision>=n.revision?e:n)}let r=[...this.rows.entries()].sort(([e],[t])=>e-t).map(([,e])=>e);(r.length!==this.messages.length||r.some((e,t)=>e!==this.messages[t]))&&(this.messages=r),this.stale=e.stale,this.revision=Math.max(this.revision,e.revision);for(let t of e.persistedStreams)this.persistedStreams.add(`${t.runId}:${t.streamId}`);for(;this.persistedStreams.size>256;){let e=this.persistedStreams.values().next().value;if(e===void 0)break;this.persistedStreams.delete(e)}}};function iR(e){return e.type===`tool-call`||e.type===`tool-result`?`${e.type}:${e.callId}`:`${e.type}:${e.turnId??``}:${e.id}`}function aR(e){let t=new Map;for(let n of e){let e=t.get(n.runId)?.parts??new Map;for(let t of n.parts)e.set(iR(t),t);t.set(n.runId,{live:n,parts:e})}return[...t.values()].map(({live:e,parts:t})=>{let n=[...t.values()];return{kind:`live`,id:`response:${e.runId}`,threadId:e.threadId,runId:e.runId,runStatus:e.runStatus,runStartedAt:e.runStartedAt,text:oC(n),parts:n}})}var oR=class{messages=[];nextBefore=null;windowVersion=0;stale=!1;threadId=null;loading=!1;error=null;loadingOlder=!1;liveCompletion=null;pendingCompletions=[];#e=0;#t=null;#n=null;#r=null;#i=0;#a=new Set;getSnapshot=()=>this.#i;subscribe=e=>(this.#a.add(e),()=>{this.#a.delete(e)});get overlays(){return[...this.pendingCompletions,...this.liveCompletion?[this.liveCompletion]:[]]}selectThread(e){this.#e+=1,this.#n?.abort(),this.#n=null,this.#r?.abort(),this.#r=null,this.#t?.stop(),this.#t=null,this.loadingOlder=!1,this.threadId=e,this.liveCompletion=null,this.pendingCompletions=[],this.error=null,this.messages=[],this.nextBefore=null,this.windowVersion=0,this.stale=!1,this.loading=e!==null,this.#o()}watchDisplay({api:e,userId:t,threadId:n,isCurrent:r}){let i=new AbortController;this.#n=i;let a=this.#e,o=new rR(r=>e.fetchTranscriptDisplay({userId:t,threadId:n,...r},i.signal),()=>{if(i.signal.aborted||a!==this.#e)return;this.messages=o.messages,this.nextBefore=o.nextBefore??null,this.windowVersion=o.windowVersion,this.stale=o.stale,this.loading=o.loading,this.loadingOlder=o.loadingOlder,this.error=o.error;let e=this.pendingCompletions.length;this.pendingCompletions=o.unpersisted(this.overlays).filter(e=>e!==this.liveCompletion),this.pendingCompletions.length>0&&this.pendingCompletions.length<e&&o.refresh(),this.#o()});return this.#t=o,o.refresh(),this.#s(e,t,n,o,i,r),()=>{i.abort(),o.stop(),this.#n===i&&(this.#n=null),this.#t===o&&(this.#t=null)}}watchLiveCompletion({api:e,userId:t,threadId:n,isCurrent:r}){let i=new AbortController;return this.#r=i,this.#c(e,t,n,i,r),()=>{i.abort(),this.#r===i&&(this.#r=null)}}syncOverlays(e){this.#t?.setOverlays(e)}visibleMessages(e){if(!e.threadId||!e.userId||this.threadId!==e.threadId)return[];let t=this.#t?.visibleOverlays(this.overlays)??[],n=aR(t.filter(t=>t.threadId===e.threadId));return[...nR(this.messages,t),...n.map(t=>t.runId===e.run?.runId?{...t,runStartedAt:e.run.startedAt,runCompletedAt:e.run.completedAt}:t)]}async loadOlder(){await this.#t?.loadOlder()}#o(){this.#i+=1;for(let e of this.#a)e()}async#s(e,t,n,r,i,a){for(;!i.signal.aborted;){try{await e.watchTranscript({userId:t,threadId:n},{signal:i.signal,onEvent:e=>{!i.signal.aborted&&a()&&(this.stale=e.stale,this.#o(),r.refresh())}})}catch{i.signal.aborted||(this.stale=!0,this.#o())}i.signal.aborted||await new Promise(e=>setTimeout(e,1e3))}}async#c(e,t,n,r,i){for(;!r.signal.aborted;){try{await e.watchLiveCompletion({userId:t,threadId:n},{signal:r.signal,onEvent:e=>{if(r.signal.aborted||!i())return;let t=this.liveCompletion;t&&(e.eventType===`cleared`||e.live.streamId!==t.streamId)&&(this.#t?.unpersisted([t]).length&&(this.pendingCompletions=[...this.pendingCompletions,t]),this.#t?.refresh()),this.liveCompletion=e.eventType===`updated`?e.live:null,this.#o()}})}catch{if(r.signal.aborted)return}await cR(400,r.signal)}}};function sR(){let[e]=(0,F.useState)(()=>new oR);return Wm(e),e}function cR(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(n,e);t.addEventListener(`abort`,()=>{clearTimeout(r),n()},{once:!0})})}function lR(e,t){let n=qn({query:e,args:t});return n.status===`error`?{data:void 0,error:n.error}:n.status===`pending`?{data:void 0,error:null}:{data:n.data,error:null}}var uR=`Connect to a running Sprocket server to use this project.`,dR=3e4;function fR(e){let t=oS(e.signedInUserId),{currentThreadId:n,onSettledOpenChange:r}=e,i=sS({currentThreadId:e.currentThreadId,enabled:e.mutationsEnabled,expansion:t}),a=i[0]??null,o=qn({query:Jp.threads.getByThreadId,args:e.mutationsEnabled&&a?{threadId:a}:`skip`}),s=eR(o.status===`success`?o.data:null,e.repositoryKeys,e.sections),c=(0,F.useRef)(null);(0,F.useEffect)(()=>{if(!s||s.archivedAt===void 0){c.current=null;return}c.current!==n&&(c.current=n,r(!0))},[s,n,r]);let l=(0,F.useCallback)(({threadId:e,renderRows:n})=>(0,R.jsx)(pR,{expansion:t,threadId:e,renderRows:n,selectedPath:i}),[t,i]);return(0,R.jsx)(vS,{...e,expansion:t,resolveChildren:l})}function pR({expansion:e,threadId:t,renderRows:n,selectedPath:r}){let i=nS(t),a=r.indexOf(t);return tS(a>=0?r[a+1]??null:null,i),(0,F.useEffect)(()=>{e.registerChildren(t,i.rows)},[e,t,i.rows]),(0,R.jsxs)(R.Fragment,{children:[n(i.rows),(0,R.jsx)(pS,{section:i})]})}var mR={resolveDesktopApi:Vm,fetchGatewayModelCatalog:rx};function hR(e,t){return e?`thread:${e}`:t?`draft:${t}`:null}function gR(e,t){return`${e}\0${t}`}function _R({config:e,runtime:t=mR}){let n=(0,F.useRef)(e),r=(0,F.useRef)(t);r.current=t;let i=cr(),a=Gn(),o=Wm(Gm),s=Wm(Ym),c=Wm(Km),l=!!c,u=(0,F.useRef)(c),d=o.nativeSession===`loading`,f=o.nativeSession===`missing`||o.nativeSession===`mismatch`||o.nativeSession===`unavailable`,p=o.nativeSession===`missing`||o.nativeSession===`mismatch`,m=o.isReady&&!o.isLoading&&l&&(o.nativeSession===`notRequired`||o.nativeSession===`ready`)&&!i.isLoading&&i.isAuthenticated,h=l&&o.isReady&&!o.isLoading&&!s&&!i.isLoading&&!i.isAuthenticated||f,[g,_]=(0,F.useState)(!1);(0,F.useEffect)(()=>{let e=lg({retryPending:s,isAuthenticated:i.isAuthenticated,isLoading:i.isLoading,sawLoadingDuringRetry:g});g!==e.sawLoadingDuringRetry&&_(e.sawLoadingDuringRetry),e.clearPending&&Ym.set(!1)},[s,i.isAuthenticated,i.isLoading,g]);let v=Yn(Jp.providerCredentials.getMyConfiguration),y=Jn(Jp.artifacts.deleteArtifact),b=Jn(Jp.threads.rename),x=Jn(Jp.threads.settle),S=Jn(Jp.threads.unsettle),C=Jn(Jp.agentQuestions.answer),w=Jn(Jp.uiPreferences.setTheme),T=Jn(Jp.billing.ensureMySubscription),[E,D]=(0,F.useState)(void 0),[ee,O]=(0,F.useState)(null),[te,ne]=(0,F.useState)(!0),[re,ie]=(0,F.useState)(!1),[k,ae]=(0,F.useState)(!1),[A,oe]=(0,F.useState)(null),[se,ce]=(0,F.useState)(!1),[le,ue]=(0,F.useState)(null),[de,fe]=(0,F.useState)(!1),[pe,me]=(0,F.useState)(!1),[he,ge]=(0,F.useState)(null),_e=(0,F.useMemo)(()=>[`spikonado`,...re?[`openai`]:[],...k?[`chatgpt`]:[]],[re,k]);async function ve(){ne(!0);try{let e=n.current.env.PUBLIC_MODEL_GATEWAY_URL?.trim()??``;D(await r.current.fetchGatewayModelCatalog(e)),O(null)}catch{O(Jb),D(void 0)}finally{ne(!1)}}let ye=(0,F.useRef)(null),j=(0,F.useRef)(null),M=(0,F.useRef)(0);async function be(e){let t=M.current;fe(!0),me(!1),ge(null);try{let n=await v({});if(u.current!==e||t!==M.current)return;ie(n.openai),me(!0)}catch(n){if(u.current!==e||t!==M.current)return;ge(n instanceof Error&&OS(n)||`Couldn’t load provider settings.`)}finally{u.current===e&&t===M.current&&fe(!1)}}let xe=(0,F.useEffectEvent)(e=>{be(e)});(0,F.useEffect)(()=>{if(!m)return;let e=u.current;e&&ye.current!==e&&(ye.current=e,T({}).catch(()=>{}))},[m,c,T]),(0,F.useEffect)(()=>{if(!m)return;let e=u.current;e&&j.current!==e&&(j.current=e,xe(e))},[m,c]);let[N,Se]=(0,F.useState)(null),Ce=(0,F.useRef)(N),[we,Te]=(0,F.useState)(!1),Ee=(0,F.useRef)(null),De=(0,F.useRef)(0),Oe=(0,F.useEffectEvent)(e=>{kr(e)});(0,F.useEffect)(()=>{let e=c;if(!m||!e||!N){Ee.current=null,oe(null),ae(!1),ce(!1);return}if(Ee.current?.userId===e&&Ee.current.api===N)return;Ee.current={userId:e,api:N};let t=++De.current;return oe(null),ae(!1),ce(!0),ue(null),N.fetchChatGptStatus({userId:e}).then(n=>{t===De.current&&u.current===e&&Oe(n)}).catch(n=>{t===De.current&&u.current===e&&(oe(null),ae(!1),ue(n instanceof Error&&OS(n)||`Couldn’t load ChatGPT connection status.`))}).finally(()=>{t===De.current&&u.current===e&&ce(!1)}),()=>{De.current+=1,Ee.current=null}},[m,c,N]);let[ke,Ae]=(0,F.useState)(null),[je,Me]=(0,F.useState)(null),[Ne,Pe]=(0,F.useState)(null),[Fe,Ie]=(0,F.useState)(null),[Le,Re]=(0,F.useState)(kb),[ze,Be]=(0,F.useState)(`spikonado`),[Ve,He]=(0,F.useState)(Ab),[P,Ue]=(0,F.useState)(!1),[We,Ge]=(0,F.useState)(``),[Ke,qe]=(0,F.useState)(null),[Je,Ye]=(0,F.useState)(!1),[Xe,Ze]=(0,F.useState)(null),[Qe,$e]=(0,F.useState)(!1),[et,tt]=(0,F.useState)(null),[nt,rt]=(0,F.useState)({}),[it,at]=(0,F.useState)(!1),ot=(0,F.useRef)(0),[st,ct]=(0,F.useState)(null),[lt,ut]=(0,F.useState)({}),dt=(0,F.useRef)(lt),[ft,pt]=(0,F.useState)(!1),[mt,ht]=(0,F.useState)(null),[gt,_t]=(0,F.useState)(!1),[vt,yt]=(0,F.useState)(`add`),[bt,xt]=(0,F.useState)(void 0),[St,Ct]=(0,F.useState)(null),[wt,Tt]=(0,F.useState)(!1),[Et,Dt]=(0,F.useState)(`general`),[Ot,kt]=(0,F.useState)(!0),[At,jt]=(0,F.useState)(0),Mt=Ot||wt&&At>=768,[Nt,Pt]=(0,F.useState)([]),[Ft,It]=(0,F.useState)(!1),[Lt,Rt]=(0,F.useState)([]),[zt,Bt]=(0,F.useState)(!1),[Vt,Ht]=(0,F.useState)(null),Ut=(0,F.useRef)(new Map).current,Wt=(0,F.useRef)(new Map).current,Gt=(0,F.useRef)(new Map).current,Kt=(0,F.useRef)(new Map).current,qt=(0,F.useRef)(0),Jt=(0,F.useRef)(0),Yt=(0,F.useRef)(null),Xt=(0,F.useRef)(0),[Zt,Qt]=(0,F.useState)(!1),$t=(0,F.useRef)(void 0),[en,tn]=(0,F.useState)(null),nn=(0,F.useRef)(0),[rn,an]=(0,F.useState)(0),on=(0,F.useCallback)(()=>an(e=>e+1),[]),sn=(0,F.useCallback)((e,t)=>{Ut.get(e)===t&&(Ut.delete(e),on())},[on,Ut]),cn=(0,F.useCallback)((e,t,n)=>{Wt.set(gR(e,t),n),on()},[on,Wt]),ln=(0,F.useCallback)((e,t)=>{let n=gR(e,t);Wt.delete(n),Gt.delete(n),on()},[on,Wt,Gt]),un=kL({context:{api:N,userId:c,threadId:Ne},onError:tt,localServerRequiredMessage:uR}),dn=sR(),fn=vF(),pn=(0,F.useMemo)(()=>yF(a),[a]),mn=c&&i.isAuthenticated&&!i.isLoading?{}:`skip`,hn=lR(Jp.uiPreferences.getMine,mn),gn=Ne&&mn!==`skip`?{threadId:Ne}:`skip`,_n=lR(Jp.threads.getByThreadId,gn),vn=lR(Jp.chat.selectedThreadLifecycle,gn),yn={data:null,error:null},bn=lR(Jp.agentQuestions.headPendingForThread,gn),xn=hn.error??_n.error??vn.error??bn.error,[Sn,Cn]=(0,F.useState)(_b(null));(0,F.useEffect)(()=>{if(!m){$t.current=void 0,tn(null),nn.current+=1;return}let e=hn.data;if(e===void 0||en!==null||e===$t.current)return;$t.current=e;let t=_b(e?.theme);Cn(t),xb(t)},[m,hn.data,en]);async function wn(e){let t=Sn,n=++nn.current;tn(e),Cn(e),xb(e);try{await w({theme:e})}catch(e){if(n!==nn.current)return;Cn(t),xb(t),tt(e instanceof Error?e.message:`Failed to save theme preference.`)}finally{n===nn.current&&tn(null)}}let Tn=(0,F.useMemo)(()=>Object.values(lt).sort(gL),[lt]),En=(0,F.useMemo)(()=>Tn.map(_L),[Tn]),Dn=(0,F.useMemo)(()=>[...new Map(En.map(e=>[e.repositoryKey,e])).values()],[En]),On=(0,F.useMemo)(()=>Nt.length>0?Nt:Dn.map(e=>e.repositoryKey),[Nt,Dn]);(0,F.useEffect)(()=>{let e=new Set(Dn.map(e=>e.repositoryKey)),t=Nt.filter(t=>e.has(t));t.length!==Nt.length&&Pt(t)},[Dn,Nt]);let kn=$L({enabled:m,repositoryKeys:On,settledOpen:Ft}),An=VL(_n.data,Ne),jn=(0,F.useMemo)(()=>{let e=kn.sections.find(e=>e.state===`unsettled`)?.rows.map(FL)??[];return!An||e.some(e=>e.threadId===An._id)?e:[FL(An),...e]},[kn.sections,An]),Mn=VL(vn.data,Ne),Nn=Mn?.run??null,Pn=VL(bn.data,Ne);(0,F.useEffect)(()=>{let e=Ne;dn.threadId!==e&&dn.selectThread(e)},[Ne,dn]),(0,F.useEffect)(()=>{let e=Ne,t=N;if(!e||!t||!l)return;let n=u.current;if(n)return dn.watchDisplay({api:t,userId:n,threadId:e,isCurrent:()=>Fn.current===e})},[Ne,N,l,dn,c]),(0,F.useEffect)(()=>{let e=Ne,t=N;if(!e||!t||!l)return;let n=u.current;if(n)return dn.watchLiveCompletion({api:t,userId:n,threadId:e,isCurrent:()=>Fn.current===e})},[Ne,N,l,dn,c]);let Fn=(0,F.useRef)(Ne),In=(0,F.useRef)(ke),Ln=(0,F.useRef)(je),Rn=(0,F.useRef)(Fe);(0,F.useEffect)(()=>{dn.syncOverlays(dn.overlays)});let zn=dn.visibleMessages({threadId:Ne,userId:c,run:Nn}),Bn=(0,F.useMemo)(()=>ke?LL(En,ke):je?IL(En,je):null,[En,ke,je]),Vn=Bn?.workspacePath??ke,Hn=(0,F.useMemo)(()=>!Vn||!N?null:{workspacePath:Vn,search:(e,t)=>N.searchWorkspace({workspacePath:Vn,query:e},t)},[Vn,N]),Un=(0,F.useMemo)(()=>{let e=Bn?.workspacePath??null,t=N;return{workspacePath:e,load:async()=>{if(!t||!e)return[];let n=await t.listWorkspaceSkills({workspacePath:e});for(let e of n.warnings)console.warn(`sprocket skills: ${e}`);return n.skills}}},[Bn,N]),Wn=(0,F.useMemo)(()=>Bn?.repositoryKey?jn.filter(e=>e.repositoryKey===Bn.repositoryKey&&RL(e)).sort((e,t)=>t.lastMessageAt-e.lastMessageAt):[],[jn,Bn]),Kn=(0,F.useMemo)(()=>[],[]);(0,F.useEffect)(()=>{let e=c&&je?{userId:c,repositoryKey:je,workspacePath:ke??``}:null;fn.selectScope(e)},[fn,c,je,ke]),(0,F.useEffect)(()=>{let e=c&&je?{userId:c,repositoryKey:je,workspacePath:ke??``}:null;return fn.watch({localApi:N,artifactClient:pn,cloudReady:!i.isLoading&&i.isAuthenticated,scope:e})},[fn,c,je,ke,N,pn,i.isLoading,i.isAuthenticated]);let qn=je&&i.isAuthenticated&&!i.isLoading?async e=>{if(N&&c&&ke){await N.deleteArtifact({userId:c,repositoryKey:je,workspacePath:ke,artifactId:e});return}await y({artifactId:e,repositoryKey:je})}:void 0,Xn=hR(Ne,Vn),Zn=(()=>{let e=u.current;if(e&&Xn)return Gt.get(gR(e,Xn))})(),Qn=Mn?.phase===`queued`&&Zn!=null,$n=Mn!=null&&NL(Mn.phase)&&!Qn,er=Nn!=null&&($n&&Mn?.phase!==`cancellation_requested`||!$n&&Pn!=null),tr=WL(nt,Ne),nr=tr||$n?null:yL(Mn?.phase??`idle`,Mn?.run?.lastError),rr=UL({threadId:Ne,pendingCreatedThreadId:st,hasLatestRunData:!!Mn}),ir=!!(Xn&&Ut.has(Xn)),ar=(Ne&&dn.threadId===Ne?dn.error:null)??et??o.error??(xn?OS(xn):null),or=(nr===`failed`||nr===`crash`)&&!ir?Nn?.lastError??null:null,sr=!(!Vn||!Pn&&ze===`chatgpt`&&!k||Bn?.localAttachmentAvailability!==`available`||ir||Je||tr||($n||!rr)&&!Pn),lr=(0,F.useMemo)(()=>{let e=new Set,t=[];for(let n of Tn){if(n.availability!==`available`||e.has(n.workspacePath))continue;e.add(n.workspacePath);let r=n.workspacePath.split(/[/\\]/).filter(Boolean).at(-1)??n.workspacePath;t.push({workspacePath:n.workspacePath,displayName:r})}return t},[Tn]);function ur(e){dt.current=e,ut(e),pt(!0)}async function dr(e=Ce.current){let t=++Xt.current,n=In.current,r=ot.current,i=await TL(e);if(t!==Xt.current)return dt.current;if(ur(i),!n||r!==ot.current)return i;let a=i[n];if(!a&&e){let o=await e.resolveWorkspacePath({workspacePath:n});if(t!==Xt.current||r!==ot.current)return dt.current;a=CL(i,o)}if(!a)return i;let o=a.repositoryKey!==Ln.current;if(a.workspacePath!==n||o){let e=Rn.current===n;hr(),Ae(a.workspacePath),Me(a.repositoryKey),Ie(e?a.workspacePath:null),o&&(Pe(null),ct(null))}return i}async function fr(){let e=N,t=u.current;e&&t&&await e.endAccountSession({userId:t}).catch(()=>{}),await rg()}let pr=(0,F.useEffectEvent)((e,t)=>{e.startAccountSession({userId:t}).catch(n=>{Ce.current===e&&u.current===t&&tt(n instanceof Error?n.message:`Failed to register this Sprocket process.`)})});(0,F.useEffect)(()=>{N&&c&&m&&pr(N,c)},[N,c,m]);function mr(e,t=null,n=!1,r){let i=LL(En,e),a=r??i?.repositoryKey??null;Ae(e),Me(a),Pe(t),Ie(n?e:null),t!==st&&ct(null)}function hr(){return++ot.current}function gr(e,t=null,n=!1,r=!1,i){let a=hr();return r||tt(null),mr(e,t,n,i),a}async function _r(e,t,n=Ce.current){if(!n)throw Error(uR);let r=await EL({desktopApi:n,workspacePath:e,replaceWorkspacePath:t});return Xt.current+=1,ur(wL(dt.current,r,t)),r}function vr(e,t={}){let n=LL(En,e);if(!n){tt(`Choose a project first.`);return}let r=gr(e,t.threadId,t.draft);Er(n.workspacePath).catch(e=>{r===ot.current&&tt(e instanceof Error?e.message:`Failed to attach project.`)})}function yr(e=`add`,t=null){if(!N){tt(uR);return}yt(e),Ct(t);let n=e===`reconnect`&&t?LL(En,t):void 0;xt(n?.displayName),_t(!0),tt(null)}async function br(e){if(!N){tt(uR);return}let t=u.current;if(!t){tt(`User session is not ready.`);return}try{if(vt===`reconnect`&&St){await Sr(e,St,t);return}await xr(e,t)}catch(e){if(u.current!==t)return;throw tt(e instanceof Error?e.message:`Failed to attach project.`),e}}async function xr(e,t,n){await _r(e.workspacePath,void 0,n),u.current===t&&(gr(e.workspacePath,null,!0,!1,e.repositoryKey),tt(null))}async function Sr(e,t,n,r){let i=LL(En,t);if(await _r(e.workspacePath,t===e.workspacePath?void 0:t,r),u.current!==n)return;let a=i?.repositoryKey===e.repositoryKey?Fn.current:null;gr(e.workspacePath,a,!1,!1,e.repositoryKey),tt(null)}function Cr(e){let t=e?.trim();t&&Rt(e=>[...e,t])}async function wr(){let e=window.sprocketDesktopBridge;if(e?.takeWorkspaceLaunch)for(;;){let t=await e.takeWorkspaceLaunch();if(!t)return;Cr(t)}}async function Tr(e,t,n){let r=await t.resolveWorkspacePath({workspacePath:e});u.current===n&&await xr(r,n,t)}async function Er(e){await DL({desktopApi:N,refreshDesktopProjectAttachments:async()=>{await dr()},workspacePath:e})}function Dr(e){yr(`reconnect`,e)}function Or(e){M.current+=1,e.provider===`openai`&&ie(e.configured),me(!0),ge(null),!e.configured&&ze===e.provider&&Be(`spikonado`)}function kr(e){De.current+=1,ce(!1),oe(e),ue(e.error??null);let t=e.accounts.find(t=>t.connectionId===e.activeConnectionId)?.connected===!0;ae(t),!t&&ze===`chatgpt`&&Be(`spikonado`)}function Ar(e){vr(e,{draft:!0}),Mr()}function jr(){let e=LL(En,ke),t=(e?.localAttachmentAvailability===`available`?e:null)??En.find(e=>e.localAttachmentAvailability===`available`)??En[0];if(!t){yr(`add`);return}Ar(t.workspacePath),matchMedia(`(max-width: 767px)`).matches&&kt(!1)}async function Mr(){await Promise.resolve(),Vt?.querySelector(`textarea`)?.focus()}function Nr(e,t){vr(t,{threadId:e.threadId})}function Pr(e){let t=IL(En,e.repositoryKey);t&&(Nr(FL(e),t.workspacePath),matchMedia(`(max-width: 767px)`).matches&&kt(!1))}async function Fr(e,t){try{await b({threadId:e,title:t})}catch(e){throw tt(e instanceof Error?e.message:`Failed to rename thread.`),e}}async function Ir(){await dn.loadOlder()}async function Lr(e){let t=N,n=Ne,r=u.current;if(!t||!n||!r)return null;let i=await t.fetchTranscriptAttachment({userId:r,threadId:n,storageId:e});return i?URL.createObjectURL(i):null}async function Rr(e,t,n){let r=N,i=Ne,a=u.current;if(!r||!i||!a||e.threadId!==i)throw Error(`Thread is no longer selected.`);return await r.fetchTranscriptDisplayDetails({userId:a,threadId:i,rowId:e.id,...t},n)}async function zr(e,t){let n=u.current;try{let r={threadId:e._id};t===`settled`?await x(r):await S(r),u.current===n&&(t===`settled`&&Fn.current===e._id&&(Pe(null),Ie(In.current),hr()),tt(null))}catch(e){if(u.current!==n)return;throw tt(e instanceof Error?e.message:`Failed to update thread.`),e}}async function Br(){let e=Pn,t=Ne,n=u.current;if(!e||!t||!n||Je||!Ke&&!We.trim())return;Ye(!0),tt(null);let r=We,i=Ke,a=r.trim(),o=un.snapshot(),s=o.flatMap(e=>e.storageId?[e.storageId]:[]),c=Le,l=ze,d=Ve,f=P,p=null,m;Ge(``),qe(null);try{let n={threadId:t,questionId:e.questionId,optionId:i??void 0,text:a||void 0},r=await C(n);r.continuation&&(p=r.continuation.prompt,m=r.continuation.runId)}catch(a){u.current===n&&Fn.current===t&&Vr.current?.questionId===e.questionId&&(Ge(r),qe(i),tt(a instanceof Error?a.message:String(a)))}finally{u.current===n&&Ye(!1)}if(u.current===n){if(p!==null&&Fn.current!==t){cn(n,`thread:${t}`,{message:`Continuing from your answer when you return to this thread.`,prompt:p,attachments:o,storageIds:s,reasoningEffort:d,fastMode:f,selectedModel:c,completionProvider:l,continuationOfRunId:m,autoSubmit:!0});return}p!==null&&(Ze(m??null),Ge(p),await Hr({answeredQuestionId:e.questionId,continuationOfRunId:m},p))}}let Vr=(0,F.useRef)(Pn);async function Hr(e,t){let n=Vr.current;if(n){if(e?.answeredQuestionId&&n.questionId!==e.answeredQuestionId){tt(`Answer the new agent question before continuing.`);return}if(!e?.answeredQuestionId){await Br();return}}let r=t??We;if(ir||!r.trim()&&un.items.length===0)return;if(un.items.some(e=>e.status!==`ready`)){tt(`Wait for file uploads to finish, or remove failed files before sending.`);return}let i=Vn;if(!i){tt(`Choose a project first.`);return}if(!N){tt(uR);return}if(Ne&&!rr){tt(`Loading thread state before sending.`);return}if(!sr){tt($n||tr||ir?`Wait for the current agent launch or run to finish.`:Bn?.localAttachmentAvailability===`available`?`You need an active project before sending.`:`This project needs to be attached before sending.`);return}let a=Ne,o=je;if(!o){tt(`Choose a project first.`);return}let s=u.current;if(!s){tt(`User session is not ready.`);return}let c=()=>u.current===s,l=r.trim(),d=un.snapshot(),f=d.flatMap(e=>e.storageId?[e.storageId]:[]),p=Le,m=ze,h=Ve,g=P,_=e?.continuationOfRunId??Xe??void 0,v=a?Nn?.runId??null:null,y=a?`thread:${a}`:`draft:${i}`,b=y,x=b,S=gR(s,b),C=Gt.get(S),w=crypto.randomUUID(),T=vL({latestRun:!a||!Mn||Mn.phase===`idle`?null:{runId:Nn?.runId,status:NL(Mn.phase)?`queued`:`completed`,submissionId:Zn?.submissionId??``},newSubmissionId:w,prompt:l,storageIds:f,reasoningEffort:h,fastMode:g,completionProvider:m,continuationOfRunId:_,recoveredSubmission:C?{...C,selectedModel:C.selectedModel}:void 0,selectedModel:p}),E=T;ln(s,b);let D=null,ee=null,O=++Jt.current,te=gR(s,b);Kt.set(te,O);let ne=()=>Kt.get(te)===O,re=`Your session changed before the agent started. Return to this account and send the prompt again.`,ie=`This request is still preparing. Wait for it to finish before trying again.`,k=e=>{cn(s,x,{message:e,prompt:l,attachments:d,storageIds:f,reasoningEffort:h,fastMode:g,selectedModel:p,completionProvider:m,continuationOfRunId:_,autoSubmit:!1,submissionId:!a&&x===b?T:E})},ae=()=>{ln(s,x),c()&&tt(e=>e===ie?null:e)},A=window.setTimeout(()=>{if(Kt.get(te)!==O)return;k(ie);let e=D,t=ee;e&&t!==null&&rt(n=>KL(n,e,t)),sn(y,O),Kt.delete(te)},dR);Ge(``),tt(null),Ut.set(y,O),on();try{if(!a){let e=await N.resolveWorkspacePath({workspacePath:i});if(!ne())return;if(e.repositoryKey!==o){let t=await dr();if(!ne())return;let n=CL(t,e);if(!n)throw Error(`The repository changed and its project attachment is unavailable.`);i=n.workspacePath,o=n.repositoryKey,gr(i,null,!0,!0,o);let r=`draft:${i}`;r!==y&&(sn(y,O),Kt.delete(te),y=r,x=r,te=gR(s,r),Kt.set(te,O),Ut.set(y,O),on())}}let e=a;if(!ne())return;if(!c()){k(re);return}D=e,ae(),window.clearTimeout(A);let t=++qt.current;ee=t;let n={launchId:t,previousRunId:v};Nn?.startedAt&&(n.previousStartedAt=Nn.startedAt),e&&rt(t=>GL(t,e,n)),await bL({userId:s,desktopApi:N,onError:n=>{if(ne()&&c()){if(e){let n=KL(Wr.current,e,t);n!==Wr.current&&rt(n)}k(n instanceof Error?n.message:`Failed to start the local agent run.`)}},onStarted:(e,t)=>{c()&&dr().catch(()=>{}),ne()&&c()&&(D=t,Fn.current===a&&In.current===i&&(a||(ct(t),hr(),Pe(t),Ie(null)),un.clear({discard:!1}),Gr.current===_&&(Ze(null),$e(!1))))},threadId:e??void 0,repositoryKey:e?void 0:o,prompt:l,storageIds:f,selectedModel:p,completionProvider:m,submissionId:E,reasoningEffort:h,fastMode:g,workspacePath:i,continuationOfRunId:_})}catch(e){if(D&&ee!==null&&rt(KL(Wr.current,D,ee)),!ne())return;if(!c()){k(re);return}k(e instanceof Error?e.message:`Failed to send prompt.`),dr().catch(()=>{})}finally{window.clearTimeout(A),sn(y,O),ee===null&&Kt.get(te)===O&&Kt.delete(te)}}let Ur=(0,F.useRef)(Nn),Wr=(0,F.useRef)(nt),Gr=(0,F.useRef)(Xe);(0,F.useLayoutEffect)(()=>{n.current=e,u.current=c,Ce.current=N,Fn.current=Ne,In.current=ke,Ln.current=je,Rn.current=Fe,Vr.current=Pn,Ur.current=Nn,Wr.current=nt,Gr.current=Xe},[e,c,N,Ne,ke,je,Fe,Pn,Nn,nt,Xe]);async function Kr(){if(!er)return;let e=u.current,t=Ne,n=Nn?.runId;if(t&&n)try{await a.mutation(Jp.agentRuntime.requestCancellation,{runId:n})}catch(r){if(u.current!==e||Fn.current!==t||Ur.current?.runId!==n)return;tt(r instanceof Error?r.message:`Failed to stop run.`)}}async function qr(){if(!nr||!Nn||!Ne||!Vn||tr||ir)return;if(!N){tt(uR);return}let e=Ne,t=Vn,n=u.current;if(!t||!n)return;let r=Nn.runId,i=Nn.startedAt,a=++qt.current,o={launchId:a,previousRunId:r,previousStartedAt:i};rt(t=>GL(t,e,o));try{if(u.current!==n)throw Error(`User session is not ready.`);await bL({userId:n,desktopApi:N,onError:t=>{rt(t=>KL(t,e,a)),u.current===n&&Fn.current===e&&tt(t.message)},onStarted:()=>{},threadId:e,prompt:``,storageIds:[],selectedModel:Le,completionProvider:ze,reasoningEffort:Ve,fastMode:P,submissionId:crypto.randomUUID(),workspacePath:t,continuationOfRunId:r})}catch(t){if(rt(t=>KL(t,e,a)),u.current!==n||Fn.current!==e)return;tt(t instanceof Error?t.message:`Failed to continue the run.`)}}let Jr=(0,F.useEffectEvent)(e=>{let t=mt,n=Ne;ht(e),at(!1),Ae(null),Me(null),Pe(null),Ie(null),ct(null),rt({}),ye.current=null,j.current=null,ie(!1),ae(!1),oe(null),ce(!1),ue(null),Ee.current=null,me(!1),ge(null),Yt.current=null,hr(),Ge(``),Ye(!1),qe(null),Ze(null),$e(!1),un.clear({discard:!0,userId:t,threadId:n}),tt(null),Re(E?.defaultModelId??`gpt-5.6-sol`),Be(`spikonado`),He(E?.defaultReasoningEffort??`high`),Ue(!1),_t(!1),Ct(null),xt(void 0),fn.reset()});(0,F.useEffect)(()=>{mt!==c&&Jr(c)},[c,mt]),(0,F.useEffect)(()=>{if(!st)return;let e=HL({pendingCreatedThreadId:st,threads:jn});e!==st&&ct(e)},[st,jn]);let Yr=(0,F.useEffectEvent)((e,t,n)=>{Rt(e=>e.slice(1)),Qt(!0),at(!0),_t(!1),Tt(!1),tt(null),Tr(e,t,n).catch(e=>{u.current===n&&(at(!1),tt(e instanceof Error?e.message:`Failed to open the requested project.`))}).finally(()=>{Qt(!1)})});(0,F.useEffect)(()=>{let e=Lt[0];e&&!Zt&&m&&N&&c&&ft&&Yr(e,N,c)},[Lt,Zt,N,c,m,ft]),(0,F.useEffect)(()=>{let e=An,t=e?._id??null;t!==Yt.current&&(Yt.current=t,Ze(null),$e(!1),e&&(Re(e.selectedModel),Be(e.completionProvider??`spikonado`),He(e.reasoningEffort),Ue(e.fastMode??!1)))},[An]),(0,F.useEffect)(()=>{let e=c,t=hR(Ne,Vn);if(!e||!t)return;let n=gR(e,t),r=Wt.get(n);if(!r||r.autoSubmit&&We!==``&&We!==r.prompt)return;Wt.delete(n);let i=We===``;i&&Ge(r.prompt),un.items.length===0&&r.attachments?.length&&(i||We===r.prompt)&&un.replace(r.attachments),(We===r.prompt||i)&&(Ze(r.continuationOfRunId??null),$e(r.autoSubmit===!0&&r.continuationOfRunId!==void 0),r.submissionId&&(r.prompt||r.storageIds?.length)&&r.reasoningEffort&&r.selectedModel&&r.completionProvider&&Gt.set(n,{prompt:r.prompt,storageIds:r.storageIds??[],reasoningEffort:r.reasoningEffort,fastMode:r.fastMode??!1,selectedModel:r.selectedModel,completionProvider:r.completionProvider,submissionId:r.submissionId,continuationOfRunId:r.continuationOfRunId})),tt(r.message),on()},[c,Ne,Vn,We,un,Wt,Gt,rn,on]);let Xr=(0,F.useEffectEvent)(()=>{Hr()});(0,F.useEffect)(()=>{Qe&&Xe&&sr&&!Pn&&N&&We.trim()&&!un.items.some(e=>e.status!==`ready`)&&($e(!1),Xr())},[Qe,Xe,sr,Pn,N,We,un]);let Zr=(0,F.useEffectEvent)(e=>{if(at(!0),!e)return;let t=gr(e,null,!0,!0);Er(e).catch(e=>{t===ot.current&&tt(e instanceof Error?e.message:`Failed to attach project.`)}),Mr()});(0,F.useEffect)(()=>{let e=BL({hasResolvedInitialSelection:it,initialProjectLaunchResolved:zt,hasPendingProjectLaunches:Lt.length>0,projectLaunchInFlight:Zt,hasLoadedProjects:ft,signedInUserId:c,projects:En});e&&Zr(e.workspacePath)},[it,zt,Lt.length,Zt,ft,c,En]);let Qr=(0,F.useEffectEvent)(e=>{gr(e.workspacePath,Ne,Fe===e.workspacePath)});(0,F.useEffect)(()=>{let e=Ne?zL(jn,Ne):null,t=Bn?.repositoryKey===e?.repositoryKey?Bn:IL(En,e?.repositoryKey);t&&t.workspacePath!==ke&&Qr(t)},[jn,Bn,Ne,ke,En,Fe]);let $r=(0,F.useEffectEvent)((e,t)=>{gr(e,t,Fe===e,!0)});(0,F.useEffect)(()=>{let e=Wn;if(!it||!ke)return;let t=YL({threads:e,currentThreadId:Ne,currentWorkspacePath:ke,draftWorkspacePath:Fe});t!==Ne&&$r(ke,t)},[Wn,it,ke,Ne,Fe]),(0,F.useEffect)(()=>{let e=nt;Ne&&Nn?.runId&&(e=JL(e,Ne,Nn.runId,void 0,Nn.startedAt)),e!==nt&&rt(e)},[Ne,Nn,nt]);let ei=(0,F.useEffectEvent)(()=>{let e=window.sprocketDesktopBridge,n=e?.onWorkspaceLaunch?e.onWorkspaceLaunch(()=>{wr()}):void 0,r=Nm();return r&&(Cr(r),Pm()),e?.takeWorkspaceLaunch?wr().finally(()=>Bt(!0)):Bt(!0),t.resolveDesktopApi().then(async e=>{Se(e),await Rh(),Te(!0),dr(e).catch(e=>{tt(e instanceof Error?e.message:`Failed to load local project attachments.`)})}).catch(e=>{tt(e instanceof Error?e.message:`Failed to connect to the Sprocket server.`),Te(!0)}),n});(0,F.useEffect)(()=>{let e=matchMedia(`(max-width: 767px)`);kt(!e.matches),jt(window.innerWidth);let t=()=>jt(window.innerWidth);window.addEventListener(`resize`,t),ve();let n=ei();return()=>{n?.(),window.removeEventListener(`resize`,t)}},[]);async function ti(e){await Promise.resolve(),document.querySelector(e?`.inbox-sidebar-host button`:`.inbox-floating-controls button`)?.focus()}async function ni(){kt(!0),await ti(!0)}async function ri(){kt(!1),await ti(!1)}function ii(){Dt(`general`),Tt(!0)}async function ai(){ii(),At<768&&kt(!0),await ti(!0)}async function oi(){Tt(!1),Dt(`general`),await ti(Ot)}return we?N?m?(0,R.jsxs)(`div`,{className:`relative h-dvh overflow-hidden`,children:[(0,R.jsxs)(`div`,{className:pb(`app-workspace-shell inbox-layout`,!wt&&fn.panel.open&&!fn.panel.expanded?`pr-[20rem]`:``,!Mt&&`sidebar-hidden`,wt&&`settings-open`),inert:fn.fullscreenArtifact||fn.panel.open&&fn.panel.expanded?!0:void 0,children:[Ot&&(0,R.jsx)(`button`,{className:`fixed inset-0 z-[140] bg-black/40 md:hidden`,type:`button`,"aria-label":`Close sidebar`,onClick:()=>void ri()}),(0,R.jsx)(`div`,{className:`inbox-sidebar-host`,inert:!Mt,children:wt?(0,R.jsx)(WS,{activePage:Et,theme:Sn,onThemeChange:e=>void wn(e),onBack:()=>void oi(),onNavigate:e=>{Dt(e),matchMedia(`(max-width: 767px)`).matches&&ri()}}):(0,R.jsx)(fR,{signedInUserId:c,repositoryKeys:On,sections:kn.sections,projects:Dn,models:E?.models??[],selectedProjects:Nt,currentThreadId:Ne,settledOpen:Ft,onSettledOpenChange:It,mutationsEnabled:m,theme:Sn,onThemeChange:e=>void wn(e),onClose:()=>void ri(),onFilter:e=>Pt(e),onSelect:Pr,onNew:jr,onAddProject:()=>yr(`add`),onSettings:ii,onChange:zr,onRename:(e,t)=>Fr(e._id,t)})}),!Mt&&(0,R.jsxs)(`div`,{className:`inbox-floating-controls`,children:[(0,R.jsx)(hb,{size:`sm`,class:`inbox-icon`,label:`Open sidebar`,onclick:()=>void ni()}),(0,R.jsx)(`button`,{className:`inbox-icon`,type:`button`,"aria-label":`Settings`,title:`Settings`,onClick:()=>void ai(),children:(0,R.jsx)(dv,{size:16})})]}),(0,R.jsxs)(`main`,{className:`relative flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,inert:Ot&&At<768,children:[!wt&&!fn.panel.open&&(0,R.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground hover:bg-muted absolute top-3 right-3 z-100 inline-flex items-center justify-center rounded-md p-2 transition`,onClick:()=>fn.update({open:!0}),"aria-label":`Open side panel`,children:(0,R.jsx)(Z_,{className:`size-4`,"aria-hidden":`true`})}),wt?Et===`general`?(0,R.jsx)(CS,{}):Et===`usage`?(0,R.jsx)(QS,{}):Et===`providers`&&c?(0,R.jsx)(zS,{userId:c,desktopApi:N,openAiConfigured:re,chatGptStatus:A,chatGptLoading:se,chatGptStatusError:le,loading:de,loadError:he,onChatGptStatusChange:kr,onConfigurationChange:Or}):Et===`payments`?(0,R.jsx)(RS,{}):(0,R.jsx)(SS,{user:o.user,onSignOut:()=>void fr()}):(0,R.jsxs)(R.Fragment,{children:[Ne&&(0,R.jsx)(GP,{userId:c??void 0,messages:zn,actions:Kn,activeRunId:$n?Nn?.runId??null:null,project:Bn,artifacts:fn.artifacts,onOpenArtifact:e=>{fn.update({open:!0,tab:`artifacts`,selectedKey:e})},loadingOlder:dn.loadingOlder,nextBefore:dn.nextBefore??void 0,emptyStateMessage:Ne&&(dn.loading||dn.threadId!==Ne)?`Loading conversation history...`:Bn?`Start a thread and ask Sprocket to inspect code, edit files, or run project commands.`:`Add a project to begin.`,onLoadOlder:()=>void Ir(),loadAttachment:Lr,loadSectionDetails:Rr},`${Ne}:${dn.windowVersion}`),(0,R.jsxs)(`div`,{className:Ne?`shrink-0`:`create-thread-screen`,children:[!Ne&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(qx,{projects:En,workspacePath:ke,onProject:Ar,onAddProject:()=>yr(`add`)}),Bn?.localAttachmentAvailability===`unavailable`&&(0,R.jsxs)(`p`,{className:`create-thread-message`,children:[`Project not connected here.`,` `,(0,R.jsx)(`button`,{type:`button`,onClick:()=>{ke&&Dr(ke)},children:`Connect a local folder`}),` `,`to start local work.`]})]}),!ee&&te&&!E?(0,R.jsx)(`div`,{className:`text-muted-foreground mb-3 text-sm`,children:`Loading models…`}):null,(0,R.jsx)(`div`,{ref:Ht,className:Ne?``:`create-thread-composer`,children:(0,R.jsx)(Gx,{notices:(0,R.jsx)(Kx,{error:ar,runError:or,reconnecting:!!(Ne&&dn.threadId===Ne&&dn.stale),catalogError:ee!==null,catalogLoading:te,onRetryCatalog:()=>void ve()}),prompt:We,onPromptChange:Ge,attachments:un.items,onAttachFiles:e=>un.add(e),onRemoveAttachment:e=>un.remove(e),modelCatalog:E,selectedModel:Le,onSelectedModelChange:Re,configuredProviders:_e,providersReady:pe,selectedCompletionProvider:ze,onSelectedCompletionProviderChange:Be,selectedReasoningEffort:Ve,onSelectedReasoningEffortChange:He,fastMode:P,onFastModeChange:Ue,pendingQuestion:Pn,showContinueWorking:nr!=null,onContinueWorking:()=>void qr(),runningCommands:Ne&&c&&N&&m?{api:N,scope:{userId:c,threadId:Ne}}:null,selectedQuestionOptionId:Ke,onSelectedQuestionOptionIdChange:qe,canSend:sr,isSubmitting:ir||tr||Je,isStarting:tr,isRunning:!tr&&er,runStartedAt:$n?Nn?.startedAt??null:null,projectSkills:Un,projectPaths:Hn,onSubmit:()=>void Hr(),onCancel:()=>void Kr()})})]})]})]})]}),!wt&&fn.panel.open&&(0,R.jsx)(`div`,{className:fn.panel.expanded?`bg-background fixed inset-0 z-50`:`absolute inset-y-0 right-0 z-40 w-[20rem]`,inert:fn.fullscreenArtifact?!0:void 0,children:(0,R.jsx)(sF,{workspacePath:N?Bn?.workspacePath:void 0,artifacts:fn.artifacts,onDeleteArtifact:qn,selectedKey:fn.panel.selectedKey,tab:fn.panel.tab,liveView:yn.data,liveActive:!1,expanded:fn.panel.expanded,stale:fn.watchState.stale,error:fn.watchState.error,onSelect:e=>fn.update({selectedKey:e}),onBack:()=>fn.update({selectedKey:null}),onTabChange:e=>fn.update({tab:e}),onOpenFullscreen:e=>{fn.setFullscreenKey(e),document.fullscreenElement||document.documentElement.requestFullscreen?.().catch(()=>{})},onToggleExpanded:()=>fn.update({expanded:!fn.panel.expanded}),onClose:()=>fn.update({open:!1,expanded:!1})})}),fn.fullscreenArtifact&&(0,R.jsx)(cF,{workspacePath:N?Bn?.workspacePath:void 0,artifact:fn.fullscreenArtifact,onClose:()=>fn.setFullscreenKey(null)}),N&&gt&&(0,R.jsx)(jF,{open:gt,desktopApi:N,mode:vt,expectedDisplayName:bt,recentProjectPaths:lr,onClose:()=>{_t(!1),Ct(null),xt(void 0)},onSelect:async e=>{try{await br(e)}catch{await dr()}}})]}):(0,R.jsxs)(`div`,{className:`bg-background h-screen overflow-hidden`,children:[(0,R.jsx)(wb,{authState:{isLoading:!o.isReady||o.isLoading||d||s||l&&i.isLoading,isConfigured:o.isConfigured,isAuthenticated:l,connectionFailed:h,error:o.error},overlayOpen:o.isWaitingForBrowserSignIn,onSignIn:()=>void tg(),onSignOut:()=>void fr(),onRetry:()=>void(p?tg():ug()),retryLabel:p?`Finish sign-in`:`Retry`,onSignUp:()=>void ng()}),(0,R.jsx)(Tb,{open:o.isWaitingForBrowserSignIn,signInUrl:o.browserSignInUrl,error:o.error,onCancel:Qh,onClearOpenError:$h})]}):(0,R.jsx)(Cb,{title:`Connect to Sprocket`,description:et??`Open Sprocket from the desktop app or CLI to continue.`}):(0,R.jsx)(Cb,{title:`Connecting to Sprocket…`,description:`Looking for a running Sprocket server on this machine.`,busy:!0})}function vR(){let{isReady:e}=Wm(Gm);return(0,F.useEffect)(()=>{document.title=`Signing In`},[]),(0,F.useEffect)(()=>{e&&window.location.replace(`/`)},[e]),(0,R.jsx)(Cb,{title:`Completing sign-in`,description:`Sprocket is finishing authentication and will return to your projects automatically.`})}var yR=class extends F.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?(0,R.jsx)(Cb,{title:`Unable to display Sprocket`,description:`Reload the app to try again.`,actions:(0,R.jsx)(`button`,{type:`button`,className:`text-foreground rounded-lg border border-[var(--hairline)] px-4 py-2 text-sm`,onClick:()=>window.location.reload(),children:`Reload`})}):this.props.children}},bR=document.getElementById(`root`);if(!bR)throw Error(`Missing application root.`);var xR=(0,fr.createRoot)(bR);async function SR(){try{let e=await hf(),t=e.env.PUBLIC_CONVEX_URL;if(!t)throw Error(`Sprocket is missing its Convex configuration.`);let n=new Un(t,{unsavedChangesWarning:!1});xR.render((0,R.jsx)(yR,{children:(0,R.jsx)(pg,{client:n,machine:e.machine,children:window.location.pathname===`/callback`?(0,R.jsx)(vR,{}):(0,R.jsx)(_R,{config:e})})}))}catch(e){xR.render((0,R.jsx)(Cb,{title:`Unable to connect`,description:e instanceof Error?e.message:`Failed to start Sprocket.`}))}}SR();