@desktalk/core 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cli/index.d.ts +3 -0
  3. package/dist/cli/index.d.ts.map +1 -0
  4. package/dist/cli/index.js +82 -0
  5. package/dist/cli/index.js.map +1 -0
  6. package/dist/frontend/assets/frontend-B3QNYf3p.js +413 -0
  7. package/dist/frontend/assets/frontend-B3QNYf3p.js.map +1 -0
  8. package/dist/frontend/assets/frontend-B4aeXn9d.js +416 -0
  9. package/dist/frontend/assets/frontend-B4aeXn9d.js.map +1 -0
  10. package/dist/frontend/assets/frontend-BwyRSlHp.js +6513 -0
  11. package/dist/frontend/assets/frontend-BwyRSlHp.js.map +1 -0
  12. package/dist/frontend/assets/frontend-Dix2OWTT.js +229 -0
  13. package/dist/frontend/assets/frontend-Dix2OWTT.js.map +1 -0
  14. package/dist/frontend/assets/frontend-Dx41dEM9.js +407 -0
  15. package/dist/frontend/assets/frontend-Dx41dEM9.js.map +1 -0
  16. package/dist/frontend/assets/frontend-WpQng8Mt.js +1991 -0
  17. package/dist/frontend/assets/frontend-WpQng8Mt.js.map +1 -0
  18. package/dist/frontend/assets/frontend-rTwBdJbn.js +2123 -0
  19. package/dist/frontend/assets/frontend-rTwBdJbn.js.map +1 -0
  20. package/dist/frontend/assets/highlighted-body-TPN3WLV5-DD4wpkf4.js +2 -0
  21. package/dist/frontend/assets/highlighted-body-TPN3WLV5-DD4wpkf4.js.map +1 -0
  22. package/dist/frontend/assets/index-C5-XUOS7.js +1863 -0
  23. package/dist/frontend/assets/index-C5-XUOS7.js.map +1 -0
  24. package/dist/frontend/assets/index-C_e3_6yE.css +1 -0
  25. package/dist/frontend/index.html +22 -0
  26. package/dist/frontend/pcm-capture-processor.js +65 -0
  27. package/dist/i18n/manifest.json +34 -0
  28. package/dist/i18n/zh-CN.json +7 -0
  29. package/dist/index.d.ts +6 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +6 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/server/admin-routes.d.ts +14 -0
  34. package/dist/server/admin-routes.d.ts.map +1 -0
  35. package/dist/server/admin-routes.js +118 -0
  36. package/dist/server/admin-routes.js.map +1 -0
  37. package/dist/server/api-routes.d.ts +8 -0
  38. package/dist/server/api-routes.d.ts.map +1 -0
  39. package/dist/server/api-routes.js +203 -0
  40. package/dist/server/api-routes.js.map +1 -0
  41. package/dist/server/auth-routes.d.ts +19 -0
  42. package/dist/server/auth-routes.d.ts.map +1 -0
  43. package/dist/server/auth-routes.js +155 -0
  44. package/dist/server/auth-routes.js.map +1 -0
  45. package/dist/server/dtfs-routes.d.ts +3 -0
  46. package/dist/server/dtfs-routes.d.ts.map +1 -0
  47. package/dist/server/dtfs-routes.js +183 -0
  48. package/dist/server/dtfs-routes.js.map +1 -0
  49. package/dist/server/index.d.ts +15 -0
  50. package/dist/server/index.d.ts.map +1 -0
  51. package/dist/server/index.js +158 -0
  52. package/dist/server/index.js.map +1 -0
  53. package/dist/server/monaco-routes.d.ts +3 -0
  54. package/dist/server/monaco-routes.d.ts.map +1 -0
  55. package/dist/server/monaco-routes.js +45 -0
  56. package/dist/server/monaco-routes.js.map +1 -0
  57. package/dist/server/voice-routes.d.ts +7 -0
  58. package/dist/server/voice-routes.d.ts.map +1 -0
  59. package/dist/server/voice-routes.js +142 -0
  60. package/dist/server/voice-routes.js.map +1 -0
  61. package/dist/server/ws-routes.d.ts +29 -0
  62. package/dist/server/ws-routes.d.ts.map +1 -0
  63. package/dist/server/ws-routes.js +334 -0
  64. package/dist/server/ws-routes.js.map +1 -0
  65. package/dist/services/ai/action-tool.d.ts +9 -0
  66. package/dist/services/ai/action-tool.d.ts.map +1 -0
  67. package/dist/services/ai/action-tool.js +51 -0
  68. package/dist/services/ai/action-tool.js.map +1 -0
  69. package/dist/services/ai/app-tools.d.ts +15 -0
  70. package/dist/services/ai/app-tools.d.ts.map +1 -0
  71. package/dist/services/ai/app-tools.js +119 -0
  72. package/dist/services/ai/app-tools.js.map +1 -0
  73. package/dist/services/ai/chat-service.d.ts +27 -0
  74. package/dist/services/ai/chat-service.d.ts.map +1 -0
  75. package/dist/services/ai/chat-service.js +213 -0
  76. package/dist/services/ai/chat-service.js.map +1 -0
  77. package/dist/services/ai/create-liveapp-tool.d.ts +15 -0
  78. package/dist/services/ai/create-liveapp-tool.d.ts.map +1 -0
  79. package/dist/services/ai/create-liveapp-tool.js +142 -0
  80. package/dist/services/ai/create-liveapp-tool.js.map +1 -0
  81. package/dist/services/ai/desktop-tool.d.ts +27 -0
  82. package/dist/services/ai/desktop-tool.d.ts.map +1 -0
  83. package/dist/services/ai/desktop-tool.js +106 -0
  84. package/dist/services/ai/desktop-tool.js.map +1 -0
  85. package/dist/services/ai/edit-history.d.ts +16 -0
  86. package/dist/services/ai/edit-history.d.ts.map +1 -0
  87. package/dist/services/ai/edit-history.js +137 -0
  88. package/dist/services/ai/edit-history.js.map +1 -0
  89. package/dist/services/ai/edit-tool.d.ts +9 -0
  90. package/dist/services/ai/edit-tool.d.ts.map +1 -0
  91. package/dist/services/ai/edit-tool.js +113 -0
  92. package/dist/services/ai/edit-tool.js.map +1 -0
  93. package/dist/services/ai/generate-html-tool.d.ts +15 -0
  94. package/dist/services/ai/generate-html-tool.d.ts.map +1 -0
  95. package/dist/services/ai/generate-html-tool.js +140 -0
  96. package/dist/services/ai/generate-html-tool.js.map +1 -0
  97. package/dist/services/ai/generate-icon-tool.d.ts +10 -0
  98. package/dist/services/ai/generate-icon-tool.d.ts.map +1 -0
  99. package/dist/services/ai/generate-icon-tool.js +58 -0
  100. package/dist/services/ai/generate-icon-tool.js.map +1 -0
  101. package/dist/services/ai/html-bridge-script.d.ts +2 -0
  102. package/dist/services/ai/html-bridge-script.d.ts.map +1 -0
  103. package/dist/services/ai/html-bridge-script.js +2 -0
  104. package/dist/services/ai/html-bridge-script.js.map +1 -0
  105. package/dist/services/ai/html-guidelines-tool.d.ts +3 -0
  106. package/dist/services/ai/html-guidelines-tool.d.ts.map +1 -0
  107. package/dist/services/ai/html-guidelines-tool.js +157 -0
  108. package/dist/services/ai/html-guidelines-tool.js.map +1 -0
  109. package/dist/services/ai/html-stream-coordinator.d.ts +92 -0
  110. package/dist/services/ai/html-stream-coordinator.d.ts.map +1 -0
  111. package/dist/services/ai/html-stream-coordinator.js +314 -0
  112. package/dist/services/ai/html-stream-coordinator.js.map +1 -0
  113. package/dist/services/ai/html-theme-link.d.ts +9 -0
  114. package/dist/services/ai/html-theme-link.d.ts.map +1 -0
  115. package/dist/services/ai/html-theme-link.js +12 -0
  116. package/dist/services/ai/html-theme-link.js.map +1 -0
  117. package/dist/services/ai/html-ui-script.d.ts +9 -0
  118. package/dist/services/ai/html-ui-script.d.ts.map +1 -0
  119. package/dist/services/ai/html-ui-script.js +9 -0
  120. package/dist/services/ai/html-ui-script.js.map +1 -0
  121. package/dist/services/ai/image-generation-service.d.ts +26 -0
  122. package/dist/services/ai/image-generation-service.d.ts.map +1 -0
  123. package/dist/services/ai/image-generation-service.js +205 -0
  124. package/dist/services/ai/image-generation-service.js.map +1 -0
  125. package/dist/services/ai/manual-pages/desktop-actions.md +36 -0
  126. package/dist/services/ai/manual-pages/desktop-windows.md +24 -0
  127. package/dist/services/ai/manual-pages/dt-badge.md +36 -0
  128. package/dist/services/ai/manual-pages/dt-button.md +38 -0
  129. package/dist/services/ai/manual-pages/dt-card.md +22 -0
  130. package/dist/services/ai/manual-pages/dt-chart.md +261 -0
  131. package/dist/services/ai/manual-pages/dt-divider.md +25 -0
  132. package/dist/services/ai/manual-pages/dt-grid.md +29 -0
  133. package/dist/services/ai/manual-pages/dt-list-view.md +96 -0
  134. package/dist/services/ai/manual-pages/dt-markdown-editor.md +90 -0
  135. package/dist/services/ai/manual-pages/dt-markdown.md +86 -0
  136. package/dist/services/ai/manual-pages/dt-select.md +21 -0
  137. package/dist/services/ai/manual-pages/dt-stack.md +31 -0
  138. package/dist/services/ai/manual-pages/dt-stat.md +43 -0
  139. package/dist/services/ai/manual-pages/dt-table-view.md +120 -0
  140. package/dist/services/ai/manual-pages/dt-tooltip.md +18 -0
  141. package/dist/services/ai/manual-pages/editing-preview.md +25 -0
  142. package/dist/services/ai/manual-pages/html-actions.md +74 -0
  143. package/dist/services/ai/manual-pages/html-bridge.md +187 -0
  144. package/dist/services/ai/manual-pages/html-components.md +66 -0
  145. package/dist/services/ai/manual-pages/html-examples.md +185 -0
  146. package/dist/services/ai/manual-pages/html-layouts.md +128 -0
  147. package/dist/services/ai/manual-pages/html-storage.md +153 -0
  148. package/dist/services/ai/manual-pages/html-tokens.md +26 -0
  149. package/dist/services/ai/manual-pages/index.d.ts +10 -0
  150. package/dist/services/ai/manual-pages/index.d.ts.map +1 -0
  151. package/dist/services/ai/manual-pages/index.js +186 -0
  152. package/dist/services/ai/manual-pages/index.js.map +1 -0
  153. package/dist/services/ai/manual-tool.d.ts +3 -0
  154. package/dist/services/ai/manual-tool.d.ts.map +1 -0
  155. package/dist/services/ai/manual-tool.js +104 -0
  156. package/dist/services/ai/manual-tool.js.map +1 -0
  157. package/dist/services/ai/pi-session-service.d.ts +101 -0
  158. package/dist/services/ai/pi-session-service.d.ts.map +1 -0
  159. package/dist/services/ai/pi-session-service.js +697 -0
  160. package/dist/services/ai/pi-session-service.js.map +1 -0
  161. package/dist/services/ai/providers.d.ts +21 -0
  162. package/dist/services/ai/providers.d.ts.map +1 -0
  163. package/dist/services/ai/providers.js +93 -0
  164. package/dist/services/ai/providers.js.map +1 -0
  165. package/dist/services/ai/redo-edit-tool.d.ts +9 -0
  166. package/dist/services/ai/redo-edit-tool.d.ts.map +1 -0
  167. package/dist/services/ai/redo-edit-tool.js +44 -0
  168. package/dist/services/ai/redo-edit-tool.js.map +1 -0
  169. package/dist/services/ai/system-prompt.d.ts +7 -0
  170. package/dist/services/ai/system-prompt.d.ts.map +1 -0
  171. package/dist/services/ai/system-prompt.js +72 -0
  172. package/dist/services/ai/system-prompt.js.map +1 -0
  173. package/dist/services/ai/undo-edit-tool.d.ts +9 -0
  174. package/dist/services/ai/undo-edit-tool.d.ts.map +1 -0
  175. package/dist/services/ai/undo-edit-tool.js +44 -0
  176. package/dist/services/ai/undo-edit-tool.js.map +1 -0
  177. package/dist/services/ai/window-tools.d.ts +27 -0
  178. package/dist/services/ai/window-tools.d.ts.map +1 -0
  179. package/dist/services/ai/window-tools.js +155 -0
  180. package/dist/services/ai/window-tools.js.map +1 -0
  181. package/dist/services/backend-host.d.ts +10 -0
  182. package/dist/services/backend-host.d.ts.map +1 -0
  183. package/dist/services/backend-host.js +117 -0
  184. package/dist/services/backend-host.js.map +1 -0
  185. package/dist/services/backend-ipc.d.ts +60 -0
  186. package/dist/services/backend-ipc.d.ts.map +1 -0
  187. package/dist/services/backend-ipc.js +2 -0
  188. package/dist/services/backend-ipc.js.map +1 -0
  189. package/dist/services/backend-process-manager.d.ts +60 -0
  190. package/dist/services/backend-process-manager.d.ts.map +1 -0
  191. package/dist/services/backend-process-manager.js +203 -0
  192. package/dist/services/backend-process-manager.js.map +1 -0
  193. package/dist/services/filesystem.d.ts +8 -0
  194. package/dist/services/filesystem.d.ts.map +1 -0
  195. package/dist/services/filesystem.js +94 -0
  196. package/dist/services/filesystem.js.map +1 -0
  197. package/dist/services/i18n.d.ts +28 -0
  198. package/dist/services/i18n.d.ts.map +1 -0
  199. package/dist/services/i18n.js +76 -0
  200. package/dist/services/i18n.js.map +1 -0
  201. package/dist/services/liveapp-icon.d.ts +9 -0
  202. package/dist/services/liveapp-icon.d.ts.map +1 -0
  203. package/dist/services/liveapp-icon.js +28 -0
  204. package/dist/services/liveapp-icon.js.map +1 -0
  205. package/dist/services/liveapps.d.ts +12 -0
  206. package/dist/services/liveapps.d.ts.map +1 -0
  207. package/dist/services/liveapps.js +84 -0
  208. package/dist/services/liveapps.js.map +1 -0
  209. package/dist/services/logger.d.ts +34 -0
  210. package/dist/services/logger.d.ts.map +1 -0
  211. package/dist/services/logger.js +74 -0
  212. package/dist/services/logger.js.map +1 -0
  213. package/dist/services/messaging.d.ts +14 -0
  214. package/dist/services/messaging.d.ts.map +1 -0
  215. package/dist/services/messaging.js +41 -0
  216. package/dist/services/messaging.js.map +1 -0
  217. package/dist/services/miniapp-icon.d.ts +9 -0
  218. package/dist/services/miniapp-icon.d.ts.map +1 -0
  219. package/dist/services/miniapp-icon.js +25 -0
  220. package/dist/services/miniapp-icon.js.map +1 -0
  221. package/dist/services/miniapp-registry.d.ts +73 -0
  222. package/dist/services/miniapp-registry.d.ts.map +1 -0
  223. package/dist/services/miniapp-registry.js +144 -0
  224. package/dist/services/miniapp-registry.js.map +1 -0
  225. package/dist/services/onboarding-config.d.ts +37 -0
  226. package/dist/services/onboarding-config.d.ts.map +1 -0
  227. package/dist/services/onboarding-config.js +76 -0
  228. package/dist/services/onboarding-config.js.map +1 -0
  229. package/dist/services/preferences.d.ts +10 -0
  230. package/dist/services/preferences.d.ts.map +1 -0
  231. package/dist/services/preferences.js +48 -0
  232. package/dist/services/preferences.js.map +1 -0
  233. package/dist/services/proxy-dispatcher.d.ts +18 -0
  234. package/dist/services/proxy-dispatcher.d.ts.map +1 -0
  235. package/dist/services/proxy-dispatcher.js +33 -0
  236. package/dist/services/proxy-dispatcher.js.map +1 -0
  237. package/dist/services/storage.d.ts +7 -0
  238. package/dist/services/storage.d.ts.map +1 -0
  239. package/dist/services/storage.js +55 -0
  240. package/dist/services/storage.js.map +1 -0
  241. package/dist/services/theme-css.d.ts +21 -0
  242. package/dist/services/theme-css.d.ts.map +1 -0
  243. package/dist/services/theme-css.js +213 -0
  244. package/dist/services/theme-css.js.map +1 -0
  245. package/dist/services/user-db.d.ts +69 -0
  246. package/dist/services/user-db.d.ts.map +1 -0
  247. package/dist/services/user-db.js +175 -0
  248. package/dist/services/user-db.js.map +1 -0
  249. package/dist/services/voice/audio-format.d.ts +5 -0
  250. package/dist/services/voice/audio-format.d.ts.map +1 -0
  251. package/dist/services/voice/audio-format.js +27 -0
  252. package/dist/services/voice/audio-format.js.map +1 -0
  253. package/dist/services/voice/azure-openai-whisper-adapter.d.ts +23 -0
  254. package/dist/services/voice/azure-openai-whisper-adapter.d.ts.map +1 -0
  255. package/dist/services/voice/azure-openai-whisper-adapter.js +60 -0
  256. package/dist/services/voice/azure-openai-whisper-adapter.js.map +1 -0
  257. package/dist/services/voice/openai-whisper-adapter.d.ts +22 -0
  258. package/dist/services/voice/openai-whisper-adapter.d.ts.map +1 -0
  259. package/dist/services/voice/openai-whisper-adapter.js +61 -0
  260. package/dist/services/voice/openai-whisper-adapter.js.map +1 -0
  261. package/dist/services/voice/stt-adapter.d.ts +31 -0
  262. package/dist/services/voice/stt-adapter.d.ts.map +1 -0
  263. package/dist/services/voice/stt-adapter.js +8 -0
  264. package/dist/services/voice/stt-adapter.js.map +1 -0
  265. package/dist/services/voice/vad-segmenter.d.ts +68 -0
  266. package/dist/services/voice/vad-segmenter.d.ts.map +1 -0
  267. package/dist/services/voice/vad-segmenter.js +159 -0
  268. package/dist/services/voice/vad-segmenter.js.map +1 -0
  269. package/dist/services/voice/voice-session.d.ts +54 -0
  270. package/dist/services/voice/voice-session.d.ts.map +1 -0
  271. package/dist/services/voice/voice-session.js +137 -0
  272. package/dist/services/voice/voice-session.js.map +1 -0
  273. package/dist/services/window-manager.d.ts +94 -0
  274. package/dist/services/window-manager.d.ts.map +1 -0
  275. package/dist/services/window-manager.js +282 -0
  276. package/dist/services/window-manager.js.map +1 -0
  277. package/dist/services/workspace.d.ts +51 -0
  278. package/dist/services/workspace.d.ts.map +1 -0
  279. package/dist/services/workspace.js +144 -0
  280. package/dist/services/workspace.js.map +1 -0
  281. package/package.json +89 -0
@@ -0,0 +1,1863 @@
1
+ function Av(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Mu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n0={exports:{}},ql={};var uy;function yw(){if(uy)return ql;uy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,s,l){var o=null;if(l!==void 0&&(o=""+l),s.key!==void 0&&(o=""+s.key),"key"in s){l={};for(var d in s)d!=="key"&&(l[d]=s[d])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:o,ref:s!==void 0?s:null,props:l}}return ql.Fragment=t,ql.jsx=n,ql.jsxs=n,ql}var oy;function Ew(){return oy||(oy=1,n0.exports=yw()),n0.exports}var v=Ew();const xw=Mu(v),vw=Av({__proto__:null,default:xw},[v]);var r0={exports:{}},Be={};var cy;function _w(){if(cy)return Be;cy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),x=Symbol.iterator;function E(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function k(D,P,C){this.props=D,this.context=P,this.refs=S,this.updater=C||T}k.prototype.isReactComponent={},k.prototype.setState=function(D,P){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,P,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function F(){}F.prototype=k.prototype;function H(D,P,C){this.props=D,this.context=P,this.refs=S,this.updater=C||T}var V=H.prototype=new F;V.constructor=H,w(V,k.prototype),V.isPureReactComponent=!0;var J=Array.isArray;function j(){}var ne={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function fe(D,P,C){var ce=C.ref;return{$$typeof:e,type:D,key:P,ref:ce!==void 0?ce:null,props:C}}function z(D,P){return fe(D.type,P,D.props)}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function Y(D){var P={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(C){return P[C]})}var _e=/\/+/g;function oe(D,P){return typeof D=="object"&&D!==null&&D.key!=null?Y(""+D.key):P.toString(36)}function le(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(j,j):(D.status="pending",D.then(function(P){D.status==="pending"&&(D.status="fulfilled",D.value=P)},function(P){D.status==="pending"&&(D.status="rejected",D.reason=P)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function I(D,P,C,ce,Ee){var xe=typeof D;(xe==="undefined"||xe==="boolean")&&(D=null);var Me=!1;if(D===null)Me=!0;else switch(xe){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(D.$$typeof){case e:case t:Me=!0;break;case m:return Me=D._init,I(Me(D._payload),P,C,ce,Ee)}}if(Me)return Ee=Ee(D),Me=ce===""?"."+oe(D,0):ce,J(Ee)?(C="",Me!=null&&(C=Me.replace(_e,"$&/")+"/"),I(Ee,P,C,"",function(Gt){return Gt})):Ee!=null&&($(Ee)&&(Ee=z(Ee,C+(Ee.key==null||D&&D.key===Ee.key?"":(""+Ee.key).replace(_e,"$&/")+"/")+Me)),P.push(Ee)),1;Me=0;var Je=ce===""?".":ce+":";if(J(D))for(var Oe=0;Oe<D.length;Oe++)ce=D[Oe],xe=Je+oe(ce,Oe),Me+=I(ce,P,C,xe,Ee);else if(Oe=E(D),typeof Oe=="function")for(D=Oe.call(D),Oe=0;!(ce=D.next()).done;)ce=ce.value,xe=Je+oe(ce,Oe++),Me+=I(ce,P,C,xe,Ee);else if(xe==="object"){if(typeof D.then=="function")return I(le(D),P,C,ce,Ee);throw P=String(D),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return Me}function te(D,P,C){if(D==null)return D;var ce=[],Ee=0;return I(D,ce,"","",function(xe){return P.call(C,xe,Ee++)}),ce}function be(D){if(D._status===-1){var P=D._result;P=P(),P.then(function(C){(D._status===0||D._status===-1)&&(D._status=1,D._result=C)},function(C){(D._status===0||D._status===-1)&&(D._status=2,D._result=C)}),D._status===-1&&(D._status=0,D._result=P)}if(D._status===1)return D._result.default;throw D._result}var ke=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},O={map:te,forEach:function(D,P,C){te(D,function(){P.apply(this,arguments)},C)},count:function(D){var P=0;return te(D,function(){P++}),P},toArray:function(D){return te(D,function(P){return P})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Be.Activity=b,Be.Children=O,Be.Component=k,Be.Fragment=n,Be.Profiler=s,Be.PureComponent=H,Be.StrictMode=i,Be.Suspense=h,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,Be.__COMPILER_RUNTIME={__proto__:null,c:function(D){return ne.H.useMemoCache(D)}},Be.cache=function(D){return function(){return D.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(D,P,C){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ce=w({},D.props),Ee=D.key;if(P!=null)for(xe in P.key!==void 0&&(Ee=""+P.key),P)!Z.call(P,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&P.ref===void 0||(ce[xe]=P[xe]);var xe=arguments.length-2;if(xe===1)ce.children=C;else if(1<xe){for(var Me=Array(xe),Je=0;Je<xe;Je++)Me[Je]=arguments[Je+2];ce.children=Me}return fe(D.type,Ee,ce)},Be.createContext=function(D){return D={$$typeof:o,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:l,_context:D},D},Be.createElement=function(D,P,C){var ce,Ee={},xe=null;if(P!=null)for(ce in P.key!==void 0&&(xe=""+P.key),P)Z.call(P,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(Ee[ce]=P[ce]);var Me=arguments.length-2;if(Me===1)Ee.children=C;else if(1<Me){for(var Je=Array(Me),Oe=0;Oe<Me;Oe++)Je[Oe]=arguments[Oe+2];Ee.children=Je}if(D&&D.defaultProps)for(ce in Me=D.defaultProps,Me)Ee[ce]===void 0&&(Ee[ce]=Me[ce]);return fe(D,xe,Ee)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(D){return{$$typeof:d,render:D}},Be.isValidElement=$,Be.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:be}},Be.memo=function(D,P){return{$$typeof:f,type:D,compare:P===void 0?null:P}},Be.startTransition=function(D){var P=ne.T,C={};ne.T=C;try{var ce=D(),Ee=ne.S;Ee!==null&&Ee(C,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(j,ke)}catch(xe){ke(xe)}finally{P!==null&&C.types!==null&&(P.types=C.types),ne.T=P}},Be.unstable_useCacheRefresh=function(){return ne.H.useCacheRefresh()},Be.use=function(D){return ne.H.use(D)},Be.useActionState=function(D,P,C){return ne.H.useActionState(D,P,C)},Be.useCallback=function(D,P){return ne.H.useCallback(D,P)},Be.useContext=function(D){return ne.H.useContext(D)},Be.useDebugValue=function(){},Be.useDeferredValue=function(D,P){return ne.H.useDeferredValue(D,P)},Be.useEffect=function(D,P){return ne.H.useEffect(D,P)},Be.useEffectEvent=function(D){return ne.H.useEffectEvent(D)},Be.useId=function(){return ne.H.useId()},Be.useImperativeHandle=function(D,P,C){return ne.H.useImperativeHandle(D,P,C)},Be.useInsertionEffect=function(D,P){return ne.H.useInsertionEffect(D,P)},Be.useLayoutEffect=function(D,P){return ne.H.useLayoutEffect(D,P)},Be.useMemo=function(D,P){return ne.H.useMemo(D,P)},Be.useOptimistic=function(D,P){return ne.H.useOptimistic(D,P)},Be.useReducer=function(D,P,C){return ne.H.useReducer(D,P,C)},Be.useRef=function(D){return ne.H.useRef(D)},Be.useState=function(D){return ne.H.useState(D)},Be.useSyncExternalStore=function(D,P,C){return ne.H.useSyncExternalStore(D,P,C)},Be.useTransition=function(){return ne.H.useTransition()},Be.version="19.2.4",Be}var dy;function lm(){return dy||(dy=1,r0.exports=_w()),r0.exports}var R=lm();const $i=Mu(R);function Sv(e,t){return function(){return e.apply(t,arguments)}}const{toString:Tw}=Object.prototype,{getPrototypeOf:um}=Object,{iterator:ud,toStringTag:wv}=Symbol,od=(e=>t=>{const n=Tw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),yr=e=>(e=e.toLowerCase(),t=>od(t)===e),cd=e=>t=>typeof t===e,{isArray:qs}=Array,Hs=cd("undefined");function Lu(e){return e!==null&&!Hs(e)&&e.constructor!==null&&!Hs(e.constructor)&&wn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kv=yr("ArrayBuffer");function Aw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kv(e.buffer),t}const Sw=cd("string"),wn=cd("function"),Cv=cd("number"),Du=e=>e!==null&&typeof e=="object",ww=e=>e===!0||e===!1,Mc=e=>{if(od(e)!=="object")return!1;const t=um(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wv in e)&&!(ud in e)},kw=e=>{if(!Du(e)||Lu(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Cw=yr("Date"),Nw=yr("File"),Rw=e=>!!(e&&typeof e.uri<"u"),Ow=e=>e&&typeof e.getParts<"u",Mw=yr("Blob"),Lw=yr("FileList"),Dw=e=>Du(e)&&wn(e.pipe);function Iw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const fy=Iw(),hy=typeof fy.FormData<"u"?fy.FormData:void 0,Bw=e=>{let t;return e&&(hy&&e instanceof hy||wn(e.append)&&((t=od(e))==="formdata"||t==="object"&&wn(e.toString)&&e.toString()==="[object FormData]"))},zw=yr("URLSearchParams"),[Pw,Hw,Uw,jw]=["ReadableStream","Request","Response","Headers"].map(yr),Fw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Iu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),qs(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(Lu(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),o=l.length;let d;for(i=0;i<o;i++)d=l[i],t.call(null,e[d],d,e)}}function Nv(e,t){if(Lu(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rv=e=>!Hs(e)&&e!==Aa;function hp(){const{caseless:e,skipUndefined:t}=Rv(this)&&this||{},n={},i=(s,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const o=e&&Nv(n,l)||l;Mc(n[o])&&Mc(s)?n[o]=hp(n[o],s):Mc(s)?n[o]=hp({},s):qs(s)?n[o]=s.slice():(!t||!Hs(s))&&(n[o]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&Iu(arguments[s],i);return n}const $w=(e,t,n,{allOwnKeys:i}={})=>(Iu(t,(s,l)=>{n&&wn(s)?Object.defineProperty(e,l,{value:Sv(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),qw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yw=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Vw=(e,t,n,i)=>{let s,l,o;const d={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)o=s[l],(!i||i(o,e,t))&&!d[o]&&(t[o]=e[o],d[o]=!0);e=n!==!1&&um(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},Ww=e=>{if(!e)return null;if(qs(e))return e;let t=e.length;if(!Cv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Xw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&um(Uint8Array)),Qw=(e,t)=>{const i=(e&&e[ud]).call(e);let s;for(;(s=i.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},Kw=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},Zw=yr("HTMLFormElement"),Jw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),py=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ek=yr("RegExp"),Ov=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Iu(n,(s,l)=>{let o;(o=t(s,l,e))!==!1&&(i[l]=o||s)}),Object.defineProperties(e,i)},tk=e=>{Ov(e,(t,n)=>{if(wn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(wn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nk=(e,t)=>{const n={},i=s=>{s.forEach(l=>{n[l]=!0})};return qs(e)?i(e):i(String(e).split(t)),n},rk=()=>{},ik=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ak(e){return!!(e&&wn(e.append)&&e[wv]==="FormData"&&e[ud])}const sk=e=>{const t=new Array(10),n=(i,s)=>{if(Du(i)){if(t.indexOf(i)>=0)return;if(Lu(i))return i;if(!("toJSON"in i)){t[s]=i;const l=qs(i)?[]:{};return Iu(i,(o,d)=>{const h=n(o,s+1);!Hs(h)&&(l[d]=h)}),t[s]=void 0,l}}return i};return n(e,0)},lk=yr("AsyncFunction"),uk=e=>e&&(Du(e)||wn(e))&&wn(e.then)&&wn(e.catch),Mv=((e,t)=>e?setImmediate:t?((n,i)=>(Aa.addEventListener("message",({source:s,data:l})=>{s===Aa&&l===n&&i.length&&i.shift()()},!1),s=>{i.push(s),Aa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",wn(Aa.postMessage)),ok=typeof queueMicrotask<"u"?queueMicrotask.bind(Aa):typeof process<"u"&&process.nextTick||Mv,ck=e=>e!=null&&wn(e[ud]),K={isArray:qs,isArrayBuffer:kv,isBuffer:Lu,isFormData:Bw,isArrayBufferView:Aw,isString:Sw,isNumber:Cv,isBoolean:ww,isObject:Du,isPlainObject:Mc,isEmptyObject:kw,isReadableStream:Pw,isRequest:Hw,isResponse:Uw,isHeaders:jw,isUndefined:Hs,isDate:Cw,isFile:Nw,isReactNativeBlob:Rw,isReactNative:Ow,isBlob:Mw,isRegExp:ek,isFunction:wn,isStream:Dw,isURLSearchParams:zw,isTypedArray:Xw,isFileList:Lw,forEach:Iu,merge:hp,extend:$w,trim:Fw,stripBOM:qw,inherits:Yw,toFlatObject:Vw,kindOf:od,kindOfTest:yr,endsWith:Gw,toArray:Ww,forEachEntry:Qw,matchAll:Kw,isHTMLForm:Zw,hasOwnProperty:py,hasOwnProp:py,reduceDescriptors:Ov,freezeMethods:tk,toObjectSet:nk,toCamelCase:Jw,noop:rk,toFiniteNumber:ik,findKey:Nv,global:Aa,isContextDefined:Rv,isSpecCompliantForm:ak,toJSONObject:sk,isAsyncFn:lk,isThenable:uk,setImmediate:Mv,asap:ok,isIterable:ck};let Ie=class Lv extends Error{static from(t,n,i,s,l,o){const d=new Lv(t.message,n||t.code,i,s,l);return d.cause=t,d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),o&&Object.assign(d,o),d}constructor(t,n,i,s,l){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),i&&(this.config=i),s&&(this.request=s),l&&(this.response=l,this.status=l.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}};Ie.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ie.ERR_BAD_OPTION="ERR_BAD_OPTION";Ie.ECONNABORTED="ECONNABORTED";Ie.ETIMEDOUT="ETIMEDOUT";Ie.ERR_NETWORK="ERR_NETWORK";Ie.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ie.ERR_DEPRECATED="ERR_DEPRECATED";Ie.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ie.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ie.ERR_CANCELED="ERR_CANCELED";Ie.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ie.ERR_INVALID_URL="ERR_INVALID_URL";const dk=null;function pp(e){return K.isPlainObject(e)||K.isArray(e)}function Dv(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function i0(e,t,n){return e?e.concat(t).map(function(s,l){return s=Dv(s),!n&&l?"["+s+"]":s}).join(n?".":""):t}function fk(e){return K.isArray(e)&&!e.some(pp)}const hk=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function dd(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,S){return!K.isUndefined(S[w])});const i=n.metaTokens,s=n.visitor||m,l=n.dots,o=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(s))throw new TypeError("visitor must be a function");function f(T){if(T===null)return"";if(K.isDate(T))return T.toISOString();if(K.isBoolean(T))return T.toString();if(!h&&K.isBlob(T))throw new Ie("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(T)||K.isTypedArray(T)?h&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function m(T,w,S){let k=T;if(K.isReactNative(t)&&K.isReactNativeBlob(T))return t.append(i0(S,w,l),f(T)),!1;if(T&&!S&&typeof T=="object"){if(K.endsWith(w,"{}"))w=i?w:w.slice(0,-2),T=JSON.stringify(T);else if(K.isArray(T)&&fk(T)||(K.isFileList(T)||K.endsWith(w,"[]"))&&(k=K.toArray(T)))return w=Dv(w),k.forEach(function(H,V){!(K.isUndefined(H)||H===null)&&t.append(o===!0?i0([w],V,l):o===null?w:w+"[]",f(H))}),!1}return pp(T)?!0:(t.append(i0(S,w,l),f(T)),!1)}const b=[],x=Object.assign(hk,{defaultVisitor:m,convertValue:f,isVisitable:pp});function E(T,w){if(!K.isUndefined(T)){if(b.indexOf(T)!==-1)throw Error("Circular reference detected in "+w.join("."));b.push(T),K.forEach(T,function(k,F){(!(K.isUndefined(k)||k===null)&&s.call(t,k,K.isString(F)?F.trim():F,w,x))===!0&&E(k,w?w.concat(F):[F])}),b.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return E(e),t}function my(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function om(e,t){this._pairs=[],e&&dd(e,this,t)}const Iv=om.prototype;Iv.append=function(t,n){this._pairs.push([t,n])};Iv.toString=function(t){const n=t?function(i){return t.call(this,i,my)}:my;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function pk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bv(e,t,n){if(!t)return e;const i=n&&n.encode||pk,s=K.isFunction(n)?{serialize:n}:n,l=s&&s.serialize;let o;if(l?o=l(t,s):o=K.isURLSearchParams(t)?t.toString():new om(t,s).toString(i),o){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class gy{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(i){i!==null&&t(i)})}}const cm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},mk=typeof URLSearchParams<"u"?URLSearchParams:om,gk=typeof FormData<"u"?FormData:null,bk=typeof Blob<"u"?Blob:null,yk={isBrowser:!0,classes:{URLSearchParams:mk,FormData:gk,Blob:bk},protocols:["http","https","file","blob","url","data"]},dm=typeof window<"u"&&typeof document<"u",mp=typeof navigator=="object"&&navigator||void 0,Ek=dm&&(!mp||["ReactNative","NativeScript","NS"].indexOf(mp.product)<0),xk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vk=dm&&window.location.href||"http://localhost",_k=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dm,hasStandardBrowserEnv:Ek,hasStandardBrowserWebWorkerEnv:xk,navigator:mp,origin:vk},Symbol.toStringTag,{value:"Module"})),rn={..._k,...yk};function Tk(e,t){return dd(e,new rn.classes.URLSearchParams,{visitor:function(n,i,s,l){return rn.isNode&&K.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function Ak(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Sk(e){const t={},n=Object.keys(e);let i;const s=n.length;let l;for(i=0;i<s;i++)l=n[i],t[l]=e[l];return t}function zv(e){function t(n,i,s,l){let o=n[l++];if(o==="__proto__")return!0;const d=Number.isFinite(+o),h=l>=n.length;return o=!o&&K.isArray(s)?s.length:o,h?(K.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!d):((!s[o]||!K.isObject(s[o]))&&(s[o]=[]),t(n,i,s[o],l)&&K.isArray(s[o])&&(s[o]=Sk(s[o])),!d)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(i,s)=>{t(Ak(i),s,n,0)}),n}return null}function wk(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const Bu={transitional:cm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,l=K.isObject(t);if(l&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return s?JSON.stringify(zv(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Tk(t,this.formSerializer).toString();if((d=K.isFileList(t))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return dd(d?{"files[]":t}:t,h&&new h,this.formSerializer)}}return l||s?(n.setContentType("application/json",!1),wk(t)):t}],transformResponse:[function(t){const n=this.transitional||Bu.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(i&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(d){if(o)throw d.name==="SyntaxError"?Ie.from(d,Ie.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{Bu.headers[e]={}});const kk=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ck=e=>{const t={};let n,i,s;return e&&e.split(`
2
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),i=o.substring(s+1).trim(),!(!n||t[n]&&kk[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},by=Symbol("internals");function Yl(e){return e&&String(e).trim().toLowerCase()}function Lc(e){return e===!1||e==null?e:K.isArray(e)?e.map(Lc):String(e)}function Nk(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const Rk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function a0(e,t,n,i,s){if(K.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!K.isString(t)){if(K.isString(i))return t.indexOf(i)!==-1;if(K.isRegExp(i))return i.test(t)}}function Ok(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function Mk(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,l,o){return this[i].call(this,t,s,l,o)},configurable:!0})})}let kn=class{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function l(d,h,f){const m=Yl(h);if(!m)throw new Error("header name must be a non-empty string");const b=K.findKey(s,m);(!b||s[b]===void 0||f===!0||f===void 0&&s[b]!==!1)&&(s[b||h]=Lc(d))}const o=(d,h)=>K.forEach(d,(f,m)=>l(f,m,h));if(K.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(K.isString(t)&&(t=t.trim())&&!Rk(t))o(Ck(t),n);else if(K.isObject(t)&&K.isIterable(t)){let d={},h,f;for(const m of t){if(!K.isArray(m))throw TypeError("Object iterator must return a key-value pair");d[f=m[0]]=(h=d[f])?K.isArray(h)?[...h,m[1]]:[h,m[1]]:m[1]}o(d,n)}else t!=null&&l(n,t,i);return this}get(t,n){if(t=Yl(t),t){const i=K.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return Nk(s);if(K.isFunction(n))return n.call(this,s,i);if(K.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Yl(t),t){const i=K.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||a0(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function l(o){if(o=Yl(o),o){const d=K.findKey(i,o);d&&(!n||a0(i,i[d],d,n))&&(delete i[d],s=!0)}}return K.isArray(t)?t.forEach(l):l(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const l=n[i];(!t||a0(this,this[l],l,t,!0))&&(delete this[l],s=!0)}return s}normalize(t){const n=this,i={};return K.forEach(this,(s,l)=>{const o=K.findKey(i,l);if(o){n[o]=Lc(s),delete n[l];return}const d=t?Ok(l):String(l).trim();d!==l&&delete n[l],n[d]=Lc(s),i[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&K.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[by]=this[by]={accessors:{}}).accessors,s=this.prototype;function l(o){const d=Yl(o);i[d]||(Mk(s,o),i[d]=!0)}return K.isArray(t)?t.forEach(l):l(t),this}};kn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);K.reduceDescriptors(kn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});K.freezeMethods(kn);function s0(e,t){const n=this||Bu,i=t||n,s=kn.from(i.headers);let l=i.data;return K.forEach(e,function(d){l=d.call(n,l,s.normalize(),t?t.status:void 0)}),s.normalize(),l}function Pv(e){return!!(e&&e.__CANCEL__)}let zu=class extends Ie{constructor(t,n,i){super(t??"canceled",Ie.ERR_CANCELED,n,i),this.name="CanceledError",this.__CANCEL__=!0}};function Hv(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new Ie("Request failed with status code "+n.status,[Ie.ERR_BAD_REQUEST,Ie.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Dk(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,l=0,o;return t=t!==void 0?t:1e3,function(h){const f=Date.now(),m=i[l];o||(o=f),n[s]=h,i[s]=f;let b=l,x=0;for(;b!==s;)x+=n[b++],b=b%e;if(s=(s+1)%e,s===l&&(l=(l+1)%e),f-o<t)return;const E=m&&f-m;return E?Math.round(x*1e3/E):void 0}}function Ik(e,t){let n=0,i=1e3/t,s,l;const o=(f,m=Date.now())=>{n=m,s=null,l&&(clearTimeout(l),l=null),e(...f)};return[(...f)=>{const m=Date.now(),b=m-n;b>=i?o(f,m):(s=f,l||(l=setTimeout(()=>{l=null,o(s)},i-b)))},()=>s&&o(s)]}const $c=(e,t,n=3)=>{let i=0;const s=Dk(50,250);return Ik(l=>{const o=l.loaded,d=l.lengthComputable?l.total:void 0,h=o-i,f=s(h),m=o<=d;i=o;const b={loaded:o,total:d,progress:d?o/d:void 0,bytes:h,rate:f||void 0,estimated:f&&d&&m?(d-o)/f:void 0,event:l,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(b)},n)},yy=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Ey=e=>(...t)=>K.asap(()=>e(...t)),Bk=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,zk=rn.hasStandardBrowserEnv?{write(e,t,n,i,s,l,o){if(typeof document>"u")return;const d=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),K.isString(i)&&d.push(`path=${i}`),K.isString(s)&&d.push(`domain=${s}`),l===!0&&d.push("secure"),K.isString(o)&&d.push(`SameSite=${o}`),document.cookie=d.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Pk(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Hk(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Uv(e,t,n){let i=!Pk(t);return e&&(i||n==!1)?Hk(e,t):t}const xy=e=>e instanceof kn?{...e}:e;function Ra(e,t){t=t||{};const n={};function i(f,m,b,x){return K.isPlainObject(f)&&K.isPlainObject(m)?K.merge.call({caseless:x},f,m):K.isPlainObject(m)?K.merge({},m):K.isArray(m)?m.slice():m}function s(f,m,b,x){if(K.isUndefined(m)){if(!K.isUndefined(f))return i(void 0,f,b,x)}else return i(f,m,b,x)}function l(f,m){if(!K.isUndefined(m))return i(void 0,m)}function o(f,m){if(K.isUndefined(m)){if(!K.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function d(f,m,b){if(b in t)return i(f,m);if(b in e)return i(void 0,f)}const h={url:l,method:l,data:l,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:d,headers:(f,m,b)=>s(xy(f),xy(m),b,!0)};return K.forEach(Object.keys({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=K.hasOwnProp(h,m)?h[m]:s,x=b(e[m],t[m],m);K.isUndefined(x)&&b!==d||(n[m]=x)}),n}const jv=e=>{const t=Ra({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:l,headers:o,auth:d}=t;if(t.headers=o=kn.from(o),t.url=Bv(Uv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&o.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),K.isFormData(n)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const h=n.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([m,b])=>{f.includes(m.toLowerCase())&&o.set(m,b)})}}if(rn.hasStandardBrowserEnv&&(i&&K.isFunction(i)&&(i=i(t)),i||i!==!1&&Bk(t.url))){const h=s&&l&&zk.read(l);h&&o.set(s,h)}return t},Uk=typeof XMLHttpRequest<"u",jk=Uk&&function(e){return new Promise(function(n,i){const s=jv(e);let l=s.data;const o=kn.from(s.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:f}=s,m,b,x,E,T;function w(){E&&E(),T&&T(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function k(){if(!S)return;const H=kn.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),J={data:!d||d==="text"||d==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:H,config:e,request:S};Hv(function(ne){n(ne),w()},function(ne){i(ne),w()},J),S=null}"onloadend"in S?S.onloadend=k:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(k)},S.onabort=function(){S&&(i(new Ie("Request aborted",Ie.ECONNABORTED,e,S)),S=null)},S.onerror=function(V){const J=V&&V.message?V.message:"Network Error",j=new Ie(J,Ie.ERR_NETWORK,e,S);j.event=V||null,i(j),S=null},S.ontimeout=function(){let V=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const J=s.transitional||cm;s.timeoutErrorMessage&&(V=s.timeoutErrorMessage),i(new Ie(V,J.clarifyTimeoutError?Ie.ETIMEDOUT:Ie.ECONNABORTED,e,S)),S=null},l===void 0&&o.setContentType(null),"setRequestHeader"in S&&K.forEach(o.toJSON(),function(V,J){S.setRequestHeader(J,V)}),K.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),d&&d!=="json"&&(S.responseType=s.responseType),f&&([x,T]=$c(f,!0),S.addEventListener("progress",x)),h&&S.upload&&([b,E]=$c(h),S.upload.addEventListener("progress",b),S.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(m=H=>{S&&(i(!H||H.type?new zu(null,e,S):H),S.abort(),S=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const F=Lk(s.url);if(F&&rn.protocols.indexOf(F)===-1){i(new Ie("Unsupported protocol "+F+":",Ie.ERR_BAD_REQUEST,e));return}S.send(l||null)})},Fk=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,s;const l=function(f){if(!s){s=!0,d();const m=f instanceof Error?f:this.reason;i.abort(m instanceof Ie?m:new zu(m instanceof Error?m.message:m))}};let o=t&&setTimeout(()=>{o=null,l(new Ie(`timeout of ${t}ms exceeded`,Ie.ETIMEDOUT))},t);const d=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(l):f.removeEventListener("abort",l)}),e=null)};e.forEach(f=>f.addEventListener("abort",l));const{signal:h}=i;return h.unsubscribe=()=>K.asap(d),h}},$k=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,s;for(;i<n;)s=i+t,yield e.slice(i,s),i=s},qk=async function*(e,t){for await(const n of Yk(e))yield*$k(n,t)},Yk=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},vy=(e,t,n,i)=>{const s=qk(e,t);let l=0,o,d=h=>{o||(o=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:f,value:m}=await s.next();if(f){d(),h.close();return}let b=m.byteLength;if(n){let x=l+=b;n(x)}h.enqueue(new Uint8Array(m))}catch(f){throw d(f),f}},cancel(h){return d(h),s.return()}},{highWaterMark:2})},_y=64*1024,{isFunction:pc}=K,Vk=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:Ty,TextEncoder:Ay}=K.global,Sy=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gk=e=>{e=K.merge.call({skipUndefined:!0},Vk,e);const{fetch:t,Request:n,Response:i}=e,s=t?pc(t):typeof fetch=="function",l=pc(n),o=pc(i);if(!s)return!1;const d=s&&pc(Ty),h=s&&(typeof Ay=="function"?(T=>w=>T.encode(w))(new Ay):async T=>new Uint8Array(await new n(T).arrayBuffer())),f=l&&d&&Sy(()=>{let T=!1;const w=new n(rn.origin,{body:new Ty,method:"POST",get duplex(){return T=!0,"half"}}).headers.has("Content-Type");return T&&!w}),m=o&&d&&Sy(()=>K.isReadableStream(new i("").body)),b={stream:m&&(T=>T.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(T=>{!b[T]&&(b[T]=(w,S)=>{let k=w&&w[T];if(k)return k.call(w);throw new Ie(`Response type '${T}' is not supported`,Ie.ERR_NOT_SUPPORT,S)})});const x=async T=>{if(T==null)return 0;if(K.isBlob(T))return T.size;if(K.isSpecCompliantForm(T))return(await new n(rn.origin,{method:"POST",body:T}).arrayBuffer()).byteLength;if(K.isArrayBufferView(T)||K.isArrayBuffer(T))return T.byteLength;if(K.isURLSearchParams(T)&&(T=T+""),K.isString(T))return(await h(T)).byteLength},E=async(T,w)=>{const S=K.toFiniteNumber(T.getContentLength());return S??x(w)};return async T=>{let{url:w,method:S,data:k,signal:F,cancelToken:H,timeout:V,onDownloadProgress:J,onUploadProgress:j,responseType:ne,headers:Z,withCredentials:fe="same-origin",fetchOptions:z}=jv(T),$=t||fetch;ne=ne?(ne+"").toLowerCase():"text";let Y=Fk([F,H&&H.toAbortSignal()],V),_e=null;const oe=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let le;try{if(j&&f&&S!=="get"&&S!=="head"&&(le=await E(Z,k))!==0){let D=new n(w,{method:"POST",body:k,duplex:"half"}),P;if(K.isFormData(k)&&(P=D.headers.get("content-type"))&&Z.setContentType(P),D.body){const[C,ce]=yy(le,$c(Ey(j)));k=vy(D.body,_y,C,ce)}}K.isString(fe)||(fe=fe?"include":"omit");const I=l&&"credentials"in n.prototype,te={...z,signal:Y,method:S.toUpperCase(),headers:Z.normalize().toJSON(),body:k,duplex:"half",credentials:I?fe:void 0};_e=l&&new n(w,te);let be=await(l?$(_e,z):$(w,te));const ke=m&&(ne==="stream"||ne==="response");if(m&&(J||ke&&oe)){const D={};["status","statusText","headers"].forEach(Ee=>{D[Ee]=be[Ee]});const P=K.toFiniteNumber(be.headers.get("content-length")),[C,ce]=J&&yy(P,$c(Ey(J),!0))||[];be=new i(vy(be.body,_y,C,()=>{ce&&ce(),oe&&oe()}),D)}ne=ne||"text";let O=await b[K.findKey(b,ne)||"text"](be,T);return!ke&&oe&&oe(),await new Promise((D,P)=>{Hv(D,P,{data:O,headers:kn.from(be.headers),status:be.status,statusText:be.statusText,config:T,request:_e})})}catch(I){throw oe&&oe(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new Ie("Network Error",Ie.ERR_NETWORK,T,_e,I&&I.response),{cause:I.cause||I}):Ie.from(I,I&&I.code,T,_e,I&&I.response)}}},Wk=new Map,Fv=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:s}=t,l=[i,s,n];let o=l.length,d=o,h,f,m=Wk;for(;d--;)h=l[d],f=m.get(h),f===void 0&&m.set(h,f=d?new Map:Gk(t)),m=f;return f};Fv();const fm={http:dk,xhr:jk,fetch:{get:Fv}};K.forEach(fm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const wy=e=>`- ${e}`,Xk=e=>K.isFunction(e)||e===null||e===!1;function Qk(e,t){e=K.isArray(e)?e:[e];const{length:n}=e;let i,s;const l={};for(let o=0;o<n;o++){i=e[o];let d;if(s=i,!Xk(i)&&(s=fm[(d=String(i)).toLowerCase()],s===void 0))throw new Ie(`Unknown adapter '${d}'`);if(s&&(K.isFunction(s)||(s=s.get(t))))break;l[d||"#"+o]=s}if(!s){const o=Object.entries(l).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let d=n?o.length>1?`since :
4
+ `+o.map(wy).join(`
5
+ `):" "+wy(o[0]):"as no adapter specified";throw new Ie("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return s}const $v={getAdapter:Qk,adapters:fm};function l0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zu(null,e)}function ky(e){return l0(e),e.headers=kn.from(e.headers),e.data=s0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$v.getAdapter(e.adapter||Bu.adapter,e)(e).then(function(i){return l0(e),i.data=s0.call(e,e.transformResponse,i),i.headers=kn.from(i.headers),i},function(i){return Pv(i)||(l0(e),i&&i.response&&(i.response.data=s0.call(e,e.transformResponse,i.response),i.response.headers=kn.from(i.response.headers))),Promise.reject(i)})}const qv="1.13.6",fd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fd[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Cy={};fd.transitional=function(t,n,i){function s(l,o){return"[Axios v"+qv+"] Transitional option '"+l+"'"+o+(i?". "+i:"")}return(l,o,d)=>{if(t===!1)throw new Ie(s(o," has been removed"+(n?" in "+n:"")),Ie.ERR_DEPRECATED);return n&&!Cy[o]&&(Cy[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,o,d):!0}};fd.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function Kk(e,t,n){if(typeof e!="object")throw new Ie("options must be an object",Ie.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const l=i[s],o=t[l];if(o){const d=e[l],h=d===void 0||o(d,l,e);if(h!==!0)throw new Ie("option "+l+" must be "+h,Ie.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ie("Unknown option "+l,Ie.ERR_BAD_OPTION)}}const Dc={assertOptions:Kk,validators:fd},rr=Dc.validators;let ka=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gy,response:new gy}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const l=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?l&&!String(i.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(i.stack+=`
6
+ `+l):i.stack=l}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ra(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:l}=n;i!==void 0&&Dc.assertOptions(i,{silentJSONParsing:rr.transitional(rr.boolean),forcedJSONParsing:rr.transitional(rr.boolean),clarifyTimeoutError:rr.transitional(rr.boolean),legacyInterceptorReqResOrdering:rr.transitional(rr.boolean)},!1),s!=null&&(K.isFunction(s)?n.paramsSerializer={serialize:s}:Dc.assertOptions(s,{encode:rr.function,serialize:rr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Dc.assertOptions(n,{baseUrl:rr.spelling("baseURL"),withXsrfToken:rr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=l&&K.merge(l.common,l[n.method]);l&&K.forEach(["delete","get","head","post","put","patch","common"],T=>{delete l[T]}),n.headers=kn.concat(o,l);const d=[];let h=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;h=h&&w.synchronous;const S=n.transitional||cm;S&&S.legacyInterceptorReqResOrdering?d.unshift(w.fulfilled,w.rejected):d.push(w.fulfilled,w.rejected)});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let m,b=0,x;if(!h){const T=[ky.bind(this),void 0];for(T.unshift(...d),T.push(...f),x=T.length,m=Promise.resolve(n);b<x;)m=m.then(T[b++],T[b++]);return m}x=d.length;let E=n;for(;b<x;){const T=d[b++],w=d[b++];try{E=T(E)}catch(S){w.call(this,S);break}}try{m=ky.call(this,E)}catch(T){return Promise.reject(T)}for(b=0,x=f.length;b<x;)m=m.then(f[b++],f[b++]);return m}getUri(t){t=Ra(this.defaults,t);const n=Uv(t.baseURL,t.url,t.allowAbsoluteUrls);return Bv(n,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){ka.prototype[t]=function(n,i){return this.request(Ra(i||{},{method:t,url:n,data:(i||{}).data}))}});K.forEach(["post","put","patch"],function(t){function n(i){return function(l,o,d){return this.request(Ra(d||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:l,data:o}))}}ka.prototype[t]=n(),ka.prototype[t+"Form"]=n(!0)});let Zk=class Yv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const i=this;this.promise.then(s=>{if(!i._listeners)return;let l=i._listeners.length;for(;l-- >0;)i._listeners[l](s);i._listeners=null}),this.promise.then=s=>{let l;const o=new Promise(d=>{i.subscribe(d),l=d}).then(s);return o.cancel=function(){i.unsubscribe(l)},o},t(function(l,o,d){i.reason||(i.reason=new zu(l,o,d),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Yv(function(s){t=s}),cancel:t}}};function Jk(e){return function(n){return e.apply(null,n)}}function eC(e){return K.isObject(e)&&e.isAxiosError===!0}const gp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(gp).forEach(([e,t])=>{gp[t]=e});function Vv(e){const t=new ka(e),n=Sv(ka.prototype.request,t);return K.extend(n,ka.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Vv(Ra(e,s))},n}const Tt=Vv(Bu);Tt.Axios=ka;Tt.CanceledError=zu;Tt.CancelToken=Zk;Tt.isCancel=Pv;Tt.VERSION=qv;Tt.toFormData=dd;Tt.AxiosError=Ie;Tt.Cancel=Tt.CanceledError;Tt.all=function(t){return Promise.all(t)};Tt.spread=Jk;Tt.isAxiosError=eC;Tt.mergeConfig=Ra;Tt.AxiosHeaders=kn;Tt.formToJSON=e=>zv(K.isHTMLForm(e)?new FormData(e):e);Tt.getAdapter=$v.getAdapter;Tt.HttpStatusCode=gp;Tt.default=Tt;const{Axios:SV,AxiosError:wV,CanceledError:kV,isCancel:CV,CancelToken:NV,VERSION:RV,all:OV,Cancel:MV,isAxiosError:LV,spread:DV,toFormData:IV,AxiosHeaders:BV,HttpStatusCode:zV,formToJSON:PV,getAdapter:HV,mergeConfig:UV}=Tt;var u0={exports:{}},nn={};var Ny;function tC(){if(Ny)return nn;Ny=1;var e=lm();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(h,f,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:h,containerInfo:f,implementation:m}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,nn.createPortal=function(h,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return l(h,f,null,m)},nn.flushSync=function(h){var f=o.T,m=i.p;try{if(o.T=null,i.p=2,h)return h()}finally{o.T=f,i.p=m,i.d.f()}},nn.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(h,f))},nn.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},nn.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var m=f.as,b=d(m,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,E=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?i.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:E}):m==="script"&&i.d.X(h,{crossOrigin:b,integrity:x,fetchPriority:E,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},nn.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=d(f.as,f.crossOrigin);i.d.M(h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(h)},nn.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,b=d(m,f.crossOrigin);i.d.L(h,m,{crossOrigin:b,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},nn.preloadModule=function(h,f){if(typeof h=="string")if(f){var m=d(f.as,f.crossOrigin);i.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(h)},nn.requestFormReset=function(h){i.d.r(h)},nn.unstable_batchedUpdates=function(h,f){return h(f)},nn.useFormState=function(h,f,m){return o.H.useFormState(h,f,m)},nn.useFormStatus=function(){return o.H.useHostTransitionStatus()},nn.version="19.2.4",nn}var Ry;function Gv(){if(Ry)return u0.exports;Ry=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),u0.exports=tC(),u0.exports}var Pu=Gv();const nC=Mu(Pu),rC=Av({__proto__:null,default:nC},[Pu]);var o0={exports:{}},Vl={},c0={exports:{}},d0={};var Oy;function iC(){return Oy||(Oy=1,(function(e){function t(I,te){var be=I.length;I.push(te);e:for(;0<be;){var ke=be-1>>>1,O=I[ke];if(0<s(O,te))I[ke]=te,I[be]=O,be=ke;else break e}}function n(I){return I.length===0?null:I[0]}function i(I){if(I.length===0)return null;var te=I[0],be=I.pop();if(be!==te){I[0]=be;e:for(var ke=0,O=I.length,D=O>>>1;ke<D;){var P=2*(ke+1)-1,C=I[P],ce=P+1,Ee=I[ce];if(0>s(C,be))ce<O&&0>s(Ee,C)?(I[ke]=Ee,I[ce]=be,ke=ce):(I[ke]=C,I[P]=be,ke=P);else if(ce<O&&0>s(Ee,be))I[ke]=Ee,I[ce]=be,ke=ce;else break e}}return te}function s(I,te){var be=I.sortIndex-te.sortIndex;return be!==0?be:I.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,d=o.now();e.unstable_now=function(){return o.now()-d}}var h=[],f=[],m=1,b=null,x=3,E=!1,T=!1,w=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function V(I){for(var te=n(f);te!==null;){if(te.callback===null)i(f);else if(te.startTime<=I)i(f),te.sortIndex=te.expirationTime,t(h,te);else break;te=n(f)}}function J(I){if(w=!1,V(I),!T)if(n(h)!==null)T=!0,j||(j=!0,Y());else{var te=n(f);te!==null&&le(J,te.startTime-I)}}var j=!1,ne=-1,Z=5,fe=-1;function z(){return S?!0:!(e.unstable_now()-fe<Z)}function $(){if(S=!1,j){var I=e.unstable_now();fe=I;var te=!0;try{e:{T=!1,w&&(w=!1,F(ne),ne=-1),E=!0;var be=x;try{t:{for(V(I),b=n(h);b!==null&&!(b.expirationTime>I&&z());){var ke=b.callback;if(typeof ke=="function"){b.callback=null,x=b.priorityLevel;var O=ke(b.expirationTime<=I);if(I=e.unstable_now(),typeof O=="function"){b.callback=O,V(I),te=!0;break t}b===n(h)&&i(h),V(I)}else i(h);b=n(h)}if(b!==null)te=!0;else{var D=n(f);D!==null&&le(J,D.startTime-I),te=!1}}break e}finally{b=null,x=be,E=!1}te=void 0}}finally{te?Y():j=!1}}}var Y;if(typeof H=="function")Y=function(){H($)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,oe=_e.port2;_e.port1.onmessage=$,Y=function(){oe.postMessage(null)}}else Y=function(){k($,0)};function le(I,te){ne=k(function(){I(e.unstable_now())},te)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(I){switch(x){case 1:case 2:case 3:var te=3;break;default:te=x}var be=x;x=te;try{return I()}finally{x=be}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(I,te){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var be=x;x=I;try{return te()}finally{x=be}},e.unstable_scheduleCallback=function(I,te,be){var ke=e.unstable_now();switch(typeof be=="object"&&be!==null?(be=be.delay,be=typeof be=="number"&&0<be?ke+be:ke):be=ke,I){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=be+O,I={id:m++,callback:te,priorityLevel:I,startTime:be,expirationTime:O,sortIndex:-1},be>ke?(I.sortIndex=be,t(f,I),n(h)===null&&I===n(f)&&(w?(F(ne),ne=-1):w=!0,le(J,be-ke))):(I.sortIndex=O,t(h,I),T||E||(T=!0,j||(j=!0,Y()))),I},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(I){var te=x;return function(){var be=x;x=te;try{return I.apply(this,arguments)}finally{x=be}}}})(d0)),d0}var My;function aC(){return My||(My=1,c0.exports=iC()),c0.exports}var Ly;function sC(){if(Ly)return Vl;Ly=1;var e=aC(),t=lm(),n=Gv();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,u=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(u=a.return),r=a.return;while(r)}return a.tag===3?u:null}function o(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function h(r){if(l(r)!==r)throw Error(i(188))}function f(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(i(188));return a!==r?null:r}for(var u=r,c=a;;){var p=u.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){u=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===u)return h(p),r;if(g===c)return h(p),a;g=g.sibling}throw Error(i(188))}if(u.return!==c.return)u=p,c=g;else{for(var _=!1,A=p.child;A;){if(A===u){_=!0,u=p,c=g;break}if(A===c){_=!0,c=p,u=g;break}A=A.sibling}if(!_){for(A=g.child;A;){if(A===u){_=!0,u=g,c=p;break}if(A===c){_=!0,c=g,u=p;break}A=A.sibling}if(!_)throw Error(i(189))}}if(u.alternate!==c)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?r:a}function m(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=m(r),a!==null)return a;r=r.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),H=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function Y(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var _e=Symbol.for("react.client.reference");function oe(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===_e?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case k:return"Profiler";case S:return"StrictMode";case J:return"Suspense";case j:return"SuspenseList";case fe:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case T:return"Portal";case H:return r.displayName||"Context";case F:return(r._context.displayName||"Context")+".Consumer";case V:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ne:return a=r.displayName||null,a!==null?a:oe(r.type)||"Memo";case Z:a=r._payload,r=r._init;try{return oe(r(a))}catch{}}return null}var le=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},ke=[],O=-1;function D(r){return{current:r}}function P(r){0>O||(r.current=ke[O],ke[O]=null,O--)}function C(r,a){O++,ke[O]=r.current,r.current=a}var ce=D(null),Ee=D(null),xe=D(null),Me=D(null);function Je(r,a){switch(C(xe,a),C(Ee,r),C(ce,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?O2(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=O2(a),r=M2(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}P(ce),C(ce,r)}function Oe(){P(ce),P(Ee),P(xe)}function Gt(r){r.memoizedState!==null&&C(Me,r);var a=ce.current,u=M2(a,r.type);a!==u&&(C(Ee,r),C(ce,u))}function Wt(r){Ee.current===r&&(P(ce),P(Ee)),Me.current===r&&(P(Me),Ul._currentValue=be)}var On,cr;function Xt(r){if(On===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);On=a&&a[1]||"",cr=-1<u.stack.indexOf(`
7
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
8
+ `+On+r+cr}var vr=!1;function ci(r,a){if(!r||vr)return"";vr=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ee){var Q=ee}Reflect.construct(r,[],ue)}else{try{ue.call()}catch(ee){Q=ee}r.call(ue.prototype)}}else{try{throw Error()}catch(ee){Q=ee}(ue=r())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ee){if(ee&&Q&&typeof ee.stack=="string")return[ee.stack,Q.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),_=g[0],A=g[1];if(_&&A){var B=_.split(`
9
+ `),X=A.split(`
10
+ `);for(p=c=0;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(c===B.length||p===X.length)for(c=B.length-1,p=X.length-1;1<=c&&0<=p&&B[c]!==X[p];)p--;for(;1<=c&&0<=p;c--,p--)if(B[c]!==X[p]){if(c!==1||p!==1)do if(c--,p--,0>p||B[c]!==X[p]){var ie=`
11
+ `+B[c].replace(" at new "," at ");return r.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",r.displayName)),ie}while(1<=c&&0<=p);break}}}finally{vr=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?Xt(u):""}function Ue(r,a){switch(r.tag){case 26:case 27:case 5:return Xt(r.type);case 16:return Xt("Lazy");case 13:return r.child!==a&&a!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return ci(r.type,!1);case 11:return ci(r.type.render,!1);case 1:return ci(r.type,!0);case 31:return Xt("Activity");default:return""}}function ot(r){try{var a="",u=null;do a+=Ue(r,u),u=r,r=r.return;while(r);return a}catch(c){return`
12
+ Error generating stack: `+c.message+`
13
+ `+c.stack}}var jt=Object.prototype.hasOwnProperty,un=e.unstable_scheduleCallback,dr=e.unstable_cancelCallback,Ud=e.unstable_shouldYield,jd=e.unstable_requestPaint,on=e.unstable_now,Fd=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,ye=e.unstable_UserBlockingPriority,De=e.unstable_NormalPriority,qe=e.unstable_LowPriority,rt=e.unstable_IdlePriority,Mn=e.log,zr=e.unstable_setDisableYieldValue,cn=null,zt=null;function mn(r){if(typeof Mn=="function"&&zr(r),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(cn,r)}catch{}}var pt=Math.clz32?Math.clz32:iA,di=Math.log,fr=Math.LN2;function iA(r){return r>>>=0,r===0?32:31-(di(r)/fr|0)|0}var Ku=256,Zu=262144,Ju=4194304;function Ji(r){var a=r&42;if(a!==0)return a;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function eo(r,a,u){var c=r.pendingLanes;if(c===0)return 0;var p=0,g=r.suspendedLanes,_=r.pingedLanes;r=r.warmLanes;var A=c&134217727;return A!==0?(c=A&~g,c!==0?p=Ji(c):(_&=A,_!==0?p=Ji(_):u||(u=A&~r,u!==0&&(p=Ji(u))))):(A=c&~g,A!==0?p=Ji(A):_!==0?p=Ji(_):u||(u=c&~r,u!==0&&(p=Ji(u)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,u=a&-a,g>=u||g===32&&(u&4194048)!==0)?a:p}function Js(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function aA(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 f1(){var r=Ju;return Ju<<=1,(Ju&62914560)===0&&(Ju=4194304),r}function $d(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function el(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function sA(r,a,u,c,p,g){var _=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var A=r.entanglements,B=r.expirationTimes,X=r.hiddenUpdates;for(u=_&~u;0<u;){var ie=31-pt(u),ue=1<<ie;A[ie]=0,B[ie]=-1;var Q=X[ie];if(Q!==null)for(X[ie]=null,ie=0;ie<Q.length;ie++){var ee=Q[ie];ee!==null&&(ee.lane&=-536870913)}u&=~ue}c!==0&&h1(r,c,0),g!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=g&~(_&~a))}function h1(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var c=31-pt(a);r.entangledLanes|=a,r.entanglements[c]=r.entanglements[c]|1073741824|u&261930}function p1(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var c=31-pt(u),p=1<<c;p&a|r[c]&a&&(r[c]|=a),u&=~p}}function m1(r,a){var u=a&-a;return u=(u&42)!==0?1:qd(u),(u&(r.suspendedLanes|a))!==0?0:u}function qd(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Yd(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function g1(){var r=te.p;return r!==0?r:(r=window.event,r===void 0?32:ty(r.type))}function b1(r,a){var u=te.p;try{return te.p=r,a()}finally{te.p=u}}var fi=Math.random().toString(36).slice(2),Qt="__reactFiber$"+fi,gn="__reactProps$"+fi,ja="__reactContainer$"+fi,Vd="__reactEvents$"+fi,lA="__reactListeners$"+fi,uA="__reactHandles$"+fi,y1="__reactResources$"+fi,tl="__reactMarker$"+fi;function Gd(r){delete r[Qt],delete r[gn],delete r[Vd],delete r[lA],delete r[uA]}function Fa(r){var a=r[Qt];if(a)return a;for(var u=r.parentNode;u;){if(a=u[ja]||u[Qt]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=H2(r);r!==null;){if(u=r[Qt])return u;r=H2(r)}return a}r=u,u=r.parentNode}return null}function $a(r){if(r=r[Qt]||r[ja]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function nl(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function qa(r){var a=r[y1];return a||(a=r[y1]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[tl]=!0}var E1=new Set,x1={};function ea(r,a){Ya(r,a),Ya(r+"Capture",a)}function Ya(r,a){for(x1[r]=a,r=0;r<a.length;r++)E1.add(a[r])}var oA=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]*$"),v1={},_1={};function cA(r){return jt.call(_1,r)?!0:jt.call(v1,r)?!1:oA.test(r)?_1[r]=!0:(v1[r]=!0,!1)}function to(r,a,u){if(cA(a))if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+u)}}function no(r,a,u){if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+u)}}function Pr(r,a,u,c){if(c===null)r.removeAttribute(u);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(a,u,""+c)}}function Gn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function T1(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function dA(r,a,u){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,g=c.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return p.call(this)},set:function(_){u=""+_,g.call(this,_)}}),Object.defineProperty(r,a,{enumerable:c.enumerable}),{getValue:function(){return u},setValue:function(_){u=""+_},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function Wd(r){if(!r._valueTracker){var a=T1(r)?"checked":"value";r._valueTracker=dA(r,a,""+r[a])}}function A1(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),c="";return r&&(c=T1(r)?r.checked?"true":"false":r.value),r=c,r!==u?(a.setValue(r),!0):!1}function ro(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var fA=/[\n"\\]/g;function Wn(r){return r.replace(fA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Xd(r,a,u,c,p,g,_,A){r.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?r.type=_:r.removeAttribute("type"),a!=null?_==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Gn(a)):r.value!==""+Gn(a)&&(r.value=""+Gn(a)):_!=="submit"&&_!=="reset"||r.removeAttribute("value"),a!=null?Qd(r,_,Gn(a)):u!=null?Qd(r,_,Gn(u)):c!=null&&r.removeAttribute("value"),p==null&&g!=null&&(r.defaultChecked=!!g),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.name=""+Gn(A):r.removeAttribute("name")}function S1(r,a,u,c,p,g,_,A){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||u!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){Wd(r);return}u=u!=null?""+Gn(u):"",a=a!=null?""+Gn(a):u,A||a===r.value||(r.value=a),r.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=A?r.checked:!!c,r.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(r.name=_),Wd(r)}function Qd(r,a,u){a==="number"&&ro(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function Va(r,a,u,c){if(r=r.options,a){a={};for(var p=0;p<u.length;p++)a["$"+u[p]]=!0;for(u=0;u<r.length;u++)p=a.hasOwnProperty("$"+r[u].value),r[u].selected!==p&&(r[u].selected=p),p&&c&&(r[u].defaultSelected=!0)}else{for(u=""+Gn(u),a=null,p=0;p<r.length;p++){if(r[p].value===u){r[p].selected=!0,c&&(r[p].defaultSelected=!0);return}a!==null||r[p].disabled||(a=r[p])}a!==null&&(a.selected=!0)}}function w1(r,a,u){if(a!=null&&(a=""+Gn(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+Gn(u):""}function k1(r,a,u,c){if(a==null){if(c!=null){if(u!=null)throw Error(i(92));if(le(c)){if(1<c.length)throw Error(i(93));c=c[0]}u=c}u==null&&(u=""),a=u}u=Gn(a),r.defaultValue=u,c=r.textContent,c===u&&c!==""&&c!==null&&(r.value=c),Wd(r)}function Ga(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var hA=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 C1(r,a,u){var c=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?c?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":c?r.setProperty(a,u):typeof u!="number"||u===0||hA.has(a)?a==="float"?r.cssFloat=u:r[a]=(""+u).trim():r[a]=u+"px"}function N1(r,a,u){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,u!=null){for(var c in u)!u.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&u[p]!==c&&C1(r,p,c)}else for(var g in a)a.hasOwnProperty(g)&&C1(r,g,a[g])}function Kd(r){if(r.indexOf("-")===-1)return!1;switch(r){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 pA=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"],["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"]]),mA=/^[\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 io(r){return mA.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Hr(){}var Zd=null;function Jd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Wa=null,Xa=null;function R1(r){var a=$a(r);if(a&&(r=a.stateNode)){var u=r[gn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Xd(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Wn(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var c=u[a];if(c!==r&&c.form===r.form){var p=c[gn]||null;if(!p)throw Error(i(90));Xd(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<u.length;a++)c=u[a],c.form===r.form&&A1(c)}break e;case"textarea":w1(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Va(r,!!u.multiple,a,!1)}}}var ef=!1;function O1(r,a,u){if(ef)return r(a,u);ef=!0;try{var c=r(a);return c}finally{if(ef=!1,(Wa!==null||Xa!==null)&&(Vo(),Wa&&(a=Wa,r=Xa,Xa=Wa=null,R1(a),r)))for(a=0;a<r.length;a++)R1(r[a])}}function rl(r,a){var u=r.stateNode;if(u===null)return null;var c=u[gn]||null;if(c===null)return null;u=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(i(231,a,typeof u));return u}var Ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tf=!1;if(Ur)try{var il={};Object.defineProperty(il,"passive",{get:function(){tf=!0}}),window.addEventListener("test",il,il),window.removeEventListener("test",il,il)}catch{tf=!1}var hi=null,nf=null,ao=null;function M1(){if(ao)return ao;var r,a=nf,u=a.length,c,p="value"in hi?hi.value:hi.textContent,g=p.length;for(r=0;r<u&&a[r]===p[r];r++);var _=u-r;for(c=1;c<=_&&a[u-c]===p[g-c];c++);return ao=p.slice(r,1<c?1-c:void 0)}function so(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function lo(){return!0}function L1(){return!1}function bn(r){function a(u,c,p,g,_){this._reactName=u,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(u=r[A],this[A]=u?u(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?lo:L1,this.isPropagationStopped=L1,this}return b(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),a}var ta={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uo=bn(ta),al=b({},ta,{view:0,detail:0}),gA=bn(al),rf,af,sl,oo=b({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==sl&&(sl&&r.type==="mousemove"?(rf=r.screenX-sl.screenX,af=r.screenY-sl.screenY):af=rf=0,sl=r),rf)},movementY:function(r){return"movementY"in r?r.movementY:af}}),D1=bn(oo),bA=b({},oo,{dataTransfer:0}),yA=bn(bA),EA=b({},al,{relatedTarget:0}),sf=bn(EA),xA=b({},ta,{animationName:0,elapsedTime:0,pseudoElement:0}),vA=bn(xA),_A=b({},ta,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),TA=bn(_A),AA=b({},ta,{data:0}),I1=bn(AA),SA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wA={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"},kA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CA(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=kA[r])?!!a[r]:!1}function lf(){return CA}var NA=b({},al,{key:function(r){if(r.key){var a=SA[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=so(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?wA[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lf,charCode:function(r){return r.type==="keypress"?so(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?so(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),RA=bn(NA),OA=b({},oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),B1=bn(OA),MA=b({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lf}),LA=bn(MA),DA=b({},ta,{propertyName:0,elapsedTime:0,pseudoElement:0}),IA=bn(DA),BA=b({},oo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),zA=bn(BA),PA=b({},ta,{newState:0,oldState:0}),HA=bn(PA),UA=[9,13,27,32],uf=Ur&&"CompositionEvent"in window,ll=null;Ur&&"documentMode"in document&&(ll=document.documentMode);var jA=Ur&&"TextEvent"in window&&!ll,z1=Ur&&(!uf||ll&&8<ll&&11>=ll),P1=" ",H1=!1;function U1(r,a){switch(r){case"keyup":return UA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function j1(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Qa=!1;function FA(r,a){switch(r){case"compositionend":return j1(a);case"keypress":return a.which!==32?null:(H1=!0,P1);case"textInput":return r=a.data,r===P1&&H1?null:r;default:return null}}function $A(r,a){if(Qa)return r==="compositionend"||!uf&&U1(r,a)?(r=M1(),ao=nf=hi=null,Qa=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return z1&&a.locale!=="ko"?null:a.data;default:return null}}var qA={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 F1(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!qA[r.type]:a==="textarea"}function $1(r,a,u,c){Wa?Xa?Xa.push(c):Xa=[c]:Wa=c,a=Jo(a,"onChange"),0<a.length&&(u=new uo("onChange","change",null,u,c),r.push({event:u,listeners:a}))}var ul=null,ol=null;function YA(r){S2(r,0)}function co(r){var a=nl(r);if(A1(a))return r}function q1(r,a){if(r==="change")return a}var Y1=!1;if(Ur){var of;if(Ur){var cf="oninput"in document;if(!cf){var V1=document.createElement("div");V1.setAttribute("oninput","return;"),cf=typeof V1.oninput=="function"}of=cf}else of=!1;Y1=of&&(!document.documentMode||9<document.documentMode)}function G1(){ul&&(ul.detachEvent("onpropertychange",W1),ol=ul=null)}function W1(r){if(r.propertyName==="value"&&co(ol)){var a=[];$1(a,ol,r,Jd(r)),O1(YA,a)}}function VA(r,a,u){r==="focusin"?(G1(),ul=a,ol=u,ul.attachEvent("onpropertychange",W1)):r==="focusout"&&G1()}function GA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return co(ol)}function WA(r,a){if(r==="click")return co(a)}function XA(r,a){if(r==="input"||r==="change")return co(a)}function QA(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var Ln=typeof Object.is=="function"?Object.is:QA;function cl(r,a){if(Ln(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),c=Object.keys(a);if(u.length!==c.length)return!1;for(c=0;c<u.length;c++){var p=u[c];if(!jt.call(a,p)||!Ln(r[p],a[p]))return!1}return!0}function X1(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Q1(r,a){var u=X1(r);r=0;for(var c;u;){if(u.nodeType===3){if(c=r+u.textContent.length,r<=a&&c>=a)return{node:u,offset:a-r};r=c}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=X1(u)}}function K1(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?K1(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Z1(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=ro(r.document);a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=ro(r.document)}return a}function df(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var KA=Ur&&"documentMode"in document&&11>=document.documentMode,Ka=null,ff=null,dl=null,hf=!1;function J1(r,a,u){var c=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;hf||Ka==null||Ka!==ro(c)||(c=Ka,"selectionStart"in c&&df(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),dl&&cl(dl,c)||(dl=c,c=Jo(ff,"onSelect"),0<c.length&&(a=new uo("onSelect","select",null,a,u),r.push({event:a,listeners:c}),a.target=Ka)))}function na(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var Za={animationend:na("Animation","AnimationEnd"),animationiteration:na("Animation","AnimationIteration"),animationstart:na("Animation","AnimationStart"),transitionrun:na("Transition","TransitionRun"),transitionstart:na("Transition","TransitionStart"),transitioncancel:na("Transition","TransitionCancel"),transitionend:na("Transition","TransitionEnd")},pf={},eg={};Ur&&(eg=document.createElement("div").style,"AnimationEvent"in window||(delete Za.animationend.animation,delete Za.animationiteration.animation,delete Za.animationstart.animation),"TransitionEvent"in window||delete Za.transitionend.transition);function ra(r){if(pf[r])return pf[r];if(!Za[r])return r;var a=Za[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in eg)return pf[r]=a[u];return r}var tg=ra("animationend"),ng=ra("animationiteration"),rg=ra("animationstart"),ZA=ra("transitionrun"),JA=ra("transitionstart"),eS=ra("transitioncancel"),ig=ra("transitionend"),ag=new Map,mf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");mf.push("scrollEnd");function hr(r,a){ag.set(r,a),ea(a,[r])}var fo=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Xn=[],Ja=0,gf=0;function ho(){for(var r=Ja,a=gf=Ja=0;a<r;){var u=Xn[a];Xn[a++]=null;var c=Xn[a];Xn[a++]=null;var p=Xn[a];Xn[a++]=null;var g=Xn[a];if(Xn[a++]=null,c!==null&&p!==null){var _=c.pending;_===null?p.next=p:(p.next=_.next,_.next=p),c.pending=p}g!==0&&sg(u,p,g)}}function po(r,a,u,c){Xn[Ja++]=r,Xn[Ja++]=a,Xn[Ja++]=u,Xn[Ja++]=c,gf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function bf(r,a,u,c){return po(r,a,u,c),mo(r)}function ia(r,a){return po(r,null,null,a),mo(r)}function sg(r,a,u){r.lanes|=u;var c=r.alternate;c!==null&&(c.lanes|=u);for(var p=!1,g=r.return;g!==null;)g.childLanes|=u,c=g.alternate,c!==null&&(c.childLanes|=u),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(p=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,p&&a!==null&&(p=31-pt(u),r=g.hiddenUpdates,c=r[p],c===null?r[p]=[a]:c.push(a),a.lane=u|536870912),g):null}function mo(r){if(50<Ll)throw Ll=0,wh=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var es={};function tS(r,a,u,c){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(r,a,u,c){return new tS(r,a,u,c)}function yf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function jr(r,a){var u=r.alternate;return u===null?(u=Dn(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function lg(r,a){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,a=u.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function go(r,a,u,c,p,g){var _=0;if(c=r,typeof r=="function")yf(r)&&(_=1);else if(typeof r=="string")_=sw(r,u,ce.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case fe:return r=Dn(31,u,a,p),r.elementType=fe,r.lanes=g,r;case w:return aa(u.children,p,g,a);case S:_=8,p|=24;break;case k:return r=Dn(12,u,a,p|2),r.elementType=k,r.lanes=g,r;case J:return r=Dn(13,u,a,p),r.elementType=J,r.lanes=g,r;case j:return r=Dn(19,u,a,p),r.elementType=j,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case H:_=10;break e;case F:_=9;break e;case V:_=11;break e;case ne:_=14;break e;case Z:_=16,c=null;break e}_=29,u=Error(i(130,r===null?"null":typeof r,"")),c=null}return a=Dn(_,u,a,p),a.elementType=r,a.type=c,a.lanes=g,a}function aa(r,a,u,c){return r=Dn(7,r,c,a),r.lanes=u,r}function Ef(r,a,u){return r=Dn(6,r,null,a),r.lanes=u,r}function ug(r){var a=Dn(18,null,null,0);return a.stateNode=r,a}function xf(r,a,u){return a=Dn(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var og=new WeakMap;function Qn(r,a){if(typeof r=="object"&&r!==null){var u=og.get(r);return u!==void 0?u:(a={value:r,source:a,stack:ot(a)},og.set(r,a),a)}return{value:r,source:a,stack:ot(a)}}var ts=[],ns=0,bo=null,fl=0,Kn=[],Zn=0,pi=null,_r=1,Tr="";function Fr(r,a){ts[ns++]=fl,ts[ns++]=bo,bo=r,fl=a}function cg(r,a,u){Kn[Zn++]=_r,Kn[Zn++]=Tr,Kn[Zn++]=pi,pi=r;var c=_r;r=Tr;var p=32-pt(c)-1;c&=~(1<<p),u+=1;var g=32-pt(a)+p;if(30<g){var _=p-p%5;g=(c&(1<<_)-1).toString(32),c>>=_,p-=_,_r=1<<32-pt(a)+p|u<<p|c,Tr=g+r}else _r=1<<g|u<<p|c,Tr=r}function vf(r){r.return!==null&&(Fr(r,1),cg(r,1,0))}function _f(r){for(;r===bo;)bo=ts[--ns],ts[ns]=null,fl=ts[--ns],ts[ns]=null;for(;r===pi;)pi=Kn[--Zn],Kn[Zn]=null,Tr=Kn[--Zn],Kn[Zn]=null,_r=Kn[--Zn],Kn[Zn]=null}function dg(r,a){Kn[Zn++]=_r,Kn[Zn++]=Tr,Kn[Zn++]=pi,_r=a.id,Tr=a.overflow,pi=r}var Kt=null,Et=null,Qe=!1,mi=null,Jn=!1,Tf=Error(i(519));function gi(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hl(Qn(a,r)),Tf}function fg(r){var a=r.stateNode,u=r.type,c=r.memoizedProps;switch(a[Qt]=r,a[gn]=c,u){case"dialog":Ve("cancel",a),Ve("close",a);break;case"iframe":case"object":case"embed":Ve("load",a);break;case"video":case"audio":for(u=0;u<Il.length;u++)Ve(Il[u],a);break;case"source":Ve("error",a);break;case"img":case"image":case"link":Ve("error",a),Ve("load",a);break;case"details":Ve("toggle",a);break;case"input":Ve("invalid",a),S1(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ve("invalid",a);break;case"textarea":Ve("invalid",a),k1(a,c.value,c.defaultValue,c.children)}u=c.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||c.suppressHydrationWarning===!0||N2(a.textContent,u)?(c.popover!=null&&(Ve("beforetoggle",a),Ve("toggle",a)),c.onScroll!=null&&Ve("scroll",a),c.onScrollEnd!=null&&Ve("scrollend",a),c.onClick!=null&&(a.onclick=Hr),a=!0):a=!1,a||gi(r,!0)}function hg(r){for(Kt=r.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:Jn=!1;return;case 27:case 3:Jn=!0;return;default:Kt=Kt.return}}function rs(r){if(r!==Kt)return!1;if(!Qe)return hg(r),Qe=!0,!1;var a=r.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||jh(r.type,r.memoizedProps)),u=!u),u&&Et&&gi(r),hg(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Et=P2(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Et=P2(r)}else a===27?(a=Et,Ri(r.type)?(r=Vh,Vh=null,Et=r):Et=a):Et=Kt?tr(r.stateNode.nextSibling):null;return!0}function sa(){Et=Kt=null,Qe=!1}function Af(){var r=mi;return r!==null&&(vn===null?vn=r:vn.push.apply(vn,r),mi=null),r}function hl(r){mi===null?mi=[r]:mi.push(r)}var Sf=D(null),la=null,$r=null;function bi(r,a,u){C(Sf,a._currentValue),a._currentValue=u}function qr(r){r._currentValue=Sf.current,P(Sf)}function wf(r,a,u){for(;r!==null;){var c=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),r===u)break;r=r.return}}function kf(r,a,u,c){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var g=p.dependencies;if(g!==null){var _=p.child;g=g.firstContext;e:for(;g!==null;){var A=g;g=p;for(var B=0;B<a.length;B++)if(A.context===a[B]){g.lanes|=u,A=g.alternate,A!==null&&(A.lanes|=u),wf(g.return,u,r),c||(_=null);break e}g=A.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(i(341));_.lanes|=u,g=_.alternate,g!==null&&(g.lanes|=u),wf(_,u,r),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===r){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function is(r,a,u,c){r=null;for(var p=a,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(i(387));if(_=_.memoizedProps,_!==null){var A=p.type;Ln(p.pendingProps.value,_.value)||(r!==null?r.push(A):r=[A])}}else if(p===Me.current){if(_=p.alternate,_===null)throw Error(i(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push(Ul):r=[Ul])}p=p.return}r!==null&&kf(a,r,u,c),a.flags|=262144}function yo(r){for(r=r.firstContext;r!==null;){if(!Ln(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ua(r){la=r,$r=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Zt(r){return pg(la,r)}function Eo(r,a){return la===null&&ua(r),pg(r,a)}function pg(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},$r===null){if(r===null)throw Error(i(308));$r=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else $r=$r.next=a;return u}var nS=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(u,c){r.push(c)}};this.abort=function(){a.aborted=!0,r.forEach(function(u){return u()})}},rS=e.unstable_scheduleCallback,iS=e.unstable_NormalPriority,Ot={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cf(){return{controller:new nS,data:new Map,refCount:0}}function pl(r){r.refCount--,r.refCount===0&&rS(iS,function(){r.controller.abort()})}var ml=null,Nf=0,as=0,ss=null;function aS(r,a){if(ml===null){var u=ml=[];Nf=0,as=Mh(),ss={status:"pending",value:void 0,then:function(c){u.push(c)}}}return Nf++,a.then(mg,mg),a}function mg(){if(--Nf===0&&ml!==null){ss!==null&&(ss.status="fulfilled");var r=ml;ml=null,as=0,ss=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function sS(r,a){var u=[],c={status:"pending",value:null,reason:null,then:function(p){u.push(p)}};return r.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<u.length;p++)(0,u[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<u.length;p++)(0,u[p])(void 0)}),c}var gg=I.S;I.S=function(r,a){Jb=on(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&aS(r,a),gg!==null&&gg(r,a)};var oa=D(null);function Rf(){var r=oa.current;return r!==null?r:mt.pooledCache}function xo(r,a){a===null?C(oa,oa.current):C(oa,a.pool)}function bg(){var r=Rf();return r===null?null:{parent:Ot._currentValue,pool:r}}var ls=Error(i(460)),Of=Error(i(474)),vo=Error(i(542)),_o={then:function(){}};function yg(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Eg(r,a,u){switch(u=r[u],u===void 0?r.push(a):u!==a&&(a.then(Hr,Hr),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,vg(r),r;default:if(typeof a.status=="string")a.then(Hr,Hr);else{if(r=mt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,vg(r),r}throw da=a,ls}}function ca(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(da=u,ls):u}}var da=null;function xg(){if(da===null)throw Error(i(459));var r=da;return da=null,r}function vg(r){if(r===ls||r===vo)throw Error(i(483))}var us=null,gl=0;function To(r){var a=gl;return gl+=1,us===null&&(us=[]),Eg(us,r,a)}function bl(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Ao(r,a){throw a.$$typeof===x?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function _g(r){function a(q,U){if(r){var W=q.deletions;W===null?(q.deletions=[U],q.flags|=16):W.push(U)}}function u(q,U){if(!r)return null;for(;U!==null;)a(q,U),U=U.sibling;return null}function c(q){for(var U=new Map;q!==null;)q.key!==null?U.set(q.key,q):U.set(q.index,q),q=q.sibling;return U}function p(q,U){return q=jr(q,U),q.index=0,q.sibling=null,q}function g(q,U,W){return q.index=W,r?(W=q.alternate,W!==null?(W=W.index,W<U?(q.flags|=67108866,U):W):(q.flags|=67108866,U)):(q.flags|=1048576,U)}function _(q){return r&&q.alternate===null&&(q.flags|=67108866),q}function A(q,U,W,se){return U===null||U.tag!==6?(U=Ef(W,q.mode,se),U.return=q,U):(U=p(U,W),U.return=q,U)}function B(q,U,W,se){var Ce=W.type;return Ce===w?ie(q,U,W.props.children,se,W.key):U!==null&&(U.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Z&&ca(Ce)===U.type)?(U=p(U,W.props),bl(U,W),U.return=q,U):(U=go(W.type,W.key,W.props,null,q.mode,se),bl(U,W),U.return=q,U)}function X(q,U,W,se){return U===null||U.tag!==4||U.stateNode.containerInfo!==W.containerInfo||U.stateNode.implementation!==W.implementation?(U=xf(W,q.mode,se),U.return=q,U):(U=p(U,W.children||[]),U.return=q,U)}function ie(q,U,W,se,Ce){return U===null||U.tag!==7?(U=aa(W,q.mode,se,Ce),U.return=q,U):(U=p(U,W),U.return=q,U)}function ue(q,U,W){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=Ef(""+U,q.mode,W),U.return=q,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case E:return W=go(U.type,U.key,U.props,null,q.mode,W),bl(W,U),W.return=q,W;case T:return U=xf(U,q.mode,W),U.return=q,U;case Z:return U=ca(U),ue(q,U,W)}if(le(U)||Y(U))return U=aa(U,q.mode,W,null),U.return=q,U;if(typeof U.then=="function")return ue(q,To(U),W);if(U.$$typeof===H)return ue(q,Eo(q,U),W);Ao(q,U)}return null}function Q(q,U,W,se){var Ce=U!==null?U.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ce!==null?null:A(q,U,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===Ce?B(q,U,W,se):null;case T:return W.key===Ce?X(q,U,W,se):null;case Z:return W=ca(W),Q(q,U,W,se)}if(le(W)||Y(W))return Ce!==null?null:ie(q,U,W,se,null);if(typeof W.then=="function")return Q(q,U,To(W),se);if(W.$$typeof===H)return Q(q,U,Eo(q,W),se);Ao(q,W)}return null}function ee(q,U,W,se,Ce){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return q=q.get(W)||null,A(U,q,""+se,Ce);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case E:return q=q.get(se.key===null?W:se.key)||null,B(U,q,se,Ce);case T:return q=q.get(se.key===null?W:se.key)||null,X(U,q,se,Ce);case Z:return se=ca(se),ee(q,U,W,se,Ce)}if(le(se)||Y(se))return q=q.get(W)||null,ie(U,q,se,Ce,null);if(typeof se.then=="function")return ee(q,U,W,To(se),Ce);if(se.$$typeof===H)return ee(q,U,W,Eo(U,se),Ce);Ao(U,se)}return null}function Te(q,U,W,se){for(var Ce=null,et=null,we=U,Pe=U=0,Xe=null;we!==null&&Pe<W.length;Pe++){we.index>Pe?(Xe=we,we=null):Xe=we.sibling;var tt=Q(q,we,W[Pe],se);if(tt===null){we===null&&(we=Xe);break}r&&we&&tt.alternate===null&&a(q,we),U=g(tt,U,Pe),et===null?Ce=tt:et.sibling=tt,et=tt,we=Xe}if(Pe===W.length)return u(q,we),Qe&&Fr(q,Pe),Ce;if(we===null){for(;Pe<W.length;Pe++)we=ue(q,W[Pe],se),we!==null&&(U=g(we,U,Pe),et===null?Ce=we:et.sibling=we,et=we);return Qe&&Fr(q,Pe),Ce}for(we=c(we);Pe<W.length;Pe++)Xe=ee(we,q,Pe,W[Pe],se),Xe!==null&&(r&&Xe.alternate!==null&&we.delete(Xe.key===null?Pe:Xe.key),U=g(Xe,U,Pe),et===null?Ce=Xe:et.sibling=Xe,et=Xe);return r&&we.forEach(function(Ii){return a(q,Ii)}),Qe&&Fr(q,Pe),Ce}function Re(q,U,W,se){if(W==null)throw Error(i(151));for(var Ce=null,et=null,we=U,Pe=U=0,Xe=null,tt=W.next();we!==null&&!tt.done;Pe++,tt=W.next()){we.index>Pe?(Xe=we,we=null):Xe=we.sibling;var Ii=Q(q,we,tt.value,se);if(Ii===null){we===null&&(we=Xe);break}r&&we&&Ii.alternate===null&&a(q,we),U=g(Ii,U,Pe),et===null?Ce=Ii:et.sibling=Ii,et=Ii,we=Xe}if(tt.done)return u(q,we),Qe&&Fr(q,Pe),Ce;if(we===null){for(;!tt.done;Pe++,tt=W.next())tt=ue(q,tt.value,se),tt!==null&&(U=g(tt,U,Pe),et===null?Ce=tt:et.sibling=tt,et=tt);return Qe&&Fr(q,Pe),Ce}for(we=c(we);!tt.done;Pe++,tt=W.next())tt=ee(we,q,Pe,tt.value,se),tt!==null&&(r&&tt.alternate!==null&&we.delete(tt.key===null?Pe:tt.key),U=g(tt,U,Pe),et===null?Ce=tt:et.sibling=tt,et=tt);return r&&we.forEach(function(bw){return a(q,bw)}),Qe&&Fr(q,Pe),Ce}function ft(q,U,W,se){if(typeof W=="object"&&W!==null&&W.type===w&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:e:{for(var Ce=W.key;U!==null;){if(U.key===Ce){if(Ce=W.type,Ce===w){if(U.tag===7){u(q,U.sibling),se=p(U,W.props.children),se.return=q,q=se;break e}}else if(U.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Z&&ca(Ce)===U.type){u(q,U.sibling),se=p(U,W.props),bl(se,W),se.return=q,q=se;break e}u(q,U);break}else a(q,U);U=U.sibling}W.type===w?(se=aa(W.props.children,q.mode,se,W.key),se.return=q,q=se):(se=go(W.type,W.key,W.props,null,q.mode,se),bl(se,W),se.return=q,q=se)}return _(q);case T:e:{for(Ce=W.key;U!==null;){if(U.key===Ce)if(U.tag===4&&U.stateNode.containerInfo===W.containerInfo&&U.stateNode.implementation===W.implementation){u(q,U.sibling),se=p(U,W.children||[]),se.return=q,q=se;break e}else{u(q,U);break}else a(q,U);U=U.sibling}se=xf(W,q.mode,se),se.return=q,q=se}return _(q);case Z:return W=ca(W),ft(q,U,W,se)}if(le(W))return Te(q,U,W,se);if(Y(W)){if(Ce=Y(W),typeof Ce!="function")throw Error(i(150));return W=Ce.call(W),Re(q,U,W,se)}if(typeof W.then=="function")return ft(q,U,To(W),se);if(W.$$typeof===H)return ft(q,U,Eo(q,W),se);Ao(q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,U!==null&&U.tag===6?(u(q,U.sibling),se=p(U,W),se.return=q,q=se):(u(q,U),se=Ef(W,q.mode,se),se.return=q,q=se),_(q)):u(q,U)}return function(q,U,W,se){try{gl=0;var Ce=ft(q,U,W,se);return us=null,Ce}catch(we){if(we===ls||we===vo)throw we;var et=Dn(29,we,null,q.mode);return et.lanes=se,et.return=q,et}}}var fa=_g(!0),Tg=_g(!1),yi=!1;function Mf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lf(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Ei(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function xi(r,a,u){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(nt&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=mo(r),sg(r,null,u),a}return po(r,c,a,u),mo(r)}function yl(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var c=a.lanes;c&=r.pendingLanes,u|=c,a.lanes=u,p1(r,u)}}function Df(r,a){var u=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,u===c)){var p=null,g=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};g===null?p=g=_:g=g.next=_,u=u.next}while(u!==null);g===null?p=g=a:g=g.next=a}else p=g=a;u={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}var If=!1;function El(){if(If){var r=ss;if(r!==null)throw r}}function xl(r,a,u,c){If=!1;var p=r.updateQueue;yi=!1;var g=p.firstBaseUpdate,_=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var B=A,X=B.next;B.next=null,_===null?g=X:_.next=X,_=B;var ie=r.alternate;ie!==null&&(ie=ie.updateQueue,A=ie.lastBaseUpdate,A!==_&&(A===null?ie.firstBaseUpdate=X:A.next=X,ie.lastBaseUpdate=B))}if(g!==null){var ue=p.baseState;_=0,ie=X=B=null,A=g;do{var Q=A.lane&-536870913,ee=Q!==A.lane;if(ee?(We&Q)===Q:(c&Q)===Q){Q!==0&&Q===as&&(If=!0),ie!==null&&(ie=ie.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var Te=r,Re=A;Q=a;var ft=u;switch(Re.tag){case 1:if(Te=Re.payload,typeof Te=="function"){ue=Te.call(ft,ue,Q);break e}ue=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Re.payload,Q=typeof Te=="function"?Te.call(ft,ue,Q):Te,Q==null)break e;ue=b({},ue,Q);break e;case 2:yi=!0}}Q=A.callback,Q!==null&&(r.flags|=64,ee&&(r.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[Q]:ee.push(Q))}else ee={lane:Q,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ie===null?(X=ie=ee,B=ue):ie=ie.next=ee,_|=Q;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;ee=A,A=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ie===null&&(B=ue),p.baseState=B,p.firstBaseUpdate=X,p.lastBaseUpdate=ie,g===null&&(p.shared.lanes=0),Si|=_,r.lanes=_,r.memoizedState=ue}}function Ag(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function Sg(r,a){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)Ag(u[r],a)}var os=D(null),So=D(0);function wg(r,a){r=Jr,C(So,r),C(os,a),Jr=r|a.baseLanes}function Bf(){C(So,Jr),C(os,os.current)}function zf(){Jr=So.current,P(os),P(So)}var In=D(null),er=null;function vi(r){var a=r.alternate;C(Ct,Ct.current&1),C(In,r),er===null&&(a===null||os.current!==null||a.memoizedState!==null)&&(er=r)}function Pf(r){C(Ct,Ct.current),C(In,r),er===null&&(er=r)}function kg(r){r.tag===22?(C(Ct,Ct.current),C(In,r),er===null&&(er=r)):_i()}function _i(){C(Ct,Ct.current),C(In,In.current)}function Bn(r){P(In),er===r&&(er=null),P(Ct)}var Ct=D(0);function wo(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||qh(u)||Yh(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Yr=0,ze=null,ct=null,Mt=null,ko=!1,cs=!1,ha=!1,Co=0,vl=0,ds=null,lS=0;function At(){throw Error(i(321))}function Hf(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!Ln(r[u],a[u]))return!1;return!0}function Uf(r,a,u,c,p,g){return Yr=g,ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=r===null||r.memoizedState===null?cb:th,ha=!1,g=u(c,p),ha=!1,cs&&(g=Ng(a,u,c,p)),Cg(r),g}function Cg(r){I.H=Al;var a=ct!==null&&ct.next!==null;if(Yr=0,Mt=ct=ze=null,ko=!1,vl=0,ds=null,a)throw Error(i(300));r===null||Lt||(r=r.dependencies,r!==null&&yo(r)&&(Lt=!0))}function Ng(r,a,u,c){ze=r;var p=0;do{if(cs&&(ds=null),vl=0,cs=!1,25<=p)throw Error(i(301));if(p+=1,Mt=ct=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}I.H=db,g=a(u,c)}while(cs);return g}function uS(){var r=I.H,a=r.useState()[0];return a=typeof a.then=="function"?_l(a):a,r=r.useState()[0],(ct!==null?ct.memoizedState:null)!==r&&(ze.flags|=1024),a}function jf(){var r=Co!==0;return Co=0,r}function Ff(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function $f(r){if(ko){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}ko=!1}Yr=0,Mt=ct=ze=null,cs=!1,vl=Co=0,ds=null}function dn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?ze.memoizedState=Mt=r:Mt=Mt.next=r,Mt}function Nt(){if(ct===null){var r=ze.alternate;r=r!==null?r.memoizedState:null}else r=ct.next;var a=Mt===null?ze.memoizedState:Mt.next;if(a!==null)Mt=a,ct=r;else{if(r===null)throw ze.alternate===null?Error(i(467)):Error(i(310));ct=r,r={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},Mt===null?ze.memoizedState=Mt=r:Mt=Mt.next=r}return Mt}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _l(r){var a=vl;return vl+=1,ds===null&&(ds=[]),r=Eg(ds,r,a),a=ze,(Mt===null?a.memoizedState:Mt.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?cb:th),r}function Ro(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return _l(r);if(r.$$typeof===H)return Zt(r)}throw Error(i(438,String(r)))}function qf(r){var a=null,u=ze.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var c=ze.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=No(),ze.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(r),c=0;c<r;c++)u[c]=z;return a.index++,u}function Vr(r,a){return typeof a=="function"?a(r):a}function Oo(r){var a=Nt();return Yf(a,ct,r)}function Yf(r,a,u){var c=r.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=u;var p=r.baseQueue,g=c.pending;if(g!==null){if(p!==null){var _=p.next;p.next=g.next,g.next=_}a.baseQueue=p=g,c.pending=null}if(g=r.baseState,p===null)r.memoizedState=g;else{a=p.next;var A=_=null,B=null,X=a,ie=!1;do{var ue=X.lane&-536870913;if(ue!==X.lane?(We&ue)===ue:(Yr&ue)===ue){var Q=X.revertLane;if(Q===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ue===as&&(ie=!0);else if((Yr&Q)===Q){X=X.next,Q===as&&(ie=!0);continue}else ue={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},B===null?(A=B=ue,_=g):B=B.next=ue,ze.lanes|=Q,Si|=Q;ue=X.action,ha&&u(g,ue),g=X.hasEagerState?X.eagerState:u(g,ue)}else Q={lane:ue,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},B===null?(A=B=Q,_=g):B=B.next=Q,ze.lanes|=ue,Si|=ue;X=X.next}while(X!==null&&X!==a);if(B===null?_=g:B.next=A,!Ln(g,r.memoizedState)&&(Lt=!0,ie&&(u=ss,u!==null)))throw u;r.memoizedState=g,r.baseState=_,r.baseQueue=B,c.lastRenderedState=g}return p===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Vf(r){var a=Nt(),u=a.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=r;var c=u.dispatch,p=u.pending,g=a.memoizedState;if(p!==null){u.pending=null;var _=p=p.next;do g=r(g,_.action),_=_.next;while(_!==p);Ln(g,a.memoizedState)||(Lt=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),u.lastRenderedState=g}return[g,c]}function Rg(r,a,u){var c=ze,p=Nt(),g=Qe;if(g){if(u===void 0)throw Error(i(407));u=u()}else u=a();var _=!Ln((ct||p).memoizedState,u);if(_&&(p.memoizedState=u,Lt=!0),p=p.queue,Xf(Lg.bind(null,c,p,r),[r]),p.getSnapshot!==a||_||Mt!==null&&Mt.memoizedState.tag&1){if(c.flags|=2048,fs(9,{destroy:void 0},Mg.bind(null,c,p,u,a),null),mt===null)throw Error(i(349));g||(Yr&127)!==0||Og(c,a,u)}return u}function Og(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=ze.updateQueue,a===null?(a=No(),ze.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function Mg(r,a,u,c){a.value=u,a.getSnapshot=c,Dg(a)&&Ig(r)}function Lg(r,a,u){return u(function(){Dg(a)&&Ig(r)})}function Dg(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!Ln(r,u)}catch{return!0}}function Ig(r){var a=ia(r,2);a!==null&&_n(a,r,2)}function Gf(r){var a=dn();if(typeof r=="function"){var u=r;if(r=u(),ha){mn(!0);try{u()}finally{mn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:r},a}function Bg(r,a,u,c){return r.baseState=u,Yf(r,ct,typeof c=="function"?c:Vr)}function oS(r,a,u,c,p){if(Do(r))throw Error(i(485));if(r=a.action,r!==null){var g={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){g.listeners.push(_)}};I.T!==null?u(!0):g.isTransition=!1,c(g),u=a.pending,u===null?(g.next=a.pending=g,zg(a,g)):(g.next=u.next,a.pending=u.next=g)}}function zg(r,a){var u=a.action,c=a.payload,p=r.state;if(a.isTransition){var g=I.T,_={};I.T=_;try{var A=u(p,c),B=I.S;B!==null&&B(_,A),Pg(r,a,A)}catch(X){Wf(r,a,X)}finally{g!==null&&_.types!==null&&(g.types=_.types),I.T=g}}else try{g=u(p,c),Pg(r,a,g)}catch(X){Wf(r,a,X)}}function Pg(r,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(c){Hg(r,a,c)},function(c){return Wf(r,a,c)}):Hg(r,a,u)}function Hg(r,a,u){a.status="fulfilled",a.value=u,Ug(a),r.state=u,a=r.pending,a!==null&&(u=a.next,u===a?r.pending=null:(u=u.next,a.next=u,zg(r,u)))}function Wf(r,a,u){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=u,Ug(a),a=a.next;while(a!==c)}r.action=null}function Ug(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function jg(r,a){return a}function Fg(r,a){if(Qe){var u=mt.formState;if(u!==null){e:{var c=ze;if(Qe){if(Et){t:{for(var p=Et,g=Jn;p.nodeType!==8;){if(!g){p=null;break t}if(p=tr(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){Et=tr(p.nextSibling),c=p.data==="F!";break e}}gi(c)}c=!1}c&&(a=u[0])}}return u=dn(),u.memoizedState=u.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jg,lastRenderedState:a},u.queue=c,u=lb.bind(null,ze,c),c.dispatch=u,c=Gf(!1),g=eh.bind(null,ze,!1,c.queue),c=dn(),p={state:a,dispatch:null,action:r,pending:null},c.queue=p,u=oS.bind(null,ze,p,g,u),p.dispatch=u,c.memoizedState=r,[a,u,!1]}function $g(r){var a=Nt();return qg(a,ct,r)}function qg(r,a,u){if(a=Yf(r,a,jg)[0],r=Oo(Vr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=_l(a)}catch(_){throw _===ls?vo:_}else c=a;a=Nt();var p=a.queue,g=p.dispatch;return u!==a.memoizedState&&(ze.flags|=2048,fs(9,{destroy:void 0},cS.bind(null,p,u),null)),[c,g,r]}function cS(r,a){r.action=a}function Yg(r){var a=Nt(),u=ct;if(u!==null)return qg(a,u,r);Nt(),a=a.memoizedState,u=Nt();var c=u.queue.dispatch;return u.memoizedState=r,[a,c,!1]}function fs(r,a,u,c){return r={tag:r,create:u,deps:c,inst:a,next:null},a=ze.updateQueue,a===null&&(a=No(),ze.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=r.next=r:(c=u.next,u.next=r,r.next=c,a.lastEffect=r),r}function Vg(){return Nt().memoizedState}function Mo(r,a,u,c){var p=dn();ze.flags|=r,p.memoizedState=fs(1|a,{destroy:void 0},u,c===void 0?null:c)}function Lo(r,a,u,c){var p=Nt();c=c===void 0?null:c;var g=p.memoizedState.inst;ct!==null&&c!==null&&Hf(c,ct.memoizedState.deps)?p.memoizedState=fs(a,g,u,c):(ze.flags|=r,p.memoizedState=fs(1|a,g,u,c))}function Gg(r,a){Mo(8390656,8,r,a)}function Xf(r,a){Lo(2048,8,r,a)}function dS(r){ze.flags|=4;var a=ze.updateQueue;if(a===null)a=No(),ze.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function Wg(r){var a=Nt().memoizedState;return dS({ref:a,nextImpl:r}),function(){if((nt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function Xg(r,a){return Lo(4,2,r,a)}function Qg(r,a){return Lo(4,4,r,a)}function Kg(r,a){if(typeof a=="function"){r=r();var u=a(r);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function Zg(r,a,u){u=u!=null?u.concat([r]):null,Lo(4,4,Kg.bind(null,a,r),u)}function Qf(){}function Jg(r,a){var u=Nt();a=a===void 0?null:a;var c=u.memoizedState;return a!==null&&Hf(a,c[1])?c[0]:(u.memoizedState=[r,a],r)}function eb(r,a){var u=Nt();a=a===void 0?null:a;var c=u.memoizedState;if(a!==null&&Hf(a,c[1]))return c[0];if(c=r(),ha){mn(!0);try{r()}finally{mn(!1)}}return u.memoizedState=[c,a],c}function Kf(r,a,u){return u===void 0||(Yr&1073741824)!==0&&(We&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=t2(),ze.lanes|=r,Si|=r,u)}function tb(r,a,u,c){return Ln(u,a)?u:os.current!==null?(r=Kf(r,u,c),Ln(r,a)||(Lt=!0),r):(Yr&42)===0||(Yr&1073741824)!==0&&(We&261930)===0?(Lt=!0,r.memoizedState=u):(r=t2(),ze.lanes|=r,Si|=r,a)}function nb(r,a,u,c,p){var g=te.p;te.p=g!==0&&8>g?g:8;var _=I.T,A={};I.T=A,eh(r,!1,a,u);try{var B=p(),X=I.S;if(X!==null&&X(A,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var ie=sS(B,c);Tl(r,a,ie,Hn(r))}else Tl(r,a,c,Hn(r))}catch(ue){Tl(r,a,{then:function(){},status:"rejected",reason:ue},Hn())}finally{te.p=g,_!==null&&A.types!==null&&(_.types=A.types),I.T=_}}function fS(){}function Zf(r,a,u,c){if(r.tag!==5)throw Error(i(476));var p=rb(r).queue;nb(r,p,a,be,u===null?fS:function(){return ib(r),u(c)})}function rb(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:be},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:u},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function ib(r){var a=rb(r);a.next===null&&(a=r.alternate.memoizedState),Tl(r,a.next.queue,{},Hn())}function Jf(){return Zt(Ul)}function ab(){return Nt().memoizedState}function sb(){return Nt().memoizedState}function hS(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=Hn();r=Ei(u);var c=xi(a,r,u);c!==null&&(_n(c,a,u),yl(c,a,u)),a={cache:Cf()},r.payload=a;return}a=a.return}}function pS(r,a,u){var c=Hn();u={lane:c,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Do(r)?ub(a,u):(u=bf(r,a,u,c),u!==null&&(_n(u,r,c),ob(u,a,c)))}function lb(r,a,u){var c=Hn();Tl(r,a,u,c)}function Tl(r,a,u,c){var p={lane:c,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Do(r))ub(a,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var _=a.lastRenderedState,A=g(_,u);if(p.hasEagerState=!0,p.eagerState=A,Ln(A,_))return po(r,a,p,0),mt===null&&ho(),!1}catch{}if(u=bf(r,a,p,c),u!==null)return _n(u,r,c),ob(u,a,c),!0}return!1}function eh(r,a,u,c){if(c={lane:2,revertLane:Mh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Do(r)){if(a)throw Error(i(479))}else a=bf(r,u,c,2),a!==null&&_n(a,r,2)}function Do(r){var a=r.alternate;return r===ze||a!==null&&a===ze}function ub(r,a){cs=ko=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function ob(r,a,u){if((u&4194048)!==0){var c=a.lanes;c&=r.pendingLanes,u|=c,a.lanes=u,p1(r,u)}}var Al={readContext:Zt,use:Ro,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Al.useEffectEvent=At;var cb={readContext:Zt,use:Ro,useCallback:function(r,a){return dn().memoizedState=[r,a===void 0?null:a],r},useContext:Zt,useEffect:Gg,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,Mo(4194308,4,Kg.bind(null,a,r),u)},useLayoutEffect:function(r,a){return Mo(4194308,4,r,a)},useInsertionEffect:function(r,a){Mo(4,2,r,a)},useMemo:function(r,a){var u=dn();a=a===void 0?null:a;var c=r();if(ha){mn(!0);try{r()}finally{mn(!1)}}return u.memoizedState=[c,a],c},useReducer:function(r,a,u){var c=dn();if(u!==void 0){var p=u(a);if(ha){mn(!0);try{u(a)}finally{mn(!1)}}}else p=a;return c.memoizedState=c.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},c.queue=r,r=r.dispatch=pS.bind(null,ze,r),[c.memoizedState,r]},useRef:function(r){var a=dn();return r={current:r},a.memoizedState=r},useState:function(r){r=Gf(r);var a=r.queue,u=lb.bind(null,ze,a);return a.dispatch=u,[r.memoizedState,u]},useDebugValue:Qf,useDeferredValue:function(r,a){var u=dn();return Kf(u,r,a)},useTransition:function(){var r=Gf(!1);return r=nb.bind(null,ze,r.queue,!0,!1),dn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var c=ze,p=dn();if(Qe){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),mt===null)throw Error(i(349));(We&127)!==0||Og(c,a,u)}p.memoizedState=u;var g={value:u,getSnapshot:a};return p.queue=g,Gg(Lg.bind(null,c,g,r),[r]),c.flags|=2048,fs(9,{destroy:void 0},Mg.bind(null,c,g,u,a),null),u},useId:function(){var r=dn(),a=mt.identifierPrefix;if(Qe){var u=Tr,c=_r;u=(c&~(1<<32-pt(c)-1)).toString(32)+u,a="_"+a+"R_"+u,u=Co++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=lS++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Jf,useFormState:Fg,useActionState:Fg,useOptimistic:function(r){var a=dn();a.memoizedState=a.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=eh.bind(null,ze,!0,u),u.dispatch=a,[r,a]},useMemoCache:qf,useCacheRefresh:function(){return dn().memoizedState=hS.bind(null,ze)},useEffectEvent:function(r){var a=dn(),u={impl:r};return a.memoizedState=u,function(){if((nt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},th={readContext:Zt,use:Ro,useCallback:Jg,useContext:Zt,useEffect:Xf,useImperativeHandle:Zg,useInsertionEffect:Xg,useLayoutEffect:Qg,useMemo:eb,useReducer:Oo,useRef:Vg,useState:function(){return Oo(Vr)},useDebugValue:Qf,useDeferredValue:function(r,a){var u=Nt();return tb(u,ct.memoizedState,r,a)},useTransition:function(){var r=Oo(Vr)[0],a=Nt().memoizedState;return[typeof r=="boolean"?r:_l(r),a]},useSyncExternalStore:Rg,useId:ab,useHostTransitionStatus:Jf,useFormState:$g,useActionState:$g,useOptimistic:function(r,a){var u=Nt();return Bg(u,ct,r,a)},useMemoCache:qf,useCacheRefresh:sb};th.useEffectEvent=Wg;var db={readContext:Zt,use:Ro,useCallback:Jg,useContext:Zt,useEffect:Xf,useImperativeHandle:Zg,useInsertionEffect:Xg,useLayoutEffect:Qg,useMemo:eb,useReducer:Vf,useRef:Vg,useState:function(){return Vf(Vr)},useDebugValue:Qf,useDeferredValue:function(r,a){var u=Nt();return ct===null?Kf(u,r,a):tb(u,ct.memoizedState,r,a)},useTransition:function(){var r=Vf(Vr)[0],a=Nt().memoizedState;return[typeof r=="boolean"?r:_l(r),a]},useSyncExternalStore:Rg,useId:ab,useHostTransitionStatus:Jf,useFormState:Yg,useActionState:Yg,useOptimistic:function(r,a){var u=Nt();return ct!==null?Bg(u,ct,r,a):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:qf,useCacheRefresh:sb};db.useEffectEvent=Wg;function nh(r,a,u,c){a=r.memoizedState,u=u(c,a),u=u==null?a:b({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var rh={enqueueSetState:function(r,a,u){r=r._reactInternals;var c=Hn(),p=Ei(c);p.payload=a,u!=null&&(p.callback=u),a=xi(r,p,c),a!==null&&(_n(a,r,c),yl(a,r,c))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var c=Hn(),p=Ei(c);p.tag=1,p.payload=a,u!=null&&(p.callback=u),a=xi(r,p,c),a!==null&&(_n(a,r,c),yl(a,r,c))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=Hn(),c=Ei(u);c.tag=2,a!=null&&(c.callback=a),a=xi(r,c,u),a!==null&&(_n(a,r,u),yl(a,r,u))}};function fb(r,a,u,c,p,g,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,g,_):a.prototype&&a.prototype.isPureReactComponent?!cl(u,c)||!cl(p,g):!0}function hb(r,a,u,c){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,c),a.state!==r&&rh.enqueueReplaceState(a,a.state,null)}function pa(r,a){var u=a;if("ref"in a){u={};for(var c in a)c!=="ref"&&(u[c]=a[c])}if(r=r.defaultProps){u===a&&(u=b({},u));for(var p in r)u[p]===void 0&&(u[p]=r[p])}return u}function pb(r){fo(r)}function mb(r){console.error(r)}function gb(r){fo(r)}function Io(r,a){try{var u=r.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function bb(r,a,u){try{var c=r.onCaughtError;c(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ih(r,a,u){return u=Ei(u),u.tag=3,u.payload={element:null},u.callback=function(){Io(r,a)},u}function yb(r){return r=Ei(r),r.tag=3,r}function Eb(r,a,u,c){var p=u.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;r.payload=function(){return p(g)},r.callback=function(){bb(a,u,c)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){bb(a,u,c),typeof p!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function mS(r,a,u,c,p){if(u.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=u.alternate,a!==null&&is(a,u,p,!0),u=In.current,u!==null){switch(u.tag){case 31:case 13:return er===null?Go():u.alternate===null&&St===0&&(St=3),u.flags&=-257,u.flags|=65536,u.lanes=p,c===_o?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([c]):a.add(c),Nh(r,c,p)),!1;case 22:return u.flags|=65536,c===_o?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([c]):u.add(c)),Nh(r,c,p)),!1}throw Error(i(435,u.tag))}return Nh(r,c,p),Go(),!1}if(Qe)return a=In.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Tf&&(r=Error(i(422),{cause:c}),hl(Qn(r,u)))):(c!==Tf&&(a=Error(i(423),{cause:c}),hl(Qn(a,u))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,c=Qn(c,u),p=ih(r.stateNode,c,p),Df(r,p),St!==4&&(St=2)),!1;var g=Error(i(520),{cause:c});if(g=Qn(g,u),Ml===null?Ml=[g]:Ml.push(g),St!==4&&(St=2),a===null)return!0;c=Qn(c,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,r=p&-p,u.lanes|=r,r=ih(u.stateNode,c,r),Df(u,r),!1;case 1:if(a=u.type,g=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(wi===null||!wi.has(g))))return u.flags|=65536,p&=-p,u.lanes|=p,p=yb(p),Eb(p,r,u,c),Df(u,p),!1}u=u.return}while(u!==null);return!1}var ah=Error(i(461)),Lt=!1;function Jt(r,a,u,c){a.child=r===null?Tg(a,null,u,c):fa(a,r.child,u,c)}function xb(r,a,u,c,p){u=u.render;var g=a.ref;if("ref"in c){var _={};for(var A in c)A!=="ref"&&(_[A]=c[A])}else _=c;return ua(a),c=Uf(r,a,u,_,g,p),A=jf(),r!==null&&!Lt?(Ff(r,a,p),Gr(r,a,p)):(Qe&&A&&vf(a),a.flags|=1,Jt(r,a,c,p),a.child)}function vb(r,a,u,c,p){if(r===null){var g=u.type;return typeof g=="function"&&!yf(g)&&g.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=g,_b(r,a,g,c,p)):(r=go(u.type,null,c,a,a.mode,p),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!hh(r,p)){var _=g.memoizedProps;if(u=u.compare,u=u!==null?u:cl,u(_,c)&&r.ref===a.ref)return Gr(r,a,p)}return a.flags|=1,r=jr(g,c),r.ref=a.ref,r.return=a,a.child=r}function _b(r,a,u,c,p){if(r!==null){var g=r.memoizedProps;if(cl(g,c)&&r.ref===a.ref)if(Lt=!1,a.pendingProps=c=g,hh(r,p))(r.flags&131072)!==0&&(Lt=!0);else return a.lanes=r.lanes,Gr(r,a,p)}return sh(r,a,u,c,p)}function Tb(r,a,u,c){var p=c.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|u:u,r!==null){for(c=a.child=r.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~g}else c=0,a.child=null;return Ab(r,a,g,u,c)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&xo(a,g!==null?g.cachePool:null),g!==null?wg(a,g):Bf(),kg(a);else return c=a.lanes=536870912,Ab(r,a,g!==null?g.baseLanes|u:u,u,c)}else g!==null?(xo(a,g.cachePool),wg(a,g),_i(),a.memoizedState=null):(r!==null&&xo(a,null),Bf(),_i());return Jt(r,a,p,u),a.child}function Sl(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Ab(r,a,u,c,p){var g=Rf();return g=g===null?null:{parent:Ot._currentValue,pool:g},a.memoizedState={baseLanes:u,cachePool:g},r!==null&&xo(a,null),Bf(),kg(a),r!==null&&is(r,a,c,!0),a.childLanes=p,null}function Bo(r,a){return a=Po({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function Sb(r,a,u){return fa(a,r.child,null,u),r=Bo(a,a.pendingProps),r.flags|=2,Bn(a),a.memoizedState=null,r}function gS(r,a,u){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Qe){if(c.mode==="hidden")return r=Bo(a,c),a.lanes=536870912,Sl(null,r);if(Pf(a),(r=Et)?(r=z2(r,Jn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:pi!==null?{id:_r,overflow:Tr}:null,retryLane:536870912,hydrationErrors:null},u=ug(r),u.return=a,a.child=u,Kt=a,Et=null)):r=null,r===null)throw gi(a);return a.lanes=536870912,null}return Bo(a,c)}var g=r.memoizedState;if(g!==null){var _=g.dehydrated;if(Pf(a),p)if(a.flags&256)a.flags&=-257,a=Sb(r,a,u);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Lt||is(r,a,u,!1),p=(u&r.childLanes)!==0,Lt||p){if(c=mt,c!==null&&(_=m1(c,u),_!==0&&_!==g.retryLane))throw g.retryLane=_,ia(r,_),_n(c,r,_),ah;Go(),a=Sb(r,a,u)}else r=g.treeContext,Et=tr(_.nextSibling),Kt=a,Qe=!0,mi=null,Jn=!1,r!==null&&dg(a,r),a=Bo(a,c),a.flags|=4096;return a}return r=jr(r.child,{mode:c.mode,children:c.children}),r.ref=a.ref,a.child=r,r.return=a,r}function zo(r,a){var u=a.ref;if(u===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(r===null||r.ref!==u)&&(a.flags|=4194816)}}function sh(r,a,u,c,p){return ua(a),u=Uf(r,a,u,c,void 0,p),c=jf(),r!==null&&!Lt?(Ff(r,a,p),Gr(r,a,p)):(Qe&&c&&vf(a),a.flags|=1,Jt(r,a,u,p),a.child)}function wb(r,a,u,c,p,g){return ua(a),a.updateQueue=null,u=Ng(a,c,u,p),Cg(r),c=jf(),r!==null&&!Lt?(Ff(r,a,g),Gr(r,a,g)):(Qe&&c&&vf(a),a.flags|=1,Jt(r,a,u,g),a.child)}function kb(r,a,u,c,p){if(ua(a),a.stateNode===null){var g=es,_=u.contextType;typeof _=="object"&&_!==null&&(g=Zt(_)),g=new u(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=rh,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Mf(a),_=u.contextType,g.context=typeof _=="object"&&_!==null?Zt(_):es,g.state=a.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(nh(a,u,_,c),g.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(_=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),_!==g.state&&rh.enqueueReplaceState(g,g.state,null),xl(a,c,g,p),El(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(r===null){g=a.stateNode;var A=a.memoizedProps,B=pa(u,A);g.props=B;var X=g.context,ie=u.contextType;_=es,typeof ie=="object"&&ie!==null&&(_=Zt(ie));var ue=u.getDerivedStateFromProps;ie=typeof ue=="function"||typeof g.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,ie||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A||X!==_)&&hb(a,g,c,_),yi=!1;var Q=a.memoizedState;g.state=Q,xl(a,c,g,p),El(),X=a.memoizedState,A||Q!==X||yi?(typeof ue=="function"&&(nh(a,u,ue,c),X=a.memoizedState),(B=yi||fb(a,u,B,c,Q,X,_))?(ie||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=X),g.props=c,g.state=X,g.context=_,c=B):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,Lf(r,a),_=a.memoizedProps,ie=pa(u,_),g.props=ie,ue=a.pendingProps,Q=g.context,X=u.contextType,B=es,typeof X=="object"&&X!==null&&(B=Zt(X)),A=u.getDerivedStateFromProps,(X=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_!==ue||Q!==B)&&hb(a,g,c,B),yi=!1,Q=a.memoizedState,g.state=Q,xl(a,c,g,p),El();var ee=a.memoizedState;_!==ue||Q!==ee||yi||r!==null&&r.dependencies!==null&&yo(r.dependencies)?(typeof A=="function"&&(nh(a,u,A,c),ee=a.memoizedState),(ie=yi||fb(a,u,ie,c,Q,ee,B)||r!==null&&r.dependencies!==null&&yo(r.dependencies))?(X||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,ee,B),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,ee,B)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||_===r.memoizedProps&&Q===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&Q===r.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=ee),g.props=c,g.state=ee,g.context=B,c=ie):(typeof g.componentDidUpdate!="function"||_===r.memoizedProps&&Q===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&Q===r.memoizedState||(a.flags|=1024),c=!1)}return g=c,zo(r,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,u=c&&typeof u.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&c?(a.child=fa(a,r.child,null,p),a.child=fa(a,null,u,p)):Jt(r,a,u,p),a.memoizedState=g.state,r=a.child):r=Gr(r,a,p),r}function Cb(r,a,u,c){return sa(),a.flags|=256,Jt(r,a,u,c),a.child}var lh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uh(r){return{baseLanes:r,cachePool:bg()}}function oh(r,a,u){return r=r!==null?r.childLanes&~u:0,a&&(r|=Pn),r}function Nb(r,a,u){var c=a.pendingProps,p=!1,g=(a.flags&128)!==0,_;if((_=g)||(_=r!==null&&r.memoizedState===null?!1:(Ct.current&2)!==0),_&&(p=!0,a.flags&=-129),_=(a.flags&32)!==0,a.flags&=-33,r===null){if(Qe){if(p?vi(a):_i(),(r=Et)?(r=z2(r,Jn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:pi!==null?{id:_r,overflow:Tr}:null,retryLane:536870912,hydrationErrors:null},u=ug(r),u.return=a,a.child=u,Kt=a,Et=null)):r=null,r===null)throw gi(a);return Yh(r)?a.lanes=32:a.lanes=536870912,null}var A=c.children;return c=c.fallback,p?(_i(),p=a.mode,A=Po({mode:"hidden",children:A},p),c=aa(c,p,u,null),A.return=a,c.return=a,A.sibling=c,a.child=A,c=a.child,c.memoizedState=uh(u),c.childLanes=oh(r,_,u),a.memoizedState=lh,Sl(null,c)):(vi(a),ch(a,A))}var B=r.memoizedState;if(B!==null&&(A=B.dehydrated,A!==null)){if(g)a.flags&256?(vi(a),a.flags&=-257,a=dh(r,a,u)):a.memoizedState!==null?(_i(),a.child=r.child,a.flags|=128,a=null):(_i(),A=c.fallback,p=a.mode,c=Po({mode:"visible",children:c.children},p),A=aa(A,p,u,null),A.flags|=2,c.return=a,A.return=a,c.sibling=A,a.child=c,fa(a,r.child,null,u),c=a.child,c.memoizedState=uh(u),c.childLanes=oh(r,_,u),a.memoizedState=lh,a=Sl(null,c));else if(vi(a),Yh(A)){if(_=A.nextSibling&&A.nextSibling.dataset,_)var X=_.dgst;_=X,c=Error(i(419)),c.stack="",c.digest=_,hl({value:c,source:null,stack:null}),a=dh(r,a,u)}else if(Lt||is(r,a,u,!1),_=(u&r.childLanes)!==0,Lt||_){if(_=mt,_!==null&&(c=m1(_,u),c!==0&&c!==B.retryLane))throw B.retryLane=c,ia(r,c),_n(_,r,c),ah;qh(A)||Go(),a=dh(r,a,u)}else qh(A)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,Et=tr(A.nextSibling),Kt=a,Qe=!0,mi=null,Jn=!1,r!==null&&dg(a,r),a=ch(a,c.children),a.flags|=4096);return a}return p?(_i(),A=c.fallback,p=a.mode,B=r.child,X=B.sibling,c=jr(B,{mode:"hidden",children:c.children}),c.subtreeFlags=B.subtreeFlags&65011712,X!==null?A=jr(X,A):(A=aa(A,p,u,null),A.flags|=2),A.return=a,c.return=a,c.sibling=A,a.child=c,Sl(null,c),c=a.child,A=r.child.memoizedState,A===null?A=uh(u):(p=A.cachePool,p!==null?(B=Ot._currentValue,p=p.parent!==B?{parent:B,pool:B}:p):p=bg(),A={baseLanes:A.baseLanes|u,cachePool:p}),c.memoizedState=A,c.childLanes=oh(r,_,u),a.memoizedState=lh,Sl(r.child,c)):(vi(a),u=r.child,r=u.sibling,u=jr(u,{mode:"visible",children:c.children}),u.return=a,u.sibling=null,r!==null&&(_=a.deletions,_===null?(a.deletions=[r],a.flags|=16):_.push(r)),a.child=u,a.memoizedState=null,u)}function ch(r,a){return a=Po({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function Po(r,a){return r=Dn(22,r,null,a),r.lanes=0,r}function dh(r,a,u){return fa(a,r.child,null,u),r=ch(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function Rb(r,a,u){r.lanes|=a;var c=r.alternate;c!==null&&(c.lanes|=a),wf(r.return,a,u)}function fh(r,a,u,c,p,g){var _=r.memoizedState;_===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:u,tailMode:p,treeForkCount:g}:(_.isBackwards=a,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=u,_.tailMode=p,_.treeForkCount=g)}function Ob(r,a,u){var c=a.pendingProps,p=c.revealOrder,g=c.tail;c=c.children;var _=Ct.current,A=(_&2)!==0;if(A?(_=_&1|2,a.flags|=128):_&=1,C(Ct,_),Jt(r,a,c,u),c=Qe?fl:0,!A&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Rb(r,u,a);else if(r.tag===19)Rb(r,u,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":for(u=a.child,p=null;u!==null;)r=u.alternate,r!==null&&wo(r)===null&&(p=u),u=u.sibling;u=p,u===null?(p=a.child,a.child=null):(p=u.sibling,u.sibling=null),fh(a,!1,p,u,g,c);break;case"backwards":case"unstable_legacy-backwards":for(u=null,p=a.child,a.child=null;p!==null;){if(r=p.alternate,r!==null&&wo(r)===null){a.child=p;break}r=p.sibling,p.sibling=u,u=p,p=r}fh(a,!0,u,null,g,c);break;case"together":fh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function Gr(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),Si|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(is(r,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,u=jr(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=jr(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function hh(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&yo(r)))}function bS(r,a,u){switch(a.tag){case 3:Je(a,a.stateNode.containerInfo),bi(a,Ot,r.memoizedState.cache),sa();break;case 27:case 5:Gt(a);break;case 4:Je(a,a.stateNode.containerInfo);break;case 10:bi(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Pf(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(vi(a),a.flags|=128,null):(u&a.child.childLanes)!==0?Nb(r,a,u):(vi(a),r=Gr(r,a,u),r!==null?r.sibling:null);vi(a);break;case 19:var p=(r.flags&128)!==0;if(c=(u&a.childLanes)!==0,c||(is(r,a,u,!1),c=(u&a.childLanes)!==0),p){if(c)return Ob(r,a,u);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Ct,Ct.current),c)break;return null;case 22:return a.lanes=0,Tb(r,a,u,a.pendingProps);case 24:bi(a,Ot,r.memoizedState.cache)}return Gr(r,a,u)}function Mb(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)Lt=!0;else{if(!hh(r,u)&&(a.flags&128)===0)return Lt=!1,bS(r,a,u);Lt=(r.flags&131072)!==0}else Lt=!1,Qe&&(a.flags&1048576)!==0&&cg(a,fl,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(r=ca(a.elementType),a.type=r,typeof r=="function")yf(r)?(c=pa(r,c),a.tag=1,a=kb(null,a,r,c,u)):(a.tag=0,a=sh(null,a,r,c,u));else{if(r!=null){var p=r.$$typeof;if(p===V){a.tag=11,a=xb(null,a,r,c,u);break e}else if(p===ne){a.tag=14,a=vb(null,a,r,c,u);break e}}throw a=oe(r)||r,Error(i(306,a,""))}}return a;case 0:return sh(r,a,a.type,a.pendingProps,u);case 1:return c=a.type,p=pa(c,a.pendingProps),kb(r,a,c,p,u);case 3:e:{if(Je(a,a.stateNode.containerInfo),r===null)throw Error(i(387));c=a.pendingProps;var g=a.memoizedState;p=g.element,Lf(r,a),xl(a,c,null,u);var _=a.memoizedState;if(c=_.cache,bi(a,Ot,c),c!==g.cache&&kf(a,[Ot],u,!0),El(),c=_.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:_.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=Cb(r,a,c,u);break e}else if(c!==p){p=Qn(Error(i(424)),a),hl(p),a=Cb(r,a,c,u);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,Et=tr(r.firstChild),Kt=a,Qe=!0,mi=null,Jn=!0,u=Tg(a,null,c,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(sa(),c===p){a=Gr(r,a,u);break e}Jt(r,a,c,u)}a=a.child}return a;case 26:return zo(r,a),r===null?(u=$2(a.type,null,a.pendingProps,null))?a.memoizedState=u:Qe||(u=a.type,r=a.pendingProps,c=ec(xe.current).createElement(u),c[Qt]=a,c[gn]=r,en(c,u,r),Ft(c),a.stateNode=c):a.memoizedState=$2(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Gt(a),r===null&&Qe&&(c=a.stateNode=U2(a.type,a.pendingProps,xe.current),Kt=a,Jn=!0,p=Et,Ri(a.type)?(Vh=p,Et=tr(c.firstChild)):Et=p),Jt(r,a,a.pendingProps.children,u),zo(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Qe&&((p=c=Et)&&(c=GS(c,a.type,a.pendingProps,Jn),c!==null?(a.stateNode=c,Kt=a,Et=tr(c.firstChild),Jn=!1,p=!0):p=!1),p||gi(a)),Gt(a),p=a.type,g=a.pendingProps,_=r!==null?r.memoizedProps:null,c=g.children,jh(p,g)?c=null:_!==null&&jh(p,_)&&(a.flags|=32),a.memoizedState!==null&&(p=Uf(r,a,uS,null,null,u),Ul._currentValue=p),zo(r,a),Jt(r,a,c,u),a.child;case 6:return r===null&&Qe&&((r=u=Et)&&(u=WS(u,a.pendingProps,Jn),u!==null?(a.stateNode=u,Kt=a,Et=null,r=!0):r=!1),r||gi(a)),null;case 13:return Nb(r,a,u);case 4:return Je(a,a.stateNode.containerInfo),c=a.pendingProps,r===null?a.child=fa(a,null,c,u):Jt(r,a,c,u),a.child;case 11:return xb(r,a,a.type,a.pendingProps,u);case 7:return Jt(r,a,a.pendingProps,u),a.child;case 8:return Jt(r,a,a.pendingProps.children,u),a.child;case 12:return Jt(r,a,a.pendingProps.children,u),a.child;case 10:return c=a.pendingProps,bi(a,a.type,c.value),Jt(r,a,c.children,u),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,ua(a),p=Zt(p),c=c(p),a.flags|=1,Jt(r,a,c,u),a.child;case 14:return vb(r,a,a.type,a.pendingProps,u);case 15:return _b(r,a,a.type,a.pendingProps,u);case 19:return Ob(r,a,u);case 31:return gS(r,a,u);case 22:return Tb(r,a,u,a.pendingProps);case 24:return ua(a),c=Zt(Ot),r===null?(p=Rf(),p===null&&(p=mt,g=Cf(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=u),p=g),a.memoizedState={parent:c,cache:p},Mf(a),bi(a,Ot,p)):((r.lanes&u)!==0&&(Lf(r,a),xl(a,null,null,u),El()),p=r.memoizedState,g=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),bi(a,Ot,c)):(c=g.cache,bi(a,Ot,c),c!==p.cache&&kf(a,[Ot],u,!0))),Jt(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Wr(r){r.flags|=4}function ph(r,a,u,c,p){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(a2())r.flags|=8192;else throw da=_o,Of}else r.flags&=-16777217}function Lb(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!W2(a))if(a2())r.flags|=8192;else throw da=_o,Of}function Ho(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?f1():536870912,r.lanes|=a,gs|=a)}function wl(r,a){if(!Qe)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var c=null;u!==null;)u.alternate!==null&&(c=u),u=u.sibling;c===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function xt(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,c=0;if(a)for(var p=r.child;p!==null;)u|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)u|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=c,r.childLanes=u,a}function yS(r,a,u){var c=a.pendingProps;switch(_f(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(a),null;case 1:return xt(a),null;case 3:return u=a.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),qr(Ot),Oe(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(rs(a)?Wr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Af())),xt(a),null;case 26:var p=a.type,g=a.memoizedState;return r===null?(Wr(a),g!==null?(xt(a),Lb(a,g)):(xt(a),ph(a,p,null,c,u))):g?g!==r.memoizedState?(Wr(a),xt(a),Lb(a,g)):(xt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==c&&Wr(a),xt(a),ph(a,p,r,c,u)),null;case 27:if(Wt(a),u=xe.current,p=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Wr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return xt(a),null}r=ce.current,rs(a)?fg(a):(r=U2(p,c,u),a.stateNode=r,Wr(a))}return xt(a),null;case 5:if(Wt(a),p=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Wr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return xt(a),null}if(g=ce.current,rs(a))fg(a);else{var _=ec(xe.current);switch(g){case 1:g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=_.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?_.createElement(p,{is:c.is}):_.createElement(p)}}g[Qt]=a,g[gn]=c;e:for(_=a.child;_!==null;){if(_.tag===5||_.tag===6)g.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)break e;for(;_.sibling===null;){if(_.return===null||_.return===a)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}a.stateNode=g;e:switch(en(g,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Wr(a)}}return xt(a),ph(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==c&&Wr(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(r=xe.current,rs(a)){if(r=a.stateNode,u=a.memoizedProps,c=null,p=Kt,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}r[Qt]=a,r=!!(r.nodeValue===u||c!==null&&c.suppressHydrationWarning===!0||N2(r.nodeValue,u)),r||gi(a,!0)}else r=ec(r).createTextNode(c),r[Qt]=a,a.stateNode=r}return xt(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(c=rs(a),u!==null){if(r===null){if(!c)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Qt]=a}else sa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;xt(a),r=!1}else u=Af(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(Bn(a),a):(Bn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return xt(a),null;case 13:if(c=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=rs(a),c!==null&&c.dehydrated!==null){if(r===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Qt]=a}else sa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;xt(a),p=!1}else p=Af(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Bn(a),a):(Bn(a),null)}return Bn(a),(a.flags&128)!==0?(a.lanes=u,a):(u=c!==null,r=r!==null&&r.memoizedState!==null,u&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==p&&(c.flags|=2048)),u!==r&&u&&(a.child.flags|=8192),Ho(a,a.updateQueue),xt(a),null);case 4:return Oe(),r===null&&Bh(a.stateNode.containerInfo),xt(a),null;case 10:return qr(a.type),xt(a),null;case 19:if(P(Ct),c=a.memoizedState,c===null)return xt(a),null;if(p=(a.flags&128)!==0,g=c.rendering,g===null)if(p)wl(c,!1);else{if(St!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=wo(r),g!==null){for(a.flags|=128,wl(c,!1),r=g.updateQueue,a.updateQueue=r,Ho(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)lg(u,r),u=u.sibling;return C(Ct,Ct.current&1|2),Qe&&Fr(a,c.treeForkCount),a.child}r=r.sibling}c.tail!==null&&on()>qo&&(a.flags|=128,p=!0,wl(c,!1),a.lanes=4194304)}else{if(!p)if(r=wo(g),r!==null){if(a.flags|=128,p=!0,r=r.updateQueue,a.updateQueue=r,Ho(a,r),wl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Qe)return xt(a),null}else 2*on()-c.renderingStartTime>qo&&u!==536870912&&(a.flags|=128,p=!0,wl(c,!1),a.lanes=4194304);c.isBackwards?(g.sibling=a.child,a.child=g):(r=c.last,r!==null?r.sibling=g:a.child=g,c.last=g)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=on(),r.sibling=null,u=Ct.current,C(Ct,p?u&1|2:u&1),Qe&&Fr(a,c.treeForkCount),r):(xt(a),null);case 22:case 23:return Bn(a),zf(),c=a.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(u&536870912)!==0&&(a.flags&128)===0&&(xt(a),a.subtreeFlags&6&&(a.flags|=8192)):xt(a),u=a.updateQueue,u!==null&&Ho(a,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==u&&(a.flags|=2048),r!==null&&P(oa),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),qr(Ot),xt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function ES(r,a){switch(_f(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return qr(Ot),Oe(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return Wt(a),null;case 31:if(a.memoizedState!==null){if(Bn(a),a.alternate===null)throw Error(i(340));sa()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(Bn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));sa()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return P(Ct),null;case 4:return Oe(),null;case 10:return qr(a.type),null;case 22:case 23:return Bn(a),zf(),r!==null&&P(oa),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return qr(Ot),null;case 25:return null;default:return null}}function Db(r,a){switch(_f(a),a.tag){case 3:qr(Ot),Oe();break;case 26:case 27:case 5:Wt(a);break;case 4:Oe();break;case 31:a.memoizedState!==null&&Bn(a);break;case 13:Bn(a);break;case 19:P(Ct);break;case 10:qr(a.type);break;case 22:case 23:Bn(a),zf(),r!==null&&P(oa);break;case 24:qr(Ot)}}function kl(r,a){try{var u=a.updateQueue,c=u!==null?u.lastEffect:null;if(c!==null){var p=c.next;u=p;do{if((u.tag&r)===r){c=void 0;var g=u.create,_=u.inst;c=g(),_.destroy=c}u=u.next}while(u!==p)}}catch(A){lt(a,a.return,A)}}function Ti(r,a,u){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var g=p.next;c=g;do{if((c.tag&r)===r){var _=c.inst,A=_.destroy;if(A!==void 0){_.destroy=void 0,p=a;var B=u,X=A;try{X()}catch(ie){lt(p,B,ie)}}}c=c.next}while(c!==g)}}catch(ie){lt(a,a.return,ie)}}function Ib(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{Sg(a,u)}catch(c){lt(r,r.return,c)}}}function Bb(r,a,u){u.props=pa(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(c){lt(r,a,c)}}function Cl(r,a){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof u=="function"?r.refCleanup=u(c):u.current=c}}catch(p){lt(r,a,p)}}function Ar(r,a){var u=r.ref,c=r.refCleanup;if(u!==null)if(typeof c=="function")try{c()}catch(p){lt(r,a,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(p){lt(r,a,p)}else u.current=null}function zb(r){var a=r.type,u=r.memoizedProps,c=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&c.focus();break e;case"img":u.src?c.src=u.src:u.srcSet&&(c.srcset=u.srcSet)}}catch(p){lt(r,r.return,p)}}function mh(r,a,u){try{var c=r.stateNode;jS(c,r.type,u,a),c[gn]=a}catch(p){lt(r,r.return,p)}}function Pb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Ri(r.type)||r.tag===4}function gh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Pb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Ri(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function bh(r,a,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(r),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Hr));else if(c!==4&&(c===27&&Ri(r.type)&&(u=r.stateNode,a=null),r=r.child,r!==null))for(bh(r,a,u),r=r.sibling;r!==null;)bh(r,a,u),r=r.sibling}function Uo(r,a,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(c!==4&&(c===27&&Ri(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(Uo(r,a,u),r=r.sibling;r!==null;)Uo(r,a,u),r=r.sibling}function Hb(r){var a=r.stateNode,u=r.memoizedProps;try{for(var c=r.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);en(a,c,u),a[Qt]=r,a[gn]=u}catch(g){lt(r,r.return,g)}}var Xr=!1,Dt=!1,yh=!1,Ub=typeof WeakSet=="function"?WeakSet:Set,$t=null;function xS(r,a){if(r=r.containerInfo,Hh=lc,r=Z1(r),df(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var c=u.getSelection&&u.getSelection();if(c&&c.rangeCount!==0){u=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{u.nodeType,g.nodeType}catch{u=null;break e}var _=0,A=-1,B=-1,X=0,ie=0,ue=r,Q=null;t:for(;;){for(var ee;ue!==u||p!==0&&ue.nodeType!==3||(A=_+p),ue!==g||c!==0&&ue.nodeType!==3||(B=_+c),ue.nodeType===3&&(_+=ue.nodeValue.length),(ee=ue.firstChild)!==null;)Q=ue,ue=ee;for(;;){if(ue===r)break t;if(Q===u&&++X===p&&(A=_),Q===g&&++ie===c&&(B=_),(ee=ue.nextSibling)!==null)break;ue=Q,Q=ue.parentNode}ue=ee}u=A===-1||B===-1?null:{start:A,end:B}}else u=null}u=u||{start:0,end:0}}else u=null;for(Uh={focusedElem:r,selectionRange:u},lc=!1,$t=a;$t!==null;)if(a=$t,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,$t=r;else for(;$t!==null;){switch(a=$t,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)p=r[u],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,u=a,p=g.memoizedProps,g=g.memoizedState,c=u.stateNode;try{var Te=pa(u.type,p);r=c.getSnapshotBeforeUpdate(Te,g),c.__reactInternalSnapshotBeforeUpdate=r}catch(Re){lt(u,u.return,Re)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,u=r.nodeType,u===9)$h(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":$h(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,$t=r;break}$t=a.return}}function jb(r,a,u){var c=u.flags;switch(u.tag){case 0:case 11:case 15:Kr(r,u),c&4&&kl(5,u);break;case 1:if(Kr(r,u),c&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(_){lt(u,u.return,_)}else{var p=pa(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(p,a,r.__reactInternalSnapshotBeforeUpdate)}catch(_){lt(u,u.return,_)}}c&64&&Ib(u),c&512&&Cl(u,u.return);break;case 3:if(Kr(r,u),c&64&&(r=u.updateQueue,r!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{Sg(r,a)}catch(_){lt(u,u.return,_)}}break;case 27:a===null&&c&4&&Hb(u);case 26:case 5:Kr(r,u),a===null&&c&4&&zb(u),c&512&&Cl(u,u.return);break;case 12:Kr(r,u);break;case 31:Kr(r,u),c&4&&qb(r,u);break;case 13:Kr(r,u),c&4&&Yb(r,u),c&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=NS.bind(null,u),XS(r,u))));break;case 22:if(c=u.memoizedState!==null||Xr,!c){a=a!==null&&a.memoizedState!==null||Dt,p=Xr;var g=Dt;Xr=c,(Dt=a)&&!g?Zr(r,u,(u.subtreeFlags&8772)!==0):Kr(r,u),Xr=p,Dt=g}break;case 30:break;default:Kr(r,u)}}function Fb(r){var a=r.alternate;a!==null&&(r.alternate=null,Fb(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&Gd(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var vt=null,yn=!1;function Qr(r,a,u){for(u=u.child;u!==null;)$b(r,a,u),u=u.sibling}function $b(r,a,u){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(cn,u)}catch{}switch(u.tag){case 26:Dt||Ar(u,a),Qr(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Dt||Ar(u,a);var c=vt,p=yn;Ri(u.type)&&(vt=u.stateNode,yn=!1),Qr(r,a,u),zl(u.stateNode),vt=c,yn=p;break;case 5:Dt||Ar(u,a);case 6:if(c=vt,p=yn,vt=null,Qr(r,a,u),vt=c,yn=p,vt!==null)if(yn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(u.stateNode)}catch(g){lt(u,a,g)}else try{vt.removeChild(u.stateNode)}catch(g){lt(u,a,g)}break;case 18:vt!==null&&(yn?(r=vt,I2(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),As(r)):I2(vt,u.stateNode));break;case 4:c=vt,p=yn,vt=u.stateNode.containerInfo,yn=!0,Qr(r,a,u),vt=c,yn=p;break;case 0:case 11:case 14:case 15:Ti(2,u,a),Dt||Ti(4,u,a),Qr(r,a,u);break;case 1:Dt||(Ar(u,a),c=u.stateNode,typeof c.componentWillUnmount=="function"&&Bb(u,a,c)),Qr(r,a,u);break;case 21:Qr(r,a,u);break;case 22:Dt=(c=Dt)||u.memoizedState!==null,Qr(r,a,u),Dt=c;break;default:Qr(r,a,u)}}function qb(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{As(r)}catch(u){lt(a,a.return,u)}}}function Yb(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{As(r)}catch(u){lt(a,a.return,u)}}function vS(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new Ub),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new Ub),a;default:throw Error(i(435,r.tag))}}function jo(r,a){var u=vS(r);a.forEach(function(c){if(!u.has(c)){u.add(c);var p=RS.bind(null,r,c);c.then(p,p)}})}function En(r,a){var u=a.deletions;if(u!==null)for(var c=0;c<u.length;c++){var p=u[c],g=r,_=a,A=_;e:for(;A!==null;){switch(A.tag){case 27:if(Ri(A.type)){vt=A.stateNode,yn=!1;break e}break;case 5:vt=A.stateNode,yn=!1;break e;case 3:case 4:vt=A.stateNode.containerInfo,yn=!0;break e}A=A.return}if(vt===null)throw Error(i(160));$b(g,_,p),vt=null,yn=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Vb(a,r),a=a.sibling}var pr=null;function Vb(r,a){var u=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:En(a,r),xn(r),c&4&&(Ti(3,r,r.return),kl(3,r),Ti(5,r,r.return));break;case 1:En(a,r),xn(r),c&512&&(Dt||u===null||Ar(u,u.return)),c&64&&Xr&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?c:u.concat(c))));break;case 26:var p=pr;if(En(a,r),xn(r),c&512&&(Dt||u===null||Ar(u,u.return)),c&4){var g=u!==null?u.memoizedState:null;if(c=r.memoizedState,u===null)if(c===null)if(r.stateNode===null){e:{c=r.type,u=r.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[tl]||g[Qt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(c),p.head.insertBefore(g,p.querySelector("head > title"))),en(g,c,u),g[Qt]=r,Ft(g),c=g;break e;case"link":var _=V2("link","href",p).get(c+(u.href||""));if(_){for(var A=0;A<_.length;A++)if(g=_[A],g.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&g.getAttribute("rel")===(u.rel==null?null:u.rel)&&g.getAttribute("title")===(u.title==null?null:u.title)&&g.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(A,1);break t}}g=p.createElement(c),en(g,c,u),p.head.appendChild(g);break;case"meta":if(_=V2("meta","content",p).get(c+(u.content||""))){for(A=0;A<_.length;A++)if(g=_[A],g.getAttribute("content")===(u.content==null?null:""+u.content)&&g.getAttribute("name")===(u.name==null?null:u.name)&&g.getAttribute("property")===(u.property==null?null:u.property)&&g.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&g.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(A,1);break t}}g=p.createElement(c),en(g,c,u),p.head.appendChild(g);break;default:throw Error(i(468,c))}g[Qt]=r,Ft(g),c=g}r.stateNode=c}else G2(p,r.type,r.stateNode);else r.stateNode=Y2(p,c,r.memoizedProps);else g!==c?(g===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):g.count--,c===null?G2(p,r.type,r.stateNode):Y2(p,c,r.memoizedProps)):c===null&&r.stateNode!==null&&mh(r,r.memoizedProps,u.memoizedProps)}break;case 27:En(a,r),xn(r),c&512&&(Dt||u===null||Ar(u,u.return)),u!==null&&c&4&&mh(r,r.memoizedProps,u.memoizedProps);break;case 5:if(En(a,r),xn(r),c&512&&(Dt||u===null||Ar(u,u.return)),r.flags&32){p=r.stateNode;try{Ga(p,"")}catch(Te){lt(r,r.return,Te)}}c&4&&r.stateNode!=null&&(p=r.memoizedProps,mh(r,p,u!==null?u.memoizedProps:p)),c&1024&&(yh=!0);break;case 6:if(En(a,r),xn(r),c&4){if(r.stateNode===null)throw Error(i(162));c=r.memoizedProps,u=r.stateNode;try{u.nodeValue=c}catch(Te){lt(r,r.return,Te)}}break;case 3:if(rc=null,p=pr,pr=tc(a.containerInfo),En(a,r),pr=p,xn(r),c&4&&u!==null&&u.memoizedState.isDehydrated)try{As(a.containerInfo)}catch(Te){lt(r,r.return,Te)}yh&&(yh=!1,Gb(r));break;case 4:c=pr,pr=tc(r.stateNode.containerInfo),En(a,r),xn(r),pr=c;break;case 12:En(a,r),xn(r);break;case 31:En(a,r),xn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,jo(r,c)));break;case 13:En(a,r),xn(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&($o=on()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,jo(r,c)));break;case 22:p=r.memoizedState!==null;var B=u!==null&&u.memoizedState!==null,X=Xr,ie=Dt;if(Xr=X||p,Dt=ie||B,En(a,r),Dt=ie,Xr=X,xn(r),c&8192)e:for(a=r.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(u===null||B||Xr||Dt||ma(r)),u=null,a=r;;){if(a.tag===5||a.tag===26){if(u===null){B=u=a;try{if(g=B.stateNode,p)_=g.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{A=B.stateNode;var ue=B.memoizedProps.style,Q=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;A.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Te){lt(B,B.return,Te)}}}else if(a.tag===6){if(u===null){B=a;try{B.stateNode.nodeValue=p?"":B.memoizedProps}catch(Te){lt(B,B.return,Te)}}}else if(a.tag===18){if(u===null){B=a;try{var ee=B.stateNode;p?B2(ee,!0):B2(B.stateNode,!1)}catch(Te){lt(B,B.return,Te)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=r.updateQueue,c!==null&&(u=c.retryQueue,u!==null&&(c.retryQueue=null,jo(r,u))));break;case 19:En(a,r),xn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,jo(r,c)));break;case 30:break;case 21:break;default:En(a,r),xn(r)}}function xn(r){var a=r.flags;if(a&2){try{for(var u,c=r.return;c!==null;){if(Pb(c)){u=c;break}c=c.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var p=u.stateNode,g=gh(r);Uo(r,g,p);break;case 5:var _=u.stateNode;u.flags&32&&(Ga(_,""),u.flags&=-33);var A=gh(r);Uo(r,A,_);break;case 3:case 4:var B=u.stateNode.containerInfo,X=gh(r);bh(r,X,B);break;default:throw Error(i(161))}}catch(ie){lt(r,r.return,ie)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Gb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Gb(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Kr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)jb(r,a.alternate,a),a=a.sibling}function ma(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Ti(4,a,a.return),ma(a);break;case 1:Ar(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&Bb(a,a.return,u),ma(a);break;case 27:zl(a.stateNode);case 26:case 5:Ar(a,a.return),ma(a);break;case 22:a.memoizedState===null&&ma(a);break;case 30:ma(a);break;default:ma(a)}r=r.sibling}}function Zr(r,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=r,g=a,_=g.flags;switch(g.tag){case 0:case 11:case 15:Zr(p,g,u),kl(4,g);break;case 1:if(Zr(p,g,u),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){lt(c,c.return,X)}if(c=g,p=c.updateQueue,p!==null){var A=c.stateNode;try{var B=p.shared.hiddenCallbacks;if(B!==null)for(p.shared.hiddenCallbacks=null,p=0;p<B.length;p++)Ag(B[p],A)}catch(X){lt(c,c.return,X)}}u&&_&64&&Ib(g),Cl(g,g.return);break;case 27:Hb(g);case 26:case 5:Zr(p,g,u),u&&c===null&&_&4&&zb(g),Cl(g,g.return);break;case 12:Zr(p,g,u);break;case 31:Zr(p,g,u),u&&_&4&&qb(p,g);break;case 13:Zr(p,g,u),u&&_&4&&Yb(p,g);break;case 22:g.memoizedState===null&&Zr(p,g,u),Cl(g,g.return);break;case 30:break;default:Zr(p,g,u)}a=a.sibling}}function Eh(r,a){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&pl(u))}function xh(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&pl(r))}function mr(r,a,u,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Wb(r,a,u,c),a=a.sibling}function Wb(r,a,u,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:mr(r,a,u,c),p&2048&&kl(9,a);break;case 1:mr(r,a,u,c);break;case 3:mr(r,a,u,c),p&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&pl(r)));break;case 12:if(p&2048){mr(r,a,u,c),r=a.stateNode;try{var g=a.memoizedProps,_=g.id,A=g.onPostCommit;typeof A=="function"&&A(_,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){lt(a,a.return,B)}}else mr(r,a,u,c);break;case 31:mr(r,a,u,c);break;case 13:mr(r,a,u,c);break;case 23:break;case 22:g=a.stateNode,_=a.alternate,a.memoizedState!==null?g._visibility&2?mr(r,a,u,c):Nl(r,a):g._visibility&2?mr(r,a,u,c):(g._visibility|=2,hs(r,a,u,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Eh(_,a);break;case 24:mr(r,a,u,c),p&2048&&xh(a.alternate,a);break;default:mr(r,a,u,c)}}function hs(r,a,u,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,_=a,A=u,B=c,X=_.flags;switch(_.tag){case 0:case 11:case 15:hs(g,_,A,B,p),kl(8,_);break;case 23:break;case 22:var ie=_.stateNode;_.memoizedState!==null?ie._visibility&2?hs(g,_,A,B,p):Nl(g,_):(ie._visibility|=2,hs(g,_,A,B,p)),p&&X&2048&&Eh(_.alternate,_);break;case 24:hs(g,_,A,B,p),p&&X&2048&&xh(_.alternate,_);break;default:hs(g,_,A,B,p)}a=a.sibling}}function Nl(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=r,c=a,p=c.flags;switch(c.tag){case 22:Nl(u,c),p&2048&&Eh(c.alternate,c);break;case 24:Nl(u,c),p&2048&&xh(c.alternate,c);break;default:Nl(u,c)}a=a.sibling}}var Rl=8192;function ps(r,a,u){if(r.subtreeFlags&Rl)for(r=r.child;r!==null;)Xb(r,a,u),r=r.sibling}function Xb(r,a,u){switch(r.tag){case 26:ps(r,a,u),r.flags&Rl&&r.memoizedState!==null&&lw(u,pr,r.memoizedState,r.memoizedProps);break;case 5:ps(r,a,u);break;case 3:case 4:var c=pr;pr=tc(r.stateNode.containerInfo),ps(r,a,u),pr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Rl,Rl=16777216,ps(r,a,u),Rl=c):ps(r,a,u));break;default:ps(r,a,u)}}function Qb(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Ol(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var c=a[u];$t=c,Zb(c,r)}Qb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Kb(r),r=r.sibling}function Kb(r){switch(r.tag){case 0:case 11:case 15:Ol(r),r.flags&2048&&Ti(9,r,r.return);break;case 3:Ol(r);break;case 12:Ol(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,Fo(r)):Ol(r);break;default:Ol(r)}}function Fo(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var c=a[u];$t=c,Zb(c,r)}Qb(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Ti(8,a,a.return),Fo(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Fo(a));break;default:Fo(a)}r=r.sibling}}function Zb(r,a){for(;$t!==null;){var u=$t;switch(u.tag){case 0:case 11:case 15:Ti(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var c=u.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:pl(u.memoizedState.cache)}if(c=u.child,c!==null)c.return=u,$t=c;else e:for(u=r;$t!==null;){c=$t;var p=c.sibling,g=c.return;if(Fb(c),c===u){$t=null;break e}if(p!==null){p.return=g,$t=p;break e}$t=g}}}var _S={getCacheForType:function(r){var a=Zt(Ot),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return Zt(Ot).controller.signal}},TS=typeof WeakMap=="function"?WeakMap:Map,nt=0,mt=null,Ye=null,We=0,st=0,zn=null,Ai=!1,ms=!1,vh=!1,Jr=0,St=0,Si=0,ga=0,_h=0,Pn=0,gs=0,Ml=null,vn=null,Th=!1,$o=0,Jb=0,qo=1/0,Yo=null,wi=null,Pt=0,ki=null,bs=null,ei=0,Ah=0,Sh=null,e2=null,Ll=0,wh=null;function Hn(){return(nt&2)!==0&&We!==0?We&-We:I.T!==null?Mh():g1()}function t2(){if(Pn===0)if((We&536870912)===0||Qe){var r=Zu;Zu<<=1,(Zu&3932160)===0&&(Zu=262144),Pn=r}else Pn=536870912;return r=In.current,r!==null&&(r.flags|=32),Pn}function _n(r,a,u){(r===mt&&(st===2||st===9)||r.cancelPendingCommit!==null)&&(ys(r,0),Ci(r,We,Pn,!1)),el(r,u),((nt&2)===0||r!==mt)&&(r===mt&&((nt&2)===0&&(ga|=u),St===4&&Ci(r,We,Pn,!1)),Sr(r))}function n2(r,a,u){if((nt&6)!==0)throw Error(i(327));var c=!u&&(a&127)===0&&(a&r.expiredLanes)===0||Js(r,a),p=c?wS(r,a):Ch(r,a,!0),g=c;do{if(p===0){ms&&!c&&Ci(r,a,0,!1);break}else{if(u=r.current.alternate,g&&!AS(u)){p=Ch(r,a,!1),g=!1;continue}if(p===2){if(g=a,r.errorRecoveryDisabledLanes&g)var _=0;else _=r.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){a=_;e:{var A=r;p=Ml;var B=A.current.memoizedState.isDehydrated;if(B&&(ys(A,_).flags|=256),_=Ch(A,_,!1),_!==2){if(vh&&!B){A.errorRecoveryDisabledLanes|=g,ga|=g,p=4;break e}g=vn,vn=p,g!==null&&(vn===null?vn=g:vn.push.apply(vn,g))}p=_}if(g=!1,p!==2)continue}}if(p===1){ys(r,0),Ci(r,a,0,!0);break}e:{switch(c=r,g=p,g){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Ci(c,a,Pn,!Ai);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=$o+300-on(),10<p)){if(Ci(c,a,Pn,!Ai),eo(c,0,!0)!==0)break e;ei=a,c.timeoutHandle=L2(r2.bind(null,c,u,vn,Yo,Th,a,Pn,ga,gs,Ai,g,"Throttled",-0,0),p);break e}r2(c,u,vn,Yo,Th,a,Pn,ga,gs,Ai,g,null,-0,0)}}break}while(!0);Sr(r)}function r2(r,a,u,c,p,g,_,A,B,X,ie,ue,Q,ee){if(r.timeoutHandle=-1,ue=a.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hr},Xb(a,g,ue);var Te=(g&62914560)===g?$o-on():(g&4194048)===g?Jb-on():0;if(Te=uw(ue,Te),Te!==null){ei=g,r.cancelPendingCommit=Te(d2.bind(null,r,a,g,u,c,p,_,A,B,ie,ue,null,Q,ee)),Ci(r,g,_,!X);return}}d2(r,a,g,u,c,p,_,A,B)}function AS(r){for(var a=r;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var c=0;c<u.length;c++){var p=u[c],g=p.getSnapshot;p=p.value;try{if(!Ln(g(),p))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ci(r,a,u,c){a&=~_h,a&=~ga,r.suspendedLanes|=a,r.pingedLanes&=~a,c&&(r.warmLanes|=a),c=r.expirationTimes;for(var p=a;0<p;){var g=31-pt(p),_=1<<g;c[g]=-1,p&=~_}u!==0&&h1(r,u,a)}function Vo(){return(nt&6)===0?(Dl(0),!1):!0}function kh(){if(Ye!==null){if(st===0)var r=Ye.return;else r=Ye,$r=la=null,$f(r),us=null,gl=0,r=Ye;for(;r!==null;)Db(r.alternate,r),r=r.return;Ye=null}}function ys(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,qS(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),ei=0,kh(),mt=r,Ye=u=jr(r.current,null),We=a,st=0,zn=null,Ai=!1,ms=Js(r,a),vh=!1,gs=Pn=_h=ga=Si=St=0,vn=Ml=null,Th=!1,(a&8)!==0&&(a|=a&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=a;0<c;){var p=31-pt(c),g=1<<p;a|=r[p],c&=~g}return Jr=a,ho(),u}function i2(r,a){ze=null,I.H=Al,a===ls||a===vo?(a=xg(),st=3):a===Of?(a=xg(),st=4):st=a===ah?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,zn=a,Ye===null&&(St=1,Io(r,Qn(a,r.current)))}function a2(){var r=In.current;return r===null?!0:(We&4194048)===We?er===null:(We&62914560)===We||(We&536870912)!==0?r===er:!1}function s2(){var r=I.H;return I.H=Al,r===null?Al:r}function l2(){var r=I.A;return I.A=_S,r}function Go(){St=4,Ai||(We&4194048)!==We&&In.current!==null||(ms=!0),(Si&134217727)===0&&(ga&134217727)===0||mt===null||Ci(mt,We,Pn,!1)}function Ch(r,a,u){var c=nt;nt|=2;var p=s2(),g=l2();(mt!==r||We!==a)&&(Yo=null,ys(r,a)),a=!1;var _=St;e:do try{if(st!==0&&Ye!==null){var A=Ye,B=zn;switch(st){case 8:kh(),_=6;break e;case 3:case 2:case 9:case 6:In.current===null&&(a=!0);var X=st;if(st=0,zn=null,Es(r,A,B,X),u&&ms){_=0;break e}break;default:X=st,st=0,zn=null,Es(r,A,B,X)}}SS(),_=St;break}catch(ie){i2(r,ie)}while(!0);return a&&r.shellSuspendCounter++,$r=la=null,nt=c,I.H=p,I.A=g,Ye===null&&(mt=null,We=0,ho()),_}function SS(){for(;Ye!==null;)u2(Ye)}function wS(r,a){var u=nt;nt|=2;var c=s2(),p=l2();mt!==r||We!==a?(Yo=null,qo=on()+500,ys(r,a)):ms=Js(r,a);e:do try{if(st!==0&&Ye!==null){a=Ye;var g=zn;t:switch(st){case 1:st=0,zn=null,Es(r,a,g,1);break;case 2:case 9:if(yg(g)){st=0,zn=null,o2(a);break}a=function(){st!==2&&st!==9||mt!==r||(st=7),Sr(r)},g.then(a,a);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:yg(g)?(st=0,zn=null,o2(a)):(st=0,zn=null,Es(r,a,g,7));break;case 5:var _=null;switch(Ye.tag){case 26:_=Ye.memoizedState;case 5:case 27:var A=Ye;if(_?W2(_):A.stateNode.complete){st=0,zn=null;var B=A.sibling;if(B!==null)Ye=B;else{var X=A.return;X!==null?(Ye=X,Wo(X)):Ye=null}break t}}st=0,zn=null,Es(r,a,g,5);break;case 6:st=0,zn=null,Es(r,a,g,6);break;case 8:kh(),St=6;break e;default:throw Error(i(462))}}kS();break}catch(ie){i2(r,ie)}while(!0);return $r=la=null,I.H=c,I.A=p,nt=u,Ye!==null?0:(mt=null,We=0,ho(),St)}function kS(){for(;Ye!==null&&!Ud();)u2(Ye)}function u2(r){var a=Mb(r.alternate,r,Jr);r.memoizedProps=r.pendingProps,a===null?Wo(r):Ye=a}function o2(r){var a=r,u=a.alternate;switch(a.tag){case 15:case 0:a=wb(u,a,a.pendingProps,a.type,void 0,We);break;case 11:a=wb(u,a,a.pendingProps,a.type.render,a.ref,We);break;case 5:$f(a);default:Db(u,a),a=Ye=lg(a,Jr),a=Mb(u,a,Jr)}r.memoizedProps=r.pendingProps,a===null?Wo(r):Ye=a}function Es(r,a,u,c){$r=la=null,$f(a),us=null,gl=0;var p=a.return;try{if(mS(r,p,a,u,We)){St=1,Io(r,Qn(u,r.current)),Ye=null;return}}catch(g){if(p!==null)throw Ye=p,g;St=1,Io(r,Qn(u,r.current)),Ye=null;return}a.flags&32768?(Qe||c===1?r=!0:ms||(We&536870912)!==0?r=!1:(Ai=r=!0,(c===2||c===9||c===3||c===6)&&(c=In.current,c!==null&&c.tag===13&&(c.flags|=16384))),c2(a,r)):Wo(a)}function Wo(r){var a=r;do{if((a.flags&32768)!==0){c2(a,Ai);return}r=a.return;var u=yS(a.alternate,a,Jr);if(u!==null){Ye=u;return}if(a=a.sibling,a!==null){Ye=a;return}Ye=a=r}while(a!==null);St===0&&(St=5)}function c2(r,a){do{var u=ES(r.alternate,r);if(u!==null){u.flags&=32767,Ye=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(r=r.sibling,r!==null)){Ye=r;return}Ye=r=u}while(r!==null);St=6,Ye=null}function d2(r,a,u,c,p,g,_,A,B){r.cancelPendingCommit=null;do Xo();while(Pt!==0);if((nt&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(g=a.lanes|a.childLanes,g|=gf,sA(r,u,g,_,A,B),r===mt&&(Ye=mt=null,We=0),bs=a,ki=r,ei=u,Ah=g,Sh=p,e2=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,OS(De,function(){return g2(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=I.T,I.T=null,p=te.p,te.p=2,_=nt,nt|=4;try{xS(r,a,u)}finally{nt=_,te.p=p,I.T=c}}Pt=1,f2(),h2(),p2()}}function f2(){if(Pt===1){Pt=0;var r=ki,a=bs,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=I.T,I.T=null;var c=te.p;te.p=2;var p=nt;nt|=4;try{Vb(a,r);var g=Uh,_=Z1(r.containerInfo),A=g.focusedElem,B=g.selectionRange;if(_!==A&&A&&A.ownerDocument&&K1(A.ownerDocument.documentElement,A)){if(B!==null&&df(A)){var X=B.start,ie=B.end;if(ie===void 0&&(ie=X),"selectionStart"in A)A.selectionStart=X,A.selectionEnd=Math.min(ie,A.value.length);else{var ue=A.ownerDocument||document,Q=ue&&ue.defaultView||window;if(Q.getSelection){var ee=Q.getSelection(),Te=A.textContent.length,Re=Math.min(B.start,Te),ft=B.end===void 0?Re:Math.min(B.end,Te);!ee.extend&&Re>ft&&(_=ft,ft=Re,Re=_);var q=Q1(A,Re),U=Q1(A,ft);if(q&&U&&(ee.rangeCount!==1||ee.anchorNode!==q.node||ee.anchorOffset!==q.offset||ee.focusNode!==U.node||ee.focusOffset!==U.offset)){var W=ue.createRange();W.setStart(q.node,q.offset),ee.removeAllRanges(),Re>ft?(ee.addRange(W),ee.extend(U.node,U.offset)):(W.setEnd(U.node,U.offset),ee.addRange(W))}}}}for(ue=[],ee=A;ee=ee.parentNode;)ee.nodeType===1&&ue.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<ue.length;A++){var se=ue[A];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}lc=!!Hh,Uh=Hh=null}finally{nt=p,te.p=c,I.T=u}}r.current=a,Pt=2}}function h2(){if(Pt===2){Pt=0;var r=ki,a=bs,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=I.T,I.T=null;var c=te.p;te.p=2;var p=nt;nt|=4;try{jb(r,a.alternate,a)}finally{nt=p,te.p=c,I.T=u}}Pt=3}}function p2(){if(Pt===4||Pt===3){Pt=0,jd();var r=ki,a=bs,u=ei,c=e2;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Pt=5:(Pt=0,bs=ki=null,m2(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(wi=null),Yd(u),a=a.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(cn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=I.T,p=te.p,te.p=2,I.T=null;try{for(var g=r.onRecoverableError,_=0;_<c.length;_++){var A=c[_];g(A.value,{componentStack:A.stack})}}finally{I.T=a,te.p=p}}(ei&3)!==0&&Xo(),Sr(r),p=r.pendingLanes,(u&261930)!==0&&(p&42)!==0?r===wh?Ll++:(Ll=0,wh=r):Ll=0,Dl(0)}}function m2(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,pl(a)))}function Xo(){return f2(),h2(),p2(),g2()}function g2(){if(Pt!==5)return!1;var r=ki,a=Ah;Ah=0;var u=Yd(ei),c=I.T,p=te.p;try{te.p=32>u?32:u,I.T=null,u=Sh,Sh=null;var g=ki,_=ei;if(Pt=0,bs=ki=null,ei=0,(nt&6)!==0)throw Error(i(331));var A=nt;if(nt|=4,Kb(g.current),Wb(g,g.current,_,u),nt=A,Dl(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(cn,g)}catch{}return!0}finally{te.p=p,I.T=c,m2(r,a)}}function b2(r,a,u){a=Qn(u,a),a=ih(r.stateNode,a,2),r=xi(r,a,2),r!==null&&(el(r,2),Sr(r))}function lt(r,a,u){if(r.tag===3)b2(r,r,u);else for(;a!==null;){if(a.tag===3){b2(a,r,u);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(wi===null||!wi.has(c))){r=Qn(u,r),u=yb(2),c=xi(a,u,2),c!==null&&(Eb(u,c,a,r),el(c,2),Sr(c));break}}a=a.return}}function Nh(r,a,u){var c=r.pingCache;if(c===null){c=r.pingCache=new TS;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(u)||(vh=!0,p.add(u),r=CS.bind(null,r,a,u),a.then(r,r))}function CS(r,a,u){var c=r.pingCache;c!==null&&c.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,mt===r&&(We&u)===u&&(St===4||St===3&&(We&62914560)===We&&300>on()-$o?(nt&2)===0&&ys(r,0):_h|=u,gs===We&&(gs=0)),Sr(r)}function y2(r,a){a===0&&(a=f1()),r=ia(r,a),r!==null&&(el(r,a),Sr(r))}function NS(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),y2(r,u)}function RS(r,a){var u=0;switch(r.tag){case 31:case 13:var c=r.stateNode,p=r.memoizedState;p!==null&&(u=p.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),y2(r,u)}function OS(r,a){return un(r,a)}var Qo=null,xs=null,Rh=!1,Ko=!1,Oh=!1,Ni=0;function Sr(r){r!==xs&&r.next===null&&(xs===null?Qo=xs=r:xs=xs.next=r),Ko=!0,Rh||(Rh=!0,LS())}function Dl(r,a){if(!Oh&&Ko){Oh=!0;do for(var u=!1,c=Qo;c!==null;){if(r!==0){var p=c.pendingLanes;if(p===0)var g=0;else{var _=c.suspendedLanes,A=c.pingedLanes;g=(1<<31-pt(42|r)+1)-1,g&=p&~(_&~A),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(u=!0,_2(c,g))}else g=We,g=eo(c,c===mt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Js(c,g)||(u=!0,_2(c,g));c=c.next}while(u);Oh=!1}}function MS(){E2()}function E2(){Ko=Rh=!1;var r=0;Ni!==0&&$S()&&(r=Ni);for(var a=on(),u=null,c=Qo;c!==null;){var p=c.next,g=x2(c,a);g===0?(c.next=null,u===null?Qo=p:u.next=p,p===null&&(xs=u)):(u=c,(r!==0||(g&3)!==0)&&(Ko=!0)),c=p}Pt!==0&&Pt!==5||Dl(r),Ni!==0&&(Ni=0)}function x2(r,a){for(var u=r.suspendedLanes,c=r.pingedLanes,p=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var _=31-pt(g),A=1<<_,B=p[_];B===-1?((A&u)===0||(A&c)!==0)&&(p[_]=aA(A,a)):B<=a&&(r.expiredLanes|=A),g&=~A}if(a=mt,u=We,u=eo(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,u===0||r===a&&(st===2||st===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&dr(c),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||Js(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(c!==null&&dr(c),Yd(u)){case 2:case 8:u=ye;break;case 32:u=De;break;case 268435456:u=rt;break;default:u=De}return c=v2.bind(null,r),u=un(u,c),r.callbackPriority=a,r.callbackNode=u,a}return c!==null&&c!==null&&dr(c),r.callbackPriority=2,r.callbackNode=null,2}function v2(r,a){if(Pt!==0&&Pt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(Xo()&&r.callbackNode!==u)return null;var c=We;return c=eo(r,r===mt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(n2(r,c,a),x2(r,on()),r.callbackNode!=null&&r.callbackNode===u?v2.bind(null,r):null)}function _2(r,a){if(Xo())return null;n2(r,a,!0)}function LS(){YS(function(){(nt&6)!==0?un(ae,MS):E2()})}function Mh(){if(Ni===0){var r=as;r===0&&(r=Ku,Ku<<=1,(Ku&261888)===0&&(Ku=256)),Ni=r}return Ni}function T2(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:io(""+r)}function A2(r,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,r.id&&u.setAttribute("form",r.id),a.parentNode.insertBefore(u,a),r=new FormData(r),u.parentNode.removeChild(u),r}function DS(r,a,u,c,p){if(a==="submit"&&u&&u.stateNode===p){var g=T2((p[gn]||null).action),_=c.submitter;_&&(a=(a=_[gn]||null)?T2(a.formAction):_.getAttribute("formAction"),a!==null&&(g=a,_=null));var A=new uo("action","action",null,c,p);r.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ni!==0){var B=_?A2(p,_):new FormData(p);Zf(u,{pending:!0,data:B,method:p.method,action:g},null,B)}}else typeof g=="function"&&(A.preventDefault(),B=_?A2(p,_):new FormData(p),Zf(u,{pending:!0,data:B,method:p.method,action:g},g,B))},currentTarget:p}]})}}for(var Lh=0;Lh<mf.length;Lh++){var Dh=mf[Lh],IS=Dh.toLowerCase(),BS=Dh[0].toUpperCase()+Dh.slice(1);hr(IS,"on"+BS)}hr(tg,"onAnimationEnd"),hr(ng,"onAnimationIteration"),hr(rg,"onAnimationStart"),hr("dblclick","onDoubleClick"),hr("focusin","onFocus"),hr("focusout","onBlur"),hr(ZA,"onTransitionRun"),hr(JA,"onTransitionStart"),hr(eS,"onTransitionCancel"),hr(ig,"onTransitionEnd"),Ya("onMouseEnter",["mouseout","mouseover"]),Ya("onMouseLeave",["mouseout","mouseover"]),Ya("onPointerEnter",["pointerout","pointerover"]),Ya("onPointerLeave",["pointerout","pointerover"]),ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Il="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(" "),zS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Il));function S2(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var c=r[u],p=c.event;c=c.listeners;e:{var g=void 0;if(a)for(var _=c.length-1;0<=_;_--){var A=c[_],B=A.instance,X=A.currentTarget;if(A=A.listener,B!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=X;try{g(p)}catch(ie){fo(ie)}p.currentTarget=null,g=B}else for(_=0;_<c.length;_++){if(A=c[_],B=A.instance,X=A.currentTarget,A=A.listener,B!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=X;try{g(p)}catch(ie){fo(ie)}p.currentTarget=null,g=B}}}}function Ve(r,a){var u=a[Vd];u===void 0&&(u=a[Vd]=new Set);var c=r+"__bubble";u.has(c)||(w2(a,r,2,!1),u.add(c))}function Ih(r,a,u){var c=0;a&&(c|=4),w2(u,r,c,a)}var Zo="_reactListening"+Math.random().toString(36).slice(2);function Bh(r){if(!r[Zo]){r[Zo]=!0,E1.forEach(function(u){u!=="selectionchange"&&(zS.has(u)||Ih(u,!1,r),Ih(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Zo]||(a[Zo]=!0,Ih("selectionchange",!1,a))}}function w2(r,a,u,c){switch(ty(a)){case 2:var p=dw;break;case 8:p=fw;break;default:p=Kh}u=p.bind(null,a,u,r),p=void 0,!tf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?r.addEventListener(a,u,{capture:!0,passive:p}):r.addEventListener(a,u,!0):p!==void 0?r.addEventListener(a,u,{passive:p}):r.addEventListener(a,u,!1)}function zh(r,a,u,c,p){var g=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var A=c.stateNode.containerInfo;if(A===p)break;if(_===4)for(_=c.return;_!==null;){var B=_.tag;if((B===3||B===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;A!==null;){if(_=Fa(A),_===null)return;if(B=_.tag,B===5||B===6||B===26||B===27){c=g=_;continue e}A=A.parentNode}}c=c.return}O1(function(){var X=g,ie=Jd(u),ue=[];e:{var Q=ag.get(r);if(Q!==void 0){var ee=uo,Te=r;switch(r){case"keypress":if(so(u)===0)break e;case"keydown":case"keyup":ee=RA;break;case"focusin":Te="focus",ee=sf;break;case"focusout":Te="blur",ee=sf;break;case"beforeblur":case"afterblur":ee=sf;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=D1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=yA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=LA;break;case tg:case ng:case rg:ee=vA;break;case ig:ee=IA;break;case"scroll":case"scrollend":ee=gA;break;case"wheel":ee=zA;break;case"copy":case"cut":case"paste":ee=TA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=B1;break;case"toggle":case"beforetoggle":ee=HA}var Re=(a&4)!==0,ft=!Re&&(r==="scroll"||r==="scrollend"),q=Re?Q!==null?Q+"Capture":null:Q;Re=[];for(var U=X,W;U!==null;){var se=U;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||q===null||(se=rl(U,q),se!=null&&Re.push(Bl(U,se,W))),ft)break;U=U.return}0<Re.length&&(Q=new ee(Q,Te,null,u,ie),ue.push({event:Q,listeners:Re}))}}if((a&7)===0){e:{if(Q=r==="mouseover"||r==="pointerover",ee=r==="mouseout"||r==="pointerout",Q&&u!==Zd&&(Te=u.relatedTarget||u.fromElement)&&(Fa(Te)||Te[ja]))break e;if((ee||Q)&&(Q=ie.window===ie?ie:(Q=ie.ownerDocument)?Q.defaultView||Q.parentWindow:window,ee?(Te=u.relatedTarget||u.toElement,ee=X,Te=Te?Fa(Te):null,Te!==null&&(ft=l(Te),Re=Te.tag,Te!==ft||Re!==5&&Re!==27&&Re!==6)&&(Te=null)):(ee=null,Te=X),ee!==Te)){if(Re=D1,se="onMouseLeave",q="onMouseEnter",U="mouse",(r==="pointerout"||r==="pointerover")&&(Re=B1,se="onPointerLeave",q="onPointerEnter",U="pointer"),ft=ee==null?Q:nl(ee),W=Te==null?Q:nl(Te),Q=new Re(se,U+"leave",ee,u,ie),Q.target=ft,Q.relatedTarget=W,se=null,Fa(ie)===X&&(Re=new Re(q,U+"enter",Te,u,ie),Re.target=W,Re.relatedTarget=ft,se=Re),ft=se,ee&&Te)t:{for(Re=PS,q=ee,U=Te,W=0,se=q;se;se=Re(se))W++;se=0;for(var Ce=U;Ce;Ce=Re(Ce))se++;for(;0<W-se;)q=Re(q),W--;for(;0<se-W;)U=Re(U),se--;for(;W--;){if(q===U||U!==null&&q===U.alternate){Re=q;break t}q=Re(q),U=Re(U)}Re=null}else Re=null;ee!==null&&k2(ue,Q,ee,Re,!1),Te!==null&&ft!==null&&k2(ue,ft,Te,Re,!0)}}e:{if(Q=X?nl(X):window,ee=Q.nodeName&&Q.nodeName.toLowerCase(),ee==="select"||ee==="input"&&Q.type==="file")var et=q1;else if(F1(Q))if(Y1)et=XA;else{et=GA;var we=VA}else ee=Q.nodeName,!ee||ee.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?X&&Kd(X.elementType)&&(et=q1):et=WA;if(et&&(et=et(r,X))){$1(ue,et,u,ie);break e}we&&we(r,Q,X),r==="focusout"&&X&&Q.type==="number"&&X.memoizedProps.value!=null&&Qd(Q,"number",Q.value)}switch(we=X?nl(X):window,r){case"focusin":(F1(we)||we.contentEditable==="true")&&(Ka=we,ff=X,dl=null);break;case"focusout":dl=ff=Ka=null;break;case"mousedown":hf=!0;break;case"contextmenu":case"mouseup":case"dragend":hf=!1,J1(ue,u,ie);break;case"selectionchange":if(KA)break;case"keydown":case"keyup":J1(ue,u,ie)}var Pe;if(uf)e:{switch(r){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else Qa?U1(r,u)&&(Xe="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Xe="onCompositionStart");Xe&&(z1&&u.locale!=="ko"&&(Qa||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&Qa&&(Pe=M1()):(hi=ie,nf="value"in hi?hi.value:hi.textContent,Qa=!0)),we=Jo(X,Xe),0<we.length&&(Xe=new I1(Xe,r,null,u,ie),ue.push({event:Xe,listeners:we}),Pe?Xe.data=Pe:(Pe=j1(u),Pe!==null&&(Xe.data=Pe)))),(Pe=jA?FA(r,u):$A(r,u))&&(Xe=Jo(X,"onBeforeInput"),0<Xe.length&&(we=new I1("onBeforeInput","beforeinput",null,u,ie),ue.push({event:we,listeners:Xe}),we.data=Pe)),DS(ue,r,X,u,ie)}S2(ue,a)})}function Bl(r,a,u){return{instance:r,listener:a,currentTarget:u}}function Jo(r,a){for(var u=a+"Capture",c=[];r!==null;){var p=r,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=rl(r,u),p!=null&&c.unshift(Bl(r,p,g)),p=rl(r,a),p!=null&&c.push(Bl(r,p,g))),r.tag===3)return c;r=r.return}return[]}function PS(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function k2(r,a,u,c,p){for(var g=a._reactName,_=[];u!==null&&u!==c;){var A=u,B=A.alternate,X=A.stateNode;if(A=A.tag,B!==null&&B===c)break;A!==5&&A!==26&&A!==27||X===null||(B=X,p?(X=rl(u,g),X!=null&&_.unshift(Bl(u,X,B))):p||(X=rl(u,g),X!=null&&_.push(Bl(u,X,B)))),u=u.return}_.length!==0&&r.push({event:a,listeners:_})}var HS=/\r\n?/g,US=/\u0000|\uFFFD/g;function C2(r){return(typeof r=="string"?r:""+r).replace(HS,`
14
+ `).replace(US,"")}function N2(r,a){return a=C2(a),C2(r)===a}function dt(r,a,u,c,p,g){switch(u){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Ga(r,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Ga(r,""+c);break;case"className":no(r,"class",c);break;case"tabIndex":no(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":no(r,u,c);break;case"style":N1(r,c,g);break;case"data":if(a!=="object"){no(r,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(u);break}c=io(""+c),r.setAttribute(u,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(u,"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}else typeof g=="function"&&(u==="formAction"?(a!=="input"&&dt(r,a,"name",p.name,p,null),dt(r,a,"formEncType",p.formEncType,p,null),dt(r,a,"formMethod",p.formMethod,p,null),dt(r,a,"formTarget",p.formTarget,p,null)):(dt(r,a,"encType",p.encType,p,null),dt(r,a,"method",p.method,p,null),dt(r,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(u);break}c=io(""+c),r.setAttribute(u,c);break;case"onClick":c!=null&&(r.onclick=Hr);break;case"onScroll":c!=null&&Ve("scroll",r);break;case"onScrollEnd":c!=null&&Ve("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(u=c.__html,u!=null){if(p.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}u=io(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(u,""+c):r.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":c===!0?r.setAttribute(u,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(u,c):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(u,c):r.removeAttribute(u);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(u):r.setAttribute(u,c);break;case"popover":Ve("beforetoggle",r),Ve("toggle",r),to(r,"popover",c);break;case"xlinkActuate":Pr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Pr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Pr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Pr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Pr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Pr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Pr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Pr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Pr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":to(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=pA.get(u)||u,to(r,u,c))}}function Ph(r,a,u,c,p,g){switch(u){case"style":N1(r,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(u=c.__html,u!=null){if(p.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof c=="string"?Ga(r,c):(typeof c=="number"||typeof c=="bigint")&&Ga(r,""+c);break;case"onScroll":c!=null&&Ve("scroll",r);break;case"onScrollEnd":c!=null&&Ve("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Hr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!x1.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(p=u.endsWith("Capture"),a=u.slice(2,p?u.length-7:void 0),g=r[gn]||null,g=g!=null?g[u]:null,typeof g=="function"&&r.removeEventListener(a,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,c,p);break e}u in r?r[u]=c:c===!0?r.setAttribute(u,""):to(r,u,c)}}}function en(r,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",r),Ve("load",r);var c=!1,p=!1,g;for(g in u)if(u.hasOwnProperty(g)){var _=u[g];if(_!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:dt(r,a,g,_,u,null)}}p&&dt(r,a,"srcSet",u.srcSet,u,null),c&&dt(r,a,"src",u.src,u,null);return;case"input":Ve("invalid",r);var A=g=_=p=null,B=null,X=null;for(c in u)if(u.hasOwnProperty(c)){var ie=u[c];if(ie!=null)switch(c){case"name":p=ie;break;case"type":_=ie;break;case"checked":B=ie;break;case"defaultChecked":X=ie;break;case"value":g=ie;break;case"defaultValue":A=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,a));break;default:dt(r,a,c,ie,u,null)}}S1(r,g,A,B,X,_,p,!1);return;case"select":Ve("invalid",r),c=_=g=null;for(p in u)if(u.hasOwnProperty(p)&&(A=u[p],A!=null))switch(p){case"value":g=A;break;case"defaultValue":_=A;break;case"multiple":c=A;default:dt(r,a,p,A,u,null)}a=g,u=_,r.multiple=!!c,a!=null?Va(r,!!c,a,!1):u!=null&&Va(r,!!c,u,!0);return;case"textarea":Ve("invalid",r),g=p=c=null;for(_ in u)if(u.hasOwnProperty(_)&&(A=u[_],A!=null))switch(_){case"value":c=A;break;case"defaultValue":p=A;break;case"children":g=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(i(91));break;default:dt(r,a,_,A,u,null)}k1(r,c,p,g);return;case"option":for(B in u)u.hasOwnProperty(B)&&(c=u[B],c!=null)&&(B==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":dt(r,a,B,c,u,null));return;case"dialog":Ve("beforetoggle",r),Ve("toggle",r),Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":Ve("load",r);break;case"video":case"audio":for(c=0;c<Il.length;c++)Ve(Il[c],r);break;case"image":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"embed":case"source":case"link":Ve("error",r),Ve("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in u)if(u.hasOwnProperty(X)&&(c=u[X],c!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:dt(r,a,X,c,u,null)}return;default:if(Kd(a)){for(ie in u)u.hasOwnProperty(ie)&&(c=u[ie],c!==void 0&&Ph(r,a,ie,c,u,void 0));return}}for(A in u)u.hasOwnProperty(A)&&(c=u[A],c!=null&&dt(r,a,A,c,u,null))}function jS(r,a,u,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,_=null,A=null,B=null,X=null,ie=null;for(ee in u){var ue=u[ee];if(u.hasOwnProperty(ee)&&ue!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":B=ue;default:c.hasOwnProperty(ee)||dt(r,a,ee,null,c,ue)}}for(var Q in c){var ee=c[Q];if(ue=u[Q],c.hasOwnProperty(Q)&&(ee!=null||ue!=null))switch(Q){case"type":g=ee;break;case"name":p=ee;break;case"checked":X=ee;break;case"defaultChecked":ie=ee;break;case"value":_=ee;break;case"defaultValue":A=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,a));break;default:ee!==ue&&dt(r,a,Q,ee,c,ue)}}Xd(r,_,A,B,X,ie,g,p);return;case"select":ee=_=A=Q=null;for(g in u)if(B=u[g],u.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":ee=B;default:c.hasOwnProperty(g)||dt(r,a,g,null,c,B)}for(p in c)if(g=c[p],B=u[p],c.hasOwnProperty(p)&&(g!=null||B!=null))switch(p){case"value":Q=g;break;case"defaultValue":A=g;break;case"multiple":_=g;default:g!==B&&dt(r,a,p,g,c,B)}a=A,u=_,c=ee,Q!=null?Va(r,!!u,Q,!1):!!c!=!!u&&(a!=null?Va(r,!!u,a,!0):Va(r,!!u,u?[]:"",!1));return;case"textarea":ee=Q=null;for(A in u)if(p=u[A],u.hasOwnProperty(A)&&p!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:dt(r,a,A,null,c,p)}for(_ in c)if(p=c[_],g=u[_],c.hasOwnProperty(_)&&(p!=null||g!=null))switch(_){case"value":Q=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==g&&dt(r,a,_,p,c,g)}w1(r,Q,ee);return;case"option":for(var Te in u)Q=u[Te],u.hasOwnProperty(Te)&&Q!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:dt(r,a,Te,null,c,Q));for(B in c)Q=c[B],ee=u[B],c.hasOwnProperty(B)&&Q!==ee&&(Q!=null||ee!=null)&&(B==="selected"?r.selected=Q&&typeof Q!="function"&&typeof Q!="symbol":dt(r,a,B,Q,c,ee));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 Re in u)Q=u[Re],u.hasOwnProperty(Re)&&Q!=null&&!c.hasOwnProperty(Re)&&dt(r,a,Re,null,c,Q);for(X in c)if(Q=c[X],ee=u[X],c.hasOwnProperty(X)&&Q!==ee&&(Q!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,a));break;default:dt(r,a,X,Q,c,ee)}return;default:if(Kd(a)){for(var ft in u)Q=u[ft],u.hasOwnProperty(ft)&&Q!==void 0&&!c.hasOwnProperty(ft)&&Ph(r,a,ft,void 0,c,Q);for(ie in c)Q=c[ie],ee=u[ie],!c.hasOwnProperty(ie)||Q===ee||Q===void 0&&ee===void 0||Ph(r,a,ie,Q,c,ee);return}}for(var q in u)Q=u[q],u.hasOwnProperty(q)&&Q!=null&&!c.hasOwnProperty(q)&&dt(r,a,q,null,c,Q);for(ue in c)Q=c[ue],ee=u[ue],!c.hasOwnProperty(ue)||Q===ee||Q==null&&ee==null||dt(r,a,ue,Q,c,ee)}function R2(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function FS(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),c=0;c<u.length;c++){var p=u[c],g=p.transferSize,_=p.initiatorType,A=p.duration;if(g&&A&&R2(_)){for(_=0,A=p.responseEnd,c+=1;c<u.length;c++){var B=u[c],X=B.startTime;if(X>A)break;var ie=B.transferSize,ue=B.initiatorType;ie&&R2(ue)&&(B=B.responseEnd,_+=ie*(B<A?1:(A-X)/(B-X)))}if(--c,a+=8*(g+_)/(p.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Hh=null,Uh=null;function ec(r){return r.nodeType===9?r:r.ownerDocument}function O2(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function M2(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function jh(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Fh=null;function $S(){var r=window.event;return r&&r.type==="popstate"?r===Fh?!1:(Fh=r,!0):(Fh=null,!1)}var L2=typeof setTimeout=="function"?setTimeout:void 0,qS=typeof clearTimeout=="function"?clearTimeout:void 0,D2=typeof Promise=="function"?Promise:void 0,YS=typeof queueMicrotask=="function"?queueMicrotask:typeof D2<"u"?function(r){return D2.resolve(null).then(r).catch(VS)}:L2;function VS(r){setTimeout(function(){throw r})}function Ri(r){return r==="head"}function I2(r,a){var u=a,c=0;do{var p=u.nextSibling;if(r.removeChild(u),p&&p.nodeType===8)if(u=p.data,u==="/$"||u==="/&"){if(c===0){r.removeChild(p),As(a);return}c--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")c++;else if(u==="html")zl(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,zl(u);for(var g=u.firstChild;g;){var _=g.nextSibling,A=g.nodeName;g[tl]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||u.removeChild(g),g=_}}else u==="body"&&zl(r.ownerDocument.body);u=p}while(u);As(a)}function B2(r,a){var u=r;r=0;do{var c=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),c&&c.nodeType===8)if(u=c.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=c}while(u)}function $h(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":$h(u),Gd(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function GS(r,a,u,c){for(;r.nodeType===1;){var p=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[tl])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=tr(r.nextSibling),r===null)break}return null}function WS(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=tr(r.nextSibling),r===null))return null;return r}function z2(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=tr(r.nextSibling),r===null))return null;return r}function qh(r){return r.data==="$?"||r.data==="$~"}function Yh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function XS(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var c=function(){a(),u.removeEventListener("DOMContentLoaded",c)};u.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function tr(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Vh=null;function P2(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return tr(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function H2(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function U2(r,a,u){switch(a=ec(u),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function zl(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);Gd(r)}var nr=new Map,j2=new Set;function tc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ti=te.d;te.d={f:QS,r:KS,D:ZS,C:JS,L:ew,m:tw,X:rw,S:nw,M:iw};function QS(){var r=ti.f(),a=Vo();return r||a}function KS(r){var a=$a(r);a!==null&&a.tag===5&&a.type==="form"?ib(a):ti.r(r)}var vs=typeof document>"u"?null:document;function F2(r,a,u){var c=vs;if(c&&typeof a=="string"&&a){var p=Wn(a);p='link[rel="'+r+'"][href="'+p+'"]',typeof u=="string"&&(p+='[crossorigin="'+u+'"]'),j2.has(p)||(j2.add(p),r={rel:r,crossOrigin:u,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),en(a,"link",r),Ft(a),c.head.appendChild(a)))}}function ZS(r){ti.D(r),F2("dns-prefetch",r,null)}function JS(r,a){ti.C(r,a),F2("preconnect",r,a)}function ew(r,a,u){ti.L(r,a,u);var c=vs;if(c&&r&&a){var p='link[rel="preload"][as="'+Wn(a)+'"]';a==="image"&&u&&u.imageSrcSet?(p+='[imagesrcset="'+Wn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(p+='[imagesizes="'+Wn(u.imageSizes)+'"]')):p+='[href="'+Wn(r)+'"]';var g=p;switch(a){case"style":g=_s(r);break;case"script":g=Ts(r)}nr.has(g)||(r=b({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),nr.set(g,r),c.querySelector(p)!==null||a==="style"&&c.querySelector(Pl(g))||a==="script"&&c.querySelector(Hl(g))||(a=c.createElement("link"),en(a,"link",r),Ft(a),c.head.appendChild(a)))}}function tw(r,a){ti.m(r,a);var u=vs;if(u&&r){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Wn(c)+'"][href="'+Wn(r)+'"]',g=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Ts(r)}if(!nr.has(g)&&(r=b({rel:"modulepreload",href:r},a),nr.set(g,r),u.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Hl(g)))return}c=u.createElement("link"),en(c,"link",r),Ft(c),u.head.appendChild(c)}}}function nw(r,a,u){ti.S(r,a,u);var c=vs;if(c&&r){var p=qa(c).hoistableStyles,g=_s(r);a=a||"default";var _=p.get(g);if(!_){var A={loading:0,preload:null};if(_=c.querySelector(Pl(g)))A.loading=5;else{r=b({rel:"stylesheet",href:r,"data-precedence":a},u),(u=nr.get(g))&&Gh(r,u);var B=_=c.createElement("link");Ft(B),en(B,"link",r),B._p=new Promise(function(X,ie){B.onload=X,B.onerror=ie}),B.addEventListener("load",function(){A.loading|=1}),B.addEventListener("error",function(){A.loading|=2}),A.loading|=4,nc(_,a,c)}_={type:"stylesheet",instance:_,count:1,state:A},p.set(g,_)}}}function rw(r,a){ti.X(r,a);var u=vs;if(u&&r){var c=qa(u).hoistableScripts,p=Ts(r),g=c.get(p);g||(g=u.querySelector(Hl(p)),g||(r=b({src:r,async:!0},a),(a=nr.get(p))&&Wh(r,a),g=u.createElement("script"),Ft(g),en(g,"link",r),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function iw(r,a){ti.M(r,a);var u=vs;if(u&&r){var c=qa(u).hoistableScripts,p=Ts(r),g=c.get(p);g||(g=u.querySelector(Hl(p)),g||(r=b({src:r,async:!0,type:"module"},a),(a=nr.get(p))&&Wh(r,a),g=u.createElement("script"),Ft(g),en(g,"link",r),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function $2(r,a,u,c){var p=(p=xe.current)?tc(p):null;if(!p)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=_s(u.href),u=qa(p).hoistableStyles,c=u.get(a),c||(c={type:"style",instance:null,count:0,state:null},u.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=_s(u.href);var g=qa(p).hoistableStyles,_=g.get(r);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,_),(g=p.querySelector(Pl(r)))&&!g._p&&(_.instance=g,_.state.loading=5),nr.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},nr.set(r,u),g||aw(p,r,u,_.state))),a&&c===null)throw Error(i(528,""));return _}if(a&&c!==null)throw Error(i(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ts(u),u=qa(p).hoistableScripts,c=u.get(a),c||(c={type:"script",instance:null,count:0,state:null},u.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function _s(r){return'href="'+Wn(r)+'"'}function Pl(r){return'link[rel="stylesheet"]['+r+"]"}function q2(r){return b({},r,{"data-precedence":r.precedence,precedence:null})}function aw(r,a,u,c){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=r.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),en(a,"link",u),Ft(a),r.head.appendChild(a))}function Ts(r){return'[src="'+Wn(r)+'"]'}function Hl(r){return"script[async]"+r}function Y2(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var c=r.querySelector('style[data-href~="'+Wn(u.href)+'"]');if(c)return a.instance=c,Ft(c),c;var p=b({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Ft(c),en(c,"style",p),nc(c,u.precedence,r),a.instance=c;case"stylesheet":p=_s(u.href);var g=r.querySelector(Pl(p));if(g)return a.state.loading|=4,a.instance=g,Ft(g),g;c=q2(u),(p=nr.get(p))&&Gh(c,p),g=(r.ownerDocument||r).createElement("link"),Ft(g);var _=g;return _._p=new Promise(function(A,B){_.onload=A,_.onerror=B}),en(g,"link",c),a.state.loading|=4,nc(g,u.precedence,r),a.instance=g;case"script":return g=Ts(u.src),(p=r.querySelector(Hl(g)))?(a.instance=p,Ft(p),p):(c=u,(p=nr.get(g))&&(c=b({},u),Wh(c,p)),r=r.ownerDocument||r,p=r.createElement("script"),Ft(p),en(p,"link",c),r.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,nc(c,u.precedence,r));return a.instance}function nc(r,a,u){for(var c=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,g=p,_=0;_<c.length;_++){var A=c[_];if(A.dataset.precedence===a)g=A;else if(g!==p)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function Gh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function Wh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var rc=null;function V2(r,a,u){if(rc===null){var c=new Map,p=rc=new Map;p.set(u,c)}else p=rc,c=p.get(u),c||(c=new Map,p.set(u,c));if(c.has(r))return c;for(c.set(r,null),u=u.getElementsByTagName(r),p=0;p<u.length;p++){var g=u[p];if(!(g[tl]||g[Qt]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var _=g.getAttribute(a)||"";_=r+_;var A=c.get(_);A?A.push(g):c.set(_,[g])}}return c}function G2(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function sw(r,a,u){if(u===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function W2(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function lw(r,a,u,c){if(u.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var p=_s(c.href),g=a.querySelector(Pl(p));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=ic.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=g,Ft(g);return}g=a.ownerDocument||a,c=q2(c),(p=nr.get(p))&&Gh(c,p),g=g.createElement("link"),Ft(g);var _=g;_._p=new Promise(function(A,B){_.onload=A,_.onerror=B}),en(g,"link",c),u.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=ic.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var Xh=0;function uw(r,a){return r.stylesheets&&r.count===0&&sc(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var c=setTimeout(function(){if(r.stylesheets&&sc(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&Xh===0&&(Xh=62500*FS());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&sc(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>Xh?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function ic(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var ac=null;function sc(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ac=new Map,a.forEach(ow,r),ac=null,ic.call(r))}function ow(r,a){if(!(a.state.loading&4)){var u=ac.get(r);if(u)var c=u.get(null);else{u=new Map,ac.set(r,u);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var _=p[g];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),c=_)}c&&u.set(null,c)}p=a.instance,_=p.getAttribute("data-precedence"),g=u.get(_)||c,g===c&&u.set(null,p),u.set(_,p),this.count++,c=ic.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),g?g.parentNode.insertBefore(p,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),a.state.loading|=4}}var Ul={$$typeof:H,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function cw(r,a,u,c,p,g,_,A,B){this.tag=1,this.containerInfo=r,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=$d(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$d(0),this.hiddenUpdates=$d(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function X2(r,a,u,c,p,g,_,A,B,X,ie,ue){return r=new cw(r,a,u,_,B,X,ie,ue,A),a=1,g===!0&&(a|=24),g=Dn(3,null,null,a),r.current=g,g.stateNode=r,a=Cf(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:u,cache:a},Mf(g),r}function Q2(r){return r?(r=es,r):es}function K2(r,a,u,c,p,g){p=Q2(p),c.context===null?c.context=p:c.pendingContext=p,c=Ei(a),c.payload={element:u},g=g===void 0?null:g,g!==null&&(c.callback=g),u=xi(r,c,a),u!==null&&(_n(u,r,a),yl(u,r,a))}function Z2(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function Qh(r,a){Z2(r,a),(r=r.alternate)&&Z2(r,a)}function J2(r){if(r.tag===13||r.tag===31){var a=ia(r,67108864);a!==null&&_n(a,r,67108864),Qh(r,67108864)}}function ey(r){if(r.tag===13||r.tag===31){var a=Hn();a=qd(a);var u=ia(r,a);u!==null&&_n(u,r,a),Qh(r,a)}}var lc=!0;function dw(r,a,u,c){var p=I.T;I.T=null;var g=te.p;try{te.p=2,Kh(r,a,u,c)}finally{te.p=g,I.T=p}}function fw(r,a,u,c){var p=I.T;I.T=null;var g=te.p;try{te.p=8,Kh(r,a,u,c)}finally{te.p=g,I.T=p}}function Kh(r,a,u,c){if(lc){var p=Zh(c);if(p===null)zh(r,a,c,uc,u),ny(r,c);else if(pw(p,r,a,u,c))c.stopPropagation();else if(ny(r,c),a&4&&-1<hw.indexOf(r)){for(;p!==null;){var g=$a(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var _=Ji(g.pendingLanes);if(_!==0){var A=g;for(A.pendingLanes|=2,A.entangledLanes|=2;_;){var B=1<<31-pt(_);A.entanglements[1]|=B,_&=~B}Sr(g),(nt&6)===0&&(qo=on()+500,Dl(0))}}break;case 31:case 13:A=ia(g,2),A!==null&&_n(A,g,2),Vo(),Qh(g,2)}if(g=Zh(c),g===null&&zh(r,a,c,uc,u),g===p)break;p=g}p!==null&&c.stopPropagation()}else zh(r,a,c,null,u)}}function Zh(r){return r=Jd(r),Jh(r)}var uc=null;function Jh(r){if(uc=null,r=Fa(r),r!==null){var a=l(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=o(a),r!==null)return r;r=null}else if(u===31){if(r=d(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return uc=r,null}function ty(r){switch(r){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Fd()){case ae:return 2;case ye:return 8;case De:case qe:return 32;case rt:return 268435456;default:return 32}default:return 32}}var e0=!1,Oi=null,Mi=null,Li=null,jl=new Map,Fl=new Map,Di=[],hw="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 ny(r,a){switch(r){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":jl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fl.delete(a.pointerId)}}function $l(r,a,u,c,p,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:u,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},a!==null&&(a=$a(a),a!==null&&J2(a)),r):(r.eventSystemFlags|=c,a=r.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),r)}function pw(r,a,u,c,p){switch(a){case"focusin":return Oi=$l(Oi,r,a,u,c,p),!0;case"dragenter":return Mi=$l(Mi,r,a,u,c,p),!0;case"mouseover":return Li=$l(Li,r,a,u,c,p),!0;case"pointerover":var g=p.pointerId;return jl.set(g,$l(jl.get(g)||null,r,a,u,c,p)),!0;case"gotpointercapture":return g=p.pointerId,Fl.set(g,$l(Fl.get(g)||null,r,a,u,c,p)),!0}return!1}function ry(r){var a=Fa(r.target);if(a!==null){var u=l(a);if(u!==null){if(a=u.tag,a===13){if(a=o(u),a!==null){r.blockedOn=a,b1(r.priority,function(){ey(u)});return}}else if(a===31){if(a=d(u),a!==null){r.blockedOn=a,b1(r.priority,function(){ey(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function oc(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=Zh(r.nativeEvent);if(u===null){u=r.nativeEvent;var c=new u.constructor(u.type,u);Zd=c,u.target.dispatchEvent(c),Zd=null}else return a=$a(u),a!==null&&J2(a),r.blockedOn=u,!1;a.shift()}return!0}function iy(r,a,u){oc(r)&&u.delete(a)}function mw(){e0=!1,Oi!==null&&oc(Oi)&&(Oi=null),Mi!==null&&oc(Mi)&&(Mi=null),Li!==null&&oc(Li)&&(Li=null),jl.forEach(iy),Fl.forEach(iy)}function cc(r,a){r.blockedOn===a&&(r.blockedOn=null,e0||(e0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,mw)))}var dc=null;function ay(r){dc!==r&&(dc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dc===r&&(dc=null);for(var a=0;a<r.length;a+=3){var u=r[a],c=r[a+1],p=r[a+2];if(typeof c!="function"){if(Jh(c||u)===null)continue;break}var g=$a(u);g!==null&&(r.splice(a,3),a-=3,Zf(g,{pending:!0,data:p,method:u.method,action:c},c,p))}}))}function As(r){function a(B){return cc(B,r)}Oi!==null&&cc(Oi,r),Mi!==null&&cc(Mi,r),Li!==null&&cc(Li,r),jl.forEach(a),Fl.forEach(a);for(var u=0;u<Di.length;u++){var c=Di[u];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Di.length&&(u=Di[0],u.blockedOn===null);)ry(u),u.blockedOn===null&&Di.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(c=0;c<u.length;c+=3){var p=u[c],g=u[c+1],_=p[gn]||null;if(typeof g=="function")_||ay(u);else if(_){var A=null;if(g&&g.hasAttribute("formAction")){if(p=g,_=g[gn]||null)A=_.formAction;else if(Jh(p)!==null)continue}else A=_.action;typeof A=="function"?u[c+1]=A:(u.splice(c,3),c-=3),ay(u)}}}function sy(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(u,20)}function u(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function t0(r){this._internalRoot=r}fc.prototype.render=t0.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,c=Hn();K2(u,c,r,a,null,null)},fc.prototype.unmount=t0.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;K2(r.current,2,null,r,null,null),Vo(),a[ja]=null}};function fc(r){this._internalRoot=r}fc.prototype.unstable_scheduleHydration=function(r){if(r){var a=g1();r={blockedOn:null,target:r,priority:a};for(var u=0;u<Di.length&&a!==0&&a<Di[u].priority;u++);Di.splice(u,0,r),u===0&&ry(r)}};var ly=t.version;if(ly!=="19.2.4")throw Error(i(527,ly,"19.2.4"));te.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(a),r=r!==null?m(r):null,r=r===null?null:r.stateNode,r};var gw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hc.isDisabled&&hc.supportsFiber)try{cn=hc.inject(gw),zt=hc}catch{}}return Vl.createRoot=function(r,a){if(!s(r))throw Error(i(299));var u=!1,c="",p=pb,g=mb,_=gb;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),a=X2(r,1,!1,null,null,u,c,null,p,g,_,sy),r[ja]=a.current,Bh(r),new t0(a)},Vl.hydrateRoot=function(r,a,u){if(!s(r))throw Error(i(299));var c=!1,p="",g=pb,_=mb,A=gb,B=null;return u!=null&&(u.unstable_strictMode===!0&&(c=!0),u.identifierPrefix!==void 0&&(p=u.identifierPrefix),u.onUncaughtError!==void 0&&(g=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(A=u.onRecoverableError),u.formState!==void 0&&(B=u.formState)),a=X2(r,1,!0,a,u??null,c,p,B,g,_,A,sy),a.context=Q2(null),u=a.current,c=Hn(),c=qd(c),p=Ei(c),p.callback=null,xi(u,p,c),u=c,a.current.lanes=u,el(a,u),Sr(a),r[ja]=a.current,Bh(r),new fc(a)},Vl.version="19.2.4",Vl}var Dy;function lC(){if(Dy)return o0.exports;Dy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),o0.exports=sC(),o0.exports}var bp=lC();function hm(e,t,n){const i=e.slice(t);return!i||i==="/"||i==="\\"?n:i.startsWith("/")||i.startsWith("\\")?`${n}${i}`:`${n}/${i}`}function uC(e){const t=e.match(/^(.*[\\/])home[\\/][^\\/]+(?=([\\/]|$))/i);return!t||typeof t[0]!="string"?null:hm(e,t[0].length,"<dt-home>")}function oC(e){const t=e.match(/^(.*[\\/])(?=(home|miniapps|ai-sessions)([\\/]|$))/i);return!t||typeof t[1]!="string"?null:hm(e,t[1].length,"<dt-data>")}function cC(e){const t=e.match(/^((?:[A-Za-z]:)?[\\/](?:Users|home)[\\/][^\\/]+)(?=([\\/]|$))/);return!t||typeof t[1]!="string"?null:hm(e,t[1].length,"~")}function dC(e){return uC(e)??oC(e)??cC(e)??e}const Wv=R.createContext(null),pm=R.createContext(null);function jV({windowId:e,children:t}){return v.jsx(pm.Provider,{value:e,children:t})}function fC(){const e=R.useContext(pm);if(!e)throw new Error("useWindowId must be used inside a <WindowIdProvider>");return e}function mc(e,t){window.dispatchEvent(new CustomEvent("desktalk:actions-changed",{detail:{windowId:e,actions:t}}))}function FV({children:e}){const t=R.useRef(new Map),n=R.useContext(pm),i=R.useMemo(()=>({register(s){t.current.set(s.name,s),n&&mc(n,Array.from(t.current.values()))},unregister(s){t.current.delete(s),n&&mc(n,Array.from(t.current.values()))}}),[n]);return R.useEffect(()=>{if(n)return mc(n,Array.from(t.current.values())),()=>{mc(n,[])}},[n]),v.jsx(Wv.Provider,{value:i,children:e})}function $V({name:e,description:t,params:n,handler:i}){const s=R.useContext(Wv);return R.useEffect(()=>{if(s)return s.register({name:e,description:t,params:n,handler:i}),()=>{s.unregister(e)}},[s,e,t,n,i]),null}const Xv=R.createContext(null);function qV({miniAppId:e,children:t}){return $i.createElement(Xv.Provider,{value:e},t)}function hC(){const e=R.useContext(Xv);if(!e)throw new Error("useMiniAppId must be used inside a <MiniAppIdProvider>");return e}let Ic=null;const yp=new Map,xa=new Map,va=new Map,pC=5e3,mC=200;let gC=0;function bC(){return`req-${++gC}-${Date.now()}`}function yC(e){Ic=e,e.addEventListener("message",t=>{try{const n=JSON.parse(t.data);if(n.type==="command:response"){const i=yp.get(n.requestId);i&&(yp.delete(n.requestId),n.error?i.reject(new Error(n.error)):i.resolve(n.data))}else if(n.type==="event"){typeof window<"u"&&window.dispatchEvent(new CustomEvent("desktalk:event",{detail:{miniAppId:typeof n.miniAppId=="string"?n.miniAppId:null,event:typeof n.event=="string"?n.event:null,data:n.data}}));const i=xa.get(n.event);if(i&&i.size>0)for(const s of i)s(n.data);else{va.has(n.event)||va.set(n.event,[]);const s=va.get(n.event),l=setTimeout(()=>{const o=va.get(n.event);if(o){const d=o.findIndex(h=>h.timer===l);d!==-1&&o.splice(d,1),o.length===0&&va.delete(n.event)}},pC);for(s.push({data:n.data,timer:l});s.length>mC;){const o=s.shift();clearTimeout(o.timer)}}}}catch{}})}function YV(e){const t=hC();return R.useCallback(n=>new Promise((i,s)=>{if(!Ic||Ic.readyState!==WebSocket.OPEN){s(new Error("WebSocket not connected"));return}const l=bC();yp.set(l,{resolve:i,reject:s}),Ic.send(JSON.stringify({type:"command:invoke",miniAppId:t,command:e,requestId:l,data:n??null}))}),[t,e])}function VV(e,t){const n=R.useRef(t);n.current=t,R.useEffect(()=>{const i=l=>{n.current(l)};xa.has(e)||xa.set(e,new Set),xa.get(e).add(i);const s=va.get(e);if(s&&s.length>0){const l=[...s];for(const o of l)clearTimeout(o.timer);va.delete(e);for(const o of l)i(o.data)}return()=>{xa.get(e)?.delete(i),xa.get(e)?.size===0&&xa.delete(e)}},[e])}function GV(){return R.useCallback((e,t)=>{window.dispatchEvent(new CustomEvent("desktalk:open-window",{detail:{miniAppId:e,args:t}}))},[])}function WV(e){const t=fC(),n=R.useRef(e);n.current=e,R.useEffect(()=>{const i=s=>{const l=s.detail;l.windowId===t&&n.current(l.args)};return window.addEventListener("desktalk:window-args-updated",i),()=>window.removeEventListener("desktalk:window-args-updated",i)},[t])}const EC=R.createContext({locale:"en",messages:{}});R.createContext(null);let Qv={messages:{}};function xC(e,t){return t?e.replace(/\{([A-Za-z_$][\w$]*)\}/g,(n,i)=>{const s=t[i];return s==null?"":String(s)}):e}function vC(e,t,n,i,s){const l=e.messages[t]?.[n]??i;return xC(l,s)}function Gl(e){return vC(Qv,e.scope,e.key,e.defaultText,e.params)}function _C({locale:e,messages:t,children:n}){const i=R.useMemo(()=>({locale:e,messages:t}),[e,t]);return Qv=i,$i.createElement(EC.Provider,{value:i},n)}var TC=function(e){return typeof e=="function"},Ms=function(e){var t=R.useRef(e);t.current=R.useMemo(function(){return e},[e]);var n=R.useRef(void 0);return n.current||(n.current=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return t.current.apply(this,i)}),n.current};function Iy(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Kv(e){var t=R.useRef(e);return t.current=e,t}var AC=function(e){var t=Kv(e);R.useEffect(function(){return function(){t.current()}},[])},SC=!!(typeof window<"u"&&window.document&&window.document.createElement);function Zv(e,t){if(SC){if(!e)return t;var n;return TC(e)?n=e():"current"in e?n=e.current:n=e,n}}var wC=function(e){var t=function(n,i,s){var l=R.useRef(!1),o=R.useRef([]),d=R.useRef([]),h=R.useRef(void 0);e(function(){var f,m=Array.isArray(s)?s:[s],b=m.map(function(x){return Zv(x)});if(!l.current){l.current=!0,o.current=b,d.current=i,h.current=n();return}(b.length!==o.current.length||!Iy(o.current,b)||!Iy(d.current,i))&&((f=h.current)===null||f===void 0||f.call(h),o.current=b,d.current=i,h.current=n())}),AC(function(){var f;(f=h.current)===null||f===void 0||f.call(h),l.current=!1})};return t},kC=wC(R.useEffect);function su(e,t,n){n===void 0&&(n={});var i=n.enable,s=i===void 0?!0:i,l=Kv(t);kC(function(){if(s){var o=Zv(n.target,window);if(o?.addEventListener){var d=function(f){return l.current(f)},h=Array.isArray(e)?e:[e];return h.forEach(function(f){o.addEventListener(f,d,{capture:n.capture,once:n.once,passive:n.passive})}),function(){h.forEach(function(f){o.removeEventListener(f,d,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,s],n.target)}const By=e=>{let t;const n=new Set,i=(f,m)=>{const b=typeof f=="function"?f(t):f;if(!Object.is(b,t)){const x=t;t=m??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(E=>E(t,x))}},s=()=>t,d={setState:i,getState:s,getInitialState:()=>h,subscribe:f=>(n.add(f),()=>n.delete(f))},h=t=e(i,s,d);return d},CC=(e=>e?By(e):By),NC=e=>e;function RC(e,t=NC){const n=$i.useSyncExternalStore(e.subscribe,$i.useCallback(()=>t(e.getState()),[e,t]),$i.useCallback(()=>t(e.getInitialState()),[e,t]));return $i.useDebugValue(n),n}const zy=e=>{const t=CC(e),n=i=>RC(t,i);return Object.assign(n,t),n},Hu=(e=>e?zy(e):zy);function lu(e,t,n){if(e.type==="leaf")return[{windowId:e.windowId,x:t.x+n,y:t.y+n,width:Math.max(t.width-n*2,0),height:Math.max(t.height-n*2,0)}];const{split:i,ratio:s,children:l}=e,o=n/2;if(i==="horizontal"){const f=Math.round(t.width*s),m=t.width-f;return[...lu(l[0],{...t,width:f-o},n),...lu(l[1],{x:t.x+f+o,y:t.y,width:m-o,height:t.height},n)]}const d=Math.round(t.height*s),h=t.height-d;return[...lu(l[0],{...t,height:d-o},n),...lu(l[1],{x:t.x,y:t.y+d+o,width:t.width,height:h-o},n)]}function Ls(e){return e.type==="leaf"?[e.windowId]:[...Ls(e.children[0]),...Ls(e.children[1])]}function Ep(e,t){return e.type==="leaf"?e.windowId===t?e:null:Ep(e.children[0],t)??Ep(e.children[1],t)}function Cn(e,t){return Ep(e,t)!==null}function OC(e,t,n=0){return e.windowId===t?n:-1}function qc(e,t,n,i){return e.type==="leaf"?e.windowId!==t?e:{type:"container",split:i==="auto"?LC(OC({windowId:t},t)):i,ratio:.5,children:[{type:"leaf",windowId:t},{type:"leaf",windowId:n}]}:Cn(e.children[0],t)?{...e,children:[qc(e.children[0],t,n,i),e.children[1]]}:{...e,children:[e.children[0],qc(e.children[1],t,n,i)]}}function Yc(e,t){if(e.type==="leaf")return e.windowId===t?null:e;const[n,i]=e.children;if(n.type==="leaf"&&n.windowId===t)return i;if(i.type==="leaf"&&i.windowId===t)return n;if(Cn(n,t)){const s=Yc(n,t);return s===null?i:{...e,children:[s,i]}}if(Cn(i,t)){const s=Yc(i,t);return s===null?n:{...e,children:[n,s]}}return e}function Vc(e,t,n){return e.type==="leaf"?e.windowId===t?{type:"leaf",windowId:n}:e.windowId===n?{type:"leaf",windowId:t}:e:{...e,children:[Vc(e.children[0],t,n),Vc(e.children[1],t,n)]}}function xp(e,t,n){if(e.type==="leaf")return e;const[i,s]=e.children,l=i.type==="leaf"&&i.windowId===t||Cn(i,t),o=s.type==="leaf"&&s.windowId===t||Cn(s,t);if(l&&!o){if(i.type==="leaf"&&i.windowId===t)return{...e,ratio:ou(e.ratio+n)};const d=xp(i,t,n);return d===i?{...e,ratio:ou(e.ratio+n)}:{...e,children:[d,s]}}if(o&&!l){if(s.type==="leaf"&&s.windowId===t)return{...e,ratio:ou(e.ratio-n)};const d=xp(s,t,n);return d===s?{...e,ratio:ou(e.ratio-n)}:{...e,children:[i,d]}}return e}function vp(e,t){if(e.type==="leaf")return e;const[n,i]=e.children;return n.type==="leaf"&&n.windowId===t||i.type==="leaf"&&i.windowId===t?{...e,ratio:.5}:Cn(n,t)?{...e,children:[vp(n,t),i]}:Cn(i,t)?{...e,children:[n,vp(i,t)]}:e}function _p(e,t){if(e.type==="leaf")return e;const[n,i]=e.children;return n.type==="leaf"&&n.windowId===t||i.type==="leaf"&&i.windowId===t?{...e,split:e.split==="horizontal"?"vertical":"horizontal"}:Cn(n,t)?{...e,children:[_p(n,t),i]}:Cn(i,t)?{...e,children:[n,_p(i,t)]}:e}function Tp(e,t,n,i){return e.type==="leaf"?e.windowId!==t?e:{type:"container",split:i==="left"||i==="right"?"horizontal":"vertical",ratio:.5,children:[i==="left"||i==="top"?{type:"leaf",windowId:n}:{type:"leaf",windowId:t},i==="left"||i==="top"?{type:"leaf",windowId:t}:{type:"leaf",windowId:n}]}:Cn(e.children[0],t)?{...e,children:[Tp(e.children[0],t,n,i),e.children[1]]}:{...e,children:[e.children[0],Tp(e.children[1],t,n,i)]}}function MC(e,t,n,i){if(t===n||!Cn(e,t)||!Cn(e,n))return e;if(i==="center")return Vc(e,t,n);const s=Yc(e,t);return s?Tp(s,n,t,i):e}function Py(e,t,n){const i=e.find(h=>h.windowId===t);if(!i)return null;const s=i.x+i.width/2,l=i.y+i.height/2;let o=null,d=1/0;for(const h of e){if(h.windowId===t)continue;const f=h.x+h.width/2,m=h.y+h.height/2;let b=!1;switch(n){case"left":b=f<s;break;case"right":b=f>s;break;case"up":b=m<l;break;case"down":b=m>l;break}if(b){const x=Math.abs(f-s)+Math.abs(m-l);x<d&&(d=x,o=h.windowId)}}return o}function uu(e,t,n,i=[]){if(e.type==="leaf")return[];const{split:s,ratio:l,children:o}=e,d=[];if(s==="horizontal"){const h=t.x+Math.round(t.width*l),f=n/2;d.push({path:i,split:s,ratio:l,x:h-f,y:t.y,width:n,height:t.height});const m={...t,width:Math.round(t.width*l)-f},b={x:t.x+Math.round(t.width*l)+f,y:t.y,width:t.width-Math.round(t.width*l)-f,height:t.height};d.push(...uu(o[0],m,n,[...i,0])),d.push(...uu(o[1],b,n,[...i,1]))}else{const h=t.y+Math.round(t.height*l),f=n/2;d.push({path:i,split:s,ratio:l,x:t.x,y:h-f,width:t.width,height:n});const m={...t,height:Math.round(t.height*l)-f},b={x:t.x,y:t.y+Math.round(t.height*l)+f,width:t.width,height:t.height-Math.round(t.height*l)-f};d.push(...uu(o[0],m,n,[...i,0])),d.push(...uu(o[1],b,n,[...i,1]))}return d}function Jv(e,t,n){if(t.length===0)return e.type!=="container"?e:{...e,ratio:ou(n)};if(e.type!=="container")return e;const[i,...s]=t,l=[e.children[0],e.children[1]];return l[i]=Jv(e.children[i],s,n),{...e,children:l}}function ou(e){return Math.min(Math.max(e,.15),.85)}function LC(e){return e%2===0?"horizontal":"vertical"}const Hy=4;function DC(e){return{id:e.id,miniAppId:e.miniAppId,title:e.title,args:e.args}}function IC(e){return{id:e.id,miniAppId:e.miniAppId,title:e.title,position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!1,zIndex:1,args:e.args}}let Bc=null;function mm(e){!Bc||Bc.readyState!==WebSocket.OPEN||Bc.send(JSON.stringify(e))}function Tn(){const e=ut.getState(),t={version:2,windows:e.windows.map(DC),tree:e.tree,focusedWindowId:e.focusedWindowId,fullscreenWindowId:e.fullscreenWindowId,windowIdCounter:e.windowIdCounter,nextSplitDirection:e.nextSplitDirection};mm({type:"window:sync",...t})}function Uy(e){Bc=e}function BC(e,t){mm({type:"window:actions_changed",windowId:e,actions:t})}function f0(e,t,n){mm({type:"window:action_result",requestId:e,result:t,error:n})}function Un(e,t){return e?{rects:lu(e,t,Hy),bars:uu(e,t,Hy)}:{rects:[],bars:[]}}function fn(e,t,n,i){const s=new Map(t.map(l=>[l.windowId,l]));return e.map(l=>{const o=s.get(l.id);return{...l,focused:l.id===n,maximized:l.id===i,position:o?{x:o.x,y:o.y}:l.position,size:o?{width:o.width,height:o.height}:l.size,zIndex:l.id===i?9999:1}})}function jy(e){return e??{}}function Fy(e,t){const n=jy(e),i=jy(t),s=Object.keys(n),l=Object.keys(i);return s.length!==l.length?!1:s.every(o=>n[o]===i[o])}const ut=Hu((e,t)=>({windows:[],windowIdCounter:0,focusedWindowActions:[],windowActions:{},tree:null,focusedWindowId:null,fullscreenWindowId:null,nextSplitDirection:"auto",tileRects:[],splitBars:[],desktopBounds:{x:0,y:0,width:800,height:600},openWindow(n,i,s){const l=t(),o=l.windows.filter(S=>S.miniAppId===n&&Fy(S.args,s)).reduce((S,k)=>!S||k.id===l.focusedWindowId?k:S,void 0);if(o){const S=l.fullscreenWindowId===o.id?l.fullscreenWindowId:null,{rects:k,bars:F}=Un(l.tree,l.desktopBounds),H=fn(l.windows.map(V=>V.id===o.id&&s?{...V,args:s}:V),k,o.id,S);return e({windows:H,focusedWindowId:o.id,fullscreenWindowId:S,tileRects:k,splitBars:F,focusedWindowActions:l.windowActions[o.id]??[]}),Tn(),o.id}const d=l.windowIdCounter+1,h=`win-${d}`,f={id:h,miniAppId:n,title:i,position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!0,zIndex:1,args:s};let m=l.nextSplitDirection;if(m==="auto"&&l.tree){const S=l.focusedWindowId&&Cn(l.tree,l.focusedWindowId)?l.focusedWindowId:Ls(l.tree)[0],k=l.tileRects.find(F=>F.windowId===S);k&&(m=k.width>=k.height?"horizontal":"vertical")}let b;if(!l.tree)b={type:"leaf",windowId:h};else if(l.focusedWindowId&&Cn(l.tree,l.focusedWindowId))b=qc(l.tree,l.focusedWindowId,h,m);else{const S=Ls(l.tree);b=qc(l.tree,S[0],h,m)}const{rects:x,bars:E}=Un(b,l.desktopBounds),T=[...l.windows,f],w=fn(T,x,h,null);return e({windows:w,windowIdCounter:d,tree:b,focusedWindowId:h,fullscreenWindowId:null,tileRects:x,splitBars:E,focusedWindowActions:[]}),Tn(),h},closeWindow(n){const i=t(),s=i.windows.filter(E=>E.id!==n),{[n]:l,...o}=i.windowActions,d=i.tree?Yc(i.tree,n):null;let h=null;if(i.focusedWindowId===n){if(d){const E=Ls(d);h=E.length>0?E[0]:null}}else h=i.focusedWindowId;const f=i.fullscreenWindowId===n?null:i.fullscreenWindowId,{rects:m,bars:b}=Un(d,i.desktopBounds),x=fn(s,m,h,f);e({windows:x,tree:d,focusedWindowId:h,fullscreenWindowId:f,windowActions:o,focusedWindowActions:h?o[h]??[]:[],tileRects:m,splitBars:b}),Tn()},focusWindow(n){const i=t();if(!i.windows.find(f=>f.id===n))return;const l=i.tree??{type:"leaf",windowId:n},{rects:o,bars:d}=Un(l,i.desktopBounds),h=fn(i.windows,o,n,i.fullscreenWindowId);e({windows:h,tree:l,focusedWindowId:n,tileRects:o,splitBars:d,focusedWindowActions:i.windowActions[n]??[]}),Tn()},maximizeWindow(n){const i=t();if(!i.windows.find(f=>f.id===n))return;const l=i.fullscreenWindowId===n?null:n,{rects:o,bars:d}=Un(i.tree,i.desktopBounds),h=fn(i.windows,o,i.focusedWindowId,l);e({windows:h,fullscreenWindowId:l,tileRects:o,splitBars:d}),Tn()},moveWindow(n,i){},resizeWindow(n,i){},focusDirection(n){const i=t();if(!i.focusedWindowId||!i.tree)return;const s=i.tileRects,l=Py(s,i.focusedWindowId,n);if(!l)return;const o=fn(i.windows,s,l,i.fullscreenWindowId);e({windows:o,focusedWindowId:l,fullscreenWindowId:null,focusedWindowActions:i.windowActions[l]??[]}),Tn()},swapDirection(n){const i=t();if(!i.focusedWindowId||!i.tree)return;const s=i.tileRects,l=Py(s,i.focusedWindowId,n);if(!l)return;const o=Vc(i.tree,i.focusedWindowId,l),{rects:d,bars:h}=Un(o,i.desktopBounds),f=fn(i.windows,d,i.focusedWindowId,i.fullscreenWindowId);e({windows:f,tree:o,tileRects:d,splitBars:h}),Tn()},toggleFullscreen(){const n=t();n.focusedWindowId&&t().maximizeWindow(n.focusedWindowId)},setNextSplitDirection(n){e({nextSplitDirection:n}),Tn()},rotateFocusedSplit(){const n=t();if(!n.focusedWindowId||!n.tree)return;const i=_p(n.tree,n.focusedWindowId),{rects:s,bars:l}=Un(i,n.desktopBounds),o=fn(n.windows,s,n.focusedWindowId,n.fullscreenWindowId);e({windows:o,tree:i,tileRects:s,splitBars:l}),Tn()},adjustFocusedRatio(n){const i=t();if(!i.focusedWindowId||!i.tree)return;const s=xp(i.tree,i.focusedWindowId,n),{rects:l,bars:o}=Un(s,i.desktopBounds),d=fn(i.windows,l,i.focusedWindowId,i.fullscreenWindowId);e({windows:d,tree:s,tileRects:l,splitBars:o}),Tn()},equalizeFocusedRatio(){const n=t();if(!n.focusedWindowId||!n.tree)return;const i=vp(n.tree,n.focusedWindowId),{rects:s,bars:l}=Un(i,n.desktopBounds),o=fn(n.windows,s,n.focusedWindowId,n.fullscreenWindowId);e({windows:o,tree:i,tileRects:s,splitBars:l}),Tn()},focusNth(n){const i=t();if(!i.tree)return;const s=Ls(i.tree),l=n-1;if(l<0||l>=s.length)return;const o=s[l],d=fn(i.windows,i.tileRects,o,null);e({windows:d,focusedWindowId:o,fullscreenWindowId:null,focusedWindowActions:i.windowActions[o]??[]}),Tn()},setDesktopBounds(n){const i=t(),{rects:s,bars:l}=Un(i.tree,n),o=fn(i.windows,s,i.focusedWindowId,i.fullscreenWindowId);e({windows:o,desktopBounds:n,tileRects:s,splitBars:l})},setNodeRatio(n,i){const s=t();if(!s.tree)return;const l=Jv(s.tree,n,i),{rects:o,bars:d}=Un(l,s.desktopBounds),h=fn(s.windows,o,s.focusedWindowId,s.fullscreenWindowId);e({windows:h,tree:l,tileRects:o,splitBars:d}),Tn()},relocateWindow(n,i,s){const l=t();if(!l.tree)return;const o=MC(l.tree,n,i,s);if(o===l.tree)return;const{rects:d,bars:h}=Un(o,l.desktopBounds),f=fn(l.windows,d,n,null);e({windows:f,tree:o,focusedWindowId:n,fullscreenWindowId:null,tileRects:d,splitBars:h,focusedWindowActions:l.windowActions[n]??[]}),Tn()},setFocusedWindowActions(n){e({focusedWindowActions:n})},setWindowActions(n,i){e(s=>({windowActions:{...s.windowActions,[n]:i},focusedWindowActions:s.focusedWindowId===n?i:s.focusedWindowActions}))},getFocusedWindow(){const n=t();return n.windows.find(i=>i.id===n.focusedWindowId)},getWindowsByMiniApp(n,i){return t().windows.filter(s=>s.miniAppId===n&&Fy(s.args,i))},restoreFromBackend(n){const i=t().desktopBounds,{rects:s,bars:l}=Un(n.tree,i),o=fn(n.windows.map(IC),s,n.focusedWindowId,n.fullscreenWindowId);e({windows:o,tree:n.tree,focusedWindowId:n.focusedWindowId,fullscreenWindowId:n.fullscreenWindowId,windowIdCounter:n.windowIdCounter,nextSplitDirection:n.nextSplitDirection,tileRects:s,splitBars:l})}})),zC="_dockIcon_1xw56_1",PC="_dockIconImage_1xw56_11",$y={dockIcon:zC,dockIconImage:PC};function HC({icon:e,iconPng:t,className:n,tooltip:i}){const s=v.jsx("div",{className:[$y.dockIcon,n].filter(Boolean).join(" "),children:t?v.jsx("img",{className:$y.dockIconImage,src:t,alt:"","aria-hidden":"true"}):v.jsx("span",{children:e})});return i?v.jsx("dt-tooltip",{content:i,children:s}):s}function UC(e,t){return t?e.some(n=>{const i=n.current;return i?i.contains(t):!1}):!1}function jC(e,t,n=!0){R.useEffect(()=>{if(!n)return;function i(l){const o=l.target;UC(e,o)||t()}function s(){requestAnimationFrame(()=>{document.activeElement?.tagName==="IFRAME"&&t()})}return document.addEventListener("mousedown",i),window.addEventListener("blur",s),()=>{document.removeEventListener("mousedown",i),window.removeEventListener("blur",s)}},[n,t,e])}const FC="_panel_uttta_1",$C="_empty_uttta_18",qC="_item_uttta_25",YC="_icon_uttta_45",VC="_label_uttta_52",Wl={panel:FC,empty:$C,item:qC,icon:YC,label:VC};function GC({apps:e,isOpen:t,onClose:n,onLaunch:i,anchorRef:s}){const l=R.useRef(null),[o,d]=R.useState({top:0,left:0});return R.useLayoutEffect(()=>{if(!t||!s.current)return;function h(){const f=s.current?.getBoundingClientRect(),m=l.current?.offsetWidth??340;if(!f)return;const b=Math.min(Math.max(16,f.left),Math.max(16,window.innerWidth-m-16));d({top:f.bottom+16,left:b})}return h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0)}},[s,t]),jC([l,s],n,t),R.useEffect(()=>{if(!t)return;function h(f){f.key==="Escape"&&n()}return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[t,n]),t?Pu.createPortal(v.jsxs("div",{ref:l,className:Wl.panel,style:o,children:[e.length===0&&v.jsx("div",{className:Wl.empty,children:"No applications available"}),e.map(h=>v.jsxs("button",{className:Wl.item,onClick:()=>{i(h),n()},children:[v.jsx(HC,{icon:h.icon,iconPng:h.iconPng,className:Wl.icon}),v.jsx("span",{className:Wl.label,children:h.name})]},h.id))]}),document.body):null}const WC=R.memo(function({mode:t,size:n=14}){return v.jsxs("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"1.5"}),t==="horizontal"&&v.jsx("line",{x1:"8",y1:"3",x2:"8",y2:"13"}),t==="vertical"&&v.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8"}),t==="auto"&&v.jsxs(v.Fragment,{children:[v.jsx("line",{x1:"8",y1:"3",x2:"8",y2:"13",opacity:"0.45"}),v.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8",opacity:"0.45"}),v.jsx("text",{x:"8",y:"9",textAnchor:"middle",dominantBaseline:"central",fill:"currentColor",stroke:"none",fontSize:"5.5",fontWeight:"700",children:"A"})]})]})}),XC="_actionsBar_1otoq_2",QC="_launcherWrapper_1otoq_18",KC="_appName_1otoq_22",ZC="_appNameActive_1otoq_41",JC="_splitToggle_1otoq_47",e4="_splitToggleActive_1otoq_68",t4="_separator_1otoq_79",n4="_action_1otoq_2",r4="_glowing_1otoq_104",i4="_builtinAction_1otoq_116 _action_1otoq_2",ir={actionsBar:XC,launcherWrapper:QC,appName:KC,appNameActive:ZC,splitToggle:JC,splitToggleActive:e4,separator:t4,action:n4,glowing:r4,builtinAction:i4},h0=["auto","horizontal","vertical"],a4={auto:"Auto",horizontal:"Horizontal",vertical:"Vertical"};function s4({apps:e,onLaunch:t}){const n=ut(S=>S.focusedWindowId),i=ut(S=>S.fullscreenWindowId),s=ut(S=>S.windows.find(k=>k.id===S.focusedWindowId)),l=ut(S=>S.focusedWindowActions),o=ut(S=>S.nextSplitDirection),[d,h]=R.useState(!1),f=R.useRef(l),[m,b]=R.useState(!1),x=R.useRef(null);R.useEffect(()=>{if(l.length>0&&l!==f.current){h(!0);const S=setTimeout(()=>h(!1),1200);return f.current=l,()=>clearTimeout(S)}f.current=l},[l]);const E=R.useCallback(()=>{const S=h0.indexOf(o),k=h0[(S+1)%h0.length];ut.getState().setNextSplitDirection(k)},[o]),T=n===i&&i!==null,w=`${Gl({scope:"core",key:"split.mode",defaultText:"Split mode"})}: ${a4[o]}`;return v.jsxs("div",{className:ir.actionsBar,children:[v.jsxs("div",{className:ir.launcherWrapper,children:[v.jsx("button",{ref:x,className:`${ir.appName}${m?` ${ir.appNameActive}`:""}`,onClick:()=>b(S=>!S),children:Gl({scope:"core",key:"applications",defaultText:"Applications"})}),v.jsx(GC,{apps:e,isOpen:m,onClose:()=>b(!1),onLaunch:t,anchorRef:x})]}),v.jsx("dt-tooltip",{content:w,placement:"bottom",children:v.jsx("button",{className:`${ir.splitToggle}${o!=="auto"?` ${ir.splitToggleActive}`:""}`,onClick:E,children:v.jsx(WC,{mode:o})})}),s&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:ir.separator}),v.jsx("button",{className:ir.builtinAction,onClick:()=>ut.getState().maximizeWindow(s.id),children:Gl(T?{scope:"core",key:"window.restore",defaultText:"Restore"}:{scope:"core",key:"window.fullscreen",defaultText:"Fullscreen"})}),v.jsx("button",{className:ir.builtinAction,onClick:()=>ut.getState().closeWindow(s.id),children:Gl({scope:"core",key:"close",defaultText:"Close"})}),l.length>0&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:ir.separator}),l.map(S=>v.jsx("dt-tooltip",{content:S.description,placement:"bottom",children:v.jsx("button",{className:`${ir.action}${d?` ${ir.glowing}`:""}`,onClick:()=>S.handler(),children:S.name})},S.name))]})]})]})}const l4="_overlay_196os_1",u4="_card_196os_13",o4="_spinner_196os_27",c4="_title_196os_36",d4="_subtitle_196os_42",Xl={overlay:l4,card:u4,spinner:o4,title:c4,subtitle:d4};function f4({status:e,retryInSeconds:t}){if(e==="connected")return null;const n=e==="reconnecting"?`Reconnecting${t&&t>0?` in ${t}s`:""}...`:"Connecting...";return v.jsx("div",{className:Xl.overlay,role:"status","aria-live":"polite","aria-busy":"true",children:v.jsxs("div",{className:Xl.card,children:[v.jsx("span",{className:Xl.spinner,"aria-hidden":"true"}),v.jsx("div",{className:Xl.title,children:n}),v.jsx("div",{className:Xl.subtitle,children:"DeskTalk is waiting for the desktop bridge to be ready."})]})})}const h4="_resizer_z2l6k_1",p4="_horizontal_z2l6k_11",m4="_vertical_z2l6k_18",g4="_bar_z2l6k_25",gc={resizer:h4,horizontal:p4,vertical:m4,bar:g4};function e_({path:e,split:t,ratio:n,onRatioChange:i}){const s=R.useRef(null),l=R.useRef(null),o=R.useCallback(f=>{f.preventDefault(),f.stopPropagation();const m=f.clientX,b=f.clientY;s.current={clientX:m,clientY:b,startRatio:n};const E=l.current?.parentElement?.getBoundingClientRect();if(!E)return;const T=document.createElement("style");T.textContent="iframe { pointer-events: none !important; }",document.head.appendChild(T);const w=k=>{if(!s.current)return;const F=k.clientX-s.current.clientX,H=k.clientY-s.current.clientY;let V;t==="horizontal"?V=E.width>0?F/E.width:0:V=E.height>0?H/E.height:0;const J=s.current.startRatio+V;i?i(J):ut.getState().setNodeRatio(e,J)},S=()=>{s.current=null,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),document.body.style.cursor="",document.body.style.userSelect="",T.remove()};document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),document.body.style.cursor=t==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"},[i,e,t,n]),d=t==="horizontal",h=[gc.resizer,d?gc.horizontal:gc.vertical].filter(Boolean).join(" ");return v.jsx("div",{ref:l,className:h,onMouseDown:o,children:v.jsx("div",{className:gc.bar})})}const p0={isDragging:!1,dragWindowId:null,dropTarget:null},ai=Hu((e,t)=>({...p0,startDrag(n){e({isDragging:!0,dragWindowId:n,dropTarget:null})},updateDropTarget(n,i){const s=t();if(n===s.dragWindowId){e({dropTarget:null});return}const l=s.dropTarget;l&&l.windowId===n&&l.edge===i||e({dropTarget:{windowId:n,edge:i}})},clearDropTarget(){t().dropTarget!==null&&e({dropTarget:null})},finishDrag(){const n=t(),i=n.isDragging&&n.dragWindowId&&n.dropTarget?{sourceWindowId:n.dragWindowId,target:n.dropTarget}:null;return e(p0),i},cancelDrag(){e(p0)}})),b4="_overlay_19iyv_1",y4="_tileZone_19iyv_8",E4="_highlight_19iyv_13",m0={overlay:b4,tileZone:y4,highlight:E4};function x4(e,t,n,i){const s=i.getBoundingClientRect(),l=s.left+n.x,o=s.top+n.y,d=e-l,h=t-o,f=n.width>0?d/n.width:.5,m=n.height>0?h/n.height:.5;return m<.3?"top":m>.7?"bottom":f<.3?"left":f>.7?"right":"center"}function v4(e){switch(e){case"left":return{left:0,top:0,width:"50%",height:"100%"};case"right":return{right:0,top:0,width:"50%",height:"100%"};case"top":return{left:0,top:0,width:"100%",height:"50%"};case"bottom":return{left:0,bottom:0,width:"100%",height:"50%"};case"center":return{left:0,top:0,width:"100%",height:"100%"}}}function _4({desktopRef:e}){const t=ai(d=>d.dragWindowId),n=ai(d=>d.dropTarget),i=ut(d=>d.tileRects),s=R.useCallback((d,h)=>{const f=e.current;if(!f)return;const m=x4(d.clientX,d.clientY,h,f);ai.getState().updateDropTarget(h.windowId,m)},[e]),l=R.useCallback(()=>{ai.getState().clearDropTarget()},[]),o=i.filter(d=>d.windowId!==t);return v.jsx("div",{className:m0.overlay,children:o.map(d=>{const h=n?.windowId===d.windowId;return v.jsx("div",{className:m0.tileZone,style:{left:d.x,top:d.y,width:d.width,height:d.height},onMouseMove:f=>s(f,d),onMouseLeave:l,children:h&&n&&v.jsx("div",{className:m0.highlight,style:v4(n.edge)})},d.windowId)})})}class T4{stream=null;audioContext=null;sourceNode=null;workletNode=null;chunkHandler=null;async start(t){this.chunkHandler=t,this.stream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:{ideal:16e3},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.audioContext=new AudioContext,await this.audioContext.audioWorklet.addModule("/pcm-capture-processor.js"),this.sourceNode=this.audioContext.createMediaStreamSource(this.stream),this.workletNode=new AudioWorkletNode(this.audioContext,"pcm-capture-processor"),this.workletNode.port.onmessage=i=>{this.chunkHandler&&i.data&&this.chunkHandler(i.data)},this.sourceNode.connect(this.workletNode);const n=this.audioContext.createGain();n.gain.value=0,this.workletNode.connect(n),n.connect(this.audioContext.destination),console.log(`[mic] Started capture at ${this.audioContext.sampleRate}Hz, resampling to 16kHz in worklet`)}stop(){if(this.workletNode&&(this.workletNode.disconnect(),this.workletNode.port.onmessage=null,this.workletNode=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.stream){for(const t of this.stream.getTracks())t.stop();this.stream=null}this.chunkHandler=null,console.log("[mic] Stopped capture")}isActive(){return this.stream!==null&&this.audioContext!==null}}class A4{ws=null;eventHandler=null;sessionId=null;connect(){return new Promise((t,n)=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){t();return}const s=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws/voice`,l=new WebSocket(s);l.binaryType="arraybuffer",l.addEventListener("open",()=>{this.ws=l,console.log("[voice-ws] Connected"),t()}),l.addEventListener("message",o=>{if(typeof o.data=="string")try{const d=JSON.parse(o.data);this.eventHandler?.(d)}catch{}}),l.addEventListener("close",()=>{console.log("[voice-ws] Disconnected"),this.ws=null}),l.addEventListener("error",o=>{console.error("[voice-ws] Error:",o),n(new Error("Voice WebSocket connection failed"))})})}onEvent(t){this.eventHandler=t}startSession(t,n=16e3,i){this.sessionId=t,this.sendControl({type:"session.start",sessionId:t,format:"pcm_s16le",sampleRate:n,channels:1,...i?{language:i}:{}})}endSession(){this.sessionId&&(this.sendControl({type:"session.end",sessionId:this.sessionId}),this.sessionId=null)}sendAudioChunk(t){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(t)}sendControl(t){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(t))}disconnect(){this.ws&&(this.ws.close(),this.ws=null),this.sessionId=null}isConnected(){return this.ws!==null&&this.ws.readyState===WebSocket.OPEN}}let pu=null,Rr=null;function S4(){return`vs-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}const Or=Hu((e,t)=>({status:"idle",errorMessage:null,partialText:"",transcripts:[],sessionId:null,async startVoice(){const n=t();if(!(n.status!=="idle"&&n.status!=="error")){e({status:"connecting",errorMessage:null,partialText:""});try{Rr=new A4,Rr.onEvent(s=>{w4(s,e,t)}),await Rr.connect();const i=S4();Rr.startSession(i,16e3),e({sessionId:i}),await k4(Rr,i),pu=new T4,await pu.start(s=>{Rr?.sendAudioChunk(s)}),e({status:"listening"})}catch(i){const s=i instanceof DOMException&&i.name==="NotAllowedError"?"Microphone permission denied. Please allow microphone access.":i.message;e({status:"error",errorMessage:s}),qy()}}},stopVoice(){t().status!=="idle"&&(qy(),e({status:"idle",partialText:"",sessionId:null}))},clearTranscripts(){e({transcripts:[],partialText:""})}}));function w4(e,t,n){switch(e.type){case"speech.start":t({status:"speaking",partialText:""});break;case"transcript.partial":t({partialText:e.text??""});break;case"transcript.final":if(e.text&&e.utteranceId){const i=n();t({transcripts:[...i.transcripts,{utteranceId:e.utteranceId,text:e.text,isFinal:!0,timestamp:Date.now()}],partialText:"",status:"listening"})}break;case"speech.end":t({status:"listening",partialText:""});break;case"error":t({status:"error",errorMessage:e.message??`Error: ${e.code??"unknown"}`});break}}function k4(e,t){return new Promise((n,i)=>{const s=setTimeout(()=>{i(new Error("Voice session start timed out"))},5e3),l=e.eventHandler;e.onEvent(o=>{l?.(o),o.type==="session.ready"&&o.sessionId===t?(clearTimeout(s),e.onEvent(l??(()=>{})),n()):o.type==="error"&&o.sessionId===t&&(clearTimeout(s),e.onEvent(l??(()=>{})),i(new Error(o.message??"Session start failed")))})})}function qy(){pu&&(pu.stop(),pu=null),Rr&&(Rr.endSession(),Rr.disconnect(),Rr=null)}const or=Tt.create({withCredentials:!0});function t_(e,t){return Tt.isAxiosError(e)?e.response?.data?.error??e.message??t:e instanceof Error&&e.message?e.message:t}function Yy(e,t){const n=t.find(i=>i.id===e);return!n||!n.model?"not configured":`${n.id}/${n.model}`}const it=Hu((e,t)=>({messages:[],draftInput:"",isAiRunning:!1,activeRequestId:null,modelLabel:"not configured",tokenCount:0,providerOptions:[],selectedProvider:"",currentSessionId:null,sessions:[],async loadProviders(){try{const{data:n}=await or.get("/api/ai/providers");e({providerOptions:n.providers,selectedProvider:n.defaultProvider,modelLabel:Yy(n.defaultProvider,n.providers)})}catch{e({providerOptions:[],selectedProvider:"",modelLabel:"not configured"})}},loadSessions(n){return n.readyState!==WebSocket.OPEN?!1:(n.send(JSON.stringify({type:"ai:sessions:list"})),!0)},switchSession(n,i){const s=t();return!n||i.readyState!==WebSocket.OPEN||s.isAiRunning||s.currentSessionId===n?!1:(e({messages:[],isAiRunning:!1,tokenCount:0,activeRequestId:null,currentSessionId:n}),i.send(JSON.stringify({type:"ai:sessions:switch",sessionId:n})),!0)},createSession(n){const i=t();return n.readyState!==WebSocket.OPEN||i.isAiRunning?!1:(e({messages:[],isAiRunning:!1,tokenCount:0,activeRequestId:null,currentSessionId:null}),n.send(JSON.stringify({type:"ai:sessions:create"})),!0)},cancelAiRequest(n){const i=t();return n.readyState!==WebSocket.OPEN||!i.isAiRunning||!i.activeRequestId?!1:(n.send(JSON.stringify({type:"ai:cancel",requestId:i.activeRequestId})),!0)},submitPrompt(n,i="text",s){const l=t();if(!n||s.readyState!==WebSocket.OPEN||l.isAiRunning)return!1;const o=`ai-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return e(d=>({messages:[...d.messages,{id:`user-${o}`,role:"user",content:n,source:i},{id:`assistant-${o}`,role:"assistant",content:""}],isAiRunning:!0,activeRequestId:o,tokenCount:0})),s.send(JSON.stringify({type:"ai:prompt",requestId:o,text:n,source:i})),!0},setDraftInput(n){e({draftInput:n})},clearDraftInput(){e({draftInput:""})},handleAiEvent(n){const i=t();if(n.type==="sessions_sync"){e(s=>({sessions:n.sessions??s.sessions,currentSessionId:n.sessionId??s.currentSessionId}));return}if(n.type==="history_sync"){e(s=>({messages:n.messages??[],currentSessionId:n.sessionId??s.currentSessionId}));return}if(!(i.activeRequestId&&n.requestId!==i.activeRequestId))if(n.type==="message_start")e({isAiRunning:!0,modelLabel:n.model?`${n.provider}/${n.model}`:"not configured"});else if(n.type==="message_update")e(s=>{const l=[...s.messages],o=l.length-1;return o>=0&&l[o].role==="assistant"&&!l[o].toolCall&&(l[o]={...l[o],content:n.text??""}),{messages:l}});else if(n.type==="thinking_update")e(s=>{const l=[...s.messages],o=l.length-1;return o>=0&&l[o].role==="assistant"&&!l[o].toolCall&&(l[o]={...l[o],thinkingContent:n.thinkingText??""}),{messages:l}});else if(n.type==="tool_call")e(s=>{const l=[...s.messages],o=i.activeRequestId,d=o?`assistant-${o}`:null,h={id:`tool-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:"assistant",content:"",toolCall:n.toolCall};if(d){const f=l.findIndex(m=>m.id===d);if(f>=0)return l.splice(f,0,h),{messages:l}}return l.push(h),{messages:l}});else if(n.type==="message_end"){const s=i.activeRequestId,l=i.providerOptions,o=i.selectedProvider,d="[Cancelled]";e(h=>{let f=h.messages;if(s){const m=`assistant-${s}`,b=f.findIndex(x=>x.id===m);if(b>=0){const x=f[b];if(n.cancelled){const E=x.content.trim()?`${x.content.replace(/\s+$/u,"")}
15
+
16
+ ${d}`:d;f=[...f.slice(0,b),{...x,content:x.cancelled?x.content:E,cancelled:!0},...f.slice(b+1)]}else!x.content&&!x.thinkingContent&&(f=[...f.slice(0,b),...f.slice(b+1)])}}return{messages:f,isAiRunning:!1,activeRequestId:null,tokenCount:n.usage?.totalTokens??0,modelLabel:o?Yy(o,l):h.modelLabel}})}else n.type==="error"&&e(s=>{const l=[...s.messages],o=l.length-1;return o>=0&&l[o].role==="assistant"?l[o]={...l[o],content:n.message??"AI request failed."}:l.push({id:`assistant-error-${Date.now()}`,role:"assistant",content:n.message??"AI request failed."}),{messages:l,isAiRunning:!1,activeRequestId:null}})},clearMessages(){e({messages:[],tokenCount:0})},addSystemMessage(n){e(i=>({messages:[...i.messages,{id:`system-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:"assistant",content:n}]}))}})),hd=[{name:"new",description:"Create a new AI session",execute(e){return e.createSession(e.socket)}},{name:"clear",description:"Clear the current message history (client-side only)",execute(e){return e.clearMessages(),!0}},{name:"title",description:"Rename the current AI session",execute(e,t){const n=t.trim();return n?(e.socket.send(JSON.stringify({type:"ai:sessions:rename",title:n})),!0):(e.addSystemMessage("Usage: /title <new session title>"),!0)}},{name:"help",description:"Show available slash commands",execute(e){const t=hd.map(n=>` /${n.name} — ${n.description}`);return e.addSystemMessage(`Available commands:
17
+ `+t.join(`
18
+ `)),!0}}];function C4(e,t){const n=e.trim();if(!n.startsWith("/"))return!1;const i=n.indexOf(" "),s=(i===-1?n.slice(1):n.slice(1,i)).toLowerCase(),l=i===-1?"":n.slice(i+1).trim(),o=hd.find(d=>d.name===s);return o?o.execute(t,l):(t.addSystemMessage(`Unknown command: /${s}. Type /help for available commands.`),!0)}function N4(e){const t=e.toLowerCase();return hd.filter(n=>n.name.startsWith(t))}function R4(){return hd}const O4="modulepreload",M4=function(e){return"/"+e},Vy={},ri=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let h=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),d=o?.nonce||o?.getAttribute("nonce");s=h(n.map(f=>{if(f=M4(f),f in Vy)return;Vy[f]=!0;const m=f.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${b}`))return;const x=document.createElement("link");if(x.rel=m?"stylesheet":O4,m||(x.as="script"),x.crossOrigin="",x.href=f,d&&x.setAttribute("nonce",d),document.head.appendChild(x),m)return new Promise((E,T)=>{x.addEventListener("load",E),x.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(o){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=o,window.dispatchEvent(d),!d.defaultPrevented)throw o}return s.then(o=>{for(const d of o||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},pd=(function(e){if(e==null)return B4;if(typeof e=="function")return md(e);if(typeof e=="object")return Array.isArray(e)?L4(e):D4(e);if(typeof e=="string")return I4(e);throw new Error("Expected function, string, or object as test")});function L4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pd(e[n]);return md(i);function i(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function D4(e){const t=e;return md(n);function n(i){const s=i;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function I4(e){return md(t);function t(n){return n&&n.type===e}}function md(e){return t;function t(n,i,s){return!!(z4(n)&&e.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function B4(){return!0}function z4(e){return e!==null&&typeof e=="object"&&"type"in e}const n_=[],cu=!0,Ap=!1,Ds="skip";function gm(e,t,n,i){let s;typeof t=="function"&&typeof n!="function"?(i=n,n=t):s=t;const l=pd(s),o=i?-1:1;d(e,void 0,[])();function d(h,f,m){const b=h&&typeof h=="object"?h:{};if(typeof b.type=="string"){const E=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(h.type+(E?"<"+E+">":""))+")"})}return x;function x(){let E=n_,T,w,S;if((!t||l(h,f,m[m.length-1]||void 0))&&(E=P4(n(h,m)),E[0]===Ap))return E;if("children"in h&&h.children){const k=h;if(k.children&&E[0]!==Ds)for(w=(i?k.children.length:-1)+o,S=m.concat(k);w>-1&&w<k.children.length;){const F=k.children[w];if(T=d(F,w,S)(),T[0]===Ap)return T;w=typeof T[1]=="number"?T[1]:w+o}}return E}}}function P4(e){return Array.isArray(e)?e:typeof e=="number"?[cu,e]:e==null?n_:[e]}function Dr(e,t,n,i){let s,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,s=n):(l=t,o=n,s=i),gm(e,l,d,s);function d(h,f){const m=f[f.length-1],b=m?m.children.indexOf(h):void 0;return o(h,b,m)}}const Us={indicator:"indicator",textOnly:"text-only",remove:"remove"};function H4({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:i=!1,allowedProtocols:s=[],blockedImageClass:l="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:d=Us.indicator,imageBlockPolicy:h=Us.indicator}){const f=t.length&&!t.every(b=>b==="*"),m=n.length&&!n.every(b=>b==="*");if(!e&&(f||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return b=>{const x=Y4(e,t,n,i,s,l,o,d,h);r_(b),Dr(b,x)}}function Gy(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function U4(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const j4=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),F4=new Set(["javascript:","data:","file:","vbscript:"]);function Wy(e,t,n,i=!1,s=!1,l=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&i&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const o=Gy(e,n);if(!o||F4.has(o.protocol)||!(j4.has(o.protocol)||l.includes(o.protocol)||l.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const h=U4(e);return o&&t.some(f=>{const m=Gy(f,n);return!m||m.origin!==o.origin?!1:o.href.startsWith(m.href)})?h?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:h?o.pathname+o.search+o.hash:o.href:null}function r_(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)r_(t)}}const g0=Symbol("node-seen");function $4(e,t,n){return t===Us.remove?{type:"remove"}:t===Us.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function q4(e,t,n){if(t===Us.remove)return{type:"remove"};if(t===Us.textOnly){const i=String(e.properties.alt||"");return i?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:i}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const Y4=(e,t,n,i,s,l,o,d,h)=>{const f=(m,b,x)=>{if(m.type!=="element"||m[g0])return cu;if(m.tagName==="a"){const E=Wy(m.properties.href,t,e,!1,!1,s);if(E===null){if(m[g0]=!0,Dr(m,f),x&&typeof b=="number"){const T=$4(m,d,o);if(T.type==="remove")return x.children.splice(b,1),[Ds,b];x.children[b]=T.element}return Ds}else return m.properties.href=E,m.properties.target="_blank",m.properties.rel="noopener noreferrer",cu}if(m.tagName==="img"){const E=Wy(m.properties.src,n,e,i,!0,s);if(E===null){if(m[g0]=!0,Dr(m,f),x&&typeof b=="number"){const T=q4(m,h,l);if(T.type==="remove")return x.children.splice(b,1),[Ds,b];x.children[b]=T.element}return Ds}else return m.properties.src=E,cu}return cu};return f},i_=-1,gd=0,mu=1,Gc=2,bm=3,ym=4,Em=5,xm=6,a_=7,s_=8,Xy=typeof self=="object"?self:globalThis,V4=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),i=s=>{if(e.has(s))return e.get(s);const[l,o]=t[s];switch(l){case gd:case i_:return n(o,s);case mu:{const d=n([],s);for(const h of o)d.push(i(h));return d}case Gc:{const d=n({},s);for(const[h,f]of o)d[i(h)]=i(f);return d}case bm:return n(new Date(o),s);case ym:{const{source:d,flags:h}=o;return n(new RegExp(d,h),s)}case Em:{const d=n(new Map,s);for(const[h,f]of o)d.set(i(h),i(f));return d}case xm:{const d=n(new Set,s);for(const h of o)d.add(i(h));return d}case a_:{const{name:d,message:h}=o;return n(new Xy[d](h),s)}case s_:return n(BigInt(o),s);case"BigInt":return n(Object(BigInt(o)),s);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:d}=new Uint8Array(o);return n(new DataView(d),o)}}return n(new Xy[l](o),s)};return i},Qy=e=>V4(new Map,e)(0),Ss="",{toString:G4}={},{keys:W4}=Object,Ql=e=>{const t=typeof e;if(t!=="object"||!e)return[gd,t];const n=G4.call(e).slice(8,-1);switch(n){case"Array":return[mu,Ss];case"Object":return[Gc,Ss];case"Date":return[bm,Ss];case"RegExp":return[ym,Ss];case"Map":return[Em,Ss];case"Set":return[xm,Ss];case"DataView":return[mu,n]}return n.includes("Array")?[mu,n]:n.includes("Error")?[a_,n]:[Gc,n]},bc=([e,t])=>e===gd&&(t==="function"||t==="symbol"),X4=(e,t,n,i)=>{const s=(o,d)=>{const h=i.push(o)-1;return n.set(d,h),h},l=o=>{if(n.has(o))return n.get(o);let[d,h]=Ql(o);switch(d){case gd:{let m=o;switch(h){case"bigint":d=s_,m=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return s([i_],o)}return s([d,m],o)}case mu:{if(h){let x=o;return h==="DataView"?x=new Uint8Array(o.buffer):h==="ArrayBuffer"&&(x=new Uint8Array(o)),s([h,[...x]],o)}const m=[],b=s([d,m],o);for(const x of o)m.push(l(x));return b}case Gc:{if(h)switch(h){case"BigInt":return s([h,o.toString()],o);case"Boolean":case"Number":case"String":return s([h,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const m=[],b=s([d,m],o);for(const x of W4(o))(e||!bc(Ql(o[x])))&&m.push([l(x),l(o[x])]);return b}case bm:return s([d,o.toISOString()],o);case ym:{const{source:m,flags:b}=o;return s([d,{source:m,flags:b}],o)}case Em:{const m=[],b=s([d,m],o);for(const[x,E]of o)(e||!(bc(Ql(x))||bc(Ql(E))))&&m.push([l(x),l(E)]);return b}case xm:{const m=[],b=s([d,m],o);for(const x of o)(e||!bc(Ql(x)))&&m.push(l(x));return b}}const{message:f}=o;return s([d,{name:h,message:f}],o)};return l},Ky=(e,{json:t,lossy:n}={})=>{const i=[];return X4(!(t||n),!!t,new Map,i)(e),i},Oa=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qy(Ky(e,t)):structuredClone(e):(e,t)=>Qy(Ky(e,t));class Uu{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Uu.prototype.normal={};Uu.prototype.property={};Uu.prototype.space=void 0;function l_(e,t){const n={},i={};for(const s of e)Object.assign(n,s.property),Object.assign(i,s.normal);return new Uu(n,i,t)}function wu(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let Q4=0;const He=Da(),It=Da(),Sp=Da(),me=Da(),yt=Da(),Bs=Da(),$n=Da();function Da(){return 2**++Q4}const wp=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:It,commaOrSpaceSeparated:$n,commaSeparated:Bs,number:me,overloadedBoolean:Sp,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),b0=Object.keys(wp);class vm extends Rn{constructor(t,n,i,s){let l=-1;if(super(t,n),Zy(this,"space",s),typeof i=="number")for(;++l<b0.length;){const o=b0[l];Zy(this,b0[l],(i&wp[o])===wp[o])}}}vm.prototype.defined=!0;function Zy(e,t,n){n&&(e[t]=n)}function Ys(e){const t={},n={};for(const[i,s]of Object.entries(e.properties)){const l=new vm(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[wu(i)]=i,n[wu(l.attribute)]=i}return new Uu(t,n,e.space)}const u_=Ys({properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:It,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:yt,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:me,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:yt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:It,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function o_(e,t){return t in e?e[t]:t}function c_(e,t){return o_(e,t.toLowerCase())}const K4=Ys({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bs,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:yt,autoFocus:He,autoPlay:He,blocking:yt,capture:null,charSet:null,checked:He,cite:null,className:yt,cols:me,colSpan:null,content:null,contentEditable:It,controls:He,controlsList:yt,coords:me|Bs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:Sp,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:yt,height:me,hidden:Sp,high:me,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:yt,itemRef:yt,itemScope:He,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:He,optimum:me,pattern:null,ping:yt,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:yt,required:He,reversed:He,rows:me,rowSpan:me,sandbox:yt,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:It,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:c_}),Z4=Ys({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$n,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Bs,g2:Bs,glyphName:Bs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:o_}),d_=Ys({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),f_=Ys({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:c_}),h_=Ys({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),J4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},e5=/[A-Z]/g,Jy=/-[a-z]/g,t5=/^data[-\w.:]+$/i;function bd(e,t){const n=wu(t);let i=t,s=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&t5.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Jy,r5);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Jy.test(l)){let o=l.replace(e5,n5);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}s=vm}return new s(i,t)}function n5(e){return"-"+e.toLowerCase()}function r5(e){return e.charAt(1).toUpperCase()}const ju=l_([u_,K4,d_,f_,h_],"html"),Qi=l_([u_,Z4,d_,f_,h_],"svg");function eE(e){const t=[],n=String(e||"");let i=n.indexOf(","),s=0,l=!1;for(;!l;){i===-1&&(i=n.length,l=!0);const o=n.slice(s,i).trim();(o||!l)&&t.push(o),s=i+1,i=n.indexOf(",",s)}return t}function p_(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const tE=/[#.]/g;function i5(e,t){const n=e||"",i={};let s=0,l,o;for(;s<n.length;){tE.lastIndex=s;const d=tE.exec(n),h=n.slice(s,d?d.index:n.length);h&&(l?l==="#"?i.id=h:Array.isArray(i.className)?i.className.push(h):i.className=[h]:o=h,s+=h.length),d&&(l=d[0],s++)}return{type:"element",tagName:o||t||"div",properties:i,children:[]}}function nE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function m_(e){return e.join(" ").trim()}function g_(e,t,n){const i=n?u5(n):void 0;function s(l,o,...d){let h;if(l==null){h={type:"root",children:[]};const f=o;d.unshift(f)}else{h=i5(l,t);const f=h.tagName.toLowerCase(),m=i?i.get(f):void 0;if(h.tagName=m||f,a5(o))d.unshift(o);else for(const[b,x]of Object.entries(o))s5(e,h.properties,b,x)}for(const f of d)kp(h.children,f);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return s}function a5(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const i of n){const s=t[i];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const l=s;for(const o of l)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function s5(e,t,n,i){const s=bd(e,n);let l;if(i!=null){if(typeof i=="number"){if(Number.isNaN(i))return;l=i}else typeof i=="boolean"?l=i:typeof i=="string"?s.spaceSeparated?l=nE(i):s.commaSeparated?l=eE(i):s.commaOrSpaceSeparated?l=nE(eE(i).join(" ")):l=rE(s,s.property,i):Array.isArray(i)?l=[...i]:l=s.property==="style"?l5(i):String(i);if(Array.isArray(l)){const o=[];for(const d of l)o.push(rE(s,s.property,d));l=o}s.property==="className"&&Array.isArray(t.className)&&(l=t.className.concat(l)),t[s.property]=l}}function kp(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)kp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?kp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function rE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||wu(n)===wu(t)))return!0}return n}function l5(e){const t=[];for(const[n,i]of Object.entries(e))t.push([n,i].join(": "));return t.join("; ")}function u5(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const o5=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],c5=g_(ju,"div"),d5=g_(Qi,"g",o5);function f5(e){const t=String(e),n=[];return{toOffset:s,toPoint:i};function i(l){if(typeof l=="number"&&l>-1&&l<=t.length){let o=0;for(;;){let d=n[o];if(d===void 0){const h=iE(t,n[o-1]);d=h===-1?t.length+1:h+1,n[o]=d}if(d>l)return{line:o+1,column:l-(o>0?n[o-1]:0)+1,offset:l};o++}}}function s(l){if(l&&typeof l.line=="number"&&typeof l.column=="number"&&!Number.isNaN(l.line)&&!Number.isNaN(l.column)){for(;n.length<l.line;){const d=n[n.length-1],h=iE(t,d),f=h===-1?t.length+1:h+1;if(d===f)break;n.push(f)}const o=(l.line>1?n[l.line-2]:0)+l.column-1;if(o<n[l.line-1])return o}}}function iE(e,t){const n=e.indexOf("\r",t),i=e.indexOf(`
19
+ `,t);return i===-1?n:n===-1||n+1===i?i:n<i?n:i}const Sa={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},b_={}.hasOwnProperty,h5=Object.prototype;function p5(e,t){const n=t||{};return _m({file:n.file||void 0,location:!1,schema:n.space==="svg"?Qi:ju,verbose:n.verbose||!1},e)}function _m(e,t){let n;switch(t.nodeName){case"#comment":{const i=t;return n={type:"comment",value:i.data},zc(e,i,n),n}case"#document":case"#document-fragment":{const i=t,s="mode"in i?i.mode==="quirks"||i.mode==="limited-quirks":!1;if(n={type:"root",children:y_(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const l=String(e.file),o=f5(l),d=o.toPoint(0),h=o.toPoint(l.length);n.position={start:d,end:h}}return n}case"#documentType":{const i=t;return n={type:"doctype"},zc(e,i,n),n}case"#text":{const i=t;return n={type:"text",value:i.value},zc(e,i,n),n}default:return n=m5(e,t),n}}function y_(e,t){let n=-1;const i=[];for(;++n<t.length;){const s=_m(e,t[n]);i.push(s)}return i}function m5(e,t){const n=e.schema;e.schema=t.namespaceURI===Sa.svg?Qi:ju;let i=-1;const s={};for(;++i<t.attrs.length;){const d=t.attrs[i],h=(d.prefix?d.prefix+":":"")+d.name;b_.call(h5,h)||(s[h]=d.value)}const o=(e.schema.space==="svg"?d5:c5)(t.tagName,s,y_(e,t.childNodes));if(zc(e,t,o),o.tagName==="template"){const d=t,h=d.sourceCodeLocation,f=h&&h.startTag&&Is(h.startTag),m=h&&h.endTag&&Is(h.endTag),b=_m(e,d.content);f&&m&&e.file&&(b.position={start:f.end,end:m.start}),o.content=b}return e.schema=n,o}function zc(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const i=g5(e,n,t.sourceCodeLocation);i&&(e.location=!0,n.position=i)}}function g5(e,t,n){const i=Is(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(i&&!n.endTag&&s&&s.position&&s.position.end&&(i.end=Object.assign({},s.position.end)),e.verbose){const l={};let o;if(n.attrs)for(o in n.attrs)b_.call(n.attrs,o)&&(l[bd(e.schema,o).property]=Is(n.attrs[o]));n.startTag;const d=Is(n.startTag),h=n.endTag?Is(n.endTag):void 0,f={opening:d};h&&(f.closing=h),f.properties=l,t.data={position:f}}}return i}function Is(e){const t=aE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=aE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function aE(e){return e.line&&e.column?e:void 0}const sE={}.hasOwnProperty;function E_(e,t){const n=t||{};function i(s,...l){let o=i.invalid;const d=i.handlers;if(s&&sE.call(s,e)){const h=String(s[e]);o=sE.call(d,h)?d[h]:i.unknown}if(o)return o.call(this,s,...l)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const b5={},y5={}.hasOwnProperty,x_=E_("type",{handlers:{root:x5,element:S5,text:T5,comment:A5,doctype:_5}});function E5(e,t){const i=(t||b5).space;return x_(e,i==="svg"?Qi:ju)}function x5(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Tm(e.children,n,t),Vs(e,n),n}function v5(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Tm(e.children,n,t),Vs(e,n),n}function _5(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Vs(e,t),t}function T5(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Vs(e,t),t}function A5(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Vs(e,t),t}function S5(e,t){const n=t;let i=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Qi);const s=[];let l;if(e.properties){for(l in e.properties)if(l!=="children"&&y5.call(e.properties,l)){const h=w5(i,l,e.properties[l]);h&&s.push(h)}}const o=i.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Sa[o],childNodes:[],parentNode:null};return d.childNodes=Tm(e.children,d,i),Vs(e,d),e.tagName==="template"&&e.content&&(d.content=v5(e.content,i)),d}function w5(e,t,n){const i=bd(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&i.boolean)return;Array.isArray(n)&&(n=i.commaSeparated?p_(n):m_(n));const s={name:i.attribute,value:n===!0?"":String(n)};if(i.space&&i.space!=="html"&&i.space!=="svg"){const l=s.name.indexOf(":");l<0?s.prefix="":(s.name=s.name.slice(l+1),s.prefix=i.attribute.slice(0,l)),s.namespace=Sa[i.space]}return s}function Tm(e,t,n){let i=-1;const s=[];if(e)for(;++i<e.length;){const l=x_(e[i],n);l.parentNode=t,s.push(l)}return s}function Vs(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const k5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],C5=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),_t="�";var N;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));const An={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function v_(e){return e>=55296&&e<=57343}function N5(e){return e>=56320&&e<=57343}function R5(e,t){return(e-55296)*1024+9216+t}function __(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function T_(e){return e>=64976&&e<=65007||C5.has(e)}var re;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(re||(re={}));const O5=65536;class M5{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=O5,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:i,col:s,offset:l}=this,o=s+n,d=l+n;return{code:t,startLine:i,endLine:i,startCol:o,endCol:o,startOffset:d,endOffset:d}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(N5(n))return this.pos++,this._addGap(),R5(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(re.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const i=this.html.charCodeAt(n);return i===N.CARRIAGE_RETURN?N.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,v_(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){__(t)?this._err(re.controlCharacterInInputStream):T_(t)&&this._err(re.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Fe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Fe||(Fe={}));function A_(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const L5=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),D5=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function I5(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=D5.get(e))!==null&&t!==void 0?t:e}var Vt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Vt||(Vt={}));const B5=32;var qi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qi||(qi={}));function Cp(e){return e>=Vt.ZERO&&e<=Vt.NINE}function z5(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_F||e>=Vt.LOWER_A&&e<=Vt.LOWER_F}function P5(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_Z||e>=Vt.LOWER_A&&e<=Vt.LOWER_Z||Cp(e)}function H5(e){return e===Vt.EQUALS||P5(e)}var qt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(qt||(qt={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class U5{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qt.EntityStart:return t.charCodeAt(n)===Vt.NUM?(this.state=qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qt.NamedEntity,this.stateNamedEntity(t,n));case qt.NumericStart:return this.stateNumericStart(t,n);case qt.NumericDecimal:return this.stateNumericDecimal(t,n);case qt.NumericHex:return this.stateNumericHex(t,n);case qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|B5)===Vt.LOWER_X?(this.state=qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,s){if(n!==i){const l=i-n;this.result=this.result*Math.pow(s,l)+Number.parseInt(t.substr(n,l),s),this.consumed+=l}}stateNumericHex(t,n){const i=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Cp(s)||z5(s))n+=1;else return this.addToNumericResult(t,i,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,i,n,16),-1}stateNumericDecimal(t,n){const i=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Cp(s))n+=1;else return this.addToNumericResult(t,i,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,i,n,10),-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Vt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(I5(this.result),this.consumed),this.errors&&(t!==Vt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:i}=this;let s=i[this.treeIndex],l=(s&qi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=j5(i,s,this.treeIndex+Math.max(1,l),o),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(l===0||H5(o))?0:this.emitNotTerminatedNamedEntity();if(s=i[this.treeIndex],l=(s&qi.VALUE_LENGTH)>>14,l!==0){if(o===Vt.SEMI)return this.emitNamedEntityData(this.treeIndex,l,this.consumed+this.excess);this.decodeMode!==ii.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:i}=this,s=(i[n]&qi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~qi.VALUE_LENGTH:s[t+1],i),n===3&&this.emitCodePoint(s[t+2],i),i}end(){var t;switch(this.state){case qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qt.NumericDecimal:return this.emitNumericEntity(0,2);case qt.NumericHex:return this.emitNumericEntity(0,3);case qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qt.EntityStart:return 0}}}function j5(e,t,n,i){const s=(t&qi.BRANCH_LENGTH)>>7,l=t&qi.JUMP_TABLE;if(s===0)return l!==0&&i===l?n:-1;if(l){const h=i-l;return h<0||h>=s?-1:e[n+h]-1}let o=n,d=o+s-1;for(;o<=d;){const h=o+d>>>1,f=e[h];if(f<i)o=h+1;else if(f>i)d=h-1;else return e[h+s]}return-1}var de;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(de||(de={}));var Ca;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ca||(Ca={}));var sr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(sr||(sr={}));var G;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(G||(G={}));var y;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(y||(y={}));const F5=new Map([[G.A,y.A],[G.ADDRESS,y.ADDRESS],[G.ANNOTATION_XML,y.ANNOTATION_XML],[G.APPLET,y.APPLET],[G.AREA,y.AREA],[G.ARTICLE,y.ARTICLE],[G.ASIDE,y.ASIDE],[G.B,y.B],[G.BASE,y.BASE],[G.BASEFONT,y.BASEFONT],[G.BGSOUND,y.BGSOUND],[G.BIG,y.BIG],[G.BLOCKQUOTE,y.BLOCKQUOTE],[G.BODY,y.BODY],[G.BR,y.BR],[G.BUTTON,y.BUTTON],[G.CAPTION,y.CAPTION],[G.CENTER,y.CENTER],[G.CODE,y.CODE],[G.COL,y.COL],[G.COLGROUP,y.COLGROUP],[G.DD,y.DD],[G.DESC,y.DESC],[G.DETAILS,y.DETAILS],[G.DIALOG,y.DIALOG],[G.DIR,y.DIR],[G.DIV,y.DIV],[G.DL,y.DL],[G.DT,y.DT],[G.EM,y.EM],[G.EMBED,y.EMBED],[G.FIELDSET,y.FIELDSET],[G.FIGCAPTION,y.FIGCAPTION],[G.FIGURE,y.FIGURE],[G.FONT,y.FONT],[G.FOOTER,y.FOOTER],[G.FOREIGN_OBJECT,y.FOREIGN_OBJECT],[G.FORM,y.FORM],[G.FRAME,y.FRAME],[G.FRAMESET,y.FRAMESET],[G.H1,y.H1],[G.H2,y.H2],[G.H3,y.H3],[G.H4,y.H4],[G.H5,y.H5],[G.H6,y.H6],[G.HEAD,y.HEAD],[G.HEADER,y.HEADER],[G.HGROUP,y.HGROUP],[G.HR,y.HR],[G.HTML,y.HTML],[G.I,y.I],[G.IMG,y.IMG],[G.IMAGE,y.IMAGE],[G.INPUT,y.INPUT],[G.IFRAME,y.IFRAME],[G.KEYGEN,y.KEYGEN],[G.LABEL,y.LABEL],[G.LI,y.LI],[G.LINK,y.LINK],[G.LISTING,y.LISTING],[G.MAIN,y.MAIN],[G.MALIGNMARK,y.MALIGNMARK],[G.MARQUEE,y.MARQUEE],[G.MATH,y.MATH],[G.MENU,y.MENU],[G.META,y.META],[G.MGLYPH,y.MGLYPH],[G.MI,y.MI],[G.MO,y.MO],[G.MN,y.MN],[G.MS,y.MS],[G.MTEXT,y.MTEXT],[G.NAV,y.NAV],[G.NOBR,y.NOBR],[G.NOFRAMES,y.NOFRAMES],[G.NOEMBED,y.NOEMBED],[G.NOSCRIPT,y.NOSCRIPT],[G.OBJECT,y.OBJECT],[G.OL,y.OL],[G.OPTGROUP,y.OPTGROUP],[G.OPTION,y.OPTION],[G.P,y.P],[G.PARAM,y.PARAM],[G.PLAINTEXT,y.PLAINTEXT],[G.PRE,y.PRE],[G.RB,y.RB],[G.RP,y.RP],[G.RT,y.RT],[G.RTC,y.RTC],[G.RUBY,y.RUBY],[G.S,y.S],[G.SCRIPT,y.SCRIPT],[G.SEARCH,y.SEARCH],[G.SECTION,y.SECTION],[G.SELECT,y.SELECT],[G.SOURCE,y.SOURCE],[G.SMALL,y.SMALL],[G.SPAN,y.SPAN],[G.STRIKE,y.STRIKE],[G.STRONG,y.STRONG],[G.STYLE,y.STYLE],[G.SUB,y.SUB],[G.SUMMARY,y.SUMMARY],[G.SUP,y.SUP],[G.TABLE,y.TABLE],[G.TBODY,y.TBODY],[G.TEMPLATE,y.TEMPLATE],[G.TEXTAREA,y.TEXTAREA],[G.TFOOT,y.TFOOT],[G.TD,y.TD],[G.TH,y.TH],[G.THEAD,y.THEAD],[G.TITLE,y.TITLE],[G.TR,y.TR],[G.TRACK,y.TRACK],[G.TT,y.TT],[G.U,y.U],[G.UL,y.UL],[G.SVG,y.SVG],[G.VAR,y.VAR],[G.WBR,y.WBR],[G.XMP,y.XMP]]);function Gs(e){var t;return(t=F5.get(e))!==null&&t!==void 0?t:y.UNKNOWN}const pe=y,$5={[de.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[de.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[de.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[de.XLINK]:new Set,[de.XML]:new Set,[de.XMLNS]:new Set},Np=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT;var M;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(M||(M={}));const Rt={DATA:M.DATA,RCDATA:M.RCDATA,RAWTEXT:M.RAWTEXT,SCRIPT_DATA:M.SCRIPT_DATA,PLAINTEXT:M.PLAINTEXT,CDATA_SECTION:M.CDATA_SECTION};function q5(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function du(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function Y5(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Ui(e){return Y5(e)||du(e)}function lE(e){return Ui(e)||q5(e)}function yc(e){return e+32}function S_(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function uE(e){return S_(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function V5(e){return e===N.NULL?re.nullCharacterReference:e>1114111?re.characterReferenceOutsideUnicodeRange:v_(e)?re.surrogateCharacterReference:T_(e)?re.noncharacterCharacterReference:__(e)||e===N.CARRIAGE_RETURN?re.controlCharacterReference:null}class G5{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=M.DATA,this.returnState=M.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new M5(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new U5(L5,(i,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(i)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(re.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(re.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const s=V5(i);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var i,s;(s=(i=this.handler).onParseError)===null||s===void 0||s.call(i,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,i){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||i?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Fe.START_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Fe.END_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Fe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const i=this.currentToken;if(A_(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const s=(t=(n=i.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(re.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Gs(t.tagName),t.type===Fe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(re.endTagWithAttributes),t.selfClosing&&this._err(re.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Fe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=S_(t)?Fe.WHITESPACE_CHARACTER:t===N.NULL?Fe.NULL_CHARACTER:Fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=M.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ii.Attribute:ii.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===M.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===M.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===M.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case M.DATA:{this._stateData(t);break}case M.RCDATA:{this._stateRcdata(t);break}case M.RAWTEXT:{this._stateRawtext(t);break}case M.SCRIPT_DATA:{this._stateScriptData(t);break}case M.PLAINTEXT:{this._statePlaintext(t);break}case M.TAG_OPEN:{this._stateTagOpen(t);break}case M.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case M.TAG_NAME:{this._stateTagName(t);break}case M.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case M.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case M.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case M.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case M.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case M.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case M.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case M.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case M.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case M.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case M.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case M.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case M.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case M.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case M.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case M.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case M.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case M.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case M.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case M.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case M.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case M.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case M.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case M.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case M.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case M.BOGUS_COMMENT:{this._stateBogusComment(t);break}case M.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case M.COMMENT_START:{this._stateCommentStart(t);break}case M.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case M.COMMENT:{this._stateComment(t);break}case M.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case M.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case M.COMMENT_END:{this._stateCommentEnd(t);break}case M.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case M.DOCTYPE:{this._stateDoctype(t);break}case M.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case M.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case M.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case M.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case M.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case M.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case M.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case M.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case M.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case M.CDATA_SECTION:{this._stateCdataSection(t);break}case M.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case M.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case M.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case M.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=M.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=M.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=M.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ui(t))this._createStartTagToken(),this.state=M.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=M.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=M.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(re.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(re.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=M.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ui(t))this._createEndTagToken(),this.state=M.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(re.missingEndTagName),this.state=M.DATA;break}case N.EOF:{this._err(re.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=M.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=M.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.tagName+=_t;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(du(t)?yc(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=M.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=M.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ui(t)?(this.state=M.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=M.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=M.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=M.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=M.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=M.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ui(t)?(this.state=M.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=M.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=M.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=M.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ui(t)?(this.state=M.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=M.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=M.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=M.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=M.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ui(t)?(this._emitChars("<"),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ui(t)?(this.state=M.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(An.SCRIPT,!1)&&uE(this.preprocessor.peek(An.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<An.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=M.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(An.SCRIPT,!1)&&uE(this.preprocessor.peek(An.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<An.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=M.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=M.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(re.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=M.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=M.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=M.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=M.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(re.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.name+=_t;break}default:this.currentAttr.name+=String.fromCodePoint(du(t)?yc(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=M.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=M.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=M.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=M.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=M.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingAttributeValue),this.state=M.DATA,this.emitCurrentTagToken();break}default:this.state=M.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=M.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=M.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=M.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=M.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(re.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=M.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=M.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=M.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBetweenAttributes),this.state=M.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=M.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.unexpectedSolidusInTag),this.state=M.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.data+=_t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(An.DASH_DASH,!0)?(this._createCommentToken(An.DASH_DASH.length+1),this.state=M.COMMENT_START):this._consumeSequenceIfMatch(An.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(An.DOCTYPE.length+1),this.state=M.DOCTYPE):this._consumeSequenceIfMatch(An.CDATA_START,!0)?this.inForeignNode?this.state=M.CDATA_SECTION:(this._err(re.cdataInHtmlContent),this._createCommentToken(An.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=M.BOGUS_COMMENT):this._ensureHibernation()||(this._err(re.incorrectlyOpenedComment),this._createCommentToken(2),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=M.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=M.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=M.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=M.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=M.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=M.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=M.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=M.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.data+=_t;break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=M.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=M.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=M.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=M.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=M.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=M.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(re.nestedComment),this.state=M.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=M.COMMENT_END;break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=M.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=M.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=M.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=M.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(re.incorrectlyClosedComment),this.state=M.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=M.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=M.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBeforeDoctypeName),this.state=M.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(du(t))this._createDoctypeToken(String.fromCharCode(yc(t))),this.state=M.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(re.unexpectedNullCharacter),this._createDoctypeToken(_t),this.state=M.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=M.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=M.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.name+=_t;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(du(t)?yc(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(An.PUBLIC,!1)?this.state=M.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(An.SYSTEM,!1)?this.state=M.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(re.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=M.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=_t;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case N.NULL:{this._err(re.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=M.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(re.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=M.CDATA_SECTION_END:(this._emitChars("]"),this.state=M.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=M.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=M.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&lE(this.preprocessor.peek(1))?M.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){lE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(re.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const w_=new Set([y.DD,y.DT,y.LI,y.OPTGROUP,y.OPTION,y.P,y.RB,y.RP,y.RT,y.RTC]),oE=new Set([...w_,y.CAPTION,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]),Wc=new Set([y.APPLET,y.CAPTION,y.HTML,y.MARQUEE,y.OBJECT,y.TABLE,y.TD,y.TEMPLATE,y.TH]),W5=new Set([...Wc,y.OL,y.UL]),X5=new Set([...Wc,y.BUTTON]),cE=new Set([y.ANNOTATION_XML,y.MI,y.MN,y.MO,y.MS,y.MTEXT]),dE=new Set([y.DESC,y.FOREIGN_OBJECT,y.TITLE]),Q5=new Set([y.TR,y.TEMPLATE,y.HTML]),K5=new Set([y.TBODY,y.TFOOT,y.THEAD,y.TEMPLATE,y.HTML]),Z5=new Set([y.TABLE,y.TEMPLATE,y.HTML]),J5=new Set([y.TD,y.TH]);class eN{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=y.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===de.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const i=this._indexOf(t);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(t,n,i){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,i),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==de.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(i,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Np,de.HTML)}popUntilTableCellPopped(){this.popUntilPopped(J5,de.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(Z5,de.HTML)}clearBackToTableBodyContext(){this.clearBackTo(K5,de.HTML)}clearBackToTableRowContext(){this.clearBackTo(Q5,de.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===y.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===y.HTML}hasInDynamicScope(t,n){for(let i=this.stackTop;i>=0;i--){const s=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case de.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case de.SVG:{if(dE.has(s))return!1;break}case de.MATHML:{if(cE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Wc)}hasInListItemScope(t){return this.hasInDynamicScope(t,W5)}hasInButtonScope(t){return this.hasInDynamicScope(t,X5)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case de.HTML:{if(Np.has(n))return!0;if(Wc.has(n))return!1;break}case de.SVG:{if(dE.has(n))return!1;break}case de.MATHML:{if(cE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===de.HTML)switch(this.tagIDs[t]){case y.TBODY:case y.THEAD:case y.TFOOT:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case y.OPTION:case y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&w_.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&oE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&oE.has(this.currentTagId);)this.pop()}}const y0=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const fE={type:Mr.Marker};class tN{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const i=[],s=n.length,l=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){const h=this.entries[d];if(h.type===Mr.Marker)break;const{element:f}=h;if(this.treeAdapter.getTagName(f)===l&&this.treeAdapter.getNamespaceURI(f)===o){const m=this.treeAdapter.getAttrList(f);m.length===s&&i.push({idx:d,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<y0)return;const n=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,n);if(i.length<y0)return;const s=new Map(n.map(o=>[o.name,o.value]));let l=0;for(let o=0;o<i.length;o++){const d=i[o];d.attrs.every(h=>s.get(h.name)===h.value)&&(l+=1,l>=y0&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(fE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Mr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(fE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(i=>i.type===Mr.Marker||this.treeAdapter.getTagName(i.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const ji={createDocument(){return{nodeName:"#document",mode:sr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const i=e.childNodes.indexOf(n);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,i){const s=e.childNodes.find(l=>l.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=i;else{const l={nodeName:"#documentType",name:t,publicId:n,systemId:i,parentNode:null};ji.appendChild(e,l)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ji.isTextNode(n)){n.value+=t;return}}ji.appendChild(e,ji.createTextNode(t))},insertTextBefore(e,t,n){const i=e.childNodes[e.childNodes.indexOf(n)-1];i&&ji.isTextNode(i)?i.value+=t:ji.insertBefore(e,ji.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)n.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},k_="html",nN="about:legacy-compat",rN="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",C_=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],iN=[...C_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],aN=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),N_=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],sN=[...N_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function hE(e,t){return t.some(n=>e.startsWith(n))}function lN(e){return e.name===k_&&e.publicId===null&&(e.systemId===null||e.systemId===nN)}function uN(e){if(e.name!==k_)return sr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===rN)return sr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),aN.has(n))return sr.QUIRKS;let i=t===null?iN:C_;if(hE(n,i))return sr.QUIRKS;if(i=t===null?N_:sN,hE(n,i))return sr.LIMITED_QUIRKS}return sr.NO_QUIRKS}const pE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},oN="definitionurl",cN="definitionURL",dN=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),fN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:de.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:de.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:de.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:de.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:de.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:de.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:de.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:de.XML}],["xml:space",{prefix:"xml",name:"space",namespace:de.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:de.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:de.XMLNS}]]),hN=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),pN=new Set([y.B,y.BIG,y.BLOCKQUOTE,y.BODY,y.BR,y.CENTER,y.CODE,y.DD,y.DIV,y.DL,y.DT,y.EM,y.EMBED,y.H1,y.H2,y.H3,y.H4,y.H5,y.H6,y.HEAD,y.HR,y.I,y.IMG,y.LI,y.LISTING,y.MENU,y.META,y.NOBR,y.OL,y.P,y.PRE,y.RUBY,y.S,y.SMALL,y.SPAN,y.STRONG,y.STRIKE,y.SUB,y.SUP,y.TABLE,y.TT,y.U,y.UL,y.VAR]);function mN(e){const t=e.tagID;return t===y.FONT&&e.attrs.some(({name:i})=>i===Ca.COLOR||i===Ca.SIZE||i===Ca.FACE)||pN.has(t)}function R_(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===oN){e.attrs[t].name=cN;break}}function O_(e){for(let t=0;t<e.attrs.length;t++){const n=dN.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Am(e){for(let t=0;t<e.attrs.length;t++){const n=fN.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function gN(e){const t=hN.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gs(e.tagName))}function bN(e,t){return t===de.MATHML&&(e===y.MI||e===y.MO||e===y.MN||e===y.MS||e===y.MTEXT)}function yN(e,t,n){if(t===de.MATHML&&e===y.ANNOTATION_XML){for(let i=0;i<n.length;i++)if(n[i].name===Ca.ENCODING){const s=n[i].value.toLowerCase();return s===pE.TEXT_HTML||s===pE.APPLICATION_XML}}return t===de.SVG&&(e===y.FOREIGN_OBJECT||e===y.DESC||e===y.TITLE)}function EN(e,t,n,i){return(!i||i===de.HTML)&&yN(e,t,n)||(!i||i===de.MATHML)&&bN(e,t)}const xN="hidden",vN=8,_N=3;var L;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(L||(L={}));const TN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},M_=new Set([y.TABLE,y.TBODY,y.TFOOT,y.THEAD,y.TR]),mE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ji,onParseError:null};class gE{constructor(t,n,i=null,s=null){this.fragmentContext=i,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...mE,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new G5(this.options,this),this.activeFormattingElements=new tN(this.treeAdapter),this.fragmentContextID=i?Gs(this.treeAdapter.getTagName(i)):y.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new eN(this.document,this.treeAdapter,this)}static parse(t,n){const i=new this(n);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,n){const i={...mE,...n};t??(t=i.treeAdapter.createElement(G.TEMPLATE,de.HTML,[]));const s=i.treeAdapter.createElement("documentmock",de.HTML,[]),l=new this(i,s,t);return l.fragmentContextID===y.TEMPLATE&&l.tmplInsertionModeStack.unshift(L.IN_TEMPLATE),l._initTokenizerForFragmentParsing(),l._insertFakeRootElement(),l._resetInsertionMode(),l._findFormInFragmentContext(),l}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,i){var s;if(!this.onParseError)return;const l=(s=t.location)!==null&&s!==void 0?s:TN,o={code:n,startLine:l.startLine,startCol:l.startCol,startOffset:l.startOffset,endLine:i?l.startLine:l.endLine,endCol:i?l.startCol:l.endCol,endOffset:i?l.startOffset:l.endOffset};this.onParseError(o)}onItemPush(t,n,i){var s,l;(l=(s=this.treeAdapter).onItemPush)===null||l===void 0||l.call(s,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var i,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(i=this.treeAdapter).onItemPop)===null||s===void 0||s.call(i,t,this.openElements.current),n){let l,o;this.openElements.stackTop===0&&this.fragmentContext?(l=this.fragmentContext,o=this.fragmentContextID):{current:l,currentTagId:o}=this.openElements,this._setContextModes(l,o)}}_setContextModes(t,n){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===de.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,de.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=Rt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===G.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==de.HTML))switch(this.fragmentContextID){case y.TITLE:case y.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case y.STYLE:case y.XMP:case y.IFRAME:case y.NOEMBED:case y.NOFRAMES:case y.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case y.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case y.PLAINTEXT:{this.tokenizer.state=Rt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",i=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,s),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,n){const i=this.treeAdapter.createElement(t,de.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,de.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(G.HTML,de.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,y.HTML)}_appendCommentNode(t,n){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,t.chars,i):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),l=i?s.lastIndexOf(i):s.length,o=s[l-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:h,endCol:f,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:h,endCol:f,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,s=this.treeAdapter.getTagName(t),l=n.type===Fe.END_TAG&&s===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,l)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,t.tagID===y.SVG&&this.treeAdapter.getTagName(n)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===de.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===y.MGLYPH||t.tagID===y.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,n,de.HTML)}_processToken(t){switch(t.type){case Fe.CHARACTER:{this.onCharacter(t);break}case Fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Fe.COMMENT:{this.onComment(t);break}case Fe.DOCTYPE:{this.onDoctype(t);break}case Fe.START_TAG:{this._processStartTag(t);break}case Fe.END_TAG:{this.onEndTag(t);break}case Fe.EOF:{this.onEof(t);break}case Fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,i){const s=this.treeAdapter.getNamespaceURI(n),l=this.treeAdapter.getAttrList(n);return EN(t,s,l,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Mr.Marker||this.openElements.contains(s.element)),i=n===-1?t-1:n-1;for(let s=i;s>=0;s--){const l=this.activeFormattingElements.entries[s];this._insertElement(l.token,this.treeAdapter.getNamespaceURI(l.element)),l.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(y.P),this.openElements.popUntilTagNamePopped(y.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case y.TR:{this.insertionMode=L.IN_ROW;return}case y.TBODY:case y.THEAD:case y.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case y.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case y.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case y.TABLE:{this.insertionMode=L.IN_TABLE;return}case y.BODY:{this.insertionMode=L.IN_BODY;return}case y.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case y.SELECT:{this._resetInsertionModeForSelect(t);return}case y.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case y.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case y.TD:case y.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case y.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===y.TEMPLATE)break;if(i===y.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return M_.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case y.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===de.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case y.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const i=this.treeAdapter.getNamespaceURI(t);return $5[i].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){J8(this,t);return}switch(this.insertionMode){case L.INITIAL:{Kl(this,t);break}case L.BEFORE_HTML:{gu(this,t);break}case L.BEFORE_HEAD:{bu(this,t);break}case L.IN_HEAD:{yu(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Eu(this,t);break}case L.AFTER_HEAD:{xu(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{D_(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{E0(this,t);break}case L.IN_TABLE_TEXT:{U_(this,t);break}case L.IN_COLUMN_GROUP:{Xc(this,t);break}case L.AFTER_BODY:{Qc(this,t);break}case L.AFTER_AFTER_BODY:{Pc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Z8(this,t);return}switch(this.insertionMode){case L.INITIAL:{Kl(this,t);break}case L.BEFORE_HTML:{gu(this,t);break}case L.BEFORE_HEAD:{bu(this,t);break}case L.IN_HEAD:{yu(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Eu(this,t);break}case L.AFTER_HEAD:{xu(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{E0(this,t);break}case L.IN_COLUMN_GROUP:{Xc(this,t);break}case L.AFTER_BODY:{Qc(this,t);break}case L.AFTER_AFTER_BODY:{Pc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Rp(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{Rp(this,t);break}case L.IN_TABLE_TEXT:{Zl(this,t);break}case L.AFTER_BODY:{RN(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{ON(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{MN(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,re.misplacedDoctype);break}case L.IN_TABLE_TEXT:{Zl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,re.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?eR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Kl(this,t);break}case L.BEFORE_HTML:{LN(this,t);break}case L.BEFORE_HEAD:{IN(this,t);break}case L.IN_HEAD:{Er(this,t);break}case L.IN_HEAD_NO_SCRIPT:{PN(this,t);break}case L.AFTER_HEAD:{UN(this,t);break}case L.IN_BODY:{sn(this,t);break}case L.IN_TABLE:{js(this,t);break}case L.IN_TABLE_TEXT:{Zl(this,t);break}case L.IN_CAPTION:{B8(this,t);break}case L.IN_COLUMN_GROUP:{km(this,t);break}case L.IN_TABLE_BODY:{xd(this,t);break}case L.IN_ROW:{vd(this,t);break}case L.IN_CELL:{H8(this,t);break}case L.IN_SELECT:{$_(this,t);break}case L.IN_SELECT_IN_TABLE:{j8(this,t);break}case L.IN_TEMPLATE:{$8(this,t);break}case L.AFTER_BODY:{Y8(this,t);break}case L.IN_FRAMESET:{V8(this,t);break}case L.AFTER_FRAMESET:{W8(this,t);break}case L.AFTER_AFTER_BODY:{Q8(this,t);break}case L.AFTER_AFTER_FRAMESET:{K8(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?tR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Kl(this,t);break}case L.BEFORE_HTML:{DN(this,t);break}case L.BEFORE_HEAD:{BN(this,t);break}case L.IN_HEAD:{zN(this,t);break}case L.IN_HEAD_NO_SCRIPT:{HN(this,t);break}case L.AFTER_HEAD:{jN(this,t);break}case L.IN_BODY:{Ed(this,t);break}case L.TEXT:{w8(this,t);break}case L.IN_TABLE:{ku(this,t);break}case L.IN_TABLE_TEXT:{Zl(this,t);break}case L.IN_CAPTION:{z8(this,t);break}case L.IN_COLUMN_GROUP:{P8(this,t);break}case L.IN_TABLE_BODY:{Op(this,t);break}case L.IN_ROW:{F_(this,t);break}case L.IN_CELL:{U8(this,t);break}case L.IN_SELECT:{q_(this,t);break}case L.IN_SELECT_IN_TABLE:{F8(this,t);break}case L.IN_TEMPLATE:{q8(this,t);break}case L.AFTER_BODY:{V_(this,t);break}case L.IN_FRAMESET:{G8(this,t);break}case L.AFTER_FRAMESET:{X8(this,t);break}case L.AFTER_AFTER_BODY:{Pc(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Kl(this,t);break}case L.BEFORE_HTML:{gu(this,t);break}case L.BEFORE_HEAD:{bu(this,t);break}case L.IN_HEAD:{yu(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Eu(this,t);break}case L.AFTER_HEAD:{xu(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{P_(this,t);break}case L.TEXT:{k8(this,t);break}case L.IN_TABLE_TEXT:{Zl(this,t);break}case L.IN_TEMPLATE:{Y_(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{wm(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{L_(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{E0(this,t);break}case L.IN_TABLE_TEXT:{H_(this,t);break}}}}function AN(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):z_(e,t),n}function SN(e,t){let n=null,i=e.openElements.stackTop;for(;i>=0;i--){const s=e.openElements.items[i];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[i])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),n}function wN(e,t,n){let i=t,s=e.openElements.getCommonAncestor(t);for(let l=0,o=s;o!==n;l++,o=s){s=e.openElements.getCommonAncestor(o);const d=e.activeFormattingElements.getElementEntry(o),h=d&&l>=_N;!d||h?(h&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(o)):(o=kN(e,d),i===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(o,i),i=o)}return i}function kN(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function CN(e,t,n){const i=e.treeAdapter.getTagName(t),s=Gs(i);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const l=e.treeAdapter.getNamespaceURI(t);s===y.TEMPLATE&&l===de.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function NN(e,t,n){const i=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,l=e.treeAdapter.createElement(s.tagName,i,s.attrs);e._adoptNodes(t,l),e.treeAdapter.appendChild(t,l),e.activeFormattingElements.insertElementAfterBookmark(l,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,l,s.tagID)}function Sm(e,t){for(let n=0;n<vN;n++){const i=AN(e,t);if(!i)break;const s=SN(e,i);if(!s)break;e.activeFormattingElements.bookmark=i;const l=wN(e,s,i.element),o=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(l),o&&CN(e,o,l),NN(e,s,i)}}function Rp(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function RN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ON(e,t){e._appendCommentNode(t,e.document)}function wm(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=n;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(i);if(s&&!s.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const l=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(l);o&&!o.endTag&&e._setEndLocation(l,t)}}}}function MN(e,t){e._setDocumentType(t);const n=t.forceQuirks?sr.QUIRKS:uN(t);lN(t)||e._err(t,re.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Kl(e,t){e._err(t,re.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,sr.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function LN(e,t){t.tagID===y.HTML?(e._insertElement(t,de.HTML),e.insertionMode=L.BEFORE_HEAD):gu(e,t)}function DN(e,t){const n=t.tagID;(n===y.HTML||n===y.HEAD||n===y.BODY||n===y.BR)&&gu(e,t)}function gu(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function IN(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.HEAD:{e._insertElement(t,de.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:bu(e,t)}}function BN(e,t){const n=t.tagID;n===y.HEAD||n===y.BODY||n===y.HTML||n===y.BR?bu(e,t):e._err(t,re.endTagWithoutMatchingOpenElement)}function bu(e,t){e._insertFakeElement(G.HEAD,y.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case y.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,de.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case y.NOFRAMES:case y.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case y.SCRIPT:{e._switchToTextParsing(t,Rt.SCRIPT_DATA);break}case y.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case y.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:yu(e,t)}}function zN(e,t){switch(t.tagID){case y.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case y.BODY:case y.BR:case y.HTML:{yu(e,t);break}case y.TEMPLATE:{Ia(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Ia(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==y.TEMPLATE&&e._err(t,re.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,re.endTagWithoutMatchingOpenElement)}function yu(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function PN(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.BASEFONT:case y.BGSOUND:case y.HEAD:case y.LINK:case y.META:case y.NOFRAMES:case y.STYLE:{Er(e,t);break}case y.NOSCRIPT:{e._err(t,re.nestedNoscriptInHead);break}default:Eu(e,t)}}function HN(e,t){switch(t.tagID){case y.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case y.BR:{Eu(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Eu(e,t){const n=t.type===Fe.EOF?re.openElementsLeftAfterEof:re.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function UN(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.BODY:{e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case y.FRAMESET:{e._insertElement(t,de.HTML),e.insertionMode=L.IN_FRAMESET;break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{e._err(t,re.abandonedHeadElementChild),e.openElements.push(e.headElement,y.HEAD),Er(e,t),e.openElements.remove(e.headElement);break}case y.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:xu(e,t)}}function jN(e,t){switch(t.tagID){case y.BODY:case y.HTML:case y.BR:{xu(e,t);break}case y.TEMPLATE:{Ia(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function xu(e,t){e._insertFakeElement(G.BODY,y.BODY),e.insertionMode=L.IN_BODY,yd(e,t)}function yd(e,t){switch(t.type){case Fe.CHARACTER:{D_(e,t);break}case Fe.WHITESPACE_CHARACTER:{L_(e,t);break}case Fe.COMMENT:{Rp(e,t);break}case Fe.START_TAG:{sn(e,t);break}case Fe.END_TAG:{Ed(e,t);break}case Fe.EOF:{P_(e,t);break}}}function L_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function D_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function FN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $N(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function qN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,de.HTML),e.insertionMode=L.IN_FRAMESET)}function YN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function VN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Np.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,de.HTML)}function GN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function WN(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),n||(e.formElement=e.openElements.current))}function XN(e,t){e.framesetOk=!1;const n=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const s=e.openElements.tagIDs[i];if(n===y.LI&&s===y.LI||(n===y.DD||n===y.DT)&&(s===y.DD||s===y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==y.ADDRESS&&s!==y.DIV&&s!==y.P&&e._isSpecialElement(e.openElements.items[i],s))break}e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function QN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.tokenizer.state=Rt.PLAINTEXT}function KN(e,t){e.openElements.hasInScope(y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1}function ZN(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(Sm(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function e8(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(y.NOBR)&&(Sm(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function n8(e,t){e.treeAdapter.getDocumentMode(e.document)!==sr.QUIRKS&&e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function I_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function B_(e){const t=A_(e,Ca.TYPE);return t!=null&&t.toLowerCase()===xN}function r8(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),B_(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function i8(e,t){e._appendElement(t,de.HTML),t.ackSelfClosing=!0}function a8(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function s8(e,t){t.tagName=G.IMG,t.tagID=y.IMG,I_(e,t)}function l8(e,t){e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function u8(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function o8(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function bE(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function c8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function d8(e,t){e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function f8(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,de.HTML)}function h8(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(y.RTC),e._insertElement(t,de.HTML)}function p8(e,t){e._reconstructActiveFormattingElements(),R_(t),Am(t),t.selfClosing?e._appendElement(t,de.MATHML):e._insertElement(t,de.MATHML),t.ackSelfClosing=!0}function m8(e,t){e._reconstructActiveFormattingElements(),O_(t),Am(t),t.selfClosing?e._appendElement(t,de.SVG):e._insertElement(t,de.SVG),t.ackSelfClosing=!0}function yE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function sn(e,t){switch(t.tagID){case y.I:case y.S:case y.B:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.SMALL:case y.STRIKE:case y.STRONG:{JN(e,t);break}case y.A:{ZN(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{VN(e,t);break}case y.P:case y.DL:case y.OL:case y.UL:case y.DIV:case y.DIR:case y.NAV:case y.MAIN:case y.MENU:case y.ASIDE:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.DETAILS:case y.ADDRESS:case y.ARTICLE:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{YN(e,t);break}case y.LI:case y.DD:case y.DT:{XN(e,t);break}case y.BR:case y.IMG:case y.WBR:case y.AREA:case y.EMBED:case y.KEYGEN:{I_(e,t);break}case y.HR:{a8(e,t);break}case y.RB:case y.RTC:{f8(e,t);break}case y.RT:case y.RP:{h8(e,t);break}case y.PRE:case y.LISTING:{GN(e,t);break}case y.XMP:{u8(e,t);break}case y.SVG:{m8(e,t);break}case y.HTML:{FN(e,t);break}case y.BASE:case y.LINK:case y.META:case y.STYLE:case y.TITLE:case y.SCRIPT:case y.BGSOUND:case y.BASEFONT:case y.TEMPLATE:{Er(e,t);break}case y.BODY:{$N(e,t);break}case y.FORM:{WN(e,t);break}case y.NOBR:{e8(e,t);break}case y.MATH:{p8(e,t);break}case y.TABLE:{n8(e,t);break}case y.INPUT:{r8(e,t);break}case y.PARAM:case y.TRACK:case y.SOURCE:{i8(e,t);break}case y.IMAGE:{s8(e,t);break}case y.BUTTON:{KN(e,t);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{t8(e,t);break}case y.IFRAME:{o8(e,t);break}case y.SELECT:{c8(e,t);break}case y.OPTION:case y.OPTGROUP:{d8(e,t);break}case y.NOEMBED:case y.NOFRAMES:{bE(e,t);break}case y.FRAMESET:{qN(e,t);break}case y.TEXTAREA:{l8(e,t);break}case y.NOSCRIPT:{e.options.scriptingEnabled?bE(e,t):yE(e,t);break}case y.PLAINTEXT:{QN(e,t);break}case y.COL:case y.TH:case y.TD:case y.TR:case y.HEAD:case y.FRAME:case y.TBODY:case y.TFOOT:case y.THEAD:case y.CAPTION:case y.COLGROUP:break;default:yE(e,t)}}function g8(e,t){if(e.openElements.hasInScope(y.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function b8(e,t){e.openElements.hasInScope(y.BODY)&&(e.insertionMode=L.AFTER_BODY,V_(e,t))}function y8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function E8(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(y.FORM):n&&e.openElements.remove(n))}function x8(e){e.openElements.hasInButtonScope(y.P)||e._insertFakeElement(G.P,y.P),e._closePElement()}function v8(e){e.openElements.hasInListItemScope(y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(y.LI),e.openElements.popUntilTagNamePopped(y.LI))}function _8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function T8(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function A8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function S8(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,y.BR),e.openElements.pop(),e.framesetOk=!1}function z_(e,t){const n=t.tagName,i=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const l=e.openElements.items[s],o=e.openElements.tagIDs[s];if(i===o&&(i!==y.UNKNOWN||e.treeAdapter.getTagName(l)===n)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(l,o))break}}function Ed(e,t){switch(t.tagID){case y.A:case y.B:case y.I:case y.S:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.NOBR:case y.SMALL:case y.STRIKE:case y.STRONG:{Sm(e,t);break}case y.P:{x8(e);break}case y.DL:case y.UL:case y.OL:case y.DIR:case y.DIV:case y.NAV:case y.PRE:case y.MAIN:case y.MENU:case y.ASIDE:case y.BUTTON:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.ADDRESS:case y.ARTICLE:case y.DETAILS:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.LISTING:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{y8(e,t);break}case y.LI:{v8(e);break}case y.DD:case y.DT:{_8(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{T8(e);break}case y.BR:{S8(e);break}case y.BODY:{g8(e,t);break}case y.HTML:{b8(e,t);break}case y.FORM:{E8(e);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{A8(e,t);break}case y.TEMPLATE:{Ia(e,t);break}default:z_(e,t)}}function P_(e,t){e.tmplInsertionModeStack.length>0?Y_(e,t):wm(e,t)}function w8(e,t){var n;t.tagID===y.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function k8(e,t){e._err(t,re.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function E0(e,t){if(e.openElements.currentTagId!==void 0&&M_.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Fe.CHARACTER:{U_(e,t);break}case Fe.WHITESPACE_CHARACTER:{H_(e,t);break}}else Fu(e,t)}function C8(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,de.HTML),e.insertionMode=L.IN_CAPTION}function N8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function R8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,y.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,km(e,t)}function O8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=L.IN_TABLE_BODY}function M8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,y.TBODY),e.insertionMode=L.IN_TABLE_BODY,xd(e,t)}function L8(e,t){e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function D8(e,t){B_(t)?e._appendElement(t,de.HTML):Fu(e,t),t.ackSelfClosing=!0}function I8(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,de.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function js(e,t){switch(t.tagID){case y.TD:case y.TH:case y.TR:{M8(e,t);break}case y.STYLE:case y.SCRIPT:case y.TEMPLATE:{Er(e,t);break}case y.COL:{R8(e,t);break}case y.FORM:{I8(e,t);break}case y.TABLE:{L8(e,t);break}case y.TBODY:case y.TFOOT:case y.THEAD:{O8(e,t);break}case y.INPUT:{D8(e,t);break}case y.CAPTION:{C8(e,t);break}case y.COLGROUP:{N8(e,t);break}default:Fu(e,t)}}function ku(e,t){switch(t.tagID){case y.TABLE:{e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode());break}case y.TEMPLATE:{Ia(e,t);break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:Fu(e,t)}}function Fu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,yd(e,t),e.fosterParentingEnabled=n}function H_(e,t){e.pendingCharacterTokens.push(t)}function U_(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Zl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Fu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const j_=new Set([y.CAPTION,y.COL,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]);function B8(e,t){const n=t.tagID;j_.has(n)?e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,js(e,t)):sn(e,t)}function z8(e,t){const n=t.tagID;switch(n){case y.CAPTION:case y.TABLE:{e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===y.TABLE&&ku(e,t));break}case y.BODY:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:Ed(e,t)}}function km(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.COL:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.TEMPLATE:{Er(e,t);break}default:Xc(e,t)}}function P8(e,t){switch(t.tagID){case y.COLGROUP:{e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case y.TEMPLATE:{Ia(e,t);break}case y.COL:break;default:Xc(e,t)}}function Xc(e,t){e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function xd(e,t){switch(t.tagID){case y.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,de.HTML),e.insertionMode=L.IN_ROW;break}case y.TH:case y.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,y.TR),e.insertionMode=L.IN_ROW,vd(e,t);break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,js(e,t));break}default:js(e,t)}}function Op(e,t){const n=t.tagID;switch(t.tagID){case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case y.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,ku(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:case y.TR:break;default:ku(e,t)}}function vd(e,t){switch(t.tagID){case y.TH:case y.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,de.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,xd(e,t));break}default:js(e,t)}}function F_(e,t){switch(t.tagID){case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case y.TABLE:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,Op(e,t));break}case y.TBODY:case y.TFOOT:case y.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,Op(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:break;default:ku(e,t)}}function H8(e,t){const n=t.tagID;j_.has(n)?(e.openElements.hasInTableScope(y.TD)||e.openElements.hasInTableScope(y.TH))&&(e._closeTableCell(),vd(e,t)):sn(e,t)}function U8(e,t){const n=t.tagID;switch(n){case y.TD:case y.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case y.TABLE:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),F_(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:break;default:Ed(e,t)}}function $_(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case y.OPTGROUP:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case y.HR:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.INPUT:case y.KEYGEN:case y.TEXTAREA:case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),t.tagID!==y.SELECT&&e._processStartTag(t));break}case y.SCRIPT:case y.TEMPLATE:{Er(e,t);break}}}function q_(e,t){switch(t.tagID){case y.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop();break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop();break}case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode());break}case y.TEMPLATE:{Ia(e,t);break}}}function j8(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$_(e,t)}function F8(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):q_(e,t)}function $8(e,t){switch(t.tagID){case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{Er(e,t);break}case y.CAPTION:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,js(e,t);break}case y.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,km(e,t);break}case y.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,xd(e,t);break}case y.TD:case y.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,vd(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,sn(e,t)}}function q8(e,t){t.tagID===y.TEMPLATE&&Ia(e,t)}function Y_(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wm(e,t)}function Y8(e,t){t.tagID===y.HTML?sn(e,t):Qc(e,t)}function V_(e,t){var n;if(t.tagID===y.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===y.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&e._setEndLocation(i,t)}}else Qc(e,t)}function Qc(e,t){e.insertionMode=L.IN_BODY,yd(e,t)}function V8(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.FRAMESET:{e._insertElement(t,de.HTML);break}case y.FRAME:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.NOFRAMES:{Er(e,t);break}}}function G8(e,t){t.tagID===y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==y.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function W8(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.NOFRAMES:{Er(e,t);break}}}function X8(e,t){t.tagID===y.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function Q8(e,t){t.tagID===y.HTML?sn(e,t):Pc(e,t)}function Pc(e,t){e.insertionMode=L.IN_BODY,yd(e,t)}function K8(e,t){switch(t.tagID){case y.HTML:{sn(e,t);break}case y.NOFRAMES:{Er(e,t);break}}}function Z8(e,t){t.chars=_t,e._insertCharacters(t)}function J8(e,t){e._insertCharacters(t),e.framesetOk=!1}function G_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==de.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function eR(e,t){if(mN(t))G_(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(n);i===de.MATHML?R_(t):i===de.SVG&&(gN(t),O_(t)),Am(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function tR(e,t){if(t.tagID===y.P||t.tagID===y.BR){G_(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const i=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(i)===de.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(i);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR;const _d=W_("end"),Ir=W_("start");function W_(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function X_(e){const t=Ir(e),n=_d(e);if(t&&n)return{start:t,end:n}}const nR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,rR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),EE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Q_(e,t){const n=hR(e),i=E_("type",{handlers:{root:iR,element:aR,text:sR,comment:Z_,doctype:lR,raw:oR},unknown:cR}),s={parser:n?new gE(EE):gE.getFragmentParser(void 0,EE),handle(d){i(d,s)},stitches:!1,options:t||{}};i(e,s),Ws(s,Ir());const l=n?s.parser.document:s.parser.getFragment(),o=p5(l,{file:s.options.file});return s.stitches&&Dr(o,"comment",function(d,h,f){const m=d;if(m.value.stitch&&f&&h!==void 0){const b=f.children;return b[h]=m.value.stitch,h}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function K_(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function iR(e,t){K_(e.children,t)}function aR(e,t){dR(e,t),K_(e.children,t),fR(e,t)}function sR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Fe.CHARACTER,chars:e.value,location:$u(e)};Ws(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lR(e,t){const n={type:Fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:$u(e)};Ws(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uR(e,t){t.stitches=!0;const n=pR(e);if("children"in e&&"children"in n){const i=Q_({type:"root",children:e.children},t.options);n.children=i.children}Z_({type:"comment",value:{stitch:n}},t)}function Z_(e,t){const n=e.value,i={type:Fe.COMMENT,data:n,location:$u(e)};Ws(t,Ir(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function oR(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,J_(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(nR,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function cR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))uR(n,t);else{let i="";throw rR.has(n.type)&&(i=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+i)}}function Ws(e,t){J_(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Rt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function J_(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function dR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;Ws(t,Ir(e));const i=t.parser.openElements.current;let s="namespaceURI"in i?i.namespaceURI:Sa.html;s===Sa.html&&n==="svg"&&(s=Sa.svg);const l=E5({...e,children:[]},{space:s===Sa.svg?"svg":"html"}),o={type:Fe.START_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in l?l.attrs:[],location:$u(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function fR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&k5.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;Ws(t,_d(e));const i={type:Fe.END_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:$u(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function hR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function $u(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=_d(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function pR(e){return"children"in e?Oa({...e,children:[]}):Oa(e)}function Mp(e){return function(t,n){return Q_(t,{...e,file:n})}}const ba=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],_a={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ba,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ba],h2:[["className","sr-only"]],img:[...ba,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ba,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ba],table:[...ba],ul:[...ba,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Fi={}.hasOwnProperty;function mR(e,t){let n={type:"root",children:[]};const i={schema:t?{..._a,...t}:_a,stack:[]},s=eT(i,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function eT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return gR(e,n);case"doctype":return bR(e,n);case"element":return yR(e,n);case"root":return ER(e,n);case"text":return xR(e,n)}}}function gR(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",i=n.indexOf("-->"),l={type:"comment",value:i<0?n:n.slice(0,i)};return qu(l,t),l}}function bR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return qu(n,t),n}}function yR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const i=tT(e,t.children),s=vR(e,t.properties);e.stack.pop();let l=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(l=!0,e.schema.ancestors&&Fi.call(e.schema.ancestors,n))){const d=e.schema.ancestors[n];let h=-1;for(l=!1;++h<d.length;)e.stack.includes(d[h])&&(l=!0)}if(!l)return e.schema.strip&&!e.schema.strip.includes(n)?i:void 0;const o={type:"element",tagName:n,properties:s,children:i};return qu(o,t),o}function ER(e,t){const i={type:"root",children:tT(e,t.children)};return qu(i,t),i}function xR(e,t){const i={type:"text",value:typeof t.value=="string"?t.value:""};return qu(i,t),i}function tT(e,t){const n=[];if(Array.isArray(t)){const i=t;let s=-1;for(;++s<i.length;){const l=eT(e,i[s]);l&&(Array.isArray(l)?n.push(...l):n.push(l))}}return n}function vR(e,t){const n=e.stack[e.stack.length-1],i=e.schema.attributes,s=e.schema.required,l=i&&Fi.call(i,n)?i[n]:void 0,o=i&&Fi.call(i,"*")?i["*"]:void 0,d=t&&typeof t=="object"?t:{},h={};let f;for(f in d)if(Fi.call(d,f)){const m=d[f];let b=xE(e,vE(l,f),f,m);b==null&&(b=xE(e,vE(o,f),f,m)),b!=null&&(h[f]=b)}if(s&&Fi.call(s,n)){const m=s[n];for(f in m)Fi.call(m,f)&&!Fi.call(h,f)&&(h[f]=m[f])}return h}function xE(e,t,n,i){return t?Array.isArray(i)?_R(e,t,n,i):nT(e,t,n,i):void 0}function _R(e,t,n,i){let s=-1;const l=[];for(;++s<i.length;){const o=nT(e,t,n,i[s]);(typeof o=="number"||typeof o=="string")&&l.push(o)}return l}function nT(e,t,n,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&TR(e,n,i)){if(typeof t=="object"&&t.length>1){let s=!1,l=0;for(;++l<t.length;){const o=t[l];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(i))){s=!0;break}}else if(o===i){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+i:i}}function TR(e,t,n){const i=e.schema.protocols&&Fi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!i||i.length===0)return!0;const s=String(n),l=s.indexOf(":"),o=s.indexOf("?"),d=s.indexOf("#"),h=s.indexOf("/");if(l<0||h>-1&&l>h||o>-1&&l>o||d>-1&&l>d)return!0;let f=-1;for(;++f<i.length;){const m=i[f];if(l===m.length&&s.slice(0,m.length)===m)return!0}return!1}function qu(e,t){const n=X_(t);t.data&&(e.data=Oa(t.data)),n&&(e.position=n)}function vE(e,t){let n,i=-1;if(e)for(;++i<e.length;){const s=e[i],l=typeof s=="string"?s:s[0];if(l===t)return s;l==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function rT(e){return function(t){return mR(t,e)}}function _E(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(t);for(;s!==-1;)i++,s=n.indexOf(t,s+t.length);return i}const hn=Ki(/[A-Za-z]/),an=Ki(/[\dA-Za-z]/),AR=Ki(/[#-'*+\--9=?A-Z^-~]/);function Kc(e){return e!==null&&(e<32||e===127)}const Lp=Ki(/\d/),SR=Ki(/[\dA-Fa-f]/),wR=Ki(/[!-/:-@[-`{-~]/);function Ne(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Td=Ki(/\p{P}|\p{S}/u),Ma=Ki(/\s/);function Ki(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function kR(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function CR(e,t,n){const s=pd((n||{}).ignore||[]),l=NR(t);let o=-1;for(;++o<l.length;)gm(e,"text",d);function d(f,m){let b=-1,x;for(;++b<m.length;){const E=m[b],T=x?x.children:void 0;if(s(E,T?T.indexOf(E):void 0,x))return;x=E}if(x)return h(f,m)}function h(f,m){const b=m[m.length-1],x=l[o][0],E=l[o][1];let T=0;const S=b.children.indexOf(f);let k=!1,F=[];x.lastIndex=0;let H=x.exec(f.value);for(;H;){const V=H.index,J={index:H.index,input:H.input,stack:[...m,f]};let j=E(...H,J);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?x.lastIndex=V+1:(T!==V&&F.push({type:"text",value:f.value.slice(T,V)}),Array.isArray(j)?F.push(...j):j&&F.push(j),T=V+H[0].length,k=!0),!x.global)break;H=x.exec(f.value)}return k?(T<f.value.length&&F.push({type:"text",value:f.value.slice(T)}),b.children.splice(S,1,...F)):F=[f],S+F.length}}function NR(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const s=n[i];t.push([RR(s[0]),OR(s[1])])}return t}function RR(e){return typeof e=="string"?new RegExp(kR(e),"g"):e}function OR(e){return typeof e=="function"?e:function(){return e}}const x0="phrasing",v0=["autolink","link","image","label"];function MR(){return{transforms:[HR],enter:{literalAutolink:DR,literalAutolinkEmail:_0,literalAutolinkHttp:_0,literalAutolinkWww:_0},exit:{literalAutolink:PR,literalAutolinkEmail:zR,literalAutolinkHttp:IR,literalAutolinkWww:BR}}}function LR(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:x0,notInConstruct:v0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:x0,notInConstruct:v0},{character:":",before:"[ps]",after:"\\/",inConstruct:x0,notInConstruct:v0}]}}function DR(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function _0(e){this.config.enter.autolinkProtocol.call(this,e)}function IR(e){this.config.exit.autolinkProtocol.call(this,e)}function BR(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function zR(e){this.config.exit.autolinkEmail.call(this,e)}function PR(e){this.exit(e)}function HR(e){CR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,jR]],{ignore:["link","linkReference"]})}function UR(e,t,n,i,s){let l="";if(!iT(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!FR(n)))return!1;const o=$R(n+i);if(!o[0])return!1;const d={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[d,{type:"text",value:o[1]}]:d}function jR(e,t,n,i){return!iT(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function FR(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function $R(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const s=_E(e,"(");let l=_E(e,")");for(;i!==-1&&s>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function iT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ma(n)||Td(n))&&(!t||n!==47)}function br(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}aT.peek=ZR;function qR(){this.buffer()}function YR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function VR(){this.buffer()}function GR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function WR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function XR(e){this.exit(e)}function QR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KR(e){this.exit(e)}function ZR(){return"["}function aT(e,t,n,i){const s=n.createTracker(i);let l=s.move("[^");const o=n.enter("footnoteReference"),d=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),d(),o(),l+=s.move("]"),l}function JR(){return{enter:{gfmFootnoteCallString:qR,gfmFootnoteCall:YR,gfmFootnoteDefinitionLabelString:VR,gfmFootnoteDefinition:GR},exit:{gfmFootnoteCallString:WR,gfmFootnoteCall:XR,gfmFootnoteDefinitionLabelString:QR,gfmFootnoteDefinition:KR}}}function e9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:aT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,s,l,o){const d=l.createTracker(o);let h=d.move("[^");const f=l.enter("footnoteDefinition"),m=l.enter("label");return h+=d.move(l.safe(l.associationId(i),{before:h,after:"]"})),m(),h+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),h+=d.move((t?`
20
+ `:" ")+l.indentLines(l.containerFlow(i,d.current()),t?sT:t9))),f(),h}}function t9(e,t,n){return t===0?e:sT(e,t,n)}function sT(e,t,n){return(n?"":" ")+e}const n9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];lT.peek=l9;function r9(){return{canContainEols:["delete"],enter:{strikethrough:a9},exit:{strikethrough:s9}}}function i9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:n9}],handlers:{delete:lT}}}function a9(e){this.enter({type:"delete",children:[]},e)}function s9(e){this.exit(e)}function lT(e,t,n,i){const s=n.createTracker(i),l=n.enter("strikethrough");let o=s.move("~~");return o+=n.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),l(),o}function l9(){return"~"}function u9(e){return e.length}function o9(e,t){const n=t||{},i=(n.align||[]).concat(),s=n.stringLength||u9,l=[],o=[],d=[],h=[];let f=0,m=-1;for(;++m<e.length;){const w=[],S=[];let k=-1;for(e[m].length>f&&(f=e[m].length);++k<e[m].length;){const F=c9(e[m][k]);if(n.alignDelimiters!==!1){const H=s(F);S[k]=H,(h[k]===void 0||H>h[k])&&(h[k]=H)}w.push(F)}o[m]=w,d[m]=S}let b=-1;if(typeof i=="object"&&"length"in i)for(;++b<f;)l[b]=TE(i[b]);else{const w=TE(i);for(;++b<f;)l[b]=w}b=-1;const x=[],E=[];for(;++b<f;){const w=l[b];let S="",k="";w===99?(S=":",k=":"):w===108?S=":":w===114&&(k=":");let F=n.alignDelimiters===!1?1:Math.max(1,h[b]-S.length-k.length);const H=S+"-".repeat(F)+k;n.alignDelimiters!==!1&&(F=S.length+F+k.length,F>h[b]&&(h[b]=F),E[b]=F),x[b]=H}o.splice(1,0,x),d.splice(1,0,E),m=-1;const T=[];for(;++m<o.length;){const w=o[m],S=d[m];b=-1;const k=[];for(;++b<f;){const F=w[b]||"";let H="",V="";if(n.alignDelimiters!==!1){const J=h[b]-(S[b]||0),j=l[b];j===114?H=" ".repeat(J):j===99?J%2?(H=" ".repeat(J/2+.5),V=" ".repeat(J/2-.5)):(H=" ".repeat(J/2),V=H):V=" ".repeat(J)}n.delimiterStart!==!1&&!b&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||b)&&k.push(" "),n.alignDelimiters!==!1&&k.push(H),k.push(F),n.alignDelimiters!==!1&&k.push(V),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||b!==f-1)&&k.push("|")}T.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return T.join(`
21
+ `)}function c9(e){return e==null?"":String(e)}function TE(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function d9(e,t,n,i){const s=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),f9);return s(),o}function f9(e,t,n){return">"+(n?"":" ")+e}function h9(e,t){return AE(e,t.inConstruct,!0)&&!AE(e,t.notInConstruct,!1)}function AE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function SE(e,t,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
22
+ `&&h9(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
23
+ `}function p9(e,t){const n=String(e);let i=n.indexOf(t),s=i,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++l>o&&(o=l):l=1,s=i+t.length,i=n.indexOf(t,s);return o}function m9(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function g9(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function b9(e,t,n,i){const s=g9(n),l=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(m9(e,n)){const b=n.enter("codeIndented"),x=n.indentLines(l,y9);return b(),x}const d=n.createTracker(i),h=s.repeat(Math.max(p9(l,s)+1,3)),f=n.enter("codeFenced");let m=d.move(h);if(e.lang){const b=n.enter(`codeFencedLang${o}`);m+=d.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...d.current()})),b()}if(e.lang&&e.meta){const b=n.enter(`codeFencedMeta${o}`);m+=d.move(" "),m+=d.move(n.safe(e.meta,{before:m,after:`
24
+ `,encode:["`"],...d.current()})),b()}return m+=d.move(`
25
+ `),l&&(m+=d.move(l+`
26
+ `)),m+=d.move(h),f(),m}function y9(e,t,n){return(n?"":" ")+e}function Cm(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function E9(e,t,n,i){const s=Cm(n),l=s==='"'?"Quote":"Apostrophe",o=n.enter("definition");let d=n.enter("label");const h=n.createTracker(i);let f=h.move("[");return f+=h.move(n.safe(n.associationId(e),{before:f,after:"]",...h.current()})),f+=h.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(n.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(d=n.enter("destinationRaw"),f+=h.move(n.safe(e.url,{before:f,after:e.title?" ":`
27
+ `,...h.current()}))),d(),e.title&&(d=n.enter(`title${l}`),f+=h.move(" "+s),f+=h.move(n.safe(e.title,{before:f,after:s,...h.current()})),f+=h.move(s),d()),o(),f}function x9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Cu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fs(e){if(e===null||gt(e)||Ma(e))return 1;if(Td(e))return 2}function Zc(e,t,n){const i=Fs(e),s=Fs(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uT.peek=v9;function uT(e,t,n,i){const s=x9(n),l=n.enter("emphasis"),o=n.createTracker(i),d=o.move(s);let h=o.move(n.containerPhrasing(e,{after:s,before:d,...o.current()}));const f=h.charCodeAt(0),m=Zc(i.before.charCodeAt(i.before.length-1),f,s);m.inside&&(h=Cu(f)+h.slice(1));const b=h.charCodeAt(h.length-1),x=Zc(i.after.charCodeAt(0),b,s);x.inside&&(h=h.slice(0,-1)+Cu(b));const E=o.move(s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},d+h+E}function v9(e,t,n){return n.options.emphasis||"*"}const _9={};function Nm(e,t){const n=_9,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return oT(e,i,s)}function oT(e,t,n){if(T9(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wE(e.children,t,n)}return Array.isArray(e)?wE(e,t,n):""}function wE(e,t,n){const i=[];let s=-1;for(;++s<e.length;)i[s]=oT(e[s],t,n);return i.join("")}function T9(e){return!!(e&&typeof e=="object")}function A9(e,t){let n=!1;return Dr(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Ap}),!!((!e.depth||e.depth<3)&&Nm(e)&&(t.options.setext||n))}function S9(e,t,n,i){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(A9(e,n)){const m=n.enter("headingSetext"),b=n.enter("phrasing"),x=n.containerPhrasing(e,{...l.current(),before:`
28
+ `,after:`
29
+ `});return b(),m(),x+`
30
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
31
+ `))+1))}const o="#".repeat(s),d=n.enter("headingAtx"),h=n.enter("phrasing");l.move(o+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
32
+ `,...l.current()});return/^[\t ]/.test(f)&&(f=Cu(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,n.options.closeAtx&&(f+=" "+o),h(),d(),f}cT.peek=w9;function cT(e){return e.value||""}function w9(){return"<"}dT.peek=k9;function dT(e,t,n,i){const s=Cm(n),l=s==='"'?"Quote":"Apostrophe",o=n.enter("image");let d=n.enter("label");const h=n.createTracker(i);let f=h.move("![");return f+=h.move(n.safe(e.alt,{before:f,after:"]",...h.current()})),f+=h.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(n.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(d=n.enter("destinationRaw"),f+=h.move(n.safe(e.url,{before:f,after:e.title?" ":")",...h.current()}))),d(),e.title&&(d=n.enter(`title${l}`),f+=h.move(" "+s),f+=h.move(n.safe(e.title,{before:f,after:s,...h.current()})),f+=h.move(s),d()),f+=h.move(")"),o(),f}function k9(){return"!"}fT.peek=C9;function fT(e,t,n,i){const s=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const d=n.createTracker(i);let h=d.move("![");const f=n.safe(e.alt,{before:h,after:"]",...d.current()});h+=d.move(f+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const b=n.safe(n.associationId(e),{before:h,after:"]",...d.current()});return o(),n.stack=m,l(),s==="full"||!f||f!==b?h+=d.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function C9(){return"!"}hT.peek=N9;function hT(e,t,n){let i=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const o=n.unsafe[l],d=n.compilePattern(o);let h;if(o.atBreak)for(;h=d.exec(i);){let f=h.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(h.index+1)}}return s+i+s}function N9(){return"`"}function pT(e,t){const n=Nm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mT.peek=R9;function mT(e,t,n,i){const s=Cm(n),l=s==='"'?"Quote":"Apostrophe",o=n.createTracker(i);let d,h;if(pT(e,n)){const m=n.stack;n.stack=[],d=n.enter("autolink");let b=o.move("<");return b+=o.move(n.containerPhrasing(e,{before:b,after:">",...o.current()})),b+=o.move(">"),d(),n.stack=m,b}d=n.enter("link"),h=n.enter("label");let f=o.move("[");return f+=o.move(n.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(n.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(h=n.enter("destinationRaw"),f+=o.move(n.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),h(),e.title&&(h=n.enter(`title${l}`),f+=o.move(" "+s),f+=o.move(n.safe(e.title,{before:f,after:s,...o.current()})),f+=o.move(s),h()),f+=o.move(")"),d(),f}function R9(e,t,n){return pT(e,n)?"<":"["}gT.peek=O9;function gT(e,t,n,i){const s=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const d=n.createTracker(i);let h=d.move("[");const f=n.containerPhrasing(e,{before:h,after:"]",...d.current()});h+=d.move(f+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const b=n.safe(n.associationId(e),{before:h,after:"]",...d.current()});return o(),n.stack=m,l(),s==="full"||!f||f!==b?h+=d.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=d.move("]"),h}function O9(){return"["}function Rm(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function M9(e){const t=Rm(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function L9(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function bT(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function D9(e,t,n,i){const s=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?L9(n):Rm(n);const d=e.ordered?o==="."?")":".":M9(n);let h=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(h=!0),bT(n)===o&&m){let b=-1;for(;++b<e.children.length;){const x=e.children[b];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(o=d),n.bulletCurrent=o;const f=n.containerFlow(e,i);return n.bulletLastUsed=o,n.bulletCurrent=l,s(),f}function I9(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function B9(e,t,n,i){const s=I9(n);let l=n.bulletCurrent||Rm(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const d=n.createTracker(i);d.move(l+" ".repeat(o-l.length)),d.shift(o);const h=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,d.current()),m);return h(),f;function m(b,x,E){return x?(E?"":" ".repeat(o))+b:(E?l:l+" ".repeat(o-l.length))+b}}function z9(e,t,n,i){const s=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,i);return l(),s(),o}const P9=pd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function H9(e,t,n,i){return(e.children.some(function(o){return P9(o)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function U9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}yT.peek=j9;function yT(e,t,n,i){const s=U9(n),l=n.enter("strong"),o=n.createTracker(i),d=o.move(s+s);let h=o.move(n.containerPhrasing(e,{after:s,before:d,...o.current()}));const f=h.charCodeAt(0),m=Zc(i.before.charCodeAt(i.before.length-1),f,s);m.inside&&(h=Cu(f)+h.slice(1));const b=h.charCodeAt(h.length-1),x=Zc(i.after.charCodeAt(0),b,s);x.inside&&(h=h.slice(0,-1)+Cu(b));const E=o.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},d+h+E}function j9(e,t,n){return n.options.strong||"*"}function F9(e,t,n,i){return n.safe(e.value,i)}function $9(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function q9(e,t,n){const i=(bT(n)+(n.options.ruleSpaces?" ":"")).repeat($9(n));return n.options.ruleSpaces?i.slice(0,-1):i}const ET={blockquote:d9,break:SE,code:b9,definition:E9,emphasis:uT,hardBreak:SE,heading:S9,html:cT,image:dT,imageReference:fT,inlineCode:hT,link:mT,linkReference:gT,list:D9,listItem:B9,paragraph:z9,root:H9,strong:yT,text:F9,thematicBreak:q9},kE=document.createElement("i");function Om(e){const t="&"+e+";";kE.innerHTML=t;const n=kE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xT(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Y9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function V9(e){return e.replace(Y9,G9)}function G9(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return xT(n.slice(l?2:1),l?16:10)}return Om(n)||e}function W9(){return{enter:{table:X9,tableData:CE,tableHeader:CE,tableRow:K9},exit:{codeText:Z9,table:Q9,tableData:T0,tableHeader:T0,tableRow:T0}}}function X9(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Q9(e){this.exit(e),this.data.inTable=void 0}function K9(e){this.enter({type:"tableRow",children:[]},e)}function T0(e){this.exit(e)}function CE(e){this.enter({type:"tableCell",children:[]},e)}function Z9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,J9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function J9(e,t){return t==="|"?t:e}function eO(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
33
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:o,tableCell:h,tableRow:d}};function o(E,T,w,S){return f(m(E,w,S),E.align)}function d(E,T,w,S){const k=b(E,w,S),F=f([k]);return F.slice(0,F.indexOf(`
34
+ `))}function h(E,T,w,S){const k=w.enter("tableCell"),F=w.enter("phrasing"),H=w.containerPhrasing(E,{...S,before:l,after:l});return F(),k(),H}function f(E,T){return o9(E,{align:T,alignDelimiters:i,padding:n,stringLength:s})}function m(E,T,w){const S=E.children;let k=-1;const F=[],H=T.enter("table");for(;++k<S.length;)F[k]=b(S[k],T,w);return H(),F}function b(E,T,w){const S=E.children;let k=-1;const F=[],H=T.enter("tableRow");for(;++k<S.length;)F[k]=h(S[k],E,T,w);return H(),F}function x(E,T,w){let S=ET.inlineCode(E,T,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function tO(){return{exit:{taskListCheckValueChecked:NE,taskListCheckValueUnchecked:NE,paragraph:rO}}}function nO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:iO}}}function NE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function rO(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=t.children;let l=-1,o;for(;++l<s.length;){const d=s[l];if(d.type==="paragraph"){o=d;break}}o===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function iO(e,t,n,i){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",d=n.createTracker(i);l&&d.move(o);let h=ET.listItem(e,t,n,{...i,...d.current()});return l&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),h;function f(m){return m+o}}function aO(){return[MR(),JR(),r9(),W9(),tO()]}function sO(e){return{extensions:[LR(),e9(e),i9(),eO(e),nO()]}}function Yn(e,t,n,i){const s=e.length;let l=0,o;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<i.length;)o=i.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function lr(e,t){return e.length>0?(Yn(e,e.length,0,t),e):t}const RE={}.hasOwnProperty;function vT(e){const t={};let n=-1;for(;++n<e.length;)lO(t,e[n]);return t}function lO(e,t){let n;for(n in t){const s=(RE.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){RE.call(s,o)||(s[o]=[]);const d=l[o];uO(s[o],Array.isArray(d)?d:d?[d]:[])}}}function uO(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Yn(e,0,0,i)}const oO={tokenize:mO,partial:!0},_T={tokenize:gO,partial:!0},TT={tokenize:bO,partial:!0},AT={tokenize:yO,partial:!0},cO={tokenize:EO,partial:!0},ST={name:"wwwAutolink",tokenize:hO,previous:kT},wT={name:"protocolAutolink",tokenize:pO,previous:CT},si={name:"emailAutolink",tokenize:fO,previous:NT},Br={};function dO(){return{text:Br}}let ya=48;for(;ya<123;)Br[ya]=si,ya++,ya===58?ya=65:ya===91&&(ya=97);Br[43]=si;Br[45]=si;Br[46]=si;Br[95]=si;Br[72]=[si,wT];Br[104]=[si,wT];Br[87]=[si,ST];Br[119]=[si,ST];function fO(e,t,n){const i=this;let s,l;return o;function o(b){return!Dp(b)||!NT.call(i,i.previous)||Mm(i.events)?n(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(b))}function d(b){return Dp(b)?(e.consume(b),d):b===64?(e.consume(b),h):n(b)}function h(b){return b===46?e.check(cO,m,f)(b):b===45||b===95||an(b)?(l=!0,e.consume(b),h):m(b)}function f(b){return e.consume(b),s=!0,h}function m(b){return l&&s&&hn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):n(b)}}function hO(e,t,n){const i=this;return s;function s(o){return o!==87&&o!==119||!kT.call(i,i.previous)||Mm(i.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(oO,e.attempt(_T,e.attempt(TT,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function pO(e,t,n){const i=this;let s="",l=!1;return o;function o(b){return(b===72||b===104)&&CT.call(i,i.previous)&&!Mm(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),d):n(b)}function d(b){if(hn(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),d;if(b===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(b),h}return n(b)}function h(b){return b===47?(e.consume(b),l?f:(l=!0,h)):n(b)}function f(b){return b===null||Kc(b)||gt(b)||Ma(b)||Td(b)?n(b):e.attempt(_T,e.attempt(TT,m),n)(b)}function m(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function mO(e,t,n){let i=0;return s;function s(o){return(o===87||o===119)&&i<3?(i++,e.consume(o),s):o===46&&i===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function gO(e,t,n){let i,s,l;return o;function o(f){return f===46||f===95?e.check(AT,h,d)(f):f===null||gt(f)||Ma(f)||f!==45&&Td(f)?h(f):(l=!0,e.consume(f),o)}function d(f){return f===95?i=!0:(s=i,i=void 0),e.consume(f),o}function h(f){return s||i||!l?n(f):t(f)}}function bO(e,t){let n=0,i=0;return s;function s(o){return o===40?(n++,e.consume(o),s):o===41&&i<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(AT,t,l)(o):o===null||gt(o)||Ma(o)?t(o):(e.consume(o),s)}function l(o){return o===41&&i++,e.consume(o),s}}function yO(e,t,n){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),l):d===93?(e.consume(d),s):d===60||d===null||gt(d)||Ma(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||gt(d)||Ma(d)?t(d):i(d)}function l(d){return hn(d)?o(d):n(d)}function o(d){return d===59?(e.consume(d),i):hn(d)?(e.consume(d),o):n(d)}}function EO(e,t,n){return i;function i(l){return e.consume(l),s}function s(l){return an(l)?n(l):t(l)}}function kT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function CT(e){return!hn(e)}function NT(e){return!(e===47||Dp(e))}function Dp(e){return e===43||e===45||e===46||e===95||an(e)}function Mm(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Xs(e){const t=[];let n=-1,i=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&an(e.charCodeAt(n+1))&&an(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const d=e.charCodeAt(n+1);l<56320&&d>56319&&d<57344?(o=String.fromCharCode(l,d),s=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(i,n),encodeURIComponent(o)),i=n+s+1,o=""),s&&(n+=s,s=0)}return t.join("")+e.slice(i)}function Ad(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Ip={name:"attention",resolveAll:xO,tokenize:vO};function xO(e,t){let n=-1,i,s,l,o,d,h,f,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const b={...e[i][1].end},x={...e[n][1].start};OE(b,-h),OE(x,h),o={type:h>1?"strongSequence":"emphasisSequence",start:b,end:{...e[i][1].end}},d={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:h>1?"strong":"emphasis",start:{...o.start},end:{...d.end}},e[i][1].end={...o.start},e[n][1].start={...d.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=lr(f,[["enter",e[i][1],t],["exit",e[i][1],t]])),f=lr(f,[["enter",s,t],["enter",o,t],["exit",o,t],["enter",l,t]]),f=lr(f,Ad(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),f=lr(f,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=lr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Yn(e,i-1,n-i+3,f),n=i+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function vO(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=Fs(i);let l;return o;function o(h){return l=h,e.enter("attentionSequence"),d(h)}function d(h){if(h===l)return e.consume(h),d;const f=e.exit("attentionSequence"),m=Fs(h),b=!m||m===2&&s||n.includes(h),x=!s||s===2&&m||n.includes(i);return f._open=!!(l===42?b:b&&(s||!x)),f._close=!!(l===42?x:x&&(m||!b)),t(h)}}function OE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _O={name:"autolink",tokenize:TO};function TO(e,t,n){let i=0;return s;function s(E){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(E){return hn(E)?(e.consume(E),o):E===64?n(E):f(E)}function o(E){return E===43||E===45||E===46||an(E)?(i=1,d(E)):f(E)}function d(E){return E===58?(e.consume(E),i=0,h):(E===43||E===45||E===46||an(E))&&i++<32?(e.consume(E),d):(i=0,f(E))}function h(E){return E===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):E===null||E===32||E===60||Kc(E)?n(E):(e.consume(E),h)}function f(E){return E===64?(e.consume(E),m):AR(E)?(e.consume(E),f):n(E)}function m(E){return an(E)?b(E):n(E)}function b(E){return E===46?(e.consume(E),i=0,m):E===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):x(E)}function x(E){if((E===45||an(E))&&i++<63){const T=E===45?x:b;return e.consume(E),T}return n(E)}}function Ke(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(h){return Ge(h)?(e.enter(n),d(h)):t(h)}function d(h){return Ge(h)&&l++<s?(e.consume(h),d):(e.exit(n),t(h))}}const Yu={partial:!0,tokenize:AO};function AO(e,t,n){return i;function i(l){return Ge(l)?Ke(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||Ne(l)?t(l):n(l)}}const RT={continuation:{tokenize:wO},exit:kO,name:"blockQuote",tokenize:SO};function SO(e,t,n){const i=this;return s;function s(o){if(o===62){const d=i.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return Ge(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function wO(e,t,n){const i=this;return s;function s(o){return Ge(o)?Ke(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(RT,t,n)(o)}}function kO(e){e.exit("blockQuote")}const OT={name:"characterEscape",tokenize:CO};function CO(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return wR(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const MT={name:"characterReference",tokenize:NO};function NO(e,t,n){const i=this;let s=0,l,o;return d;function d(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),h}function h(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),l=31,o=an,m(b))}function f(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=SR,m):(e.enter("characterReferenceValue"),l=7,o=Lp,m(b))}function m(b){if(b===59&&s){const x=e.exit("characterReferenceValue");return o===an&&!Om(i.sliceSerialize(x))?n(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(b)&&s++<l?(e.consume(b),m):n(b)}}const ME={partial:!0,tokenize:OO},LE={concrete:!0,name:"codeFenced",tokenize:RO};function RO(e,t,n){const i=this,s={partial:!0,tokenize:J};let l=0,o=0,d;return h;function h(j){return f(j)}function f(j){const ne=i.events[i.events.length-1];return l=ne&&ne[1].type==="linePrefix"?ne[2].sliceSerialize(ne[1],!0).length:0,d=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===d?(o++,e.consume(j),m):o<3?n(j):(e.exit("codeFencedFenceSequence"),Ge(j)?Ke(e,b,"whitespace")(j):b(j))}function b(j){return j===null||Ne(j)?(e.exit("codeFencedFence"),i.interrupt?t(j):e.check(ME,w,V)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||Ne(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(j)):Ge(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,E,"whitespace")(j)):j===96&&j===d?n(j):(e.consume(j),x)}function E(j){return j===null||Ne(j)?b(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(j))}function T(j){return j===null||Ne(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(j)):j===96&&j===d?n(j):(e.consume(j),T)}function w(j){return e.attempt(s,V,S)(j)}function S(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),k}function k(j){return l>0&&Ge(j)?Ke(e,F,"linePrefix",l+1)(j):F(j)}function F(j){return j===null||Ne(j)?e.check(ME,w,V)(j):(e.enter("codeFlowValue"),H(j))}function H(j){return j===null||Ne(j)?(e.exit("codeFlowValue"),F(j)):(e.consume(j),H)}function V(j){return e.exit("codeFenced"),t(j)}function J(j,ne,Z){let fe=0;return z;function z(le){return j.enter("lineEnding"),j.consume(le),j.exit("lineEnding"),$}function $(le){return j.enter("codeFencedFence"),Ge(le)?Ke(j,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(le):Y(le)}function Y(le){return le===d?(j.enter("codeFencedFenceSequence"),_e(le)):Z(le)}function _e(le){return le===d?(fe++,j.consume(le),_e):fe>=o?(j.exit("codeFencedFenceSequence"),Ge(le)?Ke(j,oe,"whitespace")(le):oe(le)):Z(le)}function oe(le){return le===null||Ne(le)?(j.exit("codeFencedFence"),ne(le)):Z(le)}}}function OO(e,t,n){const i=this;return s;function s(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return i.parser.lazy[i.now().line]?n(o):t(o)}}const A0={name:"codeIndented",tokenize:LO},MO={partial:!0,tokenize:DO};function LO(e,t,n){const i=this;return s;function s(f){return e.enter("codeIndented"),Ke(e,l,"linePrefix",5)(f)}function l(f){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?o(f):n(f)}function o(f){return f===null?h(f):Ne(f)?e.attempt(MO,o,h)(f):(e.enter("codeFlowValue"),d(f))}function d(f){return f===null||Ne(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),d)}function h(f){return e.exit("codeIndented"),t(f)}}function DO(e,t,n){const i=this;return s;function s(o){return i.parser.lazy[i.now().line]?n(o):Ne(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):Ke(e,l,"linePrefix",5)(o)}function l(o){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(o):Ne(o)?s(o):n(o)}}const IO={name:"codeText",previous:zO,resolve:BO,tokenize:PO};function BO(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function zO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PO(e,t,n){let i=0,s,l;return o;function o(b){return e.enter("codeText"),e.enter("codeTextSequence"),d(b)}function d(b){return b===96?(e.consume(b),i++,d):(e.exit("codeTextSequence"),h(b))}function h(b){return b===null?n(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),h):b===96?(l=e.enter("codeTextSequence"),s=0,m(b)):Ne(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("codeTextData"),f(b))}function f(b){return b===null||b===32||b===96||Ne(b)?(e.exit("codeTextData"),h(b)):(e.consume(b),f)}function m(b){return b===96?(e.consume(b),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(b)):(l.type="codeTextData",f(b))}}class HO{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&Jl(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Jl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Jl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jl(this.left,n.reverse())}}}function Jl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function LT(e){const t={};let n=-1,i,s,l,o,d,h,f;const m=new HO(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,l=0,l<h.length&&h[l][1].type==="lineEndingBlank"&&(l+=2),l<h.length&&h[l][1].type==="content"))for(;++l<h.length&&h[l][1].type!=="content";)h[l][1].type==="chunkText"&&(h[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,UO(m,n)),n=t[n],f=!0);else if(i[1]._container){for(l=n,s=void 0;l--;)if(o=m.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),o[1].type="lineEnding",s=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},d=m.slice(s,n),d.unshift(i),m.splice(s,n-s+1,d))}}return Yn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function UO(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const l=[];let o=n._tokenizer;o||(o=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const d=o.events,h=[],f={};let m,b,x=-1,E=n,T=0,w=0;const S=[w];for(;E;){for(;e.get(++s)[1]!==E;);l.push(s),E._tokenizer||(m=i.sliceStream(E),E.next||m.push(null),b&&o.defineSkip(E.start),E._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(m),E._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),b=E,E=E.next}for(E=n;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(w=x+1,S.push(w),E._tokenizer=void 0,E.previous=void 0,E=E.next);for(o.events=[],E?(E._tokenizer=void 0,E.previous=void 0):S.pop(),x=S.length;x--;){const k=d.slice(S[x],S[x+1]),F=l.pop();h.push([F,F+k.length-1]),e.splice(F,2,k)}for(h.reverse(),x=-1;++x<h.length;)f[T+h[x][0]]=T+h[x][1],T+=h[x][1]-h[x][0]-1;return f}const jO={resolve:$O,tokenize:qO},FO={partial:!0,tokenize:YO};function $O(e){return LT(e),e}function qO(e,t){let n;return i;function i(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?l(d):Ne(d)?e.check(FO,o,l)(d):(e.consume(d),s)}function l(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function o(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function YO(e,t,n){const i=this;return s;function s(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ke(e,l,"linePrefix")}function l(o){if(o===null||Ne(o))return n(o);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(o):e.interrupt(i.parser.constructs.flow,n,t)(o)}}function DT(e,t,n,i,s,l,o,d,h){const f=h||Number.POSITIVE_INFINITY;let m=0;return b;function b(k){return k===60?(e.enter(i),e.enter(s),e.enter(l),e.consume(k),e.exit(l),x):k===null||k===32||k===41||Kc(k)?n(k):(e.enter(i),e.enter(o),e.enter(d),e.enter("chunkString",{contentType:"string"}),w(k))}function x(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(s),e.exit(i),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),E(k))}function E(k){return k===62?(e.exit("chunkString"),e.exit(d),x(k)):k===null||k===60||Ne(k)?n(k):(e.consume(k),k===92?T:E)}function T(k){return k===60||k===62||k===92?(e.consume(k),E):E(k)}function w(k){return!m&&(k===null||k===41||gt(k))?(e.exit("chunkString"),e.exit(d),e.exit(o),e.exit(i),t(k)):m<f&&k===40?(e.consume(k),m++,w):k===41?(e.consume(k),m--,w):k===null||k===32||k===40||Kc(k)?n(k):(e.consume(k),k===92?S:w)}function S(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function IT(e,t,n,i,s,l){const o=this;let d=0,h;return f;function f(E){return e.enter(i),e.enter(s),e.consume(E),e.exit(s),e.enter(l),m}function m(E){return d>999||E===null||E===91||E===93&&!h||E===94&&!d&&"_hiddenFootnoteSupport"in o.parser.constructs?n(E):E===93?(e.exit(l),e.enter(s),e.consume(E),e.exit(s),e.exit(i),t):Ne(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===null||E===91||E===93||Ne(E)||d++>999?(e.exit("chunkString"),m(E)):(e.consume(E),h||(h=!Ge(E)),E===92?x:b)}function x(E){return E===91||E===92||E===93?(e.consume(E),d++,b):b(E)}}function BT(e,t,n,i,s,l){let o;return d;function d(x){return x===34||x===39||x===40?(e.enter(i),e.enter(s),e.consume(x),e.exit(s),o=x===40?41:x,h):n(x)}function h(x){return x===o?(e.enter(s),e.consume(x),e.exit(s),e.exit(i),t):(e.enter(l),f(x))}function f(x){return x===o?(e.exit(l),h(o)):x===null?n(x):Ne(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ke(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===o||x===null||Ne(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?b:m)}function b(x){return x===o||x===92?(e.consume(x),m):m(x)}}function vu(e,t){let n;return i;function i(s){return Ne(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):Ge(s)?Ke(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const VO={name:"definition",tokenize:WO},GO={partial:!0,tokenize:XO};function WO(e,t,n){const i=this;let s;return l;function l(E){return e.enter("definition"),o(E)}function o(E){return IT.call(i,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(E)}function d(E){return s=br(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),h):n(E)}function h(E){return gt(E)?vu(e,f)(E):f(E)}function f(E){return DT(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(E)}function m(E){return e.attempt(GO,b,b)(E)}function b(E){return Ge(E)?Ke(e,x,"whitespace")(E):x(E)}function x(E){return E===null||Ne(E)?(e.exit("definition"),i.parser.defined.push(s),t(E)):n(E)}}function XO(e,t,n){return i;function i(d){return gt(d)?vu(e,s)(d):n(d)}function s(d){return BT(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return Ge(d)?Ke(e,o,"whitespace")(d):o(d)}function o(d){return d===null||Ne(d)?t(d):n(d)}}const QO={name:"hardBreakEscape",tokenize:KO};function KO(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return Ne(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const ZO={name:"headingAtx",resolve:JO,tokenize:eM};function JO(e,t){let n=e.length-2,i=3,s,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Yn(e,i,n-i+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function eM(e,t,n){let i=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),o(m)}function o(m){return m===35&&i++<6?(e.consume(m),o):m===null||gt(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Ne(m)?(e.exit("atxHeading"),t(m)):Ge(m)?Ke(e,d,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),d(m))}function f(m){return m===null||m===35||gt(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),f)}}const tM=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],DE=["pre","script","style","textarea"],nM={concrete:!0,name:"htmlFlow",resolveTo:aM,tokenize:sM},rM={partial:!0,tokenize:uM},iM={partial:!0,tokenize:lM};function aM(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function sM(e,t,n){const i=this;let s,l,o,d,h;return f;function f(C){return m(C)}function m(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),b}function b(C){return C===33?(e.consume(C),x):C===47?(e.consume(C),l=!0,w):C===63?(e.consume(C),s=3,i.interrupt?t:O):hn(C)?(e.consume(C),o=String.fromCharCode(C),S):n(C)}function x(C){return C===45?(e.consume(C),s=2,E):C===91?(e.consume(C),s=5,d=0,T):hn(C)?(e.consume(C),s=4,i.interrupt?t:O):n(C)}function E(C){return C===45?(e.consume(C),i.interrupt?t:O):n(C)}function T(C){const ce="CDATA[";return C===ce.charCodeAt(d++)?(e.consume(C),d===ce.length?i.interrupt?t:Y:T):n(C)}function w(C){return hn(C)?(e.consume(C),o=String.fromCharCode(C),S):n(C)}function S(C){if(C===null||C===47||C===62||gt(C)){const ce=C===47,Ee=o.toLowerCase();return!ce&&!l&&DE.includes(Ee)?(s=1,i.interrupt?t(C):Y(C)):tM.includes(o.toLowerCase())?(s=6,ce?(e.consume(C),k):i.interrupt?t(C):Y(C)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(C):l?F(C):H(C))}return C===45||an(C)?(e.consume(C),o+=String.fromCharCode(C),S):n(C)}function k(C){return C===62?(e.consume(C),i.interrupt?t:Y):n(C)}function F(C){return Ge(C)?(e.consume(C),F):z(C)}function H(C){return C===47?(e.consume(C),z):C===58||C===95||hn(C)?(e.consume(C),V):Ge(C)?(e.consume(C),H):z(C)}function V(C){return C===45||C===46||C===58||C===95||an(C)?(e.consume(C),V):J(C)}function J(C){return C===61?(e.consume(C),j):Ge(C)?(e.consume(C),J):H(C)}function j(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),h=C,ne):Ge(C)?(e.consume(C),j):Z(C)}function ne(C){return C===h?(e.consume(C),h=null,fe):C===null||Ne(C)?n(C):(e.consume(C),ne)}function Z(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||gt(C)?J(C):(e.consume(C),Z)}function fe(C){return C===47||C===62||Ge(C)?H(C):n(C)}function z(C){return C===62?(e.consume(C),$):n(C)}function $(C){return C===null||Ne(C)?Y(C):Ge(C)?(e.consume(C),$):n(C)}function Y(C){return C===45&&s===2?(e.consume(C),I):C===60&&s===1?(e.consume(C),te):C===62&&s===4?(e.consume(C),D):C===63&&s===3?(e.consume(C),O):C===93&&s===5?(e.consume(C),ke):Ne(C)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(rM,P,_e)(C)):C===null||Ne(C)?(e.exit("htmlFlowData"),_e(C)):(e.consume(C),Y)}function _e(C){return e.check(iM,oe,P)(C)}function oe(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),le}function le(C){return C===null||Ne(C)?_e(C):(e.enter("htmlFlowData"),Y(C))}function I(C){return C===45?(e.consume(C),O):Y(C)}function te(C){return C===47?(e.consume(C),o="",be):Y(C)}function be(C){if(C===62){const ce=o.toLowerCase();return DE.includes(ce)?(e.consume(C),D):Y(C)}return hn(C)&&o.length<8?(e.consume(C),o+=String.fromCharCode(C),be):Y(C)}function ke(C){return C===93?(e.consume(C),O):Y(C)}function O(C){return C===62?(e.consume(C),D):C===45&&s===2?(e.consume(C),O):Y(C)}function D(C){return C===null||Ne(C)?(e.exit("htmlFlowData"),P(C)):(e.consume(C),D)}function P(C){return e.exit("htmlFlow"),t(C)}}function lM(e,t,n){const i=this;return s;function s(o){return Ne(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return i.parser.lazy[i.now().line]?n(o):t(o)}}function uM(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Yu,t,n)}}const oM={name:"htmlText",tokenize:cM};function cM(e,t,n){const i=this;let s,l,o;return d;function d(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),J):O===63?(e.consume(O),H):hn(O)?(e.consume(O),Z):n(O)}function f(O){return O===45?(e.consume(O),m):O===91?(e.consume(O),l=0,T):hn(O)?(e.consume(O),F):n(O)}function m(O){return O===45?(e.consume(O),E):n(O)}function b(O){return O===null?n(O):O===45?(e.consume(O),x):Ne(O)?(o=b,te(O)):(e.consume(O),b)}function x(O){return O===45?(e.consume(O),E):b(O)}function E(O){return O===62?I(O):O===45?x(O):b(O)}function T(O){const D="CDATA[";return O===D.charCodeAt(l++)?(e.consume(O),l===D.length?w:T):n(O)}function w(O){return O===null?n(O):O===93?(e.consume(O),S):Ne(O)?(o=w,te(O)):(e.consume(O),w)}function S(O){return O===93?(e.consume(O),k):w(O)}function k(O){return O===62?I(O):O===93?(e.consume(O),k):w(O)}function F(O){return O===null||O===62?I(O):Ne(O)?(o=F,te(O)):(e.consume(O),F)}function H(O){return O===null?n(O):O===63?(e.consume(O),V):Ne(O)?(o=H,te(O)):(e.consume(O),H)}function V(O){return O===62?I(O):H(O)}function J(O){return hn(O)?(e.consume(O),j):n(O)}function j(O){return O===45||an(O)?(e.consume(O),j):ne(O)}function ne(O){return Ne(O)?(o=ne,te(O)):Ge(O)?(e.consume(O),ne):I(O)}function Z(O){return O===45||an(O)?(e.consume(O),Z):O===47||O===62||gt(O)?fe(O):n(O)}function fe(O){return O===47?(e.consume(O),I):O===58||O===95||hn(O)?(e.consume(O),z):Ne(O)?(o=fe,te(O)):Ge(O)?(e.consume(O),fe):I(O)}function z(O){return O===45||O===46||O===58||O===95||an(O)?(e.consume(O),z):$(O)}function $(O){return O===61?(e.consume(O),Y):Ne(O)?(o=$,te(O)):Ge(O)?(e.consume(O),$):fe(O)}function Y(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,_e):Ne(O)?(o=Y,te(O)):Ge(O)?(e.consume(O),Y):(e.consume(O),oe)}function _e(O){return O===s?(e.consume(O),s=void 0,le):O===null?n(O):Ne(O)?(o=_e,te(O)):(e.consume(O),_e)}function oe(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||gt(O)?fe(O):(e.consume(O),oe)}function le(O){return O===47||O===62||gt(O)?fe(O):n(O)}function I(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function te(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return Ge(O)?Ke(e,ke,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):ke(O)}function ke(O){return e.enter("htmlTextData"),o(O)}}const Lm={name:"labelEnd",resolveAll:pM,resolveTo:mM,tokenize:gM},dM={tokenize:bM},fM={tokenize:yM},hM={tokenize:EM};function pM(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&Yn(e,0,e.length,n),e}function mM(e,t){let n=e.length,i=0,s,l,o,d;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(o=n);const h={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},m={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[o-2][1].start}};return d=[["enter",h,t],["enter",f,t]],d=lr(d,e.slice(l+1,l+i+3)),d=lr(d,[["enter",m,t]]),d=lr(d,Ad(t.parser.constructs.insideSpan.null,e.slice(l+i+4,o-3),t)),d=lr(d,[["exit",m,t],e[o-2],e[o-1],["exit",f,t]]),d=lr(d,e.slice(o+1)),d=lr(d,[["exit",h,t]]),Yn(e,l,e.length,d),e}function gM(e,t,n){const i=this;let s=i.events.length,l,o;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){l=i.events[s][1];break}return d;function d(x){return l?l._inactive?b(x):(o=i.parser.defined.includes(br(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),h):n(x)}function h(x){return x===40?e.attempt(dM,m,o?m:b)(x):x===91?e.attempt(fM,m,o?f:b)(x):o?m(x):b(x)}function f(x){return e.attempt(hM,m,b)(x)}function m(x){return t(x)}function b(x){return l._balanced=!0,n(x)}}function bM(e,t,n){return i;function i(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return gt(b)?vu(e,l)(b):l(b)}function l(b){return b===41?m(b):DT(e,o,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function o(b){return gt(b)?vu(e,h)(b):m(b)}function d(b){return n(b)}function h(b){return b===34||b===39||b===40?BT(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):m(b)}function f(b){return gt(b)?vu(e,m)(b):m(b)}function m(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),t):n(b)}}function yM(e,t,n){const i=this;return s;function s(d){return IT.call(i,e,l,o,"reference","referenceMarker","referenceString")(d)}function l(d){return i.parser.defined.includes(br(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function o(d){return n(d)}}function EM(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const xM={name:"labelStartImage",resolveAll:Lm.resolveAll,tokenize:vM};function vM(e,t,n){const i=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),l}function l(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),o):n(d)}function o(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):t(d)}}const _M={name:"labelStartLink",resolveAll:Lm.resolveAll,tokenize:TM};function TM(e,t,n){const i=this;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(o):t(o)}}const S0={name:"lineEnding",tokenize:AM};function AM(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const Hc={name:"thematicBreak",tokenize:SM};function SM(e,t,n){let i=0,s;return l;function l(f){return e.enter("thematicBreak"),o(f)}function o(f){return s=f,d(f)}function d(f){return f===s?(e.enter("thematicBreakSequence"),h(f)):i>=3&&(f===null||Ne(f))?(e.exit("thematicBreak"),t(f)):n(f)}function h(f){return f===s?(e.consume(f),i++,h):(e.exit("thematicBreakSequence"),Ge(f)?Ke(e,d,"whitespace")(f):d(f))}}const Sn={continuation:{tokenize:NM},exit:OM,name:"list",tokenize:CM},wM={partial:!0,tokenize:MM},kM={partial:!0,tokenize:RM};function CM(e,t,n){const i=this,s=i.events[i.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return d;function d(E){const T=i.containerState.type||(E===42||E===43||E===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!i.containerState.marker||E===i.containerState.marker:Lp(E)){if(i.containerState.type||(i.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),E===42||E===45?e.check(Hc,n,f)(E):f(E);if(!i.interrupt||E===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(E)}return n(E)}function h(E){return Lp(E)&&++o<10?(e.consume(E),h):(!i.interrupt||o<2)&&(i.containerState.marker?E===i.containerState.marker:E===41||E===46)?(e.exit("listItemValue"),f(E)):n(E)}function f(E){return e.enter("listItemMarker"),e.consume(E),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||E,e.check(Yu,i.interrupt?n:m,e.attempt(wM,x,b))}function m(E){return i.containerState.initialBlankLine=!0,l++,x(E)}function b(E){return Ge(E)?(e.enter("listItemPrefixWhitespace"),e.consume(E),e.exit("listItemPrefixWhitespace"),x):n(E)}function x(E){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(E)}}function NM(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Yu,s,l);function s(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ke(e,t,"listItemIndent",i.containerState.size+1)(d)}function l(d){return i.containerState.furtherBlankLines||!Ge(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(kM,t,o)(d))}function o(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ke(e,e.attempt(Sn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function RM(e,t,n){const i=this;return Ke(e,s,"listItemIndent",i.containerState.size+1);function s(l){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?t(l):n(l)}}function OM(e){e.exit(this.containerState.type)}function MM(e,t,n){const i=this;return Ke(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const o=i.events[i.events.length-1];return!Ge(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const IE={name:"setextUnderline",resolveTo:LM,tokenize:DM};function LM(e,t){let n=e.length,i,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",o,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=o,e.push(["exit",o,t]),e}function DM(e,t,n){const i=this;let s;return l;function l(f){let m=i.events.length,b;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){b=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||b)?(e.enter("setextHeadingLine"),s=f,o(f)):n(f)}function o(f){return e.enter("setextHeadingLineSequence"),d(f)}function d(f){return f===s?(e.consume(f),d):(e.exit("setextHeadingLineSequence"),Ge(f)?Ke(e,h,"lineSuffix")(f):h(f))}function h(f){return f===null||Ne(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const IM={tokenize:$M,partial:!0};function BM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:UM,continuation:{tokenize:jM},exit:FM}},text:{91:{name:"gfmFootnoteCall",tokenize:HM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zM,resolveTo:PM}}}}function zM(e,t,n){const i=this;let s=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;s--;){const h=i.events[s][1];if(h.type==="labelImage"){o=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return d;function d(h){if(!o||!o._balanced)return n(h);const f=br(i.sliceSerialize({start:o.end,end:i.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function PM(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},d=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...d),e}function HM(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,o;return d;function d(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?n(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(b){if(l>999||b===93&&!o||b===null||b===91||gt(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(br(i.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(b)}return gt(b)||(o=!0),l++,e.consume(b),b===92?m:f}function m(b){return b===91||b===92||b===93?(e.consume(b),l++,f):f(b)}}function UM(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,o=0,d;return h;function h(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(T)}function m(T){if(o>999||T===93&&!d||T===null||T===91||gt(T))return n(T);if(T===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return l=br(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return gt(T)||(d=!0),o++,e.consume(T),T===92?b:m}function b(T){return T===91||T===92||T===93?(e.consume(T),o++,m):m(T)}function x(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),s.includes(l)||s.push(l),Ke(e,E,"gfmFootnoteDefinitionWhitespace")):n(T)}function E(T){return t(T)}}function jM(e,t,n){return e.check(Yu,t,e.attempt(IM,t,n))}function FM(e){e.exit("gfmFootnoteDefinition")}function $M(e,t,n){const i=this;return Ke(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function qM(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(o,d){let h=-1;for(;++h<o.length;)if(o[h][0]==="enter"&&o[h][1].type==="strikethroughSequenceTemporary"&&o[h][1]._close){let f=h;for(;f--;)if(o[f][0]==="exit"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._open&&o[h][1].end.offset-o[h][1].start.offset===o[f][1].end.offset-o[f][1].start.offset){o[h][1].type="strikethroughSequence",o[f][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},o[f][1].start),end:Object.assign({},o[h][1].end)},b={type:"strikethroughText",start:Object.assign({},o[f][1].end),end:Object.assign({},o[h][1].start)},x=[["enter",m,d],["enter",o[f][1],d],["exit",o[f][1],d],["enter",b,d]],E=d.parser.constructs.insideSpan.null;E&&Yn(x,x.length,0,Ad(E,o.slice(f+1,h),d)),Yn(x,x.length,0,[["exit",b,d],["enter",o[h][1],d],["exit",o[h][1],d],["exit",m,d]]),Yn(o,f-1,h-f+3,x),h=f+x.length-2;break}}for(h=-1;++h<o.length;)o[h][1].type==="strikethroughSequenceTemporary"&&(o[h][1].type="data");return o}function l(o,d,h){const f=this.previous,m=this.events;let b=0;return x;function x(T){return f===126&&m[m.length-1][1].type!=="characterEscape"?h(T):(o.enter("strikethroughSequenceTemporary"),E(T))}function E(T){const w=Fs(f);if(T===126)return b>1?h(T):(o.consume(T),b++,E);if(b<2&&!n)return h(T);const S=o.exit("strikethroughSequenceTemporary"),k=Fs(T);return S._open=!k||k===2&&!!w,S._close=!w||w===2&&!!k,d(T)}}}class YM{constructor(){this.map=[]}add(t,n,i){VM(this,t,n,i)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const l of s)t.push(l);s=i.pop()}this.map.length=0}}function VM(e,t,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...i);return}s+=1}e.map.push([t,n,i])}}function GM(e,t){let n=!1;const i=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function WM(){return{flow:{null:{name:"table",tokenize:XM,resolveAll:QM}}}}function XM(e,t,n){const i=this;let s=0,l=0,o;return d;function d(z){let $=i.events.length-1;for(;$>-1;){const oe=i.events[$][1].type;if(oe==="lineEnding"||oe==="linePrefix")$--;else break}const Y=$>-1?i.events[$][1].type:null,_e=Y==="tableHead"||Y==="tableRow"?j:h;return _e===j&&i.parser.lazy[i.now().line]?n(z):_e(z)}function h(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(o=!0,l+=1),m(z)}function m(z){return z===null?n(z):Ne(z)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),E):n(z):Ge(z)?Ke(e,m,"whitespace")(z):(l+=1,o&&(o=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),o=!0,m):(e.enter("data"),b(z)))}function b(z){return z===null||z===124||gt(z)?(e.exit("data"),m(z)):(e.consume(z),z===92?x:b)}function x(z){return z===92||z===124?(e.consume(z),b):b(z)}function E(z){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(z):(e.enter("tableDelimiterRow"),o=!1,Ge(z)?Ke(e,T,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):T(z))}function T(z){return z===45||z===58?S(z):z===124?(o=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),w):J(z)}function w(z){return Ge(z)?Ke(e,S,"whitespace")(z):S(z)}function S(z){return z===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),k):z===45?(l+=1,k(z)):z===null||Ne(z)?V(z):J(z)}function k(z){return z===45?(e.enter("tableDelimiterFiller"),F(z)):J(z)}function F(z){return z===45?(e.consume(z),F):z===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),H):(e.exit("tableDelimiterFiller"),H(z))}function H(z){return Ge(z)?Ke(e,V,"whitespace")(z):V(z)}function V(z){return z===124?T(z):z===null||Ne(z)?!o||s!==l?J(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):J(z)}function J(z){return n(z)}function j(z){return e.enter("tableRow"),ne(z)}function ne(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),ne):z===null||Ne(z)?(e.exit("tableRow"),t(z)):Ge(z)?Ke(e,ne,"whitespace")(z):(e.enter("data"),Z(z))}function Z(z){return z===null||z===124||gt(z)?(e.exit("data"),ne(z)):(e.consume(z),z===92?fe:Z)}function fe(z){return z===92||z===124?(e.consume(z),Z):Z(z)}}function QM(e,t){let n=-1,i=!0,s=0,l=[0,0,0,0],o=[0,0,0,0],d=!1,h=0,f,m,b;const x=new YM;for(;++n<e.length;){const E=e[n],T=E[1];E[0]==="enter"?T.type==="tableHead"?(d=!1,h!==0&&(BE(x,t,h,f,m),m=void 0,h=0),f={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},x.add(n,0,[["enter",f,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(i=!0,b=void 0,l=[0,0,0,0],o=[0,n+1,0,0],d&&(d=!1,m={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},x.add(n,0,[["enter",m,t]])),s=T.type==="tableDelimiterRow"?2:m?3:1):s&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(i=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],b=Ec(x,t,l,s,void 0,b),l=[0,0,0,0]),o[2]=n)):T.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(o[0]=o[1],b=Ec(x,t,l,s,void 0,b)),l=o,o=[l[1],n,0,0])):T.type==="tableHead"?(d=!0,h=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(h=n,l[1]!==0?(o[0]=o[1],b=Ec(x,t,l,s,n,b)):o[1]!==0&&(b=Ec(x,t,o,s,n,b)),s=0):s&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(o[3]=n)}for(h!==0&&BE(x,t,h,f,m),x.consume(t.events),n=-1;++n<t.events.length;){const E=t.events[n];E[0]==="enter"&&E[1].type==="table"&&(E[1]._align=GM(t.events,n))}return e}function Ec(e,t,n,i,s,l){const o=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(l.end=Object.assign({},Rs(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const h=Rs(t.events,n[1]);if(l={type:o,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const f=Rs(t.events,n[2]),m=Rs(t.events,n[3]),b={type:d,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",b,t]]),i!==2){const x=t.events[n[2]],E=t.events[n[3]];if(x[1].end=Object.assign({},E[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,w=n[3]-n[2]-1;e.add(T,w,[])}}e.add(n[3]+1,0,[["exit",b,t]])}return s!==void 0&&(l.end=Object.assign({},Rs(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function BE(e,t,n,i,s){const l=[],o=Rs(t.events,n);s&&(s.end=Object.assign({},o),l.push(["exit",s,t])),i.end=Object.assign({},o),l.push(["exit",i,t]),e.add(n+1,0,l)}function Rs(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const KM={name:"tasklistCheck",tokenize:JM};function ZM(){return{text:{91:KM}}}function JM(e,t,n){const i=this;return s;function s(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),l)}function l(h){return gt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),o):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),o):n(h)}function o(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(h)}function d(h){return Ne(h)?t(h):Ge(h)?e.check({tokenize:eL},t,n)(h):n(h)}}function eL(e,t,n){return Ke(e,i,"whitespace");function i(s){return s===null?n(s):t(s)}}function tL(e){return vT([dO(),BM(),qM(e),WM(),ZM()])}const nL={};function rL(e){const t=this,n=e||nL,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(tL(n)),l.push(aO()),o.push(sO(n))}var iL=Object.defineProperty,aL=Object.defineProperties,sL=Object.getOwnPropertyDescriptors,zE=Object.getOwnPropertySymbols,lL=Object.prototype.hasOwnProperty,uL=Object.prototype.propertyIsEnumerable,PE=(e,t,n)=>t in e?iL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zT=(e,t)=>{for(var n in t||(t={}))lL.call(t,n)&&PE(e,n,t[n]);if(zE)for(var n of zE(t))uL.call(t,n)&&PE(e,n,t[n]);return e},PT=(e,t)=>aL(e,sL(t)),Nn=(e,t)=>{let n=!1,i=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){i=!i,s+=2;continue}!i&&e[s]==="`"&&(n=!n)}return n||i},oL=(e,t)=>{let n=e.substring(t,t+3)==="```",i=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||i||s},cL=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!oL(e,n)&&(t+=1)}return t},Vi=(e,t)=>{let n=!1,i=!1,s=-1;for(let l=0;l<e.length;l+=1){if(e[l]==="\\"&&l+1<e.length&&e[l+1]==="`"){l+=1;continue}if(e.substring(l,l+3)==="```"){i=!i,l+=2;continue}if(!i&&e[l]==="`")if(n){if(s<t&&t<l)return!0;n=!1,s=-1}else n=!0,s=l}return!1},dL=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,fL=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(dL,(t,n,i,s)=>Nn(e,s)?t:`${n}\\>${i}`),hL=/(\*\*)([^*]*\*?)$/,pL=/(__)([^_]*?)$/,mL=/(\*\*\*)([^*]*?)$/,gL=/(\*)([^*]*?)$/,bL=/(_)([^_]*?)$/,yL=/(`)([^`]*?)$/,EL=/(~~)([^~]*?)$/,Ba=/^[\s_~*`]*$/,HT=/^[\s]*[-*+][\s]+$/,xL=/[\p{L}\p{N}_]/u,vL=/^```[^`\n]*```?$/,_L=/^\*{4,}$/,TL=/(__)([^_]+)_$/,AL=/(~~)([^~]+)~$/,HE=/~~/g,Gi=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:xL.test(e)},SL=(e,t)=>{let n=1;for(let i=t-1;i>=0;i-=1)if(e[i]==="]")n+=1;else if(e[i]==="["&&(n-=1,n===0))return i;return-1},UT=(e,t)=>{let n=1;for(let i=t+1;i<e.length;i+=1)if(e[i]==="[")n+=1;else if(e[i]==="]"&&(n-=1,n===0))return i;return-1},Sd=(e,t)=>{let n=!1,i=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(i=!i,s+=1,n=!1):i||(n=!n))}return n||i},wL=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
35
+ `)return!1}return!1},jT=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?wL(e,t):!1;if(e[n]===`
36
+ `)return!1}return!1},kL=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let i=n+1<e.length?e[n+1]:"";return i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="/"}if(e[n]===`
37
+ `)return!1}return!1},Dm=(e,t,n)=>{let i=0;for(let h=t-1;h>=0;h-=1)if(e[h]===`
38
+ `){i=h+1;break}let s=e.length;for(let h=t;h<e.length;h+=1)if(e[h]===`
39
+ `){s=h;break}let l=e.substring(i,s),o=0,d=!1;for(let h of l)if(h===n)o+=1;else if(h!==" "&&h!==" "){d=!0;break}return o>=3&&!d},CL=(e,t,n,i)=>n==="\\"||e.includes("$")&&Sd(e,t)?!0:n!=="*"&&i==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&i&&Gi(n)&&Gi(i)||(!n||n===" "||n===" "||n===`
40
+ `)&&(!i||i===" "||i===" "||i===`
41
+ `)),FT=e=>{let t=0,n=!1,i=e.length;for(let s=0;s<i;s+=1){if(e[s]==="`"&&s+2<i&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="*")continue;let l=s>0?e[s-1]:"",o=s<i-1?e[s+1]:"";CL(e,s,l,o)||(t+=1)}return t},NL=(e,t,n,i)=>!!(n==="\\"||e.includes("$")&&Sd(e,t)||jT(e,t)||kL(e,t)||n==="_"||i==="_"||n&&i&&Gi(n)&&Gi(i)),RL=e=>{let t=0,n=!1,i=e.length;for(let s=0;s<i;s+=1){if(e[s]==="`"&&s+2<i&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="_")continue;let l=s>0?e[s-1]:"",o=s<i-1?e[s+1]:"";NL(e,s,l,o)||(t+=1)}return t},OL=e=>{let t=0,n=0,i=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,i=!i,s+=2;continue}i||(e[s]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},Im=e=>{let t=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}n||e[i]==="*"&&i+1<e.length&&e[i+1]==="*"&&(t+=1,i+=1)}return t},UE=e=>{let t=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}n||e[i]==="_"&&i+1<e.length&&e[i+1]==="_"&&(t+=1,i+=1)}return t},ML=(e,t,n)=>{if(!t||Ba.test(t))return!0;let i=e.substring(0,n).lastIndexOf(`
42
+ `),s=i===-1?0:i+1,l=e.substring(s,n);return HT.test(l)&&t.includes(`
43
+ `)?!0:Dm(e,n,"*")},LL=e=>{let t=e.match(hL);if(!t)return e;let n=t[2],i=e.lastIndexOf(t[1]);return Nn(e,i)||Vi(e,i)||ML(e,n,i)?e:Im(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},DL=(e,t,n)=>{if(!t||Ba.test(t))return!0;let i=e.substring(0,n).lastIndexOf(`
44
+ `),s=i===-1?0:i+1,l=e.substring(s,n);return HT.test(l)&&t.includes(`
45
+ `)?!0:Dm(e,n,"_")},IL=e=>{let t=e.match(pL);if(!t){let s=e.match(TL);if(s){let l=e.lastIndexOf(s[1]);if(!(Nn(e,l)||Vi(e,l))&&UE(e)%2===1)return`${e}_`}return e}let n=t[2],i=e.lastIndexOf(t[1]);return Nn(e,i)||Vi(e,i)||DL(e,n,i)?e:UE(e)%2===1?`${e}__`:e},BL=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Sd(e,n)){let i=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if((!i||i===" "||i===" "||i===`
46
+ `)&&(!s||s===" "||s===" "||s===`
47
+ `)||i&&s&&Gi(i)&&Gi(s))continue;return n}}return-1},zL=e=>{if(!e.match(gL))return e;let t=BL(e);if(t===-1||Nn(e,t)||Vi(e,t))return e;let n=e.substring(t+1);return!n||Ba.test(n)?e:FT(e)%2===1?`${e}*`:e},$T=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Sd(e,n)&&!jT(e,n)){let i=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if(i&&s&&Gi(i)&&Gi(s))continue;return n}}return-1},PL=e=>{let t=e.length;for(;t>0&&e[t-1]===`
48
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),i=e.slice(t);return`${n}_${i}`}return`${e}_`},HL=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Im(t)%2!==1)return null;let n=t.indexOf("**"),i=$T(t);return n!==-1&&i!==-1&&n<i?`${t}_**`:null},UL=e=>{if(!e.match(bL))return e;let t=$T(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Ba.test(n)||Nn(e,t)||Vi(e,t))return e;if(RL(e)%2===1){let i=HL(e);return i!==null?i:PL(e)}return e},jL=e=>{let t=Im(e),n=FT(e);return t%2===0&&n%2===0},FL=(e,t,n)=>!t||Ba.test(t)||Nn(e,n)||Vi(e,n)?!0:Dm(e,n,"*"),$L=e=>{if(_L.test(e))return e;let t=e.match(mL);if(!t)return e;let n=t[2],i=e.lastIndexOf(t[1]);return FL(e,n,i)?e:OL(e)%2===1?jL(e)?e:`${e}***`:e},qL=/<[a-zA-Z/][^>]*$/,YL=e=>{let t=e.match(qL);return!t||t.index===void 0||Nn(e,t.index)?e:e.substring(0,t.index).trimEnd()},VL=e=>!e.match(vL)||e.includes(`
49
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,GL=e=>(e.match(/```/g)||[]).length%2===1,WL=e=>{let t=VL(e);if(t!==null)return t;let n=e.match(yL);if(n&&!GL(e)){let i=n[2];if(!i||Ba.test(i))return e;if(cL(e)%2===1)return`${e}\``}return e},XL=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",QL=e=>{let t=0,n=!1;for(let i=0;i<e.length-1;i+=1)e[i]==="`"&&!XL(e,i)&&(n=!n),!n&&e[i]==="$"&&e[i+1]==="$"&&(t+=1,i+=1);return t},KL=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
50
+ `,t)!==-1&&!e.endsWith(`
51
+ `)?`${e}
52
+ $$`:`${e}$$`},ZL=e=>QL(e)%2===0?e:KL(e),JL=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let i=SL(e,t);if(i===-1||Nn(e,i))return null;let s=i>0&&e[i-1]==="!",l=s?i-1:i,o=e.substring(0,l);if(s)return o;let d=e.substring(i+1,t);return n==="text-only"?`${o}${d}`:`${o}[${d}](streamdown:incomplete-link)`},jE=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Nn(e,n)){if(n>0&&e[n-1]==="!")continue;let i=UT(e,n);if(i===-1)return n;if(i+1<e.length&&e[i+1]==="("){let s=e.indexOf(")",i+2);s!==-1&&(n=s)}}return t},eD=(e,t,n)=>{let i=t>0&&e[t-1]==="!",s=i?t-1:t;if(!e.substring(t+1).includes("]")){let l=e.substring(0,s);if(i)return l;if(n==="text-only"){let o=jE(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}if(UT(e,t)===-1){let l=e.substring(0,s);if(i)return l;if(n==="text-only"){let o=jE(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}return null},qT=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Nn(e,n)){let i=JL(e,n,t);if(i!==null)return i}for(let i=e.length-1;i>=0;i-=1)if(e[i]==="["&&!Nn(e,i)){let s=eD(e,i,t);if(s!==null)return s}return e},tD=/^-{1,2}$/,nD=/^[\s]*-{1,2}[\s]+$/,rD=/^={1,2}$/,iD=/^[\s]*={1,2}[\s]+$/,aD=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
53
+ `);if(t===-1)return e;let n=e.substring(t+1),i=e.substring(0,t),s=n.trim();if(tD.test(s)&&!n.match(nD)){let l=i.split(`
54
+ `).at(-1);if(l&&l.trim().length>0)return`${e}​`}if(rD.test(s)&&!n.match(iD)){let l=i.split(`
55
+ `).at(-1);if(l&&l.trim().length>0)return`${e}​`}return e},sD=e=>{var t,n;let i=e.match(EL);if(i){let s=i[2];if(!s||Ba.test(s))return e;let l=e.lastIndexOf(i[1]);if(Nn(e,l)||Vi(e,l))return e;if(((t=e.match(HE))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(AL);if(s){let l=e.lastIndexOf(s[0].slice(0,2));if(Nn(e,l)||Vi(e,l))return e;if(((n=e.match(HE))==null?void 0:n.length)%2===1)return`${e}~`}}return e},w0=e=>e!==!1,qn={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},lD=[{handler:{name:"comparisonOperators",handle:fL,priority:qn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:YL,priority:qn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:aD,priority:qn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:qT,priority:qn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:$L,priority:qn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:LL,priority:qn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:IL,priority:qn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:zL,priority:qn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:UL,priority:qn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:WL,priority:qn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:sD,priority:qn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:ZL,priority:qn.KATEX},optionKey:"katex"}],uD=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return lD.filter(({handler:i,optionKey:s})=>i.name==="links"?w0(e?.links)||w0(e?.images):w0(e?.[s])).map(({handler:i,earlyReturn:s})=>i.name==="links"?{handler:PT(zT({},i),{handle:l=>qT(l,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:i,earlyReturn:s})},oD=(e,t)=>{var n;if(!e||typeof e!="string")return e;let i=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=uD(t),l=((n=t?.handlers)!=null?n:[]).map(d=>{var h;return{handler:PT(zT({},d),{priority:(h=d.priority)!=null?h:qn.DEFAULT}),earlyReturn:void 0}}),o=[...s,...l].sort((d,h)=>{var f,m;return((f=d.handler.priority)!=null?f:0)-((m=h.handler.priority)!=null?m:0)});for(let{handler:d,earlyReturn:h}of o)if(i=d.handle(i),h!=null&&h(i))return i;return i},cD=oD;function YT(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=YT(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function VT(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=YT(e))&&(i&&(i+=" "),i+=t);return i}const dD=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},fD=(e,t)=>({classGroupId:e,validator:t}),GT=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jc="-",FE=[],hD="arbitrary..",pD=e=>{const t=gD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return mD(o);const d=o.split(Jc),h=d[0]===""&&d.length>1?1:0;return WT(d,h,t)},getConflictingClassGroupIds:(o,d)=>{if(d){const h=i[o],f=n[o];return h?f?dD(f,h):h:f||FE}return n[o]||FE}}},WT=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],l=n.nextPart.get(s);if(l){const f=WT(e,t+1,l);if(f)return f}const o=n.validators;if(o===null)return;const d=t===0?e.join(Jc):e.slice(t).join(Jc),h=o.length;for(let f=0;f<h;f++){const m=o[f];if(m.validator(d))return m.classGroupId}},mD=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?hD+i:void 0})(),gD=e=>{const{theme:t,classGroups:n}=e;return bD(n,t)},bD=(e,t)=>{const n=GT();for(const i in e){const s=e[i];Bm(s,n,i,t)}return n},Bm=(e,t,n,i)=>{const s=e.length;for(let l=0;l<s;l++){const o=e[l];yD(o,t,n,i)}},yD=(e,t,n,i)=>{if(typeof e=="string"){ED(e,t,n);return}if(typeof e=="function"){xD(e,t,n,i);return}vD(e,t,n,i)},ED=(e,t,n)=>{const i=e===""?t:XT(t,e);i.classGroupId=n},xD=(e,t,n,i)=>{if(_D(e)){Bm(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(fD(n,e))},vD=(e,t,n,i)=>{const s=Object.entries(e),l=s.length;for(let o=0;o<l;o++){const[d,h]=s[o];Bm(h,XT(t,d),n,i)}},XT=(e,t)=>{let n=e;const i=t.split(Jc),s=i.length;for(let l=0;l<s;l++){const o=i[l];let d=n.nextPart.get(o);d||(d=GT(),n.nextPart.set(o,d)),n=d}return n},_D=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,TD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const s=(l,o)=>{n[l]=o,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(l){let o=n[l];if(o!==void 0)return o;if((o=i[l])!==void 0)return s(l,o),o},set(l,o){l in n?n[l]=o:s(l,o)}}},Bp="!",$E=":",AD=[],qE=(e,t,n,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:s}),SD=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=s=>{const l=[];let o=0,d=0,h=0,f;const m=s.length;for(let w=0;w<m;w++){const S=s[w];if(o===0&&d===0){if(S===$E){l.push(s.slice(h,w)),h=w+1;continue}if(S==="/"){f=w;continue}}S==="["?o++:S==="]"?o--:S==="("?d++:S===")"&&d--}const b=l.length===0?s:s.slice(h);let x=b,E=!1;b.endsWith(Bp)?(x=b.slice(0,-1),E=!0):b.startsWith(Bp)&&(x=b.slice(1),E=!0);const T=f&&f>h?f-h:void 0;return qE(l,E,x,T)};if(t){const s=t+$E,l=i;i=o=>o.startsWith(s)?l(o.slice(s.length)):qE(AD,!1,o,void 0,!0)}if(n){const s=i;i=l=>n({className:l,parseClassName:s})}return i},wD=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let s=[];for(let l=0;l<n.length;l++){const o=n[l],d=o[0]==="[",h=t.has(o);d||h?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(o)):s.push(o)}return s.length>0&&(s.sort(),i.push(...s)),i}},kD=e=>({cache:TD(e.cacheSize),parseClassName:SD(e),sortModifiers:wD(e),...pD(e)}),CD=/\s+/,ND=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l}=t,o=[],d=e.trim().split(CD);let h="";for(let f=d.length-1;f>=0;f-=1){const m=d[f],{isExternal:b,modifiers:x,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:w}=n(m);if(b){h=m+(h.length>0?" "+h:h);continue}let S=!!w,k=i(S?T.substring(0,w):T);if(!k){if(!S){h=m+(h.length>0?" "+h:h);continue}if(k=i(T),!k){h=m+(h.length>0?" "+h:h);continue}S=!1}const F=x.length===0?"":x.length===1?x[0]:l(x).join(":"),H=E?F+Bp:F,V=H+k;if(o.indexOf(V)>-1)continue;o.push(V);const J=s(k,S);for(let j=0;j<J.length;++j){const ne=J[j];o.push(H+ne)}h=m+(h.length>0?" "+h:h)}return h},RD=(...e)=>{let t=0,n,i,s="";for(;t<e.length;)(n=e[t++])&&(i=QT(n))&&(s&&(s+=" "),s+=i);return s},QT=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=QT(e[i]))&&(n&&(n+=" "),n+=t);return n},OD=(e,...t)=>{let n,i,s,l;const o=h=>{const f=t.reduce((m,b)=>b(m),e());return n=kD(f),i=n.cache.get,s=n.cache.set,l=d,d(h)},d=h=>{const f=i(h);if(f)return f;const m=ND(h,n);return s(h,m),m};return l=o,(...h)=>l(RD(...h))},MD=[],Ht=e=>{const t=n=>n[e]||MD;return t.isThemeGetter=!0,t},KT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ZT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,LD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,DD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ID=/\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$/,BD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bi=e=>LD.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),zi=e=>!!e&&Number.isInteger(Number(e)),k0=e=>e.endsWith("%")&&je(e.slice(0,-1)),ni=e=>DD.test(e),JT=()=>!0,HD=e=>ID.test(e)&&!BD.test(e),zm=()=>!1,UD=e=>zD.test(e),jD=e=>PD.test(e),FD=e=>!Ae(e)&&!Se(e),$D=e=>Zi(e,n3,zm),Ae=e=>KT.test(e),Ea=e=>Zi(e,r3,HD),YE=e=>Zi(e,KD,je),qD=e=>Zi(e,a3,JT),YD=e=>Zi(e,i3,zm),VE=e=>Zi(e,e3,zm),VD=e=>Zi(e,t3,jD),xc=e=>Zi(e,s3,UD),Se=e=>ZT.test(e),eu=e=>za(e,r3),GD=e=>za(e,i3),GE=e=>za(e,e3),WD=e=>za(e,n3),XD=e=>za(e,t3),vc=e=>za(e,s3,!0),QD=e=>za(e,a3,!0),Zi=(e,t,n)=>{const i=KT.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},za=(e,t,n=!1)=>{const i=ZT.exec(e);return i?i[1]?t(i[1]):n:!1},e3=e=>e==="position"||e==="percentage",t3=e=>e==="image"||e==="url",n3=e=>e==="length"||e==="size"||e==="bg-size",r3=e=>e==="length",KD=e=>e==="number",i3=e=>e==="family-name",a3=e=>e==="number"||e==="weight",s3=e=>e==="shadow",ZD=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),i=Ht("font-weight"),s=Ht("tracking"),l=Ht("leading"),o=Ht("breakpoint"),d=Ht("container"),h=Ht("spacing"),f=Ht("radius"),m=Ht("shadow"),b=Ht("inset-shadow"),x=Ht("text-shadow"),E=Ht("drop-shadow"),T=Ht("blur"),w=Ht("perspective"),S=Ht("aspect"),k=Ht("ease"),F=Ht("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...V(),Se,Ae],j=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto","contain","none"],Z=()=>[Se,Ae,h],fe=()=>[Bi,"full","auto",...Z()],z=()=>[zi,"none","subgrid",Se,Ae],$=()=>["auto",{span:["full",zi,Se,Ae]},zi,Se,Ae],Y=()=>[zi,"auto",Se,Ae],_e=()=>["auto","min","max","fr",Se,Ae],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...Z()],te=()=>[Bi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],be=()=>[Bi,"screen","full","dvw","lvw","svw","min","max","fit",...Z()],ke=()=>[Bi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Z()],O=()=>[e,Se,Ae],D=()=>[...V(),GE,VE,{position:[Se,Ae]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",WD,$D,{size:[Se,Ae]}],ce=()=>[k0,eu,Ea],Ee=()=>["","none","full",f,Se,Ae],xe=()=>["",je,eu,Ea],Me=()=>["solid","dashed","dotted","double"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Oe=()=>[je,k0,GE,VE],Gt=()=>["","none",T,Se,Ae],Wt=()=>["none",je,Se,Ae],On=()=>["none",je,Se,Ae],cr=()=>[je,Se,Ae],Xt=()=>[Bi,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ni],breakpoint:[ni],color:[JT],container:[ni],"drop-shadow":[ni],ease:["in","out","in-out"],font:[FD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ni],shadow:[ni],spacing:["px",je],text:[ni],"text-shadow":[ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Bi,Ae,Se,S]}],container:["container"],columns:[{columns:[je,Ae,Se,d]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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:J()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:ne()}],"overscroll-x":[{"overscroll-x":ne()}],"overscroll-y":[{"overscroll-y":ne()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:fe()}],"inset-x":[{"inset-x":fe()}],"inset-y":[{"inset-y":fe()}],start:[{"inset-s":fe(),start:fe()}],end:[{"inset-e":fe(),end:fe()}],"inset-bs":[{"inset-bs":fe()}],"inset-be":[{"inset-be":fe()}],top:[{top:fe()}],right:[{right:fe()}],bottom:[{bottom:fe()}],left:[{left:fe()}],visibility:["visible","invisible","collapse"],z:[{z:[zi,"auto",Se,Ae]}],basis:[{basis:[Bi,"full","auto",d,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Bi,"auto","initial","none",Ae]}],grow:[{grow:["",je,Se,Ae]}],shrink:[{shrink:["",je,Se,Ae]}],order:[{order:[zi,"first","last","none",Se,Ae]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_e()}],"auto-rows":[{"auto-rows":_e()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pbs:[{pbs:Z()}],pbe:[{pbe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],"inline-size":[{inline:["auto",...be()]}],"min-inline-size":[{"min-inline":["auto",...be()]}],"max-inline-size":[{"max-inline":["none",...be()]}],"block-size":[{block:["auto",...ke()]}],"min-block-size":[{"min-block":["auto",...ke()]}],"max-block-size":[{"max-block":["none",...ke()]}],w:[{w:[d,"screen",...te()]}],"min-w":[{"min-w":[d,"screen","none",...te()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[o]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",n,eu,Ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,QD,qD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",k0,Ae]}],"font-family":[{font:[GD,YD,t]}],"font-features":[{"font-features":[Ae]}],"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:[s,Se,Ae]}],"line-clamp":[{"line-clamp":[je,"none",Se,YE]}],leading:[{leading:[l,...Z()]}],"list-image":[{"list-image":["none",Se,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Me(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",Se,Ea]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[je,"auto",Se,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,Ae]}],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",Se,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},zi,Se,Ae],radial:["",Se,Ae],conic:[zi,Se,Ae]},XD,VD]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Me(),"hidden","none"]}],"divide-style":[{divide:[...Me(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...Me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,Se,Ae]}],"outline-w":[{outline:["",je,eu,Ea]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",m,vc,xc]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",b,vc,xc]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[je,Ea]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",x,vc,xc]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[je,Se,Ae]}],"mix-blend":[{"mix-blend":[...Je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Je()}],"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":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":Oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Oe()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Oe()}],"mask-image-t-to-pos":[{"mask-t-to":Oe()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Oe()}],"mask-image-r-to-pos":[{"mask-r-to":Oe()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Oe()}],"mask-image-b-to-pos":[{"mask-b-to":Oe()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Oe()}],"mask-image-l-to-pos":[{"mask-l-to":Oe()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Oe()}],"mask-image-x-to-pos":[{"mask-x-to":Oe()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Oe()}],"mask-image-y-to-pos":[{"mask-y-to":Oe()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Se,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":Oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Oe()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":V()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":Oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Oe()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,Ae]}],filter:[{filter:["","none",Se,Ae]}],blur:[{blur:Gt()}],brightness:[{brightness:[je,Se,Ae]}],contrast:[{contrast:[je,Se,Ae]}],"drop-shadow":[{"drop-shadow":["","none",E,vc,xc]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",je,Se,Ae]}],"hue-rotate":[{"hue-rotate":[je,Se,Ae]}],invert:[{invert:["",je,Se,Ae]}],saturate:[{saturate:[je,Se,Ae]}],sepia:[{sepia:["",je,Se,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,Ae]}],"backdrop-blur":[{"backdrop-blur":Gt()}],"backdrop-brightness":[{"backdrop-brightness":[je,Se,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[je,Se,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,Se,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,Se,Ae]}],"backdrop-invert":[{"backdrop-invert":["",je,Se,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[je,Se,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[je,Se,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",je,Se,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",Se,Ae]}],ease:[{ease:["linear","initial",k,Se,Ae]}],delay:[{delay:[je,Se,Ae]}],animate:[{animate:["none",F,Se,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Se,Ae]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:Wt()}],"rotate-x":[{"rotate-x":Wt()}],"rotate-y":[{"rotate-y":Wt()}],"rotate-z":[{"rotate-z":Wt()}],scale:[{scale:On()}],"scale-x":[{"scale-x":On()}],"scale-y":[{"scale-y":On()}],"scale-z":[{"scale-z":On()}],"scale-3d":["scale-3d"],skew:[{skew:cr()}],"skew-x":[{"skew-x":cr()}],"skew-y":[{"skew-y":cr()}],transform:[{transform:[Se,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xt()}],"translate-x":[{"translate-x":Xt()}],"translate-y":[{"translate-y":Xt()}],"translate-z":[{"translate-z":Xt()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",Se,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mbs":[{"scroll-mbs":Z()}],"scroll-mbe":[{"scroll-mbe":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pbs":[{"scroll-pbs":Z()}],"scroll-pbe":[{"scroll-pbe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",Se,Ae]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[je,eu,Ea,YE]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{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":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["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-r","border-w-l"],"border-w-y":["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-r","border-color-l"],"border-color-y":["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-mr","scroll-ml"],"scroll-my":["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-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},l3=OD(ZD),JD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tI={};function WE(e,t){return(tI.jsx?eI:JD).test(e)}const nI=/[ \t\n\f\r]/g;function rI(e){return typeof e=="object"?e.type==="text"?XE(e.value):!1:XE(e)}function XE(e){return e.replace(nI,"")===""}var ws={},C0,QE;function iI(){if(QE)return C0;QE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,d=/^\s+|\s+$/g,h=`
56
+ `,f="/",m="*",b="",x="comment",E="declaration";function T(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var F=1,H=1;function V(oe){var le=oe.match(t);le&&(F+=le.length);var I=oe.lastIndexOf(h);H=~I?oe.length-I:H+oe.length}function J(){var oe={line:F,column:H};return function(le){return le.position=new j(oe),fe(),le}}function j(oe){this.start=oe,this.end={line:F,column:H},this.source=k.source}j.prototype.content=S;function ne(oe){var le=new Error(k.source+":"+F+":"+H+": "+oe);if(le.reason=oe,le.filename=k.source,le.line=F,le.column=H,le.source=S,!k.silent)throw le}function Z(oe){var le=oe.exec(S);if(le){var I=le[0];return V(I),S=S.slice(I.length),le}}function fe(){Z(n)}function z(oe){var le;for(oe=oe||[];le=$();)le!==!1&&oe.push(le);return oe}function $(){var oe=J();if(!(f!=S.charAt(0)||m!=S.charAt(1))){for(var le=2;b!=S.charAt(le)&&(m!=S.charAt(le)||f!=S.charAt(le+1));)++le;if(le+=2,b===S.charAt(le-1))return ne("End of comment missing");var I=S.slice(2,le-2);return H+=2,V(I),S=S.slice(le),H+=2,oe({type:x,comment:I})}}function Y(){var oe=J(),le=Z(i);if(le){if($(),!Z(s))return ne("property missing ':'");var I=Z(l),te=oe({type:E,property:w(le[0].replace(e,b)),value:I?w(I[0].replace(e,b)):b});return Z(o),te}}function _e(){var oe=[];z(oe);for(var le;le=Y();)le!==!1&&(oe.push(le),z(oe));return oe}return fe(),_e()}function w(S){return S?S.replace(d,b):b}return C0=T,C0}var KE;function aI(){if(KE)return ws;KE=1;var e=ws&&ws.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=n;const t=e(iI());function n(i,s){let l=null;if(!i||typeof i!="string")return l;const o=(0,t.default)(i),d=typeof s=="function";return o.forEach(h=>{if(h.type!=="declaration")return;const{property:f,value:m}=h;d?s(f,m,h):m&&(l=l||{},l[f]=m)}),l}return ws}var tu={},ZE;function sI(){if(ZE)return tu;ZE=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(f){return!f||n.test(f)||e.test(f)},o=function(f,m){return m.toUpperCase()},d=function(f,m){return"".concat(m,"-")},h=function(f,m){return m===void 0&&(m={}),l(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(s,d):f=f.replace(i,d),f.replace(t,o))};return tu.camelCase=h,tu}var nu,JE;function lI(){if(JE)return nu;JE=1;var e=nu&&nu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(aI()),n=sI();function i(s,l){var o={};return!s||typeof s!="string"||(0,t.default)(s,function(d,h){d&&h&&(o[(0,n.camelCase)(d,l)]=h)}),o}return i.default=i,nu=i,nu}var uI=lI();const oI=Mu(uI);function _u(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ex(e.position):"start"in e||"end"in e?ex(e):"line"in e||"column"in e?zp(e):""}function zp(e){return tx(e&&e.line)+":"+tx(e&&e.column)}function ex(e){return zp(e&&e.start)+"-"+zp(e&&e.end)}function tx(e){return e&&typeof e=="number"?e:1}class ln extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(o=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?l.ruleId=i:(l.source=i.slice(0,h),l.ruleId=i.slice(h+1))}if(!l.place&&l.ancestors&&l.ancestors){const h=l.ancestors[l.ancestors.length-1];h&&(l.place=h.position)}const d=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=_u(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ln.prototype.file="";ln.prototype.name="";ln.prototype.reason="";ln.prototype.message="";ln.prototype.stack="";ln.prototype.column=void 0;ln.prototype.line=void 0;ln.prototype.ancestors=void 0;ln.prototype.cause=void 0;ln.prototype.fatal=void 0;ln.prototype.place=void 0;ln.prototype.ruleId=void 0;ln.prototype.source=void 0;const Pm={}.hasOwnProperty,cI=new Map,dI=/[A-Z]/g,fI=new Set(["table","tbody","thead","tfoot","tr"]),hI=new Set(["td","th"]),u3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pI(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=_I(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=vI(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Qi:ju,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=o3(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function o3(e,t,n){if(t.type==="element")return mI(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yI(e,t,n);if(t.type==="mdxjsEsm")return bI(e,t);if(t.type==="root")return EI(e,t,n);if(t.type==="text")return xI(e,t)}function mI(e,t,n){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=Qi,e.schema=s),e.ancestors.push(t);const l=d3(e,t.tagName,!1),o=TI(e,t);let d=Um(e,t);return fI.has(t.tagName)&&(d=d.filter(function(h){return typeof h=="string"?!rI(h):!0})),c3(e,o,l,t),Hm(o,d),e.ancestors.pop(),e.schema=i,e.create(t,l,o,n)}function gI(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Nu(e,t.position)}function bI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nu(e,t.position)}function yI(e,t,n){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=Qi,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:d3(e,t.name,!0),o=AI(e,t),d=Um(e,t);return c3(e,o,l,t),Hm(o,d),e.ancestors.pop(),e.schema=i,e.create(t,l,o,n)}function EI(e,t,n){const i={};return Hm(i,Um(e,t)),e.create(t,e.Fragment,i,n)}function xI(e,t){return t.value}function c3(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Hm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vI(e,t,n){return i;function i(s,l,o,d){const f=Array.isArray(o.children)?n:t;return d?f(l,o,d):f(l,o)}}function _I(e,t){return n;function n(i,s,l,o){const d=Array.isArray(l.children),h=Ir(i);return t(s,l,o,d,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function TI(e,t){const n={};let i,s;for(s in t.properties)if(s!=="children"&&Pm.call(t.properties,s)){const l=SI(e,s,t.properties[s]);if(l){const[o,d]=l;e.tableCellAlignToStyle&&o==="align"&&typeof d=="string"&&hI.has(t.tagName)?i=d:n[o]=d}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function AI(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const o=l.expression;o.type;const d=o.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Nu(e,t.position);else{const s=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,l=e.evaluater.evaluateExpression(d.expression)}else Nu(e,t.position);else l=i.value===null?!0:i.value;n[s]=l}return n}function Um(e,t){const n=[];let i=-1;const s=e.passKeys?new Map:cI;for(;++i<t.children.length;){const l=t.children[i];let o;if(e.passKeys){const h=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(h){const f=s.get(h)||0;o=h+"-"+f,s.set(h,f+1)}}const d=o3(e,l,o);d!==void 0&&n.push(d)}return n}function SI(e,t,n){const i=bd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?p_(n):m_(n)),i.property==="style"){let s=typeof n=="object"?n:wI(e,String(n));return e.stylePropertyNameCase==="css"&&(s=kI(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?J4[i.property]||i.property:i.attribute,n]}}function wI(e,t){try{return oI(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,s=new ln("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=u3+"#cannot-parse-style-attribute",s}}function d3(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,o;for(;++l<s.length;){const d=WE(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};o=o?{type:"MemberExpression",object:o,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}i=o}else i=WE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return Pm.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);Nu(e)}function Nu(e,t){const n=new ln("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=u3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kI(e){const t={};let n;for(n in e)Pm.call(e,n)&&(t[CI(n)]=e[n]);return t}function CI(e){let t=e.replace(dI,NI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function NI(e){return"-"+e.toLowerCase()}const N0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},RI={tokenize:OI};function OI(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),l(d)}function l(d){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,o(d)}function o(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ne(d)?(e.consume(d),e.exit("chunkText"),l):(e.consume(d),o)}}const MI={tokenize:LI},nx={tokenize:DI};function LI(e){const t=this,n=[];let i=0,s,l,o;return d;function d(H){if(i<n.length){const V=n[i];return t.containerState=V[1],e.attempt(V[0].continuation,h,f)(H)}return f(H)}function h(H){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&F();const V=t.events.length;let J=V,j;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){j=t.events[J][1].end;break}k(i);let ne=V;for(;ne<t.events.length;)t.events[ne][1].end={...j},ne++;return Yn(t.events,J+1,0,t.events.slice(V)),t.events.length=ne,f(H)}return d(H)}function f(H){if(i===n.length){if(!s)return x(H);if(s.currentConstruct&&s.currentConstruct.concrete)return T(H);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(nx,m,b)(H)}function m(H){return s&&F(),k(i),x(H)}function b(H){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,T(H)}function x(H){return t.containerState={},e.attempt(nx,E,T)(H)}function E(H){return i++,n.push([t.currentConstruct,t.containerState]),x(H)}function T(H){if(H===null){s&&F(),k(0),e.consume(H);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),w(H)}function w(H){if(H===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(H);return}return Ne(H)?(e.consume(H),S(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(H),w)}function S(H,V){const J=t.sliceStream(H);if(V&&J.push(null),H.previous=l,l&&(l.next=H),l=H,s.defineSkip(H.start),s.write(J),t.parser.lazy[H.start.line]){let j=s.events.length;for(;j--;)if(s.events[j][1].start.offset<o&&(!s.events[j][1].end||s.events[j][1].end.offset>o))return;const ne=t.events.length;let Z=ne,fe,z;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(fe){z=t.events[Z][1].end;break}fe=!0}for(k(i),j=ne;j<t.events.length;)t.events[j][1].end={...z},j++;Yn(t.events,Z+1,0,t.events.slice(ne)),t.events.length=j}}function k(H){let V=n.length;for(;V-- >H;){const J=n[V];t.containerState=J[1],J[0].exit.call(t,e)}n.length=H}function F(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function DI(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const II={tokenize:BI};function BI(e){const t=this,n=e.attempt(Yu,i,e.attempt(this.parser.constructs.flowInitial,s,Ke(e,e.attempt(this.parser.constructs.flow,s,e.attempt(jO,s)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zI={resolveAll:h3()},PI=f3("string"),HI=f3("text");function f3(e){return{resolveAll:h3(e==="text"?UI:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],l=n.attempt(s,o,d);return o;function o(m){return f(m)?l(m):d(m)}function d(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),h}function h(m){return f(m)?(n.exit("data"),l(m)):(n.consume(m),h)}function f(m){if(m===null)return!0;const b=s[m];let x=-1;if(b)for(;++x<b.length;){const E=b[x];if(!E.previous||E.previous.call(i,i.previous))return!0}return!1}}}function h3(e){return t;function t(n,i){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,i):n}}function UI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let l=s.length,o=-1,d=0,h;for(;l--;){const f=s[l];if(typeof f=="string"){for(o=f.length;f.charCodeAt(o-1)===32;)d++,o--;if(o)break;o=-1}else if(f===-2)h=!0,d++;else if(f!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const f={type:n===e.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:i.start._bufferIndex+o,_index:i.start._index+l,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const jI={42:Sn,43:Sn,45:Sn,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,62:RT},FI={91:VO},$I={[-2]:A0,[-1]:A0,32:A0},qI={35:ZO,42:Hc,45:[IE,Hc],60:nM,61:IE,95:Hc,96:LE,126:LE},YI={38:MT,92:OT},VI={[-5]:S0,[-4]:S0,[-3]:S0,33:xM,38:MT,42:Ip,60:[_O,oM],91:_M,92:[QO,OT],93:Lm,95:Ip,96:IO},GI={null:[Ip,zI]},WI={null:[42,95]},XI={null:[]},QI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:WI,contentInitial:FI,disable:XI,document:jI,flow:qI,flowInitial:$I,insideSpan:GI,string:YI,text:VI},Symbol.toStringTag,{value:"Module"}));function KI(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let o=[],d=[];const h={attempt:ne(J),check:ne(j),consume:F,enter:H,exit:V,interrupt:ne(j,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:T,parser:e,previous:null,sliceSerialize:x,sliceStream:E,write:b};let m=t.tokenize.call(f,h);return t.resolveAll&&l.push(t),f;function b($){return o=lr(o,$),S(),o[o.length-1]!==null?[]:(Z(t,0),f.events=Ad(l,f.events,f),f.events)}function x($,Y){return JI(E($),Y)}function E($){return ZI(o,$)}function T(){const{_bufferIndex:$,_index:Y,line:_e,column:oe,offset:le}=i;return{_bufferIndex:$,_index:Y,line:_e,column:oe,offset:le}}function w($){s[$.line]=$.column,z()}function S(){let $;for(;i._index<o.length;){const Y=o[i._index];if(typeof Y=="string")for($=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===$&&i._bufferIndex<Y.length;)k(Y.charCodeAt(i._bufferIndex));else k(Y)}}function k($){m=m($)}function F($){Ne($)?(i.line++,i.column=1,i.offset+=$===-3?2:1,z()):$!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===o[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=$}function H($,Y){const _e=Y||{};return _e.type=$,_e.start=T(),f.events.push(["enter",_e,f]),d.push(_e),_e}function V($){const Y=d.pop();return Y.end=T(),f.events.push(["exit",Y,f]),Y}function J($,Y){Z($,Y.from)}function j($,Y){Y.restore()}function ne($,Y){return _e;function _e(oe,le,I){let te,be,ke,O;return Array.isArray(oe)?P(oe):"tokenize"in oe?P([oe]):D(oe);function D(xe){return Me;function Me(Je){const Oe=Je!==null&&xe[Je],Gt=Je!==null&&xe.null,Wt=[...Array.isArray(Oe)?Oe:Oe?[Oe]:[],...Array.isArray(Gt)?Gt:Gt?[Gt]:[]];return P(Wt)(Je)}}function P(xe){return te=xe,be=0,xe.length===0?I:C(xe[be])}function C(xe){return Me;function Me(Je){return O=fe(),ke=xe,xe.partial||(f.currentConstruct=xe),xe.name&&f.parser.constructs.disable.null.includes(xe.name)?Ee():xe.tokenize.call(Y?Object.assign(Object.create(f),Y):f,h,ce,Ee)(Je)}}function ce(xe){return $(ke,O),le}function Ee(xe){return O.restore(),++be<te.length?C(te[be]):I}}}function Z($,Y){$.resolveAll&&!l.includes($)&&l.push($),$.resolve&&Yn(f.events,Y,f.events.length-Y,$.resolve(f.events.slice(Y),f)),$.resolveTo&&(f.events=$.resolveTo(f.events,f))}function fe(){const $=T(),Y=f.previous,_e=f.currentConstruct,oe=f.events.length,le=Array.from(d);return{from:oe,restore:I};function I(){i=$,f.previous=Y,f.currentConstruct=_e,f.events.length=oe,d=le,z()}}function z(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function ZI(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let o;if(n===s)o=[e[n].slice(i,l)];else{if(o=e.slice(n,s),i>-1){const d=o[0];typeof d=="string"?o[0]=d.slice(i):o.shift()}l>0&&o.push(e[s].slice(0,l))}return o}function JI(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
57
+ `;break}case-3:{o=`\r
58
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&s)continue;o=" ";break}default:o=String.fromCharCode(l)}s=l===-2,i.push(o)}return i.join("")}function e7(e){const i={constructs:vT([QI,...(e||{}).extensions||[]]),content:s(RI),defined:[],document:s(MI),flow:s(II),lazy:{},string:s(PI),text:s(HI)};return i;function s(l){return o;function o(d){return KI(i,l,d)}}}function t7(e){for(;!LT(e););return e}const rx=/[\0\t\n\r]/g;function n7(){let e=1,t="",n=!0,i;return s;function s(l,o,d){const h=[];let f,m,b,x,E;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),b=0,t="",n&&(l.charCodeAt(0)===65279&&b++,n=void 0);b<l.length;){if(rx.lastIndex=b,f=rx.exec(l),x=f&&f.index!==void 0?f.index:l.length,E=l.charCodeAt(x),!f){t=l.slice(b);break}if(E===10&&b===x&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),b<x&&(h.push(l.slice(b,x)),e+=x-b),E){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}b=x+1}return d&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const p3={}.hasOwnProperty;function r7(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),i7(n)(t7(e7(n).document().write(n7()(e,t,!0))))}function i7(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(jt),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:l(vr),blockQuote:l(Gt),characterEscape:fe,characterReference:fe,codeFenced:l(Wt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Wt,o),codeText:l(On,o),codeTextData:fe,data:fe,codeFlowValue:fe,definition:l(cr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Xt),hardBreakEscape:l(ci),hardBreakTrailing:l(ci),htmlFlow:l(Ue,o),htmlFlowData:fe,htmlText:l(Ue,o),htmlTextData:fe,image:l(ot),label:o,link:l(jt),listItem:l(dr),listItemValue:x,listOrdered:l(un,b),listUnordered:l(un),paragraph:l(Ud),reference:C,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(vr),strong:l(jd),thematicBreak:l(Fd)},exit:{atxHeading:h(),atxHeadingSequence:J,autolink:h(),autolinkEmail:Oe,autolinkProtocol:Je,blockQuote:h(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:xe,characterReference:Me,codeFenced:h(S),codeFencedFence:w,codeFencedFenceInfo:E,codeFencedFenceMeta:T,codeFlowValue:z,codeIndented:h(k),codeText:h(le),codeTextData:z,data:z,definition:h(),definitionDestinationString:V,definitionLabelString:F,definitionTitleString:H,emphasis:h(),hardBreakEscape:h(Y),hardBreakTrailing:h(Y),htmlFlow:h(_e),htmlFlowData:z,htmlText:h(oe),htmlTextData:z,image:h(te),label:ke,labelText:be,lineEnding:$,link:h(I),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ce,resourceDestinationString:O,resourceTitleString:D,resource:P,setextHeading:h(Z),setextHeadingLineSequence:ne,setextHeadingText:j,strong:h(),thematicBreak:h()}};m3(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(ae){let ye={type:"root",children:[]};const De={stack:[ye],tokenStack:[],config:t,enter:d,exit:f,buffer:o,resume:m,data:n},qe=[];let rt=-1;for(;++rt<ae.length;)if(ae[rt][1].type==="listOrdered"||ae[rt][1].type==="listUnordered")if(ae[rt][0]==="enter")qe.push(rt);else{const Mn=qe.pop();rt=s(ae,Mn,rt)}for(rt=-1;++rt<ae.length;){const Mn=t[ae[rt][0]];p3.call(Mn,ae[rt][1].type)&&Mn[ae[rt][1].type].call(Object.assign({sliceSerialize:ae[rt][2].sliceSerialize},De),ae[rt][1])}if(De.tokenStack.length>0){const Mn=De.tokenStack[De.tokenStack.length-1];(Mn[1]||ix).call(De,void 0,Mn[0])}for(ye.position={start:Pi(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:Pi(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)ye=t.transforms[rt](ye)||ye;return ye}function s(ae,ye,De){let qe=ye-1,rt=-1,Mn=!1,zr,cn,zt,mn;for(;++qe<=De;){const pt=ae[qe];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?rt++:rt--,mn=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(zr&&!mn&&!rt&&!zt&&(zt=qe),mn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mn=void 0}if(!rt&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||rt===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(zr){let di=qe;for(cn=void 0;di--;){const fr=ae[di];if(fr[1].type==="lineEnding"||fr[1].type==="lineEndingBlank"){if(fr[0]==="exit")continue;cn&&(ae[cn][1].type="lineEndingBlank",Mn=!0),fr[1].type="lineEnding",cn=di}else if(!(fr[1].type==="linePrefix"||fr[1].type==="blockQuotePrefix"||fr[1].type==="blockQuotePrefixWhitespace"||fr[1].type==="blockQuoteMarker"||fr[1].type==="listItemIndent"))break}zt&&(!cn||zt<cn)&&(zr._spread=!0),zr.end=Object.assign({},cn?ae[cn][1].start:pt[1].end),ae.splice(cn||qe,0,["exit",zr,pt[2]]),qe++,De++}if(pt[1].type==="listItemPrefix"){const di={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};zr=di,ae.splice(qe,0,["enter",di,pt[2]]),qe++,De++,zt=void 0,mn=!0}}}return ae[ye][1]._spread=Mn,De}function l(ae,ye){return De;function De(qe){d.call(this,ae(qe),qe),ye&&ye.call(this,qe)}}function o(){this.stack.push({type:"fragment",children:[]})}function d(ae,ye,De){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([ye,De||void 0]),ae.position={start:Pi(ye.start),end:void 0}}function h(ae){return ye;function ye(De){ae&&ae.call(this,De),f.call(this,De)}}function f(ae,ye){const De=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==ae.type&&(ye?ye.call(this,ae,qe[0]):(qe[1]||ix).call(this,ae,qe[0]));else throw new Error("Cannot close `"+ae.type+"` ("+_u({start:ae.start,end:ae.end})+"): it’s not open");De.position.end=Pi(ae.end)}function m(){return Nm(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function x(ae){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function E(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=ae}function T(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=ae}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ae.replace(/(\r?\n|\r)$/g,"")}function F(ae){const ye=this.resume(),De=this.stack[this.stack.length-1];De.label=ye,De.identifier=br(this.sliceSerialize(ae)).toLowerCase()}function H(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ae}function V(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ae}function J(ae){const ye=this.stack[this.stack.length-1];if(!ye.depth){const De=this.sliceSerialize(ae).length;ye.depth=De}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function ne(ae){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(ae){const De=this.stack[this.stack.length-1].children;let qe=De[De.length-1];(!qe||qe.type!=="text")&&(qe=on(),qe.position={start:Pi(ae.start),end:void 0},De.push(qe)),this.stack.push(qe)}function z(ae){const ye=this.stack.pop();ye.value+=this.sliceSerialize(ae),ye.position.end=Pi(ae.end)}function $(ae){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const De=ye.children[ye.children.length-1];De.position.end=Pi(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(fe.call(this,ae),z.call(this,ae))}function Y(){this.data.atHardBreak=!0}function _e(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ae}function oe(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ae}function le(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ae}function I(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ye,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function te(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ye,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function be(ae){const ye=this.sliceSerialize(ae),De=this.stack[this.stack.length-2];De.label=V9(ye),De.identifier=br(ye).toLowerCase()}function ke(){const ae=this.stack[this.stack.length-1],ye=this.resume(),De=this.stack[this.stack.length-1];if(this.data.inReference=!0,De.type==="link"){const qe=ae.children;De.children=qe}else De.alt=ye}function O(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ae}function D(){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ae}function P(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function ce(ae){const ye=this.resume(),De=this.stack[this.stack.length-1];De.label=ye,De.identifier=br(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function Ee(ae){this.data.characterReferenceType=ae.type}function xe(ae){const ye=this.sliceSerialize(ae),De=this.data.characterReferenceType;let qe;De?(qe=xT(ye,De==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Om(ye);const rt=this.stack[this.stack.length-1];rt.value+=qe}function Me(ae){const ye=this.stack.pop();ye.position.end=Pi(ae.end)}function Je(ae){z.call(this,ae);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(ae)}function Oe(ae){z.call(this,ae);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(ae)}function Gt(){return{type:"blockquote",children:[]}}function Wt(){return{type:"code",lang:null,meta:null,value:""}}function On(){return{type:"inlineCode",value:""}}function cr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xt(){return{type:"emphasis",children:[]}}function vr(){return{type:"heading",depth:0,children:[]}}function ci(){return{type:"break"}}function Ue(){return{type:"html",value:""}}function ot(){return{type:"image",title:null,url:"",alt:null}}function jt(){return{type:"link",title:null,url:"",children:[]}}function un(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function dr(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Ud(){return{type:"paragraph",children:[]}}function jd(){return{type:"strong",children:[]}}function on(){return{type:"text",value:""}}function Fd(){return{type:"thematicBreak"}}}function Pi(e){return{line:e.line,column:e.column,offset:e.offset}}function m3(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?m3(e,i):a7(e,i)}}function a7(e,t){let n;for(n in t)if(p3.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function ix(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_u({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_u({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_u({start:t.start,end:t.end})+") is still open")}function s7(e){const t=this;t.parser=n;function n(i){return r7(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function l7(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function u7(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
59
+ `}]}function o7(e,t){const n=t.value?t.value+`
60
+ `:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function c7(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function d7(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function f7(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=Xs(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let o,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=l+1,d+=1,e.footnoteCounts.set(i,d);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,h);const f={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,f),e.applyData(t,f)}function h7(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p7(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function g3(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=i:s.push({type:"text",value:i}),s}function m7(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return g3(e,t);const s={src:Xs(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function g7(e,t){const n={src:Xs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function b7(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function y7(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return g3(e,t);const s={href:Xs(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function E7(e,t){const n={href:Xs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function x7(e,t,n){const i=e.all(t),s=n?v7(n):b3(t),l={},o=[];if(typeof t.checked=="boolean"){const m=i[0];let b;m&&m.type==="element"&&m.tagName==="p"?b=m:(b={type:"element",tagName:"p",properties:{},children:[]},i.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const m=i[d];(s||d!==0||m.type!=="element"||m.tagName!=="p")&&o.push({type:"text",value:`
61
+ `}),m.type==="element"&&m.tagName==="p"&&!s?o.push(...m.children):o.push(m)}const h=i[i.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
62
+ `});const f={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,f),e.applyData(t,f)}function v7(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=b3(n[i])}return t}function b3(e){const t=e.spread;return t??e.children.length>1}function _7(e,t){const n={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<i.length;){const o=i[s];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function T7(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A7(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function S7(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w7(e,t){const n=e.all(t),i=n.shift(),s=[];if(i){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],o),s.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Ir(t.children[1]),h=_d(t.children[t.children.length-1]);d&&h&&(o.position={start:d,end:h}),s.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function k7(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,d=o?o.length:t.children.length;let h=-1;const f=[];for(;++h<d;){const b=t.children[h],x={},E=o?o[h]:void 0;E&&(x.align=E);let T={type:"element",tagName:l,properties:x,children:[]};b&&(T.children=e.all(b),e.patch(b,T),T=e.applyData(b,T)),f.push(T)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function C7(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ax=9,sx=32;function N7(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),s=0;const l=[];for(;i;)l.push(lx(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=n.exec(t);return l.push(lx(t.slice(s),s>0,!1)),l.join("")}function lx(e,t,n){let i=0,s=e.length;if(t){let l=e.codePointAt(i);for(;l===ax||l===sx;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(s-1);for(;l===ax||l===sx;)s--,l=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function R7(e,t){const n={type:"text",value:N7(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function O7(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const M7={blockquote:l7,break:u7,code:o7,delete:c7,emphasis:d7,footnoteReference:f7,heading:h7,html:p7,imageReference:m7,image:g7,inlineCode:b7,linkReference:y7,link:E7,listItem:x7,list:_7,paragraph:T7,root:A7,strong:S7,table:w7,tableCell:C7,tableRow:k7,text:R7,thematicBreak:O7,toml:_c,yaml:_c,definition:_c,footnoteDefinition:_c};function _c(){}function L7(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function D7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function I7(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||L7,i=e.options.footnoteBackLabel||D7,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let h=-1;for(;++h<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[h]);if(!f)continue;const m=e.all(f),b=String(f.identifier).toUpperCase(),x=Xs(b.toLowerCase());let E=0;const T=[],w=e.footnoteCounts.get(b);for(;w!==void 0&&++E<=w;){T.length>0&&T.push({type:"text",value:" "});let F=typeof n=="string"?n:n(h,E);typeof F=="string"&&(F={type:"text",value:F}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(E>1?"-"+E:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,E),className:["data-footnote-backref"]},children:Array.isArray(F)?F:[F]})}const S=m[m.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const F=S.children[S.children.length-1];F&&F.type==="text"?F.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...T)}else m.push(...T);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(m,!0)};e.patch(f,k),d.push(k)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Oa(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
63
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
64
+ `}]}}const Pp={}.hasOwnProperty,B7={};function z7(e,t){const n=t||B7,i=new Map,s=new Map,l=new Map,o={...M7,...n.handlers},d={all:f,applyData:H7,definitionById:i,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:o,one:h,options:n,patch:P7,wrap:j7};return Dr(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const b=m.type==="definition"?i:s,x=String(m.identifier).toUpperCase();b.has(x)||b.set(x,m)}}),d;function h(m,b){const x=m.type,E=d.handlers[x];if(Pp.call(d.handlers,x)&&E)return E(d,m,b);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in m){const{children:w,...S}=m,k=Oa(S);return k.children=d.all(m),k}return Oa(m)}return(d.options.unknownHandler||U7)(d,m,b)}function f(m){const b=[];if("children"in m){const x=m.children;let E=-1;for(;++E<x.length;){const T=d.one(x[E],m);if(T){if(E&&x[E-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=ux(T.value)),!Array.isArray(T)&&T.type==="element")){const w=T.children[0];w&&w.type==="text"&&(w.value=ux(w.value))}Array.isArray(T)?b.push(...T):b.push(T)}}}return b}}function P7(e,t){e.position&&(t.position=X_(e))}function H7(e,t){let n=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const o="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,Oa(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function U7(e,t){const n=t.data||{},i="value"in t&&!(Pp.call(n,"hProperties")||Pp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function j7(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
65
+ `});++i<e.length;)i&&n.push({type:"text",value:`
66
+ `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
67
+ `}),n}function ux(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ox(e,t){const n=z7(e,t),i=n.one(e,void 0),s=I7(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
68
+ `},s),l}function F7(e,t){return e&&"run"in e?async function(n,i){const s=ox(n,{file:i,...t});await e.run(s,i)}:function(n,i){return ox(n,{file:i,...e||t})}}function cx(e){if(e)throw e}var R0,dx;function $7(){if(dx)return R0;dx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},l=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var m=e.call(f,"constructor"),b=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!b)return!1;var x;for(x in f);return typeof x>"u"||e.call(f,x)},o=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},d=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(i)return i(f,m).value}else return;return f[m]};return R0=function h(){var f,m,b,x,E,T,w=arguments[0],S=1,k=arguments.length,F=!1;for(typeof w=="boolean"&&(F=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<k;++S)if(f=arguments[S],f!=null)for(m in f)b=d(w,m),x=d(f,m),w!==x&&(F&&x&&(l(x)||(E=s(x)))?(E?(E=!1,T=b&&s(b)?b:[]):T=b&&l(b)?b:{},o(w,{name:m,newValue:h(F,T,x)})):typeof x<"u"&&o(w,{name:m,newValue:x}));return w},R0}var q7=$7();const O0=Mu(q7);function Hp(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Y7(){const e=[],t={run:n,use:i};return t;function n(...s){let l=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);d(null,...s);function d(h,...f){const m=e[++l];let b=-1;if(h){o(h);return}for(;++b<s.length;)(f[b]===null||f[b]===void 0)&&(f[b]=s[b]);s=f,m?V7(m,d)(...f):o(null,...f)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function V7(e,t){let n;return i;function i(...o){const d=e.length>o.length;let h;d&&o.push(s);try{h=e.apply(this,o)}catch(f){const m=f;if(d&&n)throw m;return s(m)}d||(h&&h.then&&typeof h.then=="function"?h.then(l,s):h instanceof Error?s(h):l(h))}function s(o,...d){n||(n=!0,t(o,...d))}function l(o){s(null,o)}}const Nr={basename:G7,dirname:W7,extname:X7,join:Q7,sep:"/"};function G7(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vu(e);let n=0,i=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else i<0&&(l=!0,i=s+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let o=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else o<0&&(l=!0,o=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(i=s):(d=-1,i=o));return n===i?i=o:i<0&&(i=e.length),e.slice(n,i)}function W7(e){if(Vu(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function X7(e){Vu(e);let t=e.length,n=-1,i=0,s=-1,l=0,o;for(;t--;){const d=e.codePointAt(t);if(d===47){if(o){i=t+1;break}continue}n<0&&(o=!0,n=t+1),d===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===i+1?"":e.slice(s,n)}function Q7(...e){let t=-1,n;for(;++t<e.length;)Vu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":K7(n)}function K7(e){Vu(e);const t=e.codePointAt(0)===47;let n=Z7(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Z7(e,t){let n="",i=0,s=-1,l=0,o=-1,d,h;for(;++o<=e.length;){if(o<e.length)d=e.codePointAt(o);else{if(d===47)break;d=47}if(d===47){if(!(s===o-1||l===1))if(s!==o-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",i=0):(n=n.slice(0,h),i=n.length-1-n.lastIndexOf("/")),s=o,l=0;continue}}else if(n.length>0){n="",i=0,s=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(s+1,o):n=e.slice(s+1,o),i=o-s-1;s=o,l=0}else d===46&&l>-1?l++:l=-1}return n}function Vu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const J7={cwd:eB};function eB(){return"/"}function Up(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tB(e){if(typeof e=="string")e=new URL(e);else if(!Up(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return nB(e)}function nB(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const M0=["history","path","basename","stem","extname","dirname"];class rB{constructor(t){let n;t?Up(t)?n={path:t}:typeof t=="string"||iB(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":J7.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<M0.length;){const l=M0[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)M0.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Nr.basename(this.path):void 0}set basename(t){D0(t,"basename"),L0(t,"basename"),this.path=Nr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Nr.dirname(this.path):void 0}set dirname(t){fx(this.basename,"dirname"),this.path=Nr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Nr.extname(this.path):void 0}set extname(t){if(L0(t,"extname"),fx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Nr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Up(t)&&(t=tB(t)),D0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Nr.basename(this.path,this.extname):void 0}set stem(t){D0(t,"stem"),L0(t,"stem"),this.path=Nr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const s=this.message(t,n,i);throw s.fatal=!0,s}info(t,n,i){const s=this.message(t,n,i);return s.fatal=void 0,s}message(t,n,i){const s=new ln(t,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function L0(e,t){if(e&&e.includes(Nr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Nr.sep+"`")}function D0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function iB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const aB=(function(e){const i=this.constructor.prototype,s=i[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),sB={}.hasOwnProperty;class jm extends aB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Y7()}copy(){const t=new jm;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(O0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(z0("data",this.frozen),this.namespace[t]=n,this):sB.call(this.namespace,t)&&this.namespace[t]||void 0:t?(z0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Tc(t),i=this.parser||this.Parser;return I0("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),I0("process",this.parser||this.Parser),B0("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,o){const d=Tc(t),h=i.parse(d);i.run(h,d,function(m,b,x){if(m||!b||!x)return f(m);const E=b,T=i.stringify(E,x);oB(T)?x.value=T:x.result=T,f(m,x)});function f(m,b){m||!b?o(m):l?l(b):n(void 0,b)}}}processSync(t){let n=!1,i;return this.freeze(),I0("processSync",this.parser||this.Parser),B0("processSync",this.compiler||this.Compiler),this.process(t,s),px("processSync","process",n),i;function s(l,o){n=!0,cx(l),i=o}}run(t,n,i){hx(t),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(o,d){const h=Tc(n);s.run(t,h,f);function f(m,b,x){const E=b||t;m?d(m):o?o(E):i(void 0,E,x)}}}runSync(t,n){let i=!1,s;return this.run(t,n,l),px("runSync","run",i),s;function l(o,d){cx(o),s=d,i=!0}}stringify(t,n){this.freeze();const i=Tc(n),s=this.compiler||this.Compiler;return B0("stringify",s),hx(t),s(t,i)}use(t,...n){const i=this.attachers,s=this.namespace;if(z0("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(f){if(typeof f=="function")h(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[m,...b]=f;h(m,b)}else o(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function o(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(f.plugins),f.settings&&(s.settings=O0(!0,s.settings,f.settings))}function d(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const b=f[m];l(b)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function h(f,m){let b=-1,x=-1;for(;++b<i.length;)if(i[b][0]===f){x=b;break}if(x===-1)i.push([f,...m]);else if(m.length>0){let[E,...T]=m;const w=i[x][1];Hp(w)&&Hp(E)&&(E=O0(!0,w,E)),i[x]=[f,E,...T]}}}}const lB=new jm().freeze();function I0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function B0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function z0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function hx(e){if(!Hp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function px(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tc(e){return uB(e)?e:new rB(e)}function uB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oB(e){return typeof e=="string"||cB(e)}function cB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Fm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pa=Fm();function y3(e){Pa=e}var Ta={exec:()=>null};function Ze(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(s,l)=>{let o=typeof l=="string"?l:l.source;return o=o.replace(pn.caret,"$1"),n=n.replace(s,o),i},getRegex:()=>new RegExp(n,t)};return i}var dB=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),pn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,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,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=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},fB=/^(?:[ \t]*(?:\n|$))+/,hB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,pB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,mB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$m=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,E3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,x3=Ze(E3).replace(/bull/g,$m).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),gB=Ze(E3).replace(/bull/g,$m).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bB=/^[^\n]+/,Ym=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,yB=Ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ym).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),EB=Ze(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$m).getRegex(),wd="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",Vm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xB=Ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Vm).replace("tag",wd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v3=Ze(qm).replace("hr",Gu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wd).getRegex(),vB=Ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",v3).getRegex(),Gm={blockquote:vB,code:hB,def:yB,fences:pB,heading:mB,hr:Gu,html:xB,lheading:x3,list:EB,newline:fB,paragraph:v3,table:Ta,text:bB},mx=Ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wd).getRegex(),_B={...Gm,lheading:gB,table:mx,paragraph:Ze(qm).replace("hr",Gu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",mx).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wd).getRegex()},TB={...Gm,html:Ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vm).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:Ta,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ze(qm).replace("hr",Gu).replace("heading",` *#{1,6} *[^
69
+ ]`).replace("lheading",x3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},AB=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,SB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_3=/^( {2,}|\\)\n(?!\s*$)/,wB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,kd=/[\p{P}\p{S}]/u,Wm=/[\s\p{P}\p{S}]/u,T3=/[^\s\p{P}\p{S}]/u,kB=Ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Wm).getRegex(),A3=/(?!~)[\p{P}\p{S}]/u,CB=/(?!~)[\s\p{P}\p{S}]/u,NB=/(?:[^\s\p{P}\p{S}]|~)/u,S3=/(?![*_])[\p{P}\p{S}]/u,RB=/(?![*_])[\s\p{P}\p{S}]/u,OB=/(?:[^\s\p{P}\p{S}]|[*_])/u,MB=Ze(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",dB?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),w3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,LB=Ze(w3,"u").replace(/punct/g,kd).getRegex(),DB=Ze(w3,"u").replace(/punct/g,A3).getRegex(),k3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",IB=Ze(k3,"gu").replace(/notPunctSpace/g,T3).replace(/punctSpace/g,Wm).replace(/punct/g,kd).getRegex(),BB=Ze(k3,"gu").replace(/notPunctSpace/g,NB).replace(/punctSpace/g,CB).replace(/punct/g,A3).getRegex(),zB=Ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,T3).replace(/punctSpace/g,Wm).replace(/punct/g,kd).getRegex(),PB=Ze(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,S3).getRegex(),HB="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",UB=Ze(HB,"gu").replace(/notPunctSpace/g,OB).replace(/punctSpace/g,RB).replace(/punct/g,S3).getRegex(),jB=Ze(/\\(punct)/,"gu").replace(/punct/g,kd).getRegex(),FB=Ze(/^<(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(),$B=Ze(Vm).replace("(?:-->|$)","-->").getRegex(),qB=Ze("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",$B).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ed=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,YB=Ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ed).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),C3=Ze(/^!?\[(label)\]\[(ref)\]/).replace("label",ed).replace("ref",Ym).getRegex(),N3=Ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ym).getRegex(),VB=Ze("reflink|nolink(?!\\()","g").replace("reflink",C3).replace("nolink",N3).getRegex(),gx=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Xm={_backpedal:Ta,anyPunctuation:jB,autolink:FB,blockSkip:MB,br:_3,code:SB,del:Ta,delLDelim:Ta,delRDelim:Ta,emStrongLDelim:LB,emStrongRDelimAst:IB,emStrongRDelimUnd:zB,escape:AB,link:YB,nolink:N3,punctuation:kB,reflink:C3,reflinkSearch:VB,tag:qB,text:wB,url:Ta},GB={...Xm,link:Ze(/^!?\[(label)\]\((.*?)\)/).replace("label",ed).getRegex(),reflink:Ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ed).getRegex()},jp={...Xm,emStrongRDelimAst:BB,emStrongLDelim:DB,delLDelim:PB,delRDelim:UB,url:Ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",gx).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",gx).getRegex()},WB={...jp,br:Ze(_3).replace("{2,}","*").getRegex(),text:Ze(jp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ac={normal:Gm,gfm:_B,pedantic:TB},ru={normal:Xm,gfm:jp,breaks:WB,pedantic:GB},XB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bx=e=>XB[e];function Cr(e,t){if(t){if(pn.escapeTest.test(e))return e.replace(pn.escapeReplace,bx)}else if(pn.escapeTestNoEncode.test(e))return e.replace(pn.escapeReplaceNoEncode,bx);return e}function yx(e){try{e=encodeURI(e).replace(pn.percentDecode,"%")}catch{return null}return e}function Ex(e,t){let n=e.replace(pn.findPipe,(l,o,d)=>{let h=!1,f=o;for(;--f>=0&&d[f]==="\\";)h=!h;return h?"|":" |"}),i=n.split(pn.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(pn.slashPipe,"|");return i}function iu(e,t,n){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function QB(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function KB(e,t=0){let n=t,i="";for(let s of e)if(s===" "){let l=4-n%4;i+=" ".repeat(l),n+=l}else i+=s,n++;return i}function xx(e,t,n,i,s){let l=t.href,o=t.title||null,d=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:o,text:d,tokens:i.inlineTokens(d)};return i.state.inLink=!1,h}function ZB(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
70
+ `).map(l=>{let o=l.match(n.other.beginningSpace);if(o===null)return l;let[d]=o;return d.length>=s.length?l.slice(s.length):l}).join(`
71
+ `)}var td=class{options;rules;lexer;constructor(t){this.options=t||Pa}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let i=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:iu(i,`
72
+ `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let i=n[0],s=ZB(i,n[3]||"",this.rules);return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:s}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let i=n[2].trim();if(this.rules.other.endingHash.test(i)){let s=iu(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:iu(n[0],`
73
+ `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let i=iu(n[0],`
74
+ `).split(`
75
+ `),s="",l="",o=[];for(;i.length>0;){let d=!1,h=[],f;for(f=0;f<i.length;f++)if(this.rules.other.blockquoteStart.test(i[f]))h.push(i[f]),d=!0;else if(!d)h.push(i[f]);else break;i=i.slice(f);let m=h.join(`
76
+ `),b=m.replace(this.rules.other.blockquoteSetextReplace,`
77
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
78
+ ${m}`:m,l=l?`${l}
79
+ ${b}`:b;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,o,!0),this.lexer.state.top=x,i.length===0)break;let E=o.at(-1);if(E?.type==="code")break;if(E?.type==="blockquote"){let T=E,w=T.raw+`
80
+ `+i.join(`
81
+ `),S=this.blockquote(w);o[o.length-1]=S,s=s.substring(0,s.length-T.raw.length)+S.raw,l=l.substring(0,l.length-T.text.length)+S.text;break}else if(E?.type==="list"){let T=E,w=T.raw+`
82
+ `+i.join(`
83
+ `),S=this.list(w);o[o.length-1]=S,s=s.substring(0,s.length-E.raw.length)+S.raw,l=l.substring(0,l.length-T.raw.length)+S.raw,i=w.substring(o.at(-1).raw.length).split(`
84
+ `);continue}}return{type:"blockquote",raw:s,tokens:o,text:l}}}list(t){let n=this.rules.block.list.exec(t);if(n){let i=n[1].trim(),s=i.length>1,l={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),d=!1;for(;t;){let f=!1,m="",b="";if(!(n=o.exec(t))||this.rules.block.hr.test(t))break;m=n[0],t=t.substring(m.length);let x=KB(n[2].split(`
85
+ `,1)[0],n[1].length),E=t.split(`
86
+ `,1)[0],T=!x.trim(),w=0;if(this.options.pedantic?(w=2,b=x.trimStart()):T?w=n[1].length+1:(w=x.search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=x.slice(w),w+=n[1].length),T&&this.rules.other.blankLine.test(E)&&(m+=E+`
87
+ `,t=t.substring(E.length+1),f=!0),!f){let S=this.rules.other.nextBulletRegex(w),k=this.rules.other.hrRegex(w),F=this.rules.other.fencesBeginRegex(w),H=this.rules.other.headingBeginRegex(w),V=this.rules.other.htmlBeginRegex(w),J=this.rules.other.blockquoteBeginRegex(w);for(;t;){let j=t.split(`
88
+ `,1)[0],ne;if(E=j,this.options.pedantic?(E=E.replace(this.rules.other.listReplaceNesting," "),ne=E):ne=E.replace(this.rules.other.tabCharGlobal," "),F.test(E)||H.test(E)||V.test(E)||J.test(E)||S.test(E)||k.test(E))break;if(ne.search(this.rules.other.nonSpaceChar)>=w||!E.trim())b+=`
89
+ `+ne.slice(w);else{if(T||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||F.test(x)||H.test(x)||k.test(x))break;b+=`
90
+ `+E}T=!E.trim(),m+=j+`
91
+ `,t=t.substring(j.length+1),x=ne.slice(w)}}l.loose||(d?l.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(d=!0)),l.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(b),loose:!1,text:b,tokens:[]}),l.raw+=m}let h=l.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f of l.items){if(this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]),f.task){if(f.text=f.text.replace(this.rules.other.listReplaceTask,""),f.tokens[0]?.type==="text"||f.tokens[0]?.type==="paragraph"){f.tokens[0].raw=f.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),f.tokens[0].text=f.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let b=this.lexer.inlineQueue.length-1;b>=0;b--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[b].src)){this.lexer.inlineQueue[b].src=this.lexer.inlineQueue[b].src.replace(this.rules.other.listReplaceTask,"");break}}let m=this.rules.other.listTaskCheckbox.exec(f.raw);if(m){let b={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};f.checked=b.checked,l.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=b.raw+f.tokens[0].raw,f.tokens[0].text=b.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(b)):f.tokens.unshift({type:"paragraph",raw:b.raw,text:b.raw,tokens:[b]}):f.tokens.unshift(b)}}if(!l.loose){let m=f.tokens.filter(x=>x.type==="space"),b=m.length>0&&m.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=b}}if(l.loose)for(let f of l.items){f.loose=!0;for(let m of f.tokens)m.type==="text"&&(m.type="paragraph")}return l}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let i=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:s,title:l}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let i=Ex(n[1]),s=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
92
+ `):[],o={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let d of s)this.rules.other.tableAlignRight.test(d)?o.align.push("right"):this.rules.other.tableAlignCenter.test(d)?o.align.push("center"):this.rules.other.tableAlignLeft.test(d)?o.align.push("left"):o.align.push(null);for(let d=0;d<i.length;d++)o.header.push({text:i[d],tokens:this.lexer.inline(i[d]),header:!0,align:o.align[d]});for(let d of l)o.rows.push(Ex(d,o.header.length).map((h,f)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[f]})));return o}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let i=n[1].charAt(n[1].length-1)===`
93
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let i=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=iu(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=QB(n[2],"()");if(o===-2)return;if(o>-1){let d=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let s=n[2],l="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],l=o[3])}else l=n[3]?n[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),xx(n,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=n[s.toLowerCase()];if(!l){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return xx(i,l,i[0],this.lexer,this.rules)}}emStrong(t,n,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let l=[...s[0]].length-1,o,d,h=l,f=0,m=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,n=n.slice(-1*t.length+l);(s=m.exec(n))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(d=[...o].length,s[3]||s[4]){h+=d;continue}else if((s[5]||s[6])&&l%3&&!((l+d)%3)){f+=d;continue}if(h-=d,h>0)continue;d=Math.min(d,d+h+f);let b=[...s[0]][0].length,x=t.slice(0,l+s.index+b+d);if(Math.min(l,d)%2){let T=x.slice(1,-1);return{type:"em",raw:x,text:T,tokens:this.lexer.inlineTokens(T)}}let E=x.slice(2,-2);return{type:"strong",raw:x,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let i=n[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),l=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&l&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:n[0],text:i}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,i=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!i||this.rules.inline.punctuation.exec(i))){let l=[...s[0]].length-1,o,d,h=l,f=this.rules.inline.delRDelim;for(f.lastIndex=0,n=n.slice(-1*t.length+l);(s=f.exec(n))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o||(d=[...o].length,d!==l))continue;if(s[3]||s[4]){h+=d;continue}if(h-=d,h>0)continue;d=Math.min(d,d+h);let m=[...s[0]][0].length,b=t.slice(0,l+s.index+m+d),x=b.slice(l,-l);return{type:"del",raw:b,text:x,tokens:this.lexer.inlineTokens(x)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let i,s;return n[2]==="@"?(i=n[1],s="mailto:"+i):(i=n[1],s=i),{type:"link",raw:n[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let i,s;if(n[2]==="@")i=n[0],s="mailto:"+i;else{let l;do l=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(l!==n[0]);i=n[0],n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let i=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:i}}}},ur=class Fp{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Pa,this.options.tokenizer=this.options.tokenizer||new td,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:pn,block:Ac.normal,inline:ru.normal};this.options.pedantic?(n.block=Ac.pedantic,n.inline=ru.pedantic):this.options.gfm&&(n.block=Ac.gfm,this.options.breaks?n.inline=ru.breaks:n.inline=ru.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ac,inline:ru}}static lex(t,n){return new Fp(n).lex(t)}static lexInline(t,n){return new Fp(n).inlineTokens(t)}lex(t){t=t.replace(pn.carriageReturn,`
94
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){for(this.options.pedantic&&(t=t.replace(pn.tabCharGlobal," ").replace(pn.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(o=>(s=o.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let o=n.at(-1);s.raw.length===1&&o!==void 0?o.raw+=`
95
+ `:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
96
+ `)?"":`
97
+ `)+s.raw,o.text+=`
98
+ `+s.text,this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
99
+ `)?"":`
100
+ `)+s.raw,o.text+=`
101
+ `+s.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let l=t;if(this.options.extensions?.startBlock){let o=1/0,d=t.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(o=Math.min(o,h))}),o<1/0&&o>=0&&(l=t.substring(0,o+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let o=n.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
102
+ `)?"":`
103
+ `)+s.raw,o.text+=`
104
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s),i=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
105
+ `)?"":`
106
+ `)+s.raw,o.text+=`
107
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(s);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let i=t,s=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)l=s[2]?s[2].length:0,i=i.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,d="";for(;t;){o||(d=""),o=!1;let h;if(this.options.extensions?.inline?.some(m=>(h=m.call({lexer:this},t,n))?(t=t.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let m=n.at(-1);h.type==="text"&&m?.type==="text"?(m.raw+=h.raw,m.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(t,i,d)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(t,i,d)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),n.push(h);continue}let f=t;if(this.options.extensions?.startInline){let m=1/0,b=t.slice(1),x;this.options.extensions.startInline.forEach(E=>{x=E.call({lexer:this},b),typeof x=="number"&&x>=0&&(m=Math.min(m,x))}),m<1/0&&m>=0&&(f=t.substring(0,m+1))}if(h=this.tokenizer.inlineText(f)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(d=h.raw.slice(-1)),o=!0;let m=n.at(-1);m?.type==="text"?(m.raw+=h.raw,m.text+=h.text):n.push(h);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},nd=class{options;parser;constructor(t){this.options=t||Pa}space(t){return""}code({text:t,lang:n,escaped:i}){let s=(n||"").match(pn.notSpaceStart)?.[0],l=t.replace(pn.endingNewline,"")+`
108
+ `;return s?'<pre><code class="language-'+Cr(s)+'">'+(i?l:Cr(l,!0))+`</code></pre>
109
+ `:"<pre><code>"+(i?l:Cr(l,!0))+`</code></pre>
110
+ `}blockquote({tokens:t}){return`<blockquote>
111
+ ${this.parser.parse(t)}</blockquote>
112
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
113
+ `}hr(t){return`<hr>
114
+ `}list(t){let n=t.ordered,i=t.start,s="";for(let d=0;d<t.items.length;d++){let h=t.items[d];s+=this.listitem(h)}let l=n?"ol":"ul",o=n&&i!==1?' start="'+i+'"':"";return"<"+l+o+`>
115
+ `+s+"</"+l+`>
116
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
117
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
118
+ `}table(t){let n="",i="";for(let l=0;l<t.header.length;l++)i+=this.tablecell(t.header[l]);n+=this.tablerow({text:i});let s="";for(let l=0;l<t.rows.length;l++){let o=t.rows[l];i="";for(let d=0;d<o.length;d++)i+=this.tablecell(o[d]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
119
+ <thead>
120
+ `+n+`</thead>
121
+ `+s+`</table>
122
+ `}tablerow({text:t}){return`<tr>
123
+ ${t}</tr>
124
+ `}tablecell(t){let n=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+n+`</${i}>
125
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Cr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:i}){let s=this.parser.parseInline(i),l=yx(t);if(l===null)return s;t=l;let o='<a href="'+t+'"';return n&&(o+=' title="'+Cr(n)+'"'),o+=">"+s+"</a>",o}image({href:t,title:n,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let l=yx(t);if(l===null)return Cr(i);t=l;let o=`<img src="${t}" alt="${Cr(i)}"`;return n&&(o+=` title="${Cr(n)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Cr(t.text)}},Qm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},gr=class $p{options;renderer;textRenderer;constructor(t){this.options=t||Pa,this.options.renderer=this.options.renderer||new nd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Qm}static parse(t,n){return new $p(n).parse(t)}static parseInline(t,n){return new $p(n).parseInline(t)}parse(t){let n="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=s,d=this.options.extensions.renderers[o.type].call({parser:this},o);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){n+=d||"";continue}}let l=s;switch(l.type){case"space":{n+=this.renderer.space(l);break}case"hr":{n+=this.renderer.hr(l);break}case"heading":{n+=this.renderer.heading(l);break}case"code":{n+=this.renderer.code(l);break}case"table":{n+=this.renderer.table(l);break}case"blockquote":{n+=this.renderer.blockquote(l);break}case"list":{n+=this.renderer.list(l);break}case"checkbox":{n+=this.renderer.checkbox(l);break}case"html":{n+=this.renderer.html(l);break}case"def":{n+=this.renderer.def(l);break}case"paragraph":{n+=this.renderer.paragraph(l);break}case"text":{n+=this.renderer.text(l);break}default:{let o='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,n=this.renderer){let i="";for(let s=0;s<t.length;s++){let l=t[s];if(this.options.extensions?.renderers?.[l.type]){let d=this.options.extensions.renderers[l.type].call({parser:this},l);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){i+=d||"";continue}}let o=l;switch(o.type){case"escape":{i+=n.text(o);break}case"html":{i+=n.html(o);break}case"link":{i+=n.link(o);break}case"image":{i+=n.image(o);break}case"checkbox":{i+=n.checkbox(o);break}case"strong":{i+=n.strong(o);break}case"em":{i+=n.em(o);break}case"codespan":{i+=n.codespan(o);break}case"br":{i+=n.br(o);break}case"del":{i+=n.del(o);break}case"text":{i+=n.text(o);break}default:{let d='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return i}},fu=class{options;block;constructor(t){this.options=t||Pa}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ur.lex:ur.lexInline}provideParser(){return this.block?gr.parse:gr.parseInline}},JB=class{defaults=Fm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=gr;Renderer=nd;TextRenderer=Qm;Lexer=ur;Tokenizer=td;Hooks=fu;constructor(...t){this.use(...t)}walkTokens(t,n){let i=[];for(let s of t)switch(i=i.concat(n.call(this,s)),s.type){case"table":{let l=s;for(let o of l.header)i=i.concat(this.walkTokens(o.tokens,n));for(let o of l.rows)for(let d of o)i=i.concat(this.walkTokens(d.tokens,n));break}case"list":{let l=s;i=i.concat(this.walkTokens(l.items,n));break}default:{let l=s;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach(o=>{let d=l[o].flat(1/0);i=i.concat(this.walkTokens(d,n))}):l.tokens&&(i=i.concat(this.walkTokens(l.tokens,n)))}}return i}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let o=n.renderers[l.name];o?n.renderers[l.name]=function(...d){let h=l.renderer.apply(this,d);return h===!1&&(h=o.apply(this,d)),h}:n.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[l.level];o?o.unshift(l.tokenizer):n[l.level]=[l.tokenizer],l.start&&(l.level==="block"?n.startBlock?n.startBlock.push(l.start):n.startBlock=[l.start]:l.level==="inline"&&(n.startInline?n.startInline.push(l.start):n.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(n.childTokens[l.name]=l.childTokens)}),s.extensions=n),i.renderer){let l=this.defaults.renderer||new nd(this.defaults);for(let o in i.renderer){if(!(o in l))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let d=o,h=i.renderer[d],f=l[d];l[d]=(...m)=>{let b=h.apply(l,m);return b===!1&&(b=f.apply(l,m)),b||""}}s.renderer=l}if(i.tokenizer){let l=this.defaults.tokenizer||new td(this.defaults);for(let o in i.tokenizer){if(!(o in l))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let d=o,h=i.tokenizer[d],f=l[d];l[d]=(...m)=>{let b=h.apply(l,m);return b===!1&&(b=f.apply(l,m)),b}}s.tokenizer=l}if(i.hooks){let l=this.defaults.hooks||new fu;for(let o in i.hooks){if(!(o in l))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let d=o,h=i.hooks[d],f=l[d];fu.passThroughHooks.has(o)?l[d]=m=>{if(this.defaults.async&&fu.passThroughHooksRespectAsync.has(o))return(async()=>{let x=await h.call(l,m);return f.call(l,x)})();let b=h.call(l,m);return f.call(l,b)}:l[d]=(...m)=>{if(this.defaults.async)return(async()=>{let x=await h.apply(l,m);return x===!1&&(x=await f.apply(l,m)),x})();let b=h.apply(l,m);return b===!1&&(b=f.apply(l,m)),b}}s.hooks=l}if(i.walkTokens){let l=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(d){let h=[];return h.push(o.call(this,d)),l&&(h=h.concat(l.call(this,d))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ur.lex(t,n??this.defaults)}parser(t,n){return gr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,i)=>{let s={...i},l={...this.defaults,...s},o=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.async===!1)return o(new 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 n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let d=l.hooks?await l.hooks.preprocess(n):n,h=await(l.hooks?await l.hooks.provideLexer():t?ur.lex:ur.lexInline)(d,l),f=l.hooks?await l.hooks.processAllTokens(h):h;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let m=await(l.hooks?await l.hooks.provideParser():t?gr.parse:gr.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(m):m})().catch(o);try{l.hooks&&(n=l.hooks.preprocess(n));let d=(l.hooks?l.hooks.provideLexer():t?ur.lex:ur.lexInline)(n,l);l.hooks&&(d=l.hooks.processAllTokens(d)),l.walkTokens&&this.walkTokens(d,l.walkTokens);let h=(l.hooks?l.hooks.provideParser():t?gr.parse:gr.parseInline)(d,l);return l.hooks&&(h=l.hooks.postprocess(h)),h}catch(d){return o(d)}}}onError(t,n){return i=>{if(i.message+=`
126
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Cr(i.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(i);throw i}}},La=new JB;function ht(e,t){return La.parse(e,t)}ht.options=ht.setOptions=function(e){return La.setOptions(e),ht.defaults=La.defaults,y3(ht.defaults),ht};ht.getDefaults=Fm;ht.defaults=Pa;ht.use=function(...e){return La.use(...e),ht.defaults=La.defaults,y3(ht.defaults),ht};ht.walkTokens=function(e,t){return La.walkTokens(e,t)};ht.parseInline=La.parseInline;ht.Parser=gr;ht.parser=gr.parse;ht.Renderer=nd;ht.TextRenderer=Qm;ht.Lexer=ur;ht.lexer=ur.lex;ht.Tokenizer=td;ht.Hooks=fu;ht.parse=ht;ht.options;ht.setOptions;ht.use;ht.walkTokens;ht.parseInline;gr.parse;ur.lex;var ez=300,tz="300px",nz=500;function rz(e={}){let{immediate:t=!1,debounceDelay:n=ez,rootMargin:i=tz,idleTimeout:s=nz}=e,[l,o]=R.useState(!1),d=R.useRef(null),h=R.useRef(null),f=R.useRef(null),m=R.useMemo(()=>E=>{let T=Date.now();return window.setTimeout(()=>{E({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-T))})},1)},[]),b=R.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(E,T)=>window.requestIdleCallback(E,T):m,[m]),x=R.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?E=>window.cancelIdleCallback(E):E=>{clearTimeout(E)},[]);return R.useEffect(()=>{if(t){o(!0);return}let E=d.current;if(!E)return;h.current&&(clearTimeout(h.current),h.current=null),f.current&&(x(f.current),f.current=null);let T=()=>{h.current&&(clearTimeout(h.current),h.current=null),f.current&&(x(f.current),f.current=null)},w=H=>{f.current=b(V=>{V.timeRemaining()>0||V.didTimeout?(o(!0),H.disconnect()):f.current=b(()=>{o(!0),H.disconnect()},{timeout:s/2})},{timeout:s})},S=H=>{T(),h.current=window.setTimeout(()=>{var V,J;let j=H.takeRecords();(j.length===0||(J=(V=j.at(-1))==null?void 0:V.isIntersecting)!=null&&J)&&w(H)},n)},k=(H,V)=>{H.isIntersecting?S(V):T()},F=new IntersectionObserver(H=>{for(let V of H)k(V,F)},{rootMargin:i,threshold:0});return F.observe(E),()=>{h.current&&clearTimeout(h.current),f.current&&x(f.current),F.disconnect()}},[t,n,i,s,x,b]),{shouldRender:l,containerRef:d}}var R3=/\s/,iz=/^\s+$/,az=new Set(["code","pre","svg","math","annotation"]),sz=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",lz=e=>e.some(t=>sz(t)&&az.has(t.tagName)),uz=e=>{let t=[],n="",i=!1;for(let s of e){let l=R3.test(s);l!==i&&n&&(t.push(n),n=""),n+=s,i=l}return n&&t.push(n),t},oz=e=>{let t=[],n="";for(let i of e)R3.test(i)?n+=i:(n&&(t.push(n),n=""),t.push(i));return n&&t.push(n),t},cz=(e,t,n,i,s)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${i}`:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${i}`},children:[{type:"text",value:e}]}),dz=(e,t,n,i,s)=>{let l=t.at(-1);if(!(l&&"children"in l))return;if(lz(t))return Ds;let o=l,d=o.children.indexOf(e);if(d===-1)return;let h=e.value;if(!h.trim()){s.count+=h.length;return}let f=n.sep==="char"?oz(h):uz(h),m=i.prevContentLength,b=f.map(x=>{let E=s.count;if(s.count+=x.length,iz.test(x))return{type:"text",value:x};let T=m>0&&E<m;return cz(x,n.animation,n.duration,n.easing,T)});return o.children.splice(d,1,...b),d+b.length},fz=0;function qp(e){var t,n,i,s;let l={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(i=e?.easing)!=null?i:"ease",sep:(s=e?.sep)!=null?s:"word"},o={prevContentLength:0,lastRenderCharCount:0},d=fz++,h=()=>f=>{let m={count:0};gm(f,"text",(b,x)=>dz(b,x,l,o,m)),o.lastRenderCharCount=m.count,o.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${d}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(f){o.prevContentLength=f},getLastRenderCharCount(){let f=o.lastRenderCharCount;return o.lastRenderCharCount=0,f}}}qp();var O3=R.createContext(!1),hz=()=>R.useContext(O3),Km=(...e)=>l3(VT(e)),pz=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(i=>i.startsWith(n)?i:`${e}:${i}`).join(" ")},mz=e=>e?(...t)=>pz(e,l3(VT(t))):Km,zs=(e,t,n)=>{let i=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(i),l=document.createElement("a");l.href=s,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)},Yp=R.createContext(Km),$e=()=>R.useContext(Yp),gz=Km("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),bz=e=>{let t={};for(let n of e.split(";")){let i=n.indexOf(":");if(i>0){let s=n.slice(0,i).trim(),l=n.slice(i+1).trim();s&&l&&(t[s]=l)}}return t},yz=R.memo(({children:e,result:t,language:n,className:i,startLine:s,...l})=>{let o=$e(),d=R.useMemo(()=>o(gz),[o]),h=R.useMemo(()=>{let f={};return t.bg&&(f["--sdm-bg"]=t.bg),t.fg&&(f["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(f,bz(t.rootStyle)),f},[t.bg,t.fg,t.rootStyle]);return v.jsx("div",{className:o(i,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...l,children:v.jsx("pre",{className:o(i,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:v.jsx("code",{className:o("[counter-increment:line_0] [counter-reset:line]"),style:s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((f,m)=>v.jsx("span",{className:d,children:f.length===0||f.length===1&&f[0].content===""?`
127
+ `:f.map((b,x)=>{let E={},T=!!b.bgColor;if(b.color&&(E["--sdm-c"]=b.color),b.bgColor&&(E["--sdm-tbg"]=b.bgColor),b.htmlStyle)for(let[w,S]of Object.entries(b.htmlStyle))w==="color"?E["--sdm-c"]=S:w==="background-color"?(E["--sdm-tbg"]=S,T=!0):E[w]=S;return v.jsx("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",T&&"bg-[var(--sdm-tbg)]",T&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:E,...b.htmlAttrs,children:b.content},x)})},m))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine),Ez=({className:e,language:t,style:n,isIncomplete:i,...s})=>{let l=$e();return v.jsx("div",{className:l("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":i||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...s})},M3=R.createContext({code:""}),L3=()=>R.useContext(M3),xz=({language:e})=>{let t=$e();return v.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:v.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},vz=/\n+$/,_z=R.lazy(()=>ri(()=>import("./highlighted-body-TPN3WLV5-DD4wpkf4.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),Tz=({code:e,language:t,className:n,children:i,isIncomplete:s=!1,startLine:l,...o})=>{let d=$e(),h=R.useMemo(()=>e.replace(vz,""),[e]),f=R.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
128
+ `).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return v.jsx(M3.Provider,{value:{code:e},children:v.jsxs(Ez,{isIncomplete:s,language:t,children:[v.jsx(xz,{language:t}),i?v.jsx("div",{className:d("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:v.jsx("div",{className:d("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:i})}):null,v.jsx(R.Suspense,{fallback:v.jsx(yz,{className:n,language:t,result:f,startLine:l,...o}),children:v.jsx(_z,{className:n,code:h,language:t,raw:f,startLine:l,...o})})]})})},Az=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Sz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),wz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),kz=e=>v.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[v.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Cz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),Nz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Rz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Oz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Mz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Lz=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),hu={CheckIcon:Az,CopyIcon:Sz,DownloadIcon:wz,ExternalLinkIcon:Oz,Loader2Icon:kz,Maximize2Icon:Cz,RotateCcwIcon:Nz,XIcon:Rz,ZoomInIcon:Mz,ZoomOutIcon:Lz},D3=R.createContext(hu),Dz=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),i=Object.keys(t);return n.length!==i.length?!1:n.every(s=>e[s]===t[s])},vx=({icons:e,children:t})=>{let n=R.useRef(e),i=R.useRef(e?{...hu,...e}:hu);Dz(n.current,e)||(n.current=e,i.current=e?{...hu,...e}:hu);let s=i.current;return v.jsx(D3.Provider,{value:s,children:t})},xr=()=>R.useContext(D3),I3={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Vp=R.createContext(I3),li=()=>R.useContext(Vp),_x=({onCopy:e,onError:t,timeout:n=2e3,children:i,className:s,code:l,...o})=>{let d=$e(),[h,f]=R.useState(!1),m=R.useRef(0),{code:b}=L3(),{isAnimating:x}=R.useContext(Vn),E=li(),T=l??b,w=async()=>{var F;if(typeof window>"u"||!((F=navigator?.clipboard)!=null&&F.writeText)){t?.(new Error("Clipboard API not available"));return}try{h||(await navigator.clipboard.writeText(T),f(!0),e?.(),m.current=window.setTimeout(()=>f(!1),n))}catch(H){t?.(H)}};R.useEffect(()=>()=>{window.clearTimeout(m.current)},[]);let S=xr(),k=h?S.CheckIcon:S.CopyIcon;return v.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:x,onClick:w,title:E.copyCode,type:"button",...o,children:i??v.jsx(k,{size:14})})},Tx={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Iz=({onDownload:e,onError:t,language:n,children:i,className:s,code:l,...o})=>{let d=$e(),{code:h}=L3(),{isAnimating:f}=R.useContext(Vn),m=li(),b=xr(),x=l??h,E=`file.${n&&n in Tx?Tx[n]:"txt"}`,T="text/plain",w=()=>{try{zs(E,x,T),e?.()}catch(S){t?.(S)}};return v.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:f,onClick:w,title:m.downloadFile,type:"button",...o,children:i??v.jsx(b.DownloadIcon,{size:14})})},Ax=()=>{let{Loader2Icon:e}=xr(),t=$e();return v.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[v.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),v.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:v.jsx(e,{className:t("size-4 animate-spin")})})]})},Bz=/\.[^/.]+$/,zz=({node:e,className:t,src:n,alt:i,onLoad:s,onError:l,...o})=>{let{DownloadIcon:d}=xr(),h=$e(),f=R.useRef(null),[m,b]=R.useState(!1),[x,E]=R.useState(!1),T=li(),w=o.width!=null||o.height!=null,S=(m||w)&&!x,k=x&&!w;R.useEffect(()=>{let J=f.current;if(J!=null&&J.complete){let j=J.naturalWidth>0;b(j),E(!j)}},[]);let F=R.useCallback(J=>{b(!0),E(!1),s?.(J)},[s]),H=R.useCallback(J=>{b(!1),E(!0),l?.(J)},[l]),V=async()=>{if(n)try{let J=await(await fetch(n)).blob(),j=new URL(n,window.location.origin).pathname.split("/").pop()||"",ne=j.split(".").pop(),Z=j.includes(".")&&ne!==void 0&&ne.length<=4,fe="";if(Z)fe=j;else{let z=J.type,$="png";z.includes("jpeg")||z.includes("jpg")?$="jpg":z.includes("png")?$="png":z.includes("svg")?$="svg":z.includes("gif")?$="gif":z.includes("webp")&&($="webp"),fe=`${(i||j||"image").replace(Bz,"")}.${$}`}zs(fe,J,J.type)}catch{window.open(n,"_blank")}};return n?v.jsxs("div",{className:h("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[v.jsx("img",{alt:i,className:h("max-w-full rounded-lg",k&&"hidden",t),"data-streamdown":"image",onError:H,onLoad:F,ref:f,src:n,...o}),k&&v.jsx("span",{className:h("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:T.imageNotAvailable}),v.jsx("div",{className:h("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),S&&v.jsx("button",{className:h("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:V,title:T.downloadImage,type:"button",children:v.jsx(d,{size:14})})]}):null},Tu=0,Zm=()=>{Tu+=1,Tu===1&&(document.body.style.overflow="hidden")},Jm=()=>{Tu=Math.max(0,Tu-1),Tu===0&&(document.body.style.overflow="")},Pz=({url:e,isOpen:t,onClose:n,onConfirm:i})=>{let{CheckIcon:s,CopyIcon:l,ExternalLinkIcon:o,XIcon:d}=xr(),h=$e(),[f,m]=R.useState(!1),b=li(),x=R.useCallback(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),E=R.useCallback(()=>{i(),n()},[i,n]);return R.useEffect(()=>{if(t){Zm();let T=w=>{w.key==="Escape"&&n()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),Jm()}}},[t,n]),t?v.jsx("div",{className:h("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:T=>{T.key==="Escape"&&n()},role:"button",tabIndex:0,children:v.jsxs("div",{className:h("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[v.jsx("button",{className:h("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:b.close,type:"button",children:v.jsx(d,{size:16})}),v.jsxs("div",{className:h("flex flex-col gap-2"),children:[v.jsxs("div",{className:h("flex items-center gap-2 font-semibold text-lg"),children:[v.jsx(o,{size:20}),v.jsx("span",{children:b.openExternalLink})]}),v.jsx("p",{className:h("text-muted-foreground text-sm"),children:b.externalLinkWarning})]}),v.jsx("div",{className:h("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),v.jsxs("div",{className:h("flex gap-2"),children:[v.jsx("button",{className:h("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:x,type:"button",children:f?v.jsxs(v.Fragment,{children:[v.jsx(s,{size:14}),v.jsx("span",{children:b.copied})]}):v.jsxs(v.Fragment,{children:[v.jsx(l,{size:14}),v.jsx("span",{children:b.copyLink})]})}),v.jsxs("button",{className:h("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:E,type:"button",children:[v.jsx(o,{size:14}),v.jsx("span",{children:b.openLink})]})]})]})}):null},Gp=R.createContext(null),e1=()=>R.useContext(Gp),eG=()=>{var e;let t=e1();return(e=t?.code)!=null?e:null},t1=()=>{var e;let t=e1();return(e=t?.mermaid)!=null?e:null},Hz=e=>{var t;let n=e1();return n!=null&&n.renderers&&e&&(t=n.renderers.find(i=>Array.isArray(i.language)?i.language.includes(e):i.language===e))!=null?t:null},Uz=(e,t)=>{var n;let i=(n=void 0)!=null?n:5;return new Promise((s,l)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),d=new Image;d.crossOrigin="anonymous",d.onload=()=>{let h=document.createElement("canvas"),f=d.width*i,m=d.height*i;h.width=f,h.height=m;let b=h.getContext("2d");if(!b){l(new Error("Failed to create 2D canvas context for PNG export"));return}b.drawImage(d,0,0,f,m),h.toBlob(x=>{if(!x){l(new Error("Failed to create PNG blob"));return}s(x)},"image/png")},d.onerror=()=>l(new Error("Failed to load SVG image")),d.src=o})},jz=({chart:e,children:t,className:n,onDownload:i,config:s,onError:l})=>{let o=$e(),[d,h]=R.useState(!1),f=R.useRef(null),{isAnimating:m}=R.useContext(Vn),b=xr(),x=t1(),E=li(),T=async w=>{try{if(w==="mmd"){zs("diagram.mmd",e,"text/plain"),h(!1),i?.(w);return}if(!x){l?.(new Error("Mermaid plugin not available"));return}let S=x.getMermaid(s),k=e.split("").reduce((V,J)=>(V<<5)-V+J.charCodeAt(0)|0,0),F=`mermaid-${Math.abs(k)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:H}=await S.render(F,e);if(!H){l?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(w==="svg"){zs("diagram.svg",H,"image/svg+xml"),h(!1),i?.(w);return}if(w==="png"){let V=await Uz(H);zs("diagram.png",V,"image/png"),i?.(w),h(!1);return}}catch(S){l?.(S)}};return R.useEffect(()=>{let w=S=>{let k=S.composedPath();f.current&&!k.includes(f.current)&&h(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[]),v.jsxs("div",{className:o("relative"),ref:f,children:[v.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>h(!d),title:E.downloadDiagram,type:"button",children:t??v.jsx(b.DownloadIcon,{size:14})}),d?v.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("svg"),title:E.downloadDiagramAsSvg,type:"button",children:E.mermaidFormatSvg}),v.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("png"),title:E.downloadDiagramAsPng,type:"button",children:E.mermaidFormatPng}),v.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("mmd"),title:E.downloadDiagramAsMmd,type:"button",children:E.mermaidFormatMmd})]}):null]})},Fz=({chart:e,config:t,onFullscreen:n,onExit:i,className:s,...l})=>{let{Maximize2Icon:o,XIcon:d}=xr(),h=$e(),[f,m]=R.useState(!1),{isAnimating:b,controls:x}=R.useContext(Vn),E=li(),T=(()=>{if(typeof x=="boolean")return x;let S=x.mermaid;return S===!1?!1:S===!0||S===void 0?!0:S.panZoom!==!1})(),w=()=>{m(!f)};return R.useEffect(()=>{if(f){Zm();let S=k=>{k.key==="Escape"&&m(!1)};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S),Jm()}}},[f]),R.useEffect(()=>{f?n?.():i&&i()},[f,n,i]),v.jsxs(v.Fragment,{children:[v.jsx("button",{className:h("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:b,onClick:w,title:E.viewFullscreen,type:"button",...l,children:v.jsx(o,{size:14})}),f?Pu.createPortal(v.jsxs("div",{className:h("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:w,onKeyDown:S=>{S.key==="Escape"&&w()},role:"button",tabIndex:0,children:[v.jsx("button",{className:h("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:w,title:E.exitFullscreen,type:"button",children:v.jsx(d,{size:20})}),v.jsx("div",{className:h("flex size-full items-center justify-center p-4"),onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),role:"presentation",children:v.jsx(h6,{chart:e,className:h("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:T})})]}),document.body):null]})},B3=e=>{var t,n;let i=[],s=[],l=e.querySelectorAll("thead th");for(let d of l)i.push(((t=d.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let d of o){let h=[],f=d.querySelectorAll("td");for(let m of f)h.push(((n=m.textContent)==null?void 0:n.trim())||"");s.push(h)}return{headers:i,rows:s}},z3=e=>{let{headers:t,rows:n}=e,i=d=>{let h=!1,f=!1;for(let m of d){if(m==='"'){h=!0,f=!0;break}(m===","||m===`
129
+ `)&&(h=!0)}return h?f?`"${d.replace(/"/g,'""')}"`:`"${d}"`:d},s=t.length>0?n.length+1:n.length,l=new Array(s),o=0;t.length>0&&(l[o]=t.map(i).join(","),o+=1);for(let d of n)l[o]=d.map(i).join(","),o+=1;return l.join(`
130
+ `)},$z=e=>{let{headers:t,rows:n}=e,i=d=>{let h=!1;for(let m of d)if(m===" "||m===`
131
+ `||m==="\r"){h=!0;break}if(!h)return d;let f=[];for(let m of d)m===" "?f.push("\\t"):m===`
132
+ `?f.push("\\n"):m==="\r"?f.push("\\r"):f.push(m);return f.join("")},s=t.length>0?n.length+1:n.length,l=new Array(s),o=0;t.length>0&&(l[o]=t.map(i).join(" "),o+=1);for(let d of n)l[o]=d.map(i).join(" "),o+=1;return l.join(`
133
+ `)},P0=e=>{let t=!1;for(let i of e)if(i==="\\"||i==="|"){t=!0;break}if(!t)return e;let n=[];for(let i of e)i==="\\"?n.push("\\\\"):i==="|"?n.push("\\|"):n.push(i);return n.join("")},Wp=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let i=new Array(n.length+2),s=0,l=t.map(d=>P0(d));i[s]=`| ${l.join(" | ")} |`,s+=1;let o=new Array(t.length);for(let d=0;d<t.length;d+=1)o[d]="---";i[s]=`| ${o.join(" | ")} |`,s+=1;for(let d of n)if(d.length<t.length){let h=new Array(t.length);for(let f=0;f<t.length;f+=1)h[f]=f<d.length?P0(d[f]):"";i[s]=`| ${h.join(" | ")} |`,s+=1}else{let h=d.map(f=>P0(f));i[s]=`| ${h.join(" | ")} |`,s+=1}return i.join(`
134
+ `)},P3=({children:e,className:t,onCopy:n,onError:i,timeout:s=2e3})=>{let l=$e(),[o,d]=R.useState(!1),[h,f]=R.useState(!1),m=R.useRef(null),b=R.useRef(0),{isAnimating:x}=R.useContext(Vn),E=li(),T=async k=>{var F,H;if(typeof window>"u"||!((F=navigator?.clipboard)!=null&&F.write)){i?.(new Error("Clipboard API not available"));return}try{let V=(H=m.current)==null?void 0:H.closest('[data-streamdown="table-wrapper"]'),J=V?.querySelector("table");if(!J){i?.(new Error("Table not found"));return}let j=B3(J),ne=({csv:z3,tsv:$z,md:Wp}[k]||Wp)(j),Z=new ClipboardItem({"text/plain":new Blob([ne],{type:"text/plain"}),"text/html":new Blob([J.outerHTML],{type:"text/html"})});await navigator.clipboard.write([Z]),f(!0),d(!1),n?.(k),b.current=window.setTimeout(()=>f(!1),s)}catch(V){i?.(V)}};R.useEffect(()=>{let k=F=>{let H=F.composedPath();m.current&&!H.includes(m.current)&&d(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k),window.clearTimeout(b.current)}},[]);let w=xr(),S=h?w.CheckIcon:w.CopyIcon;return v.jsxs("div",{className:l("relative"),ref:m,children:[v.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:x,onClick:()=>d(!o),title:E.copyTable,type:"button",children:e??v.jsx(S,{height:14,width:14})}),o?v.jsxs("div",{className:l("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("md"),title:E.copyTableAsMarkdown,type:"button",children:E.tableFormatMarkdown}),v.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("csv"),title:E.copyTableAsCsv,type:"button",children:E.tableFormatCsv}),v.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("tsv"),title:E.copyTableAsTsv,type:"button",children:E.tableFormatTsv})]}):null]})},H3=({children:e,className:t,onDownload:n,onError:i})=>{let s=$e(),[l,o]=R.useState(!1),d=R.useRef(null),{isAnimating:h}=R.useContext(Vn),f=li(),m=xr(),b=x=>{var E;try{let T=(E=d.current)==null?void 0:E.closest('[data-streamdown="table-wrapper"]'),w=T?.querySelector("table");if(!w){i?.(new Error("Table not found"));return}let S=B3(w),k=x==="csv"?z3(S):Wp(S);zs(`table.${x==="csv"?"csv":"md"}`,k,x==="csv"?"text/csv":"text/markdown"),o(!1),n?.(x)}catch(T){i?.(T)}};return R.useEffect(()=>{let x=E=>{let T=E.composedPath();d.current&&!T.includes(d.current)&&o(!1)};return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},[]),v.jsxs("div",{className:s("relative"),ref:d,children:[v.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>o(!l),title:f.downloadTable,type:"button",children:e??v.jsx(m.DownloadIcon,{size:14})}),l?v.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("csv"),title:f.downloadTableAsCsv,type:"button",children:f.tableFormatCsv}),v.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("markdown"),title:f.downloadTableAsMarkdown,type:"button",children:f.tableFormatMarkdown})]}):null]})},qz=({children:e,className:t,showCopy:n=!0,showDownload:i=!0})=>{let{Maximize2Icon:s,XIcon:l}=xr(),o=$e(),[d,h]=R.useState(!1),{isAnimating:f}=R.useContext(Vn),m=li(),b=()=>{h(!0)},x=()=>{h(!1)};return R.useEffect(()=>{if(d){Zm();let E=T=>{T.key==="Escape"&&h(!1)};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E),Jm()}}},[d]),v.jsxs(v.Fragment,{children:[v.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:b,title:m.viewFullscreen,type:"button",children:v.jsx(s,{size:14})}),d?Pu.createPortal(v.jsx("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:x,onKeyDown:E=>{E.key==="Escape"&&x()},role:"dialog",children:v.jsxs("div",{className:o("flex h-full flex-col"),onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),role:"presentation",children:[v.jsxs("div",{className:o("flex items-center justify-end gap-1 p-4"),children:[n?v.jsx(P3,{}):null,i?v.jsx(H3,{}):null,v.jsx("button",{className:o("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:x,title:m.exitFullscreen,type:"button",children:v.jsx(l,{size:20})})]}),v.jsx("div",{className:o("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:v.jsx("table",{className:o("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},Yz=({children:e,className:t,showControls:n,showCopy:i=!0,showDownload:s=!0,showFullscreen:l=!0,...o})=>{let d=$e(),h=n&&i,f=n&&s,m=n&&l,b=h||f||m;return v.jsxs("div",{className:d("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[b?v.jsxs("div",{className:d("flex items-center justify-end gap-1"),children:[h?v.jsx(P3,{}):null,f?v.jsx(H3,{}):null,m?v.jsx(qz,{showCopy:h,showDownload:f,children:e}):null]}):null,v.jsx("div",{className:d("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:v.jsx("table",{className:d("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},Vz=/startLine=(\d+)/,Gz=R.lazy(()=>ri(()=>Promise.resolve().then(()=>vV),void 0).then(e=>({default:e.Mermaid}))),Wz=/language-([^\s]+)/;function Cd(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,i=t.position.start,s=e.position.end,l=t.position.end;return n?.line===i?.line&&n?.column===i?.column&&s?.line===l?.line&&s?.column===l?.column}function kt(e,t){return e.className===t.className&&Cd(e.node,t.node)}var Xp=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,H0=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Sx=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Sc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},n1=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("ol",{className:s("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...i,children:e})},(e,t)=>kt(e,t));n1.displayName="MarkdownOl";var U3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...i,children:e})},(e,t)=>e.className===t.className&&Cd(e.node,t.node));U3.displayName="MarkdownLi";var j3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("ul",{className:s("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...i,children:e})},(e,t)=>kt(e,t));j3.displayName="MarkdownUl";var F3=R.memo(({className:e,node:t,...n})=>{let i=$e();return v.jsx("hr",{className:i("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>kt(e,t));F3.displayName="MarkdownHr";var $3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("span",{className:s("font-semibold",t),"data-streamdown":"strong",...i,children:e})},(e,t)=>kt(e,t));$3.displayName="MarkdownStrong";var Xz=({children:e,className:t,href:n,node:i,...s})=>{let l=$e(),{linkSafety:o}=R.useContext(Vn),[d,h]=R.useState(!1),f=n==="streamdown:incomplete-link",m=R.useCallback(async T=>{if(!(!(o!=null&&o.enabled&&n)||f)){if(T.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}h(!0)}},[o,n,f]),b=R.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),x=R.useCallback(()=>{h(!1)},[]),E={url:n??"",isOpen:d,onClose:x,onConfirm:b};return o!=null&&o.enabled&&n?v.jsxs(v.Fragment,{children:[v.jsx("button",{className:l("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",onClick:m,type:"button",children:e}),o.renderModal?o.renderModal(E):v.jsx(Pz,{...E})]}):v.jsx("a",{className:l("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},q3=R.memo(Xz,(e,t)=>kt(e,t)&&e.href===t.href);q3.displayName="MarkdownA";var Y3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h1",{className:s("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...i,children:e})},(e,t)=>kt(e,t));Y3.displayName="MarkdownH1";var V3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h2",{className:s("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...i,children:e})},(e,t)=>kt(e,t));V3.displayName="MarkdownH2";var G3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h3",{className:s("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...i,children:e})},(e,t)=>kt(e,t));G3.displayName="MarkdownH3";var W3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h4",{className:s("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...i,children:e})},(e,t)=>kt(e,t));W3.displayName="MarkdownH4";var X3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h5",{className:s("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...i,children:e})},(e,t)=>kt(e,t));X3.displayName="MarkdownH5";var Q3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("h6",{className:s("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...i,children:e})},(e,t)=>kt(e,t));Q3.displayName="MarkdownH6";var K3=R.memo(({children:e,className:t,node:n,...i})=>{let{controls:s}=R.useContext(Vn),l=Xp(s,"table"),o=H0(s,"copy"),d=H0(s,"download"),h=H0(s,"fullscreen");return v.jsx(Yz,{className:t,showControls:l,showCopy:o,showDownload:d,showFullscreen:h,...i,children:e})},(e,t)=>kt(e,t));K3.displayName="MarkdownTable";var Z3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("thead",{className:s("bg-muted/80",t),"data-streamdown":"table-header",...i,children:e})},(e,t)=>kt(e,t));Z3.displayName="MarkdownThead";var J3=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("tbody",{className:s("divide-y divide-border",t),"data-streamdown":"table-body",...i,children:e})},(e,t)=>kt(e,t));J3.displayName="MarkdownTbody";var e6=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("tr",{className:s("border-border",t),"data-streamdown":"table-row",...i,children:e})},(e,t)=>kt(e,t));e6.displayName="MarkdownTr";var t6=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("th",{className:s("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...i,children:e})},(e,t)=>kt(e,t));t6.displayName="MarkdownTh";var n6=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("td",{className:s("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...i,children:e})},(e,t)=>kt(e,t));n6.displayName="MarkdownTd";var r6=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("blockquote",{className:s("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...i,children:e})},(e,t)=>kt(e,t));r6.displayName="MarkdownBlockquote";var i6=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("sup",{className:s("text-sm",t),"data-streamdown":"superscript",...i,children:e})},(e,t)=>kt(e,t));i6.displayName="MarkdownSup";var a6=R.memo(({children:e,className:t,node:n,...i})=>{let s=$e();return v.jsx("sub",{className:s("text-sm",t),"data-streamdown":"subscript",...i,children:e})},(e,t)=>kt(e,t));a6.displayName="MarkdownSub";var s6=R.memo(({children:e,className:t,node:n,...i})=>{if("data-footnotes"in i){let s=o=>{var d,h;if(!R.isValidElement(o))return!1;let f=Array.isArray(o.props.children)?o.props.children:[o.props.children],m=!1,b=!1;for(let x of f)if(x){if(typeof x=="string")x.trim()!==""&&(m=!0);else if(R.isValidElement(x))if(((d=x.props)==null?void 0:d["data-footnote-backref"])!==void 0)b=!0;else{let E=Array.isArray(x.props.children)?x.props.children:[x.props.children];for(let T of E){if(typeof T=="string"&&T.trim()!==""){m=!0;break}if(R.isValidElement(T)&&((h=T.props)==null?void 0:h["data-footnote-backref"])===void 0){m=!0;break}}}}return b&&!m},l=Array.isArray(e)?e.map(o=>{if(!R.isValidElement(o))return o;if(o.type===n1){let d=(Array.isArray(o.props.children)?o.props.children:[o.props.children]).filter(h=>!s(h));return d.length===0?null:{...o,props:{...o.props,children:d}}}return o}):e;return(Array.isArray(l)?l.some(o=>o!==null):l!==null)?v.jsx("section",{className:t,...i,children:l}):null}return v.jsx("section",{className:t,...i,children:e})},(e,t)=>kt(e,t));s6.displayName="MarkdownSection";var Qz=({node:e,className:t,children:n,...i})=>{var s,l;let o=$e(),d=!("data-block"in i),{mermaid:h,controls:f}=R.useContext(Vn),m=t1(),b=hz(),x=t?.match(Wz),E=(s=x?.at(1))!=null?s:"",T=Hz(E);if(d)return v.jsx("code",{className:o("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...i,children:n});let w=(l=e?.properties)==null?void 0:l.metastring,S=w?.match(Vz),k=S?Number.parseInt(S[1],10):void 0,F=k!==void 0&&k>=1?k:void 0,H="";if(R.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?H=n.props.children:typeof n=="string"&&(H=n),T){let ne=T.component;return v.jsx(R.Suspense,{fallback:v.jsx(Ax,{}),children:v.jsx(ne,{code:H,isIncomplete:b,language:E})})}if(E==="mermaid"&&m){let ne=Xp(f,"mermaid"),Z=Sc(f,"download"),fe=Sc(f,"copy"),z=Sc(f,"fullscreen"),$=Sc(f,"panZoom"),Y=ne&&(Z||fe||z);return v.jsx(R.Suspense,{fallback:v.jsx(Ax,{}),children:v.jsxs("div",{className:o("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[v.jsx("div",{className:o("flex h-8 items-center text-muted-foreground text-xs"),children:v.jsx("span",{className:o("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?v.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:v.jsxs("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[Z?v.jsx(jz,{chart:H,config:h?.config}):null,fe?v.jsx(_x,{code:H}):null,z?v.jsx(Fz,{chart:H,config:h?.config}):null]})}):null,v.jsx("div",{className:o("rounded-md border border-border bg-background"),children:v.jsx(Gz,{chart:H,config:h?.config,showControls:$})})]})})}let V=Xp(f,"code"),J=Sx(f,"download"),j=Sx(f,"copy");return v.jsx(Tz,{className:t,code:H,isIncomplete:b,language:E,startLine:F,children:V?v.jsxs(v.Fragment,{children:[J?v.jsx(Iz,{code:H,language:E}):null,j?v.jsx(_x,{}):null]}):null})},l6=R.memo(Qz,(e,t)=>e.className===t.className&&Cd(e.node,t.node));l6.displayName="MarkdownCode";var u6=R.memo(zz,(e,t)=>e.className===t.className&&Cd(e.node,t.node));u6.displayName="MarkdownImg";var o6=R.memo(({children:e,node:t,...n})=>{let i=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(i.length===1&&R.isValidElement(i[0])){let s=i[0].props.node,l=s?.tagName;if(l==="img")return v.jsx(v.Fragment,{children:e});if(l==="code"&&"data-block"in i[0].props)return v.jsx(v.Fragment,{children:e})}return v.jsx("p",{...n,children:e})},(e,t)=>kt(e,t));o6.displayName="MarkdownParagraph";var Kz={ol:n1,li:U3,ul:j3,hr:F3,strong:$3,a:q3,h1:Y3,h2:V3,h3:G3,h4:W3,h5:X3,h6:Q3,table:K3,thead:Z3,tbody:J3,tr:e6,th:t6,td:n6,blockquote:r6,code:l6,img:u6,pre:({children:e})=>R.isValidElement(e)?R.cloneElement(e,{"data-block":"true"}):e,sup:i6,sub:a6,p:o6,section:s6},Zz=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Jz=/\p{L}/u;function wx(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(Zz.test(n))return"rtl";if(Jz.test(n))return"ltr"}return"ltr"}var eP=/^[ \t]{0,3}(`{3,}|~{3,})/,tP=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,kx=e=>{let t=e.split(`
135
+ `),n=null,i=0;for(let s of t){let l=eP.exec(s);if(n===null){if(l){let o=l[1];n=o[0],i=o.length}}else if(l){let o=l[1],d=o[0],h=o.length;d===n&&h>=i&&(n=null,i=0)}}return n!==null},nP=e=>{let t=e.split(`
136
+ `);for(let n of t){let i=n.trim();if(i.length>0&&i.includes("|")&&tP.test(i))return!0}return!1},rP=()=>e=>{Dr(e,"html",(t,n,i)=>{!i||typeof n!="number"||(i.children[n]={type:"text",value:t.value})})},Cx=[],Nx={allowDangerousHtml:!0},wc=new WeakMap,iP=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(t){let n=this.keyCache.get(t);if(n)return n;let i=t.rehypePlugins,s=t.remarkPlugins,l=t.remarkRehypeOptions;if(!(i||s||l)){let b="default";return this.keyCache.set(t,b),b}let o=b=>{if(!b||b.length===0)return"";let x="";for(let E=0;E<b.length;E+=1){let T=b[E];if(E>0&&(x+=","),Array.isArray(T)){let[w,S]=T;if(typeof w=="function"){let k=wc.get(w);k||(k=w.name,wc.set(w,k)),x+=k}else x+=String(w);x+=":",x+=JSON.stringify(S)}else if(typeof T=="function"){let w=wc.get(T);w||(w=T.name,wc.set(T,w)),x+=w}else x+=String(T)}return x},d=o(i),h=o(s),f=l?JSON.stringify(l):"",m=`${h}::${d}::${f}`;return this.keyCache.set(t,m),m}get(t){let n=this.generateCacheKey(t),i=this.cache.get(n);return i&&(this.cache.delete(n),this.cache.set(n,i)),i}set(t,n){let i=this.generateCacheKey(t);if(this.cache.size>=this.maxSize){let s=this.cache.keys().next().value;s&&this.cache.delete(s)}this.cache.set(i,n)}clear(){this.cache.clear()}},Rx=new iP,c6=e=>{let t=aP(e),n=e.children||"",i=t.runSync(t.parse(n),n);return fP(i,e)},aP=e=>{let t=Rx.get(e);if(t)return t;let n=lP(e);return Rx.set(e,n),n},sP=e=>e.some(t=>Array.isArray(t)?t[0]===Mp:t===Mp),lP=e=>{let t=e.rehypePlugins||Cx,n=e.remarkPlugins||Cx,i=sP(t)?n:[...n,rP],s=e.remarkRehypeOptions?{...Nx,...e.remarkRehypeOptions}:Nx;return lB().use(s7).use(i).use(F7,s).use(t)},uP=e=>e,oP=(e,t,n,i)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:i}},cP=(e,t)=>{var n;for(let i in N0)if(Object.hasOwn(N0,i)&&Object.hasOwn(e.properties,i)){let s=e.properties[i],l=N0[i];(l===null||l.includes(e.tagName))&&(e.properties[i]=(n=t(String(s||""),i,e))!=null?n:void 0)}},dP=(e,t,n,i,s,l)=>{let o=!1;return i?o=!i.includes(e.tagName):s&&(o=s.includes(e.tagName)),!o&&l&&typeof t=="number"&&(o=!l(e,t,n)),o},fP=(e,t)=>{let{allowElement:n,allowedElements:i,disallowedElements:s,skipHtml:l,unwrapDisallowed:o,urlTransform:d}=t;if(n||i||s||l||d){let h=d||uP;Dr(e,(f,m,b)=>{if(f.type==="raw"&&b&&typeof m=="number")return oP(b,m,l,f.value),m;if(f.type==="element"&&(cP(f,h),dP(f,m,b,i,s,n)&&b&&typeof m=="number"))return o&&f.children?b.children.splice(m,1,...f.children):b.children.splice(m,1),m})}return pI(e,{Fragment:v.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0})},hP=/\[\^[\w-]{1,200}\](?!:)/,pP=/\[\^[\w-]{1,200}\]:/,mP=/<(\w+)[\s>]/,gP=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ox=new Map,Mx=new Map,bP=e=>{let t=e.toLowerCase(),n=Ox.get(t);if(n)return n;let i=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Ox.set(t,i),i},yP=e=>{let t=e.toLowerCase(),n=Mx.get(t);if(n)return n;let i=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Mx.set(t,i),i},Lx=(e,t)=>{if(gP.has(t.toLowerCase()))return 0;let n=e.match(bP(t));if(!n)return 0;let i=0;for(let s of n)s.trimEnd().endsWith("/>")||(i+=1);return i},Dx=(e,t)=>{let n=e.match(yP(t));return n?n.length:0},EP=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},xP=e=>{let t=hP.test(e),n=pP.test(e);if(t||n)return[e];let i=ur.lex(e,{gfm:!0}),s=[],l=[],o=!1;for(let d of i){let h=d.raw,f=s.length;if(l.length>0){s[f-1]+=h;let m=l.at(-1),b=Lx(h,m),x=Dx(h,m);for(let E=0;E<b;E+=1)l.push(m);for(let E=0;E<x;E+=1)l.length>0&&l.at(-1)===m&&l.pop();continue}if(d.type==="html"&&d.block){let m=h.match(mP);if(m){let b=m[1],x=Lx(h,b),E=Dx(h,b);x>E&&l.push(b)}}if(f>0&&!o){let m=s[f-1];if(EP(m)%2===1){s[f-1]=m+h;continue}}s.push(h),d.type!=="space"&&(o=d.type==="code")}return s},vP=(e,t)=>{if(!t.length)return e;let n=e;for(let i of t){let s=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");n=n.replace(s,(l,o,d,h)=>{let f=d.replace(/\n\n/g,`
137
+ <!---->
138
+ `);return o+f+h})}return n},_P=/([\\`*_~[\]|])/g,TP=e=>e.replace(_P,"\\$1"),AP=(e,t)=>{if(!t.length)return e;let n=e;for(let i of t){let s=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");n=n.replace(s,(l,o,d,h)=>o+TP(d)+h)}return n},d6=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(d6).join(""):"",SP=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(i=>i.toLowerCase()));Dr(t,"element",i=>{if(n.has(i.tagName.toLowerCase())){let s=d6(i);i.children=s?[{type:"text",value:s}]:[]}})},wP=()=>e=>{Dr(e,"code",t=>{var n,i;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(i=t.data.hProperties)!=null?i:{},metastring:t.meta})})},kP=/^[ \t]*<[\w!/?-]/,CP=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,NP=e=>typeof e!="string"||e.length===0||!kP.test(e)?e:e.replace(CP,"$1"),Ix,Bx,zx,Px,Uc={..._a,protocols:{..._a.protocols,href:[...(Bx=(Ix=_a.protocols)==null?void 0:Ix.href)!=null?Bx:[],"tel"]},attributes:{..._a.attributes,code:[...(Px=(zx=_a.attributes)==null?void 0:zx.code)!=null?Px:[],"metastring"]}},Qp={raw:Mp,sanitize:[rT,Uc],harden:[H4,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},RP={gfm:[rL,{}],codeMeta:wP},Hx=Object.values(Qp),OP=Object.values(RP),MP={block:" ▋",circle:" ●"},LP={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Vn=R.createContext(LP),f6=R.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:i,isIncomplete:s,dir:l,animatePlugin:o,...d})=>{if(o){let m=o.getLastRenderCharCount();o.setPrevContentLength(m)}let h=typeof e=="string"&&n?NP(e):e,f=v.jsx(c6,{...d,children:h});return v.jsx(O3.Provider,{value:s,children:l?v.jsx("div",{dir:l,style:{display:"contents"},children:f}):f})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),i=Object.keys(t.components||{});if(n.length!==i.length||n.some(s=>{var l,o;return((l=e.components)==null?void 0:l[s])!==((o=t.components)==null?void 0:o[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});f6.displayName="Block";var DP=["github-light","github-dark"],r1=R.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:i=!0,normalizeHtmlIndentation:s=!1,components:l,rehypePlugins:o=Hx,remarkPlugins:d=OP,className:h,shikiTheme:f=DP,mermaid:m,controls:b=!0,isAnimating:x=!1,animated:E,BlockComponent:T=f6,parseMarkdownIntoBlocksFn:w=xP,caret:S,plugins:k,remend:F,linkSafety:H={enabled:!0},allowedTags:V,literalTagContent:J,translations:j,icons:ne,prefix:Z,onAnimationStart:fe,onAnimationEnd:z,...$})=>{let Y=R.useId(),[_e,oe]=R.useTransition(),le=R.useMemo(()=>mz(Z),[Z]),I=R.useRef(null),te=R.useRef(fe),be=R.useRef(z);te.current=fe,be.current=z,R.useEffect(()=>{var Ue,ot,jt;if(t==="static")return;let un=I.current;if(I.current=x,un===null){x&&((Ue=te.current)==null||Ue.call(te));return}x&&!un?(ot=te.current)==null||ot.call(te):!x&&un&&((jt=be.current)==null||jt.call(be))},[x,t]);let ke=R.useMemo(()=>V?Object.keys(V):[],[V]),O=R.useMemo(()=>{if(typeof e!="string")return"";let Ue=t==="streaming"&&i?cD(e,F):e;return J&&J.length>0&&(Ue=AP(Ue,J)),ke.length>0&&(Ue=vP(Ue,ke)),Ue},[e,t,i,F,ke,J]),D=R.useMemo(()=>w(O),[O,w]),[P,C]=R.useState(D);R.useEffect(()=>{t==="streaming"&&!Je?oe(()=>{C(D)}):C(D)},[D,t]);let ce=t==="streaming"?P:D,Ee=R.useMemo(()=>n==="auto"?ce.map(wx):void 0,[ce,n]),xe=R.useMemo(()=>ce.map((Ue,ot)=>`${Y}-${ot}`),[ce.length,Y]),Me=R.useMemo(()=>E===!0?"true":E?JSON.stringify(E):"",[E]),Je=R.useMemo(()=>Me?Me==="true"?qp():qp(E):null,[Me]),Oe=R.useMemo(()=>{var Ue,ot;return{shikiTheme:(ot=(Ue=k?.code)==null?void 0:Ue.getThemes())!=null?ot:f,controls:b,isAnimating:x,mode:t,mermaid:m,linkSafety:H}},[f,b,x,t,m,H,k?.code]),Gt=R.useMemo(()=>j?JSON.stringify(j):"",[j]),Wt=R.useMemo(()=>({...I3,...j}),[Gt]),On=R.useMemo(()=>{let{inlineCode:Ue,...ot}=l??{},jt={...Kz,...ot};if(Ue){let un=jt.code;jt.code=dr=>"data-block"in dr?un?R.createElement(un,dr):null:R.createElement(Ue,dr)}return jt},[l]),cr=R.useMemo(()=>{let Ue=[];return k!=null&&k.cjk&&(Ue=[...Ue,...k.cjk.remarkPluginsBefore]),Ue=[...Ue,...d],k!=null&&k.cjk&&(Ue=[...Ue,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(Ue=[...Ue,k.math.remarkPlugin]),Ue},[d,k?.math,k?.cjk]),Xt=R.useMemo(()=>{var Ue;let ot=o;if(V&&Object.keys(V).length>0&&o===Hx){let jt={...Uc,tagNames:[...(Ue=Uc.tagNames)!=null?Ue:[],...Object.keys(V)],attributes:{...Uc.attributes,...V}};ot=[Qp.raw,[rT,jt],Qp.harden]}return J&&J.length>0&&(ot=[...ot,[SP,J]]),k!=null&&k.math&&(ot=[...ot,k.math.rehypePlugin]),Je&&x&&(ot=[...ot,Je.rehypePlugin]),ot},[o,k?.math,Je,x,V,J]),vr=R.useMemo(()=>{if(!x||ce.length===0)return!1;let Ue=ce.at(-1);return kx(Ue)||nP(Ue)},[x,ce]),ci=R.useMemo(()=>S&&x&&!vr?{"--streamdown-caret":`"${MP[S]}"`}:void 0,[S,x,vr]);return t==="static"?v.jsx(Vp.Provider,{value:Wt,children:v.jsx(Gp.Provider,{value:k??null,children:v.jsx(Vn.Provider,{value:Oe,children:v.jsx(vx,{icons:ne,children:v.jsx(Yp.Provider,{value:le,children:v.jsx("div",{className:le("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",h),dir:n==="auto"?wx(O):n,children:v.jsx(c6,{components:On,rehypePlugins:Xt,remarkPlugins:cr,...$,children:O})})})})})})}):v.jsx(Vp.Provider,{value:Wt,children:v.jsx(Gp.Provider,{value:k??null,children:v.jsx(Vn.Provider,{value:Oe,children:v.jsx(vx,{icons:ne,children:v.jsx(Yp.Provider,{value:le,children:v.jsxs("div",{className:le("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",S&&!vr?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,h),style:ci,children:[ce.length===0&&S&&x&&v.jsx("span",{}),ce.map((Ue,ot)=>{var jt;let un=ot===ce.length-1,dr=x&&un&&kx(Ue);return v.jsx(T,{animatePlugin:Je,components:On,content:Ue,dir:(jt=Ee?.[ot])!=null?jt:n!=="auto"?n:void 0,index:ot,isIncomplete:dr,rehypePlugins:Xt,remarkPlugins:cr,shouldNormalizeHtmlIndentation:s,shouldParseIncompleteMarkdown:i,...$},xe[ot])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);r1.displayName="Streamdown";var IP=({children:e,className:t,minZoom:n=.5,maxZoom:i=3,zoomStep:s=.1,showControls:l=!0,initialZoom:o=1,fullscreen:d=!1})=>{let{RotateCcwIcon:h,ZoomInIcon:f,ZoomOutIcon:m}=xr(),b=$e(),x=R.useRef(null),E=R.useRef(null),[T,w]=R.useState(o),[S,k]=R.useState({x:0,y:0}),[F,H]=R.useState(!1),[V,J]=R.useState({x:0,y:0}),[j,ne]=R.useState({x:0,y:0}),Z=R.useCallback(I=>{w(te=>Math.max(n,Math.min(i,te+I)))},[n,i]),fe=R.useCallback(()=>{Z(s)},[Z,s]),z=R.useCallback(()=>{Z(-s)},[Z,s]),$=R.useCallback(()=>{w(o),k({x:0,y:0})},[o]),Y=R.useCallback(I=>{I.preventDefault();let te=I.deltaY>0?-s:s;Z(te)},[Z,s]),_e=R.useCallback(I=>{if(I.button!==0||I.isPrimary===!1)return;H(!0),J({x:I.clientX,y:I.clientY}),ne(S);let te=I.currentTarget;te instanceof HTMLElement&&te.setPointerCapture(I.pointerId)},[S]),oe=R.useCallback(I=>{if(!F)return;I.preventDefault();let te=I.clientX-V.x,be=I.clientY-V.y;k({x:j.x+te,y:j.y+be})},[F,V,j]),le=R.useCallback(I=>{H(!1);let te=I.currentTarget;te instanceof HTMLElement&&te.releasePointerCapture(I.pointerId)},[]);return R.useEffect(()=>{let I=x.current;if(I)return I.addEventListener("wheel",Y,{passive:!1}),()=>{I.removeEventListener("wheel",Y)}},[Y]),R.useEffect(()=>{let I=E.current;if(I&&F)return document.body.style.userSelect="none",I.addEventListener("pointermove",oe,{passive:!1}),I.addEventListener("pointerup",le),I.addEventListener("pointercancel",le),()=>{document.body.style.userSelect="",I.removeEventListener("pointermove",oe),I.removeEventListener("pointerup",le),I.removeEventListener("pointercancel",le)}},[F,oe,le]),v.jsxs("div",{className:b("relative flex flex-col",d?"h-full w-full":"min-h-28 w-full",t),ref:x,style:{cursor:F?"grabbing":"grab"},children:[l?v.jsxs("div",{className:b("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",d?"bottom-4 left-4":"bottom-2 left-2"),children:[v.jsx("button",{className:b("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:T>=i,onClick:fe,title:"Zoom in",type:"button",children:v.jsx(f,{size:16})}),v.jsx("button",{className:b("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:T<=n,onClick:z,title:"Zoom out",type:"button",children:v.jsx(m,{size:16})}),v.jsx("button",{className:b("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:$,title:"Reset zoom and pan",type:"button",children:v.jsx(h,{size:16})})]}):null,v.jsx("div",{className:b("flex-1 origin-center transition-transform duration-150 ease-out",d?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:_e,ref:E,role:"application",style:{transform:`translate(${S.x}px, ${S.y}px) scale(${T})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},h6=({chart:e,className:t,config:n,fullscreen:i=!1,showControls:s=!0})=>{let l=$e(),[o,d]=R.useState(null),[h,f]=R.useState(!1),[m,b]=R.useState(""),[x,E]=R.useState(""),[T,w]=R.useState(0),{mermaid:S}=R.useContext(Vn),k=t1(),F=S?.errorComponent,{shouldRender:H,containerRef:V}=rz({immediate:i});if(R.useEffect(()=>{if(H){if(!k){d("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{d(null),f(!0);let j=k.getMermaid(n),ne=e.split("").reduce((z,$)=>(z<<5)-z+$.charCodeAt(0)|0,0),Z=`mermaid-${Math.abs(ne)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:fe}=await j.render(Z,e);b(fe),E(fe)}catch(j){if(!(x||m)){let ne=j instanceof Error?j.message:"Failed to render Mermaid chart";d(ne)}}finally{f(!1)}})()}},[e,n,T,H,k]),!(H||m||x))return v.jsx("div",{className:l("my-4 min-h-[200px]",t),ref:V});if(h&&!m&&!x)return v.jsx("div",{className:l("my-4 flex justify-center p-4",t),ref:V,children:v.jsxs("div",{className:l("flex items-center space-x-2 text-muted-foreground"),children:[v.jsx("div",{className:l("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),v.jsx("span",{className:l("text-sm"),children:"Loading diagram..."})]})});if(o&&!m&&!x){let j=()=>w(ne=>ne+1);return F?v.jsx("div",{ref:V,children:v.jsx(F,{chart:e,error:o,retry:j})}):v.jsxs("div",{className:l("rounded-md bg-red-50 p-4",t),ref:V,children:[v.jsxs("p",{className:l("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",o]}),v.jsxs("details",{className:l("mt-2"),children:[v.jsx("summary",{className:l("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),v.jsx("pre",{className:l("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let J=m||x;return v.jsx("div",{className:l("size-full",t),"data-streamdown":"mermaid",ref:V,children:v.jsx(IP,{className:l(i?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:i,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:v.jsx("div",{"aria-label":"Mermaid chart",className:l("flex justify-center",i?"size-full items-center":null),dangerouslySetInnerHTML:{__html:J},role:"img"})})})};function p6(e,t){const n=e.toLowerCase(),i=typeof t.path=="string"?t.path:typeof t.filePath=="string"?t.filePath:null,s=i?dC(i):null;if(n==="read")return s?`Read ${s}`:"Read file";if(n==="desktop"){const l=typeof t.action=="string"?t.action:null,o=typeof t.miniAppId=="string"?t.miniAppId:null,d=typeof t.windowId=="string"?t.windowId:null;return l==="list"?"List windows":l==="open"&&o?`Open ${o}`:l==="focus"?d?`Focus window ${d}`:"Focus window":l==="maximize"?d?`Maximize window ${d}`:"Maximize window":l==="close"?d?`Close window ${d}`:"Close window":l?`Desktop ${l}`:"Desktop"}if(n==="action"){const l=typeof t.name=="string"?t.name:null;return l?`Invoke ${l}`:"Invoke action"}if(n==="create_liveapp"){const l=typeof t.title=="string"?t.title:null;return l?`Create LiveApp: ${l}`:"Create LiveApp"}if(n==="generate_icon"){const l=typeof t.liveAppId=="string"?t.liveAppId:null;return l?`Generate icon: ${l}`:"Generate icon"}if(n==="edit")return s?`Edit ${s}`:"Edit file";if(n==="undo_edit")return s?`Undo edit ${s}`:"Undo edit";if(n==="redo_edit")return s?`Redo edit ${s}`:"Redo edit";if(n==="read_manual"){const l=typeof t.page=="string"?t.page:null;return l?`Read manual: ${l}`:"Read manual"}return e}function BP(e){const t="Called the ",n=" tool with the following input:";if(!e.startsWith(t))return null;const i=e.indexOf(n);if(i===-1)return null;const s=e.slice(t.length,i).trim(),l=e.slice(i+n.length).trim(),o=l.indexOf("{");if(!s||o===-1)return null;let d=0,h=!1,f=!1;for(let m=o;m<l.length;m+=1){const b=l[m];if(f){f=!1;continue}if(b==="\\"){f=!0;continue}if(b==='"'){h=!h;continue}if(!h){if(b==="{")d+=1;else if(b==="}"&&(d-=1,d===0))return{toolName:s,rawParams:l.slice(o,m+1)}}}return null}function zP(e){const t=e.split(`
139
+ `),n=[];let i=!1;for(const s of t){const l=s.trim(),o=BP(l);if(o){const{toolName:d,rawParams:h}=o;try{const f=JSON.parse(h);n.push(`- ${p6(d,f)}`)}catch{n.push(`- ${d}`)}i=!0;continue}if(i){if(l.startsWith("<path>")||l.startsWith("<type>")||l.startsWith("<content>")||l.startsWith("</path>")||l.startsWith("</type>")||l.startsWith("</content>")||l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")||/^\d+:\s/.test(l)||l.startsWith("(End of file"))continue;if(l.length===0){i=!1;continue}i=!1}n.push(s)}return n.join(`
140
+ `).replace(/\n{3,}/g,`
141
+
142
+ `).trim()}const PP="_thinkingBlock_x27ux_1",HP="_thinkingToggle_x27ux_9",UP="_thinkingChevron_x27ux_26",jP="_thinkingChevronOpen_x27ux_33",FP="_thinkingContent_x27ux_37",$P="_thinkingStreamingDot_x27ux_119",ks={thinkingBlock:PP,thinkingToggle:HP,thinkingChevron:UP,thinkingChevronOpen:jP,thinkingContent:FP,thinkingStreamingDot:$P};function qP({content:e,isStreaming:t,defaultExpanded:n}){const[i,s]=R.useState(n);return R.useEffect(()=>{t&&s(!0)},[t]),v.jsxs("div",{className:ks.thinkingBlock,children:[v.jsxs("button",{type:"button",className:ks.thinkingToggle,onClick:()=>s(l=>!l),children:[v.jsx("span",{className:`${ks.thinkingChevron} ${i?ks.thinkingChevronOpen:""}`,children:"▶"}),"Thinking",t&&v.jsx("span",{className:ks.thinkingStreamingDot})]}),i&&v.jsx(r1,{className:ks.thinkingContent,isAnimating:t,animated:!0,children:e})]})}const YP="_messageUser_100r6_9 _message_100r6_1",VP="_messageAssistant_100r6_15 _message_100r6_1",GP="_messageToolCall_100r6_21",WP="_toolCallLabel_100r6_34",XP="_messageHeader_100r6_40",QP="_messageSpeaker_100r6_47",KP="_voiceSourceBadge_100r6_61",ZP="_markdownContent_100r6_75",JP="_thinkingIndicator_100r6_150",eH="_thinkingDot_100r6_157",ar={messageUser:YP,messageAssistant:VP,messageToolCall:GP,toolCallLabel:WP,messageHeader:XP,messageSpeaker:QP,voiceSourceBadge:KP,markdownContent:ZP,thinkingIndicator:JP,thinkingDot:eH};function tH({content:e,isStreaming:t}){return v.jsx(r1,{className:ar.markdownContent,isAnimating:t,animated:!0,children:zP(e)})}function nH({toolName:e,params:t}){const n=p6(e,t);return v.jsx("div",{className:ar.messageToolCall,children:v.jsx("span",{className:ar.toolCallLabel,children:n})})}function m6({message:e,isThinking:t,isStreaming:n}){if(e.toolCall)return v.jsx(nH,{toolName:e.toolCall.toolName,params:e.toolCall.params});const i=!!e.thinkingContent,s=!!e.content;if(e.role==="assistant"&&!s&&!i&&!t)return null;const o=n&&i&&!s,d=t&&!i&&!s;return v.jsxs("div",{className:e.role==="user"?ar.messageUser:ar.messageAssistant,children:[v.jsxs("div",{className:ar.messageHeader,children:[v.jsx("span",{className:ar.messageSpeaker,children:e.role==="user"?"ME":"AI"}),e.role==="user"&&e.source==="voice"&&v.jsx("span",{className:ar.voiceSourceBadge,children:"voice"})]}),i&&v.jsx(qP,{content:e.thinkingContent,isStreaming:o,defaultExpanded:o}),d?v.jsxs("div",{className:ar.thinkingIndicator,children:[v.jsx("span",{className:ar.thinkingDot}),v.jsx("span",{className:ar.thinkingDot}),v.jsx("span",{className:ar.thinkingDot})]}):s?v.jsx(tH,{content:e.content,isStreaming:n}):null]})}const rH=R.memo(function({size:t=16}){return v.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),v.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),v.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),v.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),iH="_controlFrame_1mi1b_2",aH="_slashMenu_1mi1b_9",sH="_slashMenuItem_1mi1b_27",lH="_slashMenuItemActive_1mi1b_37",uH="_slashMenuName_1mi1b_41",oH="_slashMenuDesc_1mi1b_47",cH="_inputRow_1mi1b_55",dH="_input_1mi1b_55",fH="_statusRow_1mi1b_88",hH="_statusItem_1mi1b_99",pH="_voiceButton_1mi1b_108",mH="_voiceButtonActive_1mi1b_128",jn={controlFrame:iH,slashMenu:aH,slashMenuItem:sH,slashMenuItemActive:lH,slashMenuName:uH,slashMenuDesc:oH,inputRow:cH,input:dH,statusRow:fH,statusItem:hH,voiceButton:pH,voiceButtonActive:mH},Ux=200;function g6({onSubmit:e,onCancelAi:t,isAiRunning:n,queuedCount:i,isVoiceActive:s,onVoiceToggle:l,modelLabel:o,wsReady:d}){const h=it(z=>z.draftInput),f=it(z=>z.setDraftInput),m=it(z=>z.clearDraftInput),b=R.useRef(null),x=R.useRef(null),[E,T]=R.useState(0),[w,S]=R.useState(!1),[k,F]=R.useState(!1),H=Ms(()=>{x.current!==null&&(clearTimeout(x.current),x.current=null),S(!1),F(!1)}),V=Ms(()=>{x.current!==null&&clearTimeout(x.current),S(!0),x.current=setTimeout(()=>{x.current=null,S(!1)},1500)}),J=R.useMemo(()=>{const z=h.trimStart();return!z.startsWith("/")||z.includes(" ")?null:z.slice(1)},[h]),j=R.useMemo(()=>J===null?[]:J===""?R4():N4(J),[J]),ne=j.length>0,Z=Ms(z=>{const $=j[z];$&&(f(`/${$.name} `),T(0),b.current?.focus())}),fe=Ms(z=>{if(z.key==="Escape"&&n){z.preventDefault(),w?(x.current!==null&&(clearTimeout(x.current),x.current=null),S(!1),t()&&F(!0)):V();return}if(ne){if(z.key==="ArrowUp"){z.preventDefault(),T($=>$<=0?j.length-1:$-1);return}if(z.key==="ArrowDown"){z.preventDefault(),T($=>$>=j.length-1?0:$+1);return}if(z.key==="Tab"){z.preventDefault(),Z(E);return}if(z.key==="Escape"){z.preventDefault(),m(),T(0);return}}z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),e())});return R.useLayoutEffect(()=>{T(0)},[j.length]),R.useLayoutEffect(()=>{n||H()},[n,H]),R.useLayoutEffect(()=>()=>{x.current!==null&&clearTimeout(x.current)},[]),R.useLayoutEffect(()=>{const z=b.current;z&&(z.style.height="auto",z.style.height=`${Math.min(z.scrollHeight,Ux)}px`,z.style.overflowY=z.scrollHeight>Ux?"auto":"hidden")},[h]),v.jsxs("div",{className:jn.controlFrame,children:[ne&&v.jsx("ul",{className:jn.slashMenu,role:"listbox",children:j.map((z,$)=>v.jsxs("li",{role:"option","aria-selected":$===E,className:`${jn.slashMenuItem} ${$===E?jn.slashMenuItemActive:""}`,onMouseDown:Y=>{Y.preventDefault(),Z($)},onMouseEnter:()=>T($),children:[v.jsxs("span",{className:jn.slashMenuName,children:["/",z.name]}),v.jsx("span",{className:jn.slashMenuDesc,children:z.description})]},z.name))}),v.jsxs("div",{className:jn.inputRow,children:[v.jsx("textarea",{ref:b,className:jn.input,value:h,onChange:z=>f(z.target.value),onKeyDown:fe,rows:1,placeholder:k?"Cancelling AI...":n?w?"Press Esc again to cancel AI, or Enter to queue the next message":"AI is thinking... press Esc twice to cancel or Enter to queue the next message":"Ask the AI...",disabled:!d}),v.jsx("dt-tooltip",{content:s?"Stop voice input":"Start voice input",children:v.jsx("button",{className:`${jn.voiceButton} ${s?jn.voiceButtonActive:""}`,onClick:l,children:v.jsx(rH,{})})})]}),v.jsxs("div",{className:jn.statusRow,children:[v.jsx("span",{className:jn.statusItem,children:d?o:"offline"}),i>0&&v.jsxs("span",{className:jn.statusItem,children:[i," queued"]})]})]})}const gH="_infoPanel_1fshd_1",bH="_header_1fshd_12",yH="_headerPrimary_1fshd_27",EH="_sessionControls_1fshd_36",xH="_newSessionButton_1fshd_49",vH="_headerControls_1fshd_75",_H="_tokenCount_1fshd_81",TH="_messages_1fshd_106",AH="_placeholder_1fshd_114",SH="_queuedMessage_1fshd_125",wH="_queuedMessageHeader_1fshd_136",kH="_queuedSpeaker_1fshd_143",CH="_queuedBadge_1fshd_150",NH="_queuedMessageBody_1fshd_163",RH="_partialTranscript_1fshd_167",OH="_partialDot_1fshd_180",MH="_voiceListening_1fshd_190",LH="_voiceSpeaking_1fshd_191",DH="_voiceProcessing_1fshd_192",IH="_listeningDot_1fshd_204",BH="_speakingWave_1fshd_218",zH="_voiceError_1fshd_242",wt={infoPanel:gH,header:bH,headerPrimary:yH,sessionControls:EH,newSessionButton:xH,headerControls:vH,tokenCount:_H,messages:TH,placeholder:AH,queuedMessage:SH,queuedMessageHeader:wH,queuedSpeaker:kH,queuedBadge:CH,queuedMessageBody:NH,partialTranscript:RH,partialDot:OH,voiceListening:MH,voiceSpeaking:LH,voiceProcessing:DH,listeningDot:IH,speakingWave:BH,voiceError:zH};function PH({socket:e,wsReady:t}){const[n,i]=R.useState([]),s=R.useRef(null),l=R.useRef(new Set),o=R.useRef([]),d=it(P=>P.messages),h=it(P=>P.isAiRunning),f=it(P=>P.activeRequestId),m=it(P=>P.modelLabel),b=it(P=>P.tokenCount),x=it(P=>P.currentSessionId),E=it(P=>P.sessions),T=it(P=>P.loadProviders),w=it(P=>P.loadSessions),S=it(P=>P.switchSession),k=it(P=>P.createSession),F=it(P=>P.cancelAiRequest),H=it(P=>P.submitPrompt),V=it(P=>P.clearDraftInput),J=it(P=>P.handleAiEvent),j=it(P=>P.clearMessages),ne=it(P=>P.addSystemMessage),Z=Or(P=>P.status),fe=Or(P=>P.errorMessage),z=Or(P=>P.partialText),$=Or(P=>P.transcripts),Y=Or(P=>P.startVoice),_e=Or(P=>P.stopVoice),oe=Z!=="idle"&&Z!=="error",le=f?`assistant-${f}`:null,I=h||!e||e.readyState!==WebSocket.OPEN||!t;R.useEffect(()=>{t&&T()},[T,t]),R.useEffect(()=>{!e||!t||e.readyState!==WebSocket.OPEN||w(e)},[w,e,t]),R.useEffect(()=>{if(!e)return;const P=C=>{try{const ce=JSON.parse(String(C.data));if(ce.type!=="ai:event"||!ce.event)return;J(ce.event)}catch{}};return e.addEventListener("message",P),()=>{e.removeEventListener("message",P)}},[e,J]);const te=Ms(()=>{if(h||!e||e.readyState!==WebSocket.OPEN)return;const P=o.current.shift();if(!P)return;H(P.text,"voice",e)||o.current.unshift(P)});R.useEffect(()=>{for(const P of $)!P.isFinal||l.current.has(P.utteranceId)||(l.current.add(P.utteranceId),o.current.push({utteranceId:P.utteranceId,text:P.text}));te()},[$,te]),R.useEffect(()=>{h||te()},[h,te]),R.useEffect(()=>{i([]),o.current=[],l.current.clear()},[x]),R.useEffect(()=>{if(h||!e||e.readyState!==WebSocket.OPEN||n.length===0)return;const[P]=n;H(P.text,P.source,e)&&i(ce=>ce.slice(1))},[h,n,e,H]);const be=Ms(()=>{const P=it.getState().draftInput.trim();if(!P||!e)return;if(P.startsWith("/")&&C4(P,{socket:e,createSession:k,clearMessages:j,addSystemMessage:ne})){V();return}if(h){i(ce=>[...ce,{id:`queued-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,source:"text",text:P}]),V();return}H(P,"text",e)&&V()}),ke=R.useCallback(()=>{oe?_e():Y()},[oe,Y,_e]);R.useEffect(()=>{s.current?.scrollIntoView({behavior:"smooth"})},[d,n,$,z]);const O=R.useCallback(()=>{e&&k(e)&&V()},[V,k,e]),D=R.useCallback(()=>e?F(e):!1,[F,e]);return v.jsxs("div",{className:wt.infoPanel,children:[v.jsxs("div",{className:wt.header,children:[v.jsx("div",{className:wt.headerPrimary,children:v.jsxs("div",{className:wt.sessionControls,children:[v.jsx("dt-select",{value:x??"",options:E.map(P=>({value:P.id,label:P.label})),placeholder:"New session",align:"right",disabled:I,"ondt-change":P=>{e&&S(P.detail.value,e)}}),v.jsx("button",{type:"button",className:wt.newSessionButton,onClick:O,disabled:I,"aria-label":"Create new session",title:"Create new session",children:"+"})]})}),v.jsx("div",{className:wt.headerControls,children:b>0&&v.jsxs("span",{className:wt.tokenCount,children:[b," tokens"]})})]}),v.jsxs("div",{className:wt.messages,children:[d.length===0&&n.length===0&&$.length===0&&!z?v.jsx("div",{className:wt.placeholder,children:"Ask the AI to interact with your MiniApps, or use voice input"}):v.jsxs(v.Fragment,{children:[d.map(P=>{const C=P.id===le,Ee=P.role==="assistant"&&!P.content&&!P.thinkingContent&&h&&C;return v.jsx(m6,{message:P,isThinking:Ee,isStreaming:P.role==="assistant"&&h&&C},P.id)}),n.map((P,C)=>v.jsxs("div",{className:wt.queuedMessage,children:[v.jsxs("div",{className:wt.queuedMessageHeader,children:[v.jsx("span",{className:wt.queuedSpeaker,children:"ME"}),v.jsx("span",{className:wt.queuedBadge,children:C===0?"next":"queued"})]}),v.jsx("div",{className:wt.queuedMessageBody,children:P.text})]},P.id))]}),z&&v.jsxs("div",{className:wt.partialTranscript,children:[v.jsx("span",{className:wt.partialDot}),z]}),oe&&!z&&Z==="listening"&&v.jsxs("div",{className:wt.voiceListening,children:[v.jsx("span",{className:wt.listeningDot}),"Listening for speech..."]}),Z==="speaking"&&!z&&v.jsxs("div",{className:wt.voiceSpeaking,children:[v.jsx("span",{className:wt.speakingWave}),"Detecting speech..."]}),Z==="processing"&&v.jsx("div",{className:wt.voiceProcessing,children:"Transcribing..."}),fe&&v.jsx("div",{className:wt.voiceError,children:fe}),v.jsx("div",{ref:s})]}),v.jsx(g6,{onSubmit:be,onCancelAi:D,isAiRunning:h,queuedCount:n.length,isVoiceActive:oe,onVoiceToggle:ke,modelLabel:m,wsReady:t})]})}const HH="_compactPanel_11w4u_1",UH="_dragHandle_11w4u_30",jH="_dragHandleLine_11w4u_50",FH="_messageArea_11w4u_57",$H="_placeholder_11w4u_64",qH="_partialTranscript_11w4u_71",YH="_partialDot_11w4u_83",VH="_voiceListening_11w4u_101",GH="_voiceSpeaking_11w4u_102",WH="_voiceProcessing_11w4u_103",XH="_listeningDot_11w4u_113",QH="_speakingWave_11w4u_114",KH="_commandInputWrapper_11w4u_144",Fn={compactPanel:HH,dragHandle:UH,dragHandleLine:jH,messageArea:FH,placeholder:$H,partialTranscript:qH,partialDot:YH,voiceListening:VH,voiceSpeaking:GH,voiceProcessing:WH,listeningDot:XH,speakingWave:QH,commandInputWrapper:KH};function ZH({socket:e,wsReady:t}){const[n,i]=R.useState({x:0,y:0}),[s,l]=R.useState(!1),o=R.useRef({x:0,y:0}),d=R.useRef(null),h=it(Y=>Y.messages),f=it(Y=>Y.isAiRunning),m=it(Y=>Y.activeRequestId),b=it(Y=>Y.modelLabel),x=it(Y=>Y.cancelAiRequest),E=it(Y=>Y.submitPrompt),T=it(Y=>Y.clearDraftInput),w=Or(Y=>Y.status),S=Or(Y=>Y.partialText),k=Or(Y=>Y.startVoice),F=Or(Y=>Y.stopVoice),H=w!=="idle"&&w!=="error",V=m?`assistant-${m}`:null,J=h[h.length-1],j=R.useCallback(Y=>{Y.preventDefault(),l(!0),o.current={x:Y.clientX-n.x,y:Y.clientY-n.y},d.current?.setPointerCapture(Y.pointerId)},[n]),ne=R.useCallback(Y=>{if(!s)return;const _e=Y.clientX-o.current.x,oe=Y.clientY-o.current.y;i({x:_e,y:oe})},[s]),Z=R.useCallback(Y=>{l(!1),d.current?.releasePointerCapture(Y.pointerId)},[]),fe=R.useCallback(()=>{const Y=it.getState().draftInput.trim();if(!(!Y||!e)){if(f){T();return}E(Y,"text",e),it.getState().isAiRunning&&T()}},[f,e,E,T]),z=R.useCallback(()=>{H?F():k()},[H,k,F]),$=R.useCallback(()=>e?x(e):!1,[x,e]);return v.jsxs("div",{ref:d,className:Fn.compactPanel,style:{transform:`translate(${n.x}px, ${n.y}px)`},onPointerMove:ne,onPointerUp:Z,onPointerCancel:Z,children:[v.jsx("div",{className:Fn.dragHandle,onPointerDown:j,role:"button","aria-label":"Drag to move",tabIndex:0,children:v.jsx("div",{className:Fn.dragHandleLine})}),v.jsxs("div",{className:Fn.messageArea,children:[J?v.jsx(m6,{message:J,isThinking:J.id===V&&J.role==="assistant"&&!J.content&&!J.thinkingContent&&f,isStreaming:J.role==="assistant"&&f&&J.id===V}):v.jsx("div",{className:Fn.placeholder,children:"Ask the AI to get started"}),S&&v.jsxs("div",{className:Fn.partialTranscript,children:[v.jsx("span",{className:Fn.partialDot}),S]}),H&&!S&&w==="listening"&&v.jsxs("div",{className:Fn.voiceListening,children:[v.jsx("span",{className:Fn.listeningDot}),"Listening for speech..."]}),w==="speaking"&&!S&&v.jsxs("div",{className:Fn.voiceSpeaking,children:[v.jsx("span",{className:Fn.speakingWave}),"Detecting speech..."]}),w==="processing"&&v.jsx("div",{className:Fn.voiceProcessing,children:"Transcribing..."})]}),v.jsx("div",{className:Fn.commandInputWrapper,children:v.jsx(g6,{onSubmit:fe,onCancelAi:$,isAiRunning:f,queuedCount:0,isVoiceActive:H,onVoiceToggle:z,modelLabel:b,wsReady:t})})]})}const JH="_window_k9cdu_1",eU="_windowFocused_k9cdu_16",tU="_windowDragging_k9cdu_21",nU="_windowFullscreen_k9cdu_28",rU="_chrome_k9cdu_54",iU="_trafficLights_k9cdu_65",aU="_trafficLightClose_k9cdu_88 _trafficLight_k9cdu_65",sU="_trafficLightFullscreen_k9cdu_99 _trafficLight_k9cdu_65",lU="_title_k9cdu_110",uU="_body_k9cdu_124",wr={window:JH,windowFocused:eU,windowDragging:tU,windowFullscreen:nU,chrome:rU,trafficLights:iU,trafficLightClose:aU,trafficLightFullscreen:sU,title:lU,body:uU},oU=5;function b6({window:e,tileRect:t,title:n,isFocused:i,showCloseButton:s=!0,showFullscreenButton:l=!0,draggable:o=!1,onFocus:d,isOverlayMaximized:h=!1,children:f}){const m=R.useRef(null),b=ut(V=>V.fullscreenWindowId),x=e.id===b,E=i??e.focused,T=ai(V=>V.isDragging&&V.dragWindowId===e.id),w=R.useRef(null),S=R.useCallback(()=>{if(d){d();return}const V=ut.getState();V.focusedWindowId!==e.id&&V.focusWindow(e.id)},[d,e.id]);R.useEffect(()=>()=>{w.current=null},[]);const k=R.useCallback(V=>{if(!o||V.button!==0||V.target.closest("button")||ut.getState().fullscreenWindowId)return;const ne=V.clientX,Z=V.clientY;w.current={startX:ne,startY:Z,activated:!1};let fe=null;const z=()=>{w.current=null,document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",Y),document.removeEventListener("keydown",_e),document.body.style.cursor="",document.body.style.userSelect="",fe&&(fe.remove(),fe=null)},$=oe=>{const le=w.current;if(!le)return;const I=oe.clientX-le.startX,te=oe.clientY-le.startY;!le.activated&&Math.sqrt(I*I+te*te)>=oU&&(le.activated=!0,ai.getState().startDrag(e.id),fe=document.createElement("style"),fe.textContent="iframe { pointer-events: none !important; }",document.head.appendChild(fe))},Y=()=>{const oe=w.current;if(z(),oe?.activated){const I=ai.getState().finishDrag();I&&ut.getState().relocateWindow(I.sourceWindowId,I.target.windowId,I.target.edge)}},_e=oe=>{oe.key==="Escape"&&(z(),ai.getState().cancelDrag())};document.addEventListener("mousemove",$),document.addEventListener("mouseup",Y),document.addEventListener("keydown",_e),document.body.style.cursor="grabbing",document.body.style.userSelect="none"},[o,e.id]),F=[wr.window,E?wr.windowFocused:"",x&&h?wr.windowFullscreen:"",T?wr.windowDragging:""].filter(Boolean).join(" "),H=x?{}:t?{position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height}:{};return v.jsxs("div",{ref:m,className:F,style:H,"data-window-id":e.id,onMouseDown:S,children:[v.jsxs("div",{className:wr.chrome,onMouseDown:k,style:o?{cursor:"grab"}:void 0,children:[v.jsxs("div",{className:wr.trafficLights,children:[s&&v.jsx("button",{className:wr.trafficLightClose,onClick:V=>{V.stopPropagation(),ut.getState().closeWindow(e.id)}}),l&&v.jsx("button",{className:wr.trafficLightFullscreen,onClick:V=>{V.stopPropagation(),ut.getState().maximizeWindow(e.id)}})]}),v.jsx("div",{className:wr.title,children:n??e.title})]}),v.jsx("div",{className:wr.body,children:f})]})}const jx=1e3,cU=15e3;function dU(){const[e,t]=R.useState("connecting"),[n,i]=R.useState(null),[s,l]=R.useState(null),o=R.useRef(null),d=R.useRef(null),h=R.useRef(null),f=R.useRef(jx),m=R.useRef(!1);return R.useEffect(()=>{const x=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`;let E=!1;const T=()=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null),h.current!==null&&(window.clearInterval(h.current),h.current=null)},w=()=>{if(E||d.current!==null)return;const k=f.current,F=Date.now()+k;t("reconnecting"),l(Math.max(1,Math.ceil(k/1e3))),h.current=window.setInterval(()=>{const H=Math.max(0,Math.ceil((F-Date.now())/1e3));l(H)},1e3),d.current=window.setTimeout(()=>{T(),l(null),S()},k),f.current=Math.min(f.current*2,cU)},S=()=>{if(E)return;T(),l(null),t(m.current?"reconnecting":"connecting");const k=new WebSocket(x);o.current=k,i(k),k.addEventListener("open",()=>{E||o.current!==k||(console.log("[shell] WebSocket connected"),m.current=!0,f.current=jx,yC(k),t("connected"),l(null))}),k.addEventListener("close",()=>{o.current===k&&(o.current=null,i(null),!E&&(console.log("[shell] WebSocket disconnected"),w()))}),k.addEventListener("error",F=>{console.error("[shell] WebSocket error:",F)})};return S(),()=>{E=!0,T();const k=o.current;o.current=null,k&&(k.readyState===WebSocket.OPEN||k.readyState===WebSocket.CONNECTING)&&k.close()}},[]),{status:e,socket:n,retryInSeconds:s}}const fU={note:()=>ri(()=>import("./frontend-WpQng8Mt.js"),[]),"file-explorer":()=>ri(()=>import("./frontend-B3QNYf3p.js"),[]),preference:()=>ri(()=>import("./frontend-rTwBdJbn.js"),[]),preview:()=>ri(()=>import("./frontend-Dx41dEM9.js"),[]),player:()=>ri(()=>import("./frontend-Dix2OWTT.js"),[]),terminal:()=>ri(()=>import("./frontend-B4aeXn9d.js"),[]),"text-edit":()=>ri(()=>import("./frontend-BwyRSlHp.js"),[])},Fx=new Map;async function hU(e){const t=Fx.get(e);if(t)return t;const n=fU[e];if(!n)throw new Error(`No frontend bundle found for miniapp: ${e}`);const i=await n();return Fx.set(e,i),i}function pU({miniAppId:e,message:t}){return v.jsxs("div",{style:{padding:24,color:"var(--dt-text-muted)"},children:[v.jsx("h3",{children:e}),v.jsx("p",{children:t})]})}function mU({miniAppId:e,windowId:t,args:n,themePreferences:i}){const s=R.useRef(null),[l,o]=R.useState(null),d=R.useRef(null),h=R.useRef(null);return R.useEffect(()=>{window.dispatchEvent(new CustomEvent("desktalk:theme-update",{detail:{windowId:t,miniAppId:e,theme:{accentColor:i.accentColor,mode:i.theme}}}))},[e,i.accentColor,i.theme,t]),R.useEffect(()=>{let f=!1;return hU(e).then(m=>{!f&&s.current&&(d.current=m,h.current=m.activate({root:s.current,miniAppId:e,windowId:t,args:n,theme:{accentColor:i.accentColor,mode:i.theme}}),o(null))}).catch(m=>{f||o(m.message)}),()=>{f=!0;const m=h.current;h.current=null,d.current=null,m&&queueMicrotask(()=>{m.deactivate()})}},[n,e,t]),l?v.jsx(pU,{miniAppId:e,message:l}):v.jsx("div",{ref:s,style:{width:"100%",height:"100%"}})}const gU="_tileSplit_zwnh1_1",bU="_tileSplitHorizontal_zwnh1_9",yU="_tileSplitVertical_zwnh1_14",EU="_tilePane_zwnh1_19",xU="_tileLeaf_zwnh1_20",Cs={tileSplit:gU,tileSplitHorizontal:bU,tileSplitVertical:yU,tilePane:EU,tileLeaf:xU},$x=4;function vU({win:e,themePreferences:t,isOverlayMaximized:n=!1,draggable:i=!1}){return v.jsx(b6,{window:e,isOverlayMaximized:n,draggable:i,children:v.jsx(mU,{miniAppId:e.miniAppId,windowId:e.id,args:e.args,themePreferences:t})})}function Kp({node:e,windowsById:t,themePreferences:n,path:i=[],canDrag:s=!1}){if(e.type==="leaf"){const f=t.get(e.windowId);return f?v.jsx("div",{className:Cs.tileLeaf,children:v.jsx(vU,{win:f,themePreferences:n,isOverlayMaximized:f.maximized,draggable:s})}):null}const[l,o]=e.children,d=e.split==="horizontal"?{gridTemplateColumns:`minmax(0, ${e.ratio}fr) ${$x}px minmax(0, ${1-e.ratio}fr)`}:{gridTemplateRows:`minmax(0, ${e.ratio}fr) ${$x}px minmax(0, ${1-e.ratio}fr)`},h=[Cs.tileSplit,e.split==="horizontal"?Cs.tileSplitHorizontal:Cs.tileSplitVertical].filter(Boolean).join(" ");return v.jsxs("div",{className:h,style:d,children:[v.jsx("div",{className:Cs.tilePane,children:v.jsx(Kp,{node:l,windowsById:t,themePreferences:n,path:[...i,0],canDrag:s})}),v.jsx(e_,{path:i,split:e.split,ratio:e.ratio}),v.jsx("div",{className:Cs.tilePane,children:v.jsx(Kp,{node:o,windowsById:t,themePreferences:n,path:[...i,1],canDrag:s})})]})}function _U(){su("desktalk:bridge:get-state",e=>{const t=e.detail;if(!t?.selector)return;const n=ut.getState(),i=s=>({id:s.id,miniAppId:s.miniAppId,title:s.title,focused:s.id===n.focusedWindowId,maximized:s.id===n.fullscreenWindowId||!!s.maximized});try{switch(t.selector){case"desktop.summary":t.resolve({focusedWindowId:n.focusedWindowId,fullscreenWindowId:n.fullscreenWindowId,windows:n.windows.map(i)});return;case"desktop.windows":t.resolve(n.windows.map(i));return;case"desktop.focusedWindow":{const s=n.windows.find(l=>l.id===n.focusedWindowId);t.resolve(s?i(s):null);return}case"theme.current":{const s=getComputedStyle(document.documentElement),l=["--dt-bg","--dt-bg-subtle","--dt-surface","--dt-text","--dt-text-secondary","--dt-text-muted","--dt-border","--dt-accent","--dt-danger","--dt-success","--dt-warning","--dt-info"].reduce((o,d)=>(o[d]=s.getPropertyValue(d).trim(),o),{});t.resolve({mode:document.documentElement.dataset.theme==="dark"?"dark":"light",tokens:l});return}}}catch(s){t.reject(s.message)}})}function TU(e){const t=R.useRef(new Map),n=R.useCallback((i,s)=>{const l=t.current.get(i)??new Map;return s.map(o=>{const d=l.get(o.name);return d?{...o,handler:d}:null}).filter(o=>o!==null)},[]);return R.useEffect(()=>(Uy(e),()=>{Uy(null)}),[e]),R.useEffect(()=>{if(!e)return;const i=(l,o,d,h,f,m)=>{const b=ut.getState();let x;try{switch(l){case"open":{if(!d||!h)break;or.post(`/api/miniapps/${encodeURIComponent(d)}/activate`,{args:m}),x=b.openWindow(d,h,m);break}case"close":o&&b.closeWindow(o);break;case"focus":o&&b.focusWindow(o);break;case"maximize":o&&b.maximizeWindow(o);break;default:console.warn(`[shell] Unknown AI window command: ${l}`)}if(f){const E=e;E&&E.readyState===WebSocket.OPEN&&E.send(JSON.stringify({type:"window:ai_command_result",requestId:f,ok:!0,action:l,windowId:x??o}))}}catch(E){if(f){const T=e;T&&T.readyState===WebSocket.OPEN&&T.send(JSON.stringify({type:"window:ai_command_result",requestId:f,ok:!1,error:E.message}))}}},s=l=>{try{const o=JSON.parse(l.data);if(o.type==="window:state"){const d=o;ut.getState().restoreFromBackend({version:2,windows:d.windows??[],tree:d.tree??null,focusedWindowId:typeof d.focusedWindowId=="string"?d.focusedWindowId:null,fullscreenWindowId:typeof d.fullscreenWindowId=="string"?d.fullscreenWindowId:null,windowIdCounter:typeof d.windowIdCounter=="number"?d.windowIdCounter:0,nextSplitDirection:d.nextSplitDirection==="horizontal"||d.nextSplitDirection==="vertical"||d.nextSplitDirection==="auto"?d.nextSplitDirection:"auto"});return}if(o.type==="window:ai_command"){const{action:d,windowId:h,miniAppId:f,title:m,requestId:b,args:x}=o;i(d,h,f,m,b,x);return}if(o.type==="window:invoke_action"){const d=o.requestId,h=o.windowId,f=o.actionName;if(!d||!h||!f)return;const m=t.current.get(h)?.get(f);if(!m){f0(d,void 0,`Action not available on window ${h}: ${f}`);return}m(o.params).then(b=>{f0(d,b)}).catch(b=>{f0(d,void 0,b.message)})}}catch{}};return e.addEventListener("message",s),()=>{e.removeEventListener("message",s)}},[e]),{actionHandlersRef:t,buildClientActions:n}}function AU(e){const t=e.target;if(!t)return!1;const n=t.tagName;return!!(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||t.isContentEditable)}function SU(){R.useEffect(()=>{function e(t){if(!t.altKey||AU(t))return;const n=ut.getState(),i=t.code;if(i==="Digit1"||i==="Digit2"||i==="Digit3"){t.preventDefault();const s=parseInt(i.charAt(5),10);n.focusNth(s);return}if(!t.shiftKey)switch(i){case"KeyH":t.preventDefault(),n.focusDirection("left");return;case"KeyL":t.preventDefault(),n.focusDirection("right");return;case"KeyK":t.preventDefault(),n.focusDirection("up");return;case"KeyJ":t.preventDefault(),n.focusDirection("down");return}if(t.shiftKey)switch(i){case"KeyH":t.preventDefault(),n.swapDirection("left");return;case"KeyL":t.preventDefault(),n.swapDirection("right");return;case"KeyK":t.preventDefault(),n.swapDirection("up");return;case"KeyJ":t.preventDefault(),n.swapDirection("down");return}if(i==="KeyF"&&!t.shiftKey){t.preventDefault(),n.toggleFullscreen();return}if(i==="KeyW"&&!t.shiftKey){t.preventDefault(),n.focusedWindowId&&n.closeWindow(n.focusedWindowId);return}if(i==="KeyV"&&!t.shiftKey){t.preventDefault(),n.setNextSplitDirection(n.nextSplitDirection==="vertical"?"auto":"vertical");return}if(i==="KeyB"&&!t.shiftKey){t.preventDefault(),n.setNextSplitDirection(n.nextSplitDirection==="horizontal"?"auto":"horizontal");return}if(i==="KeyR"&&!t.shiftKey){t.preventDefault(),n.rotateFocusedSplit();return}if(i==="BracketLeft"&&!t.shiftKey){t.preventDefault(),n.adjustFocusedRatio(-.05);return}if(i==="BracketRight"&&!t.shiftKey){t.preventDefault(),n.adjustFocusedRatio(.05);return}if(i==="Equal"&&!t.shiftKey){t.preventDefault(),n.equalizeFocusedRatio();return}}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[])}var wU=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},y6=wU,kU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},CU=kU,NU=e=>y6(CU[e.toLowerCase()],6),RU=NU,OU=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,MU=e=>{let t;return(t=e.match(OU))?y6(parseInt(t[1],16),t[1].length):void 0},LU=MU,Yi="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Au=`${Yi}%`,i1=`(?:${Yi}%|${Yi})`,DU=`(?:${Yi}(deg|grad|rad|turn)|${Yi})`,$s="\\s*,\\s*",IU=new RegExp(`^rgba?\\(\\s*${Yi}${$s}${Yi}${$s}${Yi}\\s*(?:,\\s*${i1}\\s*)?\\)$`),BU=new RegExp(`^rgba?\\(\\s*${Au}${$s}${Au}${$s}${Au}\\s*(?:,\\s*${i1}\\s*)?\\)$`),zU=e=>{let t={mode:"rgb"},n;if(n=e.match(IU))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(BU))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},PU=zU,HU=(e,t)=>e===void 0?void 0:typeof e!="object"?em(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,UU=HU,jU=(e="rgb")=>t=>(t=UU(t,e))!==void 0?t.mode===e?t:Lr[t.mode][e]?Lr[t.mode][e](t):e==="rgb"?Lr[t.mode].rgb(t):Lr.rgb[e](Lr[t.mode].rgb(t)):void 0,E6=jU,Lr={},x6={},rd=[],v6={},FU=e=>e,at=e=>(Lr[e.mode]={...Lr[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Lr[t]||(Lr[t]={}),Lr[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=FU)}),x6[e.mode]=e,(e.parse||[]).forEach(t=>{qU(t,e.mode)}),E6(e.mode)),$U=e=>x6[e],qU=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");v6[e]=t}else typeof e=="function"&&rd.indexOf(e)<0&&rd.push(e)},Zp=/[^\x00-\x7F]|[a-zA-Z_]/,YU=/[^\x00-\x7F]|[-\w]/,ge={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},Le=0;function kc(e){let t=e[Le],n=e[Le+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[Le+2]):t==="."?/\d/.test(n):/\d/.test(t)}function Jp(e){if(Le>=e.length)return!1;let t=e[Le];if(Zp.test(t))return!0;if(t==="-"){if(e.length-Le<2)return!1;let n=e[Le+1];return!!(n==="-"||Zp.test(n))}return!1}var VU={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function au(e){let t="";if((e[Le]==="-"||e[Le]==="+")&&(t+=e[Le++]),t+=Cc(e),e[Le]==="."&&/\d/.test(e[Le+1])&&(t+=e[Le++]+Cc(e)),(e[Le]==="e"||e[Le]==="E")&&((e[Le+1]==="-"||e[Le+1]==="+")&&/\d/.test(e[Le+2])?t+=e[Le++]+e[Le++]+Cc(e):/\d/.test(e[Le+1])&&(t+=e[Le++]+Cc(e))),Jp(e)){let n=id(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:ge.Hue,value:t*VU[n]}:void 0}return e[Le]==="%"?(Le++,{type:ge.Percentage,value:+t}):{type:ge.Number,value:+t}}function Cc(e){let t="";for(;/\d/.test(e[Le]);)t+=e[Le++];return t}function id(e){let t="";for(;Le<e.length&&YU.test(e[Le]);)t+=e[Le++];return t}function GU(e){let t=id(e);return e[Le]==="("?(Le++,{type:ge.Function,value:t}):t==="none"?{type:ge.None,value:void 0}:{type:ge.Ident,value:t}}function WU(e=""){let t=e.trim(),n=[],i;for(Le=0;Le<t.length;){if(i=t[Le++],i===`
143
+ `||i===" "||i===" "){for(;Le<t.length&&(t[Le]===`
144
+ `||t[Le]===" "||t[Le]===" ");)Le++;continue}if(i===",")return;if(i===")"){n.push({type:ge.ParenClose});continue}if(i==="+"){if(Le--,kc(t)){n.push(au(t));continue}return}if(i==="-"){if(Le--,kc(t)){n.push(au(t));continue}if(Jp(t)){n.push({type:ge.Ident,value:id(t)});continue}return}if(i==="."){if(Le--,kc(t)){n.push(au(t));continue}return}if(i==="/"){for(;Le<t.length&&(t[Le]===`
145
+ `||t[Le]===" "||t[Le]===" ");)Le++;let s;if(kc(t)&&(s=au(t),s.type!==ge.Hue)){n.push({type:ge.Alpha,value:s});continue}if(Jp(t)&&id(t)==="none"){n.push({type:ge.Alpha,value:{type:ge.None,value:void 0}});continue}return}if(/\d/.test(i)){Le--,n.push(au(t));continue}if(Zp.test(i)){Le--,n.push(GU(t));continue}return}return n}function XU(e){e._i=0;let t=e[e._i++];if(!t||t.type!==ge.Function||t.value!=="color"||(t=e[e._i++],t.type!==ge.Ident))return;let n=v6[t.value];if(!n)return;let i={mode:n},s=_6(e,!1);if(!s)return;let l=$U(n).channels;for(let o=0,d,h;o<l.length;o++)d=s[o],h=l[o],d.type!==ge.None&&(i[h]=d.type===ge.Number?d.value:d.value/100,h==="alpha"&&(i[h]=Math.max(0,Math.min(1,i[h]))));return i}function _6(e,t){let n=[],i;for(;e._i<e.length;){if(i=e[e._i++],i.type===ge.None||i.type===ge.Number||i.type===ge.Alpha||i.type===ge.Percentage||t&&i.type===ge.Hue){n.push(i);continue}if(i.type===ge.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==ge.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:ge.None,value:void 0}),n.every(s=>s.type!==ge.Alpha)?n:void 0}}function QU(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==ge.Function)return;let i=_6(e,t);if(i)return i.unshift(n.value),i}var KU=e=>{if(typeof e!="string")return;let t=WU(e),n=t?QU(t,!0):void 0,i,s=0,l=rd.length;for(;s<l;)if((i=rd[s++](e,n))!==void 0)return i;return t?XU(t):void 0},em=KU;function ZU(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let n={mode:"rgb"},[,i,s,l,o]=t;if(!(i.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return i.type!==ge.None&&(n.r=i.type===ge.Number?i.value/255:i.value/100),s.type!==ge.None&&(n.g=s.type===ge.Number?s.value/255:s.value/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value/255:l.value/100),o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var JU=ZU,ej=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,tj=ej,nj=(e,t,n)=>e+n*(t-e),rj=e=>{let t=[];for(let n=0;n<e.length-1;n++){let i=e[n],s=e[n+1];i===void 0&&s===void 0?t.push(void 0):i!==void 0&&s!==void 0?t.push([i,s]):t.push(i!==void 0?[i,i]:[s,s])}return t},ij=e=>t=>{let n=rj(t);return i=>{let s=i*n.length,l=i>=1?n.length-1:Math.max(Math.floor(s),0),o=n[l];return o===void 0?void 0:e(o[0],o[1],s-l)}},ve=ij(nj),Ut=e=>{let t=!1,n=e.map(i=>i!==void 0?(t=!0,i):1);return t?n:e},aj={mode:"rgb",channels:["r","g","b","alpha"],parse:[JU,LU,PU,RU,tj,"srgb"],serialize:"srgb",interpolate:{r:ve,g:ve,b:ve,alpha:{use:ve,fixup:Ut}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Qs=aj,U0=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),sj=e=>{let t=U0(e.r),n=U0(e.g),i=U0(e.b),s={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*i,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*i,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*i};return e.alpha!==void 0&&(s.alpha=e.alpha),s},qx=sj,j0=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),lj=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"a98",r:j0(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:j0(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:j0(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return i!==void 0&&(s.alpha=i),s},Yx=lj,F0=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},uj=({r:e,g:t,b:n,alpha:i})=>{let s={mode:"lrgb",r:F0(e),g:F0(t),b:F0(n)};return i!==void 0&&(s.alpha=i),s},Ks=uj,oj=e=>{let{r:t,g:n,b:i,alpha:s}=Ks(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*i,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*i,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*i};return s!==void 0&&(l.alpha=s),l},Ha=oj,$0=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},cj=({r:e,g:t,b:n,alpha:i},s="rgb")=>{let l={mode:s,r:$0(e),g:$0(t),b:$0(n)};return i!==void 0&&(l.alpha=i),l},Zs=cj,dj=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Zs({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return i!==void 0&&(s.alpha=i),s},Ua=dj,fj={...Qs,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Yx(Ha(e)),xyz65:Yx},toMode:{rgb:e=>Ua(qx(e)),xyz65:qx}},hj=fj,pj=e=>(e=e%360)<0?e+360:e,tn=pj,mj=(e,t)=>e.map((n,i,s)=>{if(n===void 0)return n;let l=tn(n);return i===0||e[i-1]===void 0?l:t(l-tn(s[i-1]))}).reduce((n,i)=>!n.length||i===void 0||n[n.length-1]===void 0?(n.push(i),n):(n.push(i+n[n.length-1]),n),[]),ui=e=>mj(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Yt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],gj=Math.PI/180,bj=180/Math.PI,Vx=Yt[3]*Yt[4],Gx=Yt[1]*Yt[4],Wx=Yt[1]*Yt[2]-Yt[0]*Yt[3],yj=({r:e,g:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(Wx*n+e*Vx-t*Gx)/(Wx+Vx-Gx),l=n-s,o=(Yt[4]*(t-s)-Yt[2]*l)/Yt[3],d={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(l*l+o*o)/(Yt[4]*s*(1-s))};return d.s&&(d.h=Math.atan2(o,l)*bj-120),i!==void 0&&(d.alpha=i),d},Ej=yj,xj=({h:e,s:t,l:n,alpha:i})=>{let s={mode:"rgb"};e=(e===void 0?0:e+120)*gj,n===void 0&&(n=0);let l=t===void 0?0:t*n*(1-n),o=Math.cos(e),d=Math.sin(e);return s.r=n+l*(Yt[0]*o+Yt[1]*d),s.g=n+l*(Yt[2]*o+Yt[3]*d),s.b=n+l*(Yt[4]*o+Yt[5]*d),i!==void 0&&(s.alpha=i),s},vj=xj,Nd=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=tn(e.h),i=tn(t.h),s=Math.sin((i-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*s},_j=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=tn(e.h),i=tn(t.h);return Math.abs(i-n)>180?n-(i-360*Math.sign(i-n)):i-n},Rd=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=tn(e.h),i=tn(t.h),s=Math.sin((i-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*s},oi=e=>{let t=e.reduce((i,s)=>{if(s!==void 0){let l=s*Math.PI/180;i.sin+=Math.sin(l),i.cos+=Math.cos(l)}return i},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},Tj={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Ej},toMode:{rgb:vj},interpolate:{h:{use:ve,fixup:ui},s:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Nd},average:{h:oi}},Aj=Tj,Sj=({l:e,a:t,b:n,alpha:i},s="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let l=Math.sqrt(t*t+n*n),o={mode:s,l:e,c:l};return l&&(o.h=tn(Math.atan2(n,t)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},Wi=Sj,wj=({l:e,c:t,h:n,alpha:i},s="lab")=>{n===void 0&&(n=0);let l={mode:s,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return i!==void 0&&(l.alpha=i),l},Xi=wj,T6=Math.pow(29,3)/Math.pow(3,3),A6=Math.pow(6,3)/Math.pow(29,3),Bt={X:.9642956764295677,Y:1,Z:.8251046025104602},Ps={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},q0=e=>Math.pow(e,3)>A6?Math.pow(e,3):(116*e-16)/T6,kj=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+16)/116,l=t/500+s,o=s-n/200,d={mode:"xyz65",x:q0(l)*Ps.X,y:q0(s)*Ps.Y,z:q0(o)*Ps.Z};return i!==void 0&&(d.alpha=i),d},S6=kj,Cj=e=>Ua(S6(e)),Od=Cj,Y0=e=>e>A6?Math.cbrt(e):(T6*e+16)/116,Nj=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Y0(e/Ps.X),l=Y0(t/Ps.Y),o=Y0(n/Ps.Z),d={mode:"lab65",l:116*l-16,a:500*(s-l),b:200*(l-o)};return i!==void 0&&(d.alpha=i),d},w6=Nj,Rj=e=>{let t=w6(Ha(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Md=Rj,Ru=.14444444444444443*Math.PI,ad=Math.cos(Ru),sd=Math.sin(Ru),k6=100/Math.log(139/100),Oj=({l:e,c:t,h:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"lab65",l:(Math.exp(e*1/k6)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,o=l*Math.cos(n/180*Math.PI-Ru),d=l*Math.sin(n/180*Math.PI-Ru);return s.a=o*ad-d/.83*sd,s.b=o*sd+d/.83*ad,i!==void 0&&(s.alpha=i),s},tm=Oj,Mj=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=t*ad+n*sd,l=.83*(n*ad-t*sd),o=Math.sqrt(s*s+l*l),d={mode:"dlch",l:k6/1*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*1*1)};return d.c&&(d.h=tn((Math.atan2(l,s)+Ru)/Math.PI*180)),i!==void 0&&(d.alpha=i),d},nm=Mj,Xx=e=>tm(Wi(e,"dlch")),Qx=e=>Xi(nm(e),"dlab"),Lj={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Xx,rgb:e=>Od(Xx(e))},fromMode:{lab65:Qx,rgb:e=>Qx(Md(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ve,a:ve,b:ve,alpha:{use:ve,fixup:Ut}}},Dj=Lj,Ij={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:tm,dlab:e=>Xi(e,"dlab"),rgb:e=>Od(tm(e))},fromMode:{lab65:nm,dlab:e=>Wi(e,"dlch"),rgb:e=>nm(Md(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ve,c:ve,h:{use:ve,fixup:ui},alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:oi}},Bj=Ij;function zj({h:e,s:t,i:n,alpha:i}){e=tn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:n*(1+t*(3/(2-s)-1)),g:n*(1+t*(3*(1-s)/(2-s)-1)),b:n*(1-t)};break;case 1:l={r:n*(1+t*(3*(1-s)/(2-s)-1)),g:n*(1+t*(3/(2-s)-1)),b:n*(1-t)};break;case 2:l={r:n*(1-t),g:n*(1+t*(3/(2-s)-1)),b:n*(1+t*(3*(1-s)/(2-s)-1))};break;case 3:l={r:n*(1-t),g:n*(1+t*(3*(1-s)/(2-s)-1)),b:n*(1+t*(3/(2-s)-1))};break;case 4:l={r:n*(1+t*(3*(1-s)/(2-s)-1)),g:n*(1-t),b:n*(1+t*(3/(2-s)-1))};break;case 5:l={r:n*(1+t*(3/(2-s)-1)),g:n*(1-t),b:n*(1+t*(3*(1-s)/(2-s)-1))};break;default:l={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return l.mode="rgb",i!==void 0&&(l.alpha=i),l}function Pj({r:e,g:t,b:n,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),o={mode:"hsi",s:e+t+n===0?0:1-3*l/(e+t+n),i:(e+t+n)/3};return s-l!==0&&(o.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),i!==void 0&&(o.alpha=i),o}var Hj={mode:"hsi",toMode:{rgb:zj},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Pj},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ve,fixup:ui},s:ve,i:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Nd},average:{h:oi}},Uj=Hj;function jj({h:e,s:t,l:n,alpha:i}){e=tn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=n+t*(n<.5?n:1-n),l=s-(s-n)*2*Math.abs(e/60%2-1),o;switch(Math.floor(e/60)){case 0:o={r:s,g:l,b:2*n-s};break;case 1:o={r:l,g:s,b:2*n-s};break;case 2:o={r:2*n-s,g:s,b:l};break;case 3:o={r:2*n-s,g:l,b:s};break;case 4:o={r:l,g:2*n-s,b:s};break;case 5:o={r:s,g:2*n-s,b:l};break;default:o={r:2*n-s,g:2*n-s,b:2*n-s}}return o.mode="rgb",i!==void 0&&(o.alpha=i),o}function Fj({r:e,g:t,b:n,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),o={mode:"hsl",s:s===l?0:(s-l)/(1-Math.abs(s+l-1)),l:.5*(s+l)};return s-l!==0&&(o.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),i!==void 0&&(o.alpha=i),o}var $j=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},qj=$j,Yj=new RegExp(`^hsla?\\(\\s*${DU}${$s}${Au}${$s}${Au}\\s*(?:,\\s*${i1}\\s*)?\\)$`),Vj=e=>{let t=e.match(Yj);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=qj(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n},Gj=Vj;function Wj(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let n={mode:"hsl"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Percentage)return;n.h=i.value}if(s.type!==ge.None){if(s.type===ge.Hue)return;n.s=s.value/100}if(l.type!==ge.None){if(l.type===ge.Hue)return;n.l=l.value/100}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var Xj=Wj,Qj={mode:"hsl",toMode:{rgb:jj},fromMode:{rgb:Fj},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Xj,Gj],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ve,fixup:ui},s:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Nd},average:{h:oi}},C6=Qj;function N6({h:e,s:t,v:n,alpha:i}){e=tn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:n,g:n*(1-t*s),b:n*(1-t)};break;case 1:l={r:n*(1-t*s),g:n,b:n*(1-t)};break;case 2:l={r:n*(1-t),g:n,b:n*(1-t*s)};break;case 3:l={r:n*(1-t),g:n*(1-t*s),b:n};break;case 4:l={r:n*(1-t*s),g:n*(1-t),b:n};break;case 5:l={r:n,g:n*(1-t),b:n*(1-t*s)};break;default:l={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return l.mode="rgb",i!==void 0&&(l.alpha=i),l}function R6({r:e,g:t,b:n,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),o={mode:"hsv",s:s===0?0:1-l/s,v:s};return s-l!==0&&(o.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),i!==void 0&&(o.alpha=i),o}var Kj={mode:"hsv",toMode:{rgb:N6},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:R6},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ve,fixup:ui},s:ve,v:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Nd},average:{h:oi}},O6=Kj;function Zj({h:e,w:t,b:n,alpha:i}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let s=t+n;t/=s,n/=s}return N6({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:i})}function Jj(e){let t=R6(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,s={mode:"hwb",w:(1-n)*i,b:1-i};return t.h!==void 0&&(s.h=t.h),t.alpha!==void 0&&(s.alpha=t.alpha),s}function eF(e,t){if(!t||t[0]!=="hwb")return;let n={mode:"hwb"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Percentage)return;n.h=i.value}if(s.type!==ge.None){if(s.type===ge.Hue)return;n.w=s.value/100}if(l.type!==ge.None){if(l.type===ge.Hue)return;n.b=l.value/100}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var tF=eF,nF={mode:"hwb",toMode:{rgb:Zj},fromMode:{rgb:Jj},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[tF],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ve,fixup:ui},w:ve,b:ve,alpha:{use:ve,fixup:Ut}},difference:{h:_j},average:{h:oi}},rF=nF,Ld=.1593017578125,M6=78.84375,Dd=.8359375,Id=18.8515625,Bd=18.6875;function V0(e){if(e<0)return 0;let t=Math.pow(e,1/M6);return 1e4*Math.pow(Math.max(0,t-Dd)/(Id-Bd*t),1/Ld)}function G0(e){if(e<0)return 0;let t=Math.pow(e/1e4,Ld);return Math.pow((Dd+Id*t)/(1+Bd*t),M6)}var W0=e=>Math.max(e/203,0),iF=({i:e,t,p:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=V0(e+.008609037037932761*t+.11102962500302593*n),l=V0(e-.00860903703793275*t-.11102962500302599*n),o=V0(e+.5600313357106791*t-.32062717498731885*n),d={mode:"xyz65",x:W0(2.070152218389422*s-1.3263473389671556*l+.2066510476294051*o),y:W0(.3647385209748074*s+.680566024947227*l-.0453045459220346*o),z:W0(-.049747207535812*s-.0492609666966138*l+1.1880659249923042*o)};return i!==void 0&&(d.alpha=i),d},Kx=iF,X0=(e=0)=>Math.max(e*203,0),aF=({x:e,y:t,z:n,alpha:i})=>{let s=X0(e),l=X0(t),o=X0(n),d=G0(.3592832590121217*s+.6976051147779502*l-.0358915932320289*o),h=G0(-.1920808463704995*s+1.1004767970374323*l+.0753748658519118*o),f=G0(.0070797844607477*s+.0748396662186366*l+.8433265453898765*o),m=.5*d+.5*h,b=1.61376953125*d-3.323486328125*h+1.709716796875*f,x=4.378173828125*d-4.24560546875*h-.132568359375*f,E={mode:"itp",i:m,t:b,p:x};return i!==void 0&&(E.alpha=i),E},Zx=aF,sF={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Kx,rgb:e=>Ua(Kx(e))},fromMode:{xyz65:Zx,rgb:e=>Zx(Ha(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ve,t:ve,p:ve,alpha:{use:ve,fixup:Ut}}},lF=sF,uF=134.03437499999998,oF=16295499532821565e-27,Q0=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Ld);return Math.pow((Dd+Id*t)/(1+Bd*t),uF)},K0=(e=0)=>Math.max(e*203,0),cF=({x:e,y:t,z:n,alpha:i})=>{e=K0(e),t=K0(t),n=K0(n);let s=1.15*e-.15*n,l=.66*t+.34*e,o=Q0(.41478972*s+.579999*l+.014648*n),d=Q0(-.20151*s+1.120649*l+.0531008*n),h=Q0(-.0166008*s+.2648*l+.6684799*n),f=(o+d)/2,m={mode:"jab",j:.44*f/(1-.56*f)-oF,a:3.524*o-4.066708*d+.542708*h,b:.199076*o+1.096799*d-1.295875*h};return i!==void 0&&(m.alpha=i),m},L6=cF,dF=134.03437499999998,Jx=16295499532821565e-27,Z0=e=>{if(e<0)return 0;let t=Math.pow(e,1/dF);return 1e4*Math.pow((Dd-t)/(Bd*t-Id),1/Ld)},J0=e=>e/203,fF=({j:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+Jx)/(.44+.56*(e+Jx)),l=Z0(s+.13860504*t+.058047316*n),o=Z0(s-.13860504*t-.058047316*n),d=Z0(s-.096019242*t-.8118919*n),h={mode:"xyz65",x:J0(1.661373024652174*l-.914523081304348*o+.23136208173913045*d),y:J0(-.3250758611844533*l+1.571847026732543*o-.21825383453227928*d),z:J0(-.090982811*l-.31272829*o+1.5227666*d)};return i!==void 0&&(h.alpha=i),h},D6=fF,hF=e=>{let t=L6(Ha(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},I6=hF,pF=e=>Ua(D6(e)),B6=pF,mF={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:I6,xyz65:L6},toMode:{rgb:B6,xyz65:D6},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ve,a:ve,b:ve,alpha:{use:ve,fixup:Ut}}},gF=mF,bF=({j:e,a:t,b:n,alpha:i})=>{t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.sqrt(t*t+n*n),l={mode:"jch",j:e,c:s};return s&&(l.h=tn(Math.atan2(n,t)*180/Math.PI)),i!==void 0&&(l.alpha=i),l},ev=bF,yF=({j:e,c:t,h:n,alpha:i})=>{n===void 0&&(n=0);let s={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},tv=yF,EF={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:tv,rgb:e=>B6(tv(e))},fromMode:{rgb:e=>ev(I6(e)),jab:ev},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ve,fixup:ui},c:ve,j:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:oi}},xF=EF,zd=Math.pow(29,3)/Math.pow(3,3),a1=Math.pow(6,3)/Math.pow(29,3),ep=e=>Math.pow(e,3)>a1?Math.pow(e,3):(116*e-16)/zd,vF=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+16)/116,l=t/500+s,o=s-n/200,d={mode:"xyz50",x:ep(l)*Bt.X,y:ep(s)*Bt.Y,z:ep(o)*Bt.Z};return i!==void 0&&(d.alpha=i),d},s1=vF,_F=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Zs({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return i!==void 0&&(s.alpha=i),s},Wu=_F,TF=e=>Wu(s1(e)),z6=TF,AF=e=>{let{r:t,g:n,b:i,alpha:s}=Ks(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*i,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*i,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*i};return s!==void 0&&(l.alpha=s),l},Xu=AF,tp=e=>e>a1?Math.cbrt(e):(zd*e+16)/116,SF=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=tp(e/Bt.X),l=tp(t/Bt.Y),o=tp(n/Bt.Z),d={mode:"lab",l:116*l-16,a:500*(s-l),b:200*(l-o)};return i!==void 0&&(d.alpha=i),d},l1=SF,wF=e=>{let t=l1(Xu(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},P6=wF;function kF(e,t){if(!t||t[0]!=="lab")return;let n={mode:"lab"},[,i,s,l,o]=t;if(!(i.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return i.type!==ge.None&&(n.l=Math.min(Math.max(0,i.value),100)),s.type!==ge.None&&(n.a=s.type===ge.Number?s.value:s.value*125/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value:l.value*125/100),o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var CF=kF,NF={mode:"lab",toMode:{xyz50:s1,rgb:z6},fromMode:{xyz50:l1,rgb:P6},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[CF],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:ve,a:ve,b:ve,alpha:{use:ve,fixup:Ut}}},u1=NF,RF={...u1,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:S6,rgb:Od},fromMode:{xyz65:w6,rgb:Md},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},OF=RF;function MF(e,t){if(!t||t[0]!=="lch")return;let n={mode:"lch"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Hue)return;n.l=Math.min(Math.max(0,i.value),100)}if(s.type!==ge.None&&(n.c=Math.max(0,s.type===ge.Number?s.value:s.value*150/100)),l.type!==ge.None){if(l.type===ge.Percentage)return;n.h=l.value}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var LF=MF,DF={mode:"lch",toMode:{lab:Xi,rgb:e=>z6(Xi(e))},fromMode:{rgb:e=>Wi(P6(e)),lab:Wi},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[LF],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ve,fixup:ui},c:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:oi}},o1=DF,IF={...o1,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Xi(e,"lab65"),rgb:e=>Od(Xi(e,"lab65"))},fromMode:{rgb:e=>Wi(Md(e),"lch65"),lab65:e=>Wi(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},BF=IF,zF=({l:e,u:t,v:n,alpha:i})=>{t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.sqrt(t*t+n*n),l={mode:"lchuv",l:e,c:s};return s&&(l.h=tn(Math.atan2(n,t)*180/Math.PI)),i!==void 0&&(l.alpha=i),l},H6=zF,PF=({l:e,c:t,h:n,alpha:i})=>{n===void 0&&(n=0);let s={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},U6=PF,j6=(e,t,n)=>4*e/(e+15*t+3*n),F6=(e,t,n)=>9*t/(e+15*t+3*n),HF=j6(Bt.X,Bt.Y,Bt.Z),UF=F6(Bt.X,Bt.Y,Bt.Z),jF=e=>e<=a1?zd*e:116*Math.cbrt(e)-16,FF=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=jF(t/Bt.Y),l=j6(e,t,n),o=F6(e,t,n);!isFinite(l)||!isFinite(o)?s=l=o=0:(l=13*s*(l-HF),o=13*s*(o-UF));let d={mode:"luv",l:s,u:l,v:o};return i!==void 0&&(d.alpha=i),d},rm=FF,$F=(e,t,n)=>4*e/(e+15*t+3*n),qF=(e,t,n)=>9*t/(e+15*t+3*n),YF=$F(Bt.X,Bt.Y,Bt.Z),VF=qF(Bt.X,Bt.Y,Bt.Z),GF=({l:e,u:t,v:n,alpha:i})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let s=t/(13*e)+YF,l=n/(13*e)+VF,o=Bt.Y*(e<=8?e/zd:Math.pow((e+16)/116,3)),d=o*(9*s)/(4*l),h=o*(12-3*s-20*l)/(4*l),f={mode:"xyz50",x:d,y:o,z:h};return i!==void 0&&(f.alpha=i),f},im=GF,WF=e=>H6(rm(Xu(e))),XF=e=>Wu(im(U6(e))),QF={mode:"lchuv",toMode:{luv:U6,rgb:XF},fromMode:{rgb:WF,luv:H6},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ve,fixup:ui},c:ve,l:ve,alpha:{use:ve,fixup:Ut}},difference:{h:Rd},average:{h:oi}},KF=QF,ZF={...Qs,mode:"lrgb",toMode:{rgb:Zs},fromMode:{rgb:Ks},parse:["srgb-linear"],serialize:"srgb-linear"},JF=ZF,e$={mode:"luv",toMode:{xyz50:im,rgb:e=>Wu(im(e))},fromMode:{xyz50:rm,rgb:e=>rm(Xu(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:ve,u:ve,v:ve,alpha:{use:ve,fixup:Ut}}},t$=e$,n$=({r:e,g:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),d={mode:"oklab",l:.210454268309314*s+.7936177747023054*l-.0040720430116193*o,a:1.9779985324311684*s-2.42859224204858*l+.450593709617411*o,b:.0259040424655478*s+.7827717124575296*l-.8086757549230774*o};return i!==void 0&&(d.alpha=i),d},$6=n$,r$=e=>{let t=$6(Ks(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Pd=r$,i$=({l:e,a:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.pow(e+.3963377773761749*t+.2158037573099136*n,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*n,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*n,3),d={mode:"lrgb",r:4.076741636075957*s-3.3077115392580616*l+.2309699031821044*o,g:-1.2684379732850317*s+2.6097573492876887*l-.3413193760026573*o,b:-.0041960761386756*s-.7034186179359362*l+1.7076146940746117*o};return i!==void 0&&(d.alpha=i),d},Qu=i$,a$=e=>Zs(Qu(e)),Hd=a$;function am(e){let t=1.170873786407767;return .5*(t*e-.206+Math.sqrt((t*e-.206)*(t*e-.206)+4*.03*t*e))}function ld(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function s$(e,t){let n,i,s,l,o,d,h,f;-1.88170328*e-.80936493*t>1?(n=1.19086277,i=1.76576728,s=.59662641,l=.75515197,o=.56771245,d=4.0767416621,h=-3.3077115913,f=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,i=-.45954404,s=.08285427,l=.1254107,o=.14503204,d=-1.2684380046,h=2.6097574011,f=-.3413193965):(n=1.35733652,i=-.00915799,s=-1.1513021,l=-.50559606,o=.00692167,d=-.0041960863,h=-.7034186147,f=1.707614701);let m=n+i*e+s*t+l*e*e+o*e*t,b=.3963377774*e+.2158037573*t,x=-.1055613458*e-.0638541728*t,E=-.0894841775*e-1.291485548*t;{let T=1+m*b,w=1+m*x,S=1+m*E,k=T*T*T,F=w*w*w,H=S*S*S,V=3*b*T*T,J=3*x*w*w,j=3*E*S*S,ne=6*b*b*T,Z=6*x*x*w,fe=6*E*E*S,z=d*k+h*F+f*H,$=d*V+h*J+f*j,Y=d*ne+h*Z+f*fe;m=m-z*$/($*$-.5*z*Y)}return m}function c1(e,t){let n=s$(e,t),i=Qu({l:1,a:n*e,b:n*t}),s=Math.cbrt(1/Math.max(i.r,i.g,i.b)),l=s*n;return[s,l]}function l$(e,t,n,i,s,l=null){l||(l=c1(e,t));let o;if((n-s)*l[1]-(l[0]-s)*i<=0)o=l[1]*s/(i*l[0]+l[1]*(s-n));else{o=l[1]*(s-1)/(i*(l[0]-1)+l[1]*(s-n));{let d=n-s,h=i,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,b=-.0894841775*e-1.291485548*t,x=d+h*f,E=d+h*m,T=d+h*b;{let w=s*(1-o)+o*n,S=o*i,k=w+S*f,F=w+S*m,H=w+S*b,V=k*k*k,J=F*F*F,j=H*H*H,ne=3*x*k*k,Z=3*E*F*F,fe=3*T*H*H,z=6*x*x*k,$=6*E*E*F,Y=6*T*T*H,_e=4.0767416621*V-3.3077115913*J+.2309699292*j-1,oe=4.0767416621*ne-3.3077115913*Z+.2309699292*fe,le=4.0767416621*z-3.3077115913*$+.2309699292*Y,I=oe/(oe*oe-.5*_e*le),te=-_e*I,be=-1.2684380046*V+2.6097574011*J-.3413193965*j-1,ke=-1.2684380046*ne+2.6097574011*Z-.3413193965*fe,O=-1.2684380046*z+2.6097574011*$-.3413193965*Y,D=ke/(ke*ke-.5*be*O),P=-be*D,C=-.0041960863*V-.7034186147*J+1.707614701*j-1,ce=-.0041960863*ne-.7034186147*Z+1.707614701*fe,Ee=-.0041960863*z-.7034186147*$+1.707614701*Y,xe=ce/(ce*ce-.5*C*Ee),Me=-C*xe;te=I>=0?te:1e6,P=D>=0?P:1e6,Me=xe>=0?Me:1e6,o+=Math.min(te,Math.min(P,Me))}}}return o}function d1(e,t,n=null){n||(n=c1(e,t));let i=n[0],s=n[1];return[s/i,s/(1-i)]}function q6(e,t,n){let i=c1(t,n),s=l$(t,n,e,1,e,i),l=d1(t,n,i),o=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),d=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),h=s/Math.min(e*l[0],(1-e)*l[1]),f=e*o,m=(1-e)*d,b=.9*h*Math.sqrt(Math.sqrt(1/(1/(f*f*f*f)+1/(m*m*m*m))));return f=e*.4,m=(1-e)*.8,[Math.sqrt(1/(1/(f*f)+1/(m*m))),b,s]}function nv(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,s={mode:"okhsl",l:am(t)};e.alpha!==void 0&&(s.alpha=e.alpha);let l=Math.sqrt(n*n+i*i);if(!l)return s.s=0,s;let[o,d,h]=q6(t,n/l,i/l),f;if(l<d){let m=0,b=.8*o,x=1-b/d;f=(l-m)/(b+x*(l-m))*.8}else{let m=d,b=.2*d*d*1.25*1.25/o,x=1-b/(h-d);f=.8+.2*((l-m)/(b+x*(l-m)))}return f&&(s.s=f,s.h=tn(Math.atan2(i,n)*180/Math.PI)),s}function rv(e){let t=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,i=e.l!==void 0?e.l:0,s={mode:"oklab",l:ld(i)};if(e.alpha!==void 0&&(s.alpha=e.alpha),!n||i===1)return s.a=s.b=0,s;let l=Math.cos(t/180*Math.PI),o=Math.sin(t/180*Math.PI),[d,h,f]=q6(s.l,l,o),m,b,x,E;n<.8?(m=1.25*n,b=0,x=.8*d,E=1-x/h):(m=5*(n-.8),b=h,x=.2*h*h*1.25*1.25/d,E=1-x/(f-h));let T=b+m*x/(1-E*m);return s.a=T*l,s.b=T*o,s}var u$={...C6,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:nv,rgb:e=>nv(Pd(e))},toMode:{oklab:rv,rgb:e=>Hd(rv(e))}},o$=u$;function iv(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,s=Math.sqrt(n*n+i*i),l=s?n/s:1,o=s?i/s:1,[d,h]=d1(l,o),f=.5,m=1-f/d,b=h/(s+t*h),x=b*t,E=b*s,T=ld(x),w=E*T/x,S=Qu({l:T,a:l*w,b:o*w}),k=Math.cbrt(1/Math.max(S.r,S.g,S.b,0));t=t/k,s=s/k*am(t)/t,t=am(t);let F={mode:"okhsv",s:s?(f+h)*E/(h*f+h*m*E):0,v:t?t/x:0};return F.s&&(F.h=tn(Math.atan2(i,n)*180/Math.PI)),e.alpha!==void 0&&(F.alpha=e.alpha),F}function av(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let n=e.h!==void 0?e.h:0,i=e.s!==void 0?e.s:0,s=e.v!==void 0?e.v:0,l=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[d,h]=d1(l,o),f=.5,m=1-f/d,b=1-i*f/(f+h-h*m*i),x=i*h*f/(f+h-h*m*i),E=ld(b),T=x*E/b,w=Qu({l:E,a:l*T,b:o*T}),S=Math.cbrt(1/Math.max(w.r,w.g,w.b,0)),k=ld(s*b),F=x*k/b;return t.l=k*S,t.a=F*l*S,t.b=F*o*S,t}var c$={...O6,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:iv,rgb:e=>iv(Pd(e))},toMode:{oklab:av,rgb:e=>Hd(av(e))}},d$=c$;function f$(e,t){if(!t||t[0]!=="oklab")return;let n={mode:"oklab"},[,i,s,l,o]=t;if(!(i.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return i.type!==ge.None&&(n.l=Math.min(Math.max(0,i.type===ge.Number?i.value:i.value/100),1)),s.type!==ge.None&&(n.a=s.type===ge.Number?s.value:s.value*.4/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value:l.value*.4/100),o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var h$=f$,p$={...u1,mode:"oklab",toMode:{lrgb:Qu,rgb:Hd},fromMode:{lrgb:$6,rgb:Pd},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[h$],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},m$=p$;function g$(e,t){if(!t||t[0]!=="oklch")return;let n={mode:"oklch"},[,i,s,l,o]=t;if(i.type!==ge.None){if(i.type===ge.Hue)return;n.l=Math.min(Math.max(0,i.type===ge.Number?i.value:i.value/100),1)}if(s.type!==ge.None&&(n.c=Math.max(0,s.type===ge.Number?s.value:s.value*.4/100)),l.type!==ge.None){if(l.type===ge.Percentage)return;n.h=l.value}return o.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,o.type===ge.Number?o.value:o.value/100))),n}var b$=g$,y$={...o1,mode:"oklch",toMode:{oklab:e=>Xi(e,"oklab"),rgb:e=>Hd(Xi(e,"oklab"))},fromMode:{rgb:e=>Wi(Pd(e),"oklch"),oklab:e=>Wi(e,"oklch")},parse:[b$],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},E$=y$,x$=e=>{let{r:t,g:n,b:i,alpha:s}=Ks(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*i,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*i,z:0*t+.0451133818589026*n+1.043944368900976*i};return s!==void 0&&(l.alpha=s),l},sv=x$,v$=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Zs({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return i!==void 0&&(s.alpha=i),s},lv=v$,_$={...Qs,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>lv(Ha(e)),xyz65:lv},toMode:{rgb:e=>Ua(sv(e)),xyz65:sv}},T$=_$,np=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},A$=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"prophoto",r:np(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:np(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:np(e*0+t*0+1.2119675456389452*n)};return i!==void 0&&(s.alpha=i),s},uv=A$,rp=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},S$=e=>{let t=rp(e.r),n=rp(e.g),i=rp(e.b),s={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*i,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*i,z:0*t+0*n+.8251046025104602*i};return e.alpha!==void 0&&(s.alpha=e.alpha),s},ov=S$,w$={...Qs,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:uv,rgb:e=>uv(Xu(e))},toMode:{xyz50:ov,rgb:e=>Wu(ov(e))}},k$=w$,cv=1.09929682680944,C$=.018053968510807,ip=e=>{let t=Math.abs(e);return t>C$?(Math.sign(e)||1)*(cv*Math.pow(t,.45)-(cv-1)):4.5*e},N$=({x:e,y:t,z:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"rec2020",r:ip(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:ip(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:ip(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return i!==void 0&&(s.alpha=i),s},dv=N$,fv=1.09929682680944,R$=.018053968510807,ap=(e=0)=>{let t=Math.abs(e);return t<R$*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+fv-1)/fv,1/.45)},O$=e=>{let t=ap(e.r),n=ap(e.g),i=ap(e.b),s={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*i,y:.262700212011267*t+.6779980715188708*n+.059301716469862*i,z:0*t+.0280726930490874*n+1.0609850577107909*i};return e.alpha!==void 0&&(s.alpha=e.alpha),s},hv=O$,M$={...Qs,mode:"rec2020",fromMode:{xyz65:dv,rgb:e=>dv(Ha(e))},toMode:{xyz65:hv,rgb:e=>Ua(hv(e))},parse:["rec2020"],serialize:"rec2020"},L$=M$,Na=.0037930732552754493,Y6=Math.cbrt(Na),sp=e=>Math.cbrt(e)-Y6,D$=e=>{let{r:t,g:n,b:i,alpha:s}=Ks(e),l=sp(.3*t+.622*n+.078*i+Na),o=sp(.23*t+.692*n+.078*i+Na),d=sp(.2434226892454782*t+.2047674442449682*n+.5518098665095535*i+Na),h={mode:"xyb",x:(l-o)/2,y:(l+o)/2,b:d-(l+o)/2};return s!==void 0&&(h.alpha=s),h},I$=D$,lp=e=>Math.pow(e+Y6,3),B$=({x:e,y:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=lp(e+t)-Na,l=lp(t-e)-Na,o=lp(n+t)-Na,d=Zs({r:11.031566904639861*s-9.866943908131562*l-.16462299650829934*o,g:-3.2541473810744237*s+4.418770377582723*l-.16462299650829934*o,b:-3.6588512867136815*s+2.7129230459360922*l+1.9459282407775895*o});return i!==void 0&&(d.alpha=i),d},z$=B$,P$={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:z$},fromMode:{rgb:I$},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ve,y:ve,b:ve,alpha:{use:ve,fixup:Ut}}},H$=P$,U$={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Wu,lab:l1},fromMode:{rgb:Xu,lab:s1},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ve,y:ve,z:ve,alpha:{use:ve,fixup:Ut}}},j$=U$,F$=e=>{let{x:t,y:n,z:i,alpha:s}=e;t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*i,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*i,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*i};return s!==void 0&&(l.alpha=s),l},$$=F$,q$=e=>{let{x:t,y:n,z:i,alpha:s}=e;t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*i,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*i,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*i};return s!==void 0&&(l.alpha=s),l},Y$=q$,V$={mode:"xyz65",toMode:{rgb:Ua,xyz50:$$},fromMode:{rgb:Ha,xyz50:Y$},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:ve,y:ve,z:ve,alpha:{use:ve,fixup:Ut}}},G$=V$,W$=({r:e,g:t,b:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return i!==void 0&&(s.alpha=i),s},X$=W$,Q$=({y:e,i:t,q:n,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return i!==void 0&&(s.alpha=i),s},K$=Q$,Z$={mode:"yiq",toMode:{rgb:K$},fromMode:{rgb:X$},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ve,i:ve,q:ve,alpha:{use:ve,fixup:Ut}}},J$=Z$;at(hj);at(Aj);at(Dj);at(Bj);at(Uj);at(C6);at(O6);at(rF);at(lF);at(gF);at(xF);at(u1);at(OF);at(o1);at(BF);at(KF);at(JF);at(t$);at(o$);at(d$);at(m$);at(E$);at(T$);at(k$);at(L$);at(Qs);at(H$);at(j$);at(G$);at(J$);var V6="#7c6ff7",eq=E6("oklch"),tq=[["50",.98,.005],["100",.94,.01],["150",.88,.015],["200",.8,.02],["300",.7,.025],["400",.6,.03],["500",.5,.04],["600",.4,.03],["700",.32,.025],["800",.24,.03],["850",.2,.035],["900",.16,.04],["950",.12,.05]],nq={danger:25,success:155,warning:80,info:250},jc={accentColor:V6,theme:"dark"};function Su(e,t,n){return Math.min(Math.max(e,t),n)}function G6(e){let t=e%360;return t<0?t+360:t}function wa(e){return e.toFixed(3).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}function bt(e,t,n,i){let s=`oklch(${wa(Su(e,0,1))} ${wa(Su(t,0,.4))} ${wa(G6(n))}`;return i===void 0?`${s})`:`${s} / ${wa(Su(i,0,1))})`}function rq(e){return e==="dark"?"dark":"light"}function iq(e){let t=em(e)??em(V6),n=t?eq(t):null;return n?{l:Su(n.l??.623,0,1),c:Su(n.c??.234,0,.37),h:G6(n.h??286)}:{l:.623,c:.234,h:286}}function aq(e){let t=rq(e.theme)==="dark",{l:n,c:i,h:s}=iq(e.accentColor),l=[],o=(m,b)=>{l.push(` ${m}: ${b};`)},d=m=>`var(--dt-scale-${m})`;o("--dt-accent-h",wa(s)),o("--dt-accent-c",wa(i)),o("--dt-accent-l",wa(n)),o("--dt-mode-sign",t?"1":"-1");for(let[m,b,x]of tq)o(`--dt-scale-${m}`,bt(b,x,s));o("--dt-bg",d(t?"950":"50")),o("--dt-bg-subtle",d(t?"900":"100")),o("--dt-surface",d(t?"850":"100")),o("--dt-surface-hover",d(t?"800":"150")),o("--dt-surface-active",d(t?"700":"200")),o("--dt-overlay",t?bt(.16,.04,s,.85):bt(.98,.005,s,.85)),o("--dt-text",d(t?"50":"950")),o("--dt-text-secondary",d(t?"300":"600")),o("--dt-text-muted",d(t?"400":"500")),o("--dt-border",d(t?"800":"200")),o("--dt-border-subtle",t?bt(.2,.035,s,.6):bt(.88,.015,s,.6)),o("--dt-border-strong",d(t?"700":"300"));let h=t?.05:-.05,f=t?.1:-.1;o("--dt-accent",bt(n,i,s)),o("--dt-accent-hover",bt(n+h,i,s)),o("--dt-accent-active",bt(n+f,i,s)),o("--dt-accent-subtle",bt(n,i,s,.15)),o("--dt-accent-ghost",bt(n,i,s,.08)),o("--dt-text-on-accent",n>.6?d("950"):d("50"));for(let[m,b]of Object.entries(nq)){let x=t?.7:.45;o(`--dt-${m}`,bt(x,.18,b)),o(`--dt-${m}-subtle`,bt(x,.18,b,.15))}return o("--dt-dock-bg","var(--dt-overlay)"),o("--dt-actions-bar-bg","var(--dt-bg-subtle)"),o("--dt-window-chrome","var(--dt-surface)"),o("--dt-window-body","var(--dt-bg)"),o("--dt-info-panel-bg","var(--dt-bg-subtle)"),o("--dt-wallpaper",t?`linear-gradient(135deg, ${bt(.25,.08,s)} 0%, ${bt(.3,.1,s)} 50%, ${bt(.4,.04,s+30)} 100%)`:`linear-gradient(135deg, ${bt(.85,.06,s)} 0%, ${bt(.8,.08,s)} 50%, ${bt(.75,.03,s+30)} 100%)`),o("--dt-glass",t?bt(.2,.035,s,.7):bt(.94,.01,s,.7)),o("--dt-glass-border",t?bt(.98,.005,s,.1):bt(.12,.05,s,.12)),o("--dt-glass-highlight",t?bt(.98,.005,s,.05):bt(.98,.005,s,.45)),o("--dt-shadow-color",t?bt(.12,.05,s,.4):bt(.12,.05,s,.15)),o("--font-display","'Sora', system-ui, -apple-system, sans-serif"),o("--font-ui","'Work Sans', system-ui, -apple-system, sans-serif"),o("--font-mono","'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace"),`:root {
146
+ ${l.join(`
147
+ `)}
148
+ }`}var sq=`
149
+ input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="url"] {
150
+ font-family: var(--font-mono, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace);
151
+ font-size: 0.8125rem;
152
+ font-weight: 600;
153
+ letter-spacing: 0.04em;
154
+ line-height: 1;
155
+ color: var(--dt-text);
156
+ background: var(--dt-surface);
157
+ border: 1px solid var(--dt-accent);
158
+ border-radius: 2px;
159
+ padding: 6px 10px;
160
+ outline: none;
161
+ width: 100%;
162
+ box-sizing: border-box;
163
+ transition: all 0.1s ease;
164
+ position: relative;
165
+ }
166
+ input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover, input[type="number"]:hover, input[type="search"]:hover, input[type="url"]:hover {
167
+ background: var(--dt-accent);
168
+ color: var(--dt-text-on-accent);
169
+ }
170
+ input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="url"]:focus {
171
+ background: var(--dt-accent);
172
+ color: var(--dt-text-on-accent);
173
+ }
174
+ input[type="text"]:disabled, input[type="email"]:disabled, input[type="password"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="url"]:disabled {
175
+ cursor: not-allowed;
176
+ opacity: 0.4;
177
+ }
178
+ input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="password"]::placeholder, input[type="number"]::placeholder, input[type="search"]::placeholder, input[type="url"]::placeholder {
179
+ color: var(--dt-text-muted);
180
+ font-weight: 600;
181
+ letter-spacing: 0.04em;
182
+ }
183
+ `.trim();const pv="dt-theme";function lq(e){return e==="dark"?"dark":"light"}function uq(){let e=document.getElementById(pv);return e||(e=document.createElement("style"),e.id=pv,document.head.appendChild(e)),e}function W6(e){const t=lq(e.theme),n=uq();n.parentElement===document.head&&n!==document.head.lastElementChild&&document.head.appendChild(n),n.textContent=aq({accentColor:e.accentColor,theme:t}),document.documentElement.dataset.theme=t}const oq="_shell_1jqjo_1",cq="_actionsBar_1jqjo_12",dq="_content_1jqjo_19",fq="_desktop_1jqjo_28",hq="_assistantPane_1jqjo_36",pq="_maximizedMask_1jqjo_42",Ns={shell:oq,actionsBar:cq,content:dq,desktop:fq,assistantPane:hq,maximizedMask:pq},mq=4,gq=.18,bq=.45,yq=.28,Eq="__assistant__",mv="dt-shell-form-controls",xq="[data-dt-shell]";function vq(e){return Math.min(Math.max(e,gq),bq)}function _q(e){const t=ut(n=>n.setDesktopBounds);R.useEffect(()=>{const n=e.current;if(!n)return;const i=new ResizeObserver(s=>{for(const l of s){const{width:o,height:d}=l.contentRect;t({x:0,y:0,width:o,height:d})}});return i.observe(n),t({x:0,y:0,width:n.clientWidth,height:n.clientHeight}),()=>i.disconnect()},[e,t])}function Tq({themePreferences:e}){const{status:t,socket:n,retryInSeconds:i}=dU(),s=t==="connected",l=ut($=>$.windows),o=ut($=>$.tree),d=ut($=>$.fullscreenWindowId),h=ut($=>$.setWindowActions),f=ai($=>$.isDragging),[m,b]=R.useState([]),[x,E]=R.useState([]),[T,w]=R.useState(yq),{actionHandlersRef:S,buildClientActions:k}=TU(n),F=R.useRef(null);_q(F),SU(),_U(),R.useEffect(()=>{let $=document.getElementById(mv);return $||($=document.createElement("style"),$.id=mv,document.head.appendChild($)),$.textContent=sq.replaceAll('input[type="',`${xq} input[type="`),()=>{$?.remove()}},[]),su("blur",()=>{requestAnimationFrame(()=>{const $=document.activeElement;if(!$||$.tagName!=="IFRAME")return;const Y=$.closest("[data-window-id]");if(!Y)return;const _e=Y.dataset.windowId;if(!_e)return;const oe=ut.getState();oe.focusedWindowId!==_e&&oe.focusWindow(_e)})});const H=new Map(l.map($=>[$.id,$])),V=d?H.get(d):void 0,J=1-T,j={gridTemplateColumns:`minmax(0, ${J}fr) ${mq}px minmax(0, ${T}fr)`},ne={id:Eq,miniAppId:"assistant",title:"AI Assistant",position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!1,zIndex:1},Z=R.useCallback(async()=>{try{const $=await or.get("/api/liveapps");E($.data)}catch($){console.error("[shell] Could not load LiveApps:",$)}},[]);R.useEffect(()=>{let $=!1;return(async()=>{try{const Y=await or.get("/api/miniapps");$||b(Y.data)}catch(Y){console.error("[shell] Could not load MiniApps:",Y)}try{const Y=await or.get("/api/liveapps");$||E(Y.data)}catch(Y){console.error("[shell] Could not load LiveApps:",Y)}})(),()=>{$=!0}},[]),su("desktalk:event",$=>{$.detail?.event==="liveapps.changed"&&Z()});const fe=[...m.map($=>({id:`miniapp:${$.id}`,name:$.name,icon:$.icon,iconPng:$.iconPng,kind:"miniapp",miniAppId:$.id})),...x.map($=>({id:`liveapp:${$.id}`,name:$.name,icon:$.icon,iconPng:$.iconPng,kind:"liveapp",miniAppId:"preview",args:{path:$.path,liveAppId:$.id}}))].sort(($,Y)=>$.name.localeCompare(Y.name));su("desktalk:actions-changed",$=>{const Y=$;if(!Y.detail?.windowId)return;const _e=Y.detail.actions??[];S.current.set(Y.detail.windowId,new Map(_e.map(oe=>[oe.name,oe.handler]))),BC(Y.detail.windowId,_e.map(oe=>({name:oe.name,description:oe.description,params:oe.params}))),h(Y.detail.windowId,k(Y.detail.windowId,_e))}),su("desktalk:open-window",$=>{const{miniAppId:Y,args:_e}=$.detail;Y&&(async()=>{try{await or.post(`/api/miniapps/${encodeURIComponent(Y)}/activate`,{args:_e});const le=m.find(I=>I.id===Y)?.name??Y;ut.getState().openWindow(Y,le,_e)}catch(oe){console.error("[shell] Could not open MiniApp window:",oe)}})()});const z=R.useCallback(async $=>{try{const Y=$.kind==="liveapp"?{...$.args??{},bridgeToken:crypto.randomUUID()}:$.args;await or.post(`/api/miniapps/${encodeURIComponent($.miniAppId)}/activate`,{args:Y}),ut.getState().openWindow($.miniAppId,$.name,Y)}catch(Y){console.error("[shell] Could not launch application:",Y)}},[]);return v.jsxs("div",{className:Ns.shell,"data-dt-shell":!0,children:[v.jsx(f4,{status:t,retryInSeconds:i}),v.jsx("div",{className:Ns.actionsBar,children:v.jsx(s4,{apps:fe,onLaunch:z})}),v.jsxs("div",{className:Ns.content,style:j,children:[v.jsxs("div",{ref:F,className:Ns.desktop,children:[s?o&&v.jsx(Kp,{node:o,windowsById:H,themePreferences:e,canDrag:o.type==="container"}):null,f&&v.jsx(_4,{desktopRef:F})]}),v.jsx(e_,{path:[],split:"horizontal",ratio:J,onRatioChange:$=>{w(vq(1-$))}}),v.jsx("div",{className:Ns.assistantPane,children:v.jsx(b6,{window:ne,title:"AI Assistant",showCloseButton:!1,showFullscreenButton:!1,children:v.jsx(PH,{socket:n,wsReady:s})})}),V&&v.jsx("div",{className:Ns.maximizedMask}),V&&v.jsx(ZH,{socket:n,wsReady:s})]})]})}const Aq="_page_1nc9w_1",Sq="_logo_1nc9w_10",wq="_form_1nc9w_17",kq="_field_1nc9w_24",Cq="_label_1nc9w_30",Nq="_input_1nc9w_38",Rq="_error_1nc9w_56",kr={page:Aq,logo:Sq,form:wq,field:kq,label:Cq,input:Nq,error:Rq},Oq="_modal_2xb7m_1",Mq="_small_2xb7m_13",Lq="_medium_2xb7m_17",Dq="_large_2xb7m_21",up={modal:Oq,small:Mq,medium:Lq,large:Dq};function X6({children:e,className:t="",size:n="medium"}){const i=up[n]??up.medium,s=`${up.modal} ${i} ${t}`.trim();return v.jsx("div",{className:s,children:e})}function Iq({onLoginSuccess:e}){const[t,n]=R.useState(""),[i,s]=R.useState(""),[l,o]=R.useState(""),[d,h]=R.useState(!1);async function f(m){m.preventDefault(),o(""),h(!0);try{await or.post("/api/auth/login",{username:t,password:i}),e()}catch(b){o(t_(b,"Network error. Please try again."))}finally{h(!1)}}return v.jsx("div",{className:kr.page,children:v.jsxs(X6,{size:"small",children:[v.jsx("h1",{className:kr.logo,children:"DeskTalk"}),v.jsxs("form",{className:kr.form,onSubmit:f,children:[v.jsxs("div",{className:kr.field,children:[v.jsx("label",{className:kr.label,htmlFor:"login-username",children:"Username"}),v.jsx("input",{id:"login-username",className:kr.input,type:"text",placeholder:"Enter your username",autoComplete:"username",autoFocus:!0,value:t,onChange:m=>n(m.target.value),disabled:d})]}),v.jsxs("div",{className:kr.field,children:[v.jsx("label",{className:kr.label,htmlFor:"login-password",children:"Password"}),v.jsx("input",{id:"login-password",className:kr.input,type:"password",placeholder:"Enter your password",autoComplete:"current-password",value:i,onChange:m=>s(m.target.value),disabled:d})]}),v.jsx("div",{className:kr.error,children:l}),v.jsx("dt-button",{variant:"primary",disabled:d||!t||!i,type:"submit",fullwidth:!0,children:d?"Signing in...":"Sign In"})]})]})})}const Bq="_page_1q807_1",zq="_header_1q807_10",Pq="_title_1q807_14",Hq="_subtitle_1q807_21",Uq="_stepIndicator_1q807_26",jq="_dot_1q807_32",Fq="_dotActive_1q807_40 _dot_1q807_32",$q="_dotCompleted_1q807_45 _dot_1q807_32",qq="_body_1q807_50",Yq="_providerList_1q807_56",Vq="_providerCard_1q807_62",Gq="_providerCardBody_1q807_71",Wq="_providerCardHeader_1q807_77",Xq="_providerCardTitleRow_1q807_84",Qq="_providerCardTitle_1q807_84",Kq="_providerCardActions_1q807_96",Zq="_providerActionButtonWrap_1q807_104",Jq="_providerSelectWrap_1q807_113",eY="_providerFieldGrid_1q807_122",tY="_field_1q807_128",nY="_label_1q807_134",rY="_input_1q807_142",iY="_footer_1q807_161",aY="_error_1q807_167",sY="_welcomeText_1q807_174",lY="_hintText_1q807_181",uY="_doneText_1q807_189",oY="_footerActions_1q807_196",he={page:Bq,header:zq,title:Pq,subtitle:Hq,stepIndicator:Uq,dot:jq,dotActive:Fq,dotCompleted:$q,body:qq,providerList:Yq,providerCard:Vq,providerCardBody:Gq,providerCardHeader:Wq,providerCardTitleRow:Xq,providerCardTitle:Qq,providerCardActions:Kq,providerActionButtonWrap:Zq,providerSelectWrap:Jq,providerFieldGrid:eY,field:tY,label:nY,input:rY,footer:iY,error:aY,welcomeText:sY,hintText:lY,doneText:uY,footerActions:oY},Fc=["welcome","account","aiConfig","voiceConfig","done"],Q6={provider:"openai"};function gv(e=Q6.provider){return{provider:e,apiKey:"",model:"",baseUrl:""}}const K6={provider:"openai-whisper"};function bv(e=K6.provider){return e==="azure-openai-whisper"?{provider:e,apiKey:"",model:"",baseUrl:"",azureDeployment:"",azureApiVersion:"2024-06-01"}:{provider:e,apiKey:"",model:"whisper-1",baseUrl:"https://api.openai.com/v1",azureDeployment:"",azureApiVersion:"2024-06-01"}}const cY=Hu((e,t)=>({step:"welcome",stepIndex:0,username:"",displayName:"",password:"",confirmPassword:"",aiProviders:[gv()],voiceProviders:[bv()],error:"",loading:!1,goNext(){const{stepIndex:n}=t(),i=n+1;i<Fc.length&&e({step:Fc[i],stepIndex:i,error:""})},goBack(){const{stepIndex:n}=t(),i=n-1;i>=0&&e({step:Fc[i],stepIndex:i,error:""})},setUsername:n=>e({username:n}),setDisplayName:n=>e({displayName:n}),setPassword:n=>e({password:n}),setConfirmPassword:n=>e({confirmPassword:n}),addAiProvider:(n=Q6.provider)=>e(i=>i.aiProviders.some(s=>s.provider===n)?i:{aiProviders:[...i.aiProviders,gv(n)]}),removeAiProvider:n=>e(i=>i.aiProviders.length===1?i:{aiProviders:i.aiProviders.filter(s=>s.provider!==n)}),setDefaultAiProvider:n=>e(i=>{const s=i.aiProviders.filter(o=>o.provider!==n),l=i.aiProviders.find(o=>o.provider===n);return l?{aiProviders:[l,...s]}:i}),updateAiProvider:(n,i,s)=>e(l=>({aiProviders:l.aiProviders.map(o=>o.provider===n?{...o,[i]:s}:o)})),addVoiceProvider:(n=K6.provider)=>e(i=>i.voiceProviders.some(s=>s.provider===n)?i:{voiceProviders:[...i.voiceProviders,bv(n)]}),removeVoiceProvider:n=>e(i=>i.voiceProviders.length===1?i:{voiceProviders:i.voiceProviders.filter(s=>s.provider!==n)}),setDefaultVoiceProvider:n=>e(i=>{const s=i.voiceProviders.filter(o=>o.provider!==n),l=i.voiceProviders.find(o=>o.provider===n);return l?{voiceProviders:[l,...s]}:i}),updateVoiceProvider:(n,i,s)=>e(l=>({voiceProviders:l.voiceProviders.map(o=>o.provider===n?{...o,[i]:s}:o)})),validateAccount(){const{username:n,displayName:i,password:s,confirmPassword:l}=t();return n.trim()?/^[a-zA-Z0-9_-]{1,32}$/.test(n)?i.trim()?s.length<8?(e({error:"Password must be at least 8 characters."}),!1):s!==l?(e({error:"Passwords do not match."}),!1):!0:(e({error:"Display name is required."}),!1):(e({error:"Username must be 1-32 alphanumeric characters, hyphens, or underscores."}),!1):(e({error:"Username is required."}),!1)},async submit(n){const{username:i,displayName:s,password:l,aiProviders:o,voiceProviders:d}=t();e({error:"",loading:!0});try{const h={username:i.trim(),displayName:s.trim(),password:l},f=o.map(E=>({provider:E.provider,apiKey:E.apiKey.trim(),model:E.model.trim(),baseUrl:E.baseUrl.trim()}));f.some(E=>E.apiKey||E.model||E.baseUrl||E.provider!=="openai")&&(h.aiConfig={defaultProvider:f[0]?.provider??"openai",providers:f.map(E=>({provider:E.provider,apiKey:E.apiKey||void 0,model:E.model||void 0,baseUrl:E.baseUrl||void 0}))});const b=d.map(E=>({provider:E.provider,apiKey:E.apiKey.trim(),model:E.model.trim(),baseUrl:E.baseUrl.trim(),azureDeployment:E.azureDeployment.trim(),azureApiVersion:E.azureApiVersion.trim()}));b.some(E=>E.apiKey||E.model||E.baseUrl||E.azureDeployment||E.azureApiVersion!=="2024-06-01"||E.provider!=="openai-whisper")&&(h.voiceConfig={defaultProvider:b[0]?.provider??"openai-whisper",providers:b.map(E=>({provider:E.provider,apiKey:E.apiKey||void 0,model:E.model||void 0,baseUrl:E.baseUrl||void 0,azureDeployment:E.azureDeployment||void 0,azureApiVersion:E.azureApiVersion||void 0}))}),await or.post("/api/setup",h),n()}catch(h){e({error:t_(h,"Network error. Please try again.")})}finally{e({loading:!1})}}})),Nc=[{id:"openai",label:"OpenAI",supportsBaseUrl:!0},{id:"anthropic",label:"Anthropic",supportsBaseUrl:!1},{id:"google",label:"Google Gemini",supportsBaseUrl:!1},{id:"azure-openai-responses",label:"Azure OpenAI",supportsBaseUrl:!0},{id:"mistral",label:"Mistral",supportsBaseUrl:!0},{id:"groq",label:"Groq",supportsBaseUrl:!0},{id:"xai",label:"xAI",supportsBaseUrl:!0},{id:"openrouter",label:"OpenRouter",supportsBaseUrl:!0},{id:"ollama",label:"Ollama",supportsBaseUrl:!0}],Rc=[{id:"openai-whisper",label:"OpenAI Whisper",supportsModel:!0,supportsBaseUrl:!0,supportsAzureDeployment:!1,supportsAzureApiVersion:!1},{id:"azure-openai-whisper",label:"Azure OpenAI Whisper",supportsModel:!1,supportsBaseUrl:!0,supportsAzureDeployment:!0,supportsAzureApiVersion:!0}];function dY({onComplete:e}){const t=cY();function n(){return v.jsx("div",{className:he.stepIndicator,children:Fc.map((f,m)=>{let b=he.dot;return m===t.stepIndex?b=he.dotActive:m<t.stepIndex&&(b=he.dotCompleted),v.jsx("div",{className:b},f)})})}function i(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"Welcome to DeskTalk"}),v.jsx("p",{className:he.subtitle,children:"Let's create your admin account"})]}),v.jsx("div",{className:he.body,children:v.jsx("p",{className:he.welcomeText,children:"DeskTalk is a browser-based desktop environment with an AI assistant and modular MiniApps. Since this is the first time running DeskTalk, you'll need to create an administrator account."})}),v.jsxs("div",{className:he.footer,children:[v.jsx("span",{}),v.jsx("dt-button",{variant:"primary",onClick:t.goNext,children:"Get Started"})]})]})}function s(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"Create Admin Account"}),v.jsx("p",{className:he.subtitle,children:"Choose your credentials"})]}),v.jsxs("div",{className:he.body,children:[v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-username",children:"Username"}),v.jsx("input",{id:"onboard-username",className:he.input,type:"text",placeholder:"e.g. admin",autoComplete:"username",value:t.username,onChange:f=>t.setUsername(f.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-displayname",children:"Display Name"}),v.jsx("input",{id:"onboard-displayname",className:he.input,type:"text",placeholder:"Your display name",autoComplete:"name",value:t.displayName,onChange:f=>t.setDisplayName(f.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-password",children:"Password"}),v.jsx("input",{id:"onboard-password",className:he.input,type:"password",placeholder:"At least 8 characters",autoComplete:"new-password",value:t.password,onChange:f=>t.setPassword(f.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:"onboard-confirm",children:"Confirm Password"}),v.jsx("input",{id:"onboard-confirm",className:he.input,type:"password",placeholder:"Re-enter your password",autoComplete:"new-password",value:t.confirmPassword,onChange:f=>t.setConfirmPassword(f.target.value)})]}),v.jsx("div",{className:he.error,children:t.error})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsx("dt-button",{variant:"primary",onClick:()=>{t.validateAccount()&&t.goNext()},disabled:!t.username||!t.displayName||!t.password||!t.confirmPassword,children:"Next"})]})]})}function l(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"AI Configuration"}),v.jsx("p",{className:he.subtitle,children:"Configure your AI provider (optional)"})]}),v.jsxs("div",{className:he.body,children:[v.jsx("p",{className:he.hintText,children:"Set up an AI provider so DeskTalk's assistant is ready to use. You can change these settings later in Preferences."}),v.jsx("div",{className:he.providerList,children:t.aiProviders.map((f,m)=>{const b=Nc.find(E=>E.id===f.provider),x=Nc.filter(E=>E.id===f.provider||!t.aiProviders.some(T=>T.provider===E.id));return v.jsx("div",{className:he.providerCard,children:v.jsx("dt-card",{variant:"outlined",children:v.jsxs("div",{className:he.providerCardBody,children:[v.jsxs("div",{className:he.providerCardHeader,children:[v.jsxs("div",{className:he.providerCardTitleRow,children:[v.jsx("div",{className:he.providerCardTitle,children:b?.label??f.provider}),m===0&&v.jsx("dt-badge",{variant:"default",children:"Default"})]}),v.jsxs("div",{className:he.providerCardActions,children:[v.jsx("dt-button",{onClick:()=>t.setDefaultAiProvider(f.provider),disabled:m===0,variant:"secondary",size:"sm",children:"Set as default"}),v.jsx("dt-button",{onClick:()=>t.removeAiProvider(f.provider),disabled:t.aiProviders.length===1,variant:"danger",size:"sm",children:"Delete"})]})]}),v.jsxs("div",{className:he.providerFieldGrid,children:[v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-provider-${f.provider}`,children:"Provider"}),v.jsx(yv,{id:`onboard-ai-provider-${f.provider}`,value:f.provider,options:x.map(E=>({value:E.id,label:E.label})),onChange:E=>t.updateAiProvider(f.provider,"provider",E)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-apikey-${f.provider}`,children:"API Key"}),v.jsx("input",{id:`onboard-ai-apikey-${f.provider}`,className:he.input,type:"password",placeholder:"Enter your API key",autoComplete:"off",value:f.apiKey,onChange:E=>t.updateAiProvider(f.provider,"apiKey",E.target.value)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-model-${f.provider}`,children:"Model (optional)"}),v.jsx("input",{id:`onboard-ai-model-${f.provider}`,className:he.input,type:"text",placeholder:"e.g. gpt-4o",value:f.model,onChange:E=>t.updateAiProvider(f.provider,"model",E.target.value)})]}),b?.supportsBaseUrl&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-ai-baseurl-${f.provider}`,children:"Base URL (optional)"}),v.jsx("input",{id:`onboard-ai-baseurl-${f.provider}`,className:he.input,type:"text",placeholder:"Custom API endpoint",value:f.baseUrl,onChange:E=>t.updateAiProvider(f.provider,"baseUrl",E.target.value)})]})]})]})})},f.provider)})}),v.jsx("div",{className:he.providerActionButtonWrap,children:v.jsx("dt-button",{onClick:()=>{const f=Nc.find(m=>!t.aiProviders.some(b=>b.provider===m.id));f&&t.addAiProvider(f.id)},disabled:t.aiProviders.length>=Nc.length,variant:"secondary",children:"Add provider"})})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsxs("div",{className:he.footerActions,children:[v.jsx("dt-button",{variant:"ghost",onClick:t.goNext,children:"Skip"}),v.jsx("dt-button",{variant:"primary",onClick:t.goNext,children:"Next"})]})]})]})}function o(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"Voice Configuration"}),v.jsx("p",{className:he.subtitle,children:"Configure speech-to-text (optional)"})]}),v.jsxs("div",{className:he.body,children:[v.jsx("p",{className:he.hintText,children:"Set up a speech-to-text provider for voice input. You can change these settings later in Preferences."}),v.jsx("div",{className:he.providerList,children:t.voiceProviders.map((f,m)=>{const b=Rc.find(E=>E.id===f.provider),x=Rc.filter(E=>E.id===f.provider||!t.voiceProviders.some(T=>T.provider===E.id));return v.jsx("div",{className:he.providerCard,children:v.jsx("dt-card",{variant:"outlined",children:v.jsxs("div",{className:he.providerCardBody,children:[v.jsxs("div",{className:he.providerCardHeader,children:[v.jsxs("div",{className:he.providerCardTitleRow,children:[v.jsx("div",{className:he.providerCardTitle,children:b?.label??f.provider}),m===0&&v.jsx("dt-badge",{variant:"default",children:"Default"})]}),v.jsxs("div",{className:he.providerCardActions,children:[v.jsx("dt-button",{onClick:()=>t.setDefaultVoiceProvider(f.provider),disabled:m===0,variant:"secondary",size:"sm",children:"Set as default"}),v.jsx("dt-button",{onClick:()=>t.removeVoiceProvider(f.provider),disabled:t.voiceProviders.length===1,variant:"danger",size:"sm",children:"Delete"})]})]}),v.jsxs("div",{className:he.providerFieldGrid,children:[v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,children:"STT Provider"}),v.jsx(yv,{value:f.provider,options:x.map(E=>({value:E.id,label:E.label})),onChange:E=>t.updateVoiceProvider(f.provider,"provider",E)})]}),v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-apikey-${f.provider}`,children:"API Key"}),v.jsx("input",{id:`onboard-stt-apikey-${f.provider}`,className:he.input,type:"password",placeholder:"Enter your STT API key",autoComplete:"off",value:f.apiKey,onChange:E=>t.updateVoiceProvider(f.provider,"apiKey",E.target.value)})]}),b?.supportsModel&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-model-${f.provider}`,children:"Model"}),v.jsx("input",{id:`onboard-stt-model-${f.provider}`,className:he.input,type:"text",value:f.model,onChange:E=>t.updateVoiceProvider(f.provider,"model",E.target.value)})]}),b?.supportsBaseUrl&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-baseurl-${f.provider}`,children:"Base URL"}),v.jsx("input",{id:`onboard-stt-baseurl-${f.provider}`,className:he.input,type:"text",value:f.baseUrl,onChange:E=>t.updateVoiceProvider(f.provider,"baseUrl",E.target.value)})]}),b?.supportsAzureDeployment&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-deployment-${f.provider}`,children:"Azure Deployment"}),v.jsx("input",{id:`onboard-stt-deployment-${f.provider}`,className:he.input,type:"text",value:f.azureDeployment,onChange:E=>t.updateVoiceProvider(f.provider,"azureDeployment",E.target.value)})]}),b?.supportsAzureApiVersion&&v.jsxs("div",{className:he.field,children:[v.jsx("label",{className:he.label,htmlFor:`onboard-stt-api-version-${f.provider}`,children:"Azure API Version"}),v.jsx("input",{id:`onboard-stt-api-version-${f.provider}`,className:he.input,type:"text",value:f.azureApiVersion,onChange:E=>t.updateVoiceProvider(f.provider,"azureApiVersion",E.target.value)})]})]})]})})},f.provider)})}),v.jsx("div",{className:he.providerActionButtonWrap,children:v.jsx("dt-button",{onClick:()=>{const f=Rc.find(m=>!t.voiceProviders.some(b=>b.provider===m.id));f&&t.addVoiceProvider(f.id)},disabled:t.voiceProviders.length>=Rc.length,variant:"secondary",children:"Add provider"})})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsxs("div",{className:he.footerActions,children:[v.jsx("dt-button",{variant:"ghost",onClick:t.goNext,children:"Skip"}),v.jsx("dt-button",{variant:"primary",onClick:t.goNext,children:"Next"})]})]})]})}function d(){return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:he.header,children:[v.jsx("h1",{className:he.title,children:"All Set!"}),v.jsx("p",{className:he.subtitle,children:"Your admin account is ready"})]}),v.jsxs("div",{className:he.body,children:[v.jsxs("p",{className:he.doneText,children:["Welcome, ",t.displayName||t.username,". Click below to enter your DeskTalk desktop."]}),v.jsx("div",{className:he.error,children:t.error})]}),v.jsxs("div",{className:he.footer,children:[v.jsx("dt-button",{variant:"secondary",onClick:t.goBack,children:"Back"}),v.jsx("dt-button",{variant:"primary",onClick:()=>t.submit(e),disabled:t.loading,children:t.loading?"Setting up...":"Enter Desktop"})]})]})}const h={welcome:i,account:s,aiConfig:l,voiceConfig:o,done:d};return v.jsx("div",{className:he.page,children:v.jsxs(X6,{size:"medium",children:[n(),h[t.step]()]})})}function yv({id:e,value:t,options:n,disabled:i=!1,onChange:s}){return v.jsx("div",{className:he.providerSelectWrap,children:v.jsx("dt-select",{id:e,value:t,options:n,disabled:i,"ondt-change":l=>{s(l.detail.value)}})})}var fY=`.dt-tooltip-popup {
184
+ position: fixed;
185
+ z-index: 2147483647;
186
+ padding: 6px 10px;
187
+ border: 1px solid var(--dt-accent);
188
+ border-radius: 2px;
189
+ background: var(--dt-surface);
190
+ color: var(--dt-text-secondary);
191
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
192
+ font-size: 12px;
193
+ font-weight: 500;
194
+ line-height: 1.4;
195
+ white-space: nowrap;
196
+ pointer-events: none;
197
+ user-select: none;
198
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
199
+ }
200
+
201
+ /* Tech corner accents */
202
+ .dt-tooltip-popup::before {
203
+ content: '';
204
+ position: absolute;
205
+ top: -1px;
206
+ left: -1px;
207
+ width: 4px;
208
+ height: 4px;
209
+ border-top: 1px solid var(--dt-accent);
210
+ border-left: 1px solid var(--dt-accent);
211
+ }
212
+
213
+ .dt-tooltip-popup::after {
214
+ content: '';
215
+ position: absolute;
216
+ bottom: -1px;
217
+ right: -1px;
218
+ width: 4px;
219
+ height: 4px;
220
+ border-bottom: 1px solid var(--dt-accent);
221
+ border-right: 1px solid var(--dt-accent);
222
+ }
223
+
224
+ /* Arrow styling - tech/minimal */
225
+ .dt-tooltip-popup[data-actual-placement='top'] {
226
+ transform: translateX(-50%);
227
+ }
228
+
229
+ .dt-tooltip-popup[data-actual-placement='top']::before {
230
+ top: auto;
231
+ bottom: -4px;
232
+ left: 50%;
233
+ transform: translateX(-50%);
234
+ width: 0;
235
+ height: 0;
236
+ border: 4px solid transparent;
237
+ border-top-color: var(--dt-accent);
238
+ border-left: none;
239
+ border-right: none;
240
+ }
241
+
242
+ .dt-tooltip-popup[data-actual-placement='bottom'] {
243
+ transform: translateX(-50%);
244
+ }
245
+
246
+ .dt-tooltip-popup[data-actual-placement='bottom']::before {
247
+ bottom: auto;
248
+ top: -4px;
249
+ left: 50%;
250
+ transform: translateX(-50%);
251
+ width: 0;
252
+ height: 0;
253
+ border: 4px solid transparent;
254
+ border-bottom-color: var(--dt-accent);
255
+ border-left: none;
256
+ border-right: none;
257
+ }
258
+
259
+ .dt-tooltip-popup[data-actual-placement='left'] {
260
+ transform: translateY(-50%);
261
+ }
262
+
263
+ .dt-tooltip-popup[data-actual-placement='left']::before {
264
+ left: auto;
265
+ top: 50%;
266
+ right: -4px;
267
+ transform: translateY(-50%);
268
+ width: 0;
269
+ height: 0;
270
+ border: 4px solid transparent;
271
+ border-left-color: var(--dt-accent);
272
+ border-top: none;
273
+ border-bottom: none;
274
+ }
275
+
276
+ .dt-tooltip-popup[data-actual-placement='right'] {
277
+ transform: translateY(-50%);
278
+ }
279
+
280
+ .dt-tooltip-popup[data-actual-placement='right']::before {
281
+ right: auto;
282
+ top: 50%;
283
+ left: -4px;
284
+ transform: translateY(-50%);
285
+ width: 0;
286
+ height: 0;
287
+ border: 4px solid transparent;
288
+ border-right-color: var(--dt-accent);
289
+ border-top: none;
290
+ border-bottom: none;
291
+ }
292
+ `,hY="dt-tooltip-popup",Hi=8,Ev=!1;function pY(){if(Ev)return;let e=document.createElement("style");e.setAttribute("data-dt-tooltip",""),e.textContent=fY,document.head.appendChild(e),Ev=!0}var mY=class extends HTMLElement{_popup=null;_showTimeout=null;_tooltipId="";_visible=!1;static get observedAttributes(){return["content","placement","delay","disabled"]}get content(){return this.getAttribute("content")??""}set content(e){this.setAttribute("content",e)}get placement(){let e=this.getAttribute("placement");return e==="bottom"||e==="left"||e==="right"?e:"top"}set placement(e){this.setAttribute("placement",e)}get delay(){let e=Number(this.getAttribute("delay"));return Number.isFinite(e)&&e>0?e:0}set delay(e){this.setAttribute("delay",String(e))}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML="<slot></slot>",this._tooltipId=`dt-tip-${Math.random().toString(36).slice(2,9)}`}connectedCallback(){pY(),this.addEventListener("mouseenter",this._onEnter),this.addEventListener("mouseleave",this._onLeave),this.addEventListener("focusin",this._onEnter),this.addEventListener("focusout",this._onLeave)}disconnectedCallback(){this.removeEventListener("mouseenter",this._onEnter),this.removeEventListener("mouseleave",this._onLeave),this.removeEventListener("focusin",this._onEnter),this.removeEventListener("focusout",this._onLeave),this._hide()}attributeChangedCallback(e,t,n){e==="disabled"&&this.disabled&&this._hide(),e==="content"&&this._popup&&(this._popup.textContent=this.content)}_onEnter=()=>{if(this.disabled||!this.content)return;this._showTimeout!==null&&clearTimeout(this._showTimeout);let e=()=>{this._createPopup(),this._position(),this._visible=!0};this.delay>0?this._showTimeout=setTimeout(e,this.delay):e()};_onLeave=()=>{this._hide()};_createPopup(){if(this._popup)return;let e=document.createElement("div");e.className=hY,e.id=this._tooltipId,e.setAttribute("role","tooltip"),e.textContent=this.content,document.body.appendChild(e),this._popup=e;let t=this._getTrigger();t&&t.setAttribute("aria-describedby",this._tooltipId)}_hide(){if(this._showTimeout!==null&&(clearTimeout(this._showTimeout),this._showTimeout=null),this._popup){let e=this._getTrigger();e&&e.removeAttribute("aria-describedby"),this._popup.remove(),this._popup=null,this._visible=!1}}_getTrigger(){let e=this.shadowRoot?.querySelector("slot")?.assignedElements();return e&&e.length>0?e[0]:null}_position(){let e=this._popup;if(!e)return;let t=this.getBoundingClientRect(),n=e.getBoundingClientRect(),i=window.innerWidth,s=window.innerHeight,l=this.placement;l==="top"&&t.top-n.height-Hi<0?l="bottom":l==="bottom"&&t.bottom+n.height+Hi>s?l="top":l==="left"&&t.left-n.width-Hi<0?l="right":l==="right"&&t.right+n.width+Hi>i&&(l="left"),e.setAttribute("data-actual-placement",l);let o,d;switch(l){case"top":d=t.left+t.width/2,o=t.top-n.height-Hi;break;case"bottom":d=t.left+t.width/2,o=t.bottom+Hi;break;case"left":d=t.left-n.width-Hi,o=t.top+t.height/2;break;case"right":d=t.right+Hi,o=t.top+t.height/2;break}e.style.left=`${d}px`,e.style.top=`${o}px`}},gY=`:host {
293
+ display: block;
294
+ margin-bottom: 12px;
295
+ }
296
+
297
+ .dt-card-inner {
298
+ background: var(--dt-surface);
299
+ border: 1px solid var(--dt-accent);
300
+ border-radius: 2px;
301
+ padding: 12px;
302
+ color: var(--dt-text);
303
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
304
+ position: relative;
305
+ height: 100%;
306
+ }
307
+
308
+ /* Corner accents for sci-fi feel */
309
+ .dt-card-inner::before {
310
+ content: '';
311
+ position: absolute;
312
+ top: -1px;
313
+ left: -1px;
314
+ width: 8px;
315
+ height: 8px;
316
+ border-top: 2px solid var(--dt-accent);
317
+ border-left: 2px solid var(--dt-accent);
318
+ }
319
+
320
+ .dt-card-inner::after {
321
+ content: '';
322
+ position: absolute;
323
+ bottom: -1px;
324
+ right: -1px;
325
+ width: 8px;
326
+ height: 8px;
327
+ border-bottom: 2px solid var(--dt-accent);
328
+ border-right: 2px solid var(--dt-accent);
329
+ }
330
+
331
+ :host([variant='outlined']) .dt-card-inner {
332
+ background: transparent;
333
+ border-style: dashed;
334
+ }
335
+
336
+ :host([variant='filled']) .dt-card-inner {
337
+ background: var(--dt-accent-subtle);
338
+ border-style: solid;
339
+ }
340
+
341
+ ::slotted(h1),
342
+ ::slotted(h2),
343
+ ::slotted(h3),
344
+ ::slotted(h4),
345
+ ::slotted(h5),
346
+ ::slotted(h6) {
347
+ color: var(--dt-accent);
348
+ margin: 0 0 6px;
349
+ line-height: 1.2;
350
+ font-family: var(--font-display, 'Sora', system-ui, sans-serif);
351
+ font-weight: 600;
352
+ text-transform: uppercase;
353
+ letter-spacing: 0.1em;
354
+ font-size: 0.85rem;
355
+ }
356
+
357
+ ::slotted(p) {
358
+ color: var(--dt-text-secondary);
359
+ margin: 0 0 6px;
360
+ line-height: 1.4;
361
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
362
+ font-size: 0.8125rem;
363
+ }
364
+
365
+ ::slotted(p:last-child) {
366
+ margin-bottom: 0;
367
+ }
368
+ `,bY="dt-card-inner",yY=class extends HTMLElement{static get observedAttributes(){return["variant"]}get variant(){let e=this.getAttribute("variant");return e==="outlined"||e==="filled"?e:"default"}set variant(e){this.setAttribute("variant",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=gY,e.appendChild(t);let n=document.createElement("div");n.className=bY,n.innerHTML="<slot></slot>",e.appendChild(n)}},EY=`.dt-select-menu {
369
+ position: fixed;
370
+ z-index: 2147483646;
371
+ display: flex;
372
+ min-width: 200px;
373
+ max-width: min(300px, 72vw);
374
+ max-height: 240px;
375
+ flex-direction: column;
376
+ overflow-y: auto;
377
+ border: 1px solid var(--dt-accent);
378
+ border-radius: 2px;
379
+ background: var(--dt-surface);
380
+ box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
381
+ opacity: 0;
382
+ pointer-events: none;
383
+ transition: opacity 100ms ease;
384
+ }
385
+
386
+ .dt-select-menu[data-open] {
387
+ opacity: 1;
388
+ pointer-events: auto;
389
+ }
390
+
391
+ .dt-select-option {
392
+ display: flex;
393
+ width: 100%;
394
+ align-items: center;
395
+ justify-content: space-between;
396
+ padding: 8px 10px;
397
+ border: 0;
398
+ border-bottom: 1px solid var(--dt-border-subtle);
399
+ background: transparent;
400
+ color: var(--dt-text);
401
+ font-family: var(
402
+ --font-mono,
403
+ 'SF Mono',
404
+ Monaco,
405
+ 'Cascadia Code',
406
+ 'Roboto Mono',
407
+ Consolas,
408
+ monospace
409
+ );
410
+ font-size: 0.8125rem;
411
+ font-weight: 600;
412
+ letter-spacing: 0.04em;
413
+ text-align: left;
414
+ cursor: pointer;
415
+ transition: all 0.1s ease;
416
+ user-select: none;
417
+ }
418
+
419
+ .dt-select-option:last-child {
420
+ border-bottom: none;
421
+ }
422
+
423
+ .dt-select-option:hover {
424
+ background: var(--dt-accent);
425
+ color: var(--dt-text-on-accent);
426
+ }
427
+
428
+ .dt-select-option.dt-select-option--active {
429
+ background: var(--dt-accent-subtle);
430
+ color: var(--dt-accent);
431
+ }
432
+
433
+ .dt-select-option span {
434
+ overflow: hidden;
435
+ text-overflow: ellipsis;
436
+ white-space: nowrap;
437
+ }
438
+ `,xY=`:host {
439
+ display: block;
440
+ width: 100%;
441
+ min-width: 0;
442
+ position: relative;
443
+ }
444
+
445
+ :host([disabled]) .dt-select-trigger {
446
+ cursor: not-allowed;
447
+ opacity: 0.4;
448
+ }
449
+
450
+ .dt-select-trigger {
451
+ display: flex;
452
+ width: 100%;
453
+ min-width: 0;
454
+ max-width: 100%;
455
+ box-sizing: border-box;
456
+ align-items: center;
457
+ gap: 6px;
458
+ padding: 6px 10px;
459
+ border: 1px solid var(--dt-accent);
460
+ border-radius: 2px;
461
+ background: var(--dt-surface);
462
+ color: var(--dt-text);
463
+ font-family: var(
464
+ --font-mono,
465
+ 'SF Mono',
466
+ Monaco,
467
+ 'Cascadia Code',
468
+ 'Roboto Mono',
469
+ Consolas,
470
+ monospace
471
+ );
472
+ font-size: 0.8125rem;
473
+ font-weight: 600;
474
+ letter-spacing: 0.04em;
475
+ line-height: 1;
476
+ cursor: pointer;
477
+ transition: all 0.1s ease;
478
+ user-select: none;
479
+ position: relative;
480
+ }
481
+
482
+ /* Corner accents */
483
+ .dt-select-trigger::before {
484
+ content: '';
485
+ position: absolute;
486
+ top: 0;
487
+ left: 0;
488
+ width: 4px;
489
+ height: 4px;
490
+ border-top: 1px solid var(--dt-accent);
491
+ border-left: 1px solid var(--dt-accent);
492
+ }
493
+
494
+ .dt-select-trigger::after {
495
+ content: '';
496
+ position: absolute;
497
+ bottom: 0;
498
+ right: 0;
499
+ width: 4px;
500
+ height: 4px;
501
+ border-bottom: 1px solid var(--dt-accent);
502
+ border-right: 1px solid var(--dt-accent);
503
+ }
504
+
505
+ .dt-select-trigger:hover:not([disabled]) {
506
+ background: var(--dt-accent);
507
+ color: var(--dt-text-on-accent);
508
+ }
509
+
510
+ .dt-select-trigger:hover:not([disabled])::before,
511
+ .dt-select-trigger:hover:not([disabled])::after {
512
+ border-color: var(--dt-text-on-accent);
513
+ }
514
+
515
+ .dt-select-trigger[aria-expanded='true'] {
516
+ background: var(--dt-accent);
517
+ color: var(--dt-text-on-accent);
518
+ }
519
+
520
+ .dt-select-trigger[aria-expanded='true']::before,
521
+ .dt-select-trigger[aria-expanded='true']::after {
522
+ border-color: var(--dt-text-on-accent);
523
+ }
524
+
525
+ .dt-select-label {
526
+ overflow: hidden;
527
+ text-overflow: ellipsis;
528
+ white-space: nowrap;
529
+ }
530
+
531
+ .dt-select-chevron {
532
+ color: currentColor;
533
+ font-size: 10px;
534
+ transition: transform 140ms ease;
535
+ opacity: 0.7;
536
+ }
537
+
538
+ .dt-select-trigger[aria-expanded='true'] .dt-select-chevron {
539
+ transform: rotate(180deg);
540
+ }
541
+ `,vY="dt-select-trigger",xv="dt-select-label",_Y="dt-select-chevron",TY="dt-select-menu",AY="dt-select-option",SY="dt-select-option--active",vv=!1;function wY(){if(vv)return;let e=document.createElement("style");e.setAttribute("data-dt-select",""),e.textContent=EY,document.head.appendChild(e),vv=!0}var kY=class extends HTMLElement{_menu=null;_trigger=null;_options=[];_open=!1;_menuId="";static get observedAttributes(){return["value","placeholder","disabled","align"]}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}get placeholder(){return this.getAttribute("placeholder")??"Select…"}set placeholder(e){this.setAttribute("placeholder",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get align(){return this.getAttribute("align")==="right"?"right":"left"}set align(e){this.setAttribute("align",e)}get options(){return this._options}set options(e){this._options=e,this._updateLabel(),this._open&&this._renderMenuItems()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=xY,e.appendChild(t);let n=document.createElement("button");n.type="button",n.className=vY,n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-expanded","false");let i=document.createElement("span");i.className=xv,n.appendChild(i);let s=document.createElement("span");s.className=_Y,s.setAttribute("aria-hidden","true"),s.textContent="▾",n.appendChild(s),e.appendChild(n),this._trigger=n,this._menuId=`dt-sel-${Math.random().toString(36).slice(2,9)}`}connectedCallback(){wY(),this._trigger.addEventListener("click",this._onTriggerClick),this._updateLabel()}disconnectedCallback(){this._trigger.removeEventListener("click",this._onTriggerClick),this._close()}attributeChangedCallback(e){e==="value"&&(this._updateLabel(),this._open&&this._renderMenuItems()),e==="placeholder"&&!this.value&&this._updateLabel(),e==="disabled"&&this.disabled&&this._close()}_updateLabel(){let e=this._trigger.querySelector(`.${xv}`),t=this._options.find(n=>n.value===this.value);e.textContent=t?.label??this.placeholder}_onTriggerClick=()=>{this.disabled||(this._open?this._close():this._openMenu())};_openMenu(){if(this._open)return;let e=document.createElement("div");e.className=TY,e.id=this._menuId,e.setAttribute("role","listbox"),document.body.appendChild(e),this._menu=e,this._renderMenuItems(),this._position(),requestAnimationFrame(()=>{e.setAttribute("data-open","")}),this._open=!0,this._trigger.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{document.addEventListener("mousedown",this._onOutsideClick),document.addEventListener("keydown",this._onKeyDown)})}_close(){if(this._open){if(document.removeEventListener("mousedown",this._onOutsideClick),document.removeEventListener("keydown",this._onKeyDown),this._menu){this._menu.removeAttribute("data-open");let e=this._menu;setTimeout(()=>e.remove(),140),this._menu=null}this._open=!1,this._trigger.setAttribute("aria-expanded","false")}}_onOutsideClick=e=>{let t=e.target;this._menu?.contains(t)||this.contains(t)||this._close()};_onKeyDown=e=>{e.key==="Escape"&&(this._close(),this._trigger.focus())};_renderMenuItems(){let e=this._menu;if(e){e.innerHTML="";for(let t of this._options){let n=document.createElement("button");n.type="button",n.className=AY,n.setAttribute("role","option"),n.setAttribute("aria-selected",String(t.value===this.value)),t.value===this.value&&n.classList.add(SY);let i=document.createElement("span");i.textContent=t.label,n.appendChild(i),n.addEventListener("click",()=>{this._selectValue(t.value)}),e.appendChild(n)}}}_selectValue(e){let t=this.value;this.value=e,this._updateLabel(),this._close(),e!==t&&this.dispatchEvent(new CustomEvent("dt-change",{detail:{value:e},bubbles:!0,composed:!0}))}_position(){let e=this._menu;if(!e)return;let t=this.getBoundingClientRect(),n=10,i=Math.max(t.width,240),s=t.bottom+n,l=e.scrollHeight||260,o=window.innerHeight;if(s+l>o&&t.top-l-n>0&&(s=t.top-l-n),e.style.minWidth=`${i}px`,this.align==="right"){let d=window.innerWidth;e.style.right=`${d-t.right}px`,e.style.left="auto"}else e.style.left=`${t.left}px`,e.style.right="auto";e.style.top=`${s}px`}},CY=`:host {
542
+ display: block;
543
+ margin-bottom: 12px;
544
+ }
545
+
546
+ .dt-grid-inner {
547
+ display: grid;
548
+ gap: var(--grid-gap, 12px);
549
+ grid-template-columns: repeat(auto-fit, minmax(var(--min-width, 220px), 1fr));
550
+ }
551
+
552
+ :host([cols='1']) .dt-grid-inner {
553
+ grid-template-columns: repeat(1, 1fr);
554
+ }
555
+
556
+ :host([cols='2']) .dt-grid-inner {
557
+ grid-template-columns: repeat(2, 1fr);
558
+ }
559
+
560
+ :host([cols='3']) .dt-grid-inner {
561
+ grid-template-columns: repeat(3, 1fr);
562
+ }
563
+
564
+ :host([cols='4']) .dt-grid-inner {
565
+ grid-template-columns: repeat(4, 1fr);
566
+ }
567
+
568
+ :host([cols='5']) .dt-grid-inner {
569
+ grid-template-columns: repeat(5, 1fr);
570
+ }
571
+
572
+ :host([cols='6']) .dt-grid-inner {
573
+ grid-template-columns: repeat(6, 1fr);
574
+ }
575
+
576
+ @media (max-width: 480px) {
577
+ :host([cols='2']) .dt-grid-inner,
578
+ :host([cols='3']) .dt-grid-inner,
579
+ :host([cols='4']) .dt-grid-inner,
580
+ :host([cols='5']) .dt-grid-inner,
581
+ :host([cols='6']) .dt-grid-inner {
582
+ grid-template-columns: 1fr;
583
+ }
584
+ }
585
+
586
+ :host([gap='0']) .dt-grid-inner {
587
+ --grid-gap: 0;
588
+ }
589
+ :host([gap='4']) .dt-grid-inner {
590
+ --grid-gap: 4px;
591
+ }
592
+ :host([gap='8']) .dt-grid-inner {
593
+ --grid-gap: 8px;
594
+ }
595
+ :host([gap='12']) .dt-grid-inner {
596
+ --grid-gap: 12px;
597
+ }
598
+ :host([gap='16']) .dt-grid-inner {
599
+ --grid-gap: 16px;
600
+ }
601
+ :host([gap='20']) .dt-grid-inner {
602
+ --grid-gap: 20px;
603
+ }
604
+ :host([gap='24']) .dt-grid-inner {
605
+ --grid-gap: 24px;
606
+ }
607
+ :host([gap='32']) .dt-grid-inner {
608
+ --grid-gap: 32px;
609
+ }
610
+
611
+ :host([min-width='150']) .dt-grid-inner {
612
+ --min-width: 150px;
613
+ }
614
+ :host([min-width='180']) .dt-grid-inner {
615
+ --min-width: 180px;
616
+ }
617
+ :host([min-width='200']) .dt-grid-inner {
618
+ --min-width: 200px;
619
+ }
620
+ :host([min-width='220']) .dt-grid-inner {
621
+ --min-width: 220px;
622
+ }
623
+ :host([min-width='260']) .dt-grid-inner {
624
+ --min-width: 260px;
625
+ }
626
+ :host([min-width='300']) .dt-grid-inner {
627
+ --min-width: 300px;
628
+ }
629
+
630
+ ::slotted(*) {
631
+ min-width: 0;
632
+ }
633
+ `,NY="dt-grid-inner",RY=class extends HTMLElement{static get observedAttributes(){return["cols","gap","min-width"]}get cols(){let e=this.getAttribute("cols");return e==="1"||e==="2"||e==="3"||e==="4"||e==="5"||e==="6"?e:null}set cols(e){e===null?this.removeAttribute("cols"):this.setAttribute("cols",e)}get gap(){let e=this.getAttribute("gap");return e==="0"||e==="4"||e==="8"||e==="12"||e==="20"||e==="24"||e==="32"?e:"16"}set gap(e){this.setAttribute("gap",e)}get minWidth(){let e=this.getAttribute("min-width");return e==="150"||e==="180"||e==="200"||e==="260"||e==="300"?e:"220"}set minWidth(e){this.setAttribute("min-width",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=CY,e.appendChild(t);let n=document.createElement("div");n.className=NY,n.innerHTML="<slot></slot>",e.appendChild(n)}},OY=`:host {
634
+ display: block;
635
+ margin-bottom: 12px;
636
+ }
637
+
638
+ .dt-stack-inner {
639
+ display: flex;
640
+ flex-direction: var(--flex-direction, column);
641
+ gap: var(--stack-gap, 12px);
642
+ align-items: var(--align-items, stretch);
643
+ }
644
+
645
+ :host([direction='column']) .dt-stack-inner {
646
+ --flex-direction: column;
647
+ }
648
+ :host([direction='row']) .dt-stack-inner {
649
+ --flex-direction: row;
650
+ }
651
+
652
+ :host([gap='0']) .dt-stack-inner {
653
+ --stack-gap: 0;
654
+ }
655
+ :host([gap='4']) .dt-stack-inner {
656
+ --stack-gap: 4px;
657
+ }
658
+ :host([gap='8']) .dt-stack-inner {
659
+ --stack-gap: 8px;
660
+ }
661
+ :host([gap='12']) .dt-stack-inner {
662
+ --stack-gap: 12px;
663
+ }
664
+ :host([gap='16']) .dt-stack-inner {
665
+ --stack-gap: 16px;
666
+ }
667
+ :host([gap='20']) .dt-stack-inner {
668
+ --stack-gap: 20px;
669
+ }
670
+ :host([gap='24']) .dt-stack-inner {
671
+ --stack-gap: 24px;
672
+ }
673
+ :host([gap='32']) .dt-stack-inner {
674
+ --stack-gap: 32px;
675
+ }
676
+
677
+ :host([align='start']) .dt-stack-inner {
678
+ --align-items: flex-start;
679
+ }
680
+ :host([align='center']) .dt-stack-inner {
681
+ --align-items: center;
682
+ }
683
+ :host([align='end']) .dt-stack-inner {
684
+ --align-items: flex-end;
685
+ }
686
+ :host([align='stretch']) .dt-stack-inner {
687
+ --align-items: stretch;
688
+ }
689
+
690
+ @media (max-width: 480px) {
691
+ :host([direction='row']) .dt-stack-inner {
692
+ --flex-direction: column;
693
+ }
694
+ }
695
+
696
+ ::slotted(*) {
697
+ min-width: 0;
698
+ }
699
+ `,MY="dt-stack-inner";function op(e){return e==="row"||e==="horizontal"?"row":"column"}var LY=class extends HTMLElement{static get observedAttributes(){return["direction","gap","align"]}get direction(){return op(this.getAttribute("direction"))}set direction(e){this.setAttribute("direction",op(e))}get gap(){let e=this.getAttribute("gap");return e==="0"||e==="4"||e==="8"||e==="12"||e==="20"||e==="24"||e==="32"?e:"16"}set gap(e){this.setAttribute("gap",e)}get align(){let e=this.getAttribute("align");return e==="start"||e==="center"||e==="end"?e:"stretch"}set align(e){this.setAttribute("align",e)}connectedCallback(){this.#e()}attributeChangedCallback(e){e==="direction"&&this.#e()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=OY,e.appendChild(t);let n=document.createElement("div");n.className=MY,n.innerHTML="<slot></slot>",e.appendChild(n)}#e(){let e=this.getAttribute("direction"),t=op(e);e!==null&&e!==t&&this.setAttribute("direction",t)}},DY=`:host {
700
+ display: block;
701
+ }
702
+
703
+ .dt-stat-inner {
704
+ background: var(--dt-surface);
705
+ border: 1px solid var(--dt-accent);
706
+ border-radius: 2px;
707
+ padding: 12px;
708
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
709
+ display: flex;
710
+ flex-direction: column;
711
+ gap: 4px;
712
+ position: relative;
713
+ }
714
+
715
+ /* Corner accents */
716
+ .dt-stat-inner::before {
717
+ content: '';
718
+ position: absolute;
719
+ top: 0;
720
+ left: 0;
721
+ width: 6px;
722
+ height: 6px;
723
+ border-top: 1px solid var(--dt-accent);
724
+ border-left: 1px solid var(--dt-accent);
725
+ }
726
+
727
+ .dt-stat-inner .label {
728
+ font-size: 0.625rem;
729
+ font-weight: 600;
730
+ color: var(--dt-text-muted);
731
+ text-transform: uppercase;
732
+ letter-spacing: 0.12em;
733
+ }
734
+
735
+ .dt-stat-inner .value {
736
+ font-size: 1.5rem;
737
+ font-weight: 600;
738
+ color: var(--dt-accent);
739
+ line-height: 1.1;
740
+ white-space: nowrap;
741
+ overflow: hidden;
742
+ text-overflow: ellipsis;
743
+ font-family: var(--font-display, 'Sora', system-ui, sans-serif);
744
+ }
745
+
746
+ .dt-stat-inner .description {
747
+ font-size: 0.75rem;
748
+ color: var(--dt-text-secondary);
749
+ line-height: 1.3;
750
+ }
751
+
752
+ /* Size variants */
753
+ :host([size='sm']) .dt-stat-inner .value {
754
+ font-size: 1.125rem;
755
+ }
756
+
757
+ :host([size='sm']) .dt-stat-inner {
758
+ padding: 8px;
759
+ }
760
+
761
+ :host([size='lg']) .dt-stat-inner .value {
762
+ font-size: 2rem;
763
+ }
764
+
765
+ :host([size='lg']) .dt-stat-inner {
766
+ padding: 16px;
767
+ }
768
+
769
+ /* Variant: outlined */
770
+ :host([variant='outlined']) .dt-stat-inner {
771
+ background: transparent;
772
+ border-style: dashed;
773
+ }
774
+
775
+ /* Variant: filled */
776
+ :host([variant='filled']) .dt-stat-inner {
777
+ background: var(--dt-accent-subtle);
778
+ border-style: solid;
779
+ }
780
+
781
+ /* Trend indicators */
782
+ .dt-stat-inner .trend {
783
+ display: inline-flex;
784
+ align-items: center;
785
+ gap: 3px;
786
+ font-size: 0.6875rem;
787
+ font-weight: 600;
788
+ margin-top: 2px;
789
+ text-transform: uppercase;
790
+ letter-spacing: 0.05em;
791
+ }
792
+
793
+ .dt-stat-inner .trend.positive {
794
+ color: var(--dt-success);
795
+ }
796
+
797
+ .dt-stat-inner .trend.negative {
798
+ color: var(--dt-danger);
799
+ }
800
+
801
+ .dt-stat-inner .trend.neutral {
802
+ color: var(--dt-text-muted);
803
+ }
804
+ `,IY="dt-stat-inner",BY=class extends HTMLElement{static get observedAttributes(){return["label","value","description","size","variant","trend","trend-value"]}_container;_labelEl;_valueEl;_descEl;_trendEl;get label(){return this.getAttribute("label")}set label(e){e===null?this.removeAttribute("label"):this.setAttribute("label",e)}get value(){return this.getAttribute("value")}set value(e){e===null?this.removeAttribute("value"):this.setAttribute("value",e)}get description(){return this.getAttribute("description")}set description(e){e===null?this.removeAttribute("description"):this.setAttribute("description",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get variant(){let e=this.getAttribute("variant");return e==="outlined"||e==="filled"?e:"default"}set variant(e){this.setAttribute("variant",e)}get trend(){let e=this.getAttribute("trend");return e==="up"||e==="down"||e==="neutral"?e:null}set trend(e){e===null?this.removeAttribute("trend"):this.setAttribute("trend",e)}get trendValue(){return this.getAttribute("trend-value")}set trendValue(e){e===null?this.removeAttribute("trend-value"):this.setAttribute("trend-value",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=DY,e.appendChild(t),this._container=document.createElement("div"),this._container.className=IY,this._labelEl=document.createElement("div"),this._labelEl.className="label",this._container.appendChild(this._labelEl),this._valueEl=document.createElement("div"),this._valueEl.className="value",this._container.appendChild(this._valueEl),this._descEl=document.createElement("div"),this._descEl.className="description",this._container.appendChild(this._descEl),this._trendEl=document.createElement("div"),this._trendEl.className="trend",this._container.appendChild(this._trendEl),e.appendChild(this._container),this._render()}attributeChangedCallback(e,t,n){(e==="label"||e==="value"||e==="description"||e==="size"||e==="variant"||e==="trend"||e==="trend-value")&&this._render()}_render(){this._labelEl.textContent=this.label??"",this._labelEl.style.display=this.label?"block":"none",this._valueEl.textContent=this.value??"",this._valueEl.style.display=this.value?"block":"none",this._descEl.textContent=this.description??"",this._descEl.style.display=this.description?"block":"none";let e=this.trend,t=this.trendValue;if(e&&t){this._trendEl.style.display="inline-flex",this._trendEl.className=`trend ${e==="up"?"positive":e==="down"?"negative":"neutral"}`;let n="";e==="up"?n="↑":e==="down"?n="↓":n="→",this._trendEl.textContent=`${n} ${t}`}else this._trendEl.style.display="none"}},zY=`:host {
805
+ display: inline-flex;
806
+ vertical-align: middle;
807
+ }
808
+
809
+ .dt-badge-inner {
810
+ display: inline-flex;
811
+ align-items: center;
812
+ padding: 2px 6px;
813
+ border: 1px solid;
814
+ border-radius: 2px;
815
+ font-size: 0.6875rem;
816
+ font-weight: 600;
817
+ font-family: var(
818
+ --font-mono,
819
+ 'SF Mono',
820
+ Monaco,
821
+ 'Cascadia Code',
822
+ 'Roboto Mono',
823
+ Consolas,
824
+ monospace
825
+ );
826
+ line-height: 1.2;
827
+ white-space: nowrap;
828
+ text-transform: uppercase;
829
+ letter-spacing: 0.1em;
830
+ }
831
+
832
+ /* Variant: accent (default) */
833
+ :host([variant='accent']) .dt-badge-inner,
834
+ .dt-badge-inner {
835
+ background: var(--dt-accent-subtle);
836
+ border-color: var(--dt-accent);
837
+ color: var(--dt-accent);
838
+ }
839
+
840
+ /* Variant: success */
841
+ :host([variant='success']) .dt-badge-inner {
842
+ background: var(--dt-success-subtle);
843
+ border-color: var(--dt-success);
844
+ color: var(--dt-success);
845
+ }
846
+
847
+ /* Variant: danger */
848
+ :host([variant='danger']) .dt-badge-inner {
849
+ background: var(--dt-danger-subtle);
850
+ border-color: var(--dt-danger);
851
+ color: var(--dt-danger);
852
+ }
853
+
854
+ /* Variant: warning */
855
+ :host([variant='warning']) .dt-badge-inner {
856
+ background: var(--dt-warning-subtle);
857
+ border-color: var(--dt-warning);
858
+ color: var(--dt-warning);
859
+ }
860
+
861
+ /* Variant: info */
862
+ :host([variant='info']) .dt-badge-inner {
863
+ background: var(--dt-info-subtle);
864
+ border-color: var(--dt-info);
865
+ color: var(--dt-info);
866
+ }
867
+
868
+ /* Variant: default/neutral */
869
+ :host([variant='default']) .dt-badge-inner,
870
+ :host([variant='neutral']) .dt-badge-inner {
871
+ background: transparent;
872
+ border-color: var(--dt-border);
873
+ color: var(--dt-text-secondary);
874
+ }
875
+
876
+ /* Size variants */
877
+ :host([size='sm']) .dt-badge-inner {
878
+ padding: 1px 4px;
879
+ font-size: 0.625rem;
880
+ }
881
+
882
+ :host([size='lg']) .dt-badge-inner {
883
+ padding: 3px 8px;
884
+ font-size: 0.75rem;
885
+ }
886
+ `,PY="dt-badge-inner",HY=class extends HTMLElement{static get observedAttributes(){return["variant","size","text"]}_container;_slot;get variant(){let e=this.getAttribute("variant");return e==="success"||e==="danger"||e==="warning"||e==="info"||e==="default"||e==="neutral"?e:"accent"}set variant(e){this.setAttribute("variant",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get text(){return this.getAttribute("text")}set text(e){e===null?this.removeAttribute("text"):this.setAttribute("text",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=zY,e.appendChild(t),this._container=document.createElement("span"),this._container.className=PY;let n=this.text;n!==null?this._container.textContent=n:(this._slot=document.createElement("slot"),this._container.appendChild(this._slot)),e.appendChild(this._container)}attributeChangedCallback(e,t,n){e==="text"&&this._render()}_render(){let e=this.text;e!==null&&(this._container.textContent=e)}},UY=`:host {
887
+ display: inline-flex;
888
+ vertical-align: middle;
889
+ }
890
+
891
+ .dt-button-inner {
892
+ display: inline-flex;
893
+ align-items: center;
894
+ justify-content: center;
895
+ gap: 4px;
896
+ padding: 6px 12px;
897
+ border: 1px solid var(--dt-accent);
898
+ border-radius: 2px;
899
+ font-size: 0.8125rem;
900
+ font-weight: 600;
901
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
902
+ line-height: 1.2;
903
+ cursor: pointer;
904
+ transition: all 0.1s ease;
905
+ background: var(--dt-surface);
906
+ color: var(--dt-accent);
907
+ text-transform: uppercase;
908
+ letter-spacing: 0.08em;
909
+ position: relative;
910
+ }
911
+
912
+ /* Corner accents */
913
+ .dt-button-inner::before {
914
+ content: '';
915
+ position: absolute;
916
+ top: 0;
917
+ left: 0;
918
+ width: 4px;
919
+ height: 4px;
920
+ border-top: 1px solid var(--dt-accent);
921
+ border-left: 1px solid var(--dt-accent);
922
+ }
923
+
924
+ .dt-button-inner::after {
925
+ content: '';
926
+ position: absolute;
927
+ bottom: 0;
928
+ right: 0;
929
+ width: 4px;
930
+ height: 4px;
931
+ border-bottom: 1px solid var(--dt-accent);
932
+ border-right: 1px solid var(--dt-accent);
933
+ }
934
+
935
+ .dt-button-inner:hover:not(:disabled) {
936
+ background: var(--dt-accent);
937
+ color: var(--dt-text-on-accent);
938
+ }
939
+
940
+ .dt-button-inner:hover:not(:disabled)::before,
941
+ .dt-button-inner:hover:not(:disabled)::after {
942
+ border-color: var(--dt-text-on-accent);
943
+ }
944
+
945
+ .dt-button-inner:active:not(:disabled) {
946
+ background: var(--dt-accent-active);
947
+ }
948
+
949
+ .dt-button-inner:disabled {
950
+ opacity: 0.4;
951
+ cursor: not-allowed;
952
+ border-color: var(--dt-border);
953
+ color: var(--dt-text-muted);
954
+ }
955
+
956
+ .dt-button-inner:disabled::before,
957
+ .dt-button-inner:disabled::after {
958
+ border-color: var(--dt-border);
959
+ }
960
+
961
+ /* Variant: primary - filled accent */
962
+ :host([variant='primary']) .dt-button-inner {
963
+ background: var(--dt-accent);
964
+ color: var(--dt-text-on-accent);
965
+ }
966
+
967
+ :host([variant='primary']) .dt-button-inner:hover:not(:disabled) {
968
+ background: var(--dt-accent-hover);
969
+ }
970
+
971
+ /* Variant: secondary - outlined */
972
+ :host([variant='secondary']) .dt-button-inner {
973
+ background: transparent;
974
+ border-color: var(--dt-border);
975
+ color: var(--dt-text);
976
+ }
977
+
978
+ :host([variant='secondary']) .dt-button-inner:hover:not(:disabled) {
979
+ background: var(--dt-surface-hover);
980
+ border-color: var(--dt-accent);
981
+ color: var(--dt-accent);
982
+ }
983
+
984
+ /* Variant: ghost - minimal */
985
+ :host([variant='ghost']) .dt-button-inner {
986
+ background: transparent;
987
+ border-color: transparent;
988
+ color: var(--dt-text-secondary);
989
+ }
990
+
991
+ :host([variant='ghost']) .dt-button-inner:hover:not(:disabled) {
992
+ background: var(--dt-surface);
993
+ border-color: var(--dt-border);
994
+ color: var(--dt-text);
995
+ }
996
+
997
+ :host([variant='ghost']) .dt-button-inner::before,
998
+ :host([variant='ghost']) .dt-button-inner::after {
999
+ display: none;
1000
+ }
1001
+
1002
+ /* Variant: danger */
1003
+ :host([variant='danger']) .dt-button-inner {
1004
+ background: transparent;
1005
+ border-color: var(--dt-danger);
1006
+ color: var(--dt-danger);
1007
+ }
1008
+
1009
+ :host([variant='danger']) .dt-button-inner:hover:not(:disabled) {
1010
+ background: var(--dt-danger);
1011
+ color: var(--dt-text-on-accent);
1012
+ }
1013
+
1014
+ :host([variant='danger']) .dt-button-inner::before,
1015
+ :host([variant='danger']) .dt-button-inner::after {
1016
+ border-color: var(--dt-danger);
1017
+ }
1018
+
1019
+ :host([variant='danger']) .dt-button-inner:hover:not(:disabled)::before,
1020
+ :host([variant='danger']) .dt-button-inner:hover:not(:disabled)::after {
1021
+ border-color: var(--dt-text-on-accent);
1022
+ }
1023
+
1024
+ /* Size: sm */
1025
+ :host([size='sm']) .dt-button-inner {
1026
+ padding: 4px 8px;
1027
+ font-size: 0.75rem;
1028
+ }
1029
+
1030
+ /* Size: lg */
1031
+ :host([size='lg']) .dt-button-inner {
1032
+ padding: 8px 16px;
1033
+ font-size: 0.875rem;
1034
+ }
1035
+
1036
+ :host([fullwidth]) .dt-button-inner {
1037
+ width: 100%;
1038
+ }
1039
+
1040
+ ::slotted([slot='icon']) {
1041
+ display: inline-flex;
1042
+ width: 1em;
1043
+ height: 1em;
1044
+ }
1045
+ `,jY="dt-button-inner",FY=class extends HTMLElement{static get observedAttributes(){return["variant","size","disabled","fullwidth","type"]}_button;_slot;get variant(){let e=this.getAttribute("variant");return e==="secondary"||e==="ghost"||e==="danger"?e:"primary"}set variant(e){this.setAttribute("variant",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get fullwidth(){return this.hasAttribute("fullwidth")}set fullwidth(e){e?this.setAttribute("fullwidth",""):this.removeAttribute("fullwidth")}get type(){let e=this.getAttribute("type");return e==="submit"||e==="reset"?e:"button"}set type(e){this.setAttribute("type",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=UY,e.appendChild(t),this._button=document.createElement("button"),this._button.className=jY,this._button.type=this.type,this._button.disabled=this.disabled,this._slot=document.createElement("slot"),this._button.appendChild(this._slot),e.appendChild(this._button)}attributeChangedCallback(e,t,n){switch(e){case"disabled":this._button.disabled=this.disabled;break;case"type":this._button.type=this.type;break}}},$Y=`:host {
1046
+ display: block;
1047
+ }
1048
+
1049
+ .dt-divider-inner {
1050
+ border: none;
1051
+ margin: 0;
1052
+ flex-shrink: 0;
1053
+ }
1054
+
1055
+ /* Horizontal (default) */
1056
+ :host([direction='horizontal']) .dt-divider-inner,
1057
+ .dt-divider-inner {
1058
+ width: 100%;
1059
+ height: 1px;
1060
+ background: var(--dt-accent);
1061
+ opacity: 0.5;
1062
+ }
1063
+
1064
+ /* Vertical */
1065
+ :host([direction='vertical']) .dt-divider-inner {
1066
+ width: 1px;
1067
+ height: 100%;
1068
+ min-height: 1em;
1069
+ background: var(--dt-accent);
1070
+ opacity: 0.5;
1071
+ }
1072
+
1073
+ /* Style variants */
1074
+ :host([style-variant='subtle']) .dt-divider-inner {
1075
+ background: var(--dt-border);
1076
+ opacity: 1;
1077
+ }
1078
+
1079
+ :host([style-variant='strong']) .dt-divider-inner {
1080
+ background: var(--dt-accent);
1081
+ opacity: 1;
1082
+ height: 2px;
1083
+ }
1084
+
1085
+ :host([direction='vertical'][style-variant='strong']) .dt-divider-inner {
1086
+ width: 2px;
1087
+ height: 100%;
1088
+ }
1089
+
1090
+ /* Spacing */
1091
+ :host([spacing='sm']) .dt-divider-inner {
1092
+ margin: 6px 0;
1093
+ }
1094
+ :host([spacing='md']) .dt-divider-inner {
1095
+ margin: 12px 0;
1096
+ }
1097
+ :host([spacing='lg']) .dt-divider-inner {
1098
+ margin: 18px 0;
1099
+ }
1100
+
1101
+ :host([direction='vertical'][spacing='sm']) .dt-divider-inner {
1102
+ margin: 0 6px;
1103
+ }
1104
+ :host([direction='vertical'][spacing='md']) .dt-divider-inner {
1105
+ margin: 0 12px;
1106
+ }
1107
+ :host([direction='vertical'][spacing='lg']) .dt-divider-inner {
1108
+ margin: 0 18px;
1109
+ }
1110
+ `,qY="dt-divider-inner",YY=class extends HTMLElement{static get observedAttributes(){return["direction","style-variant","spacing"]}get direction(){return this.getAttribute("direction")==="vertical"?"vertical":"horizontal"}set direction(e){this.setAttribute("direction",e)}get styleVariant(){let e=this.getAttribute("style-variant");return e==="subtle"||e==="strong"?e:"default"}set styleVariant(e){this.setAttribute("style-variant",e)}get spacing(){let e=this.getAttribute("spacing");return e==="sm"||e==="md"||e==="lg"?e:null}set spacing(e){e===null?this.removeAttribute("spacing"):this.setAttribute("spacing",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=$Y,e.appendChild(t);let n=document.createElement("hr");n.className=qY,e.appendChild(n)}},VY=`:host {
1111
+ display: block;
1112
+ min-height: 180px;
1113
+ color: var(--dt-text);
1114
+ font-family: var(
1115
+ --font-mono,
1116
+ 'SF Mono',
1117
+ Monaco,
1118
+ 'Cascadia Code',
1119
+ 'Roboto Mono',
1120
+ Consolas,
1121
+ monospace
1122
+ );
1123
+ }
1124
+
1125
+ .dt-table-view {
1126
+ display: flex;
1127
+ flex-direction: column;
1128
+ min-height: inherit;
1129
+ height: 100%;
1130
+ overflow: hidden;
1131
+ background: var(--dt-surface);
1132
+ border: 1px solid var(--dt-border);
1133
+ border-radius: 2px;
1134
+ position: relative;
1135
+ }
1136
+
1137
+ .dt-table-view::before,
1138
+ .dt-table-view::after {
1139
+ content: '';
1140
+ position: absolute;
1141
+ width: 8px;
1142
+ height: 8px;
1143
+ pointer-events: none;
1144
+ z-index: 3;
1145
+ }
1146
+
1147
+ .dt-table-view::before {
1148
+ top: -1px;
1149
+ left: -1px;
1150
+ border-top: 2px solid var(--dt-accent);
1151
+ border-left: 2px solid var(--dt-accent);
1152
+ }
1153
+
1154
+ .dt-table-view::after {
1155
+ right: -1px;
1156
+ bottom: -1px;
1157
+ border-right: 2px solid var(--dt-accent);
1158
+ border-bottom: 2px solid var(--dt-accent);
1159
+ }
1160
+
1161
+ .dt-table-scroll {
1162
+ min-height: inherit;
1163
+ height: 100%;
1164
+ overflow: auto;
1165
+ }
1166
+
1167
+ .dt-table-header,
1168
+ .dt-table-row {
1169
+ display: grid;
1170
+ grid-template-columns: var(--dt-table-columns, minmax(0, 1fr));
1171
+ min-width: fit-content;
1172
+ }
1173
+
1174
+ .dt-table-header {
1175
+ position: sticky;
1176
+ top: 0;
1177
+ z-index: 2;
1178
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1179
+ border-bottom: 1px solid var(--dt-border);
1180
+ }
1181
+
1182
+ .dt-table-header-cell,
1183
+ .dt-table-cell {
1184
+ min-width: 0;
1185
+ padding: 10px 12px;
1186
+ overflow: hidden;
1187
+ text-overflow: ellipsis;
1188
+ white-space: nowrap;
1189
+ font-size: 0.8125rem;
1190
+ }
1191
+
1192
+ .dt-table-header-cell {
1193
+ color: var(--dt-accent);
1194
+ font-size: 0.75rem;
1195
+ font-weight: 600;
1196
+ letter-spacing: 0.1em;
1197
+ text-transform: uppercase;
1198
+ }
1199
+
1200
+ .dt-table-header-cell--sortable {
1201
+ cursor: pointer;
1202
+ user-select: none;
1203
+ }
1204
+
1205
+ .dt-table-header-cell--sortable:hover {
1206
+ background: var(--dt-surface-hover);
1207
+ }
1208
+
1209
+ .dt-table-header-label {
1210
+ display: inline-flex;
1211
+ align-items: center;
1212
+ gap: 6px;
1213
+ }
1214
+
1215
+ .dt-table-sort-indicator {
1216
+ color: var(--dt-text-secondary);
1217
+ font-size: 0.7rem;
1218
+ }
1219
+
1220
+ .dt-table-body {
1221
+ position: relative;
1222
+ }
1223
+
1224
+ .dt-table-canvas {
1225
+ position: relative;
1226
+ }
1227
+
1228
+ .dt-table-row {
1229
+ position: absolute;
1230
+ left: 0;
1231
+ right: 0;
1232
+ border-bottom: 1px solid var(--dt-border-subtle);
1233
+ }
1234
+
1235
+ .dt-table-row--clickable {
1236
+ cursor: pointer;
1237
+ }
1238
+
1239
+ .dt-table-row--clickable:hover {
1240
+ background: var(--dt-surface-hover);
1241
+ }
1242
+
1243
+ :host([striped]) .dt-table-row:nth-child(even) {
1244
+ background: color-mix(in srgb, var(--dt-surface) 92%, var(--dt-accent) 8%);
1245
+ }
1246
+
1247
+ :host([bordered]) .dt-table-header-cell,
1248
+ :host([bordered]) .dt-table-cell {
1249
+ border-right: 1px solid var(--dt-border-subtle);
1250
+ }
1251
+
1252
+ :host([bordered]) .dt-table-header-cell:last-child,
1253
+ :host([bordered]) .dt-table-cell:last-child {
1254
+ border-right: 0;
1255
+ }
1256
+
1257
+ .dt-table-cell[data-align='center'],
1258
+ .dt-table-header-cell[data-align='center'] {
1259
+ text-align: center;
1260
+ }
1261
+
1262
+ .dt-table-cell[data-align='right'],
1263
+ .dt-table-header-cell[data-align='right'] {
1264
+ text-align: right;
1265
+ }
1266
+
1267
+ .dt-table-empty {
1268
+ display: flex;
1269
+ align-items: center;
1270
+ justify-content: center;
1271
+ min-height: 140px;
1272
+ padding: 20px;
1273
+ color: var(--dt-text-muted);
1274
+ text-transform: uppercase;
1275
+ letter-spacing: 0.08em;
1276
+ font-size: 0.75rem;
1277
+ }
1278
+ `;function GY(e){return e==null||e===!1?null:e===!0?"":String(e)}function WY(e,t){let n=e.querySelectorAll("*");for(let i of n){let s=i.getAttribute("data-field");if(s){let l=t[s];i.textContent=l==null?"":String(l)}for(let l of i.getAttributeNames()){if(l==="data-field"||!l.startsWith("data-field-"))continue;let o=l.slice(11);if(!o)continue;let d=i.getAttribute(l);if(!d)continue;let h=GY(t[d]);h===null?i.removeAttribute(o):i.setAttribute(o,h)}}}function Z6(e,t){let n=e.content.cloneNode(!0);return WY(n,t),n}var J6=class{_count=0;_estimateSize=56;_overscan=5;_fixedSize=null;_viewportHeight=0;_scrollTop=0;_sizes=new Map;constructor(e={}){this._count=e.count??0,this._estimateSize=e.estimateSize??56,this._overscan=e.overscan??5,this._fixedSize=e.fixedSize??null}setCount(e){this._count=Math.max(0,e);for(let t of this._sizes.keys())t>=this._count&&this._sizes.delete(t)}setViewportHeight(e){this._viewportHeight=Math.max(0,e)}setScrollTop(e){this._scrollTop=Math.max(0,e)}setEstimateSize(e){this._estimateSize=Math.max(1,e)}setFixedSize(e){this._fixedSize=e&&e>0?e:null}resetMeasurements(){this._sizes.clear()}measure(e,t){if(this._fixedSize!==null||e<0||e>=this._count)return 0;let n=Math.max(1,Math.round(t)),i=this._sizes.get(e);return i===n?0:(this._sizes.set(e,n),this.getOffset(e+1)<=this._scrollTop?n-(i??this._estimateSize):0)}getOffset(e){if(e<=0)return 0;let t=Math.min(e,this._count);if(this._fixedSize!==null)return t*this._fixedSize;let n=0;for(let i=0;i<t;i+=1)n+=this._sizes.get(i)??this._estimateSize;return n}getTotalHeight(){return this.getOffset(this._count)}getRange(){if(this._count===0)return{start:0,end:0,paddingTop:0,paddingBottom:0,totalHeight:0};if(this._fixedSize!==null){let d=Math.max(1,Math.ceil(this._viewportHeight/this._fixedSize)),h=Math.max(0,Math.floor(this._scrollTop/this._fixedSize)-this._overscan),f=Math.min(this._count,h+d+this._overscan*2),m=h*this._fixedSize,b=this._count*this._fixedSize,x=Math.max(0,b-m-(f-h)*this._fixedSize);return{start:h,end:f,paddingTop:m,paddingBottom:x,totalHeight:b}}let e=0,t=0;for(;e<this._count;){let d=this._sizes.get(e)??this._estimateSize;if(t+d>this._scrollTop)break;t+=d,e+=1}e=Math.max(0,e-this._overscan);let n=this.getOffset(e),i=e,s=0;for(;i<this._count&&s<this._viewportHeight;)s+=this._sizes.get(i)??this._estimateSize,i+=1;i=Math.min(this._count,i+this._overscan);let l=this.getTotalHeight(),o=Math.max(0,l-this.getOffset(i));return{start:e,end:i,paddingTop:n,paddingBottom:o,totalHeight:l}}};function XY(e){return e&&typeof e=="object"?e:{value:e}}function QY(e){return e==="center"||e==="right"?e:"left"}var eA=class extends HTMLElement{static get observedAttributes(){return["field","header","width","min-width","align"]}get field(){return this.getAttribute("field")??""}get header(){return this.getAttribute("header")??this.field}get width(){return this.getAttribute("width")??"auto"}get minWidth(){return this.getAttribute("min-width")??"0"}get align(){return QY(this.getAttribute("align"))}connectedCallback(){this.hidden=!0}attributeChangedCallback(){this.dispatchEvent(new CustomEvent("dt-column-change",{bubbles:!0,composed:!0}))}},KY=class extends HTMLElement{_rows=[];_columns=[];_virtualizer=new J6({estimateSize:40,overscan:5,fixedSize:40});_root;_scroll;_header;_body;_canvas;_emptyState;_resizeObserver=null;_mutationObserver=null;_sortField=null;_sortDirection="asc";static get observedAttributes(){return["row-height","sortable","striped","bordered","empty-text"]}get rows(){return this._rows}set rows(e){this._rows=Array.isArray(e)?e:[],this._virtualizer.setCount(this._rows.length),this._render()}get rowHeight(){let e=Number(this.getAttribute("row-height")??"40");return Number.isFinite(e)&&e>0?e:40}set rowHeight(e){this.setAttribute("row-height",String(e))}get sortable(){return this.hasAttribute("sortable")}get emptyText(){return this.getAttribute("empty-text")??"No data"}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=VY,e.appendChild(t),this._root=document.createElement("div"),this._root.className="dt-table-view",this._scroll=document.createElement("div"),this._scroll.className="dt-table-scroll",this._scroll.addEventListener("scroll",this._onScroll,{passive:!0}),this._header=document.createElement("div"),this._header.className="dt-table-header",this._body=document.createElement("div"),this._body.className="dt-table-body",this._canvas=document.createElement("div"),this._canvas.className="dt-table-canvas",this._emptyState=document.createElement("div"),this._emptyState.className="dt-table-empty",this._body.append(this._canvas,this._emptyState),this._scroll.append(this._header,this._body),this._root.appendChild(this._scroll),e.appendChild(this._root)}connectedCallback(){this._virtualizer.setFixedSize(this.rowHeight),this._virtualizer.setEstimateSize(this.rowHeight),this._syncColumns(),this._resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this._scroll){let n=this._header.offsetHeight;this._virtualizer.setViewportHeight(Math.max(0,t.contentRect.height-n)),this._render()}}),this._resizeObserver.observe(this._scroll),this._mutationObserver=new MutationObserver(()=>{this._syncColumns(),this._render()}),this._mutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["field","header","width","min-width","align"]}),this._virtualizer.setCount(this._rows.length),this._virtualizer.setViewportHeight(Math.max(0,this._scroll.clientHeight-this._header.offsetHeight)),this._render()}disconnectedCallback(){this._scroll.removeEventListener("scroll",this._onScroll),this._resizeObserver?.disconnect(),this._mutationObserver?.disconnect(),this._resizeObserver=null,this._mutationObserver=null}attributeChangedCallback(e){e==="row-height"&&(this._virtualizer.setFixedSize(this.rowHeight),this._virtualizer.setEstimateSize(this.rowHeight)),this._render()}_onScroll=()=>{this._virtualizer.setScrollTop(Math.max(0,this._scroll.scrollTop-this._header.offsetHeight)),this._renderBody()};_syncColumns(){this._columns=Array.from(this.children).filter(e=>e instanceof eA).map(e=>({field:e.field,header:e.header,width:e.width,minWidth:e.minWidth,align:e.align,template:Array.from(e.children).find(t=>t instanceof HTMLTemplateElement)??null})).filter(e=>e.field)}_render(){if(!this.isConnected)return;this._emptyState.textContent=this.emptyText;let e=this._columns.length>0?this._columns.map(t=>this._toGridColumn(t)).join(" "):"minmax(0, 1fr)";this._header.style.setProperty("--dt-table-columns",e),this._canvas.style.setProperty("--dt-table-columns",e),this._renderHeader(),this._renderBody()}_renderHeader(){let e=document.createDocumentFragment();for(let t of this._columns){let n=document.createElement("div");n.className="dt-table-header-cell",n.dataset.align=t.align,this.sortable&&(n.classList.add("dt-table-header-cell--sortable"),n.tabIndex=0,n.setAttribute("role","button"),n.setAttribute("aria-label",`Sort by ${t.header}`),n.addEventListener("click",()=>this._requestSort(t.field)),n.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),this._requestSort(t.field))}));let i=document.createElement("span");if(i.className="dt-table-header-label",i.textContent=t.header,this.sortable){let s=document.createElement("span");s.className="dt-table-sort-indicator",this._sortField===t.field?s.textContent=this._sortDirection==="asc"?"▲":"▼":s.textContent="↕",i.appendChild(s)}n.appendChild(i),e.appendChild(n)}this._header.replaceChildren(e)}_renderBody(){if(this._rows.length===0||this._columns.length===0){this._emptyState.hidden=!1,this._canvas.replaceChildren(),this._body.style.height="140px",this._canvas.style.height="0px";return}this._emptyState.hidden=!0,this._virtualizer.setCount(this._rows.length),this._virtualizer.setScrollTop(Math.max(0,this._scroll.scrollTop-this._header.offsetHeight)),this._virtualizer.setViewportHeight(Math.max(0,this._scroll.clientHeight-this._header.offsetHeight));let e=this._virtualizer.getRange();this._body.style.height=`${Math.max(e.totalHeight,this._scroll.clientHeight-this._header.offsetHeight)}px`,this._canvas.style.height=`${e.totalHeight}px`;let t=document.createDocumentFragment();for(let n=e.start;n<e.end;n+=1)t.appendChild(this._renderRow(n));this._canvas.replaceChildren(t)}_renderRow(e){let t=this._rows[e],n=document.createElement("div");n.className="dt-table-row dt-table-row--clickable",n.style.top=`${this._virtualizer.getOffset(e)}px`,n.style.height=`${this.rowHeight}px`,n.style.setProperty("--dt-table-columns",this._header.style.getPropertyValue("--dt-table-columns")),n.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("dt-row-click",{detail:{row:t,index:e},bubbles:!0,composed:!0}))});let i=XY(t);for(let s of this._columns){let l=document.createElement("div");if(l.className="dt-table-cell",l.dataset.align=s.align,s.template)l.appendChild(Z6(s.template,i));else{let o=i[s.field];l.textContent=o==null?"":String(o)}n.appendChild(l)}return n}_requestSort(e){this._sortField===e?this._sortDirection=this._sortDirection==="asc"?"desc":"asc":(this._sortField=e,this._sortDirection="asc"),this._renderHeader(),this.dispatchEvent(new CustomEvent("dt-sort",{detail:{field:e,direction:this._sortDirection},bubbles:!0,composed:!0}))}_toGridColumn(e){let t=/^\d+$/.test(e.minWidth)?`${e.minWidth}px`:e.minWidth;if(e.width==="auto")return`minmax(${t}, 1fr)`;let n=/^\d+$/.test(e.width)?`${e.width}px`:e.width;return`minmax(${t}, ${n})`}},ZY=`:host {
1279
+ display: block;
1280
+ min-height: 120px;
1281
+ color: var(--dt-text);
1282
+ font-family: var(
1283
+ --font-mono,
1284
+ 'SF Mono',
1285
+ Monaco,
1286
+ 'Cascadia Code',
1287
+ 'Roboto Mono',
1288
+ Consolas,
1289
+ monospace
1290
+ );
1291
+ }
1292
+
1293
+ .dt-list-view {
1294
+ position: relative;
1295
+ display: block;
1296
+ min-height: inherit;
1297
+ height: 100%;
1298
+ overflow: auto;
1299
+ background: var(--dt-surface);
1300
+ border: 1px solid var(--dt-border);
1301
+ border-radius: 2px;
1302
+ }
1303
+
1304
+ .dt-list-view::before,
1305
+ .dt-list-view::after {
1306
+ content: '';
1307
+ position: sticky;
1308
+ z-index: 2;
1309
+ width: 8px;
1310
+ height: 8px;
1311
+ pointer-events: none;
1312
+ }
1313
+
1314
+ .dt-list-view::before {
1315
+ top: 0;
1316
+ left: 0;
1317
+ display: block;
1318
+ border-top: 2px solid var(--dt-accent);
1319
+ border-left: 2px solid var(--dt-accent);
1320
+ }
1321
+
1322
+ .dt-list-view::after {
1323
+ right: 0;
1324
+ bottom: 0;
1325
+ float: right;
1326
+ border-right: 2px solid var(--dt-accent);
1327
+ border-bottom: 2px solid var(--dt-accent);
1328
+ }
1329
+
1330
+ .dt-list-spacer {
1331
+ position: relative;
1332
+ min-height: 100%;
1333
+ }
1334
+
1335
+ .dt-list-items {
1336
+ position: relative;
1337
+ }
1338
+
1339
+ .dt-list-item {
1340
+ box-sizing: border-box;
1341
+ width: 100%;
1342
+ padding: 12px;
1343
+ color: inherit;
1344
+ }
1345
+
1346
+ .dt-list-item--interactive {
1347
+ cursor: pointer;
1348
+ }
1349
+
1350
+ .dt-list-item--interactive:hover {
1351
+ background: var(--dt-surface-hover);
1352
+ }
1353
+
1354
+ .dt-list-item--selected {
1355
+ background: var(--dt-accent-subtle);
1356
+ }
1357
+
1358
+ :host([dividers]) .dt-list-item {
1359
+ border-bottom: 1px solid var(--dt-border-subtle);
1360
+ }
1361
+
1362
+ :host([dividers]) .dt-list-item:last-child {
1363
+ border-bottom: 0;
1364
+ }
1365
+
1366
+ .dt-list-empty {
1367
+ display: flex;
1368
+ align-items: center;
1369
+ justify-content: center;
1370
+ min-height: 120px;
1371
+ padding: 20px;
1372
+ color: var(--dt-text-muted);
1373
+ text-transform: uppercase;
1374
+ letter-spacing: 0.08em;
1375
+ font-size: 0.75rem;
1376
+ }
1377
+ `,_v=56;function JY(e){return e&&typeof e=="object"?e:{value:e}}var eV=class extends HTMLElement{_items=[];_selectedIndices=new Set;_renderItem=null;_virtualizer=new J6({estimateSize:_v,overscan:5});_viewport;_spacer;_itemsLayer;_emptyState;_resizeObserver=null;_itemResizeObserver=null;static get observedAttributes(){return["item-height","dividers","selectable","empty-text"]}get items(){return this._items}set items(e){this._items=Array.isArray(e)?e:[],this._selectedIndices=new Set([...this._selectedIndices].filter(t=>t<this._items.length)),this._virtualizer.setCount(this._items.length),this._syncSizingMode(!0),this._render()}get selectedItems(){return[...this._selectedIndices].sort((e,t)=>e-t).map(e=>this._items[e])}get renderItem(){return this._renderItem}set renderItem(e){this._renderItem=typeof e=="function"?e:null,this._render()}get itemHeight(){let e=this.getAttribute("item-height");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null}set itemHeight(e){if(e===null||e<=0){this.removeAttribute("item-height");return}this.setAttribute("item-height",String(e))}get selectable(){let e=this.getAttribute("selectable");return e==="single"||e==="multi"?e:"none"}set selectable(e){this.setAttribute("selectable",e)}get emptyText(){return this.getAttribute("empty-text")??"No items"}set emptyText(e){this.setAttribute("empty-text",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=ZY,e.appendChild(t),this._viewport=document.createElement("div"),this._viewport.className="dt-list-view",this._viewport.addEventListener("scroll",this._onScroll,{passive:!0}),this._spacer=document.createElement("div"),this._spacer.className="dt-list-spacer",this._itemsLayer=document.createElement("div"),this._itemsLayer.className="dt-list-items",this._emptyState=document.createElement("div"),this._emptyState.className="dt-list-empty",this._spacer.append(this._itemsLayer,this._emptyState),this._viewport.appendChild(this._spacer),e.appendChild(this._viewport)}connectedCallback(){this._resizeObserver=new ResizeObserver(e=>{for(let t of e)t.target===this._viewport&&(this._virtualizer.setViewportHeight(t.contentRect.height),this._render())}),this._resizeObserver.observe(this._viewport),this._itemResizeObserver=new ResizeObserver(e=>{let t=0;for(let n of e){let i=n.target,s=Number(i.dataset.index);Number.isFinite(s)&&(t+=this._virtualizer.measure(s,n.contentRect.height))}t!==0&&(this._viewport.scrollTop+=t),e.length>0&&this._render()}),this._virtualizer.setCount(this._items.length),this._virtualizer.setViewportHeight(this._viewport.clientHeight),this._syncSizingMode(!1),this._render()}disconnectedCallback(){this._viewport.removeEventListener("scroll",this._onScroll),this._resizeObserver?.disconnect(),this._itemResizeObserver?.disconnect(),this._resizeObserver=null,this._itemResizeObserver=null}attributeChangedCallback(e){e==="item-height"&&this._syncSizingMode(!0),e==="selectable"&&this.selectable==="none"&&this._selectedIndices.size>0&&(this._selectedIndices.clear(),this._emitSelectionChange()),this._render()}_onScroll=()=>{this._virtualizer.setScrollTop(this._viewport.scrollTop),this._render()};_syncSizingMode(e){let t=this.itemHeight;this._virtualizer.setFixedSize(t),this._virtualizer.setEstimateSize(t??_v),e&&this._virtualizer.resetMeasurements()}_render(){if(!this.isConnected)return;if(this._emptyState.textContent=this.emptyText,this._emptyState.hidden=this._items.length>0,this._items.length===0){this._itemsLayer.replaceChildren(),this._spacer.style.height="100%";return}this._virtualizer.setScrollTop(this._viewport.scrollTop),this._virtualizer.setViewportHeight(this._viewport.clientHeight),this._virtualizer.setCount(this._items.length);let e=this._virtualizer.getRange();this._spacer.style.height=`${Math.max(e.totalHeight,this._viewport.clientHeight)}px`,this._itemsLayer.style.transform=`translateY(${e.paddingTop}px)`;let t=document.createDocumentFragment();for(let n=e.start;n<e.end;n+=1)t.appendChild(this._renderVisibleItem(n));this._itemsLayer.replaceChildren(t)}_renderVisibleItem(e){let t=this._items[e],n=document.createElement("div");if(n.className="dt-list-item",n.dataset.index=String(e),this.selectable!=="none"&&(n.classList.add("dt-list-item--interactive"),n.setAttribute("role","option"),n.setAttribute("aria-selected",String(this._selectedIndices.has(e))),n.tabIndex=0),this._selectedIndices.has(e)&&n.classList.add("dt-list-item--selected"),this.itemHeight!==null&&(n.style.minHeight=`${this.itemHeight}px`),this._renderItem)this._renderItem(t,n,e);else{let i=this._getTemplate();i?n.appendChild(Z6(i,JY(t))):n.textContent=String(t??"")}return n.addEventListener("click",()=>this._handleItemClick(e)),n.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this._handleItemClick(e))}),this.itemHeight===null&&this._itemResizeObserver?.observe(n),n}_handleItemClick(e){let t=this._items[e],n=this.selectable;n==="single"?(this._selectedIndices=new Set([e]),this._emitSelectionChange(),this._render()):n==="multi"&&(this._selectedIndices.has(e)?this._selectedIndices.delete(e):this._selectedIndices.add(e),this._emitSelectionChange(),this._render()),this.dispatchEvent(new CustomEvent("dt-item-click",{detail:{item:t,index:e},bubbles:!0,composed:!0}))}_emitSelectionChange(){this.dispatchEvent(new CustomEvent("dt-selection-change",{detail:{selected:this.selectedItems},bubbles:!0,composed:!0}))}_getTemplate(){for(let e of Array.from(this.children))if(e instanceof HTMLTemplateElement)return e;return null}},tV=`:host {
1378
+ display: block;
1379
+ min-height: 220px;
1380
+ color: var(--dt-text);
1381
+ font-family: var(
1382
+ --font-mono,
1383
+ 'SF Mono',
1384
+ Monaco,
1385
+ 'Cascadia Code',
1386
+ 'Roboto Mono',
1387
+ Consolas,
1388
+ monospace
1389
+ );
1390
+ }
1391
+
1392
+ .dt-chart {
1393
+ position: relative;
1394
+ display: block;
1395
+ min-height: inherit;
1396
+ height: 100%;
1397
+ overflow: hidden;
1398
+ border: 1px solid var(--dt-border);
1399
+ border-radius: 2px;
1400
+ background:
1401
+ radial-gradient(
1402
+ circle at top left,
1403
+ color-mix(in srgb, var(--dt-accent) 16%, transparent),
1404
+ transparent 42%
1405
+ ),
1406
+ linear-gradient(
1407
+ 180deg,
1408
+ color-mix(in srgb, var(--dt-surface) 90%, var(--dt-accent) 10%),
1409
+ var(--dt-surface)
1410
+ );
1411
+ }
1412
+
1413
+ .dt-chart::before,
1414
+ .dt-chart::after {
1415
+ content: '';
1416
+ position: absolute;
1417
+ z-index: 3;
1418
+ width: 8px;
1419
+ height: 8px;
1420
+ pointer-events: none;
1421
+ }
1422
+
1423
+ .dt-chart::before {
1424
+ top: -1px;
1425
+ left: -1px;
1426
+ border-top: 2px solid var(--dt-accent);
1427
+ border-left: 2px solid var(--dt-accent);
1428
+ }
1429
+
1430
+ .dt-chart::after {
1431
+ right: -1px;
1432
+ bottom: -1px;
1433
+ border-right: 2px solid var(--dt-accent);
1434
+ border-bottom: 2px solid var(--dt-accent);
1435
+ }
1436
+
1437
+ .dt-chart__canvas {
1438
+ position: relative;
1439
+ z-index: 1;
1440
+ display: block;
1441
+ width: 100%;
1442
+ height: 100%;
1443
+ }
1444
+
1445
+ .dt-chart__status {
1446
+ position: absolute;
1447
+ inset: 0;
1448
+ z-index: 2;
1449
+ display: flex;
1450
+ align-items: center;
1451
+ justify-content: center;
1452
+ padding: 20px;
1453
+ color: var(--dt-text-muted);
1454
+ font-size: 0.75rem;
1455
+ letter-spacing: 0.08em;
1456
+ text-align: center;
1457
+ text-transform: uppercase;
1458
+ background: color-mix(in srgb, var(--dt-surface) 72%, transparent);
1459
+ }
1460
+
1461
+ .dt-chart__status[hidden] {
1462
+ display: none;
1463
+ }
1464
+ `,cp=null;function nV(){return window.__DtChart?Promise.resolve(window.__DtChart):cp||(cp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/chart.umd.js",n.async=!0,n.dataset.dtChart="true",n.onload=()=>{if(window.__DtChart){e(window.__DtChart);return}t(new Error("Chart runtime loaded without a __DtChart export."))},n.onerror=()=>t(new Error("Failed to load the Chart.js runtime bundle.")),document.head.appendChild(n)}),cp)}function Ou(e,t,n){return Math.min(n,Math.max(t,e))}function rV(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function sm(e){let t=e.trim().match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(t){let s=t[1],l=s.length===3?s.split("").map(f=>`${f}${f}`).join(""):s,o=parseInt(l.slice(0,2),16)/255,d=parseInt(l.slice(2,4),16)/255,h=parseInt(l.slice(4,6),16)/255;return Tv(o,d,h)}let n=e.trim().match(/^rgba?\((\d+(?:\.\d+)?)[,\s]+(\d+(?:\.\d+)?)[,\s]+(\d+(?:\.\d+)?)(?:[,/\s]+[\d.]+)?\)$/i);if(n)return Tv(Number(n[1])/255,Number(n[2])/255,Number(n[3])/255);let i=e.trim().match(/^hsla?\(([-\d.]+)(?:deg)?[,\s]+([\d.]+)%[,\s]+([\d.]+)%(?:[,/\s]+[\d.]+)?\)$/i);return i?{h:(Number(i[1])%360+360)%360,s:Ou(Number(i[2]),0,100),l:Ou(Number(i[3]),0,100)}:null}function Tv(e,t,n){let i=Math.max(e,t,n),s=Math.min(e,t,n),l=i-s,o=0,d=(i+s)/2,h=l===0?0:l/(1-Math.abs(2*d-1));if(l!==0)switch(i){case e:o=60*((t-n)/l%6);break;case t:o=60*((n-e)/l+2);break;default:o=60*((e-t)/l+4);break}return{h:(o+360)%360,s:Math.round(h*100),l:Math.round(d*100)}}function Os(e,t=1){return`hsla(${Math.round(e.h)} ${Math.round(e.s)}% ${Math.round(e.l)}% / ${t})`}function iV(e){let t=sm(e)??{h:185,s:88,l:56};return[0,32,68,118,164,212,258,304].map((n,i)=>({h:(t.h+n)%360,s:Ou(t.s-i*2,55,90),l:Ou(t.l+(i%2===0?0:6)-i,38,66)}))}function Oc(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function tA(e,t){if(!Oc(e)||!Oc(t))return t??e;let n={...e};for(let[i,s]of Object.entries(t)){let l=n[i];n[i]=Oc(l)&&Oc(s)?tA(l,s):s}return n}function aV(e){return e==="top"||e==="bottom"||e==="left"||e==="right"?e:"none"}function sV(e){return e==="bar"||e==="line"||e==="area"||e==="pie"||e==="doughnut"||e==="radar"||e==="scatter"||e==="bubble"?e:"bar"}function lV(e){return e==="bar"||e==="line"||e==="area"||e==="scatter"||e==="bubble"}function uV(e){return e.map(t=>t.trim()).filter(Boolean)}var oV=class extends HTMLElement{_canvas;_status;_runtime=null;_loadPromise=null;_chart=null;_renderedType=null;_dataInput=null;_optionsOverride=null;_syncFrame=0;static get observedAttributes(){return["type","legend","stacked","labels"]}get type(){return sV(this.getAttribute("type"))}set type(e){this.setAttribute("type",e)}get legend(){return aV(this.getAttribute("legend"))}set legend(e){this.setAttribute("legend",e)}get stacked(){return this.hasAttribute("stacked")}set stacked(e){this.toggleAttribute("stacked",e)}get labels(){return uV(rV(this.getAttribute("labels")))}set labels(e){this.setAttribute("labels",e.join(","))}get data(){return this._dataInput}set data(e){this._dataInput=e?structuredClone(e):null,this._scheduleSync()}get options(){return this._optionsOverride}set options(e){this._optionsOverride=e?structuredClone(e):null,this._renderChart()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=tV,e.appendChild(t);let n=document.createElement("div");n.className="dt-chart",this._canvas=document.createElement("canvas"),this._canvas.className="dt-chart__canvas",this._status=document.createElement("div"),this._status.className="dt-chart__status",this._status.textContent="Loading chart",n.append(this._canvas,this._status),e.appendChild(n)}connectedCallback(){this._canvas.addEventListener("click",this._handleCanvasClick),this._ensureRuntime().then(()=>this._renderChart()),this._scheduleSync()}disconnectedCallback(){this._canvas.removeEventListener("click",this._handleCanvasClick),this._syncFrame!==0&&(cancelAnimationFrame(this._syncFrame),this._syncFrame=0),this._chart?.destroy(),this._chart=null,this._renderedType=null}attributeChangedCallback(){this._scheduleSync()}_handleCanvasClick=e=>{if(!this._chart)return;let t=this._chart.getElementsAtEventForMode(e,"nearest",{intersect:!0},!0)[0];if(!t)return;let n=Array.isArray(this._chart.data.labels)?this._chart.data.labels[t.index]??null:null,i=this._chart.data.datasets[t.datasetIndex],s=Array.isArray(i?.data)?i.data[t.index]:void 0;this.dispatchEvent(new CustomEvent("dt-chart-click",{bubbles:!0,composed:!0,detail:{label:n,datasetIndex:t.datasetIndex,index:t.index,value:s}}))};_scheduleSync(){this._syncFrame===0&&(this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncFromCurrentSource()}))}_syncFromCurrentSource(){this._renderChart()}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=nV().then(e=>(this._runtime=e,e))),this._loadPromise)}async _renderChart(){let e=this._dataInput;if(!e){this._setStatus("Waiting for data");return}let t=await this._ensureRuntime(),n=this._buildConfig(t,e),i=n.type;!this._chart||this._renderedType!==i?(this._chart?.destroy(),this._chart=new t.Chart(this._canvas,n),this._renderedType=i):(this._chart.data=n.data,this._chart.options=n.options,this._chart.update()),this._setStatus(e.datasets.length>0?null:"Waiting for data")}_buildConfig(e,t){let n=getComputedStyle(this),i=n.getPropertyValue("--dt-accent").trim()||"#42d4ff",s=n.getPropertyValue("--dt-text").trim()||"#d6ebff",l=n.getPropertyValue("--dt-text-muted").trim()||"#7b93a6",o=n.getPropertyValue("--dt-border").trim()||"rgba(123, 147, 166, 0.3)",d=n.getPropertyValue("--font-mono").trim()||"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace",h=iV(i),f=this.type==="area"?"line":this.type,m={labels:t.labels??this.labels,datasets:t.datasets.map((x,E)=>{let T=h[E%h.length],w=x.color??Os(T,1),S={label:x.label??"",data:x.data,backgroundColor:f==="line"||f==="radar"||f==="scatter"?Os(T,f==="scatter"?.95:.24):w,borderColor:w,pointBackgroundColor:w,pointBorderColor:w,pointHoverBackgroundColor:w,pointRadius:this.type==="line"||this.type==="area"?3:4,pointHoverRadius:this.type==="line"||this.type==="area"?5:6,borderWidth:2,tension:f==="line"||this.type==="area"?.32:void 0,fill:this.type==="area"};return f==="pie"||f==="doughnut"?{...S,backgroundColor:Array.isArray(x.data)?x.data.map((k,F)=>Os(h[F%h.length],.86)):w,borderColor:Array.isArray(x.data)?x.data.map((k,F)=>Os(h[F%h.length],1)):w,borderWidth:1}:f==="scatter"||f==="bubble"?{...S,showLine:!1,backgroundColor:Os(T,.78)}:S})},b={responsive:!0,maintainAspectRatio:!1,animation:{duration:320},interaction:{mode:"nearest",intersect:!0},plugins:{legend:{display:this.legend!=="none",position:this.legend==="none"?"top":this.legend,labels:{color:s,boxWidth:12,boxHeight:12,padding:14,font:{family:d,size:11}}},tooltip:{backgroundColor:"rgba(10, 18, 24, 0.92)",borderColor:cV(o,i,.35),borderWidth:1,titleColor:s,bodyColor:s,footerColor:l,titleFont:{family:d,size:11},bodyFont:{family:d,size:11},padding:10}},scales:lV(this.type)?{x:{stacked:this.stacked,grid:{display:!1,color:o},border:{color:o},ticks:{color:l,font:{family:d,size:11}}},y:{stacked:this.stacked,beginAtZero:!0,grid:{display:!1,color:o},border:{color:o},ticks:{color:l,font:{family:d,size:11}}}}:f==="radar"?{r:{angleLines:{color:o},grid:{color:o},pointLabels:{color:l,font:{family:d,size:11}},ticks:{color:l,backdropColor:"transparent",font:{family:d,size:10}}}}:void 0};return{type:f,data:m,options:tA(b,this._optionsOverride??{})}}_setStatus(e){if(!e){this._status.hidden=!0;return}this._status.hidden=!1,this._status.textContent=e}};function cV(e,t,n){let i=sm(e),s=sm(t);if(!i||!s)return e;let l=Ou(n,0,1),o=((s.h-i.h)%360+540)%360-180;return Os({h:(i.h+o*l+360)%360,s:i.s+(s.s-i.s)*l,l:i.l+(s.l-i.l)*l})}var dV=`:host {
1465
+ display: block;
1466
+ color: var(--dt-text);
1467
+ font-family: var(--font-sans, 'Inter', sans-serif);
1468
+ }
1469
+
1470
+ .dt-markdown {
1471
+ color: inherit;
1472
+ line-height: 1.7;
1473
+ word-break: break-word;
1474
+ }
1475
+
1476
+ .dt-markdown > :first-child {
1477
+ margin-top: 0;
1478
+ }
1479
+
1480
+ .dt-markdown > :last-child {
1481
+ margin-bottom: 0;
1482
+ }
1483
+
1484
+ .dt-markdown :is(h1, h2, h3, h4, h5, h6) {
1485
+ margin: 1.2em 0 0.55em;
1486
+ color: var(--dt-text);
1487
+ font-family: var(--font-sans, 'Inter', sans-serif);
1488
+ line-height: 1.2;
1489
+ }
1490
+
1491
+ .dt-markdown h1 {
1492
+ color: var(--dt-accent);
1493
+ font-size: 1.6rem;
1494
+ letter-spacing: 0.08em;
1495
+ text-transform: uppercase;
1496
+ }
1497
+
1498
+ .dt-markdown h2 {
1499
+ font-size: 1.3rem;
1500
+ }
1501
+
1502
+ .dt-markdown h3 {
1503
+ font-size: 1.1rem;
1504
+ }
1505
+
1506
+ .dt-markdown p,
1507
+ .dt-markdown ul,
1508
+ .dt-markdown ol,
1509
+ .dt-markdown blockquote,
1510
+ .dt-markdown pre,
1511
+ .dt-markdown table {
1512
+ margin: 0.8em 0;
1513
+ }
1514
+
1515
+ .dt-markdown ul,
1516
+ .dt-markdown ol {
1517
+ padding-left: 1.4rem;
1518
+ }
1519
+
1520
+ .dt-markdown li + li {
1521
+ margin-top: 0.28em;
1522
+ }
1523
+
1524
+ .dt-markdown strong {
1525
+ color: var(--dt-text);
1526
+ }
1527
+
1528
+ .dt-markdown a,
1529
+ .dt-markdown .dt-md-link {
1530
+ color: var(--dt-accent);
1531
+ text-decoration: none;
1532
+ }
1533
+
1534
+ .dt-markdown a:hover,
1535
+ .dt-markdown .dt-md-link:hover {
1536
+ text-decoration: underline;
1537
+ }
1538
+
1539
+ .dt-markdown code {
1540
+ padding: 0.12rem 0.35rem;
1541
+ border-radius: 2px;
1542
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1543
+ color: var(--dt-accent);
1544
+ font-family: var(
1545
+ --font-mono,
1546
+ 'SF Mono',
1547
+ Monaco,
1548
+ 'Cascadia Code',
1549
+ 'Roboto Mono',
1550
+ Consolas,
1551
+ monospace
1552
+ );
1553
+ font-size: 0.92em;
1554
+ }
1555
+
1556
+ .dt-md-pre {
1557
+ overflow-x: auto;
1558
+ padding: 14px 16px;
1559
+ border: 1px solid var(--dt-border);
1560
+ border-radius: 2px;
1561
+ background: var(--dt-surface);
1562
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dt-surface) 85%, var(--dt-accent) 15%);
1563
+ }
1564
+
1565
+ .dt-md-pre code {
1566
+ display: block;
1567
+ padding: 0;
1568
+ background: transparent;
1569
+ color: var(--dt-text);
1570
+ }
1571
+
1572
+ .dt-md-blockquote {
1573
+ margin: 0.9em 0;
1574
+ padding: 0.15rem 0 0.15rem 1rem;
1575
+ border-left: 3px solid var(--dt-accent);
1576
+ color: var(--dt-text-muted);
1577
+ }
1578
+
1579
+ .dt-md-table {
1580
+ width: 100%;
1581
+ border-collapse: collapse;
1582
+ border: 1px solid var(--dt-border);
1583
+ background: var(--dt-surface);
1584
+ }
1585
+
1586
+ .dt-md-table th,
1587
+ .dt-md-table td {
1588
+ padding: 0.6rem 0.8rem;
1589
+ border: 1px solid var(--dt-border-subtle, var(--dt-border));
1590
+ text-align: left;
1591
+ vertical-align: top;
1592
+ }
1593
+
1594
+ .dt-md-table th {
1595
+ color: var(--dt-accent);
1596
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1597
+ font-size: 0.75rem;
1598
+ letter-spacing: 0.08em;
1599
+ text-transform: uppercase;
1600
+ }
1601
+
1602
+ .dt-markdown hr {
1603
+ border: 0;
1604
+ border-top: 1px solid var(--dt-border);
1605
+ }
1606
+
1607
+ .dt-md-image {
1608
+ display: block;
1609
+ max-width: 100%;
1610
+ border: 1px solid var(--dt-border);
1611
+ border-radius: 2px;
1612
+ }
1613
+
1614
+ .dt-markdown__caret {
1615
+ display: inline-block;
1616
+ margin-left: 0.15rem;
1617
+ color: var(--dt-accent);
1618
+ animation: dt-markdown-caret 0.9s steps(1) infinite;
1619
+ }
1620
+
1621
+ .dt-markdown__caret[hidden] {
1622
+ display: none;
1623
+ }
1624
+
1625
+ @keyframes dt-markdown-caret {
1626
+ 0%,
1627
+ 49% {
1628
+ opacity: 1;
1629
+ }
1630
+
1631
+ 50%,
1632
+ 100% {
1633
+ opacity: 0;
1634
+ }
1635
+ }
1636
+ `,dp=null;function fV(){return window.__DtMarked?Promise.resolve(window.__DtMarked):dp||(dp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/marked.js",n.async=!0,n.dataset.dtMarked="true",n.onload=()=>{if(window.__DtMarked){e(window.__DtMarked);return}t(new Error("Marked runtime loaded without a __DtMarked export."))},n.onerror=()=>t(new Error("Failed to load the marked runtime bundle.")),document.head.appendChild(n)}),dp)}function nA(e){return e.replaceAll(`\r
1637
+ `,`
1638
+ `)}function hV(e){let t=nA(e).split(`
1639
+ `);for(;t.length>0&&t[0].trim()==="";)t.shift();for(;t.length>0&&t[t.length-1].trim()==="";)t.pop();let n=t.filter(s=>s.trim()!=="").map(s=>s.match(/^\s*/)?.[0].length??0),i=n.length>0?Math.min(...n):0;return i===0?t.join(`
1640
+ `):t.map(s=>s.slice(i)).join(`
1641
+ `)}function pV(e){let t=nA(e);if((t.match(/(^|\n)(```|~~~)/g)??[]).length%2===0)return t;let n=t.includes("~~~")&&!t.includes("```")?"~~~":"```";return`${t}
1642
+ ${n}`}var mV=class extends HTMLElement{_body;_caret;_contentOverride=null;_runtime=null;_loadPromise=null;_observer=null;_renderFrame=0;static get observedAttributes(){return["streaming","unsafe-html"]}get content(){return this._contentOverride??this._readInlineMarkdown()}set content(e){this._contentOverride=String(e??""),this._scheduleRender()}get streaming(){return this.hasAttribute("streaming")}set streaming(e){this.toggleAttribute("streaming",e)}get unsafeHtml(){return this.hasAttribute("unsafe-html")}set unsafeHtml(e){this.toggleAttribute("unsafe-html",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=dV,e.appendChild(t),this._body=document.createElement("div"),this._body.className="dt-markdown",this._body.addEventListener("click",this._onLinkClick),this._caret=document.createElement("span"),this._caret.className="dt-markdown__caret",this._caret.textContent="▌",this._caret.hidden=!0,e.append(this._body,this._caret)}connectedCallback(){this._observer||(this._observer=new MutationObserver(()=>{this._contentOverride===null&&this._scheduleRender()}),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0})),this._ensureRuntime(),this._scheduleRender()}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._renderFrame!==0&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=0)}attributeChangedCallback(){this._scheduleRender()}_onLinkClick=e=>{let t=e.composedPath().find(n=>n instanceof HTMLAnchorElement);t&&(e.preventDefault(),this.dispatchEvent(new CustomEvent("dt-link-click",{bubbles:!0,composed:!0,detail:{href:t.getAttribute("href")??"#"}})))};_readInlineMarkdown(){return hV(this.textContent??"")}_scheduleRender(){this._renderFrame===0&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=0,this._render()}))}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=fV().then(e=>(this._runtime=e,e))),this._loadPromise)}async _render(){let e=await this._ensureRuntime(),t=this.content;this.streaming&&(t=pV(t)),this._body.innerHTML=e.render(t,{unsafeHtml:this.unsafeHtml}),this._caret.hidden=!this.streaming}},gV=`:host {
1643
+ display: block;
1644
+ min-height: 240px;
1645
+ color: var(--dt-text);
1646
+ font-family: var(--font-sans, 'Inter', sans-serif);
1647
+ }
1648
+
1649
+ .dt-markdown-editor {
1650
+ position: relative;
1651
+ height: 100%;
1652
+ min-height: inherit;
1653
+ overflow: hidden;
1654
+ border: 1px solid var(--dt-border);
1655
+ border-radius: 2px;
1656
+ }
1657
+
1658
+ .dt-markdown-editor::before,
1659
+ .dt-markdown-editor::after {
1660
+ content: '';
1661
+ position: absolute;
1662
+ z-index: 3;
1663
+ width: 8px;
1664
+ height: 8px;
1665
+ pointer-events: none;
1666
+ }
1667
+
1668
+ .dt-markdown-editor::before {
1669
+ top: -1px;
1670
+ left: -1px;
1671
+ border-top: 2px solid var(--dt-accent);
1672
+ border-left: 2px solid var(--dt-accent);
1673
+ }
1674
+
1675
+ .dt-markdown-editor::after {
1676
+ right: -1px;
1677
+ bottom: -1px;
1678
+ border-right: 2px solid var(--dt-accent);
1679
+ border-bottom: 2px solid var(--dt-accent);
1680
+ }
1681
+
1682
+ .dt-markdown-editor__surface {
1683
+ height: 100%;
1684
+ min-height: inherit;
1685
+ }
1686
+
1687
+ .dt-markdown-editor__content {
1688
+ height: 100%;
1689
+ min-height: inherit;
1690
+ }
1691
+
1692
+ .dt-markdown-editor__status {
1693
+ position: absolute;
1694
+ inset: 0;
1695
+ display: flex;
1696
+ align-items: center;
1697
+ justify-content: center;
1698
+ padding: 20px;
1699
+ background: color-mix(in srgb, var(--dt-surface) 84%, transparent);
1700
+ color: var(--dt-text-muted);
1701
+ font-size: 0.75rem;
1702
+ letter-spacing: 0.08em;
1703
+ text-transform: uppercase;
1704
+ }
1705
+
1706
+ .dt-markdown-editor__status[hidden] {
1707
+ display: none;
1708
+ }
1709
+
1710
+ .milkdown {
1711
+ --crepe-color-background: transparent;
1712
+ --crepe-color-on-background: var(--dt-text);
1713
+ --crepe-color-surface: var(--dt-surface);
1714
+ --crepe-color-surface-low: color-mix(in srgb, var(--dt-surface) 94%, var(--dt-accent) 6%);
1715
+ --crepe-color-on-surface: var(--dt-text);
1716
+ --crepe-color-on-surface-variant: var(--dt-text-muted);
1717
+ --crepe-color-outline: var(--dt-border);
1718
+ --crepe-color-primary: var(--dt-accent);
1719
+ --crepe-color-secondary: color-mix(in srgb, var(--dt-surface) 84%, var(--dt-accent) 16%);
1720
+ --crepe-color-on-secondary: var(--dt-text);
1721
+ --crepe-color-inverse: var(--dt-text);
1722
+ --crepe-color-on-inverse: var(--dt-surface);
1723
+ --crepe-color-inline-code: var(--dt-accent);
1724
+ --crepe-color-error: var(--dt-danger, #ff6a6a);
1725
+ --crepe-color-hover: var(--dt-surface-hover);
1726
+ --crepe-color-selected: color-mix(in srgb, var(--dt-surface) 82%, var(--dt-accent) 18%);
1727
+ --crepe-color-inline-area: color-mix(in srgb, var(--dt-surface) 90%, var(--dt-accent) 10%);
1728
+ --crepe-font-title: var(--font-sans, 'Inter', sans-serif);
1729
+ --crepe-font-default: var(--font-sans, 'Inter', sans-serif);
1730
+ --crepe-font-code: var(
1731
+ --font-mono,
1732
+ 'SF Mono',
1733
+ Monaco,
1734
+ 'Cascadia Code',
1735
+ 'Roboto Mono',
1736
+ Consolas,
1737
+ monospace
1738
+ );
1739
+ --crepe-shadow-1: 0 0 0 1px color-mix(in srgb, var(--dt-surface) 82%, var(--dt-accent) 18%);
1740
+ --crepe-shadow-2:
1741
+ 0 0 0 1px color-mix(in srgb, var(--dt-surface) 78%, var(--dt-accent) 22%),
1742
+ 0 8px 24px color-mix(in srgb, var(--dt-accent) 12%, transparent);
1743
+
1744
+ height: 100%;
1745
+ background: transparent;
1746
+ color: var(--dt-text);
1747
+ }
1748
+
1749
+ .milkdown .editor {
1750
+ min-height: 100%;
1751
+ padding: 16px 18px 20px;
1752
+ outline: none;
1753
+ color: var(--dt-text);
1754
+ font-family: var(--font-sans, 'Inter', sans-serif);
1755
+ font-size: 14px;
1756
+ line-height: 1.7;
1757
+ }
1758
+
1759
+ .milkdown .editor > :first-child {
1760
+ margin-top: 0;
1761
+ }
1762
+
1763
+ .milkdown .editor h1,
1764
+ .milkdown .editor h2,
1765
+ .milkdown .editor h3,
1766
+ .milkdown .editor h4,
1767
+ .milkdown .editor h5,
1768
+ .milkdown .editor h6 {
1769
+ margin: 0.95em 0 0.45em;
1770
+ line-height: 1.2;
1771
+ }
1772
+
1773
+ .milkdown .editor h1 {
1774
+ color: var(--dt-accent);
1775
+ font-size: 1.6rem;
1776
+ letter-spacing: 0.08em;
1777
+ text-transform: uppercase;
1778
+ }
1779
+
1780
+ .milkdown .editor h2 {
1781
+ font-size: 1.28rem;
1782
+ }
1783
+
1784
+ .milkdown .editor h3 {
1785
+ font-size: 1.08rem;
1786
+ }
1787
+
1788
+ .milkdown .editor p {
1789
+ margin: 0.65em 0;
1790
+ }
1791
+
1792
+ .milkdown .editor code {
1793
+ padding: 2px 5px;
1794
+ border-radius: 2px;
1795
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1796
+ font-family: var(
1797
+ --font-mono,
1798
+ 'SF Mono',
1799
+ Monaco,
1800
+ 'Cascadia Code',
1801
+ 'Roboto Mono',
1802
+ Consolas,
1803
+ monospace
1804
+ );
1805
+ font-size: 0.9em;
1806
+ }
1807
+
1808
+ .milkdown .editor pre {
1809
+ overflow-x: auto;
1810
+ margin: 0.9em 0;
1811
+ padding: 12px 14px;
1812
+ border: 1px solid var(--dt-border);
1813
+ border-radius: 2px;
1814
+ background: var(--dt-surface);
1815
+ }
1816
+
1817
+ .milkdown .editor pre code {
1818
+ padding: 0;
1819
+ background: transparent;
1820
+ }
1821
+
1822
+ .milkdown .editor blockquote {
1823
+ margin: 0.9em 0;
1824
+ padding-left: 12px;
1825
+ border-left: 3px solid var(--dt-accent);
1826
+ color: var(--dt-text-muted);
1827
+ }
1828
+
1829
+ .milkdown .editor a {
1830
+ color: var(--dt-accent);
1831
+ text-decoration: none;
1832
+ }
1833
+
1834
+ .milkdown .editor a:hover {
1835
+ text-decoration: underline;
1836
+ }
1837
+
1838
+ .milkdown .editor hr {
1839
+ border: 0;
1840
+ border-top: 1px solid var(--dt-border);
1841
+ }
1842
+
1843
+ .milkdown .editor ul,
1844
+ .milkdown .editor ol {
1845
+ padding-left: 1.5rem;
1846
+ }
1847
+
1848
+ .milkdown .editor img {
1849
+ max-width: 100%;
1850
+ border-radius: 2px;
1851
+ }
1852
+
1853
+ .milkdown .editor table {
1854
+ width: 100%;
1855
+ border-collapse: collapse;
1856
+ }
1857
+
1858
+ .milkdown .editor th,
1859
+ .milkdown .editor td {
1860
+ border: 1px solid var(--dt-border);
1861
+ }
1862
+ `,fp=null;function bV(){return window.__DtMilkdown?Promise.resolve(window.__DtMilkdown):fp||(fp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/milkdown.umd.js",n.async=!0,n.dataset.dtMilkdown="true",n.onload=()=>{if(window.__DtMilkdown){e(window.__DtMilkdown);return}t(new Error("Milkdown runtime loaded without a __DtMilkdown export."))},n.onerror=()=>t(new Error("Failed to load the Milkdown runtime bundle.")),document.head.appendChild(n)}),fp)}var yV=class extends HTMLElement{_runtimeStyle;_surface;_content;_status;_runtime=null;_loadPromise=null;_editor=null;_pendingValue="";_changeTimer=null;_setupToken=0;_suppressNextChange=!1;static get observedAttributes(){return["placeholder","readonly"]}get placeholder(){return this.getAttribute("placeholder")??""}set placeholder(e){this.setAttribute("placeholder",e)}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",e)}get value(){return this._editor&&(this._pendingValue=this._editor.getMarkdown()),this._pendingValue}set value(e){let t=String(e??"");this._pendingValue=t,this._editor&&this._runtime&&this._editor.getMarkdown()!==t&&(this._suppressNextChange=!0,this._editor.editor.action(this._runtime.replaceAll(t)))}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=gV,e.appendChild(t),this._runtimeStyle=document.createElement("style"),e.appendChild(this._runtimeStyle),this._surface=document.createElement("div"),this._surface.className="dt-markdown-editor",this._content=document.createElement("div"),this._content.className="dt-markdown-editor__surface";let n=document.createElement("div");n.className="dt-markdown-editor__content",this._content.appendChild(n),this._status=document.createElement("div"),this._status.className="dt-markdown-editor__status",this._status.textContent="Loading editor",this._surface.append(this._content,this._status),e.appendChild(this._surface)}connectedCallback(){this._initializeEditor()}disconnectedCallback(){this._setupToken+=1,this._clearChangeTimer(),this._destroyEditor()}attributeChangedCallback(e){if(e==="readonly"){this._editor?.setReadonly(this.readonly);return}e==="placeholder"&&this.isConnected&&this._initializeEditor(!0)}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=bV().then(e=>(this._runtime=e,this._runtimeStyle.textContent=e.cssText,e))),this._loadPromise)}async _initializeEditor(e=!1){let t=++this._setupToken;if(this._setStatus("Loading editor"),e)await this._destroyEditor();else if(this._editor){this._setStatus(null);return}try{let n=await this._ensureRuntime();if(!this.isConnected||t!==this._setupToken)return;this._content.replaceChildren();let i=document.createElement("div");i.className="dt-markdown-editor__content",this._content.appendChild(i);let s=new n.Crepe({root:i,defaultValue:this._pendingValue,features:{[n.Crepe.Feature.CodeMirror]:!1,[n.Crepe.Feature.ImageBlock]:!1,[n.Crepe.Feature.Latex]:!1},featureConfigs:{[n.Crepe.Feature.Placeholder]:{text:this.placeholder,mode:"doc"}}});if(s.on(l=>{l.markdownUpdated((o,d)=>{if(this._pendingValue=d,this._suppressNextChange){this._suppressNextChange=!1;return}this._queueChange(d)}),l.focus(()=>{this.dispatchEvent(new CustomEvent("dt-focus",{bubbles:!0,composed:!0}))}),l.blur(()=>{this.dispatchEvent(new CustomEvent("dt-blur",{bubbles:!0,composed:!0}))})}),await s.create(),!this.isConnected||t!==this._setupToken){await s.destroy();return}this._editor=s,this._editor.setReadonly(this.readonly),this._pendingValue=this._editor.getMarkdown(),this._setStatus(null)}catch{t===this._setupToken&&this._setStatus("Failed to load editor")}}async _destroyEditor(){let e=this._editor;if(this._editor=null,!!e)try{await e.destroy()}catch{}}_queueChange(e){this._clearChangeTimer(),this._changeTimer=setTimeout(()=>{this._changeTimer=null,this.dispatchEvent(new CustomEvent("dt-change",{bubbles:!0,composed:!0,detail:{value:e}}))},300)}_clearChangeTimer(){this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)}_setStatus(e){if(e){this._status.hidden=!1,this._status.textContent=e;return}this._status.hidden=!0}};customElements.get("dt-tooltip")||customElements.define("dt-tooltip",mY);customElements.get("dt-card")||customElements.define("dt-card",yY);customElements.get("dt-select")||customElements.define("dt-select",kY);customElements.get("dt-grid")||customElements.define("dt-grid",RY);customElements.get("dt-stack")||customElements.define("dt-stack",LY);customElements.get("dt-stat")||customElements.define("dt-stat",BY);customElements.get("dt-badge")||customElements.define("dt-badge",HY);customElements.get("dt-button")||customElements.define("dt-button",FY);customElements.get("dt-divider")||customElements.define("dt-divider",YY);customElements.get("dt-list-view")||customElements.define("dt-list-view",eV);customElements.get("dt-table-view")||customElements.define("dt-table-view",KY);customElements.get("dt-column")||customElements.define("dt-column",eA);customElements.get("dt-chart")||customElements.define("dt-chart",oV);customElements.get("dt-markdown")||customElements.define("dt-markdown",mV);customElements.get("dt-markdown-editor")||customElements.define("dt-markdown-editor",yV);W6(jc);function EV(){const[e,t]=R.useState("en"),[n,i]=R.useState({}),[s,l]=R.useState(jc),[o,d]=R.useState("loading"),h=R.useCallback(async()=>{try{const{data:f}=await or.get("/api/auth/me");if(!f.authenticated){f.needsSetup?d("onboard"):d("login");return}d("desktop")}catch{d("login")}},[]);return R.useEffect(()=>{let f=!1;async function m(E){const T=E?`?locale=${encodeURIComponent(E)}`:"";try{const{data:w}=await or.get(`/api/i18n/catalog${T}`);f||(t(w.locale),i(w.messages))}catch(w){if(Tt.isAxiosError(w)){const S=w.response?.status;if(S===401)return;throw new Error(`Failed to load i18n catalog (${S??"unknown"})`)}throw w}}async function b(){const{data:E}=await or.get("/api/preferences/public");f||l({theme:E.theme,accentColor:E.accentColor})}b().catch(E=>{console.error("[theme] Could not load preferences:",E)}),h(),m().catch(E=>{console.error("[i18n] Could not load catalog:",E)});const x=E=>{const T=E.detail;if(T?.event==="preferences:resetAll"){l(jc),m("en").catch(w=>{console.error("[i18n] Could not refresh catalog:",w)});return}T?.event==="preferences:changed"&&(T.data?.key==="general.language"&&m(String(T.data.value??"en")).catch(w=>{console.error("[i18n] Could not refresh catalog:",w)}),T.data?.key==="general.theme"&&l(w=>({...w,theme:T.data?.value==="dark"?"dark":"light"})),T.data?.key==="general.accentColor"&&l(w=>({...w,accentColor:String(T.data?.value??jc.accentColor)})))};return window.addEventListener("desktalk:event",x),()=>{f=!0,window.removeEventListener("desktalk:event",x)}},[h]),R.useEffect(()=>{W6(s)},[s]),o==="loading"?null:o==="login"?v.jsx(Iq,{onLoginSuccess:h}):o==="onboard"?v.jsx(dY,{onComplete:h}):v.jsx(_C,{locale:e,messages:n,children:v.jsx(Tq,{themePreferences:s})})}window.React=$i;window.ReactDOM={...rC,createRoot:bp.createRoot,hydrateRoot:bp.hydrateRoot};window.__desktalk_jsx_runtime=vw;const rA=document.getElementById("root");if(!rA)throw new Error("Root element #root not found");const xV=bp.createRoot(rA);xV.render(v.jsx($i.StrictMode,{children:v.jsx(EV,{})}));const vV=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:h6},Symbol.toStringTag,{value:"Module"}));export{FV as A,yz as B,eG as M,Vn as R,jV as W,Gl as _,qV as a,$V as b,GV as c,VV as d,WV as e,ri as f,fC as g,v as j,R as r,dC as s,YV as u};
1863
+ //# sourceMappingURL=index-C5-XUOS7.js.map