@semiont/cli 0.4.19 → 0.4.21

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 (155) hide show
  1. package/dist/cli.mjs +235 -181
  2. package/dist/frontend/dist/assets/{CookiePreferences-BBb5XMuG.js → CookiePreferences-CWvTznuy.js} +2 -2
  3. package/dist/frontend/dist/assets/{CookiePreferences-BBb5XMuG.js.map → CookiePreferences-CWvTznuy.js.map} +1 -1
  4. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-6ZGFEN2N-Dnq2pEeZ.js +2 -0
  5. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-6ZGFEN2N-Dnq2pEeZ.js.map +1 -0
  6. package/dist/frontend/dist/assets/ToolbarPanels-DQrfch_k.js +2 -0
  7. package/dist/frontend/dist/assets/ToolbarPanels-DQrfch_k.js.map +1 -0
  8. package/dist/frontend/dist/assets/client-9KMfqezG.js +2 -0
  9. package/dist/frontend/dist/assets/client-9KMfqezG.js.map +1 -0
  10. package/dist/frontend/dist/assets/client-Bvrf4lLa.js +2 -0
  11. package/dist/frontend/dist/assets/client-Bvrf4lLa.js.map +1 -0
  12. package/dist/frontend/dist/assets/client-D9qa8fAn.js +2 -0
  13. package/dist/frontend/dist/assets/client-D9qa8fAn.js.map +1 -0
  14. package/dist/frontend/dist/assets/client-kIBNRH2w.js +2 -0
  15. package/dist/frontend/dist/assets/client-kIBNRH2w.js.map +1 -0
  16. package/dist/frontend/dist/assets/index-DaA8-3Y1.js +169 -0
  17. package/dist/frontend/dist/assets/index-DaA8-3Y1.js.map +1 -0
  18. package/dist/frontend/dist/assets/{index-DNL392dn.css → index-fHqJXd_A.css} +1 -1
  19. package/dist/frontend/dist/assets/layout-BLGpzYwk.js +2 -0
  20. package/dist/frontend/dist/assets/layout-BLGpzYwk.js.map +1 -0
  21. package/dist/frontend/dist/assets/layout-BgHlzaj1.js +2 -0
  22. package/dist/frontend/dist/assets/layout-BgHlzaj1.js.map +1 -0
  23. package/dist/frontend/dist/assets/layout-Dj1MEjN6.js +2 -0
  24. package/dist/frontend/dist/assets/layout-Dj1MEjN6.js.map +1 -0
  25. package/dist/frontend/dist/assets/layout-easR0slx.js +2 -0
  26. package/dist/frontend/dist/assets/layout-easR0slx.js.map +1 -0
  27. package/dist/frontend/dist/assets/not-found-nC4IaXPt.js +2 -0
  28. package/dist/frontend/dist/assets/{not-found-BKG2_Fv3.js.map → not-found-nC4IaXPt.js.map} +1 -1
  29. package/dist/frontend/dist/assets/page-8zC_t3l-.js +2 -0
  30. package/dist/frontend/dist/assets/page-8zC_t3l-.js.map +1 -0
  31. package/dist/frontend/dist/assets/page-BD9EKRMV.js +2 -0
  32. package/dist/frontend/dist/assets/{page-DbwQv5n_.js.map → page-BD9EKRMV.js.map} +1 -1
  33. package/dist/frontend/dist/assets/page-BDMxGD5Z.js +8 -0
  34. package/dist/frontend/dist/assets/{page-aKPxuWo3.js.map → page-BDMxGD5Z.js.map} +1 -1
  35. package/dist/frontend/dist/assets/page-BwiRQxa7.js +2 -0
  36. package/dist/frontend/dist/assets/page-BwiRQxa7.js.map +1 -0
  37. package/dist/frontend/dist/assets/page-By8BIN8Q.js +2 -0
  38. package/dist/frontend/dist/assets/{page-IgGNB4a9.js.map → page-By8BIN8Q.js.map} +1 -1
  39. package/dist/frontend/dist/assets/{page-BRTi-f95.js → page-C8zOqZ8M.js} +3 -3
  40. package/dist/frontend/dist/assets/{page-BRTi-f95.js.map → page-C8zOqZ8M.js.map} +1 -1
  41. package/dist/frontend/dist/assets/page-CQsfujTh.js +2 -0
  42. package/dist/frontend/dist/assets/page-CQsfujTh.js.map +1 -0
  43. package/dist/frontend/dist/assets/page-CTvUxWH5.js +2 -0
  44. package/dist/frontend/dist/assets/{page-BSB8GP79.js.map → page-CTvUxWH5.js.map} +1 -1
  45. package/dist/frontend/dist/assets/page-ChjwiTJ8.js +2 -0
  46. package/dist/frontend/dist/assets/page-ChjwiTJ8.js.map +1 -0
  47. package/dist/frontend/dist/assets/page-D8JSCVFI.js +2 -0
  48. package/dist/frontend/dist/assets/{page-CDSGl6uY.js.map → page-D8JSCVFI.js.map} +1 -1
  49. package/dist/frontend/dist/assets/page-DB1HZ_Jr.js +2 -0
  50. package/dist/frontend/dist/assets/{page-D1q6VB02.js.map → page-DB1HZ_Jr.js.map} +1 -1
  51. package/dist/frontend/dist/assets/page-DBoIW_-n.js +2 -0
  52. package/dist/frontend/dist/assets/{page-DzoXV-AN.js.map → page-DBoIW_-n.js.map} +1 -1
  53. package/dist/frontend/dist/assets/page-DEHEdU59.js +2 -0
  54. package/dist/frontend/dist/assets/{page-BNJp__R7.js.map → page-DEHEdU59.js.map} +1 -1
  55. package/dist/frontend/dist/assets/page-DWS9ulKD.js +5 -0
  56. package/dist/frontend/dist/assets/{page-D3THDsqd.js.map → page-DWS9ulKD.js.map} +1 -1
  57. package/dist/frontend/dist/assets/page-DoqFVg4p.js +2 -0
  58. package/dist/frontend/dist/assets/page-DoqFVg4p.js.map +1 -0
  59. package/dist/frontend/dist/assets/page-btIB2WK4.js +2 -0
  60. package/dist/frontend/dist/assets/page-btIB2WK4.js.map +1 -0
  61. package/dist/frontend/dist/assets/page-jr_Rqa0A.js +2 -0
  62. package/dist/frontend/dist/assets/page-jr_Rqa0A.js.map +1 -0
  63. package/dist/frontend/dist/assets/page-kLVTeA46.js +2 -0
  64. package/dist/frontend/dist/assets/{page-CJLuuiG8.js.map → page-kLVTeA46.js.map} +1 -1
  65. package/dist/frontend/dist/assets/privacy-mpF0jllH.js +2 -0
  66. package/dist/frontend/dist/assets/{privacy-BAxopuZI.js.map → privacy-mpF0jllH.js.map} +1 -1
  67. package/dist/frontend/dist/assets/{routing-rYtBowvy.js → routing-BmJG4tNe.js} +2 -2
  68. package/dist/frontend/dist/assets/{routing-rYtBowvy.js.map → routing-BmJG4tNe.js.map} +1 -1
  69. package/dist/frontend/dist/assets/routing-JYkXODZK.js +2 -0
  70. package/dist/frontend/dist/assets/{routing-Cm_oCwum.js.map → routing-JYkXODZK.js.map} +1 -1
  71. package/dist/frontend/dist/index.html +2 -3
  72. package/dist/frontend/dist/messages/ar.json +0 -1
  73. package/dist/frontend/dist/messages/bn.json +0 -1
  74. package/dist/frontend/dist/messages/cs.json +0 -1
  75. package/dist/frontend/dist/messages/da.json +0 -1
  76. package/dist/frontend/dist/messages/de.json +0 -1
  77. package/dist/frontend/dist/messages/el.json +0 -1
  78. package/dist/frontend/dist/messages/en.json +0 -1
  79. package/dist/frontend/dist/messages/es.json +0 -1
  80. package/dist/frontend/dist/messages/fa.json +0 -1
  81. package/dist/frontend/dist/messages/fi.json +0 -1
  82. package/dist/frontend/dist/messages/fr.json +0 -1
  83. package/dist/frontend/dist/messages/he.json +0 -1
  84. package/dist/frontend/dist/messages/hi.json +0 -1
  85. package/dist/frontend/dist/messages/id.json +0 -1
  86. package/dist/frontend/dist/messages/it.json +0 -1
  87. package/dist/frontend/dist/messages/ja.json +0 -1
  88. package/dist/frontend/dist/messages/ko.json +0 -1
  89. package/dist/frontend/dist/messages/ms.json +0 -1
  90. package/dist/frontend/dist/messages/nl.json +0 -1
  91. package/dist/frontend/dist/messages/no.json +0 -1
  92. package/dist/frontend/dist/messages/pl.json +0 -1
  93. package/dist/frontend/dist/messages/pt.json +0 -1
  94. package/dist/frontend/dist/messages/ro.json +0 -1
  95. package/dist/frontend/dist/messages/sv.json +0 -1
  96. package/dist/frontend/dist/messages/th.json +0 -1
  97. package/dist/frontend/dist/messages/tr.json +0 -1
  98. package/dist/frontend/dist/messages/uk.json +0 -1
  99. package/dist/frontend/dist/messages/vi.json +0 -1
  100. package/dist/frontend/dist/messages/zh.json +0 -1
  101. package/dist/frontend/package.json +1 -1
  102. package/package.json +7 -7
  103. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-CHDCGQBR-mCGxablw.js +0 -2
  104. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-CHDCGQBR-mCGxablw.js.map +0 -1
  105. package/dist/frontend/dist/assets/StreamStatusContext-BNiTXRfJ.js +0 -2
  106. package/dist/frontend/dist/assets/StreamStatusContext-BNiTXRfJ.js.map +0 -1
  107. package/dist/frontend/dist/assets/ToolbarPanels-CfaOVIc9.js +0 -2
  108. package/dist/frontend/dist/assets/ToolbarPanels-CfaOVIc9.js.map +0 -1
  109. package/dist/frontend/dist/assets/client-CWwdB0xQ.js +0 -2
  110. package/dist/frontend/dist/assets/client-CWwdB0xQ.js.map +0 -1
  111. package/dist/frontend/dist/assets/client-Cgz-uiSd.js +0 -2
  112. package/dist/frontend/dist/assets/client-Cgz-uiSd.js.map +0 -1
  113. package/dist/frontend/dist/assets/client-D3W9xTBT.js +0 -2
  114. package/dist/frontend/dist/assets/client-D3W9xTBT.js.map +0 -1
  115. package/dist/frontend/dist/assets/client-DeL0szs5.js +0 -2
  116. package/dist/frontend/dist/assets/client-DeL0szs5.js.map +0 -1
  117. package/dist/frontend/dist/assets/index-C5oI0kaf.js +0 -161
  118. package/dist/frontend/dist/assets/index-C5oI0kaf.js.map +0 -1
  119. package/dist/frontend/dist/assets/layout-B_JLc3yI.js +0 -2
  120. package/dist/frontend/dist/assets/layout-B_JLc3yI.js.map +0 -1
  121. package/dist/frontend/dist/assets/layout-DJI7aibW.js +0 -2
  122. package/dist/frontend/dist/assets/layout-DJI7aibW.js.map +0 -1
  123. package/dist/frontend/dist/assets/layout-DXY8hCsB.js +0 -2
  124. package/dist/frontend/dist/assets/layout-DXY8hCsB.js.map +0 -1
  125. package/dist/frontend/dist/assets/layout-VBQ97DvJ.js +0 -2
  126. package/dist/frontend/dist/assets/layout-VBQ97DvJ.js.map +0 -1
  127. package/dist/frontend/dist/assets/not-found-BKG2_Fv3.js +0 -2
  128. package/dist/frontend/dist/assets/page-8OrS1-4-.js +0 -2
  129. package/dist/frontend/dist/assets/page-8OrS1-4-.js.map +0 -1
  130. package/dist/frontend/dist/assets/page-B4Qu9WPd.js +0 -2
  131. package/dist/frontend/dist/assets/page-B4Qu9WPd.js.map +0 -1
  132. package/dist/frontend/dist/assets/page-BNJp__R7.js +0 -2
  133. package/dist/frontend/dist/assets/page-BSB8GP79.js +0 -2
  134. package/dist/frontend/dist/assets/page-Bx8QAzic.js +0 -2
  135. package/dist/frontend/dist/assets/page-Bx8QAzic.js.map +0 -1
  136. package/dist/frontend/dist/assets/page-CDSGl6uY.js +0 -2
  137. package/dist/frontend/dist/assets/page-CJLuuiG8.js +0 -2
  138. package/dist/frontend/dist/assets/page-CyFJt2nP.js +0 -2
  139. package/dist/frontend/dist/assets/page-CyFJt2nP.js.map +0 -1
  140. package/dist/frontend/dist/assets/page-D1q6VB02.js +0 -2
  141. package/dist/frontend/dist/assets/page-D3THDsqd.js +0 -5
  142. package/dist/frontend/dist/assets/page-DCxg1lHk.js +0 -2
  143. package/dist/frontend/dist/assets/page-DCxg1lHk.js.map +0 -1
  144. package/dist/frontend/dist/assets/page-DbwQv5n_.js +0 -2
  145. package/dist/frontend/dist/assets/page-DddZ9Yxm.js +0 -2
  146. package/dist/frontend/dist/assets/page-DddZ9Yxm.js.map +0 -1
  147. package/dist/frontend/dist/assets/page-DzoXV-AN.js +0 -2
  148. package/dist/frontend/dist/assets/page-IgGNB4a9.js +0 -2
  149. package/dist/frontend/dist/assets/page-aKPxuWo3.js +0 -8
  150. package/dist/frontend/dist/assets/page-jxC42AIR.js +0 -2
  151. package/dist/frontend/dist/assets/page-jxC42AIR.js.map +0 -1
  152. package/dist/frontend/dist/assets/privacy-BAxopuZI.js +0 -2
  153. package/dist/frontend/dist/assets/query-B6BuIB0M.js +0 -10
  154. package/dist/frontend/dist/assets/query-B6BuIB0M.js.map +0 -1
  155. package/dist/frontend/dist/assets/routing-Cm_oCwum.js +0 -2
@@ -0,0 +1,169 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-ponyfill-D2ngVqWO.js","assets/vendor-DJo4KD8w.js","assets/PdfAnnotationCanvas.client-6ZGFEN2N-Dnq2pEeZ.js","assets/i18n-BbpF47i1.js","assets/layout-BgHlzaj1.js","assets/privacy-mpF0jllH.js","assets/routing-JYkXODZK.js","assets/page-DBoIW_-n.js","assets/page-BDMxGD5Z.js","assets/CookiePreferences-CWvTznuy.js","assets/XMarkIcon-KMKD47CF.js","assets/routing-BmJG4tNe.js","assets/page-C8zOqZ8M.js","assets/page-DWS9ulKD.js","assets/page-DEHEdU59.js","assets/page-By8BIN8Q.js","assets/page-BD9EKRMV.js","assets/page-DoqFVg4p.js","assets/layout-Dj1MEjN6.js","assets/ToolbarPanels-DQrfch_k.js","assets/ChevronLeftIcon-BLyRNZuL.js","assets/page-DB1HZ_Jr.js","assets/page-ChjwiTJ8.js","assets/page-jr_Rqa0A.js","assets/page-BwiRQxa7.js","assets/layout-BLGpzYwk.js","assets/ArrowsRightLeftIcon-BzLgl5o9.js","assets/CommandLineIcon-Ba4gpk8e.js","assets/page-D8JSCVFI.js","assets/client-Bvrf4lLa.js","assets/client-9KMfqezG.js","assets/client-D9qa8fAn.js","assets/page-8zC_t3l-.js","assets/layout-easR0slx.js","assets/page-kLVTeA46.js","assets/page-CQsfujTh.js","assets/page-btIB2WK4.js","assets/page-CTvUxWH5.js","assets/client-kIBNRH2w.js","assets/not-found-nC4IaXPt.js"])))=>i.map(i=>d[i]);
2
+ var YD=Object.defineProperty;var A1=e=>{throw TypeError(e)};var WD=(e,t,n)=>t in e?YD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pe=(e,t,n)=>WD(e,typeof t!="symbol"?t+"":t,n),jv=(e,t,n)=>t.has(e)||A1("Cannot "+n);var ce=(e,t,n)=>(jv(e,t,"read from private field"),n?n.call(e):t.get(e)),Ri=(e,t,n)=>t.has(e)?A1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),gi=(e,t,n,r)=>(jv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),St=(e,t,n)=>(jv(e,t,"access private method"),n);var P1=(e,t,n,r)=>({set _(i){gi(e,t,i,n)},get _(){return ce(e,t,r)}});import{e as LC,f as FD,g as DC,r as _,R as ue,h as go,t as N1,c as HD,i as GD,j as Tt,N as zC,b as KD,a as JD,B as e3}from"./vendor-DJo4KD8w.js";import{i as t3,a as n3,u as r3}from"./i18n-BbpF47i1.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Tv={exports:{}},eu={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var R1;function i3(){if(R1)return eu;R1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var s=null;if(a!==void 0&&(s=""+a),i.key!==void 0&&(s=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:a}}return eu.Fragment=t,eu.jsx=n,eu.jsxs=n,eu}var M1;function a3(){return M1||(M1=1,Tv.exports=i3()),Tv.exports}var g=a3(),Cv={exports:{}},tu={},Ev={exports:{}},Qv={};/**
11
+ * @license React
12
+ * scheduler.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var L1;function s3(){return L1||(L1=1,(function(e){function t($,q){var ee=$.length;$.push(q);e:for(;0<ee;){var le=ee-1>>>1,I=$[le];if(0<i(I,q))$[le]=q,$[ee]=I,ee=le;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var q=$[0],ee=$.pop();if(ee!==q){$[0]=ee;e:for(var le=0,I=$.length,G=I>>>1;le<G;){var re=2*(le+1)-1,R=$[re],ge=re+1,_e=$[ge];if(0>i(R,ee))ge<I&&0>i(_e,R)?($[le]=_e,$[ge]=ee,le=ge):($[le]=R,$[re]=ee,le=re);else if(ge<I&&0>i(_e,ee))$[le]=_e,$[ge]=ee,le=ge;else break e}}return q}function i($,q){var ee=$.sortIndex-q.sortIndex;return ee!==0?ee:$.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],f=1,m=null,p=3,O=!1,b=!1,x=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function E($){for(var q=n(d);q!==null;){if(q.callback===null)r(d);else if(q.startTime<=$)r(d),q.sortIndex=q.expirationTime,t(c,q);else break;q=n(d)}}function Q($){if(x=!1,E($),!b)if(n(c)!==null)b=!0,A||(A=!0,X());else{var q=n(d);q!==null&&Y(Q,q.startTime-$)}}var A=!1,M=-1,L=5,D=-1;function P(){return w?!0:!(e.unstable_now()-D<L)}function B(){if(w=!1,A){var $=e.unstable_now();D=$;var q=!0;try{e:{b=!1,x&&(x=!1,T(M),M=-1),O=!0;var ee=p;try{t:{for(E($),m=n(c);m!==null&&!(m.expirationTime>$&&P());){var le=m.callback;if(typeof le=="function"){m.callback=null,p=m.priorityLevel;var I=le(m.expirationTime<=$);if($=e.unstable_now(),typeof I=="function"){m.callback=I,E($),q=!0;break t}m===n(c)&&r(c),E($)}else r(c);m=n(c)}if(m!==null)q=!0;else{var G=n(d);G!==null&&Y(Q,G.startTime-$),q=!1}}break e}finally{m=null,p=ee,O=!1}q=void 0}}finally{q?X():A=!1}}}var X;if(typeof j=="function")X=function(){j(B)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,z=V.port2;V.port1.onmessage=B,X=function(){z.postMessage(null)}}else X=function(){k(B,0)};function Y($,q){M=k(function(){$(e.unstable_now())},q)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function($){switch(p){case 1:case 2:case 3:var q=3;break;default:q=p}var ee=p;p=q;try{return $()}finally{p=ee}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function($,q){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ee=p;p=$;try{return q()}finally{p=ee}},e.unstable_scheduleCallback=function($,q,ee){var le=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?le+ee:le):ee=le,$){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=ee+I,$={id:f++,callback:q,priorityLevel:$,startTime:ee,expirationTime:I,sortIndex:-1},ee>le?($.sortIndex=ee,t(d,$),n(c)===null&&$===n(d)&&(x?(T(M),M=-1):x=!0,Y(Q,ee-le))):($.sortIndex=I,t(c,$),b||O||(b=!0,A||(A=!0,X()))),$},e.unstable_shouldYield=P,e.unstable_wrapCallback=function($){var q=p;return function(){var ee=p;p=q;try{return $.apply(this,arguments)}finally{p=ee}}}})(Qv)),Qv}var D1;function o3(){return D1||(D1=1,Ev.exports=s3()),Ev.exports}/**
19
+ * @license React
20
+ * react-dom-client.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var z1;function l3(){if(z1)return tu;z1=1;var e=o3(),t=LC(),n=FD();function r(o){var u="https://react.dev/errors/"+o;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var u=o,h=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(h=u.return),o=u.return;while(o)}return u.tag===3?h:null}function s(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function l(o){if(o.tag===31){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function c(o){if(a(o)!==o)throw Error(r(188))}function d(o){var u=o.alternate;if(!u){if(u=a(o),u===null)throw Error(r(188));return u!==o?null:o}for(var h=o,v=u;;){var y=h.return;if(y===null)break;var S=y.alternate;if(S===null){if(v=y.return,v!==null){h=v;continue}break}if(y.child===S.child){for(S=y.child;S;){if(S===h)return c(y),o;if(S===v)return c(y),u;S=S.sibling}throw Error(r(188))}if(h.return!==v.return)h=y,v=S;else{for(var C=!1,N=y.child;N;){if(N===h){C=!0,h=y,v=S;break}if(N===v){C=!0,v=y,h=S;break}N=N.sibling}if(!C){for(N=S.child;N;){if(N===h){C=!0,h=S,v=y;break}if(N===v){C=!0,v=S,h=y;break}N=N.sibling}if(!C)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?o:u}function f(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=f(o),u!==null)return u;o=o.sibling}return null}var m=Object.assign,p=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),j=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function X(o){return o===null||typeof o!="object"?null:(o=B&&o[B]||o["@@iterator"],typeof o=="function"?o:null)}var V=Symbol.for("react.client.reference");function z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===V?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case x:return"Fragment";case k:return"Profiler";case w:return"StrictMode";case Q:return"Suspense";case A:return"SuspenseList";case D:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case j:return o.displayName||"Context";case T:return(o._context.displayName||"Context")+".Consumer";case E:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return u=o.displayName||null,u!==null?u:z(o.type)||"Memo";case L:u=o._payload,o=o._init;try{return z(o(u))}catch{}}return null}var Y=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},le=[],I=-1;function G(o){return{current:o}}function re(o){0>I||(o.current=le[I],le[I]=null,I--)}function R(o,u){I++,le[I]=o.current,o.current=u}var ge=G(null),_e=G(null),ve=G(null),Xe=G(null);function Ne(o,u){switch(R(ve,u),R(_e,o),R(ge,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?e1(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=e1(u),o=t1(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}re(ge),R(ge,o)}function Ze(){re(ge),re(_e),re(ve)}function be(o){o.memoizedState!==null&&R(Xe,o);var u=ge.current,h=t1(u,o.type);u!==h&&(R(_e,o),R(ge,h))}function Fe(o){_e.current===o&&(re(ge),re(_e)),Xe.current===o&&(re(Xe),Hc._currentValue=ee)}var Se,Ve;function ot(o){if(Se===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);Se=u&&u[1]||"",Ve=-1<h.stack.indexOf(`
27
+ at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
28
+ `+Se+o+Ve}var vt=!1;function et(o,u){if(!o||vt)return"";vt=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(u){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ne){var te=ne}Reflect.construct(o,[],oe)}else{try{oe.call()}catch(ne){te=ne}o.call(oe.prototype)}}else{try{throw Error()}catch(ne){te=ne}(oe=o())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.stack,te.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=v.DetermineComponentFrameRoot(),C=S[0],N=S[1];if(C&&N){var U=C.split(`
29
+ `),J=N.split(`
30
+ `);for(y=v=0;v<U.length&&!U[v].includes("DetermineComponentFrameRoot");)v++;for(;y<J.length&&!J[y].includes("DetermineComponentFrameRoot");)y++;if(v===U.length||y===J.length)for(v=U.length-1,y=J.length-1;1<=v&&0<=y&&U[v]!==J[y];)y--;for(;1<=v&&0<=y;v--,y--)if(U[v]!==J[y]){if(v!==1||y!==1)do if(v--,y--,0>y||U[v]!==J[y]){var ae=`
31
+ `+U[v].replace(" at new "," at ");return o.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",o.displayName)),ae}while(1<=v&&0<=y);break}}}finally{vt=!1,Error.prepareStackTrace=h}return(h=o?o.displayName||o.name:"")?ot(h):""}function yn(o,u){switch(o.tag){case 26:case 27:case 5:return ot(o.type);case 16:return ot("Lazy");case 13:return o.child!==u&&u!==null?ot("Suspense Fallback"):ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return et(o.type,!1);case 11:return et(o.type.render,!1);case 1:return et(o.type,!0);case 31:return ot("Activity");default:return""}}function Te(o){try{var u="",h=null;do u+=yn(o,h),h=o,o=o.return;while(o);return u}catch(v){return`
32
+ Error generating stack: `+v.message+`
33
+ `+v.stack}}var lt=Object.prototype.hasOwnProperty,me=e.unstable_scheduleCallback,Ot=e.unstable_cancelCallback,Dt=e.unstable_shouldYield,Wt=e.unstable_requestPaint,tt=e.unstable_now,Un=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,Qe=e.unstable_NormalPriority,Be=e.unstable_LowPriority,nt=e.unstable_IdlePriority,zt=e.log,zn=e.unstable_setDisableYieldValue,sn=null,Zt=null;function Jt(o){if(typeof zt=="function"&&zn(o),Zt&&typeof Zt.setStrictMode=="function")try{Zt.setStrictMode(sn,o)}catch{}}var mt=Math.clz32?Math.clz32:Is,nr=Math.log,kn=Math.LN2;function Is(o){return o>>>=0,o===0?32:31-(nr(o)/kn|0)|0}var Ei=256,fi=262144,$t=4194304;function Bt(o){var u=o&42;if(u!==0)return u;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Pt(o,u,h){var v=o.pendingLanes;if(v===0)return 0;var y=0,S=o.suspendedLanes,C=o.pingedLanes;o=o.warmLanes;var N=v&134217727;return N!==0?(v=N&~S,v!==0?y=Bt(v):(C&=N,C!==0?y=Bt(C):h||(h=N&~o,h!==0&&(y=Bt(h))))):(N=v&~S,N!==0?y=Bt(N):C!==0?y=Bt(C):h||(h=v&~o,h!==0&&(y=Bt(h)))),y===0?0:u!==0&&u!==y&&(u&S)===0&&(S=y&-y,h=u&-u,S>=h||S===32&&(h&4194048)!==0)?u:y}function jn(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function Tn(o,u){switch(o){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 on(){var o=$t;return $t<<=1,($t&62914560)===0&&($t=4194304),o}function Cn(o){for(var u=[],h=0;31>h;h++)u.push(o);return u}function $n(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Gt(o,u,h,v,y,S){var C=o.pendingLanes;o.pendingLanes=h,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=h,o.entangledLanes&=h,o.errorRecoveryDisabledLanes&=h,o.shellSuspendCounter=0;var N=o.entanglements,U=o.expirationTimes,J=o.hiddenUpdates;for(h=C&~h;0<h;){var ae=31-mt(h),oe=1<<ae;N[ae]=0,U[ae]=-1;var te=J[ae];if(te!==null)for(J[ae]=null,ae=0;ae<te.length;ae++){var ne=te[ae];ne!==null&&(ne.lane&=-536870913)}h&=~oe}v!==0&&Yn(o,v,0),S!==0&&y===0&&o.tag!==0&&(o.suspendedLanes|=S&~(C&~u))}function Yn(o,u,h){o.pendingLanes|=u,o.suspendedLanes&=~u;var v=31-mt(u);o.entangledLanes|=u,o.entanglements[v]=o.entanglements[v]|1073741824|h&261930}function je(o,u){var h=o.entangledLanes|=u;for(o=o.entanglements;h;){var v=31-mt(h),y=1<<v;y&u|o[v]&u&&(o[v]|=u),h&=~y}}function Je(o,u){var h=u&-u;return h=(h&42)!==0?1:dn(h),(h&(o.suspendedLanes|u))!==0?0:h}function dn(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Sr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Wn(){var o=q.p;return o!==0?o:(o=window.event,o===void 0?32:_1(o.type))}function zr(o,u){var h=q.p;try{return q.p=o,u()}finally{q.p=h}}var rr=Math.random().toString(36).slice(2),xn="__reactFiber$"+rr,qn="__reactProps$"+rr,za="__reactContainer$"+rr,dc="__reactEvents$"+rr,gp="__reactListeners$"+rr,vp="__reactHandles$"+rr,Md="__reactResources$"+rr,Xs="__reactMarker$"+rr;function fc(o){delete o[xn],delete o[qn],delete o[dc],delete o[gp],delete o[vp]}function $a(o){var u=o[xn];if(u)return u;for(var h=o.parentNode;h;){if(u=h[za]||h[xn]){if(h=u.alternate,u.child!==null||h!==null&&h.child!==null)for(o=l1(o);o!==null;){if(h=o[xn])return h;o=l1(o)}return u}o=h,h=o.parentNode}return null}function qa(o){if(o=o[xn]||o[za]){var u=o.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return o}return null}function Zs(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(r(33))}function Ia(o){var u=o[Md];return u||(u=o[Md]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function fn(o){o[Xs]=!0}var Ld=new Set,Dd={};function na(o,u){Xa(o,u),Xa(o+"Capture",u)}function Xa(o,u){for(Dd[o]=u,o=0;o<u.length;o++)Ld.add(u[o])}var Op=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]*$"),Bx={},Vx={};function $5(o){return lt.call(Vx,o)?!0:lt.call(Bx,o)?!1:Op.test(o)?Vx[o]=!0:(Bx[o]=!0,!1)}function zd(o,u,h){if($5(u))if(h===null)o.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var v=u.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+h)}}function $d(o,u,h){if(h===null)o.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+h)}}function ra(o,u,h,v){if(v===null)o.removeAttribute(h);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(h);return}o.setAttributeNS(u,h,""+v)}}function $r(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Ux(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function q5(o,u,h){var v=Object.getOwnPropertyDescriptor(o.constructor.prototype,u);if(!o.hasOwnProperty(u)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var y=v.get,S=v.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return y.call(this)},set:function(C){h=""+C,S.call(this,C)}}),Object.defineProperty(o,u,{enumerable:v.enumerable}),{getValue:function(){return h},setValue:function(C){h=""+C},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function bp(o){if(!o._valueTracker){var u=Ux(o)?"checked":"value";o._valueTracker=q5(o,u,""+o[u])}}function Yx(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var h=u.getValue(),v="";return o&&(v=Ux(o)?o.checked?"true":"false":o.value),o=v,o!==h?(u.setValue(o),!0):!1}function qd(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var I5=/[\n"\\]/g;function qr(o){return o.replace(I5,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function yp(o,u,h,v,y,S,C,N){o.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?o.type=C:o.removeAttribute("type"),u!=null?C==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+$r(u)):o.value!==""+$r(u)&&(o.value=""+$r(u)):C!=="submit"&&C!=="reset"||o.removeAttribute("value"),u!=null?xp(o,C,$r(u)):h!=null?xp(o,C,$r(h)):v!=null&&o.removeAttribute("value"),y==null&&S!=null&&(o.defaultChecked=!!S),y!=null&&(o.checked=y&&typeof y!="function"&&typeof y!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?o.name=""+$r(N):o.removeAttribute("name")}function Wx(o,u,h,v,y,S,C,N){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(o.type=S),u!=null||h!=null){if(!(S!=="submit"&&S!=="reset"||u!=null)){bp(o);return}h=h!=null?""+$r(h):"",u=u!=null?""+$r(u):h,N||u===o.value||(o.value=u),o.defaultValue=u}v=v??y,v=typeof v!="function"&&typeof v!="symbol"&&!!v,o.checked=N?o.checked:!!v,o.defaultChecked=!!v,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(o.name=C),bp(o)}function xp(o,u,h){u==="number"&&qd(o.ownerDocument)===o||o.defaultValue===""+h||(o.defaultValue=""+h)}function zo(o,u,h,v){if(o=o.options,u){u={};for(var y=0;y<h.length;y++)u["$"+h[y]]=!0;for(h=0;h<o.length;h++)y=u.hasOwnProperty("$"+o[h].value),o[h].selected!==y&&(o[h].selected=y),y&&v&&(o[h].defaultSelected=!0)}else{for(h=""+$r(h),u=null,y=0;y<o.length;y++){if(o[y].value===h){o[y].selected=!0,v&&(o[y].defaultSelected=!0);return}u!==null||o[y].disabled||(u=o[y])}u!==null&&(u.selected=!0)}}function Fx(o,u,h){if(u!=null&&(u=""+$r(u),u!==o.value&&(o.value=u),h==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=h!=null?""+$r(h):""}function Hx(o,u,h,v){if(u==null){if(v!=null){if(h!=null)throw Error(r(92));if(Y(v)){if(1<v.length)throw Error(r(93));v=v[0]}h=v}h==null&&(h=""),u=h}h=$r(u),o.defaultValue=h,v=o.textContent,v===h&&v!==""&&v!==null&&(o.value=v),bp(o)}function $o(o,u){if(u){var h=o.firstChild;if(h&&h===o.lastChild&&h.nodeType===3){h.nodeValue=u;return}}o.textContent=u}var X5=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 Gx(o,u,h){var v=u.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?v?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":v?o.setProperty(u,h):typeof h!="number"||h===0||X5.has(u)?u==="float"?o.cssFloat=h:o[u]=(""+h).trim():o[u]=h+"px"}function Kx(o,u,h){if(u!=null&&typeof u!="object")throw Error(r(62));if(o=o.style,h!=null){for(var v in h)!h.hasOwnProperty(v)||u!=null&&u.hasOwnProperty(v)||(v.indexOf("--")===0?o.setProperty(v,""):v==="float"?o.cssFloat="":o[v]="");for(var y in u)v=u[y],u.hasOwnProperty(y)&&h[y]!==v&&Gx(o,y,v)}else for(var S in u)u.hasOwnProperty(S)&&Gx(o,S,u[S])}function Sp(o){if(o.indexOf("-")===-1)return!1;switch(o){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 Z5=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"]]),B5=/^[\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 Id(o){return B5.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ia(){}var wp=null;function _p(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var qo=null,Io=null;function Jx(o){var u=qa(o);if(u&&(o=u.stateNode)){var h=o[qn]||null;e:switch(o=u.stateNode,u.type){case"input":if(yp(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),u=h.name,h.type==="radio"&&u!=null){for(h=o;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+qr(""+u)+'"][type="radio"]'),u=0;u<h.length;u++){var v=h[u];if(v!==o&&v.form===o.form){var y=v[qn]||null;if(!y)throw Error(r(90));yp(v,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(u=0;u<h.length;u++)v=h[u],v.form===o.form&&Yx(v)}break e;case"textarea":Fx(o,h.value,h.defaultValue);break e;case"select":u=h.value,u!=null&&zo(o,!!h.multiple,u,!1)}}}var kp=!1;function eS(o,u,h){if(kp)return o(u,h);kp=!0;try{var v=o(u);return v}finally{if(kp=!1,(qo!==null||Io!==null)&&(Ef(),qo&&(u=qo,o=Io,Io=qo=null,Jx(u),o)))for(u=0;u<o.length;u++)Jx(o[u])}}function hc(o,u){var h=o.stateNode;if(h===null)return null;var v=h[qn]||null;if(v===null)return null;h=v[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(o=o.type,v=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!v;break e;default:o=!1}if(o)return null;if(h&&typeof h!="function")throw Error(r(231,u,typeof h));return h}var aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jp=!1;if(aa)try{var mc={};Object.defineProperty(mc,"passive",{get:function(){jp=!0}}),window.addEventListener("test",mc,mc),window.removeEventListener("test",mc,mc)}catch{jp=!1}var Za=null,Tp=null,Xd=null;function tS(){if(Xd)return Xd;var o,u=Tp,h=u.length,v,y="value"in Za?Za.value:Za.textContent,S=y.length;for(o=0;o<h&&u[o]===y[o];o++);var C=h-o;for(v=1;v<=C&&u[h-v]===y[S-v];v++);return Xd=y.slice(o,1<v?1-v:void 0)}function Zd(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function Bd(){return!0}function nS(){return!1}function ir(o){function u(h,v,y,S,C){this._reactName=h,this._targetInst=y,this.type=v,this.nativeEvent=S,this.target=C,this.currentTarget=null;for(var N in o)o.hasOwnProperty(N)&&(h=o[N],this[N]=h?h(S):S[N]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Bd:nS,this.isPropagationStopped=nS,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=Bd)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=Bd)},persist:function(){},isPersistent:Bd}),u}var Bs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vd=ir(Bs),pc=m({},Bs,{view:0,detail:0}),V5=ir(pc),Cp,Ep,gc,Ud=m({},pc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ap,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==gc&&(gc&&o.type==="mousemove"?(Cp=o.screenX-gc.screenX,Ep=o.screenY-gc.screenY):Ep=Cp=0,gc=o),Cp)},movementY:function(o){return"movementY"in o?o.movementY:Ep}}),rS=ir(Ud),U5=m({},Ud,{dataTransfer:0}),Y5=ir(U5),W5=m({},pc,{relatedTarget:0}),Qp=ir(W5),F5=m({},Bs,{animationName:0,elapsedTime:0,pseudoElement:0}),H5=ir(F5),G5=m({},Bs,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),K5=ir(G5),J5=m({},Bs,{data:0}),iS=ir(J5),eL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tL={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"},nL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rL(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=nL[o])?!!u[o]:!1}function Ap(){return rL}var iL=m({},pc,{key:function(o){if(o.key){var u=eL[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=Zd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?tL[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ap,charCode:function(o){return o.type==="keypress"?Zd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Zd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),aL=ir(iL),sL=m({},Ud,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),aS=ir(sL),oL=m({},pc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ap}),lL=ir(oL),cL=m({},Bs,{propertyName:0,elapsedTime:0,pseudoElement:0}),uL=ir(cL),dL=m({},Ud,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),fL=ir(dL),hL=m({},Bs,{newState:0,oldState:0}),mL=ir(hL),pL=[9,13,27,32],Pp=aa&&"CompositionEvent"in window,vc=null;aa&&"documentMode"in document&&(vc=document.documentMode);var gL=aa&&"TextEvent"in window&&!vc,sS=aa&&(!Pp||vc&&8<vc&&11>=vc),oS=" ",lS=!1;function cS(o,u){switch(o){case"keyup":return pL.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uS(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Xo=!1;function vL(o,u){switch(o){case"compositionend":return uS(u);case"keypress":return u.which!==32?null:(lS=!0,oS);case"textInput":return o=u.data,o===oS&&lS?null:o;default:return null}}function OL(o,u){if(Xo)return o==="compositionend"||!Pp&&cS(o,u)?(o=tS(),Xd=Tp=Za=null,Xo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return sS&&u.locale!=="ko"?null:u.data;default:return null}}var bL={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 dS(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!bL[o.type]:u==="textarea"}function fS(o,u,h,v){qo?Io?Io.push(v):Io=[v]:qo=v,u=Lf(u,"onChange"),0<u.length&&(h=new Vd("onChange","change",null,h,v),o.push({event:h,listeners:u}))}var Oc=null,bc=null;function yL(o){W_(o,0)}function Yd(o){var u=Zs(o);if(Yx(u))return o}function hS(o,u){if(o==="change")return u}var mS=!1;if(aa){var Np;if(aa){var Rp="oninput"in document;if(!Rp){var pS=document.createElement("div");pS.setAttribute("oninput","return;"),Rp=typeof pS.oninput=="function"}Np=Rp}else Np=!1;mS=Np&&(!document.documentMode||9<document.documentMode)}function gS(){Oc&&(Oc.detachEvent("onpropertychange",vS),bc=Oc=null)}function vS(o){if(o.propertyName==="value"&&Yd(bc)){var u=[];fS(u,bc,o,_p(o)),eS(yL,u)}}function xL(o,u,h){o==="focusin"?(gS(),Oc=u,bc=h,Oc.attachEvent("onpropertychange",vS)):o==="focusout"&&gS()}function SL(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Yd(bc)}function wL(o,u){if(o==="click")return Yd(u)}function _L(o,u){if(o==="input"||o==="change")return Yd(u)}function kL(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var wr=typeof Object.is=="function"?Object.is:kL;function yc(o,u){if(wr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var h=Object.keys(o),v=Object.keys(u);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var y=h[v];if(!lt.call(u,y)||!wr(o[y],u[y]))return!1}return!0}function OS(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function bS(o,u){var h=OS(o);o=0;for(var v;h;){if(h.nodeType===3){if(v=o+h.textContent.length,o<=u&&v>=u)return{node:h,offset:u-o};o=v}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=OS(h)}}function yS(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?yS(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function xS(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=qd(o.document);u instanceof o.HTMLIFrameElement;){try{var h=typeof u.contentWindow.location.href=="string"}catch{h=!1}if(h)o=u.contentWindow;else break;u=qd(o.document)}return u}function Mp(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var jL=aa&&"documentMode"in document&&11>=document.documentMode,Zo=null,Lp=null,xc=null,Dp=!1;function SS(o,u,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Dp||Zo==null||Zo!==qd(v)||(v=Zo,"selectionStart"in v&&Mp(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),xc&&yc(xc,v)||(xc=v,v=Lf(Lp,"onSelect"),0<v.length&&(u=new Vd("onSelect","select",null,u,h),o.push({event:u,listeners:v}),u.target=Zo)))}function Vs(o,u){var h={};return h[o.toLowerCase()]=u.toLowerCase(),h["Webkit"+o]="webkit"+u,h["Moz"+o]="moz"+u,h}var Bo={animationend:Vs("Animation","AnimationEnd"),animationiteration:Vs("Animation","AnimationIteration"),animationstart:Vs("Animation","AnimationStart"),transitionrun:Vs("Transition","TransitionRun"),transitionstart:Vs("Transition","TransitionStart"),transitioncancel:Vs("Transition","TransitionCancel"),transitionend:Vs("Transition","TransitionEnd")},zp={},wS={};aa&&(wS=document.createElement("div").style,"AnimationEvent"in window||(delete Bo.animationend.animation,delete Bo.animationiteration.animation,delete Bo.animationstart.animation),"TransitionEvent"in window||delete Bo.transitionend.transition);function Us(o){if(zp[o])return zp[o];if(!Bo[o])return o;var u=Bo[o],h;for(h in u)if(u.hasOwnProperty(h)&&h in wS)return zp[o]=u[h];return o}var _S=Us("animationend"),kS=Us("animationiteration"),jS=Us("animationstart"),TL=Us("transitionrun"),CL=Us("transitionstart"),EL=Us("transitioncancel"),TS=Us("transitionend"),CS=new Map,$p="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(" ");$p.push("scrollEnd");function hi(o,u){CS.set(o,u),na(u,[o])}var Wd=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Ir=[],Vo=0,qp=0;function Fd(){for(var o=Vo,u=qp=Vo=0;u<o;){var h=Ir[u];Ir[u++]=null;var v=Ir[u];Ir[u++]=null;var y=Ir[u];Ir[u++]=null;var S=Ir[u];if(Ir[u++]=null,v!==null&&y!==null){var C=v.pending;C===null?y.next=y:(y.next=C.next,C.next=y),v.pending=y}S!==0&&ES(h,y,S)}}function Hd(o,u,h,v){Ir[Vo++]=o,Ir[Vo++]=u,Ir[Vo++]=h,Ir[Vo++]=v,qp|=v,o.lanes|=v,o=o.alternate,o!==null&&(o.lanes|=v)}function Ip(o,u,h,v){return Hd(o,u,h,v),Gd(o)}function Ys(o,u){return Hd(o,null,null,u),Gd(o)}function ES(o,u,h){o.lanes|=h;var v=o.alternate;v!==null&&(v.lanes|=h);for(var y=!1,S=o.return;S!==null;)S.childLanes|=h,v=S.alternate,v!==null&&(v.childLanes|=h),S.tag===22&&(o=S.stateNode,o===null||o._visibility&1||(y=!0)),o=S,S=S.return;return o.tag===3?(S=o.stateNode,y&&u!==null&&(y=31-mt(h),o=S.hiddenUpdates,v=o[y],v===null?o[y]=[u]:v.push(u),u.lane=h|536870912),S):null}function Gd(o){if(50<Zc)throw Zc=0,Hg=null,Error(r(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var Uo={};function QL(o,u,h,v){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _r(o,u,h,v){return new QL(o,u,h,v)}function Xp(o){return o=o.prototype,!(!o||!o.isReactComponent)}function sa(o,u){var h=o.alternate;return h===null?(h=_r(o.tag,u,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=u,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&65011712,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,u=o.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h.refCleanup=o.refCleanup,h}function QS(o,u){o.flags&=65011714;var h=o.alternate;return h===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=h.childLanes,o.lanes=h.lanes,o.child=h.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=h.memoizedProps,o.memoizedState=h.memoizedState,o.updateQueue=h.updateQueue,o.type=h.type,u=h.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function Kd(o,u,h,v,y,S){var C=0;if(v=o,typeof o=="function")Xp(o)&&(C=1);else if(typeof o=="string")C=MD(o,h,ge.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case D:return o=_r(31,h,u,y),o.elementType=D,o.lanes=S,o;case x:return Ws(h.children,y,S,u);case w:C=8,y|=24;break;case k:return o=_r(12,h,u,y|2),o.elementType=k,o.lanes=S,o;case Q:return o=_r(13,h,u,y),o.elementType=Q,o.lanes=S,o;case A:return o=_r(19,h,u,y),o.elementType=A,o.lanes=S,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case j:C=10;break e;case T:C=9;break e;case E:C=11;break e;case M:C=14;break e;case L:C=16,v=null;break e}C=29,h=Error(r(130,o===null?"null":typeof o,"")),v=null}return u=_r(C,h,u,y),u.elementType=o,u.type=v,u.lanes=S,u}function Ws(o,u,h,v){return o=_r(7,o,v,u),o.lanes=h,o}function Zp(o,u,h){return o=_r(6,o,null,u),o.lanes=h,o}function AS(o){var u=_r(18,null,null,0);return u.stateNode=o,u}function Bp(o,u,h){return u=_r(4,o.children!==null?o.children:[],o.key,u),u.lanes=h,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var PS=new WeakMap;function Xr(o,u){if(typeof o=="object"&&o!==null){var h=PS.get(o);return h!==void 0?h:(u={value:o,source:u,stack:Te(u)},PS.set(o,u),u)}return{value:o,source:u,stack:Te(u)}}var Yo=[],Wo=0,Jd=null,Sc=0,Zr=[],Br=0,Ba=null,Qi=1,Ai="";function oa(o,u){Yo[Wo++]=Sc,Yo[Wo++]=Jd,Jd=o,Sc=u}function NS(o,u,h){Zr[Br++]=Qi,Zr[Br++]=Ai,Zr[Br++]=Ba,Ba=o;var v=Qi;o=Ai;var y=32-mt(v)-1;v&=~(1<<y),h+=1;var S=32-mt(u)+y;if(30<S){var C=y-y%5;S=(v&(1<<C)-1).toString(32),v>>=C,y-=C,Qi=1<<32-mt(u)+y|h<<y|v,Ai=S+o}else Qi=1<<S|h<<y|v,Ai=o}function Vp(o){o.return!==null&&(oa(o,1),NS(o,1,0))}function Up(o){for(;o===Jd;)Jd=Yo[--Wo],Yo[Wo]=null,Sc=Yo[--Wo],Yo[Wo]=null;for(;o===Ba;)Ba=Zr[--Br],Zr[Br]=null,Ai=Zr[--Br],Zr[Br]=null,Qi=Zr[--Br],Zr[Br]=null}function RS(o,u){Zr[Br++]=Qi,Zr[Br++]=Ai,Zr[Br++]=Ba,Qi=u.id,Ai=u.overflow,Ba=o}var Pn=null,Vt=null,dt=!1,Va=null,Vr=!1,Yp=Error(r(519));function Ua(o){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wc(Xr(u,o)),Yp}function MS(o){var u=o.stateNode,h=o.type,v=o.memoizedProps;switch(u[xn]=o,u[qn]=v,h){case"dialog":it("cancel",u),it("close",u);break;case"iframe":case"object":case"embed":it("load",u);break;case"video":case"audio":for(h=0;h<Vc.length;h++)it(Vc[h],u);break;case"source":it("error",u);break;case"img":case"image":case"link":it("error",u),it("load",u);break;case"details":it("toggle",u);break;case"input":it("invalid",u),Wx(u,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":it("invalid",u);break;case"textarea":it("invalid",u),Hx(u,v.value,v.defaultValue,v.children)}h=v.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||u.textContent===""+h||v.suppressHydrationWarning===!0||K_(u.textContent,h)?(v.popover!=null&&(it("beforetoggle",u),it("toggle",u)),v.onScroll!=null&&it("scroll",u),v.onScrollEnd!=null&&it("scrollend",u),v.onClick!=null&&(u.onclick=ia),u=!0):u=!1,u||Ua(o,!0)}function LS(o){for(Pn=o.return;Pn;)switch(Pn.tag){case 5:case 31:case 13:Vr=!1;return;case 27:case 3:Vr=!0;return;default:Pn=Pn.return}}function Fo(o){if(o!==Pn)return!1;if(!dt)return LS(o),dt=!0,!1;var u=o.tag,h;if((h=u!==3&&u!==27)&&((h=u===5)&&(h=o.type,h=!(h!=="form"&&h!=="button")||dv(o.type,o.memoizedProps)),h=!h),h&&Vt&&Ua(o),LS(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Vt=o1(o)}else if(u===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Vt=o1(o)}else u===27?(u=Vt,ss(o.type)?(o=gv,gv=null,Vt=o):Vt=u):Vt=Pn?Yr(o.stateNode.nextSibling):null;return!0}function Fs(){Vt=Pn=null,dt=!1}function Wp(){var o=Va;return o!==null&&(lr===null?lr=o:lr.push.apply(lr,o),Va=null),o}function wc(o){Va===null?Va=[o]:Va.push(o)}var Fp=G(null),Hs=null,la=null;function Ya(o,u,h){R(Fp,u._currentValue),u._currentValue=h}function ca(o){o._currentValue=Fp.current,re(Fp)}function Hp(o,u,h){for(;o!==null;){var v=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),o===h)break;o=o.return}}function Gp(o,u,h,v){var y=o.child;for(y!==null&&(y.return=o);y!==null;){var S=y.dependencies;if(S!==null){var C=y.child;S=S.firstContext;e:for(;S!==null;){var N=S;S=y;for(var U=0;U<u.length;U++)if(N.context===u[U]){S.lanes|=h,N=S.alternate,N!==null&&(N.lanes|=h),Hp(S.return,h,o),v||(C=null);break e}S=N.next}}else if(y.tag===18){if(C=y.return,C===null)throw Error(r(341));C.lanes|=h,S=C.alternate,S!==null&&(S.lanes|=h),Hp(C,h,o),C=null}else C=y.child;if(C!==null)C.return=y;else for(C=y;C!==null;){if(C===o){C=null;break}if(y=C.sibling,y!==null){y.return=C.return,C=y;break}C=C.return}y=C}}function Ho(o,u,h,v){o=null;for(var y=u,S=!1;y!==null;){if(!S){if((y.flags&524288)!==0)S=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var C=y.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var N=y.type;wr(y.pendingProps.value,C.value)||(o!==null?o.push(N):o=[N])}}else if(y===Xe.current){if(C=y.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(o!==null?o.push(Hc):o=[Hc])}y=y.return}o!==null&&Gp(u,o,h,v),u.flags|=262144}function ef(o){for(o=o.firstContext;o!==null;){if(!wr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Gs(o){Hs=o,la=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Nn(o){return DS(Hs,o)}function tf(o,u){return Hs===null&&Gs(o),DS(o,u)}function DS(o,u){var h=u._currentValue;if(u={context:u,memoizedValue:h,next:null},la===null){if(o===null)throw Error(r(308));la=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else la=la.next=u;return h}var AL=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(h,v){o.push(v)}};this.abort=function(){u.aborted=!0,o.forEach(function(h){return h()})}},PL=e.unstable_scheduleCallback,NL=e.unstable_NormalPriority,hn={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kp(){return{controller:new AL,data:new Map,refCount:0}}function _c(o){o.refCount--,o.refCount===0&&PL(NL,function(){o.controller.abort()})}var kc=null,Jp=0,Go=0,Ko=null;function RL(o,u){if(kc===null){var h=kc=[];Jp=0,Go=nv(),Ko={status:"pending",value:void 0,then:function(v){h.push(v)}}}return Jp++,u.then(zS,zS),u}function zS(){if(--Jp===0&&kc!==null){Ko!==null&&(Ko.status="fulfilled");var o=kc;kc=null,Go=0,Ko=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function ML(o,u){var h=[],v={status:"pending",value:null,reason:null,then:function(y){h.push(y)}};return o.then(function(){v.status="fulfilled",v.value=u;for(var y=0;y<h.length;y++)(0,h[y])(u)},function(y){for(v.status="rejected",v.reason=y,y=0;y<h.length;y++)(0,h[y])(void 0)}),v}var $S=$.S;$.S=function(o,u){S_=tt(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&RL(o,u),$S!==null&&$S(o,u)};var Ks=G(null);function eg(){var o=Ks.current;return o!==null?o:Nt.pooledCache}function nf(o,u){u===null?R(Ks,Ks.current):R(Ks,u.pool)}function qS(){var o=eg();return o===null?null:{parent:hn._currentValue,pool:o}}var Jo=Error(r(460)),tg=Error(r(474)),rf=Error(r(542)),af={then:function(){}};function IS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function XS(o,u,h){switch(h=o[h],h===void 0?o.push(u):h!==u&&(u.then(ia,ia),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,BS(o),o;default:if(typeof u.status=="string")u.then(ia,ia);else{if(o=Nt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=u,o.status="pending",o.then(function(v){if(u.status==="pending"){var y=u;y.status="fulfilled",y.value=v}},function(v){if(u.status==="pending"){var y=u;y.status="rejected",y.reason=v}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,BS(o),o}throw eo=u,Jo}}function Js(o){try{var u=o._init;return u(o._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(eo=h,Jo):h}}var eo=null;function ZS(){if(eo===null)throw Error(r(459));var o=eo;return eo=null,o}function BS(o){if(o===Jo||o===rf)throw Error(r(483))}var el=null,jc=0;function sf(o){var u=jc;return jc+=1,el===null&&(el=[]),XS(el,o,u)}function Tc(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function of(o,u){throw u.$$typeof===p?Error(r(525)):(o=Object.prototype.toString.call(u),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function VS(o){function u(H,W){if(o){var K=H.deletions;K===null?(H.deletions=[W],H.flags|=16):K.push(W)}}function h(H,W){if(!o)return null;for(;W!==null;)u(H,W),W=W.sibling;return null}function v(H){for(var W=new Map;H!==null;)H.key!==null?W.set(H.key,H):W.set(H.index,H),H=H.sibling;return W}function y(H,W){return H=sa(H,W),H.index=0,H.sibling=null,H}function S(H,W,K){return H.index=K,o?(K=H.alternate,K!==null?(K=K.index,K<W?(H.flags|=67108866,W):K):(H.flags|=67108866,W)):(H.flags|=1048576,W)}function C(H){return o&&H.alternate===null&&(H.flags|=67108866),H}function N(H,W,K,se){return W===null||W.tag!==6?(W=Zp(K,H.mode,se),W.return=H,W):(W=y(W,K),W.return=H,W)}function U(H,W,K,se){var De=K.type;return De===x?ae(H,W,K.props.children,se,K.key):W!==null&&(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&Js(De)===W.type)?(W=y(W,K.props),Tc(W,K),W.return=H,W):(W=Kd(K.type,K.key,K.props,null,H.mode,se),Tc(W,K),W.return=H,W)}function J(H,W,K,se){return W===null||W.tag!==4||W.stateNode.containerInfo!==K.containerInfo||W.stateNode.implementation!==K.implementation?(W=Bp(K,H.mode,se),W.return=H,W):(W=y(W,K.children||[]),W.return=H,W)}function ae(H,W,K,se,De){return W===null||W.tag!==7?(W=Ws(K,H.mode,se,De),W.return=H,W):(W=y(W,K),W.return=H,W)}function oe(H,W,K){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Zp(""+W,H.mode,K),W.return=H,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case O:return K=Kd(W.type,W.key,W.props,null,H.mode,K),Tc(K,W),K.return=H,K;case b:return W=Bp(W,H.mode,K),W.return=H,W;case L:return W=Js(W),oe(H,W,K)}if(Y(W)||X(W))return W=Ws(W,H.mode,K,null),W.return=H,W;if(typeof W.then=="function")return oe(H,sf(W),K);if(W.$$typeof===j)return oe(H,tf(H,W),K);of(H,W)}return null}function te(H,W,K,se){var De=W!==null?W.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return De!==null?null:N(H,W,""+K,se);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case O:return K.key===De?U(H,W,K,se):null;case b:return K.key===De?J(H,W,K,se):null;case L:return K=Js(K),te(H,W,K,se)}if(Y(K)||X(K))return De!==null?null:ae(H,W,K,se,null);if(typeof K.then=="function")return te(H,W,sf(K),se);if(K.$$typeof===j)return te(H,W,tf(H,K),se);of(H,K)}return null}function ne(H,W,K,se,De){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return H=H.get(K)||null,N(W,H,""+se,De);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case O:return H=H.get(se.key===null?K:se.key)||null,U(W,H,se,De);case b:return H=H.get(se.key===null?K:se.key)||null,J(W,H,se,De);case L:return se=Js(se),ne(H,W,K,se,De)}if(Y(se)||X(se))return H=H.get(K)||null,ae(W,H,se,De,null);if(typeof se.then=="function")return ne(H,W,K,sf(se),De);if(se.$$typeof===j)return ne(H,W,K,tf(W,se),De);of(W,se)}return null}function ke(H,W,K,se){for(var De=null,bt=null,Ce=W,Ye=W=0,ut=null;Ce!==null&&Ye<K.length;Ye++){Ce.index>Ye?(ut=Ce,Ce=null):ut=Ce.sibling;var yt=te(H,Ce,K[Ye],se);if(yt===null){Ce===null&&(Ce=ut);break}o&&Ce&&yt.alternate===null&&u(H,Ce),W=S(yt,W,Ye),bt===null?De=yt:bt.sibling=yt,bt=yt,Ce=ut}if(Ye===K.length)return h(H,Ce),dt&&oa(H,Ye),De;if(Ce===null){for(;Ye<K.length;Ye++)Ce=oe(H,K[Ye],se),Ce!==null&&(W=S(Ce,W,Ye),bt===null?De=Ce:bt.sibling=Ce,bt=Ce);return dt&&oa(H,Ye),De}for(Ce=v(Ce);Ye<K.length;Ye++)ut=ne(Ce,H,Ye,K[Ye],se),ut!==null&&(o&&ut.alternate!==null&&Ce.delete(ut.key===null?Ye:ut.key),W=S(ut,W,Ye),bt===null?De=ut:bt.sibling=ut,bt=ut);return o&&Ce.forEach(function(ds){return u(H,ds)}),dt&&oa(H,Ye),De}function Ie(H,W,K,se){if(K==null)throw Error(r(151));for(var De=null,bt=null,Ce=W,Ye=W=0,ut=null,yt=K.next();Ce!==null&&!yt.done;Ye++,yt=K.next()){Ce.index>Ye?(ut=Ce,Ce=null):ut=Ce.sibling;var ds=te(H,Ce,yt.value,se);if(ds===null){Ce===null&&(Ce=ut);break}o&&Ce&&ds.alternate===null&&u(H,Ce),W=S(ds,W,Ye),bt===null?De=ds:bt.sibling=ds,bt=ds,Ce=ut}if(yt.done)return h(H,Ce),dt&&oa(H,Ye),De;if(Ce===null){for(;!yt.done;Ye++,yt=K.next())yt=oe(H,yt.value,se),yt!==null&&(W=S(yt,W,Ye),bt===null?De=yt:bt.sibling=yt,bt=yt);return dt&&oa(H,Ye),De}for(Ce=v(Ce);!yt.done;Ye++,yt=K.next())yt=ne(Ce,H,Ye,yt.value,se),yt!==null&&(o&&yt.alternate!==null&&Ce.delete(yt.key===null?Ye:yt.key),W=S(yt,W,Ye),bt===null?De=yt:bt.sibling=yt,bt=yt);return o&&Ce.forEach(function(UD){return u(H,UD)}),dt&&oa(H,Ye),De}function Qt(H,W,K,se){if(typeof K=="object"&&K!==null&&K.type===x&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case O:e:{for(var De=K.key;W!==null;){if(W.key===De){if(De=K.type,De===x){if(W.tag===7){h(H,W.sibling),se=y(W,K.props.children),se.return=H,H=se;break e}}else if(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&Js(De)===W.type){h(H,W.sibling),se=y(W,K.props),Tc(se,K),se.return=H,H=se;break e}h(H,W);break}else u(H,W);W=W.sibling}K.type===x?(se=Ws(K.props.children,H.mode,se,K.key),se.return=H,H=se):(se=Kd(K.type,K.key,K.props,null,H.mode,se),Tc(se,K),se.return=H,H=se)}return C(H);case b:e:{for(De=K.key;W!==null;){if(W.key===De)if(W.tag===4&&W.stateNode.containerInfo===K.containerInfo&&W.stateNode.implementation===K.implementation){h(H,W.sibling),se=y(W,K.children||[]),se.return=H,H=se;break e}else{h(H,W);break}else u(H,W);W=W.sibling}se=Bp(K,H.mode,se),se.return=H,H=se}return C(H);case L:return K=Js(K),Qt(H,W,K,se)}if(Y(K))return ke(H,W,K,se);if(X(K)){if(De=X(K),typeof De!="function")throw Error(r(150));return K=De.call(K),Ie(H,W,K,se)}if(typeof K.then=="function")return Qt(H,W,sf(K),se);if(K.$$typeof===j)return Qt(H,W,tf(H,K),se);of(H,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,W!==null&&W.tag===6?(h(H,W.sibling),se=y(W,K),se.return=H,H=se):(h(H,W),se=Zp(K,H.mode,se),se.return=H,H=se),C(H)):h(H,W)}return function(H,W,K,se){try{jc=0;var De=Qt(H,W,K,se);return el=null,De}catch(Ce){if(Ce===Jo||Ce===rf)throw Ce;var bt=_r(29,Ce,null,H.mode);return bt.lanes=se,bt.return=H,bt}finally{}}}var to=VS(!0),US=VS(!1),Wa=!1;function ng(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rg(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Fa(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ha(o,u,h){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(xt&2)!==0){var y=v.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),v.pending=u,u=Gd(o),ES(o,null,h),u}return Hd(o,v,u,h),Gd(o)}function Cc(o,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194048)!==0)){var v=u.lanes;v&=o.pendingLanes,h|=v,u.lanes=h,je(o,h)}}function ig(o,u){var h=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var y=null,S=null;if(h=h.firstBaseUpdate,h!==null){do{var C={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};S===null?y=S=C:S=S.next=C,h=h.next}while(h!==null);S===null?y=S=u:S=S.next=u}else y=S=u;h={baseState:v.baseState,firstBaseUpdate:y,lastBaseUpdate:S,shared:v.shared,callbacks:v.callbacks},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=u:o.next=u,h.lastBaseUpdate=u}var ag=!1;function Ec(){if(ag){var o=Ko;if(o!==null)throw o}}function Qc(o,u,h,v){ag=!1;var y=o.updateQueue;Wa=!1;var S=y.firstBaseUpdate,C=y.lastBaseUpdate,N=y.shared.pending;if(N!==null){y.shared.pending=null;var U=N,J=U.next;U.next=null,C===null?S=J:C.next=J,C=U;var ae=o.alternate;ae!==null&&(ae=ae.updateQueue,N=ae.lastBaseUpdate,N!==C&&(N===null?ae.firstBaseUpdate=J:N.next=J,ae.lastBaseUpdate=U))}if(S!==null){var oe=y.baseState;C=0,ae=J=U=null,N=S;do{var te=N.lane&-536870913,ne=te!==N.lane;if(ne?(ct&te)===te:(v&te)===te){te!==0&&te===Go&&(ag=!0),ae!==null&&(ae=ae.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var ke=o,Ie=N;te=u;var Qt=h;switch(Ie.tag){case 1:if(ke=Ie.payload,typeof ke=="function"){oe=ke.call(Qt,oe,te);break e}oe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ie.payload,te=typeof ke=="function"?ke.call(Qt,oe,te):ke,te==null)break e;oe=m({},oe,te);break e;case 2:Wa=!0}}te=N.callback,te!==null&&(o.flags|=64,ne&&(o.flags|=8192),ne=y.callbacks,ne===null?y.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ae===null?(J=ae=ne,U=oe):ae=ae.next=ne,C|=te;if(N=N.next,N===null){if(N=y.shared.pending,N===null)break;ne=N,N=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);ae===null&&(U=oe),y.baseState=U,y.firstBaseUpdate=J,y.lastBaseUpdate=ae,S===null&&(y.shared.lanes=0),ts|=C,o.lanes=C,o.memoizedState=oe}}function YS(o,u){if(typeof o!="function")throw Error(r(191,o));o.call(u)}function WS(o,u){var h=o.callbacks;if(h!==null)for(o.callbacks=null,o=0;o<h.length;o++)YS(h[o],u)}var tl=G(null),lf=G(0);function FS(o,u){o=Oa,R(lf,o),R(tl,u),Oa=o|u.baseLanes}function sg(){R(lf,Oa),R(tl,tl.current)}function og(){Oa=lf.current,re(tl),re(lf)}var kr=G(null),Ur=null;function Ga(o){var u=o.alternate;R(ln,ln.current&1),R(kr,o),Ur===null&&(u===null||tl.current!==null||u.memoizedState!==null)&&(Ur=o)}function lg(o){R(ln,ln.current),R(kr,o),Ur===null&&(Ur=o)}function HS(o){o.tag===22?(R(ln,ln.current),R(kr,o),Ur===null&&(Ur=o)):Ka()}function Ka(){R(ln,ln.current),R(kr,kr.current)}function jr(o){re(kr),Ur===o&&(Ur=null),re(ln)}var ln=G(0);function cf(o){for(var u=o;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||mv(h)||pv(h)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var ua=0,Ue=null,Ct=null,mn=null,uf=!1,nl=!1,no=!1,df=0,Ac=0,rl=null,LL=0;function en(){throw Error(r(321))}function cg(o,u){if(u===null)return!1;for(var h=0;h<u.length&&h<o.length;h++)if(!wr(o[h],u[h]))return!1;return!0}function ug(o,u,h,v,y,S){return ua=S,Ue=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,$.H=o===null||o.memoizedState===null?Nw:kg,no=!1,S=h(v,y),no=!1,nl&&(S=KS(u,h,v,y)),GS(o),S}function GS(o){$.H=Rc;var u=Ct!==null&&Ct.next!==null;if(ua=0,mn=Ct=Ue=null,uf=!1,Ac=0,rl=null,u)throw Error(r(300));o===null||pn||(o=o.dependencies,o!==null&&ef(o)&&(pn=!0))}function KS(o,u,h,v){Ue=o;var y=0;do{if(nl&&(rl=null),Ac=0,nl=!1,25<=y)throw Error(r(301));if(y+=1,mn=Ct=null,o.updateQueue!=null){var S=o.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}$.H=Rw,S=u(h,v)}while(nl);return S}function DL(){var o=$.H,u=o.useState()[0];return u=typeof u.then=="function"?Pc(u):u,o=o.useState()[0],(Ct!==null?Ct.memoizedState:null)!==o&&(Ue.flags|=1024),u}function dg(){var o=df!==0;return df=0,o}function fg(o,u,h){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~h}function hg(o){if(uf){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}uf=!1}ua=0,mn=Ct=Ue=null,nl=!1,Ac=df=0,rl=null}function Fn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mn===null?Ue.memoizedState=mn=o:mn=mn.next=o,mn}function cn(){if(Ct===null){var o=Ue.alternate;o=o!==null?o.memoizedState:null}else o=Ct.next;var u=mn===null?Ue.memoizedState:mn.next;if(u!==null)mn=u,Ct=o;else{if(o===null)throw Ue.alternate===null?Error(r(467)):Error(r(310));Ct=o,o={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},mn===null?Ue.memoizedState=mn=o:mn=mn.next=o}return mn}function ff(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pc(o){var u=Ac;return Ac+=1,rl===null&&(rl=[]),o=XS(rl,o,u),u=Ue,(mn===null?u.memoizedState:mn.next)===null&&(u=u.alternate,$.H=u===null||u.memoizedState===null?Nw:kg),o}function hf(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Pc(o);if(o.$$typeof===j)return Nn(o)}throw Error(r(438,String(o)))}function mg(o){var u=null,h=Ue.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var v=Ue.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(u={data:v.data.map(function(y){return y.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=ff(),Ue.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(o),v=0;v<o;v++)h[v]=P;return u.index++,h}function da(o,u){return typeof u=="function"?u(o):u}function mf(o){var u=cn();return pg(u,Ct,o)}function pg(o,u,h){var v=o.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=h;var y=o.baseQueue,S=v.pending;if(S!==null){if(y!==null){var C=y.next;y.next=S.next,S.next=C}u.baseQueue=y=S,v.pending=null}if(S=o.baseState,y===null)o.memoizedState=S;else{u=y.next;var N=C=null,U=null,J=u,ae=!1;do{var oe=J.lane&-536870913;if(oe!==J.lane?(ct&oe)===oe:(ua&oe)===oe){var te=J.revertLane;if(te===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),oe===Go&&(ae=!0);else if((ua&te)===te){J=J.next,te===Go&&(ae=!0);continue}else oe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(N=U=oe,C=S):U=U.next=oe,Ue.lanes|=te,ts|=te;oe=J.action,no&&h(S,oe),S=J.hasEagerState?J.eagerState:h(S,oe)}else te={lane:oe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(N=U=te,C=S):U=U.next=te,Ue.lanes|=oe,ts|=oe;J=J.next}while(J!==null&&J!==u);if(U===null?C=S:U.next=N,!wr(S,o.memoizedState)&&(pn=!0,ae&&(h=Ko,h!==null)))throw h;o.memoizedState=S,o.baseState=C,o.baseQueue=U,v.lastRenderedState=S}return y===null&&(v.lanes=0),[o.memoizedState,v.dispatch]}function gg(o){var u=cn(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=o;var v=h.dispatch,y=h.pending,S=u.memoizedState;if(y!==null){h.pending=null;var C=y=y.next;do S=o(S,C.action),C=C.next;while(C!==y);wr(S,u.memoizedState)||(pn=!0),u.memoizedState=S,u.baseQueue===null&&(u.baseState=S),h.lastRenderedState=S}return[S,v]}function JS(o,u,h){var v=Ue,y=cn(),S=dt;if(S){if(h===void 0)throw Error(r(407));h=h()}else h=u();var C=!wr((Ct||y).memoizedState,h);if(C&&(y.memoizedState=h,pn=!0),y=y.queue,bg(nw.bind(null,v,y,o),[o]),y.getSnapshot!==u||C||mn!==null&&mn.memoizedState.tag&1){if(v.flags|=2048,il(9,{destroy:void 0},tw.bind(null,v,y,h,u),null),Nt===null)throw Error(r(349));S||(ua&127)!==0||ew(v,u,h)}return h}function ew(o,u,h){o.flags|=16384,o={getSnapshot:u,value:h},u=Ue.updateQueue,u===null?(u=ff(),Ue.updateQueue=u,u.stores=[o]):(h=u.stores,h===null?u.stores=[o]:h.push(o))}function tw(o,u,h,v){u.value=h,u.getSnapshot=v,rw(u)&&iw(o)}function nw(o,u,h){return h(function(){rw(u)&&iw(o)})}function rw(o){var u=o.getSnapshot;o=o.value;try{var h=u();return!wr(o,h)}catch{return!0}}function iw(o){var u=Ys(o,2);u!==null&&cr(u,o,2)}function vg(o){var u=Fn();if(typeof o=="function"){var h=o;if(o=h(),no){Jt(!0);try{h()}finally{Jt(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:o},u}function aw(o,u,h,v){return o.baseState=h,pg(o,Ct,typeof v=="function"?v:da)}function zL(o,u,h,v,y){if(vf(o))throw Error(r(485));if(o=u.action,o!==null){var S={payload:y,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){S.listeners.push(C)}};$.T!==null?h(!0):S.isTransition=!1,v(S),h=u.pending,h===null?(S.next=u.pending=S,sw(u,S)):(S.next=h.next,u.pending=h.next=S)}}function sw(o,u){var h=u.action,v=u.payload,y=o.state;if(u.isTransition){var S=$.T,C={};$.T=C;try{var N=h(y,v),U=$.S;U!==null&&U(C,N),ow(o,u,N)}catch(J){Og(o,u,J)}finally{S!==null&&C.types!==null&&(S.types=C.types),$.T=S}}else try{S=h(y,v),ow(o,u,S)}catch(J){Og(o,u,J)}}function ow(o,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){lw(o,u,v)},function(v){return Og(o,u,v)}):lw(o,u,h)}function lw(o,u,h){u.status="fulfilled",u.value=h,cw(u),o.state=h,u=o.pending,u!==null&&(h=u.next,h===u?o.pending=null:(h=h.next,u.next=h,sw(o,h)))}function Og(o,u,h){var v=o.pending;if(o.pending=null,v!==null){v=v.next;do u.status="rejected",u.reason=h,cw(u),u=u.next;while(u!==v)}o.action=null}function cw(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function uw(o,u){return u}function dw(o,u){if(dt){var h=Nt.formState;if(h!==null){e:{var v=Ue;if(dt){if(Vt){t:{for(var y=Vt,S=Vr;y.nodeType!==8;){if(!S){y=null;break t}if(y=Yr(y.nextSibling),y===null){y=null;break t}}S=y.data,y=S==="F!"||S==="F"?y:null}if(y){Vt=Yr(y.nextSibling),v=y.data==="F!";break e}}Ua(v)}v=!1}v&&(u=h[0])}}return h=Fn(),h.memoizedState=h.baseState=u,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uw,lastRenderedState:u},h.queue=v,h=Qw.bind(null,Ue,v),v.dispatch=h,v=vg(!1),S=_g.bind(null,Ue,!1,v.queue),v=Fn(),y={state:u,dispatch:null,action:o,pending:null},v.queue=y,h=zL.bind(null,Ue,y,S,h),y.dispatch=h,v.memoizedState=o,[u,h,!1]}function fw(o){var u=cn();return hw(u,Ct,o)}function hw(o,u,h){if(u=pg(o,u,uw)[0],o=mf(da)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var v=Pc(u)}catch(C){throw C===Jo?rf:C}else v=u;u=cn();var y=u.queue,S=y.dispatch;return h!==u.memoizedState&&(Ue.flags|=2048,il(9,{destroy:void 0},$L.bind(null,y,h),null)),[v,S,o]}function $L(o,u){o.action=u}function mw(o){var u=cn(),h=Ct;if(h!==null)return hw(u,h,o);cn(),u=u.memoizedState,h=cn();var v=h.queue.dispatch;return h.memoizedState=o,[u,v,!1]}function il(o,u,h,v){return o={tag:o,create:h,deps:v,inst:u,next:null},u=Ue.updateQueue,u===null&&(u=ff(),Ue.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=o.next=o:(v=h.next,h.next=o,o.next=v,u.lastEffect=o),o}function pw(){return cn().memoizedState}function pf(o,u,h,v){var y=Fn();Ue.flags|=o,y.memoizedState=il(1|u,{destroy:void 0},h,v===void 0?null:v)}function gf(o,u,h,v){var y=cn();v=v===void 0?null:v;var S=y.memoizedState.inst;Ct!==null&&v!==null&&cg(v,Ct.memoizedState.deps)?y.memoizedState=il(u,S,h,v):(Ue.flags|=o,y.memoizedState=il(1|u,S,h,v))}function gw(o,u){pf(8390656,8,o,u)}function bg(o,u){gf(2048,8,o,u)}function qL(o){Ue.flags|=4;var u=Ue.updateQueue;if(u===null)u=ff(),Ue.updateQueue=u,u.events=[o];else{var h=u.events;h===null?u.events=[o]:h.push(o)}}function vw(o){var u=cn().memoizedState;return qL({ref:u,nextImpl:o}),function(){if((xt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function Ow(o,u){return gf(4,2,o,u)}function bw(o,u){return gf(4,4,o,u)}function yw(o,u){if(typeof u=="function"){o=o();var h=u(o);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function xw(o,u,h){h=h!=null?h.concat([o]):null,gf(4,4,yw.bind(null,u,o),h)}function yg(){}function Sw(o,u){var h=cn();u=u===void 0?null:u;var v=h.memoizedState;return u!==null&&cg(u,v[1])?v[0]:(h.memoizedState=[o,u],o)}function ww(o,u){var h=cn();u=u===void 0?null:u;var v=h.memoizedState;if(u!==null&&cg(u,v[1]))return v[0];if(v=o(),no){Jt(!0);try{o()}finally{Jt(!1)}}return h.memoizedState=[v,u],v}function xg(o,u,h){return h===void 0||(ua&1073741824)!==0&&(ct&261930)===0?o.memoizedState=u:(o.memoizedState=h,o=__(),Ue.lanes|=o,ts|=o,h)}function _w(o,u,h,v){return wr(h,u)?h:tl.current!==null?(o=xg(o,h,v),wr(o,u)||(pn=!0),o):(ua&42)===0||(ua&1073741824)!==0&&(ct&261930)===0?(pn=!0,o.memoizedState=h):(o=__(),Ue.lanes|=o,ts|=o,u)}function kw(o,u,h,v,y){var S=q.p;q.p=S!==0&&8>S?S:8;var C=$.T,N={};$.T=N,_g(o,!1,u,h);try{var U=y(),J=$.S;if(J!==null&&J(N,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ae=ML(U,v);Nc(o,u,ae,Er(o))}else Nc(o,u,v,Er(o))}catch(oe){Nc(o,u,{then:function(){},status:"rejected",reason:oe},Er())}finally{q.p=S,C!==null&&N.types!==null&&(C.types=N.types),$.T=C}}function IL(){}function Sg(o,u,h,v){if(o.tag!==5)throw Error(r(476));var y=jw(o).queue;kw(o,y,u,ee,h===null?IL:function(){return Tw(o),h(v)})}function jw(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:ee},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:h},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function Tw(o){var u=jw(o);u.next===null&&(u=o.alternate.memoizedState),Nc(o,u.next.queue,{},Er())}function wg(){return Nn(Hc)}function Cw(){return cn().memoizedState}function Ew(){return cn().memoizedState}function XL(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var h=Er();o=Fa(h);var v=Ha(u,o,h);v!==null&&(cr(v,u,h),Cc(v,u,h)),u={cache:Kp()},o.payload=u;return}u=u.return}}function ZL(o,u,h){var v=Er();h={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},vf(o)?Aw(u,h):(h=Ip(o,u,h,v),h!==null&&(cr(h,o,v),Pw(h,u,v)))}function Qw(o,u,h){var v=Er();Nc(o,u,h,v)}function Nc(o,u,h,v){var y={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(vf(o))Aw(u,y);else{var S=o.alternate;if(o.lanes===0&&(S===null||S.lanes===0)&&(S=u.lastRenderedReducer,S!==null))try{var C=u.lastRenderedState,N=S(C,h);if(y.hasEagerState=!0,y.eagerState=N,wr(N,C))return Hd(o,u,y,0),Nt===null&&Fd(),!1}catch{}finally{}if(h=Ip(o,u,y,v),h!==null)return cr(h,o,v),Pw(h,u,v),!0}return!1}function _g(o,u,h,v){if(v={lane:2,revertLane:nv(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},vf(o)){if(u)throw Error(r(479))}else u=Ip(o,h,v,2),u!==null&&cr(u,o,2)}function vf(o){var u=o.alternate;return o===Ue||u!==null&&u===Ue}function Aw(o,u){nl=uf=!0;var h=o.pending;h===null?u.next=u:(u.next=h.next,h.next=u),o.pending=u}function Pw(o,u,h){if((h&4194048)!==0){var v=u.lanes;v&=o.pendingLanes,h|=v,u.lanes=h,je(o,h)}}var Rc={readContext:Nn,use:hf,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en,useHostTransitionStatus:en,useFormState:en,useActionState:en,useOptimistic:en,useMemoCache:en,useCacheRefresh:en};Rc.useEffectEvent=en;var Nw={readContext:Nn,use:hf,useCallback:function(o,u){return Fn().memoizedState=[o,u===void 0?null:u],o},useContext:Nn,useEffect:gw,useImperativeHandle:function(o,u,h){h=h!=null?h.concat([o]):null,pf(4194308,4,yw.bind(null,u,o),h)},useLayoutEffect:function(o,u){return pf(4194308,4,o,u)},useInsertionEffect:function(o,u){pf(4,2,o,u)},useMemo:function(o,u){var h=Fn();u=u===void 0?null:u;var v=o();if(no){Jt(!0);try{o()}finally{Jt(!1)}}return h.memoizedState=[v,u],v},useReducer:function(o,u,h){var v=Fn();if(h!==void 0){var y=h(u);if(no){Jt(!0);try{h(u)}finally{Jt(!1)}}}else y=u;return v.memoizedState=v.baseState=y,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:y},v.queue=o,o=o.dispatch=ZL.bind(null,Ue,o),[v.memoizedState,o]},useRef:function(o){var u=Fn();return o={current:o},u.memoizedState=o},useState:function(o){o=vg(o);var u=o.queue,h=Qw.bind(null,Ue,u);return u.dispatch=h,[o.memoizedState,h]},useDebugValue:yg,useDeferredValue:function(o,u){var h=Fn();return xg(h,o,u)},useTransition:function(){var o=vg(!1);return o=kw.bind(null,Ue,o.queue,!0,!1),Fn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,h){var v=Ue,y=Fn();if(dt){if(h===void 0)throw Error(r(407));h=h()}else{if(h=u(),Nt===null)throw Error(r(349));(ct&127)!==0||ew(v,u,h)}y.memoizedState=h;var S={value:h,getSnapshot:u};return y.queue=S,gw(nw.bind(null,v,S,o),[o]),v.flags|=2048,il(9,{destroy:void 0},tw.bind(null,v,S,h,u),null),h},useId:function(){var o=Fn(),u=Nt.identifierPrefix;if(dt){var h=Ai,v=Qi;h=(v&~(1<<32-mt(v)-1)).toString(32)+h,u="_"+u+"R_"+h,h=df++,0<h&&(u+="H"+h.toString(32)),u+="_"}else h=LL++,u="_"+u+"r_"+h.toString(32)+"_";return o.memoizedState=u},useHostTransitionStatus:wg,useFormState:dw,useActionState:dw,useOptimistic:function(o){var u=Fn();u.memoizedState=u.baseState=o;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=_g.bind(null,Ue,!0,h),h.dispatch=u,[o,u]},useMemoCache:mg,useCacheRefresh:function(){return Fn().memoizedState=XL.bind(null,Ue)},useEffectEvent:function(o){var u=Fn(),h={impl:o};return u.memoizedState=h,function(){if((xt&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},kg={readContext:Nn,use:hf,useCallback:Sw,useContext:Nn,useEffect:bg,useImperativeHandle:xw,useInsertionEffect:Ow,useLayoutEffect:bw,useMemo:ww,useReducer:mf,useRef:pw,useState:function(){return mf(da)},useDebugValue:yg,useDeferredValue:function(o,u){var h=cn();return _w(h,Ct.memoizedState,o,u)},useTransition:function(){var o=mf(da)[0],u=cn().memoizedState;return[typeof o=="boolean"?o:Pc(o),u]},useSyncExternalStore:JS,useId:Cw,useHostTransitionStatus:wg,useFormState:fw,useActionState:fw,useOptimistic:function(o,u){var h=cn();return aw(h,Ct,o,u)},useMemoCache:mg,useCacheRefresh:Ew};kg.useEffectEvent=vw;var Rw={readContext:Nn,use:hf,useCallback:Sw,useContext:Nn,useEffect:bg,useImperativeHandle:xw,useInsertionEffect:Ow,useLayoutEffect:bw,useMemo:ww,useReducer:gg,useRef:pw,useState:function(){return gg(da)},useDebugValue:yg,useDeferredValue:function(o,u){var h=cn();return Ct===null?xg(h,o,u):_w(h,Ct.memoizedState,o,u)},useTransition:function(){var o=gg(da)[0],u=cn().memoizedState;return[typeof o=="boolean"?o:Pc(o),u]},useSyncExternalStore:JS,useId:Cw,useHostTransitionStatus:wg,useFormState:mw,useActionState:mw,useOptimistic:function(o,u){var h=cn();return Ct!==null?aw(h,Ct,o,u):(h.baseState=o,[o,h.queue.dispatch])},useMemoCache:mg,useCacheRefresh:Ew};Rw.useEffectEvent=vw;function jg(o,u,h,v){u=o.memoizedState,h=h(v,u),h=h==null?u:m({},u,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}var Tg={enqueueSetState:function(o,u,h){o=o._reactInternals;var v=Er(),y=Fa(v);y.payload=u,h!=null&&(y.callback=h),u=Ha(o,y,v),u!==null&&(cr(u,o,v),Cc(u,o,v))},enqueueReplaceState:function(o,u,h){o=o._reactInternals;var v=Er(),y=Fa(v);y.tag=1,y.payload=u,h!=null&&(y.callback=h),u=Ha(o,y,v),u!==null&&(cr(u,o,v),Cc(u,o,v))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var h=Er(),v=Fa(h);v.tag=2,u!=null&&(v.callback=u),u=Ha(o,v,h),u!==null&&(cr(u,o,h),Cc(u,o,h))}};function Mw(o,u,h,v,y,S,C){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(v,S,C):u.prototype&&u.prototype.isPureReactComponent?!yc(h,v)||!yc(y,S):!0}function Lw(o,u,h,v){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,v),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,v),u.state!==o&&Tg.enqueueReplaceState(u,u.state,null)}function ro(o,u){var h=u;if("ref"in u){h={};for(var v in u)v!=="ref"&&(h[v]=u[v])}if(o=o.defaultProps){h===u&&(h=m({},h));for(var y in o)h[y]===void 0&&(h[y]=o[y])}return h}function Dw(o){Wd(o)}function zw(o){console.error(o)}function $w(o){Wd(o)}function Of(o,u){try{var h=o.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(v){setTimeout(function(){throw v})}}function qw(o,u,h){try{var v=o.onCaughtError;v(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Cg(o,u,h){return h=Fa(h),h.tag=3,h.payload={element:null},h.callback=function(){Of(o,u)},h}function Iw(o){return o=Fa(o),o.tag=3,o}function Xw(o,u,h,v){var y=h.type.getDerivedStateFromError;if(typeof y=="function"){var S=v.value;o.payload=function(){return y(S)},o.callback=function(){qw(u,h,v)}}var C=h.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(o.callback=function(){qw(u,h,v),typeof y!="function"&&(ns===null?ns=new Set([this]):ns.add(this));var N=v.stack;this.componentDidCatch(v.value,{componentStack:N!==null?N:""})})}function BL(o,u,h,v,y){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(u=h.alternate,u!==null&&Ho(u,h,y,!0),h=kr.current,h!==null){switch(h.tag){case 31:case 13:return Ur===null?Qf():h.alternate===null&&tn===0&&(tn=3),h.flags&=-257,h.flags|=65536,h.lanes=y,v===af?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([v]):u.add(v),Jg(o,v,y)),!1;case 22:return h.flags|=65536,v===af?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([v])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([v]):h.add(v)),Jg(o,v,y)),!1}throw Error(r(435,h.tag))}return Jg(o,v,y),Qf(),!1}if(dt)return u=kr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=y,v!==Yp&&(o=Error(r(422),{cause:v}),wc(Xr(o,h)))):(v!==Yp&&(u=Error(r(423),{cause:v}),wc(Xr(u,h))),o=o.current.alternate,o.flags|=65536,y&=-y,o.lanes|=y,v=Xr(v,h),y=Cg(o.stateNode,v,y),ig(o,y),tn!==4&&(tn=2)),!1;var S=Error(r(520),{cause:v});if(S=Xr(S,h),Xc===null?Xc=[S]:Xc.push(S),tn!==4&&(tn=2),u===null)return!0;v=Xr(v,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,o=y&-y,h.lanes|=o,o=Cg(h.stateNode,v,o),ig(h,o),!1;case 1:if(u=h.type,S=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(ns===null||!ns.has(S))))return h.flags|=65536,y&=-y,h.lanes|=y,y=Iw(y),Xw(y,o,h,v),ig(h,y),!1}h=h.return}while(h!==null);return!1}var Eg=Error(r(461)),pn=!1;function Rn(o,u,h,v){u.child=o===null?US(u,null,h,v):to(u,o.child,h,v)}function Zw(o,u,h,v,y){h=h.render;var S=u.ref;if("ref"in v){var C={};for(var N in v)N!=="ref"&&(C[N]=v[N])}else C=v;return Gs(u),v=ug(o,u,h,C,S,y),N=dg(),o!==null&&!pn?(fg(o,u,y),fa(o,u,y)):(dt&&N&&Vp(u),u.flags|=1,Rn(o,u,v,y),u.child)}function Bw(o,u,h,v,y){if(o===null){var S=h.type;return typeof S=="function"&&!Xp(S)&&S.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=S,Vw(o,u,S,v,y)):(o=Kd(h.type,null,v,u,u.mode,y),o.ref=u.ref,o.return=u,u.child=o)}if(S=o.child,!Dg(o,y)){var C=S.memoizedProps;if(h=h.compare,h=h!==null?h:yc,h(C,v)&&o.ref===u.ref)return fa(o,u,y)}return u.flags|=1,o=sa(S,v),o.ref=u.ref,o.return=u,u.child=o}function Vw(o,u,h,v,y){if(o!==null){var S=o.memoizedProps;if(yc(S,v)&&o.ref===u.ref)if(pn=!1,u.pendingProps=v=S,Dg(o,y))(o.flags&131072)!==0&&(pn=!0);else return u.lanes=o.lanes,fa(o,u,y)}return Qg(o,u,h,v,y)}function Uw(o,u,h,v){var y=v.children,S=o!==null?o.memoizedState:null;if(o===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((u.flags&128)!==0){if(S=S!==null?S.baseLanes|h:h,o!==null){for(v=u.child=o.child,y=0;v!==null;)y=y|v.lanes|v.childLanes,v=v.sibling;v=y&~S}else v=0,u.child=null;return Yw(o,u,S,h,v)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&nf(u,S!==null?S.cachePool:null),S!==null?FS(u,S):sg(),HS(u);else return v=u.lanes=536870912,Yw(o,u,S!==null?S.baseLanes|h:h,h,v)}else S!==null?(nf(u,S.cachePool),FS(u,S),Ka(),u.memoizedState=null):(o!==null&&nf(u,null),sg(),Ka());return Rn(o,u,y,h),u.child}function Mc(o,u){return o!==null&&o.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function Yw(o,u,h,v,y){var S=eg();return S=S===null?null:{parent:hn._currentValue,pool:S},u.memoizedState={baseLanes:h,cachePool:S},o!==null&&nf(u,null),sg(),HS(u),o!==null&&Ho(o,u,v,!0),u.childLanes=y,null}function bf(o,u){return u=xf({mode:u.mode,children:u.children},o.mode),u.ref=o.ref,o.child=u,u.return=o,u}function Ww(o,u,h){return to(u,o.child,null,h),o=bf(u,u.pendingProps),o.flags|=2,jr(u),u.memoizedState=null,o}function VL(o,u,h){var v=u.pendingProps,y=(u.flags&128)!==0;if(u.flags&=-129,o===null){if(dt){if(v.mode==="hidden")return o=bf(u,v),u.lanes=536870912,Mc(null,o);if(lg(u),(o=Vt)?(o=s1(o,Vr),o=o!==null&&o.data==="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ba!==null?{id:Qi,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},h=AS(o),h.return=u,u.child=h,Pn=u,Vt=null)):o=null,o===null)throw Ua(u);return u.lanes=536870912,null}return bf(u,v)}var S=o.memoizedState;if(S!==null){var C=S.dehydrated;if(lg(u),y)if(u.flags&256)u.flags&=-257,u=Ww(o,u,h);else if(u.memoizedState!==null)u.child=o.child,u.flags|=128,u=null;else throw Error(r(558));else if(pn||Ho(o,u,h,!1),y=(h&o.childLanes)!==0,pn||y){if(v=Nt,v!==null&&(C=Je(v,h),C!==0&&C!==S.retryLane))throw S.retryLane=C,Ys(o,C),cr(v,o,C),Eg;Qf(),u=Ww(o,u,h)}else o=S.treeContext,Vt=Yr(C.nextSibling),Pn=u,dt=!0,Va=null,Vr=!1,o!==null&&RS(u,o),u=bf(u,v),u.flags|=4096;return u}return o=sa(o.child,{mode:v.mode,children:v.children}),o.ref=u.ref,u.child=o,o.return=u,o}function yf(o,u){var h=u.ref;if(h===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(o===null||o.ref!==h)&&(u.flags|=4194816)}}function Qg(o,u,h,v,y){return Gs(u),h=ug(o,u,h,v,void 0,y),v=dg(),o!==null&&!pn?(fg(o,u,y),fa(o,u,y)):(dt&&v&&Vp(u),u.flags|=1,Rn(o,u,h,y),u.child)}function Fw(o,u,h,v,y,S){return Gs(u),u.updateQueue=null,h=KS(u,v,h,y),GS(o),v=dg(),o!==null&&!pn?(fg(o,u,S),fa(o,u,S)):(dt&&v&&Vp(u),u.flags|=1,Rn(o,u,h,S),u.child)}function Hw(o,u,h,v,y){if(Gs(u),u.stateNode===null){var S=Uo,C=h.contextType;typeof C=="object"&&C!==null&&(S=Nn(C)),S=new h(v,S),u.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Tg,u.stateNode=S,S._reactInternals=u,S=u.stateNode,S.props=v,S.state=u.memoizedState,S.refs={},ng(u),C=h.contextType,S.context=typeof C=="object"&&C!==null?Nn(C):Uo,S.state=u.memoizedState,C=h.getDerivedStateFromProps,typeof C=="function"&&(jg(u,h,C,v),S.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(C=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),C!==S.state&&Tg.enqueueReplaceState(S,S.state,null),Qc(u,v,S,y),Ec(),S.state=u.memoizedState),typeof S.componentDidMount=="function"&&(u.flags|=4194308),v=!0}else if(o===null){S=u.stateNode;var N=u.memoizedProps,U=ro(h,N);S.props=U;var J=S.context,ae=h.contextType;C=Uo,typeof ae=="object"&&ae!==null&&(C=Nn(ae));var oe=h.getDerivedStateFromProps;ae=typeof oe=="function"||typeof S.getSnapshotBeforeUpdate=="function",N=u.pendingProps!==N,ae||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(N||J!==C)&&Lw(u,S,v,C),Wa=!1;var te=u.memoizedState;S.state=te,Qc(u,v,S,y),Ec(),J=u.memoizedState,N||te!==J||Wa?(typeof oe=="function"&&(jg(u,h,oe,v),J=u.memoizedState),(U=Wa||Mw(u,h,U,v,te,J,C))?(ae||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(u.flags|=4194308)):(typeof S.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=v,u.memoizedState=J),S.props=v,S.state=J,S.context=C,v=U):(typeof S.componentDidMount=="function"&&(u.flags|=4194308),v=!1)}else{S=u.stateNode,rg(o,u),C=u.memoizedProps,ae=ro(h,C),S.props=ae,oe=u.pendingProps,te=S.context,J=h.contextType,U=Uo,typeof J=="object"&&J!==null&&(U=Nn(J)),N=h.getDerivedStateFromProps,(J=typeof N=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(C!==oe||te!==U)&&Lw(u,S,v,U),Wa=!1,te=u.memoizedState,S.state=te,Qc(u,v,S,y),Ec();var ne=u.memoizedState;C!==oe||te!==ne||Wa||o!==null&&o.dependencies!==null&&ef(o.dependencies)?(typeof N=="function"&&(jg(u,h,N,v),ne=u.memoizedState),(ae=Wa||Mw(u,h,ae,v,te,ne,U)||o!==null&&o.dependencies!==null&&ef(o.dependencies))?(J||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(v,ne,U),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(v,ne,U)),typeof S.componentDidUpdate=="function"&&(u.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof S.componentDidUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=1024),u.memoizedProps=v,u.memoizedState=ne),S.props=v,S.state=ne,S.context=U,v=ae):(typeof S.componentDidUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||C===o.memoizedProps&&te===o.memoizedState||(u.flags|=1024),v=!1)}return S=v,yf(o,u),v=(u.flags&128)!==0,S||v?(S=u.stateNode,h=v&&typeof h.getDerivedStateFromError!="function"?null:S.render(),u.flags|=1,o!==null&&v?(u.child=to(u,o.child,null,y),u.child=to(u,null,h,y)):Rn(o,u,h,y),u.memoizedState=S.state,o=u.child):o=fa(o,u,y),o}function Gw(o,u,h,v){return Fs(),u.flags|=256,Rn(o,u,h,v),u.child}var Ag={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pg(o){return{baseLanes:o,cachePool:qS()}}function Ng(o,u,h){return o=o!==null?o.childLanes&~h:0,u&&(o|=Cr),o}function Kw(o,u,h){var v=u.pendingProps,y=!1,S=(u.flags&128)!==0,C;if((C=S)||(C=o!==null&&o.memoizedState===null?!1:(ln.current&2)!==0),C&&(y=!0,u.flags&=-129),C=(u.flags&32)!==0,u.flags&=-33,o===null){if(dt){if(y?Ga(u):Ka(),(o=Vt)?(o=s1(o,Vr),o=o!==null&&o.data!=="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ba!==null?{id:Qi,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},h=AS(o),h.return=u,u.child=h,Pn=u,Vt=null)):o=null,o===null)throw Ua(u);return pv(o)?u.lanes=32:u.lanes=536870912,null}var N=v.children;return v=v.fallback,y?(Ka(),y=u.mode,N=xf({mode:"hidden",children:N},y),v=Ws(v,y,h,null),N.return=u,v.return=u,N.sibling=v,u.child=N,v=u.child,v.memoizedState=Pg(h),v.childLanes=Ng(o,C,h),u.memoizedState=Ag,Mc(null,v)):(Ga(u),Rg(u,N))}var U=o.memoizedState;if(U!==null&&(N=U.dehydrated,N!==null)){if(S)u.flags&256?(Ga(u),u.flags&=-257,u=Mg(o,u,h)):u.memoizedState!==null?(Ka(),u.child=o.child,u.flags|=128,u=null):(Ka(),N=v.fallback,y=u.mode,v=xf({mode:"visible",children:v.children},y),N=Ws(N,y,h,null),N.flags|=2,v.return=u,N.return=u,v.sibling=N,u.child=v,to(u,o.child,null,h),v=u.child,v.memoizedState=Pg(h),v.childLanes=Ng(o,C,h),u.memoizedState=Ag,u=Mc(null,v));else if(Ga(u),pv(N)){if(C=N.nextSibling&&N.nextSibling.dataset,C)var J=C.dgst;C=J,v=Error(r(419)),v.stack="",v.digest=C,wc({value:v,source:null,stack:null}),u=Mg(o,u,h)}else if(pn||Ho(o,u,h,!1),C=(h&o.childLanes)!==0,pn||C){if(C=Nt,C!==null&&(v=Je(C,h),v!==0&&v!==U.retryLane))throw U.retryLane=v,Ys(o,v),cr(C,o,v),Eg;mv(N)||Qf(),u=Mg(o,u,h)}else mv(N)?(u.flags|=192,u.child=o.child,u=null):(o=U.treeContext,Vt=Yr(N.nextSibling),Pn=u,dt=!0,Va=null,Vr=!1,o!==null&&RS(u,o),u=Rg(u,v.children),u.flags|=4096);return u}return y?(Ka(),N=v.fallback,y=u.mode,U=o.child,J=U.sibling,v=sa(U,{mode:"hidden",children:v.children}),v.subtreeFlags=U.subtreeFlags&65011712,J!==null?N=sa(J,N):(N=Ws(N,y,h,null),N.flags|=2),N.return=u,v.return=u,v.sibling=N,u.child=v,Mc(null,v),v=u.child,N=o.child.memoizedState,N===null?N=Pg(h):(y=N.cachePool,y!==null?(U=hn._currentValue,y=y.parent!==U?{parent:U,pool:U}:y):y=qS(),N={baseLanes:N.baseLanes|h,cachePool:y}),v.memoizedState=N,v.childLanes=Ng(o,C,h),u.memoizedState=Ag,Mc(o.child,v)):(Ga(u),h=o.child,o=h.sibling,h=sa(h,{mode:"visible",children:v.children}),h.return=u,h.sibling=null,o!==null&&(C=u.deletions,C===null?(u.deletions=[o],u.flags|=16):C.push(o)),u.child=h,u.memoizedState=null,h)}function Rg(o,u){return u=xf({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function xf(o,u){return o=_r(22,o,null,u),o.lanes=0,o}function Mg(o,u,h){return to(u,o.child,null,h),o=Rg(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function Jw(o,u,h){o.lanes|=u;var v=o.alternate;v!==null&&(v.lanes|=u),Hp(o.return,u,h)}function Lg(o,u,h,v,y,S){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:y,treeForkCount:S}:(C.isBackwards=u,C.rendering=null,C.renderingStartTime=0,C.last=v,C.tail=h,C.tailMode=y,C.treeForkCount=S)}function e_(o,u,h){var v=u.pendingProps,y=v.revealOrder,S=v.tail;v=v.children;var C=ln.current,N=(C&2)!==0;if(N?(C=C&1|2,u.flags|=128):C&=1,R(ln,C),Rn(o,u,v,h),v=dt?Sc:0,!N&&o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Jw(o,h,u);else if(o.tag===19)Jw(o,h,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(y){case"forwards":for(h=u.child,y=null;h!==null;)o=h.alternate,o!==null&&cf(o)===null&&(y=h),h=h.sibling;h=y,h===null?(y=u.child,u.child=null):(y=h.sibling,h.sibling=null),Lg(u,!1,y,h,S,v);break;case"backwards":case"unstable_legacy-backwards":for(h=null,y=u.child,u.child=null;y!==null;){if(o=y.alternate,o!==null&&cf(o)===null){u.child=y;break}o=y.sibling,y.sibling=h,h=y,y=o}Lg(u,!0,h,null,S,v);break;case"together":Lg(u,!1,null,null,void 0,v);break;default:u.memoizedState=null}return u.child}function fa(o,u,h){if(o!==null&&(u.dependencies=o.dependencies),ts|=u.lanes,(h&u.childLanes)===0)if(o!==null){if(Ho(o,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(r(153));if(u.child!==null){for(o=u.child,h=sa(o,o.pendingProps),u.child=h,h.return=u;o.sibling!==null;)o=o.sibling,h=h.sibling=sa(o,o.pendingProps),h.return=u;h.sibling=null}return u.child}function Dg(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&ef(o)))}function UL(o,u,h){switch(u.tag){case 3:Ne(u,u.stateNode.containerInfo),Ya(u,hn,o.memoizedState.cache),Fs();break;case 27:case 5:be(u);break;case 4:Ne(u,u.stateNode.containerInfo);break;case 10:Ya(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,lg(u),null;break;case 13:var v=u.memoizedState;if(v!==null)return v.dehydrated!==null?(Ga(u),u.flags|=128,null):(h&u.child.childLanes)!==0?Kw(o,u,h):(Ga(u),o=fa(o,u,h),o!==null?o.sibling:null);Ga(u);break;case 19:var y=(o.flags&128)!==0;if(v=(h&u.childLanes)!==0,v||(Ho(o,u,h,!1),v=(h&u.childLanes)!==0),y){if(v)return e_(o,u,h);u.flags|=128}if(y=u.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),R(ln,ln.current),v)break;return null;case 22:return u.lanes=0,Uw(o,u,h,u.pendingProps);case 24:Ya(u,hn,o.memoizedState.cache)}return fa(o,u,h)}function t_(o,u,h){if(o!==null)if(o.memoizedProps!==u.pendingProps)pn=!0;else{if(!Dg(o,h)&&(u.flags&128)===0)return pn=!1,UL(o,u,h);pn=(o.flags&131072)!==0}else pn=!1,dt&&(u.flags&1048576)!==0&&NS(u,Sc,u.index);switch(u.lanes=0,u.tag){case 16:e:{var v=u.pendingProps;if(o=Js(u.elementType),u.type=o,typeof o=="function")Xp(o)?(v=ro(o,v),u.tag=1,u=Hw(null,u,o,v,h)):(u.tag=0,u=Qg(null,u,o,v,h));else{if(o!=null){var y=o.$$typeof;if(y===E){u.tag=11,u=Zw(null,u,o,v,h);break e}else if(y===M){u.tag=14,u=Bw(null,u,o,v,h);break e}}throw u=z(o)||o,Error(r(306,u,""))}}return u;case 0:return Qg(o,u,u.type,u.pendingProps,h);case 1:return v=u.type,y=ro(v,u.pendingProps),Hw(o,u,v,y,h);case 3:e:{if(Ne(u,u.stateNode.containerInfo),o===null)throw Error(r(387));v=u.pendingProps;var S=u.memoizedState;y=S.element,rg(o,u),Qc(u,v,null,h);var C=u.memoizedState;if(v=C.cache,Ya(u,hn,v),v!==S.cache&&Gp(u,[hn],h,!0),Ec(),v=C.element,S.isDehydrated)if(S={element:v,isDehydrated:!1,cache:C.cache},u.updateQueue.baseState=S,u.memoizedState=S,u.flags&256){u=Gw(o,u,v,h);break e}else if(v!==y){y=Xr(Error(r(424)),u),wc(y),u=Gw(o,u,v,h);break e}else{switch(o=u.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Vt=Yr(o.firstChild),Pn=u,dt=!0,Va=null,Vr=!0,h=US(u,null,v,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(Fs(),v===y){u=fa(o,u,h);break e}Rn(o,u,v,h)}u=u.child}return u;case 26:return yf(o,u),o===null?(h=f1(u.type,null,u.pendingProps,null))?u.memoizedState=h:dt||(h=u.type,o=u.pendingProps,v=Df(ve.current).createElement(h),v[xn]=u,v[qn]=o,Mn(v,h,o),fn(v),u.stateNode=v):u.memoizedState=f1(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return be(u),o===null&&dt&&(v=u.stateNode=c1(u.type,u.pendingProps,ve.current),Pn=u,Vr=!0,y=Vt,ss(u.type)?(gv=y,Vt=Yr(v.firstChild)):Vt=y),Rn(o,u,u.pendingProps.children,h),yf(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&dt&&((y=v=Vt)&&(v=SD(v,u.type,u.pendingProps,Vr),v!==null?(u.stateNode=v,Pn=u,Vt=Yr(v.firstChild),Vr=!1,y=!0):y=!1),y||Ua(u)),be(u),y=u.type,S=u.pendingProps,C=o!==null?o.memoizedProps:null,v=S.children,dv(y,S)?v=null:C!==null&&dv(y,C)&&(u.flags|=32),u.memoizedState!==null&&(y=ug(o,u,DL,null,null,h),Hc._currentValue=y),yf(o,u),Rn(o,u,v,h),u.child;case 6:return o===null&&dt&&((o=h=Vt)&&(h=wD(h,u.pendingProps,Vr),h!==null?(u.stateNode=h,Pn=u,Vt=null,o=!0):o=!1),o||Ua(u)),null;case 13:return Kw(o,u,h);case 4:return Ne(u,u.stateNode.containerInfo),v=u.pendingProps,o===null?u.child=to(u,null,v,h):Rn(o,u,v,h),u.child;case 11:return Zw(o,u,u.type,u.pendingProps,h);case 7:return Rn(o,u,u.pendingProps,h),u.child;case 8:return Rn(o,u,u.pendingProps.children,h),u.child;case 12:return Rn(o,u,u.pendingProps.children,h),u.child;case 10:return v=u.pendingProps,Ya(u,u.type,v.value),Rn(o,u,v.children,h),u.child;case 9:return y=u.type._context,v=u.pendingProps.children,Gs(u),y=Nn(y),v=v(y),u.flags|=1,Rn(o,u,v,h),u.child;case 14:return Bw(o,u,u.type,u.pendingProps,h);case 15:return Vw(o,u,u.type,u.pendingProps,h);case 19:return e_(o,u,h);case 31:return VL(o,u,h);case 22:return Uw(o,u,h,u.pendingProps);case 24:return Gs(u),v=Nn(hn),o===null?(y=eg(),y===null&&(y=Nt,S=Kp(),y.pooledCache=S,S.refCount++,S!==null&&(y.pooledCacheLanes|=h),y=S),u.memoizedState={parent:v,cache:y},ng(u),Ya(u,hn,y)):((o.lanes&h)!==0&&(rg(o,u),Qc(u,null,null,h),Ec()),y=o.memoizedState,S=u.memoizedState,y.parent!==v?(y={parent:v,cache:v},u.memoizedState=y,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=y),Ya(u,hn,v)):(v=S.cache,Ya(u,hn,v),v!==y.cache&&Gp(u,[hn],h,!0))),Rn(o,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function ha(o){o.flags|=4}function zg(o,u,h,v,y){if((u=(o.mode&32)!==0)&&(u=!1),u){if(o.flags|=16777216,(y&335544128)===y)if(o.stateNode.complete)o.flags|=8192;else if(C_())o.flags|=8192;else throw eo=af,tg}else o.flags&=-16777217}function n_(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!v1(u))if(C_())o.flags|=8192;else throw eo=af,tg}function Sf(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?on():536870912,o.lanes|=u,ll|=u)}function Lc(o,u){if(!dt)switch(o.tailMode){case"hidden":u=o.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:v.sibling=null}}function Ut(o){var u=o.alternate!==null&&o.alternate.child===o.child,h=0,v=0;if(u)for(var y=o.child;y!==null;)h|=y.lanes|y.childLanes,v|=y.subtreeFlags&65011712,v|=y.flags&65011712,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)h|=y.lanes|y.childLanes,v|=y.subtreeFlags,v|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=v,o.childLanes=h,u}function YL(o,u,h){var v=u.pendingProps;switch(Up(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(u),null;case 1:return Ut(u),null;case 3:return h=u.stateNode,v=null,o!==null&&(v=o.memoizedState.cache),u.memoizedState.cache!==v&&(u.flags|=2048),ca(hn),Ze(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(o===null||o.child===null)&&(Fo(u)?ha(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Wp())),Ut(u),null;case 26:var y=u.type,S=u.memoizedState;return o===null?(ha(u),S!==null?(Ut(u),n_(u,S)):(Ut(u),zg(u,y,null,v,h))):S?S!==o.memoizedState?(ha(u),Ut(u),n_(u,S)):(Ut(u),u.flags&=-16777217):(o=o.memoizedProps,o!==v&&ha(u),Ut(u),zg(u,y,o,v,h)),null;case 27:if(Fe(u),h=ve.current,y=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==v&&ha(u);else{if(!v){if(u.stateNode===null)throw Error(r(166));return Ut(u),null}o=ge.current,Fo(u)?MS(u):(o=c1(y,v,h),u.stateNode=o,ha(u))}return Ut(u),null;case 5:if(Fe(u),y=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==v&&ha(u);else{if(!v){if(u.stateNode===null)throw Error(r(166));return Ut(u),null}if(S=ge.current,Fo(u))MS(u);else{var C=Df(ve.current);switch(S){case 1:S=C.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:S=C.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":S=C.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":S=C.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":S=C.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof v.is=="string"?C.createElement("select",{is:v.is}):C.createElement("select"),v.multiple?S.multiple=!0:v.size&&(S.size=v.size);break;default:S=typeof v.is=="string"?C.createElement(y,{is:v.is}):C.createElement(y)}}S[xn]=u,S[qn]=v;e:for(C=u.child;C!==null;){if(C.tag===5||C.tag===6)S.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===u)break e;for(;C.sibling===null;){if(C.return===null||C.return===u)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}u.stateNode=S;e:switch(Mn(S,y,v),y){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&ha(u)}}return Ut(u),zg(u,u.type,o===null?null:o.memoizedProps,u.pendingProps,h),null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==v&&ha(u);else{if(typeof v!="string"&&u.stateNode===null)throw Error(r(166));if(o=ve.current,Fo(u)){if(o=u.stateNode,h=u.memoizedProps,v=null,y=Pn,y!==null)switch(y.tag){case 27:case 5:v=y.memoizedProps}o[xn]=u,o=!!(o.nodeValue===h||v!==null&&v.suppressHydrationWarning===!0||K_(o.nodeValue,h)),o||Ua(u,!0)}else o=Df(o).createTextNode(v),o[xn]=u,u.stateNode=o}return Ut(u),null;case 31:if(h=u.memoizedState,o===null||o.memoizedState!==null){if(v=Fo(u),h!==null){if(o===null){if(!v)throw Error(r(318));if(o=u.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[xn]=u}else Fs(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ut(u),o=!1}else h=Wp(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=h),o=!0;if(!o)return u.flags&256?(jr(u),u):(jr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Ut(u),null;case 13:if(v=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(y=Fo(u),v!==null&&v.dehydrated!==null){if(o===null){if(!y)throw Error(r(318));if(y=u.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[xn]=u}else Fs(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ut(u),y=!1}else y=Wp(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=y),y=!0;if(!y)return u.flags&256?(jr(u),u):(jr(u),null)}return jr(u),(u.flags&128)!==0?(u.lanes=h,u):(h=v!==null,o=o!==null&&o.memoizedState!==null,h&&(v=u.child,y=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(y=v.alternate.memoizedState.cachePool.pool),S=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(S=v.memoizedState.cachePool.pool),S!==y&&(v.flags|=2048)),h!==o&&h&&(u.child.flags|=8192),Sf(u,u.updateQueue),Ut(u),null);case 4:return Ze(),o===null&&sv(u.stateNode.containerInfo),Ut(u),null;case 10:return ca(u.type),Ut(u),null;case 19:if(re(ln),v=u.memoizedState,v===null)return Ut(u),null;if(y=(u.flags&128)!==0,S=v.rendering,S===null)if(y)Lc(v,!1);else{if(tn!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(S=cf(o),S!==null){for(u.flags|=128,Lc(v,!1),o=S.updateQueue,u.updateQueue=o,Sf(u,o),u.subtreeFlags=0,o=h,h=u.child;h!==null;)QS(h,o),h=h.sibling;return R(ln,ln.current&1|2),dt&&oa(u,v.treeForkCount),u.child}o=o.sibling}v.tail!==null&&tt()>Tf&&(u.flags|=128,y=!0,Lc(v,!1),u.lanes=4194304)}else{if(!y)if(o=cf(S),o!==null){if(u.flags|=128,y=!0,o=o.updateQueue,u.updateQueue=o,Sf(u,o),Lc(v,!0),v.tail===null&&v.tailMode==="hidden"&&!S.alternate&&!dt)return Ut(u),null}else 2*tt()-v.renderingStartTime>Tf&&h!==536870912&&(u.flags|=128,y=!0,Lc(v,!1),u.lanes=4194304);v.isBackwards?(S.sibling=u.child,u.child=S):(o=v.last,o!==null?o.sibling=S:u.child=S,v.last=S)}return v.tail!==null?(o=v.tail,v.rendering=o,v.tail=o.sibling,v.renderingStartTime=tt(),o.sibling=null,h=ln.current,R(ln,y?h&1|2:h&1),dt&&oa(u,v.treeForkCount),o):(Ut(u),null);case 22:case 23:return jr(u),og(),v=u.memoizedState!==null,o!==null?o.memoizedState!==null!==v&&(u.flags|=8192):v&&(u.flags|=8192),v?(h&536870912)!==0&&(u.flags&128)===0&&(Ut(u),u.subtreeFlags&6&&(u.flags|=8192)):Ut(u),h=u.updateQueue,h!==null&&Sf(u,h.retryQueue),h=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==h&&(u.flags|=2048),o!==null&&re(Ks),null;case 24:return h=null,o!==null&&(h=o.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),ca(hn),Ut(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function WL(o,u){switch(Up(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return ca(hn),Ze(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return Fe(u),null;case 31:if(u.memoizedState!==null){if(jr(u),u.alternate===null)throw Error(r(340));Fs()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 13:if(jr(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Fs()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return re(ln),null;case 4:return Ze(),null;case 10:return ca(u.type),null;case 22:case 23:return jr(u),og(),o!==null&&re(Ks),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return ca(hn),null;case 25:return null;default:return null}}function r_(o,u){switch(Up(u),u.tag){case 3:ca(hn),Ze();break;case 26:case 27:case 5:Fe(u);break;case 4:Ze();break;case 31:u.memoizedState!==null&&jr(u);break;case 13:jr(u);break;case 19:re(ln);break;case 10:ca(u.type);break;case 22:case 23:jr(u),og(),o!==null&&re(Ks);break;case 24:ca(hn)}}function Dc(o,u){try{var h=u.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var y=v.next;h=y;do{if((h.tag&o)===o){v=void 0;var S=h.create,C=h.inst;v=S(),C.destroy=v}h=h.next}while(h!==y)}}catch(N){jt(u,u.return,N)}}function Ja(o,u,h){try{var v=u.updateQueue,y=v!==null?v.lastEffect:null;if(y!==null){var S=y.next;v=S;do{if((v.tag&o)===o){var C=v.inst,N=C.destroy;if(N!==void 0){C.destroy=void 0,y=u;var U=h,J=N;try{J()}catch(ae){jt(y,U,ae)}}}v=v.next}while(v!==S)}}catch(ae){jt(u,u.return,ae)}}function i_(o){var u=o.updateQueue;if(u!==null){var h=o.stateNode;try{WS(u,h)}catch(v){jt(o,o.return,v)}}}function a_(o,u,h){h.props=ro(o.type,o.memoizedProps),h.state=o.memoizedState;try{h.componentWillUnmount()}catch(v){jt(o,u,v)}}function zc(o,u){try{var h=o.ref;if(h!==null){switch(o.tag){case 26:case 27:case 5:var v=o.stateNode;break;case 30:v=o.stateNode;break;default:v=o.stateNode}typeof h=="function"?o.refCleanup=h(v):h.current=v}}catch(y){jt(o,u,y)}}function Pi(o,u){var h=o.ref,v=o.refCleanup;if(h!==null)if(typeof v=="function")try{v()}catch(y){jt(o,u,y)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(y){jt(o,u,y)}else h.current=null}function s_(o){var u=o.type,h=o.memoizedProps,v=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":h.autoFocus&&v.focus();break e;case"img":h.src?v.src=h.src:h.srcSet&&(v.srcset=h.srcSet)}}catch(y){jt(o,o.return,y)}}function $g(o,u,h){try{var v=o.stateNode;gD(v,o.type,h,u),v[qn]=u}catch(y){jt(o,o.return,y)}}function o_(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ss(o.type)||o.tag===4}function qg(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||o_(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ss(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Ig(o,u,h){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(o,u):(u=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,u.appendChild(o),h=h._reactRootContainer,h!=null||u.onclick!==null||(u.onclick=ia));else if(v!==4&&(v===27&&ss(o.type)&&(h=o.stateNode,u=null),o=o.child,o!==null))for(Ig(o,u,h),o=o.sibling;o!==null;)Ig(o,u,h),o=o.sibling}function wf(o,u,h){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?h.insertBefore(o,u):h.appendChild(o);else if(v!==4&&(v===27&&ss(o.type)&&(h=o.stateNode),o=o.child,o!==null))for(wf(o,u,h),o=o.sibling;o!==null;)wf(o,u,h),o=o.sibling}function l_(o){var u=o.stateNode,h=o.memoizedProps;try{for(var v=o.type,y=u.attributes;y.length;)u.removeAttributeNode(y[0]);Mn(u,v,h),u[xn]=o,u[qn]=h}catch(S){jt(o,o.return,S)}}var ma=!1,gn=!1,Xg=!1,c_=typeof WeakSet=="function"?WeakSet:Set,En=null;function FL(o,u){if(o=o.containerInfo,cv=Bf,o=xS(o),Mp(o)){if("selectionStart"in o)var h={start:o.selectionStart,end:o.selectionEnd};else e:{h=(h=o.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var y=v.anchorOffset,S=v.focusNode;v=v.focusOffset;try{h.nodeType,S.nodeType}catch{h=null;break e}var C=0,N=-1,U=-1,J=0,ae=0,oe=o,te=null;t:for(;;){for(var ne;oe!==h||y!==0&&oe.nodeType!==3||(N=C+y),oe!==S||v!==0&&oe.nodeType!==3||(U=C+v),oe.nodeType===3&&(C+=oe.nodeValue.length),(ne=oe.firstChild)!==null;)te=oe,oe=ne;for(;;){if(oe===o)break t;if(te===h&&++J===y&&(N=C),te===S&&++ae===v&&(U=C),(ne=oe.nextSibling)!==null)break;oe=te,te=oe.parentNode}oe=ne}h=N===-1||U===-1?null:{start:N,end:U}}else h=null}h=h||{start:0,end:0}}else h=null;for(uv={focusedElem:o,selectionRange:h},Bf=!1,En=u;En!==null;)if(u=En,o=u.child,(u.subtreeFlags&1028)!==0&&o!==null)o.return=u,En=o;else for(;En!==null;){switch(u=En,S=u.alternate,o=u.flags,u.tag){case 0:if((o&4)!==0&&(o=u.updateQueue,o=o!==null?o.events:null,o!==null))for(h=0;h<o.length;h++)y=o[h],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&S!==null){o=void 0,h=u,y=S.memoizedProps,S=S.memoizedState,v=h.stateNode;try{var ke=ro(h.type,y);o=v.getSnapshotBeforeUpdate(ke,S),v.__reactInternalSnapshotBeforeUpdate=o}catch(Ie){jt(h,h.return,Ie)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,h=o.nodeType,h===9)hv(o);else if(h===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":hv(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=u.sibling,o!==null){o.return=u.return,En=o;break}En=u.return}}function u_(o,u,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:ga(o,h),v&4&&Dc(5,h);break;case 1:if(ga(o,h),v&4)if(o=h.stateNode,u===null)try{o.componentDidMount()}catch(C){jt(h,h.return,C)}else{var y=ro(h.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(y,u,o.__reactInternalSnapshotBeforeUpdate)}catch(C){jt(h,h.return,C)}}v&64&&i_(h),v&512&&zc(h,h.return);break;case 3:if(ga(o,h),v&64&&(o=h.updateQueue,o!==null)){if(u=null,h.child!==null)switch(h.child.tag){case 27:case 5:u=h.child.stateNode;break;case 1:u=h.child.stateNode}try{WS(o,u)}catch(C){jt(h,h.return,C)}}break;case 27:u===null&&v&4&&l_(h);case 26:case 5:ga(o,h),u===null&&v&4&&s_(h),v&512&&zc(h,h.return);break;case 12:ga(o,h);break;case 31:ga(o,h),v&4&&h_(o,h);break;case 13:ga(o,h),v&4&&m_(o,h),v&64&&(o=h.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(h=iD.bind(null,h),_D(o,h))));break;case 22:if(v=h.memoizedState!==null||ma,!v){u=u!==null&&u.memoizedState!==null||gn,y=ma;var S=gn;ma=v,(gn=u)&&!S?va(o,h,(h.subtreeFlags&8772)!==0):ga(o,h),ma=y,gn=S}break;case 30:break;default:ga(o,h)}}function d_(o){var u=o.alternate;u!==null&&(o.alternate=null,d_(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&fc(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Ft=null,ar=!1;function pa(o,u,h){for(h=h.child;h!==null;)f_(o,u,h),h=h.sibling}function f_(o,u,h){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(sn,h)}catch{}switch(h.tag){case 26:gn||Pi(h,u),pa(o,u,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:gn||Pi(h,u);var v=Ft,y=ar;ss(h.type)&&(Ft=h.stateNode,ar=!1),pa(o,u,h),Yc(h.stateNode),Ft=v,ar=y;break;case 5:gn||Pi(h,u);case 6:if(v=Ft,y=ar,Ft=null,pa(o,u,h),Ft=v,ar=y,Ft!==null)if(ar)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(h.stateNode)}catch(S){jt(h,u,S)}else try{Ft.removeChild(h.stateNode)}catch(S){jt(h,u,S)}break;case 18:Ft!==null&&(ar?(o=Ft,i1(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,h.stateNode),gl(o)):i1(Ft,h.stateNode));break;case 4:v=Ft,y=ar,Ft=h.stateNode.containerInfo,ar=!0,pa(o,u,h),Ft=v,ar=y;break;case 0:case 11:case 14:case 15:Ja(2,h,u),gn||Ja(4,h,u),pa(o,u,h);break;case 1:gn||(Pi(h,u),v=h.stateNode,typeof v.componentWillUnmount=="function"&&a_(h,u,v)),pa(o,u,h);break;case 21:pa(o,u,h);break;case 22:gn=(v=gn)||h.memoizedState!==null,pa(o,u,h),gn=v;break;default:pa(o,u,h)}}function h_(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{gl(o)}catch(h){jt(u,u.return,h)}}}function m_(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{gl(o)}catch(h){jt(u,u.return,h)}}function HL(o){switch(o.tag){case 31:case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new c_),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new c_),u;default:throw Error(r(435,o.tag))}}function _f(o,u){var h=HL(o);u.forEach(function(v){if(!h.has(v)){h.add(v);var y=aD.bind(null,o,v);v.then(y,y)}})}function sr(o,u){var h=u.deletions;if(h!==null)for(var v=0;v<h.length;v++){var y=h[v],S=o,C=u,N=C;e:for(;N!==null;){switch(N.tag){case 27:if(ss(N.type)){Ft=N.stateNode,ar=!1;break e}break;case 5:Ft=N.stateNode,ar=!1;break e;case 3:case 4:Ft=N.stateNode.containerInfo,ar=!0;break e}N=N.return}if(Ft===null)throw Error(r(160));f_(S,C,y),Ft=null,ar=!1,S=y.alternate,S!==null&&(S.return=null),y.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)p_(u,o),u=u.sibling}var mi=null;function p_(o,u){var h=o.alternate,v=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:sr(u,o),or(o),v&4&&(Ja(3,o,o.return),Dc(3,o),Ja(5,o,o.return));break;case 1:sr(u,o),or(o),v&512&&(gn||h===null||Pi(h,h.return)),v&64&&ma&&(o=o.updateQueue,o!==null&&(v=o.callbacks,v!==null&&(h=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=h===null?v:h.concat(v))));break;case 26:var y=mi;if(sr(u,o),or(o),v&512&&(gn||h===null||Pi(h,h.return)),v&4){var S=h!==null?h.memoizedState:null;if(v=o.memoizedState,h===null)if(v===null)if(o.stateNode===null){e:{v=o.type,h=o.memoizedProps,y=y.ownerDocument||y;t:switch(v){case"title":S=y.getElementsByTagName("title")[0],(!S||S[Xs]||S[xn]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=y.createElement(v),y.head.insertBefore(S,y.querySelector("head > title"))),Mn(S,v,h),S[xn]=o,fn(S),v=S;break e;case"link":var C=p1("link","href",y).get(v+(h.href||""));if(C){for(var N=0;N<C.length;N++)if(S=C[N],S.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&S.getAttribute("rel")===(h.rel==null?null:h.rel)&&S.getAttribute("title")===(h.title==null?null:h.title)&&S.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){C.splice(N,1);break t}}S=y.createElement(v),Mn(S,v,h),y.head.appendChild(S);break;case"meta":if(C=p1("meta","content",y).get(v+(h.content||""))){for(N=0;N<C.length;N++)if(S=C[N],S.getAttribute("content")===(h.content==null?null:""+h.content)&&S.getAttribute("name")===(h.name==null?null:h.name)&&S.getAttribute("property")===(h.property==null?null:h.property)&&S.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&S.getAttribute("charset")===(h.charSet==null?null:h.charSet)){C.splice(N,1);break t}}S=y.createElement(v),Mn(S,v,h),y.head.appendChild(S);break;default:throw Error(r(468,v))}S[xn]=o,fn(S),v=S}o.stateNode=v}else g1(y,o.type,o.stateNode);else o.stateNode=m1(y,v,o.memoizedProps);else S!==v?(S===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):S.count--,v===null?g1(y,o.type,o.stateNode):m1(y,v,o.memoizedProps)):v===null&&o.stateNode!==null&&$g(o,o.memoizedProps,h.memoizedProps)}break;case 27:sr(u,o),or(o),v&512&&(gn||h===null||Pi(h,h.return)),h!==null&&v&4&&$g(o,o.memoizedProps,h.memoizedProps);break;case 5:if(sr(u,o),or(o),v&512&&(gn||h===null||Pi(h,h.return)),o.flags&32){y=o.stateNode;try{$o(y,"")}catch(ke){jt(o,o.return,ke)}}v&4&&o.stateNode!=null&&(y=o.memoizedProps,$g(o,y,h!==null?h.memoizedProps:y)),v&1024&&(Xg=!0);break;case 6:if(sr(u,o),or(o),v&4){if(o.stateNode===null)throw Error(r(162));v=o.memoizedProps,h=o.stateNode;try{h.nodeValue=v}catch(ke){jt(o,o.return,ke)}}break;case 3:if(qf=null,y=mi,mi=zf(u.containerInfo),sr(u,o),mi=y,or(o),v&4&&h!==null&&h.memoizedState.isDehydrated)try{gl(u.containerInfo)}catch(ke){jt(o,o.return,ke)}Xg&&(Xg=!1,g_(o));break;case 4:v=mi,mi=zf(o.stateNode.containerInfo),sr(u,o),or(o),mi=v;break;case 12:sr(u,o),or(o);break;case 31:sr(u,o),or(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,_f(o,v)));break;case 13:sr(u,o),or(o),o.child.flags&8192&&o.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(jf=tt()),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,_f(o,v)));break;case 22:y=o.memoizedState!==null;var U=h!==null&&h.memoizedState!==null,J=ma,ae=gn;if(ma=J||y,gn=ae||U,sr(u,o),gn=ae,ma=J,or(o),v&8192)e:for(u=o.stateNode,u._visibility=y?u._visibility&-2:u._visibility|1,y&&(h===null||U||ma||gn||io(o)),h=null,u=o;;){if(u.tag===5||u.tag===26){if(h===null){U=h=u;try{if(S=U.stateNode,y)C=S.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{N=U.stateNode;var oe=U.memoizedProps.style,te=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(ke){jt(U,U.return,ke)}}}else if(u.tag===6){if(h===null){U=u;try{U.stateNode.nodeValue=y?"":U.memoizedProps}catch(ke){jt(U,U.return,ke)}}}else if(u.tag===18){if(h===null){U=u;try{var ne=U.stateNode;y?a1(ne,!0):a1(U.stateNode,!1)}catch(ke){jt(U,U.return,ke)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}v&4&&(v=o.updateQueue,v!==null&&(h=v.retryQueue,h!==null&&(v.retryQueue=null,_f(o,h))));break;case 19:sr(u,o),or(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,_f(o,v)));break;case 30:break;case 21:break;default:sr(u,o),or(o)}}function or(o){var u=o.flags;if(u&2){try{for(var h,v=o.return;v!==null;){if(o_(v)){h=v;break}v=v.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var y=h.stateNode,S=qg(o);wf(o,S,y);break;case 5:var C=h.stateNode;h.flags&32&&($o(C,""),h.flags&=-33);var N=qg(o);wf(o,N,C);break;case 3:case 4:var U=h.stateNode.containerInfo,J=qg(o);Ig(o,J,U);break;default:throw Error(r(161))}}catch(ae){jt(o,o.return,ae)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function g_(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;g_(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function ga(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)u_(o,u.alternate,u),u=u.sibling}function io(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:Ja(4,u,u.return),io(u);break;case 1:Pi(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&a_(u,u.return,h),io(u);break;case 27:Yc(u.stateNode);case 26:case 5:Pi(u,u.return),io(u);break;case 22:u.memoizedState===null&&io(u);break;case 30:io(u);break;default:io(u)}o=o.sibling}}function va(o,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var v=u.alternate,y=o,S=u,C=S.flags;switch(S.tag){case 0:case 11:case 15:va(y,S,h),Dc(4,S);break;case 1:if(va(y,S,h),v=S,y=v.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(J){jt(v,v.return,J)}if(v=S,y=v.updateQueue,y!==null){var N=v.stateNode;try{var U=y.shared.hiddenCallbacks;if(U!==null)for(y.shared.hiddenCallbacks=null,y=0;y<U.length;y++)YS(U[y],N)}catch(J){jt(v,v.return,J)}}h&&C&64&&i_(S),zc(S,S.return);break;case 27:l_(S);case 26:case 5:va(y,S,h),h&&v===null&&C&4&&s_(S),zc(S,S.return);break;case 12:va(y,S,h);break;case 31:va(y,S,h),h&&C&4&&h_(y,S);break;case 13:va(y,S,h),h&&C&4&&m_(y,S);break;case 22:S.memoizedState===null&&va(y,S,h),zc(S,S.return);break;case 30:break;default:va(y,S,h)}u=u.sibling}}function Zg(o,u){var h=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==h&&(o!=null&&o.refCount++,h!=null&&_c(h))}function Bg(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&_c(o))}function pi(o,u,h,v){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)v_(o,u,h,v),u=u.sibling}function v_(o,u,h,v){var y=u.flags;switch(u.tag){case 0:case 11:case 15:pi(o,u,h,v),y&2048&&Dc(9,u);break;case 1:pi(o,u,h,v);break;case 3:pi(o,u,h,v),y&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&_c(o)));break;case 12:if(y&2048){pi(o,u,h,v),o=u.stateNode;try{var S=u.memoizedProps,C=S.id,N=S.onPostCommit;typeof N=="function"&&N(C,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(U){jt(u,u.return,U)}}else pi(o,u,h,v);break;case 31:pi(o,u,h,v);break;case 13:pi(o,u,h,v);break;case 23:break;case 22:S=u.stateNode,C=u.alternate,u.memoizedState!==null?S._visibility&2?pi(o,u,h,v):$c(o,u):S._visibility&2?pi(o,u,h,v):(S._visibility|=2,al(o,u,h,v,(u.subtreeFlags&10256)!==0||!1)),y&2048&&Zg(C,u);break;case 24:pi(o,u,h,v),y&2048&&Bg(u.alternate,u);break;default:pi(o,u,h,v)}}function al(o,u,h,v,y){for(y=y&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var S=o,C=u,N=h,U=v,J=C.flags;switch(C.tag){case 0:case 11:case 15:al(S,C,N,U,y),Dc(8,C);break;case 23:break;case 22:var ae=C.stateNode;C.memoizedState!==null?ae._visibility&2?al(S,C,N,U,y):$c(S,C):(ae._visibility|=2,al(S,C,N,U,y)),y&&J&2048&&Zg(C.alternate,C);break;case 24:al(S,C,N,U,y),y&&J&2048&&Bg(C.alternate,C);break;default:al(S,C,N,U,y)}u=u.sibling}}function $c(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=o,v=u,y=v.flags;switch(v.tag){case 22:$c(h,v),y&2048&&Zg(v.alternate,v);break;case 24:$c(h,v),y&2048&&Bg(v.alternate,v);break;default:$c(h,v)}u=u.sibling}}var qc=8192;function sl(o,u,h){if(o.subtreeFlags&qc)for(o=o.child;o!==null;)O_(o,u,h),o=o.sibling}function O_(o,u,h){switch(o.tag){case 26:sl(o,u,h),o.flags&qc&&o.memoizedState!==null&&LD(h,mi,o.memoizedState,o.memoizedProps);break;case 5:sl(o,u,h);break;case 3:case 4:var v=mi;mi=zf(o.stateNode.containerInfo),sl(o,u,h),mi=v;break;case 22:o.memoizedState===null&&(v=o.alternate,v!==null&&v.memoizedState!==null?(v=qc,qc=16777216,sl(o,u,h),qc=v):sl(o,u,h));break;default:sl(o,u,h)}}function b_(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function Ic(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var v=u[h];En=v,x_(v,o)}b_(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)y_(o),o=o.sibling}function y_(o){switch(o.tag){case 0:case 11:case 15:Ic(o),o.flags&2048&&Ja(9,o,o.return);break;case 3:Ic(o);break;case 12:Ic(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,kf(o)):Ic(o);break;default:Ic(o)}}function kf(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var v=u[h];En=v,x_(v,o)}b_(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:Ja(8,u,u.return),kf(u);break;case 22:h=u.stateNode,h._visibility&2&&(h._visibility&=-3,kf(u));break;default:kf(u)}o=o.sibling}}function x_(o,u){for(;En!==null;){var h=En;switch(h.tag){case 0:case 11:case 15:Ja(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var v=h.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:_c(h.memoizedState.cache)}if(v=h.child,v!==null)v.return=h,En=v;else e:for(h=o;En!==null;){v=En;var y=v.sibling,S=v.return;if(d_(v),v===h){En=null;break e}if(y!==null){y.return=S,En=y;break e}En=S}}}var GL={getCacheForType:function(o){var u=Nn(hn),h=u.data.get(o);return h===void 0&&(h=o(),u.data.set(o,h)),h},cacheSignal:function(){return Nn(hn).controller.signal}},KL=typeof WeakMap=="function"?WeakMap:Map,xt=0,Nt=null,rt=null,ct=0,kt=0,Tr=null,es=!1,ol=!1,Vg=!1,Oa=0,tn=0,ts=0,ao=0,Ug=0,Cr=0,ll=0,Xc=null,lr=null,Yg=!1,jf=0,S_=0,Tf=1/0,Cf=null,ns=null,Sn=0,rs=null,cl=null,ba=0,Wg=0,Fg=null,w_=null,Zc=0,Hg=null;function Er(){return(xt&2)!==0&&ct!==0?ct&-ct:$.T!==null?nv():Wn()}function __(){if(Cr===0)if((ct&536870912)===0||dt){var o=fi;fi<<=1,(fi&3932160)===0&&(fi=262144),Cr=o}else Cr=536870912;return o=kr.current,o!==null&&(o.flags|=32),Cr}function cr(o,u,h){(o===Nt&&(kt===2||kt===9)||o.cancelPendingCommit!==null)&&(ul(o,0),is(o,ct,Cr,!1)),$n(o,h),((xt&2)===0||o!==Nt)&&(o===Nt&&((xt&2)===0&&(ao|=h),tn===4&&is(o,ct,Cr,!1)),Ni(o))}function k_(o,u,h){if((xt&6)!==0)throw Error(r(327));var v=!h&&(u&127)===0&&(u&o.expiredLanes)===0||jn(o,u),y=v?tD(o,u):Kg(o,u,!0),S=v;do{if(y===0){ol&&!v&&is(o,u,0,!1);break}else{if(h=o.current.alternate,S&&!JL(h)){y=Kg(o,u,!1),S=!1;continue}if(y===2){if(S=u,o.errorRecoveryDisabledLanes&S)var C=0;else C=o.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){u=C;e:{var N=o;y=Xc;var U=N.current.memoizedState.isDehydrated;if(U&&(ul(N,C).flags|=256),C=Kg(N,C,!1),C!==2){if(Vg&&!U){N.errorRecoveryDisabledLanes|=S,ao|=S,y=4;break e}S=lr,lr=y,S!==null&&(lr===null?lr=S:lr.push.apply(lr,S))}y=C}if(S=!1,y!==2)continue}}if(y===1){ul(o,0),is(o,u,0,!0);break}e:{switch(v=o,S=y,S){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:is(v,u,Cr,!es);break e;case 2:lr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(y=jf+300-tt(),10<y)){if(is(v,u,Cr,!es),Pt(v,0,!0)!==0)break e;ba=u,v.timeoutHandle=n1(j_.bind(null,v,h,lr,Cf,Yg,u,Cr,ao,ll,es,S,"Throttled",-0,0),y);break e}j_(v,h,lr,Cf,Yg,u,Cr,ao,ll,es,S,null,-0,0)}}break}while(!0);Ni(o)}function j_(o,u,h,v,y,S,C,N,U,J,ae,oe,te,ne){if(o.timeoutHandle=-1,oe=u.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ia},O_(u,S,oe);var ke=(S&62914560)===S?jf-tt():(S&4194048)===S?S_-tt():0;if(ke=DD(oe,ke),ke!==null){ba=S,o.cancelPendingCommit=ke(R_.bind(null,o,u,S,h,v,y,C,N,U,ae,oe,null,te,ne)),is(o,S,C,!J);return}}R_(o,u,S,h,v,y,C,N,U)}function JL(o){for(var u=o;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var v=0;v<h.length;v++){var y=h[v],S=y.getSnapshot;y=y.value;try{if(!wr(S(),y))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function is(o,u,h,v){u&=~Ug,u&=~ao,o.suspendedLanes|=u,o.pingedLanes&=~u,v&&(o.warmLanes|=u),v=o.expirationTimes;for(var y=u;0<y;){var S=31-mt(y),C=1<<S;v[S]=-1,y&=~C}h!==0&&Yn(o,h,u)}function Ef(){return(xt&6)===0?(Bc(0),!1):!0}function Gg(){if(rt!==null){if(kt===0)var o=rt.return;else o=rt,la=Hs=null,hg(o),el=null,jc=0,o=rt;for(;o!==null;)r_(o.alternate,o),o=o.return;rt=null}}function ul(o,u){var h=o.timeoutHandle;h!==-1&&(o.timeoutHandle=-1,bD(h)),h=o.cancelPendingCommit,h!==null&&(o.cancelPendingCommit=null,h()),ba=0,Gg(),Nt=o,rt=h=sa(o.current,null),ct=u,kt=0,Tr=null,es=!1,ol=jn(o,u),Vg=!1,ll=Cr=Ug=ao=ts=tn=0,lr=Xc=null,Yg=!1,(u&8)!==0&&(u|=u&32);var v=o.entangledLanes;if(v!==0)for(o=o.entanglements,v&=u;0<v;){var y=31-mt(v),S=1<<y;u|=o[y],v&=~S}return Oa=u,Fd(),h}function T_(o,u){Ue=null,$.H=Rc,u===Jo||u===rf?(u=ZS(),kt=3):u===tg?(u=ZS(),kt=4):kt=u===Eg?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Tr=u,rt===null&&(tn=1,Of(o,Xr(u,o.current)))}function C_(){var o=kr.current;return o===null?!0:(ct&4194048)===ct?Ur===null:(ct&62914560)===ct||(ct&536870912)!==0?o===Ur:!1}function E_(){var o=$.H;return $.H=Rc,o===null?Rc:o}function Q_(){var o=$.A;return $.A=GL,o}function Qf(){tn=4,es||(ct&4194048)!==ct&&kr.current!==null||(ol=!0),(ts&134217727)===0&&(ao&134217727)===0||Nt===null||is(Nt,ct,Cr,!1)}function Kg(o,u,h){var v=xt;xt|=2;var y=E_(),S=Q_();(Nt!==o||ct!==u)&&(Cf=null,ul(o,u)),u=!1;var C=tn;e:do try{if(kt!==0&&rt!==null){var N=rt,U=Tr;switch(kt){case 8:Gg(),C=6;break e;case 3:case 2:case 9:case 6:kr.current===null&&(u=!0);var J=kt;if(kt=0,Tr=null,dl(o,N,U,J),h&&ol){C=0;break e}break;default:J=kt,kt=0,Tr=null,dl(o,N,U,J)}}eD(),C=tn;break}catch(ae){T_(o,ae)}while(!0);return u&&o.shellSuspendCounter++,la=Hs=null,xt=v,$.H=y,$.A=S,rt===null&&(Nt=null,ct=0,Fd()),C}function eD(){for(;rt!==null;)A_(rt)}function tD(o,u){var h=xt;xt|=2;var v=E_(),y=Q_();Nt!==o||ct!==u?(Cf=null,Tf=tt()+500,ul(o,u)):ol=jn(o,u);e:do try{if(kt!==0&&rt!==null){u=rt;var S=Tr;t:switch(kt){case 1:kt=0,Tr=null,dl(o,u,S,1);break;case 2:case 9:if(IS(S)){kt=0,Tr=null,P_(u);break}u=function(){kt!==2&&kt!==9||Nt!==o||(kt=7),Ni(o)},S.then(u,u);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:IS(S)?(kt=0,Tr=null,P_(u)):(kt=0,Tr=null,dl(o,u,S,7));break;case 5:var C=null;switch(rt.tag){case 26:C=rt.memoizedState;case 5:case 27:var N=rt;if(C?v1(C):N.stateNode.complete){kt=0,Tr=null;var U=N.sibling;if(U!==null)rt=U;else{var J=N.return;J!==null?(rt=J,Af(J)):rt=null}break t}}kt=0,Tr=null,dl(o,u,S,5);break;case 6:kt=0,Tr=null,dl(o,u,S,6);break;case 8:Gg(),tn=6;break e;default:throw Error(r(462))}}nD();break}catch(ae){T_(o,ae)}while(!0);return la=Hs=null,$.H=v,$.A=y,xt=h,rt!==null?0:(Nt=null,ct=0,Fd(),tn)}function nD(){for(;rt!==null&&!Dt();)A_(rt)}function A_(o){var u=t_(o.alternate,o,Oa);o.memoizedProps=o.pendingProps,u===null?Af(o):rt=u}function P_(o){var u=o,h=u.alternate;switch(u.tag){case 15:case 0:u=Fw(h,u,u.pendingProps,u.type,void 0,ct);break;case 11:u=Fw(h,u,u.pendingProps,u.type.render,u.ref,ct);break;case 5:hg(u);default:r_(h,u),u=rt=QS(u,Oa),u=t_(h,u,Oa)}o.memoizedProps=o.pendingProps,u===null?Af(o):rt=u}function dl(o,u,h,v){la=Hs=null,hg(u),el=null,jc=0;var y=u.return;try{if(BL(o,y,u,h,ct)){tn=1,Of(o,Xr(h,o.current)),rt=null;return}}catch(S){if(y!==null)throw rt=y,S;tn=1,Of(o,Xr(h,o.current)),rt=null;return}u.flags&32768?(dt||v===1?o=!0:ol||(ct&536870912)!==0?o=!1:(es=o=!0,(v===2||v===9||v===3||v===6)&&(v=kr.current,v!==null&&v.tag===13&&(v.flags|=16384))),N_(u,o)):Af(u)}function Af(o){var u=o;do{if((u.flags&32768)!==0){N_(u,es);return}o=u.return;var h=YL(u.alternate,u,Oa);if(h!==null){rt=h;return}if(u=u.sibling,u!==null){rt=u;return}rt=u=o}while(u!==null);tn===0&&(tn=5)}function N_(o,u){do{var h=WL(o.alternate,o);if(h!==null){h.flags&=32767,rt=h;return}if(h=o.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(o=o.sibling,o!==null)){rt=o;return}rt=o=h}while(o!==null);tn=6,rt=null}function R_(o,u,h,v,y,S,C,N,U){o.cancelPendingCommit=null;do Pf();while(Sn!==0);if((xt&6)!==0)throw Error(r(327));if(u!==null){if(u===o.current)throw Error(r(177));if(S=u.lanes|u.childLanes,S|=qp,Gt(o,h,S,C,N,U),o===Nt&&(rt=Nt=null,ct=0),cl=u,rs=o,ba=h,Wg=S,Fg=y,w_=v,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,sD(Qe,function(){return $_(),null})):(o.callbackNode=null,o.callbackPriority=0),v=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||v){v=$.T,$.T=null,y=q.p,q.p=2,C=xt,xt|=4;try{FL(o,u,h)}finally{xt=C,q.p=y,$.T=v}}Sn=1,M_(),L_(),D_()}}function M_(){if(Sn===1){Sn=0;var o=rs,u=cl,h=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||h){h=$.T,$.T=null;var v=q.p;q.p=2;var y=xt;xt|=4;try{p_(u,o);var S=uv,C=xS(o.containerInfo),N=S.focusedElem,U=S.selectionRange;if(C!==N&&N&&N.ownerDocument&&yS(N.ownerDocument.documentElement,N)){if(U!==null&&Mp(N)){var J=U.start,ae=U.end;if(ae===void 0&&(ae=J),"selectionStart"in N)N.selectionStart=J,N.selectionEnd=Math.min(ae,N.value.length);else{var oe=N.ownerDocument||document,te=oe&&oe.defaultView||window;if(te.getSelection){var ne=te.getSelection(),ke=N.textContent.length,Ie=Math.min(U.start,ke),Qt=U.end===void 0?Ie:Math.min(U.end,ke);!ne.extend&&Ie>Qt&&(C=Qt,Qt=Ie,Ie=C);var H=bS(N,Ie),W=bS(N,Qt);if(H&&W&&(ne.rangeCount!==1||ne.anchorNode!==H.node||ne.anchorOffset!==H.offset||ne.focusNode!==W.node||ne.focusOffset!==W.offset)){var K=oe.createRange();K.setStart(H.node,H.offset),ne.removeAllRanges(),Ie>Qt?(ne.addRange(K),ne.extend(W.node,W.offset)):(K.setEnd(W.node,W.offset),ne.addRange(K))}}}}for(oe=[],ne=N;ne=ne.parentNode;)ne.nodeType===1&&oe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var se=oe[N];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Bf=!!cv,uv=cv=null}finally{xt=y,q.p=v,$.T=h}}o.current=u,Sn=2}}function L_(){if(Sn===2){Sn=0;var o=rs,u=cl,h=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||h){h=$.T,$.T=null;var v=q.p;q.p=2;var y=xt;xt|=4;try{u_(o,u.alternate,u)}finally{xt=y,q.p=v,$.T=h}}Sn=3}}function D_(){if(Sn===4||Sn===3){Sn=0,Wt();var o=rs,u=cl,h=ba,v=w_;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Sn=5:(Sn=0,cl=rs=null,z_(o,o.pendingLanes));var y=o.pendingLanes;if(y===0&&(ns=null),Sr(h),u=u.stateNode,Zt&&typeof Zt.onCommitFiberRoot=="function")try{Zt.onCommitFiberRoot(sn,u,void 0,(u.current.flags&128)===128)}catch{}if(v!==null){u=$.T,y=q.p,q.p=2,$.T=null;try{for(var S=o.onRecoverableError,C=0;C<v.length;C++){var N=v[C];S(N.value,{componentStack:N.stack})}}finally{$.T=u,q.p=y}}(ba&3)!==0&&Pf(),Ni(o),y=o.pendingLanes,(h&261930)!==0&&(y&42)!==0?o===Hg?Zc++:(Zc=0,Hg=o):Zc=0,Bc(0)}}function z_(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,_c(u)))}function Pf(){return M_(),L_(),D_(),$_()}function $_(){if(Sn!==5)return!1;var o=rs,u=Wg;Wg=0;var h=Sr(ba),v=$.T,y=q.p;try{q.p=32>h?32:h,$.T=null,h=Fg,Fg=null;var S=rs,C=ba;if(Sn=0,cl=rs=null,ba=0,(xt&6)!==0)throw Error(r(331));var N=xt;if(xt|=4,y_(S.current),v_(S,S.current,C,h),xt=N,Bc(0,!1),Zt&&typeof Zt.onPostCommitFiberRoot=="function")try{Zt.onPostCommitFiberRoot(sn,S)}catch{}return!0}finally{q.p=y,$.T=v,z_(o,u)}}function q_(o,u,h){u=Xr(h,u),u=Cg(o.stateNode,u,2),o=Ha(o,u,2),o!==null&&($n(o,2),Ni(o))}function jt(o,u,h){if(o.tag===3)q_(o,o,h);else for(;u!==null;){if(u.tag===3){q_(u,o,h);break}else if(u.tag===1){var v=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(ns===null||!ns.has(v))){o=Xr(h,o),h=Iw(2),v=Ha(u,h,2),v!==null&&(Xw(h,v,u,o),$n(v,2),Ni(v));break}}u=u.return}}function Jg(o,u,h){var v=o.pingCache;if(v===null){v=o.pingCache=new KL;var y=new Set;v.set(u,y)}else y=v.get(u),y===void 0&&(y=new Set,v.set(u,y));y.has(h)||(Vg=!0,y.add(h),o=rD.bind(null,o,u,h),u.then(o,o))}function rD(o,u,h){var v=o.pingCache;v!==null&&v.delete(u),o.pingedLanes|=o.suspendedLanes&h,o.warmLanes&=~h,Nt===o&&(ct&h)===h&&(tn===4||tn===3&&(ct&62914560)===ct&&300>tt()-jf?(xt&2)===0&&ul(o,0):Ug|=h,ll===ct&&(ll=0)),Ni(o)}function I_(o,u){u===0&&(u=on()),o=Ys(o,u),o!==null&&($n(o,u),Ni(o))}function iD(o){var u=o.memoizedState,h=0;u!==null&&(h=u.retryLane),I_(o,h)}function aD(o,u){var h=0;switch(o.tag){case 31:case 13:var v=o.stateNode,y=o.memoizedState;y!==null&&(h=y.retryLane);break;case 19:v=o.stateNode;break;case 22:v=o.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(u),I_(o,h)}function sD(o,u){return me(o,u)}var Nf=null,fl=null,ev=!1,Rf=!1,tv=!1,as=0;function Ni(o){o!==fl&&o.next===null&&(fl===null?Nf=fl=o:fl=fl.next=o),Rf=!0,ev||(ev=!0,lD())}function Bc(o,u){if(!tv&&Rf){tv=!0;do for(var h=!1,v=Nf;v!==null;){if(o!==0){var y=v.pendingLanes;if(y===0)var S=0;else{var C=v.suspendedLanes,N=v.pingedLanes;S=(1<<31-mt(42|o)+1)-1,S&=y&~(C&~N),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(h=!0,V_(v,S))}else S=ct,S=Pt(v,v===Nt?S:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(S&3)===0||jn(v,S)||(h=!0,V_(v,S));v=v.next}while(h);tv=!1}}function oD(){X_()}function X_(){Rf=ev=!1;var o=0;as!==0&&OD()&&(o=as);for(var u=tt(),h=null,v=Nf;v!==null;){var y=v.next,S=Z_(v,u);S===0?(v.next=null,h===null?Nf=y:h.next=y,y===null&&(fl=h)):(h=v,(o!==0||(S&3)!==0)&&(Rf=!0)),v=y}Sn!==0&&Sn!==5||Bc(o),as!==0&&(as=0)}function Z_(o,u){for(var h=o.suspendedLanes,v=o.pingedLanes,y=o.expirationTimes,S=o.pendingLanes&-62914561;0<S;){var C=31-mt(S),N=1<<C,U=y[C];U===-1?((N&h)===0||(N&v)!==0)&&(y[C]=Tn(N,u)):U<=u&&(o.expiredLanes|=N),S&=~N}if(u=Nt,h=ct,h=Pt(o,o===u?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v=o.callbackNode,h===0||o===u&&(kt===2||kt===9)||o.cancelPendingCommit!==null)return v!==null&&v!==null&&Ot(v),o.callbackNode=null,o.callbackPriority=0;if((h&3)===0||jn(o,h)){if(u=h&-h,u===o.callbackPriority)return u;switch(v!==null&&Ot(v),Sr(h)){case 2:case 8:h=de;break;case 32:h=Qe;break;case 268435456:h=nt;break;default:h=Qe}return v=B_.bind(null,o),h=me(h,v),o.callbackPriority=u,o.callbackNode=h,u}return v!==null&&v!==null&&Ot(v),o.callbackPriority=2,o.callbackNode=null,2}function B_(o,u){if(Sn!==0&&Sn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var h=o.callbackNode;if(Pf()&&o.callbackNode!==h)return null;var v=ct;return v=Pt(o,o===Nt?v:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v===0?null:(k_(o,v,u),Z_(o,tt()),o.callbackNode!=null&&o.callbackNode===h?B_.bind(null,o):null)}function V_(o,u){if(Pf())return null;k_(o,u,!0)}function lD(){yD(function(){(xt&6)!==0?me(ie,oD):X_()})}function nv(){if(as===0){var o=Go;o===0&&(o=Ei,Ei<<=1,(Ei&261888)===0&&(Ei=256)),as=o}return as}function U_(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Id(""+o)}function Y_(o,u){var h=u.ownerDocument.createElement("input");return h.name=u.name,h.value=u.value,o.id&&h.setAttribute("form",o.id),u.parentNode.insertBefore(h,u),o=new FormData(o),h.parentNode.removeChild(h),o}function cD(o,u,h,v,y){if(u==="submit"&&h&&h.stateNode===y){var S=U_((y[qn]||null).action),C=v.submitter;C&&(u=(u=C[qn]||null)?U_(u.formAction):C.getAttribute("formAction"),u!==null&&(S=u,C=null));var N=new Vd("action","action",null,v,y);o.push({event:N,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(as!==0){var U=C?Y_(y,C):new FormData(y);Sg(h,{pending:!0,data:U,method:y.method,action:S},null,U)}}else typeof S=="function"&&(N.preventDefault(),U=C?Y_(y,C):new FormData(y),Sg(h,{pending:!0,data:U,method:y.method,action:S},S,U))},currentTarget:y}]})}}for(var rv=0;rv<$p.length;rv++){var iv=$p[rv],uD=iv.toLowerCase(),dD=iv[0].toUpperCase()+iv.slice(1);hi(uD,"on"+dD)}hi(_S,"onAnimationEnd"),hi(kS,"onAnimationIteration"),hi(jS,"onAnimationStart"),hi("dblclick","onDoubleClick"),hi("focusin","onFocus"),hi("focusout","onBlur"),hi(TL,"onTransitionRun"),hi(CL,"onTransitionStart"),hi(EL,"onTransitionCancel"),hi(TS,"onTransitionEnd"),Xa("onMouseEnter",["mouseout","mouseover"]),Xa("onMouseLeave",["mouseout","mouseover"]),Xa("onPointerEnter",["pointerout","pointerover"]),Xa("onPointerLeave",["pointerout","pointerover"]),na("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),na("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),na("onBeforeInput",["compositionend","keypress","textInput","paste"]),na("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vc="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(" "),fD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vc));function W_(o,u){u=(u&4)!==0;for(var h=0;h<o.length;h++){var v=o[h],y=v.event;v=v.listeners;e:{var S=void 0;if(u)for(var C=v.length-1;0<=C;C--){var N=v[C],U=N.instance,J=N.currentTarget;if(N=N.listener,U!==S&&y.isPropagationStopped())break e;S=N,y.currentTarget=J;try{S(y)}catch(ae){Wd(ae)}y.currentTarget=null,S=U}else for(C=0;C<v.length;C++){if(N=v[C],U=N.instance,J=N.currentTarget,N=N.listener,U!==S&&y.isPropagationStopped())break e;S=N,y.currentTarget=J;try{S(y)}catch(ae){Wd(ae)}y.currentTarget=null,S=U}}}}function it(o,u){var h=u[dc];h===void 0&&(h=u[dc]=new Set);var v=o+"__bubble";h.has(v)||(F_(u,o,2,!1),h.add(v))}function av(o,u,h){var v=0;u&&(v|=4),F_(h,o,v,u)}var Mf="_reactListening"+Math.random().toString(36).slice(2);function sv(o){if(!o[Mf]){o[Mf]=!0,Ld.forEach(function(h){h!=="selectionchange"&&(fD.has(h)||av(h,!1,o),av(h,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[Mf]||(u[Mf]=!0,av("selectionchange",!1,u))}}function F_(o,u,h,v){switch(_1(u)){case 2:var y=qD;break;case 8:y=ID;break;default:y=xv}h=y.bind(null,u,h,o),y=void 0,!jp||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(y=!0),v?y!==void 0?o.addEventListener(u,h,{capture:!0,passive:y}):o.addEventListener(u,h,!0):y!==void 0?o.addEventListener(u,h,{passive:y}):o.addEventListener(u,h,!1)}function ov(o,u,h,v,y){var S=v;if((u&1)===0&&(u&2)===0&&v!==null)e:for(;;){if(v===null)return;var C=v.tag;if(C===3||C===4){var N=v.stateNode.containerInfo;if(N===y)break;if(C===4)for(C=v.return;C!==null;){var U=C.tag;if((U===3||U===4)&&C.stateNode.containerInfo===y)return;C=C.return}for(;N!==null;){if(C=$a(N),C===null)return;if(U=C.tag,U===5||U===6||U===26||U===27){v=S=C;continue e}N=N.parentNode}}v=v.return}eS(function(){var J=S,ae=_p(h),oe=[];e:{var te=CS.get(o);if(te!==void 0){var ne=Vd,ke=o;switch(o){case"keypress":if(Zd(h)===0)break e;case"keydown":case"keyup":ne=aL;break;case"focusin":ke="focus",ne=Qp;break;case"focusout":ke="blur",ne=Qp;break;case"beforeblur":case"afterblur":ne=Qp;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=rS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Y5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=lL;break;case _S:case kS:case jS:ne=H5;break;case TS:ne=uL;break;case"scroll":case"scrollend":ne=V5;break;case"wheel":ne=fL;break;case"copy":case"cut":case"paste":ne=K5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=aS;break;case"toggle":case"beforetoggle":ne=mL}var Ie=(u&4)!==0,Qt=!Ie&&(o==="scroll"||o==="scrollend"),H=Ie?te!==null?te+"Capture":null:te;Ie=[];for(var W=J,K;W!==null;){var se=W;if(K=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||K===null||H===null||(se=hc(W,H),se!=null&&Ie.push(Uc(W,se,K))),Qt)break;W=W.return}0<Ie.length&&(te=new ne(te,ke,null,h,ae),oe.push({event:te,listeners:Ie}))}}if((u&7)===0){e:{if(te=o==="mouseover"||o==="pointerover",ne=o==="mouseout"||o==="pointerout",te&&h!==wp&&(ke=h.relatedTarget||h.fromElement)&&($a(ke)||ke[za]))break e;if((ne||te)&&(te=ae.window===ae?ae:(te=ae.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(ke=h.relatedTarget||h.toElement,ne=J,ke=ke?$a(ke):null,ke!==null&&(Qt=a(ke),Ie=ke.tag,ke!==Qt||Ie!==5&&Ie!==27&&Ie!==6)&&(ke=null)):(ne=null,ke=J),ne!==ke)){if(Ie=rS,se="onMouseLeave",H="onMouseEnter",W="mouse",(o==="pointerout"||o==="pointerover")&&(Ie=aS,se="onPointerLeave",H="onPointerEnter",W="pointer"),Qt=ne==null?te:Zs(ne),K=ke==null?te:Zs(ke),te=new Ie(se,W+"leave",ne,h,ae),te.target=Qt,te.relatedTarget=K,se=null,$a(ae)===J&&(Ie=new Ie(H,W+"enter",ke,h,ae),Ie.target=K,Ie.relatedTarget=Qt,se=Ie),Qt=se,ne&&ke)t:{for(Ie=hD,H=ne,W=ke,K=0,se=H;se;se=Ie(se))K++;se=0;for(var De=W;De;De=Ie(De))se++;for(;0<K-se;)H=Ie(H),K--;for(;0<se-K;)W=Ie(W),se--;for(;K--;){if(H===W||W!==null&&H===W.alternate){Ie=H;break t}H=Ie(H),W=Ie(W)}Ie=null}else Ie=null;ne!==null&&H_(oe,te,ne,Ie,!1),ke!==null&&Qt!==null&&H_(oe,Qt,ke,Ie,!0)}}e:{if(te=J?Zs(J):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var bt=hS;else if(dS(te))if(mS)bt=_L;else{bt=SL;var Ce=xL}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&Sp(J.elementType)&&(bt=hS):bt=wL;if(bt&&(bt=bt(o,J))){fS(oe,bt,h,ae);break e}Ce&&Ce(o,te,J),o==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&xp(te,"number",te.value)}switch(Ce=J?Zs(J):window,o){case"focusin":(dS(Ce)||Ce.contentEditable==="true")&&(Zo=Ce,Lp=J,xc=null);break;case"focusout":xc=Lp=Zo=null;break;case"mousedown":Dp=!0;break;case"contextmenu":case"mouseup":case"dragend":Dp=!1,SS(oe,h,ae);break;case"selectionchange":if(jL)break;case"keydown":case"keyup":SS(oe,h,ae)}var Ye;if(Pp)e:{switch(o){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else Xo?cS(o,h)&&(ut="onCompositionEnd"):o==="keydown"&&h.keyCode===229&&(ut="onCompositionStart");ut&&(sS&&h.locale!=="ko"&&(Xo||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Xo&&(Ye=tS()):(Za=ae,Tp="value"in Za?Za.value:Za.textContent,Xo=!0)),Ce=Lf(J,ut),0<Ce.length&&(ut=new iS(ut,o,null,h,ae),oe.push({event:ut,listeners:Ce}),Ye?ut.data=Ye:(Ye=uS(h),Ye!==null&&(ut.data=Ye)))),(Ye=gL?vL(o,h):OL(o,h))&&(ut=Lf(J,"onBeforeInput"),0<ut.length&&(Ce=new iS("onBeforeInput","beforeinput",null,h,ae),oe.push({event:Ce,listeners:ut}),Ce.data=Ye)),cD(oe,o,J,h,ae)}W_(oe,u)})}function Uc(o,u,h){return{instance:o,listener:u,currentTarget:h}}function Lf(o,u){for(var h=u+"Capture",v=[];o!==null;){var y=o,S=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||S===null||(y=hc(o,h),y!=null&&v.unshift(Uc(o,y,S)),y=hc(o,u),y!=null&&v.push(Uc(o,y,S))),o.tag===3)return v;o=o.return}return[]}function hD(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function H_(o,u,h,v,y){for(var S=u._reactName,C=[];h!==null&&h!==v;){var N=h,U=N.alternate,J=N.stateNode;if(N=N.tag,U!==null&&U===v)break;N!==5&&N!==26&&N!==27||J===null||(U=J,y?(J=hc(h,S),J!=null&&C.unshift(Uc(h,J,U))):y||(J=hc(h,S),J!=null&&C.push(Uc(h,J,U)))),h=h.return}C.length!==0&&o.push({event:u,listeners:C})}var mD=/\r\n?/g,pD=/\u0000|\uFFFD/g;function G_(o){return(typeof o=="string"?o:""+o).replace(mD,`
34
+ `).replace(pD,"")}function K_(o,u){return u=G_(u),G_(o)===u}function Et(o,u,h,v,y,S){switch(h){case"children":typeof v=="string"?u==="body"||u==="textarea"&&v===""||$o(o,v):(typeof v=="number"||typeof v=="bigint")&&u!=="body"&&$o(o,""+v);break;case"className":$d(o,"class",v);break;case"tabIndex":$d(o,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":$d(o,h,v);break;case"style":Kx(o,v,S);break;case"data":if(u!=="object"){$d(o,"data",v);break}case"src":case"href":if(v===""&&(u!=="a"||h!=="href")){o.removeAttribute(h);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(h);break}v=Id(""+v),o.setAttribute(h,v);break;case"action":case"formAction":if(typeof v=="function"){o.setAttribute(h,"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 S=="function"&&(h==="formAction"?(u!=="input"&&Et(o,u,"name",y.name,y,null),Et(o,u,"formEncType",y.formEncType,y,null),Et(o,u,"formMethod",y.formMethod,y,null),Et(o,u,"formTarget",y.formTarget,y,null)):(Et(o,u,"encType",y.encType,y,null),Et(o,u,"method",y.method,y,null),Et(o,u,"target",y.target,y,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(h);break}v=Id(""+v),o.setAttribute(h,v);break;case"onClick":v!=null&&(o.onclick=ia);break;case"onScroll":v!=null&&it("scroll",o);break;case"onScrollEnd":v!=null&&it("scrollend",o);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"multiple":o.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":o.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){o.removeAttribute("xlink:href");break}h=Id(""+v),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,""+v):o.removeAttribute(h);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":v&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,""):o.removeAttribute(h);break;case"capture":case"download":v===!0?o.setAttribute(h,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(h,v):o.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?o.setAttribute(h,v):o.removeAttribute(h);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?o.removeAttribute(h):o.setAttribute(h,v);break;case"popover":it("beforetoggle",o),it("toggle",o),zd(o,"popover",v);break;case"xlinkActuate":ra(o,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":ra(o,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":ra(o,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":ra(o,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":ra(o,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":ra(o,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":ra(o,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":ra(o,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":ra(o,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":zd(o,"is",v);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=Z5.get(h)||h,zd(o,h,v))}}function lv(o,u,h,v,y,S){switch(h){case"style":Kx(o,v,S);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"children":typeof v=="string"?$o(o,v):(typeof v=="number"||typeof v=="bigint")&&$o(o,""+v);break;case"onScroll":v!=null&&it("scroll",o);break;case"onScrollEnd":v!=null&&it("scrollend",o);break;case"onClick":v!=null&&(o.onclick=ia);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dd.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(y=h.endsWith("Capture"),u=h.slice(2,y?h.length-7:void 0),S=o[qn]||null,S=S!=null?S[h]:null,typeof S=="function"&&o.removeEventListener(u,S,y),typeof v=="function")){typeof S!="function"&&S!==null&&(h in o?o[h]=null:o.hasAttribute(h)&&o.removeAttribute(h)),o.addEventListener(u,v,y);break e}h in o?o[h]=v:v===!0?o.setAttribute(h,""):zd(o,h,v)}}}function Mn(o,u,h){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":it("error",o),it("load",o);var v=!1,y=!1,S;for(S in h)if(h.hasOwnProperty(S)){var C=h[S];if(C!=null)switch(S){case"src":v=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Et(o,u,S,C,h,null)}}y&&Et(o,u,"srcSet",h.srcSet,h,null),v&&Et(o,u,"src",h.src,h,null);return;case"input":it("invalid",o);var N=S=C=y=null,U=null,J=null;for(v in h)if(h.hasOwnProperty(v)){var ae=h[v];if(ae!=null)switch(v){case"name":y=ae;break;case"type":C=ae;break;case"checked":U=ae;break;case"defaultChecked":J=ae;break;case"value":S=ae;break;case"defaultValue":N=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,u));break;default:Et(o,u,v,ae,h,null)}}Wx(o,S,N,U,J,C,y,!1);return;case"select":it("invalid",o),v=C=S=null;for(y in h)if(h.hasOwnProperty(y)&&(N=h[y],N!=null))switch(y){case"value":S=N;break;case"defaultValue":C=N;break;case"multiple":v=N;default:Et(o,u,y,N,h,null)}u=S,h=C,o.multiple=!!v,u!=null?zo(o,!!v,u,!1):h!=null&&zo(o,!!v,h,!0);return;case"textarea":it("invalid",o),S=y=v=null;for(C in h)if(h.hasOwnProperty(C)&&(N=h[C],N!=null))switch(C){case"value":v=N;break;case"defaultValue":y=N;break;case"children":S=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:Et(o,u,C,N,h,null)}Hx(o,v,y,S);return;case"option":for(U in h)if(h.hasOwnProperty(U)&&(v=h[U],v!=null))switch(U){case"selected":o.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:Et(o,u,U,v,h,null)}return;case"dialog":it("beforetoggle",o),it("toggle",o),it("cancel",o),it("close",o);break;case"iframe":case"object":it("load",o);break;case"video":case"audio":for(v=0;v<Vc.length;v++)it(Vc[v],o);break;case"image":it("error",o),it("load",o);break;case"details":it("toggle",o);break;case"embed":case"source":case"link":it("error",o),it("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in h)if(h.hasOwnProperty(J)&&(v=h[J],v!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Et(o,u,J,v,h,null)}return;default:if(Sp(u)){for(ae in h)h.hasOwnProperty(ae)&&(v=h[ae],v!==void 0&&lv(o,u,ae,v,h,void 0));return}}for(N in h)h.hasOwnProperty(N)&&(v=h[N],v!=null&&Et(o,u,N,v,h,null))}function gD(o,u,h,v){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,S=null,C=null,N=null,U=null,J=null,ae=null;for(ne in h){var oe=h[ne];if(h.hasOwnProperty(ne)&&oe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":U=oe;default:v.hasOwnProperty(ne)||Et(o,u,ne,null,v,oe)}}for(var te in v){var ne=v[te];if(oe=h[te],v.hasOwnProperty(te)&&(ne!=null||oe!=null))switch(te){case"type":S=ne;break;case"name":y=ne;break;case"checked":J=ne;break;case"defaultChecked":ae=ne;break;case"value":C=ne;break;case"defaultValue":N=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,u));break;default:ne!==oe&&Et(o,u,te,ne,v,oe)}}yp(o,C,N,U,J,ae,S,y);return;case"select":ne=C=N=te=null;for(S in h)if(U=h[S],h.hasOwnProperty(S)&&U!=null)switch(S){case"value":break;case"multiple":ne=U;default:v.hasOwnProperty(S)||Et(o,u,S,null,v,U)}for(y in v)if(S=v[y],U=h[y],v.hasOwnProperty(y)&&(S!=null||U!=null))switch(y){case"value":te=S;break;case"defaultValue":N=S;break;case"multiple":C=S;default:S!==U&&Et(o,u,y,S,v,U)}u=N,h=C,v=ne,te!=null?zo(o,!!h,te,!1):!!v!=!!h&&(u!=null?zo(o,!!h,u,!0):zo(o,!!h,h?[]:"",!1));return;case"textarea":ne=te=null;for(N in h)if(y=h[N],h.hasOwnProperty(N)&&y!=null&&!v.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Et(o,u,N,null,v,y)}for(C in v)if(y=v[C],S=h[C],v.hasOwnProperty(C)&&(y!=null||S!=null))switch(C){case"value":te=y;break;case"defaultValue":ne=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==S&&Et(o,u,C,y,v,S)}Fx(o,te,ne);return;case"option":for(var ke in h)if(te=h[ke],h.hasOwnProperty(ke)&&te!=null&&!v.hasOwnProperty(ke))switch(ke){case"selected":o.selected=!1;break;default:Et(o,u,ke,null,v,te)}for(U in v)if(te=v[U],ne=h[U],v.hasOwnProperty(U)&&te!==ne&&(te!=null||ne!=null))switch(U){case"selected":o.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:Et(o,u,U,te,v,ne)}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 Ie in h)te=h[Ie],h.hasOwnProperty(Ie)&&te!=null&&!v.hasOwnProperty(Ie)&&Et(o,u,Ie,null,v,te);for(J in v)if(te=v[J],ne=h[J],v.hasOwnProperty(J)&&te!==ne&&(te!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,u));break;default:Et(o,u,J,te,v,ne)}return;default:if(Sp(u)){for(var Qt in h)te=h[Qt],h.hasOwnProperty(Qt)&&te!==void 0&&!v.hasOwnProperty(Qt)&&lv(o,u,Qt,void 0,v,te);for(ae in v)te=v[ae],ne=h[ae],!v.hasOwnProperty(ae)||te===ne||te===void 0&&ne===void 0||lv(o,u,ae,te,v,ne);return}}for(var H in h)te=h[H],h.hasOwnProperty(H)&&te!=null&&!v.hasOwnProperty(H)&&Et(o,u,H,null,v,te);for(oe in v)te=v[oe],ne=h[oe],!v.hasOwnProperty(oe)||te===ne||te==null&&ne==null||Et(o,u,oe,te,v,ne)}function J_(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vD(){if(typeof performance.getEntriesByType=="function"){for(var o=0,u=0,h=performance.getEntriesByType("resource"),v=0;v<h.length;v++){var y=h[v],S=y.transferSize,C=y.initiatorType,N=y.duration;if(S&&N&&J_(C)){for(C=0,N=y.responseEnd,v+=1;v<h.length;v++){var U=h[v],J=U.startTime;if(J>N)break;var ae=U.transferSize,oe=U.initiatorType;ae&&J_(oe)&&(U=U.responseEnd,C+=ae*(U<N?1:(N-J)/(U-J)))}if(--v,u+=8*(S+C)/(y.duration/1e3),o++,10<o)break}}if(0<o)return u/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var cv=null,uv=null;function Df(o){return o.nodeType===9?o:o.ownerDocument}function e1(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function t1(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function dv(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var fv=null;function OD(){var o=window.event;return o&&o.type==="popstate"?o===fv?!1:(fv=o,!0):(fv=null,!1)}var n1=typeof setTimeout=="function"?setTimeout:void 0,bD=typeof clearTimeout=="function"?clearTimeout:void 0,r1=typeof Promise=="function"?Promise:void 0,yD=typeof queueMicrotask=="function"?queueMicrotask:typeof r1<"u"?function(o){return r1.resolve(null).then(o).catch(xD)}:n1;function xD(o){setTimeout(function(){throw o})}function ss(o){return o==="head"}function i1(o,u){var h=u,v=0;do{var y=h.nextSibling;if(o.removeChild(h),y&&y.nodeType===8)if(h=y.data,h==="/$"||h==="/&"){if(v===0){o.removeChild(y),gl(u);return}v--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")v++;else if(h==="html")Yc(o.ownerDocument.documentElement);else if(h==="head"){h=o.ownerDocument.head,Yc(h);for(var S=h.firstChild;S;){var C=S.nextSibling,N=S.nodeName;S[Xs]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&S.rel.toLowerCase()==="stylesheet"||h.removeChild(S),S=C}}else h==="body"&&Yc(o.ownerDocument.body);h=y}while(h);gl(u)}function a1(o,u){var h=o;o=0;do{var v=h.nextSibling;if(h.nodeType===1?u?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(u?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),v&&v.nodeType===8)if(h=v.data,h==="/$"){if(o===0)break;o--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||o++;h=v}while(h)}function hv(o){var u=o.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var h=u;switch(u=u.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":hv(h),fc(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}o.removeChild(h)}}function SD(o,u,h,v){for(;o.nodeType===1;){var y=h;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!v&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(v){if(!o[Xs])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(S=o.getAttribute("rel"),S==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(S!==y.rel||o.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||o.getAttribute("title")!==(y.title==null?null:y.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(S=o.getAttribute("src"),(S!==(y.src==null?null:y.src)||o.getAttribute("type")!==(y.type==null?null:y.type)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&S&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var S=y.name==null?null:""+y.name;if(y.type==="hidden"&&o.getAttribute("name")===S)return o}else return o;if(o=Yr(o.nextSibling),o===null)break}return null}function wD(o,u,h){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!h||(o=Yr(o.nextSibling),o===null))return null;return o}function s1(o,u){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=Yr(o.nextSibling),o===null))return null;return o}function mv(o){return o.data==="$?"||o.data==="$~"}function pv(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function _D(o,u){var h=o.ownerDocument;if(o.data==="$~")o._reactRetry=u;else if(o.data!=="$?"||h.readyState!=="loading")u();else{var v=function(){u(),h.removeEventListener("DOMContentLoaded",v)};h.addEventListener("DOMContentLoaded",v),o._reactRetry=v}}function Yr(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return o}var gv=null;function o1(o){o=o.nextSibling;for(var u=0;o;){if(o.nodeType===8){var h=o.data;if(h==="/$"||h==="/&"){if(u===0)return Yr(o.nextSibling);u--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||u++}o=o.nextSibling}return null}function l1(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var h=o.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(u===0)return o;u--}else h!=="/$"&&h!=="/&"||u++}o=o.previousSibling}return null}function c1(o,u,h){switch(u=Df(h),o){case"html":if(o=u.documentElement,!o)throw Error(r(452));return o;case"head":if(o=u.head,!o)throw Error(r(453));return o;case"body":if(o=u.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Yc(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);fc(o)}var Wr=new Map,u1=new Set;function zf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var ya=q.d;q.d={f:kD,r:jD,D:TD,C:CD,L:ED,m:QD,X:PD,S:AD,M:ND};function kD(){var o=ya.f(),u=Ef();return o||u}function jD(o){var u=qa(o);u!==null&&u.tag===5&&u.type==="form"?Tw(u):ya.r(o)}var hl=typeof document>"u"?null:document;function d1(o,u,h){var v=hl;if(v&&typeof u=="string"&&u){var y=qr(u);y='link[rel="'+o+'"][href="'+y+'"]',typeof h=="string"&&(y+='[crossorigin="'+h+'"]'),u1.has(y)||(u1.add(y),o={rel:o,crossOrigin:h,href:u},v.querySelector(y)===null&&(u=v.createElement("link"),Mn(u,"link",o),fn(u),v.head.appendChild(u)))}}function TD(o){ya.D(o),d1("dns-prefetch",o,null)}function CD(o,u){ya.C(o,u),d1("preconnect",o,u)}function ED(o,u,h){ya.L(o,u,h);var v=hl;if(v&&o&&u){var y='link[rel="preload"][as="'+qr(u)+'"]';u==="image"&&h&&h.imageSrcSet?(y+='[imagesrcset="'+qr(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(y+='[imagesizes="'+qr(h.imageSizes)+'"]')):y+='[href="'+qr(o)+'"]';var S=y;switch(u){case"style":S=ml(o);break;case"script":S=pl(o)}Wr.has(S)||(o=m({rel:"preload",href:u==="image"&&h&&h.imageSrcSet?void 0:o,as:u},h),Wr.set(S,o),v.querySelector(y)!==null||u==="style"&&v.querySelector(Wc(S))||u==="script"&&v.querySelector(Fc(S))||(u=v.createElement("link"),Mn(u,"link",o),fn(u),v.head.appendChild(u)))}}function QD(o,u){ya.m(o,u);var h=hl;if(h&&o){var v=u&&typeof u.as=="string"?u.as:"script",y='link[rel="modulepreload"][as="'+qr(v)+'"][href="'+qr(o)+'"]',S=y;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=pl(o)}if(!Wr.has(S)&&(o=m({rel:"modulepreload",href:o},u),Wr.set(S,o),h.querySelector(y)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Fc(S)))return}v=h.createElement("link"),Mn(v,"link",o),fn(v),h.head.appendChild(v)}}}function AD(o,u,h){ya.S(o,u,h);var v=hl;if(v&&o){var y=Ia(v).hoistableStyles,S=ml(o);u=u||"default";var C=y.get(S);if(!C){var N={loading:0,preload:null};if(C=v.querySelector(Wc(S)))N.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":u},h),(h=Wr.get(S))&&vv(o,h);var U=C=v.createElement("link");fn(U),Mn(U,"link",o),U._p=new Promise(function(J,ae){U.onload=J,U.onerror=ae}),U.addEventListener("load",function(){N.loading|=1}),U.addEventListener("error",function(){N.loading|=2}),N.loading|=4,$f(C,u,v)}C={type:"stylesheet",instance:C,count:1,state:N},y.set(S,C)}}}function PD(o,u){ya.X(o,u);var h=hl;if(h&&o){var v=Ia(h).hoistableScripts,y=pl(o),S=v.get(y);S||(S=h.querySelector(Fc(y)),S||(o=m({src:o,async:!0},u),(u=Wr.get(y))&&Ov(o,u),S=h.createElement("script"),fn(S),Mn(S,"link",o),h.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},v.set(y,S))}}function ND(o,u){ya.M(o,u);var h=hl;if(h&&o){var v=Ia(h).hoistableScripts,y=pl(o),S=v.get(y);S||(S=h.querySelector(Fc(y)),S||(o=m({src:o,async:!0,type:"module"},u),(u=Wr.get(y))&&Ov(o,u),S=h.createElement("script"),fn(S),Mn(S,"link",o),h.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},v.set(y,S))}}function f1(o,u,h,v){var y=(y=ve.current)?zf(y):null;if(!y)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(u=ml(h.href),h=Ia(y).hoistableStyles,v=h.get(u),v||(v={type:"style",instance:null,count:0,state:null},h.set(u,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){o=ml(h.href);var S=Ia(y).hoistableStyles,C=S.get(o);if(C||(y=y.ownerDocument||y,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(o,C),(S=y.querySelector(Wc(o)))&&!S._p&&(C.instance=S,C.state.loading=5),Wr.has(o)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},Wr.set(o,h),S||RD(y,o,h,C.state))),u&&v===null)throw Error(r(528,""));return C}if(u&&v!==null)throw Error(r(529,""));return null;case"script":return u=h.async,h=h.src,typeof h=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=pl(h),h=Ia(y).hoistableScripts,v=h.get(u),v||(v={type:"script",instance:null,count:0,state:null},h.set(u,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function ml(o){return'href="'+qr(o)+'"'}function Wc(o){return'link[rel="stylesheet"]['+o+"]"}function h1(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function RD(o,u,h,v){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?v.loading=1:(u=o.createElement("link"),v.preload=u,u.addEventListener("load",function(){return v.loading|=1}),u.addEventListener("error",function(){return v.loading|=2}),Mn(u,"link",h),fn(u),o.head.appendChild(u))}function pl(o){return'[src="'+qr(o)+'"]'}function Fc(o){return"script[async]"+o}function m1(o,u,h){if(u.count++,u.instance===null)switch(u.type){case"style":var v=o.querySelector('style[data-href~="'+qr(h.href)+'"]');if(v)return u.instance=v,fn(v),v;var y=m({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(o.ownerDocument||o).createElement("style"),fn(v),Mn(v,"style",y),$f(v,h.precedence,o),u.instance=v;case"stylesheet":y=ml(h.href);var S=o.querySelector(Wc(y));if(S)return u.state.loading|=4,u.instance=S,fn(S),S;v=h1(h),(y=Wr.get(y))&&vv(v,y),S=(o.ownerDocument||o).createElement("link"),fn(S);var C=S;return C._p=new Promise(function(N,U){C.onload=N,C.onerror=U}),Mn(S,"link",v),u.state.loading|=4,$f(S,h.precedence,o),u.instance=S;case"script":return S=pl(h.src),(y=o.querySelector(Fc(S)))?(u.instance=y,fn(y),y):(v=h,(y=Wr.get(S))&&(v=m({},h),Ov(v,y)),o=o.ownerDocument||o,y=o.createElement("script"),fn(y),Mn(y,"link",v),o.head.appendChild(y),u.instance=y);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(v=u.instance,u.state.loading|=4,$f(v,h.precedence,o));return u.instance}function $f(o,u,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=v.length?v[v.length-1]:null,S=y,C=0;C<v.length;C++){var N=v[C];if(N.dataset.precedence===u)S=N;else if(S!==y)break}S?S.parentNode.insertBefore(o,S.nextSibling):(u=h.nodeType===9?h.head:h,u.insertBefore(o,u.firstChild))}function vv(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function Ov(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var qf=null;function p1(o,u,h){if(qf===null){var v=new Map,y=qf=new Map;y.set(h,v)}else y=qf,v=y.get(h),v||(v=new Map,y.set(h,v));if(v.has(o))return v;for(v.set(o,null),h=h.getElementsByTagName(o),y=0;y<h.length;y++){var S=h[y];if(!(S[Xs]||S[xn]||o==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var C=S.getAttribute(u)||"";C=o+C;var N=v.get(C);N?N.push(S):v.set(C,[S])}}return v}function g1(o,u,h){o=o.ownerDocument||o,o.head.insertBefore(h,u==="title"?o.querySelector("head > title"):null)}function MD(o,u,h){if(h===1||u.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return o=u.disabled,typeof u.precedence=="string"&&o==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function v1(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function LD(o,u,h,v){if(h.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var y=ml(v.href),S=u.querySelector(Wc(y));if(S){u=S._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(o.count++,o=If.bind(o),u.then(o,o)),h.state.loading|=4,h.instance=S,fn(S);return}S=u.ownerDocument||u,v=h1(v),(y=Wr.get(y))&&vv(v,y),S=S.createElement("link"),fn(S);var C=S;C._p=new Promise(function(N,U){C.onload=N,C.onerror=U}),Mn(S,"link",v),h.instance=S}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(h,u),(u=h.state.preload)&&(h.state.loading&3)===0&&(o.count++,h=If.bind(o),u.addEventListener("load",h),u.addEventListener("error",h))}}var bv=0;function DD(o,u){return o.stylesheets&&o.count===0&&Zf(o,o.stylesheets),0<o.count||0<o.imgCount?function(h){var v=setTimeout(function(){if(o.stylesheets&&Zf(o,o.stylesheets),o.unsuspend){var S=o.unsuspend;o.unsuspend=null,S()}},6e4+u);0<o.imgBytes&&bv===0&&(bv=62500*vD());var y=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Zf(o,o.stylesheets),o.unsuspend)){var S=o.unsuspend;o.unsuspend=null,S()}},(o.imgBytes>bv?50:800)+u);return o.unsuspend=h,function(){o.unsuspend=null,clearTimeout(v),clearTimeout(y)}}:null}function If(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Xf=null;function Zf(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Xf=new Map,u.forEach(zD,o),Xf=null,If.call(o))}function zD(o,u){if(!(u.state.loading&4)){var h=Xf.get(o);if(h)var v=h.get(null);else{h=new Map,Xf.set(o,h);for(var y=o.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<y.length;S++){var C=y[S];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(h.set(C.dataset.precedence,C),v=C)}v&&h.set(null,v)}y=u.instance,C=y.getAttribute("data-precedence"),S=h.get(C)||v,S===v&&h.set(null,y),h.set(C,y),this.count++,v=If.bind(this),y.addEventListener("load",v),y.addEventListener("error",v),S?S.parentNode.insertBefore(y,S.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(y,o.firstChild)),u.state.loading|=4}}var Hc={$$typeof:j,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function $D(o,u,h,v,y,S,C,N,U){this.tag=1,this.containerInfo=o,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=Cn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cn(0),this.hiddenUpdates=Cn(null),this.identifierPrefix=v,this.onUncaughtError=y,this.onCaughtError=S,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function O1(o,u,h,v,y,S,C,N,U,J,ae,oe){return o=new $D(o,u,h,C,U,J,ae,oe,N),u=1,S===!0&&(u|=24),S=_r(3,null,null,u),o.current=S,S.stateNode=o,u=Kp(),u.refCount++,o.pooledCache=u,u.refCount++,S.memoizedState={element:v,isDehydrated:h,cache:u},ng(S),o}function b1(o){return o?(o=Uo,o):Uo}function y1(o,u,h,v,y,S){y=b1(y),v.context===null?v.context=y:v.pendingContext=y,v=Fa(u),v.payload={element:h},S=S===void 0?null:S,S!==null&&(v.callback=S),h=Ha(o,v,u),h!==null&&(cr(h,o,u),Cc(h,o,u))}function x1(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<u?h:u}}function yv(o,u){x1(o,u),(o=o.alternate)&&x1(o,u)}function S1(o){if(o.tag===13||o.tag===31){var u=Ys(o,67108864);u!==null&&cr(u,o,67108864),yv(o,67108864)}}function w1(o){if(o.tag===13||o.tag===31){var u=Er();u=dn(u);var h=Ys(o,u);h!==null&&cr(h,o,u),yv(o,u)}}var Bf=!0;function qD(o,u,h,v){var y=$.T;$.T=null;var S=q.p;try{q.p=2,xv(o,u,h,v)}finally{q.p=S,$.T=y}}function ID(o,u,h,v){var y=$.T;$.T=null;var S=q.p;try{q.p=8,xv(o,u,h,v)}finally{q.p=S,$.T=y}}function xv(o,u,h,v){if(Bf){var y=Sv(v);if(y===null)ov(o,u,v,Vf,h),k1(o,v);else if(ZD(y,o,u,h,v))v.stopPropagation();else if(k1(o,v),u&4&&-1<XD.indexOf(o)){for(;y!==null;){var S=qa(y);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var C=Bt(S.pendingLanes);if(C!==0){var N=S;for(N.pendingLanes|=2,N.entangledLanes|=2;C;){var U=1<<31-mt(C);N.entanglements[1]|=U,C&=~U}Ni(S),(xt&6)===0&&(Tf=tt()+500,Bc(0))}}break;case 31:case 13:N=Ys(S,2),N!==null&&cr(N,S,2),Ef(),yv(S,2)}if(S=Sv(v),S===null&&ov(o,u,v,Vf,h),S===y)break;y=S}y!==null&&v.stopPropagation()}else ov(o,u,v,null,h)}}function Sv(o){return o=_p(o),wv(o)}var Vf=null;function wv(o){if(Vf=null,o=$a(o),o!==null){var u=a(o);if(u===null)o=null;else{var h=u.tag;if(h===13){if(o=s(u),o!==null)return o;o=null}else if(h===31){if(o=l(u),o!==null)return o;o=null}else if(h===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return Vf=o,null}function _1(o){switch(o){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(Un()){case ie:return 2;case de:return 8;case Qe:case Be:return 32;case nt:return 268435456;default:return 32}default:return 32}}var _v=!1,os=null,ls=null,cs=null,Gc=new Map,Kc=new Map,us=[],XD="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 k1(o,u){switch(o){case"focusin":case"focusout":os=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":cs=null;break;case"pointerover":case"pointerout":Gc.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kc.delete(u.pointerId)}}function Jc(o,u,h,v,y,S){return o===null||o.nativeEvent!==S?(o={blockedOn:u,domEventName:h,eventSystemFlags:v,nativeEvent:S,targetContainers:[y]},u!==null&&(u=qa(u),u!==null&&S1(u)),o):(o.eventSystemFlags|=v,u=o.targetContainers,y!==null&&u.indexOf(y)===-1&&u.push(y),o)}function ZD(o,u,h,v,y){switch(u){case"focusin":return os=Jc(os,o,u,h,v,y),!0;case"dragenter":return ls=Jc(ls,o,u,h,v,y),!0;case"mouseover":return cs=Jc(cs,o,u,h,v,y),!0;case"pointerover":var S=y.pointerId;return Gc.set(S,Jc(Gc.get(S)||null,o,u,h,v,y)),!0;case"gotpointercapture":return S=y.pointerId,Kc.set(S,Jc(Kc.get(S)||null,o,u,h,v,y)),!0}return!1}function j1(o){var u=$a(o.target);if(u!==null){var h=a(u);if(h!==null){if(u=h.tag,u===13){if(u=s(h),u!==null){o.blockedOn=u,zr(o.priority,function(){w1(h)});return}}else if(u===31){if(u=l(h),u!==null){o.blockedOn=u,zr(o.priority,function(){w1(h)});return}}else if(u===3&&h.stateNode.current.memoizedState.isDehydrated){o.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Uf(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var h=Sv(o.nativeEvent);if(h===null){h=o.nativeEvent;var v=new h.constructor(h.type,h);wp=v,h.target.dispatchEvent(v),wp=null}else return u=qa(h),u!==null&&S1(u),o.blockedOn=h,!1;u.shift()}return!0}function T1(o,u,h){Uf(o)&&h.delete(u)}function BD(){_v=!1,os!==null&&Uf(os)&&(os=null),ls!==null&&Uf(ls)&&(ls=null),cs!==null&&Uf(cs)&&(cs=null),Gc.forEach(T1),Kc.forEach(T1)}function Yf(o,u){o.blockedOn===u&&(o.blockedOn=null,_v||(_v=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,BD)))}var Wf=null;function C1(o){Wf!==o&&(Wf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wf===o&&(Wf=null);for(var u=0;u<o.length;u+=3){var h=o[u],v=o[u+1],y=o[u+2];if(typeof v!="function"){if(wv(v||h)===null)continue;break}var S=qa(h);S!==null&&(o.splice(u,3),u-=3,Sg(S,{pending:!0,data:y,method:h.method,action:v},v,y))}}))}function gl(o){function u(U){return Yf(U,o)}os!==null&&Yf(os,o),ls!==null&&Yf(ls,o),cs!==null&&Yf(cs,o),Gc.forEach(u),Kc.forEach(u);for(var h=0;h<us.length;h++){var v=us[h];v.blockedOn===o&&(v.blockedOn=null)}for(;0<us.length&&(h=us[0],h.blockedOn===null);)j1(h),h.blockedOn===null&&us.shift();if(h=(o.ownerDocument||o).$$reactFormReplay,h!=null)for(v=0;v<h.length;v+=3){var y=h[v],S=h[v+1],C=y[qn]||null;if(typeof S=="function")C||C1(h);else if(C){var N=null;if(S&&S.hasAttribute("formAction")){if(y=S,C=S[qn]||null)N=C.formAction;else if(wv(y)!==null)continue}else N=C.action;typeof N=="function"?h[v+1]=N:(h.splice(v,3),v-=3),C1(h)}}}function E1(){function o(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(C){return y=C})},focusReset:"manual",scroll:"manual"})}function u(){y!==null&&(y(),y=null),v||setTimeout(h,20)}function h(){if(!v&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,y=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(h,100),function(){v=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),y!==null&&(y(),y=null)}}}function kv(o){this._internalRoot=o}Ff.prototype.render=kv.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(r(409));var h=u.current,v=Er();y1(h,v,o,u,null,null)},Ff.prototype.unmount=kv.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;y1(o.current,2,null,o,null,null),Ef(),u[za]=null}};function Ff(o){this._internalRoot=o}Ff.prototype.unstable_scheduleHydration=function(o){if(o){var u=Wn();o={blockedOn:null,target:o,priority:u};for(var h=0;h<us.length&&u!==0&&u<us[h].priority;h++);us.splice(h,0,o),h===0&&j1(o)}};var Q1=t.version;if(Q1!=="19.2.4")throw Error(r(527,Q1,"19.2.4"));q.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(u),o=o!==null?f(o):null,o=o===null?null:o.stateNode,o};var VD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hf.isDisabled&&Hf.supportsFiber)try{sn=Hf.inject(VD),Zt=Hf}catch{}}return tu.createRoot=function(o,u){if(!i(o))throw Error(r(299));var h=!1,v="",y=Dw,S=zw,C=$w;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(S=u.onCaughtError),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),u=O1(o,1,!1,null,null,h,v,null,y,S,C,E1),o[za]=u.current,sv(o),new kv(u)},tu.hydrateRoot=function(o,u,h){if(!i(o))throw Error(r(299));var v=!1,y="",S=Dw,C=zw,N=$w,U=null;return h!=null&&(h.unstable_strictMode===!0&&(v=!0),h.identifierPrefix!==void 0&&(y=h.identifierPrefix),h.onUncaughtError!==void 0&&(S=h.onUncaughtError),h.onCaughtError!==void 0&&(C=h.onCaughtError),h.onRecoverableError!==void 0&&(N=h.onRecoverableError),h.formState!==void 0&&(U=h.formState)),u=O1(o,1,!0,u,h??null,v,y,U,S,C,N,E1),u.context=b1(null),h=u.current,v=Er(),v=dn(v),y=Fa(v),y.callback=null,Ha(h,y,v),h=v,u.current.lanes=h,$n(u,h),Ni(u),o[za]=u.current,sv(o),new Ff(u)},tu.version="19.2.4",tu}var $1;function c3(){if($1)return Cv.exports;$1=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(),Cv.exports=l3(),Cv.exports}var u3=c3();const d3=DC(u3),f3="modulepreload",h3=function(e){return"/"+e},q1={},Pe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=s(n.map(d=>{if(d=h3(d),d in q1)return;q1[d]=!0;const f=d.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":f3,f||(p.as="script"),p.crossOrigin="",p.href=d,c&&p.setAttribute("nonce",c),document.head.appendChild(p),f)return new Promise((O,b)=>{p.addEventListener("load",O),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&a(l.reason);return t().catch(a)})};function GO(e){"@babel/helpers - typeof";return GO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},GO(e)}function $C(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":GO(XMLHttpRequest))==="object"}function m3(e){return!!e&&typeof e.then=="function"}function p3(e){return m3(e)?e:Promise.resolve(e)}function I1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I1(Object(n),!0).forEach(function(r){g3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g3(e,t,n){return(t=v3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v3(e){var t=O3(e,"string");return So(t)=="symbol"?t:t+""}function O3(e,t){if(So(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(So(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function So(e){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(e)}var Es=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Es=global.fetch:typeof window<"u"&&window.fetch&&(Es=window.fetch);var Iu;$C()&&(typeof global<"u"&&global.XMLHttpRequest?Iu=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Iu=window.XMLHttpRequest));var Jh;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Jh=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Jh=window.ActiveXObject));typeof Es!="function"&&(Es=void 0);if(!Es&&!Iu&&!Jh)try{Pe(()=>import("./browser-ponyfill-D2ngVqWO.js").then(e=>e.b),__vite__mapDeps([0,1])).then(function(e){Es=e.default}).catch(function(){})}catch{}var KO=function(t,n){if(n&&So(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},Z1=function(t,n,r,i){var a=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(d){r(null,{status:c.status,data:d})}).catch(r)};if(i){var s=i(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):Es(t,n).then(a).catch(r)},B1=!1,b3=function(t,n,r,i){t.queryStringParams&&(n=KO(n,t.queryStringParams));var a=X1({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,l=X1({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},B1?{}:s),c=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Z1(n,l,i,c)}catch(d){if(!s||Object.keys(s).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(s).forEach(function(f){delete l[f]}),Z1(n,l,i,c),B1=!0}catch(f){i(f)}}},y3=function(t,n,r,i){r&&So(r)==="object"&&(r=KO("",r).slice(1)),t.queryStringParams&&(n=KO(n,t.queryStringParams));try{var a=Iu?new Iu:new Jh("MSXML2.XMLHTTP.3.0");a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var l in s)a.setRequestHeader(l,s[l]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(c){console&&console.log(c)}},x3=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Es&&n.indexOf("file:")!==0)return b3(t,n,r,i);if($C()||typeof ActiveXObject=="function")return y3(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function V1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Av(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V1(Object(n),!0).forEach(function(r){qC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function S3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IC(r.key),r)}}function _3(e,t,n){return t&&w3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qC(e,t,n){return(t=IC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IC(e){var t=k3(e,"string");return Ll(t)=="symbol"?t:t+""}function k3(e,t){if(Ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var j3=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return qC({},r,i||"")},parseLoadPayload:function(n,r){},request:x3,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},XC=(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};S3(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return _3(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Av(Av(Av({},j3()),this.options||{}),i),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);Ll(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,a,s){var l=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=p3(c),c.then(function(d){if(!d)return s(null,{});var f=l.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});l.loadUrl(f,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this,l=typeof i=="string"?[i]:i,c=typeof a=="string"?[a]:a,d=this.options.parseLoadPayload(l,c);this.options.request(this.options,n,d,function(f,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+n+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+n+"; status code: "+m.status,!1);if(!m&&f&&f.message){var p=f.message.toLowerCase(),O=["failed","fetch","network","load"].find(function(w){return p.indexOf(w)>-1});if(O)return r("failed loading "+n+": "+f.message,!0)}if(f)return r(f,!1);var b,x;try{typeof m.data=="string"?b=s.options.parse(m.data,i,a):b=m.data}catch{x="failed parsing "+n+" to json"}if(x)return r(x,!1);r(null,b)})}},{key:"create",value:function(n,r,i,a,s){var l=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,a),d=0,f=[],m=[];n.forEach(function(p){var O=l.options.addPath;typeof l.options.addPath=="function"&&(O=l.options.addPath(p,r));var b=l.services.interpolator.interpolate(O,{lng:p,ns:r});l.options.request(l.options,b,c,function(x,w){d+=1,f.push(x),m.push(w),d===n.length&&typeof s=="function"&&s(f,m)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,l=i.language;if(!(l&&l.toLowerCase()==="cimode")){var c=[],d=function(m){var p=a.toResolveHierarchy(m);p.forEach(function(O){c.indexOf(O)<0&&c.push(O)})};d(l),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),c.forEach(function(f){n.allOptions.ns.forEach(function(m){i.read(f,m,"read",null,null,function(p,O){p&&s.warn("loading namespace ".concat(m," for language ").concat(f," failed"),p),!p&&O&&s.log("loaded namespace ".concat(m," for language ").concat(f),O),i.loaded("".concat(f,"|").concat(m),p,O)})})})}}}])})();XC.type="backend";const ZC=["ar","bn","cs","da","de","el","en","es","fa","fi","fr","he","hi","id","it","ja","ko","ms","nl","no","pl","pt","ro","sv","th","tr","uk","vi","zh"],Dl="en";function JO(e){return ZC.includes(e)}t3.use(XC).use(n3).init({ns:["translation"],defaultNS:"translation",fallbackLng:Dl,supportedLngs:[...ZC],backend:{loadPath:"/messages/{{lng}}.json"},interpolation:{escapeValue:!1},initImmediate:!1});var BC={annotations:"Annotations",history:"History",resourceInfo:"Resource Info",collaboration:"Collaboration",userAccount:"User Account",settings:"Settings",knowledgeBase:"Knowledge Base"},VC={title:"Resource Info",locale:"Locale",notSpecified:"Not specified",entityTypeTags:"Entity Type Tags",representation:"Representation",mediaType:"Media Type",byteSize:"Size",storageUri:"Storage",clone:"Clone",cloneDescription:"Generate a shareable clone link for this resource",archive:"Archive",archiveDescription:"Move this resource to archived status",unarchive:"Unarchive",unarchiveDescription:"Restore this resource to active status",provenance:"Provenance",createdAt:"Created",modifiedAt:"Modified",creationMethod:"How created",attributedTo:"Attributed to",derivedFrom:"Derived from",generatedBy:"Generated by"},UC={title:"Collaboration",connectionStatus:"Connection Status",live:"Live",disconnected:"Disconnected",events:"{{count}} events",lastSync:"Last sync:",noActivity:"No activity yet",justNow:"Just now",secondsAgo:"{{count}} seconds ago",minuteAgo:"1 minute ago",minutesAgo:"{{count}} minutes ago",hourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",realtimeActive:"Real-time updates are active",reconnecting:"Reconnecting to server...",sharing:"Sharing",collaborationComingSoon:"Collaboration features coming soon"},YC={history:"History",loading:"Loading...",user:"User",method:"Method",viewOriginal:"View original",viewAnnotation:"View annotation: {{content}}",resourceCreated:"Created Resource",resourceCloned:"Cloned",resourceArchived:"Archived",resourceUnarchived:"Unarchived",highlightAdded:"Highlight Added",highlightRemoved:"Highlight Removed",referenceCreated:"Reference Created",referenceResolved:"Reference Resolved",referenceDeleted:"Reference Deleted",entitytagAdded:"Tag Added",entitytagRemoved:"Tag Removed",assessmentAdded:"Assessment Added",assessmentRemoved:"Assessment Removed",annotationAdded:"Annotation Added",annotationRemoved:"Annotation Removed",annotationBodyUpdated:"Annotation Updated",jobEvent:"Job Event",embeddingComputed:"Embedding Computed",justNow:"just now",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",daysAgo:"{{count}}d ago"},WC={title:"Comments",noComments:"No comments yet. Select text and click Comment to add one.",commentPlaceholder:"Type your comment here...",save:"Save",cancel:"Cancel",edit:"Edit",annotateComments:"Annotate Comments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on technical terminology...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneScholarly:"Scholarly",toneExplanatory:"Explanatory",toneConversational:"Conversational",toneTechnical:"Technical",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},FC={title:"Highlights",noHighlights:"No highlights yet. Use AI annotation to find important passages.",annotateHighlights:"Annotate Highlights",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on key technical concepts...",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",closeProgress:"Close"},HC={title:"Assessments",noAssessments:"No assessments yet. Use AI annotation to evaluate passages.",assessmentPlaceholder:"Type your assessment here...",save:"Save",cancel:"Cancel",annotateAssessments:"Annotate Assessments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Evaluate claims for accuracy and evidence...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneAnalytical:"Analytical",toneCritical:"Critical",toneBalanced:"Balanced",toneConstructive:"Constructive",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},GC={title:"Tags",noTags:"No tags yet. Use AI annotation to identify structural roles.",annotateTags:"Annotate Tags",selectSchema:"Select Framework",schemaLegal:"Legal Analysis (IRAC)",schemaScientific:"Scientific Paper (IMRAD)",schemaArgument:"Argument Structure (Toulmin)",selectCategories:"Select Categories",categoryIssue:"Issue",categoryRule:"Rule",categoryApplication:"Application",categoryConclusion:"Conclusion",categoryIntroduction:"Introduction",categoryMethods:"Methods",categoryResults:"Results",categoryDiscussion:"Discussion",categoryClaim:"Claim",categoryEvidence:"Evidence",categoryWarrant:"Warrant",categoryCounterargument:"Counterargument",categoryRebuttal:"Rebuttal",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",selectAll:"Select All",deselectAll:"Deselect All",categoriesSelected:"{count, plural, =0 {No categories selected} =1 {1 category selected} other {# categories selected}}",createTagForSelection:"Create Tag for Selection",selectCategory:"Select Category",chooseCategory:"Choose a category...",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected"},KC={title:"Annotations",statistics:"Statistics",highlight:"Highlights",reference:"References",assessment:"Assessments",comment:"Comments",tag:"Tags"},JC={title:"Statistics",highlights:"Highlights",comments:"Comments",assessments:"Assessments",tags:"Tags",references:"References",stub:"Stub",resolved:"Resolved",entityTypes:"Entity Types"},eE={title:"References",noReferences:"No references yet. Select text to create references to other resources.",outgoingReferences:"Outgoing References",incomingReferences:"Incoming References",noIncomingReferences:"No incoming references",stub:"Stub reference (not linked)",resolved:"Resolved reference (linked)",open:"Open",unlink:"Unlink",resolve:"Resolve Reference",cancel:"Cancel",createReference:"Create Reference",entityTypesOptional:"Entity Types (Optional)",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",annotateReferences:"Annotate References",selectEntityTypes:"Entity types:",select:"Select",deselect:"Deselect",noEntityTypes:"No entity types available",typesSelected:"{count, plural, =1 {1 type selected} other {# types selected}}",annotate:"Annotate",annotating:"Annotating...",includeDescriptiveReferences:"Include descriptive references",descriptiveReferencesTooltip:"Also find phrases like 'the CEO', 'the tech giant', 'the physicist' (in addition to names)",annotationProgressTitle:"Annotating Entity References",cancelAnnotation:"Cancel annotation",found:"{{count}} found",complete:"Annotation complete!",failed:"Annotation failed",current:"Current: {{entityType}}",closeProgress:"Close",loading:"loading...",loadingEllipsis:"Loading...",untitledResource:"Untitled Resource",noText:"No text"},tE={title:"Keyboard Shortcuts",closeDialog:"Close dialog",or:"or",navigationTitle:"Navigation",navOpenSearch:"Open global search",navOpenSearchAlt:"Open global search (alternative)",navCreateResource:"Create new resource",navCloseOverlays:"Close all overlays (double press)",navShowHelp:"Show keyboard shortcuts help",sidebarTitle:"Knowledge Sidebar",sidebarCollapse:"Collapse sidebar",sidebarExpand:"Expand sidebar",sidebarPickup:"Pick up resource tab (when focused)",sidebarMove:"Move resource tab (when dragging)",sidebarDrop:"Drop resource tab (when dragging)",sidebarCancel:"Cancel drag operation",annotationsTitle:"Resource Annotations",annotHighlight:"Create highlight from annotation (direct)",annotReference:"Open reference popup for annotation",annotDelete:"Delete focused annotation",annotNavigate:"Navigate through annotations",annotNavigateBack:"Navigate annotations backward",listsTitle:"Lists & Grids",listsFilterNav:"Navigate entity type filters",listsGridNav:"Navigate resource grid",listsJumpFirst:"Jump to first item",listsJumpLast:"Jump to last item",searchModalTitle:"In Search Modal",searchNav:"Navigate search results",searchSelect:"Select result",searchClose:"Close search",modalTitle:"Modal Controls",modalClose:"Close active modal",modalNavForward:"Navigate forward through buttons",modalNavBackward:"Navigate backward through buttons",modalActivate:"Activate focused button",accessibilityTitle:"Accessibility",a11ySkipLinks:"Navigate to skip links (when at page start)",a11yFollowLink:"Follow skip link",macNote:"Using Mac keyboard shortcuts. ⌘ is the Command key.",windowsNote:"Using Windows/Linux keyboard shortcuts. Ctrl is the Control key.",footerHint:"Press {{key}} anytime to show this help",close:"Close"},nE={modeGroup:"Mode",browse:"Browse",annotate:"Annotate",selectionGroup:"Motivation",clickGroup:"Click",shapeGroup:"Shape",none:"None",linking:"Reference",highlighting:"Highlight",assessing:"Assess",commenting:"Comment",tagging:"Tag",detail:"Detail",follow:"Follow",deleting:"Delete",jsonld:"JSON-LD",rectangle:"Rectangle",circle:"Circle",polygon:"Polygon"},rE={title:"Navigation",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",dragToReorder:"Drag to reorder",dragToReorderDoc:"Drag to reorder {{name}}",closeResource:"Close resource",dragInstructions:"To reorder resources: Use Tab to navigate to a resource. Press Alt+Up arrow to move up or Alt+Down arrow to move down. For drag and drop: Press space bar to pick up the item. Use arrow keys to move it. Press space bar again to drop."},iE={deleteConfirmationTitle:"Delete Annotation",deleteConfirmationMessage:"Are you sure you want to delete this annotation? This action cannot be undone.",deleteConfirmationCancel:"Cancel",deleteConfirmationDelete:"Delete"},aE={title:"Settings",lineNumbers:"Line Numbers",lineNumbersVisible:"Visible",lineNumbersHidden:"Hidden",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",themeSystemActive:"System ({{mode}})",themeModeActive:"Using {{mode}} mode",language:"Language",languageHint:"Change language in the main navigation",languageChanging:"Changing language...",hoverDelay:"Hover Delay",hoverDelayFast:"Fast",hoverDelaySlow:"Slow",hoverDelayDescription:"{{delay}}ms delay before hover effects appear"},sE={},oE={gatherTitle:"Gathered Context",configureGenerationTitle:"Configure Generation",configureSearchTitle:"Configure Search",searchResultsTitle:"Search Results",sourceContextLabel:"Annotation context in resource",connectionsLabel:"Peer Annotations",citedByLabel:"Resource Cited By",userHintLabel:"Hint",userHintPlaceholder:"Describe what this annotation refers to...",loadingContext:"Gathering context...",failedContext:"Failed to gather context",cancel:"Cancel",generate:"Generate",compose:"Compose",resolutionStrategyLabel:"Resolution Strategy",back:"Back",link:"Link",score:"Score",noResults:"No results found",resourceTitle:"Resource Title",resourceTitlePlaceholder:"Enter resource title...",additionalInstructions:"Additional Instructions",additionalInstructionsPlaceholder:"Enter additional instructions...",language:"Language",languageHelp:"Language for generated content",creativity:"Creativity",creativityFocused:"Focused",creativityCreative:"Creative",maxLength:"Max Length",maxLengthHelp:"Maximum number of tokens",maxResults:"Max Results",semanticScoring:"Semantic Scoring",semanticScoringHelp:"Use AI to score results by semantic relevance",searching:"Searching...",search:"Search"},yo={Toolbar:BC,ResourceInfoPanel:VC,CollaborationPanel:UC,AnnotationHistory:YC,CommentsPanel:WC,HighlightPanel:FC,AssessmentPanel:HC,TaggingPanel:GC,UnifiedAnnotationsPanel:KC,StatisticsPanel:JC,ReferencesPanel:eE,KeyboardShortcuts:tE,AnnotateToolbar:nE,CollapsibleResourceNavigation:rE,ResourceViewer:iE,Settings:aE,AnnotateView:sE,ReferenceWizard:oE},T3=Object.create,Gy=Object.defineProperty,C3=Object.getOwnPropertyDescriptor,lE=Object.getOwnPropertyNames,E3=Object.getPrototypeOf,Q3=Object.prototype.hasOwnProperty,A3=e=>t=>{var n=e[t];if(n)return n();throw new Error("Module not found in bundle: "+t)},F=(e,t)=>function(){return t||(0,e[lE(e)[0]])((t={exports:{}}).exports,t),t.exports},cE=(e,t)=>{for(var n in t)Gy(e,n,{get:t[n],enumerable:!0})},P3=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lE(t))!Q3.call(e,i)&&i!==n&&Gy(e,i,{get:()=>t[i],enumerable:!(r=C3(t,i))||r.enumerable});return e},Rm=(e,t,n)=>(n=e!=null?T3(E3(e)):{},P3(t||!e||!e.__esModule?Gy(n,"default",{value:e,enumerable:!0}):n,e));class em extends Error{constructor(n,r,i){const a=n.status||n.status===0?n.status:"",s=n.statusText??"",l=`${a} ${s}`.trim(),c=l?`status code ${l}`:"an unknown error";super(`Request failed with ${c}: ${r.method} ${r.url}`);pe(this,"response");pe(this,"request");pe(this,"options");this.name="HTTPError",this.response=n,this.request=r,this.options=i}}class uE extends Error{constructor(n){let r="Non-error value was thrown";try{typeof n=="string"?r=n:n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"&&(r=n.message)}catch{}super(r);pe(this,"name","NonError");pe(this,"value");this.value=n}}class Pv extends Error{constructor(n){const r=n!=null&&n.cause?n.cause instanceof Error?n.cause:new uE(n.cause):void 0;super(n!=null&&n.code?`Forced retry: ${n.code}`:"Forced retry",r?{cause:r}:void 0);pe(this,"name","ForceRetryError");pe(this,"customDelay");pe(this,"code");pe(this,"customRequest");this.customDelay=n==null?void 0:n.delay,this.code=n==null?void 0:n.code,this.customRequest=n==null?void 0:n.request}}const U1=(()=>{let e=!1,t=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return e&&!t})(),N3=typeof globalThis.AbortController=="function",dE=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",R3=typeof globalThis.ReadableStream=="function",M3=typeof globalThis.FormData=="function",fE=["get","post","put","patch","head","delete"],L3={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Nv=2147483647,D3=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,hE=Symbol("stop");class mE{constructor(t){pe(this,"options");this.options=t}}const z3=e=>new mE(e),$3={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},q3={next:!0},I3={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},X3=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=D3,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},pE=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(a,s){if(s.enqueue(a),r){i+=r.byteLength;let l=t===0?0:i/t;l>=1&&(l=1-Number.EPSILON),n==null||n({percent:l,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=a},flush(){r&&(i+=r.byteLength,n==null||n({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},Z3=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const n=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(pE(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},B3=(e,t,n)=>{if(!e.body)return e;const r=X3(n??e.body);return new Request(e,{duplex:"half",body:pE(e.body,r,t)})},fo=e=>e!==null&&typeof e=="object",Gf=(...e)=>{for(const t of e)if((!fo(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return Ky({},...e)},gE=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(const[a,s]of i.entries())r&&s==="undefined"||s===void 0?n.delete(a):n.set(a,s);return n};function Kf(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:Ky(e[n]??[],t[n]??[])}const vE=(e={},t={})=>({beforeRequest:Kf(e,t,"beforeRequest"),beforeRetry:Kf(e,t,"beforeRetry"),afterResponse:Kf(e,t,"afterResponse"),beforeError:Kf(e,t,"beforeError")}),V3=(e,t)=>{const n=new URLSearchParams;for(const r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(const[i,a]of r.entries())n.append(i,a);else if(Array.isArray(r))for(const i of r){if(!Array.isArray(i)||i.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(i[0]),String(i[1]))}else if(fo(r))for(const[i,a]of Object.entries(r))a!==void 0&&n.append(i,String(a));else{const i=new URLSearchParams(r);for(const[a,s]of i.entries())n.append(a,s)}return n},Ky=(...e)=>{let t={},n={},r={},i;const a=[];for(const s of e)if(Array.isArray(s))Array.isArray(t)||(t=[]),t=[...t,...s];else if(fo(s)){for(let[l,c]of Object.entries(s)){if(l==="signal"&&c instanceof globalThis.AbortSignal){a.push(c);continue}if(l==="context"){if(c!=null&&(!fo(c)||Array.isArray(c)))throw new TypeError("The `context` option must be an object");t={...t,context:c==null?{}:{...t.context,...c}};continue}if(l==="searchParams"){c==null?i=void 0:i=i===void 0?c:V3(i,c);continue}fo(c)&&l in t&&(c=Ky(t[l],c)),t={...t,[l]:c}}fo(s.hooks)&&(r=vE(r,s.hooks),t.hooks=r),fo(s.headers)&&(n=gE(n,s.headers),t.headers=n)}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:dE?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},U3=e=>fE.includes(e)?e.toUpperCase():e,Y3=["get","put","head","delete","options","trace"],W3=[408,413,429,500,502,503,504],F3=[413,429,503],Y1={limit:2,methods:Y3,statusCodes:W3,afterStatusCodes:F3,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},H3=(e={})=>{if(typeof e=="number")return{...Y1,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&(e.methods=e.methods.map(n=>n.toLowerCase())),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...Y1,...t}};let eb=class extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);pe(this,"request");this.name="TimeoutError",this.request=n}};async function G3(e,t,n,r){return new Promise((i,a)=>{const s=setTimeout(()=>{n&&n.abort(),a(new eb(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(s)})})}async function K3(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}const a=setTimeout(()=>{t==null||t.removeEventListener("abort",i),n()},e)})}const J3=(e,t)=>{const n={};for(const r in t)Object.hasOwn(t,r)&&!(r in I3)&&!(r in $3)&&(!(r in e)||r in q3)&&(n[r]=t[r]);return n},ez=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e=="object"?Object.keys(e).length>0:typeof e=="string"?e.trim().length>0:!!e;function tz(e){return e instanceof em||(e==null?void 0:e.name)===em.name}function nz(e){return e instanceof eb||(e==null?void 0:e.name)===eb.name}var Nm,OE,bi,Gr,In,xe,xs,Zi,bo,Ge,Ah,bE,tb,Ph,ms,nb,yE,du,Nh,rb;const qu=class qu{constructor(t,n={}){Ri(this,Ge);pe(this,"request");Ri(this,bi);Ri(this,Gr,0);Ri(this,In);Ri(this,xe);Ri(this,xs);Ri(this,Zi);Ri(this,bo);var i,a,s;if(gi(this,In,t),gi(this,xe,{...n,headers:gE(ce(this,In).headers,n.headers),hooks:vE({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:U3(n.method??ce(this,In).method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:H3(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof ce(this,In)!="string"&&!(ce(this,In)instanceof URL||ce(this,In)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(ce(this,xe).prefixUrl&&typeof ce(this,In)=="string"){if(ce(this,In).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");ce(this,xe).prefixUrl.endsWith("/")||(ce(this,xe).prefixUrl+="/"),gi(this,In,ce(this,xe).prefixUrl+ce(this,In))}N3&&dE&&(gi(this,Zi,ce(this,xe).signal??ce(this,In).signal),gi(this,bi,new globalThis.AbortController),ce(this,xe).signal=ce(this,Zi)?AbortSignal.any([ce(this,Zi),ce(this,bi).signal]):ce(this,bi).signal),U1&&(ce(this,xe).duplex="half"),ce(this,xe).json!==void 0&&(ce(this,xe).body=((a=(i=ce(this,xe)).stringifyJson)==null?void 0:a.call(i,ce(this,xe).json))??JSON.stringify(ce(this,xe).json),ce(this,xe).headers.set("content-type",ce(this,xe).headers.get("content-type")??"application/json"));const r=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(ce(this,In)instanceof globalThis.Request&&(M3&&ce(this,xe).body instanceof globalThis.FormData||ce(this,xe).body instanceof URLSearchParams)&&!r&&ce(this,xe).headers.delete("content-type"),this.request=new globalThis.Request(ce(this,In),ce(this,xe)),ez(ce(this,xe).searchParams)){const c="?"+(typeof ce(this,xe).searchParams=="string"?ce(this,xe).searchParams.replace(/^\?/,""):new URLSearchParams(St(s=qu,Nm,OE).call(s,ce(this,xe).searchParams)).toString()),d=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,c);this.request=new globalThis.Request(d,ce(this,xe))}if(ce(this,xe).onUploadProgress){if(typeof ce(this,xe).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!U1)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=St(this,Ge,rb).call(this,this.request,ce(this,xe).body??void 0)}}static create(t,n){var s,l,c;const r=new qu(t,n),i=async()=>{var f,m,p,O,b,x,w,k,T,j,E,Q;if(typeof ce(r,xe).timeout=="number"&&ce(r,xe).timeout>Nv)throw new RangeError(`The \`timeout\` option cannot be greater than ${Nv}`);await Promise.resolve();let d=await St(f=r,Ge,yE).call(f);for(const A of ce(r,xe).hooks.afterResponse){const M=St(m=r,Ge,tb).call(m,d.clone());let L;try{L=await A(r.request,St(p=r,Ge,du).call(p),M,{retryCount:ce(r,Gr)})}catch(P){throw St(O=r,Ge,ms).call(O,M),St(b=r,Ge,ms).call(b,d),P}if(L instanceof mE)throw St(x=r,Ge,ms).call(x,M),St(w=r,Ge,ms).call(w,d),new Pv(L.options);const D=L instanceof globalThis.Response?L:d;M!==D&&St(k=r,Ge,ms).call(k,M),d!==D&&St(T=r,Ge,ms).call(T,d),d=D}if(St(j=r,Ge,tb).call(j,d),!d.ok&&(typeof ce(r,xe).throwHttpErrors=="function"?ce(r,xe).throwHttpErrors(d.status):ce(r,xe).throwHttpErrors)){let A=new em(d,r.request,St(E=r,Ge,du).call(E));for(const M of ce(r,xe).hooks.beforeError)A=await M(A,{retryCount:ce(r,Gr)});throw A}if(ce(r,xe).onDownloadProgress){if(typeof ce(r,xe).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!R3)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const A=d.clone();return St(Q=r,Ge,ms).call(Q,d),Z3(A,ce(r,xe).onDownloadProgress)}return d},a=St(s=r,Ge,nb).call(s,i).finally(()=>{var f,m;const d=ce(r,xs);St(f=r,Ge,Ph).call(f,(d==null?void 0:d.body)??void 0),St(m=r,Ge,Ph).call(m,r.request.body??void 0)});for(const[d,f]of Object.entries(L3))d==="bytes"&&typeof((c=(l=globalThis.Response)==null?void 0:l.prototype)==null?void 0:c.bytes)!="function"||(a[d]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||f);const m=await a;if(d==="json"){if(m.status===204)return"";const p=await m.text();return p===""?"":n.parseJson?n.parseJson(p):JSON.parse(p)}return m[d]()});return a}};Nm=new WeakSet,OE=function(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof URLSearchParams)?Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0)):t},bi=new WeakMap,Gr=new WeakMap,In=new WeakMap,xe=new WeakMap,xs=new WeakMap,Zi=new WeakMap,bo=new WeakMap,Ge=new WeakSet,Ah=function(){const t=ce(this,xe).retry.delay(ce(this,Gr));let n=t;ce(this,xe).retry.jitter===!0?n=Math.random()*t:typeof ce(this,xe).retry.jitter=="function"&&(n=ce(this,xe).retry.jitter(t),(!Number.isFinite(n)||n<0)&&(n=t));const r=ce(this,xe).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,n)},bE=async function(t){if(P1(this,Gr)._++,ce(this,Gr)>ce(this,xe).retry.limit)throw t;const n=t instanceof Error?t:new uE(t);if(n instanceof Pv)return n.customDelay??St(this,Ge,Ah).call(this);if(!ce(this,xe).retry.methods.includes(this.request.method.toLowerCase()))throw t;if(ce(this,xe).retry.shouldRetry!==void 0){const r=await ce(this,xe).retry.shouldRetry({error:n,retryCount:ce(this,Gr)});if(r===!1)throw t;if(r===!0)return St(this,Ge,Ah).call(this)}if(nz(t)&&!ce(this,xe).retry.retryOnTimeout)throw t;if(tz(t)){if(!ce(this,xe).retry.statusCodes.includes(t.response.status))throw t;const r=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Retry-After")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(r&&ce(this,xe).retry.afterStatusCodes.includes(t.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=ce(this,xe).retry.maxRetryAfter??i;return i<a?i:a}if(t.response.status===413)throw t}return St(this,Ge,Ah).call(this)},tb=function(t){return ce(this,xe).parseJson&&(t.json=async()=>ce(this,xe).parseJson(await t.text())),t},Ph=function(t){t&&t.cancel().catch(()=>{})},ms=function(t){St(this,Ge,Ph).call(this,t.body??void 0)},nb=async function(t){try{return await t()}catch(n){const r=Math.min(await St(this,Ge,bE).call(this,n),Nv);if(ce(this,Gr)<1)throw n;if(await K3(r,ce(this,Zi)?{signal:ce(this,Zi)}:{}),n instanceof Pv&&n.customRequest){const i=ce(this,xe).signal?new globalThis.Request(n.customRequest,{signal:ce(this,xe).signal}):new globalThis.Request(n.customRequest);St(this,Ge,Nh).call(this,i)}for(const i of ce(this,xe).hooks.beforeRetry){const a=await i({request:this.request,options:St(this,Ge,du).call(this),error:n,retryCount:ce(this,Gr)});if(a instanceof globalThis.Request){St(this,Ge,Nh).call(this,a);break}if(a instanceof globalThis.Response)return a;if(a===hE)return}return St(this,Ge,nb).call(this,t)}},yE=async function(){var n;(n=ce(this,bi))!=null&&n.signal.aborted&&(gi(this,bi,new globalThis.AbortController),ce(this,xe).signal=ce(this,Zi)?AbortSignal.any([ce(this,Zi),ce(this,bi).signal]):ce(this,bi).signal,this.request=new globalThis.Request(this.request,{signal:ce(this,xe).signal}));for(const r of ce(this,xe).hooks.beforeRequest){const i=await r(this.request,St(this,Ge,du).call(this),{retryCount:ce(this,Gr)});if(i instanceof Response)return i;if(i instanceof globalThis.Request){St(this,Ge,Nh).call(this,i);break}}const t=J3(this.request,ce(this,xe));return gi(this,xs,this.request),this.request=ce(this,xs).clone(),ce(this,xe).timeout===!1?ce(this,xe).fetch(ce(this,xs),t):G3(ce(this,xs),t,ce(this,bi),ce(this,xe))},du=function(){if(!ce(this,bo)){const{hooks:t,...n}=ce(this,xe);gi(this,bo,Object.freeze(n))}return ce(this,bo)},Nh=function(t){gi(this,bo,void 0),this.request=St(this,Ge,rb).call(this,t)},rb=function(t,n){return!ce(this,xe).onUploadProgress||!t.body?t:B3(t,ce(this,xe).onUploadProgress,n??ce(this,xe).body??void 0)},Ri(qu,Nm);let tm=qu;/*! MIT License © Sindre Sorhus */const ib=e=>{const t=(n,r)=>tm.create(n,Gf(e,r));for(const n of fE)t[n]=(r,i)=>tm.create(r,Gf(e,i,{method:n}));return t.create=n=>ib(Gf(n)),t.extend=n=>(typeof n=="function"&&(n=n(e??{})),ib(Gf(e,n))),t.stop=hE,t.retry=z3,t},Rv=ib();var ab=function(e,t){return ab=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ab(e,t)};function Na(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ab(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function rz(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(f){try{d(r.next(f))}catch(m){s(m)}}function c(f){try{d(r.throw(f))}catch(m){s(m)}}function d(f){f.done?a(f.value):i(f.value).then(l,c)}d((r=r.apply(e,t||[])).next())})}function xE(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=l(0),s.throw=l(1),s.return=l(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){n.label=d[1];break}if(d[0]===6&&n.label<a[1]){n.label=a[1],a=d;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(d);break}a[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],i=0}finally{r=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function zl(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function Zu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function wl(e){return this instanceof wl?(this.v=e,this):new wl(e)}function iz(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(O){return function(b){return Promise.resolve(b).then(O,m)}}function l(O,b){r[O]&&(i[O]=function(x){return new Promise(function(w,k){a.push([O,x,w,k])>1||c(O,x)})},b&&(i[O]=b(i[O])))}function c(O,b){try{d(r[O](b))}catch(x){p(a[0][3],x)}}function d(O){O.value instanceof wl?Promise.resolve(O.value.v).then(f,m):p(a[0][2],O)}function f(O){c("next",O)}function m(O){c("throw",O)}function p(O,b){O(b),a.shift(),a.length&&c(a[0][0],a[0][1])}}function az(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof zl=="function"?zl(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(s){return new Promise(function(l,c){s=e[a](s),i(l,c,s.done,s.value)})}}function i(a,s,l,c){Promise.resolve(c).then(function(d){a({value:d,done:l})},s)}}function _n(e){return typeof e=="function"}function Mm(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Mv=Mm(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
35
+ `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
36
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function nm(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Hl=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var l=zl(s),c=l.next();!c.done;c=l.next()){var d=c.value;d.remove(this)}}catch(x){t={error:x}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}else s.remove(this);var f=this.initialTeardown;if(_n(f))try{f()}catch(x){a=x instanceof Mv?x.errors:[x]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var p=zl(m),O=p.next();!O.done;O=p.next()){var b=O.value;try{W1(b)}catch(x){a=a??[],x instanceof Mv?a=Zu(Zu([],Xu(a)),Xu(x.errors)):a.push(x)}}}catch(x){r={error:x}}finally{try{O&&!O.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}}if(a)throw new Mv(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)W1(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&nm(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&nm(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),SE=Hl.EMPTY;function wE(e){return e instanceof Hl||e&&"closed"in e&&_n(e.remove)&&_n(e.add)&&_n(e.unsubscribe)}function W1(e){_n(e)?e():e.unsubscribe()}var sz={Promise:void 0},oz={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Zu([e,t],Xu(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function _E(e){oz.setTimeout(function(){throw e})}function sb(){}function Rh(e){e()}var Jy=(function(e){Na(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,wE(n)&&n.add(r)):r.destination=uz,r}return t.create=function(n,r,i){return new $l(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Hl),lz=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Jf(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Jf(r)}else Jf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Jf(n)}},e})(),$l=(function(e){Na(t,e);function t(n,r,i){var a=e.call(this)||this,s;return _n(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,a.destination=new lz(s),a}return t})(Jy);function Jf(e){_E(e)}function cz(e){throw e}var uz={closed:!0,next:sb,error:cz,complete:sb},e0=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function t0(e){return e}function dz(e){return e.length===0?t0:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var Bn=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=hz(t)?t:new $l(t,n,r);return Rh(function(){var s=i,l=s.operator,c=s.source;a.add(l?l.call(a,c):c?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=F1(n),new n(function(i,a){var s=new $l({next:function(l){try{t(l)}catch(c){a(c),s.unsubscribe()}},error:a,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[e0]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return dz(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=F1(t),new t(function(r,i){var a;n.subscribe(function(s){return a=s},function(s){return i(s)},function(){return r(a)})})},e.create=function(t){return new e(t)},e})();function F1(e){var t;return(t=e??sz.Promise)!==null&&t!==void 0?t:Promise}function fz(e){return e&&_n(e.next)&&_n(e.error)&&_n(e.complete)}function hz(e){return e&&e instanceof Jy||fz(e)&&wE(e)}function mz(e){return _n(e==null?void 0:e.lift)}function Lr(e){return function(t){if(mz(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ai(e,t,n,r,i){return new pz(e,t,n,r,i)}var pz=(function(e){Na(t,e);function t(n,r,i,a,s,l){var c=e.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=l,c._next=r?function(d){try{r(d)}catch(f){n.error(f)}}:e.prototype._next,c._error=a?function(d){try{a(d)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(d){n.error(d)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Jy),gz=Mm(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Rs=(function(e){Na(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new H1(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new gz},t.prototype.next=function(n){var r=this;Rh(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=zl(r.currentObservers),l=s.next();!l.done;l=s.next()){var c=l.value;c.next(n)}}catch(d){i={error:d}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Rh(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Rh(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,s=i.isStopped,l=i.observers;return a||s?SE:(this.currentObservers=null,l.push(n),new Hl(function(){r.currentObservers=null,nm(l,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,s=r.isStopped;i?n.error(a):s&&n.complete()},t.prototype.asObservable=function(){var n=new Bn;return n.source=this,n},t.create=function(n,r){return new H1(n,r)},t})(Bn),H1=(function(e){Na(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:SE},t})(Rs),Re=(function(e){Na(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t})(Rs),vz={now:function(){return Date.now()}},Oz=(function(e){Na(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(Hl),G1={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Zu([e,t],Xu(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},bz=(function(e){Na(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var a=this.id,s=this.scheduler;return a!=null&&(this.id=this.recycleAsyncId(s,a,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),G1.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&G1.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,a;try{this.work(n)}catch(s){i=!0,a=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),a},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,a=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,nm(a,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(Oz),K1=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=vz.now,e})(),yz=(function(e){Na(t,e);function t(n,r){r===void 0&&(r=K1.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t})(K1),kE=new yz(bz),jE=new Bn(function(e){return e.complete()});function xz(e){return e&&_n(e.schedule)}function TE(e){return e[e.length-1]}function Lm(e){return xz(TE(e))?e.pop():void 0}function Sz(e,t){return typeof TE(e)=="number"?e.pop():t}var CE=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function EE(e){return _n(e==null?void 0:e.then)}function QE(e){return _n(e[e0])}function AE(e){return Symbol.asyncIterator&&_n(e==null?void 0:e[Symbol.asyncIterator])}function PE(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function wz(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var NE=wz();function RE(e){return _n(e==null?void 0:e[NE])}function ME(e){return iz(this,arguments,function(){var n,r,i,a;return xE(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,wl(n.read())];case 3:return r=s.sent(),i=r.value,a=r.done,a?[4,wl(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,wl(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function LE(e){return _n(e==null?void 0:e.getReader)}function Ti(e){if(e instanceof Bn)return e;if(e!=null){if(QE(e))return _z(e);if(CE(e))return kz(e);if(EE(e))return jz(e);if(AE(e))return DE(e);if(RE(e))return Tz(e);if(LE(e))return Cz(e)}throw PE(e)}function _z(e){return new Bn(function(t){var n=e[e0]();if(_n(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function kz(e){return new Bn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function jz(e){return new Bn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,_E)})}function Tz(e){return new Bn(function(t){var n,r;try{for(var i=zl(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.next(s),t.closed)return}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function DE(e){return new Bn(function(t){Ez(e,t).catch(function(n){return t.error(n)})})}function Cz(e){return DE(ME(e))}function Ez(e,t){var n,r,i,a;return rz(this,void 0,void 0,function(){var s,l;return xE(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=az(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=c.sent(),i={error:l},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Ts(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function zE(e,t){return t===void 0&&(t=0),Lr(function(n,r){n.subscribe(ai(r,function(i){return Ts(r,e,function(){return r.next(i)},t)},function(){return Ts(r,e,function(){return r.complete()},t)},function(i){return Ts(r,e,function(){return r.error(i)},t)}))})}function $E(e,t){return t===void 0&&(t=0),Lr(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Qz(e,t){return Ti(e).pipe($E(t),zE(t))}function Az(e,t){return Ti(e).pipe($E(t),zE(t))}function Pz(e,t){return new Bn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Nz(e,t){return new Bn(function(n){var r;return Ts(n,t,function(){r=e[NE](),Ts(n,t,function(){var i,a,s;try{i=r.next(),a=i.value,s=i.done}catch(l){n.error(l);return}s?n.complete():n.next(a)},0,!0)}),function(){return _n(r==null?void 0:r.return)&&r.return()}})}function qE(e,t){if(!e)throw new Error("Iterable cannot be null");return new Bn(function(n){Ts(n,t,function(){var r=e[Symbol.asyncIterator]();Ts(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Rz(e,t){return qE(ME(e),t)}function Mz(e,t){if(e!=null){if(QE(e))return Qz(e,t);if(CE(e))return Pz(e,t);if(EE(e))return Az(e,t);if(AE(e))return qE(e,t);if(RE(e))return Nz(e,t);if(LE(e))return Rz(e,t)}throw PE(e)}function n0(e,t){return t?Mz(e,t):Ti(e)}function Lz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Lm(e);return n0(e,n)}var Dz=Mm(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function zz(e,t){return new Promise(function(n,r){var i=new $l({next:function(a){n(a),i.unsubscribe()},error:r,complete:function(){r(new Dz)}});e.subscribe(i)})}function $z(e){return e instanceof Date&&!isNaN(e)}var qz=Mm(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function pd(e,t){var n=$z(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,a=n.with,s=a===void 0?Iz:a,l=n.scheduler,c=l===void 0?kE:l,d=n.meta,f=d===void 0?null:d;if(r==null&&i==null)throw new TypeError("No timeout provided.");return Lr(function(m,p){var O,b,x=null,w=0,k=function(T){b=Ts(p,c,function(){try{O.unsubscribe(),Ti(s({meta:f,lastValue:x,seen:w})).subscribe(p)}catch(j){p.error(j)}},T)};O=m.subscribe(ai(p,function(T){b==null||b.unsubscribe(),w++,p.next(x=T),i>0&&k(i)},void 0,void 0,function(){b!=null&&b.closed||b==null||b.unsubscribe(),x=null})),!w&&k(r!=null?typeof r=="number"?r:+r-c.now():i)})}function Iz(e){throw new qz(e)}function nn(e,t){return Lr(function(n,r){var i=0;n.subscribe(ai(r,function(a){r.next(e.call(t,a,i++))}))})}function Xz(e,t,n,r,i,a,s,l){var c=[],d=0,f=0,m=!1,p=function(){m&&!c.length&&!d&&t.complete()},O=function(x){return d<r?b(x):c.push(x)},b=function(x){d++;var w=!1;Ti(n(x,f++)).subscribe(ai(t,function(k){t.next(k)},function(){w=!0},void 0,function(){if(w)try{d--;for(var k=function(){var T=c.shift();s||b(T)};c.length&&d<r;)k();p()}catch(T){t.error(T)}}))};return e.subscribe(ai(t,O,function(){m=!0,p()})),function(){}}function IE(e,t,n){return n===void 0&&(n=1/0),_n(t)?IE(function(r,i){return nn(function(a,s){return t(r,a,i,s)})(Ti(e(r,i)))},n):(typeof t=="number"&&(n=t),Lr(function(r,i){return Xz(r,i,e,n)}))}function XE(e){return e===void 0&&(e=1/0),IE(t0,e)}function Zz(){return XE(1)}function J1(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zz()(n0(e,Lm(e)))}function Bu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Lm(e),r=Sz(e,1/0),i=e;return i.length?i.length===1?Ti(i[0]):XE(r)(n0(i,n)):jE}function fr(e,t){return Lr(function(n,r){var i=0;n.subscribe(ai(r,function(a){return e.call(t,a,i++)&&r.next(a)}))})}function Bz(e,t){return t===void 0&&(t=kE),Lr(function(n,r){var i=null,a=null,s=null,l=function(){if(i){i.unsubscribe(),i=null;var d=a;a=null,r.next(d)}};function c(){var d=s+e,f=t.now();if(f<d){i=this.schedule(void 0,d-f),r.add(i);return}l()}n.subscribe(ai(r,function(d){a=d,s=t.now(),i||(i=t.schedule(c,e),r.add(i))},function(){l(),r.complete()},void 0,function(){a=i=null}))})}function Vz(e){return e<=0?function(){return jE}:Lr(function(t,n){var r=0;t.subscribe(ai(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function ZE(e,t){return t===void 0&&(t=t0),e=e??Uz,Lr(function(n,r){var i,a=!0;n.subscribe(ai(r,function(s){var l=t(s);(a||!e(i,l))&&(a=!1,i=l,r.next(s))}))})}function Uz(e,t){return e===t}function Yz(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new Rs}:t,r=e.resetOnError,i=r===void 0?!0:r,a=e.resetOnComplete,s=a===void 0?!0:a,l=e.resetOnRefCountZero,c=l===void 0?!0:l;return function(d){var f,m,p,O=0,b=!1,x=!1,w=function(){m==null||m.unsubscribe(),m=void 0},k=function(){w(),f=p=void 0,b=x=!1},T=function(){var j=f;k(),j==null||j.unsubscribe()};return Lr(function(j,E){O++,!x&&!b&&w();var Q=p=p??n();E.add(function(){O--,O===0&&!x&&!b&&(m=Lv(T,c))}),Q.subscribe(E),!f&&O>0&&(f=new $l({next:function(A){return Q.next(A)},error:function(A){x=!0,w(),m=Lv(k,i,A),Q.error(A)},complete:function(){b=!0,w(),m=Lv(k,s),Q.complete()}}),Ti(j).subscribe(f))})(d)}}function Lv(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new $l({next:function(){i.unsubscribe(),e()}});return Ti(t.apply(void 0,Zu([],Xu(n)))).subscribe(i)}}function Dv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Lm(e);return Lr(function(r,i){(n?J1(e,r,n):J1(e,r)).subscribe(i)})}function Wz(e,t){return Lr(function(n,r){var i=null,a=0,s=!1,l=function(){return s&&!i&&r.complete()};n.subscribe(ai(r,function(c){i==null||i.unsubscribe();var d=0,f=a++;Ti(e(c,f)).subscribe(i=ai(r,function(m){return r.next(t?t(c,m,f,d++):m)},function(){i=null,l()}))},function(){s=!0,l()}))})}function r0(e){return Lr(function(t,n){Ti(e).subscribe(ai(n,function(){return n.complete()},sb)),!n.closed&&t.subscribe(n)})}function Kne(e){return e}function Jne(e){return e}function ere(e){return e}function Hi(e){if(e.includes("/"))throw new TypeError(`Expected ResourceId, got URI: ${e}`);return e}function ri(e){if(e.includes("/"))throw new TypeError(`Expected AnnotationId, got URI: ${e}`);return e}var Fz=["yield:created","yield:cloned","yield:updated","yield:moved","yield:representation-added","yield:representation-removed","mark:added","mark:removed","mark:body-updated","mark:archived","mark:unarchived","mark:entity-tag-added","mark:entity-tag-removed","mark:entity-type-added","job:started","job:progress","job:completed","job:failed"],Hz=["job:complete","job:fail"];function BE(e){var n;const t=e.payload;if(e.type==="mark:added")return((n=t==null?void 0:t.annotation)==null?void 0:n.id)||null;if((e.type==="mark:removed"||e.type==="mark:body-updated")&&t!=null&&t.annotationId&&e.resourceId)try{const r=e.resourceId;return`${r.substring(0,r.lastIndexOf("/resources/"))}/annotations/${t.annotationId}`}catch{return null}return null}var VE=class{constructor(){pe(this,"subjects");pe(this,"isDestroyed");this.subjects=new Map,this.isDestroyed=!1}get(e){if(this.isDestroyed)throw new Error(`Cannot access event '${String(e)}' on destroyed bus`);return this.subjects.has(e)||this.subjects.set(e,new Rs),this.subjects.get(e)}getDomainEvent(e){return this.get(e)}destroy(){if(!this.isDestroyed){for(const e of this.subjects.values())e.complete();this.subjects.clear(),this.isDestroyed=!0}}get destroyed(){return this.isDestroyed}scope(e){return new Gz(this,e)}},Gz=class UE{constructor(t,n){this.parent=t,this.scopePrefix=n}get(t){const n=`${this.scopePrefix}:${t}`,r=this.parent.subjects;return r.has(n)||r.set(n,new Rs),r.get(n)}getDomainEvent(t){return this.get(t)}scope(t){return new UE(this.parent,`${this.scopePrefix}:${t}`)}};function si(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextPositionSelector");return n&&n.type==="TextPositionSelector"?n:null}function YE(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="SvgSelector");return n&&n.type==="SvgSelector"?n:null}function Kz(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="FragmentSelector");return n&&n.type==="FragmentSelector"?n:null}function ek(e,t,n,r){if(typeof globalThis>"u"||!globalThis.__SEMIONT_BUS_LOG__)return;const a=n==null?void 0:n.correlationId,s=`[bus ${e}] ${t}`+(r?` scope=${r}`:"")+(a?` cid=${String(a).slice(0,8)}`:"");console.debug(s,n)}var Jz=3e3,e$={initial:["connecting","closed"],connecting:["open","reconnecting","closed"],open:["reconnecting","closed"],reconnecting:["connecting","degraded","closed"],degraded:["connecting","closed"],closed:[]};function t$(e){const{baseUrl:t,token:n,channels:r,scope:i,reconnectMs:a=5e3}=e,s=typeof n=="function"?n:()=>n,l=globalThis;l.__SEMIONT_ACTOR_INSTANCES__=(l.__SEMIONT_ACTOR_INSTANCES__??0)+1;const c=l.__SEMIONT_ACTOR_INSTANCES__;console.debug(`[diag] ActorVM #${c} constructed (baseUrl=${t})`);const d=new Set(r),f=new Set;let m=i;const p=new Rs,O=new Re("initial");let b="initial",x=null;const w=X=>{if(b===X)return;if(!e$[b].includes(X))throw new Error(`Invalid connection state transition: ${b} → ${X}`);const z=b;b=X,X==="reconnecting"&&z!=="reconnecting"&&(x&&clearTimeout(x),x=setTimeout(()=>{b==="reconnecting"&&w("degraded")},Jz)),z==="reconnecting"&&X!=="reconnecting"&&x&&(clearTimeout(x),x=null),O.next(X)};let k=!1;const T=new Set;let j=null,E=null;const Q=p.pipe(Yz()),A=()=>{for(const X of T)try{X.abort()}catch{}T.clear(),j&&(clearTimeout(j),j=null)},M=async()=>{w("connecting");for(const Y of T)try{Y.abort()}catch{}T.clear();const X=new URLSearchParams;for(const Y of d)X.append("channel",Y);if(m&&f.size>0){X.append("scope",m);for(const Y of f)X.append("scoped",Y)}const V=`${t}/bus/subscribe?${X.toString()}`,z=new AbortController;T.add(z);try{const Y={Authorization:`Bearer ${s()}`};E&&(Y["Last-Event-ID"]=E);const $=await fetch(V,{headers:Y,signal:z.signal});if(!$.ok||!$.body)throw new Error(`SSE connect failed: ${$.status}`);w("open");const q=$.body.getReader(),ee=new TextDecoder;let le="",I="",G="",re;for(;k&&T.has(z);){const{done:R,value:ge}=await q.read();if(R)break;le+=ee.decode(ge,{stream:!0});const _e=le.split(`
37
+ `);le=_e.pop()??"";for(const ve of _e)if(ve.startsWith("event: "))I=ve.slice(7);else if(ve.startsWith("data: "))G=ve.slice(6);else if(ve.startsWith("id: "))re=ve.slice(4);else if(ve===""){if(I==="bus-event"&&G){re!==void 0&&(E=re);const Xe=JSON.parse(G);ek("RECV",Xe.channel,Xe.payload,Xe.scope),p.next(Xe)}I="",G="",re=void 0}}}catch(Y){if(Y.name==="AbortError")return}finally{T.delete(z)}k&&(w("reconnecting"),j=setTimeout(()=>{k&&M()},a))},L=()=>{k&&((b==="open"||b==="connecting"||b==="degraded")&&w("reconnecting"),A(),M())};let D=null;const P=100,B=()=>{D&&clearTimeout(D),D=setTimeout(()=>{D=null,L()},P)};return{on$(X){return Q.pipe(fr(V=>V.channel===X),nn(V=>V.payload))},emit:async(X,V,z)=>{ek("EMIT",X,V,z);const Y={channel:X,payload:V};z&&(Y.scope=z),await fetch(`${t}/bus/emit`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s()}`},body:JSON.stringify(Y)})},state$:O.asObservable(),addChannels:(X,V)=>{let z=!1;if(V!==void 0){for(const Y of X)f.has(Y)||(f.add(Y),z=!0);V!==m&&(m=V,z=!0)}else for(const Y of X)d.has(Y)||(d.add(Y),z=!0);z&&B()},removeChannels:X=>{let V=!1;for(const z of X)f.delete(z)&&(V=!0),d.delete(z)&&(V=!0);f.size===0&&(m=void 0),V&&B()},start:()=>{k||(k=!0,M())},stop:()=>{k=!1,b!=="closed"&&w("closed"),D&&(clearTimeout(D),D=null),x&&(clearTimeout(x),x=null),A()},dispose:()=>{k=!1,b!=="closed"&&w("closed"),D&&(clearTimeout(D),D=null),x&&(clearTimeout(x),x=null),A(),p.complete(),O.complete()}}}var n$=class extends Error{constructor(e){super(e),this.name="BusRequestError"}};async function He(e,t,n,r,i,a=3e4){const s=crypto.randomUUID(),l={...n,correlationId:s},c=Bu(e.on$(r).pipe(fr(m=>m.correlationId===s),nn(m=>({ok:!0,response:m.response}))),e.on$(i).pipe(fr(m=>m.correlationId===s),nn(m=>({ok:!1,error:new n$(m.message)})))).pipe(Vz(1),pd(a)),d=zz(c);await e.emit(t,l);const f=await d;if(!f.ok)throw f.error;return f.response}function so(e){const t=new Re(new Map),n=new Set,r=new Map,i=async a=>{if(!n.has(a)){n.add(a);try{const s=await e(a),l=new Map(t.value);l.set(a,s),t.next(l)}catch{}finally{n.delete(a)}}};return{observe(a){!t.value.has(a)&&!n.has(a)&&i(a);let s=r.get(a);return s||(s=t.pipe(nn(l=>l.get(a)),ZE()),r.set(a,s)),s},get(a){return t.value.get(a)},keys(){return[...t.value.keys()]},invalidate(a){n.delete(a),i(a)},remove(a){const s=new Map(t.value);s.delete(a),t.next(s),n.delete(a)},set(a,s){const l=new Map(t.value);l.set(a,s),t.next(l)},invalidateAll(){for(const a of t.value.keys())n.delete(a),i(a)},dispose(){t.complete(),r.clear(),n.clear()}}}var tk="_",r$=class{constructor(e,t,n,r){pe(this,"resourceCache");pe(this,"resourceListCache");pe(this,"annotationListCache");pe(this,"annotationDetailCache");pe(this,"annotationResources",new Map);pe(this,"entityTypesCache");pe(this,"referencedByCache");pe(this,"resourceEventsCache");pe(this,"resourceListFilters",new Map);pe(this,"annotationListObs",new Map);pe(this,"getToken");pe(this,"actor");pe(this,"onEntityTagChanged",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceDetail(e.resourceId),this.invalidateResourceEvents(e.resourceId))});pe(this,"onArchiveToggled",e=>{e.resourceId&&(this.invalidateResourceDetail(e.resourceId),this.invalidateResourceLists())});pe(this,"onYieldResourceMutated",e=>{const t=Hi(e.resourceId);this.invalidateResourceDetail(t),this.invalidateResourceLists()});this.http=e,this.eventBus=t,this.getToken=n,this.actor=r;const i=globalThis;i.__SEMIONT_BROWSE_INSTANCES__=(i.__SEMIONT_BROWSE_INSTANCES__??0)+1;const a=i.__SEMIONT_BROWSE_INSTANCES__;this.__serial__=a,console.debug(`[diag] BrowseNamespace #${a} constructed`),this.resourceCache=so(async s=>(await He(this.actor,"browse:resource-requested",{resourceId:s},"browse:resource-result","browse:resource-failed")).resource),this.resourceListCache=so(async s=>{const l=this.resourceListFilters.get(s)??{},c=l.search?l.search:void 0;return(await He(this.actor,"browse:resources-requested",{search:c,archived:l.archived,limit:l.limit??100,offset:0},"browse:resources-result","browse:resources-failed")).resources}),this.annotationListCache=so(async s=>He(this.actor,"browse:annotations-requested",{resourceId:s},"browse:annotations-result","browse:annotations-failed")),this.annotationDetailCache=so(async s=>{const l=this.annotationResources.get(s);if(!l)throw new Error(`Cannot fetch annotation ${s}: no resourceId known`);return(await He(this.actor,"browse:annotation-requested",{resourceId:l,annotationId:s},"browse:annotation-result","browse:annotation-failed")).annotation}),this.entityTypesCache=so(async()=>{const s=this.__serial__;console.debug(`[diag] BrowseNamespace#${s} entityTypes fetchFn START`);const l=await He(this.actor,"browse:entity-types-requested",{},"browse:entity-types-result","browse:entity-types-failed");return console.debug(`[diag] BrowseNamespace#${s} entityTypes fetchFn RESOLVE`,JSON.stringify(l.entityTypes).slice(0,200)),l.entityTypes}),this.referencedByCache=so(async s=>(await He(this.actor,"browse:referenced-by-requested",{resourceId:s},"browse:referenced-by-result","browse:referenced-by-failed")).referencedBy),this.resourceEventsCache=so(async s=>(await He(this.actor,"browse:events-requested",{resourceId:s},"browse:events-result","browse:events-failed")).events),this.subscribeToEvents()}resource(e){return this.resourceCache.observe(e)}resources(e){const t=JSON.stringify(e??{});return this.resourceListFilters.set(t,e??{}),this.resourceListCache.observe(t)}annotations(e){let t=this.annotationListObs.get(e);return t||(t=this.annotationListCache.observe(e).pipe(nn(n=>n==null?void 0:n.annotations)),this.annotationListObs.set(e,t)),t}annotation(e,t){return this.annotationResources.set(t,e),this.annotationDetailCache.observe(t)}entityTypes(){const e=this.__serial__;console.debug(`[diag] BrowseNamespace#${e} entityTypes() called`);const t=this;return t.__entityTypesDiag__||(t.__entityTypesDiag__=this.entityTypesCache.observe(tk).pipe(nn(n=>(console.debug(`[diag] BrowseNamespace#${e} entityTypes$ EMIT`,n===void 0?"undefined":JSON.stringify(n).slice(0,200)),n)))),t.__entityTypesDiag__}referencedBy(e){return this.referencedByCache.observe(e)}events(e){return this.resourceEventsCache.observe(e)}async resourceContent(e){const t=await this.http.getResourceRepresentation(e,{accept:"text/plain",auth:this.getToken()});return new TextDecoder().decode(t.data)}async resourceRepresentation(e,t){return this.http.getResourceRepresentation(e,{accept:t==null?void 0:t.accept,auth:this.getToken()})}async resourceRepresentationStream(e,t){return this.http.getResourceRepresentationStream(e,{accept:t==null?void 0:t.accept,auth:this.getToken()})}async resourceEvents(e){return(await He(this.actor,"browse:events-requested",{resourceId:e},"browse:events-result","browse:events-failed")).events}async annotationHistory(e,t){return He(this.actor,"browse:annotation-history-requested",{resourceId:e,annotationId:t},"browse:annotation-history-result","browse:annotation-history-failed")}async connections(e){throw new Error("Not implemented: connections endpoint does not exist yet")}async backlinks(e){throw new Error("Not implemented: backlinks endpoint does not exist yet")}async resourcesByName(e,t){throw new Error("Not implemented: resourcesByName endpoint does not exist yet")}async files(e,t){return He(this.actor,"browse:directory-requested",{path:e??".",sort:t??"name"},"browse:directory-result","browse:directory-failed")}invalidateAnnotationList(e){this.annotationListCache.invalidate(e)}removeAnnotationDetail(e){this.annotationDetailCache.remove(e),this.annotationResources.delete(e)}invalidateResourceDetail(e){this.resourceCache.invalidate(e)}invalidateResourceLists(){this.resourceListCache.invalidateAll()}invalidateEntityTypes(){this.entityTypesCache.invalidate(tk)}invalidateReferencedBy(e){this.referencedByCache.invalidate(e)}invalidateResourceEvents(e){this.resourceEventsCache.invalidate(e)}updateAnnotationInPlace(e,t){const n=this.annotationListCache.get(e);if(n){const i=n.annotations.findIndex(s=>s.id===t.id),a=i>=0?n.annotations.map((s,l)=>l===i?t:s):[...n.annotations,t];this.annotationListCache.set(e,{...n,annotations:a})}const r=ri(t.id);this.annotationResources.set(r,e),this.annotationDetailCache.set(r,t)}on(e,t){this.eventBus.get(e).subscribe(t)}subscribeToEvents(){this.on("bus:resume-gap",e=>{const t=e.scope;if(t){const n=t;this.invalidateAnnotationList(n),this.invalidateResourceDetail(n),this.invalidateResourceEvents(n),this.invalidateReferencedBy(n)}else{this.invalidateResourceLists();for(const n of this.annotationListCache.keys())this.invalidateAnnotationList(n);for(const n of this.resourceCache.keys())this.invalidateResourceDetail(n);for(const n of this.resourceEventsCache.keys())this.invalidateResourceEvents(n);for(const n of this.referencedByCache.keys())this.invalidateReferencedBy(n)}this.invalidateEntityTypes()}),this.on("mark:delete-ok",e=>{this.removeAnnotationDetail(ri(e.annotationId))}),this.on("mark:added",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId))}),this.on("mark:removed",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId)),this.removeAnnotationDetail(ri(e.payload.annotationId))}),this.on("mark:body-updated",e=>{const t=e;!t.resourceId||!t.annotation||(this.updateAnnotationInPlace(t.resourceId,t.annotation),this.invalidateResourceEvents(t.resourceId))}),this.on("mark:entity-tag-added",this.onEntityTagChanged),this.on("mark:entity-tag-removed",this.onEntityTagChanged),this.on("replay-window-exceeded",e=>{e.resourceId&&this.invalidateAnnotationList(e.resourceId)}),this.on("yield:create-ok",this.onYieldResourceMutated),this.on("yield:update-ok",this.onYieldResourceMutated),this.on("mark:archived",this.onArchiveToggled),this.on("mark:unarchived",this.onArchiveToggled),this.on("mark:entity-type-added",()=>this.invalidateEntityTypes())}},i$=class{constructor(e,t,n,r){this.http=e,this.eventBus=t,this.getToken=n,this.actor=r}async annotation(e,t){return He(this.actor,"mark:create-request",{resourceId:e,request:t},"mark:create-ok","mark:create-failed")}async delete(e,t){await this.actor.emit("mark:delete",{annotationId:t,resourceId:e})}async entityType(e){await this.actor.emit("mark:add-entity-type",{tag:e})}async entityTypes(e){for(const t of e)await this.actor.emit("mark:add-entity-type",{tag:t})}async updateResource(e,t){return this.http.updateResource(e,t,{auth:this.getToken()})}async archive(e){await this.actor.emit("mark:archive",{resourceId:e})}async unarchive(e){await this.actor.emit("mark:unarchive",{resourceId:e})}assist(e,t,n){return new Bn(r=>{let i=!1,a=null,s=null;const l=()=>{i=!0,a&&(clearTimeout(a),a=null),s&&(clearInterval(s),s=null)},c=k=>{a&&clearTimeout(a),s&&(clearInterval(s),s=null),a=setTimeout(()=>{i||(s=setInterval(()=>{i||He(this.actor,"job:status-requested",{jobId:k},"job:status-result","job:status-failed").then(T=>{i||(T.status==="complete"?(l(),r.next({motivation:t,resourceId:e,progress:T.result}),r.complete()):T.status==="failed"&&(l(),r.error(new Error(T.error??"Job failed"))))}).catch(()=>{})},5e3))},1e4)};let d=null;const f=this.eventBus.get("job:report-progress").pipe(fr(k=>k.jobId===d)),m=this.eventBus.get("job:complete").pipe(fr(k=>k.jobId===d)),p=this.eventBus.get("job:fail").pipe(fr(k=>k.jobId===d)),O=f.pipe(r0(Bu(m,p))).subscribe(k=>{r.next(k.progress),d&&c(d)}),b=m.subscribe(()=>{l(),r.complete()}),x=p.subscribe(k=>{l(),r.error(new Error(k.error))}),w=this.getToken();return this.dispatchAssist(e,t,n,w).then(({jobId:k})=>{k&&!i&&(d=k,c(k))}).catch(k=>{l(),r.error(k)}),()=>{l(),O.unsubscribe(),b.unsubscribe(),x.unsubscribe()}})}async dispatchAssist(e,t,n,r){var l,c;const a={tagging:"tag-annotation",linking:"reference-annotation",highlighting:"highlight-annotation",assessing:"assessment-annotation",commenting:"comment-annotation"}[t];if(!a)throw new Error(`Unsupported motivation: ${t}`);if(t==="tagging"){if(!n.schemaId||!((l=n.categories)!=null&&l.length))throw new Error("Tag assist requires schemaId and categories")}else if(t==="linking"&&!((c=n.entityTypes)!=null&&c.length))throw new Error("Reference assist requires entityTypes");const s={};return n.entityTypes&&(s.entityTypes=n.entityTypes),n.includeDescriptiveReferences!==void 0&&(s.includeDescriptiveReferences=n.includeDescriptiveReferences),n.instructions!==void 0&&(s.instructions=n.instructions),n.density!==void 0&&(s.density=n.density),n.tone!==void 0&&(s.tone=n.tone),n.language!==void 0&&(s.language=n.language),n.schemaId!==void 0&&(s.schemaId=n.schemaId),n.categories!==void 0&&(s.categories=n.categories),He(this.actor,"job:create",{jobType:a,resourceId:e,params:s},"job:created","job:create-failed")}},a$=class{constructor(e){this.actor=e}async body(e,t,n){await this.actor.emit("bind:update-body",{correlationId:crypto.randomUUID(),annotationId:t,resourceId:e,operations:n})}},s$=class{constructor(e,t){this.eventBus=e,this.actor=t}annotation(e,t,n){return new Bn(r=>{const i=crypto.randomUUID(),a=this.eventBus.get("gather:complete").pipe(fr(f=>f.correlationId===i)),s=this.eventBus.get("gather:failed").pipe(fr(f=>f.correlationId===i)),l=Bu(this.eventBus.get("gather:annotation-progress").pipe(fr(f=>f.annotationId===e),nn(f=>f)),a.pipe(nn(f=>f))).pipe(r0(Bu(a,s))).subscribe({next:f=>r.next(f),error:f=>r.error(f)}),c=a.subscribe(f=>{r.next(f),r.complete()}),d=s.subscribe(f=>{r.error(new Error(f.message))});return this.actor.emit("gather:requested",{correlationId:i,annotationId:e,resourceId:t,contextWindow:(n==null?void 0:n.contextWindow)??2e3}).catch(f=>{r.error(f)}),()=>{l.unsubscribe(),c.unsubscribe(),d.unsubscribe()}})}resource(e,t){throw new Error("Not implemented: gather.resource() — no backend route yet")}},o$=class{constructor(e,t){this.eventBus=e,this.actor=t}search(e,t,n,r){return new Bn(i=>{const a=crypto.randomUUID(),s=this.eventBus.get("match:search-results").pipe(fr(f=>f.correlationId===a)),l=this.eventBus.get("match:search-failed").pipe(fr(f=>f.correlationId===a)),c=s.subscribe(f=>{i.next(f),i.complete()}),d=l.subscribe(f=>{i.error(new Error(f.error))});return this.actor.emit("match:search-requested",{correlationId:a,resourceId:e,referenceId:t,context:n,limit:(r==null?void 0:r.limit)??10,useSemanticScoring:(r==null?void 0:r.useSemanticScoring)??!0}).catch(f=>{i.error(f)}),()=>{c.unsubscribe(),d.unsubscribe()}})}},l$=class{constructor(e,t,n,r){this.http=e,this.eventBus=t,this.getToken=n,this.actor=r}async resource(e){return this.http.yieldResource(e,{auth:this.getToken()})}fromAnnotation(e,t,n){return new Bn(r=>{let i=!1,a=null,s=null;const l=()=>{i=!0,a&&(clearTimeout(a),a=null),s&&(clearInterval(s),s=null)},c=w=>{a&&clearTimeout(a),s&&(clearInterval(s),s=null),a=setTimeout(()=>{i||(s=setInterval(()=>{i||He(this.actor,"job:status-requested",{jobId:w},"job:status-result","job:status-failed").then(k=>{i||(k.status==="complete"?(l(),r.next({stage:"complete",percentage:100,message:"Generation complete"}),r.complete()):k.status==="failed"&&(l(),r.error(new Error(k.error??"Generation failed"))))}).catch(()=>{})},5e3))},1e4)};let d=null;const f=this.eventBus.get("job:report-progress").pipe(fr(w=>w.jobId===d)),m=this.eventBus.get("job:complete").pipe(fr(w=>w.jobId===d)),p=this.eventBus.get("job:fail").pipe(fr(w=>w.jobId===d)),O=f.pipe(r0(Bu(m,p))).subscribe(w=>{r.next(w.progress),d&&c(d)}),b=m.subscribe(()=>{l(),r.complete()}),x=p.subscribe(w=>{l(),r.error(new Error(w.error))});return He(this.actor,"job:create",{jobType:"generation",resourceId:e,params:{referenceId:t,title:n.title,prompt:n.prompt,language:n.language,temperature:n.temperature,maxTokens:n.maxTokens,storageUri:n.storageUri,context:n.context}},"job:created","job:create-failed").then(({jobId:w})=>{w&&!i&&(d=w,c(w))}).catch(w=>{l(),r.error(w)}),()=>{l(),O.unsubscribe(),b.unsubscribe(),x.unsubscribe()}})}async cloneToken(e){return He(this.actor,"yield:clone-token-requested",{resourceId:e},"yield:clone-token-generated","yield:clone-token-failed")}async fromToken(e){return(await He(this.actor,"yield:clone-resource-requested",{token:e},"yield:clone-resource-result","yield:clone-resource-failed")).sourceResource}async createFromToken(e){return He(this.actor,"yield:clone-create",e,"yield:clone-created","yield:clone-create-failed")}},c$=class{constructor(e){this.actor=e}attention(e,t){this.actor.emit("beckon:focus",{annotationId:e,resourceId:t}).catch(()=>{})}},u$=class{constructor(e){this.actor=e}async status(e){return He(this.actor,"job:status-requested",{jobId:e},"job:status-result","job:status-failed")}async pollUntilComplete(e,t){const n=(t==null?void 0:t.interval)??1e3,r=(t==null?void 0:t.timeout)??6e4,i=Date.now();for(;;){const a=await this.status(e);if(t!=null&&t.onProgress&&t.onProgress(a),a.status==="complete"||a.status==="failed"||a.status==="cancelled")return a;if(Date.now()-i>r)throw new Error(`Job polling timeout after ${r}ms`);await new Promise(s=>setTimeout(s,n))}}async cancel(e,t){await this.actor.emit("job:cancel-requested",{jobId:e,type:t})}},d$=class{constructor(e,t){this.http=e,this.getToken=t}async password(e,t){return this.http.authenticatePassword(e,t)}async google(e){return this.http.authenticateGoogle(e)}async refresh(e){return this.http.refreshToken(e)}async logout(){await this.http.logout({auth:this.getToken()})}async me(){return this.http.getMe({auth:this.getToken()})}async acceptTerms(){await this.http.acceptTerms({auth:this.getToken()})}async mcpToken(){return this.http.generateMCPToken({auth:this.getToken()})}async mediaToken(e){return this.http.getMediaToken(e,{auth:this.getToken()})}},f$=class{constructor(e,t){this.http=e,this.getToken=t}async users(){return(await this.http.listUsers({auth:this.getToken()})).users}async userStats(){return this.http.getUserStats({auth:this.getToken()})}async updateUser(e,t){return(await this.http.updateUser(e,t,{auth:this.getToken()})).user}async oauthConfig(){return this.http.getOAuthConfig({auth:this.getToken()})}async healthCheck(){return this.http.healthCheck({auth:this.getToken()})}async status(){return this.http.getStatus({auth:this.getToken()})}async backup(){return this.http.backupKnowledgeBase({auth:this.getToken()})}async restore(e,t){return this.http.restoreKnowledgeBase(e,{auth:this.getToken(),onProgress:t})}async exportKnowledgeBase(e){return this.http.exportKnowledgeBase(e,{auth:this.getToken()})}async importKnowledgeBase(e,t){return this.http.importKnowledgeBase(e,{auth:this.getToken(),onProgress:t})}},zv=[...Fz.filter(e=>e!=="mark:entity-type-added"),...Hz],WE=["browse:resources-result","browse:resources-failed","browse:resource-result","browse:resource-failed","browse:annotations-result","browse:annotations-failed","browse:annotation-result","browse:annotation-failed","browse:annotation-history-result","browse:annotation-history-failed","browse:events-result","browse:events-failed","browse:referenced-by-result","browse:referenced-by-failed","browse:entity-types-result","browse:entity-types-failed","browse:directory-result","browse:directory-failed","browse:annotation-context-result","browse:annotation-context-failed","mark:delete-ok","mark:delete-failed","mark:create-ok","mark:create-failed","match:search-results","match:search-failed","gather:complete","gather:failed","gather:annotation-progress","gather:annotation-finished","gather:summary-result","gather:summary-failed","bind:body-updated","bind:body-update-failed","job:report-progress","job:complete","job:fail","job:status-result","job:status-failed","job:created","job:create-failed","job:claimed","job:claim-failed","yield:clone-token-generated","yield:clone-token-failed","yield:clone-resource-result","yield:clone-resource-failed","yield:clone-created","yield:clone-create-failed","mark:entity-type-added","beckon:focus","beckon:sparkle","bus:resume-gap"],h$=WE,FE=class extends Error{constructor(e,t,n,r){super(e),this.status=t,this.statusText=n,this.details=r,this.name="APIError"}},ob=class{constructor(e){pe(this,"http");pe(this,"baseUrl");pe(this,"eventBus");pe(this,"logger");pe(this,"token$");pe(this,"_actor",null);pe(this,"browse");pe(this,"mark");pe(this,"bind");pe(this,"gather");pe(this,"match");pe(this,"yield");pe(this,"beckon");pe(this,"job");pe(this,"auth");pe(this,"admin");pe(this,"_actorStarted",!1);pe(this,"activeResource",null);const{baseUrl:t,timeout:n=3e4,retry:r=2,logger:i,tokenRefresher:a}=e;this.eventBus=new VE,this.logger=i,this.baseUrl=t.endsWith("/")?t.slice(0,-1):t;const s=a?{limit:1,methods:["get","post","put","patch","delete","head","options"],statusCodes:[401,408,413,429,500,502,503,504]}:r;this.http=Rv.create({timeout:n,retry:s,credentials:"include",hooks:{beforeRequest:[c=>{this.logger&&this.logger.debug("HTTP Request",{type:"http_request",url:c.url,method:c.method,timestamp:Date.now(),hasAuth:c.headers.has("Authorization")})}],beforeRetry:a?[async({request:c,error:d})=>{if(!(!(d instanceof em)||d.response.status!==401))try{const f=await a();if(!f)return Rv.stop;c.headers.set("Authorization",`Bearer ${f}`);return}catch{return Rv.stop}}]:[],afterResponse:[(c,d,f)=>(this.logger&&this.logger.debug("HTTP Response",{type:"http_response",url:c.url,method:c.method,status:f.status,statusText:f.statusText}),f)],beforeError:[async c=>{const{response:d,request:f}=c;if(d){const m=await d.json().catch(()=>({}));throw this.logger&&this.logger.error("HTTP Request Failed",{type:"http_error",url:f.url,method:f.method,status:d.status,statusText:d.statusText,error:m.message||`HTTP ${d.status}: ${d.statusText}`}),new FE(m.message||`HTTP ${d.status}: ${d.statusText}`,d.status,d.statusText,m)}return c}]}}),this.token$=e.token$??new Re(null);const l=()=>this.token$.getValue()??void 0;this.browse=new r$(this,this.eventBus,l,this.actor),this.mark=new i$(this,this.eventBus,l,this.actor),this.bind=new a$(this.actor),this.gather=new s$(this.eventBus,this.actor),this.match=new o$(this.eventBus,this.actor),this.yield=new l$(this,this.eventBus,l,this.actor),this.beckon=new c$(this.actor),this.job=new u$(this.actor),this.auth=new d$(this,l),this.admin=new f$(this,l),this.token$.subscribe(c=>{c&&!this._actorStarted&&(this._actorStarted=!0,this.actor.start())})}get actor(){if(!this._actor){this._actor=t$({baseUrl:this.baseUrl,token:()=>this.token$.getValue()??"",channels:[...WE]});for(const e of h$)this._actor.on$(e).subscribe(t=>{this.eventBus.get(e).next(t)})}return this._actor}subscribeToResource(e){if(this.activeResource){if(this.activeResource.resourceId!==e)throw new Error(`SemiontApiClient already subscribed to resource ${this.activeResource.resourceId}; call the unsubscribe returned from the previous subscribeToResource before subscribing to ${e}.`);return this.activeResource.refCount++,this.makeUnsubscriber()}this.actor.addChannels([...zv],e);const t=[];for(const n of zv)t.push(this.actor.on$(n).subscribe(r=>{this.eventBus.get(n).next(r)}));return this.activeResource={resourceId:e,refCount:1,bridgeSubs:t},this.makeUnsubscriber()}makeUnsubscriber(){let e=!1;return()=>{if(!e&&(e=!0,!!this.activeResource&&(this.activeResource.refCount--,!(this.activeResource.refCount>0)))){for(const t of this.activeResource.bridgeSubs)t.unsubscribe();this.actor.removeChannels([...zv]),this.activeResource=null}}}dispose(){if(this.activeResource){for(const e of this.activeResource.bridgeSubs)e.unsubscribe();this.activeResource=null}this._actor&&(this._actor.dispose(),this._actor=null)}emit(e,t){this.eventBus.get(e).next(t)}on(e,t){const n=this.eventBus.get(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.eventBus.get(e).asObservable()}authHeaders(e){const t=(e==null?void 0:e.auth)??this.token$.getValue()??void 0;return t?{Authorization:`Bearer ${t}`}:{}}async authenticatePassword(e,t,n){return this.http.post(`${this.baseUrl}/api/tokens/password`,{json:{email:e,password:t},headers:this.authHeaders(n)}).json()}async refreshToken(e,t){return this.http.post(`${this.baseUrl}/api/tokens/refresh`,{json:{refreshToken:e},headers:this.authHeaders(t)}).json()}async authenticateGoogle(e,t){return this.http.post(`${this.baseUrl}/api/tokens/google`,{json:{credential:e},headers:this.authHeaders(t)}).json()}async generateMCPToken(e){return this.http.post(`${this.baseUrl}/api/tokens/mcp-generate`,{headers:this.authHeaders(e)}).json()}async getMediaToken(e,t){return this.http.post(`${this.baseUrl}/api/tokens/media`,{json:{resourceId:e},headers:this.authHeaders(t)}).json()}async getMe(e){return this.http.get(`${this.baseUrl}/api/users/me`,{headers:this.authHeaders(e)}).json()}async acceptTerms(e){return this.http.post(`${this.baseUrl}/api/users/accept-terms`,{headers:this.authHeaders(e)}).json()}async logout(e){return this.http.post(`${this.baseUrl}/api/users/logout`,{headers:this.authHeaders(e)}).json()}async yieldResource(e,t){const n=new FormData;if(n.append("name",e.name),n.append("format",e.format),n.append("storageUri",e.storageUri),e.file instanceof File)n.append("file",e.file);else if(Buffer.isBuffer(e.file)){const r=new Blob([new Uint8Array(e.file)],{type:e.format});n.append("file",r,e.name)}else throw new Error("file must be a File or Buffer");return e.entityTypes&&e.entityTypes.length>0&&n.append("entityTypes",JSON.stringify(e.entityTypes)),e.language&&n.append("language",e.language),e.creationMethod&&n.append("creationMethod",e.creationMethod),e.sourceAnnotationId&&n.append("sourceAnnotationId",e.sourceAnnotationId),e.sourceResourceId&&n.append("sourceResourceId",e.sourceResourceId),e.generationPrompt&&n.append("generationPrompt",e.generationPrompt),e.generator&&n.append("generator",JSON.stringify(e.generator)),e.isDraft!==void 0&&n.append("isDraft",String(e.isDraft)),this.http.post(`${this.baseUrl}/resources`,{body:n,headers:this.authHeaders(t)}).json()}async browseResource(e,t){return He(this.actor,"browse:resource-requested",{resourceId:e},"browse:resource-result","browse:resource-failed")}async getResourceRepresentation(e,t){const n=await this.http.get(`${this.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)||"text/plain",...this.authHeaders(t)}}),r=n.headers.get("content-type")||"application/octet-stream";return{data:await n.arrayBuffer(),contentType:r}}async getResourceRepresentationStream(e,t){const n=await this.http.get(`${this.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)||"text/plain",...this.authHeaders(t)}}),r=n.headers.get("content-type")||"application/octet-stream";if(!n.body)throw new Error("Response body is null - cannot create stream");return{stream:n.body,contentType:r}}async browseResources(e,t,n,r){return He(this.actor,"browse:resources-requested",{search:n,archived:t,limit:e??100,offset:0},"browse:resources-result","browse:resources-failed")}async updateResource(e,t,n){await this.http.patch(`${this.baseUrl}/resources/${e}`,{json:t,headers:this.authHeaders(n)}).text()}async getResourceEvents(e,t){return He(this.actor,"browse:events-requested",{resourceId:e},"browse:events-result","browse:events-failed")}async browseReferences(e,t){return He(this.actor,"browse:referenced-by-requested",{resourceId:e},"browse:referenced-by-result","browse:referenced-by-failed")}async generateCloneToken(e,t){return He(this.actor,"yield:clone-token-requested",{resourceId:e},"yield:clone-token-generated","yield:clone-token-failed")}async getResourceByToken(e,t){return He(this.actor,"yield:clone-resource-requested",{token:e},"yield:clone-resource-result","yield:clone-resource-failed")}async createResourceFromToken(e,t){return He(this.actor,"yield:clone-create",e,"yield:clone-created","yield:clone-create-failed")}async markAnnotation(e,t,n){return He(this.actor,"mark:create-request",{resourceId:e,request:t},"mark:create-ok","mark:create-failed")}async getAnnotation(e,t){return He(this.actor,"browse:annotation-requested",{annotationId:e},"browse:annotation-result","browse:annotation-failed")}async browseAnnotation(e,t,n){return He(this.actor,"browse:annotation-requested",{resourceId:e,annotationId:t},"browse:annotation-result","browse:annotation-failed")}async browseAnnotations(e,t,n){return He(this.actor,"browse:annotations-requested",{resourceId:e},"browse:annotations-result","browse:annotations-failed")}async deleteAnnotation(e,t,n){await this.actor.emit("mark:delete",{annotationId:t,resourceId:e})}async bindAnnotation(e,t,n,r){const i=crypto.randomUUID();return await this.actor.emit("bind:update-body",{correlationId:i,annotationId:t,resourceId:e,operations:n.operations}),{correlationId:i}}async getAnnotationHistory(e,t,n){return He(this.actor,"browse:annotation-history-requested",{resourceId:e,annotationId:t},"browse:annotation-history-result","browse:annotation-history-failed")}async annotateReferences(e,t,n){const{jobId:r}=await He(this.actor,"job:create",{jobType:"reference-annotation",resourceId:e,params:t},"job:created","job:create-failed");return{correlationId:crypto.randomUUID(),jobId:r}}async annotateHighlights(e,t,n){const{jobId:r}=await He(this.actor,"job:create",{jobType:"highlight-annotation",resourceId:e,params:t},"job:created","job:create-failed");return{correlationId:crypto.randomUUID(),jobId:r}}async annotateAssessments(e,t,n){const{jobId:r}=await He(this.actor,"job:create",{jobType:"assessment-annotation",resourceId:e,params:t},"job:created","job:create-failed");return{correlationId:crypto.randomUUID(),jobId:r}}async annotateComments(e,t,n){const{jobId:r}=await He(this.actor,"job:create",{jobType:"comment-annotation",resourceId:e,params:t},"job:created","job:create-failed");return{correlationId:crypto.randomUUID(),jobId:r}}async annotateTags(e,t,n){const{jobId:r}=await He(this.actor,"job:create",{jobType:"tag-annotation",resourceId:e,params:t},"job:created","job:create-failed");return{correlationId:crypto.randomUUID(),jobId:r}}async yieldResourceFromAnnotation(e,t,n,r){const{jobId:i}=await He(this.actor,"job:create",{jobType:"generation",resourceId:e,params:{referenceId:t,...n}},"job:created","job:create-failed");return{correlationId:crypto.randomUUID(),jobId:i}}async gatherAnnotationContext(e,t,n,r){return await this.actor.emit("gather:requested",{correlationId:n.correlationId,annotationId:t,resourceId:e,contextWindow:n.contextWindow??2e3}),{correlationId:n.correlationId}}async matchSearch(e,t,n){return await this.actor.emit("match:search-requested",{correlationId:t.correlationId,resourceId:e,referenceId:t.referenceId,context:t.context,limit:t.limit??10,useSemanticScoring:t.useSemanticScoring??!0}),{correlationId:t.correlationId}}async addEntityType(e,t){await this.actor.emit("mark:add-entity-type",{tag:e})}async addEntityTypesBulk(e,t){for(const n of e)await this.actor.emit("mark:add-entity-type",{tag:n})}async listEntityTypes(e){return He(this.actor,"browse:entity-types-requested",{},"browse:entity-types-result","browse:entity-types-failed")}async beckonAttention(e,t,n){return await this.actor.emit("beckon:focus",t),{}}async listUsers(e){return this.http.get(`${this.baseUrl}/api/admin/users`,{headers:this.authHeaders(e)}).json()}async getUserStats(e){return this.http.get(`${this.baseUrl}/api/admin/users/stats`,{headers:this.authHeaders(e)}).json()}async updateUser(e,t,n){return this.http.patch(`${this.baseUrl}/api/admin/users/${e}`,{json:t,headers:this.authHeaders(n)}).json()}async getOAuthConfig(e){return this.http.get(`${this.baseUrl}/api/admin/oauth/config`,{headers:this.authHeaders(e)}).json()}async backupKnowledgeBase(e){return this.http.post(`${this.baseUrl}/api/admin/exchange/backup`,{headers:this.authHeaders(e)})}async restoreKnowledgeBase(e,t){const n=new FormData;n.append("file",e);const r=await this.http.post(`${this.baseUrl}/api/admin/exchange/restore`,{body:n,headers:this.authHeaders(t)});return this.parseSSEStream(r,t==null?void 0:t.onProgress)}async exportKnowledgeBase(e,t){const n=e!=null&&e.includeArchived?new URLSearchParams({includeArchived:"true"}):void 0;return this.http.post(`${this.baseUrl}/api/moderate/exchange/export`,{headers:this.authHeaders(t),...n?{searchParams:n}:{}})}async importKnowledgeBase(e,t){const n=new FormData;n.append("file",e);const r=await this.http.post(`${this.baseUrl}/api/moderate/exchange/import`,{body:n,headers:this.authHeaders(t)});return this.parseSSEStream(r,t==null?void 0:t.onProgress)}async parseSSEStream(e,t){const n=e.body.getReader(),r=new TextDecoder;let i="",a={phase:"unknown"};for(;;){const{done:s,value:l}=await n.read();if(s)break;i+=r.decode(l,{stream:!0});const c=i.split(`
38
+ `);i=c.pop();for(const d of c)if(d.startsWith("data: ")){const f=JSON.parse(d.slice(6));t==null||t(f),a=f}}return a}async getJobStatus(e,t){return He(this.actor,"job:status-requested",{jobId:e},"job:status-result","job:status-failed")}async pollJobUntilComplete(e,t){const n=(t==null?void 0:t.interval)??1e3,r=(t==null?void 0:t.timeout)??6e4,i=Date.now();for(;;){const a=await this.getJobStatus(e,{auth:t==null?void 0:t.auth});if(t!=null&&t.onProgress&&t.onProgress(a),a.status==="complete"||a.status==="failed"||a.status==="cancelled")return a;if(Date.now()-i>r)throw new Error(`Job polling timeout after ${r}ms`);await new Promise(s=>setTimeout(s,n))}}async healthCheck(e){return this.http.get(`${this.baseUrl}/api/health`,{headers:this.authHeaders(e)}).json()}async getStatus(e){return this.http.get(`${this.baseUrl}/api/status`,{headers:this.authHeaders(e)}).json()}async browseFiles(e,t,n){return He(this.actor,"browse:directory-requested",{path:e??".",sort:t??"name"},"browse:directory-result","browse:directory-failed")}},m$="semiont.session.",HE="semiont.knowledgeBases",$v="semiont.activeKnowledgeBaseId",p$=300*1e3;function Dm(e){return`${m$}${e}`}function lb(e,t){const n=e.get(Dm(t));if(!n)return null;try{const r=JSON.parse(n);if(r&&typeof r.access=="string"&&typeof r.refresh=="string")return{access:r.access,refresh:r.refresh}}catch{}return null}function qv(e,t,n){e.set(Dm(t),JSON.stringify(n))}function xu(e,t){e.delete(Dm(t))}function cb(e){try{const t=e.split(".");if(t.length!==3||!t[1])return null;const n=JSON.parse(atob(t[1]));return n.exp?new Date(n.exp*1e3):null}catch{return null}}function Mh(e){const t=cb(e);return t?t.getTime()<Date.now():!0}function g$(e){if(e.host!==void 0)return e;try{const t=new URL(e.backendUrl);return{id:e.id,label:e.label,host:t.hostname,port:parseInt(t.port,10)||(t.protocol==="https:"?443:80),protocol:t.protocol==="https:"?"https":"http",email:""}}catch{return{id:e.id,label:e.label||"Unknown",host:"localhost",port:4e3,protocol:"http",email:""}}}function v$(e){try{const t=e.get(HE);return t?JSON.parse(t).map(g$):[]}catch{return[]}}function O$(e,t){e.set(HE,JSON.stringify(t))}function tre(e){return e==="localhost"||e==="127.0.0.1"?"http":"https"}var b$=/^(([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])?|localhost|\d{1,3}(\.\d{1,3}){3})$/;function y$(e){return b$.test(e)}function ub(e){if(!y$(e.host))throw new Error(`Invalid KB hostname: "${e.host}"`);const t=new URL("http://x");return t.protocol=e.protocol+":",t.hostname=e.host,t.port=String(e.port),`${e.protocol}://${t.hostname}:${e.port}`}function x$(){return crypto.randomUUID()}var db=class extends Error{constructor(t,n,r=null){super(n);pe(this,"code");pe(this,"kbId");this.name="SemiontError",this.code=t,this.kbId=r}},S$=class{constructor(e){pe(this,"kb");pe(this,"client");pe(this,"token$");pe(this,"user$");pe(this,"streamState$");pe(this,"ready");pe(this,"storage");pe(this,"doRefresh");pe(this,"doValidate");pe(this,"onAuthFailed");pe(this,"onError");pe(this,"refreshTimer",null);pe(this,"unsubscribeStorage",null);pe(this,"disposed",!1);var r,i;this.kb=e.kb,this.storage=e.storage,this.doRefresh=e.refresh,this.doValidate=e.validate,this.onAuthFailed=e.onAuthFailed??(()=>{}),this.onError=e.onError??(()=>{});const t=lb(this.storage,this.kb.id),n=t&&!Mh(t.access)?t.access:null;this.token$=new Re(n),this.user$=new Re(null),this.client=new ob({baseUrl:ub(this.kb),token$:this.token$,tokenRefresher:()=>this.refresh().then(a=>a??null)}),this.streamState$=this.client.actor.state$,n&&this.scheduleProactiveRefresh(n),this.unsubscribeStorage=((i=(r=this.storage).subscribe)==null?void 0:i.call(r,(a,s)=>{this.handleStorageChange(a,s)}))??null,this.ready=this.validate(t)}async validate(e){if(!e)return;const t=Mh(e.access)?await this.doRefresh():e.access;if(!t){Mh(e.access)&&xu(this.storage,this.kb.id);return}if(t!==e.access&&(this.token$.next(t),this.scheduleProactiveRefresh(t)),!this.doValidate)return;const n=async r=>{if(!this.disposed)try{const i=await this.doValidate(r);if(this.disposed)return;this.user$.next(i)}catch(i){if(this.disposed)return;if(i instanceof FE&&i.status===401){const a=await this.doRefresh();if(this.disposed)return;if(a){this.token$.next(a),this.scheduleProactiveRefresh(a),await n(a);return}xu(this.storage,this.kb.id),this.token$.next(null),this.onAuthFailed("Your session has expired. Please sign in again.")}else this.onError(new db("session.auth-failed",i instanceof Error?i.message:String(i),this.kb.id))}};await n(t)}async refresh(){if(this.disposed)return null;const e=await this.doRefresh();if(this.disposed)return null;if(e){const t=e;return this.token$.next(t),this.scheduleProactiveRefresh(e),t}return this.token$.next(null),xu(this.storage,this.kb.id),this.onAuthFailed("Your session has expired. Please sign in again."),this.onError(new db("session.refresh-exhausted","Token refresh failed",this.kb.id)),null}scheduleProactiveRefresh(e){this.clearRefreshTimer();const t=cb(e);if(!t)return;const n=t.getTime()-p$,r=Math.max(0,n-Date.now());this.refreshTimer=setTimeout(()=>{this.refreshTimer=null,this.disposed||this.refresh()},r)}clearRefreshTimer(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null)}handleStorageChange(e,t){if(!this.disposed&&e===Dm(this.kb.id)){if(!t){this.token$.next(null),this.user$.next(null),this.clearRefreshTimer();return}try{const n=JSON.parse(t);typeof n.access=="string"&&(this.token$.next(n.access),this.scheduleProactiveRefresh(n.access))}catch{}}}get expiresAt(){const e=this.token$.getValue();return e?cb(e):null}async dispose(){this.disposed||(this.disposed=!0,this.clearRefreshTimer(),this.unsubscribeStorage&&(this.unsubscribeStorage(),this.unsubscribeStorage=null),this.client.dispose(),this.token$.complete(),this.user$.complete())}};function w$(e){return()=>{}}var _$=class{constructor(){pe(this,"sessionExpiredAt$");pe(this,"sessionExpiredMessage$");pe(this,"permissionDeniedAt$");pe(this,"permissionDeniedMessage$");this.sessionExpiredAt$=new Re(null),this.sessionExpiredMessage$=new Re(null),this.permissionDeniedAt$=new Re(null),this.permissionDeniedMessage$=new Re(null)}notifySessionExpired(e){this.sessionExpiredMessage$.next(e??"Your session has expired. Please sign in again."),this.sessionExpiredAt$.next(Date.now())}notifyPermissionDenied(e){this.permissionDeniedMessage$.next(e??"You do not have permission to perform this action."),this.permissionDeniedAt$.next(Date.now())}acknowledgeSessionExpired(){this.sessionExpiredAt$.next(null),this.sessionExpiredMessage$.next(null)}acknowledgePermissionDenied(){this.permissionDeniedAt$.next(null),this.permissionDeniedMessage$.next(null)}dispose(){this.sessionExpiredAt$.complete(),this.sessionExpiredMessage$.complete(),this.permissionDeniedAt$.complete(),this.permissionDeniedMessage$.complete()}},fb="openDocuments";function GE(e){return[...e].sort((t,n)=>t.order!==void 0&&n.order!==void 0?t.order-n.order:t.openedAt-n.openedAt)}function k$(e){try{const t=e.get(fb);if(t)return GE(JSON.parse(t))}catch{}return[]}var j$=class{constructor(e){pe(this,"kbs$");pe(this,"activeKbId$");pe(this,"activeSession$");pe(this,"activeSignals$");pe(this,"sessionActivating$");pe(this,"openResources$");pe(this,"error$");pe(this,"identityToken$");pe(this,"storage");pe(this,"eventBus",new VE);pe(this,"unregisterNotify",null);pe(this,"unsubscribeStorage",null);pe(this,"disposed",!1);pe(this,"activating",null);pe(this,"inFlightRefreshes",new Map);var i,a,s;this.storage=e.storage;const t=v$(this.storage),n=this.storage.get($v),r=n&&t.some(l=>l.id===n)?n:((i=t[0])==null?void 0:i.id)??null;this.kbs$=new Re(t),this.activeKbId$=new Re(r),this.activeSession$=new Re(null),this.activeSignals$=new Re(null),this.sessionActivating$=new Re(!1),this.openResources$=new Re(k$(this.storage)),this.error$=new Rs,this.identityToken$=new Re(null),this.kbs$.subscribe(l=>O$(this.storage,l)),this.activeKbId$.subscribe(l=>{l?this.storage.set($v,l):this.storage.delete($v)}),this.openResources$.subscribe(l=>{this.storage.set(fb,JSON.stringify(l))}),this.unsubscribeStorage=((s=(a=this.storage).subscribe)==null?void 0:s.call(a,(l,c)=>{if(!(l!==fb||!c))try{this.openResources$.next(GE(JSON.parse(c)))}catch{}}))??null,this.unregisterNotify=w$(),r&&this.setActiveKb(r)}emit(e,t){this.disposed||this.eventBus.get(e).next(t)}on(e,t){const n=this.eventBus.get(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.eventBus.get(e).asObservable()}setIdentityToken(e){this.disposed||this.identityToken$.next(e)}addKb(e,t,n){const r={id:x$(),...e};return qv(this.storage,r.id,{access:t,refresh:n}),this.kbs$.next([...this.kbs$.getValue(),r]),this.setActiveKb(r.id),r}removeKb(e){var n;xu(this.storage,e);const t=this.kbs$.getValue().filter(r=>r.id!==e);this.kbs$.next(t),this.activeKbId$.getValue()===e&&this.setActiveKb(((n=t[0])==null?void 0:n.id)??null)}updateKb(e,t){this.kbs$.next(this.kbs$.getValue().map(n=>n.id===e?{...n,...t}:n))}getKbSessionStatus(e){const t=lb(this.storage,e);return t?Mh(t.access)?"expired":"authenticated":"signed-out"}async setActiveKb(e){if(this.disposed)return;const t=this.activeKbId$.getValue(),n=this.activeSession$.getValue();if(e===t&&n)return;for(t!==e&&this.activeKbId$.next(e),n&&(this.activeSession$.next(null),this.activeSignals$.next(null));this.activating;)if(await this.activating,this.disposed||this.activeKbId$.getValue()!==e)return;const r=(async()=>{const i=this.activeSession$.getValue(),a=this.activeSignals$.getValue();if(i&&(this.activeSession$.next(null),this.activeSignals$.next(null),await i.dispose(),a==null||a.dispose()),!e)return;const s=this.kbs$.getValue().find(d=>d.id===e);if(!s)return;const l=new _$,c=new S$({kb:s,storage:this.storage,refresh:()=>this.performRefresh(s),validate:d=>this.performValidate(s,d),onAuthFailed:d=>l.notifySessionExpired(d),onError:d=>this.error$.next(d)});try{await c.ready}catch(d){this.error$.next(new db("session.construct-failed",d instanceof Error?d.message:String(d),e)),await c.dispose(),l.dispose();return}if(this.disposed||this.activeKbId$.getValue()!==e){await c.dispose(),l.dispose();return}this.activeSession$.next(c),this.activeSignals$.next(l)})();this.activating=r,this.sessionActivating$.next(!0);try{await r}finally{this.activating===r&&(this.activating=null,this.sessionActivating$.next(!1))}}async signIn(e,t,n){if(!this.disposed){if(qv(this.storage,e,{access:t,refresh:n}),this.activeKbId$.getValue()===e){const r=this.activeSession$.getValue(),i=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),r&&await r.dispose(),i==null||i.dispose(),await this.setActiveKb(e);return}await this.setActiveKb(e)}}async signOut(e){if(!this.disposed&&(xu(this.storage,e),this.kbs$.next([...this.kbs$.getValue()]),this.activeKbId$.getValue()===e)){const t=this.activeSession$.getValue(),n=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),t&&await t.dispose(),n==null||n.dispose()}}addOpenResource(e,t,n,r){const i=this.openResources$.getValue(),a=i.findIndex(l=>l.id===e);if(a>=0){const c={...i[a],name:t,...n!==void 0?{mediaType:n}:{},...r!==void 0?{storageUri:r}:{}},d=[...i];d[a]=c,this.openResources$.next(d);return}const s={id:e,name:t,openedAt:Date.now(),order:i.length,...n!==void 0?{mediaType:n}:{},...r!==void 0?{storageUri:r}:{}};this.openResources$.next([...i,s])}removeOpenResource(e){this.openResources$.next(this.openResources$.getValue().filter(t=>t.id!==e))}updateOpenResourceName(e,t){this.openResources$.next(this.openResources$.getValue().map(n=>n.id===e?{...n,name:t}:n))}reorderOpenResources(e,t){const n=[...this.openResources$.getValue()];if(e<0||e>=n.length||t<0||t>=n.length)return;const[r]=n.splice(e,1);r&&n.splice(t,0,r),this.openResources$.next(n)}async performRefresh(e){const t=this.inFlightRefreshes.get(e.id);if(t)return t;const n=(async()=>{const r=lb(this.storage,e.id);if(!r)return null;const i=new ob({baseUrl:ub(e)});try{const s=(await i.refreshToken(r.refresh)).access_token;return s?(qv(this.storage,e.id,{access:s,refresh:r.refresh}),s):null}catch{return null}finally{i.dispose()}})();this.inFlightRefreshes.set(e.id,n);try{return await n}finally{this.inFlightRefreshes.delete(e.id)}}async performValidate(e,t){const n=new ob({baseUrl:ub(e)});try{return await n.getMe({auth:t})}finally{n.dispose()}}async dispose(){var n;if(this.disposed)return;this.disposed=!0,(n=this.unregisterNotify)==null||n.call(this),this.unregisterNotify=null,this.unsubscribeStorage&&(this.unsubscribeStorage(),this.unsubscribeStorage=null);const e=this.activeSession$.getValue(),t=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),e&&await e.dispose(),t==null||t.dispose(),this.kbs$.complete(),this.activeKbId$.complete(),this.activeSession$.complete(),this.activeSignals$.complete(),this.openResources$.complete(),this.error$.complete(),this.identityToken$.complete(),this.eventBus.destroy()}},Iv=null;function T$(e){return Iv||(Iv=new j$({storage:e.storage})),Iv}function Ms(){const e=new Hl;return{add:t=>e.add(typeof t=="function"?t:()=>t.dispose()),dispose:()=>e.unsubscribe()}}function KE(e,t={}){const n=t.debounceMs??250,r=t.initialQuery??"",i=new Rs,a=i.pipe(Dv(r)),s=i.pipe(Dv(r),Bz(n),ZE(),Wz(l=>{const c=l.trim();return c?e(c).pipe(nn(d=>({results:d??[],isSearching:d===void 0})),Dv({results:[],isSearching:!0})):Lz({results:[],isSearching:!1})}));return{query$:a,state$:s,setQuery:l=>i.next(l),dispose:()=>i.complete()}}function C$(e){const t=[],n=new Re(null);return t.push(e.stream("beckon:hover").subscribe(({annotationId:r})=>{n.next(r),r&&e.emit("beckon:sparkle",{annotationId:r})})),t.push(e.stream("browse:click").subscribe(({annotationId:r})=>{e.emit("beckon:focus",{annotationId:r})})),{hoveredAnnotationId$:n.asObservable(),hover:r=>e.emit("beckon:hover",{annotationId:r}),focus:r=>e.emit("beckon:focus",{annotationId:r}),sparkle:r=>e.emit("beckon:sparkle",{annotationId:r}),dispose(){t.forEach(r=>r.unsubscribe()),n.complete()}}}var hb=150;function i0(e,t){let n=null,r=null;const i=()=>{r!==null&&(clearTimeout(r),r=null)};return{handleMouseEnter:l=>{n!==l&&(i(),r=setTimeout(()=>{r=null,n=l,e(l)},t))},handleMouseLeave:()=>{i(),n!==null&&(n=null,e(null))},cleanup:i}}var Ji=["knowledge-base","user","settings"],E$={linking:"reference",commenting:"comment",tagging:"tag",highlighting:"highlight",assessing:"assessment"},Q$=0;function A$(e,t){const n=[],r=new Re((t==null?void 0:t.initialPanel)??null),i=new Re(null),a=new Re(null);if(t!=null&&t.onPanelChange){const s=t.onPanelChange;n.push(r.subscribe(s))}return n.push(e.stream("panel:toggle").subscribe(({panel:s})=>{const l=r.getValue();r.next(l===s?null:s)})),n.push(e.stream("panel:open").subscribe(({panel:s,scrollToAnnotationId:l,motivation:c})=>{if(l&&i.next(l),c){const d=E$[c]||"highlight";a.next({tab:d,generation:++Q$})}r.next(s)})),n.push(e.stream("panel:close").subscribe(()=>{r.next(null)})),{activePanel$:r.asObservable(),scrollToAnnotationId$:i.asObservable(),panelInitialTab$:a.asObservable(),openPanel:s=>e.emit("panel:open",{panel:s}),closePanel:()=>e.emit("panel:close",void 0),togglePanel:s=>e.emit("panel:toggle",{panel:s}),onScrollCompleted:()=>i.next(null),dispose(){n.forEach(s=>s.unsubscribe()),r.complete(),i.complete(),a.complete()}}}function P$(e,t){const n=[],r=new Re(null),i=new Re(!1),a=new Re(null),s=new Re(null);return n.push(e.stream("gather:requested").subscribe(l=>{var d;i.next(!0),a.next(null),r.next(null),s.next(ri(l.annotationId));const c=e.gather.annotation(ri(l.annotationId),t,{contextWindow:((d=l.options)==null?void 0:d.contextWindow)??2e3}).pipe(pd(6e4)).subscribe({next:f=>{"response"in f&&f.response&&(r.next(f.response.context??null),i.next(!1))},error:f=>{a.next(f instanceof Error?f:new Error(String(f))),i.next(!1)},complete:()=>{i.next(!1)}});n.push(c)})),{context$:r.asObservable(),loading$:i.asObservable(),error$:a.asObservable(),annotationId$:s.asObservable(),dispose(){n.forEach(l=>l.unsubscribe()),r.complete(),i.complete(),a.complete(),s.complete()}}}function N$(e,t){const n=[];return n.push(e.stream("match:search-requested").subscribe(r=>{const i=e.match.search(Hi(r.resourceId),r.referenceId,r.context,{limit:r.limit,useSemanticScoring:r.useSemanticScoring}).pipe(pd(6e4)).subscribe({next:a=>e.emit("match:search-results",a),error:a=>e.emit("match:search-failed",{correlationId:r.correlationId,referenceId:r.referenceId,error:a instanceof Error?a.message:String(a)})});n.push(i)})),{dispose(){n.forEach(r=>r.unsubscribe())}}}function R$(e,t,n){const r=[],i=new Re(!1),a=new Re(null);let s=null;const l=(c,d)=>{const f=e.yield.fromAnnotation(Hi(t),ri(c),{...d,language:d.language||n}).pipe(pd({each:3e5})).subscribe({next:m=>{a.next(m),i.next(!0)},complete:()=>{i.next(!1),s&&clearTimeout(s),s=setTimeout(()=>{a.next(null),s=null},2e3)},error:()=>{a.next(null),i.next(!1)}});r.push(f)};return{isGenerating$:i.asObservable(),progress$:a.asObservable(),generate:l,dispose(){r.forEach(c=>c.unsubscribe()),s&&clearTimeout(s),i.complete(),a.complete()}}}function eh(e){if(e.svgSelector)return{type:"SvgSelector",value:e.svgSelector};if(e.fragmentSelector){const t=[{type:"FragmentSelector",value:e.fragmentSelector,...e.conformsTo&&{conformsTo:e.conformsTo}}];return e.exact&&t.push({type:"TextQuoteSelector",exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}),t}return{type:"TextQuoteSelector",exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}}function M$(e,t){const n=[],r=new Re(null),i=new Re(null),a=new Re(null);let s=null;const l=()=>{s&&(clearTimeout(s),s=null)},c=d=>{r.next(d)};return n.push(e.stream("mark:requested").subscribe(c)),n.push(e.stream("mark:select-comment").subscribe(d=>c({selector:eh(d),motivation:"commenting"}))),n.push(e.stream("mark:select-tag").subscribe(d=>c({selector:eh(d),motivation:"tagging"}))),n.push(e.stream("mark:select-assessment").subscribe(d=>c({selector:eh(d),motivation:"assessing"}))),n.push(e.stream("mark:select-reference").subscribe(d=>c({selector:eh(d),motivation:"linking"}))),n.push(e.stream("mark:cancel-pending").subscribe(()=>r.next(null))),n.push(e.stream("mark:create-ok").subscribe(()=>r.next(null))),n.push(e.stream("mark:submit").subscribe(async d=>{try{const f=await e.mark.annotation(t,{motivation:d.motivation,target:{source:t,selector:d.selector},body:d.body});e.emit("mark:create-ok",{annotationId:f.annotationId})}catch(f){e.emit("mark:create-failed",{message:f instanceof Error?f.message:String(f)})}})),n.push(e.stream("mark:delete").subscribe(async d=>{try{await e.mark.delete(t,d.annotationId),e.emit("mark:delete-ok",{annotationId:d.annotationId})}catch(f){e.emit("mark:delete-failed",{message:f instanceof Error?f.message:String(f)})}})),n.push(e.stream("mark:assist-request").subscribe(d=>{l(),i.next(d.motivation),a.next(null);const f=e.mark.assist(t,d.motivation,d.options).pipe(pd({each:18e4})).subscribe({next:m=>a.next(m),complete:()=>{i.next(null),l(),s=setTimeout(()=>{a.next(null),s=null},5e3)},error:()=>{l(),i.next(null),a.next(null)}});n.push(f)})),n.push(e.stream("mark:progress-dismiss").subscribe(()=>{l(),a.next(null)})),{pendingAnnotation$:r.asObservable(),assistingMotivation$:i.asObservable(),progress$:a.asObservable(),dispose(){n.forEach(d=>d.unsubscribe()),l(),r.complete(),i.complete(),a.complete()}}}var L$=10,D$=20;function nre(e,t){const n=Ms(),r=KE(c=>e.browse.resources({search:c,limit:D$}));n.add(r),n.add(t);const i=e.browse.resources({limit:L$,archived:!1}),a=i.pipe(nn(c=>c??[])),s=i.pipe(nn(c=>c===void 0)),l=e.browse.entityTypes().pipe(nn(c=>c??[]));return{browse:t,search:r,recentResources$:a,entityTypes$:l,isLoadingRecent$:s,dispose:()=>n.dispose()}}function rre(e,t){const n=Ms();n.add(t);const r=new Re(""),i=new Re(""),a=new Re(!1),s=e.browse.entityTypes(),l=s.pipe(nn(f=>f??[])),c=s.pipe(nn(f=>f===void 0)),d=async()=>{const f=r.getValue().trim();if(f){i.next(""),a.next(!0);try{await e.mark.entityType(f),r.next("")}catch(m){i.next(m instanceof Error?m.message:"Failed to add entity type")}finally{a.next(!1)}}};return{browse:t,entityTypes$:l,isLoading$:c,newTag$:r.asObservable(),error$:i.asObservable(),isAdding$:a.asObservable(),setNewTag:f=>r.next(f),addTag:d,dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}function ire(e,t,n){const r=Ms();r.add(e);const i=new Re(null),a=new Re(null),s=new Re(null),l=new Re(void 0),c=new Re(void 0),d=new Re(!1),f=new Re(!1),m=x=>{i.next(x),s.next(null),l.next(void 0),c.next(void 0),a.next({format:x.name.endsWith(".tar.gz")||x.name.endsWith(".gz")?"semiont-linked-data":"unknown",version:1,sourceUrl:"",stats:{}})},p=()=>{i.next(null),a.next(null),s.next(null),l.next(void 0),c.next(void 0)},O=async()=>{var x;d.next(!0);try{const w=await t();if(!w.ok)throw new Error(`Export failed: ${w.status} ${w.statusText}`);const k=await w.blob(),T=w.headers.get("Content-Disposition"),j=((x=T==null?void 0:T.match(/filename="(.+?)"/))==null?void 0:x[1])??`semiont-export-${Date.now()}.tar.gz`;return{blob:k,filename:j}}finally{d.next(!1)}},b=async()=>{const x=i.getValue();if(x){f.next(!0),s.next("started"),l.next(void 0),c.next(void 0);try{await n(x,{onProgress:w=>{s.next(w.phase),l.next(w.message),w.result&&c.next(w.result)}})}finally{f.next(!1)}}};return{browse:e,selectedFile$:i.asObservable(),preview$:a.asObservable(),importPhase$:s.asObservable(),importMessage$:l.asObservable(),importResult$:c.asObservable(),isExporting$:d.asObservable(),isImporting$:f.asObservable(),selectFile:m,cancelImport:p,doExport:O,doImport:b,dispose:()=>{i.complete(),a.complete(),s.complete(),l.complete(),c.complete(),d.complete(),f.complete(),r.dispose()}}}function are(e,t){const n=Ms();n.add(t);const r=new Re([]),i=new Re(null),a=new Re(!0),s=new Re(!0),l=()=>{a.next(!0),e.listUsers().then(f=>{r.next(f.users??[]),a.next(!1)}).catch(()=>a.next(!1))},c=()=>{s.next(!0),e.getUserStats().then(f=>{i.next(f.stats??null),s.next(!1)}).catch(()=>s.next(!1))};l(),c();const d=async(f,m)=>{await e.updateUser(f,m),l(),c()};return{browse:t,users$:r.asObservable(),stats$:i.asObservable(),usersLoading$:a.asObservable(),statsLoading$:s.asObservable(),updateUser:d,dispose:()=>{r.complete(),i.complete(),a.complete(),s.complete(),n.dispose()}}}function sre(e,t){const n=Ms();n.add(t);const r=new Re([]),i=new Re([]),a=new Re(!0);return e.getOAuthConfig().then(s=>{const l=s;r.next(l.providers??[]),i.next(l.allowedDomains??[]),a.next(!1)}).catch(()=>a.next(!1)),{browse:t,providers$:r.asObservable(),allowedDomains$:i.asObservable(),isLoading$:a.asObservable(),dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}function ore(e){const t=Ms(),n=new Re(null),r=new Re(!1);e.getMe().then(a=>n.next(a)).catch(()=>{});const i=async()=>{r.next(!0);try{await e.acceptTerms(),n.next({...n.getValue(),termsAcceptedAt:new Date().toISOString()})}finally{r.next(!1)}};return{userData$:n.asObservable(),isProcessing$:r.asObservable(),acceptTerms:i,dispose:()=>{n.complete(),r.complete(),t.dispose()}}}function lre(e,t){const n=e.browse.resource(t),r=n,i=n.pipe(nn(a=>a===void 0));return{resource$:r,isLoading$:i,invalidate:()=>e.browse.invalidateResourceDetail(t),dispose:()=>{}}}function cre(e){const t=new Re(!1),n=async()=>{t.next(!0);try{await e.logout()}catch{}finally{t.next(!1)}};return{isLoggingOut$:t.asObservable(),logout:n,dispose:()=>{t.complete()}}}function z$(e){const t=e.match(/charset=([^\s;]+)/i);return((t==null?void 0:t[1])||"utf-8").toLowerCase()}function a0(e,t){const n=z$(t);return new TextDecoder(n).decode(e)}function Ea(e){if(Array.isArray(e)){for(const t of e)if(typeof t=="object"&&t!==null&&"type"in t&&"source"in t){const n=t.type,r=t.source;if(n==="SpecificResource"&&typeof r=="string")return r}return null}if(typeof e=="object"&&e!==null&&"type"in e&&"source"in e){const t=e.type,n=e.source;if(t==="SpecificResource"&&typeof n=="string")return n}return null}function Vu(e){return Ea(e)!==null}function An(e){if(typeof e!="string")return e.selector}function To(e){return e.motivation==="highlighting"}function oi(e){return e.motivation==="linking"}function Gl(e){return e.motivation==="assessing"}function Ls(e){return e.motivation==="commenting"}function Co(e){return e.motivation==="tagging"}function $$(e){if(!Ls(e))return;const t=Array.isArray(e.body)?e.body[0]:e.body;if(t&&"value"in t)return t.value}function s0(e){return oi(e)&&Vu(e.body)}function Ss(e){if(!e)return"";const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n?n.exact:""}function gd(e){const t=An(e.target);return Ss(t)}function q$(e){const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n&&n.type==="TextQuoteSelector"?n:null}var nk={open:!1,annotationId:null,resourceId:null,defaultTitle:"",entityTypes:[]};function I$(e,t,n,r,i){const a=Ms(),s=C$(e),l=M$(e,t),c=P$(e,t),d=N$(e),f=R$(e,t,n);a.add(s),a.add(r),a.add(l),a.add(c),a.add(d),a.add(f);const m=e.browse.annotations(t).pipe(nn(L=>L??[])),p=m.pipe(nn(L=>{const D={highlights:[],comments:[],assessments:[],references:[],tags:[]};for(const P of L)To(P)?D.highlights.push(P):Ls(P)?D.comments.push(P):Gl(P)?D.assessments.push(P):oi(P)?D.references.push(P):Co(P)&&D.tags.push(P);return D})),O=e.browse.entityTypes().pipe(nn(L=>L??[])),b=e.browse.events(t).pipe(nn(L=>L??[])),x=e.browse.referencedBy(t).pipe(nn(L=>L??[])),w=new Re(""),k=new Re(!1),T=new Re(null),j="text/plain",E=j.startsWith("image/")||j==="application/pdf";!E&&j&&(k.next(!0),e.browse.resourceRepresentation(t,{accept:j}).then(({data:L})=>{w.next(a0(L,j)),k.next(!1)}).catch(()=>{k.next(!1)})),E&&e.auth.mediaToken(t).then(({token:L})=>T.next(L)).catch(()=>{});const Q=new Re(nk),A=e.subscribeToResource(t);a.add(A);const M=e.stream("bind:initiate").subscribe(L=>{Q.next({open:!0,annotationId:L.annotationId,resourceId:L.resourceId,defaultTitle:L.defaultTitle,entityTypes:L.entityTypes}),e.emit("gather:requested",{correlationId:crypto.randomUUID(),annotationId:L.annotationId,resourceId:L.resourceId,options:{contextWindow:2e3}})});return a.add(()=>M.unsubscribe()),{beckon:s,browse:r,mark:l,gather:c,yield:f,annotations$:m,annotationGroups$:p,entityTypes$:O,events$:b,referencedBy$:x,content$:w.asObservable(),contentLoading$:k.asObservable(),mediaToken$:T.asObservable(),wizard$:Q.asObservable(),closeWizard:()=>Q.next(nk),dispose:()=>{Q.complete(),w.complete(),k.complete(),T.complete(),a.dispose()}}}function mb(e){return e.replace(/\s+/g," ").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/\u2014/g,"--").replace(/\u2013/g,"-").trim()}function X$(e,t){const n=e.length,r=t.length,i=[];for(let a=0;a<=n;a++)i[a]=[a];for(let a=0;a<=r;a++)i[0][a]=a;for(let a=1;a<=n;a++)for(let s=1;s<=r;s++){const l=e[a-1]===t[s-1]?0:1,c=i[a-1][s]+1,d=i[a][s-1]+1,f=i[a-1][s-1]+l;i[a][s]=Math.min(c,d,f)}return i[n][r]}function Z$(e){return{normalizedContent:mb(e),lowerContent:e.toLowerCase()}}function B$(e,t,n,r){const i=Math.max(5,Math.floor(t.length*.05)),a=e.indexOf(t);if(a!==-1)return{start:a,end:a+t.length,matchQuality:"exact"};const s=mb(t),l=r.normalizedContent.indexOf(s);if(l!==-1){let x=0,w=0;for(;w<l&&x<e.length;){const k=e[x],T=mb(k);T&&(w+=T.length),x++}return{start:x,end:x+t.length,matchQuality:"normalized"}}const c=t.toLowerCase(),d=r.lowerContent.indexOf(c);if(d!==-1)return{start:d,end:d+t.length,matchQuality:"case-insensitive"};const f=t.length,m=Math.min(500,e.length),p=n!==void 0?Math.max(0,n-m):0,O=n!==void 0?Math.min(e.length,n+m):e.length;let b=null;for(let x=p;x<=O-f;x++){const w=e.substring(x,x+f),k=X$(t,w);k<=i&&(!b||k<b.distance)&&(b={start:x,distance:k})}return b?{start:b.start,end:b.start+f,matchQuality:"fuzzy"}:null}function V$(e,t,n,r,i,a){if(!t)return null;if(i!==void 0&&i>=0&&i+t.length<=e.length&&e.substring(i,i+t.length)===t)return{start:i,end:i+t.length};const s=[];let l=e.indexOf(t);for(;l!==-1;)s.push(l),l=e.indexOf(t,l+1);if(s.length===0){const d=B$(e,t,i,a);return d?{start:d.start,end:d.end}:null}if(s.length===1){const d=s[0];return{start:d,end:d+t.length}}if(n||r){for(const d of s){const f=Math.max(0,d-((n==null?void 0:n.length)||0)),m=e.substring(f,d),p=Math.min(e.length,d+t.length+((r==null?void 0:r.length)||0)),O=e.substring(d+t.length,p),b=!n||m.endsWith(n),x=!r||O.startsWith(r);if(b&&x)return{start:d,end:d+t.length}}for(const d of s){const f=e.substring(Math.max(0,d-((n==null?void 0:n.length)||0)),d),m=e.substring(d+t.length,d+t.length+((r==null?void 0:r.length)||0)),p=!n||f.includes(n.trim()),O=!r||m.includes(r.trim());if(p&&O)return{start:d,end:d+t.length}}}const c=s[0];return{start:c,end:c+t.length}}var _l=[{code:"ar",nativeName:"العربية",englishName:"Arabic"},{code:"bn",nativeName:"বাংলা",englishName:"Bengali"},{code:"cs",nativeName:"Čeština",englishName:"Czech"},{code:"da",nativeName:"Dansk",englishName:"Danish"},{code:"de",nativeName:"Deutsch",englishName:"German"},{code:"el",nativeName:"Ελληνικά",englishName:"Greek"},{code:"en",nativeName:"English",englishName:"English"},{code:"es",nativeName:"Español",englishName:"Spanish"},{code:"fa",nativeName:"فارسی",englishName:"Persian"},{code:"fi",nativeName:"Suomi",englishName:"Finnish"},{code:"fr",nativeName:"Français",englishName:"French"},{code:"he",nativeName:"עברית",englishName:"Hebrew"},{code:"hi",nativeName:"हिन्दी",englishName:"Hindi"},{code:"id",nativeName:"Bahasa Indonesia",englishName:"Indonesian"},{code:"it",nativeName:"Italiano",englishName:"Italian"},{code:"ja",nativeName:"日本語",englishName:"Japanese"},{code:"ko",nativeName:"한국어",englishName:"Korean"},{code:"ms",nativeName:"Bahasa Melayu",englishName:"Malay"},{code:"nl",nativeName:"Nederlands",englishName:"Dutch"},{code:"no",nativeName:"Norsk",englishName:"Norwegian"},{code:"pl",nativeName:"Polski",englishName:"Polish"},{code:"pt",nativeName:"Português",englishName:"Portuguese"},{code:"ro",nativeName:"Română",englishName:"Romanian"},{code:"sv",nativeName:"Svenska",englishName:"Swedish"},{code:"th",nativeName:"ไทย",englishName:"Thai"},{code:"tr",nativeName:"Türkçe",englishName:"Turkish"},{code:"uk",nativeName:"Українська",englishName:"Ukrainian"},{code:"vi",nativeName:"Tiếng Việt",englishName:"Vietnamese"},{code:"zh",nativeName:"中文",englishName:"Chinese"}],U$=new Map(_l.map(e=>[e.code.toLowerCase(),e]));function Y$(e){if(e)return U$.get(e.toLowerCase())}function W$(e){if(!e)return;const t=Y$(e);return t?`${t.nativeName} (${e.toLowerCase()})`:e}function pb(e){if(e)return e["@id"]||void 0}function o0(e){return e!=null&&e.representations?(Array.isArray(e.representations)?e.representations:[e.representations])[0]:void 0}function rm(e){var t;return(t=o0(e))==null?void 0:t.mediaType}function rk(e){var t;return(t=o0(e))==null?void 0:t.language}function JE(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);return`<svg xmlns="http://www.w3.org/2000/svg"><rect x="${n}" y="${r}" width="${i}" height="${a}"/></svg>`}function eQ(e){if(e.length<3)throw new Error("Polygon requires at least 3 points");return`<svg xmlns="http://www.w3.org/2000/svg"><polygon points="${e.map(n=>`${n.x},${n.y}`).join(" ")}"/></svg>`}function tQ(e,t){if(t<=0)throw new Error("Circle radius must be positive");return`<svg xmlns="http://www.w3.org/2000/svg"><circle cx="${e.x}" cy="${e.y}" r="${t}"/></svg>`}function l0(e){var i,a,s,l,c,d,f;const t=e.match(/<rect\s+([^>]+)\/>/);if(t&&t[1]){const m=t[1],p=parseFloat(((i=m.match(/x="([^"]+)"/))==null?void 0:i[1])||"0"),O=parseFloat(((a=m.match(/y="([^"]+)"/))==null?void 0:a[1])||"0"),b=parseFloat(((s=m.match(/width="([^"]+)"/))==null?void 0:s[1])||"0"),x=parseFloat(((l=m.match(/height="([^"]+)"/))==null?void 0:l[1])||"0");return{type:"rect",data:{x:p,y:O,width:b,height:x}}}const n=e.match(/<polygon\s+points="([^"]+)"/);if(n&&n[1])return{type:"polygon",data:{points:n[1].split(/\s+/).map(O=>{const[b,x]=O.split(",").map(parseFloat);return{x:b,y:x}})}};const r=e.match(/<circle\s+([^>]+)\/>/);if(r&&r[1]){const m=r[1],p=parseFloat(((c=m.match(/cx="([^"]+)"/))==null?void 0:c[1])||"0"),O=parseFloat(((d=m.match(/cy="([^"]+)"/))==null?void 0:d[1])||"0"),b=parseFloat(((f=m.match(/r="([^"]+)"/))==null?void 0:f[1])||"0");return{type:"circle",data:{cx:p,cy:O,r:b}}}return null}function F$(e,t,n,r,i){const a=l0(e);if(!a)return e;const s=r/t,l=i/n;switch(a.type){case"rect":{const{x:c,y:d,width:f,height:m}=a.data;return JE({x:c*s,y:d*l},{x:(c+f)*s,y:(d+m)*l})}case"circle":{const{cx:c,cy:d,r:f}=a.data;return tQ({x:c*s,y:d*l},f*Math.min(s,l))}case"polygon":{const c=a.data.points.map(d=>({x:d.x*s,y:d.y*l}));return eQ(c)}}return e}function H$(e,t,n){let a;if(t>0){let l=Math.max(0,t-64),c=0;for(;l>0&&c<32;){const d=e[l-1];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;l--,c++}a=e.substring(l,t)}let s;if(n<e.length){let l=Math.min(e.length,n+64),c=0;for(;l<e.length&&c<32;){const d=e[l];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;l++,c++}s=e.substring(n,l)}return{prefix:a,suffix:s}}function ure(e,t,n,r){const i=Ms();i.add(t);const a=!!(n.annotationUri&&n.sourceDocumentId&&n.name),s=n.mode==="clone"&&!!n.token,l=s?"clone":a?"reference":"new",c=new Re(l),d=new Re(!0),f=new Re(null),m=new Re(null),p=new Re(null),O=e.browse.entityTypes().pipe(nn(x=>x??[]));if(a){const x=n.entityTypes?n.entityTypes.split(","):[];if(m.next({annotationUri:n.annotationUri,sourceDocumentId:n.sourceDocumentId,name:n.name,entityTypes:x}),n.storedContext)try{p.next(JSON.parse(n.storedContext))}catch{}d.next(!1)}else s?(async()=>{try{const x=await e.yield.fromToken(n.token);if(x&&r){const w=Hi(x["@id"]),k=rm(x)||"text/plain",{data:T}=await e.getResourceRepresentation(w,{accept:k,auth:r}),j=a0(T,k);f.next({sourceResource:x,sourceContent:j})}}catch{}d.next(!1)})():d.next(!1);const b=async x=>{if(x.mode==="clone")return(await e.yield.createFromToken({token:n.token,name:x.name,content:x.content,archiveOriginal:x.archiveOriginal??!0})).resourceId;let w,k;if(x.file)w=x.file,k=x.format??"application/octet-stream";else{const Q=new Blob([x.content||""],{type:x.format??"application/octet-stream"}),A=x.format==="text/plain"?".txt":x.format==="text/html"?".html":".md";w=new File([Q],x.name+A,{type:x.format??"application/octet-stream"}),k=x.format??"application/octet-stream"}const T=x.charset&&!x.file?`${k}; charset=${x.charset}`:k,E=(await e.yield.resource({name:x.name,file:w,format:T,entityTypes:x.entityTypes||[],language:x.language,creationMethod:"ui",storageUri:x.storageUri})).resourceId;return x.mode==="reference"&&x.annotationUri&&x.sourceDocumentId&&await e.bind.body(Hi(x.sourceDocumentId),ri(x.annotationUri),[{op:"add",item:{type:"SpecificResource",source:E,purpose:"linking"}}]),E};return{browse:t,mode$:c.asObservable(),loading$:d.asObservable(),cloneData$:f.asObservable(),referenceData$:m.asObservable(),gatheredContext$:p.asObservable(),entityTypes$:O,save:b,dispose:()=>{c.complete(),d.complete(),f.complete(),m.complete(),p.complete(),i.dispose()}}}function gb(e){return e==="image/png"||e==="image/jpeg"}function G$(e){return e==="text/plain"||e==="text/markdown"}function Kl(e){return e==="application/pdf"}function c0(e){return G$(e)?"text":gb(e)||Kl(e)?"image":"unsupported"}var Eo=F({"../../node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorClass=void 0;function t(n){var r=function(a){Error.call(a),a.stack=new Error().stack},i=n(r);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}e.createErrorClass=t}}),K$=F({"../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UnsubscriptionError=void 0;var t=Eo();e.UnsubscriptionError=t.createErrorClass(function(n){return function(i){n(this),this.message=i?i.length+` errors occurred during unsubscription:
39
+ `+i.map(function(a,s){return s+1+") "+a.toString()}).join(`
40
+ `):"",this.name="UnsubscriptionError",this.errors=i}})}}),Yt=F({"../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;function t(n){return typeof n=="function"}e.isFunction=t}}),Ds=F({"../../node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.arrRemove=void 0;function t(n,r){if(n){var i=n.indexOf(r);0<=i&&n.splice(i,1)}}e.arrRemove=t}}),Ra=F({"../../node_modules/rxjs/dist/cjs/internal/Subscription.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},n=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},r=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.isSubscription=e.EMPTY_SUBSCRIPTION=e.Subscription=void 0;var i=Yt(),a=K$(),s=Ds(),l=(function(){function f(m){this.initialTeardown=m,this.closed=!1,this._parentage=null,this._finalizers=null}return f.prototype.unsubscribe=function(){var m,p,O,b,x;if(!this.closed){this.closed=!0;var w=this._parentage;if(w)if(this._parentage=null,Array.isArray(w))try{for(var k=t(w),T=k.next();!T.done;T=k.next()){var j=T.value;j.remove(this)}}catch(D){m={error:D}}finally{try{T&&!T.done&&(p=k.return)&&p.call(k)}finally{if(m)throw m.error}}else w.remove(this);var E=this.initialTeardown;if(i.isFunction(E))try{E()}catch(D){x=D instanceof a.UnsubscriptionError?D.errors:[D]}var Q=this._finalizers;if(Q){this._finalizers=null;try{for(var A=t(Q),M=A.next();!M.done;M=A.next()){var L=M.value;try{d(L)}catch(D){x=x??[],D instanceof a.UnsubscriptionError?x=r(r([],n(x)),n(D.errors)):x.push(D)}}}catch(D){O={error:D}}finally{try{M&&!M.done&&(b=A.return)&&b.call(A)}finally{if(O)throw O.error}}}if(x)throw new a.UnsubscriptionError(x)}},f.prototype.add=function(m){var p;if(m&&m!==this)if(this.closed)d(m);else{if(m instanceof f){if(m.closed||m._hasParent(this))return;m._addParent(this)}(this._finalizers=(p=this._finalizers)!==null&&p!==void 0?p:[]).push(m)}},f.prototype._hasParent=function(m){var p=this._parentage;return p===m||Array.isArray(p)&&p.includes(m)},f.prototype._addParent=function(m){var p=this._parentage;this._parentage=Array.isArray(p)?(p.push(m),p):p?[p,m]:m},f.prototype._removeParent=function(m){var p=this._parentage;p===m?this._parentage=null:Array.isArray(p)&&s.arrRemove(p,m)},f.prototype.remove=function(m){var p=this._finalizers;p&&s.arrRemove(p,m),m instanceof f&&m._removeParent(this)},f.EMPTY=(function(){var m=new f;return m.closed=!0,m})(),f})();e.Subscription=l,e.EMPTY_SUBSCRIPTION=l.EMPTY;function c(f){return f instanceof l||f&&"closed"in f&&i.isFunction(f.remove)&&i.isFunction(f.add)&&i.isFunction(f.unsubscribe)}e.isSubscription=c;function d(f){i.isFunction(f)?f():f.unsubscribe()}}}),zm=F({"../../node_modules/rxjs/dist/cjs/internal/config.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.config=void 0,e.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}}}),gr=F({"../../node_modules/rxjs/dist/cjs/internal/util/noop.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noop=void 0;function t(){}e.noop=t}}),nQ=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),l,c=[],d;try{for(;(i===void 0||i-- >0)&&!(l=s.next()).done;)c.push(l.value)}catch(f){d={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,l=r.length;a<s;a++,l++)r[l]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var l=e.timeoutProvider.delegate;return l!=null&&l.setTimeout?l.setTimeout.apply(l,n([r,i],t(a))):setTimeout.apply(void 0,n([r,i],t(a)))},clearTimeout:function(r){var i=e.timeoutProvider.delegate;return((i==null?void 0:i.clearTimeout)||clearTimeout)(r)},delegate:void 0}}}),rQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportUnhandledError=void 0;var t=zm(),n=nQ();function r(i){n.timeoutProvider.setTimeout(function(){var a=t.config.onUnhandledError;if(a)a(i);else throw i})}e.reportUnhandledError=r}}),J$=F({"../../node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=e.nextNotification=e.errorNotification=e.COMPLETE_NOTIFICATION=void 0,e.COMPLETE_NOTIFICATION=(function(){return r("C",void 0,void 0)})();function t(i){return r("E",void 0,i)}e.errorNotification=t;function n(i){return r("N",i,void 0)}e.nextNotification=n;function r(i,a,s){return{kind:i,value:a,error:s}}e.createNotification=r}}),u0=F({"../../node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.captureError=e.errorContext=void 0;var t=zm(),n=null;function r(a){if(t.config.useDeprecatedSynchronousErrorHandling){var s=!n;if(s&&(n={errorThrown:!1,error:null}),a(),s){var l=n,c=l.errorThrown,d=l.error;if(n=null,c)throw d}}else a()}e.errorContext=r;function i(a){t.config.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=a)}e.captureError=i}}),d0=F({"../../node_modules/rxjs/dist/cjs/internal/Subscriber.js"(e){var t=e&&e.__extends||(function(){var T=function(j,E){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,A){Q.__proto__=A}||function(Q,A){for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(Q[M]=A[M])},T(j,E)};return function(j,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");T(j,E);function Q(){this.constructor=j}j.prototype=E===null?Object.create(E):(Q.prototype=E.prototype,new Q)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var n=Yt(),r=Ra(),i=zm(),a=rQ(),s=gr(),l=J$(),c=nQ(),d=u0(),f=(function(T){t(j,T);function j(E){var Q=T.call(this)||this;return Q.isStopped=!1,E?(Q.destination=E,r.isSubscription(E)&&E.add(Q)):Q.destination=e.EMPTY_OBSERVER,Q}return j.create=function(E,Q,A){return new b(E,Q,A)},j.prototype.next=function(E){this.isStopped?k(l.nextNotification(E),this):this._next(E)},j.prototype.error=function(E){this.isStopped?k(l.errorNotification(E),this):(this.isStopped=!0,this._error(E))},j.prototype.complete=function(){this.isStopped?k(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},j.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,T.prototype.unsubscribe.call(this),this.destination=null)},j.prototype._next=function(E){this.destination.next(E)},j.prototype._error=function(E){try{this.destination.error(E)}finally{this.unsubscribe()}},j.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},j})(r.Subscription);e.Subscriber=f;var m=Function.prototype.bind;function p(T,j){return m.call(T,j)}var O=(function(){function T(j){this.partialObserver=j}return T.prototype.next=function(j){var E=this.partialObserver;if(E.next)try{E.next(j)}catch(Q){x(Q)}},T.prototype.error=function(j){var E=this.partialObserver;if(E.error)try{E.error(j)}catch(Q){x(Q)}else x(j)},T.prototype.complete=function(){var j=this.partialObserver;if(j.complete)try{j.complete()}catch(E){x(E)}},T})(),b=(function(T){t(j,T);function j(E,Q,A){var M=T.call(this)||this,L;if(n.isFunction(E)||!E)L={next:E??void 0,error:Q??void 0,complete:A??void 0};else{var D;M&&i.config.useDeprecatedNextContext?(D=Object.create(E),D.unsubscribe=function(){return M.unsubscribe()},L={next:E.next&&p(E.next,D),error:E.error&&p(E.error,D),complete:E.complete&&p(E.complete,D)}):L=E}return M.destination=new O(L),M}return j})(f);e.SafeSubscriber=b;function x(T){i.config.useDeprecatedSynchronousErrorHandling?d.captureError(T):a.reportUnhandledError(T)}function w(T){throw T}function k(T,j){var E=i.config.onStoppedNotification;E&&c.timeoutProvider.setTimeout(function(){return E(T,j)})}e.EMPTY_OBSERVER={closed:!0,next:s.noop,error:w,complete:s.noop}}}),f0=F({"../../node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observable=void 0,e.observable=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})()}}),vr=F({"../../node_modules/rxjs/dist/cjs/internal/util/identity.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.identity=void 0;function t(n){return n}e.identity=t}}),h0=F({"../../node_modules/rxjs/dist/cjs/internal/util/pipe.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pipeFromArray=e.pipe=void 0;var t=vr();function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return r(i)}e.pipe=n;function r(i){return i.length===0?t.identity:i.length===1?i[0]:function(s){return i.reduce(function(l,c){return c(l)},s)}}e.pipeFromArray=r}}),tr=F({"../../node_modules/rxjs/dist/cjs/internal/Observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var t=d0(),n=Ra(),r=f0(),i=h0(),a=zm(),s=Yt(),l=u0(),c=(function(){function p(O){O&&(this._subscribe=O)}return p.prototype.lift=function(O){var b=new p;return b.source=this,b.operator=O,b},p.prototype.subscribe=function(O,b,x){var w=this,k=m(O)?O:new t.SafeSubscriber(O,b,x);return l.errorContext(function(){var T=w,j=T.operator,E=T.source;k.add(j?j.call(k,E):E?w._subscribe(k):w._trySubscribe(k))}),k},p.prototype._trySubscribe=function(O){try{return this._subscribe(O)}catch(b){O.error(b)}},p.prototype.forEach=function(O,b){var x=this;return b=d(b),new b(function(w,k){var T=new t.SafeSubscriber({next:function(j){try{O(j)}catch(E){k(E),T.unsubscribe()}},error:k,complete:w});x.subscribe(T)})},p.prototype._subscribe=function(O){var b;return(b=this.source)===null||b===void 0?void 0:b.subscribe(O)},p.prototype[r.observable]=function(){return this},p.prototype.pipe=function(){for(var O=[],b=0;b<arguments.length;b++)O[b]=arguments[b];return i.pipeFromArray(O)(this)},p.prototype.toPromise=function(O){var b=this;return O=d(O),new O(function(x,w){var k;b.subscribe(function(T){return k=T},function(T){return w(T)},function(){return x(k)})})},p.create=function(O){return new p(O)},p})();e.Observable=c;function d(p){var O;return(O=p??a.config.Promise)!==null&&O!==void 0?O:Promise}function f(p){return p&&s.isFunction(p.next)&&s.isFunction(p.error)&&s.isFunction(p.complete)}function m(p){return p&&p instanceof t.Subscriber||f(p)&&n.isSubscription(p)}}}),ye=F({"../../node_modules/rxjs/dist/cjs/internal/util/lift.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.operate=e.hasLift=void 0;var t=Yt();function n(i){return t.isFunction(i==null?void 0:i.lift)}e.hasLift=n;function r(i){return function(a){if(n(a))return a.lift(function(s){try{return i(s,this)}catch(l){this.error(l)}});throw new TypeError("Unable to lift unknown Observable type")}}e.operate=r}}),iQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=void 0,e.isArrayLike=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"})}}),aQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPromise=void 0;var t=Yt();function n(r){return t.isFunction(r==null?void 0:r.then)}e.isPromise=n}}),sQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isInteropObservable=void 0;var t=f0(),n=Yt();function r(i){return n.isFunction(i[t.observable])}e.isInteropObservable=r}}),oQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAsyncIterable=void 0;var t=Yt();function n(r){return Symbol.asyncIterator&&t.isFunction(r==null?void 0:r[Symbol.asyncIterator])}e.isAsyncIterable=n}}),lQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createInvalidObservableTypeError=void 0;function t(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}e.createInvalidObservableTypeError=t}}),cQ=F({"../../node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iterator=e.getSymbolIterator=void 0;function t(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}e.getSymbolIterator=t,e.iterator=t()}}),uQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIterable=void 0;var t=cQ(),n=Yt();function r(i){return n.isFunction(i==null?void 0:i[t.iterator])}e.isIterable=r}}),m0=F({"../../node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(e){var t=e&&e.__generator||function(l,c){var d={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,m,p,O;return O={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function b(w){return function(k){return x([w,k])}}function x(w){if(f)throw new TypeError("Generator is already executing.");for(;d;)try{if(f=1,m&&(p=w[0]&2?m.return:w[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,w[1])).done)return p;switch(m=0,p&&(w=[w[0]&2,p.value]),w[0]){case 0:case 1:p=w;break;case 4:return d.label++,{value:w[1],done:!1};case 5:d.label++,m=w[1],w=[0];continue;case 7:w=d.ops.pop(),d.trys.pop();continue;default:if(p=d.trys,!(p=p.length>0&&p[p.length-1])&&(w[0]===6||w[0]===2)){d=0;continue}if(w[0]===3&&(!p||w[1]>p[0]&&w[1]<p[3])){d.label=w[1];break}if(w[0]===6&&d.label<p[1]){d.label=p[1],p=w;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(w);break}p[2]&&d.ops.pop(),d.trys.pop();continue}w=c.call(l,d)}catch(k){w=[6,k],m=0}finally{f=p=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},n=e&&e.__await||function(l){return this instanceof n?(this.v=l,this):new n(l)},r=e&&e.__asyncGenerator||function(l,c,d){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f=d.apply(l,c||[]),m,p=[];return m={},O("next"),O("throw"),O("return"),m[Symbol.asyncIterator]=function(){return this},m;function O(j){f[j]&&(m[j]=function(E){return new Promise(function(Q,A){p.push([j,E,Q,A])>1||b(j,E)})})}function b(j,E){try{x(f[j](E))}catch(Q){T(p[0][3],Q)}}function x(j){j.value instanceof n?Promise.resolve(j.value.v).then(w,k):T(p[0][2],j)}function w(j){b("next",j)}function k(j){b("throw",j)}function T(j,E){j(E),p.shift(),p.length&&b(p[0][0],p[0][1])}};Object.defineProperty(e,"__esModule",{value:!0}),e.isReadableStreamLike=e.readableStreamLikeToAsyncGenerator=void 0;var i=Yt();function a(l){return r(this,arguments,function(){var d,f,m,p;return t(this,function(O){switch(O.label){case 0:d=l.getReader(),O.label=1;case 1:O.trys.push([1,,9,10]),O.label=2;case 2:return[4,n(d.read())];case 3:return f=O.sent(),m=f.value,p=f.done,p?[4,n(void 0)]:[3,5];case 4:return[2,O.sent()];case 5:return[4,n(m)];case 6:return[4,O.sent()];case 7:return O.sent(),[3,2];case 8:return[3,10];case 9:return d.releaseLock(),[7];case 10:return[2]}})})}e.readableStreamLikeToAsyncGenerator=a;function s(l){return i.isFunction(l==null?void 0:l.getReader)}e.isReadableStreamLike=s}}),ht=F({"../../node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js"(e){var t=e&&e.__awaiter||function(L,D,P,B){function X(V){return V instanceof P?V:new P(function(z){z(V)})}return new(P||(P=Promise))(function(V,z){function Y(ee){try{q(B.next(ee))}catch(le){z(le)}}function $(ee){try{q(B.throw(ee))}catch(le){z(le)}}function q(ee){ee.done?V(ee.value):X(ee.value).then(Y,$)}q((B=B.apply(L,D||[])).next())})},n=e&&e.__generator||function(L,D){var P={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},B,X,V,z;return z={next:Y(0),throw:Y(1),return:Y(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function Y(q){return function(ee){return $([q,ee])}}function $(q){if(B)throw new TypeError("Generator is already executing.");for(;P;)try{if(B=1,X&&(V=q[0]&2?X.return:q[0]?X.throw||((V=X.return)&&V.call(X),0):X.next)&&!(V=V.call(X,q[1])).done)return V;switch(X=0,V&&(q=[q[0]&2,V.value]),q[0]){case 0:case 1:V=q;break;case 4:return P.label++,{value:q[1],done:!1};case 5:P.label++,X=q[1],q=[0];continue;case 7:q=P.ops.pop(),P.trys.pop();continue;default:if(V=P.trys,!(V=V.length>0&&V[V.length-1])&&(q[0]===6||q[0]===2)){P=0;continue}if(q[0]===3&&(!V||q[1]>V[0]&&q[1]<V[3])){P.label=q[1];break}if(q[0]===6&&P.label<V[1]){P.label=V[1],V=q;break}if(V&&P.label<V[2]){P.label=V[2],P.ops.push(q);break}V[2]&&P.ops.pop(),P.trys.pop();continue}q=D.call(L,P)}catch(ee){q=[6,ee],X=0}finally{B=V=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},r=e&&e.__asyncValues||function(L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var D=L[Symbol.asyncIterator],P;return D?D.call(L):(L=typeof i=="function"?i(L):L[Symbol.iterator](),P={},B("next"),B("throw"),B("return"),P[Symbol.asyncIterator]=function(){return this},P);function B(V){P[V]=L[V]&&function(z){return new Promise(function(Y,$){z=L[V](z),X(Y,$,z.done,z.value)})}}function X(V,z,Y,$){Promise.resolve($).then(function(q){V({value:q,done:Y})},z)}},i=e&&e.__values||function(L){var D=typeof Symbol=="function"&&Symbol.iterator,P=D&&L[D],B=0;if(P)return P.call(L);if(L&&typeof L.length=="number")return{next:function(){return L&&B>=L.length&&(L=void 0),{value:L&&L[B++],done:!L}}};throw new TypeError(D?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.fromReadableStreamLike=e.fromAsyncIterable=e.fromIterable=e.fromPromise=e.fromArrayLike=e.fromInteropObservable=e.innerFrom=void 0;var a=iQ(),s=aQ(),l=tr(),c=sQ(),d=oQ(),f=lQ(),m=uQ(),p=m0(),O=Yt(),b=rQ(),x=f0();function w(L){if(L instanceof l.Observable)return L;if(L!=null){if(c.isInteropObservable(L))return k(L);if(a.isArrayLike(L))return T(L);if(s.isPromise(L))return j(L);if(d.isAsyncIterable(L))return Q(L);if(m.isIterable(L))return E(L);if(p.isReadableStreamLike(L))return A(L)}throw f.createInvalidObservableTypeError(L)}e.innerFrom=w;function k(L){return new l.Observable(function(D){var P=L[x.observable]();if(O.isFunction(P.subscribe))return P.subscribe(D);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}e.fromInteropObservable=k;function T(L){return new l.Observable(function(D){for(var P=0;P<L.length&&!D.closed;P++)D.next(L[P]);D.complete()})}e.fromArrayLike=T;function j(L){return new l.Observable(function(D){L.then(function(P){D.closed||(D.next(P),D.complete())},function(P){return D.error(P)}).then(null,b.reportUnhandledError)})}e.fromPromise=j;function E(L){return new l.Observable(function(D){var P,B;try{for(var X=i(L),V=X.next();!V.done;V=X.next()){var z=V.value;if(D.next(z),D.closed)return}}catch(Y){P={error:Y}}finally{try{V&&!V.done&&(B=X.return)&&B.call(X)}finally{if(P)throw P.error}}D.complete()})}e.fromIterable=E;function Q(L){return new l.Observable(function(D){M(L,D).catch(function(P){return D.error(P)})})}e.fromAsyncIterable=Q;function A(L){return Q(p.readableStreamLikeToAsyncGenerator(L))}e.fromReadableStreamLike=A;function M(L,D){var P,B,X,V;return t(this,void 0,void 0,function(){var z,Y;return n(this,function($){switch($.label){case 0:$.trys.push([0,5,6,11]),P=r(L),$.label=1;case 1:return[4,P.next()];case 2:if(B=$.sent(),!!B.done)return[3,4];if(z=B.value,D.next(z),D.closed)return[2];$.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return Y=$.sent(),X={error:Y},[3,11];case 6:return $.trys.push([6,,9,10]),B&&!B.done&&(V=P.return)?[4,V.call(P)]:[3,8];case 7:$.sent(),$.label=8;case 8:return[3,10];case 9:if(X)throw X.error;return[7];case 10:return[7];case 11:return D.complete(),[2]}})})}}}),Me=F({"../../node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorSubscriber=e.createOperatorSubscriber=void 0;var n=d0();function r(a,s,l,c,d){return new i(a,s,l,c,d)}e.createOperatorSubscriber=r;var i=(function(a){t(s,a);function s(l,c,d,f,m,p){var O=a.call(this,l)||this;return O.onFinalize=m,O.shouldUnsubscribe=p,O._next=c?function(b){try{c(b)}catch(x){l.error(x)}}:a.prototype._next,O._error=f?function(b){try{f(b)}catch(x){l.error(x)}finally{this.unsubscribe()}}:a.prototype._error,O._complete=d?function(){try{d()}catch(b){l.error(b)}finally{this.unsubscribe()}}:a.prototype._complete,O}return s.prototype.unsubscribe=function(){var l;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var c=this.closed;a.prototype.unsubscribe.call(this),!c&&((l=this.onFinalize)===null||l===void 0||l.call(this))}},s})(n.Subscriber);e.OperatorSubscriber=i}}),dQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/audit.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.audit=void 0;var t=ye(),n=ht(),r=Me();function i(a){return t.operate(function(s,l){var c=!1,d=null,f=null,m=!1,p=function(){if(f==null||f.unsubscribe(),f=null,c){c=!1;var b=d;d=null,l.next(b)}m&&l.complete()},O=function(){f=null,m&&l.complete()};s.subscribe(r.createOperatorSubscriber(l,function(b){c=!0,d=b,f||n.innerFrom(a(b)).subscribe(f=r.createOperatorSubscriber(l,p,O))},function(){m=!0,(!c||!f||f.closed)&&l.complete()}))})}e.audit=i}}),p0=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}}),eq=F({"../../node_modules/rxjs/dist/cjs/internal/Scheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scheduler=void 0;var t=p0(),n=(function(){function r(i,a){a===void 0&&(a=r.now),this.schedulerActionCtor=i,this.now=a}return r.prototype.schedule=function(i,a,s){return a===void 0&&(a=0),new this.schedulerActionCtor(this,i).schedule(s,a)},r.now=t.dateTimestampProvider.now,r})();e.Scheduler=n}}),tq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0;var n=Ra(),r=(function(i){t(a,i);function a(s,l){return i.call(this)||this}return a.prototype.schedule=function(s,l){return this},a})(n.Subscription);e.Action=r}}),nq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),l,c=[],d;try{for(;(i===void 0||i-- >0)&&!(l=s.next()).done;)c.push(l.value)}catch(f){d={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,l=r.length;a<s;a++,l++)r[l]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var l=e.intervalProvider.delegate;return l!=null&&l.setInterval?l.setInterval.apply(l,n([r,i],t(a))):setInterval.apply(void 0,n([r,i],t(a)))},clearInterval:function(r){var i=e.intervalProvider.delegate;return((i==null?void 0:i.clearInterval)||clearInterval)(r)},delegate:void 0}}}),rq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(e){var t=e&&e.__extends||(function(){var s=function(l,c){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(d[m]=f[m])},s(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");s(l,c);function d(){this.constructor=l}l.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncAction=void 0;var n=tq(),r=nq(),i=Ds(),a=(function(s){t(l,s);function l(c,d){var f=s.call(this,c,d)||this;return f.scheduler=c,f.work=d,f.pending=!1,f}return l.prototype.schedule=function(c,d){var f;if(d===void 0&&(d=0),this.closed)return this;this.state=c;var m=this.id,p=this.scheduler;return m!=null&&(this.id=this.recycleAsyncId(p,m,d)),this.pending=!0,this.delay=d,this.id=(f=this.id)!==null&&f!==void 0?f:this.requestAsyncId(p,this.id,d),this},l.prototype.requestAsyncId=function(c,d,f){return f===void 0&&(f=0),r.intervalProvider.setInterval(c.flush.bind(c,this),f)},l.prototype.recycleAsyncId=function(c,d,f){if(f===void 0&&(f=0),f!=null&&this.delay===f&&this.pending===!1)return d;d!=null&&r.intervalProvider.clearInterval(d)},l.prototype.execute=function(c,d){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var f=this._execute(c,d);if(f)return f;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},l.prototype._execute=function(c,d){var f=!1,m;try{this.work(c)}catch(p){f=!0,m=p||new Error("Scheduled action threw falsy error")}if(f)return this.unsubscribe(),m},l.prototype.unsubscribe=function(){if(!this.closed){var c=this,d=c.id,f=c.scheduler,m=f.actions;this.work=this.state=this.scheduler=null,this.pending=!1,i.arrRemove(m,this),d!=null&&(this.id=this.recycleAsyncId(f,d,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},l})(n.Action);e.AsyncAction=a}}),iq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScheduler=void 0;var n=eq(),r=(function(i){t(a,i);function a(s,l){l===void 0&&(l=n.Scheduler.now);var c=i.call(this,s,l)||this;return c.actions=[],c._active=!1,c}return a.prototype.flush=function(s){var l=this.actions;if(this._active){l.push(s);return}var c;this._active=!0;do if(c=s.execute(s.state,s.delay))break;while(s=l.shift());if(this._active=!1,c){for(;s=l.shift();)s.unsubscribe();throw c}},a})(n.Scheduler);e.AsyncScheduler=r}}),ci=F({"../../node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=rq(),n=iq();e.asyncScheduler=new n.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}}),fQ=F({"../../node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isScheduler=void 0;var t=Yt();function n(r){return r&&t.isFunction(r.schedule)}e.isScheduler=n}}),g0=F({"../../node_modules/rxjs/dist/cjs/internal/util/isDate.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidDate=void 0;function t(n){return n instanceof Date&&!isNaN(n)}e.isValidDate=t}}),Jl=F({"../../node_modules/rxjs/dist/cjs/internal/observable/timer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timer=void 0;var t=tr(),n=ci(),r=fQ(),i=g0();function a(s,l,c){s===void 0&&(s=0),c===void 0&&(c=n.async);var d=-1;return l!=null&&(r.isScheduler(l)?c=l:d=l),new t.Observable(function(f){var m=i.isValidDate(s)?+s-c.now():s;m<0&&(m=0);var p=0;return c.schedule(function(){f.closed||(f.next(p++),0<=d?this.schedule(void 0,d):f.complete())},m)})}e.timer=a}}),aq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.auditTime=void 0;var t=ci(),n=dQ(),r=Jl();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.audit(function(){return r.timer(a,s)})}e.auditTime=i}}),sq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=void 0;var t=ye(),n=gr(),r=Me(),i=ht();function a(s){return t.operate(function(l,c){var d=[];return l.subscribe(r.createOperatorSubscriber(c,function(f){return d.push(f)},function(){c.next(d),c.complete()})),i.innerFrom(s).subscribe(r.createOperatorSubscriber(c,function(){var f=d;d=[],c.next(f)},n.noop)),function(){d=null}})}e.buffer=a}}),oq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferCount=void 0;var n=ye(),r=Me(),i=Ds();function a(s,l){return l===void 0&&(l=null),l=l??s,n.operate(function(c,d){var f=[],m=0;c.subscribe(r.createOperatorSubscriber(d,function(p){var O,b,x,w,k=null;m++%l===0&&f.push([]);try{for(var T=t(f),j=T.next();!j.done;j=T.next()){var E=j.value;E.push(p),s<=E.length&&(k=k??[],k.push(E))}}catch(M){O={error:M}}finally{try{j&&!j.done&&(b=T.return)&&b.call(T)}finally{if(O)throw O.error}}if(k)try{for(var Q=t(k),A=Q.next();!A.done;A=Q.next()){var E=A.value;i.arrRemove(f,E),d.next(E)}}catch(M){x={error:M}}finally{try{A&&!A.done&&(w=Q.return)&&w.call(Q)}finally{if(x)throw x.error}}},function(){var p,O;try{for(var b=t(f),x=b.next();!x.done;x=b.next()){var w=x.value;d.next(w)}}catch(k){p={error:k}}finally{try{x&&!x.done&&(O=b.return)&&O.call(b)}finally{if(p)throw p.error}}d.complete()},void 0,function(){f=null}))})}e.bufferCount=a}}),Ci=F({"../../node_modules/rxjs/dist/cjs/internal/util/args.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.popNumber=e.popScheduler=e.popResultSelector=void 0;var t=Yt(),n=fQ();function r(l){return l[l.length-1]}function i(l){return t.isFunction(r(l))?l.pop():void 0}e.popResultSelector=i;function a(l){return n.isScheduler(r(l))?l.pop():void 0}e.popScheduler=a;function s(l,c){return typeof r(l)=="number"?l.pop():c}e.popNumber=s}}),zs=F({"../../node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.executeSchedule=void 0;function t(n,r,i,a,s){a===void 0&&(a=0),s===void 0&&(s=!1);var l=r.schedule(function(){i(),s?n.add(this.schedule(null,a)):this.unsubscribe()},a);if(n.add(l),!s)return l}e.executeSchedule=t}}),lq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferTime=void 0;var n=Ra(),r=ye(),i=Me(),a=Ds(),s=ci(),l=Ci(),c=zs();function d(f){for(var m,p,O=[],b=1;b<arguments.length;b++)O[b-1]=arguments[b];var x=(m=l.popScheduler(O))!==null&&m!==void 0?m:s.asyncScheduler,w=(p=O[0])!==null&&p!==void 0?p:null,k=O[1]||1/0;return r.operate(function(T,j){var E=[],Q=!1,A=function(D){var P=D.buffer,B=D.subs;B.unsubscribe(),a.arrRemove(E,D),j.next(P),Q&&M()},M=function(){if(E){var D=new n.Subscription;j.add(D);var P=[],B={buffer:P,subs:D};E.push(B),c.executeSchedule(D,x,function(){return A(B)},f)}};w!==null&&w>=0?c.executeSchedule(j,x,M,w,!0):Q=!0,M();var L=i.createOperatorSubscriber(j,function(D){var P,B,X=E.slice();try{for(var V=t(X),z=V.next();!z.done;z=V.next()){var Y=z.value,$=Y.buffer;$.push(D),k<=$.length&&A(Y)}}catch(q){P={error:q}}finally{try{z&&!z.done&&(B=V.return)&&B.call(V)}finally{if(P)throw P.error}}},function(){for(;E!=null&&E.length;)j.next(E.shift().buffer);L==null||L.unsubscribe(),j.complete(),j.unsubscribe()},void 0,function(){return E=null});T.subscribe(L)})}e.bufferTime=d}}),cq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(e){var t=e&&e.__values||function(d){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&d[f],p=0;if(m)return m.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&p>=d.length&&(d=void 0),{value:d&&d[p++],done:!d}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferToggle=void 0;var n=Ra(),r=ye(),i=ht(),a=Me(),s=gr(),l=Ds();function c(d,f){return r.operate(function(m,p){var O=[];i.innerFrom(d).subscribe(a.createOperatorSubscriber(p,function(b){var x=[];O.push(x);var w=new n.Subscription,k=function(){l.arrRemove(O,x),p.next(x),w.unsubscribe()};w.add(i.innerFrom(f(b)).subscribe(a.createOperatorSubscriber(p,k,s.noop)))},s.noop)),m.subscribe(a.createOperatorSubscriber(p,function(b){var x,w;try{for(var k=t(O),T=k.next();!T.done;T=k.next()){var j=T.value;j.push(b)}}catch(E){x={error:E}}finally{try{T&&!T.done&&(w=k.return)&&w.call(k)}finally{if(x)throw x.error}}},function(){for(;O.length>0;)p.next(O.shift());p.complete()}))})}e.bufferToggle=c}}),uq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufferWhen=void 0;var t=ye(),n=gr(),r=Me(),i=ht();function a(s){return t.operate(function(l,c){var d=null,f=null,m=function(){f==null||f.unsubscribe();var p=d;d=[],p&&c.next(p),i.innerFrom(s()).subscribe(f=r.createOperatorSubscriber(c,m,n.noop))};m(),l.subscribe(r.createOperatorSubscriber(c,function(p){return d==null?void 0:d.push(p)},function(){d&&c.next(d),c.complete()},void 0,function(){return d=f=null}))})}e.bufferWhen=a}}),dq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.catchError=void 0;var t=ht(),n=Me(),r=ye();function i(a){return r.operate(function(s,l){var c=null,d=!1,f;c=s.subscribe(n.createOperatorSubscriber(l,void 0,void 0,function(m){f=t.innerFrom(a(m,i(a)(s))),c?(c.unsubscribe(),c=null,f.subscribe(l)):d=!0})),d&&(c.unsubscribe(),c=null,f.subscribe(l))})}e.catchError=i}}),v0=F({"../../node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeOn=void 0;var t=zs(),n=ye(),r=Me();function i(a,s){return s===void 0&&(s=0),n.operate(function(l,c){l.subscribe(r.createOperatorSubscriber(c,function(d){return t.executeSchedule(c,a,function(){return c.next(d)},s)},function(){return t.executeSchedule(c,a,function(){return c.complete()},s)},function(d){return t.executeSchedule(c,a,function(){return c.error(d)},s)}))})}e.observeOn=i}}),O0=F({"../../node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeOn=void 0;var t=ye();function n(r,i){return i===void 0&&(i=0),t.operate(function(a,s){s.add(r.schedule(function(){return a.subscribe(s)},i))})}e.subscribeOn=n}}),fq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleObservable=void 0;var t=ht(),n=v0(),r=O0();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.scheduleObservable=i}}),hq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schedulePromise=void 0;var t=ht(),n=v0(),r=O0();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.schedulePromise=i}}),mq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleArray=void 0;var t=tr();function n(r,i){return new t.Observable(function(a){var s=0;return i.schedule(function(){s===r.length?a.complete():(a.next(r[s++]),a.closed||this.schedule())})})}e.scheduleArray=n}}),pq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleIterable=void 0;var t=tr(),n=cQ(),r=Yt(),i=zs();function a(s,l){return new t.Observable(function(c){var d;return i.executeSchedule(c,l,function(){d=s[n.iterator](),i.executeSchedule(c,l,function(){var f,m,p;try{f=d.next(),m=f.value,p=f.done}catch(O){c.error(O);return}p?c.complete():c.next(m)},0,!0)}),function(){return r.isFunction(d==null?void 0:d.return)&&d.return()}})}e.scheduleIterable=a}}),hQ=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleAsyncIterable=void 0;var t=tr(),n=zs();function r(i,a){if(!i)throw new Error("Iterable cannot be null");return new t.Observable(function(s){n.executeSchedule(s,a,function(){var l=i[Symbol.asyncIterator]();n.executeSchedule(s,a,function(){l.next().then(function(c){c.done?s.complete():s.next(c.value)})},0,!0)})})}e.scheduleAsyncIterable=r}}),gq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleReadableStreamLike=void 0;var t=hQ(),n=m0();function r(i,a){return t.scheduleAsyncIterable(n.readableStreamLikeToAsyncGenerator(i),a)}e.scheduleReadableStreamLike=r}}),vq=F({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduled=void 0;var t=fq(),n=hq(),r=mq(),i=pq(),a=hQ(),s=sQ(),l=aQ(),c=iQ(),d=uQ(),f=oQ(),m=lQ(),p=m0(),O=gq();function b(x,w){if(x!=null){if(s.isInteropObservable(x))return t.scheduleObservable(x,w);if(c.isArrayLike(x))return r.scheduleArray(x,w);if(l.isPromise(x))return n.schedulePromise(x,w);if(f.isAsyncIterable(x))return a.scheduleAsyncIterable(x,w);if(d.isIterable(x))return i.scheduleIterable(x,w);if(p.isReadableStreamLike(x))return O.scheduleReadableStreamLike(x,w)}throw m.createInvalidObservableTypeError(x)}e.scheduled=b}}),vd=F({"../../node_modules/rxjs/dist/cjs/internal/observable/from.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var t=vq(),n=ht();function r(i,a){return a?t.scheduled(i,a):n.innerFrom(i)}e.from=r}}),Qo=F({"../../node_modules/rxjs/dist/cjs/internal/operators/map.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.map=void 0;var t=ye(),n=Me();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){l.next(i.call(a,d,c++))}))})}e.map=r}}),Oq=F({"../../node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsArgArrayOrObject=void 0;var t=Array.isArray,n=Object.getPrototypeOf,r=Object.prototype,i=Object.keys;function a(l){if(l.length===1){var c=l[0];if(t(c))return{args:c,keys:null};if(s(c)){var d=i(c);return{args:d.map(function(f){return c[f]}),keys:d}}}return{args:l,keys:null}}e.argsArgArrayOrObject=a;function s(l){return l&&typeof l=="object"&&n(l)===r}}}),b0=F({"../../node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(e){var t=e&&e.__read||function(l,c){var d=typeof Symbol=="function"&&l[Symbol.iterator];if(!d)return l;var f=d.call(l),m,p=[],O;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){O={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(O)throw O.error}}return p},n=e&&e.__spreadArray||function(l,c){for(var d=0,f=c.length,m=l.length;d<f;d++,m++)l[m]=c[d];return l};Object.defineProperty(e,"__esModule",{value:!0}),e.mapOneOrManyArgs=void 0;var r=Qo(),i=Array.isArray;function a(l,c){return i(c)?l.apply(void 0,n([],t(c))):l(c)}function s(l){return r.map(function(c){return a(l,c)})}e.mapOneOrManyArgs=s}}),bq=F({"../../node_modules/rxjs/dist/cjs/internal/util/createObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createObject=void 0;function t(n,r){return n.reduce(function(i,a,s){return i[a]=r[s],i},{})}e.createObject=t}}),mQ=F({"../../node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestInit=e.combineLatest=void 0;var t=tr(),n=Oq(),r=vd(),i=vr(),a=b0(),s=Ci(),l=bq(),c=Me(),d=zs();function f(){for(var O=[],b=0;b<arguments.length;b++)O[b]=arguments[b];var x=s.popScheduler(O),w=s.popResultSelector(O),k=n.argsArgArrayOrObject(O),T=k.args,j=k.keys;if(T.length===0)return r.from([],x);var E=new t.Observable(m(T,x,j?function(Q){return l.createObject(j,Q)}:i.identity));return w?E.pipe(a.mapOneOrManyArgs(w)):E}e.combineLatest=f;function m(O,b,x){return x===void 0&&(x=i.identity),function(w){p(b,function(){for(var k=O.length,T=new Array(k),j=k,E=k,Q=function(M){p(b,function(){var L=r.from(O[M],b),D=!1;L.subscribe(c.createOperatorSubscriber(w,function(P){T[M]=P,D||(D=!0,E--),E||w.next(x(T.slice()))},function(){--j||w.complete()}))},w)},A=0;A<k;A++)Q(A)},w)}}e.combineLatestInit=m;function p(O,b,x){O?d.executeSchedule(x,O,b):b()}}}),y0=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeInternals=void 0;var t=ht(),n=zs(),r=Me();function i(a,s,l,c,d,f,m,p){var O=[],b=0,x=0,w=!1,k=function(){w&&!O.length&&!b&&s.complete()},T=function(E){return b<c?j(E):O.push(E)},j=function(E){f&&s.next(E),b++;var Q=!1;t.innerFrom(l(E,x++)).subscribe(r.createOperatorSubscriber(s,function(A){d==null||d(A),f?T(A):s.next(A)},function(){Q=!0},void 0,function(){if(Q)try{b--;for(var A=function(){var M=O.shift();m?n.executeSchedule(s,m,function(){return j(M)}):j(M)};O.length&&b<c;)A();k()}catch(M){s.error(M)}}))};return a.subscribe(r.createOperatorSubscriber(s,T,function(){w=!0,k()})),function(){p==null||p()}}e.mergeInternals=i}}),Ao=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMap=void 0;var t=Qo(),n=ht(),r=ye(),i=y0(),a=Yt();function s(l,c,d){return d===void 0&&(d=1/0),a.isFunction(c)?s(function(f,m){return t.map(function(p,O){return c(f,p,m,O)})(n.innerFrom(l(f,m)))},d):(typeof c=="number"&&(d=c),r.operate(function(f,m){return i.mergeInternals(f,m,l,d)}))}e.mergeMap=s}}),pQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scanInternals=void 0;var t=Me();function n(r,i,a,s,l){return function(c,d){var f=a,m=i,p=0;c.subscribe(t.createOperatorSubscriber(d,function(O){var b=p++;m=f?r(m,O,b):(f=!0,O),s&&d.next(m)},l&&(function(){f&&d.next(m),d.complete()})))}}e.scanInternals=n}}),Od=F({"../../node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reduce=void 0;var t=pQ(),n=ye();function r(i,a){return n.operate(t.scanInternals(i,a,arguments.length>=2,!1,!0))}e.reduce=r}}),gQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toArray=void 0;var t=Od(),n=ye(),r=function(a,s){return a.push(s),a};function i(){return n.operate(function(a,s){t.reduce(r,[])(a).subscribe(s)})}e.toArray=i}}),vQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.joinAllInternals=void 0;var t=vr(),n=b0(),r=h0(),i=Ao(),a=gQ();function s(l,c){return r.pipe(a.toArray(),i.mergeMap(function(d){return l(d)}),c?n.mapOneOrManyArgs(c):t.identity)}e.joinAllInternals=s}}),OQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestAll=void 0;var t=mQ(),n=vQ();function r(i){return n.joinAllInternals(t.combineLatest,i)}e.combineLatestAll=r}}),yq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineAll=void 0;var t=OQ();e.combineAll=t.combineLatestAll}}),ec=F({"../../node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsOrArgArray=void 0;var t=Array.isArray;function n(r){return r.length===1&&t(r[0])?r[0]:r}e.argsOrArgArray=n}}),bQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatest=void 0;var r=mQ(),i=ye(),a=ec(),s=b0(),l=h0(),c=Ci();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return p?l.pipe(d.apply(void 0,n([],t(f))),s.mapOneOrManyArgs(p)):i.operate(function(O,b){r.combineLatestInit(n([O],t(a.argsOrArgArray(f))))(b)})}e.combineLatest=d}}),xq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestWith=void 0;var r=bQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.combineLatest.apply(void 0,n([],t(a)))}e.combineLatestWith=i}}),x0=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=void 0;var t=Ao(),n=vr();function r(i){return i===void 0&&(i=1/0),t.mergeMap(n.identity,i)}e.mergeAll=r}}),S0=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatAll=void 0;var t=x0();function n(){return t.mergeAll(1)}e.concatAll=n}}),yQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMap=void 0;var t=Ao(),n=Yt();function r(i,a){return n.isFunction(a)?t.mergeMap(i,a,1):t.mergeMap(i,1)}e.concatMap=r}}),Sq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMapTo=void 0;var t=yQ(),n=Yt();function r(i,a){return n.isFunction(a)?t.concatMap(function(){return i},a):t.concatMap(function(){return i})}e.concatMapTo=r}}),xQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concat.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,O=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)O.push(p.value)}catch(x){b={error:x}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return O},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var r=ye(),i=S0(),a=Ci(),s=vd();function l(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c);return r.operate(function(m,p){i.concatAll()(s.from(n([m],t(c)),f)).subscribe(p)})}e.concat=l}}),wq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.concatWith=void 0;var r=xQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.concat.apply(void 0,n([],t(a)))}e.concatWith=i}}),_q=F({"../../node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUnsubscribedError=void 0;var t=Eo();e.ObjectUnsubscribedError=t.createErrorClass(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})}}),Or=F({"../../node_modules/rxjs/dist/cjs/internal/Subject.js"(e){var t=e&&e.__extends||(function(){var f=function(m,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,b){O.__proto__=b}||function(O,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(O[x]=b[x])},f(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(m,p);function O(){this.constructor=m}m.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})(),n=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousSubject=e.Subject=void 0;var r=tr(),i=Ra(),a=_q(),s=Ds(),l=u0(),c=(function(f){t(m,f);function m(){var p=f.call(this)||this;return p.closed=!1,p.currentObservers=null,p.observers=[],p.isStopped=!1,p.hasError=!1,p.thrownError=null,p}return m.prototype.lift=function(p){var O=new d(this,this);return O.operator=p,O},m.prototype._throwIfClosed=function(){if(this.closed)throw new a.ObjectUnsubscribedError},m.prototype.next=function(p){var O=this;l.errorContext(function(){var b,x;if(O._throwIfClosed(),!O.isStopped){O.currentObservers||(O.currentObservers=Array.from(O.observers));try{for(var w=n(O.currentObservers),k=w.next();!k.done;k=w.next()){var T=k.value;T.next(p)}}catch(j){b={error:j}}finally{try{k&&!k.done&&(x=w.return)&&x.call(w)}finally{if(b)throw b.error}}}})},m.prototype.error=function(p){var O=this;l.errorContext(function(){if(O._throwIfClosed(),!O.isStopped){O.hasError=O.isStopped=!0,O.thrownError=p;for(var b=O.observers;b.length;)b.shift().error(p)}})},m.prototype.complete=function(){var p=this;l.errorContext(function(){if(p._throwIfClosed(),!p.isStopped){p.isStopped=!0;for(var O=p.observers;O.length;)O.shift().complete()}})},m.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(m.prototype,"observed",{get:function(){var p;return((p=this.observers)===null||p===void 0?void 0:p.length)>0},enumerable:!1,configurable:!0}),m.prototype._trySubscribe=function(p){return this._throwIfClosed(),f.prototype._trySubscribe.call(this,p)},m.prototype._subscribe=function(p){return this._throwIfClosed(),this._checkFinalizedStatuses(p),this._innerSubscribe(p)},m.prototype._innerSubscribe=function(p){var O=this,b=this,x=b.hasError,w=b.isStopped,k=b.observers;return x||w?i.EMPTY_SUBSCRIPTION:(this.currentObservers=null,k.push(p),new i.Subscription(function(){O.currentObservers=null,s.arrRemove(k,p)}))},m.prototype._checkFinalizedStatuses=function(p){var O=this,b=O.hasError,x=O.thrownError,w=O.isStopped;b?p.error(x):w&&p.complete()},m.prototype.asObservable=function(){var p=new r.Observable;return p.source=this,p},m.create=function(p,O){return new d(p,O)},m})(r.Observable);e.Subject=c;var d=(function(f){t(m,f);function m(p,O){var b=f.call(this)||this;return b.destination=p,b.source=O,b}return m.prototype.next=function(p){var O,b;(b=(O=this.destination)===null||O===void 0?void 0:O.next)===null||b===void 0||b.call(O,p)},m.prototype.error=function(p){var O,b;(b=(O=this.destination)===null||O===void 0?void 0:O.error)===null||b===void 0||b.call(O,p)},m.prototype.complete=function(){var p,O;(O=(p=this.destination)===null||p===void 0?void 0:p.complete)===null||O===void 0||O.call(p)},m.prototype._subscribe=function(p){var O,b;return(b=(O=this.source)===null||O===void 0?void 0:O.subscribe(p))!==null&&b!==void 0?b:i.EMPTY_SUBSCRIPTION},m})(c);e.AnonymousSubject=d}}),kq=F({"../../node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromSubscribable=void 0;var t=tr();function n(r){return new t.Observable(function(i){return r.subscribe(i)})}e.fromSubscribable=n}}),w0=F({"../../node_modules/rxjs/dist/cjs/internal/operators/connect.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.connect=void 0;var t=Or(),n=ht(),r=ye(),i=kq(),a={connector:function(){return new t.Subject}};function s(l,c){c===void 0&&(c=a);var d=c.connector;return r.operate(function(f,m){var p=d();n.innerFrom(l(i.fromSubscribable(p))).subscribe(m),m.add(f.subscribe(p))})}e.connect=s}}),jq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/count.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.count=void 0;var t=Od();function n(r){return t.reduce(function(i,a,s){return!r||r(a,s)?i+1:i},0)}e.count=n}}),Tq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0;var t=ye(),n=gr(),r=Me(),i=ht();function a(s){return t.operate(function(l,c){var d=!1,f=null,m=null,p=function(){if(m==null||m.unsubscribe(),m=null,d){d=!1;var O=f;f=null,c.next(O)}};l.subscribe(r.createOperatorSubscriber(c,function(O){m==null||m.unsubscribe(),d=!0,f=O,m=r.createOperatorSubscriber(c,p,n.noop),i.innerFrom(s(O)).subscribe(m)},function(){p(),c.complete()},void 0,function(){f=m=null}))})}e.debounce=a}}),Cq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounceTime=void 0;var t=ci(),n=ye(),r=Me();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(l,c){var d=null,f=null,m=null,p=function(){if(d){d.unsubscribe(),d=null;var b=f;f=null,c.next(b)}};function O(){var b=m+a,x=s.now();if(x<b){d=this.schedule(void 0,b-x),c.add(d);return}p()}l.subscribe(r.createOperatorSubscriber(c,function(b){f=b,m=s.now(),d||(d=s.schedule(O,a),c.add(d))},function(){p(),c.complete()},void 0,function(){f=d=null}))})}e.debounceTime=i}}),$m=F({"../../node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultIfEmpty=void 0;var t=ye(),n=Me();function r(i){return t.operate(function(a,s){var l=!1;a.subscribe(n.createOperatorSubscriber(s,function(c){l=!0,s.next(c)},function(){l||s.next(i),s.complete()}))})}e.defaultIfEmpty=r}}),_0=F({"../../node_modules/rxjs/dist/cjs/internal/observable/concat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var t=S0(),n=Ci(),r=vd();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return t.concatAll()(r.from(a,n.popScheduler(a)))}e.concat=i}}),bd=F({"../../node_modules/rxjs/dist/cjs/internal/observable/empty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=tr();e.EMPTY=new t.Observable(function(i){return i.complete()});function n(i){return i?r(i):e.EMPTY}e.empty=n;function r(i){return new t.Observable(function(a){return i.schedule(function(){return a.complete()})})}}}),qm=F({"../../node_modules/rxjs/dist/cjs/internal/operators/take.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.take=void 0;var t=bd(),n=ye(),r=Me();function i(a){return a<=0?function(){return t.EMPTY}:n.operate(function(s,l){var c=0;s.subscribe(r.createOperatorSubscriber(l,function(d){++c<=a&&(l.next(d),a<=c&&l.complete())}))})}e.take=i}}),SQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreElements=void 0;var t=ye(),n=Me(),r=gr();function i(){return t.operate(function(a,s){a.subscribe(n.createOperatorSubscriber(s,r.noop))})}e.ignoreElements=i}}),wQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapTo=void 0;var t=Qo();function n(r){return t.map(function(){return r})}e.mapTo=n}}),_Q=F({"../../node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delayWhen=void 0;var t=_0(),n=qm(),r=SQ(),i=wQ(),a=Ao(),s=ht();function l(c,d){return d?function(f){return t.concat(d.pipe(n.take(1),r.ignoreElements()),f.pipe(l(c)))}:a.mergeMap(function(f,m){return s.innerFrom(c(f,m)).pipe(n.take(1),i.mapTo(f))})}e.delayWhen=l}}),Eq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/delay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0;var t=ci(),n=_Q(),r=Jl();function i(a,s){s===void 0&&(s=t.asyncScheduler);var l=r.timer(a,s);return n.delayWhen(function(){return l})}e.delay=i}}),kQ=F({"../../node_modules/rxjs/dist/cjs/internal/observable/of.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.of=void 0;var t=Ci(),n=vd();function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=t.popScheduler(i);return n.from(i,s)}e.of=r}}),Qq=F({"../../node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=void 0;var t=tr(),n=Yt();function r(i,a){var s=n.isFunction(i)?i:function(){return i},l=function(c){return c.error(s())};return new t.Observable(a?function(c){return a.schedule(l,0,c)}:l)}e.throwError=r}}),jQ=F({"../../node_modules/rxjs/dist/cjs/internal/Notification.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var t=bd(),n=kQ(),r=Qq(),i=Yt();(function(l){l.NEXT="N",l.ERROR="E",l.COMPLETE="C"})(e.NotificationKind||(e.NotificationKind={}));var a=(function(){function l(c,d,f){this.kind=c,this.value=d,this.error=f,this.hasValue=c==="N"}return l.prototype.observe=function(c){return s(this,c)},l.prototype.do=function(c,d,f){var m=this,p=m.kind,O=m.value,b=m.error;return p==="N"?c==null?void 0:c(O):p==="E"?d==null?void 0:d(b):f==null?void 0:f()},l.prototype.accept=function(c,d,f){var m;return i.isFunction((m=c)===null||m===void 0?void 0:m.next)?this.observe(c):this.do(c,d,f)},l.prototype.toObservable=function(){var c=this,d=c.kind,f=c.value,m=c.error,p=d==="N"?n.of(f):d==="E"?r.throwError(function(){return m}):d==="C"?t.EMPTY:0;if(!p)throw new TypeError("Unexpected notification kind "+d);return p},l.createNext=function(c){return new l("N",c)},l.createError=function(c){return new l("E",void 0,c)},l.createComplete=function(){return l.completeNotification},l.completeNotification=new l("C"),l})();e.Notification=a;function s(l,c){var d,f,m,p=l,O=p.kind,b=p.value,x=p.error;if(typeof O!="string")throw new TypeError('Invalid notification, missing "kind"');O==="N"?(d=c.next)===null||d===void 0||d.call(c,b):O==="E"?(f=c.error)===null||f===void 0||f.call(c,x):(m=c.complete)===null||m===void 0||m.call(c)}e.observeNotification=s}}),Aq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dematerialize=void 0;var t=jQ(),n=ye(),r=Me();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(l){return t.observeNotification(l,s)}))})}e.dematerialize=i}}),Pq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=void 0;var t=ye(),n=Me(),r=gr(),i=ht();function a(s,l){return t.operate(function(c,d){var f=new Set;c.subscribe(n.createOperatorSubscriber(d,function(m){var p=s?s(m):m;f.has(p)||(f.add(p),d.next(m))})),l&&i.innerFrom(l).subscribe(n.createOperatorSubscriber(d,function(){return f.clear()},r.noop))})}e.distinct=a}}),TQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilChanged=void 0;var t=vr(),n=ye(),r=Me();function i(s,l){return l===void 0&&(l=t.identity),s=s??a,n.operate(function(c,d){var f,m=!0;c.subscribe(r.createOperatorSubscriber(d,function(p){var O=l(p);(m||!s(f,O))&&(m=!1,f=O,d.next(p))}))})}e.distinctUntilChanged=i;function a(s,l){return s===l}}}),Nq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilKeyChanged=void 0;var t=TQ();function n(r,i){return t.distinctUntilChanged(function(a,s){return i?i(a[r],s[r]):a[r]===s[r]})}e.distinctUntilKeyChanged=n}}),Rq=F({"../../node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentOutOfRangeError=void 0;var t=Eo();e.ArgumentOutOfRangeError=t.createErrorClass(function(n){return function(){n(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})}}),tc=F({"../../node_modules/rxjs/dist/cjs/internal/operators/filter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.filter=void 0;var t=ye(),n=Me();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){return i.call(a,d,c++)&&l.next(d)}))})}e.filter=r}}),Im=F({"../../node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyError=void 0;var t=Eo();e.EmptyError=t.createErrorClass(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}})}}),Xm=F({"../../node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfEmpty=void 0;var t=Im(),n=ye(),r=Me();function i(s){return s===void 0&&(s=a),n.operate(function(l,c){var d=!1;l.subscribe(r.createOperatorSubscriber(c,function(f){d=!0,c.next(f)},function(){return d?c.complete():c.error(s())}))})}e.throwIfEmpty=i;function a(){return new t.EmptyError}}}),Mq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.elementAt=void 0;var t=Rq(),n=tc(),r=Xm(),i=$m(),a=qm();function s(l,c){if(l<0)throw new t.ArgumentOutOfRangeError;var d=arguments.length>=2;return function(f){return f.pipe(n.filter(function(m,p){return p===l}),a.take(1),d?i.defaultIfEmpty(c):r.throwIfEmpty(function(){return new t.ArgumentOutOfRangeError}))}}e.elementAt=s}}),Lq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.endWith=void 0;var r=_0(),i=kQ();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return function(c){return r.concat(c,i.of.apply(void 0,n([],t(s))))}}e.endWith=a}}),Dq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/every.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.every=void 0;var t=ye(),n=Me();function r(i,a){return t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){i.call(a,d,c++,s)||(l.next(!1),l.complete())},function(){l.next(!0),l.complete()}))})}e.every=r}}),CQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustMap=void 0;var t=Qo(),n=ht(),r=ye(),i=Me();function a(s,l){return l?function(c){return c.pipe(a(function(d,f){return n.innerFrom(s(d,f)).pipe(t.map(function(m,p){return l(d,m,f,p)}))}))}:r.operate(function(c,d){var f=0,m=null,p=!1;c.subscribe(i.createOperatorSubscriber(d,function(O){m||(m=i.createOperatorSubscriber(d,void 0,function(){m=null,p&&d.complete()}),n.innerFrom(s(O,f++)).subscribe(m))},function(){p=!0,!m&&d.complete()}))})}e.exhaustMap=a}}),EQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustAll=void 0;var t=CQ(),n=vr();function r(){return t.exhaustMap(n.identity)}e.exhaustAll=r}}),zq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaust=void 0;var t=EQ();e.exhaust=t.exhaustAll}}),$q=F({"../../node_modules/rxjs/dist/cjs/internal/operators/expand.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.expand=void 0;var t=ye(),n=y0();function r(i,a,s){return a===void 0&&(a=1/0),a=(a||0)<1?1/0:a,t.operate(function(l,c){return n.mergeInternals(l,c,i,a,void 0,!0,s)})}e.expand=r}}),qq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.finalize=void 0;var t=ye();function n(r){return t.operate(function(i,a){try{i.subscribe(a)}finally{a.add(r)}})}e.finalize=n}}),QQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/find.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFind=e.find=void 0;var t=ye(),n=Me();function r(a,s){return t.operate(i(a,s,"value"))}e.find=r;function i(a,s,l){var c=l==="index";return function(d,f){var m=0;d.subscribe(n.createOperatorSubscriber(f,function(p){var O=m++;a.call(s,p,O,d)&&(f.next(c?O:p),f.complete())},function(){f.next(c?-1:void 0),f.complete()}))}}e.createFind=i}}),Iq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.findIndex=void 0;var t=ye(),n=QQ();function r(i,a){return t.operate(n.createFind(i,a,"index"))}e.findIndex=r}}),Xq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/first.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.first=void 0;var t=Im(),n=tc(),r=qm(),i=$m(),a=Xm(),s=vr();function l(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,O){return c(p,O,m)}):s.identity,r.take(1),f?i.defaultIfEmpty(d):a.throwIfEmpty(function(){return new t.EmptyError}))}}e.first=l}}),Zq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.groupBy=void 0;var t=tr(),n=ht(),r=Or(),i=ye(),a=Me();function s(l,c,d,f){return i.operate(function(m,p){var O;!c||typeof c=="function"?O=c:(d=c.duration,O=c.element,f=c.connector);var b=new Map,x=function(Q){b.forEach(Q),Q(p)},w=function(Q){return x(function(A){return A.error(Q)})},k=0,T=!1,j=new a.OperatorSubscriber(p,function(Q){try{var A=l(Q),M=b.get(A);if(!M){b.set(A,M=f?f():new r.Subject);var L=E(A,M);if(p.next(L),d){var D=a.createOperatorSubscriber(M,function(){M.complete(),D==null||D.unsubscribe()},void 0,void 0,function(){return b.delete(A)});j.add(n.innerFrom(d(L)).subscribe(D))}}M.next(O?O(Q):Q)}catch(P){w(P)}},function(){return x(function(Q){return Q.complete()})},w,function(){return b.clear()},function(){return T=!0,k===0});m.subscribe(j);function E(Q,A){var M=new t.Observable(function(L){k++;var D=A.subscribe(L);return function(){D.unsubscribe(),--k===0&&T&&j.unsubscribe()}});return M.key=Q,M}})}e.groupBy=s}}),Bq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=void 0;var t=ye(),n=Me();function r(){return t.operate(function(i,a){i.subscribe(n.createOperatorSubscriber(a,function(){a.next(!1),a.complete()},function(){a.next(!0),a.complete()}))})}e.isEmpty=r}}),AQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.takeLast=void 0;var n=bd(),r=ye(),i=Me();function a(s){return s<=0?function(){return n.EMPTY}:r.operate(function(l,c){var d=[];l.subscribe(i.createOperatorSubscriber(c,function(f){d.push(f),s<d.length&&d.shift()},function(){var f,m;try{for(var p=t(d),O=p.next();!O.done;O=p.next()){var b=O.value;c.next(b)}}catch(x){f={error:x}}finally{try{O&&!O.done&&(m=p.return)&&m.call(p)}finally{if(f)throw f.error}}c.complete()},void 0,function(){d=null}))})}e.takeLast=a}}),Vq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/last.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.last=void 0;var t=Im(),n=tc(),r=AQ(),i=Xm(),a=$m(),s=vr();function l(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,O){return c(p,O,m)}):s.identity,r.takeLast(1),f?a.defaultIfEmpty(d):i.throwIfEmpty(function(){return new t.EmptyError}))}}e.last=l}}),Uq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.materialize=void 0;var t=jQ(),n=ye(),r=Me();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(l){s.next(t.Notification.createNext(l))},function(){s.next(t.Notification.createComplete()),s.complete()},function(l){s.next(t.Notification.createError(l)),s.complete()}))})}e.materialize=i}}),Yq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/max.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.max=void 0;var t=Od(),n=Yt();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)>0?a:s}:function(a,s){return a>s?a:s})}e.max=r}}),Wq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flatMap=void 0;var t=Ao();e.flatMap=t.mergeMap}}),Fq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMapTo=void 0;var t=Ao(),n=Yt();function r(i,a,s){return s===void 0&&(s=1/0),n.isFunction(a)?t.mergeMap(function(){return i},a,s):(typeof a=="number"&&(s=a),t.mergeMap(function(){return i},s))}e.mergeMapTo=r}}),Hq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeScan=void 0;var t=ye(),n=y0();function r(i,a,s){return s===void 0&&(s=1/0),t.operate(function(l,c){var d=a;return n.mergeInternals(l,c,function(f,m){return i(d,f,m)},s,function(f){d=f},!1,void 0,function(){return d=null})})}e.mergeScan=r}}),PQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/merge.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,O=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)O.push(p.value)}catch(x){b={error:x}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return O},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var r=ye(),i=x0(),a=Ci(),s=vd();function l(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c),m=a.popNumber(c,1/0);return r.operate(function(p,O){i.mergeAll(m)(s.from(n([p],t(c)),f)).subscribe(O)})}e.merge=l}}),Gq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.mergeWith=void 0;var r=PQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.merge.apply(void 0,n([],t(a)))}e.mergeWith=i}}),Kq=F({"../../node_modules/rxjs/dist/cjs/internal/operators/min.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.min=void 0;var t=Od(),n=Yt();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)<0?a:s}:function(a,s){return a<s?a:s})}e.min=r}}),NQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.refCount=void 0;var t=ye(),n=Me();function r(){return t.operate(function(i,a){var s=null;i._refCount++;var l=n.createOperatorSubscriber(a,void 0,void 0,void 0,function(){if(!i||i._refCount<=0||0<--i._refCount){s=null;return}var c=i._connection,d=s;s=null,c&&(!d||c===d)&&c.unsubscribe(),a.unsubscribe()});i.subscribe(l),l.closed||(s=i.connect())})}e.refCount=r}}),k0=F({"../../node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(e){var t=e&&e.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var O in p)Object.prototype.hasOwnProperty.call(p,O)&&(m[O]=p[O])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function m(){this.constructor=d}d.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectableObservable=void 0;var n=tr(),r=Ra(),i=NQ(),a=Me(),s=ye(),l=(function(c){t(d,c);function d(f,m){var p=c.call(this)||this;return p.source=f,p.subjectFactory=m,p._subject=null,p._refCount=0,p._connection=null,s.hasLift(f)&&(p.lift=f.lift),p}return d.prototype._subscribe=function(f){return this.getSubject().subscribe(f)},d.prototype.getSubject=function(){var f=this._subject;return(!f||f.isStopped)&&(this._subject=this.subjectFactory()),this._subject},d.prototype._teardown=function(){this._refCount=0;var f=this._connection;this._subject=this._connection=null,f==null||f.unsubscribe()},d.prototype.connect=function(){var f=this,m=this._connection;if(!m){m=this._connection=new r.Subscription;var p=this.getSubject();m.add(this.source.subscribe(a.createOperatorSubscriber(p,void 0,function(){f._teardown(),p.complete()},function(O){f._teardown(),p.error(O)},function(){return f._teardown()}))),m.closed&&(this._connection=null,m=r.Subscription.EMPTY)}return m},d.prototype.refCount=function(){return i.refCount()(this)},d})(n.Observable);e.ConnectableObservable=l}}),j0=F({"../../node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.multicast=void 0;var t=k0(),n=Yt(),r=w0();function i(a,s){var l=n.isFunction(a)?a:function(){return a};return n.isFunction(s)?r.connect(s,{connector:l}):function(c){return new t.ConnectableObservable(c,l)}}e.multicast=i}}),Jq=F({"../../node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=void 0;var t=tr(),n=ec(),r=Me(),i=gr(),a=ht();function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=n.argsOrArgArray(l);return new t.Observable(function(f){var m=0,p=function(){if(m<d.length){var O=void 0;try{O=a.innerFrom(d[m++])}catch{p();return}var b=new r.OperatorSubscriber(f,void 0,i.noop,i.noop);O.subscribe(b),b.add(p)}else f.complete()};p()})}e.onErrorResumeNext=s}}),eI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=e.onErrorResumeNextWith=void 0;var r=ec(),i=Jq();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=r.argsOrArgArray(s);return function(d){return i.onErrorResumeNext.apply(void 0,n([d],t(c)))}}e.onErrorResumeNextWith=a,e.onErrorResumeNext=a}}),tI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pairwise=void 0;var t=ye(),n=Me();function r(){return t.operate(function(i,a){var s,l=!1;i.subscribe(n.createOperatorSubscriber(a,function(c){var d=s;s=c,l&&a.next([d,c]),l=!0}))})}e.pairwise=r}}),nI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pluck=void 0;var t=Qo();function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=r.length;if(a===0)throw new Error("list of properties cannot be empty.");return t.map(function(s){for(var l=s,c=0;c<a;c++){var d=l==null?void 0:l[r[c]];if(typeof d<"u")l=d;else return}return l})}e.pluck=n}}),rI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publish.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publish=void 0;var t=Or(),n=j0(),r=w0();function i(a){return a?function(s){return r.connect(a)(s)}:function(s){return n.multicast(new t.Subject)(s)}}e.publish=i}}),iI=F({"../../node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.BehaviorSubject=void 0;var n=Or(),r=(function(i){t(a,i);function a(s){var l=i.call(this)||this;return l._value=s,l}return Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),a.prototype._subscribe=function(s){var l=i.prototype._subscribe.call(this,s);return!l.closed&&s.next(this._value),l},a.prototype.getValue=function(){var s=this,l=s.hasError,c=s.thrownError,d=s._value;if(l)throw c;return this._throwIfClosed(),d},a.prototype.next=function(s){i.prototype.next.call(this,this._value=s)},a})(n.Subject);e.BehaviorSubject=r}}),aI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishBehavior=void 0;var t=iI(),n=k0();function r(i){return function(a){var s=new t.BehaviorSubject(i);return new n.ConnectableObservable(a,function(){return s})}}e.publishBehavior=r}}),sI=F({"../../node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncSubject=void 0;var n=Or(),r=(function(i){t(a,i);function a(){var s=i!==null&&i.apply(this,arguments)||this;return s._value=null,s._hasValue=!1,s._isComplete=!1,s}return a.prototype._checkFinalizedStatuses=function(s){var l=this,c=l.hasError,d=l._hasValue,f=l._value,m=l.thrownError,p=l.isStopped,O=l._isComplete;c?s.error(m):(p||O)&&(d&&s.next(f),s.complete())},a.prototype.next=function(s){this.isStopped||(this._value=s,this._hasValue=!0)},a.prototype.complete=function(){var s=this,l=s._hasValue,c=s._value,d=s._isComplete;d||(this._isComplete=!0,l&&i.prototype.next.call(this,c),i.prototype.complete.call(this))},a})(n.Subject);e.AsyncSubject=r}}),oI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishLast=void 0;var t=sI(),n=k0();function r(){return function(i){var a=new t.AsyncSubject;return new n.ConnectableObservable(i,function(){return a})}}e.publishLast=r}}),RQ=F({"../../node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(e){var t=e&&e.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function c(){this.constructor=s}s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaySubject=void 0;var n=Or(),r=p0(),i=(function(a){t(s,a);function s(l,c,d){l===void 0&&(l=1/0),c===void 0&&(c=1/0),d===void 0&&(d=r.dateTimestampProvider);var f=a.call(this)||this;return f._bufferSize=l,f._windowTime=c,f._timestampProvider=d,f._buffer=[],f._infiniteTimeWindow=!0,f._infiniteTimeWindow=c===1/0,f._bufferSize=Math.max(1,l),f._windowTime=Math.max(1,c),f}return s.prototype.next=function(l){var c=this,d=c.isStopped,f=c._buffer,m=c._infiniteTimeWindow,p=c._timestampProvider,O=c._windowTime;d||(f.push(l),!m&&f.push(p.now()+O)),this._trimBuffer(),a.prototype.next.call(this,l)},s.prototype._subscribe=function(l){this._throwIfClosed(),this._trimBuffer();for(var c=this._innerSubscribe(l),d=this,f=d._infiniteTimeWindow,m=d._buffer,p=m.slice(),O=0;O<p.length&&!l.closed;O+=f?1:2)l.next(p[O]);return this._checkFinalizedStatuses(l),c},s.prototype._trimBuffer=function(){var l=this,c=l._bufferSize,d=l._timestampProvider,f=l._buffer,m=l._infiniteTimeWindow,p=(m?1:2)*c;if(c<1/0&&p<f.length&&f.splice(0,f.length-p),!m){for(var O=d.now(),b=0,x=1;x<f.length&&f[x]<=O;x+=2)b=x;b&&f.splice(0,b+1)}},s})(n.Subject);e.ReplaySubject=i}}),lI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishReplay=void 0;var t=RQ(),n=j0(),r=Yt();function i(a,s,l,c){l&&!r.isFunction(l)&&(c=l);var d=r.isFunction(l)?l:void 0;return function(f){return n.multicast(new t.ReplaySubject(a,s,c),d)(f)}}e.publishReplay=i}}),cI=F({"../../node_modules/rxjs/dist/cjs/internal/observable/race.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.raceInit=e.race=void 0;var t=tr(),n=ht(),r=ec(),i=Me();function a(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return l=r.argsOrArgArray(l),l.length===1?n.innerFrom(l[0]):new t.Observable(s(l))}e.race=a;function s(l){return function(c){for(var d=[],f=function(p){d.push(n.innerFrom(l[p]).subscribe(i.createOperatorSubscriber(c,function(O){if(d){for(var b=0;b<d.length;b++)b!==p&&d[b].unsubscribe();d=null}c.next(O)})))},m=0;d&&!c.closed&&m<l.length;m++)f(m)}}e.raceInit=s}}),MQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(e){var t=e&&e.__read||function(l,c){var d=typeof Symbol=="function"&&l[Symbol.iterator];if(!d)return l;var f=d.call(l),m,p=[],O;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){O={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(O)throw O.error}}return p},n=e&&e.__spreadArray||function(l,c){for(var d=0,f=c.length,m=l.length;d<f;d++,m++)l[m]=c[d];return l};Object.defineProperty(e,"__esModule",{value:!0}),e.raceWith=void 0;var r=cI(),i=ye(),a=vr();function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return l.length?i.operate(function(d,f){r.raceInit(n([d],t(l)))(f)}):a.identity}e.raceWith=s}}),uI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeat=void 0;var t=bd(),n=ye(),r=Me(),i=ht(),a=Jl();function s(l){var c,d=1/0,f;return l!=null&&(typeof l=="object"?(c=l.count,d=c===void 0?1/0:c,f=l.delay):d=l),d<=0?function(){return t.EMPTY}:n.operate(function(m,p){var O=0,b,x=function(){if(b==null||b.unsubscribe(),b=null,f!=null){var k=typeof f=="number"?a.timer(f):i.innerFrom(f(O)),T=r.createOperatorSubscriber(p,function(){T.unsubscribe(),w()});k.subscribe(T)}else w()},w=function(){var k=!1;b=m.subscribe(r.createOperatorSubscriber(p,void 0,function(){++O<d?b?x():k=!0:p.complete()})),k&&x()};w()})}e.repeat=s}}),dI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeatWhen=void 0;var t=ht(),n=Or(),r=ye(),i=Me();function a(s){return r.operate(function(l,c){var d,f=!1,m,p=!1,O=!1,b=function(){return O&&p&&(c.complete(),!0)},x=function(){return m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){d?w():f=!0},function(){p=!0,b()}))),m},w=function(){O=!1,d=l.subscribe(i.createOperatorSubscriber(c,void 0,function(){O=!0,!b()&&x().next()})),f&&(d.unsubscribe(),d=null,f=!1,w())};w()})}e.repeatWhen=a}}),fI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/retry.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retry=void 0;var t=ye(),n=Me(),r=vr(),i=Jl(),a=ht();function s(l){l===void 0&&(l=1/0);var c;l&&typeof l=="object"?c=l:c={count:l};var d=c.count,f=d===void 0?1/0:d,m=c.delay,p=c.resetOnSuccess,O=p===void 0?!1:p;return f<=0?r.identity:t.operate(function(b,x){var w=0,k,T=function(){var j=!1;k=b.subscribe(n.createOperatorSubscriber(x,function(E){O&&(w=0),x.next(E)},void 0,function(E){if(w++<f){var Q=function(){k?(k.unsubscribe(),k=null,T()):j=!0};if(m!=null){var A=typeof m=="number"?i.timer(m):a.innerFrom(m(E,w)),M=n.createOperatorSubscriber(x,function(){M.unsubscribe(),Q()},function(){x.complete()});A.subscribe(M)}else Q()}else x.error(E)})),j&&(k.unsubscribe(),k=null,T())};T()})}e.retry=s}}),hI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retryWhen=void 0;var t=ht(),n=Or(),r=ye(),i=Me();function a(s){return r.operate(function(l,c){var d,f=!1,m,p=function(){d=l.subscribe(i.createOperatorSubscriber(c,void 0,void 0,function(O){m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){return d?p():f=!0}))),m&&m.next(O)})),f&&(d.unsubscribe(),d=null,f=!1,p())};p()})}e.retryWhen=a}}),LQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/sample.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sample=void 0;var t=ht(),n=ye(),r=gr(),i=Me();function a(s){return n.operate(function(l,c){var d=!1,f=null;l.subscribe(i.createOperatorSubscriber(c,function(m){d=!0,f=m})),t.innerFrom(s).subscribe(i.createOperatorSubscriber(c,function(){if(d){d=!1;var m=f;f=null,c.next(m)}},r.noop))})}e.sample=a}}),mI=F({"../../node_modules/rxjs/dist/cjs/internal/observable/interval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.interval=void 0;var t=ci(),n=Jl();function r(i,a){return i===void 0&&(i=0),a===void 0&&(a=t.asyncScheduler),i<0&&(i=0),n.timer(i,i,a)}e.interval=r}}),pI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sampleTime=void 0;var t=ci(),n=LQ(),r=mI();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.sample(r.interval(a,s))}e.sampleTime=i}}),gI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/scan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scan=void 0;var t=ye(),n=pQ();function r(i,a){return t.operate(n.scanInternals(i,a,arguments.length>=2,!0))}e.scan=r}}),vI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequenceEqual=void 0;var t=ye(),n=Me(),r=ht();function i(s,l){return l===void 0&&(l=function(c,d){return c===d}),t.operate(function(c,d){var f=a(),m=a(),p=function(b){d.next(b),d.complete()},O=function(b,x){var w=n.createOperatorSubscriber(d,function(k){var T=x.buffer,j=x.complete;T.length===0?j?p(!1):b.buffer.push(k):!l(k,T.shift())&&p(!1)},function(){b.complete=!0;var k=x.complete,T=x.buffer;k&&p(T.length===0),w==null||w.unsubscribe()});return w};c.subscribe(O(f,m)),r.innerFrom(s).subscribe(O(m,f))})}e.sequenceEqual=i;function a(){return{buffer:[],complete:!1}}}}),DQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/share.js"(e){var t=e&&e.__read||function(d,f){var m=typeof Symbol=="function"&&d[Symbol.iterator];if(!m)return d;var p=m.call(d),O,b=[],x;try{for(;(f===void 0||f-- >0)&&!(O=p.next()).done;)b.push(O.value)}catch(w){x={error:w}}finally{try{O&&!O.done&&(m=p.return)&&m.call(p)}finally{if(x)throw x.error}}return b},n=e&&e.__spreadArray||function(d,f){for(var m=0,p=f.length,O=d.length;m<p;m++,O++)d[O]=f[m];return d};Object.defineProperty(e,"__esModule",{value:!0}),e.share=void 0;var r=ht(),i=Or(),a=d0(),s=ye();function l(d){d===void 0&&(d={});var f=d.connector,m=f===void 0?function(){return new i.Subject}:f,p=d.resetOnError,O=p===void 0?!0:p,b=d.resetOnComplete,x=b===void 0?!0:b,w=d.resetOnRefCountZero,k=w===void 0?!0:w;return function(T){var j,E,Q,A=0,M=!1,L=!1,D=function(){E==null||E.unsubscribe(),E=void 0},P=function(){D(),j=Q=void 0,M=L=!1},B=function(){var X=j;P(),X==null||X.unsubscribe()};return s.operate(function(X,V){A++,!L&&!M&&D();var z=Q=Q??m();V.add(function(){A--,A===0&&!L&&!M&&(E=c(B,k))}),z.subscribe(V),!j&&A>0&&(j=new a.SafeSubscriber({next:function(Y){return z.next(Y)},error:function(Y){L=!0,D(),E=c(P,O,Y),z.error(Y)},complete:function(){M=!0,D(),E=c(P,x),z.complete()}}),r.innerFrom(X).subscribe(j))})(T)}}e.share=l;function c(d,f){for(var m=[],p=2;p<arguments.length;p++)m[p-2]=arguments[p];if(f===!0){d();return}if(f!==!1){var O=new a.SafeSubscriber({next:function(){O.unsubscribe(),d()}});return r.innerFrom(f.apply(void 0,n([],t(m)))).subscribe(O)}}}}),OI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shareReplay=void 0;var t=RQ(),n=DQ();function r(i,a,s){var l,c,d,f,m=!1;return i&&typeof i=="object"?(l=i.bufferSize,f=l===void 0?1/0:l,c=i.windowTime,a=c===void 0?1/0:c,d=i.refCount,m=d===void 0?!1:d,s=i.scheduler):f=i??1/0,n.share({connector:function(){return new t.ReplaySubject(f,a,s)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:m})}e.shareReplay=r}}),bI=F({"../../node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SequenceError=void 0;var t=Eo();e.SequenceError=t.createErrorClass(function(n){return function(i){n(this),this.name="SequenceError",this.message=i}})}}),yI=F({"../../node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotFoundError=void 0;var t=Eo();e.NotFoundError=t.createErrorClass(function(n){return function(i){n(this),this.name="NotFoundError",this.message=i}})}}),xI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/single.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.single=void 0;var t=Im(),n=bI(),r=yI(),i=ye(),a=Me();function s(l){return i.operate(function(c,d){var f=!1,m,p=!1,O=0;c.subscribe(a.createOperatorSubscriber(d,function(b){p=!0,(!l||l(b,O++,c))&&(f&&d.error(new n.SequenceError("Too many matching values")),f=!0,m=b)},function(){f?(d.next(m),d.complete()):d.error(p?new r.NotFoundError("No matching values"):new t.EmptyError)}))})}e.single=s}}),SI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skip.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skip=void 0;var t=tc();function n(r){return t.filter(function(i,a){return r<=a})}e.skip=n}}),wI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipLast=void 0;var t=vr(),n=ye(),r=Me();function i(a){return a<=0?t.identity:n.operate(function(s,l){var c=new Array(a),d=0;return s.subscribe(r.createOperatorSubscriber(l,function(f){var m=d++;if(m<a)c[m]=f;else{var p=m%a,O=c[p];c[p]=f,l.next(O)}})),function(){c=null}})}e.skipLast=i}}),_I=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipUntil=void 0;var t=ye(),n=Me(),r=ht(),i=gr();function a(s){return t.operate(function(l,c){var d=!1,f=n.createOperatorSubscriber(c,function(){f==null||f.unsubscribe(),d=!0},i.noop);r.innerFrom(s).subscribe(f),l.subscribe(n.createOperatorSubscriber(c,function(m){return d&&c.next(m)}))})}e.skipUntil=a}}),kI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipWhile=void 0;var t=ye(),n=Me();function r(i){return t.operate(function(a,s){var l=!1,c=0;a.subscribe(n.createOperatorSubscriber(s,function(d){return(l||(l=!i(d,c++)))&&s.next(d)}))})}e.skipWhile=r}}),jI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.startWith=void 0;var t=_0(),n=Ci(),r=ye();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=n.popScheduler(a);return r.operate(function(c,d){(l?t.concat(a,c,l):t.concat(a,c)).subscribe(d)})}e.startWith=i}}),Zm=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMap=void 0;var t=ht(),n=ye(),r=Me();function i(a,s){return n.operate(function(l,c){var d=null,f=0,m=!1,p=function(){return m&&!d&&c.complete()};l.subscribe(r.createOperatorSubscriber(c,function(O){d==null||d.unsubscribe();var b=0,x=f++;t.innerFrom(a(O,x)).subscribe(d=r.createOperatorSubscriber(c,function(w){return c.next(s?s(O,w,x,b++):w)},function(){d=null,p()}))},function(){m=!0,p()}))})}e.switchMap=i}}),TI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchAll=void 0;var t=Zm(),n=vr();function r(){return t.switchMap(n.identity)}e.switchAll=r}}),CI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMapTo=void 0;var t=Zm(),n=Yt();function r(i,a){return n.isFunction(a)?t.switchMap(function(){return i},a):t.switchMap(function(){return i})}e.switchMapTo=r}}),EI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchScan=void 0;var t=Zm(),n=ye();function r(i,a){return n.operate(function(s,l){var c=a;return t.switchMap(function(d,f){return i(c,d,f)},function(d,f){return c=f,f})(s).subscribe(l),function(){c=null}})}e.switchScan=r}}),QI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeUntil=void 0;var t=ye(),n=Me(),r=ht(),i=gr();function a(s){return t.operate(function(l,c){r.innerFrom(s).subscribe(n.createOperatorSubscriber(c,function(){return c.complete()},i.noop)),!c.closed&&l.subscribe(c)})}e.takeUntil=a}}),AI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeWhile=void 0;var t=ye(),n=Me();function r(i,a){return a===void 0&&(a=!1),t.operate(function(s,l){var c=0;s.subscribe(n.createOperatorSubscriber(l,function(d){var f=i(d,c++);(f||a)&&l.next(d),!f&&l.complete()}))})}e.takeWhile=r}}),PI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/tap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tap=void 0;var t=Yt(),n=ye(),r=Me(),i=vr();function a(s,l,c){var d=t.isFunction(s)||l||c?{next:s,error:l,complete:c}:s;return d?n.operate(function(f,m){var p;(p=d.subscribe)===null||p===void 0||p.call(d);var O=!0;f.subscribe(r.createOperatorSubscriber(m,function(b){var x;(x=d.next)===null||x===void 0||x.call(d,b),m.next(b)},function(){var b;O=!1,(b=d.complete)===null||b===void 0||b.call(d),m.complete()},function(b){var x;O=!1,(x=d.error)===null||x===void 0||x.call(d,b),m.error(b)},function(){var b,x;O&&((b=d.unsubscribe)===null||b===void 0||b.call(d)),(x=d.finalize)===null||x===void 0||x.call(d)}))}):i.identity}e.tap=a}}),zQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=void 0;var t=ye(),n=Me(),r=ht();function i(a,s){return t.operate(function(l,c){var d=s??{},f=d.leading,m=f===void 0?!0:f,p=d.trailing,O=p===void 0?!1:p,b=!1,x=null,w=null,k=!1,T=function(){w==null||w.unsubscribe(),w=null,O&&(Q(),k&&c.complete())},j=function(){w=null,k&&c.complete()},E=function(A){return w=r.innerFrom(a(A)).subscribe(n.createOperatorSubscriber(c,T,j))},Q=function(){if(b){b=!1;var A=x;x=null,c.next(A),!k&&E(A)}};l.subscribe(n.createOperatorSubscriber(c,function(A){b=!0,x=A,!(w&&!w.closed)&&(m?Q():E(A))},function(){k=!0,!(O&&b&&w&&!w.closed)&&c.complete()}))})}e.throttle=i}}),NI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var t=ci(),n=zQ(),r=Jl();function i(a,s,l){s===void 0&&(s=t.asyncScheduler);var c=r.timer(a,s);return n.throttle(function(){return c},l)}e.throttleTime=i}}),RI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimeInterval=e.timeInterval=void 0;var t=ci(),n=ye(),r=Me();function i(s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(l,c){var d=s.now();l.subscribe(r.createOperatorSubscriber(c,function(f){var m=s.now(),p=m-d;d=m,c.next(new a(f,p))}))})}e.timeInterval=i;var a=(function(){function s(l,c){this.value=l,this.interval=c}return s})();e.TimeInterval=a}}),$Q=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var t=ci(),n=g0(),r=ye(),i=ht(),a=Eo(),s=Me(),l=zs();e.TimeoutError=a.createErrorClass(function(f){return function(p){p===void 0&&(p=null),f(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=p}});function c(f,m){var p=n.isValidDate(f)?{first:f}:typeof f=="number"?{each:f}:f,O=p.first,b=p.each,x=p.with,w=x===void 0?d:x,k=p.scheduler,T=k===void 0?m??t.asyncScheduler:k,j=p.meta,E=j===void 0?null:j;if(O==null&&b==null)throw new TypeError("No timeout provided.");return r.operate(function(Q,A){var M,L,D=null,P=0,B=function(X){L=l.executeSchedule(A,T,function(){try{M.unsubscribe(),i.innerFrom(w({meta:E,lastValue:D,seen:P})).subscribe(A)}catch(V){A.error(V)}},X)};M=Q.subscribe(s.createOperatorSubscriber(A,function(X){L==null||L.unsubscribe(),P++,A.next(D=X),b>0&&B(b)},void 0,void 0,function(){L!=null&&L.closed||L==null||L.unsubscribe(),D=null})),!P&&B(O!=null?typeof O=="number"?O:+O-T.now():b)})}e.timeout=c;function d(f){throw new e.TimeoutError(f)}}}),MI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutWith=void 0;var t=ci(),n=g0(),r=$Q();function i(a,s,l){var c,d,f;if(l=l??t.async,n.isValidDate(a)?c=a:typeof a=="number"&&(d=a),s)f=function(){return s};else throw new TypeError("No observable provided to switch to");if(c==null&&d==null)throw new TypeError("No timeout provided.");return r.timeout({first:c,each:d,scheduler:l,with:f})}e.timeoutWith=i}}),LI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timestamp=void 0;var t=p0(),n=Qo();function r(i){return i===void 0&&(i=t.dateTimestampProvider),n.map(function(a){return{value:a,timestamp:i.now()}})}e.timestamp=r}}),DI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/window.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.window=void 0;var t=Or(),n=ye(),r=Me(),i=gr(),a=ht();function s(l){return n.operate(function(c,d){var f=new t.Subject;d.next(f.asObservable());var m=function(p){f.error(p),d.error(p)};return c.subscribe(r.createOperatorSubscriber(d,function(p){return f==null?void 0:f.next(p)},function(){f.complete(),d.complete()},m)),a.innerFrom(l).subscribe(r.createOperatorSubscriber(d,function(){f.complete(),d.next(f=new t.Subject)},i.noop,m)),function(){f==null||f.unsubscribe(),f=null}})}e.window=s}}),zI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(e){var t=e&&e.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowCount=void 0;var n=Or(),r=ye(),i=Me();function a(s,l){l===void 0&&(l=0);var c=l>0?l:s;return r.operate(function(d,f){var m=[new n.Subject],p=0;f.next(m[0].asObservable()),d.subscribe(i.createOperatorSubscriber(f,function(O){var b,x;try{for(var w=t(m),k=w.next();!k.done;k=w.next()){var T=k.value;T.next(O)}}catch(Q){b={error:Q}}finally{try{k&&!k.done&&(x=w.return)&&x.call(w)}finally{if(b)throw b.error}}var j=p-s+1;if(j>=0&&j%c===0&&m.shift().complete(),++p%c===0){var E=new n.Subject;m.push(E),f.next(E.asObservable())}},function(){for(;m.length>0;)m.shift().complete();f.complete()},function(O){for(;m.length>0;)m.shift().error(O);f.error(O)},function(){m=null}))})}e.windowCount=a}}),$I=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowTime=void 0;var t=Or(),n=ci(),r=Ra(),i=ye(),a=Me(),s=Ds(),l=Ci(),c=zs();function d(f){for(var m,p,O=[],b=1;b<arguments.length;b++)O[b-1]=arguments[b];var x=(m=l.popScheduler(O))!==null&&m!==void 0?m:n.asyncScheduler,w=(p=O[0])!==null&&p!==void 0?p:null,k=O[1]||1/0;return i.operate(function(T,j){var E=[],Q=!1,A=function(P){var B=P.window,X=P.subs;B.complete(),X.unsubscribe(),s.arrRemove(E,P),Q&&M()},M=function(){if(E){var P=new r.Subscription;j.add(P);var B=new t.Subject,X={window:B,subs:P,seen:0};E.push(X),j.next(B.asObservable()),c.executeSchedule(P,x,function(){return A(X)},f)}};w!==null&&w>=0?c.executeSchedule(j,x,M,w,!0):Q=!0,M();var L=function(P){return E.slice().forEach(P)},D=function(P){L(function(B){var X=B.window;return P(X)}),P(j),j.unsubscribe()};return T.subscribe(a.createOperatorSubscriber(j,function(P){L(function(B){B.window.next(P),k<=++B.seen&&A(B)})},function(){return D(function(P){return P.complete()})},function(P){return D(function(B){return B.error(P)})})),function(){E=null}})}e.windowTime=d}}),qI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],O=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&O>=f.length&&(f=void 0),{value:f&&f[O++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowToggle=void 0;var n=Or(),r=Ra(),i=ye(),a=ht(),s=Me(),l=gr(),c=Ds();function d(f,m){return i.operate(function(p,O){var b=[],x=function(w){for(;0<b.length;)b.shift().error(w);O.error(w)};a.innerFrom(f).subscribe(s.createOperatorSubscriber(O,function(w){var k=new n.Subject;b.push(k);var T=new r.Subscription,j=function(){c.arrRemove(b,k),k.complete(),T.unsubscribe()},E;try{E=a.innerFrom(m(w))}catch(Q){x(Q);return}O.next(k.asObservable()),T.add(E.subscribe(s.createOperatorSubscriber(O,j,l.noop,x)))},l.noop)),p.subscribe(s.createOperatorSubscriber(O,function(w){var k,T,j=b.slice();try{for(var E=t(j),Q=E.next();!Q.done;Q=E.next()){var A=Q.value;A.next(w)}}catch(M){k={error:M}}finally{try{Q&&!Q.done&&(T=E.return)&&T.call(E)}finally{if(k)throw k.error}}},function(){for(;0<b.length;)b.shift().complete();O.complete()},x,function(){for(;0<b.length;)b.shift().unsubscribe()}))})}e.windowToggle=d}}),II=F({"../../node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowWhen=void 0;var t=Or(),n=ye(),r=Me(),i=ht();function a(s){return n.operate(function(l,c){var d,f,m=function(O){d.error(O),c.error(O)},p=function(){f==null||f.unsubscribe(),d==null||d.complete(),d=new t.Subject,c.next(d.asObservable());var O;try{O=i.innerFrom(s())}catch(b){m(b);return}O.subscribe(f=r.createOperatorSubscriber(c,p,p,m))};p(),l.subscribe(r.createOperatorSubscriber(c,function(O){return d.next(O)},function(){d.complete(),c.complete()},m,function(){f==null||f.unsubscribe(),d=null}))})}e.windowWhen=a}}),XI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.withLatestFrom=void 0;var r=ye(),i=Me(),a=ht(),s=vr(),l=gr(),c=Ci();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return r.operate(function(O,b){for(var x=f.length,w=new Array(x),k=f.map(function(){return!1}),T=!1,j=function(Q){a.innerFrom(f[Q]).subscribe(i.createOperatorSubscriber(b,function(A){w[Q]=A,!T&&!k[Q]&&(k[Q]=!0,(T=k.every(s.identity))&&(k=null))},l.noop))},E=0;E<x;E++)j(E);O.subscribe(i.createOperatorSubscriber(b,function(Q){if(T){var A=n([Q],t(w));b.next(p?p.apply(void 0,n([],t(A))):A)}}))})}e.withLatestFrom=d}}),qQ=F({"../../node_modules/rxjs/dist/cjs/internal/observable/zip.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var O=p.call(f),b,x=[],w;try{for(;(m===void 0||m-- >0)&&!(b=O.next()).done;)x.push(b.value)}catch(k){w={error:k}}finally{try{b&&!b.done&&(p=O.return)&&p.call(O)}finally{if(w)throw w.error}}return x},n=e&&e.__spreadArray||function(f,m){for(var p=0,O=m.length,b=f.length;p<O;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=tr(),i=ht(),a=ec(),s=bd(),l=Me(),c=Ci();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f),O=a.argsOrArgArray(f);return O.length?new r.Observable(function(b){var x=O.map(function(){return[]}),w=O.map(function(){return!1});b.add(function(){x=w=null});for(var k=function(j){i.innerFrom(O[j]).subscribe(l.createOperatorSubscriber(b,function(E){if(x[j].push(E),x.every(function(A){return A.length})){var Q=x.map(function(A){return A.shift()});b.next(p?p.apply(void 0,n([],t(Q))):Q),x.some(function(A,M){return!A.length&&w[M]})&&b.complete()}},function(){w[j]=!0,!x[j].length&&b.complete()}))},T=0;!b.closed&&T<O.length;T++)k(T);return function(){x=w=null}}):s.EMPTY}e.zip=d}}),ZI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.zipAll=void 0;var t=qQ(),n=vQ();function r(i){return n.joinAllInternals(t.zip,i)}e.zipAll=r}}),IQ=F({"../../node_modules/rxjs/dist/cjs/internal/operators/zip.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=qQ(),i=ye();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return i.operate(function(c,d){r.zip.apply(void 0,n([c],t(s))).subscribe(d)})}e.zip=a}}),BI=F({"../../node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(e){var t=e&&e.__read||function(a,s){var l=typeof Symbol=="function"&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var l=0,c=s.length,d=a.length;l<c;l++,d++)a[d]=s[l];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.zipWith=void 0;var r=IQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.zip.apply(void 0,n([],t(a)))}e.zipWith=i}}),VI=F({"../../node_modules/rxjs/dist/cjs/internal/util/not.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.not=void 0;function t(n,r){return function(i,a){return!n.call(r,i,a)}}e.not=t}}),UI=class{constructor(){if(typeof window>"u")throw new Error('WebBrowserStorage is client-only. It must not be constructed on the server — a single process-wide instance would leak tokens between HTTP requests. Wrap any code path that constructs this in "use client".')}get(e){return localStorage.getItem(e)}set(e,t){localStorage.setItem(e,t)}delete(e){localStorage.removeItem(e)}subscribe(e){const t=n=>{n.key!==null&&e(n.key,n.newValue)};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}},XQ=_.createContext(null);function dre({browser:e,children:t}){const n=_.useMemo(()=>e??T$({storage:new UI}),[e]);return g.jsx(XQ.Provider,{value:n,children:t})}function st(){const e=_.useContext(XQ);if(!e)throw new Error("useSemiont must be used within a <SemiontProvider>");return e}var YI={success:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),error:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),warning:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),info:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})};function WI({toast:e,onClose:t}){return _.useEffect(()=>{const n=setTimeout(()=>{t(e.id)},e.duration||3e3);return()=>clearTimeout(n)},[e,t]),g.jsxs("div",{className:"semiont-toast","data-variant":e.type,role:"alert",children:[g.jsx("div",{className:"semiont-toast-icon-wrapper",children:YI[e.type]}),g.jsx("p",{className:"semiont-toast-message",children:e.message}),g.jsx("button",{onClick:()=>t(e.id),className:"semiont-toast-close","aria-label":"Close",children:g.jsx("svg",{className:"semiont-toast-close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function FI({toasts:e,onClose:t}){const[n,r]=_.useState(!1);return _.useEffect(()=>(r(!0),()=>r(!1)),[]),n?go.createPortal(g.jsx("div",{className:"semiont-toast-container",children:e.map(i=>g.jsx(WI,{toast:i,onClose:t},i.id))}),document.body):null}var ZQ=ue.createContext(void 0);function fre({children:e}){const[t,n]=_.useState([]),r=ue.useCallback((f,m="info",p)=>{const O=Date.now().toString(),b=p!==void 0?{id:O,message:f,type:m,duration:p}:{id:O,message:f,type:m};n(x=>[...x,b])},[]),i=ue.useCallback((f,m)=>r(f,"success",m),[r]),a=ue.useCallback((f,m)=>r(f,"error",m),[r]),s=ue.useCallback((f,m)=>r(f,"warning",m),[r]),l=ue.useCallback((f,m)=>r(f,"info",m),[r]),c=ue.useCallback(f=>{n(m=>m.filter(p=>p.id!==f))},[]),d=ue.useMemo(()=>({showToast:r,showSuccess:i,showError:a,showWarning:s,showInfo:l}),[r,i,a,s,l]);return g.jsxs(ZQ.Provider,{value:d,children:[e,g.jsx(FI,{toasts:t,onClose:c})]})}function BQ(){const e=ue.useContext(ZQ);if(e===void 0)throw new Error("useToast must be used within a ToastProvider");return e}var HI=A3({"../../translations/ar.json":()=>Pe(()=>import("./ar-3W37O3R3-BJ1fDUvB.js"),[]),"../../translations/bn.json":()=>Pe(()=>import("./bn-JZTJLMVE-k1gI6ffq.js"),[]),"../../translations/cs.json":()=>Pe(()=>import("./cs-XYHH7HNE-BqQWIWM9.js"),[]),"../../translations/da.json":()=>Pe(()=>import("./da-MZKIECVT-pufSb0d_.js"),[]),"../../translations/de.json":()=>Pe(()=>import("./de-AYXTMRQW-BRMduIa0.js"),[]),"../../translations/el.json":()=>Pe(()=>import("./el-A6CVQWAW-DycBhXUi.js"),[]),"../../translations/en.json":()=>Pe(()=>Promise.resolve().then(()=>Yne),void 0),"../../translations/es.json":()=>Pe(()=>import("./es-M2HXLJGT-BFQ6WIpw.js"),[]),"../../translations/fa.json":()=>Pe(()=>import("./fa-V6JZJDYP-C8CwCeSd.js"),[]),"../../translations/fi.json":()=>Pe(()=>import("./fi-ONDTZ5H7-aby5--Ip.js"),[]),"../../translations/fr.json":()=>Pe(()=>import("./fr-PAPV4H4G-D9SFT8MA.js"),[]),"../../translations/he.json":()=>Pe(()=>import("./he-F6VTLJLW-B8Rc1C-m.js"),[]),"../../translations/hi.json":()=>Pe(()=>import("./hi-CFUAV4BF-CuWy2y7I.js"),[]),"../../translations/id.json":()=>Pe(()=>import("./id-NBKLCCI7-DnMwKKq7.js"),[]),"../../translations/it.json":()=>Pe(()=>import("./it-SLSOWVVU-hrlm8f9F.js"),[]),"../../translations/ja.json":()=>Pe(()=>import("./ja-L5IG4ECE-BvMVB5sy.js"),[]),"../../translations/ko.json":()=>Pe(()=>import("./ko-QYMTULKK-CNEZe0oy.js"),[]),"../../translations/ms.json":()=>Pe(()=>import("./ms-5DGSFKM2-BlyezW6W.js"),[]),"../../translations/nl.json":()=>Pe(()=>import("./nl-VZPCGONO-BJ0llUPS.js"),[]),"../../translations/no.json":()=>Pe(()=>import("./no-MF6F352I-Wf2ZNjHx.js"),[]),"../../translations/pl.json":()=>Pe(()=>import("./pl-WIK72JUO-wOGg7Me5.js"),[]),"../../translations/pt.json":()=>Pe(()=>import("./pt-RRP5ZF6A-C32Vedhv.js"),[]),"../../translations/ro.json":()=>Pe(()=>import("./ro-XHQLC3T7-uGs3uHRp.js"),[]),"../../translations/sv.json":()=>Pe(()=>import("./sv-EWULDN6E-CkRBfwt9.js"),[]),"../../translations/th.json":()=>Pe(()=>import("./th-TGOBHFG4-BGt_aO5K.js"),[]),"../../translations/tr.json":()=>Pe(()=>import("./tr-LMMPBMV7-CrGE1PKA.js"),[]),"../../translations/uk.json":()=>Pe(()=>import("./uk-IPGRRJY6-CPaxgpd8.js"),[]),"../../translations/vi.json":()=>Pe(()=>import("./vi-Q676OJQS-DpyIm6R1.js"),[]),"../../translations/zh.json":()=>Pe(()=>import("./zh-F3MTWQDX-C09t_PFf.js"),[])}),Lh=_.createContext(null),th=new Map;function T0(e,t){const n=e.match(/\{(\w+),\s*plural,\s*/);if(!n)return e;const r=n[1],i=t[r];if(i===void 0)return e;let a=n[0].length,s=1,l=a;for(let b=a;b<e.length;b++)if(e[b]==="{")s++;else if(e[b]==="}"&&(s--,s===0)){l=b;break}const c=e.substring(a,l),d={},f=/(?:=(\d+)|(\w+))\s*\{([^}]+)\}/g;let m;for(;(m=f.exec(c))!==null;){const[,b,x,w]=m,k=b!==void 0?`=${b}`:x;d[k]=w}const p=d[`=${i}`];if(p!==void 0){const b=p.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(l+1)}const O=d.other;if(O!==void 0){const b=O.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(l+1)}return e}async function GI(e){if(th.has(e))return th.get(e);if(e==="en")return th.set("en",yo),yo;try{const t=await HI(`../../translations/${e}.json`),n=t.default||t;return th.set(e,n),n}catch(t){return console.error(`Failed to load translations for locale: ${e}`,t),yo}}var KI={t:(e,t,n)=>{var a;const i=(a=yo[e])==null?void 0:a[t];if(!i)return console.warn(`Translation not found for ${e}.${t}`),`${e}.${t}`;if(n&&typeof i=="string"){let s=i;return s=T0(s,n),Object.entries(n).forEach(([l,c])=>{s=s.replace(new RegExp(`\\{\\{${l}\\}\\}`,"g"),String(c))}),s}return i}};function hre({translationManager:e,locale:t,loadingComponent:n=null,children:r}){const[i,a]=_.useState(null),[s,l]=_.useState(!1);_.useEffect(()=>{t&&!e&&(l(!0),GI(t).then(d=>{a(d),l(!1)}).catch(d=>{console.error("Failed to load translations:",d),a(yo),l(!1)}))},[t,e]);const c=_.useMemo(()=>i?{t:(d,f,m)=>{var O;const p=(O=i[d])==null?void 0:O[f];if(!p)return console.warn(`Translation not found for ${d}.${f} in locale ${t}`),`${d}.${f}`;if(m&&typeof p=="string"){let b=p;return b=T0(b,m),Object.entries(m).forEach(([x,w])=>{b=b.replace(new RegExp(`\\{\\{${x}\\}\\}`,"g"),String(w))}),b}return p}}:null,[i,t]);return e?g.jsx(Lh.Provider,{value:e,children:r}):t&&s?g.jsx(g.Fragment,{children:n}):t&&c?g.jsx(Lh.Provider,{value:c,children:r}):g.jsx(Lh.Provider,{value:KI,children:r})}function un(e){const t=_.useContext(Lh);return t?(n,r)=>t.t(e,n,r):(n,r)=>{var s;const a=(s=yo[e])==null?void 0:s[n];if(!a)return console.warn(`Translation not found for ${e}.${n}`),`${e}.${n}`;if(r&&typeof a=="string"){let l=a;return l=T0(l,r),Object.entries(r).forEach(([c,d])=>{l=l.replace(new RegExp(`\\{\\{${c}\\}\\}`,"g"),String(d))}),l}return a}}const JI=_.createContext(null),Xv={didCatch:!1,error:null};let e2=class extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Xv}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:a,reason:"imperative-api"}),this.setState(Xv)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&t2(t.resetKeys,i)){var a,s;(a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Xv)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:s}=this.state;let l=t;if(a){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")l=n(c);else if(r)l=_.createElement(r,c);else if(i!==void 0)l=i;else throw s}return _.createElement(JI.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}};function t2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}var Zv={exports:{}},Bv={};/**
41
+ * @license React
42
+ * use-sync-external-store-with-selector.production.js
43
+ *
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */var ik;function n2(){if(ik)return Bv;ik=1;var e=LC();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Bv.useSyncExternalStoreWithSelector=function(c,d,f,m,p){var O=i(null);if(O.current===null){var b={hasValue:!1,value:null};O.current=b}else b=O.current;O=s(function(){function w(Q){if(!k){if(k=!0,T=Q,Q=m(Q),p!==void 0&&b.hasValue){var A=b.value;if(p(A,Q))return j=A}return j=Q}if(A=j,n(T,Q))return A;var M=m(Q);return p!==void 0&&p(A,M)?(T=Q,A):(T=Q,j=M)}var k=!1,T,j,E=f===void 0?null:f;return[function(){return w(d())},E===null?void 0:function(){return w(E())}]},[d,f,m,p]);var x=r(c,O[0],O[1]);return a(function(){b.hasValue=!0,b.value=x},[x]),l(x),x},Bv}var ak;function r2(){return ak||(ak=1,Zv.exports=n2()),Zv.exports}var i2=r2();const Ii={};var Vv={exports:{}},sk;function a2(){if(sk)return Vv.exports;sk=1;var e=Vv.exports={},t,n;function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=r}catch{t=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=i}catch{n=i}})();function a(x){if(t===setTimeout)return setTimeout(x,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(x,0);try{return t(x,0)}catch{try{return t.call(null,x,0)}catch{return t.call(this,x,0)}}}function s(x){if(n===clearTimeout)return clearTimeout(x);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(x);try{return n(x)}catch{try{return n.call(null,x)}catch{return n.call(this,x)}}}var l=[],c=!1,d,f=-1;function m(){!c||!d||(c=!1,d.length?l=d.concat(l):f=-1,l.length&&p())}function p(){if(!c){var x=a(m);c=!0;for(var w=l.length;w;){for(d=l,l=[];++f<w;)d&&d[f].run();f=-1,w=l.length}d=null,c=!1,s(x)}}e.nextTick=function(x){var w=new Array(arguments.length-1);if(arguments.length>1)for(var k=1;k<arguments.length;k++)w[k-1]=arguments[k];l.push(new O(x,w)),l.length===1&&!c&&a(p)};function O(x,w){this.fun=x,this.array=w}O.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function b(){}return e.on=b,e.addListener=b,e.once=b,e.off=b,e.removeListener=b,e.removeAllListeners=b,e.emit=b,e.prependListener=b,e.prependOnceListener=b,e.listeners=function(x){return[]},e.binding=function(x){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(x){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},Vv.exports}var s2=a2();const o2=DC(s2);function l2(e){return e.replace(/^file:\/\//,"")}var vb={},c2=F({"../../node_modules/inline-style-parser/cjs/index.js"(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
49
+ `,m="/",p="*",O="",b="comment",x="declaration";function w(T,j){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];j=j||{};var E=1,Q=1;function A($){var q=$.match(r);q&&(E+=q.length);var ee=$.lastIndexOf(f);Q=~ee?$.length-ee:Q+$.length}function M(){var $={line:E,column:Q};return function(q){return q.position=new L($),B(),q}}function L($){this.start=$,this.end={line:E,column:Q},this.source=j.source}L.prototype.content=T;function D($){var q=new Error(j.source+":"+E+":"+Q+": "+$);if(q.reason=$,q.filename=j.source,q.line=E,q.column=Q,q.source=T,!j.silent)throw q}function P($){var q=$.exec(T);if(q){var ee=q[0];return A(ee),T=T.slice(ee.length),q}}function B(){P(i)}function X($){var q;for($=$||[];q=V();)q!==!1&&$.push(q);return $}function V(){var $=M();if(!(m!=T.charAt(0)||p!=T.charAt(1))){for(var q=2;O!=T.charAt(q)&&(p!=T.charAt(q)||m!=T.charAt(q+1));)++q;if(q+=2,O===T.charAt(q-1))return D("End of comment missing");var ee=T.slice(2,q-2);return Q+=2,A(ee),T=T.slice(q),Q+=2,$({type:b,comment:ee})}}function z(){var $=M(),q=P(a);if(q){if(V(),!P(s))return D("property missing ':'");var ee=P(l),le=$({type:x,property:k(q[0].replace(n,O)),value:ee?k(ee[0].replace(n,O)):O});return P(c),le}}function Y(){var $=[];X($);for(var q;q=z();)q!==!1&&($.push(q),X($));return $}return B(),Y()}function k(T){return T?T.replace(d,O):O}t.exports=w}}),u2=F({"../../node_modules/style-to-object/cjs/index.js"(e){var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(c2());function r(i,a){let s=null;if(!i||typeof i!="string")return s;const l=(0,n.default)(i),c=typeof a=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;c?a(f,m,d):m&&(s=s||{},s[f]=m)}),s}}}),d2=F({"../../node_modules/style-to-js/cjs/utilities.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(f){return!f||r.test(f)||t.test(f)},l=function(f,m){return m.toUpperCase()},c=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),s(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(a,c):f=f.replace(i,c),f.replace(n,l))};e.camelCase=d}}),f2=F({"../../node_modules/style-to-js/cjs/index.js"(e,t){var n=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=n(u2()),i=d2();function a(s,l){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(d,f){d&&f&&(c[(0,i.camelCase)(d,l)]=f)}),c}a.default=a,t.exports=a}}),h2=F({"../../node_modules/extend/index.js"(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):r.call(m)==="[object Array]"},l=function(m){if(!m||r.call(m)!=="[object Object]")return!1;var p=n.call(m,"constructor"),O=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!p&&!O)return!1;var b;for(b in m);return typeof b>"u"||n.call(m,b)},c=function(m,p){i&&p.name==="__proto__"?i(m,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):m[p.name]=p.newValue},d=function(m,p){if(p==="__proto__")if(n.call(m,p)){if(a)return a(m,p).value}else return;return m[p]};t.exports=function f(){var m,p,O,b,x,w,k=arguments[0],T=1,j=arguments.length,E=!1;for(typeof k=="boolean"&&(E=k,k=arguments[1]||{},T=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});T<j;++T)if(m=arguments[T],m!=null)for(p in m)O=d(k,p),b=d(m,p),k!==b&&(E&&b&&(l(b)||(x=s(b)))?(x?(x=!1,w=O&&s(O)?O:[]):w=O&&l(O)?O:{},c(k,{name:p,newValue:f(E,w,b)})):typeof b<"u"&&c(k,{name:p,newValue:b}));return k}}}),m2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/partition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var t=VI(),n=tc();function r(i,a){return function(s){return[n.filter(i,a)(s),n.filter(t.not(i,a))(s)]}}e.partition=r}}),p2=F({"../../node_modules/rxjs/dist/cjs/internal/operators/race.js"(e){var t=e&&e.__read||function(s,l){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(l===void 0||l-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(O){p={error:O}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,l){for(var c=0,d=l.length,f=s.length;c<d;c++,f++)s[f]=l[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.race=void 0;var r=ec(),i=MQ();function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return i.raceWith.apply(void 0,n([],t(r.argsOrArgArray(s))))}e.race=a}}),VQ=F({"../../node_modules/rxjs/dist/cjs/operators/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var t=dQ();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return t.audit}});var n=aq();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return n.auditTime}});var r=sq();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return r.buffer}});var i=oq();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return i.bufferCount}});var a=lq();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var s=cq();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return s.bufferToggle}});var l=uq();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return l.bufferWhen}});var c=dq();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return c.catchError}});var d=yq();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return d.combineAll}});var f=OQ();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return f.combineLatestAll}});var m=bQ();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return m.combineLatest}});var p=xq();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var O=xQ();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return O.concat}});var b=S0();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return b.concatAll}});var x=yQ();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return x.concatMap}});var w=Sq();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return w.concatMapTo}});var k=wq();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return k.concatWith}});var T=w0();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return T.connect}});var j=jq();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return j.count}});var E=Tq();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return E.debounce}});var Q=Cq();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Q.debounceTime}});var A=$m();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return A.defaultIfEmpty}});var M=Eq();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return M.delay}});var L=_Q();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return L.delayWhen}});var D=Aq();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return D.dematerialize}});var P=Pq();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return P.distinct}});var B=TQ();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return B.distinctUntilChanged}});var X=Nq();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return X.distinctUntilKeyChanged}});var V=Mq();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return V.elementAt}});var z=Lq();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return z.endWith}});var Y=Dq();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return Y.every}});var $=zq();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return $.exhaust}});var q=EQ();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return q.exhaustAll}});var ee=CQ();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return ee.exhaustMap}});var le=$q();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return le.expand}});var I=tc();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return I.filter}});var G=qq();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return G.finalize}});var re=QQ();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return re.find}});var R=Iq();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return R.findIndex}});var ge=Xq();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return ge.first}});var _e=Zq();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return _e.groupBy}});var ve=SQ();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return ve.ignoreElements}});var Xe=Bq();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Xe.isEmpty}});var Ne=Vq();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return Ne.last}});var Ze=Qo();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Ze.map}});var be=wQ();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return be.mapTo}});var Fe=Uq();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Fe.materialize}});var Se=Yq();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return Se.max}});var Ve=PQ();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Ve.merge}});var ot=x0();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return ot.mergeAll}});var vt=Wq();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return vt.flatMap}});var et=Ao();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return et.mergeMap}});var yn=Fq();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return yn.mergeMapTo}});var Te=Hq();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return Te.mergeScan}});var lt=Gq();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return lt.mergeWith}});var me=Kq();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return me.min}});var Ot=j0();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return Ot.multicast}});var Dt=v0();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Dt.observeOn}});var Wt=eI();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Wt.onErrorResumeNext}});var tt=tI();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return tt.pairwise}});var Un=m2();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Un.partition}});var ie=nI();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return ie.pluck}});var de=rI();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return de.publish}});var Qe=aI();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return Qe.publishBehavior}});var Be=oI();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return Be.publishLast}});var nt=lI();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return nt.publishReplay}});var zt=p2();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return zt.race}});var zn=MQ();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return zn.raceWith}});var sn=Od();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return sn.reduce}});var Zt=uI();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Zt.repeat}});var Jt=dI();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return Jt.repeatWhen}});var mt=fI();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return mt.retry}});var nr=hI();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return nr.retryWhen}});var kn=NQ();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return kn.refCount}});var Is=LQ();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return Is.sample}});var Ei=pI();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Ei.sampleTime}});var fi=gI();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return fi.scan}});var $t=vI();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return $t.sequenceEqual}});var Bt=DQ();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Bt.share}});var Pt=OI();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Pt.shareReplay}});var jn=xI();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return jn.single}});var Tn=SI();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Tn.skip}});var on=wI();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return on.skipLast}});var Cn=_I();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return Cn.skipUntil}});var $n=kI();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return $n.skipWhile}});var Gt=jI();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Gt.startWith}});var Yn=O0();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Yn.subscribeOn}});var je=TI();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return je.switchAll}});var Je=Zm();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Je.switchMap}});var dn=CI();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return dn.switchMapTo}});var Sr=EI();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return Sr.switchScan}});var Wn=qm();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return Wn.take}});var zr=AQ();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return zr.takeLast}});var rr=QI();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return rr.takeUntil}});var xn=AI();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return xn.takeWhile}});var qn=PI();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return qn.tap}});var za=zQ();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return za.throttle}});var dc=NI();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return dc.throttleTime}});var gp=Xm();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return gp.throwIfEmpty}});var vp=RI();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return vp.timeInterval}});var Md=$Q();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return Md.timeout}});var Xs=MI();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Xs.timeoutWith}});var fc=LI();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return fc.timestamp}});var $a=gQ();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return $a.toArray}});var qa=DI();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return qa.window}});var Zs=zI();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return Zs.windowCount}});var Ia=$I();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return Ia.windowTime}});var fn=qI();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return fn.windowToggle}});var Ld=II();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return Ld.windowWhen}});var Dd=XI();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return Dd.withLatestFrom}});var na=IQ();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return na.zip}});var Xa=ZI();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return Xa.zipAll}});var Op=BI();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return Op.zipWith}})}}),Jn={highlight:{motivation:"highlighting",internalType:"highlight",displayName:"Highlight",description:"Mark text for attention",className:"annotation-highlight",iconEmoji:"🟡",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>To(e),announceOnCreate:"Highlight created",create:{bodyBuilder:"empty",refetchAfter:!1},detection:{sseMethod:"detectHighlights",countField:"createdCount",displayNamePlural:"highlights",displayNameSingular:"highlight",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},comment:{motivation:"commenting",internalType:"comment",displayName:"Comment",description:"Add a comment about the text",className:"annotation-comment",iconEmoji:"💬",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>Ls(e),announceOnCreate:"Comment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectComments",countField:"createdCount",displayNamePlural:"comments",displayNameSingular:"comment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},assessment:{motivation:"assessing",internalType:"assessment",displayName:"Assessment",description:"Provide evaluation or assessment",className:"annotation-assessment",iconEmoji:"🔴",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>e.motivation==="assessing",announceOnCreate:"Assessment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectAssessments",countField:"createdCount",displayNamePlural:"assessments",displayNameSingular:"assessment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},reference:{motivation:"linking",internalType:"reference",displayName:"Reference",description:"Link to another resource",className:"annotation-reference",iconEmoji:"🔵",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>oi(e),announceOnCreate:"Reference created",create:{bodyBuilder:"entityTag",refetchAfter:!0},detection:{sseMethod:"detectReferences",countField:"foundCount",displayNamePlural:"entity references",displayNameSingular:"entity reference",formatRequestParams:e=>{const t=[],n=e[0];return Array.isArray(n)&&n.length>0&&t.push({label:"Entity Types",value:n.join(", ")}),e[1]===!0&&t.push({label:"Include Descriptive References",value:"Yes"}),t}}},tag:{motivation:"tagging",internalType:"tag",displayName:"Tag",description:"Structural role annotation",className:"annotation-tag",iconEmoji:"🏷️",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>Co(e),announceOnCreate:"Tag created",create:{bodyBuilder:"dualTag",refetchAfter:!1,successMessage:'Tag "{value}" created'},detection:{sseMethod:"detectTags",countField:"tagsCreated",displayNamePlural:"tags",displayNameSingular:"tag",formatRequestParams:e=>{const t=[];if(typeof e[0]=="string"&&e[0]){const r={"legal-irac":"Legal (IRAC)","scientific-imrad":"Scientific (IMRAD)","argument-toulmin":"Argument (Toulmin)"};t.push({label:"Schema",value:r[e[0]]||e[0]})}const n=e[1];return Array.isArray(n)&&n.length>0&&t.push({label:"Categories",value:n.join(", ")}),t}}}},Su={primary:{base:"semiont-button semiont-button--primary",large:"semiont-button semiont-button--primary semiont-button--large"},secondary:{base:"semiont-button semiont-button--secondary",withScale:"semiont-button semiont-button--secondary semiont-button--scale"},tertiary:{base:"semiont-button semiont-button--tertiary"},danger:{base:"semiont-button semiont-button--danger"},warning:{base:"semiont-button semiont-button--warning"},combine:(...e)=>e.filter(Boolean).join(" ")},Ob=[],UQ=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?UQ:Ob).push(n=n+e[t])})();function g2(e){if(e<768)return!1;for(let t=0,n=Ob.length;;){let r=t+n>>1;if(e<Ob[r])n=r;else if(e>=UQ[r])t=r+1;else return!0;if(t==n)return!1}}function ok(e){return e>=127462&&e<=127487}var lk=8205;function v2(e,t,n=!0,r=!0){return(n?YQ:O2)(e,t,r)}function YQ(e,t,n){if(t==e.length)return t;t&&WQ(e.charCodeAt(t))&&FQ(e.charCodeAt(t-1))&&t--;let r=Uv(e,t);for(t+=ck(r);t<e.length;){let i=Uv(e,t);if(r==lk||i==lk||n&&g2(i))t+=ck(i),r=i;else if(ok(i)){let a=0,s=t-2;for(;s>=0&&ok(Uv(e,s));)a++,s-=2;if(a%2==0)break;t+=2}else break}return t}function O2(e,t,n){for(;t>0;){let r=YQ(e,t-2,n);if(r<t)return r;t--}return 0}function Uv(e,t){let n=e.charCodeAt(t);if(!FQ(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return WQ(r)?(n-55296<<10)+(r-56320)+65536:n}function WQ(e){return e>=56320&&e<57344}function FQ(e){return e>=55296&&e<56320}function ck(e){return e<65536?1:2}var _t=class HQ{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,r){[t,n]=ql(this,t,n);let i=[];return this.decompose(0,t,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Dh.from(i,this.length-(n-t)+r.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=ql(this,t,n);let r=[];return this.decompose(t,n,r,0),Dh.from(r,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),r=this.length-this.scanIdentical(t,-1),i=new wu(this),a=new wu(t);for(let s=n,l=n;;){if(i.next(s),a.next(s),s=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(t=1){return new wu(this,t)}iterRange(t,n=this.length){return new GQ(this,t,n)}iterLines(t,n){let r;if(t==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(t).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new KQ(r)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?HQ.empty:t.length<=32?new yi(t):Dh.from(yi.split(t,[]))}},yi=class zi extends _t{constructor(t,n=b2(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.text[a],l=i+s.length;if((n?r:l)>=t)return new y2(i,l,r,s);i=l+1,r++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new zi(uk(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let s=r.pop(),l=zh(a.text,s.text.slice(),0,a.length);if(l.length<=32)r.push(new zi(l,s.length+a.length));else{let c=l.length>>1;r.push(new zi(l.slice(0,c)),new zi(l.slice(c)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof zi))return super.replace(t,n,r);[t,n]=ql(this,t,n);let i=zh(this.text,zh(r.text,uk(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new zi(i,a):Dh.from(zi.split(i,[]),a)}sliceString(t,n=this.length,r=`
50
+ `){[t,n]=ql(this,t,n);let i="";for(let a=0,s=0;a<=n&&s<this.text.length;s++){let l=this.text[s],c=a+l.length;a>t&&s&&(i+=r),t<c&&n>a&&(i+=l.slice(Math.max(0,t-a),n-a)),a=c+1}return i}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new zi(r,i)),r=[],i=-1);return i>-1&&n.push(new zi(r,i)),n}},Dh=class Ol extends _t{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let r of t)this.lines+=r.lines}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.children[a],l=i+s.length,c=r+s.lines-1;if((n?c:l)>=t)return s.lineInner(t,n,r,i);i=l+1,r=c+1}}decompose(t,n,r,i){for(let a=0,s=0;s<=n&&a<this.children.length;a++){let l=this.children[a],c=s+l.length;if(t<=c&&n>=s){let d=i&((s<=t?1:0)|(c>=n?2:0));s>=t&&c<=n&&!d?r.push(l):l.decompose(t-s,n-s,r,d)}s=c+1}}replace(t,n,r){if([t,n]=ql(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let s=this.children[i],l=a+s.length;if(t>=a&&n<=l){let c=s.replace(t-a,n-a,r),d=this.lines-s.lines+c.lines;if(c.lines<d>>4&&c.lines>d>>6){let f=this.children.slice();return f[i]=c,new Ol(f,this.length-(n-t)+r.length)}return super.replace(a,l,c)}a=l+1}return super.replace(t,n,r)}sliceString(t,n=this.length,r=`
51
+ `){[t,n]=ql(this,t,n);let i="";for(let a=0,s=0;a<this.children.length&&s<=n;a++){let l=this.children[a],c=s+l.length;s>t&&a&&(i+=r),t<c&&n>s&&(i+=l.sliceString(t-s,n-s,r)),s=c+1}return i}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof Ol))return 0;let r=0,[i,a,s,l]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==s||a==l)return r;let c=this.children[i],d=t.children[a];if(c!=d)return r+c.scanIdentical(d,n);r+=c.length+1}}static from(t,n=t.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let O of t)r+=O.lines;if(r<32){let O=[];for(let b of t)b.flatten(O);return new yi(O,n)}let i=Math.max(32,r>>5),a=i<<1,s=i>>1,l=[],c=0,d=-1,f=[];function m(O){let b;if(O.lines>a&&O instanceof Ol)for(let x of O.children)m(x);else O.lines>s&&(c>s||!c)?(p(),l.push(O)):O instanceof yi&&c&&(b=f[f.length-1])instanceof yi&&O.lines+b.lines<=32?(c+=O.lines,d+=O.length+1,f[f.length-1]=new yi(b.text.concat(O.text),b.length+1+O.length)):(c+O.lines>i&&p(),c+=O.lines,d+=O.length+1,f.push(O))}function p(){c!=0&&(l.push(f.length==1?f[0]:Ol.from(f,d)),d=-1,c=f.length=0)}for(let O of t)m(O);return p(),l.length==1?l[0]:new Ol(l,n)}};_t.empty=new yi([""],0);function b2(e){let t=-1;for(let n of e)t+=n.length+1;return t}function zh(e,t,n=0,r=1e9){for(let i=0,a=0,s=!0;a<e.length&&i<=r;a++){let l=e[a],c=i+l.length;c>=n&&(c>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),s?(t[t.length-1]+=l,s=!1):t.push(l)),i=c+1}return t}function uk(e,t,n){return zh(e,[""],t,n)}var wu=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof yi?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,s=r instanceof yi?r.text.length:r.children.length;if(a==(t>0?s:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
52
+ `,this;e--}else if(r instanceof yi){let l=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[a+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof yi?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},GQ=class{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new wu(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},KQ=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(_t.prototype[Symbol.iterator]=function(){return this.iter()},wu.prototype[Symbol.iterator]=GQ.prototype[Symbol.iterator]=KQ.prototype[Symbol.iterator]=function(){return this});var y2=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function ql(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function xi(e,t,n=!0,r=!0){return v2(e,t,n,r)}function x2(e){return e>=56320&&e<57344}function S2(e){return e>=55296&&e<56320}function w2(e,t){let n=e.charCodeAt(t);if(!S2(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return x2(r)?(n-55296<<10)+(r-56320)+65536:n}function _2(e){return e<65536?1:2}var bb=/\r\n?|\n/,Gn=(function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e})(Gn||(Gn={})),_u=class $h{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}get newLength(){let t=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];t+=r<0?this.sections[n]:r}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let n=0,r=0,i=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++];s<0?(t(r,i,a),i+=a):i+=s,r+=a}}iterChangedRanges(t,n=!1){yb(this,t,n)}get invertedDesc(){let t=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?t.push(r,i):t.push(i,r)}return new $h(t)}composeDesc(t){return this.empty?t:t.empty?this:JQ(this,t)}mapDesc(t,n=!1){return t.empty?this:xb(this,t,n)}mapPos(t,n=-1,r=Gn.Simple){let i=0,a=0;for(let s=0;s<this.sections.length;){let l=this.sections[s++],c=this.sections[s++],d=i+l;if(c<0){if(d>t)return a+(t-i);a+=l}else{if(r!=Gn.Simple&&d>=t&&(r==Gn.TrackDel&&i<t&&d>t||r==Gn.TrackBefore&&i<t||r==Gn.TrackAfter&&d>t))return null;if(d>t||d==t&&n<0&&!l)return t==i||n<0?a:a+c;a+=c}i=d}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return a}touchesRange(t,n=t){for(let r=0,i=0;r<this.sections.length&&i<=n;){let a=this.sections[r++],s=this.sections[r++],l=i+a;if(s>=0&&i<=n&&l>=t)return i<t&&l>n?"cover":!0;i=l}return!1}toString(){let t="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];t+=(t?" ":"")+r+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new $h(t)}static create(t){return new $h(t)}},Gi=class ps extends _u{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return yb(this,(n,r,i,a,s)=>t=t.replace(i,i+(r-n),s),!1),t}mapDesc(t,n=!1){return xb(this,t,n,!0)}invert(t){let n=this.sections.slice(),r=[];for(let i=0,a=0;i<n.length;i+=2){let s=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=s;let c=i>>1;for(;r.length<c;)r.push(_t.empty);r.push(s?t.slice(a,a+s):_t.empty)}a+=s}return new ps(n,r)}compose(t){return this.empty?t:t.empty?this:JQ(this,t,!0)}map(t,n=!1){return t.empty?this:xb(this,t,n,!0)}iterChanges(t,n=!1){yb(this,t,n)}get desc(){return _u.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new Uu(this);e:for(let s=0,l=0;;){let c=s==t.length?1e9:t[s++];for(;l<c||l==c&&a.len==0;){if(a.done)break e;let f=Math.min(a.len,c-l);Xn(i,f,-1);let m=a.ins==-1?-1:a.off==0?a.ins:0;Xn(n,f,m),m>0&&ws(r,n,a.text),a.forward(f),l+=f}let d=t[s++];for(;l<d;){if(a.done)break e;let f=Math.min(a.len,d-l);Xn(n,f,-1),Xn(i,f,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(f),l+=f}}return{changes:new ps(n,r),filtered:_u.create(i)}}toJSON(){let t=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?t.push(r):i==0?t.push([r]):t.push([r].concat(this.inserted[n>>1].toJSON()))}return t}static of(t,n,r){let i=[],a=[],s=0,l=null;function c(f=!1){if(!f&&!i.length)return;s<n&&Xn(i,n-s,-1);let m=new ps(i,a);l=l?l.compose(m.map(l)):m,i=[],a=[],s=0}function d(f){if(Array.isArray(f))for(let m of f)d(m);else if(f instanceof ps){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);c(),l=l?l.compose(f.map(l)):f}else{let{from:m,to:p=m,insert:O}=f;if(m>p||m<0||p>n)throw new RangeError(`Invalid change range ${m} to ${p} (in doc of length ${n})`);let b=O?typeof O=="string"?_t.of(O.split(r||bb)):O:_t.empty,x=b.length;if(m==p&&x==0)return;m<s&&c(),m>s&&Xn(i,m-s,-1),Xn(i,p-m,x),ws(a,i,b),s=p}}return d(t),c(!l),l}static empty(t){return new ps(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<t.length;i++){let a=t[i];if(typeof a=="number")n.push(a,-1);else{if(!Array.isArray(a)||typeof a[0]!="number"||a.some((s,l)=>l&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)n.push(a[0],0);else{for(;r.length<i;)r.push(_t.empty);r[i]=_t.of(a.slice(1)),n.push(a[0],r[i].length)}}}return new ps(n,r)}static createSet(t,n){return new ps(t,n)}};function Xn(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function ws(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(_t.empty);e.push(n)}}function yb(e,t,n){let r=e.inserted;for(let i=0,a=0,s=0;s<e.sections.length;){let l=e.sections[s++],c=e.sections[s++];if(c<0)i+=l,a+=l;else{let d=i,f=a,m=_t.empty;for(;d+=l,f+=c,c&&r&&(m=m.append(r[s-2>>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)l=e.sections[s++],c=e.sections[s++];t(i,d,a,f,m),i=d,a=f}}}function xb(e,t,n,r=!1){let i=[],a=r?[]:null,s=new Uu(e),l=new Uu(t);for(let c=-1;;){if(s.done&&l.len||l.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&l.ins==-1){let d=Math.min(s.len,l.len);Xn(i,d,-1),s.forward(d),l.forward(d)}else if(l.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(l.len<s.len||l.len==s.len&&!n))){let d=l.len;for(Xn(i,l.ins,-1);d;){let f=Math.min(s.len,d);s.ins>=0&&c<s.i&&s.len<=f&&(Xn(i,0,s.ins),a&&ws(a,i,s.text),c=s.i),s.forward(f),d-=f}l.next()}else if(s.ins>=0){let d=0,f=s.len;for(;f;)if(l.ins==-1){let m=Math.min(f,l.len);d+=m,f-=m,l.forward(m)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Xn(i,d,c<s.i?s.ins:0),a&&c<s.i&&ws(a,i,s.text),c=s.i,s.forward(s.len-f)}else{if(s.done&&l.done)return a?Gi.createSet(i,a):_u.create(i);throw new Error("Mismatched change set lengths")}}}function JQ(e,t,n=!1){let r=[],i=n?[]:null,a=new Uu(e),s=new Uu(t);for(let l=!1;;){if(a.done&&s.done)return i?Gi.createSet(r,i):_u.create(r);if(a.ins==0)Xn(r,a.len,0,l),a.next();else if(s.len==0&&!s.done)Xn(r,0,s.ins,l),i&&ws(i,r,s.text),s.next();else{if(a.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(a.len2,s.len),d=r.length;if(a.ins==-1){let f=s.ins==-1?-1:s.off?0:s.ins;Xn(r,c,f,l),i&&f&&ws(i,r,s.text)}else s.ins==-1?(Xn(r,a.off?0:a.len,c,l),i&&ws(i,r,a.textBit(c))):(Xn(r,a.off?0:a.len,s.off?0:s.ins,l),i&&!s.off&&ws(i,r,s.text));l=(a.ins>c||s.ins>=0&&s.len>c)&&(l||r.length>d),a.forward2(c),s.forward(c)}}}}var Uu=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?_t.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?_t.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},nh=class Sb{constructor(t,n,r){this.from=t,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Sb(r,i,this.flags)}extend(t,n=t,r=0){if(t<=this.anchor&&n>=this.anchor)return Ee.range(t,n,void 0,void 0,r);let i=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return Ee.range(this.anchor,i,void 0,void 0,r)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ee.range(t.anchor,t.head)}static create(t,n,r){return new Sb(t,n,r)}},Ee=class Pr{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:Pr.create(this.ranges.map(r=>r.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(t.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Pr([this.main],0)}addRange(t,n=!0){return Pr.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,Pr.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Pr(t.ranges.map(n=>nh.fromJSON(n)),t.main)}static single(t,n=t){return new Pr([Pr.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return Pr.normalized(t.slice(),n);r=a.to}return new Pr(t,n)}static cursor(t,n=0,r,i){return nh.create(t,t,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(t,n,r,i,a){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!a&&t!=n&&(a=n<t?1:-1),n<t?nh.create(n,t,48|s):nh.create(t,n,(a?a<0?8:16:0)|s)}static normalized(t,n=0){let r=t[n];t.sort((i,a)=>i.from-a.from),n=t.indexOf(r);for(let i=1;i<t.length;i++){let a=t[i],s=t[i-1];if(a.empty?a.from<=s.to:a.from<s.to){let l=s.from,c=Math.max(a.to,s.to);i<=n&&n--,t.splice(--i,2,a.anchor>a.head?Pr.range(c,l):Pr.range(l,c))}}return new Pr(t,n)}};function eA(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}var C0=0,qe=class tA{constructor(t,n,r,i,a){this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=C0++,this.default=t([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(t={}){return new tA(t.combine||(n=>n),t.compareInput||((n,r)=>n===r),t.compare||(t.combine?(n,r)=>n===r:E0),!!t.static,t.enables)}of(t){return new qh([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new qh(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new qh(t,this,2,n)}from(t,n){return n||(n=r=>r),this.compute([t],r=>n(r.field(t)))}};function E0(e,t){return e==t||e.length==t.length&&e.every((n,r)=>n===t[r])}var qh=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=C0++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,a=e[i]>>1,s=this.type==2,l=!1,c=!1,d=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&d.push(e[f.id]);return{create(f){return f.values[a]=n(f),1},update(f,m){if(l&&m.docChanged||c&&(m.docChanged||m.selection)||wb(f,d)){let p=n(f);if(s?!dk(p,f.values[a],r):!r(p,f.values[a]))return f.values[a]=p,1}return 0},reconfigure:(f,m)=>{let p,O=m.config.address[i];if(O!=null){let b=im(m,O);if(this.dependencies.every(x=>x instanceof qe?m.facet(x)===f.facet(x):x instanceof $s?m.field(x,!1)==f.field(x,!1):!0)||(s?dk(p=n(f),b,r):r(p=n(f),b)))return f.values[a]=b,0}else p=n(f);return f.values[a]=p,1}}}};function dk(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function wb(e,t){let n=!1;for(let r of t)ku(e,r)&1&&(n=!0);return n}function k2(e,t,n){let r=n.map(c=>e[c.id]),i=n.map(c=>c.type),a=r.filter(c=>!(c&1)),s=e[t.id]>>1;function l(c){let d=[];for(let f=0;f<r.length;f++){let m=im(c,r[f]);if(i[f]==2)for(let p of m)d.push(p);else d.push(m)}return t.combine(d)}return{create(c){for(let d of r)ku(c,d);return c.values[s]=l(c),1},update(c,d){if(!wb(c,a))return 0;let f=l(c);return t.compare(f,c.values[s])?0:(c.values[s]=f,1)},reconfigure(c,d){let f=wb(c,r),m=d.config.facets[t.id],p=d.facet(t);if(m&&!f&&E0(n,m))return c.values[s]=p,0;let O=l(c);return t.compare(O,p)?(c.values[s]=p,0):(c.values[s]=O,1)}}}var rh=qe.define({static:!0}),$s=class nA{constructor(t,n,r,i,a){this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=a,this.provides=void 0}static define(t){let n=new nA(C0++,t.create,t.update,t.compare||((r,i)=>r===i),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(rh).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let a=r.values[n],s=this.updateF(a,i);return this.compareF(a,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let a=r.facet(rh),s=i.facet(rh),l;return(l=a.find(c=>c.field==this))&&l!=s.find(c=>c.field==this)?(r.values[n]=l.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(t){return[this,rh.of({field:this,create:t})]}get extension(){return this}},ho={lowest:4,low:3,default:2,high:1,highest:0};function nu(e){return t=>new rA(t,e)}var yd={highest:nu(ho.highest),high:nu(ho.high),default:nu(ho.default),low:nu(ho.low),lowest:nu(ho.lowest)},rA=class{constructor(e,t){this.inner=e,this.prec=t}},Q0=class iA{of(t){return new _b(this,t)}reconfigure(t){return iA.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}},_b=class{constructor(e,t){this.compartment=e,this.inner=t}},fk=class aA{constructor(t,n,r,i,a,s){for(this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=a,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(t){let n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),s=new Map;for(let p of j2(t,n,s))p instanceof $s?i.push(p):(a[p.facet.id]||(a[p.facet.id]=[])).push(p);let l=Object.create(null),c=[],d=[];for(let p of i)l[p.id]=d.length<<1,d.push(O=>p.slot(O));let f=r==null?void 0:r.config.facets;for(let p in a){let O=a[p],b=O[0].facet,x=f&&f[p]||[];if(O.every(w=>w.type==0))if(l[b.id]=c.length<<1|1,E0(x,O))c.push(r.facet(b));else{let w=b.combine(O.map(k=>k.value));c.push(r&&b.compare(w,r.facet(b))?r.facet(b):w)}else{for(let w of O)w.type==0?(l[w.id]=c.length<<1|1,c.push(w.value)):(l[w.id]=d.length<<1,d.push(k=>w.dynamicSlot(k)));l[b.id]=d.length<<1,d.push(w=>k2(w,b,O))}}let m=d.map(p=>p(l));return new aA(t,s,m,l,c,a)}};function j2(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(s,l){let c=i.get(s);if(c!=null){if(c<=l)return;let d=r[c].indexOf(s);d>-1&&r[c].splice(d,1),s instanceof _b&&n.delete(s.compartment)}if(i.set(s,l),Array.isArray(s))for(let d of s)a(d,l);else if(s instanceof _b){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=t.get(s.compartment)||s.inner;n.set(s.compartment,d),a(d,l)}else if(s instanceof rA)a(s.inner,s.prec);else if(s instanceof $s)r[l].push(s),s.provides&&a(s.provides,l);else if(s instanceof qh)r[l].push(s),s.facet.extensions&&a(s.facet.extensions,ho.default);else{let d=s.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(d,l)}}return a(e,ho.default),r.reduce((s,l)=>s.concat(l))}function ku(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function im(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var sA=qe.define(),kb=qe.define({combine:e=>e.some(t=>t),static:!0}),oA=qe.define({combine:e=>e.length?e[0]:void 0,static:!0}),lA=qe.define(),cA=qe.define(),uA=qe.define(),dA=qe.define({combine:e=>e.length?e[0]:!1}),Po=class{constructor(e,t){this.type=e,this.value=t}static define(){return new T2}},T2=class{of(e){return new Po(this,e)}},C2=class{constructor(e){this.map=e}of(e){return new rn(this,e)}},rn=class fA{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new fA(this.type,n)}is(t){return this.type==t}static define(t={}){return new C2(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let r=[];for(let i of t){let a=i.map(n);a&&r.push(a)}return r}};rn.reconfigure=rn.define();rn.appendConfig=rn.define();var ii=class fu{constructor(t,n,r,i,a,s){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=s,this._doc=null,this._state=null,r&&eA(r,n.newLength),a.some(l=>l.type==fu.time)||(this.annotations=a.concat(fu.time.of(Date.now())))}static create(t,n,r,i,a,s){return new fu(t,n,r,i,a,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(fu.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}};ii.time=Po.define();ii.userEvent=Po.define();ii.addToHistory=Po.define();ii.remote=Po.define();function E2(e,t){let n=[];for(let r=0,i=0;;){let a,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],s=e[r++];else if(i<t.length)a=t[i++],s=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function hA(e,t,n){var r;let i,a,s;return n?(i=t.changes,a=Gi.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),a=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(a):(r=e.selection)===null||r===void 0?void 0:r.map(i),effects:rn.mapEffects(e.effects,i).concat(rn.mapEffects(t.effects,a)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function jb(e,t,n){let r=t.selection,i=kl(t.annotations);return t.userEvent&&(i=i.concat(ii.userEvent.of(t.userEvent))),{changes:t.changes instanceof Gi?t.changes:Gi.of(t.changes||[],n,e.facet(oA)),selection:r&&(r instanceof Ee?r:Ee.single(r.anchor,r.head)),effects:kl(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function mA(e,t,n){let r=jb(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let a=1;a<t.length;a++){t[a].filter===!1&&(n=!1);let s=!!t[a].sequential;r=hA(r,jb(e,t[a],s?r.changes.newLength:e.doc.length),s)}let i=ii.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return A2(n?Q2(i):i)}function Q2(e){let t=e.startState,n=!0;for(let i of t.facet(lA)){let a=i(e);if(a===!1){n=!1;break}Array.isArray(a)&&(n=n===!0?a:E2(n,a))}if(n!==!0){let i,a;if(n===!1)a=e.changes.invertedDesc,i=Gi.empty(t.doc.length);else{let s=e.changes.filter(n);i=s.changes,a=s.filtered.mapDesc(s.changes).invertedDesc}e=ii.create(t,i,e.selection&&e.selection.map(a),rn.mapEffects(e.effects,a),e.annotations,e.scrollIntoView)}let r=t.facet(cA);for(let i=r.length-1;i>=0;i--){let a=r[i](e);a instanceof ii?e=a:Array.isArray(a)&&a.length==1&&a[0]instanceof ii?e=a[0]:e=mA(t,kl(a),!1)}return e}function A2(e){let t=e.startState,n=t.facet(uA),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=hA(r,jb(t,a,e.changes.newLength),!0))}return r==e?e:ii.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var P2=[];function kl(e){return e==null?P2:Array.isArray(e)?e:[e]}var Ta=(function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e})(Ta||(Ta={})),N2=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Tb;try{Tb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function R2(e){if(Tb)return Tb.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||N2.test(n)))return!0}return!1}function M2(e){return t=>{if(!/\S/.test(t))return Ta.Space;if(R2(t))return Ta.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Ta.Word;return Ta.Other}}var Kt=class vi{constructor(t,n,r,i,a,s){this.config=t,this.doc=n,this.selection=r,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=a,s&&(s._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)ku(this,l<<1);this.computeSlot=null}field(t,n=!0){let r=this.config.address[t.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return ku(this,r),im(this,r)}update(...t){return mA(this,t,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let l of t.effects)l.is(Q0.reconfigure)?(n&&(i=new Map,n.compartments.forEach((c,d)=>i.set(d,c)),n=null),i.set(l.value.compartment,l.value.extension)):l.is(rn.reconfigure)?(n=null,r=l.value):l.is(rn.appendConfig)&&(n=null,r=kl(r).concat(l.value));let a;n?a=t.startState.values.slice():(n=fk.resolve(r,i,this),a=new vi(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,d)=>d.reconfigure(c,this),null).values);let s=t.startState.facet(kb)?t.newSelection:t.newSelection.asSingle();new vi(n,t.newDoc,s,a,(l,c)=>c.update(l,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:Ee.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,r=t(n.ranges[0]),i=this.changes(r.changes),a=[r.range],s=kl(r.effects);for(let l=1;l<n.ranges.length;l++){let c=t(n.ranges[l]),d=this.changes(c.changes),f=d.map(i);for(let p=0;p<l;p++)a[p]=a[p].map(f);let m=i.mapDesc(d,!0);a.push(c.range.map(m)),i=i.compose(f),s=rn.mapEffects(s,f).concat(rn.mapEffects(kl(c.effects),m))}return{changes:i,selection:Ee.create(a,n.mainIndex),effects:s}}changes(t=[]){return t instanceof Gi?t:Gi.of(t,this.doc.length,this.facet(vi.lineSeparator))}toText(t){return _t.of(t.split(this.facet(vi.lineSeparator)||bb))}sliceDoc(t=0,n=this.doc.length){return this.doc.sliceString(t,n,this.lineBreak)}facet(t){let n=this.config.address[t.id];return n==null?t.default:(ku(this,n),im(this,n))}toJSON(t){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let r in t){let i=t[r];i instanceof $s&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(t[r]),this))}return n}static fromJSON(t,n={},r){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let a in r)if(Object.prototype.hasOwnProperty.call(t,a)){let s=r[a],l=t[a];i.push(s.init(c=>s.spec.fromJSON(l,c)))}}return vi.create({doc:t.doc,selection:Ee.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=fk.resolve(t.extensions||[],new Map),r=t.doc instanceof _t?t.doc:_t.of((t.doc||"").split(n.staticFacet(vi.lineSeparator)||bb)),i=t.selection?t.selection instanceof Ee?t.selection:Ee.single(t.selection.anchor,t.selection.head):Ee.single(0);return eA(i,r.length),n.staticFacet(kb)||(i=i.asSingle()),new vi(n,r,i,n.dynamicSlots.map(()=>null),(a,s)=>s.create(a),null)}get tabSize(){return this.facet(vi.tabSize)}get lineBreak(){return this.facet(vi.lineSeparator)||`
53
+ `}get readOnly(){return this.facet(dA)}phrase(t,...n){for(let r of this.facet(vi.phrases))if(Object.prototype.hasOwnProperty.call(r,t)){t=r[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let a=+(i||1);return!a||a>n.length?r:n[a-1]})),t}languageDataAt(t,n,r=-1){let i=[];for(let a of this.facet(sA))for(let s of a(this,n,r))Object.prototype.hasOwnProperty.call(s,t)&&i.push(s[t]);return i}charCategorizer(t){let n=this.languageDataAt("wordChars",t);return M2(n.length?n[0]:"")}wordAt(t){let{text:n,from:r,length:i}=this.doc.lineAt(t),a=this.charCategorizer(t),s=t-r,l=t-r;for(;s>0;){let c=xi(n,s,!1);if(a(n.slice(c,s))!=Ta.Word)break;s=c}for(;l<i;){let c=xi(n,l);if(a(n.slice(l,c))!=Ta.Word)break;l=c}return s==l?null:Ee.range(s+r,l+r)}};Kt.allowMultipleSelections=kb;Kt.tabSize=qe.define({combine:e=>e.length?e[0]:4});Kt.lineSeparator=oA;Kt.readOnly=dA;Kt.phrases=qe.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(i=>e[i]==t[i])}});Kt.languageData=sA;Kt.changeFilter=lA;Kt.transactionFilter=cA;Kt.transactionExtender=uA;Q0.reconfigure=rn.define();function L2(e,t,n={}){let r={};for(let i of e)for(let a of Object.keys(i)){let s=i[a],l=r[a];if(l===void 0)r[a]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,a))r[a]=n[a](l,s);else throw new Error("Config merge conflict for field "+a)}for(let i in t)r[i]===void 0&&(r[i]=t[i]);return r}var Qs=class{eq(e){return this==e}range(e,t=e){return Cb.create(e,t,this)}};Qs.prototype.startSide=Qs.prototype.endSide=0;Qs.prototype.point=!1;Qs.prototype.mapMode=Gn.TrackDel;function A0(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var Cb=class pA{constructor(t,n,r){this.from=t,this.to=n,this.value=r}static create(t,n,r){return new pA(t,n,r)}};function Eb(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var D2=class gA{constructor(t,n,r,i){this.from=t,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,n,r,i=0){let a=r?this.to:this.from;for(let s=i,l=a.length;;){if(s==l)return s;let c=s+l>>1,d=a[c]-t||(r?this.value[c].endSide:this.value[c].startSide)-n;if(c==s)return d>=0?s:l;d>=0?l=c:s=c+1}}between(t,n,r,i){for(let a=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,a);a<s;a++)if(i(this.from[a]+t,this.to[a]+t,this.value[a])===!1)return!1}map(t,n){let r=[],i=[],a=[],s=-1,l=-1;for(let c=0;c<this.value.length;c++){let d=this.value[c],f=this.from[c]+t,m=this.to[c]+t,p,O;if(f==m){let b=n.mapPos(f,d.startSide,d.mapMode);if(b==null||(p=O=b,d.startSide!=d.endSide&&(O=n.mapPos(f,d.endSide),O<p)))continue}else if(p=n.mapPos(f,d.startSide),O=n.mapPos(m,d.endSide),p>O||p==O&&d.startSide>0&&d.endSide<=0)continue;(O-p||d.endSide-d.startSide)<0||(s<0&&(s=p),d.point&&(l=Math.max(l,O-p)),r.push(d),i.push(p-s),a.push(O-s))}return{mapped:r.length?new gA(i,a,r,l):null,pos:s}}},Ht=class Sa{constructor(t,n,r,i){this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(t,n,r,i){return new Sa(t,n,r,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,s=t.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(Eb)),this.isEmpty)return n.length?Sa.of(n):this;let l=new OA(this,null,-1).goto(0),c=0,d=[],f=new Yu;for(;l.value||c<n.length;)if(c<n.length&&(l.from-n[c].from||l.startSide-n[c].value.startSide)>=0){let m=n[c++];f.addInner(m.from,m.to,m.value)||d.push(m)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(l.chunkIndex)<n[c].from)&&(!s||i>this.chunkEnd(l.chunkIndex)||a<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!s||i>l.to||a<l.from||s(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||d.push(Cb.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!d.length?Sa.empty:this.nextLayer.update({add:d,filter:s,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let l=this.chunkPos[s],c=this.chunk[s],d=t.touchesRange(l,l+c.length);if(d===!1)i=Math.max(i,c.maxPoint),n.push(c),r.push(t.mapPos(l));else if(d===!0){let{mapped:f,pos:m}=c.map(l,t);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(m))}}let a=this.nextLayer.map(t);return n.length==0?a:new Sa(r,n,a||Sa.empty,i)}between(t,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let a=this.chunkPos[i],s=this.chunk[i];if(n>=a&&t<=a+s.length&&s.between(a,t-a,n-a,r)===!1)return}this.nextLayer.between(t,n,r)}}iter(t=0){return Qb.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return Qb.from(t).goto(n)}static compare(t,n,r,i,a=-1){let s=t.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),l=n.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),c=hk(s,l,r),d=new ru(s,c,a),f=new ru(l,c,a);r.iterGaps((m,p,O)=>mk(d,m,f,p,O,i)),r.empty&&r.length==0&&mk(d,0,f,0,0,i)}static eq(t,n,r=0,i){i==null&&(i=999999999);let a=t.filter(f=>!f.isEmpty&&n.indexOf(f)<0),s=n.filter(f=>!f.isEmpty&&t.indexOf(f)<0);if(a.length!=s.length)return!1;if(!a.length)return!0;let l=hk(a,s),c=new ru(a,l,0).goto(r),d=new ru(s,l,0).goto(r);for(;;){if(c.to!=d.to||!Ab(c.active,d.active)||c.point&&(!d.point||!A0(c.point,d.point)))return!1;if(c.to>i)return!0;c.next(),d.next()}}static spans(t,n,r,i,a=-1){let s=new ru(t,null,a).goto(n),l=n,c=s.openStart;for(;;){let d=Math.min(s.to,r);if(s.point){let f=s.activeForPoint(s.to),m=s.pointFrom<n?f.length+1:s.point.startSide<0?f.length:Math.min(f.length,c);i.point(l,d,s.point,f,m,s.pointRank),c=Math.min(s.openEnd(d),f.length)}else d>l&&(i.span(l,d,s.active,c),c=s.openEnd(d));if(s.to>r)return c+(s.point&&s.to>r?1:0);l=s.to,s.next()}}static of(t,n=!1){let r=new Yu;for(let i of t instanceof Cb?[t]:n?z2(t):t)r.add(i.from,i.to,i.value);return r.finish()}static join(t){if(!t.length)return Sa.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=Sa.empty;i=i.nextLayer)n=new Sa(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};Ht.empty=new Ht([],[],null,-1);function z2(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(Eb(t,r)>0)return e.slice().sort(Eb);t=r}return e}Ht.empty.nextLayer=Ht.empty;var Yu=class vA{finishChunk(t){this.chunks.push(new D2(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new vA)).add(t,n,r)}addInner(t,n,r){let i=t-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=t,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+t,this.lastTo=n.to[r]+t,!0}finish(){return this.finishInner(Ht.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=Ht.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}};function hk(e,t,n){let r=new Map;for(let a of e)for(let s=0;s<a.chunk.length;s++)a.chunk[s].maxPoint<=0&&r.set(a.chunk[s],a.chunkPos[s]);let i=new Set;for(let a of t)for(let s=0;s<a.chunk.length;s++){let l=r.get(a.chunk[s]);l!=null&&(n?n.mapPos(l):l)==a.chunkPos[s]&&!(n!=null&&n.touchesRange(l,l+a.chunk[s].length))&&i.add(a.chunk[s])}return i}var OA=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},Qb=class bA{constructor(t){this.heap=t}static from(t,n=null,r=-1){let i=[];for(let a=0;a<t.length;a++)for(let s=t[a];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new OA(s,n,r,a));return i.length==1?i[0]:new bA(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let r of this.heap)r.goto(t,n);for(let r=this.heap.length>>1;r>=0;r--)Yv(this.heap,r);return this.next(),this}forward(t,n){for(let r of this.heap)r.forward(t,n);for(let r=this.heap.length>>1;r>=0;r--)Yv(this.heap,r);(this.to-t||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Yv(this.heap,0)}}};function Yv(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var ru=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Qb.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){ih(this.active,e),ih(this.activeTo,e),ih(this.activeRank,e),this.minActive=pk(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;ah(this.active,t,n),ah(this.activeTo,t,r),ah(this.activeRank,t,i),e&&ah(e,t,this.cursor.from),this.minActive=pk(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&ih(n,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let r=n.length-1;r>=0&&n[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function mk(e,t,n,r,i,a){e.goto(t),n.goto(r);let s=r+i,l=r,c=r-t,d=!!a.boundChange;for(let f=!1;;){let m=e.to+c-n.to,p=m||e.endSide-n.endSide,O=p<0?e.to+c:n.to,b=Math.min(O,s);if(e.point||n.point?(e.point&&n.point&&A0(e.point,n.point)&&Ab(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(l,b,e.point,n.point),f=!1):(f&&a.boundChange(l),b>l&&!Ab(e.active,n.active)&&a.compareRange(l,b,e.active,n.active),d&&b<s&&(m||e.openEnd(O)!=n.openEnd(O))&&(f=!0)),O>s)break;l=O,p<=0&&e.next(),p>=0&&n.next()}}function Ab(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!A0(e[n],t[n]))return!1;return!0}function ih(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function ah(e,t,n){for(let r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function pk(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Wu(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=xi(e,i));return r}function $2(e,t,n,r){for(let i=0,a=0;;){if(a>=t)return i;if(i==e.length)break;a+=e.charCodeAt(i)==9?n-a%n:1,i=xi(e,i)}return e.length}var Pb="ͼ",gk=typeof Symbol>"u"?"__"+Pb:Symbol.for(Pb),Nb=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),vk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},As=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function i(a,s,l,c){let d=[],f=/^@(\w+)\b/.exec(a[0]),m=f&&f[1]=="keyframes";if(f&&s==null)return l.push(a[0]+";");for(let p in s){let O=s[p];if(/&/.test(p))i(p.split(/,\s*/).map(b=>a.map(x=>b.replace(/&/,x))).reduce((b,x)=>b.concat(x)),O,l);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");i(r(p),O,d,m)}else O!=null&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+O+";")}(d.length||m)&&l.push((n&&!f&&!c?a.map(n):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in e)i(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
54
+ `)}static newName(){let e=vk[gk]||1;return vk[gk]=e+1,Pb+e.toString(36)}static mount(e,t,n){let r=e[Nb],i=n&&n.nonce;r?i&&r.setNonce(i):r=new q2(e,i),r.mount(Array.isArray(t)?t:[t],e)}},Ok=new Map,q2=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let i=Ok.get(n);if(i)return e[Nb]=i;this.sheet=new r.CSSStyleSheet,Ok.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Nb]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let a=0;a<e.length;a++){let s=e[a],l=this.modules.indexOf(s);if(l<i&&l>-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,s),n)for(let c=0;c<s.rules.length;c++)n.insertRule(s.rules[c],r++)}else{for(;i<l;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let a="";for(let l=0;l<this.modules.length;l++)a+=this.modules[l].getRules()+`
55
+ `;this.styleTag.textContent=a;let s=t.head||t;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}},Ps={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Fu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},I2=typeof navigator<"u"&&/Mac/.test(navigator.platform),X2=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(On=0;On<10;On++)Ps[48+On]=Ps[96+On]=String(On);var On;for(On=1;On<=24;On++)Ps[On+111]="F"+On;var On;for(On=65;On<=90;On++)Ps[On]=String.fromCharCode(On+32),Fu[On]=String.fromCharCode(On);var On;for(sh in Ps)Fu.hasOwnProperty(sh)||(Fu[sh]=Ps[sh]);var sh;function Z2(e){var t=I2&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||X2&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Fu:Ps)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var Hn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Rb=typeof document<"u"?document:{documentElement:{style:{}}},Mb=/Edge\/(\d+)/.exec(Hn.userAgent),yA=/MSIE \d/.test(Hn.userAgent),Lb=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Hn.userAgent),Bm=!!(yA||Lb||Mb),bk=!Bm&&/gecko\/(\d+)/i.test(Hn.userAgent),Wv=!Bm&&/Chrome\/(\d+)/.exec(Hn.userAgent),B2="webkitFontSmoothing"in Rb.documentElement.style,Db=!Bm&&/Apple Computer/.test(Hn.vendor),yk=Db&&(/Mobile\/\w+/.test(Hn.userAgent)||Hn.maxTouchPoints>2),we={mac:yk||/Mac/.test(Hn.platform),windows:/Win/.test(Hn.platform),linux:/Linux|X11/.test(Hn.platform),ie:Bm,ie_version:yA?Rb.documentMode||6:Lb?+Lb[1]:Mb?+Mb[1]:0,gecko:bk,gecko_version:bk?+(/Firefox\/(\d+)/.exec(Hn.userAgent)||[0,0])[1]:0,chrome:!!Wv,chrome_version:Wv?+Wv[1]:0,ios:yk,android:/Android\b/.test(Hn.userAgent),webkit_version:B2?+(/\bAppleWebKit\/(\d+)/.exec(Hn.userAgent)||[0,0])[1]:0,safari:Db,safari_version:Db?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Hn.userAgent)||[0,0])[1]:0,tabSize:Rb.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function P0(e,t){for(let n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}var am=Object.create(null);function N0(e,t,n){if(e==t)return!0;e||(e=am),t||(t=am);let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function V2(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]==null&&e.removeAttribute(r)}for(let n in t){let r=t[n];n=="style"?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function xk(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i=="style"?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i=="style"?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function U2(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var nc=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},hr=(function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e})(hr||(hr={})),Xt=class extends Qs{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new R0(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Hu(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=_A(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new Hu(e,n,r,t,e.widget||null,!0)}static line(e){return new M0(e)}static set(e,t=!1){return Ht.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};Xt.none=Ht.empty;var R0=class xA extends Xt{constructor(t){let{start:n,end:r}=_A(t);super(n?-1:5e8,r?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?P0(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||am}eq(t){return this==t||t instanceof xA&&this.tagName==t.tagName&&N0(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}};R0.prototype.point=!1;var M0=class SA extends Xt{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof SA&&this.spec.class==t.spec.class&&N0(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}};M0.prototype.mapMode=Gn.TrackBefore;M0.prototype.point=!0;var Hu=class wA extends Xt{constructor(t,n,r,i,a,s){super(n,r,a,t),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?Gn.TrackBefore:Gn.TrackAfter:Gn.TrackDel}get type(){return this.startSide!=this.endSide?hr.WidgetRange:this.startSide<=0?hr.WidgetBefore:hr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof wA&&Y2(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}};Hu.prototype.point=!0;function _A(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n==null&&(n=e.inclusive),r==null&&(r=e.inclusive),{start:n??t,end:r??t}}function Y2(e,t){return e==t||!!(e&&t&&e.compare(t))}function jl(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var Sk=class zb extends Qs{constructor(t,n){super(),this.tagName=t,this.attributes=n}eq(t){return t==this||t instanceof zb&&this.tagName==t.tagName&&N0(this.attributes,t.attributes)}static create(t){return new zb(t.tagName,t.attributes||am)}static set(t,n=!1){return Ht.of(t,n)}};Sk.prototype.startSide=Sk.prototype.endSide=-1;function Gu(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function $b(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function ju(e,t){if(!t.anchorNode)return!1;try{return $b(e,t.anchorNode)}catch{return!1}}function Ih(e){return e.nodeType==3?Ku(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function Tu(e,t,n,r){return n?wk(e,t,n,r,-1)||wk(e,t,n,r,1):!1}function Ns(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function sm(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function wk(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Aa(e))){if(e.nodeName=="DIV")return!1;let a=e.parentNode;if(!a||a.nodeType!=1)return!1;t=Ns(e)+(i<0?0:1),e=a}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=i<0?Aa(e):0}else return!1}}function Aa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function om(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function W2(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function kA(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function F2(e,t,n,r,i,a,s,l){let c=e.ownerDocument,d=c.defaultView||window;for(let f=e,m=!1;f&&!m;)if(f.nodeType==1){let p,O=f==c.body,b=1,x=1;if(O)p=W2(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(m=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let T=f.getBoundingClientRect();({scaleX:b,scaleY:x}=kA(f,T)),p={left:T.left,right:T.left+f.clientWidth*b,top:T.top,bottom:T.top+f.clientHeight*x}}let w=0,k=0;if(i=="nearest")t.top<p.top?(k=t.top-(p.top+s),n>0&&t.bottom>p.bottom+k&&(k=t.bottom-p.bottom+s)):t.bottom>p.bottom&&(k=t.bottom-p.bottom+s,n<0&&t.top-k<p.top&&(k=t.top-(p.top+s)));else{let T=t.bottom-t.top,j=p.bottom-p.top;k=(i=="center"&&T<=j?t.top+T/2-j/2:i=="start"||i=="center"&&n<0?t.top-s:t.bottom-j+s)-p.top}if(r=="nearest"?t.left<p.left?(w=t.left-(p.left+a),n>0&&t.right>p.right+w&&(w=t.right-p.right+a)):t.right>p.right&&(w=t.right-p.right+a,n<0&&t.left<p.left+w&&(w=t.left-(p.left+a))):w=(r=="center"?t.left+(t.right-t.left)/2-(p.right-p.left)/2:r=="start"==l?t.left-a:t.right-(p.right-p.left)+a)-p.left,w||k)if(O)d.scrollBy(w,k);else{let T=0,j=0;if(k){let E=f.scrollTop;f.scrollTop+=k/x,j=(f.scrollTop-E)*x}if(w){let E=f.scrollLeft;f.scrollLeft+=w/b,T=(f.scrollLeft-E)*b}t={left:t.left-T,top:t.top-j,right:t.right-T,bottom:t.bottom-j},T&&Math.abs(T-w)<1&&(r="nearest"),j&&Math.abs(j-k)<1&&(i="nearest")}if(O)break;(t.top<p.top||t.bottom>p.bottom||t.left<p.left||t.right>p.right)&&(t={left:Math.max(t.left,p.left),right:Math.min(t.right,p.right),top:Math.max(t.top,p.top),bottom:Math.min(t.bottom,p.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function jA(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var H2=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Aa(t):0),n,Math.min(e.focusOffset,n?Aa(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},co=null;we.safari&&we.safari_version>=26&&(co=!1);function TA(e){if(e.setActive)return e.setActive();if(co)return e.focus(co);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(co==null?{get preventScroll(){return co={preventScroll:!0},!0}}:void 0),!co){co=!1;for(let n=0;n<t.length;){let r=t[n++],i=t[n++],a=t[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=a&&(r.scrollLeft=a)}}}var _k;function Ku(e,t,n=t){let r=_k||(_k=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function Tl(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent("keydown",i);a.synthetic=!0,e.dispatchEvent(a);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,e.dispatchEvent(s),a.defaultPrevented||s.defaultPrevented}function G2(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function K2(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Aa(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Aa(n))}else{if(n==e)return!0;r=Ns(n),n=n.parentNode}}function CA(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function EA(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Aa(n)}else if(n.parentNode&&!sm(n))r=Ns(n),n=n.parentNode;else return null}}function QA(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!sm(n))r=Ns(n)+1,n=n.parentNode;else return null}}var _s=class qb{constructor(t,n,r=!0){this.node=t,this.offset=n,this.precise=r}static before(t,n){return new qb(t.parentNode,Ns(t),n)}static after(t,n){return new qb(t.parentNode,Ns(t)+1,n)}},bn=(function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e})(bn||(bn={})),wo=bn.LTR,L0=bn.RTL;function AA(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}var J2=AA("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),eX=AA("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Ib=Object.create(null),Mi=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Ib[t]=n,Ib[n]=-t}function PA(e){return e<=247?J2[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?eX[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var tX=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Ui=class{get dir(){return this.level%2?L0:wo}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let s=e[a];if(s.from<=t&&s.to>=t){if(s.level==n)return a;(i<0||(r!=0?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=a)}}if(i<0)throw new RangeError("Index out of range");return i}};function NA(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!NA(r.inner,i.inner))return!1}return!0}var Rt=[];function nX(e,t,n,r,i){for(let a=0;a<=r.length;a++){let s=a?r[a-1].to:t,l=a<r.length?r[a].from:n,c=a?256:i;for(let d=s,f=c,m=c;d<l;d++){let p=PA(e.charCodeAt(d));p==512?p=f:p==8&&m==4&&(p=16),Rt[d]=p==4?2:p,p&7&&(m=p),f=p}for(let d=s,f=c,m=c;d<l;d++){let p=Rt[d];if(p==128)d<l-1&&f==Rt[d+1]&&f&24?p=Rt[d]=f:Rt[d]=256;else if(p==64){let O=d+1;for(;O<l&&Rt[O]==64;)O++;let b=d&&f==8||O<n&&Rt[O]==8?m==1?1:8:256;for(let x=d;x<O;x++)Rt[x]=b;d=O-1}else p==8&&m==1&&(Rt[d]=1);f=p,p&7&&(m=p)}}}function rX(e,t,n,r,i){let a=i==1?2:1;for(let s=0,l=0,c=0;s<=r.length;s++){let d=s?r[s-1].to:t,f=s<r.length?r[s].from:n;for(let m=d,p,O,b;m<f;m++)if(O=Ib[p=e.charCodeAt(m)])if(O<0){for(let x=l-3;x>=0;x-=3)if(Mi[x+1]==-O){let w=Mi[x+2],k=w&2?i:w&4?w&1?a:i:0;k&&(Rt[m]=Rt[Mi[x]]=k),l=x;break}}else{if(Mi.length==189)break;Mi[l++]=m,Mi[l++]=p,Mi[l++]=c}else if((b=Rt[m])==2||b==1){let x=b==i;c=x?0:1;for(let w=l-3;w>=0;w-=3){let k=Mi[w+2];if(k&2)break;if(x)Mi[w+2]|=2;else{if(k&4)break;Mi[w+2]|=4}}}}}function iX(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let s=i?n[i-1].to:e,l=i<n.length?n[i].from:t;for(let c=s;c<l;){let d=Rt[c];if(d==256){let f=c+1;for(;;)if(f==l){if(i==n.length)break;f=n[i++].to,l=i<n.length?n[i].from:t}else if(Rt[f]==256)f++;else break;let m=a==1,p=(f<t?Rt[f]:r)==1,O=m==p?m?1:2:r;for(let b=f,x=i,w=x?n[x-1].to:e;b>c;)b==w&&(b=n[--x].from,w=x?n[x-1].to:e),Rt[--b]=O;c=f}else a=d,c++}}}function Xb(e,t,n,r,i,a,s){let l=r%2?2:1;if(r%2==i%2)for(let c=t,d=0;c<n;){let f=!0,m=!1;if(d==a.length||c<a[d].from){let x=Rt[c];x!=l&&(f=!1,m=x==16)}let p=!f&&l==1?[]:null,O=f?r:r+1,b=c;e:for(;;)if(d<a.length&&b==a[d].from){if(m)break e;let x=a[d];if(!f)for(let w=x.to,k=d+1;;){if(w==n)break e;if(k<a.length&&a[k].from==w)w=a[k++].to;else{if(Rt[w]==l)break e;break}}if(d++,p)p.push(x);else{x.from>c&&s.push(new Ui(c,x.from,O));let w=x.direction==wo!=!(O%2);Zb(e,w?r+1:r,i,x.inner,x.from,x.to,s),c=x.to}b=x.to}else{if(b==n||(f?Rt[b]!=l:Rt[b]==l))break;b++}p?Xb(e,c,b,r+1,i,p,s):c<b&&s.push(new Ui(c,b,O)),c=b}else for(let c=n,d=a.length;c>t;){let f=!0,m=!1;if(!d||c>a[d-1].to){let x=Rt[c-1];x!=l&&(f=!1,m=x==16)}let p=!f&&l==1?[]:null,O=f?r:r+1,b=c;e:for(;;)if(d&&b==a[d-1].to){if(m)break e;let x=a[--d];if(!f)for(let w=x.from,k=d;;){if(w==t)break e;if(k&&a[k-1].to==w)w=a[--k].from;else{if(Rt[w-1]==l)break e;break}}if(p)p.push(x);else{x.to<c&&s.push(new Ui(x.to,c,O));let w=x.direction==wo!=!(O%2);Zb(e,w?r+1:r,i,x.inner,x.from,x.to,s),c=x.from}b=x.from}else{if(b==t||(f?Rt[b-1]!=l:Rt[b-1]==l))break;b--}p?Xb(e,b,c,r+1,i,p,s):b<c&&s.push(new Ui(b,c,O)),c=b}}function Zb(e,t,n,r,i,a,s){let l=t%2?2:1;nX(e,i,a,r,l),rX(e,i,a,r,l),iX(i,a,r,l),Xb(e,i,a,t,n,r,s)}function aX(e,t,n){if(!e)return[new Ui(0,0,t==L0?1:0)];if(t==wo&&!n.length&&!tX.test(e))return RA(e.length);if(n.length)for(;e.length>Rt.length;)Rt[Rt.length]=256;let r=[],i=t==wo?0:1;return Zb(e,i,i,n,0,e.length,r),r}function RA(e){return[new Ui(0,e,0)]}var MA="";function sX(e,t,n,r,i){var a;let s=r.head-e.from,l=Ui.find(t,s,(a=r.bidiLevel)!==null&&a!==void 0?a:-1,r.assoc),c=t[l],d=c.side(i,n);if(s==d){let p=l+=i?1:-1;if(p<0||p>=t.length)return null;c=t[l=p],s=c.side(!i,n),d=c.side(i,n)}let f=xi(e.text,s,c.forward(i,n));(f<c.from||f>c.to)&&(f=d),MA=e.text.slice(Math.min(s,f),Math.max(s,f));let m=l==(i?t.length-1:0)?null:t[l+(i?1:-1)];return m&&f==d&&m.level+(i?0:1)<c.level?Ee.cursor(m.side(!i,n)+e.from,m.forward(i,n)?1:-1,m.level):Ee.cursor(f+e.from,c.forward(i,n)?-1:1,c.level)}function oX(e,t,n){for(let r=t;r<n;r++){let i=PA(e.charCodeAt(r));if(i==1)return wo;if(i==2||i==4)return L0}return wo}var LA=qe.define(),DA=qe.define(),zA=qe.define(),$A=qe.define(),Bb=qe.define(),qA=qe.define(),IA=qe.define(),D0=qe.define(),z0=qe.define(),XA=qe.define({combine:e=>e.some(t=>t)}),lX=qe.define({combine:e=>e.some(t=>t)}),ZA=qe.define(),Fv=class Vb{constructor(t,n="nearest",r="nearest",i=5,a=5,s=!1){this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=a,this.isSnapshot=s}map(t){return t.empty?this:new Vb(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Vb(Ee.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},oh=rn.define({map:(e,t)=>e.map(t)}),BA=rn.define();function Yi(e,t,n){let r=e.facet($A);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}var _a=qe.define({combine:e=>e.length?e[0]:!0}),cX=0,xl=qe.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),Ju=class Ub{constructor(t,n,r,i,a){this.id=t,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=a(this),this.extension=this.baseExtensions.concat(xl.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(xl.of({plugin:this,arg:t}))}static define(t,n){const{eventHandlers:r,eventObservers:i,provide:a,decorations:s}=n||{};return new Ub(cX++,t,r,i,l=>{let c=[];return s&&c.push(Vm.of(d=>{let f=d.plugin(l);return f?s(f):Xt.none})),a&&c.push(a(l)),c})}static fromClass(t,n){return Ub.define((r,i)=>new t(r,i),n)}},Hv=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Yi(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Yi(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Yi(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},VA=qe.define(),$0=qe.define(),Vm=qe.define(),UA=qe.define(),q0=qe.define(),xd=qe.define(),YA=qe.define();function kk(e,t){let n=e.state.facet(YA);if(!n.length)return n;let r=n.map(a=>a instanceof Function?a(e):a),i=[];return Ht.spans(r,t.from,t.to,{point(){},span(a,s,l,c){let d=a-t.from,f=s-t.from,m=i;for(let p=l.length-1;p>=0;p--,c--){let O=l[p].spec.bidiIsolate,b;if(O==null&&(O=oX(t.text,d,f)),c>0&&m.length&&(b=m[m.length-1]).to==d&&b.direction==O)b.to=f,m=b.inner;else{let x={from:d,to:f,direction:O,inner:[]};m.push(x),m=x.inner}}}}),i}var WA=qe.define();function FA(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(WA)){let s=a(e);s&&(s.left!=null&&(t=Math.max(t,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}var hu=qe.define(),Ca=class Yb{constructor(t,n,r,i){this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}join(t){return new Yb(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,r=this;for(;n>0;n--){let i=t[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),t.splice(n-1,1)}}return t.splice(n,0,r),t}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,s=0;;){let l=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,d=Math.min(l,c);if(d==1e9)break;let f=d+s,m=d,p=f;for(;;)if(a<n.length&&n[a]<=m){let O=n[a+1];a+=2,m=Math.max(m,O);for(let b=i;b<t.length&&t[b].fromB<=m;b++)s=t[b].toA-t[b].toB;p=Math.max(p,O+s)}else if(i<t.length&&t[i].fromB<=m){let O=t[i++];m=Math.max(m,O.toB),p=Math.max(p,O.toA),s=O.toA-O.toB}else break;r.push(new Yb(f,p,d,m))}return r}},jk=class HA{constructor(t,n,r){this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=Gi.empty(this.startState.doc.length);for(let a of r)this.changes=this.changes.compose(a.changes);let i=[];this.changes.iterChangedRanges((a,s,l,c)=>i.push(new Ca(a,s,l,c))),this.changedRanges=i}static create(t,n,r){return new HA(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},uX=[],an=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return uX}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&V2(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=Ns(this.dom),r=this.length?e>0:t>0;return new _s(this.parent.dom,n+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Ym)return e;return null}static get(e){return e.cmTile}},Um=class extends an{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=(e==null?void 0:e.node)==t?e:null,a=0;for(let s of this.children){if(s.sync(e),a+=s.length+s.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=s.dom&&(i.written=!0),s.dom.parentNode==t)for(;r&&r!=s.dom;)r=Tk(r);else t.insertBefore(s.dom,r);n=s.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=Tk(r);this.length=a}};function Tk(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Ym=class extends Um{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=an.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof xo)t.push(r),n=a,r=0;else{let s=i+a.length,l=e(a,i);if(l!==void 0)return l;i=s+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((s,l)=>{let c=l+s.length;if(e>=l&&e<=c){if(s.isWidget()&&t>=-1&&t<=1){if(s.flags&32)return!0;s.flags&16&&(n=void 0)}(l<e||e==c&&(t<-1?s.length:s.covers(1)))&&(!n||!s.isWidget()&&n.isWidget())&&(n=s,r=e-l),(c>e||e==l&&(t>1?s.length:s.covers(-1)))&&(!i||!s.isWidget()&&i.isWidget())&&(i=s,a=e-l)}}),!n&&!i)throw new Error("No tile at position "+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},xo=class GA extends Um{constructor(t,n){super(t),this.wrapper=n}isBlock(){return!0}covers(t){return this.children.length?t<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new GA(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},lm=class KA extends Um{constructor(t,n){super(t),this.attrs=n}isLine(){return!0}static start(t,n,r){let i=new KA(n||document.createElement("div"),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(t,n,r){let i=null,a=-1,s=null,l=-1;function c(f,m){for(let p=0,O=0;p<f.children.length&&O<=m;p++){let b=f.children[p],x=O+b.length;x>=m&&(b.isComposite()?c(b,m-O):(!s||s.isHidden&&(n>0||r&&fX(s,b)))&&(x>m||b.flags&32)?(s=b,l=m-O):(O<m||b.flags&16&&!b.isHidden)&&(i=b,a=m-O)),O=x}}c(this,t);let d=(n<0?i:s)||i||s;return d?{tile:d,offset:d==i?a:l}:null}coordsIn(t,n){let r=this.resolveInline(t,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):dX(this)}domIn(t,n){let r=this.resolveInline(t,n);if(r){let{tile:i,offset:a}=r;if(this.dom.contains(i.dom))return i.isText()?new _s(i.dom,Math.min(i.dom.nodeValue.length,a)):i.domPosFor(a,i.flags&16?1:i.flags&32?-1:n);let s=r.tile.parent,l=!1;for(let c of s.children){if(l)return new _s(c.dom,0);c==r.tile&&(l=!0)}}return new _s(this.dom,0)}};function dX(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=Ih(t);return n[n.length-1]||null}function fX(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var ei=class JA extends Um{constructor(t,n){super(t),this.mark=n}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new JA(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},mu=class eP extends an{constructor(t,n){super(t,n.length),this.text=n}sync(t){this.flags&2||(super.sync(t),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(t,n){let r=this.dom.nodeValue.length;t>r&&(t=r);let i=t,a=t,s=0;t==0&&n<0||t==r&&n>=0?we.chrome||we.gecko||(t?(i--,s=1):a<r&&(a++,s=-1)):n<0?i--:a<r&&a++;let l=Ku(this.dom,i,a).getClientRects();if(!l.length)return null;let c=l[(s?s<0:n>=0)?0:l.length-1];return we.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(l,d=>d.width)||c),s?om(c,s<0):c||null}static of(t,n){let r=new eP(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},ed=class tP extends an{constructor(t,n,r,i){super(t,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return this.flags&48?!1:(this.flags&(t<0?64:128))>0}coordsIn(t,n){return this.coordsInWidget(t,n,!1)}coordsInWidget(t,n,r){let i=this.widget.coordsAt(this.dom,t,n);if(i)return i;if(r)return om(this.dom.getBoundingClientRect(),this.length?t==0:n<=0);{let a=this.dom.getClientRects(),s=null;if(!a.length)return null;let l=this.flags&16?!0:this.flags&32?!1:t>0;for(let c=l?a.length-1:0;s=a[c],!(t>0?c==0:c==a.length-1||s.top<s.bottom);c+=l?-1:1);return om(s,!l)}}get overrideDOMText(){if(!this.length)return _t.empty;let{root:t}=this;if(!t)return _t.empty;let n=this.posAtStart;return t.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable="false")),new tP(a,r,t,i)}},cm=class extends an{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return _t.empty}coordsIn(e){return this.dom.getBoundingClientRect()}},hX=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:s}=this;for(;e||t>0;)if(r.isComposite())if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!s.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++}else{let l=r.children[i],c=l.breakAfter;(t>0?l.length<=e:l.length<e)&&(!n||n.skip(l,0,l.length)!==!1||!l.isComposite)?(a=!!c,i++,e-=l.length):(s.push({tile:r,index:i}),r=l,i=0,n&&l.isComposite()&&n.enter(l))}else if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++;else if(e){let l=Math.min(e,r.length-i);n&&n.skip(r,i,i+l),e-=l,i+=l}else break;return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},mX=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},pX=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var i;this.flushBuffer();let a=this.ensureMarks(t,n),s=a.lastChild;if(s&&s.isText()&&!(s.flags&8)&&s.length+e.length<512){this.cache.reused.set(s,2);let l=a.children[a.children.length-1]=new mu(s.dom,s.text+e);l.parent=a}else a.append(r||mu.of(e,(i=this.cache.find(mu))===null||i===void 0?void 0:i.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?Gv(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let s=t.marks.length-1;s>=0;s--){let l=t.marks[s],c=r.lastChild;if(c instanceof ei&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(Gv(l.dom)),r=c;else{if(this.cache.reused.get(l)){let f=an.get(l.dom);f&&f.setDOM(Gv(l.dom))}let d=ei.of(l.mark,l.dom);r.append(d),r=d}this.cache.reused.set(l,2)}let i=an.get(e.text);i&&this.cache.reused.set(i,2);let a=new mu(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=nP);let r=lm.start(e,t||((n=this.cache.find(lm))===null||n===void 0?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let a=e[i],s;if(t>0&&(s=r.lastChild)&&s instanceof ei&&s.mark.eq(a))r=s,t--;else{let l=ei.of(a,(n=this.cache.find(ei,c=>c.mark.eq(a)))===null||n===void 0?void 0:n.dom);r.append(l),r=l,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Ck(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(we.ios&&Ck(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(Kv,0,32)||new ed(Kv.toDOM(),0,Kv,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new mX(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof xo&&r.wrapper.eq(n.wrapper))t=r;else{let i=xo.of(n.wrapper,(e=this.cache.find(xo,a=>a.wrapper.eq(n.wrapper)))===null||e===void 0?void 0:e.dom);t.append(i),t=i}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(cm,void 0,1);return n&&(n.flags=t),n||new cm(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},gX=class{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:i,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let s=this.textOff=Math.min(e,r.length);return i?null:r.slice(0,s)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},um=[ed,lm,mu,ei,cm,xo,Ym];for(let e=0;e<um.length;e++)um[e].bucket=e;var vX=class{constructor(e){this.view=e,this.buckets=um.map(()=>[]),this.index=um.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let s=i.length-1;s>=0;s--){let l=(s+a)%i.length,c=i[l];if((!t||t(c))&&!this.reused.has(c))return i.splice(l,1),l<a&&this.index[r]--,this.reused.set(c,n),c}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let s=r[i];if(!this.reused.has(s)&&(a==0?s.widget.compare(e):s.widget.constructor==e.constructor&&e.updateDOM(s.dom,this.view,s.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,s.widget==e&&s.length==t&&(s.flags&497)==n?(this.reused.set(s,1),s):(this.reused.set(s,2),new ed(s.dom,t,e,s.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},OX=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new vX(e),this.text=new gX(e.state.doc),this.builder=new pX(this.cache,new Ym(e,e.contentDOM),Ht.iter(n)),this.cache.reused.set(t,2),this.old=new hX(t),this.reuseWalker={skip:(a,s,l)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let s=a<e.length?e[a++]:null,l=s?s.fromA:this.old.root.length;if(l>r){let c=l-r;this.preserve(c,!a,!s),r=l,i+=c}if(!s)break;t&&s.fromA<=t.range.fromA&&s.toA>=t.range.toA?(this.forward(s.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,s.toA),this.emit(t.range.toB,s.toB)):(this.forward(s.fromA,s.toA),this.emit(i,s.toB)),i=s.toB,r=s.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=xX(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(a,s,l)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(l-s);else{let c=l>0||s<a.length?ed.of(a.widget,this.view,l-s,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,r,i),i=r.length)}else if(a.isText())this.builder.ensureLine(null),!s&&l==a.length&&!this.cache.reused.has(a)?this.builder.addText(a.text,r,i,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(s,l),r,i)),i=r.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof cm)this.cache.add(a);else if(a instanceof ei)this.builder.ensureLine(null),this.builder.addMark(a,r,i),this.cache.reused.set(a,1),i=r.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof ei&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=i=0):a instanceof ei&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,a=Ht.spans(this.decorations,e,t,{point:(s,l,c,d,f,m)=>{if(c instanceof Hu){if(this.disallowBlockEffectsFor[m]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(s).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=d.length,f>d.length)r.continueWidget(l-s);else{let p=c.widget||(c.block?Il.block:Il.inline),O=bX(c),b=this.cache.findWidget(p,l-s,O)||ed.of(p,this.view,l-s,O);c.block?(c.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(b)):(r.ensureLine(n),r.addInlineWidget(b,d,f))}n=null}else n=yX(n,c);l>s&&this.text.skip(l-s)},span:(s,l,c,d)=>{for(let f=s;f<l;){let m=this.text.next(Math.min(512,l-f));m==null?(r.addLineStartIfNotCovered(n),r.addBreak(),f++):(r.ensureLine(n),r.addText(m,c,f==s?d:c.length),f+=m.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=a>i,this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let i=an.get(r);if(r==this.view.contentDOM)break;i instanceof ei?t.push(i):i!=null&&i.isLine()?n=i:i instanceof xo||(r.nodeName=="DIV"&&!n&&r!=this.view.contentDOM?n=new lm(r,nP):n||t.push(ei.of(new R0({tagName:r.nodeName.toLowerCase(),attributes:U2(r)}),r)))}return{line:n,marks:t}}};function Ck(e,t){let n=r=>{for(let i of r.children)if((t?i.isText():i.length)||n(i))return!0;return!1};return n(e)}function bX(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var nP={class:"cm-line"};function yX(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r||(e||(e={class:"cm-line"}),n&&P0(n,e),r&&(e.class+=" "+r)),e}function xX(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof ei&&t.push(r.mark)}return t}function Gv(e){let t=an.get(e);return t&&t.setDOM(e.cloneNode()),e}var Il=class extends nc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};Il.inline=new Il("span");Il.block=new Il("div");var Kv=new class extends nc{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}},Ek=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Xt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Ym(e,e.contentDOM),this.updateInner([new Ca(0,0,0,e.state.doc.length)],null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:d,toA:f})=>f<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!QX(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let i=r>-1?wX(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:d,to:f}=this.hasComposition;n=new Ca(d,f,e.changes.mapPos(d,-1),e.changes.mapPos(f,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(we.ie||we.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.blockWrappers;this.updateDeco();let l=jX(a,this.decorations,e.changes);l.length&&(n=Ca.extendWithRanges(n,l));let c=CX(s,this.blockWrappers,e.changes);return c.length&&(n=Ca.extendWithRanges(n,c)),i&&!n.some(d=>d.fromA<=i.range.fromA&&d.toA>=i.range.toA)&&(n=i.range.addToSet(n.slice())),this.tile.flags&2&&n.length==0?!1:(this.updateInner(n,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let a=this.tile,s=new OX(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&an.get(t.text)&&s.cache.reused.set(an.get(t.text),2),this.tile=s.run(e,t),Wb(a,s.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let i=we.chrome||we.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(i),i&&(i.written||n.selectionRange.focusNode!=i.node||!this.tile.dom.contains(i.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let i of this.tile.children)i.isWidget()&&i.widget instanceof Jv&&r.push(i.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(BA)&&(this.editContextFormatting=n.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(_a)||n.tabIndex>-1)&&ju(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,d;if(l.empty?d=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(d=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),we.gecko&&l.empty&&!this.hasComposition&&SX(c)){let m=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(m,c.node.childNodes[c.offset]||null)),c=d=new _s(m,0),s=!0}let f=this.view.observer.selectionRange;(s||!f.focusNode||(!Tu(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Tu(d.node,d.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{we.android&&we.chrome&&n.contains(f.focusNode)&&EX(f.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let m=Gu(this.view.root);if(m)if(l.empty){if(we.gecko){let p=_X(c.node,c.offset);if(p&&p!=3){let O=(p==1?EA:QA)(c.node,c.offset);O&&(c=new _s(O.node,O.offset))}}m.collapse(c.node,c.offset),l.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=l.bidiLevel)}else if(m.extend){m.collapse(c.node,c.offset);try{m.extend(d.node,d.offset)}catch{}}else{let p=document.createRange();l.anchor>l.head&&([c,d]=[d,c]),p.setEnd(d.node,d.offset),p.setStart(c.node,c.offset),m.removeAllRanges(),m.addRange(p)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,d)),this.impreciseAnchor=c.precise?null:new _s(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new _s(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Tu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Gu(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let s=a.posAtStart;if(t.head==s||t.head==s+a.length)return;let l=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!l||!c||l.bottom>c.top)return;let d=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(d.node,d.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let a=Aa(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==n.dom)break;a==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?a=-1:a=1),e=s}a<0?i=e:i=e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!an.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let a=0,s=r;;a++){let l=n.children[a];if(l.dom==i)return s;s+=l.length+l.breakAfter}}else return n.isText()?e==n.dom?r+t:r+(t?n.length:0):r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,s=-1,l=!1;return this.tile.blockTiles((c,d)=>{if(c.isWidget()){if(c.flags&32&&d>=e)return!0;c.flags&16&&(i=!0)}else{let f=d+c.length;if(d<=e&&(n=c,r=e-d,i=f<e),f>=e&&!a&&(a=c,s=e-d,l=d>e),d>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:l&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(s,t))}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof Jv?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(i,a){if(i.isComposite())for(let s of i.children){if(s.length>=a){let l=r(s,a);if(l)return l}if(a-=s.length,a<0)break}else if(i.isText()&&a<i.length){let s=xi(i.text,a);if(s==a)return null;let l=Ku(i.dom,a,s).getClientRects();for(let c=0;c<l.length;c++){let d=l[c];if(c==l.length-1||d.top<d.bottom&&d.left<d.right)return d}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==bn.LTR,c=0,d=(f,m,p)=>{for(let O=0;O<f.children.length&&!(m>r);O++){let b=f.children[O],x=m+b.length,w=b.dom.getBoundingClientRect(),{height:k}=w;if(p&&!O&&(c+=w.top-p.top),b instanceof xo)x>n&&d(b,m,w);else if(m>=n&&(c>0&&t.push(-c),t.push(k+c),c=0,a)){let T=b.dom.lastChild,j=T?Ih(T):[];if(j.length){let E=j[j.length-1],Q=l?E.right-w.left:w.right-E.left;Q>s&&(s=Q,this.minWidth=i,this.minWidthFrom=m,this.minWidthTo=x)}}p&&O==f.children.length-1&&(c+=p.bottom-w.bottom),m=x+b.breakAfter}};return d(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?bn.RTL:bn.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let s=0,l;for(let c of a.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let d=Ih(c.dom);if(d.length!=1)return;s+=d[0].width,l=d[0].height}if(s)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:s/a.length,textHeight:l}}});if(e)return e;let t=document.createElement("div"),n,r,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let a=Ih(t.firstChild)[0];n=t.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,i=a&&a.height?a.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let s=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Xt.replace({widget:new Jv(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return Xt.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Vm).map(i=>(this.dynamicDecorationMap[e++]=typeof i=="function")?i(this.view):i),n=!1,r=this.view.state.facet(q0).map((i,a)=>{let s=typeof i=="function";return s&&(n=!0),s?i(this.view):i});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(Ht.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(UA).map(i=>typeof i=="function"?i(this.view):i)}scrollIntoView(e){var t;if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let d of this.view.state.facet(ZA))try{if(d(this.view,e.range,e))return!0}catch(f){Yi(this.view.state,f,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,(t=n.assoc)!==null&&t!==void 0?t:n.empty?0:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let a=FA(this.view),s={left:r.left-a.left,top:r.top-a.top,right:r.right+a.right,bottom:r.bottom+a.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;if(F2(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==bn.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let d=this.view.docView.lineAt(n.head,1);d&&d.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=n=>n.isWidget()||n.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Wb(this.tile)}};function Wb(e,t){let n=t==null?void 0:t.get(e);if(n!=1){n==null&&e.destroy();for(let r of e.children)Wb(r,t)}}function SX(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function rP(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=EA(n.focusNode,n.focusOffset),i=QA(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let l=an.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let c=an.get(r.node);!c||c.isText()&&c.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let s=t-a.offset;return{from:s,to:s+a.node.nodeValue.length,node:a.node}}function wX(e,t,n){let r=rP(e,n);if(!r)return null;let{node:i,from:a,to:s}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||e.state.doc.sliceString(r.from,r.to)!=l)return null;let c=t.invertedDesc;return{range:new Ca(c.mapPos(a),c.mapPos(s),a,s),text:i}}function _X(e,t){return e.nodeType!=1?0:(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable=="false"?2:0)}var kX=class{constructor(){this.changes=[]}compareRange(t,n){jl(t,n,this.changes)}comparePoint(t,n){jl(t,n,this.changes)}boundChange(t){jl(t,t,this.changes)}};function jX(e,t,n){let r=new kX;return Ht.compare(e,t,n,r),r.changes}var TX=class{constructor(){this.changes=[]}compareRange(e,t){jl(e,t,this.changes)}comparePoint(){}boundChange(e){jl(e,e,this.changes)}};function CX(e,t,n){let r=new TX;return Ht.compare(e,t,n,r),r.changes}function EX(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function QX(e,t){let n=!1;return t&&e.iterChangedRanges((r,i)=>{r<t.to&&i>t.from&&(n=!0)}),n}var Jv=class extends nc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function AX(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return Ee.cursor(t);a==0?n=1:a==i.length&&(n=-1);let s=a,l=a;n<0?s=xi(i.text,a,!1):l=xi(i.text,a);let c=r(i.text.slice(s,l));for(;s>0;){let d=xi(i.text,s,!1);if(r(i.text.slice(d,s))!=c)break;s=d}for(;l<i.length;){let d=xi(i.text,l);if(r(i.text.slice(l,d))!=c)break;l=d}return Ee.range(s+i.from,l+i.from)}function PX(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let l=e.viewState.heightOracle.textHeight,c=Math.floor((i-n.top-(e.defaultLineHeight-l)*.5)/l);a+=c*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+$2(s,a,e.state.tabSize)}function NX(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let i;for(let a of r.type){if(a.from>t)break;if(!(a.to<t)){if(a.from<t&&a.to>t)return a;(!i||a.type==hr.Text&&(i.type!=a.type||(n<0?a.from<t:a.to>t)))&&(i=a)}}return i||r}return r}function RX(e,t,n,r){let i=NX(e,t.head,t.assoc||-1),a=!r||i.type!=hr.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let s=e.dom.getBoundingClientRect(),l=e.textDirectionAt(i.from),c=e.posAtCoords({x:n==(l==bn.LTR)?s.right-1:s.left+1,y:(a.top+a.bottom)/2});if(c!=null)return Ee.cursor(c,n?-1:1)}return Ee.cursor(n?i.to:i.from,n?-1:1)}function Qk(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let l=t,c=null;;){let d=sX(i,a,s,l,n),f=MA;if(!d){if(i.number==(n?e.state.doc.lines:1))return l;f=`
56
+ `,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),d=e.visualLineSide(i,!n)}if(c){if(!c(f))return l}else{if(!r)return d;c=r(f)}l=d}}function MX(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return a=>{let s=r(a);return i==Ta.Space&&(i=s),i==s}}function LX(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return Ee.cursor(i,t.assoc);let s=t.goalColumn,l,c=e.contentDOM.getBoundingClientRect(),d=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),f=e.documentTop;if(d)s==null&&(s=d.left-c.left),l=a<0?d.top:d.bottom;else{let b=e.viewState.lineBlockAt(i);s==null&&(s=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-b.from))),l=(a<0?b.top:b.bottom)+f}let m=c.left+s,p=e.viewState.heightOracle.textHeight>>1,O=r??p;for(let b=0;;b+=p){let x=l+(O+b)*a,w=Fb(e,{x:m,y:x},!1,a);if(n?x>c.bottom:x<c.top)return Ee.cursor(w.pos,w.assoc);let k=e.coordsAtPos(w.pos,w.assoc),T=k?(k.top+k.bottom)/2:0;if(!k||(n?T>l:T<l))return Ee.cursor(w.pos,w.assoc,void 0,s)}}function Cu(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(a,s,l)=>{if(t>a&&t<s){let c=r||n||(t-a<s-t?-1:1);t=c<0?a:s,r=c}});if(!r)return t}}function iP(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let s=Cu(e,i.from,0);s!=i.from&&(a=Ee.cursor(s,-1))}else{let s=Cu(e,i.from,-1),l=Cu(e,i.to,1);(s!=i.from||l!=i.to)&&(a=Ee.range(i.from==i.anchor?s:l,i.from==i.head?s:l))}a&&(n||(n=t.ranges.slice()),n[r]=a)}return n?Ee.create(n,t.mainIndex):t}function eO(e,t,n){let r=Cu(e.state.facet(xd).map(i=>i(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:Ee.cursor(r,r<n.from?1:-1)}var Vi=class{constructor(e,t){this.pos=e,this.assoc=t}};function Fb(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:s,y:l}=t,c=l-a,d;for(;;){if(c<0)return new Vi(0,1);if(c>e.viewState.docHeight)return new Vi(e.state.doc.length,-1);if(d=e.elementAtHeight(c),r==null)break;if(d.type==hr.Text){if(r<0?d.to<e.viewport.from:d.from>e.viewport.to)break;let p=e.docView.coordsAt(r<0?d.from:d.to,r>0?-1:1);if(p&&(r<0?p.top<=c+a:p.bottom>=c+a))break}let m=e.viewState.heightOracle.textHeight/2;c=r>0?d.bottom+m:d.top-m}if(e.viewport.from>=d.to||e.viewport.to<=d.from){if(n)return null;if(d.type==hr.Text){let m=PX(e,i,d,s,l);return new Vi(m,m==d.from?1:-1)}}if(d.type!=hr.Text)return c<(d.top+d.bottom)/2?new Vi(d.from,1):new Vi(d.to,-1);let f=e.docView.lineAt(d.from,2);return(!f||f.length!=d.length)&&(f=e.docView.lineAt(d.from,-2)),new DX(e,s,l,e.textDirectionAt(d.from)).scanTile(f,d.from)}var DX=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Ui.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Ui.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n=0,r=e.length-1,i=new Set,a=this.bidiIn(e[0],e[r]),s,l,c=-1,d=1e9,f;e:for(;n<r;){let p=r-n,O=n+r>>1;t:if(i.has(O)){let x=n+Math.floor(Math.random()*p);for(let w=0;w<p;w++){if(!i.has(x)){O=x;break t}x++,x==r&&(x=n)}break e}i.add(O);let b=t(O);if(b)for(let x=0;x<b.length;x++){let w=b[x],k=0;if(!(w.width==0&&b.length>1)){if(w.bottom<this.y)(!s||s.bottom<w.bottom)&&(s=w),k=1;else if(w.top>this.y)(!l||l.top>w.top)&&(l=w),k=-1;else{let T=w.left>this.x?this.x-w.left:w.right<this.x?this.x-w.right:0,j=Math.abs(T);j<d&&(c=O,d=j,f=w),T&&(k=T<0==(this.baseDir==bn.LTR)?-1:1)}k==-1&&(!a||this.baseDirAt(e[O],1))?r=O:k==1&&(!a||this.baseDirAt(e[O+1],-1))&&(n=O+1)}}}if(!f){let p=s&&(!l||this.y-s.bottom<l.top-this.y)?s:l;return this.y=(p.top+p.bottom)/2,this.scan(e,t)}let m=(a?this.dirAt(e[c],1):this.baseDir)==bn.LTR;return{i:c,after:this.x>(f.left+f.right)/2==m}}scanText(e,t){let n=[];for(let i=0;i<e.length;i=xi(e.text,i))n.push(t+i);n.push(t+e.length);let r=this.scan(n,i=>{let a=n[i]-t,s=n[i+1]-t;return Ku(e.dom,a,s).getClientRects()});return r.after?new Vi(n[r.i+1],-1):new Vi(n[r.i],1)}scanTile(e,t){if(!e.length)return new Vi(t,1);if(e.children.length==1){let s=e.children[0];if(s.isText())return this.scanText(s,t);if(s.isComposite())return this.scanTile(s,t)}let n=[t];for(let s=0,l=t;s<e.children.length;s++)n.push(l+=e.children[s].length);let r=this.scan(n,s=>{let l=e.children[s];return l.flags&48?null:(l.dom.nodeType==1?l.dom:Ku(l.dom,0,l.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Vi(n[r.i+1],-1):new Vi(a,1)}},bl="￿",zX=class{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Kt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=bl}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let i=this.text.length;this.readNode(r);let a=an.get(r),s=r.nextSibling;if(s==t){a!=null&&a.breakAfter&&!s&&n!=this.view.contentDOM&&this.lineBreak();break}let l=an.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:sm(r))||sm(s)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>i)&&!qX(s,t)&&this.lineBreak(),r=s}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,s;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(s=r.exec(t))&&(i=s.index,a=s[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);n=i+a}}readNode(e){let t=an.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+($X(e,n.node,n.offset)?t:0))}};function $X(e,t,n){for(;;){if(!t||n<Aa(t))return!1;if(t==e)return!0;n=Ns(t)+1,t=t.parentNode}}function qX(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let r=an.get(e);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}var Ak=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},IX=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,s=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=aP(e.docView.tile,t,n,0))){let l=i||a?[]:ZX(e),c=new zX(l,e);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=BX(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=i&&i.node==l.focusNode&&i.offset==l.focusOffset||!$b(e.contentDOM,l.focusNode)?s.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),d=a&&a.node==l.anchorNode&&a.offset==l.anchorOffset||!$b(e.contentDOM,l.anchorNode)?s.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),f=e.viewport;if((we.ios||we.chrome)&&s.main.empty&&c!=d&&(f.from>0||f.to<e.state.doc.length)){let m=Math.min(c,d),p=Math.max(c,d),O=f.from-m,b=f.to-p;(O==0||O==1||m==0)&&(b==0||b==-1||p==e.state.doc.length)&&(c=0,d=e.state.doc.length)}if(e.inputState.composing>-1&&s.ranges.length>1)this.newSel=s.replaceRange(Ee.range(d,c));else if(e.lineWrapping&&d==c&&!(s.main.empty&&s.main.head==c)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(c,-1),p=0;m&&(p=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=Ee.create([Ee.cursor(c,p)])}else this.newSel=Ee.single(d,c)}}};function aP(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,s=-1,l=-1;for(let c=0,d=r,f=r;c<e.children.length;c++){let m=e.children[c],p=d+m.length;if(d<t&&p>n)return aP(m,t,n,d);if(p>=t&&i==-1&&(i=c,a=d),d>n&&m.dom.parentNode==e.dom){s=c,l=f;break}f=p,d=p+m.breakAfter}return{from:a,to:l<0?r+e.length:l,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:s<e.children.length&&s>=0?e.children[s].dom:null}}else return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function sP(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,s=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:l,to:c}=t.bounds,d=a.from,f=null;(s===8||we.android&&t.text.length<c-l)&&(d=a.to,f="end");let m=i.doc.sliceString(l,c,bl),p,O;!a.empty&&a.from>=l&&a.to<=c&&(t.typeOver||m!=t.text)&&m.slice(0,a.from-l)==t.text.slice(0,a.from-l)&&m.slice(a.to-l)==t.text.slice(p=t.text.length-(m.length-(a.to-l)))?n={from:a.from,to:a.to,insert:_t.of(t.text.slice(a.from-l,p).split(bl))}:(O=oP(m,t.text,d-l,f))&&(we.chrome&&s==13&&O.toB==O.from+2&&t.text.slice(O.from,O.toB)==bl+bl&&O.toB--,n={from:l+O.from,to:l+O.toA,insert:_t.of(t.text.slice(O.from,O.toB).split(bl))})}else r&&(!e.hasFocus&&i.facet(_a)||dm(r,a))&&(r=null);if(!n&&!r)return!1;if((we.mac||we.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Ee.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:_t.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:we.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
57
+ `&&e.lineWrapping&&(r&&(r=Ee.single(r.main.anchor-1,r.main.head-1)),n={from:a.from,to:a.to,insert:_t.of([" "])}),n)return I0(e,n,r,s);if(r&&!dm(r,a)){let l=!1,c="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(l=!0),c=e.inputState.lastSelectionOrigin,c=="select.pointer"&&(r=iP(i.facet(xd).map(d=>d(e)),r))),e.dispatch({selection:r,scrollIntoView:l,userEvent:c}),!0}else return!1}function I0(e,t,n,r=-1){if(we.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(we.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&Tl(e.contentDOM,"Enter",13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&Tl(e.contentDOM,"Backspace",8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&Tl(e.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s,l=()=>s||(s=XX(e,t,n));return e.state.facet(qA).some(c=>c(e,t.from,t.to,a,l))||e.dispatch(l()),!0}function XX(e,t,n){let r,i=e.state,a=i.selection.main,s=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let c=t.from<a.from?-1:1,d=c<0?a.from:a.to,f=Cu(i.facet(xd).map(m=>m(e)),d,c);t.from==f&&(s=f)}if(s>-1)r={changes:t,selection:Ee.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let c=a.from<t.from?i.sliceDoc(a.from,t.from):"",d=a.to>t.to?i.sliceDoc(t.to,a.to):"";r=i.replaceSelection(e.state.toText(c+t.insert.sliceString(0,void 0,e.state.lineBreak)+d))}else{let c=i.changes(t),d=n&&n.main.to<=c.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let f=e.state.sliceDoc(t.from,t.to),m,p=n&&rP(e,n.main.head);if(p){let b=t.insert.length-(t.to-t.from);m={from:p.from,to:p.to-b}}else m=e.state.doc.lineAt(a.head);let O=a.to-t.to;r=i.changeByRange(b=>{if(b.from==a.from&&b.to==a.to)return{changes:c,range:d||b.map(c)};let x=b.to-O,w=x-f.length;if(e.state.sliceDoc(w,x)!=f||x>=m.from&&w<=m.to)return{range:b};let k=i.changes({from:w,to:x,insert:t.insert}),T=b.to-a.to;return{changes:k,range:d?Ee.range(Math.max(0,d.anchor+T),Math.max(0,d.head+T)):b.map(k)}})}else r={changes:c,selection:d&&i.selection.replaceRange(d)}}let l="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,l+=".compose",e.inputState.compositionFirstChange&&(l+=".start",e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function oP(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let s=e.length,l=t.length;for(;s>0&&l>0&&e.charCodeAt(s-1)==t.charCodeAt(l-1);)s--,l--;if(r=="end"){let c=Math.max(0,a-Math.min(s,l));n-=s+c-a}if(s<a&&e.length<t.length){let c=n<=a&&n>=s?a-n:0;a-=c,l=a+(l-s),s=a}else if(l<a){let c=n<=a&&n>=l?a-n:0;a-=c,s=a+(s-l),l=a}return{from:a,toA:s,toB:l}}function ZX(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new Ak(n,r)),(i!=n||a!=r)&&t.push(new Ak(i,a))),t}function BX(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?Ee.single(n+t,r+t):null}function dm(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var VX=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,we.safari&&e.contentDOM.addEventListener("input",()=>null),we.gecko&&sZ(e.contentDOM.ownerDocument)}handleEvent(e){!JX(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let r of n.observers)r(this.view,t);for(let r of n.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=UX(e),n=this.handlers,r=this.view.contentDOM;for(let i in t)if(i!="scroll"){let a=!t[i].handlers.length,s=n[i];s&&a!=!s.handlers.length&&(r.removeEventListener(i,this.handleEvent),s=null),s||r.addEventListener(i,this.handleEvent,{passive:a})}for(let i in n)i!="scroll"&&!t[i]&&r.removeEventListener(i,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&cP.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),we.android&&we.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return we.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=lP.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||YX.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Tl(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:we.safari&&!we.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function Pk(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(i){Yi(n.state,i)}}}function UX(e){let t=Object.create(null);function n(r){return t[r]||(t[r]={observers:[],handlers:[]})}for(let r of e){let i=r.spec,a=i&&i.plugin.domEventHandlers,s=i&&i.plugin.domEventObservers;if(a)for(let l in a){let c=a[l];c&&n(l).handlers.push(Pk(r.value,c))}if(s)for(let l in s){let c=s[l];c&&n(l).observers.push(Pk(r.value,c))}}for(let r in ki)n(r).handlers.push(ki[r]);for(let r in pr)n(r).observers.push(pr[r]);return t}var lP=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],YX="dthko",cP=[16,17,18,20,91,92,224,225],lh=6;function ch(e){return Math.max(0,e)*.7+8}function WX(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var FX=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=jA(e.contentDOM),this.atoms=e.state.facet(xd).map(a=>a(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Kt.allowMultipleSelections)&&HX(e,t),this.dragging=KX(e,t)&&fP(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&WX(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=FA(this.view);e.clientX-l.left<=r+lh?t=-ch(r-e.clientX):e.clientX+l.right>=a-lh&&(t=ch(e.clientX-a)),e.clientY-l.top<=i+lh?n=-ch(i-e.clientY):e.clientY+l.bottom>=s-lh&&(n=ch(e.clientY-s)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=iP(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function HX(e,t){let n=e.state.facet(LA);return n.length?n[0](t):we.mac?t.metaKey:t.ctrlKey}function GX(e,t){let n=e.state.facet(DA);return n.length?n[0](t):we.mac?!t.altKey:!t.ctrlKey}function KX(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Gu(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let a=0;a<i.length;a++){let s=i[a];if(s.left<=t.clientX&&s.right>=t.clientX&&s.top<=t.clientY&&s.bottom>=t.clientY)return!0}return!1}function JX(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=an.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var ki=Object.create(null),pr=Object.create(null),uP=we.ie&&we.ie_version<15||we.ios&&we.webkit_version<604;function eZ(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),dP(e,n.value)},50)}function Wm(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function dP(e,t){t=Wm(e.state,D0,t);let{state:n}=e,r,i=1,a=n.toText(t),s=a.lines==n.selection.ranges.length;if(Hb!=null&&n.selection.ranges.every(c=>c.empty)&&Hb==a.toString()){let c=-1;r=n.changeByRange(d=>{let f=n.doc.lineAt(d.from);if(f.from==c)return{range:d};c=f.from;let m=n.toText((s?a.line(i++).text:t)+n.lineBreak);return{changes:{from:f.from,insert:m},range:Ee.cursor(d.from+m.length)}})}else s?r=n.changeByRange(c=>{let d=a.line(i++);return{changes:{from:c.from,to:c.to,insert:d.text},range:Ee.cursor(c.from+d.length)}}):r=n.replaceSelection(a);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}pr.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft};pr.wheel=pr.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()};ki.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1);pr.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")};pr.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")};ki.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(zA))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=nZ(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new FX(e,t,n,r)),r&&e.observer.ignore(()=>{TA(e.contentDOM);let a=e.root.activeElement;a&&!a.contains(e.contentDOM)&&a.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin("select.pointer");return!1};function Nk(e,t,n,r){if(r==1)return Ee.cursor(t,n);if(r==2)return AX(e.state,t,n);{let i=e.docView.lineAt(t,n),a=e.state.doc.lineAt(i?i.posAtEnd:t),s=i?i.posAtStart:a.from,l=i?i.posAtEnd:a.to;return l<e.state.doc.length&&l==a.to&&l++,Ee.range(s,l)}}var tZ=we.ie&&we.ie_version<=11,Rk=null,Mk=0,Lk=0;function fP(e){if(!tZ)return e.detail;let t=Rk,n=Lk;return Rk=e,Lk=Date.now(),Mk=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Mk+1)%3:1}function nZ(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=fP(t),i=e.state.selection;return{update(a){a.docChanged&&(n.pos=a.changes.mapPos(n.pos),i=i.map(a.changes))},get(a,s,l){let c=e.posAndSideAtCoords({x:a.clientX,y:a.clientY},!1),d,f=Nk(e,c.pos,c.assoc,r);if(n.pos!=c.pos&&!s){let m=Nk(e,n.pos,n.assoc,r),p=Math.min(m.from,f.from),O=Math.max(m.to,f.to);f=p<f.from?Ee.range(p,O,f.assoc):Ee.range(O,p,f.assoc)}return s?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):l&&r==1&&i.ranges.length>1&&(d=rZ(i,c.pos))?d:l?i.addRange(f):Ee.create([f])}}}function rZ(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return Ee.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}ki.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.tile.nearest(t.target);if(i&&i.isWidget()){let a=i.posAtStart,s=a+i.length;(a>=n.to||s<=n.from)&&(n=Ee.range(a,s))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",Wm(e.state,z0,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1};ki.dragend=e=>(e.inputState.draggedContent=null,!1);function Dk(e,t,n,r){if(n=Wm(e.state,D0,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,s=r&&a&&GX(e,t)?{from:a.from,to:a.to}:null,l={from:i,insert:n},c=e.state.changes(s?[s,l]:l);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}ki.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&Dk(e,t,r.filter(s=>s!=null).join(e.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let l=new FileReader;l.onerror=a,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[s]=l.result),a()},l.readAsText(n[s])}return!0}else{let r=t.dataTransfer.getData("Text");if(r)return Dk(e,t,r,!0),!0}return!1};ki.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=uP?null:t.clipboardData;return n?(dP(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(eZ(e),!1)};function iZ(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function aZ(e){let t=[],n=[],r=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let i=-1;for(let{from:a}of e.selection.ranges){let s=e.doc.lineAt(a);s.number>i&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Wm(e,z0,t.join(e.lineBreak)),ranges:n,linewise:r}}var Hb=null;ki.copy=ki.cut=(e,t)=>{if(!ju(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=aZ(e.state);if(!n&&!i)return!1;Hb=i?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let a=uP?null:t.clipboardData;return a?(a.clearData(),a.setData("text/plain",n),!0):(iZ(e,n),!1)};var hP=Po.define();function mP(e,t){let n=[];for(let r of e.facet(IA)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:hP.of(!0)}):null}function pP(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=mP(e.state,t);n?e.dispatch(n):e.update([])}},10)}pr.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),pP(e)};pr.blur=e=>{e.observer.clearSelectionRange(),pP(e)};pr.compositionstart=pr.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))};pr.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,we.chrome&&we.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))};pr.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()};ki.beforeinput=(e,t)=>{var n,r;if((t.inputType=="insertText"||t.inputType=="insertCompositionText")&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType=="insertReplacementText"&&e.observer.editContext){let a=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=t.getTargetRanges();if(a&&s.length){let l=s[0],c=e.posAtDOM(l.startContainer,l.startOffset),d=e.posAtDOM(l.endContainer,l.endOffset);return I0(e,{from:c,to:d,insert:e.state.toText(a)},null),!0}}let i;if(we.chrome&&we.android&&(i=lP.find(a=>a.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let a=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>a+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return we.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),we.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>pr.compositionend(e,t),20),!1};var zk=new Set;function sZ(e){zk.has(e)||(zk.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}var $k=["pre-wrap","normal","pre-line","break-spaces"],Xl=!1;function qk(){Xl=!1}var oZ=class{constructor(e){this.lineWrapping=e,this.doc=_t.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return $k.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let s=$k.indexOf(e)>-1,l=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=s||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,l){this.heightSamples={};for(let c=0;c<a.length;c++){let d=a[c];d<0?c++:this.heightSamples[Math.floor(d*10)]=!0}}return l}},lZ=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},ka=class gP{constructor(t,n,r,i,a){this.from=t,this.length=n,this.top=r,this.height=i,this._content=a}get type(){return typeof this._content=="number"?hr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Hu?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new gP(this.from,this.length+t.length,this.top,this.height+t.height,n)}},It=(function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e})(It||(It={})),Xh=.001,wi=class Zh{constructor(t,n,r=2){this.length=t,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>Xh&&(Xl=!0),this.height=t)}replace(t,n,r){return Zh.of(r)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,r,i){let a=this,s=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:c,toA:d,fromB:f,toB:m}=i[l],p=a.lineAt(c,It.ByPosNoHeight,r.setDoc(n),0,0),O=p.to>=d?p:a.lineAt(d,It.ByPosNoHeight,r,0,0);for(m+=O.to-d,d=O.to;l>0&&p.from<=i[l-1].toA;)c=i[l-1].fromA,f=i[l-1].fromB,l--,c<p.from&&(p=a.lineAt(c,It.ByPosNoHeight,r,0,0));f+=p.from-c,c=p.from;let b=fZ.build(r.setDoc(s),t,f,m);a=fm(a,a.replace(c,d,b))}return a.updateHeight(r,0)}static empty(){return new Xi(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let l=t[n-1];l.break?t.splice(--n,1,l.left,null,l.right):t.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(a>i*2){let l=t[r];l.break?t.splice(r,1,l.left,null,l.right):t.splice(r,1,l.left,l.right),r+=2+l.break,a-=l.size}else break;else if(i<a){let l=t[n++];l&&(i+=l.size)}else{let l=t[--r];l&&(a+=l.size)}let s=0;return t[n-1]==null?(s=1,n--):t[n]==null&&(s=1,r++),new uZ(Zh.of(t.slice(0,n)),s,Zh.of(t.slice(r)))}};function fm(e,t){return e==t?e:(e.constructor!=t.constructor&&(Xl=!0),t)}wi.prototype.size=1;var cZ=Xt.replace({}),vP=class extends wi{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new ka(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new ka(r,0,n,this.spaceAbove,cZ):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,It.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},Xi=class Gb extends vP{constructor(t,n,r){super(t,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(t,n){return new ka(n,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof Gb||i instanceof Cl&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Cl?i=new Gb(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):wi.of(r)}updateHeight(t,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},Cl=class Oi extends wi{constructor(t){super(t,0)}heightMetrics(t,n){let r=t.doc.lineAt(n).number,i=t.doc.lineAt(n+this.length).number,a=i-r+1,s,l=0;if(t.lineWrapping){let c=Math.min(this.height,t.lineHeight*a);s=c/a,this.length>a+1&&(l=(this.height-c)/(this.length-a-1))}else s=this.height/a;return{firstLine:r,lastLine:i,perLine:s,perChar:l}}blockAt(t,n,r,i){let{firstLine:a,lastLine:s,perLine:l,perChar:c}=this.heightMetrics(n,i);if(n.lineWrapping){let d=i+(t<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-r)/this.height))*this.length)),f=n.doc.lineAt(d),m=l+f.length*c,p=Math.max(r,t-m/2);return new ka(f.from,f.length,p,m,0)}else{let d=Math.max(0,Math.min(s-a,Math.floor((t-r)/l))),{from:f,length:m}=n.doc.line(a+d);return new ka(f,m,r+l*d,l,0)}}lineAt(t,n,r,i,a){if(n==It.ByHeight)return this.blockAt(t,r,i,a);if(n==It.ByPosNoHeight){let{from:O,to:b}=r.doc.lineAt(t);return new ka(O,b-O,0,0,0)}let{firstLine:s,perLine:l,perChar:c}=this.heightMetrics(r,a),d=r.doc.lineAt(t),f=l+d.length*c,m=d.number-s,p=i+l*m+c*(d.from-a-m);return new ka(d.from,d.length,Math.max(i,Math.min(p,i+this.height-f)),f,0)}forEachLine(t,n,r,i,a,s){t=Math.max(t,a),n=Math.min(n,a+this.length);let{firstLine:l,perLine:c,perChar:d}=this.heightMetrics(r,a);for(let f=t,m=i;f<=n;){let p=r.doc.lineAt(f);if(f==t){let b=p.number-l;m+=c*b+d*(t-a-b)}let O=c+d*p.length;s(new ka(p.from,p.length,m,O,0)),m+=O,f=p.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let a=r[r.length-1];a instanceof Oi?r[r.length-1]=new Oi(a.length+i):r.push(null,new Oi(i-1))}if(t>0){let a=r[0];a instanceof Oi?r[0]=new Oi(t+a.length):r.unshift(new Oi(t-1),null)}return wi.of(r)}decomposeLeft(t,n){n.push(new Oi(t-1),null)}decomposeRight(t,n){n.push(null,new Oi(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],l=Math.max(n,i.from),c=-1;for(i.from>n&&s.push(new Oi(i.from-n-1).updateHeight(t,n));l<=a&&i.more;){let f=t.doc.lineAt(l).length;s.length&&s.push(null);let m=i.heights[i.index++],p=0;m<0&&(p=-m,m=i.heights[i.index++]),c==-1?c=m:Math.abs(m-c)>=Xh&&(c=-2);let O=new Xi(f,m,p);O.outdated=!1,s.push(O),l+=f+1}l<=a&&s.push(null,new Oi(a-l).updateHeight(t,l));let d=wi.of(s);return(c<0||Math.abs(d.height-this.height)>=Xh||Math.abs(c-this.heightMetrics(t,n).perLine)>=Xh)&&(Xl=!0),fm(this,d)}else(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},uZ=class extends wi{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,s=i+this.left.length+this.break,l=t==It.ByHeight?e<a:e<s,c=l?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,s);if(this.break||(l?c.to<s:c.from>s))return c;let d=t==It.ByPosNoHeight?It.ByPosNoHeight:It.ByPos;return l?c.join(this.right.lineAt(s,d,n,a,s)):this.left.lineAt(s,d,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let s=r+this.left.height,l=i+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,t,n,r,i,a),t>=l&&this.right.forEachLine(e,t,n,s,l,a);else{let c=this.lineAt(l,It.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,s,l,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let s of n)i.push(s);if(e>0&&Ik(i,a-1),t<this.length){let s=i.length;this.decomposeRight(t,i),Ik(i,s)}return wi.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?wi.of(this.break?[e,null,t]:[e,t]):(this.left=fm(this.left,e),this.right=fm(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,s=t+i.length+this.break,l=null;return r&&r.from<=t+i.length&&r.more?l=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+a.length&&r.more?l=a=a.updateHeight(e,s,n,r):a.updateHeight(e,s,n),l?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function Ik(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof Cl&&(r=e[t+1])instanceof Cl&&e.splice(t-1,3,new Cl(n.length+1+r.length))}var dZ=5,fZ=class OP{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Xi?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Xi(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,r){if(t<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,a=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-t;r.block?this.addBlock(new vP(s,i,r)):(s||a||i>=dZ)&&this.addLineDeco(i,a,s)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new Xi(this.pos-t,-1,0)),this.writtenTo=this.pos}blankContent(t,n){let r=new Cl(n-t);return this.oracle.doc.lineAt(t).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Xi)return t;let n=new Xi(0,-1,0);return this.nodes.push(n),n}addBlock(t){this.enterLine();let n=t.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,n&&n.endSide>0&&(this.covering=t)}addLineDeco(t,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Xi)&&!this.isCovered?this.nodes.push(new Xi(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=t;for(let i of this.nodes)i instanceof Xi&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(t,n,r,i){let a=new OP(r,t);return Ht.spans(n,r,i,a,0),a.finish(r)}};function hZ(e,t,n){let r=new mZ;return Ht.compare(e,t,n,r,0),r.changes}var mZ=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&jl(e,t,this.changes,5)}};function pZ(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let d=e.parentNode;d&&d!=r.body;)if(d.nodeType==1){let f=d,m=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&m.overflow!="visible"){let p=f.getBoundingClientRect();a=Math.max(a,p.left),s=Math.min(s,p.right),l=Math.max(l,p.top),c=Math.min(d==e.parentNode?i.innerHeight:c,p.bottom)}d=m.position=="absolute"||m.position=="fixed"?f.offsetParent:f.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:a-n.left,right:Math.max(a,s)-n.left,top:l-(n.top+t),bottom:Math.max(l,c)-(n.top+t)}}function gZ(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function vZ(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var tO=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return Xt.replace({widget:new OZ(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},OZ=class extends nc{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}},Xk=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Zk,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=bn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet($0).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new oZ(n),this.stateDeco=Bk(t),this.heightMap=wi.empty().applyChanges(this.stateDeco,_t.empty,this.heightOracle.setDoc(t.doc),[new Ca(0,0,0,t.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Xt.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:i,to:a})=>r>=i&&r<=a)){let{from:i,to:a}=this.lineBlockAt(r);e.push(new uh(i,a))}}return this.viewports=e.sort((n,r)=>n.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Zk:new xZ(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(pu(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=Bk(this.state);let r=e.changedRanges,i=Ca.extendWithRanges(r,hZ(n,this.stateDeco,e?e.changes:Gi.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);qk(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||Xl)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<l.from||t.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(lX)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?bn.RTL:bn.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent==="refresh",s=t.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,d=0;if(s.width&&s.height){let{scaleX:E,scaleY:Q}=kA(t,s);(E>.005&&Math.abs(this.scaleX-E)>.005||Q>.005&&Math.abs(this.scaleY-Q)>.005)&&(this.scaleX=E,this.scaleY=Q,c|=16,a=l=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,m=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=m)&&(this.paddingTop=f,this.paddingBottom=m,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let p=jA(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let O=this.getScrollOffset();this.scrollOffset!=O&&(this.scrollAnchorHeight=-1,this.scrollOffset=O),this.scrolledToBottom=CA(this.scrollParent||e.win);let b=(this.printing?vZ:pZ)(t,this.paddingTop),x=b.top-this.pixelViewport.top,w=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(l=!0)),!this.inView&&!this.scrollTarget&&!gZ(e.dom))return 0;let T=s.width;if((this.contentDOMWidth!=T||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let E=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(E)&&(a=!0),a||r.lineWrapping&&Math.abs(T-this.contentDOMWidth)>r.charWidth){let{lineHeight:Q,charWidth:A,textHeight:M}=e.docView.measureTextSize();a=Q>0&&r.refresh(i,Q,A,M,Math.max(5,T/A),E),a&&(e.docView.minWidth=0,c|=16)}x>0&&w>0?d=Math.max(x,w):x<0&&w<0&&(d=Math.min(x,w)),qk();for(let Q of this.viewports){let A=Q.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(Q);this.heightMap=(a?wi.empty().applyChanges(this.stateDeco,_t.empty,this.heightOracle,[new Ca(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new lZ(Q.from,A))}Xl&&(c|=2)}let j=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return j&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),c|=this.updateForViewport()),(c&2||j)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new uh(r.lineAt(a-n*1e3,It.ByHeight,i,0,0).from,r.lineAt(s+(1-n)*1e3,It.ByHeight,i,0,0).to);if(t){let{head:c}=t.range;if(c<l.from||c>l.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,It.ByPos,i,0,0),m;t.y=="center"?m=(f.top+f.bottom)/2-d/2:t.y=="start"||t.y=="nearest"&&c<l.from?m=f.top:m=f.bottom-d,l=new uh(r.lineAt(m-1e3/2,It.ByHeight,i,0,0).from,r.lineAt(m+d+1e3/2,It.ByHeight,i,0,0).to)}}return l}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new uh(this.heightMap.lineAt(n,It.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,It.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,It.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,It.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<s+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new tO(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=bn.LTR&&!n)return[];let s=[],l=(d,f,m,p)=>{if(f-d<i)return;let O=this.state.selection.main,b=[O.from];O.empty||b.push(O.to);for(let w of b)if(w>d&&w<f){l(d,w-10,m,p),l(w+10,f,m,p);return}let x=yZ(e,w=>w.from>=m.from&&w.to<=m.to&&Math.abs(w.from-d)<i&&Math.abs(w.to-f)<i&&!b.some(k=>w.from<k&&w.to>k));if(!x){if(f<m.to&&t&&n&&t.visibleRanges.some(T=>T.from<=f&&T.to>=f)){let T=t.moveToLineBoundary(Ee.cursor(f),!1,!0).head;T>d&&(f=T)}let w=this.gapSize(m,d,f,p),k=n||w<2e6?w:2e6;x=new tO(d,f,w,k)}s.push(x)},c=d=>{if(d.length<a||d.type!=hr.Text)return;let f=bZ(d.from,d.to,this.stateDeco);if(f.total<a)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,p,O;if(n){let b=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,x,w;if(m!=null){let k=fh(f,m),T=((this.visibleBottom-this.visibleTop)/2+b)/d.height;x=k-T,w=k+T}else x=(this.visibleTop-d.top-b)/d.height,w=(this.visibleBottom-d.top+b)/d.height;p=dh(f,x),O=dh(f,w)}else{let b=f.total*this.heightOracle.charWidth,x=r*this.heightOracle.charWidth,w=0;if(b>2e6)for(let Q of e)Q.from>=d.from&&Q.from<d.to&&Q.size!=Q.displaySize&&Q.from*this.heightOracle.charWidth+w<this.pixelViewport.left&&(w=Q.size-Q.displaySize);let k=this.pixelViewport.left+w,T=this.pixelViewport.right+w,j,E;if(m!=null){let Q=fh(f,m),A=((T-k)/2+x)/b;j=Q-A,E=Q+A}else j=(k-x)/b,E=(T+x)/b;p=dh(f,j),O=dh(f,E)}p>d.from&&l(d.from,p,d,f),O<d.to&&l(O,d.to,d,f)};for(let d of this.viewportLines)Array.isArray(d.type)?d.type.forEach(c):c(d);return s}gapSize(e,t,n,r){let i=fh(r,n)-fh(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){tO.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Xt.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Ht.spans(t,this.viewport.from,this.viewport.to,{span(i,a){n.push({from:i,to:a})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let i=0;i<n.length&&!(r&8);i++){let a=this.visibleRanges[i],s=n[i];(a.from!=s.from||a.to!=s.to)&&(r|=4,e&&e.mapPos(a.from,-1)==s.from&&e.mapPos(a.to,1)==s.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||pu(this.heightMap.lineAt(e,It.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||pu(this.heightMap.lineAt(this.scaler.fromDOM(e),It.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return pu(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},uh=class{constructor(e,t){this.from=e,this.to=t}};function bZ(e,t,n){let r=[],i=e,a=0;return Ht.spans(n,e,t,{span(){},point(s,l){s>i&&(r.push({from:i,to:s}),a+=s-i),i=l}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function dh({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let i=0;;i++){let{from:a,to:s}=t[i],l=s-a;if(r<=l)return a+r;r-=l}}function fh(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function yZ(e,t){for(let n of e)if(t(n))return n}var Zk={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function Bk(e){let t=e.facet(Vm).filter(r=>typeof r!="function"),n=e.facet(q0).filter(r=>typeof r!="function");return n.length&&t.push(Ht.join(n)),t}var xZ=class bP{constructor(t,n,r){let i=0,a=0,s=0;this.viewports=r.map(({from:l,to:c})=>{let d=n.lineAt(l,It.ByPos,t,0,0).top,f=n.lineAt(c,It.ByPos,t,0,0).bottom;return i+=f-d,{from:l,to:c,top:d,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=s+(l.top-a)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),a=l.bottom}toDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.top)return i+(t-r)*this.scale;if(t<=a.bottom)return a.domTop+(t-a.top);r=a.bottom,i=a.domBottom}}fromDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.domTop)return r+(t-i)/this.scale;if(t<=a.domBottom)return a.top+(t-a.domTop);r=a.bottom,i=a.domBottom}}eq(t){return t instanceof bP?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((n,r)=>n.from==t.viewports[r].from&&n.to==t.viewports[r].to):!1}};function pu(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new ka(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(i=>pu(i,t)):e._content)}var hh=qe.define({combine:e=>e.join(" ")}),Kb=qe.define({combine:e=>e.indexOf(!0)>-1}),Jb=As.newName(),yP=As.newName(),xP=As.newName(),SP={"&light":"."+yP,"&dark":"."+xP};function ey(e,t,n){return new As(t,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return e;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):e+" "+r}})}var SZ=ey("."+Jb,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},SP),wZ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},nO=we.ie&&we.ie_version<=11,_Z=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new H2,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(we.ie&&we.ie_version<=11||we.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&we.android&&e.constructor.EDIT_CONTEXT!==!1&&!(we.chrome&&we.chrome_version<126)&&(this.editContext=new jZ(e),e.state.facet(_a)&&(e.contentDOM.editContext=this.editContext.editContext)),nO&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(_a)?n.root.activeElement!=this.dom:!ju(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(we.ie&&we.ie_version<=11||we.android&&we.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Tu(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Gu(e.root);if(!t)return!1;let n=we.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&kZ(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=ju(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&K2(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,wZ),nO&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),nO&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let r=()=>{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&Tl(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let a=this.readMutation(i);a&&(a.typeOver&&(r=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&ju(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new IX(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=sP(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!dm(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let n=Vk(t,e.previousSibling||e.target.previousSibling,-1),r=Vk(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(_a)!=e.state.facet(_a)&&(e.view.contentDOM.editContext=e.state.facet(_a)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function Vk(e,t,n){for(;t;){let r=an.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function Uk(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor,1);return Tu(s.node,s.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function kZ(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return Uk(e,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?Uk(e,n):null}var jZ=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,s=this.toEditorPos(n.updateRangeStart),l=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:s,drifted:!1});let c=l-s>n.text.length;s==this.from&&i<this.from?s=i:l==this.to&&i>this.to&&(l=i);let d=oP(e.state.sliceDoc(s,l),n.text,(c?r.from:r.to)-s,c?"end":null);if(!d){let m=Ee.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));dm(m,r)||e.dispatch({selection:m,userEvent:"select"});return}let f={from:d.from+s,to:d.toA+s,insert:_t.of(n.text.slice(d.from,d.toB).split(`
58
+ `))};if((we.mac||we.android)&&f.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:s,to:l,insert:_t.of([n.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let m=this.to-this.from+(f.to-f.from+f.insert.length);I0(e,f,Ee.single(this.toEditorPos(n.selectionStart,m),this.toEditorPos(n.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let a=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);a<s;a++){let l=e.coordsForChar(a);i=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=n=>{let r=[];for(let i of n.getTextFormats()){let a=i.underlineStyle,s=i.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let l=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);if(l<c){let d=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(s)?1:2}px`;r.push(Xt.mark({attributes:{style:d}}).range(l,c))}}}e.dispatch({effects:BA.of(Xt.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let r=Gu(n.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,s,l,c)=>{if(n)return;let d=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=d,this.to+=d;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=d}t+=d}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},$e=class ty{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:r}=t;this.dispatchTransactions=t.dispatchTransactions||r&&(i=>i.forEach(a=>r(a,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=t.root||G2(t.parent)||document,this.viewState=new Xk(this,t.state||Kt.create(t)),t.scrollTo&&t.scrollTo.is(oh)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(xl).map(i=>new Hv(i));for(let i of this.plugins)i.update(this);this.observer=new _Z(this),this.inputState=new VX(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Ek(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let n=t.length==1&&t[0]instanceof ii?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(n,this)}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,a=this.state;for(let p of t){if(p.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=p.state}if(this.destroyed){this.viewState.state=a;return}let s=this.hasFocus,l=0,c=null;t.some(p=>p.annotation(hP))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=mP(a,s),c||(l=1));let d=this.observer.delayedAndroidKey,f=null;if(d?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(f=null)):this.observer.clear(),a.facet(Kt.phrases)!=this.state.facet(Kt.phrases))return this.setState(a);i=jk.create(this,a,t),i.flags|=l;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let p of t){if(m&&(m=m.map(p.changes)),p.scrollIntoView){let{main:O}=p.state.selection;m=new Fv(O.empty?O:Ee.cursor(O.head,O.head>O.anchor?-1:1))}for(let O of p.effects)O.is(oh)&&(m=O.value.clip(this.state))}this.viewState.update(i,m),this.bidiCache=Wk.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(hu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(p=>p.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(hh)!=i.state.facet(hh)&&(this.viewState.mustMeasureContent=!0),(n||r||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let p of this.state.facet(Bb))try{p(i)}catch(O){Yi(this.state,O,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!sP(this,f)&&d.force&&Tl(this.contentDOM,d.key,d.keyCode)})}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Xk(this,t),this.plugins=t.facet(xl).map(r=>new Hv(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Ek(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(xl),r=t.state.facet(xl);if(n!=r){let i=[];for(let a of r){let s=n.indexOf(a);if(s<0)i.push(new Hv(a));else{let l=this.plugins[s];l.mustUpdate=t,i.push(l)}}for(let a of this.plugins)a.mustUpdate!=t&&a.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=t;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let n=t.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){Yi(this.state,r,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:a,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(CA(r||this.win))a=-1,s=this.viewState.heightMap.height;else{let O=this.viewState.scrollAnchorAt(i);a=O.from,s=O.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];c&4||([this.measureRequests,d]=[d,this.measureRequests]);let f=d.map(O=>{try{return O.read(this)}catch(b){return Yi(this.state,b),Yk}}),m=jk.create(this,this.state,[]),p=!1;m.flags|=c,n?n.flags|=c:n=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),p=this.docView.update(m),p&&this.docViewUpdate());for(let O=0;O<d.length;O++)if(f[O]!=Yk)try{let b=d[O];b.write&&b.write(f[O],this)}catch(b){Yi(this.state,b)}if(p&&this.docView.updateSelection(!0),!m.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let b=((a<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(a).top)-s)/this.scaleY;if((b>1||b<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+b,r?r.scrollTop+=b:this.win.scrollBy(0,b),s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(Bb))l(n)}get themeClasses(){return Jb+" "+(this.state.facet(Kb)?xP:yP)+" "+this.state.facet(hh)}updateAttrs(){let t=Fk(this,VA,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(_a)?"true":"false",class:"cm-content",style:`${we.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Fk(this,$0,n);let r=this.observer.ignore(()=>{let i=xk(this.contentDOM,this.contentAttrs,n),a=xk(this.dom,this.editorAttrs,t);return i||a});return this.editorAttrs=t,this.contentAttrs=n,r}showAnnouncements(t){let n=!0;for(let r of t)for(let i of r.effects)if(i.is(ty.announce)){n&&(this.announceDOM.textContent=""),n=!1;let a=this.announceDOM.appendChild(document.createElement("div"));a.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(hu);let t=this.state.facet(ty.cspNonce);As.mount(this.root,this.styleModules.concat(SZ).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===t.key){this.measureRequests[n]=t;return}}this.measureRequests.push(t)}}plugin(t){let n=this.pluginMap.get(t);return(n===void 0||n&&n.plugin!=t)&&this.pluginMap.set(t,n=this.plugins.find(r=>r.plugin==t)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,r){return eO(this,t,Qk(this,t,n,r))}moveByGroup(t,n){return eO(this,t,Qk(this,t,n,r=>MX(this,t.head,r)))}visualLineSide(t,n){let r=this.bidiSpans(t),i=this.textDirectionAt(t.from),a=r[n?r.length-1:0];return Ee.cursor(a.side(n,i)+t.from,a.forward(!n,i)?1:-1)}moveToLineBoundary(t,n,r=!0){return RX(this,t,n,r)}moveVertically(t,n,r){return eO(this,t,LX(this,t,n,r))}domAtPos(t,n=1){return this.docView.domAtPos(t,n)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){this.readMeasured();let r=Fb(this,t,n);return r&&r.pos}posAndSideAtCoords(t,n=!0){return this.readMeasured(),Fb(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let r=this.docView.coordsAt(t,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(t),a=this.bidiSpans(i),s=a[Ui.find(a,t-i.from,-1,n)];return om(r,s.dir==bn.LTR==n>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(XA)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>TZ)return RA(t.length);let n=this.textDirectionAt(t.from),r;for(let a of this.bidiCache)if(a.from==t.from&&a.dir==n&&(a.fresh||NA(a.isolates,r=kk(this,t))))return a.order;r||(r=kk(this,t));let i=aX(t.text,n,r);return this.bidiCache.push(new Wk(t.from,t.to,n,r,!0,i)),i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||we.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{TA(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){return oh.of(new Fv(typeof t=="number"?Ee.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(t);return oh.of(new Fv(Ee.cursor(r.from),"start","start",r.top-t,n,!0))}setTabFocusMode(t){t==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof t=="boolean"?this.inputState.tabFocusMode=t?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return Ju.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return Ju.define(()=>({}),{eventObservers:t})}static theme(t,n){let r=As.newName(),i=[hh.of(r),hu.of(ey(`.${r}`,t))];return n&&n.dark&&i.push(Kb.of(!0)),i}static baseTheme(t){return yd.lowest(hu.of(ey("."+Jb,t,SP)))}static findFromDOM(t){var n;let r=t.querySelector(".cm-content"),i=r&&an.get(r)||an.get(t);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}};$e.styleModule=hu;$e.inputHandler=qA;$e.clipboardInputFilter=D0;$e.clipboardOutputFilter=z0;$e.scrollHandler=ZA;$e.focusChangeEffect=IA;$e.perLineTextDirection=XA;$e.exceptionSink=$A;$e.updateListener=Bb;$e.editable=_a;$e.mouseSelectionStyle=zA;$e.dragMovesSelection=DA;$e.clickAddsSelectionRange=LA;$e.decorations=Vm;$e.blockWrappers=UA;$e.outerDecorations=q0;$e.atomicRanges=xd;$e.bidiIsolatedRanges=YA;$e.scrollMargins=WA;$e.darkTheme=Kb;$e.cspNonce=qe.define({combine:e=>e.length?e[0]:""});$e.contentAttributes=$0;$e.editorAttributes=VA;$e.lineWrapping=$e.contentAttributes.of({class:"cm-lineWrapping"});$e.announce=rn.define();var TZ=4096,Yk={},Wk=class wP{constructor(t,n,r,i,a,s){this.from=t,this.to=n,this.dir=r,this.isolates=i,this.fresh=a,this.order=s}static update(t,n){if(n.empty&&!t.some(a=>a.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:bn.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let s=t[a];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new wP(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}};function Fk(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let a=r[i],s=typeof a=="function"?a(e):a;s&&P0(s,n)}return n}var CZ=we.mac?"mac":we.windows?"win":we.linux?"linux":"key";function EZ(e,t){const n=e.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,a,s,l;for(let c=0;c<n.length-1;++c){const d=n[c];if(/^(cmd|meta|m)$/i.test(d))l=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))a=!0;else if(/^s(hift)?$/i.test(d))s=!0;else if(/^mod$/i.test(d))t=="mac"?l=!0:a=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(r="Alt-"+r),a&&(r="Ctrl-"+r),l&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function mh(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n!==!1&&t.shiftKey&&(e="Shift-"+e),e}var QZ=yd.default($e.domEventHandlers({keydown(e,t){return RZ(AZ(t.state),e,t,"editor")}})),X0=qe.define({enables:QZ}),Hk=new WeakMap;function AZ(e){let t=e.facet(X0),n=Hk.get(t);return n||Hk.set(t,n=NZ(t.reduce((r,i)=>r.concat(i),[]))),n}var bs=null,PZ=4e3;function NZ(e,t=CZ){let n=Object.create(null),r=Object.create(null),i=(s,l)=>{let c=r[s];if(c==null)r[s]=l;else if(c!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},a=(s,l,c,d,f)=>{var m,p;let O=n[s]||(n[s]=Object.create(null)),b=l.split(/ (?!$)/).map(k=>EZ(k,t));for(let k=1;k<b.length;k++){let T=b.slice(0,k).join(" ");i(T,!0),O[T]||(O[T]={preventDefault:!0,stopPropagation:!1,run:[j=>{let E=bs={view:j,prefix:T,scope:s};return setTimeout(()=>{bs==E&&(bs=null)},PZ),!0}]})}let x=b.join(" ");i(x,!1);let w=O[x]||(O[x]={preventDefault:!1,stopPropagation:!1,run:((p=(m=O._any)===null||m===void 0?void 0:m.run)===null||p===void 0?void 0:p.slice())||[]});c&&w.run.push(c),d&&(w.preventDefault=!0),f&&(w.stopPropagation=!0)};for(let s of e){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let d of l){let f=n[d]||(n[d]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=s;for(let p in f)f[p].run.push(O=>m(O,ny))}let c=s[t]||s.key;if(c)for(let d of l)a(d,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&a(d,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return n}var ny=null;function RZ(e,t,n,r){ny=t;let i=Z2(t),a=w2(i,0),s=_2(a)==i.length&&i!=" ",l="",c=!1,d=!1,f=!1;bs&&bs.view==n&&bs.scope==r&&(l=bs.prefix+" ",cP.indexOf(t.keyCode)<0&&(d=!0,bs=null));let m=new Set,p=w=>{if(w){for(let k of w.run)if(!m.has(k)&&(m.add(k),k(n)))return w.stopPropagation&&(f=!0),!0;w.preventDefault&&(w.stopPropagation&&(f=!0),d=!0)}return!1},O=e[r],b,x;return O&&(p(O[l+mh(i,t,!s)])?c=!0:s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(we.windows&&t.ctrlKey&&t.altKey)&&!(we.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(b=Ps[t.keyCode])&&b!=i?(p(O[l+mh(b,t,!0)])||t.shiftKey&&(x=Fu[t.keyCode])!=i&&x!=b&&p(O[l+mh(x,t,!1)]))&&(c=!0):s&&t.shiftKey&&p(O[l+mh(i,t,!0)])&&(c=!0),!c&&p(O._any)&&(c=!0)),d&&(c=!0),c&&f&&t.stopPropagation(),ny=null,c}var _o=class extends Qs{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};_o.prototype.elementClass="";_o.prototype.toDOM=void 0;_o.prototype.mapMode=Gn.TrackBefore;_o.prototype.startSide=_o.prototype.endSide=-1;_o.prototype.point=!0;var rO=qe.define(),MZ=qe.define(),Bh=qe.define(),Gk=qe.define({combine:e=>e.some(t=>t)});function LZ(e){return[DZ]}var DZ=Ju.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(Bh).map(t=>new Jk(e,t)),this.fixed=!e.state.facet(Gk);for(let t of this.gutters)t.config.side=="after"?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(Gk)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ht.iter(this.view.state.facet(rO),this.view.viewport.from),r=[],i=this.gutters.map(a=>new zZ(a,this.view.viewport,-this.view.documentPadding.top));for(let a of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(a.type)){let s=!0;for(let l of a.type)if(l.type==hr.Text&&s){ry(n,r,l.from);for(let c of i)c.line(this.view,l,r);s=!1}else if(l.widget)for(let c of i)c.widget(this.view,l)}else if(a.type==hr.Text){ry(n,r,a.from);for(let s of i)s.line(this.view,a,r)}else if(a.widget)for(let s of i)s.widget(this.view,a);for(let a of i)a.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(Bh),n=e.state.facet(Bh),r=e.docChanged||e.heightChanged||e.viewportChanged||!Ht.eq(e.startState.facet(rO),e.state.facet(rO),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let i of this.gutters)i.update(e)&&(r=!0);else{r=!0;let i=[];for(let a of n){let s=t.indexOf(a);s<0?i.push(new Jk(this.view,a)):(this.gutters[s].update(e),i.push(this.gutters[s]))}for(let a of this.gutters)a.dom.remove(),i.indexOf(a)<0&&a.destroy();for(let a of i)a.config.side=="after"?this.getDOMAfter().appendChild(a.dom):this.dom.appendChild(a.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>$e.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==bn.LTR?{left:r,right:i}:{right:r,left:i}})});function Kk(e){return Array.isArray(e)?e:[e]}function ry(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var zZ=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Ht.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let s=new _P(e,a,i,n);r.elements.push(s),r.dom.appendChild(s.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];ry(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let i of e.state.facet(MZ)){let a=i(e,t.widget,t);a&&(r||(r=[])).push(a)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Jk=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let l=i.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=r.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=Kk(t.markers(e)),t.initialSpacer&&(this.spacer=new _P(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Kk(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let n=e.view.viewport;return!Ht.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},_P=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),$Z(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,a=0;;){let s=a,l=i<t.length?t[i++]:null,c=!1;if(l){let d=l.elementClass;d&&(n+=" "+d);for(let f=a;f<this.markers.length;f++)if(this.markers[f].compare(l)){s=f,c=!0;break}}else s=this.markers.length;for(;a<s;){let d=this.markers[a++];if(d.toDOM){d.destroy(r);let f=r.nextSibling;r.remove(),r=f}}if(!l)break;l.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(l.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function $Z(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var qZ=qe.define(),IZ=qe.define(),Sl=qe.define({combine(e){return L2(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let r=Object.assign({},t);for(let i in n){let a=r[i],s=n[i];r[i]=a?(l,c,d)=>a(l,c,d)||s(l,c,d):s}return r}})}}),iO=class extends _o{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function aO(e,t){return e.state.facet(Sl).formatNumber(t,e.state)}var XZ=Bh.compute([Sl],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(qZ)},lineMarker(t,n,r){return r.some(i=>i.toDOM)?null:new iO(aO(t,t.state.doc.lineAt(n.from).number))},widgetMarker:(t,n,r)=>{for(let i of t.state.facet(IZ)){let a=i(t,n,r);if(a)return a}return null},lineMarkerChange:t=>t.startState.facet(Sl)!=t.state.facet(Sl),initialSpacer(t){return new iO(aO(t,ej(t.state.doc.lines)))},updateSpacer(t,n){let r=aO(n.view,ej(n.view.state.doc.lines));return r==t.number?t:new iO(r)},domEventHandlers:e.facet(Sl).domEventHandlers,side:"before"}));function hm(e={}){return[Sl.of(e),LZ(),XZ]}function ej(e){let t=9;for(;t<e;)t=t*10+9;return t}var kP=1024,ZZ=0,ti=class{constructor(e,t){this.from=e,this.to=t}},Ke=class{constructor(e={}){this.id=ZZ++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ln.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Ke.closedBy=new Ke({deserialize:e=>e.split(" ")});Ke.openedBy=new Ke({deserialize:e=>e.split(" ")});Ke.group=new Ke({deserialize:e=>e.split(" ")});Ke.isolate=new Ke({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});Ke.contextHash=new Ke({perNode:!0});Ke.lookAhead=new Ke({perNode:!0});Ke.mounted=new Ke({perNode:!0});var El=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[Ke.mounted.id]}},BZ=Object.create(null),Ln=class jP{constructor(t,n,r,i=0){this.name=t,this.props=n,this.id=r,this.flags=i}static define(t){let n=t.props&&t.props.length?Object.create(null):BZ,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new jP(t.name||"",n,t.id,r);if(t.props){for(let a of t.props)if(Array.isArray(a)||(a=a(i)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[a[0].id]=a[1]}}return i}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(Ke.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let r in t)for(let i of r.split(" "))n[i]=t[r];return r=>{for(let i=r.prop(Ke.group),a=-1;a<(i?i.length:0);a++){let s=n[a<0?r.name:i[a]];if(s)return s}}}};Ln.none=new Ln("",Object.create(null),0,8);var Z0=class TP{constructor(t){this.types=t;for(let n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let n=[];for(let r of this.types){let i=null;for(let a of t){let s=a(r);if(s){i||(i=Object.assign({},r.props));let l=s[1],c=s[0];c.combine&&c.id in i&&(l=c.combine(i[c.id],l)),i[c.id]=l}}n.push(i?new Ln(r.name,i,r.id,r.flags):r)}return new TP(n)}},ph=new WeakMap,tj=new WeakMap,wt;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays",e[e.EnterBracketed=16]="EnterBracketed"})(wt||(wt={}));var At=class iy{constructor(t,n,r,i,a){if(this.type=t,this.children=n,this.positions=r,this.length=i,this.props=null,a&&a.length){this.props=Object.create(null);for(let[s,l]of a)this.props[typeof s=="number"?s:s.id]=l}}toString(){let t=El.get(this);if(t&&!t.overlay)return t.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(t=0){return new mm(this.topNode,t)}cursorAt(t,n=0,r=0){let i=ph.get(this)||this.topNode,a=new mm(i);return a.moveTo(t,n),ph.set(this,a._tree),a}get topNode(){return new li(this,0,0,null)}resolve(t,n=0){let r=td(ph.get(this)||this.topNode,t,n,!1);return ph.set(this,r),r}resolveInner(t,n=0){let r=td(tj.get(this)||this.topNode,t,n,!0);return tj.set(this,r),r}resolveStack(t,n=0){return WZ(this,t,n)}iterate(t){let{enter:n,leave:r,from:i=0,to:a=this.length}=t,s=t.mode||0,l=(s&wt.IncludeAnonymous)>0;for(let c=this.cursor(s|wt.IncludeAnonymous);;){let d=!1;if(c.from<=a&&c.to>=i&&(!l&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&r&&(l||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:V0(Ln.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new iy(this.type,n,r,i,this.propValues),t.makeTree||((n,r,i)=>new iy(Ln.none,n,r,i)))}static build(t){return FZ(t)}};At.empty=new At(Ln.none,[],[],0);var VZ=class CP{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new CP(this.buffer,this.index)}},Zl=class EP{constructor(t,n,r){this.buffer=t,this.length=n,this.set=r}get type(){return Ln.none}toString(){let t=[];for(let n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}childString(t){let n=this.buffer[t],r=this.buffer[t+3],i=this.set.types[n],a=i.name;if(/\W/.test(a)&&!i.isError&&(a=JSON.stringify(a)),t+=4,r==t)return a;let s=[];for(;t<r;)s.push(this.childString(t)),t=this.buffer[t+3];return a+"("+s.join(",")+")"}findChild(t,n,r,i,a){let{buffer:s}=this,l=-1;for(let c=t;c!=n&&!(QP(a,i,s[c+1],s[c+2])&&(l=c,r>0));c=s[c+3]);return l}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),s=0;for(let l=t,c=0;l<n;){a[c++]=i[l++],a[c++]=i[l++]-r;let d=a[c++]=i[l++]-r;a[c++]=i[l++]-t,s=Math.max(s,d)}return new EP(a,s,this.set)}};function QP(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function td(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let s=!r&&e instanceof li&&e.index<0?null:e.parent;if(!s)return e;e=s}let a=r?0:wt.IgnoreOverlays;if(r)for(let s=e,l=s.parent;l;s=l,l=s.parent)s instanceof li&&s.index<0&&((i=l.enter(t,n,a))===null||i===void 0?void 0:i.from)!=s.from&&(e=l);for(;;){let s=e.enter(t,n,a);if(!s)return e;e=s}}var AP=class{cursor(e=0){return new mm(this,e)}getChild(e,t=null,n=null){let r=nj(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return nj(this,e,t,n)}resolve(e,t=0){return td(this,e,t,!1)}resolveInner(e,t=0){return td(this,e,t,!0)}matchContext(e){return ay(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(n=t,t=r.prevSibling):t=r}return n}get node(){return this}get next(){return this.parent}},li=class Vh extends AP{constructor(t,n,r,i){super(),this._tree=t,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let s=this;;){for(let{children:l,positions:c}=s._tree,d=n>0?l.length:-1;t!=d;t+=n){let f=l[t],m=c[t]+s.from,p;if(!(!(a&wt.EnterBracketed&&f instanceof At&&(p=El.get(f))&&!p.overlay&&p.bracketed&&r>=m&&r<=m+f.length)&&!QP(i,r,m,m+f.length))){if(f instanceof Zl){if(a&wt.ExcludeBuffers)continue;let O=f.findChild(0,f.buffer.length,n,r-m,i);if(O>-1)return new nd(new UZ(s,f,t,m),null,O)}else if(a&wt.IncludeAnonymous||!f.type.isAnonymous||B0(f)){let O;if(!(a&wt.IgnoreMounts)&&(O=El.get(f))&&!O.overlay)return new Vh(O.tree,m,t,s);let b=new Vh(f,m,t,s);return a&wt.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?f.children.length-1:0,n,r,i,a)}}}if(a&wt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?t=s.index+n:t=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,n,r=0){let i;if(!(r&wt.IgnoreOverlays)&&(i=El.get(this._tree))&&i.overlay){let a=t-this.from,s=r&wt.EnterBracketed&&i.bracketed;for(let{from:l,to:c}of i.overlay)if((n>0||s?l<=a:l<a)&&(n<0||s?c>=a:c>a))return new Vh(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function nj(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function ay(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var UZ=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},nd=class gu extends AP{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,r){super(),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new gu(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,n,r=0){if(r&wt.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new gu(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new gu(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new gu(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:r}=this.context,i=this.index+4,a=r.buffer[this.index+3];if(a>i){let s=r.buffer[this.index+1];t.push(r.slice(i,a,s)),n.push(0)}return new At(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function PP(e){if(!e.length)return null;let t=0,n=e[0];for(let a=1;a<e.length;a++){let s=e[a];(s.from>n.from||s.to<n.to)&&(n=s,t=a)}let r=n instanceof li&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new YZ(i,n)}var YZ=class{constructor(e,t){this.heads=e,this.node=t}get next(){return PP(this.heads)}};function WZ(e,t,n){let r=e.resolveInner(t,n),i=null;for(let a=r instanceof li?r:r.context.parent;a;a=a.parent)if(a.index<0){let s=a.parent;(i||(i=[r])).push(s.resolve(t,n)),a=s}else{let s=El.get(a.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let l=new li(s.tree,s.overlay[0].from+a.from,-1,a);(i||(i=[r])).push(td(l,t,n,!1))}}return i?PP(i):r}var mm=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~wt.EnterBracketed,e instanceof li)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof li?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&wt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&wt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&wt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(r)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(r.buffer.buffer[i+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let i=t+e,a=e<0?-1:n._tree.children.length;i!=a;i+=e){let s=n._tree.children[i];if(this.mode&wt.IncludeAnonymous||s instanceof Zl||!s.type.isAnonymous||B0(s))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break e}r=this.stack[--i]}for(let r=n;r<this.stack.length;r++)t=new nd(this.buffer,t,this.stack[r]);return this.bufferNode=new nd(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return ay(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return ay(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function B0(e){return e.children.some(t=>t instanceof Zl||!t.type.isAnonymous||B0(t))}function FZ(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=kP,reused:a=[],minRepeatType:s=r.types.length}=e,l=Array.isArray(n)?new VZ(n,n.length):n,c=r.types,d=0,f=0;function m(Q,A,M,L,D,P){let{id:B,start:X,end:V,size:z}=l,Y=f,$=d;if(z<0)if(l.next(),z==-1){let G=a[B];M.push(G),L.push(X-Q);return}else if(z==-3){d=B;return}else if(z==-4){f=B;return}else throw new RangeError(`Unrecognized record size: ${z}`);let q=c[B],ee,le,I=X-Q;if(V-X<=i&&(le=w(l.pos-A,D))){let G=new Uint16Array(le.size-le.skip),re=l.pos-le.size,R=G.length;for(;l.pos>re;)R=k(le.start,G,R);ee=new Zl(G,V-le.start,r),I=le.start-Q}else{let G=l.pos-z;l.next();let re=[],R=[],ge=B>=s?B:-1,_e=0,ve=V;for(;l.pos>G;)ge>=0&&l.id==ge&&l.size>=0?(l.end<=ve-i&&(b(re,R,X,_e,l.end,ve,ge,Y,$),_e=re.length,ve=l.end),l.next()):P>2500?p(X,G,re,R):m(X,G,re,R,ge,P+1);if(ge>=0&&_e>0&&_e<re.length&&b(re,R,X,_e,X,ve,ge,Y,$),re.reverse(),R.reverse(),ge>-1&&_e>0){let Xe=O(q,$);ee=V0(q,re,R,0,re.length,0,V-X,Xe,Xe)}else ee=x(q,re,R,V-X,Y-V,$)}M.push(ee),L.push(I)}function p(Q,A,M,L){let D=[],P=0,B=-1;for(;l.pos>A;){let{id:X,start:V,end:z,size:Y}=l;if(Y>4)l.next();else{if(B>-1&&V<B)break;B<0&&(B=z-i),D.push(X,V,z),P++,l.next()}}if(P){let X=new Uint16Array(P*4),V=D[D.length-2];for(let z=D.length-3,Y=0;z>=0;z-=3)X[Y++]=D[z],X[Y++]=D[z+1]-V,X[Y++]=D[z+2]-V,X[Y++]=Y;M.push(new Zl(X,D[2]-V,r)),L.push(V-Q)}}function O(Q,A){return(M,L,D)=>{let P=0,B=M.length-1,X,V;if(B>=0&&(X=M[B])instanceof At){if(!B&&X.type==Q&&X.length==D)return X;(V=X.prop(Ke.lookAhead))&&(P=L[B]+X.length+V)}return x(Q,M,L,D,P,A)}}function b(Q,A,M,L,D,P,B,X,V){let z=[],Y=[];for(;Q.length>L;)z.push(Q.pop()),Y.push(A.pop()+M-D);Q.push(x(r.types[B],z,Y,P-D,X-P,V)),A.push(D-M)}function x(Q,A,M,L,D,P,B){if(P){let X=[Ke.contextHash,P];B=B?[X].concat(B):[X]}if(D>25){let X=[Ke.lookAhead,D];B=B?[X].concat(B):[X]}return new At(Q,A,M,L,B)}function w(Q,A){let M=l.fork(),L=0,D=0,P=0,B=M.end-i,X={size:0,start:0,skip:0};e:for(let V=M.pos-Q;M.pos>V;){let z=M.size;if(M.id==A&&z>=0){X.size=L,X.start=D,X.skip=P,P+=4,L+=4,M.next();continue}let Y=M.pos-z;if(z<0||Y<V||M.start<B)break;let $=M.id>=s?4:0,q=M.start;for(M.next();M.pos>Y;){if(M.size<0)if(M.size==-3||M.size==-4)$+=4;else break e;else M.id>=s&&($+=4);M.next()}D=q,L+=z,P+=$}return(A<0||L==Q)&&(X.size=L,X.start=D,X.skip=P),X.size>4?X:void 0}function k(Q,A,M){let{id:L,start:D,end:P,size:B}=l;if(l.next(),B>=0&&L<s){let X=M;if(B>4){let V=l.pos-(B-4);for(;l.pos>V;)M=k(Q,A,M)}A[--M]=X,A[--M]=P-Q,A[--M]=D-Q,A[--M]=L}else B==-3?d=L:B==-4&&(f=L);return M}let T=[],j=[];for(;l.pos>0;)m(e.start||0,e.bufferStart||0,T,j,-1,0);let E=(t=e.length)!==null&&t!==void 0?t:T.length?j[0]+T[0].length:0;return new At(c[e.topID],T.reverse(),j.reverse(),E)}var rj=new WeakMap;function Uh(e,t){if(!e.isAnonymous||t instanceof Zl||t.type!=e)return 1;let n=rj.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof At)){n=1;break}n+=Uh(e,r)}rj.set(t,n)}return n}function V0(e,t,n,r,i,a,s,l,c){let d=0;for(let b=r;b<i;b++)d+=Uh(e,t[b]);let f=Math.ceil(d*1.5/8),m=[],p=[];function O(b,x,w,k,T){for(let j=w;j<k;){let E=j,Q=x[j],A=Uh(e,b[j]);for(j++;j<k;j++){let M=Uh(e,b[j]);if(A+M>=f)break;A+=M}if(j==E+1){if(A>f){let M=b[E];O(M.children,M.positions,0,M.children.length,x[E]+T);continue}m.push(b[E])}else{let M=x[j-1]+b[j-1].length-Q;m.push(V0(e,b,x,E,j,Q,M,null,c))}p.push(Q+T-a)}}return O(t,n,r,i,0),(l||c)(m,p,s)}var NP=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof nd?this.setBuffer(e.context.buffer,e.index,t):e instanceof li&&this.map.set(e.tree,t)}get(e){return e instanceof nd?this.getBuffer(e.context.buffer,e.index):e instanceof li?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},Ql=class sy{constructor(t,n,r,i,a=!1,s=!1){this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(a?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new sy(0,t.length,t,0,!1,r)];for(let a of n)a.to>t.length&&i.push(a);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,s=t.length?t[0]:null;for(let l=0,c=0,d=0;;l++){let f=l<n.length?n[l]:null,m=f?f.fromA:1e9;if(m-c>=r)for(;s&&s.from<m;){let p=s;if(c>=p.from||m<=p.to||d){let O=Math.max(p.from,c)-d,b=Math.min(p.to,m)-d;p=O>=b?null:new sy(O,b,p.tree,p.offset+d,l>0,!!f)}if(p&&i.push(p),s.to>m)break;s=a<t.length?t[a++]:null}if(!f)break;c=f.toA,d=f.toA-f.toB}return i}},U0=class{startParse(e,t,n){return typeof e=="string"&&(e=new HZ(e)),n=n?n.length?n.map(r=>new ti(r.from,r.to)):[new ti(0,0)]:[new ti(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let i=r.advance();if(i)return i}}},HZ=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function RP(e){return(t,n,r,i)=>new KZ(t,e,n,r,i)}var ij=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function aj(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}var GZ=class{constructor(e,t,n,r,i,a,s,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=s,this.prev=l,this.depth=0,this.ranges=[]}},oy=new Ke({perNode:!0}),KZ=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new At(n.type,n.children,n.positions,n.length,n.propValues.concat([[oy,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Ke.mounted.id]=new El(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new tB(this.fragments),t=null,n=null,r=new mm(new li(this.baseTree,this.ranges[0].from,0,null),wt.IncludeAnonymous|wt.IgnoreMounts);e:for(let i,a;;){let s=!0,l;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)s=!1;else if(e.hasNode(r)){if(t){let c=t.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(c)for(let d of c.mount.overlay){let f=d.from+c.pos,m=d.to+c.pos;f>=r.from&&m<=r.to&&!t.ranges.some(p=>p.from<m&&p.to>f)&&t.ranges.push({from:f,to:m})}}s=!1}else if(n&&(a=JZ(n.ranges,r.from,r.to)))s=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(eB(r),t&&t.depth++,n&&n.depth++);let c=e.findMounts(r.from,i.parser);if(typeof i.overlay=="function")t=new GZ(i.parser,i.overlay,c,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let d=lj(this.ranges,i.overlay||(r.from<r.to?[new ti(r.from,r.to)]:[]));d.length&&aj(d),(d.length||!i.overlay)&&this.inner.push(new ij(i.parser,d.length?i.parser.startParse(this.input,cj(c,d),d):i.parser.startParse(""),i.overlay?i.overlay.map(f=>new ti(f.from-r.from,f.to-r.from)):null,!!i.bracketed,r.tree,d.length?d[0].from:r.from)),i.overlay?d.length&&(n={ranges:d,depth:0,prev:n}):s=!1}}else if(t&&(l=t.predicate(r))&&(l===!0&&(l=new ti(r.from,r.to)),l.from<l.to)){let c=t.ranges.length-1;c>=0&&t.ranges[c].to==l.from?t.ranges[c]={from:t.ranges[c].from,to:l.to}:t.ranges.push(l)}if(s&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let c=lj(this.ranges,t.ranges);c.length&&(aj(c),this.inner.splice(t.index,0,new ij(t.parser,t.parser.startParse(this.input,cj(t.mounts,c),c),t.ranges.map(d=>new ti(d.from-t.start,d.to-t.start)),t.bracketed,t.target,c[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function JZ(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function sj(e,t,n,r,i,a){if(t<n){let s=e.buffer[t+1];r.push(e.slice(t,n,s)),i.push(s-a)}}function eB(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),s=i.children[a],l=s.buffer,c=[a];function d(f,m,p,O,b,x){let w=n[x],k=[],T=[];sj(s,f,w,k,T,O);let j=l[w+1],E=l[w+2];c.push(k.length);let Q=x?d(w+4,l[w+3],s.set.types[l[w]],j,E-j,x-1):t.toTree();return k.push(Q),T.push(j-O),sj(s,l[w+3],m,k,T,O),new At(p,k,T,b)}i.children[a]=d(0,l.length,Ln.none,0,s.length,n.length-1);for(let f of c){let m=e.tree.children[f],p=e.tree.positions[f];e.yield(new li(m,p+e.from,f,e._tree))}}var oj=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(wt.IncludeAnonymous|wt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,wt.IgnoreOverlays|wt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof At)t=t.children[0];else break}return!1}},tB=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(oy))!==null&&t!==void 0?t:n.to,this.inner=new oj(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(oy))!==null&&e!==void 0?e:t.to,this.inner=new oj(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let i=this.inner.cursor.node;i;i=i.parent){let a=(n=i.tree)===null||n===void 0?void 0:n.prop(Ke.mounted);if(a&&a.parser==t)for(let s=this.fragI;s<this.fragments.length;s++){let l=this.fragments[s];if(l.from>=i.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:i.from-l.offset,mount:a})}}}return r}};function lj(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let s=e[i-1].to,l=e[i].from;for(;a<r.length;a++){let c=r[a];if(c.from>=l)break;c.to<=s||(n||(r=n=t.slice()),c.from<s?(n[a]=new ti(c.from,s),c.to>l&&n.splice(a+1,0,new ti(l,c.to))):c.to>l?n[a--]=new ti(l,c.to):n.splice(a--,1))}}return r}function nB(e,t,n,r){let i=0,a=0,s=!1,l=!1,c=-1e9,d=[];for(;;){let f=i==e.length?1e9:s?e[i].to:e[i].from,m=a==t.length?1e9:l?t[a].to:t[a].from;if(s!=l){let p=Math.max(c,n),O=Math.min(f,m,r);p<O&&d.push(new ti(p,O))}if(c=Math.min(f,m),c==1e9)break;f==c&&(s?(s=!1,i++):s=!0),m==c&&(l?(l=!1,a++):l=!0)}return d}function cj(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let s=r+(i.overlay?i.overlay[0].from:0),l=s+i.tree.length,c=Math.max(a.from,s),d=Math.min(a.to,l);if(i.overlay){let f=i.overlay.map(p=>new ti(p.from+r,p.to+r)),m=nB(t,f,c,d);for(let p=0,O=c;;p++){let b=p==m.length,x=b?d:m[p].from;if(x>O&&n.push(new Ql(O,x,i.tree,-s,a.from>=O||a.openStart,a.to<=x||a.openEnd)),b)break;O=m[p].to}}else n.push(new Ql(c,d,i.tree,-s,a.from>=s||a.openStart,a.to<=l||a.openEnd))}return n}var rB=0,Bi=class ly{constructor(t,n,r,i){this.name=t,this.set=n,this.base=r,this.modified=i,this.id=rB++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let r=typeof t=="string"?t:"?";if(t instanceof ly&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new ly(r,[],null,[]);if(i.set.push(i),n)for(let a of n.set)i.set.push(a);return i}static defineModifier(t){let n=new uj(t);return r=>r.modified.indexOf(n)>-1?r:uj.get(r.base||r,r.modified.concat(n).sort((i,a)=>i.id-a.id))}},iB=0,uj=class MP{constructor(t){this.name=t,this.instances=[],this.id=iB++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(l=>l.base==t&&aB(n,l.modified));if(r)return r;let i=[],a=new Bi(t.name,i,t,n);for(let l of n)l.instances.push(a);let s=sB(n);for(let l of t.set)if(!l.modified.length)for(let c of s)i.push(MP.get(l,c));return a}};function aB(e,t){return e.length==t.length&&e.every((n,r)=>n==t[r])}function sB(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((n,r)=>r.length-n.length)}function No(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let a=[],s=2,l=i;for(let m=0;;){if(l=="..."&&m>0&&m+3==i.length){s=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!p)throw new RangeError("Invalid path: "+i);if(a.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),m+=p[0].length,m==i.length)break;let O=i[m++];if(m==i.length&&O=="!"){s=0;break}if(O!="/")throw new RangeError("Invalid path: "+i);l=i.slice(m)}let c=a.length-1,d=a[c];if(!d)throw new RangeError("Invalid path: "+i);let f=new rd(r,s,c>0?a.slice(0,c):null);t[d]=f.sort(t[d])}}return LP.add(t)}var LP=new Ke({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new rd(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),rd=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};rd.empty=new rd([],2,null);function DP(e,t){let n=Object.create(null);for(let a of e)if(!Array.isArray(a.tag))n[a.tag.id]=a.class;else for(let s of a.tag)n[s.id]=a.class;let{scope:r,all:i=null}=t||{};return{style:a=>{let s=i;for(let l of a)for(let c of l.set){let d=n[c.id];if(d){s=s?s+" "+d:d;break}}return s},scope:r}}function oB(e,t){let n=null;for(let r of e){let i=r.style(t);i&&(n=n?n+" "+i:i)}return n}function lB(e,t,n,r=0,i=e.length){let a=new cB(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,"",a.highlighters),a.flush(i)}var cB=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:s,to:l}=e;if(s>=n||l<=t)return;a.isTop&&(i=this.highlighters.filter(p=>!p.scope||p.scope(a)));let c=r,d=uB(e)||rd.empty,f=oB(i,d.tags);if(f&&(c&&(c+=" "),c+=f,d.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(t,s),c),d.opaque)return;let m=e.tree&&e.tree.prop(Ke.mounted);if(m&&m.overlay){let p=e.node.enter(m.overlay[0].from+s,1),O=this.highlighters.filter(x=>!x.scope||x.scope(m.tree.type)),b=e.firstChild();for(let x=0,w=s;;x++){let k=x<m.overlay.length?m.overlay[x]:null,T=k?k.from+s:l,j=Math.max(t,w),E=Math.min(n,T);if(j<E&&b)for(;e.from<E&&(this.highlightRange(e,j,E,r,i),this.startSpan(Math.min(E,e.to),c),!(e.to>=T||!e.nextSibling())););if(!k||T>n)break;w=k.to+s,w>t&&(this.highlightRange(p.cursor(),Math.max(t,k.from+s),Math.min(n,w),"",O),this.startSpan(Math.min(n,w),c))}b&&e.parent()}else if(e.firstChild()){m&&(r="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function uB(e){let t=e.type.prop(LP);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var Oe=Bi.define,gh=Oe(),gs=Oe(),dj=Oe(gs),fj=Oe(gs),vs=Oe(),vh=Oe(vs),sO=Oe(vs),$i=Oe(),oo=Oe($i),Li=Oe(),Di=Oe(),cy=Oe(),iu=Oe(cy),Oh=Oe(),Z={comment:gh,lineComment:Oe(gh),blockComment:Oe(gh),docComment:Oe(gh),name:gs,variableName:Oe(gs),typeName:dj,tagName:Oe(dj),propertyName:fj,attributeName:Oe(fj),className:Oe(gs),labelName:Oe(gs),namespace:Oe(gs),macroName:Oe(gs),literal:vs,string:vh,docString:Oe(vh),character:Oe(vh),attributeValue:Oe(vh),number:sO,integer:Oe(sO),float:Oe(sO),bool:Oe(vs),regexp:Oe(vs),escape:Oe(vs),color:Oe(vs),url:Oe(vs),keyword:Li,self:Oe(Li),null:Oe(Li),atom:Oe(Li),unit:Oe(Li),modifier:Oe(Li),operatorKeyword:Oe(Li),controlKeyword:Oe(Li),definitionKeyword:Oe(Li),moduleKeyword:Oe(Li),operator:Di,derefOperator:Oe(Di),arithmeticOperator:Oe(Di),logicOperator:Oe(Di),bitwiseOperator:Oe(Di),compareOperator:Oe(Di),updateOperator:Oe(Di),definitionOperator:Oe(Di),typeOperator:Oe(Di),controlOperator:Oe(Di),punctuation:cy,separator:Oe(cy),bracket:iu,angleBracket:Oe(iu),squareBracket:Oe(iu),paren:Oe(iu),brace:Oe(iu),content:$i,heading:oo,heading1:Oe(oo),heading2:Oe(oo),heading3:Oe(oo),heading4:Oe(oo),heading5:Oe(oo),heading6:Oe(oo),contentSeparator:Oe($i),list:Oe($i),quote:Oe($i),emphasis:Oe($i),strong:Oe($i),link:Oe($i),monospace:Oe($i),strikethrough:Oe($i),inserted:Oe(),deleted:Oe(),changed:Oe(),invalid:Oe(),meta:Oh,documentMeta:Oe(Oh),annotation:Oe(Oh),processingInstruction:Oe(Oh),definition:Bi.defineModifier("definition"),constant:Bi.defineModifier("constant"),function:Bi.defineModifier("function"),standard:Bi.defineModifier("standard"),local:Bi.defineModifier("local"),special:Bi.defineModifier("special")};for(let e in Z){let t=Z[e];t instanceof Bi&&(t.name=e)}DP([{tag:Z.link,class:"tok-link"},{tag:Z.heading,class:"tok-heading"},{tag:Z.emphasis,class:"tok-emphasis"},{tag:Z.strong,class:"tok-strong"},{tag:Z.keyword,class:"tok-keyword"},{tag:Z.atom,class:"tok-atom"},{tag:Z.bool,class:"tok-bool"},{tag:Z.url,class:"tok-url"},{tag:Z.labelName,class:"tok-labelName"},{tag:Z.inserted,class:"tok-inserted"},{tag:Z.deleted,class:"tok-deleted"},{tag:Z.literal,class:"tok-literal"},{tag:Z.string,class:"tok-string"},{tag:Z.number,class:"tok-number"},{tag:[Z.regexp,Z.escape,Z.special(Z.string)],class:"tok-string2"},{tag:Z.variableName,class:"tok-variableName"},{tag:Z.local(Z.variableName),class:"tok-variableName tok-local"},{tag:Z.definition(Z.variableName),class:"tok-variableName tok-definition"},{tag:Z.special(Z.variableName),class:"tok-variableName2"},{tag:Z.definition(Z.propertyName),class:"tok-propertyName tok-definition"},{tag:Z.typeName,class:"tok-typeName"},{tag:Z.namespace,class:"tok-namespace"},{tag:Z.className,class:"tok-className"},{tag:Z.macroName,class:"tok-macroName"},{tag:Z.propertyName,class:"tok-propertyName"},{tag:Z.operator,class:"tok-operator"},{tag:Z.comment,class:"tok-comment"},{tag:Z.meta,class:"tok-meta"},{tag:Z.invalid,class:"tok-invalid"},{tag:Z.punctuation,class:"tok-punctuation"}]);var oO,vo=new Ke;function Y0(e){return qe.define({combine:e?t=>t.concat(e):void 0})}var W0=new Ke,ni=class{constructor(e,t,n=[],r=""){this.data=e,this.name=r,Kt.prototype.hasOwnProperty("tree")||Object.defineProperty(Kt.prototype,"tree",{get(){return Dn(this)}}),this.parser=t,this.extension=[Bl.of(this),Kt.languageData.of((i,a,s)=>{let l=hj(i,a,s),c=l.type.prop(vo);if(!c)return[];let d=i.facet(c),f=l.type.prop(W0);if(f){let m=l.resolve(a-l.from,s);for(let p of f)if(p.test(m,i)){let O=i.facet(p.facet);return p.type=="replace"?O:O.concat(d)}}return d})].concat(n)}isActiveAt(e,t,n=-1){return hj(e,t,n).type.prop(vo)==this.data}findRegions(e){let t=e.facet(Bl);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(i,a)=>{if(i.prop(vo)==this.data){n.push({from:a,to:a+i.length});return}let s=i.prop(Ke.mounted);if(s){if(s.tree.prop(vo)==this.data){if(s.overlay)for(let l of s.overlay)n.push({from:l.from+a,to:l.to+a});else n.push({from:a,to:a+i.length});return}else if(s.overlay){let l=n.length;if(r(s.tree,s.overlay[0].from+a),n.length>l)return}}for(let l=0;l<i.children.length;l++){let c=i.children[l];c instanceof At&&r(c,i.positions[l]+a)}};return r(Dn(e),0),n}get allowsNesting(){return!0}};ni.setState=rn.define();function hj(e,t,n){let r=e.facet(Bl),i=Dn(e).topNode;if(!r||r.allowsNesting)for(let a=i;a;a=a.enter(t,n,wt.ExcludeBuffers|wt.EnterBracketed))a.type.isTop&&(i=a);return i}var Fm=class uy extends ni{constructor(t,n,r){super(t,n,[],r),this.parser=n}static define(t){let n=Y0(t.languageData);return new uy(n,t.parser.configure({props:[vo.add(r=>r.isTop?n:void 0)]}),t.name)}configure(t,n){return new uy(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function Dn(e){let t=e.field(ni.state,!1);return t?t.tree:At.empty}var dB=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},au=null,zP=class dy{constructor(t,n,r=[],i,a,s,l,c){this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=a,this.viewport=s,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new dy(t,n,[],At.empty,0,r,[],null)}startParse(){return this.parser.startParse(new dB(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=At.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Ql.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,n;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(Ql.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=au;au=this;try{return t()}finally{au=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=mj(t,n.from,n.to);return t}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:s,skipped:l}=this;if(this.takeTree(),!t.empty){let c=[];if(t.iterChangedRanges((d,f,m,p)=>c.push({fromA:d,toA:f,fromB:m,toB:p})),r=Ql.applyChanges(r,c),i=At.empty,a=0,s={from:t.mapPos(s.from,-1),to:t.mapPos(s.to,1)},this.skipped.length){l=[];for(let d of this.skipped){let f=t.mapPos(d.from,1),m=t.mapPos(d.to,-1);f<m&&l.push({from:f,to:m})}}}return new dy(this.parser,n,r,i,a,s,l,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:a}=this.skipped[r];i<t.to&&a>t.from&&(this.fragments=mj(this.fragments,i,a),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends U0{createParse(n,r,i){let a=i[0].from,s=i[i.length-1].to;return{parsedPos:a,advance(){let c=au;if(c){for(let d of i)c.tempSkipped.push(d);t&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,t]):t)}return this.parsedPos=s,new At(Ln.none,[],[],s-a)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return au}};function mj(e,t,n){return Ql.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var fy=class hy{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new hy(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=zP.create(t.facet(Bl).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new hy(r)}};ni.state=$s.define({create:fy.init,update(e,t){for(let n of t.effects)if(n.is(ni.setState))return n.value;return t.startState.facet(Bl)!=t.state.facet(Bl)?fy.init(t.state):e.apply(t)}});var $P=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&($P=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var lO=typeof navigator<"u"&&(!((oO=navigator.scheduling)===null||oO===void 0)&&oO.isInputPending)?()=>navigator.scheduling.isInputPending():null,fB=Ju.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(ni.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(ni.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=$P(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,a=r.field(ni.state);if(a.tree==a.context.tree&&a.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,t&&!lO?Math.max(25,t.timeRemaining()-5):1e9),l=a.context.treeLen<i&&r.doc.length>i+1e3,c=a.context.work(()=>lO&&lO()||Date.now()>s,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:ni.setState.of(new fy(a.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Yi(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Bl=qe.define({combine(e){return e.length?e[0]:null},enables:e=>[ni.state,fB,$e.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Vl=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},pj=class qP{constructor(t,n,r,i,a,s=void 0){this.name=t,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=a,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:r}=t;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new qP(t.name,(t.alias||[]).concat(t.name).map(i=>i.toLowerCase()),t.extensions||[],t.filename,n,r)}static matchFilename(t,n){for(let i of t)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of t)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(t,n,r=!0){n=n.toLowerCase();for(let i of t)if(i.alias.some(a=>a==n))return i;if(r)for(let i of t)for(let a of i.alias){let s=n.indexOf(a);if(s>-1&&(a.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+a.length])))return i}return null}},IP=qe.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(n=>n!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}}),Sd=new Ke;function hB(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),s=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let l=n.to;;){let c=t.childAfter(l);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let d=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+d}}l=c.to}}function mB({closing:e,align:t=!0,units:n=1}){return r=>pB(r,t,n,e)}function pB(e,t,n,r,i){let a=e.textAfter,s=a.match(/^\s*/)[0].length,l=a.slice(s,s+r.length)==r||i==e.pos+s,c=t?hB(e):null;return c?l?e.column(c.from):e.column(c.to):e.baseIndent+(l?0:e.unit*n)}var gB=e=>e.baseIndent;function Al({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var vB=qe.define(),rc=new Ke;function F0(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}var H0=class XP{constructor(t,n){this.specs=t;let r;function i(l){let c=As.newName();return(r||(r=Object.create(null)))["."+c]=l,c}const a=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof ni?l=>l.prop(vo)==s.data:s?l=>l==s:void 0,this.style=DP(t.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:a}).style,this.module=r?new As(r):null,this.themeType=n.themeType}static define(t,n){return new XP(t,n||{})}},my=qe.define(),OB=qe.define({combine(e){return e.length?[e[0]]:null}});function cO(e){let t=e.facet(my);return t.length?t:e.facet(OB)}function G0(e,t){let n=[yB],r;return e instanceof H0&&(e.module&&n.push($e.styleModule.of(e.module)),r=e.themeType),r?n.push(my.computeN([$e.darkTheme],i=>i.facet($e.darkTheme)==(r=="dark")?[e]:[])):n.push(my.of(e)),n}var bB=class{constructor(e){this.markCache=Object.create(null),this.tree=Dn(e.state),this.decorations=this.buildDeco(e,cO(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Dn(e.state),n=cO(e.state),r=n!=cO(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Xt.none;let n=new Yu;for(let{from:r,to:i}of e.visibleRanges)lB(this.tree,t,(a,s,l)=>{n.add(a,s,this.markCache[l]||(this.markCache[l]=Xt.mark({class:l})))},r,i);return n.finish()}},yB=yd.high(Ju.fromClass(bB,{decorations:e=>e.decorations})),xB=new Ke,SB=Object.create(null),gj=[Ln.none],vj=[],Oj=Object.create(null),wB=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])wB[e]=_B(SB,t);function uO(e,t){vj.indexOf(e)>-1||(vj.push(e),console.warn(t))}function _B(e,t){let n=[];for(let l of t.split(" ")){let c=[];for(let d of l.split(".")){let f=e[d]||Z[d];f?typeof f=="function"?c.length?c=c.map(f):uO(d,`Modifier ${d} used at start of tag`):c.length?uO(d,`Tag ${d} used as modifier`):c=Array.isArray(f)?f:[f]:uO(d,`Unknown highlighting tag ${d}`)}for(let d of c)n.push(d)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map(l=>l.id),a=Oj[i];if(a)return a.id;let s=Oj[i]=Ln.define({id:gj.length,name:r,props:[No({[r]:n})]});return gj.push(s),s.id}bn.RTL,bn.LTR;var ZP=$e.theme({"&":{backgroundColor:"#ffffff",color:"#24292e"},".cm-content":{caretColor:"#0550ae"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"#0550ae"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#b3d7ff"},".cm-gutters":{backgroundColor:"#f6f8fa",color:"#57606a",border:"none"}},{dark:!1}),BP=H0.define([{tag:Z.string,color:"#0a3069"},{tag:Z.number,color:"#0550ae"},{tag:Z.bool,color:"#8250df"},{tag:Z.null,color:"#cf222e"},{tag:Z.keyword,color:"#cf222e"},{tag:Z.propertyName,color:"#116329"},{tag:Z.punctuation,color:"#57606a"},{tag:Z.bracket,color:"#6e7781"}]),kB=class extends nc{constructor(e,t,n){super(),this.annotation=e,this.targetDocumentName=t,this.isGenerating=n}eq(e){const t=Ea(this.annotation.body),n=Ea(e.annotation.body);return e.annotation.id===this.annotation.id&&n===t&&e.targetDocumentName===this.targetDocumentName&&e.isGenerating===this.isGenerating}toDOM(){const e=document.createElement("span");e.className="reference-preview-widget",e.style.cssText=`
59
+ display: inline-flex;
60
+ align-items: center;
61
+ margin-left: 4px;
62
+ position: relative;
63
+ `;const t=s0(this.annotation),n=Ea(this.annotation.body);e.dataset.widgetAnnotationId=this.annotation.id,e.dataset.widgetMotivation=this.annotation.motivation,e.dataset.widgetResolved=t?"true":"false",n&&(e.dataset.widgetBodySource=n),this.targetDocumentName&&(e.dataset.widgetTargetName=this.targetDocumentName),this.isGenerating&&(e.dataset.widgetGenerating="true");const r=document.createElement("button");if(r.className="reference-indicator",r.type="button",t)r.innerHTML='<span aria-hidden="true">🔗</span>',r.setAttribute("aria-label",this.targetDocumentName?`Reference link to ${this.targetDocumentName}`:"Reference link to document"),r.title=this.targetDocumentName?`Links to: ${this.targetDocumentName}`:"Links to document",r.style.cssText=`
64
+ font-size: 10px;
65
+ cursor: pointer;
66
+ opacity: 0.6;
67
+ transition: opacity 0.2s ease;
68
+ background: none;
69
+ border: none;
70
+ padding: 0;
71
+ margin: 0;
72
+ vertical-align: baseline;
73
+ `;else if(this.isGenerating){if(r.innerHTML=`
74
+ <span style="position: relative; display: inline-flex; align-items: center; justify-content: center;" aria-hidden="true">
75
+ <span style="position: absolute; inset: 0; border-radius: 9999px; background: rgb(250, 204, 21); opacity: 0.75; animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;"></span>
76
+ <span style="position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 9999px; background: white; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); border: 2px solid rgb(250, 204, 21);">
77
+ <span style="font-size: 14px;">✨</span>
78
+ </span>
79
+ </span>
80
+ `,r.setAttribute("aria-label","Generating document"),r.setAttribute("aria-busy","true"),r.title="Generating document...",r.disabled=!0,r.style.cssText=`
81
+ cursor: default;
82
+ display: inline-flex;
83
+ vertical-align: middle;
84
+ background: none;
85
+ border: none;
86
+ padding: 0;
87
+ margin: 0;
88
+ `,document.documentElement.classList.contains("dark")){const i=r.querySelector("span > span:last-child");i&&(i.style.background="rgb(31, 41, 55)",i.style.borderColor="rgb(234, 179, 8)");const a=r.querySelector("span > span:first-child");a&&(a.style.background="rgb(234, 179, 8)")}}else r.innerHTML='<span aria-hidden="true">❓</span>',r.setAttribute("aria-label","Stub reference - click to resolve"),r.title="Stub reference. Click to resolve.",r.style.cssText=`
89
+ font-size: 10px;
90
+ cursor: pointer;
91
+ opacity: 0.6;
92
+ transition: opacity 0.2s ease;
93
+ background: none;
94
+ border: none;
95
+ padding: 0;
96
+ margin: 0;
97
+ vertical-align: baseline;
98
+ `;return e.appendChild(r),e}ignoreEvent(e){return e.type==="click"}};function jB(e,t){if(!t||t.trim()==="")return;const n=document.createElement("div");n.className="reference-tooltip",n.textContent=`→ ${t}`,n.style.cssText=`
99
+ position: absolute;
100
+ bottom: 100%;
101
+ left: 50%;
102
+ transform: translateX(-50%) translateY(-4px);
103
+ padding: 4px 8px;
104
+ background: rgba(0, 0, 0, 0.8);
105
+ color: white;
106
+ border-radius: 4px;
107
+ font-size: 11px;
108
+ white-space: nowrap;
109
+ pointer-events: none;
110
+ z-index: 1000;
111
+ animation: fadeIn 0.2s ease;
112
+ `,e.appendChild(n)}function TB(e){const t=e.querySelector(".reference-tooltip");t&&t.remove()}function CB(e){return e?Kl(e)?["rectangle"]:e.startsWith("image/")?["rectangle","circle","polygon"]:["rectangle","circle","polygon"]:["rectangle","circle","polygon"]}function EB(e){return e?Kl(e)?"fragment":e.startsWith("image/")?"svg":"text":"text"}function bj(e){if(e==="fragment"||e==="text")return"rectangle";if(typeof window<"u"){const t=localStorage.getItem("semiont-toolbar-shape-svg");if(t&&["rectangle","circle","polygon"].includes(t))return t}return"rectangle"}function QB(e,t){e==="svg"&&typeof window<"u"&&localStorage.setItem("semiont-toolbar-shape-svg",t)}function AB(e,t){const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let r="";for(;n.nextNode();)r+=n.currentNode.textContent??"";const i=new Map;let a=0,s=0;for(;s<e.length&&a<r.length;)e[s]===r[a]&&(i.set(s,a),a++),s++;for(;s<e.length;)i.set(s,a),s++;return i}function PB(e){var i;const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let r=0;for(;n.nextNode();){const a=n.currentNode,s=((i=a.textContent)==null?void 0:i.length)??0;t.push({node:a,start:r,end:r+s}),r+=s}return t}function yj(e,t){let n=0,r=e.length-1;for(;n<=r;){const i=n+r>>>1,a=e[i];if(t<a.start)r=i-1;else if(t>=a.end)n=i+1;else return{node:a.node,localOffset:t-a.start}}return null}function NB(e,t,n){const r=new Map;for(const i of e){const a=t.get(i.offset),s=t.get(i.offset+i.length-1);if(a===void 0||s===void 0)continue;const l=yj(n,a),c=yj(n,s+1);if(!l||!c)continue;const d=document.createRange();d.setStart(l.node,l.localOffset),d.setEnd(c.node,c.localOffset),r.set(i.id,{range:d,annotation:i})}return r}function RB(e){for(const[t,{range:n,annotation:r}]of e){const i=`annotation-${r.type}`;if(n.startContainer===n.endContainer){const a=document.createElement("span");a.className=i,a.dataset.annotationId=t,a.dataset.annotationType=r.type;try{n.surroundContents(a)}catch{xj(n,t,r)}continue}xj(n,t,r)}}function xj(e,t,n){const r=`annotation-${n.type}`,i=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),a=[];for(;i.nextNode();){const s=i.currentNode;e.intersectsNode(s)&&a.push(s)}for(const s of a){const l=document.createRange();l.selectNodeContents(s),s===e.startContainer&&l.setStart(s,e.startOffset),s===e.endContainer&&l.setEnd(s,e.endOffset);const c=document.createElement("span");c.className=r,c.dataset.annotationId=t,c.dataset.annotationType=n.type;try{l.surroundContents(c)}catch{}}}function MB(e){const t=e.querySelectorAll("[data-annotation-id]");for(const n of t){const r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);r.removeChild(n),r.normalize()}}}function LB(e){return e.map(t=>{var l;const n=An(t.target),r=si(n),i=(r==null?void 0:r.start)??0,a=(r==null?void 0:r.end)??0,s=((l=Object.values(Jn).find(c=>c.matchesAnnotation(t)))==null?void 0:l.internalType)||"highlight";return{id:t.id,exact:Ss(n),offset:i,length:a-i,type:s,source:Ea(t.body)}})}function VP(e){var n;if(!e)return"📄";const t=((n=e.split(";")[0])==null?void 0:n.trim().toLowerCase())||"";if(t.startsWith("image/"))return"🖼️";switch(t){case"text/markdown":return"📝";case"text/html":return"🌐";case"text/plain":return"📄";default:return"📄"}}var UP={"legal-irac":{id:"legal-irac",name:"Legal Analysis (IRAC)",description:"Issue, Rule, Application, Conclusion framework for legal reasoning",domain:"legal",tags:[{name:"Issue",description:"The legal question or problem to be resolved",examples:["What is the central legal question?","What must the court decide?","What is the dispute about?"]},{name:"Rule",description:"The relevant law, statute, or legal principle",examples:["What law applies?","What is the legal standard?","What statute governs this case?"]},{name:"Application",description:"How the rule applies to the specific facts",examples:["How does the law apply to these facts?","Analysis of the case","How do the facts satisfy the legal standard?"]},{name:"Conclusion",description:"The resolution or outcome based on the analysis",examples:["What is the court's decision?","What is the final judgment?","What is the holding?"]}]},"scientific-imrad":{id:"scientific-imrad",name:"Scientific Paper (IMRAD)",description:"Introduction, Methods, Results, Discussion structure for research papers",domain:"scientific",tags:[{name:"Introduction",description:"Background, context, and research question",examples:["What is the research question?","Why is this important?","What is the hypothesis?"]},{name:"Methods",description:"Experimental design and procedures",examples:["How was the study conducted?","What methods were used?","What was the experimental design?"]},{name:"Results",description:"Findings and observations",examples:["What did the study find?","What are the data?","What were the observations?"]},{name:"Discussion",description:"Interpretation and implications of results",examples:["What do the results mean?","What are the implications?","How do these findings relate to prior work?"]}]},"argument-toulmin":{id:"argument-toulmin",name:"Argument Structure (Toulmin)",description:"Claim, Evidence, Warrant, Counterargument, Rebuttal framework for argumentation",domain:"general",tags:[{name:"Claim",description:"The main assertion or thesis",examples:["What is being argued?","What is the main point?","What position is being taken?"]},{name:"Evidence",description:"Data or facts supporting the claim",examples:["What supports this claim?","What are the facts?","What data is provided?"]},{name:"Warrant",description:"Reasoning connecting evidence to claim",examples:["Why does this evidence support the claim?","What is the logic?","How does this reasoning work?"]},{name:"Counterargument",description:"Opposing viewpoints or objections",examples:["What are the objections?","What do critics say?","What are alternative views?"]},{name:"Rebuttal",description:"Response to counterarguments",examples:["How is the objection addressed?","Why is the counterargument wrong?","How is the criticism answered?"]}]}};function DB(e){return UP[e]||null}function zB(){return Object.values(UP)}function YP(e){if(Array.isArray(e.body)){const t=[];for(const n of e.body)if(typeof n=="object"&&n!==null&&"type"in n&&"value"in n&&"purpose"in n){const r=n.type,i=n.value,a=n.purpose;r==="TextualBody"&&a==="tagging"&&typeof i=="string"&&i.length>0&&t.push(i)}return t}return[]}function WP(e){return e.motivation==="tagging"}function $B(e){if(!WP(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="tagging");if(n&&"value"in n)return n.value}function qB(e){if(!WP(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="classifying");if(n&&"value"in n)return n.value}var IB={parse(e){if(typeof e!="string")throw new Error("URL must be a string");let t;try{t=new URL(e)}catch{throw new Error("Invalid image URL")}if(t.hostname!=="localhost"&&t.protocol!=="https:")throw new Error("External images must use HTTPS");const n=["javascript:","data:text/html","<script","onerror=","onload=","onclick="],r=e.toLowerCase();if(n.some(l=>r.includes(l)))throw new Error("Invalid or potentially unsafe image URL");const a=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico"].some(l=>r.includes(l)),s=r.includes("googleusercontent.com")||r.includes("avatars.githubusercontent.com");if(!a&&!s)throw new Error("URL must point to an image file");return e},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Invalid image URL"}}}};function vre(e){try{const t=IB.safeParse(e);if(!t.success)return console.warn("Invalid image URL:",t.error),null;const n=new URL(e);return`${n.protocol}//${n.hostname}${n.pathname}${n.search}`}catch(t){return console.error("Error sanitizing image URL:",t),null}}function FP(e){const[t]=_.useState(e);return _.useEffect(()=>()=>t.dispose(),[t]),t}function Ore(e){if(!e||e<=0)return null;const t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return t>0?`${t}h ${n}m`:n>0?`${n}m`:r>30?"1m":"Less than 1m"}var XB=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function bre(e){const t=_.useRef(e);t.current=e;const n=_.useCallback(r=>{if(!r.key)return;const i=r.target;if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.contentEditable==="true")return;const a=t.current.filter(s=>s.enabled!==!1);for(const s of a){if(r.key.toLowerCase()!==s.key.toLowerCase())continue;const l=XB?r.metaKey:r.ctrlKey;if(!(s.ctrlOrCmd&&!l)&&!(!s.ctrlOrCmd&&l)&&!(s.shift&&!r.shiftKey)&&!(!s.shift&&r.shiftKey)&&!(s.alt&&!r.altKey)&&!(!s.alt&&r.altKey)){r.preventDefault(),r.stopPropagation(),s.handler(r);break}}},[]);_.useEffect(()=>(window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}),[n])}function yre(e,t,n=300){const r=_.useRef(0),i=_.useRef(t);i.current=t;const a=_.useCallback(s=>{if(s.key!==e)return;const l=Date.now();l-r.current<n?(i.current(),r.current=0):r.current=l},[e,n]);_.useEffect(()=>(window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}),[a])}function K0(){const[e,t]=_.useState(()=>typeof window<"u"?localStorage.getItem("showLineNumbers")==="true":!1),n=_.useCallback(()=>{const r=!e;t(r),typeof window<"u"&&localStorage.setItem("showLineNumbers",r.toString())},[e]);return{showLineNumbers:e,toggleLineNumbers:n}}function Le(e){const[t,n]=_.useState(()=>{if(!e)return;const r=e.getValue;return typeof r=="function"?r.call(e):void 0});return _.useEffect(()=>{if(!e)return;const r=e.subscribe(n);return()=>r.unsubscribe()},[e]),t}function wd(e,t=hb){const n=Le(st().activeSession$),r=_.useRef(null),i=_.useRef(null),a=_.useCallback(()=>{r.current!==e&&(i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,r.current=e,n==null||n.client.emit("beckon:hover",{annotationId:e})},t))},[e,t,n]),s=_.useCallback(()=>{i.current!==null&&(clearTimeout(i.current),i.current=null),r.current!==null&&(r.current=null,n==null||n.client.emit("beckon:hover",{annotationId:null}))},[n]);return _.useEffect(()=>()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},[]),{onMouseEnter:a,onMouseLeave:s}}function HP(){const[e,t]=_.useState(()=>{if(typeof window<"u"){const r=localStorage.getItem("hoverDelayMs");return r?Number(r):hb}return hb}),n=_.useCallback(r=>{t(r),typeof window<"u"&&localStorage.setItem("hoverDelayMs",r.toString())},[]);return{hoverDelayMs:e,setHoverDelayMs:n}}function GP(){const e=st();return _.useCallback((t,n)=>{const r=setTimeout(()=>{console.warn("[Observable Navigation] No handler cancelled nav:external fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing."),window.location.href=t},10);e.emit("nav:external",{url:t,resourceId:n==null?void 0:n.resourceId,cancelFallback:()=>clearTimeout(r)})},[e])}function ZB({defaultWidth:e=384,minWidth:t=256,maxWidth:n=800,storageKey:r="semiont-panel-width"}={}){const[i,a]=_.useState(e),s=_.useRef(!1);_.useEffect(()=>{if(typeof window>"u")return;const c=localStorage.getItem(r);if(c){const d=parseInt(c,10),f=Math.max(t,Math.min(n,d));a(f)}},[]);const l=c=>{const d=Math.max(t,Math.min(n,c));s.current=!0,a(d)};return _.useEffect(()=>{s.current&&localStorage.setItem(r,i.toString())},[i,r]),{width:i,setWidth:l,minWidth:t,maxWidth:n}}function Sj(e,t={}){const{orientation:n="horizontal",loop:r=!0,cols:i=1}=t,a=_.useRef(null),s=_.useRef(0),l=_.useCallback(()=>a.current?Array.from(a.current.querySelectorAll('[role="button"]:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]),c=_.useCallback(f=>{var O;const m=l();if(m.length===0)return;let p=f;r?p=(f%m.length+m.length)%m.length:p=Math.max(0,Math.min(f,m.length-1)),m.forEach((b,x)=>{b.setAttribute("tabindex",x===p?"0":"-1")}),(O=m[p])==null||O.focus(),s.current=p},[l,r]),d=_.useCallback(f=>{const m=l();if(m.length===0)return;const p=s.current;let O=p;switch(f.key){case"ArrowRight":(n==="horizontal"||n==="grid")&&(f.preventDefault(),O=p+1);break;case"ArrowLeft":(n==="horizontal"||n==="grid")&&(f.preventDefault(),O=p-1);break;case"ArrowDown":n==="vertical"?(f.preventDefault(),O=p+1):n==="grid"&&(f.preventDefault(),O=p+i);break;case"ArrowUp":n==="vertical"?(f.preventDefault(),O=p-1):n==="grid"&&(f.preventDefault(),O=p-i);break;case"Home":f.preventDefault(),O=0;break;case"End":f.preventDefault(),O=m.length-1;break;default:return}c(O)},[n,i,l,c]);return _.useEffect(()=>{const f=l();if(f.length===0)return;f.forEach((O,b)=>{O.setAttribute("tabindex",b===0?"0":"-1")});const m=O=>()=>{s.current=O,l().forEach((x,w)=>{x.setAttribute("tabindex",w===O?"0":"-1")})},p=f.map((O,b)=>{const x=m(b);return O.addEventListener("click",x),x});return()=>{f.forEach((O,b)=>{const x=p[b];x&&O.removeEventListener("click",x)})}},[e,l]),{containerRef:a,handleKeyDown:d,focusItem:c}}function xre(){const e=Le(st().activeSession$);Le(e==null?void 0:e.token$);const t=(e==null?void 0:e.expiresAt)??null,[n,r]=_.useState(null),[i,a]=_.useState(!1);return _.useEffect(()=>{if(!t){r(null),a(!1);return}const s=()=>{const c=t.getTime()-Date.now();r(c>0?c:0),a(c<300*1e3&&c>0)};s();const l=setInterval(s,1e3);return()=>clearInterval(l)},[t]),{timeRemaining:n,isExpiringSoon:i}}var KP=_.createContext(null);function Sre({children:e}){const[t,n]=_.useState(()=>typeof window<"u"&&localStorage.getItem("theme")||"system"),[r,i]=_.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),a=t==="system"?r:t;_.useEffect(()=>{window.document.documentElement.setAttribute("data-theme",a)},[a]),_.useEffect(()=>{const l=window.matchMedia("(prefers-color-scheme: dark)"),c=d=>{i(d.matches?"dark":"light")};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[]);const s=l=>{n(l),typeof window<"u"&&localStorage.setItem("theme",l)};return g.jsx(KP.Provider,{value:{theme:t,setTheme:s,resolvedTheme:a,systemTheme:r},children:e})}function BB(){const e=_.useContext(KP);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function VB(){const[e,t]=_.useState(!1),n=_.useRef(null),r=_.useCallback(()=>{t(s=>!s)},[]),i=_.useCallback(()=>{t(!0)},[]),a=_.useCallback(()=>{t(!1)},[]);return _.useEffect(()=>{function s(l){n.current&&!n.current.contains(l.target)&&a()}if(e)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[e,a]),_.useEffect(()=>{function s(l){l.key==="Escape"&&a()}if(e)return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,a]),{isOpen:e,toggle:r,open:i,close:a,dropdownRef:n}}function UB(e,t,n=!0){var f;const{showError:r}=BQ(),i=(f=Le(st().activeSession$))==null?void 0:f.client,a=n?rm(t)||"text/plain":"",[s,l]=_.useState(""),[c,d]=_.useState(!1);return _.useEffect(()=>{!i||!n||!a||(d(!0),i.getResourceRepresentation(e,{accept:a}).then(({data:m})=>{l(a0(m,a)),d(!1)}).catch(m=>{console.error("Failed to fetch representation:",m),r("Failed to load resource representation"),d(!1)}))},[i,e,a,n,r]),{content:s,loading:c}}_.createContext(void 0);function YB(e,t){const n=st(),r=Le(n.activeSession$),i=_.useRef(t);_.useEffect(()=>{i.current=t}),_.useEffect(()=>{const a=[];return a.push(n.on(e,s=>i.current(s))),r&&a.push(r.client.on(e,s=>i.current(s))),()=>{for(const s of a)s()}},[e,n,r])}function Ma(e){const t=st(),n=Le(t.activeSession$),r=_.useRef(e);_.useEffect(()=>{r.current=e});const i=_.useMemo(()=>Object.keys(e).sort(),[Object.keys(e).sort().join(",")]);_.useEffect(()=>{const a=[];for(const s of i){const l=s,c=d=>{const f=r.current[l];f&&f(d)};a.push(t.on(l,c)),n&&a.push(n.client.on(l,c))}return()=>{for(const s of a)s()}},[i,t,n])}var JP=_.createContext(null);function ic(){const e=_.useContext(JP);return e||{announce:()=>{}}}function wre({children:e}){const[t,n]=_.useState(""),[r,i]=_.useState(""),a=_.useCallback((s,l="polite")=>{l==="assertive"?(i(s),setTimeout(()=>i(""),1e3)):(n(s),setTimeout(()=>n(""),1e3))},[]);return g.jsxs(JP.Provider,{value:{announce:a},children:[e,g.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"semiont-sr-only",children:t}),g.jsx("div",{role:"alert","aria-live":"assertive","aria-atomic":"true",className:"semiont-sr-only",children:r})]})}function WB(){const{announce:e}=ic(),t=_.useCallback(a=>{const s=a?`Loading ${a}...`:"Loading resource...";e(s,"polite")},[e]),n=_.useCallback(a=>{e(`${a} loaded successfully`,"polite")},[e]),r=_.useCallback(a=>{const s=a?`Failed to load ${a}`:"Failed to load resource";e(s,"assertive")},[e]),i=_.useCallback(a=>{e(`Updating ${a}...`,"polite")},[e]);return{announceResourceLoading:t,announceResourceLoaded:n,announceResourceLoadError:r,announceResourceUpdating:i}}function FB(){const{announce:e}=ic(),t=_.useCallback(()=>{e("Submitting form...","polite")},[e]),n=_.useCallback(a=>{e(a||"Form submitted successfully","polite")},[e]),r=_.useCallback(a=>{e(a||"Form submission failed. Please check your entries and try again.","assertive")},[e]),i=_.useCallback(a=>{const s=a===1?"There is 1 field with an error":`There are ${a} fields with errors`;e(s,"assertive")},[e]);return{announceFormSubmitting:t,announceFormSuccess:n,announceFormError:r,announceFormValidationError:i}}function HB(){const{announce:e}=ic(),t=_.useCallback(r=>{e(`Changing language to ${r}...`,"polite")},[e]),n=_.useCallback(r=>{e(`Language changed to ${r}`,"polite")},[e]);return{announceLanguageChanging:t,announceLanguageChanged:n}}var eN=_.createContext(void 0);function _re({children:e}){var d;const[t,n]=_.useState(new Set),{announce:r}=ic(),i=(d=Le(st().activeSession$))==null?void 0:d.client,a=_.useCallback(async(f,m,p,O=[])=>{if(!i)throw new Error("Not authenticated");try{const b={motivation:m,target:{source:f,selector:p},body:O},x=await i.markAnnotation(f,b);return x.annotationId&&(n(w=>new Set(w).add(x.annotationId)),setTimeout(()=>{n(w=>{const k=new Set(w);return k.delete(x.annotationId),k})},6e3),r("Annotation created","polite")),x.annotationId}catch(b){throw console.error("Failed to create annotation:",b),r("Failed to create annotation","assertive"),b}},[i,r]),s=_.useCallback(f=>{n(m=>{const p=new Set(m);return p.delete(f),p})},[]),l=_.useCallback(f=>{n(m=>new Set(m).add(f)),setTimeout(()=>{n(m=>{const p=new Set(m);return p.delete(f),p})},6e3)},[]),c=_.useMemo(()=>({newAnnotationIds:t,markAnnotation:a,clearNewAnnotationId:s,triggerSparkleAnimation:l}),[t,a,s,l]);return g.jsx(eN.Provider,{value:c,children:e})}function J0(){const e=_.useContext(eN);if(!e)throw new Error("useResourceAnnotations must be used within ResourceAnnotationsProvider");return e}var GB=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Dn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(t6(e));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function wj(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function KB(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let a=1;a<i.length;a++)n[i[a]]=!0}let r=wj(t)+wj(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function JB(e){let t=e.map(i=>typeof i=="string"?{label:i}:i),[n,r]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:KB(t);return i=>{let a=i.matchBefore(r);return a||i.explicit?{from:a?a.from:i.pos,options:t,validFor:n}:null}}function e6(e,t){return n=>{for(let r=Dn(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(e.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return t(n)}}function t6(e,t){var n;let{source:r}=e,i=r[r.length-1]!="$";return i?new RegExp(`(?:${r})${i?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":""):e}var n6=Po.define(),r6=$e.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),i6=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},a6=class tN{constructor(t,n,r){this.field=t,this.from=n,this.to=r}map(t){let n=t.mapPos(this.from,-1,Gn.TrackDel),r=t.mapPos(this.to,1,Gn.TrackDel);return n==null||r==null?null:new tN(this.field,n,r)}},s6=class nN{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let r=[],i=[n],a=t.doc.lineAt(n),s=/^\s*/.exec(a.text)[0];for(let c of this.lines){if(r.length){let d=s,f=/^\t*/.exec(c)[0].length;for(let m=0;m<f;m++)d+=t.facet(IP);i.push(n+d.length-f),c=d+c.slice(f)}r.push(c),n+=c.length+1}let l=this.fieldPositions.map(c=>new a6(c.field,i[c.line]+c.from,i[c.line]+c.to));return{text:r,ranges:l}}static parse(t){let n=[],r=[],i=[],a;for(let s of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let l=a[1]?+a[1]:null,c=a[2]||a[3]||"",d=-1,f=c.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<n.length;m++)(l!=null?n[m].seq==l:f&&n[m].name==f)&&(d=m);if(d<0){let m=0;for(;m<n.length&&(l==null||n[m].seq!=null&&n[m].seq<l);)m++;n.splice(m,0,{seq:l,name:f}),d=m;for(let p of i)p.field>=d&&p.field++}for(let m of i)if(m.line==r.length&&m.from>a.index){let p=a[2]?3+(a[1]||"").length:2;m.from-=p,m.to-=p}i.push(new i6(d,r.length,a.index,a.index+f.length)),s=s.slice(0,a.index)+c+s.slice(a.index+a[0].length)}s=s.replace(/\\([{}])/g,(l,c,d)=>{for(let f of i)f.line==r.length&&f.from>d&&(f.from--,f.to--);return c}),r.push(s)}return new nN(r,i)}},o6=Xt.widget({widget:new class extends nc{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),l6=Xt.mark({class:"cm-snippetField"}),Hm=class rN{constructor(t,n){this.ranges=t,this.active=n,this.deco=Xt.set(t.map(r=>(r.from==r.to?o6:l6).range(r.from,r.to)),!0)}map(t){let n=[];for(let r of this.ranges){let i=r.map(t);if(!i)return null;n.push(i)}return new rN(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}},_d=rn.define({map(e,t){return e&&e.map(t)}}),c6=rn.define(),id=$s.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(_d))return n.value;if(n.is(c6)&&e)return new Hm(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>$e.decorations.from(e,t=>t?t.deco:Xt.none)});function ex(e,t){return Ee.create(e.filter(n=>n.field==t).map(n=>Ee.range(n.from,n.to)))}function u6(e){let t=s6.parse(e);return(n,r,i,a)=>{let{text:s,ranges:l}=t.instantiate(n.state,i),{main:c}=n.state.selection,d={changes:{from:i,to:a==c.from?c.to:a,insert:_t.of(s)},scrollIntoView:!0,annotations:r?[n6.of(r),ii.userEvent.of("input.complete")]:void 0};if(l.length&&(d.selection=ex(l,0)),l.some(f=>f.field>0)){let f=new Hm(l,0),m=d.effects=[_d.of(f)];n.state.field(id,!1)===void 0&&m.push(rn.appendConfig.of([id,p6,g6,r6]))}n.dispatch(n.state.update(d))}}function iN(e){return({state:t,dispatch:n})=>{let r=t.field(id,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(s=>s.field==i+e);return n(t.update({selection:ex(r.ranges,i),effects:_d.of(a?null:new Hm(r.ranges,i)),scrollIntoView:!0})),!0}}var d6=({state:e,dispatch:t})=>e.field(id,!1)?(t(e.update({effects:_d.of(null)})),!0):!1,f6=iN(1),h6=iN(-1),m6=[{key:"Tab",run:f6,shift:h6},{key:"Escape",run:d6}],_j=qe.define({combine(e){return e.length?e[0]:m6}}),p6=yd.highest(X0.compute([_j],e=>e.facet(_j)));function dr(e,t){return{...t,apply:u6(e)}}var g6=$e.domEventHandlers({mousedown(e,t){let n=t.state.field(id,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(a=>a.from<=r&&a.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:ex(n.ranges,i.field),effects:_d.of(n.ranges.some(a=>a.field>i.field)?new Hm(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),aN=new class extends Qs{};aN.startSide=1;aN.endSide=-1;var kj=class sN{static create(t,n,r,i,a){let s=i+(i<<8)+t+(n<<4)|0;return new sN(t,n,r,s,a,[],[])}constructor(t,n,r,i,a,s,l){this.type=t,this.value=n,this.from=r,this.hash=i,this.end=a,this.children=s,this.positions=l,this.hashProp=[[Ke.contextHash,i]]}addChild(t,n){t.prop(Ke.contextHash)!=this.hash&&(t=new At(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(n)}toTree(t,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new At(t.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,a,s)=>new At(Ln.none,i,a,s,this.hashProp)})}},he;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(he||(he={}));var v6=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},O6=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Eu(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}};function jj(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==he.OrderedList?rx:nx)(n,t,!1);return r>0&&(e.type!=he.BulletList||tx(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var oN={[he.Blockquote](e,t,n){return n.next!=62?!1:(n.markers.push(pt(he.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(ui(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[he.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[he.OrderedList]:jj,[he.BulletList]:jj,[he.Document](){return!0}};function ui(e){return e==32||e==9||e==10||e==13}function Eu(e,t=0){for(;t<e.length&&ui(e.charCodeAt(t));)t++;return t}function Tj(e,t,n){for(;t>n&&ui(e.charCodeAt(t-1));)t--;return t}function lN(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function cN(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function tx(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let i=e.pos+1;i<e.text.length;i++){let a=e.text.charCodeAt(i);if(a==e.next)r++;else if(!ui(a))return-1}return n&&e.next==45&&fN(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(gN.SetextHeading)>-1||r<3?-1:1}function uN(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function nx(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||ui(e.text.charCodeAt(e.pos+1)))&&(!n||uN(t,he.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function rx(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){r++;if(r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!ui(e.text.charCodeAt(r+1))||n&&!uN(t,he.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function dN(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function fN(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&ui(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var py=/^[ \t]*$/,hN=/-->/,mN=/\?>/,gy=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,hN],[/^\s*<\?/,mN],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,py],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,py]];function pN(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let i=0,a=gy.length-(n?1:0);i<a;i++)if(gy[i][0].test(r))return i;return-1}function Cj(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function fs(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==he.CodeText?e[r].to=n:e.push(pt(he.CodeText,t,n))}var bh={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,s=[],l=[];for(fs(s,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){fs(l,e.lineStart-1,e.lineStart);for(let c of t.markers)l.push(c)}else{if(t.indent<n)break;{if(l.length){for(let d of l)d.type==he.CodeText?fs(s,d.from,d.to):s.push(d);l=[]}fs(s,e.lineStart-1,e.lineStart);for(let d of t.markers)s.push(d);a=e.lineStart+t.text.length;let c=e.lineStart+t.findColumn(t.baseIndent+4);c<a&&fs(s,c,a)}}return l.length&&(l=l.filter(c=>c.type!=he.CodeText),l.length&&(t.markers=l.concat(t.markers))),e.addNode(e.buffer.writeElements(s,-i).finish(he.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=lN(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,s=t.skipSpace(n),l=Tj(t.text,t.text.length,s),c=[pt(he.CodeMark,r,r+a)];s<l&&c.push(pt(he.CodeInfo,e.lineStart+s,e.lineStart+l));for(let d=!0,f=!0,m=!1;e.nextLine()&&t.depth>=e.stack.length;d=!1){let p=t.pos;if(t.indent-t.baseIndent<4)for(;p<t.text.length&&t.text.charCodeAt(p)==i;)p++;if(p-t.pos>=a&&t.skipSpace(p)==t.text.length){for(let O of t.markers)c.push(O);f&&m&&fs(c,e.lineStart-1,e.lineStart),c.push(pt(he.CodeMark,e.lineStart+t.pos,e.lineStart+p)),e.nextLine();break}else{m=!0,d||(fs(c,e.lineStart-1,e.lineStart),f=!1);for(let x of t.markers)c.push(x);let O=e.lineStart+t.basePos,b=e.lineStart+t.text.length;O<b&&(fs(c,O,b),f=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(he.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=cN(t);return n<0?!1:(e.startContext(he.Blockquote,t.pos),e.addNode(he.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(tx(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(he.HorizontalRule,n),!0},BulletList(e,t){let n=nx(t,e,!1);if(n<0)return!1;e.block.type!=he.BulletList&&e.startContext(he.BulletList,t.basePos,t.next);let r=Cj(t,t.pos+1);return e.startContext(he.ListItem,t.basePos,r-t.baseIndent),e.addNode(he.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=rx(t,e,!1);if(n<0)return!1;e.block.type!=he.OrderedList&&e.startContext(he.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=Cj(t,t.pos+n);return e.startContext(he.ListItem,t.basePos,r-t.baseIndent),e.addNode(he.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=dN(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=Tj(t.text,t.text.length,r),s=a;for(;s>r&&t.text.charCodeAt(s-1)==t.next;)s--;(s==a||s==r||!ui(t.text.charCodeAt(s-1)))&&(s=t.text.length);let l=e.buffer.write(he.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,s),i+n+1),-i);s<t.text.length&&l.write(he.HeaderMark,s-r,a-r);let c=l.finish(he.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=pN(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=gy[n][1],a=[],s=i!=py;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){s=!1;break}for(let d of t.markers)a.push(d)}s&&e.nextLine();let l=i==hN?he.CommentBlock:i==mN?he.ProcessingInstructionBlock:he.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(l,c-r),r),!0},SetextHeading:void 0},b6=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
113
+ `+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Eu(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,pt(he.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(TN(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(pt(he.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(kN(e,Eu(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Eu(e,this.pos),n=0;if(t>this.pos){let r=jN(e,t,this.start);if(r){let i=dO(e,r.to-this.start);i>0&&(this.nextStage(r),n=i)}}return n||(n=dO(e,this.pos)),n>0&&n<e.length?n:-1}else return dO(e,this.pos)}}};function dO(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!ui(n))return-1}return t}var y6=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:fN(t),i=t.next;if(r<0)return!1;let a=pt(he.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,pt(i==61?he.SetextHeading1:he.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},gN={LinkReference(e,t){return t.content.charCodeAt(0)==91?new b6(t):null},SetextHeading(){return new y6}},x6=[(e,t)=>dN(t)>=0,(e,t)=>lN(t)>=0,(e,t)=>cN(t)>=0,(e,t)=>nx(t,e,!0)>=0,(e,t)=>rx(t,e,!0)>=0,(e,t)=>tx(t,e,!0)>=0,(e,t)=>pN(t,e,!0)>=0],S6={text:"",end:0},w6=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new O6,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=kj.create(he.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new j6(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!r||e.markers[n].from<r.end);){let i=e.markers[n++];this.addNode(i.type,i.from,i.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let r=n(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let t=new v6(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let r=n(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break e}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
114
+ `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=CN(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=S6;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let n=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let i=this.ranges[r].from,a=this.lineChunkAt(i);t.end=i+a.length,t.text=t.text.slice(0,this.ranges[r-1].to-n)+a,n=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],i=this.parser.skipContextMarkup[r.type];if(!i)throw new Error("Unhandled block context "+he[r.type]);let a=this.line.markers.length;if(!i(r,this,e)){this.line.markers.length>a&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
115
+ `?"":t;else{let r=t.indexOf(`
116
+ `);n=r<0?t:t.slice(0,r)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=kj.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e=="number"&&(e=new At(this.parser.nodeSet.types[e],Ul,Ul,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Oy(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?vN(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let t=Oy(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(he.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e=="string"?pt(this.parser.getNodeType(e),t,n,r):new SN(e,t)}get buffer(){return new xN(this.parser.nodeSet)}};function vN(e,t,n,r,i){let a=e[t].to,s=[],l=[],c=n.from+r;function d(f,m){for(;m?f>=a:f>a;){let p=e[t+1].from-a;r+=p,f+=p,t++,a=e[t].to}}for(let f=n.firstChild;f;f=f.nextSibling){d(f.from+r,!0);let m=f.from+r,p,O=i.get(f.tree);O?p=O:f.to+r>a?(p=vN(e,t,f,r,i),d(f.to+r,!1)):p=f.toTree(),s.push(p),l.push(m-c)}return d(n.to+r,!1),new At(n.type,s,l,n.to+r-c,n.tree?n.tree.propValues:void 0)}var ON=class bN extends U0{constructor(t,n,r,i,a,s,l,c,d){super(),this.nodeSet=t,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=a,this.skipContextMarkup=s,this.inlineParsers=l,this.inlineNames=c,this.wrappers=d,this.nodeTypes=Object.create(null);for(let f of t.types)this.nodeTypes[f.name]=f.id}createParse(t,n,r){let i=new w6(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}configure(t){let n=vy(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),l=this.blockNames.slice(),c=this.inlineParsers.slice(),d=this.inlineNames.slice(),f=this.endLeafBlock.slice(),m=this.wrappers;if(su(n.defineNodes)){i=Object.assign({},i);let p=r.types.slice(),O;for(let b of n.defineNodes){let{name:x,block:w,composite:k,style:T}=typeof b=="string"?{name:b}:b;if(p.some(Q=>Q.name==x))continue;k&&(i[p.length]=(Q,A,M)=>k(A,M,Q.value));let j=p.length,E=k?["Block","BlockContext"]:w?j>=he.ATXHeading1&&j<=he.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Ln.define({id:j,name:x,props:E&&[[Ke.group,E]]})),T&&(O||(O={}),Array.isArray(T)||T instanceof Bi?O[x]=T:Object.assign(O,T))}r=new Z0(p),O&&(r=r.extend(No(O)))}if(su(n.props)&&(r=r.extend(...n.props)),su(n.remove))for(let p of n.remove){let O=this.blockNames.indexOf(p),b=this.inlineNames.indexOf(p);O>-1&&(a[O]=s[O]=void 0),b>-1&&(c[b]=void 0)}if(su(n.parseBlock))for(let p of n.parseBlock){let O=l.indexOf(p.name);if(O>-1)a[O]=p.parse,s[O]=p.leaf;else{let b=p.before?yh(l,p.before):p.after?yh(l,p.after)+1:l.length-1;a.splice(b,0,p.parse),s.splice(b,0,p.leaf),l.splice(b,0,p.name)}p.endLeaf&&f.push(p.endLeaf)}if(su(n.parseInline))for(let p of n.parseInline){let O=d.indexOf(p.name);if(O>-1)c[O]=p.parse;else{let b=p.before?yh(d,p.before):p.after?yh(d,p.after)+1:d.length-1;c.splice(b,0,p.parse),d.splice(b,0,p.name)}}return n.wrap&&(m=m.concat(n.wrap)),new bN(r,a,s,l,f,i,c,d,m)}getNodeType(t){let n=this.nodeTypes[t];if(n==null)throw new RangeError(`Unknown node type '${t}'`);return n}parseInline(t,n){let r=new ix(this,t,n);e:for(let i=n;i<r.end;){let a=r.char(i);for(let s of this.inlineParsers)if(s){let l=s(r,a,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}};function su(e){return e!=null&&e.length>0}function vy(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=vy(e[0]);if(e.length==1)return t;let n=vy(e.slice(1));if(!n||!t)return t||n;let r=(s,l)=>(s||Ul).concat(l||Ul),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(s,l,c,d)=>i(a(s,l,c,d),l,c,d):i:a}}function yh(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}var yN=[Ln.none];for(let e=1,t;t=he[e];e++)yN[e]=Ln.define({id:e,name:t,props:e>=he.Escape?[]:[[Ke.group,e in oN?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});var Ul=[],xN=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,n,r,i=0){return this.content.push(t,n,r,4+i*4),this}writeElements(t,n=0){for(let r of t)r.writeTo(this,n);return this}finish(t,n){return At.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:n})}},ad=class{constructor(e,t,n,r=Ul){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new xN(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},SN=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Ul}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function pt(e,t,n,r){return new ad(e,t,n,r)}var wN={resolve:"Emphasis",mark:"EmphasisMark"},_N={resolve:"Emphasis",mark:"EmphasisMark"},mo={},pm={},Rr=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},Ej="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",sd=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{sd=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}var fO={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let i=0;i<Ej.length;i++)if(Ej.charCodeAt(i)==r)return e.append(pt(he.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(pt(he.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(pt(he.InlineCode,n,r+1,[pt(he.CodeMark,n,n+i),pt(he.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(pt(he.Autolink,n,n+1+i[0].length,[pt(he.LinkMark,n,n+1),pt(he.URL,n+1,n+i[0].length),pt(he.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(pt(he.Comment,n,n+1+a[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return e.append(pt(he.ProcessingInstruction,n,n+1+s[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return l?e.append(pt(he.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),s=sd.test(i),l=sd.test(a),c=/\s|^$/.test(i),d=/\s|^$/.test(a),f=!d&&(!l||c||s),m=!c&&(!s||d||l),p=f&&(t==42||!m||s),O=m&&(t==42||!f||l);return e.append(new Rr(t==95?wN:_N,n,r,(p?1:0)|(O?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(pt(he.HardBreak,n,n+2));if(t==32){let r=n+1;for(;e.char(r)==32;)r++;if(e.char(r)==10&&r>=n+2)return e.append(pt(he.HardBreak,n,r+1))}return-1},Link(e,t,n){return t==91?e.append(new Rr(mo,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new Rr(pm,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let i=e.parts[r];if(i instanceof Rr&&(i.type==mo||i.type==pm)){if(!i.side||e.skipSpace(i.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[r]=null,-1;let a=e.takeContent(r),s=e.parts[r]=_6(e,a,i.type==mo?he.Link:he.Image,i.from,n+1);if(i.type==mo)for(let l=0;l<r;l++){let c=e.parts[l];c instanceof Rr&&c.type==mo&&(c.side=0)}return s.to}}return-1}};function _6(e,t,n,r,i){let{text:a}=e,s=e.char(i),l=i;if(t.unshift(pt(he.LinkMark,r,r+(n==he.Image?2:1))),t.push(pt(he.LinkMark,i-1,i)),s==40){let c=e.skipSpace(i+1),d=kN(a,c-e.offset,e.offset),f;d&&(c=e.skipSpace(d.to),c!=d.to&&(f=jN(a,c-e.offset,e.offset),f&&(c=e.skipSpace(f.to)))),e.char(c)==41&&(t.push(pt(he.LinkMark,i,i+1)),l=c+1,d&&t.push(d),f&&t.push(f),t.push(pt(he.LinkMark,c,l)))}else if(s==91){let c=TN(a,i-e.offset,e.offset,!1);c&&(t.push(c),l=c.to)}return pt(n,r,l,t)}function kN(e,t,n){if(e.charCodeAt(t)==60){for(let i=t+1;i<e.length;i++){let a=e.charCodeAt(i);if(a==62)return pt(he.URL,t+n,i+1+n);if(a==60||a==10)return!1}return null}else{let i=0,a=t;for(let s=!1;a<e.length;a++){let l=e.charCodeAt(a);if(ui(l))break;if(s)s=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(s=!0)}return a>t?pt(he.URL,t+n,a+n):a==e.length?null:!1}}function jN(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let a=t+1,s=!1;a<e.length;a++){let l=e.charCodeAt(a);if(s)s=!1;else{if(l==i)return pt(he.LinkTitle,t+n,a+1+n);l==92&&(s=!0)}}return null}function TN(e,t,n,r){for(let i=!1,a=t+1,s=Math.min(e.length,a+999);a<s;a++){let l=e.charCodeAt(a);if(i)i=!1;else{if(l==93)return r?!1:pt(he.LinkLabel,t+n,a+1+n);if(r&&!ui(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}var ix=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new Rr(e,t,n,(r?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Rr&&(t.type==mo||t.type==pm))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let r=this.parts[n];if(!(r instanceof Rr&&r.type.resolve&&r.side&2))continue;let i=r.type==wN||r.type==_N,a=r.to-r.from,s,l=n-1;for(;l>=e;l--){let b=this.parts[l];if(b instanceof Rr&&b.side&1&&b.type==r.type&&!(i&&(r.side&1||b.side&2)&&(b.to-b.from+a)%3==0&&((b.to-b.from)%3||a%3))){s=b;break}}if(!s)continue;let c=r.type.resolve,d=[],f=s.from,m=r.to;if(i){let b=Math.min(2,s.to-s.from,a);f=s.to-b,m=r.from+b,c=b==1?"Emphasis":"StrongEmphasis"}s.type.mark&&d.push(this.elt(s.type.mark,f,s.to));for(let b=l+1;b<n;b++)this.parts[b]instanceof ad&&d.push(this.parts[b]),this.parts[b]=null;r.type.mark&&d.push(this.elt(r.type.mark,r.from,m));let p=this.elt(c,f,m,d);this.parts[l]=i&&s.from!=f?new Rr(s.type,s.from,f,s.side):null,(this.parts[n]=i&&r.to!=m?new Rr(r.type,m,r.to,r.side):null)?this.parts.splice(n,0,p):this.parts[n]=p}let t=[];for(let n=e;n<this.parts.length;n++){let r=this.parts[n];r instanceof ad&&t.push(r)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Rr&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Rr?t:null}skipSpace(e){return Eu(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e=="string"?pt(this.parser.getNodeType(e),t,n,r):new SN(e,t)}};ix.linkStart=mo;ix.imageStart=pm;function Oy(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let i of t){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let a=n[r];a instanceof ad&&(n[r]=new ad(a.type,a.from,a.to,Oy(a.children,[i])))}else n.splice(r++,0,i)}return n}var k6=[he.CodeBlock,he.ListItem,he.OrderedList,he.BulletList],j6=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=`
117
+ `;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(Ke.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,s=e.block.children.length,l=a,c=s;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let d=CN(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,d);else{let f=new At(e.parser.nodeSet.types[he.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,d)}if(t.type.is("Block")&&(k6.indexOf(t.type.id)<0?(a=t.to-n,s=e.block.children.length):(a=l,s=c),l=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>s;)e.block.children.pop(),e.block.positions.pop();return a-i}};function CN(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var T6=No({"Blockquote/...":Z.quote,HorizontalRule:Z.contentSeparator,"ATXHeading1/... SetextHeading1/...":Z.heading1,"ATXHeading2/... SetextHeading2/...":Z.heading2,"ATXHeading3/...":Z.heading3,"ATXHeading4/...":Z.heading4,"ATXHeading5/...":Z.heading5,"ATXHeading6/...":Z.heading6,"Comment CommentBlock":Z.comment,Escape:Z.escape,Entity:Z.character,"Emphasis/...":Z.emphasis,"StrongEmphasis/...":Z.strong,"Link/... Image/...":Z.link,"OrderedList/... BulletList/...":Z.list,"BlockQuote/...":Z.quote,"InlineCode CodeText":Z.monospace,"URL Autolink":Z.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":Z.processingInstruction,"CodeInfo LinkLabel":Z.labelName,LinkTitle:Z.string,Paragraph:Z.content}),C6=new ON(new Z0(yN).extend(T6),Object.keys(bh).map(e=>bh[e]),Object.keys(bh).map(e=>gN[e]),Object.keys(bh),x6,oN,Object.keys(fO).map(e=>fO[e]),Object.keys(fO),[]);function E6(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let s=i?i.from:n;if(s>a&&r.push({from:a,to:s}),!i)break;a=i.to}return r}function Q6(e){let{codeParser:t,htmlParser:n}=e;return{wrap:RP((i,a)=>{let s=i.type.id;if(t&&(s==he.CodeBlock||s==he.FencedCode)){let l="";if(s==he.FencedCode){let d=i.node.getChild(he.CodeInfo);d&&(l=a.read(d.from,d.to))}let c=t(l);if(c)return{parser:c,overlay:d=>d.type.id==he.CodeText,bracketed:s==he.FencedCode}}else if(n&&(s==he.HTMLBlock||s==he.HTMLTag||s==he.CommentBlock))return{parser:n,overlay:E6(i.node,i.from,i.to)};return null})}}var A6={resolve:"Strikethrough",mark:"StrikethroughMark"},P6={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Z.strikethrough}},{name:"StrikethroughMark",style:Z.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),s=/\s|^$/.test(i),l=sd.test(r),c=sd.test(i);return e.addDelimiter(A6,n,n+2,!s&&(!c||a||l),!a&&(!l||s||c))},after:"Emphasis"}]};function Qu(e,t,n=0,r,i=0){let a=0,s=!0,l=-1,c=-1,d=!1,f=()=>{r.push(e.elt("TableCell",i+l,i+c,e.parser.parseInline(t.slice(l,c),i+l)))};for(let m=n;m<t.length;m++){let p=t.charCodeAt(m);p==124&&!d?((!s||l>-1)&&a++,s=!1,r&&(l>-1&&f(),r.push(e.elt("TableDelimiter",m+i,m+i+1))),l=c=-1):(d||p!=32&&p!=9)&&(l<0&&(l=m),c=m+1),d=!d&&p==92}return l>-1&&(a++,r&&f()),a}function Qj(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}var EN=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Aj=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&EN.test(r=t.text.slice(t.pos))){let i=[];Qu(e,n.content,0,i,n.start)==Qu(e,r,t.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,i),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];Qu(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}},N6={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":Z.heading}},"TableRow",{name:"TableCell",style:Z.content},{name:"TableDelimiter",style:Z.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return Qj(t.content,0)?new Aj:null},endLeaf(e,t,n){if(n.parsers.some(i=>i instanceof Aj)||!Qj(t.text,t.basePos))return!1;let r=e.peekLine();return EN.test(r)&&Qu(e,t.text,t.basePos)==Qu(e,r,t.basePos)},before:"SetextHeading"}]},R6=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},M6={defineNodes:[{name:"Task",block:!0,style:Z.list},{name:"TaskMarker",style:Z.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new R6:null},after:"SetextHeading"}]},Pj=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Nj=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,L6=/[\w-]+\.[\w-]+($|\/)/,Rj=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Mj=/\/[a-zA-Z\d@.]+/gy;function Lj(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function D6(e,t){Nj.lastIndex=t;let n=Nj.exec(e);if(!n||L6.exec(n[0])[0].indexOf("_")>-1)return-1;let r=t+n[0].length;for(;;){let i=e[r-1],a;if(/[?!.,:*_~]/.test(i)||i==")"&&Lj(e,t,r,")")>Lj(e,t,r,"("))r--;else if(i==";"&&(a=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+a.index;else break}return r}function Dj(e,t){Rj.lastIndex=t;let n=Rj.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:t+n[0].length-(r=="."?1:0)}var z6={parseInline:[{name:"Autolink",parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Pj.lastIndex=r;let i=Pj.exec(e.text),a=-1;if(!i)return-1;if(i[1]||i[2]){if(a=D6(e.text,r+i[0].length),a>-1&&e.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a));a=r+s[0].length}}else i[3]?a=Dj(e.text,r):(a=Dj(e.text,r+i[0].length),a>-1&&i[0]=="xmpp:"&&(Mj.lastIndex=a,i=Mj.exec(e.text),i&&(a=i.index+i[0].length)));return a<0?-1:(e.addElement(e.elt("URL",n,a+e.offset)),a+e.offset)}}]},$6=[N6,M6,P6,z6];function QN(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let s=[r.elt(n,a,a+1)];for(let l=a+1;l<r.end;l++){let c=r.char(l);if(c==e)return r.addElement(r.elt(t,a,l+1,s.concat(r.elt(n,l,l+1))));if(c==92&&s.push(r.elt("Escape",l,l+++2)),ui(c))break}return-1}}var q6={defineNodes:[{name:"Superscript",style:Z.special(Z.content)},{name:"SuperscriptMark",style:Z.processingInstruction}],parseInline:[{name:"Superscript",parse:QN(94,"Superscript","SuperscriptMark")}]},I6={defineNodes:[{name:"Subscript",style:Z.special(Z.content)},{name:"SubscriptMark",style:Z.processingInstruction}],parseInline:[{name:"Subscript",parse:QN(126,"Subscript","SubscriptMark")}]},X6={defineNodes:[{name:"Emoji",style:Z.character}],parseInline:[{name:"Emoji",parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt("Emoji",n,n+1+r[0].length))}}]},Z6=class by{constructor(t,n,r,i,a,s,l,c,d,f=0,m){this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=a,this.score=s,this.buffer=l,this.bufferBase=c,this.curContext=d,this.lookAhead=f,this.parent=m}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,r=0){let i=t.parser.context;return new by(t,[],n,r,r,0,[],0,i?new zj(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let r=t>>19,i=t&65535,{parser:a}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=a.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(a.getGoto(this.state,i,!0),this.reducePos),i<a.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(t&262144?6:0),d=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-d;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(d==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=d,this.p.lastBigReductionSize=f));let m=c?this.stack[c-1]:0,p=this.bufferBase+this.buffer.length-m;if(i<a.minRepeatTerm||t&131072){let O=a.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,d,O,p+4,!0)}if(t&262144)this.state=this.stack[c];else{let O=this.stack[c-3];this.state=a.getGoto(O,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,d)}storeNode(t,n,r,i=4,a=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,l=this.buffer.length;if(l==0&&s.parent&&(l=s.bufferBase-s.parent.bufferBase,s=s.parent),l>0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(n==r)return;if(s.buffer[l-2]>=n){s.buffer[l-2]=r;return}}}if(!a||this.pos==r)this.buffer.push(t,n,r,i);else{let s=this.buffer.length;if(s>0&&(this.buffer[s-4]!=0||this.buffer[s-1]<0)){let l=!1;for(let c=s;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=t,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(t,n,r,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let a=t,{parser:s}=this.p;this.pos=i;let l=s.stateFlag(a,1);!l&&(i>r||n<=s.maxNode)&&(this.reducePos=i),this.pushState(a,l?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(t,n,r,i){t&65536?this.reduce(t):this.shift(t,n,r,i)}useNode(t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new by(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new B6(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let a=0,s;a<n.length;a+=2)(s=n[a+1])!=this.state&&this.p.parser.hasAction(s,t)&&i.push(n[a],s);if(this.stack.length<120)for(let a=0;i.length<8&&a<n.length;a+=2){let s=n[a+1];i.some((l,c)=>c&1&&l==s)||i.push(n[a],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let a=n[i+1];if(a==this.state)continue;let s=this.split();s.pushState(a,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:t}=this.p,n=t.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!t.validAction(this.state,n)){let r=n>>19,i=n&65535,a=this.stack.length-r*3;if(a<0||t.getGoto(this.stack[a],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],r=(i,a)=>{if(!n.includes(i))return n.push(i),t.allActions(i,s=>{if(!(s&393216))if(s&65536){let l=(s>>19)-a;if(l>1){let c=s&65535,d=this.stack.length-l*3;if(d>=0&&t.getGoto(this.stack[d],c,!1)>=0)return l<<19|65536|c}}else{let l=r(s,a+1);if(l!=null)return l}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}reduceContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let n=new zj(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},zj=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},B6=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},V6=class yy{constructor(t,n,r){this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new yy(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new yy(this.stack,this.pos,this.index)}};function vu(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let s=e.charCodeAt(r++),l=!1;if(s==126){a=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,l=!0),a+=c,l)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var Yh=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},$j=new Yh,U6=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=$j,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let a=this.ranges[--r];i-=n.from-a.to,n=a}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];i+=a.from-n.to,n=a}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let i=this.resolveOffset(e,1);if(i==null)return-1;if(n=i,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=n;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=$j,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},Pl=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;AN(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Pl.prototype.contextual=Pl.prototype.fallback=Pl.prototype.extend=!1;var gm=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?vu(e):e}token(e,t){let n=e.pos,r=0;for(;;){let i=e.next<0,a=e.resolveOffset(1,1);if(AN(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(i||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};gm.prototype.contextual=Pl.prototype.fallback=Pl.prototype.extend=!1;var Dr=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function AN(e,t,n,r,i,a){let s=0,l=1<<r,{dialect:c}=n.p.parser;e:for(;(l&e[s])!=0;){let d=e[s+1];for(let O=s+3;O<d;O+=2)if((e[O+1]&l)>0){let b=e[O];if(c.allows(b)&&(t.token.value==-1||t.token.value==b||Y6(b,t.token.value,i,a))){t.acceptToken(b);break}}let f=t.next,m=0,p=e[s+2];if(t.next<0&&p>m&&e[d+p*3-3]==65535){s=e[d+p*3-1];continue e}for(;m<p;){let O=m+p>>1,b=d+O+(O<<1),x=e[b],w=e[b+1]||65536;if(f<x)p=O;else if(f>=w)m=O+1;else{s=e[b+2],t.advance();continue e}}break}}function qj(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function Y6(e,t,n,r){let i=qj(n,r,t);return i<0||qj(n,r,e)<i}var Qr=typeof process<"u"&&vb&&/\bparse\b/.test(vb.LOG),hO=null;function Ij(e,t,n){let r=e.cursor(wt.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var W6=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ij(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ij(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof At){if(a==e){if(a<this.safeFrom)return null;let s=a+i.length;if(s<=this.safeTo){let l=i.prop(Ke.lookAhead);if(!l||s+l<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},F6=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Yh)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&a)==0)continue;let d=i[c],f=this.tokens[c];if(!(n&&!d.fallback)&&((d.contextual||f.start!=e.pos||f.mask!=a||f.context!=s)&&(this.updateCachedToken(f,d,e),f.mask=a,f.context=s),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let m=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!d.extend&&(n=f,t>m))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new Yh,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Yh,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:i}=n.p;for(let a=0;a<i.specialized.length;a++)if(i.specialized[a]==e.value){let s=i.specializers[a](this.stream.read(e.start,e.end),n);if(s>=0&&n.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let i=0;i<r;i+=3)if(this.actions[i]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:s}=a;for(let l=0;l<2;l++)for(let c=a.stateSlot(i,l?2:1);;c+=3){if(s[c]==65535)if(s[c+1]==1)c=wa(s,c+2);else{r==0&&s[c+1]==2&&(r=this.putAction(wa(s,c+2),t,n,r));break}s[c]==t&&(r=this.putAction(wa(s,c+1),t,n,r))}return r}},H6=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new U6(t,r),this.tokens=new F6(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[Z6.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new W6(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>t)n.push(s);else{if(this.advanceStack(s,n,e))continue;{r||(r=[],i=[]),r.push(s);let l=this.tokens.getMainToken(s);i.push(l.value,l.end)}}break}}if(!n.length){let a=r&&K6(r);if(a)return Qr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Qr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(a)return Qr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((s,l)=>l.score-s.score);n.length>a;)n.pop();n.some(s=>s.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a<n.length-1;a++){let s=n[a];for(let l=a+1;l<n.length;l++){let c=n[l];if(s.sameState(c)||s.buffer.length>500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)n.splice(l--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,s)=>s.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a<n.length;a++)n[a].pos<this.minStackPos&&(this.minStackPos=n[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=Qr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,d=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let m=this.parser.nodeSet.types[f.type.id]==f.type?i.getGoto(e.state,f.type.id):-1;if(m>-1&&f.length&&(!c||(f.prop(Ke.contextHash)||0)==d))return e.useNode(f,m),Qr&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(f.type.id)})`),!0;if(!(f instanceof At)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof At&&f.positions[0]==0)f=p;else break}}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),Qr&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let d=l[c++],f=l[c++],m=l[c++],p=c==l.length||!n,O=p?e:e.split(),b=this.tokens.mainToken;if(O.apply(d,f,b?b.start:O.pos,m),Qr&&console.log(a+this.stackID(O)+` (via ${(d&65536)==0?"shift":`reduce of ${i.getName(d&65535)}`} for ${i.getName(f)} @ ${r}${O==e?"":", split"})`),p)return!0;O.pos>r?t.push(O):n.push(O)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Xj(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let s=e[a],l=t[a<<1],c=t[(a<<1)+1],d=Qr?this.stackID(s)+" -> ":"";if(s.deadEnd&&(i||(i=!0,s.restart(),Qr&&console.log(d+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))))continue;let f=s.split(),m=d;for(let p=0;p<10&&f.forceReduce()&&(Qr&&console.log(m+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));p++)Qr&&(m=this.stackID(f)+" -> ");for(let p of s.recoverByInsert(l))Qr&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,n);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Qr&&console.log(d+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Xj(s,n)):(!r||r.score<f.score)&&(r=f)}return r}stackToTree(e){return e.close(),At.build({buffer:V6.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(hO||(hO=new WeakMap)).get(e);return t||hO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function Xj(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var G6=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},mO=e=>e,PN=class{constructor(e){this.start=e.start,this.shift=e.shift||mO,this.reduce=e.reduce||mO,this.reuse=e.reuse||mO,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Gm=class xy extends U0{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<t.repeatNodeCount;l++)n.push("");let r=Object.keys(t.topRules).map(l=>t.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function a(l,c,d){i[l].push([c,c.deserialize(String(d))])}if(t.nodeProps)for(let l of t.nodeProps){let c=l[0];typeof c=="string"&&(c=Ke[c]);for(let d=1;d<l.length;){let f=l[d++];if(f>=0)a(f,c,l[d++]);else{let m=l[d+-f];for(let p=-f;p>0;p--)a(l[d++],c,m);d++}}}this.nodeSet=new Z0(n.map((l,c)=>Ln.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(c)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=kP;let s=vu(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(Zj),this.states=vu(t.states,Uint32Array),this.data=vu(t.stateData),this.goto=vu(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(l=>typeof l=="number"?new Pl(s,l):l),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,r){let i=new H6(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}getGoto(t,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let a=i[n+1];;){let s=i[a++],l=s&1,c=i[a++];if(l&&r)return c;for(let d=a+(s>>1);a<d;a++)if(i[a]==t)return c;if(l)return-1}}hasAction(t,n){let r=this.data;for(let i=0;i<2;i++)for(let a=this.stateSlot(t,i?2:1),s;;a+=3){if((s=r[a])==65535)if(r[a+1]==1)s=r[a=wa(r,a+2)];else{if(r[a+1]==2)return wa(r,a+2);break}if(s==n||s==0)return wa(r,a+1)}return 0}stateSlot(t,n){return this.states[t*6+n]}stateFlag(t,n){return(this.stateSlot(t,0)&n)>0}validAction(t,n){return!!this.allActions(t,r=>r==n?!0:null)}allActions(t,n){let r=this.stateSlot(t,4),i=r?n(r):void 0;for(let a=this.stateSlot(t,1);i==null;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=wa(this.data,a+2);else break;i=n(wa(this.data,a+1))}return i}nextStates(t){let n=[];for(let r=this.stateSlot(t,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=wa(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((a,s)=>s&1&&a==i)||n.push(this.data[r],i)}}return n}configure(t){let n=Object.assign(Object.create(xy.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let r=this.topRules[t.top];if(!r)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=r}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=t.tokenizers.find(a=>a.from==r);return i?i.to:r})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let a=t.specializers.find(l=>l.from==r.external);if(!a)return r;let s=Object.assign(Object.assign({},r),{external:a.to});return n.specializers[i]=Zj(s),s})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(t)for(let a of t.split(" ")){let s=n.indexOf(a);s>=0&&(r[s]=!0)}let i=null;for(let a=0;a<n.length;a++)if(!r[a])for(let s=this.dialects[n[a]],l;(l=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new G6(t,r,i)}static deserialize(t){return new xy(t)}};function wa(e,t){return e[t]|e[t+1]<<16}function K6(e){let t=null;for(let n of e){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function Zj(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}var J6=55,e9=1,t9=56,n9=2,r9=57,i9=3,Bj=4,a9=5,ax=6,NN=7,RN=8,MN=9,LN=10,s9=11,o9=12,l9=13,pO=58,c9=14,u9=15,Vj=59,DN=21,d9=23,zN=24,f9=25,Sy=27,$N=28,h9=29,m9=32,p9=35,g9=37,v9=38,O9=0,b9=1,y9={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},x9={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Uj={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function S9(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Yj=null,Wj=null,Fj=0;function wy(e,t){let n=e.pos+t;if(Fj==n&&Wj==e)return Yj;let r=e.peek(t),i="";for(;S9(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Wj=e,Fj=n,Yj=i?i.toLowerCase():r==w9||r==_9?void 0:null}var qN=60,vm=62,sx=47,w9=63,_9=33,k9=45;function Hj(e,t){this.name=e,this.parent=t}var j9=[ax,LN,NN,RN,MN],T9=new PN({start:null,shift(e,t,n,r){return j9.indexOf(t)>-1?new Hj(wy(r,1)||"",e):e},reduce(e,t){return t==DN&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==ax||i==g9?new Hj(wy(r,1)||"",e):e},strict:!1}),C9=new Dr((e,t)=>{if(e.next!=qN){e.next<0&&t.context&&e.acceptToken(pO);return}e.advance();let n=e.next==sx;n&&e.advance();let r=wy(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?u9:c9);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(s9);if(i&&x9[i])return e.acceptToken(pO,-2);if(t.dialectEnabled(O9))return e.acceptToken(o9);for(let a=t.context;a;a=a.parent)if(a.name==r)return;e.acceptToken(l9)}else{if(r=="script")return e.acceptToken(NN);if(r=="style")return e.acceptToken(RN);if(r=="textarea")return e.acceptToken(MN);if(y9.hasOwnProperty(r))return e.acceptToken(LN);i&&Uj[i]&&Uj[i][r]?e.acceptToken(pO,-1):e.acceptToken(ax)}},{contextual:!0}),E9=new Dr(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Vj);break}if(e.next==k9)t++;else if(e.next==vm&&t>=2){n>=3&&e.acceptToken(Vj,-2);break}else t=0;e.advance()}});function Q9(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}var A9=new Dr((e,t)=>{if(e.next==sx&&e.peek(1)==vm){let n=t.dialectEnabled(b9)||Q9(t.context);e.acceptToken(n?a9:Bj,2)}else e.next==vm&&e.acceptToken(Bj,1)});function ox(e,t,n){let r=2+e.length;return new Dr(i=>{for(let a=0,s=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(t);break}if(a==0&&i.next==qN||a==1&&i.next==sx||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,s++;else if(a==r&&i.next==vm){l>s?i.acceptToken(t,-s):i.acceptToken(n,-(s-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(t,1);break}else a=s=0;i.advance()}})}var P9=ox("script",J6,e9),N9=ox("style",t9,n9),R9=ox("textarea",r9,i9),M9=No({"Text RawText IncompleteTag IncompleteCloseTag":Z.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Z.angleBracket,TagName:Z.tagName,"MismatchedCloseTag/TagName":[Z.tagName,Z.invalid],AttributeName:Z.attributeName,"AttributeValue UnquotedAttributeValue":Z.attributeValue,Is:Z.definitionOperator,"EntityReference CharacterReference":Z.character,Comment:Z.blockComment,ProcessingInst:Z.processingInstruction,DoctypeDecl:Z.documentMeta}),L9=Gm.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO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^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:T9,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[M9],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(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4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[P9,N9,R9,A9,C9,E9,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function IN(e,t){let n=Object.create(null);for(let r of e.getChildren(zN)){let i=r.getChild(f9),a=r.getChild(Sy)||r.getChild($N);i&&(n[t.read(i.from,i.to)]=a?a.type.id==Sy?t.read(a.from+1,a.to-1):t.read(a.from,a.to):"")}return n}function Gj(e,t){let n=e.getChild(d9);return n?t.read(n.from,n.to):" "}function gO(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=IN(e.node.parent.firstChild,t))))return{parser:i.parser,bracketed:!0};return null}function XN(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let l of e)(l.tag=="script"?n:l.tag=="style"?r:l.tag=="textarea"?i:a).push(l);let s=t.length?Object.create(null):null;for(let l of t)(s[l.name]||(s[l.name]=[])).push(l);return RP((l,c)=>{let d=l.type.id;if(d==h9)return gO(l,c,n);if(d==m9)return gO(l,c,r);if(d==p9)return gO(l,c,i);if(d==DN&&a.length){let f=l.node,m=f.firstChild,p=m&&Gj(m,c),O;if(p){for(let b of a)if(b.tag==p&&(!b.attrs||b.attrs(O||(O=IN(m,c))))){let x=f.lastChild,w=x.type.id==v9?x.from:f.to;if(w>m.to)return{parser:b.parser,overlay:[{from:m.to,to:w}]}}}}if(s&&d==zN){let f=l.node,m;if(m=f.firstChild){let p=s[c.read(m.from,m.to)];if(p)for(let O of p){if(O.tagName&&O.tagName!=Gj(f.parent,c))continue;let b=f.lastChild;if(b.type.id==Sy){let x=b.from+1,w=b.lastChild,k=b.to-(w&&w.isError?0:1);if(k>x)return{parser:O.parser,overlay:[{from:x,to:k}],bracketed:!0}}else if(b.type.id==$N)return{parser:O.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}var D9=122,Kj=1,z9=123,$9=124,ZN=2,q9=125,I9=3,X9=4,BN=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Z9=58,B9=40,VN=95,V9=91,Wh=45,U9=46,Y9=35,W9=37,F9=38,H9=92,G9=10,K9=42;function od(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function lx(e){return e>=48&&e<=57}function Jj(e){return lx(e)||e>=97&&e<=102||e>=65&&e<=70}var UN=(e,t,n)=>(r,i)=>{for(let a=!1,s=0,l=0;;l++){let{next:c}=r;if(od(c)||c==Wh||c==VN||a&&lx(c))!a&&(c!=Wh||l>0)&&(a=!0),s===l&&c==Wh&&s++,r.advance();else if(c==H9&&r.peek(1)!=G9){if(r.advance(),Jj(r.next)){do r.advance();while(Jj(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(s==2&&i.canShift(ZN)?t:c==B9?n:e);break}}},J9=new Dr(UN(z9,ZN,$9)),e7=new Dr(UN(q9,I9,X9)),t7=new Dr(e=>{if(BN.includes(e.peek(-1))){let{next:t}=e;(od(t)||t==VN||t==Y9||t==U9||t==K9||t==V9||t==Z9&&od(e.peek(1))||t==Wh||t==F9)&&e.acceptToken(D9)}}),n7=new Dr(e=>{if(!BN.includes(e.peek(-1))){let{next:t}=e;if(t==W9&&(e.advance(),e.acceptToken(Kj)),od(t)){do e.advance();while(od(e.next)||lx(e.next));e.acceptToken(Kj)}}}),r7=No({"AtKeyword import charset namespace keyframes media supports":Z.definitionKeyword,"from to selector":Z.keyword,NamespaceName:Z.namespace,KeyframeName:Z.labelName,KeyframeRangeName:Z.operatorKeyword,TagName:Z.tagName,ClassName:Z.className,PseudoClassName:Z.constant(Z.className),IdName:Z.labelName,"FeatureName PropertyName":Z.propertyName,AttributeName:Z.attributeName,NumberLiteral:Z.number,KeywordQuery:Z.keyword,UnaryQueryOp:Z.operatorKeyword,"CallTag ValueName":Z.atom,VariableName:Z.variableName,Callee:Z.operatorKeyword,Unit:Z.unit,"UniversalSelector NestingSelector":Z.definitionOperator,"MatchOp CompareOp":Z.compareOperator,"ChildOp SiblingOp, LogicOp":Z.logicOperator,BinOp:Z.arithmeticOperator,Important:Z.modifier,Comment:Z.blockComment,ColorLiteral:Z.color,"ParenthesizedContent StringLiteral":Z.string,":":Z.punctuation,"PseudoOp #":Z.derefOperator,"; ,":Z.separator,"( )":Z.paren,"[ ]":Z.squareBracket,"{ }":Z.brace}),i7={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},a7={__proto__:null,or:98,and:98,not:106,only:106,layer:170},s7={__proto__:null,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!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[r7],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$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TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[t7,n7,J9,e7,1,2,3,4,new gm("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:e=>i7[e]||-1},{term:125,get:e=>a7[e]||-1},{term:4,get:e=>s7[e]||-1},{term:25,get:e=>o7[e]||-1},{term:123,get:e=>l7[e]||-1}],tokenPrec:1963}),vO=null;function OO(){if(!vO&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!="cssText"&&r!="cssFloat"&&typeof e[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));vO=t.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return vO||[]}var eT=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),tT=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),u7=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),d7=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),xa=/^(\w[\w-]*|-\w[\w-]*|)$/,f7=/^-(-[\w-]*)?$/;function h7(e,t){var n;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let r=(n=e.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:t.sliceString(r.from,r.to)=="var"}var nT=new NP,m7=["Declaration"];function p7(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function YN(e,t,n){if(t.to-t.from>4096){let r=nT.get(t);if(r)return r;let i=[],a=new Set,s=t.cursor(wt.IncludeAnonymous);if(s.firstChild())do for(let l of YN(e,s.node,n))a.has(l.label)||(a.add(l.label),i.push(l));while(s.nextSibling());return nT.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(a=>{var s;if(n(a)&&a.matchContext(m7)&&((s=a.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let l=e.sliceString(a.from,a.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}var g7=e=>t=>{let{state:n,pos:r}=t,i=Dn(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(a||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:OO(),validFor:xa};if(i.name=="ValueName")return{from:i.from,options:tT,validFor:xa};if(i.name=="PseudoClassName")return{from:i.from,options:eT,validFor:xa};if(e(i)||(t.explicit||a)&&h7(i,n.doc))return{from:e(i)||a?i.from:r,options:YN(n.doc,p7(i),e),validFor:f7};if(i.name=="TagName"){for(let{parent:c}=i;c;c=c.parent)if(c.name=="Block")return{from:i.from,options:OO(),validFor:xa};return{from:i.from,options:u7,validFor:xa}}if(i.name=="AtKeyword")return{from:i.from,options:d7,validFor:xa};if(!t.explicit)return null;let s=i.resolve(r),l=s.childBefore(r);return l&&l.name==":"&&s.name=="PseudoClassSelector"?{from:r,options:eT,validFor:xa}:l&&l.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:r,options:tT,validFor:xa}:s.name=="Block"||s.name=="Styles"?{from:r,options:OO(),validFor:xa}:null},v7=g7(e=>e.name=="VariableName"),Om=Fm.define({name:"css",parser:c7.configure({props:[Sd.add({Declaration:Al()}),rc.add({"Block KeyframeList":F0})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function O7(){return new Vl(Om,Om.data.of({autocomplete:v7}))}var b7=316,y7=317,rT=1,x7=2,S7=3,w7=4,_7=318,k7=320,j7=321,T7=5,C7=6,E7=0,_y=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],WN=125,Q7=59,ky=47,A7=42,P7=43,N7=45,R7=60,M7=44,L7=63,D7=46,z7=91,$7=new PN({start:!1,shift(e,t){return t==T7||t==C7||t==k7?e:t==j7},strict:!1}),q7=new Dr((e,t)=>{let{next:n}=e;(n==WN||n==-1||t.context)&&e.acceptToken(_7)},{contextual:!0,fallback:!0}),I7=new Dr((e,t)=>{let{next:n}=e,r;_y.indexOf(n)>-1||n==ky&&((r=e.peek(1))==ky||r==A7)||n!=WN&&n!=Q7&&n!=-1&&!t.context&&e.acceptToken(b7)},{contextual:!0}),X7=new Dr((e,t)=>{e.next==z7&&!t.context&&e.acceptToken(y7)},{contextual:!0}),Z7=new Dr((e,t)=>{let{next:n}=e;if(n==P7||n==N7){if(e.advance(),n==e.next){e.advance();let r=!t.context&&t.canShift(rT);e.acceptToken(r?rT:x7)}}else n==L7&&e.peek(1)==D7&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(S7))},{contextual:!0});function bO(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var B7=new Dr((e,t)=>{if(e.next!=R7||!t.dialectEnabled(E7)||(e.advance(),e.next==ky))return;let n=0;for(;_y.indexOf(e.next)>-1;)e.advance(),n++;if(bO(e.next,!0)){for(e.advance(),n++;bO(e.next,!1);)e.advance(),n++;for(;_y.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==M7)return;for(let r=0;;r++){if(r==7){if(!bO(e.next,!0))return;break}if(e.next!="extends".charCodeAt(r))break;e.advance(),n++}}e.acceptToken(w7,-n)}),V7=No({"get set async static":Z.modifier,"for while do if else switch try catch finally return throw break continue default case defer":Z.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":Z.operatorKeyword,"let var const using function class extends":Z.definitionKeyword,"import export from":Z.moduleKeyword,"with debugger new":Z.keyword,TemplateString:Z.special(Z.string),super:Z.atom,BooleanLiteral:Z.bool,this:Z.self,null:Z.null,Star:Z.modifier,VariableName:Z.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Z.function(Z.variableName),VariableDefinition:Z.definition(Z.variableName),Label:Z.labelName,PropertyName:Z.propertyName,PrivatePropertyName:Z.special(Z.propertyName),"CallExpression/MemberExpression/PropertyName":Z.function(Z.propertyName),"FunctionDeclaration/VariableDefinition":Z.function(Z.definition(Z.variableName)),"ClassDeclaration/VariableDefinition":Z.definition(Z.className),"NewExpression/VariableName":Z.className,PropertyDefinition:Z.definition(Z.propertyName),PrivatePropertyDefinition:Z.definition(Z.special(Z.propertyName)),UpdateOp:Z.updateOperator,"LineComment Hashbang":Z.lineComment,BlockComment:Z.blockComment,Number:Z.number,String:Z.string,Escape:Z.escape,ArithOp:Z.arithmeticOperator,LogicOp:Z.logicOperator,BitOp:Z.bitwiseOperator,CompareOp:Z.compareOperator,RegExp:Z.regexp,Equals:Z.definitionOperator,Arrow:Z.function(Z.punctuation),": Spread":Z.punctuation,"( )":Z.paren,"[ ]":Z.squareBracket,"{ }":Z.brace,"InterpolationStart InterpolationEnd":Z.special(Z.brace),".":Z.derefOperator,", ;":Z.separator,"@":Z.meta,TypeName:Z.typeName,TypeDefinition:Z.definition(Z.typeName),"type enum interface implements namespace module declare":Z.definitionKeyword,"abstract global Privacy readonly override":Z.modifier,"is keyof unique infer asserts":Z.operatorKeyword,JSXAttributeValue:Z.attributeValue,JSXText:Z.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Z.angleBracket,"JSXIdentifier JSXNameSpacedName":Z.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Z.attributeName,"JSXBuiltin/JSXIdentifier":Z.standard(Z.tagName)}),U7={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Y7={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},W7={__proto__:null,"<":193},F7=Gm.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ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Q:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:$7,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[V7],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a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T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[I7,X7,Z7,B7,2,3,4,5,6,7,8,9,10,11,12,13,14,q7,new gm("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new gm("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>U7[e]||-1},{term:343,get:e=>Y7[e]||-1},{term:95,get:e=>W7[e]||-1}],tokenPrec:15201}),FN=[dr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),dr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),dr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),dr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),dr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),dr(`try {
118
+ \${}
119
+ } catch (\${error}) {
120
+ \${}
121
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),dr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),dr(`if (\${}) {
122
+ \${}
123
+ } else {
124
+ \${}
125
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),dr(`class \${name} {
126
+ constructor(\${params}) {
127
+ \${}
128
+ }
129
+ }`,{label:"class",detail:"definition",type:"keyword"}),dr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),dr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],H7=FN.concat([dr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),dr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),dr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),iT=new NP,HN=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ou(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}var G7=["FunctionDeclaration"],K7={FunctionDeclaration:ou("function"),ClassDeclaration:ou("class"),ClassExpression:()=>!0,EnumDeclaration:ou("constant"),TypeAliasDeclaration:ou("type"),NamespaceDeclaration:ou("namespace"),VariableDefinition(e,t){e.matchContext(G7)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function GN(e,t){let n=iT.get(t);if(n)return n;let r=[],i=!0;function a(s,l){let c=e.sliceString(s.from,s.to);r.push({label:c,type:l})}return t.cursor(wt.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let l=K7[s.name];if(l&&l(s,a)||HN.has(s.name))return!1}else if(s.to-s.from>8192){for(let l of GN(e,s.node))r.push(l);return!1}}),iT.set(t,r),r}var aT=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,KN=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function J7(e){let t=Dn(e.state).resolveInner(e.pos,-1);if(KN.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&aT.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let i=t;i;i=i.parent)HN.has(i.name)&&(r=r.concat(GN(e.state.doc,i)));return{options:r,from:n?t.from:e.pos,validFor:aT}}var Wi=Fm.define({name:"javascript",parser:F7.configure({props:[Sd.add({IfStatement:Al({except:/^\s*({|else\b)/}),TryStatement:Al({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:gB,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:mB({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Al({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),rc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":F0,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name=="JSXSelfClosingTag")return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let n=(t=e.firstChild)===null||t===void 0?void 0:t.nextSibling,r=e.lastChild;return!n||n.type.isError?null:{from:n.to,to:r.type.isError?e.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),JN={test:e=>/^JSX/.test(e.name),facet:Y0({commentTokens:{block:{open:"{/*",close:"*/}"}}})},eR=Wi.configure({dialect:"ts"},"typescript"),tR=Wi.configure({dialect:"jsx",props:[W0.add(e=>e.isTop?[JN]:void 0)]}),nR=Wi.configure({dialect:"jsx ts",props:[W0.add(e=>e.isTop?[JN]:void 0)]},"typescript"),rR=e=>({label:e,type:"keyword"}),iR="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(rR),eV=iR.concat(["declare","implements","private","protected","public"].map(rR));function tV(e={}){let t=e.jsx?e.typescript?nR:tR:e.typescript?eR:Wi,n=e.typescript?H7.concat(eV):FN.concat(iR);return new Vl(t,[Wi.data.of({autocomplete:e6(KN,JB(n))}),Wi.data.of({autocomplete:J7}),e.jsx?iV:[]])}function nV(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function sT(e,t,n=e.length){for(let r=t==null?void 0:t.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return e.sliceString(r.from,Math.min(r.to,n));return""}var rV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),iV=$e.inputHandler.of((e,t,n,r,i)=>{if((rV?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=">"&&r!="/"||!Wi.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,l=s.changeByRange(c=>{var d;let{head:f}=c,m=Dn(s).resolveInner(f-1,-1),p;if(m.name=="JSXStartTag"&&(m=m.parent),!(s.doc.sliceString(f-1,f)!=r||m.name=="JSXAttributeValue"&&m.to>f)){if(r==">"&&m.name=="JSXFragmentTag")return{range:c,changes:{from:f,insert:"</>"}};if(r=="/"&&m.name=="JSXStartCloseTag"){let O=m.parent,b=O.parent;if(b&&O.from==f-2&&((p=sT(s.doc,b.firstChild,f))||((d=b.firstChild)===null||d===void 0?void 0:d.name)=="JSXFragmentTag")){let x=`${p}>`;return{range:Ee.cursor(f+x.length,-1),changes:{from:f,insert:x}}}}else if(r==">"){let O=nV(m);if(O&&O.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(f,f+2))&&(p=sT(s.doc,O,f)))return{range:c,changes:{from:f,insert:`</${p}>`}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([a,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),lu=["_blank","_self","_top","_parent"],yO=["ascii","utf-8","utf-16","latin1","latin1"],xO=["get","post","put","delete"],SO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ar=["true","false"],Ae={},aV={a:{attrs:{href:null,ping:null,type:null,media:null,target:lu,hreflang:null}},abbr:Ae,address:Ae,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ae,aside:Ae,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ae,base:{attrs:{href:null,target:lu}},bdi:Ae,bdo:Ae,blockquote:{attrs:{cite:null}},body:Ae,br:Ae,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:SO,formmethod:xO,formnovalidate:["novalidate"],formtarget:lu,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ae,center:Ae,cite:Ae,code:Ae,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ae,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ae,div:Ae,dl:Ae,dt:Ae,em:Ae,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ae,figure:Ae,footer:Ae,form:{attrs:{action:null,name:null,"accept-charset":yO,autocomplete:["on","off"],enctype:SO,method:xO,novalidate:["novalidate"],target:lu}},h1:Ae,h2:Ae,h3:Ae,h4:Ae,h5:Ae,h6:Ae,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ae,hgroup:Ae,hr:Ae,html:{attrs:{manifest:null}},i:Ae,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:SO,formmethod:xO,formnovalidate:["novalidate"],formtarget:lu,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ae,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ae,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ae,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:yO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ae,noscript:Ae,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ae,param:{attrs:{name:null,value:null}},pre:Ae,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ae,rt:Ae,ruby:Ae,samp:Ae,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:yO}},section:Ae,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ae,source:{attrs:{src:null,type:null,media:null}},span:Ae,strong:Ae,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ae,summary:Ae,sup:Ae,table:Ae,tbody:Ae,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ae,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ae,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ae,time:{attrs:{datetime:null}},title:Ae,tr:Ae,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ae,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ae},aR={accesskey:null,class:null,contenteditable:Ar,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ar,autocorrect:Ar,autocapitalize:Ar,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ar,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ar,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ar,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ar,"aria-hidden":Ar,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ar,"aria-multiselectable":Ar,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ar,"aria-relevant":null,"aria-required":Ar,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},sR="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of sR)aR[e]=null;var ld=class{constructor(e,t){this.tags={...aV,...e},this.globalAttrs={...aR,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};ld.default=new ld;function Yl(e,t,n=e.length){if(!t)return"";let r=t.firstChild,i=r&&r.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,n)):""}function Wl(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function oR(e,t,n){let r=n.tags[Yl(e,Wl(t))];return(r==null?void 0:r.children)||n.allTags}function cx(e,t){let n=[];for(let r=Wl(t);r&&!r.type.isTop;r=Wl(r.parent)){let i=Yl(e,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(t.name=="EndTag"||t.from>=r.firstChild.to)&&n.push(i)}return n}var lR=/^[:\-\.\w\u00b7-\uffff]*$/;function oT(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?"":">",s=Wl(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:oR(e.doc,s,t).map(l=>({label:l,type:"type"})).concat(cx(e.doc,n).map((l,c)=>({label:"/"+l,apply:"/"+l+a,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function lT(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:cx(e.doc,t).map((a,s)=>({label:a,apply:a+i,type:"type",boost:99-s})),validFor:lR}}function sV(e,t,n,r){let i=[],a=0;for(let s of oR(e.doc,n,t))i.push({label:"<"+s,type:"type"});for(let s of cx(e.doc,n))i.push({label:"</"+s+">",type:"type",boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function oV(e,t,n,r,i){let a=Wl(n),s=a?t.tags[Yl(e.doc,a)]:null,l=s&&s.attrs?Object.keys(s.attrs):[],c=s&&s.globalAttrs===!1?l:l.length?l.concat(t.globalAttrNames):t.globalAttrNames;return{from:r,to:i,options:c.map(d=>({label:d,type:"property"})),validFor:lR}}function lV(e,t,n,r,i){var a;let s=(a=n.parent)===null||a===void 0?void 0:a.getChild("AttributeName"),l=[],c;if(s){let d=e.sliceDoc(s.from,s.to),f=t.globalAttrs[d];if(!f){let m=Wl(n),p=m?t.tags[Yl(e.doc,m)]:null;f=(p==null?void 0:p.attrs)&&p.attrs[d]}if(f){let m=e.sliceDoc(r,i).toLowerCase(),p='"',O='"';/^['"]/.test(m)?(c=m[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",O=e.sliceDoc(i,i+1)==m[0]?"":m[0],m=m.slice(1),r++):c=/^[^\s<>='"]*$/;for(let b of f)l.push({label:b,apply:p+b+O,type:"constant"})}}return{from:r,to:i,options:l,validFor:c}}function cR(e,t){let{state:n,pos:r}=t,i=Dn(n).resolveInner(r,-1),a=i.resolve(r);for(let s=r,l;a==i&&(l=i.childBefore(s));){let c=l.lastChild;if(!c||!c.type.isError||c.from<c.to)break;a=i=l,s=c.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?lT(n,i,i.from,r):oT(n,e,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?oT(n,e,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?lT(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?oV(n,e,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?lV(n,e,i,i.name=="Is"?r:i.from,r):t.explicit&&(a.name=="Element"||a.name=="Text"||a.name=="Document")?sV(n,e,i,r):null}function cV(e){return cR(ld.default,e)}function uV(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new ld(t,n):ld.default;return i=>cR(r,i)}var dV=Wi.parser.configure({top:"SingleExpression"}),uR=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:eR.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:tR.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:nR.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:dV},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Wi.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:Om.parser}],dR=[{name:"style",parser:Om.parser.configure({top:"Styles"})}].concat(sR.map(e=>({name:e,parser:Wi.parser}))),fR=Fm.define({name:"html",parser:L9.configure({props:[Sd.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let r=e.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;t=r=i}return t&&!((n=t.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),rc.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),xB.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Fh=fR.configure({wrap:XN(uR,dR)});function fV(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=XN((e.nestedLanguages||[]).concat(uR),(e.nestedAttributes||[]).concat(dR)));let r=n?fR.configure({wrap:n,dialect:t}):t?Fh.configure({dialect:t}):Fh;return new Vl(r,[Fh.data.of({autocomplete:uV(e)}),e.autoCloseTags!==!1?hV:[],tV().support,O7().support])}var cT=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),hV=$e.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=">"&&r!="/"||!Fh.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,l=s.changeByRange(c=>{var d,f,m;let p=s.doc.sliceString(c.from-1,c.to)==r,{head:O}=c,b=Dn(s).resolveInner(O,-1),x;if(p&&r==">"&&b.name=="EndTag"){let w=b.parent;if(((f=(d=w.parent)===null||d===void 0?void 0:d.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(x=Yl(s.doc,w.parent,O))&&!cT.has(x)){let k=O+(s.doc.sliceString(O,O+1)===">"?1:0),T=`</${x}>`;return{range:c,changes:{from:O,to:k,insert:T}}}}else if(p&&r=="/"&&b.name=="IncompleteCloseTag"){let w=b.parent;if(b.from==O-2&&((m=w.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(x=Yl(s.doc,w,O))&&!cT.has(x)){let k=O+(s.doc.sliceString(O,O+1)===">"?1:0),T=`${x}>`;return{range:Ee.cursor(O+T.length,-1),changes:{from:O,to:k,insert:T}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([a,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),hR=Y0({commentTokens:{block:{open:"<!--",close:"-->"}}}),mR=new Ke,pR=C6.configure({props:[rc.add(e=>!e.is("Block")||e.is("Document")||jy(e)!=null||mV(e)?void 0:(t,n)=>({from:n.doc.lineAt(t.from).to,to:t.to})),mR.add(jy),Sd.add({Document:()=>null}),vo.add({Document:hR})]});function jy(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function mV(e){return e.name=="OrderedList"||e.name=="BulletList"}function pV(e,t){let n=e;for(;;){let r=n.nextSibling,i;if(!r||(i=jy(r.type))!=null&&i<=t)break;n=r}return n.to}var gV=vB.of((e,t,n)=>{for(let r=Dn(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let i=r.type.prop(mR);if(i==null)continue;let a=pV(r,i);if(a>n)return{from:n,to:a}}return null});function ux(e){return new ni(hR,e,[],"markdown")}var vV=ux(pR),OV=pR.configure([$6,I6,q6,X6,{props:[rc.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),bm=ux(OV);function bV(e,t){return n=>{if(n&&e){let r=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?r=e(n):r=pj.matchLanguageName(e,n,!0),r instanceof pj)return r.support?r.support.language.parser:zP.getSkippingParser(r.load());if(r)return r.parser}return t?t.parser:null}}var wO=class{constructor(e,t,n,r,i,a,s){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=s}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let r=this.to-this.from-n.length-this.spaceAfter.length;r>0;r--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+vR(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function gR(e,t){let n=[],r=[];for(let i=e;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let a=n[i],s,l=t.lineAt(a.from),c=a.from-l.from;if(a.name=="Blockquote"&&(s=/^ *>( ?)/.exec(l.text.slice(c))))r.push(new wO(a,c,c+s[0].length,"",s[1],">",null));else if(a.name=="ListItem"&&a.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let d=s[3],f=s[0].length;d.length>=4&&(d=d.slice(0,d.length-4),f-=4),r.push(new wO(a.parent,c,c+f,s[1],d,s[2],a))}else if(a.name=="ListItem"&&a.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let d=s[4],f=s[0].length;d.length>4&&(d=d.slice(0,d.length-4),f-=4);let m=s[2];s[3]&&(m+=s[3].replace(/[xX]/," ")),r.push(new wO(a.parent,c,c+f,s[1],d,m,a))}}return r}function vR(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function _O(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name=="ListItem"){let l=vR(a,t),c=+l[2];if(i>=0){if(c!=i+1)return;n.push({from:a.from+l[1].length,to:a.from+l[0].length,insert:String(i+2+r)})}i=c}let s=a.nextSibling;if(!s)break;a=s}}function dx(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(IP)!=" ")return e;let r=Wu(e,4,n),i="";for(let a=r;a>0;)a>=4?(i+=" ",a-=4):(i+=" ",a--);return i+e.slice(n)}var yV=(e={})=>({state:t,dispatch:n})=>{let r=Dn(t),{doc:i}=t,a=null,s=t.changeByRange(l=>{if(!l.empty||!bm.isActiveAt(t,l.from,-1)&&!bm.isActiveAt(t,l.from,1))return a={range:l};let c=l.from,d=i.lineAt(c),f=gR(r.resolveInner(c,-1),i);for(;f.length&&f[f.length-1].from>c-d.from;)f.pop();if(!f.length)return a={range:l};let m=f[f.length-1];if(m.to-m.spaceAfter.length>c-d.from)return a={range:l};let p=c>=m.to-m.spaceAfter.length&&!/\S/.test(d.text.slice(m.to));if(m.item&&p){let k=m.node.firstChild,T=m.node.getChild("ListItem","ListItem");if(k.to>=c||T&&T.to<c||d.from>0&&!/[^\s>]/.test(i.lineAt(d.from-1).text)||e.nonTightLists===!1){let j=f.length>1?f[f.length-2]:null,E,Q="";j&&j.item?(E=d.from+j.from,Q=j.marker(i,1)):E=d.from+(j?j.to:0);let A=[{from:E,to:c,insert:Q}];return m.node.name=="OrderedList"&&_O(m.item,i,A,-2),j&&j.node.name=="OrderedList"&&_O(j.item,i,A),{range:Ee.cursor(E+Q.length),changes:A}}else{let j=dT(f,t,d);return{range:Ee.cursor(c+j.length+1),changes:{from:d.from,insert:j+t.lineBreak}}}}if(m.node.name=="Blockquote"&&p&&d.from){let k=i.lineAt(d.from-1),T=/>\s*$/.exec(k.text);if(T&&T.index==m.from){let j=t.changes([{from:k.from+T.index,to:k.to},{from:d.from+m.from,to:d.to}]);return{range:l.map(j),changes:j}}}let O=[];m.node.name=="OrderedList"&&_O(m.item,i,O);let b=m.item&&m.item.from<d.from,x="";if(!b||/^[\s\d.)\-+*>]*/.exec(d.text)[0].length>=m.to)for(let k=0,T=f.length-1;k<=T;k++)x+=k==T&&!b?f[k].marker(i,1):f[k].blank(k<T?Wu(d.text,4,f[k+1].from)-x.length:null);let w=c;for(;w>d.from&&/\s/.test(d.text.charAt(w-d.from-1));)w--;return x=dx(x,t),SV(m.node,t.doc)&&(x=dT(f,t,d)+t.lineBreak+x),O.push({from:w,to:c,insert:t.lineBreak+x}),{range:Ee.cursor(w+x.length+1),changes:O}});return a?!1:(n(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)},xV=yV();function uT(e){return e.name=="QuoteMark"||e.name=="ListMark"}function SV(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let n=e.firstChild,r=e.getChild("ListItem","ListItem");if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),s=/^[\s>]*$/.test(i.text);return i.number+(s?0:1)<a.number}function dT(e,t,n){let r="";for(let i=0,a=e.length-2;i<=a;i++)r+=e[i].blank(i<a?Wu(n.text,4,e[i+1].from)-r.length:null,i<a);return dx(r,t)}function wV(e,t){let n=e.resolveInner(t,-1),r=t;uT(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(uT(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}var _V=({state:e,dispatch:t})=>{let n=Dn(e),r=null,i=e.changeByRange(a=>{let s=a.from,{doc:l}=e;if(a.empty&&bm.isActiveAt(e,a.from)){let c=l.lineAt(s),d=gR(wV(n,s),l);if(d.length){let f=d[d.length-1],m=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(s-c.from>m&&!/\S/.test(c.text.slice(m,s-c.from)))return{range:Ee.cursor(c.from+m),changes:{from:c.from+m,to:s}};if(s-c.from==m&&(!f.item||c.from<=f.item.from||!/\S/.test(c.text.slice(0,f.to)))){let p=c.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(c.text.slice(f.from,f.to))){let O=f.blank(Wu(c.text,4,f.to)-Wu(c.text,4,f.from));return p==c.from&&(O=dx(O,e)),{range:Ee.cursor(p+O.length),changes:{from:p,to:c.from+f.to,insert:O}}}if(p<s)return{range:Ee.cursor(p),changes:{from:p,to:s}}}}}return r={range:a}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},kV=[{key:"Enter",run:xV},{key:"Backspace",run:_V}],OR=fV({matchClosingTags:!1});function jV(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=vV,completeHTMLTags:a=!0,pasteURLAsLink:s=!0,htmlTagLanguage:l=OR}=e;if(!(i instanceof ON))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],d=[l.support,gV],f;s&&d.push(QV),n instanceof Vl?(d.push(n.support),f=n.language):n&&(f=n);let m=t||f?bV(t,f):void 0;c.push(Q6({codeParser:m,htmlParser:l.language.parser})),r&&d.push(yd.high(X0.of(kV)));let p=ux(i.configure(c));return a&&d.push(p.data.of({autocomplete:TV})),new Vl(p,d)}function TV(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=Dn(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:CV(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var kO=null;function CV(){if(kO)return kO;let e=cV(new GB(Kt.create({extensions:OR}),0,!0));return kO=e?e.options:[]}var EV=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,QV=$e.domEventHandlers({paste:(e,t)=>{var n;let{main:r}=t.state.selection;if(r.empty)return!1;let i=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!bm.isActiveAt(t.state,r.from,1)))return!1;let a=Dn(t.state),s=!1;return a.iterate({from:r.from,to:r.to,enter:l=>{(l.from>r.from||EV.test(l.name))&&(s=!0)},leave:l=>{l.to<r.to&&(s=!0)}}),s?!1:(t.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});function bR(e,t,n={}){if(!e)return!1;const{pulse:r=!1,behavior:i="smooth"}=n,a=t.querySelector(`[data-annotation-id="${CSS.escape(e)}"]`);if(!a)return!1;const s=a.closest(".semiont-browse-view__content")||a.closest(".semiont-annotate-view__content")||a.closest(".semiont-document-viewer__scrollable-body");if(s){const l=a.getBoundingClientRect(),c=s.getBoundingClientRect();if(!(l.top>=c.top&&l.bottom<=c.bottom)){const f=a.offsetTop,m=s.clientHeight,p=a.offsetHeight,O=f-m/2+p/2;s.scrollTo({top:O,behavior:i})}}return r&&(a.classList.add("annotation-pulse"),setTimeout(()=>{a.classList.remove("annotation-pulse")},2e3)),!0}function AV(e,t){if(!t.includes(`\r
130
+ `))return e;const n=[];for(let i=0;i<t.length-1;i++)t[i]==="\r"&&t[i+1]===`
131
+ `&&n.push(i);const r=i=>{let a=0,s=n.length;for(;a<s;){const l=a+s>>>1;n[l]<i?a=l+1:s=l}return i-a};return e.map(i=>({...i,start:r(i.start),end:r(i.end)}))}function PV(e){const t=Ls(e),n=To(e),r=Gl(e),i=Co(e),a=oi(e),s=s0(e);return t?"Comment":n?"Highlight":r?"Assessment":i?"Tag":s?"Resolved Reference":a?"Unresolved Reference":"Annotation"}function NV(e,t){var f;const n=((f=Object.values(Jn).find(m=>m.matchesAnnotation(e)))==null?void 0:f.className)||"annotation-highlight",r=t?`${n} annotation-sparkle`:n,i=To(e),a=oi(e),s=Ls(e),l=Gl(e),c=Co(e);let d="highlight";return s?d="comment":a?d="reference":l?d="assessment":c?d="tag":i&&(d="highlight"),{className:r,annotationType:d,annotationId:e.id,tooltip:PV(e)}}function RV(e,t){return e.filter(n=>n.annotation).sort((n,r)=>n.start-r.start).map(n=>{const r=n.annotation,i=(t==null?void 0:t.has(r.id))||!1;return{start:n.start,end:n.end,meta:NV(r,i)}})}function MV(e,t,n){return e.filter(r=>r.annotation&&oi(r.annotation)).sort((r,i)=>r.end-i.end).map(r=>{const i=r.annotation,a=Ea(i.body),s=a?n==null?void 0:n(a):void 0,l=t?i.id===t:!1;return{annotationId:i.id,position:r.end,targetName:s,isGenerating:l,bodySource:a??void 0}})}function LV(e,t,n){const r=e.closest("[data-annotation-id]"),i=r==null?void 0:r.getAttribute("data-annotation-id");if(!i)return!1;const a=t.get(i);return a!=null&&a.annotation?(n.client.emit("browse:click",{annotationId:i,motivation:a.annotation.motivation}),!0):!1}function DV(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{handled:!1};const n=t.dataset.widgetAnnotationId,r=t.dataset.widgetBodySource,i=t.dataset.widgetResolved==="true";return n?i&&r?{handled:!0,action:"navigate",resourceId:r,annotationId:n}:{handled:!0,action:"browse-click",annotationId:n,motivation:t.dataset.widgetMotivation||"linking"}:{handled:!1}}function zV(e,t){e.handled&&(e.action==="navigate"&&e.resourceId?t.client.emit("browse:reference-navigate",{resourceId:e.resourceId}):e.action==="browse-click"&&e.annotationId&&t.client.emit("browse:click",{annotationId:e.annotationId,motivation:e.motivation||"linking"}))}function $V(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{showPreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="1"),t.dataset.widgetResolved==="true"&&t.dataset.widgetTargetName?{showPreview:!0,targetName:t.dataset.widgetTargetName,widget:t}:{showPreview:!1,widget:t}}function qV(e){const t=e.closest(".reference-preview-widget");if(!t)return{hidePreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="0.6"),t.dataset.widgetResolved==="true"?{hidePreview:!0,widget:t}:{hidePreview:!1,widget:t}}var yR=rn.define(),xR=rn.define();function IV(e,t){const n=new Yu,r=RV(e,t);for(const{start:i,end:a,meta:s}of r){const l=Xt.mark({class:s.className,attributes:{"data-annotation-id":s.annotationId,"data-annotation-type":s.annotationType,title:s.tooltip}});n.add(i,a,l)}return n.finish()}function XV(){return $s.define({create(){return Xt.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(yR)&&(e=IV(n.value.segments,n.value.newAnnotationIds));return e},provide:e=>$e.decorations.from(e)})}function ZV(e,t,n,r){const i=new Yu,a=MV(t,n,r),s=new Map;for(const l of t)l.annotation&&oi(l.annotation)&&s.set(l.end,l);for(const l of a){const c=s.get(l.position);if(!(c!=null&&c.annotation))continue;const d=new kB(c.annotation,l.targetName,l.isGenerating);i.add(l.position,l.position,Xt.widget({widget:d,side:1}))}return i.finish()}var BV=$s.define({create(){return Xt.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(xR)&&(e=ZV(n.value.content,n.value.segments,n.value.generatingReferenceId,n.value.getTargetResourceName));return e},provide:e=>$e.decorations.from(e)});function SR({content:e,segments:t=[],onChange:n,editable:r=!1,newAnnotationIds:i,hoveredAnnotationId:a,scrollToAnnotationId:s,sourceView:l=!1,showLineNumbers:c=!1,enableWidgets:d=!1,session:f,getTargetResourceName:m,generatingReferenceId:p,hoverDelayMs:O}){const b=_.useRef(null),x=_.useRef(null),w=_.useRef(e),k=AV(t,e),T=_.useRef(k),j=_.useRef(new Map),E=_.useRef(new Q0),Q=_.useRef(f),A=_.useRef(m);T.current=t;const M=new Map;for(const D of t)D.annotation&&M.set(D.annotation.id,D);j.current=M,Q.current=f,A.current=m,_.useEffect(()=>{if(!b.current||x.current)return;const D=XV(),P=Kt.create({doc:e,extensions:[jV(),E.current.of(c?hm():[]),$e.editable.of(r),$e.lineWrapping,D,d?BV:[],$e.updateListener.of(G=>{if(G.docChanged&&n){const re=G.state.doc.toString();w.current=re,n(re)}}),$e.domEventHandlers({click:(G,re)=>{const R=G.target;return Q.current&&LV(R,j.current,Q.current)?(G.preventDefault(),!0):!1}}),$e.baseTheme({"&.cm-editor":{height:"100%",outline:"none"},"&.cm-editor.cm-focused":{outline:"none"},".cm-scroller":{overflow:"visible !important",height:"auto !important"},".cm-content, .cm-gutters":{minHeight:"0 !important"},".cm-content":{padding:l?"1rem":"0",fontFamily:l?"ui-monospace, monospace":"inherit",fontSize:l?"0.875rem":"inherit",lineHeight:"1.6",whiteSpace:l?"pre-wrap":"pre",caretColor:"var(--cm-cursor-color, #000000)"},".cm-line":{padding:"0",wordBreak:l?"break-word":"normal"},".cm-gutters":{backgroundColor:"transparent",border:"none",paddingRight:"0.5rem"},".cm-lineNumbers .cm-gutterElement":{minWidth:"2rem",color:"rgb(156, 163, 175)",opacity:"0.7"}})]}),B=new $e({state:P,parent:b.current});x.current=B,w.current=e,b.current.__cmView=B;const X=B.dom,{handleMouseEnter:V,handleMouseLeave:z,cleanup:Y}=i0(G=>{var re;return(re=Q.current)==null?void 0:re.client.emit("beckon:hover",{annotationId:G})},O),$=G=>{const R=G.target.closest("[data-annotation-id]"),ge=R==null?void 0:R.getAttribute("data-annotation-id");ge&&V(ge)},q=G=>{G.target.closest("[data-annotation-id]")&&z()},ee=G=>{const re=G.target,R=DV(re);R.handled&&(G.preventDefault(),G.stopPropagation(),Q.current&&zV(R,Q.current))},le=G=>{const re=G.target,R=$V(re);R.showPreview&&R.targetName&&R.widget&&jB(R.widget,R.targetName)},I=G=>{const re=G.target,R=qV(re);R.hidePreview&&R.widget&&TB(R.widget)};return X.addEventListener("mouseover",$),X.addEventListener("mouseout",q),X.addEventListener("click",ee),X.addEventListener("mouseenter",le,!0),X.addEventListener("mouseleave",I,!0),()=>{X.removeEventListener("mouseover",$),X.removeEventListener("mouseout",q),X.removeEventListener("click",ee),X.removeEventListener("mouseenter",le,!0),X.removeEventListener("mouseleave",I,!0),Y(),B.destroy(),x.current=null}},[O]),_.useEffect(()=>{if(!x.current)return;const D=x.current.state.doc.toString();if(e===D)return;const P=x.current.state.selection.main;x.current.dispatch({changes:{from:0,to:x.current.state.doc.length,insert:e},selection:P.from<=e.length?P:void 0}),w.current=e},[e]),_.useEffect(()=>{x.current&&x.current.dispatch({effects:E.current.reconfigure(c?hm():[])})},[c]),_.useEffect(()=>{x.current&&x.current.dispatch({effects:yR.of({segments:k,...i&&{newAnnotationIds:i}})})},[k,i]),_.useEffect(()=>{!x.current||!d||x.current.dispatch({effects:xR.of({content:e,segments:k,generatingReferenceId:p,getTargetResourceName:A.current})})},[e,k,d,p]),_.useEffect(()=>{if(!x.current||!a)return;const P=x.current.contentDOM.querySelector(`[data-annotation-id="${CSS.escape(a)}"]`);if(!P)return;const B=P.closest(".semiont-annotate-view__content")||P.closest(".semiont-document-viewer__scrollable-body");if(B){const V=P.getBoundingClientRect(),z=B.getBoundingClientRect();if(!(V.top>=z.top&&V.bottom<=z.bottom)){const $=P.offsetTop,q=B.clientHeight,ee=P.offsetHeight,le=$-q/2+ee/2;B.scrollTo({top:le,behavior:"smooth"})}}const X=setTimeout(()=>{P.classList.add("annotation-pulse")},100);return()=>{clearTimeout(X),P.classList.remove("annotation-pulse")}},[a]),_.useEffect(()=>{!x.current||!s||bR(s,x.current.contentDOM)},[s]);const L=l?"semiont-codemirror semiont-codemirror--source":"semiont-codemirror";return g.jsx("div",{ref:b,className:L,"data-markdown-container":!0})}function VV({progress:e,annotationType:t="reference"}){const n=un("ReferencesPanel"),r=Le(st().activeSession$),i=()=>{r==null||r.client.emit("job:cancel-requested",{jobType:"annotation"})};return e?g.jsxs("div",{className:"semiont-annotation-progress","data-status":e.stage,"data-type":t,children:[g.jsxs("div",{className:"semiont-annotation-header",children:[g.jsxs("h3",{className:"semiont-annotation-title",children:[g.jsx("span",{className:"semiont-annotation-sparkle",children:"✨"}),n("annotationProgressTitle")]}),e.stage!=="complete"&&g.jsx("button",{onClick:i,className:"semiont-annotation-cancel",title:n("cancelAnnotation"),children:"✕"})]}),e.requestParams&&e.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),e.requestParams.map((a,s)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[a.label,":"]})," ",a.value]},s))]}),e.completedEntityTypes&&e.completedEntityTypes.length>0&&g.jsx("div",{className:"semiont-annotation-log",children:e.completedEntityTypes.map((a,s)=>g.jsxs("div",{className:"semiont-annotation-log-item",children:[g.jsx("span",{className:"semiont-annotation-check",children:"✓"}),g.jsxs("span",{className:"semiont-annotation-entity-type",children:[a.entityType,":"]}),g.jsx("span",{children:n("found",{count:a.foundCount})})]},s))}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[e.stage==="complete"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✅"}),g.jsx("span",{children:n("complete")})]}):e.stage==="error"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"❌"}),g.jsx("span",{children:e.message||n("failed")})]}):g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:e.message||(e.currentEntityType?n("current",{entityType:e.currentEntityType}):n("annotating"))})]}),e.currentEntityType&&e.stage!=="complete"&&e.stage!=="error"&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",e.currentEntityType]})]})]}):null}var UV=class extends _.Component{constructor(t){super(t);pe(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t,errorInfo:null}}componentDidCatch(t,n){this.props.onError&&this.props.onError(t,n),this.setState({errorInfo:n})}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):g.jsx(YV,{error:this.state.error,reset:this.handleReset}):this.props.children}};function YV({error:e,reset:t}){return g.jsx("div",{className:"semiont-error-boundary-container",children:g.jsxs("div",{className:"semiont-error-boundary-content",children:[g.jsxs("div",{className:"semiont-error-boundary-header",children:[g.jsx("h2",{className:"semiont-error-boundary-title",children:"Oops! Something went wrong"}),g.jsx("p",{className:"semiont-error-boundary-message",children:"We encountered an unexpected error. Please try again."})]}),!1,g.jsxs("div",{className:"semiont-error-boundary-actions",children:[g.jsx("button",{onClick:t,className:"semiont-button","data-variant":"primary",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.href="/",className:"semiont-button","data-variant":"secondary",children:"Go Home"})]})]})})}function WV({children:e,resetKeys:t}){return g.jsx(e2,{FallbackComponent:FV,onError:(n,r)=>{},...t&&{resetKeys:t},children:e})}function FV({error:e,resetErrorBoundary:t}){return g.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-4",children:g.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[g.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[g.jsx("div",{className:"flex-shrink-0 w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center",children:g.jsx("svg",{className:"w-6 h-6 text-red-600 dark:text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),g.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Something went wrong"})]}),g.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:"An unexpected error occurred. Try again, or refresh the page."}),!1,g.jsxs("div",{className:"flex gap-3",children:[g.jsx("button",{onClick:t,className:"flex-1 px-4 py-2 text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.reload(),className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Refresh Page"})]})]})})}function HV({onResize:e,minWidth:t,maxWidth:n,position:r="left",ariaLabel:i="Resize panel"}){const[a,s]=_.useState(!1),l=_.useRef(0),c=_.useRef(0),d=_.useRef(e);_.useEffect(()=>{d.current=e});const f=_.useCallback(b=>{b.preventDefault(),s(!0),l.current=b.clientX;const x=b.target.parentElement;x&&(c.current=x.offsetWidth)},[]),m=_.useCallback(b=>{if(!a)return;const x=b.clientX-l.current,w=r==="left"?-x:x,k=c.current+w,T=Math.max(t,Math.min(n,k));d.current(T)},[a,t,n,r]),p=_.useCallback(()=>{s(!1)},[]),O=_.useCallback(b=>{const x=b.target.parentElement;if(!x)return;const w=x.offsetWidth,k=b.shiftKey?50:10;let T=w;if(r==="left"?b.key==="ArrowLeft"?(T=w+k,b.preventDefault()):b.key==="ArrowRight"&&(T=w-k,b.preventDefault()):b.key==="ArrowRight"?(T=w+k,b.preventDefault()):b.key==="ArrowLeft"&&(T=w-k,b.preventDefault()),T!==w){const j=Math.max(t,Math.min(n,T));d.current(j)}},[t,n,r]);return _.useEffect(()=>{if(a)return document.addEventListener("mousemove",m),document.addEventListener("mouseup",p),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p),document.body.style.userSelect="",document.body.style.cursor=""}},[a,m,p]),g.jsx("button",{type:"button",className:`semiont-resize-handle semiont-resize-handle--${r} ${a?"semiont-resize-handle--dragging":""}`,onMouseDown:f,onKeyDown:O,"aria-label":i,role:"separator","aria-orientation":"vertical",tabIndex:0})}function wR({context:e,activePanel:t,isArchived:n=!1}){const r=un("Toolbar"),i=st(),a=s=>{i.emit("panel:toggle",{panel:s})};return g.jsxs("div",{className:"semiont-toolbar","data-context":e,children:[e==="document"&&g.jsxs(g.Fragment,{children:[!n&&g.jsx("button",{onClick:()=>a("annotations"),className:"semiont-toolbar-button","data-active":t==="annotations","data-panel":"annotations","aria-label":r("annotations"),"aria-pressed":t==="annotations",title:r("annotations"),children:g.jsx("span",{className:"semiont-toolbar-icon semiont-toolbar-icon-large","aria-hidden":"true",children:"A"})}),g.jsx("button",{onClick:()=>a("info"),className:"semiont-toolbar-button","data-active":t==="info","data-panel":"info","aria-label":r("resourceInfo"),"aria-pressed":t==="info",title:r("resourceInfo"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"ℹ️"})}),g.jsx("button",{onClick:()=>a("history"),className:"semiont-toolbar-button","data-active":t==="history","data-panel":"history","aria-label":r("history"),"aria-pressed":t==="history",title:r("history"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"📒"})}),g.jsx("button",{onClick:()=>a("jsonld"),className:"semiont-toolbar-button","data-active":t==="jsonld","data-panel":"jsonld","aria-label":"JSON-LD","aria-pressed":t==="jsonld",title:"JSON-LD",children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"🌐"})}),g.jsx("button",{onClick:()=>a("collaboration"),className:"semiont-toolbar-button","data-active":t==="collaboration","data-panel":"collaboration","aria-label":r("collaboration"),"aria-pressed":t==="collaboration",title:r("collaboration"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👥"})})]}),g.jsx("button",{onClick:()=>a("knowledge-base"),className:"semiont-toolbar-button","data-active":t==="knowledge-base","data-panel":"knowledge-base","aria-label":r("knowledgeBase"),"aria-pressed":t==="knowledge-base",title:r("knowledgeBase"),children:g.jsx("svg",{className:"semiont-toolbar-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",width:"20",height:"20",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 5.625c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})}),g.jsx("button",{onClick:()=>a("user"),className:"semiont-toolbar-button","data-active":t==="user","data-panel":"user","aria-label":r("userAccount"),"aria-pressed":t==="user",title:r("userAccount"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👤"})}),g.jsx("button",{onClick:()=>a("settings"),className:"semiont-toolbar-button","data-active":t==="settings","data-panel":"settings","aria-label":r("settings"),"aria-pressed":t==="settings",title:r("settings"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"⚙️"})})]})}function jre({showLineNumbers:e,theme:t,locale:n,isPendingLocaleChange:r=!1,hoverDelayMs:i}){const a=un("Settings"),s=st(),{announceLanguageChanging:l,announceLanguageChanged:c}=HB(),[d,f]=ue.useState(n),m=p=>{var b;const O=((b=_l.find(x=>x.code===p))==null?void 0:b.nativeName)||p;l(O),s.emit("settings:locale-changed",{locale:p})};return _.useEffect(()=>{var p;if(n!==d&&!r){const O=((p=_l.find(b=>b.code===n))==null?void 0:p.nativeName)||n;c(O),f(n)}},[n,d,r]),g.jsxs("div",{className:"semiont-settings-panel",children:[g.jsx("h3",{className:"semiont-settings-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-settings-panel__content",children:[g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsxs("label",{className:"semiont-toggle-label",children:[g.jsx("span",{className:"semiont-toggle-label__text",children:a("lineNumbers")}),g.jsx("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>s.emit("settings:line-numbers-toggled",void 0),className:`semiont-toggle ${e?"semiont-toggle--active":""}`,children:g.jsx("span",{className:`semiont-toggle__slider ${e?"semiont-toggle__slider--active":""}`})})]}),g.jsx("p",{className:"semiont-form__help",children:a(e?"lineNumbersVisible":"lineNumbersHidden")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{className:"semiont-form__label",children:a("theme")}),g.jsxs("div",{className:"semiont-settings-panel__button-group",children:[g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"light"}),className:`semiont-panel-button ${t==="light"?"semiont-panel-button-active":""}`,"aria-pressed":t==="light",children:["☀️ ",a("themeLight")]}),g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"dark"}),className:`semiont-panel-button ${t==="dark"?"semiont-panel-button-active":""}`,"aria-pressed":t==="dark",children:["🌙 ",a("themeDark")]}),g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"system"}),className:`semiont-panel-button ${t==="system"?"semiont-panel-button-active":""}`,"aria-pressed":t==="system",children:["💻 ",a("themeSystem")]})]}),g.jsx("p",{className:"semiont-form__help","aria-live":"polite",children:t==="system"?a("themeSystemActive"):a("themeModeActive",{mode:t.charAt(0).toUpperCase()+t.slice(1)})})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:a("language")}),g.jsx("select",{id:"language-select",value:n,onChange:p=>m(p.target.value),disabled:r,className:"semiont-select","aria-busy":r,"aria-describedby":"language-hint",children:_l.map(p=>g.jsx("option",{value:p.code,children:p.nativeName},p.code))}),g.jsx("p",{id:"language-hint",className:"semiont-form__help",children:a("languageHint")}),r&&g.jsx("p",{className:"semiont-settings-panel__loading",role:"status","aria-live":"polite",children:a("languageChanging")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"hover-delay-slider",className:"semiont-form__label",children:a("hoverDelay")}),g.jsx("input",{id:"hover-delay-slider",type:"range",min:"0",max:"500",step:"50",value:i,onChange:p=>s.emit("settings:hover-delay-changed",{hoverDelayMs:Number(p.target.value)}),className:"semiont-slider","aria-describedby":"hover-delay-description"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:a("hoverDelayFast")}),g.jsx("span",{children:a("hoverDelaySlow")})]}),g.jsx("p",{id:"hover-delay-description",className:"semiont-form__help",children:a("hoverDelayDescription",{delay:i})})]})]})]})}function xh({label:e,collapsedContent:t,expandedContent:n,isExpanded:r,onHoverChange:i,onPin:a,containerRef:s}){const l=_.useRef(null),c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),a())};return g.jsxs("div",{className:"semiont-dropdown-group",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[g.jsx("div",{ref:s,role:"button",tabIndex:0,"aria-haspopup":"true","aria-expanded":r,"aria-label":e,className:"semiont-dropdown-trigger",onClick:a,onKeyDown:c,children:t}),r&&g.jsx("div",{ref:l,role:"menu","aria-orientation":"vertical",className:"semiont-dropdown-menu",children:g.jsxs("div",{className:"semiont-dropdown-content",children:[g.jsx("div",{className:"semiont-dropdown-header",children:e}),n]})})]})}function Nl({selectedMotivation:e,selectedClick:t,showSelectionGroup:n=!0,showDeleteButton:r=!0,showShapeGroup:i=!1,selectedShape:a="rectangle",mediaType:s,annotateMode:l=!1,annotators:c}){var Se,Ve,ot,vt,et,yn;const d=un("AnnotateToolbar"),f=Le(st().activeSession$),m=Te=>{const lt=Object.values(c).find(me=>me.motivation===Te);return(lt==null?void 0:lt.iconEmoji)||"❓"},[p,O]=_.useState(!1),[b,x]=_.useState(!1),[w,k]=_.useState(!1),[T,j]=_.useState(!1),[E,Q]=_.useState(!1),[A,M]=_.useState(!1),[L,D]=_.useState(!1),[P,B]=_.useState(!1),X=_.useRef(null),V=_.useRef(null),z=_.useRef(null),Y=_.useRef(null),$=p||b,q=w||T,ee=E||A,le=L||P;_.useEffect(()=>{const Te=lt=>{b&&X.current&&!X.current.contains(lt.target)&&x(!1),T&&V.current&&!V.current.contains(lt.target)&&j(!1),A&&z.current&&!z.current.contains(lt.target)&&M(!1),P&&Y.current&&!Y.current.contains(lt.target)&&B(!1)};return document.addEventListener("mousedown",Te),()=>document.removeEventListener("mousedown",Te)},[b,T,A,P]),_.useEffect(()=>{const Te=lt=>{lt.key==="Escape"&&(x(!1),j(!1),M(!1),B(!1))};return document.addEventListener("keydown",Te),()=>document.removeEventListener("keydown",Te)},[]);const I=Te=>{Te===null?f==null||f.client.emit("mark:selection-changed",{motivation:null}):f==null||f.client.emit("mark:selection-changed",{motivation:e===Te?null:Te}),M(!1),Q(!1)},G=Te=>{f==null||f.client.emit("mark:click-changed",{action:Te}),j(!1),k(!1)},re=Te=>{f==null||f.client.emit("mark:shape-changed",{shape:Te}),B(!1),D(!1)},R=()=>{f==null||f.client.emit("mark:mode-toggled",void 0),x(!1),O(!1)},ge=()=>{l&&R()},_e=()=>{l||R()},ve=(Te,lt,me,Ot,Dt=!1)=>g.jsxs("button",{role:"menuitem",onClick:Wt=>{Wt.stopPropagation(),Ot()},className:"semiont-toolbar-menu-button","data-selected":me,"data-delete":Dt,"aria-pressed":me,"aria-label":lt,children:[g.jsx("span",{className:"semiont-toolbar-menu-icon","aria-hidden":"true",children:Te}),g.jsx("span",{className:"semiont-toolbar-menu-label",children:lt})]}),Xe=[{action:"detail",icon:"🔍",label:d("detail")},{action:"follow",icon:"➡️",label:d("follow")},{action:"jsonld",icon:"🌐",label:d("jsonld")}];r&&Xe.push({action:"deleting",icon:"🗑️",label:d("deleting"),isDelete:!0});const Ne=[{motivation:"linking",label:d("linking")},{motivation:"highlighting",label:d("highlighting")},{motivation:"assessing",label:d("assessing")},{motivation:"commenting",label:d("commenting")},{motivation:"tagging",label:d("tagging")}],Ze=[{shape:"rectangle",icon:"▭",label:d("rectangle")},{shape:"circle",icon:"○",label:d("circle")},{shape:"polygon",icon:"⬡",label:d("polygon")}],be=CB(s),Fe=Ze.filter(Te=>be.includes(Te.shape));return g.jsxs("div",{className:"semiont-annotate-toolbar",children:[g.jsx(xh,{label:d("clickGroup"),isExpanded:q,onHoverChange:k,onPin:()=>j(!T),containerRef:V,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display","data-delete":(Se=Xe.find(Te=>Te.action===t))!=null&&Se.isDelete?"true":"false",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(Ve=Xe.find(Te=>Te.action===t))==null?void 0:Ve.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(ot=Xe.find(Te=>Te.action===t))==null?void 0:ot.label})]}),expandedContent:g.jsx(g.Fragment,{children:Xe.map(({action:Te,icon:lt,label:me,isDelete:Ot})=>g.jsx(ue.Fragment,{children:ve(lt,me,t===Te,()=>G(Te),Ot)},Te))})}),g.jsx("div",{className:"semiont-toolbar-separator"}),g.jsx(xh,{label:d("modeGroup"),isExpanded:$,onHoverChange:O,onPin:()=>x(!b),containerRef:X,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:l?"✏️":"📖"}),g.jsx("span",{className:"semiont-dropdown-label",children:d(l?"annotate":"browse")})]}),expandedContent:g.jsxs(g.Fragment,{children:[ve("📖",d("browse"),!l,ge),ve("✏️",d("annotate"),l,_e)]})}),n&&g.jsx("div",{className:"semiont-toolbar-separator"}),n&&g.jsx(xh,{label:d("selectionGroup"),isExpanded:ee,onHoverChange:Q,onPin:()=>M(!A),containerRef:z,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:e?m(e):"—"}),g.jsx("span",{className:"semiont-dropdown-label",children:e?(vt=Ne.find(Te=>Te.motivation===e))==null?void 0:vt.label:d("none")})]}),expandedContent:g.jsxs(g.Fragment,{children:[ve("—",d("none"),e===null,()=>I(null)),Ne.map(({motivation:Te,label:lt})=>g.jsx(ue.Fragment,{children:ve(m(Te),lt,e===Te,()=>I(Te))},Te))]})}),i&&g.jsx("div",{className:"semiont-toolbar-separator"}),i&&Fe.length>0&&g.jsx(xh,{label:d("shapeGroup"),isExpanded:le,onHoverChange:D,onPin:()=>B(!P),containerRef:Y,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(et=Fe.find(Te=>Te.shape===a))==null?void 0:et.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(yn=Fe.find(Te=>Te.shape===a))==null?void 0:yn.label})]}),expandedContent:g.jsx(g.Fragment,{children:Fe.map(({shape:Te,icon:lt,label:me})=>g.jsx(ue.Fragment,{children:ve(lt,me,a===Te,()=>re(Te))},Te))})})]})}var GV=No({String:Z.string,Number:Z.number,"True False":Z.bool,PropertyName:Z.propertyName,Null:Z.null,", :":Z.separator,"[ ]":Z.squareBracket,"{ }":Z.brace}),KV=Gm.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[GV],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),JV=Fm.define({name:"json",parser:KV.configure({props:[Sd.add({Object:Al({except:/^\s*\}/}),Array:Al({except:/^\s*\]/})}),rc.add({"Object Array":F0})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function _R(){return new Vl(JV)}var e8="#e5c07b",fT="#e06c75",t8="#56b6c2",n8="#ffffff",Hh="#abb2bf",Ty="#7d8799",r8="#61afef",i8="#98c379",hT="#d19a66",a8="#c678dd",s8="#21252b",mT="#2c313a",pT="#282c34",jO="#353a42",o8="#3E4451",gT="#528bff",l8=$e.theme({"&":{color:Hh,backgroundColor:pT},".cm-content":{caretColor:gT},".cm-cursor, .cm-dropCursor":{borderLeftColor:gT},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:o8},".cm-panels":{backgroundColor:s8,color:Hh},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:pT,color:Ty,border:"none"},".cm-activeLineGutter":{backgroundColor:mT},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:jO},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:jO,borderBottomColor:jO},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:mT,color:Hh}}},{dark:!0}),c8=H0.define([{tag:Z.keyword,color:a8},{tag:[Z.name,Z.deleted,Z.character,Z.propertyName,Z.macroName],color:fT},{tag:[Z.function(Z.variableName),Z.labelName],color:r8},{tag:[Z.color,Z.constant(Z.name),Z.standard(Z.name)],color:hT},{tag:[Z.definition(Z.name),Z.separator],color:Hh},{tag:[Z.typeName,Z.className,Z.number,Z.changed,Z.annotation,Z.modifier,Z.self,Z.namespace],color:e8},{tag:[Z.operator,Z.operatorKeyword,Z.url,Z.escape,Z.regexp,Z.link,Z.special(Z.string)],color:t8},{tag:[Z.meta,Z.comment],color:Ty},{tag:Z.strong,fontWeight:"bold"},{tag:Z.emphasis,fontStyle:"italic"},{tag:Z.strikethrough,textDecoration:"line-through"},{tag:Z.link,color:Ty,textDecoration:"underline"},{tag:Z.heading,fontWeight:"bold",color:fT},{tag:[Z.atom,Z.bool,Z.special(Z.variableName)],color:hT},{tag:[Z.processingInstruction,Z.string,Z.inserted],color:i8},{tag:Z.invalid,color:n8}]),kR=[l8,G0(c8)];function u8({annotation:e,onBack:t}){const n=_.useRef(null),r=_.useRef(null),{showLineNumbers:i}=K0(),a=_.useRef(t);_.useEffect(()=>{a.current=t}),_.useEffect(()=>{const l=c=>{c.key==="Escape"&&a.current()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[]),_.useEffect(()=>{if(!n.current)return;const l=document.documentElement.classList.contains("dark"),c=JSON.stringify(e,null,2),d=[_R(),$e.editable.of(!1),Kt.readOnly.of(!0)];i&&d.push(hm()),l?d.push(kR):(d.push(ZP),d.push(G0(BP)));const f=Kt.create({doc:c,extensions:d}),m=new $e({state:f,parent:n.current});return r.current=m,()=>{m.destroy(),r.current=null}},[e,i]);const s=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(l){console.error("Failed to copy JSON-LD:",l)}};return g.jsxs("div",{className:"semiont-jsonld-view",children:[g.jsxs("div",{className:"semiont-jsonld-view__header",children:[g.jsx("button",{onClick:t,className:"semiont-jsonld-view__back-button",title:"Go back (Escape)",children:"<"}),g.jsx("h3",{className:"semiont-jsonld-view__title",children:"JSON-LD"}),g.jsx("button",{onClick:s,className:"semiont-jsonld-view__copy-button",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:n,className:"semiont-jsonld-view__editor"})]})}var d8=Object.defineProperty,f8=(e,t,n)=>t in e?d8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TO=(e,t,n)=>(f8(e,typeof t!="symbol"?t+"":t,n),n),h8=class{constructor(){TO(this,"current",this.detect()),TO(this,"handoffState","pending"),TO(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Fi=new h8;function kd(e){var t;return Fi.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function Cy(e){var t,n;return Fi.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function jR(e){var t,n;return(n=(t=Cy(e))==null?void 0:t.activeElement)!=null?n:null}function m8(e){return jR(e)===e}function Km(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function La(){let e=[],t={addEventListener(n,r,i,a){return n.addEventListener(r,i,a),t.add(()=>n.removeEventListener(r,i,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Km(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=La();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function Jm(){let[e]=_.useState(La);return _.useEffect(()=>()=>e.dispose(),[e]),e}var mr=(e,t)=>{Fi.isServer?_.useEffect(e,t):_.useLayoutEffect(e,t)};function Ro(e){let t=_.useRef(e);return mr(()=>{t.current=e},[e]),t}var Mt=function(e){let t=Ro(e);return ue.useCallback((...n)=>t.current(...n),[t])};function jd(e){return _.useMemo(()=>e,Object.values(e))}var p8=_.createContext(void 0);function g8(){return _.useContext(p8)}function Ey(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Pa(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Pa),r}var ym=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ym||{}),ks=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ks||{});function di(){let e=O8();return _.useCallback(t=>v8({mergeRefs:e,...t}),[e])}function v8({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:s,mergeRefs:l}){l=l??b8;let c=TR(t,e);if(a)return Sh(c,n,r,s,l);let d=i??0;if(d&2){let{static:f=!1,...m}=c;if(f)return Sh(m,n,r,s,l)}if(d&1){let{unmount:f=!0,...m}=c;return Pa(f?0:1,{0(){return null},1(){return Sh({...m,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return Sh(c,n,r,s,l)}function Sh(e,t={},n,r,i){let{as:a=n,children:s,refName:l="ref",...c}=CO(e,["unmount","static"]),d=e.ref!==void 0?{[l]:e.ref}:{},f=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let m={};if(t){let p=!1,O=[];for(let[b,x]of Object.entries(t))typeof x=="boolean"&&(p=!0),x===!0&&O.push(b.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(p){m["data-headlessui-state"]=O.join(" ");for(let b of O)m[`data-${b}`]=""}}if(Au(a)&&(Object.keys(uo(c)).length>0||Object.keys(uo(m)).length>0))if(!_.isValidElement(f)||Array.isArray(f)&&f.length>1||x8(f)){if(Object.keys(uo(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(uo(c)).concat(Object.keys(uo(m))).map(p=>` - ${p}`).join(`
132
+ `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
133
+ `)].join(`
134
+ `))}else{let p=f.props,O=p==null?void 0:p.className,b=typeof O=="function"?(...k)=>Ey(O(...k),c.className):Ey(O,c.className),x=b?{className:b}:{},w=TR(f.props,uo(CO(c,["ref"])));for(let k in m)k in w&&delete m[k];return _.cloneElement(f,Object.assign({},w,m,d,{ref:i(y8(f),d.ref)},x))}return _.createElement(a,Object.assign({},CO(c,["ref"]),!Au(a)&&d,!Au(a)&&m),f)}function O8(){let e=_.useRef([]),t=_.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function b8(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function TR(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var a;return(a=i==null?void 0:i.preventDefault)==null?void 0:a.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...a){let s=n[r];for(let l of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;l(i,...a)}}});return t}function br(e){var t;return Object.assign(_.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function uo(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function CO(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function y8(e){return ue.version.split(".")[0]>="19"?e.props.ref:e.ref}function Au(e){return e===_.Fragment||e===Symbol.for("react.fragment")}function x8(e){return Au(e.type)}var S8="span",xm=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(xm||{});function w8(e,t){var n;let{features:r=1,...i}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return di()({ourProps:a,theirProps:i,slot:{},defaultTag:S8,name:"Hidden"})}var Qy=br(w8);function _8(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Cs(e){return _8(e)&&"tagName"in e}function ko(e){return Cs(e)&&"accessKey"in e}function js(e){return Cs(e)&&"tabIndex"in e}function k8(e){return Cs(e)&&"style"in e}function j8(e){return ko(e)&&e.nodeName==="IFRAME"}function T8(e){return ko(e)&&e.nodeName==="INPUT"}var CR=Symbol();function C8(e,t=!0){return Object.assign(e,{[CR]:t})}function ea(...e){let t=_.useRef(e);_.useEffect(()=>{t.current=e},[e]);let n=Mt(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[CR]))?void 0:n}var fx=_.createContext(null);fx.displayName="DescriptionContext";function ER(){let e=_.useContext(fx);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ER),t}return e}function E8(){let[e,t]=_.useState([]);return[e.length>0?e.join(" "):void 0,_.useMemo(()=>function(n){let r=Mt(a=>(t(s=>[...s,a]),()=>t(s=>{let l=s.slice(),c=l.indexOf(a);return c!==-1&&l.splice(c,1),l}))),i=_.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return ue.createElement(fx.Provider,{value:i},n.children)},[t])]}var Q8="p";function A8(e,t){let n=_.useId(),r=g8(),{id:i=`headlessui-description-${n}`,...a}=e,s=ER(),l=ea(t);mr(()=>s.register(i),[i,s.register]);let c=jd({...s.slot,disabled:r||!1}),d={ref:l,...s.props,id:i};return di()({ourProps:d,theirProps:a,slot:c,defaultTag:Q8,name:s.name||"Description"})}var P8=br(A8),N8=Object.assign(P8,{}),QR=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(QR||{}),R8=_.createContext(()=>{});function M8({value:e,children:t}){return ue.createElement(R8.Provider,{value:e},t)}var AR=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},L8=Object.defineProperty,D8=(e,t,n)=>t in e?L8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z8=(e,t,n)=>(D8(e,t+"",n),n),PR=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Fr=(e,t,n)=>(PR(e,t,"read from private field"),n?n.call(e):t.get(e)),EO=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},vT=(e,t,n,r)=>(PR(e,t,"write to private field"),t.set(e,n),n),qi,Ou,bu,$8=class{constructor(e){EO(this,qi,{}),EO(this,Ou,new AR(()=>new Set)),EO(this,bu,new Set),z8(this,"disposables",La()),vT(this,qi,e),Fi.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Fr(this,qi)}subscribe(e,t){if(Fi.isServer)return()=>{};let n={selector:e,callback:t,current:e(Fr(this,qi))};return Fr(this,bu).add(n),this.disposables.add(()=>{Fr(this,bu).delete(n)})}on(e,t){return Fi.isServer?()=>{}:(Fr(this,Ou).get(e).add(t),this.disposables.add(()=>{Fr(this,Ou).get(e).delete(t)}))}send(e){let t=this.reduce(Fr(this,qi),e);if(t!==Fr(this,qi)){vT(this,qi,t);for(let n of Fr(this,bu)){let r=n.selector(Fr(this,qi));NR(n.current,r)||(n.current=r,n.callback(r))}for(let n of Fr(this,Ou).get(e.type))n(Fr(this,qi),e)}}};qi=new WeakMap,Ou=new WeakMap,bu=new WeakMap;function NR(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:QO(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:QO(e.entries(),t.entries()):OT(e)&&OT(t)?QO(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function QO(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function OT(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var q8=Object.defineProperty,I8=(e,t,n)=>t in e?q8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bT=(e,t,n)=>(I8(e,typeof t!="symbol"?t+"":t,n),n),X8=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(X8||{}),Z8={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let a=e.stack.slice();return a.splice(i,1),a.push(n),r=a,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},B8=class RR extends $8{constructor(){super(...arguments),bT(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),bT(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new RR({stack:[]})}reduce(t,n){return Pa(n.type,Z8,t,n)}},MR=new AR(()=>B8.new());function LR(e,t,n=NR){return i2.useSyncExternalStoreWithSelector(Mt(r=>e.subscribe(V8,r)),Mt(()=>e.state),Mt(()=>e.state),Mt(t),n)}function V8(e){return e}function Td(e,t){let n=_.useId(),r=MR.get(t),[i,a]=LR(r,_.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return mr(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?a?i:!0:!1}var Ay=new Map,Pu=new Map;function yT(e){var t;let n=(t=Pu.get(e))!=null?t:0;return Pu.set(e,n+1),n!==0?()=>xT(e):(Ay.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>xT(e))}function xT(e){var t;let n=(t=Pu.get(e))!=null?t:1;if(n===1?Pu.delete(e):Pu.set(e,n-1),n!==1)return;let r=Ay.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Ay.delete(e))}function U8(e,{allowed:t,disallowed:n}={}){let r=Td(e,"inert-others");mr(()=>{var i,a;if(!r)return;let s=La();for(let c of(i=n==null?void 0:n())!=null?i:[])c&&s.add(yT(c));let l=(a=t==null?void 0:t())!=null?a:[];for(let c of l){if(!c)continue;let d=kd(c);if(!d)continue;let f=c.parentElement;for(;f&&f!==d.body;){for(let m of f.children)l.some(p=>m.contains(p))||s.add(yT(m));f=f.parentElement}}return s.dispose},[r,t,n])}function Y8(e,t,n){let r=Ro(i=>{let a=i.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&n()});_.useEffect(()=>{if(!e)return;let i=t===null?null:ko(t)?t:t.current;if(!i)return;let a=La();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}return()=>a.dispose()},[t,r,e])}var Sm=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),W8=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(","),ja=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(ja||{}),Py=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Py||{}),F8=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(F8||{});function H8(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Sm)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function G8(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(W8)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var DR=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(DR||{});function K8(e,t=0){var n;return e===((n=kd(e))==null?void 0:n.body)?!1:Pa(t,{0(){return e.matches(Sm)},1(){let r=e;for(;r!==null;){if(r.matches(Sm))return!0;r=r.parentElement}return!1}})}var J8=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(J8||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Qa(e){e==null||e.focus({preventScroll:!0})}var eU=["textarea","input"].join(",");function tU(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,eU))!=null?n:!1}function nU(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let s=i.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Nu(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?Cy(e[0]):document:Cy(e),s=Array.isArray(e)?n?nU(e):e:t&64?G8(e):H8(e);i.length>0&&s.length>1&&(s=s.filter(O=>!i.some(b=>b!=null&&"current"in b?(b==null?void 0:b.current)===O:b===O))),r=r??(a==null?void 0:a.activeElement);let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},f=0,m=s.length,p;do{if(f>=m||f+m<=0)return 0;let O=c+f;if(t&16)O=(O+m)%m;else{if(O<0)return 3;if(O>=m)return 1}p=s[O],p==null||p.focus(d),f+=l}while(p!==jR(p));return t&6&&tU(p)&&p.select(),2}function zR(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function rU(){return/Android/gi.test(window.navigator.userAgent)}function ST(){return zR()||rU()}function wh(e,t,n,r){let i=Ro(n);_.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return document.addEventListener(t,a,r),()=>document.removeEventListener(t,a,r)},[e,t,r])}function $R(e,t,n,r){let i=Ro(n);_.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return window.addEventListener(t,a,r),()=>window.removeEventListener(t,a,r)},[e,t,r])}var wT=30;function iU(e,t,n){let r=Ro(n),i=_.useCallback(function(l,c){if(l.defaultPrevented)return;let d=c(l);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let f=(function m(p){return typeof p=="function"?m(p()):Array.isArray(p)||p instanceof Set?p:[p]})(t);for(let m of f)if(m!==null&&(m.contains(d)||l.composed&&l.composedPath().includes(m)))return;return!K8(d,DR.Loose)&&d.tabIndex!==-1&&l.preventDefault(),r.current(l,d)},[r,t]),a=_.useRef(null);wh(e,"pointerdown",l=>{var c,d;ST()||(a.current=((d=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:d[0])||l.target)},!0),wh(e,"pointerup",l=>{if(ST()||!a.current)return;let c=a.current;return a.current=null,i(l,()=>c)},!0);let s=_.useRef({x:0,y:0});wh(e,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),wh(e,"touchend",l=>{let c={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(c.x-s.current.x)>=wT||Math.abs(c.y-s.current.y)>=wT))return i(l,()=>js(l.target)?l.target:null)},!0),$R(e,"blur",l=>i(l,()=>j8(window.document.activeElement)?window.document.activeElement:null),!0)}function hx(...e){return _.useMemo(()=>kd(...e),[...e])}function qR(e,t,n,r){let i=Ro(n);_.useEffect(()=>{e=e??window;function a(s){i.current(s)}return e.addEventListener(t,a,r),()=>e.removeEventListener(t,a,r)},[e,t,r])}function aU(e){return _.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function sU(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...a){let s=t[i].call(n,...a);s&&(n=s,r.forEach(l=>l()))}}}function oU(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,"paddingRight",`${a}px`)}}}function lU(){return zR()?{before({doc:e,d:t,meta:n}){function r(i){for(let a of n().containers)for(let s of a())if(s.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=La();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let a=(i=window.scrollY)!=null?i:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(js(l.target))try{let c=l.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);js(f)&&!r(f)&&(s=f)}catch{}},!0),t.group(l=>{t.addEventListener(e,"touchstart",c=>{if(l.dispose(),js(c.target)&&k8(c.target))if(r(c.target)){let d=c.target;for(;d.parentElement&&r(d.parentElement);)d=d.parentElement;l.style(d,"overscrollBehavior","contain")}else l.style(c.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",l=>{if(js(l.target)){if(T8(l.target))return;if(r(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;a!==c&&window.scrollTo(0,a),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function cU(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function _T(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var Oo=sU(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:La(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=_T(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=_T(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[lU(),oU(),cU()];n.forEach(({before:r})=>r==null?void 0:r(t)),n.forEach(({after:r})=>r==null?void 0:r(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Oo.subscribe(()=>{let e=Oo.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&Oo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Oo.dispatch("TEARDOWN",n)}});function uU(e,t,n=()=>({containers:[]})){let r=aU(Oo),i=t?r.get(t):void 0,a=i?i.count>0:!1;return mr(()=>{if(!(!t||!e))return Oo.dispatch("PUSH",t,n),()=>Oo.dispatch("POP",t,n)},[e,t]),a}function dU(e,t,n=()=>[document.body]){let r=Td(e,"scroll-lock");uU(r,t,i=>{var a;return{containers:[...(a=i.containers)!=null?a:[],n]}})}function fU(e=0){let[t,n]=_.useState(e),r=_.useCallback(c=>n(c),[]),i=_.useCallback(c=>n(d=>d|c),[]),a=_.useCallback(c=>(t&c)===c,[t]),s=_.useCallback(c=>n(d=>d&~c),[]),l=_.useCallback(c=>n(d=>d^c),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:l}}var kT,jT;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((kT=process==null?void 0:vb)==null?void 0:kT.NODE_ENV)==="test"&&typeof((jT=Element==null?void 0:Element.prototype)==null?void 0:jT.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
135
+ `)),[]});var hU=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(hU||{});function mU(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function pU(e,t,n,r){let[i,a]=_.useState(n),{hasFlag:s,addFlag:l,removeFlag:c}=fU(e&&i?3:0),d=_.useRef(!1),f=_.useRef(!1),m=Jm();return mr(()=>{var p;if(e){if(n&&a(!0),!t){n&&l(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),gU(t,{inFlight:d,prepare(){f.current?f.current=!1:f.current=d.current,d.current=!0,!f.current&&(n?(l(3),c(4)):(l(4),c(2)))},run(){f.current?n?(c(3),l(4)):(c(4),l(3)):n?c(1):l(1)},done(){var O;f.current&&bU(t)||(d.current=!1,c(7),n||a(!1),(O=r==null?void 0:r.end)==null||O.call(r,n))}})}},[e,n,t,m]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function gU(e,{prepare:t,run:n,done:r,inFlight:i}){let a=La();return OU(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(vU(e,r))})}),a.dispose}function vU(e,t){var n,r;let i=La();if(!e)return i.dispose;let a=!1;i.add(()=>{a=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),i.dispose):(Promise.allSettled(s.map(l=>l.finished)).then(()=>{a||t()}),i.dispose)}function OU(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function bU(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function mx(e,t){let n=_.useRef([]),r=Mt(e);_.useEffect(()=>{let i=[...n.current];for(let[a,s]of t.entries())if(n.current[a]!==s){let l=r(t,i);return n.current=t,l}},[r,...t])}var ep=_.createContext(null);ep.displayName="OpenClosedContext";var Si=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Si||{});function tp(){return _.useContext(ep)}function yU({value:e,children:t}){return ue.createElement(ep.Provider,{value:e},t)}function xU({children:e}){return ue.createElement(ep.Provider,{value:null},e)}function SU(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}var ys=[];SU(()=>{function e(t){if(!js(t.target)||t.target===document.body||ys[0]===t.target)return;let n=t.target;n=n.closest(Sm),ys.unshift(n??t.target),ys=ys.filter(r=>r!=null&&r.isConnected),ys.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function IR(e){let t=Mt(e),n=_.useRef(!1);_.useEffect(()=>(n.current=!1,()=>{n.current=!0,Km(()=>{n.current&&t()})}),[t])}var XR=_.createContext(!1);function wU(){return _.useContext(XR)}function TT(e){return ue.createElement(XR.Provider,{value:e.force},e.children)}function _U(e){let t=wU(),n=_.useContext(BR),[r,i]=_.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(Fi.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let l=e.createElement("div");return l.setAttribute("id","headlessui-portal-root"),e.body.appendChild(l)});return _.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),_.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var ZR=_.Fragment,kU=br(function(e,t){let{ownerDocument:n=null,...r}=e,i=_.useRef(null),a=ea(C8(p=>{i.current=p}),t),s=hx(i.current),l=n??s,c=_U(l),d=_.useContext(Ny),f=Jm(),m=di();return IR(()=>{var p;c&&c.childNodes.length<=0&&((p=c.parentElement)==null||p.removeChild(c))}),c?go.createPortal(ue.createElement("div",{"data-headlessui-portal":"",ref:p=>{f.dispose(),d&&p&&f.add(d.register(p))}},m({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:ZR,name:"Portal"})),c):null});function jU(e,t){let n=ea(t),{enabled:r=!0,ownerDocument:i,...a}=e,s=di();return r?ue.createElement(kU,{...a,ownerDocument:i,ref:n}):s({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:ZR,name:"Portal"})}var TU=_.Fragment,BR=_.createContext(null);function CU(e,t){let{target:n,...r}=e,i={ref:ea(t)},a=di();return ue.createElement(BR.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:TU,name:"Popover.Group"}))}var Ny=_.createContext(null);function EU(){let e=_.useContext(Ny),t=_.useRef([]),n=Mt(a=>(t.current.push(a),e&&e.register(a),()=>r(a))),r=Mt(a=>{let s=t.current.indexOf(a);s!==-1&&t.current.splice(s,1),e&&e.unregister(a)}),i=_.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,_.useMemo(()=>function({children:a}){return ue.createElement(Ny.Provider,{value:i},a)},[i])]}var QU=br(jU),VR=br(CU),AU=Object.assign(QU,{Group:VR});function PU(e,t=typeof document<"u"?document.defaultView:null,n){let r=Td(e,"escape");qR(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===QR.Escape&&n(i))})}function NU(){var e;let[t]=_.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=_.useState((e=t==null?void 0:t.matches)!=null?e:!1);return mr(()=>{if(!t)return;function i(a){r(a.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function RU({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Mt(()=>{var i,a;let s=kd(n),l=[];for(let c of e)c!==null&&(Cs(c)?l.push(c):"current"in c&&Cs(c.current)&&l.push(c.current));if(t!=null&&t.current)for(let c of t.current)l.push(c);for(let c of(i=s==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?i:[])c!==document.body&&c!==document.head&&Cs(c)&&c.id!=="headlessui-portal-root"&&(n&&(c.contains(n)||c.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||l.some(d=>c.contains(d))||l.push(c));return l});return{resolveContainers:r,contains:Mt(i=>r().some(a=>a.contains(i)))}}var UR=_.createContext(null);function CT({children:e,node:t}){let[n,r]=_.useState(null),i=YR(t??n);return ue.createElement(UR.Provider,{value:i},e,i===null&&ue.createElement(Qy,{features:xm.Hidden,ref:a=>{var s,l;if(a){for(let c of(l=(s=kd(a))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?l:[])if(c!==document.body&&c!==document.head&&Cs(c)&&c!=null&&c.contains(a)){r(c);break}}}}))}function YR(e=null){var t;return(t=_.useContext(UR))!=null?t:e}function MU(){let e=typeof document>"u";return"useSyncExternalStore"in N1?(t=>t.useSyncExternalStore)(N1)(()=>()=>{},()=>!1,()=>!e):!1}function np(){let e=MU(),[t,n]=_.useState(Fi.isHandoffComplete);return t&&Fi.isHandoffComplete===!1&&n(!1),_.useEffect(()=>{t!==!0&&n(!0)},[t]),_.useEffect(()=>Fi.handoff(),[]),e?!1:t}function px(){let e=_.useRef(!1);return mr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var yu=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(yu||{});function LU(){let e=_.useRef(0);return $R(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function WR(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)Cs(n.current)&&t.add(n.current);return t}var DU="div",po=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(po||{});function zU(e,t){let n=_.useRef(null),r=ea(n,t),{initialFocus:i,initialFocusFallback:a,containers:s,features:l=15,...c}=e;np()||(l=0);let d=hx(n.current);XU(l,{ownerDocument:d});let f=ZU(l,{ownerDocument:d,container:n,initialFocus:i,initialFocusFallback:a});BU(l,{ownerDocument:d,container:n,containers:s,previousActiveElement:f});let m=LU(),p=Mt(T=>{if(!ko(n.current))return;let j=n.current;(E=>E())(()=>{Pa(m.current,{[yu.Forwards]:()=>{Nu(j,ja.First,{skipElements:[T.relatedTarget,a]})},[yu.Backwards]:()=>{Nu(j,ja.Last,{skipElements:[T.relatedTarget,a]})}})})}),O=Td(!!(l&2),"focus-trap#tab-lock"),b=Jm(),x=_.useRef(!1),w={ref:r,onKeyDown(T){T.key=="Tab"&&(x.current=!0,b.requestAnimationFrame(()=>{x.current=!1}))},onBlur(T){if(!(l&4))return;let j=WR(s);ko(n.current)&&j.add(n.current);let E=T.relatedTarget;js(E)&&E.dataset.headlessuiFocusGuard!=="true"&&(FR(j,E)||(x.current?Nu(n.current,Pa(m.current,{[yu.Forwards]:()=>ja.Next,[yu.Backwards]:()=>ja.Previous})|ja.WrapAround,{relativeTo:T.target}):js(T.target)&&Qa(T.target)))}},k=di();return ue.createElement(ue.Fragment,null,O&&ue.createElement(Qy,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:xm.Focusable}),k({ourProps:w,theirProps:c,defaultTag:DU,name:"FocusTrap"}),O&&ue.createElement(Qy,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:xm.Focusable}))}var $U=br(zU),qU=Object.assign($U,{features:po});function IU(e=!0){let t=_.useRef(ys.slice());return mx(([n],[r])=>{r===!0&&n===!1&&Km(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=ys.slice())},[e,ys,t]),Mt(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function XU(e,{ownerDocument:t}){let n=!!(e&8),r=IU(n);mx(()=>{n||m8(t==null?void 0:t.body)&&Qa(r())},[n]),IR(()=>{n&&Qa(r())})}function ZU(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=_.useRef(null),s=Td(!!(e&1),"focus-trap#initial-focus"),l=px();return mx(()=>{if(e===0)return;if(!s){i!=null&&i.current&&Qa(i.current);return}let c=n.current;c&&Km(()=>{if(!l.current)return;let d=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===d){a.current=d;return}}else if(c.contains(d)){a.current=d;return}if(r!=null&&r.current)Qa(r.current);else{if(e&16){if(Nu(c,ja.First|ja.AutoFocus)!==Py.Error)return}else if(Nu(c,ja.First)!==Py.Error)return;if(i!=null&&i.current&&(Qa(i.current),(t==null?void 0:t.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=t==null?void 0:t.activeElement})},[i,s,e]),a}function BU(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=px(),s=!!(e&4);qR(t==null?void 0:t.defaultView,"focus",l=>{if(!s||!a.current)return;let c=WR(r);ko(n.current)&&c.add(n.current);let d=i.current;if(!d)return;let f=l.target;ko(f)?FR(c,f)?(i.current=f,Qa(f)):(l.preventDefault(),l.stopPropagation(),Qa(d)):Qa(i.current)},!0)}function FR(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function HR(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Au((t=e.as)!=null?t:KR)||ue.Children.count(e.children)===1}var rp=_.createContext(null);rp.displayName="TransitionContext";var VU=(e=>(e.Visible="visible",e.Hidden="hidden",e))(VU||{});function UU(){let e=_.useContext(rp);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function YU(){let e=_.useContext(ip);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}var ip=_.createContext(null);ip.displayName="NestingContext";function ap(e){return"children"in e?ap(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function GR(e,t){let n=Ro(e),r=_.useRef([]),i=px(),a=Jm(),s=Mt((O,b=ks.Hidden)=>{let x=r.current.findIndex(({el:w})=>w===O);x!==-1&&(Pa(b,{[ks.Unmount](){r.current.splice(x,1)},[ks.Hidden](){r.current[x].state="hidden"}}),a.microTask(()=>{var w;!ap(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),l=Mt(O=>{let b=r.current.find(({el:x})=>x===O);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:O,state:"visible"}),()=>s(O,ks.Unmount)}),c=_.useRef([]),d=_.useRef(Promise.resolve()),f=_.useRef({enter:[],leave:[]}),m=Mt((O,b,x)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([w])=>w!==O)),t==null||t.chains.current[b].push([O,new Promise(w=>{c.current.push(w)})]),t==null||t.chains.current[b].push([O,new Promise(w=>{Promise.all(f.current[b].map(([k,T])=>T)).then(()=>w())})]),b==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(b)):x(b)}),p=Mt((O,b,x)=>{Promise.all(f.current[b].splice(0).map(([w,k])=>k)).then(()=>{var w;(w=c.current.shift())==null||w()}).then(()=>x(b))});return _.useMemo(()=>({children:r,register:l,unregister:s,onStart:m,onStop:p,wait:d,chains:f}),[l,s,r,m,p,f,d])}var KR=_.Fragment,JR=ym.RenderStrategy;function WU(e,t){var n,r;let{transition:i=!0,beforeEnter:a,afterEnter:s,beforeLeave:l,afterLeave:c,enter:d,enterFrom:f,enterTo:m,entered:p,leave:O,leaveFrom:b,leaveTo:x,...w}=e,[k,T]=_.useState(null),j=_.useRef(null),E=HR(e),Q=ea(...E?[j,t,T]:t===null?[]:[t]),A=(n=w.unmount)==null||n?ks.Unmount:ks.Hidden,{show:M,appear:L,initial:D}=UU(),[P,B]=_.useState(M?"visible":"hidden"),X=YU(),{register:V,unregister:z}=X;mr(()=>V(j),[V,j]),mr(()=>{if(A===ks.Hidden&&j.current){if(M&&P!=="visible"){B("visible");return}return Pa(P,{hidden:()=>z(j),visible:()=>V(j)})}},[P,j,V,z,M,A]);let Y=np();mr(()=>{if(E&&Y&&P==="visible"&&j.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[j,P,Y,E]);let $=D&&!L,q=L&&M&&D,ee=_.useRef(!1),le=GR(()=>{ee.current||(B("hidden"),z(j))},X),I=Mt(Xe=>{ee.current=!0;let Ne=Xe?"enter":"leave";le.onStart(j,Ne,Ze=>{Ze==="enter"?a==null||a():Ze==="leave"&&(l==null||l())})}),G=Mt(Xe=>{let Ne=Xe?"enter":"leave";ee.current=!1,le.onStop(j,Ne,Ze=>{Ze==="enter"?s==null||s():Ze==="leave"&&(c==null||c())}),Ne==="leave"&&!ap(le)&&(B("hidden"),z(j))});_.useEffect(()=>{E&&i||(I(M),G(M))},[M,E,i]);let re=!(!i||!E||!Y||$),[,R]=pU(re,k,M,{start:I,end:G}),ge=uo({ref:Q,className:((r=Ey(w.className,q&&d,q&&f,R.enter&&d,R.enter&&R.closed&&f,R.enter&&!R.closed&&m,R.leave&&O,R.leave&&!R.closed&&b,R.leave&&R.closed&&x,!R.transition&&M&&p))==null?void 0:r.trim())||void 0,...mU(R)}),_e=0;P==="visible"&&(_e|=Si.Open),P==="hidden"&&(_e|=Si.Closed),M&&P==="hidden"&&(_e|=Si.Opening),!M&&P==="visible"&&(_e|=Si.Closing);let ve=di();return ue.createElement(ip.Provider,{value:le},ue.createElement(yU,{value:_e},ve({ourProps:ge,theirProps:w,defaultTag:KR,features:JR,visible:P==="visible",name:"Transition.Child"})))}function FU(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,s=_.useRef(null),l=HR(e),c=ea(...l?[s,t]:t===null?[]:[t]);np();let d=tp();if(n===void 0&&d!==null&&(n=(d&Si.Open)===Si.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,m]=_.useState(n?"visible":"hidden"),p=GR(()=>{n||m("hidden")}),[O,b]=_.useState(!0),x=_.useRef([n]);mr(()=>{O!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),b(!1))},[x,n]);let w=_.useMemo(()=>({show:n,appear:r,initial:O}),[n,r,O]);mr(()=>{n?m("visible"):!ap(p)&&s.current!==null&&m("hidden")},[n,p]);let k={unmount:i},T=Mt(()=>{var Q;O&&b(!1),(Q=e.beforeEnter)==null||Q.call(e)}),j=Mt(()=>{var Q;O&&b(!1),(Q=e.beforeLeave)==null||Q.call(e)}),E=di();return ue.createElement(ip.Provider,{value:p},ue.createElement(rp.Provider,{value:w},E({ourProps:{...k,as:_.Fragment,children:ue.createElement(eM,{ref:c,...k,...a,beforeEnter:T,beforeLeave:j})},theirProps:{},defaultTag:_.Fragment,features:JR,visible:f==="visible",name:"Transition"})))}function HU(e,t){let n=_.useContext(rp)!==null,r=tp()!==null;return ue.createElement(ue.Fragment,null,!n&&r?ue.createElement(Ry,{ref:t,...e}):ue.createElement(eM,{ref:t,...e}))}var Ry=br(FU),eM=br(WU),er=br(HU),Mo=Object.assign(Ry,{Child:er,Root:Ry}),GU=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(GU||{}),KU=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(KU||{}),JU={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},gx=_.createContext(null);gx.displayName="DialogContext";function sp(e){let t=_.useContext(gx);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,sp),n}return t}function eY(e,t){return Pa(t.type,JU,e,t)}var ET=br(function(e,t){let n=_.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:s,role:l="dialog",autoFocus:c=!0,__demoMode:d=!1,unmount:f=!1,...m}=e,p=_.useRef(!1);l=(function(){return l==="dialog"||l==="alertdialog"?l:(p.current||(p.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let O=tp();i===void 0&&O!==null&&(i=(O&Si.Open)===Si.Open);let b=_.useRef(null),x=ea(b,t),w=hx(b.current),k=i?0:1,[T,j]=_.useReducer(eY,{titleId:null,descriptionId:null,panelRef:_.createRef()}),E=Mt(()=>a(!1)),Q=Mt(R=>j({type:0,id:R})),A=np()?k===0:!1,[M,L]=EU(),D={get current(){var R;return(R=T.panelRef.current)!=null?R:b.current}},P=YR(),{resolveContainers:B}=RU({mainTreeNode:P,portals:M,defaultContainers:[D]}),X=O!==null?(O&Si.Closing)===Si.Closing:!1;U8(d||X?!1:A,{allowed:Mt(()=>{var R,ge;return[(ge=(R=b.current)==null?void 0:R.closest("[data-headlessui-portal]"))!=null?ge:null]}),disallowed:Mt(()=>{var R;return[(R=P==null?void 0:P.closest("body > *:not(#headlessui-portal-root)"))!=null?R:null]})});let V=MR.get(null);mr(()=>{if(A)return V.actions.push(r),()=>V.actions.pop(r)},[V,r,A]);let z=LR(V,_.useCallback(R=>V.selectors.isTop(R,r),[V,r]));iU(z,B,R=>{R.preventDefault(),E()}),PU(z,w==null?void 0:w.defaultView,R=>{R.preventDefault(),R.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),dU(d||X?!1:A,w,B),Y8(A,b,E);let[Y,$]=E8(),q=_.useMemo(()=>[{dialogState:k,close:E,setTitleId:Q,unmount:f},T],[k,E,Q,f,T]),ee=jd({open:k===0}),le={ref:x,id:r,role:l,tabIndex:-1,"aria-modal":d?void 0:k===0?!0:void 0,"aria-labelledby":T.titleId,"aria-describedby":Y,unmount:f},I=!NU(),G=po.None;A&&!d&&(G|=po.RestoreFocus,G|=po.TabLock,c&&(G|=po.AutoFocus),I&&(G|=po.InitialFocus));let re=di();return ue.createElement(xU,null,ue.createElement(TT,{force:!0},ue.createElement(AU,null,ue.createElement(gx.Provider,{value:q},ue.createElement(VR,{target:b},ue.createElement(TT,{force:!1},ue.createElement($,{slot:ee},ue.createElement(L,null,ue.createElement(qU,{initialFocus:s,initialFocusFallback:b,containers:B,features:G},ue.createElement(M8,{value:E},re({ourProps:le,theirProps:m,slot:ee,defaultTag:tY,features:nY,visible:k===0,name:"Dialog"})))))))))))}),tY="div",nY=ym.RenderStrategy|ym.Static;function rY(e,t){let{transition:n=!1,open:r,...i}=e,a=tp(),s=e.hasOwnProperty("open")||a!==null,l=e.hasOwnProperty("onClose");if(!s&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?ue.createElement(CT,null,ue.createElement(Mo,{show:r,transition:n,unmount:i.unmount},ue.createElement(ET,{ref:t,...i}))):ue.createElement(CT,null,ue.createElement(ET,{ref:t,open:r,...i}))}var iY="div";function aY(e,t){let n=_.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:s,unmount:l},c]=sp("Dialog.Panel"),d=ea(t,c.panelRef),f=jd({open:s===0}),m=Mt(w=>{w.stopPropagation()}),p={ref:d,id:r,onClick:m},O=i?er:_.Fragment,b=i?{unmount:l}:{},x=di();return ue.createElement(O,{...b},x({ourProps:p,theirProps:a,slot:f,defaultTag:iY,name:"Dialog.Panel"}))}var sY="div";function oY(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=sp("Dialog.Backdrop"),s=jd({open:i===0}),l={ref:t,"aria-hidden":!0},c=n?er:_.Fragment,d=n?{unmount:a}:{},f=di();return ue.createElement(c,{...d},f({ourProps:l,theirProps:r,slot:s,defaultTag:sY,name:"Dialog.Backdrop"}))}var lY="h2";function cY(e,t){let n=_.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:s}]=sp("Dialog.Title"),l=ea(t);_.useEffect(()=>(s(r),()=>s(null)),[r,s]);let c=jd({open:a===0}),d={ref:l,id:r};return di()({ourProps:d,theirProps:i,slot:c,defaultTag:lY,name:"Dialog.Title"})}var uY=br(rY),Lo=br(aY);br(oY);var Cd=br(cY),ac=Object.assign(uY,{Panel:Lo,Title:Cd,Description:N8});function QT({children:e,position:t,onClose:n,isOpen:r,wide:i=!1}){const a=i?800:400,s=i?700:500,l={position:"fixed",left:`${Math.min(t.x,typeof window<"u"?window.innerWidth-a:t.x)}px`,top:`${Math.min(t.y,typeof window<"u"?window.innerHeight-s:t.y)}px`};return g.jsx(Mo,{appear:!0,show:r,children:g.jsxs(ac,{as:"div",className:"semiont-popup-overlay",onClose:n,children:[g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-popup-backdrop"})}),g.jsx("div",{className:"semiont-popup-container",children:g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsx(Lo,{className:"semiont-popup-panel",style:l,"data-annotation-ui":!0,"data-wide":i?"true":"false",children:g.jsx(g.Fragment,{children:e})})})})]})})}function dY(e){return To(e)?{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"}:oi(e)?{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"}:Gl(e)?{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"}:Ls(e)?{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"}:Co(e)?{stroke:"rgb(234, 88, 12)",fill:"rgba(234, 88, 12, 0.2)"}:{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}function AO(e){return Ls(e)?"Comment":To(e)?"Highlight":Gl(e)?"Assessment":Co(e)?"Tag":s0(e)?"Resolved Reference":oi(e)?"Unresolved Reference":"Annotation"}function fY({annotations:e,imageWidth:t,imageHeight:n,displayWidth:r,displayHeight:i,session:a,hoveredAnnotationId:s,selectedAnnotationId:l,hoverDelayMs:c}){const d=r/t,f=i/n,{handleMouseEnter:m,handleMouseLeave:p}=_.useMemo(()=>i0(O=>a==null?void 0:a.client.emit("beckon:hover",{annotationId:O}),c),[a,c]);return g.jsx("svg",{className:"semiont-annotation-overlay",style:{width:r,height:i},children:e.map(O=>{if(typeof O.target=="string")return null;const b=YE(O.target.selector);if(!b)return null;const x=l0(b.value);if(!x)return null;const w=O.id===s,k=O.id===l,T=dY(O),j=oi(O),E=j&&Vu(O.body),Q=j?E?"🔗":"❓":null;switch(x.type){case"rect":{const{x:A,y:M,width:L,height:D}=x.data,P=(A+L)*d+8,B=(M+D)*f+4;return g.jsxs("g",{children:[g.jsx("title",{children:AO(O)}),g.jsx("rect",{x:A*d,y:M*f,width:L*d,height:D*f,fill:w||k?T.fill:"transparent",stroke:T.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.client.emit("browse:click",{annotationId:O.id,motivation:O.motivation}),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:P,y:B,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:X=>{X.stopPropagation(),a==null||a.client.emit("browse:click",{annotationId:O.id,motivation:O.motivation})},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}case"circle":{const{cx:A,cy:M,r:L}=x.data,D=L*Math.min(d,f),P=Math.PI/4,B=A*d+D*Math.cos(P)+8,X=M*f+D*Math.sin(P)+4;return g.jsxs("g",{children:[g.jsx("title",{children:AO(O)}),g.jsx("circle",{cx:A*d,cy:M*f,r:D,fill:w||k?T.fill:"transparent",stroke:T.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.client.emit("browse:click",{annotationId:O.id,motivation:O.motivation}),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:B,y:X,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:V=>{V.stopPropagation(),a==null||a.client.emit("browse:click",{annotationId:O.id,motivation:O.motivation})},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}case"polygon":{const A=x.data.points.map(V=>`${V.x*d},${V.y*f}`).join(" "),L=[...x.data.points.map(V=>({x:V.x*d,y:V.y*f,sum:V.x*d+V.y*f}))].sort((V,z)=>z.sum-V.sum),D=L[0],P=L[1],B=(D.x+P.x)/2+8,X=(D.y+P.y)/2+4;return g.jsxs("g",{children:[g.jsx("title",{children:AO(O)}),g.jsx("polygon",{points:A,fill:w||k?T.fill:"transparent",stroke:T.stroke,strokeWidth:w||k?3:2,opacity:w||k?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":w?"true":"false","data-selected":k?"true":"false",onClick:()=>a==null?void 0:a.client.emit("browse:click",{annotationId:O.id,motivation:O.motivation}),onMouseEnter:()=>m(O.id),onMouseLeave:p}),Q&&g.jsx("text",{x:B,y:X,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:V=>{V.stopPropagation(),a==null||a.client.emit("browse:click",{annotationId:O.id,motivation:O.motivation})},onMouseEnter:()=>m(O.id),onMouseLeave:p,children:Q})]},O.id)}default:return null}})})}function hY(e){if(!e)return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"};switch(e){case"highlighting":return{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"};case"linking":return{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"};case"assessing":return{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"};case"commenting":return{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"};default:return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}}function mY({imageUrl:e,existingAnnotations:t=[],drawingMode:n,selectedMotivation:r,session:i,hoveredAnnotationId:a,selectedAnnotationId:s}){const{hoverDelayMs:l}=HP(),c=_.useRef(null),d=_.useRef(null),[f,m]=_.useState(null),[p,O]=_.useState(null),[b,x]=_.useState(!1),[w,k]=_.useState(null),[T,j]=_.useState(null);_.useEffect(()=>{const D=new Image;D.onload=()=>{m({width:D.naturalWidth,height:D.naturalHeight})},D.src=e},[e]),_.useEffect(()=>{const D=()=>{d.current&&O({width:d.current.clientWidth,height:d.current.clientHeight})};D();let P=null;try{P=new ResizeObserver(D),d.current&&P.observe(d.current)}catch{console.warn("ResizeObserver not supported, falling back to window resize listener"),window.addEventListener("resize",D)}return()=>{P?P.disconnect():window.removeEventListener("resize",D)}},[]);const E=_.useCallback(D=>{if(!d.current)return null;const P=d.current.getBoundingClientRect();return{x:D.clientX-P.left,y:D.clientY-P.top}},[]),Q=_.useCallback(D=>{if(!n)return;const P=E(D);P&&(x(!0),k(P),j(P))},[n,E]),A=_.useCallback(D=>{if(!b||!w)return;const P=E(D);P&&j(P)},[b,w,E]),M=_.useCallback(D=>{if(!b||!w||!n)return;const P=E(D);if(!P||!p||!f)return;if(Math.sqrt(Math.pow(P.x-w.x,2)+Math.pow(P.y-w.y,2))<10){if(t.length>0){const Y=t.find($=>{if(typeof $.target=="string")return!1;const q=$.target.selector;if(!q)return!1;const le=(Array.isArray(q)?q:[q]).find(R=>R.type==="SvgSelector");if(!le||le.type!=="SvgSelector")return!1;const I=l0(le.value);if(!I)return!1;const G=p.width/f.width,re=p.height/f.height;if(I.type==="rect"){const{x:R,y:ge,width:_e,height:ve}=I.data,Xe=R*G,Ne=ge*re,Ze=_e*G,be=ve*re;return P.x>=Xe&&P.x<=Xe+Ze&&P.y>=Ne&&P.y<=Ne+be}return!1});if(Y){i==null||i.client.emit("browse:click",{annotationId:Y.id,motivation:Y.motivation}),x(!1),k(null),j(null);return}}x(!1),k(null),j(null);return}let V;switch(n){case"circle":{const Y=Math.sqrt(Math.pow(P.x-w.x,2)+Math.pow(P.y-w.y,2));V=tQ(w,Y);break}case"polygon":{const Y=(w.x+P.x)/2,$=(w.y+P.y)/2,q=Math.abs(P.x-w.x)/2,ee=Math.abs(P.y-w.y)/2,le=[{x:Y,y:$-ee},{x:Y+q,y:$},{x:Y,y:$+ee},{x:Y-q,y:$}];V=eQ(le);break}case"rectangle":default:V=JE(w,P);break}const z=F$(V,p.width,p.height,f.width,f.height);i&&r&&i.client.emit("mark:requested",{selector:{type:"SvgSelector",value:z},motivation:r}),x(!1),k(null),j(null)},[b,w,n,p,f,E,r,t]),L=_.useCallback(()=>{b&&(x(!1),k(null),j(null))},[b]);return g.jsxs("div",{ref:c,className:"semiont-svg-drawing-canvas",onMouseDown:Q,onMouseMove:A,onMouseUp:M,onMouseLeave:L,"data-drawing-mode":n||"none",children:[g.jsx("img",{ref:d,src:e,alt:"Annotatable content",className:"semiont-svg-drawing-canvas__image",draggable:!1}),p&&f&&g.jsx("div",{className:"semiont-svg-drawing-canvas__overlay-container",children:g.jsxs("div",{className:"semiont-svg-drawing-canvas__overlay",style:{width:p.width,height:p.height},children:[g.jsx(fY,{annotations:t,imageWidth:f.width,imageHeight:f.height,displayWidth:p.width,displayHeight:p.height,hoverDelayMs:l,...i&&{session:i},...a!==void 0&&{hoveredAnnotationId:a},...s!==void 0&&{selectedAnnotationId:s}}),b&&w&&T&&(()=>{const D=hY(r||null);return g.jsxs("svg",{className:"semiont-svg-drawing-canvas__preview",style:{width:p.width,height:p.height},children:[n==="circle"&&(()=>{const P=Math.sqrt(Math.pow(T.x-w.x,2)+Math.pow(T.y-w.y,2));return g.jsx("circle",{cx:w.x,cy:w.y,r:P,fill:D.fill,stroke:D.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="polygon"&&(()=>{const P=(w.x+T.x)/2,B=(w.y+T.y)/2,X=Math.abs(T.x-w.x)/2,V=Math.abs(T.y-w.y)/2,Y=[{x:P,y:B-V},{x:P+X,y:B},{x:P,y:B+V},{x:P-X,y:B}].map($=>`${$.x},${$.y}`).join(" ");return g.jsx("polygon",{points:Y,fill:D.fill,stroke:D.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="rectangle"&&g.jsx("rect",{x:Math.min(w.x,T.x),y:Math.min(w.y,T.y),width:Math.abs(T.x-w.x),height:Math.abs(T.y-w.y),fill:D.fill,stroke:D.stroke,strokeWidth:"2",strokeDasharray:"5,5"})]})})()]})})]})}var pY=[{titleKey:"navigationTitle",shortcuts:[{keys:["⌘K","Ctrl K"],descriptionKey:"navOpenSearch"},{keys:["/"],descriptionKey:"navOpenSearchAlt"},{keys:["⌘N","Ctrl N"],descriptionKey:"navCreateResource"},{keys:["Esc Esc"],descriptionKey:"navCloseOverlays"},{keys:["?"],descriptionKey:"navShowHelp"}]},{titleKey:"sidebarTitle",shortcuts:[{keys:["Click <"],descriptionKey:"sidebarCollapse"},{keys:["Click ☰"],descriptionKey:"sidebarExpand"},{keys:["Space"],descriptionKey:"sidebarPickup"},{keys:["↑","↓"],descriptionKey:"sidebarMove"},{keys:["Space"],descriptionKey:"sidebarDrop"},{keys:["Esc"],descriptionKey:"sidebarCancel"}]},{titleKey:"annotationsTitle",shortcuts:[{keys:["H"],descriptionKey:"annotHighlight"},{keys:["R"],descriptionKey:"annotReference"},{keys:["Delete"],descriptionKey:"annotDelete"},{keys:["Tab"],descriptionKey:"annotNavigate"},{keys:["Shift Tab"],descriptionKey:"annotNavigateBack"}]},{titleKey:"listsTitle",shortcuts:[{keys:["←","→"],descriptionKey:"listsFilterNav"},{keys:["↑","↓","←","→"],descriptionKey:"listsGridNav"},{keys:["Home"],descriptionKey:"listsJumpFirst"},{keys:["End"],descriptionKey:"listsJumpLast"}]},{titleKey:"searchModalTitle",shortcuts:[{keys:["↑","↓"],descriptionKey:"searchNav"},{keys:["Enter"],descriptionKey:"searchSelect"},{keys:["Esc"],descriptionKey:"searchClose"}]},{titleKey:"modalTitle",shortcuts:[{keys:["Esc"],descriptionKey:"modalClose"},{keys:["Tab"],descriptionKey:"modalNavForward"},{keys:["Shift Tab"],descriptionKey:"modalNavBackward"},{keys:["Enter"],descriptionKey:"modalActivate"},{keys:["Space"],descriptionKey:"modalActivate"}]},{titleKey:"accessibilityTitle",shortcuts:[{keys:["Tab"],descriptionKey:"a11ySkipLinks"},{keys:["Enter"],descriptionKey:"a11yFollowLink"}]}];function Tre({isOpen:e,onClose:t}){const n=un("KeyboardShortcuts"),r=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;return g.jsx(Mo,{appear:!0,show:e,children:g.jsxs(ac,{as:"div",className:"semiont-modal",onClose:t,children:[g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Lo,{className:"semiont-modal__panel semiont-modal__panel--large",children:[g.jsx("div",{className:"semiont-modal__header",children:g.jsxs("div",{className:"semiont-modal__header-content",children:[g.jsx(Cd,{className:"semiont-modal__title",children:n("title")}),g.jsx("button",{onClick:t,"aria-label":n("closeDialog"),className:"semiont-modal__close",children:g.jsx("svg",{className:"semiont-modal__close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsxs("div",{className:"semiont-modal__body",children:[g.jsx("div",{className:"semiont-shortcuts",children:pY.map(i=>g.jsxs("div",{className:"semiont-shortcuts__group",children:[g.jsx("h3",{className:"semiont-shortcuts__group-title",children:n(i.titleKey)}),g.jsx("div",{className:"semiont-shortcuts__list",children:i.shortcuts.map((a,s)=>g.jsxs("div",{className:"semiont-shortcuts__item",children:[g.jsx("span",{className:"semiont-shortcuts__description",children:n(a.descriptionKey)}),g.jsx("div",{className:"semiont-shortcuts__keys",children:a.keys.map((l,c)=>l.includes("⌘")&&!r||l.includes("Ctrl")&&r?null:g.jsxs(ue.Fragment,{children:[c>0&&!l.includes("⌘")&&!l.includes("Ctrl")&&g.jsx("span",{className:"semiont-shortcuts__separator",children:n("or")}),g.jsx("kbd",{className:"semiont-shortcuts__key",children:l})]},c))})]},s))})]},i.titleKey))}),g.jsx("div",{className:"semiont-shortcuts__note",children:g.jsx("p",{className:"semiont-shortcuts__note-text",children:n(r?"macNote":"windowsNote")})})]}),g.jsx("div",{className:"semiont-modal__footer",children:g.jsxs("div",{className:"semiont-modal__footer-content",children:[g.jsx("div",{className:"semiont-modal__hint",children:n("footerHint",{key:"?"}).split("?").map((i,a,s)=>g.jsxs(ue.Fragment,{children:[i,a<s.length-1&&g.jsx("kbd",{className:"semiont-modal__hint-key",children:"?"})]},a))}),g.jsx("button",{onClick:t,className:"semiont-button semiont-button--secondary",children:n("close")})]})})]})})})})]})})}function gY(){const e=Le(st().activeSignals$),t=Le(e==null?void 0:e.permissionDeniedAt$)??null,n=Le(e==null?void 0:e.permissionDeniedMessage$)??null,r=()=>e==null?void 0:e.acknowledgePermissionDenied(),i=t!==null,a=n??"You do not have permission to perform this action.",s=()=>{r(),window.history.back()},l=()=>{r(),window.location.href="/"},c=()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`};return g.jsx(Mo,{appear:!0,show:i,children:g.jsxs(ac,{as:"div",className:"semiont-modal",onClose:s,children:[g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Lo,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-amber-600, #d97706)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(Cd,{className:"semiont-modal__title semiont-modal__title--centered",children:"Access Denied"}),g.jsx("p",{className:"semiont-modal__description",children:a})]}),g.jsxs("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md, 0.375rem)",border:"1px solid var(--semiont-border-primary)",fontSize:"var(--semiont-text-sm, 0.875rem)",marginBottom:"1rem"},children:[g.jsx("p",{style:{color:"var(--semiont-text-secondary)",marginBottom:"0.5rem"},children:"This could be because:"}),g.jsxs("ul",{style:{listStyle:"disc",listStylePosition:"inside",color:"var(--semiont-text-tertiary)",display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("li",{children:"You don't have the required permissions"}),g.jsx("li",{children:"The resource is restricted to specific users or teams"}),g.jsx("li",{children:"Your account type doesn't include this feature"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:s,className:"semiont-button--primary semiont-button--flex",children:"Go Back"}),g.jsx("button",{type:"button",onClick:l,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"})]}),g.jsx("div",{className:"semiont-modal__actions",style:{marginTop:"0.5rem",paddingTop:"0.5rem",borderTop:"1px solid var(--semiont-border-primary)"},children:g.jsx("button",{type:"button",onClick:c,className:"semiont-button--secondary semiont-button--flex",style:{fontSize:"var(--semiont-text-sm, 0.875rem)"},children:"Switch Account"})})]})})})})]})})}function vY(){const e=Le(st().activeSignals$),t=Le(e==null?void 0:e.sessionExpiredAt$)??null,n=Le(e==null?void 0:e.sessionExpiredMessage$)??null,r=()=>e==null?void 0:e.acknowledgeSessionExpired(),i=t!==null,a=()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`},s=()=>{r(),window.location.href="/"};return g.jsx(Mo,{appear:!0,show:i,children:g.jsxs(ac,{as:"div",className:"semiont-modal",onClose:s,children:[g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Lo,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",style:{background:"linear-gradient(to bottom right, var(--semiont-color-red-100, #fee2e2), var(--semiont-color-red-300, #fca5a5))"},children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-red-600, #dc2626)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(Cd,{className:"semiont-modal__title semiont-modal__title--centered",children:"Session Expired"}),g.jsx("p",{className:"semiont-modal__description",children:n??"Your session has expired for security reasons. Please sign in again to continue working."})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:s,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"}),g.jsx("button",{type:"button",onClick:a,className:"semiont-button--primary semiont-button--flex",children:"Sign In Again"})]})]})})})})]})})}function OY(e,t){if(!e)return[{exact:"",start:0,end:0}];const n=Z$(e),r=t.map(s=>{const l=An(s.target),c=si(l),d=l?q$(l):null;let f;d&&(f=V$(e,d.exact,d.prefix,d.suffix,c==null?void 0:c.start,n));const m=(f==null?void 0:f.start)??(c==null?void 0:c.start)??0,p=(f==null?void 0:f.end)??(c==null?void 0:c.end)??0;return{annotation:s,start:m,end:p}}).filter(s=>s.start>=0&&s.end<=e.length&&s.start<s.end).sort((s,l)=>s.start-l.start);if(r.length===0)return[{exact:e,start:0,end:e.length}];const i=[];let a=0;for(const{annotation:s,start:l,end:c}of r)l<a||(l>a&&i.push({exact:e.slice(a,l),start:a,end:l}),i.push({exact:e.slice(l,c),annotation:s,start:l,end:c}),a=c);return a<e.length&&i.push({exact:e.slice(a),start:a,end:e.length}),i}function bY(e,t,n,r){if(!t||n<0||r<=n||r>e.length)return null;const i=H$(e,n,r);return[{type:"TextPositionSelector",start:n,end:r},{type:"TextQuoteSelector",exact:t,...i.prefix&&{prefix:i.prefix},...i.suffix&&{suffix:i.suffix}}]}function yY(e,t){const n=e.indexOf(t);return n===-1?null:{start:n,end:n+t.length}}var xY=_.lazy(()=>Pe(()=>import("./PdfAnnotationCanvas.client-6ZGFEN2N-Dnq2pEeZ.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.PdfAnnotationCanvas})));function SY({content:e,mimeType:t="text/plain",resourceUri:n,annotations:r,uiState:i,onUIStateChange:a,enableWidgets:s=!1,getTargetResourceName:l,generatingReferenceId:c,showLineNumbers:d=!1,hoverDelayMs:f=150,annotateMode:m}){const{newAnnotationIds:p}=J0(),O=_.useRef(null),b=Le(st().activeSession$),x=c0(t),{highlights:w,references:k,assessments:T,comments:j,tags:E}=r,Q=[...w,...k,...T,...j,...E],A=OY(e,Q),{selectedMotivation:M,selectedClick:L,selectedShape:D,hoveredAnnotationId:P,scrollToAnnotationId:B}=i,X=_.useRef(a);X.current=a;const V=_.useCallback(({motivation:q})=>{var ee;(ee=X.current)==null||ee.call(X,{selectedMotivation:q})},[]),z=_.useCallback(({action:q})=>{var ee;(ee=X.current)==null||ee.call(X,{selectedClick:q})},[]),Y=_.useCallback(({shape:q})=>{var ee;(ee=X.current)==null||ee.call(X,{selectedShape:q})},[]),$=_.useCallback(({annotationId:q})=>{var ee;(ee=X.current)==null||ee.call(X,{hoveredAnnotationId:q})},[]);switch(Ma({"mark:selection-changed":V,"mark:click-changed":z,"mark:shape-changed":Y,"beckon:hover":$}),_.useEffect(()=>{const q=O.current;if(!q)return;let ee=!1;const le=G=>{const re=G.target;ee=!!re.closest("[data-annotation-id]"),re.closest("[data-annotation-ui]")},I=G=>{const re=G.target;if(re.closest(".semiont-pdf-annotation-canvas")||re.closest(".semiont-svg-drawing-canvas"))return;const R=window.getSelection();if(!R||R.isCollapsed||!R.toString()){ee=!1;return}if(ee){ee=!1;return}ee=!1;const ge=R.getRangeAt(0),_e=R.toString(),ve=q.querySelector(".codemirror-renderer"),Xe=ve==null?void 0:ve.__cmView;let Ne,Ze;if(!Xe||!Xe.posAtDOM){const be=yY(e,_e);if(!be)return;Ne=be.start,Ze=be.end}else Ne=Xe.posAtDOM(ge.startContainer,ge.startOffset),Ze=Ne+_e.length;if(Ne>=0&&M){const be=bY(e,_e,Ne,Ze);if(!be)return;b==null||b.client.emit("mark:requested",{selector:be,motivation:M}),R.removeAllRanges()}};return q.addEventListener("mouseup",I),q.addEventListener("mousedown",le),()=>{q.removeEventListener("mouseup",I),q.removeEventListener("mousedown",le)}},[M,e]),x){case"text":return g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"text",ref:O,children:[g.jsx(Nl,{selectedMotivation:M,selectedClick:L,mediaType:t,annotateMode:m,annotators:Jn}),g.jsx("div",{className:"semiont-annotate-view__content",children:g.jsx(SR,{content:e,segments:A,editable:!1,newAnnotationIds:p,...P!==void 0&&{hoveredAnnotationId:P},...B!==void 0&&{scrollToAnnotationId:B},sourceView:!0,showLineNumbers:d,hoverDelayMs:f,enableWidgets:s,session:b,...l&&{getTargetResourceName:l},...c!==void 0&&{generatingReferenceId:c}})})]});case"image":return Kl(t)?g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"pdf",ref:O,children:[g.jsx(Nl,{selectedMotivation:M,selectedClick:L,showShapeGroup:!0,selectedShape:D,mediaType:t,annotateMode:m,annotators:Jn}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(_.Suspense,{fallback:g.jsx("div",{className:"semiont-annotate-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(xY,{pdfUrl:e,existingAnnotations:Q,drawingMode:M?D:null,selectedMotivation:M,session:b,hoveredAnnotationId:P||null,hoverDelayMs:f})})})]}):g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"image",ref:O,children:[g.jsx(Nl,{selectedMotivation:M,selectedClick:L,showShapeGroup:!0,selectedShape:D,mediaType:t,annotateMode:m,annotators:Jn}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(mY,{imageUrl:e,existingAnnotations:Q,drawingMode:M?D:null,selectedMotivation:M,session:b,hoveredAnnotationId:P||null,hoverDelayMs:f})})]});case"unsupported":default:return g.jsx("div",{ref:O,className:"semiont-annotate-view semiont-annotate-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-annotate-view__empty",children:[g.jsxs("p",{className:"semiont-annotate-view__empty-message",children:["Annotation not supported for ",t]}),n&&g.jsx("a",{href:`/api/resources/${n}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}}function AT(e){if(!e.startsWith("did:"))return e;const t=e.match(/^did:web:system:(.+)$/);if(t){const r=t[1];return r.charAt(0).toUpperCase()+r.slice(1)}const n=e.match(/^did:web:[^:]+:users:(.+)$/);return n?decodeURIComponent(n[1]):e}function PT(e,t,n){var r;switch(e){case"yield:created":return t("resourceCreated");case"yield:cloned":return t("resourceCloned");case"mark:archived":return t("resourceArchived");case"mark:unarchived":return t("resourceUnarchived");case"mark:added":{const i=(r=n==null?void 0:n.annotation)==null?void 0:r.motivation;return t(i==="highlighting"?"highlightAdded":i==="linking"?"referenceCreated":i==="assessing"?"assessmentAdded":"annotationAdded")}case"mark:removed":return t("annotationRemoved");case"mark:body-updated":return t("annotationBodyUpdated");case"mark:entity-tag-added":return t("entitytagAdded");case"mark:entity-tag-removed":return t("entitytagRemoved");case"job:completed":case"job:started":case"job:progress":case"job:failed":return t("jobEvent");case"yield:representation-added":case"yield:representation-removed":return t("representationEvent");default:return e}}function wY(e,t){var n;switch(e){case"yield:created":case"yield:cloned":case"mark:archived":case"mark:unarchived":return"📄";case"mark:added":{const r=(n=t==null?void 0:t.annotation)==null?void 0:n.motivation;return r==="highlighting"?Jn.highlight.iconEmoji||"📝":r==="linking"?Jn.reference.iconEmoji||"📝":r==="assessing"&&Jn.assessment.iconEmoji||"📝"}case"mark:removed":return"🗑️";case"mark:body-updated":return"✏️";case"mark:entity-tag-added":case"mark:entity-tag-removed":return"🏷️";case"job:completed":return"🔗";case"job:started":case"job:progress":return"⚙️";case"job:failed":return"❌";case"yield:representation-added":case"yield:representation-removed":return"📄";default:return"📝"}}function _Y(e,t){const n=new Date(e),i=new Date().getTime()-n.getTime(),a=Math.floor(i/6e4),s=Math.floor(i/36e5),l=Math.floor(i/864e5);return a<1?t("justNow"):a<60?t("minutesAgo",{count:a}):s<24?t("hoursAgo",{count:s}):l<7?t("daysAgo",{count:l}):n.toLocaleDateString()}function _h(e,t=50){const n=e.trim();return n.length>t?n.substring(0,t)+"...":n}function kY(e,t,n){const r=e,i=r.payload;switch(r.type){case"yield:created":case"yield:cloned":return{exact:i.name,isQuoted:!1,isTag:!1};case"mark:body-updated":{const a=t.find(s=>s.id.endsWith(`/annotations/${i.annotationId}`));if(a!=null&&a.target)try{const s=An(a.target),l=Ss(s);if(l)return{exact:_h(l),isQuoted:!0,isTag:!1}}catch{}return null}case"mark:removed":{const a=n.find(s=>s.type==="mark:added"&&s.payload.annotation.id.endsWith(`/annotations/${i.annotationId}`));if(a&&a.type==="mark:added")try{const s=a.payload.annotation.target;if(typeof s!="string"&&s.selector){const l=Ss(s.selector);if(l)return{exact:_h(l),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:added":{try{const a=i.annotation.target;if(typeof a!="string"&&a.selector){const s=Ss(a.selector);if(s)return{exact:_h(s),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:entity-tag-added":case"mark:entity-tag-removed":return{exact:i.entityType,isQuoted:!1,isTag:!0};case"job:completed":{if(i.annotationUri){const a=t.find(s=>s.id===i.annotationUri);if(a!=null&&a.target)try{const s=An(a.target),l=Ss(s);if(l)return{exact:_h(l),isQuoted:!0,isTag:!1}}catch{}}return null}case"job:started":case"job:progress":case"job:failed":case"yield:representation-added":case"yield:representation-removed":return null;default:return null}}function jY(e){const t=e,n=t.payload;if(t.type==="mark:added"){const r=n.annotation.motivation,i=n.annotation.body;if(r==="linking"&&i&&"entityTypes"in i)return i.entityTypes??[]}return[]}function TY(e){const t=e,n=t.payload;return t.type==="yield:created"?{type:"created",method:n.creationMethod||"unknown",userId:t.userId,metadata:void 0}:t.type==="yield:cloned"?{type:"cloned",method:n.creationMethod||"clone",userId:t.userId,sourceDocId:n.parentResourceId,parentResourceId:n.parentResourceId,metadata:void 0}:null}function CY({event:e,annotations:t,allEvents:n,isRelated:r,t:i,Link:a,routes:s,onEventRef:l,onEventClick:c,onEventHover:d}){const f=kY(e,t,n),m=BE(e),p=TY(e),O=jY(e),b=_.useRef(null),x=_.useRef(d);_.useEffect(()=>{x.current=d});const w=_.useCallback(()=>{!m||!x.current||(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{var E;(E=x.current)==null||E.call(x,m)},300))},[m]),k=_.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),x.current&&x.current(null)},[]),T=m?"button":"div",j=m?{type:"button",onClick:()=>c==null?void 0:c(m),"aria-label":i("viewAnnotation",{content:(f==null?void 0:f.exact)||PT(e.type,i)}),className:"semiont-history-event","data-related":r?"true":"false","data-interactive":"true"}:{className:"semiont-history-event","data-related":r?"true":"false"};return g.jsxs(T,{ref:E=>{l&&l(m,E)},...j,children:[g.jsxs("div",{className:"semiont-history-event__content",children:[g.jsx("span",{className:"semiont-history-event__emoji",onMouseEnter:w,onMouseLeave:k,children:wY(e.type,e.payload)}),f?f.isTag?g.jsx("span",{className:"semiont-history-event__tag",children:f.exact}):f.isQuoted?g.jsxs("span",{className:"semiont-history-event__text semiont-history-event__text--quoted",children:["“",f.exact,"”"]}):g.jsx("span",{className:"semiont-history-event__text",children:f.exact}):g.jsx("span",{className:"semiont-history-event__text",children:PT(e.type,i,e.payload)}),e.userId&&g.jsx("span",{className:"semiont-history-event__user",children:AT(e.userId)}),g.jsx("span",{className:"semiont-history-event__timestamp",children:_Y(e.timestamp,i)})]}),O.length>0&&g.jsx("div",{className:"semiont-history-event__entity-types",children:O.map(E=>g.jsx("span",{className:"semiont-tag semiont-tag--small","data-variant":"blue",children:E},E))}),p&&g.jsxs("div",{className:"semiont-history-event__details",children:[g.jsxs("span",{className:"semiont-history-event__detail",children:[i("user"),": ",g.jsx("span",{className:"semiont-history-event__detail-value",children:p.userId?AT(p.userId):""})]}),g.jsxs("span",{className:"semiont-history-event__detail",children:[i("method"),": ",g.jsx("span",{className:"semiont-history-event__detail-value semiont-history-event__detail-value--uppercase",children:p.method})]}),p.type==="cloned"&&p.sourceDocId&&g.jsx(a,{href:s.resourceDetail(p.sourceDocId),className:"semiont-history-event__link",onClick:E=>E.stopPropagation(),children:i("viewOriginal")})]})]})}function EY({rUri:e,hoveredAnnotationId:t,onEventHover:n,onEventClick:r,Link:i,routes:a}){var x;const s=un("AnnotationHistory"),l=(x=Le(st().activeSession$))==null?void 0:x.client,c=Le(l==null?void 0:l.browse.events(e)),d=Le(l==null?void 0:l.browse.annotations(e)),f=c===void 0,m=d??[],p=_.useRef(new Map),O=_.useRef(null),b=c?c.filter(w=>w.type!=="job:started"&&w.type!=="job:progress"&&w.type!=="job:completed").sort((w,k)=>w.metadata.sequenceNumber-k.metadata.sequenceNumber):[];return _.useEffect(()=>{O.current&&b.length>0&&requestAnimationFrame(()=>{O.current&&(O.current.scrollTop=O.current.scrollHeight)})},[b.length]),_.useEffect(()=>{if(!t)return;const w=p.current.get(t);w&&O.current&&(w.scrollIntoView({behavior:"smooth",block:"nearest"}),w.classList.add("bg-blue-100","dark:bg-blue-900/30"),setTimeout(()=>{w.classList.remove("bg-blue-100","dark:bg-blue-900/30")},1500))},[t]),f?g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{className:"semiont-history-panel__loading",children:s("loading")})]}):b.length===0?null:g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{ref:O,className:"semiont-history-panel__list",children:b.map(w=>{const k=t?(()=>{const T=BE(w);return T?T===t:!1})():!1;return g.jsx(CY,{event:w,annotations:m,allEvents:b,isRelated:k,t:s,Link:i,routes:a,onEventRef:(T,j)=>{j&&T?p.current.set(T,j):!j&&T&&p.current.delete(T)},...r&&{onEventClick:r},...n&&{onEventHover:n}},w.id)})})]})}function QY(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var AY=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PY=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NY={};function NT(e,t){return(NY.jsx?PY:AY).test(e)}var RY=/[ \t\n\f\r]/g;function MY(e){return typeof e=="object"?e.type==="text"?RT(e.value):!1:RT(e)}function RT(e){return e.replace(RY,"")===""}var Ed=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ed.prototype.normal={};Ed.prototype.property={};Ed.prototype.space=void 0;function tM(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ed(n,r,t)}function My(e){return e.toLowerCase()}var yr=class{constructor(e,t){this.attribute=t,this.property=e}};yr.prototype.attribute="";yr.prototype.booleanish=!1;yr.prototype.boolean=!1;yr.prototype.commaOrSpaceSeparated=!1;yr.prototype.commaSeparated=!1;yr.prototype.defined=!1;yr.prototype.mustUseProperty=!1;yr.prototype.number=!1;yr.prototype.overloadedBoolean=!1;yr.prototype.property="";yr.prototype.spaceSeparated=!1;yr.prototype.space=void 0;var wm={};cE(wm,{boolean:()=>We,booleanish:()=>vn,commaOrSpaceSeparated:()=>Nr,commaSeparated:()=>Rl,number:()=>fe,overloadedBoolean:()=>Ly,spaceSeparated:()=>qt});var LY=0,We=Do(),vn=Do(),Ly=Do(),fe=Do(),qt=Do(),Rl=Do(),Nr=Do();function Do(){return 2**++LY}var PO=Object.keys(wm),vx=class extends yr{constructor(e,t,n,r){let i=-1;if(super(e,t),MT(this,"space",r),typeof n=="number")for(;++i<PO.length;){const a=PO[i];MT(this,PO[i],(n&wm[a])===wm[a])}}};vx.prototype.defined=!0;function MT(e,t,n){n&&(e[t]=n)}function sc(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new vx(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[My(r)]=r,n[My(a.attribute)]=r}return new Ed(t,n,e.space)}var nM=sc({properties:{ariaActiveDescendant:null,ariaAtomic:vn,ariaAutoComplete:null,ariaBusy:vn,ariaChecked:vn,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:vn,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:vn,ariaFlowTo:qt,ariaGrabbed:vn,ariaHasPopup:null,ariaHidden:vn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:fe,ariaLive:null,ariaModal:vn,ariaMultiLine:vn,ariaMultiSelectable:vn,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:vn,ariaReadOnly:vn,ariaRelevant:null,ariaRequired:vn,ariaRoleDescription:qt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:vn,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rM(e,t){return t in e?e[t]:t}function iM(e,t){return rM(e,t.toLowerCase())}var DY=sc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rl,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:qt,autoFocus:We,autoPlay:We,blocking:qt,capture:null,charSet:null,checked:We,cite:null,className:qt,cols:fe,colSpan:null,content:null,contentEditable:vn,controls:We,controlsList:qt,coords:fe|Rl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Ly,draggable:vn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:qt,height:fe,hidden:Ly,high:fe,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:qt,itemRef:qt,itemScope:We,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:fe,pattern:null,ping:qt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:qt,required:We,reversed:We,rows:fe,rowSpan:fe,sandbox:qt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:vn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:vn,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:vn,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:iM}),zY=sc({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:Nr,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:qt,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:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,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:Rl,g2:Rl,glyphName:Rl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:Nr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,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:fe,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:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nr,rev:Nr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nr,requiredFeatures:Nr,requiredFonts:Nr,requiredFormats:Nr,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:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:Nr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nr,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rM}),aM=sc({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()}}),sM=sc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:iM}),oM=sc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$Y={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"},qY=/[A-Z]/g,LT=/-[a-z]/g,IY=/^data[-\w.:]+$/i;function XY(e,t){const n=My(t);let r=t,i=yr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&IY.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(LT,BY);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!LT.test(a)){let s=a.replace(qY,ZY);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=vx}return new i(r,t)}function ZY(e){return"-"+e.toLowerCase()}function BY(e){return e.charAt(1).toUpperCase()}var VY=tM([nM,DY,aM,sM,oM],"html"),Ox=tM([nM,zY,aM,sM,oM],"svg");function UY(e){return e.join(" ").trim()}var YY=Rm(f2(),1),lM=cM("end"),bx=cM("start");function cM(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function WY(e){const t=bx(e),n=lM(e);if(t&&n)return{start:t,end:n}}function Ru(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?DT(e.position):"start"in e||"end"in e?DT(e):"line"in e||"column"in e?Dy(e):""}function Dy(e){return zT(e&&e.line)+":"+zT(e&&e.column)}function DT(e){return Dy(e&&e.start)+"-"+Dy(e&&e.end)}function zT(e){return e&&typeof e=="number"?e:1}var Vn=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=Ru(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Vn.prototype.file="";Vn.prototype.name="";Vn.prototype.reason="";Vn.prototype.message="";Vn.prototype.stack="";Vn.prototype.column=void 0;Vn.prototype.line=void 0;Vn.prototype.ancestors=void 0;Vn.prototype.cause=void 0;Vn.prototype.fatal=void 0;Vn.prototype.place=void 0;Vn.prototype.ruleId=void 0;Vn.prototype.source=void 0;var yx={}.hasOwnProperty,FY=new Map,HY=/[A-Z]/g,GY=new Set(["table","tbody","thead","tfoot","tr"]),KY=new Set(["td","th"]),uM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function JY(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=oW(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");r=sW(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?Ox:VY,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=dM(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function dM(e,t,n){if(t.type==="element")return eW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rW(e,t,n);if(t.type==="mdxjsEsm")return nW(e,t);if(t.type==="root")return iW(e,t,n);if(t.type==="text")return aW(e,t)}function eW(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ox,e.schema=i),e.ancestors.push(t);const a=hM(e,t.tagName,!1),s=lW(e,t);let l=Sx(e,t);return GY.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!MY(c):!0})),fM(e,s,a,t),xx(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function tW(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}cd(e,t.position)}function nW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cd(e,t.position)}function rW(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ox,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:hM(e,t.name,!0),s=cW(e,t),l=Sx(e,t);return fM(e,s,a,t),xx(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function iW(e,t,n){const r={};return xx(r,Sx(e,t)),e.create(t,e.Fragment,r,n)}function aW(e,t){return t.value}function fM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sW(e,t,n){return r;function r(i,a,s,l){const d=Array.isArray(s.children)?n:t;return l?d(a,s,l):d(a,s)}}function oW(e,t){return n;function n(r,i,a,s){const l=Array.isArray(a.children),c=bx(r);return t(i,a,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function lW(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&yx.call(t.properties,i)){const a=uW(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&KY.has(t.tagName)?r=l:n[s]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function cW(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else cd(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else cd(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Sx(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:FY;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const d=i.get(c)||0;s=c+"-"+d,i.set(c,d+1)}}const l=dM(e,a,s);l!==void 0&&n.push(l)}return n}function uW(e,t,n){const r=XY(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?QY(n):UY(n)),r.property==="style"){let i=typeof n=="object"?n:dW(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fW(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$Y[r.property]||r.property:r.attribute,n]}}function dW(e,t){try{return(0,YY.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Vn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=uM+"#cannot-parse-style-attribute",i}}function hM(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=NT(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=s}else r=NT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return yx.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);cd(e)}function cd(e,t){const n=new Vn("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=uM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fW(e){const t={};let n;for(n in e)yx.call(e,n)&&(t[hW(n)]=e[n]);return t}function hW(e){let t=e.replace(HY,mW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function mW(e){return"-"+e.toLowerCase()}var NO={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"]},pW={};function wx(e,t){const n=pW,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mM(e,r,i)}function mM(e,t,n){if(gW(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 $T(e.children,t,n)}return Array.isArray(e)?$T(e,t,n):""}function $T(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=mM(e[i],t,n);return r.join("")}function gW(e){return!!(e&&typeof e=="object")}var qT={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
136
+ `,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},vW={}.hasOwnProperty;function _x(e){return vW.call(qT,e)?qT[e]:!1}function Mr(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Jr(e,t){return e.length>0?(Mr(e,e.length,0,t),e):t}var IT={}.hasOwnProperty;function pM(e){const t={};let n=-1;for(;++n<e.length;)OW(t,e[n]);return t}function OW(e,t){let n;for(n in t){const i=(IT.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){IT.call(i,s)||(i[s]=[]);const l=a[s];bW(i[s],Array.isArray(l)?l:l?[l]:[])}}}function bW(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Mr(e,0,0,r)}function gM(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)}function _i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Kn=qs(/[A-Za-z]/),Zn=qs(/[\dA-Za-z]/),yW=qs(/[#-'*+\--9=?A-Z^-~]/);function _m(e){return e!==null&&(e<32||e===127)}var zy=qs(/\d/),xW=qs(/[\dA-Fa-f]/),SW=qs(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function Lt(e){return e!==null&&(e<0||e===32)}function at(e){return e===-2||e===-1||e===32}var op=qs(new RegExp("\\p{P}|\\p{S}","u")),jo=qs(/\s/);function qs(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function oc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Zn(e.charCodeAt(n+1))&&Zn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function gt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(c){return at(c)?(e.enter(n),l(c)):t(c)}function l(c){return at(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}var wW={tokenize:_W};function _W(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),gt(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ze(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}var kW={tokenize:jW},XT={tokenize:TW};function jW(e){const t=this,n=[];let r=0,i,a,s;return l;function l(j){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,c,d)(j)}return d(j)}function c(j){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const E=t.events.length;let Q=E,A;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){A=t.events[Q][1].end;break}k(r);let M=E;for(;M<t.events.length;)t.events[M][1].end={...A},M++;return Mr(t.events,Q+1,0,t.events.slice(E)),t.events.length=M,d(j)}return l(j)}function d(j){if(r===n.length){if(!i)return p(j);if(i.currentConstruct&&i.currentConstruct.concrete)return b(j);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(XT,f,m)(j)}function f(j){return i&&T(),k(r),p(j)}function m(j){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(j)}function p(j){return t.containerState={},e.attempt(XT,O,b)(j)}function O(j){return r++,n.push([t.currentConstruct,t.containerState]),p(j)}function b(j){if(j===null){i&&T(),k(0),e.consume(j);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(j)}function x(j){if(j===null){w(e.exit("chunkFlow"),!0),k(0),e.consume(j);return}return ze(j)?(e.consume(j),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(j),x)}function w(j,E){const Q=t.sliceStream(j);if(E&&Q.push(null),j.previous=a,a&&(a.next=j),a=j,i.defineSkip(j.start),i.write(Q),t.parser.lazy[j.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<s&&(!i.events[A][1].end||i.events[A][1].end.offset>s))return;const M=t.events.length;let L=M,D,P;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(D){P=t.events[L][1].end;break}D=!0}for(k(r),A=M;A<t.events.length;)t.events[A][1].end={...P},A++;Mr(t.events,L+1,0,t.events.slice(M)),t.events.length=A}}function k(j){let E=n.length;for(;E-- >j;){const Q=n[E];t.containerState=Q[1],Q[0].exit.call(t,e)}n.length=j}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function TW(e,t,n){return gt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fl(e){if(e===null||Lt(e)||jo(e))return 1;if(op(e))return 2}function lp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var $y={name:"attention",resolveAll:CW,tokenize:EW};function CW(e,t){let n=-1,r,i,a,s,l,c,d,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},p={...e[n][1].start};ZT(m,-c),ZT(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Jr(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=Jr(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),d=Jr(d,lp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=Jr(d,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,d=Jr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Mr(e,r-1,n-r+3,d),n=r+d.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function EW(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fl(r);let a;return s;function s(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const d=e.exit("attentionSequence"),f=Fl(c),m=!f||f===2&&i||n.includes(c),p=!i||i===2&&f||n.includes(r);return d._open=!!(a===42?m:m&&(i||!p)),d._close=!!(a===42?p:p&&(f||!m)),t(c)}}function ZT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var QW={name:"autolink",tokenize:AW};function AW(e,t,n){let r=0;return i;function i(O){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(O){return Kn(O)?(e.consume(O),s):O===64?n(O):d(O)}function s(O){return O===43||O===45||O===46||Zn(O)?(r=1,l(O)):d(O)}function l(O){return O===58?(e.consume(O),r=0,c):(O===43||O===45||O===46||Zn(O))&&r++<32?(e.consume(O),l):(r=0,d(O))}function c(O){return O===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.exit("autolink"),t):O===null||O===32||O===60||_m(O)?n(O):(e.consume(O),c)}function d(O){return O===64?(e.consume(O),f):yW(O)?(e.consume(O),d):n(O)}function f(O){return Zn(O)?m(O):n(O)}function m(O){return O===46?(e.consume(O),r=0,f):O===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(O),e.exit("autolinkMarker"),e.exit("autolink"),t):p(O)}function p(O){if((O===45||Zn(O))&&r++<63){const b=O===45?p:m;return e.consume(O),b}return n(O)}}var Qd={partial:!0,tokenize:PW};function PW(e,t,n){return r;function r(a){return at(a)?gt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ze(a)?t(a):n(a)}}var vM={continuation:{tokenize:RW},exit:MW,name:"blockQuote",tokenize:NW};function NW(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return at(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function RW(e,t,n){const r=this;return i;function i(s){return at(s)?gt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(vM,t,n)(s)}}function MW(e){e.exit("blockQuote")}var OM={name:"characterEscape",tokenize:LW};function LW(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return SW(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}var bM={name:"characterReference",tokenize:DW};function DW(e,t,n){const r=this;let i=0,a,s;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,s=Zn,f(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=xW,f):(e.enter("characterReferenceValue"),a=7,s=zy,f(m))}function f(m){if(m===59&&i){const p=e.exit("characterReferenceValue");return s===Zn&&!_x(r.sliceSerialize(p))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&i++<a?(e.consume(m),f):n(m)}}var BT={partial:!0,tokenize:$W},VT={concrete:!0,name:"codeFenced",tokenize:zW};function zW(e,t,n){const r=this,i={partial:!0,tokenize:Q};let a=0,s=0,l;return c;function c(A){return d(A)}function d(A){const M=r.events[r.events.length-1];return a=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,l=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(A)}function f(A){return A===l?(s++,e.consume(A),f):s<3?n(A):(e.exit("codeFencedFenceSequence"),at(A)?gt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||ze(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(BT,x,E)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||ze(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):at(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),gt(e,O,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),p)}function O(A){return A===null||ze(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||ze(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===l?n(A):(e.consume(A),b)}function x(A){return e.attempt(i,E,w)(A)}function w(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),k}function k(A){return a>0&&at(A)?gt(e,T,"linePrefix",a+1)(A):T(A)}function T(A){return A===null||ze(A)?e.check(BT,x,E)(A):(e.enter("codeFlowValue"),j(A))}function j(A){return A===null||ze(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),j)}function E(A){return e.exit("codeFenced"),t(A)}function Q(A,M,L){let D=0;return P;function P(Y){return A.enter("lineEnding"),A.consume(Y),A.exit("lineEnding"),B}function B(Y){return A.enter("codeFencedFence"),at(Y)?gt(A,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):X(Y)}function X(Y){return Y===l?(A.enter("codeFencedFenceSequence"),V(Y)):L(Y)}function V(Y){return Y===l?(D++,A.consume(Y),V):D>=s?(A.exit("codeFencedFenceSequence"),at(Y)?gt(A,z,"whitespace")(Y):z(Y)):L(Y)}function z(Y){return Y===null||ze(Y)?(A.exit("codeFencedFence"),M(Y)):L(Y)}}}function $W(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}var RO={name:"codeIndented",tokenize:IW},qW={partial:!0,tokenize:XW};function IW(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),gt(e,a,"linePrefix",5)(d)}function a(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):ze(d)?e.attempt(qW,s,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||ze(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function XW(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):gt(e,a,"linePrefix",5)(s)}function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):ze(s)?i(s):n(s)}}var ZW={name:"codeText",previous:VW,resolve:BW,tokenize:UW};function BW(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function VW(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UW(e,t,n){let r=0,i,a;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(a=e.enter("codeTextSequence"),i=0,f(m)):ze(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||ze(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),d)}function f(m){return m===96?(e.consume(m),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}var YW=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&cu(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),cu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),cu(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);cu(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);cu(this.left,t.reverse())}}};function cu(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 yM(e){const t={};let n=-1,r,i,a,s,l,c,d;const f=new YW(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,WW(f,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=f.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return Mr(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!d}function WW(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],d={};let f,m,p=-1,O=n,b=0,x=0;const w=[x];for(;O;){for(;e.get(++i)[1]!==O;);a.push(i),O._tokenizer||(f=r.sliceStream(O),O.next||f.push(null),m&&s.defineSkip(O.start),O._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),O._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=O,O=O.next}for(O=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(x=p+1,w.push(x),O._tokenizer=void 0,O.previous=void 0,O=O.next);for(s.events=[],O?(O._tokenizer=void 0,O.previous=void 0):w.pop(),p=w.length;p--;){const k=l.slice(w[p],w[p+1]),T=a.pop();c.push([T,T+k.length-1]),e.splice(T,2,k)}for(c.reverse(),p=-1;++p<c.length;)d[b+c[p][0]]=b+c[p][1],b+=c[p][1]-c[p][0]-1;return d}var FW={resolve:GW,tokenize:KW},HW={partial:!0,tokenize:JW};function GW(e){return yM(e),e}function KW(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):ze(l)?e.check(HW,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function JW(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),gt(e,a,"linePrefix")}function a(s){if(s===null||ze(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function xM(e,t,n,r,i,a,s,l,c){const d=c||Number.POSITIVE_INFINITY;let f=0;return m;function m(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),p):k===null||k===32||k===41||_m(k)?n(k):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(k))}function p(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),O(k))}function O(k){return k===62?(e.exit("chunkString"),e.exit(l),p(k)):k===null||k===60||ze(k)?n(k):(e.consume(k),k===92?b:O)}function b(k){return k===60||k===62||k===92?(e.consume(k),O):O(k)}function x(k){return!f&&(k===null||k===41||Lt(k))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(k)):f<d&&k===40?(e.consume(k),f++,x):k===41?(e.consume(k),f--,x):k===null||k===32||k===40||_m(k)?n(k):(e.consume(k),k===92?w:x)}function w(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function SM(e,t,n,r,i,a){const s=this;let l=0,c;return d;function d(O){return e.enter(r),e.enter(i),e.consume(O),e.exit(i),e.enter(a),f}function f(O){return l>999||O===null||O===91||O===93&&!c||O===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(O):O===93?(e.exit(a),e.enter(i),e.consume(O),e.exit(i),e.exit(r),t):ze(O)?(e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),m(O))}function m(O){return O===null||O===91||O===93||ze(O)||l++>999?(e.exit("chunkString"),f(O)):(e.consume(O),c||(c=!at(O)),O===92?p:m)}function p(O){return O===91||O===92||O===93?(e.consume(O),l++,m):m(O)}}function wM(e,t,n,r,i,a){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),d(p))}function d(p){return p===s?(e.exit(a),c(s)):p===null?n(p):ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),gt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||ze(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?m:f)}function m(p){return p===s||p===92?(e.consume(p),f):f(p)}}function Mu(e,t){let n;return r;function r(i){return ze(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):at(i)?gt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var eF={name:"definition",tokenize:nF},tF={partial:!0,tokenize:rF};function nF(e,t,n){const r=this;let i;return a;function a(O){return e.enter("definition"),s(O)}function s(O){return SM.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(O)}function l(O){return i=_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),O===58?(e.enter("definitionMarker"),e.consume(O),e.exit("definitionMarker"),c):n(O)}function c(O){return Lt(O)?Mu(e,d)(O):d(O)}function d(O){return xM(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(O)}function f(O){return e.attempt(tF,m,m)(O)}function m(O){return at(O)?gt(e,p,"whitespace")(O):p(O)}function p(O){return O===null||ze(O)?(e.exit("definition"),r.parser.defined.push(i),t(O)):n(O)}}function rF(e,t,n){return r;function r(l){return Lt(l)?Mu(e,i)(l):n(l)}function i(l){return wM(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return at(l)?gt(e,s,"whitespace")(l):s(l)}function s(l){return l===null||ze(l)?t(l):n(l)}}var iF={name:"hardBreakEscape",tokenize:aF};function aF(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ze(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}var sF={name:"headingAtx",resolve:oF,tokenize:lF};function oF(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Mr(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function lF(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||Lt(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||ze(f)?(e.exit("atxHeading"),t(f)):at(f)?gt(e,l,"whitespace")(f):(e.enter("atxHeadingText"),d(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),l(f))}function d(f){return f===null||f===35||Lt(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),d)}}var cF=["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"],UT=["pre","script","style","textarea"],uF={concrete:!0,name:"htmlFlow",resolveTo:hF,tokenize:mF},dF={partial:!0,tokenize:gF},fF={partial:!0,tokenize:pF};function hF(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 mF(e,t,n){const r=this;let i,a,s,l,c;return d;function d(R){return f(R)}function f(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),a=!0,x):R===63?(e.consume(R),i=3,r.interrupt?t:I):Kn(R)?(e.consume(R),s=String.fromCharCode(R),w):n(R)}function p(R){return R===45?(e.consume(R),i=2,O):R===91?(e.consume(R),i=5,l=0,b):Kn(R)?(e.consume(R),i=4,r.interrupt?t:I):n(R)}function O(R){return R===45?(e.consume(R),r.interrupt?t:I):n(R)}function b(R){const ge="CDATA[";return R===ge.charCodeAt(l++)?(e.consume(R),l===ge.length?r.interrupt?t:X:b):n(R)}function x(R){return Kn(R)?(e.consume(R),s=String.fromCharCode(R),w):n(R)}function w(R){if(R===null||R===47||R===62||Lt(R)){const ge=R===47,_e=s.toLowerCase();return!ge&&!a&&UT.includes(_e)?(i=1,r.interrupt?t(R):X(R)):cF.includes(s.toLowerCase())?(i=6,ge?(e.consume(R),k):r.interrupt?t(R):X(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):a?T(R):j(R))}return R===45||Zn(R)?(e.consume(R),s+=String.fromCharCode(R),w):n(R)}function k(R){return R===62?(e.consume(R),r.interrupt?t:X):n(R)}function T(R){return at(R)?(e.consume(R),T):P(R)}function j(R){return R===47?(e.consume(R),P):R===58||R===95||Kn(R)?(e.consume(R),E):at(R)?(e.consume(R),j):P(R)}function E(R){return R===45||R===46||R===58||R===95||Zn(R)?(e.consume(R),E):Q(R)}function Q(R){return R===61?(e.consume(R),A):at(R)?(e.consume(R),Q):j(R)}function A(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),c=R,M):at(R)?(e.consume(R),A):L(R)}function M(R){return R===c?(e.consume(R),c=null,D):R===null||ze(R)?n(R):(e.consume(R),M)}function L(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Lt(R)?Q(R):(e.consume(R),L)}function D(R){return R===47||R===62||at(R)?j(R):n(R)}function P(R){return R===62?(e.consume(R),B):n(R)}function B(R){return R===null||ze(R)?X(R):at(R)?(e.consume(R),B):n(R)}function X(R){return R===45&&i===2?(e.consume(R),$):R===60&&i===1?(e.consume(R),q):R===62&&i===4?(e.consume(R),G):R===63&&i===3?(e.consume(R),I):R===93&&i===5?(e.consume(R),le):ze(R)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(dF,re,V)(R)):R===null||ze(R)?(e.exit("htmlFlowData"),V(R)):(e.consume(R),X)}function V(R){return e.check(fF,z,re)(R)}function z(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Y}function Y(R){return R===null||ze(R)?V(R):(e.enter("htmlFlowData"),X(R))}function $(R){return R===45?(e.consume(R),I):X(R)}function q(R){return R===47?(e.consume(R),s="",ee):X(R)}function ee(R){if(R===62){const ge=s.toLowerCase();return UT.includes(ge)?(e.consume(R),G):X(R)}return Kn(R)&&s.length<8?(e.consume(R),s+=String.fromCharCode(R),ee):X(R)}function le(R){return R===93?(e.consume(R),I):X(R)}function I(R){return R===62?(e.consume(R),G):R===45&&i===2?(e.consume(R),I):X(R)}function G(R){return R===null||ze(R)?(e.exit("htmlFlowData"),re(R)):(e.consume(R),G)}function re(R){return e.exit("htmlFlow"),t(R)}}function pF(e,t,n){const r=this;return i;function i(s){return ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function gF(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qd,t,n)}}var vF={name:"htmlText",tokenize:OF};function OF(e,t,n){const r=this;let i,a,s;return l;function l(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),d):I===47?(e.consume(I),Q):I===63?(e.consume(I),j):Kn(I)?(e.consume(I),L):n(I)}function d(I){return I===45?(e.consume(I),f):I===91?(e.consume(I),a=0,b):Kn(I)?(e.consume(I),T):n(I)}function f(I){return I===45?(e.consume(I),O):n(I)}function m(I){return I===null?n(I):I===45?(e.consume(I),p):ze(I)?(s=m,q(I)):(e.consume(I),m)}function p(I){return I===45?(e.consume(I),O):m(I)}function O(I){return I===62?$(I):I===45?p(I):m(I)}function b(I){const G="CDATA[";return I===G.charCodeAt(a++)?(e.consume(I),a===G.length?x:b):n(I)}function x(I){return I===null?n(I):I===93?(e.consume(I),w):ze(I)?(s=x,q(I)):(e.consume(I),x)}function w(I){return I===93?(e.consume(I),k):x(I)}function k(I){return I===62?$(I):I===93?(e.consume(I),k):x(I)}function T(I){return I===null||I===62?$(I):ze(I)?(s=T,q(I)):(e.consume(I),T)}function j(I){return I===null?n(I):I===63?(e.consume(I),E):ze(I)?(s=j,q(I)):(e.consume(I),j)}function E(I){return I===62?$(I):j(I)}function Q(I){return Kn(I)?(e.consume(I),A):n(I)}function A(I){return I===45||Zn(I)?(e.consume(I),A):M(I)}function M(I){return ze(I)?(s=M,q(I)):at(I)?(e.consume(I),M):$(I)}function L(I){return I===45||Zn(I)?(e.consume(I),L):I===47||I===62||Lt(I)?D(I):n(I)}function D(I){return I===47?(e.consume(I),$):I===58||I===95||Kn(I)?(e.consume(I),P):ze(I)?(s=D,q(I)):at(I)?(e.consume(I),D):$(I)}function P(I){return I===45||I===46||I===58||I===95||Zn(I)?(e.consume(I),P):B(I)}function B(I){return I===61?(e.consume(I),X):ze(I)?(s=B,q(I)):at(I)?(e.consume(I),B):D(I)}function X(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),i=I,V):ze(I)?(s=X,q(I)):at(I)?(e.consume(I),X):(e.consume(I),z)}function V(I){return I===i?(e.consume(I),i=void 0,Y):I===null?n(I):ze(I)?(s=V,q(I)):(e.consume(I),V)}function z(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||Lt(I)?D(I):(e.consume(I),z)}function Y(I){return I===47||I===62||Lt(I)?D(I):n(I)}function $(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function q(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ee}function ee(I){return at(I)?gt(e,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):le(I)}function le(I){return e.enter("htmlTextData"),s(I)}}var kx={name:"labelEnd",resolveAll:SF,resolveTo:wF,tokenize:_F},bF={tokenize:kF},yF={tokenize:jF},xF={tokenize:TF};function SF(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Mr(e,0,e.length,n),e}function wF(e,t){let n=e.length,r=0,i,a,s,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=Jr(l,e.slice(a+1,a+r+3)),l=Jr(l,[["enter",f,t]]),l=Jr(l,lp(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),l=Jr(l,[["exit",f,t],e[s-2],e[s-1],["exit",d,t]]),l=Jr(l,e.slice(s+1)),l=Jr(l,[["exit",c,t]]),Mr(e,a,e.length,l),e}function _F(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(p){return a?a._inactive?m(p):(s=r.parser.defined.includes(_i(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(bF,f,s?f:m)(p):p===91?e.attempt(yF,f,s?d:m)(p):s?f(p):m(p)}function d(p){return e.attempt(xF,f,m)(p)}function f(p){return t(p)}function m(p){return a._balanced=!0,n(p)}}function kF(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Lt(m)?Mu(e,a)(m):a(m)}function a(m){return m===41?f(m):xM(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return Lt(m)?Mu(e,c)(m):f(m)}function l(m){return n(m)}function c(m){return m===34||m===39||m===40?wM(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):f(m)}function d(m){return Lt(m)?Mu(e,f)(m):f(m)}function f(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function jF(e,t,n){const r=this;return i;function i(l){return SM.call(r,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function TF(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}var CF={name:"labelStartImage",resolveAll:kx.resolveAll,tokenize:EF};function EF(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}var QF={name:"labelStartLink",resolveAll:kx.resolveAll,tokenize:AF};function AF(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var MO={name:"lineEnding",tokenize:PF};function PF(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),gt(e,t,"linePrefix")}}var Gh={name:"thematicBreak",tokenize:NF};function NF(e,t,n){let r=0,i;return a;function a(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,l(d)}function l(d){return d===i?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||ze(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),at(d)?gt(e,l,"whitespace")(d):l(d))}}var ur={continuation:{tokenize:DF},exit:$F,name:"list",tokenize:LF},RF={partial:!0,tokenize:qF},MF={partial:!0,tokenize:zF};function LF(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(O){const b=r.containerState.type||(O===42||O===43||O===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||O===r.containerState.marker:zy(O)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),O===42||O===45?e.check(Gh,n,d)(O):d(O);if(!r.interrupt||O===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(O)}return n(O)}function c(O){return zy(O)&&++s<10?(e.consume(O),c):(!r.interrupt||s<2)&&(r.containerState.marker?O===r.containerState.marker:O===41||O===46)?(e.exit("listItemValue"),d(O)):n(O)}function d(O){return e.enter("listItemMarker"),e.consume(O),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||O,e.check(Qd,r.interrupt?n:f,e.attempt(RF,p,m))}function f(O){return r.containerState.initialBlankLine=!0,a++,p(O)}function m(O){return at(O)?(e.enter("listItemPrefixWhitespace"),e.consume(O),e.exit("listItemPrefixWhitespace"),p):n(O)}function p(O){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(O)}}function DF(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qd,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,gt(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!at(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(MF,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,gt(e,e.attempt(ur,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function zF(e,t,n){const r=this;return gt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function $F(e){e.exit(this.containerState.type)}function qF(e,t,n){const r=this;return gt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!at(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}var YT={name:"setextUnderline",resolveTo:IF,tokenize:XF};function IF(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function XF(e,t,n){const r=this;let i;return a;function a(d){let f=r.events.length,m;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){m=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===i?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),at(d)?gt(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||ze(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}var ZF={tokenize:BF};function BF(e){const t=this,n=e.attempt(Qd,r,e.attempt(this.parser.constructs.flowInitial,i,gt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(FW,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var VF={resolveAll:kM()},UF=_M("string"),YF=_M("text");function _M(e){return{resolveAll:kM(e==="text"?WF:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,l);return s;function s(f){return d(f)?a(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return d(f)?(n.exit("data"),a(f)):(n.consume(f),c)}function d(f){if(f===null)return!0;const m=i[f];let p=-1;if(m)for(;++p<m.length;){const O=m[p];if(!O.previous||O.previous.call(r,r.previous))return!0}return!1}}}function kM(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function WF(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 r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,l=0,c;for(;a--;){const d=i[a];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(d===-2)c=!0,l++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}var jM={};cE(jM,{attentionMarkers:()=>nH,contentInitial:()=>HF,disable:()=>rH,document:()=>FF,flow:()=>KF,flowInitial:()=>GF,insideSpan:()=>tH,string:()=>JF,text:()=>eH});var FF={42:ur,43:ur,45:ur,48:ur,49:ur,50:ur,51:ur,52:ur,53:ur,54:ur,55:ur,56:ur,57:ur,62:vM},HF={91:eF},GF={[-2]:RO,[-1]:RO,32:RO},KF={35:sF,42:Gh,45:[YT,Gh],60:uF,61:YT,95:Gh,96:VT,126:VT},JF={38:bM,92:OM},eH={[-5]:MO,[-4]:MO,[-3]:MO,33:CF,38:bM,42:$y,60:[QW,vF],91:QF,92:[iF,OM],93:kx,95:$y,96:ZW},tH={null:[$y,VF]},nH={null:[42,95]},rH={null:[]};function iH(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],l=[];const c={attempt:M(Q),check:M(A),consume:T,enter:j,exit:E,interrupt:M(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:b,parser:e,previous:null,sliceSerialize:p,sliceStream:O,write:m};let f=t.tokenize.call(d,c);return t.resolveAll&&a.push(t),d;function m(B){return s=Jr(s,B),w(),s[s.length-1]!==null?[]:(L(t,0),d.events=lp(a,d.events,d),d.events)}function p(B,X){return sH(O(B),X)}function O(B){return aH(s,B)}function b(){const{_bufferIndex:B,_index:X,line:V,column:z,offset:Y}=r;return{_bufferIndex:B,_index:X,line:V,column:z,offset:Y}}function x(B){i[B.line]=B.column,P()}function w(){let B;for(;r._index<s.length;){const X=s[r._index];if(typeof X=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<X.length;)k(X.charCodeAt(r._bufferIndex));else k(X)}}function k(B){f=f(B)}function T(B){ze(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,P()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=B}function j(B,X){const V=X||{};return V.type=B,V.start=b(),d.events.push(["enter",V,d]),l.push(V),V}function E(B){const X=l.pop();return X.end=b(),d.events.push(["exit",X,d]),X}function Q(B,X){L(B,X.from)}function A(B,X){X.restore()}function M(B,X){return V;function V(z,Y,$){let q,ee,le,I;return Array.isArray(z)?re(z):"tokenize"in z?re([z]):G(z);function G(ve){return Xe;function Xe(Ne){const Ze=Ne!==null&&ve[Ne],be=Ne!==null&&ve.null,Fe=[...Array.isArray(Ze)?Ze:Ze?[Ze]:[],...Array.isArray(be)?be:be?[be]:[]];return re(Fe)(Ne)}}function re(ve){return q=ve,ee=0,ve.length===0?$:R(ve[ee])}function R(ve){return Xe;function Xe(Ne){return I=D(),le=ve,ve.partial||(d.currentConstruct=ve),ve.name&&d.parser.constructs.disable.null.includes(ve.name)?_e():ve.tokenize.call(X?Object.assign(Object.create(d),X):d,c,ge,_e)(Ne)}}function ge(ve){return B(le,I),Y}function _e(ve){return I.restore(),++ee<q.length?R(q[ee]):$}}}function L(B,X){B.resolveAll&&!a.includes(B)&&a.push(B),B.resolve&&Mr(d.events,X,d.events.length-X,B.resolve(d.events.slice(X),d)),B.resolveTo&&(d.events=B.resolveTo(d.events,d))}function D(){const B=b(),X=d.previous,V=d.currentConstruct,z=d.events.length,Y=Array.from(l);return{from:z,restore:$};function $(){r=B,d.previous=X,d.currentConstruct=V,d.events.length=z,l=Y,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function aH(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function sH(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
137
+ `;break}case-3:{s=`\r
138
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function oH(e){const r={constructs:pM([jM,...(e||{}).extensions||[]]),content:i(wW),defined:[],document:i(kW),flow:i(ZF),lazy:{},string:i(UF),text:i(YF)};return r;function i(a){return s;function s(l){return iH(r,a,l)}}}function lH(e){for(;!yM(e););return e}var WT=/[\0\t\n\r]/g;function cH(){let e=1,t="",n=!0,r;return i;function i(a,s,l){const c=[];let d,f,m,p,O;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(WT.lastIndex=m,d=WT.exec(a),p=d&&d.index!==void 0?d.index:a.length,O=a.charCodeAt(p),!d){t=a.slice(m);break}if(O===10&&m===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<p&&(c.push(a.slice(m,p)),e+=p-m),O){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}var uH=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dH(e){return e.replace(uH,fH)}function fH(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return gM(n.slice(a?2:1),a?16:10)}return _x(n)||e}var TM={}.hasOwnProperty;function hH(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),mH(n)(lH(oH(n).document().write(cH()(e,t,!0))))}function mH(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(lt),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(vt),blockQuote:a(be),characterEscape:D,characterReference:D,codeFenced:a(Fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Fe,s),codeText:a(Se,s),codeTextData:D,data:D,codeFlowValue:D,definition:a(Ve),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(ot),hardBreakEscape:a(et),hardBreakTrailing:a(et),htmlFlow:a(yn,s),htmlFlowData:D,htmlText:a(yn,s),htmlTextData:D,image:a(Te),label:s,link:a(lt),listItem:a(Ot),listItemValue:p,listOrdered:a(me,m),listUnordered:a(me),paragraph:a(Dt),reference:R,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(vt),strong:a(Wt),thematicBreak:a(Un)},exit:{atxHeading:c(),atxHeadingSequence:Q,autolink:c(),autolinkEmail:Ze,autolinkProtocol:Ne,blockQuote:c(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:ve,characterReference:Xe,codeFenced:c(w),codeFencedFence:x,codeFencedFenceInfo:O,codeFencedFenceMeta:b,codeFlowValue:P,codeIndented:c(k),codeText:c(Y),codeTextData:P,data:P,definition:c(),definitionDestinationString:E,definitionLabelString:T,definitionTitleString:j,emphasis:c(),hardBreakEscape:c(X),hardBreakTrailing:c(X),htmlFlow:c(V),htmlFlowData:P,htmlText:c(z),htmlTextData:P,image:c(q),label:le,labelText:ee,lineEnding:B,link:c($),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ge,resourceDestinationString:I,resourceTitleString:G,resource:re,setextHeading:c(L),setextHeadingLineSequence:M,setextHeadingText:A,strong:c(),thematicBreak:c()}};CM(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let de={type:"root",children:[]};const Qe={stack:[de],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:f,data:n},Be=[];let nt=-1;for(;++nt<ie.length;)if(ie[nt][1].type==="listOrdered"||ie[nt][1].type==="listUnordered")if(ie[nt][0]==="enter")Be.push(nt);else{const zt=Be.pop();nt=i(ie,zt,nt)}for(nt=-1;++nt<ie.length;){const zt=t[ie[nt][0]];TM.call(zt,ie[nt][1].type)&&zt[ie[nt][1].type].call(Object.assign({sliceSerialize:ie[nt][2].sliceSerialize},Qe),ie[nt][1])}if(Qe.tokenStack.length>0){const zt=Qe.tokenStack[Qe.tokenStack.length-1];(zt[1]||FT).call(Qe,void 0,zt[0])}for(de.position={start:hs(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:hs(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)de=t.transforms[nt](de)||de;return de}function i(ie,de,Qe){let Be=de-1,nt=-1,zt=!1,zn,sn,Zt,Jt;for(;++Be<=Qe;){const mt=ie[Be];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?nt++:nt--,Jt=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(zn&&!Jt&&!nt&&!Zt&&(Zt=Be),Jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Jt=void 0}if(!nt&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||nt===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(zn){let nr=Be;for(sn=void 0;nr--;){const kn=ie[nr];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;sn&&(ie[sn][1].type="lineEndingBlank",zt=!0),kn[1].type="lineEnding",sn=nr}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}Zt&&(!sn||Zt<sn)&&(zn._spread=!0),zn.end=Object.assign({},sn?ie[sn][1].start:mt[1].end),ie.splice(sn||Be,0,["exit",zn,mt[2]]),Be++,Qe++}if(mt[1].type==="listItemPrefix"){const nr={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};zn=nr,ie.splice(Be,0,["enter",nr,mt[2]]),Be++,Qe++,Zt=void 0,Jt=!0}}}return ie[de][1]._spread=zt,Qe}function a(ie,de){return Qe;function Qe(Be){l.call(this,ie(Be),Be),de&&de.call(this,Be)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(ie,de,Qe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([de,Qe||void 0]),ie.position={start:hs(de.start),end:void 0}}function c(ie){return de;function de(Qe){ie&&ie.call(this,Qe),d.call(this,Qe)}}function d(ie,de){const Qe=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==ie.type&&(de?de.call(this,ie,Be[0]):(Be[1]||FT).call(this,ie,Be[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ru({start:ie.start,end:ie.end})+"): it’s not open");Qe.position.end=hs(ie.end)}function f(){return wx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function p(ie){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function O(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.lang=ie}function b(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.meta=ie}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie.replace(/(\r?\n|\r)$/g,"")}function T(ie){const de=this.resume(),Qe=this.stack[this.stack.length-1];Qe.label=de,Qe.identifier=_i(this.sliceSerialize(ie)).toLowerCase()}function j(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.title=ie}function E(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.url=ie}function Q(ie){const de=this.stack[this.stack.length-1];if(!de.depth){const Qe=this.sliceSerialize(ie).length;de.depth=Qe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function M(ie){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function D(ie){const Qe=this.stack[this.stack.length-1].children;let Be=Qe[Qe.length-1];(!Be||Be.type!=="text")&&(Be=tt(),Be.position={start:hs(ie.start),end:void 0},Qe.push(Be)),this.stack.push(Be)}function P(ie){const de=this.stack.pop();de.value+=this.sliceSerialize(ie),de.position.end=hs(ie.end)}function B(ie){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Qe=de.children[de.children.length-1];Qe.position.end=hs(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(D.call(this,ie),P.call(this,ie))}function X(){this.data.atHardBreak=!0}function V(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function z(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function Y(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function $(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=de,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function q(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=de,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ee(ie){const de=this.sliceSerialize(ie),Qe=this.stack[this.stack.length-2];Qe.label=dH(de),Qe.identifier=_i(de).toLowerCase()}function le(){const ie=this.stack[this.stack.length-1],de=this.resume(),Qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Qe.type==="link"){const Be=ie.children;Qe.children=Be}else Qe.alt=de}function I(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.url=ie}function G(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.title=ie}function re(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function ge(ie){const de=this.resume(),Qe=this.stack[this.stack.length-1];Qe.label=de,Qe.identifier=_i(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function _e(ie){this.data.characterReferenceType=ie.type}function ve(ie){const de=this.sliceSerialize(ie),Qe=this.data.characterReferenceType;let Be;Qe?(Be=gM(de,Qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=_x(de);const nt=this.stack[this.stack.length-1];nt.value+=Be}function Xe(ie){const de=this.stack.pop();de.position.end=hs(ie.end)}function Ne(ie){P.call(this,ie);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ie)}function Ze(ie){P.call(this,ie);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ie)}function be(){return{type:"blockquote",children:[]}}function Fe(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function Ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ot(){return{type:"emphasis",children:[]}}function vt(){return{type:"heading",depth:0,children:[]}}function et(){return{type:"break"}}function yn(){return{type:"html",value:""}}function Te(){return{type:"image",title:null,url:"",alt:null}}function lt(){return{type:"link",title:null,url:"",children:[]}}function me(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function Ot(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Dt(){return{type:"paragraph",children:[]}}function Wt(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function Un(){return{type:"thematicBreak"}}}function hs(e){return{line:e.line,column:e.column,offset:e.offset}}function CM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?CM(e,r):pH(e,r)}}function pH(e,t){let n;for(n in t)if(TM.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function FT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ru({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ru({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ru({start:t.start,end:t.end})+") is still open")}function gH(e){const t=this;t.parser=n;function n(r){return hH(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vH(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 OH(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
139
+ `}]}function bH(e,t){const n=t.value?t.value+`
140
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function yH(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xH(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SH(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=oc(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function wH(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 _H(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function EM(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function kH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return EM(e,t);const i={src:oc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function jH(e,t){const n={src:oc(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 r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function TH(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function CH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return EM(e,t);const i={href:oc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function EH(e,t){const n={href:oc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QH(e,t,n){const r=e.all(t),i=n?AH(n):QM(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let m;f&&f.type==="element"&&f.tagName==="p"?m=f:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
141
+ `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
142
+ `});const d={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,d),e.applyData(t,d)}function AH(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=QM(n[r])}return t}function QM(e){const t=e.spread;return t??e.children.length>1}function PH(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function NH(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RH(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function MH(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LH(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=bx(t.children[1]),c=lM(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function DH(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const d=[];for(;++c<l;){const m=t.children[c],p={},O=s?s[c]:void 0;O&&(p.align=O);let b={type:"element",tagName:a,properties:p,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),d.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,f),e.applyData(t,f)}function zH(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var HT=9,GT=32;function $H(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(KT(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(KT(t.slice(i),i>0,!1)),a.join("")}function KT(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===HT||a===GT;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===HT||a===GT;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function qH(e,t){const n={type:"text",value:$H(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IH(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var XH={blockquote:vH,break:OH,code:bH,delete:yH,emphasis:xH,footnoteReference:SH,heading:wH,html:_H,imageReference:kH,image:jH,inlineCode:TH,linkReference:CH,link:EH,listItem:QH,list:PH,paragraph:NH,root:RH,strong:MH,table:LH,tableCell:zH,tableRow:DH,text:qH,thematicBreak:IH,toml:kh,yaml:kh,definition:kh,footnoteDefinition:kh};function kh(){}var AM=-1,cp=0,Lu=1,km=2,jx=3,Tx=4,Cx=5,Ex=6,PM=7,NM=8,JT=typeof self=="object"?self:globalThis,ZH=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case cp:case AM:return n(s,i);case Lu:{const l=n([],i);for(const c of s)l.push(r(c));return l}case km:{const l=n({},i);for(const[c,d]of s)l[r(c)]=r(d);return l}case jx:return n(new Date(s),i);case Tx:{const{source:l,flags:c}=s;return n(new RegExp(l,c),i)}case Cx:{const l=n(new Map,i);for(const[c,d]of s)l.set(r(c),r(d));return l}case Ex:{const l=n(new Set,i);for(const c of s)l.add(r(c));return l}case PM:{const{name:l,message:c}=s;return n(new JT[l](c),i)}case NM:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new JT[a](s),i)};return r},eC=e=>ZH(new Map,e)(0),vl="",{toString:BH}={},{keys:VH}=Object,uu=e=>{const t=typeof e;if(t!=="object"||!e)return[cp,t];const n=BH.call(e).slice(8,-1);switch(n){case"Array":return[Lu,vl];case"Object":return[km,vl];case"Date":return[jx,vl];case"RegExp":return[Tx,vl];case"Map":return[Cx,vl];case"Set":return[Ex,vl];case"DataView":return[Lu,n]}return n.includes("Array")?[Lu,n]:n.includes("Error")?[PM,n]:[km,n]},jh=([e,t])=>e===cp&&(t==="function"||t==="symbol"),UH=(e,t,n,r)=>{const i=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},a=s=>{if(n.has(s))return n.get(s);let[l,c]=uu(s);switch(l){case cp:{let f=s;switch(c){case"bigint":l=NM,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([AM],s)}return i([l,f],s)}case Lu:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),i([c,[...p]],s)}const f=[],m=i([l,f],s);for(const p of s)f.push(a(p));return m}case km:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],m=i([l,f],s);for(const p of VH(s))(e||!jh(uu(s[p])))&&f.push([a(p),a(s[p])]);return m}case jx:return i([l,s.toISOString()],s);case Tx:{const{source:f,flags:m}=s;return i([l,{source:f,flags:m}],s)}case Cx:{const f=[],m=i([l,f],s);for(const[p,O]of s)(e||!(jh(uu(p))||jh(uu(O))))&&f.push([a(p),a(O)]);return m}case Ex:{const f=[],m=i([l,f],s);for(const p of s)(e||!jh(uu(p)))&&f.push(a(p));return m}}const{message:d}=s;return i([l,{name:c,message:d}],s)};return a},tC=(e,{json:t,lossy:n}={})=>{const r=[];return UH(!(t||n),!!t,new Map,r)(e),r},jm=typeof structuredClone=="function"?((e,t)=>t&&("json"in t||"lossy"in t)?eC(tC(e,t)):structuredClone(e)):(e,t)=>eC(tC(e,t));function YH(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 WH(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function FH(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||YH,r=e.options.footnoteBackLabel||WH,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const f=e.all(d),m=String(d.identifier).toUpperCase(),p=oc(m.toLowerCase());let O=0;const b=[],x=e.footnoteCounts.get(m);for(;x!==void 0&&++O<=x;){b.length>0&&b.push({type:"text",value:" "});let T=typeof n=="string"?n:n(c,O);typeof T=="string"&&(T={type:"text",value:T}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(O>1?"-"+O:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,O),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const T=w.children[w.children.length-1];T&&T.type==="text"?T.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else f.push(...b);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(d,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...jm(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
143
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
144
+ `}]}}var up=(function(e){if(e==null)return JH;if(typeof e=="function")return dp(e);if(typeof e=="object")return Array.isArray(e)?HH(e):GH(e);if(typeof e=="string")return KH(e);throw new Error("Expected function, string, or object as test")});function HH(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=up(e[n]);return dp(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function GH(e){const t=e;return dp(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function KH(e){return dp(t);function t(n){return n&&n.type===e}}function dp(e){return t;function t(n,r,i){return!!(e4(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function JH(){return!0}function e4(e){return e!==null&&typeof e=="object"&&"type"in e}function t4(e){return"\x1B[33m"+e+"\x1B[39m"}var RM=[],n4=!0,qy=!1,r4="skip";function MM(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=up(i),s=r?-1:1;l(e,void 0,[])();function l(c,d,f){const m=c&&typeof c=="object"?c:{};if(typeof m.type=="string"){const O=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(p,"name",{value:"node ("+t4(c.type+(O?"<"+O+">":""))+")"})}return p;function p(){let O=RM,b,x,w;if((!t||a(c,d,f[f.length-1]||void 0))&&(O=i4(n(c,f)),O[0]===qy))return O;if("children"in c&&c.children){const k=c;if(k.children&&O[0]!==r4)for(x=(r?k.children.length:-1)+s,w=f.concat(k);x>-1&&x<k.children.length;){const T=k.children[x];if(b=l(T,x,w)(),b[0]===qy)return b;x=typeof b[1]=="number"?b[1]:x+s}}return O}}}function i4(e){return Array.isArray(e)?e:typeof e=="number"?[n4,e]:e==null?RM:[e]}function Qx(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),MM(e,a,l,i);function l(c,d){const f=d[d.length-1],m=f?f.children.indexOf(c):void 0;return s(c,m,f)}}var Iy={}.hasOwnProperty,a4={};function s4(e,t){const n=t||a4,r=new Map,i=new Map,a=new Map,s={...XH,...n.handlers},l={all:d,applyData:l4,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:c,options:n,patch:o4,wrap:u4};return Qx(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const m=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();m.has(p)||m.set(p,f)}}),l;function c(f,m){const p=f.type,O=l.handlers[p];if(Iy.call(l.handlers,p)&&O)return O(l,f,m);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in f){const{children:x,...w}=f,k=jm(w);return k.children=l.all(f),k}return jm(f)}return(l.options.unknownHandler||c4)(l,f,m)}function d(f){const m=[];if("children"in f){const p=f.children;let O=-1;for(;++O<p.length;){const b=l.one(p[O],f);if(b){if(O&&p[O-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=nC(b.value)),!Array.isArray(b)&&b.type==="element")){const x=b.children[0];x&&x.type==="text"&&(x.value=nC(x.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function o4(e,t){e.position&&(t.position=WY(e))}function l4(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,jm(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function c4(e,t){const n=t.data||{},r="value"in t&&!(Iy.call(n,"hProperties")||Iy.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function u4(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
145
+ `});++r<e.length;)r&&n.push({type:"text",value:`
146
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
147
+ `}),n}function nC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function rC(e,t){const n=s4(e,t),r=n.one(e,void 0),i=FH(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
148
+ `},i),a}function d4(e,t){return e&&"run"in e?async function(n,r){const i=rC(n,{file:r,...t});await e.run(i,r)}:function(n,r){return rC(n,{file:r,...e||t})}}function iC(e){if(e)throw e}var LO=Rm(h2(),1);function Xy(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 f4(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(c,...d){const f=e[++a];let m=-1;if(c){s(c);return}for(;++m<i.length;)(d[m]===null||d[m]===void 0)&&(d[m]=i[m]);i=d,f?h4(f,l)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function h4(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(i);try{c=e.apply(this,s)}catch(d){const f=d;if(l&&n)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(s,...l){n||(n=!0,t(s,...l))}function a(s){i(null,s)}}function aC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var DO=["history","path","basename","stem","extname","dirname"],LM=class{constructor(e){let t;e?aC(e)?t={path:e}:typeof e=="string"||m4(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":o2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<DO.length;){const i=DO[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)DO.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?Ii.basename(this.path):void 0}set basename(e){$O(e,"basename"),zO(e,"basename"),this.path=Ii.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ii.dirname(this.path):void 0}set dirname(e){sC(this.basename,"dirname"),this.path=Ii.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ii.extname(this.path):void 0}set extname(e){if(zO(e,"extname"),sC(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ii.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){aC(e)&&(e=l2(e)),$O(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ii.basename(this.path,this.extname):void 0}set stem(e){$O(e,"stem"),zO(e,"stem"),this.path=Ii.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Vn(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function zO(e,t){if(e&&e.includes(Ii.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ii.sep+"`")}function $O(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function m4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var p4=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),g4={}.hasOwnProperty,v4=class DM extends p4{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=f4()}copy(){const t=new DM;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,LO.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(XO("data",this.frozen),this.namespace[t]=n,this):g4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(XO("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,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Th(t),r=this.parser||this.Parser;return qO("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),qO("process",this.parser||this.Parser),IO("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const l=Th(t),c=r.parse(l);r.run(c,l,function(f,m,p){if(f||!m||!p)return d(f);const O=m,b=r.stringify(O,p);y4(b)?p.value=b:p.result=b,d(f,p)});function d(f,m){f||!m?s(f):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),qO("processSync",this.parser||this.Parser),IO("processSync",this.compiler||this.Compiler),this.process(t,i),lC("processSync","process",n),r;function i(a,s){n=!0,iC(a),r=s}}run(t,n,r){oC(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,l){const c=Th(n);i.run(t,c,d);function d(f,m,p){const O=m||t;f?l(f):s?s(O):r(void 0,O,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),lC("runSync","run",r),i;function a(s,l){iC(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Th(n),i=this.compiler||this.Compiler;return IO("stringify",i),oC(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(XO("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[f,...m]=d;c(f,m)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))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");l(d.plugins),d.settings&&(i.settings=(0,LO.default)(!0,i.settings,d.settings))}function l(d){let f=-1;if(d!=null)if(Array.isArray(d))for(;++f<d.length;){const m=d[f];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,f){let m=-1,p=-1;for(;++m<r.length;)if(r[m][0]===d){p=m;break}if(p===-1)r.push([d,...f]);else if(f.length>0){let[O,...b]=f;const x=r[p][1];Xy(x)&&Xy(O)&&(O=(0,LO.default)(!0,x,O)),r[p]=[d,O,...b]}}}},O4=new v4().freeze();function qO(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function IO(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function XO(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 oC(e){if(!Xy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function lC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Th(e){return b4(e)?e:new LM(e)}function b4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y4(e){return typeof e=="string"||x4(e)}function x4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var S4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cC=[],uC={allowDangerousHtml:!0},w4=/^(https?|ircs?|mailto|xmpp)$/i,_4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function k4(e){const t=j4(e),n=T4(e);return C4(t.runSync(t.parse(n),n),e)}function j4(e){const t=e.rehypePlugins||cC,n=e.remarkPlugins||cC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uC}:uC;return O4().use(gH).use(n).use(d4,r).use(t)}function T4(e){const t=e.children||"",n=new LM;return typeof t=="string"&&(n.value=t),n}function C4(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||E4;for(const f of _4)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+S4+f.id,void 0);return Qx(e,d),JY(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(f,m,p){if(f.type==="raw"&&p&&typeof m=="number")return s?p.children.splice(m,1):p.children[m]={type:"text",value:f.value},m;if(f.type==="element"){let O;for(O in NO)if(Object.hasOwn(NO,O)&&Object.hasOwn(f.properties,O)){const b=f.properties[O],x=NO[O];(x===null||x.includes(f.tagName))&&(f.properties[O]=c(String(b||""),O,f))}}if(f.type==="element"){let O=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!O&&r&&typeof m=="number"&&(O=!r(f,m,p)),O&&p&&typeof m=="number")return l&&f.children?p.children.splice(m,1,...f.children):p.children.splice(m,1),m}}}function E4(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||w4.test(e.slice(0,t))?e:""}function dC(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Q4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function A4(e,t,n){const i=up((n||{}).ignore||[]),a=P4(t);let s=-1;for(;++s<a.length;)MM(e,"text",l);function l(d,f){let m=-1,p;for(;++m<f.length;){const O=f[m],b=p?p.children:void 0;if(i(O,b?b.indexOf(O):void 0,p))return;p=O}if(p)return c(d,f)}function c(d,f){const m=f[f.length-1],p=a[s][0],O=a[s][1];let b=0;const w=m.children.indexOf(d);let k=!1,T=[];p.lastIndex=0;let j=p.exec(d.value);for(;j;){const E=j.index,Q={index:j.index,input:j.input,stack:[...f,d]};let A=O(...j,Q);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=E+1:(b!==E&&T.push({type:"text",value:d.value.slice(b,E)}),Array.isArray(A)?T.push(...A):A&&T.push(A),b=E+j[0].length,k=!0),!p.global)break;j=p.exec(d.value)}return k?(b<d.value.length&&T.push({type:"text",value:d.value.slice(b)}),m.children.splice(w,1,...T)):T=[d],w+T.length}}function P4(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 r=-1;for(;++r<n.length;){const i=n[r];t.push([N4(i[0]),R4(i[1])])}return t}function N4(e){return typeof e=="string"?new RegExp(Q4(e),"g"):e}function R4(e){return typeof e=="function"?e:function(){return e}}var ZO="phrasing",BO=["autolink","link","image","label"];function M4(){return{transforms:[X4],enter:{literalAutolink:D4,literalAutolinkEmail:VO,literalAutolinkHttp:VO,literalAutolinkWww:VO},exit:{literalAutolink:I4,literalAutolinkEmail:q4,literalAutolinkHttp:z4,literalAutolinkWww:$4}}}function L4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ZO,notInConstruct:BO},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ZO,notInConstruct:BO},{character:":",before:"[ps]",after:"\\/",inConstruct:ZO,notInConstruct:BO}]}}function D4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function VO(e){this.config.enter.autolinkProtocol.call(this,e)}function z4(e){this.config.exit.autolinkProtocol.call(this,e)}function $4(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 q4(e){this.config.exit.autolinkEmail.call(this,e)}function I4(e){this.exit(e)}function X4(e){A4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Z4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),B4]],{ignore:["link","linkReference"]})}function Z4(e,t,n,r,i){let a="";if(!zM(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!V4(n)))return!1;const s=U4(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function B4(e,t,n,r){return!zM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function V4(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 U4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=dC(e,"(");let a=dC(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function zM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||jo(n)||op(n))&&(!t||n!==47)}$M.peek=tG;function Y4(){this.buffer()}function W4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function F4(){this.buffer()}function H4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function G4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K4(e){this.exit(e)}function J4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eG(e){this.exit(e)}function tG(){return"["}function $M(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),s(),a+=i.move("]"),a}function nG(){return{enter:{gfmFootnoteCallString:Y4,gfmFootnoteCall:W4,gfmFootnoteDefinitionLabelString:F4,gfmFootnoteDefinition:H4},exit:{gfmFootnoteCallString:G4,gfmFootnoteCall:K4,gfmFootnoteDefinitionLabelString:J4,gfmFootnoteDefinition:eG}}}function rG(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$M},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const l=a.createTracker(s);let c=l.move("[^");const d=a.enter("footnoteDefinition"),f=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),f(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
149
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?qM:iG))),d(),c}}function iG(e,t,n){return t===0?e:qM(e,t,n)}function qM(e,t,n){return(n?"":" ")+e}var aG=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];IM.peek=uG;function sG(){return{canContainEols:["delete"],enter:{strikethrough:lG},exit:{strikethrough:cG}}}function oG(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aG}],handlers:{delete:IM}}}function lG(e){this.enter({type:"delete",children:[]},e)}function cG(e){this.exit(e)}function IM(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function uG(){return"~"}function dG(e){return e.length}function fG(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||dG,a=[],s=[],l=[],c=[];let d=0,f=-1;for(;++f<e.length;){const x=[],w=[];let k=-1;for(e[f].length>d&&(d=e[f].length);++k<e[f].length;){const T=hG(e[f][k]);if(n.alignDelimiters!==!1){const j=i(T);w[k]=j,(c[k]===void 0||j>c[k])&&(c[k]=j)}x.push(T)}s[f]=x,l[f]=w}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<d;)a[m]=fC(r[m]);else{const x=fC(r);for(;++m<d;)a[m]=x}m=-1;const p=[],O=[];for(;++m<d;){const x=a[m];let w="",k="";x===99?(w=":",k=":"):x===108?w=":":x===114&&(k=":");let T=n.alignDelimiters===!1?1:Math.max(1,c[m]-w.length-k.length);const j=w+"-".repeat(T)+k;n.alignDelimiters!==!1&&(T=w.length+T+k.length,T>c[m]&&(c[m]=T),O[m]=T),p[m]=j}s.splice(1,0,p),l.splice(1,0,O),f=-1;const b=[];for(;++f<s.length;){const x=s[f],w=l[f];m=-1;const k=[];for(;++m<d;){const T=x[m]||"";let j="",E="";if(n.alignDelimiters!==!1){const Q=c[m]-(w[m]||0),A=a[m];A===114?j=" ".repeat(Q):A===99?Q%2?(j=" ".repeat(Q/2+.5),E=" ".repeat(Q/2-.5)):(j=" ".repeat(Q/2),E=j):E=" ".repeat(Q)}n.delimiterStart!==!1&&!m&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||m)&&k.push(" "),n.alignDelimiters!==!1&&k.push(j),k.push(T),n.alignDelimiters!==!1&&k.push(E),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||m!==d-1)&&k.push("|")}b.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return b.join(`
150
+ `)}function hG(e){return e==null?"":String(e)}function fC(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 mG(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),pG);return i(),s}function pG(e,t,n){return">"+(n?"":" ")+e}function gG(e,t){return hC(e,t.inConstruct,!0)&&!hC(e,t.notInConstruct,!1)}function hC(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function mC(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
151
+ `&&gG(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
152
+ `}function vG(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function OG(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 bG(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 yG(e,t,n,r){const i=bG(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(OG(e,n)){const m=n.enter("codeIndented"),p=n.indentLines(a,xG);return m(),p}const l=n.createTracker(r),c=i.repeat(Math.max(vG(a,i)+1,3)),d=n.enter("codeFenced");let f=l.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);f+=l.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(n.safe(e.meta,{before:f,after:`
153
+ `,encode:["`"],...l.current()})),m()}return f+=l.move(`
154
+ `),a&&(f+=l.move(a+`
155
+ `)),f+=l.move(c),d(),f}function xG(e,t,n){return(n?"":" ")+e}function Ax(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 SG(e,t,n,r){const i=Ax(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
156
+ `,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),l()),s(),d}function wG(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 ud(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tm(e,t,n){const r=Fl(e),i=Fl(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}XM.peek=_G;function XM(e,t,n,r){const i=wG(n),a=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const d=c.charCodeAt(0),f=Tm(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=ud(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=Tm(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+ud(m));const O=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+c+O}function _G(e,t,n){return n.options.emphasis||"*"}function kG(e,t){let n=!1;return Qx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,qy}),!!((!e.depth||e.depth<3)&&wx(e)&&(t.options.setext||n))}function jG(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(kG(e,n)){const f=n.enter("headingSetext"),m=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
157
+ `,after:`
158
+ `});return m(),f(),p+`
159
+ `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
160
+ `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
161
+ `,...a.current()});return/^[\t ]/.test(d)&&(d=ud(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),c(),l(),d}ZM.peek=TG;function ZM(e){return e.value||""}function TG(){return"<"}BM.peek=CG;function BM(e,t,n,r){const i=Ax(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),l()),d+=c.move(")"),s(),d}function CG(){return"!"}VM.peek=EG;function VM(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const d=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=l.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function EG(){return"!"}UM.peek=QG;function UM(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return i+r+i}function QG(){return"`"}function YM(e,t){const n=wx(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))}WM.peek=AG;function WM(e,t,n,r){const i=Ax(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,c;if(YM(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),l(),n.stack=f,m}l=n.enter("link"),c=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(c=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=s.move(" "+i),d+=s.move(n.safe(e.title,{before:d,after:i,...s.current()})),d+=s.move(i),c()),d+=s.move(")"),l(),d}function AG(e,t,n){return YM(e,n)?"<":"["}FM.peek=PG;function FM(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=l.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function PG(){return"["}function Px(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 NG(e){const t=Px(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 RG(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 HM(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 MG(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?RG(n):Px(n);const l=e.ordered?s==="."?")":".":NG(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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&&(c=!0),HM(n)===s&&f){let m=-1;for(;++m<e.children.length;){const p=e.children[m];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),d}function LG(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 DG(e,t,n,r){const i=LG(n);let a=n.bulletCurrent||Px(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(s-a.length)),l.shift(s);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,l.current()),f);return c(),d;function f(m,p,O){return p?(O?"":" ".repeat(s))+m:(O?a:a+" ".repeat(s-a.length))+m}}function zG(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}var $G=up(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qG(e,t,n,r){return(e.children.some(function(s){return $G(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function IG(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}GM.peek=XG;function GM(e,t,n,r){const i=IG(n),a=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const d=c.charCodeAt(0),f=Tm(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=ud(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=Tm(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+ud(m));const O=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+c+O}function XG(e,t,n){return n.options.strong||"*"}function ZG(e,t,n,r){return n.safe(e.value,r)}function BG(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 VG(e,t,n){const r=(HM(n)+(n.options.ruleSpaces?" ":"")).repeat(BG(n));return n.options.ruleSpaces?r.slice(0,-1):r}var KM={blockquote:mG,break:mC,code:yG,definition:SG,emphasis:XM,hardBreak:mC,heading:jG,html:ZM,image:BM,imageReference:VM,inlineCode:UM,link:WM,linkReference:FM,list:MG,listItem:DG,paragraph:zG,root:qG,strong:GM,text:ZG,thematicBreak:VG};function UG(){return{enter:{table:YG,tableData:pC,tableHeader:pC,tableRow:FG},exit:{codeText:HG,table:WG,tableData:UO,tableHeader:UO,tableRow:UO}}}function YG(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 WG(e){this.exit(e),this.data.inTable=void 0}function FG(e){this.enter({type:"tableRow",children:[]},e)}function UO(e){this.exit(e)}function pC(e){this.enter({type:"tableCell",children:[]},e)}function HG(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,GG));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function GG(e,t){return t==="|"?t:e}function KG(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
162
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:l}};function s(O,b,x,w){return d(f(O,x,w),O.align)}function l(O,b,x,w){const k=m(O,x,w),T=d([k]);return T.slice(0,T.indexOf(`
163
+ `))}function c(O,b,x,w){const k=x.enter("tableCell"),T=x.enter("phrasing"),j=x.containerPhrasing(O,{...w,before:a,after:a});return T(),k(),j}function d(O,b){return fG(O,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(O,b,x){const w=O.children;let k=-1;const T=[],j=b.enter("table");for(;++k<w.length;)T[k]=m(w[k],b,x);return j(),T}function m(O,b,x){const w=O.children;let k=-1;const T=[],j=b.enter("tableRow");for(;++k<w.length;)T[k]=c(w[k],O,b,x);return j(),T}function p(O,b,x){let w=KM.inlineCode(O,b,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function JG(){return{exit:{taskListCheckValueChecked:gC,taskListCheckValueUnchecked:gC,paragraph:tK}}}function eK(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nK}}}function gC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tK(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 r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function nK(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(s);let c=KM.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(f){return f+s}}function rK(){return[M4(),nG(),sG(),UG(),JG()]}function iK(e){return{extensions:[L4(),rG(e),oG(),KG(e),eK()]}}var aK={tokenize:dK,partial:!0},JM={tokenize:fK,partial:!0},e5={tokenize:hK,partial:!0},t5={tokenize:mK,partial:!0},sK={tokenize:pK,partial:!0},n5={name:"wwwAutolink",tokenize:cK,previous:i5},r5={name:"protocolAutolink",tokenize:uK,previous:a5},Da={name:"emailAutolink",tokenize:lK,previous:s5},ta={};function oK(){return{text:ta}}var lo=48;for(;lo<123;)ta[lo]=Da,lo++,lo===58?lo=65:lo===91&&(lo=97);ta[43]=Da;ta[45]=Da;ta[46]=Da;ta[95]=Da;ta[72]=[Da,r5];ta[104]=[Da,r5];ta[87]=[Da,n5];ta[119]=[Da,n5];function lK(e,t,n){const r=this;let i,a;return s;function s(m){return!Zy(m)||!s5.call(r,r.previous)||Nx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Zy(m)?(e.consume(m),l):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(sK,f,d)(m):m===45||m===95||Zn(m)?(a=!0,e.consume(m),c):f(m)}function d(m){return e.consume(m),i=!0,c}function f(m){return a&&i&&Kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function cK(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!i5.call(r,r.previous)||Nx(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aK,e.attempt(JM,e.attempt(e5,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function uK(e,t,n){const r=this;let i="",a=!1;return s;function s(m){return(m===72||m===104)&&a5.call(r,r.previous)&&!Nx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Kn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),a?d:(a=!0,c)):n(m)}function d(m){return m===null||_m(m)||Lt(m)||jo(m)||op(m)?n(m):e.attempt(JM,e.attempt(e5,f),n)(m)}function f(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function dK(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function fK(e,t,n){let r,i,a;return s;function s(d){return d===46||d===95?e.check(t5,c,l)(d):d===null||Lt(d)||jo(d)||d!==45&&op(d)?c(d):(a=!0,e.consume(d),s)}function l(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),s}function c(d){return i||r||!a?n(d):t(d)}}function hK(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(t5,t,a)(s):s===null||Lt(s)||jo(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function mK(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||Lt(l)||jo(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Lt(l)||jo(l)?t(l):r(l)}function a(l){return Kn(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):Kn(l)?(e.consume(l),s):n(l)}}function pK(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Zn(a)?n(a):t(a)}}function i5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Lt(e)}function a5(e){return!Kn(e)}function s5(e){return!(e===47||Zy(e))}function Zy(e){return e===43||e===45||e===46||e===95||Zn(e)}function Nx(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var gK={tokenize:_K,partial:!0};function vK(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xK,continuation:{tokenize:SK},exit:wK}},text:{91:{name:"gfmFootnoteCall",tokenize:yK},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:OK,resolveTo:bK}}}}function OK(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const d=_i(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function bK(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 r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function yK(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!s||m===null||m===91||Lt(m))return n(m);if(m===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(_i(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Lt(m)||(s=!0),a++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function xK(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(s>999||b===93&&!l||b===null||b===91||Lt(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=_i(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Lt(b)||(l=!0),s++,e.consume(b),b===92?m:f}function m(b){return b===91||b===92||b===93?(e.consume(b),s++,f):f(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),gt(e,O,"gfmFootnoteDefinitionWhitespace")):n(b)}function O(b){return t(b)}}function SK(e,t,n){return e.check(Qd,t,e.attempt(gK,t,n))}function wK(e){e.exit("gfmFootnoteDefinition")}function _K(e,t,n){const r=this;return gt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function kK(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let d=c;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[c][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[c][1].end)},m={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[c][1].start)},p=[["enter",f,l],["enter",s[d][1],l],["exit",s[d][1],l],["enter",m,l]],O=l.parser.constructs.insideSpan.null;O&&Mr(p,p.length,0,lp(O,s.slice(d+1,c),l)),Mr(p,p.length,0,[["exit",m,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",f,l]]),Mr(s,d-1,c-d+3,p),c=d+p.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function a(s,l,c){const d=this.previous,f=this.events;let m=0;return p;function p(b){return d===126&&f[f.length-1][1].type!=="characterEscape"?c(b):(s.enter("strikethroughSequenceTemporary"),O(b))}function O(b){const x=Fl(d);if(b===126)return m>1?c(b):(s.consume(b),m++,O);if(m<2&&!n)return c(b);const w=s.exit("strikethroughSequenceTemporary"),k=Fl(b);return w._open=!k||k===2&&!!x,w._close=!x||x===2&&!!k,l(b)}}}var jK=class{constructor(){this.map=[]}add(e,t,n){TK(this,e,t,n)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function TK(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function CK(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function EK(){return{flow:{null:{name:"table",tokenize:QK,resolveAll:AK}}}}function QK(e,t,n){const r=this;let i=0,a=0,s;return l;function l(P){let B=r.events.length-1;for(;B>-1;){const z=r.events[B][1].type;if(z==="lineEnding"||z==="linePrefix")B--;else break}const X=B>-1?r.events[B][1].type:null,V=X==="tableHead"||X==="tableRow"?A:c;return V===A&&r.parser.lazy[r.now().line]?n(P):V(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(s=!0,a+=1),f(P)}function f(P){return P===null?n(P):ze(P)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),O):n(P):at(P)?gt(e,f,"whitespace")(P):(a+=1,s&&(s=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),m(P)))}function m(P){return P===null||P===124||Lt(P)?(e.exit("data"),f(P)):(e.consume(P),P===92?p:m)}function p(P){return P===92||P===124?(e.consume(P),m):m(P)}function O(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),s=!1,at(P)?gt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):b(P))}function b(P){return P===45||P===58?w(P):P===124?(s=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),x):Q(P)}function x(P){return at(P)?gt(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),k):P===45?(a+=1,k(P)):P===null||ze(P)?E(P):Q(P)}function k(P){return P===45?(e.enter("tableDelimiterFiller"),T(P)):Q(P)}function T(P){return P===45?(e.consume(P),T):P===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(P))}function j(P){return at(P)?gt(e,E,"whitespace")(P):E(P)}function E(P){return P===124?b(P):P===null||ze(P)?!s||i!==a?Q(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):Q(P)}function Q(P){return n(P)}function A(P){return e.enter("tableRow"),M(P)}function M(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),M):P===null||ze(P)?(e.exit("tableRow"),t(P)):at(P)?gt(e,M,"whitespace")(P):(e.enter("data"),L(P))}function L(P){return P===null||P===124||Lt(P)?(e.exit("data"),M(P)):(e.consume(P),P===92?D:L)}function D(P){return P===92||P===124?(e.consume(P),L):L(P)}}function AK(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,d,f,m;const p=new jK;for(;++n<e.length;){const O=e[n],b=O[1];O[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(vC(p,t,c,d,f),f=void 0,c=0),d={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],m=Ch(p,t,a,i,void 0,m),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],m=Ch(p,t,a,i,void 0,m)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,a[1]!==0?(s[0]=s[1],m=Ch(p,t,a,i,n,m)):s[1]!==0&&(m=Ch(p,t,s,i,n,m)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&vC(p,t,c,d,f),p.consume(t.events),n=-1;++n<t.events.length;){const O=t.events[n];O[0]==="enter"&&O[1].type==="table"&&(O[1]._align=CK(t.events,n))}return e}function Ch(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},yl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=yl(t.events,n[1]);if(a={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=yl(t.events,n[2]),f=yl(t.events,n[3]),m={type:l,start:Object.assign({},d),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const p=t.events[n[2]],O=t.events[n[3]];if(p[1].end=Object.assign({},O[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(a.end=Object.assign({},yl(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function vC(e,t,n,r,i){const a=[],s=yl(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function yl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var PK={name:"tasklistCheck",tokenize:RK};function NK(){return{text:{91:PK}}}function RK(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Lt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return ze(c)?t(c):at(c)?e.check({tokenize:MK},t,n)(c):n(c)}}function MK(e,t,n){return gt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function LK(e){return pM([oK(),vK(),kK(e),EK(),NK()])}var DK={};function zK(e){const t=this,n=e||DK,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(LK(n)),a.push(rK()),s.push(iK(n))}function $K({imageUrl:e,alt:t="Resource image"}){return g.jsx("div",{className:"semiont-image-viewer",children:g.jsx("img",{src:e,alt:t,className:"semiont-image-viewer__image",style:{imageRendering:"auto"}})})}var qK=_.lazy(()=>Pe(()=>import("./PdfAnnotationCanvas.client-6ZGFEN2N-Dnq2pEeZ.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.PdfAnnotationCanvas}))),IK=_.memo(function({content:t}){return g.jsx(k4,{remarkPlugins:[zK],children:t})}),XK=_.memo(function({content:t,mimeType:n,resourceUri:r,annotations:i,selectedClick:a="detail",annotateMode:s,hoverDelayMs:l=150}){const{newAnnotationIds:c}=J0(),d=Le(st().activeSession$),f=_.useRef(null),m=c0(n),{highlights:p,references:O,assessments:b,comments:x,tags:w}=i,k=_.useMemo(()=>[...p,...O,...b,...x,...w],[p,O,b,x,w]),T=_.useMemo(()=>LB(k),[k]),j=_.useRef(null);_.useEffect(()=>{f.current&&(j.current=AB(t,f.current))},[t]),_.useEffect(()=>{if(!f.current||!j.current||T.length===0)return;const M=f.current,L=PB(M),D=NB(T,j.current,L);return RB(D),()=>MB(M)},[T]),_.useEffect(()=>{if(!f.current||!d)return;const M=f.current,L=z=>{const $=z.target.closest("[data-annotation-id]");if(!$)return;const q=$.getAttribute("data-annotation-id"),ee=$.getAttribute("data-annotation-type");if(q&&ee==="reference"){const le=k.find(I=>I.id===q);le&&d.client.emit("browse:click",{annotationId:q,motivation:le.motivation})}},{handleMouseEnter:D,handleMouseLeave:P,cleanup:B}=i0(z=>d.client.emit("beckon:hover",{annotationId:z}),l),X=z=>{const $=z.target.closest("[data-annotation-id]"),q=$==null?void 0:$.getAttribute("data-annotation-id");q&&D(q)},V=z=>{z.target.closest("[data-annotation-id]")&&P()};return c&&M.querySelectorAll("[data-annotation-id]").forEach(Y=>{const $=Y.getAttribute("data-annotation-id");$&&c.has($)&&Y.classList.add("annotation-sparkle")}),M.addEventListener("click",L),M.addEventListener("mouseover",X),M.addEventListener("mouseout",V),()=>{M.removeEventListener("click",L),M.removeEventListener("mouseover",X),M.removeEventListener("mouseout",V),B()}},[t,k,c,l,d]);const E=_.useCallback((M,L=!1)=>{f.current&&bR(M,f.current,{pulse:L})},[]),Q=_.useCallback(({annotationId:M})=>{E(M)},[E]),A=_.useCallback(({annotationId:M})=>{E(M??null,!0)},[E]);switch(Ma({"beckon:hover":Q,"beckon:focus":A}),m){case"text":return g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"text",children:[g.jsx(Nl,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:Jn}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(IK,{content:t})})]});case"image":return Kl(n)?g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"pdf",children:[g.jsx(Nl,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:Jn}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(_.Suspense,{fallback:g.jsx("div",{className:"semiont-browse-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(qK,{pdfUrl:t,existingAnnotations:k,drawingMode:null,selectedMotivation:null})})})]}):g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"image",children:[g.jsx(Nl,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:Jn}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx($K,{imageUrl:t,mimeType:n,alt:"Resource content"})})]});case"unsupported":return g.jsx("div",{ref:f,className:"semiont-browse-view semiont-browse-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-browse-view__empty",children:[g.jsxs("p",{className:"semiont-browse-view__empty-message",children:["Preview not available for ",n]}),g.jsx("a",{href:`/api/resources/${r}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}});function ZK({resource:e,annotations:t,generatingReferenceId:n,showLineNumbers:r=!1,hoverDelayMs:i,hoveredAnnotationId:a}){const s=un("ResourceViewer"),l=_.useRef(null),c=st(),d=Le(c.activeSession$),f=GP(),{highlights:m,references:p,assessments:O,comments:b,tags:x}=t;if(!e["@id"])throw new Error("Resource has no @id");const w=Hi(e["@id"]),T=(()=>{const me=e.representations;return Array.isArray(me)&&me.length>0&&me[0]?me[0].mediaType:"text/plain"})(),[j,E]=_.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1);_.useEffect(()=>{typeof window<"u"&&localStorage.setItem("annotateMode",j.toString())},[j]);const Q=_.useCallback(()=>{E(me=>!me)},[]),A=j?"annotate":"browse",M=d==null?void 0:d.client,L=_.useCallback(()=>{M==null||M.browse.invalidateAnnotationList(w)},[M,w]),D=_.useCallback(()=>{M==null||M.browse.invalidateAnnotationList(w)},[M,w]),P=_.useCallback(()=>{M==null||M.browse.invalidateAnnotationList(w)},[M,w]),[B,X]=_.useState(()=>{if(typeof window<"u"){const me=localStorage.getItem("semiont-toolbar-selection");if(me==="null")return null;if(me&&["linking","highlighting","assessing","commenting","tagging"].includes(me))return me}return"linking"}),[V,z]=_.useState(()=>{if(typeof window<"u"){const me=localStorage.getItem("semiont-toolbar-click");if(me&&["detail","follow","jsonld","deleting"].includes(me))return me}return"detail"}),Y=EB(T),[$,q]=_.useState(()=>bj(Y)),ee=_.useCallback(({motivation:me})=>{X(me)},[]),le=_.useCallback(({action:me})=>{z(me)},[]),I=_.useCallback(({shape:me})=>{q(me)},[]);_.useEffect(()=>{B===null?localStorage.setItem("semiont-toolbar-selection","null"):localStorage.setItem("semiont-toolbar-selection",B)},[B]),_.useEffect(()=>{localStorage.setItem("semiont-toolbar-click",V)},[V]),_.useEffect(()=>{QB(Y,$)},[Y,$]),_.useEffect(()=>{const me=bj(Y);me!==$&&q(me)},[Y]);const[G,re]=_.useState(!1),[R,ge]=_.useState(null),[_e,ve]=_.useState(null),Xe=a??null,[Ne,Ze]=_.useState(null),[be,Fe]=_.useState(null),Se=_.useCallback(me=>{Fe(me),Ze(me),setTimeout(()=>Fe(null),3e3)},[]),Ve=()=>typeof window>"u"?{x:0,y:0}:{x:Math.max(0,(window.innerWidth-800)/2),y:Math.max(0,(window.innerHeight-700)/2)},ot=_.useCallback(me=>{d==null||d.client.emit("mark:delete",{annotationId:ri(me)})},[d]),vt=_.useCallback((me,Ot)=>{const Dt=Object.values(Jn).find(tt=>tt.matchesAnnotation(me));if(Dt!=null&&Dt.hasSidePanel){if(V==="detail"){Se(me.id);return}if(V!=="deleting"&&V!=="jsonld"&&V!=="follow")return}const Wt=To(me)||Gl(me)||Ls(me)||oi(me)||Co(me);if(V==="follow"&&oi(me)){const tt=Ea(me.body);tt&&f(`/know/resource/${tt}`,{resourceId:tt});return}if(V==="jsonld"&&Wt){ge(me),re(!0);return}if(j&&V==="deleting"&&Wt){const tt=Ot?{x:Ot.clientX,y:Ot.clientY+10}:{x:window.innerWidth/2-150,y:window.innerHeight/2-75};ve({annotation:me,position:tt});return}},[j,V,Se]),et=_.useCallback(({annotationId:me,motivation:Ot})=>{const Dt=Object.values(Jn).find(Wt=>Wt.matchesAnnotation({motivation:Ot}));if(!(Dt!=null&&Dt.hasSidePanel)){const tt=[...m,...p,...O,...b,...x].find(Un=>Un.id===me);tt&&vt(tt);return}if(V!=="detail"){const tt=[...m,...p,...O,...b,...x].find(Un=>Un.id===me);tt&&vt(tt);return}c.emit("panel:open",{panel:"annotations",scrollToAnnotationId:me,motivation:Ot})},[m,p,O,b,x,vt,V,d]);Ma({"mark:mode-toggled":Q,"mark:added":L,"mark:removed":D,"mark:body-updated":P,"mark:selection-changed":ee,"mark:click-changed":le,"mark:shape-changed":I,"browse:click":et});const yn=_.useMemo(()=>({highlights:m,references:p,assessments:O,comments:b,tags:x}),[m,p,O,b,x]),Te={selectedMotivation:B,selectedClick:V,selectedShape:$,hoveredAnnotationId:Xe,scrollToAnnotationId:Ne},lt=_.useCallback(me=>{const Ot=p.find(Dt=>Ea(Dt.body)===me);return Ot?Ss(An(Ot.target)):void 0},[p]);return g.jsxs("div",{ref:l,className:"semiont-resource-viewer",children:[A==="annotate"?g.jsx(SY,{content:e.content,mimeType:T,resourceUri:e["@id"],annotations:yn,uiState:Te,onUIStateChange:me=>{"selectedMotivation"in me&&X(me.selectedMotivation),"selectedClick"in me&&z(me.selectedClick),"selectedShape"in me&&q(me.selectedShape)},enableWidgets:!0,getTargetResourceName:lt,...n!==void 0&&{generatingReferenceId:n},showLineNumbers:r,hoverDelayMs:i,annotateMode:j}):g.jsx(XK,{content:e.content,mimeType:T,resourceUri:e["@id"],annotations:yn,selectedClick:V,hoverDelayMs:i,annotateMode:j}),R&&g.jsx(QT,{isOpen:G,onClose:()=>re(!1),position:Ve(),wide:!0,children:g.jsx(u8,{annotation:R,onBack:()=>{re(!1),ge(null)}})}),_e&&(()=>{const me=_e.annotation,Ot=Object.values(Jn).find(Un=>Un.matchesAnnotation(me)),Dt=An(me.target),Wt=Ss(Dt),tt=(Ot==null?void 0:Ot.iconEmoji)||"📝";return g.jsx(QT,{isOpen:!!_e,onClose:()=>ve(null),position:_e.position,children:g.jsxs("div",{className:"semiont-delete-confirmation",children:[g.jsxs("div",{className:"semiont-delete-confirmation__header",children:[g.jsx("span",{className:"semiont-delete-confirmation__icon",children:tt}),g.jsx("h3",{className:"semiont-delete-confirmation__title",children:s("deleteConfirmationTitle")})]}),Wt&&g.jsx("div",{className:"semiont-delete-confirmation__quote",children:g.jsxs("p",{className:"semiont-delete-confirmation__text",children:['"',Wt.length>100?Wt.substring(0,100)+"...":Wt,'"']})}),g.jsx("p",{className:"semiont-delete-confirmation__message",children:s("deleteConfirmationMessage")}),g.jsxs("div",{className:"semiont-delete-confirmation__actions",children:[g.jsx("button",{onClick:()=>ve(null),className:"semiont-button semiont-button--secondary",children:s("deleteConfirmationCancel")}),g.jsx("button",{onClick:()=>{ot(_e.annotation.id),ve(null)},className:"semiont-button semiont-button--danger",children:s("deleteConfirmationDelete")})]})]})})})()]})}function BK(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function OC(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="TextualBody"&&"value"in e&&typeof e.value=="string"}function VK(e){if(!e.body)return null;if(OC(e.body))return e.body.value||null;if(Array.isArray(e.body)&&e.body.length>0){const t=e.body.find(OC);return(t==null?void 0:t.value)||null}return null}function UK({assessment:e,isFocused:t,isHovered:n=!1,ref:r}){var c;const i=Le(st().activeSession$),a=wd(e.id),s=gd(e),l=VK(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"assessment","data-focused":t?"true":"false",onClick:()=>{i==null||i.client.emit("browse:click",{annotationId:e.id,motivation:e.motivation})},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"assessment",children:['"',s.substring(0,100),s.length>100?"...":"",'"']}),l&&g.jsx("div",{className:"semiont-annotation-entry__body","data-type":"assessment",children:l}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((c=e.creator)==null?void 0:c.name)||"Unknown"," • ",BK(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function Rx({annotationType:e,isAssisting:t,locale:n,progress:r}){const a=un(e==="highlight"?"HighlightPanel":e==="assessment"?"AssessmentPanel":"CommentsPanel"),s=Le(st().activeSession$),[l,c]=_.useState(""),[d,f]=_.useState(""),m=e==="comment"?5:e==="assessment"?4:5,[p,O]=_.useState(m),[b,x]=_.useState(!0),[w,k]=_.useState(()=>{if(typeof window>"u")return!0;const E=localStorage.getItem(`assist-section-expanded-${e}`);return E?E==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem(`assist-section-expanded-${e}`,String(w))},[w,e]);const T=_.useCallback(()=>{const E=e==="highlight"?"highlighting":e==="assessment"?"assessing":"commenting";s==null||s.client.emit("mark:assist-request",{motivation:E,options:{instructions:l.trim()||void 0,tone:(e==="comment"||e==="assessment")&&d?d:void 0,density:(e==="comment"||e==="assessment"||e==="highlight")&&b?p:void 0,language:e==="comment"||e==="assessment"?n:void 0}}),c(""),f("")},[e,l,d,b,p,n,s]),j=_.useCallback(()=>{s==null||s.client.emit("mark:progress-dismiss",void 0)},[s]);return g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>k(!w),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":w,type:"button",children:[g.jsx("span",{children:a(e==="highlight"?"annotateHighlights":e==="assessment"?"annotateAssessments":"annotateComments")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":w,children:"›"})]}),w&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":t&&r?"true":"false","data-type":e,children:[!r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[a("instructions")," ",a("optional")]}),g.jsx("textarea",{value:l,onChange:E=>c(E.target.value),className:"semiont-textarea",rows:3,placeholder:a("instructionsPlaceholder"),maxLength:500}),g.jsxs("div",{className:"semiont-form-field__char-count",children:[l.length,"/500"]})]}),(e==="comment"||e==="assessment")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[a("toneLabel")," ",a("toneOptional")]}),g.jsxs("select",{value:d,onChange:E=>f(E.target.value),className:"semiont-select",children:[g.jsx("option",{value:"",children:"Default"}),e==="comment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"scholarly",children:a("toneScholarly")}),g.jsx("option",{value:"explanatory",children:a("toneExplanatory")}),g.jsx("option",{value:"conversational",children:a("toneConversational")}),g.jsx("option",{value:"technical",children:a("toneTechnical")})]}),e==="assessment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"analytical",children:a("toneAnalytical")}),g.jsx("option",{value:"critical",children:a("toneCritical")}),g.jsx("option",{value:"balanced",children:a("toneBalanced")}),g.jsx("option",{value:"constructive",children:a("toneConstructive")})]})]})]}),(e==="comment"||e==="assessment"||e==="highlight")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("div",{className:"semiont-form-field__header",children:[g.jsxs("label",{className:"semiont-form-field__label semiont-form-field__label--with-checkbox",children:[g.jsx("input",{type:"checkbox",checked:b,onChange:E=>x(E.target.checked),className:"semiont-checkbox","data-variant":e}),g.jsx("span",{children:a("densityLabel")})]}),b&&g.jsxs("span",{className:"semiont-form-field__info",children:[p," per 2000 words"]})]}),b&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"range",min:e==="comment"?"2":"1",max:e==="comment"?"12":e==="assessment"?"10":"15",value:p,onChange:E=>O(Number(E.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:a("densitySparse")}),g.jsx("span",{children:a("densityDense")})]})]})]}),g.jsxs("button",{onClick:T,className:"semiont-button","data-variant":"assist","data-type":e,children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:a("annotate")})]})]}),r&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":e,children:[r.requestParams&&r.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":e,children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),r.requestParams.map((E,Q)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[E.label,":"]})," ",E.value]},Q))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:r.message})]}),!t&&g.jsx("button",{onClick:j,className:"semiont-annotation-progress__close","aria-label":a("closeProgress"),title:a("closeProgress"),type:"button",children:"×"})]})]})]})]})}function Ad({count:e,title:t}){return g.jsx("div",{className:"semiont-panel-header",children:g.jsxs("h2",{className:"semiont-panel-header__title",children:[g.jsx("span",{className:"semiont-panel-header__text",children:t}),g.jsxs("span",{className:"semiont-panel-header__count",children:["(",e,")"]})]})})}function YK(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function WK({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,locale:i,annotateMode:a=!0,scrollToAnnotationId:s,onScrollCompleted:l,hoveredAnnotationId:c}){const d=un("AssessmentPanel"),f=Le(st().activeSession$),[m,p]=_.useState(""),[O,b]=_.useState(null),x=_.useRef(null),w=_.useRef(new Map),k=_.useMemo(()=>[...e].sort((Q,A)=>{const M=si(An(Q.target)),L=si(An(A.target));return!M||!L?0:M.start-L.start}),[e]),T=_.useCallback((Q,A)=>{A?w.current.set(Q,A):w.current.delete(Q)},[]);_.useEffect(()=>{if(!s)return;const Q=w.current.get(s);if(Q&&x.current){const A=Q.offsetTop,M=x.current.clientHeight,L=Q.offsetHeight,D=A-M/2+L/2;x.current.scrollTo({top:D,behavior:"smooth"}),Q.classList.remove("semiont-annotation-pulse"),Q.offsetWidth,Q.classList.add("semiont-annotation-pulse"),l&&l()}},[s]),_.useEffect(()=>{if(!c)return;const Q=w.current.get(c);if(!Q||!x.current)return;const A=x.current,M=Q.getBoundingClientRect(),L=A.getBoundingClientRect();if(!(M.top>=L.top&&M.bottom<=L.bottom)){const P=Q.offsetTop,B=A.clientHeight,X=Q.offsetHeight,V=P-B/2+X/2;A.scrollTo({top:V,behavior:"smooth"})}},[c]);const j=()=>{if(t){const Q=m.trim(),A=Q?{type:"TextualBody",value:Q,purpose:"assessing"}:void 0;f==null||f.client.emit("mark:submit",{motivation:"assessing",selector:t.selector,...A!==void 0?{body:A}:{}}),p("")}};_.useEffect(()=>{if(!t)return;const Q=A=>{A.key==="Escape"&&(f==null||f.client.emit("mark:cancel-pending",void 0),p(""))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[t,f]);const E=_.useCallback(({annotationId:Q})=>{b(Q),setTimeout(()=>b(null),3e3)},[]);return Ma({"browse:click":E}),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Ad,{annotationType:"assessment",count:e.length,title:d("title")}),t&&t.motivation==="assessing"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"assessment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const Q=YK(t.selector);return Q?`"${Q.substring(0,100)}${Q.length>100?"...":""}"`:d("fragmentSelected")})()}),g.jsx("textarea",{value:m,onChange:Q=>p(Q.target.value),className:"semiont-textarea",rows:3,placeholder:d("assessmentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[m.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{f==null||f.client.emit("mark:cancel-pending",void 0),p("")},className:"semiont-button semiont-button--secondary","data-type":"assessment",children:d("cancel")}),g.jsx("button",{onClick:j,className:"semiont-button semiont-button--primary","data-type":"assessment",children:d("save")})]})]})]}),g.jsxs("div",{ref:x,className:"semiont-panel__content",children:[a&&g.jsx(Rx,{annotationType:"assessment",isAssisting:n,locale:i,progress:r}),g.jsx("div",{className:"semiont-panel__list",children:k.length===0?g.jsx("p",{className:"semiont-panel__empty",children:d("noAssessments")}):k.map(Q=>g.jsx(UK,{assessment:Q,isFocused:Q.id===O,isHovered:Q.id===c,ref:A=>T(Q.id,A)},Q.id))})]})]})}function FK({state:e,eventCount:t,lastEventTimestamp:n,knowledgeBaseName:r}){const i=un("CollaborationPanel"),a=e==="open"||e==="reconnecting"||e==="initial"||e==="connecting";let s;if(!n)s=i("noActivity");else{const l=new Date,c=new Date(n),d=l.getTime()-c.getTime(),f=Math.floor(d/1e3),m=Math.floor(f/60),p=Math.floor(m/60);f<10?s=i("justNow"):f<60?s=i("secondsAgo",{count:f}):m===1?s=i("minuteAgo"):m<60?s=i("minutesAgo",{count:m}):p===1?s=i("hourAgo"):p<24?s=i("hoursAgo",{count:p}):s=c.toLocaleDateString()}return g.jsxs("div",{className:"semiont-collaboration-panel",children:[g.jsx("h3",{className:"semiont-collaboration-panel__title",children:i("title")}),r&&g.jsx("div",{style:{padding:"0 0.75rem 0.5rem",fontSize:"0.8rem",color:"var(--semiont-color-neutral-400)"},children:r}),g.jsxs("div",{className:"semiont-collaboration-panel__section",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("connectionStatus")}),g.jsxs("div",{className:"semiont-collaboration-panel__status",children:[g.jsxs("span",{className:"semiont-collaboration-panel__indicator",children:[g.jsx("span",{className:"semiont-collaboration-panel__dot","data-connected":a?"true":"false"}),g.jsx("span",{className:"semiont-collaboration-panel__status-text","data-connected":a?"true":"false",children:i(a?"live":"disconnected")})]}),a&&t>0&&g.jsxs("span",{className:"semiont-collaboration-panel__event-count",children:["(",i("events",{count:t}),")"]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__details",children:[g.jsxs("div",{children:[g.jsx("span",{className:"semiont-collaboration-panel__label",children:i("lastSync")})," ",s]}),g.jsx("div",{children:i(a?"realtimeActive":"reconnecting")})]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__section semiont-collaboration-panel__section--bordered",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("sharing")}),g.jsx("p",{className:"semiont-collaboration-panel__description",children:i("collaborationComingSoon")})]})]})}function HK(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function GK({comment:e,isFocused:t,isHovered:n=!1,annotateMode:r=!0,ref:i}){var T;const a=un("CommentsPanel"),s=Le(st().activeSession$),l=wd(e.id),[c,d]=_.useState(!1),[f,m]=_.useState(""),p=_.useRef(null);_.useImperativeHandle(i,()=>p.current);const O=$$(e)||"",b=gd(e);_.useEffect(()=>{t&&p.current&&p.current.scrollIntoView({behavior:"smooth",block:"center"})},[t]);const x=()=>{m(O),d(!0)},w=()=>{d(!1)},k=()=>{d(!1),m("")};return g.jsxs("div",{ref:p,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"comment","data-focused":t?"true":"false",onClick:()=>{s==null||s.client.emit("browse:click",{annotationId:e.id,motivation:e.motivation})},...l,children:[b&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"comment",children:['"',b.substring(0,100),b.length>100?"...":"",'"']}),c?g.jsxs("div",{className:"semiont-annotation-entry__edit",onClick:j=>j.stopPropagation(),children:[g.jsx("textarea",{value:f,onChange:j=>m(j.target.value),className:"semiont-textarea",rows:3,autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-entry__edit-footer",children:[g.jsxs("span",{className:"semiont-annotation-entry__char-count",children:[f.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-entry__button-group",children:[g.jsx("button",{onClick:w,className:"semiont-button semiont-button--primary","data-type":"comment",children:a("save")}),g.jsx("button",{onClick:k,className:"semiont-button semiont-button--secondary",children:a("cancel")})]})]})]}):g.jsx("div",{className:"semiont-annotation-entry__body",children:O}),!c&&g.jsxs("div",{className:"semiont-annotation-entry__footer",children:[g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((T=e.creator)==null?void 0:T.name)||"Unknown"," • ",HK(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]}),r&&g.jsx("div",{className:"semiont-annotation-entry__actions",onClick:j=>j.stopPropagation(),children:g.jsx("button",{onClick:x,className:"semiont-text-button","data-variant":"comment",children:a("edit")})})]})]})}function KK(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function JK({annotations:e,pendingAnnotation:t,annotateMode:n=!0,isAssisting:r=!1,progress:i,locale:a,scrollToAnnotationId:s,onScrollCompleted:l,hoveredAnnotationId:c}){const d=un("CommentsPanel"),f=Le(st().activeSession$),[m,p]=_.useState(""),[O,b]=_.useState(null),x=_.useRef(null),w=_.useRef(new Map),k=_.useMemo(()=>[...e].sort((Q,A)=>{const M=si(An(Q.target)),L=si(An(A.target));return!M||!L?0:M.start-L.start}),[e]),T=_.useCallback((Q,A)=>{A?w.current.set(Q,A):w.current.delete(Q)},[]);_.useEffect(()=>{if(!s)return;const Q=w.current.get(s);if(Q&&x.current){const A=Q.offsetTop,M=x.current.clientHeight,L=Q.offsetHeight,D=A-M/2+L/2;x.current.scrollTo({top:D,behavior:"smooth"}),Q.classList.remove("semiont-annotation-pulse"),Q.offsetWidth,Q.classList.add("semiont-annotation-pulse"),l&&l()}},[s]),_.useEffect(()=>{if(!c)return;const Q=w.current.get(c);if(!Q||!x.current)return;const A=x.current,M=Q.getBoundingClientRect(),L=A.getBoundingClientRect();if(!(M.top>=L.top&&M.bottom<=L.bottom)){const P=Q.offsetTop,B=A.clientHeight,X=Q.offsetHeight,V=P-B/2+X/2;A.scrollTo({top:V,behavior:"smooth"})}},[c]);const j=_.useCallback(({annotationId:Q})=>{b(Q),setTimeout(()=>b(null),3e3)},[]);Ma({"browse:click":j});const E=()=>{m.trim()&&t&&(f==null||f.client.emit("mark:submit",{motivation:"commenting",selector:t.selector,body:[{type:"TextualBody",value:m,purpose:"commenting"}]}),p(""))};return _.useEffect(()=>{if(!t)return;const Q=A=>{A.key==="Escape"&&(f==null||f.client.emit("mark:cancel-pending",void 0),p(""))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[t,f]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Ad,{annotationType:"comment",count:e.length,title:d("title")}),t&&t.motivation==="commenting"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"comment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const Q=KK(t.selector);return Q?`"${Q.substring(0,100)}${Q.length>100?"...":""}"`:d("fragmentSelected")})()}),g.jsx("textarea",{value:m,onChange:Q=>p(Q.target.value),className:"semiont-textarea",rows:3,placeholder:d("commentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[m.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{f==null||f.client.emit("mark:cancel-pending",void 0),p("")},className:"semiont-button semiont-button--secondary","data-type":"comment",children:d("cancel")}),g.jsx("button",{onClick:E,disabled:!m.trim(),className:"semiont-button semiont-button--primary","data-type":"comment",children:d("save")})]})]})]}),g.jsxs("div",{ref:x,className:"semiont-panel__content",children:[n&&g.jsx(Rx,{annotationType:"comment",isAssisting:r,locale:a,progress:i}),g.jsx("div",{className:"semiont-panel__list",children:k.length===0?g.jsx("p",{className:"semiont-panel__empty",children:d("noComments")}):k.map(Q=>g.jsx(GK,{comment:Q,isFocused:Q.id===O,isHovered:Q.id===c,annotateMode:n,ref:A=>T(Q.id,A)},Q.id))})]})]})}function eJ(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),l=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:l<7?`${l} day${l>1?"s":""} ago`:t.toLocaleDateString()}function tJ({highlight:e,isFocused:t,isHovered:n=!1,ref:r}){var l;const i=Le(st().activeSession$),a=wd(e.id),s=gd(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"highlight","data-focused":t?"true":"false",onClick:()=>{i==null||i.client.emit("browse:click",{annotationId:e.id,motivation:e.motivation})},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"highlight",children:['"',s.substring(0,200),s.length>200?"...":"",'"']}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((l=e.creator)==null?void 0:l.name)||"Unknown"," • ",eJ(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function nJ({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,annotateMode:i=!0,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:l}){const c=un("HighlightPanel"),d=Le(st().activeSession$),[f,m]=_.useState(null),p=_.useRef(null),O=_.useRef(new Map),b=_.useMemo(()=>[...e].sort((k,T)=>{const j=si(An(k.target)),E=si(An(T.target));return!j||!E?0:j.start-E.start}),[e]),x=_.useCallback((k,T)=>{T?O.current.set(k,T):O.current.delete(k)},[]);_.useEffect(()=>{if(!a)return;const k=O.current.get(a);if(k&&p.current){const T=k.offsetTop,j=p.current.clientHeight,E=k.offsetHeight,Q=T-j/2+E/2;p.current.scrollTo({top:Q,behavior:"smooth"}),k.classList.remove("semiont-annotation-pulse"),k.offsetWidth,k.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),_.useEffect(()=>{if(!l)return;const k=O.current.get(l);if(!k||!p.current)return;const T=p.current,j=k.getBoundingClientRect(),E=T.getBoundingClientRect();if(!(j.top>=E.top&&j.bottom<=E.bottom)){const A=k.offsetTop,M=T.clientHeight,L=k.offsetHeight,D=A-M/2+L/2;T.scrollTo({top:D,behavior:"smooth"})}},[l]);const w=_.useCallback(({annotationId:k})=>{m(k),setTimeout(()=>m(null),3e3)},[]);return Ma({"browse:click":w}),_.useEffect(()=>{t&&t.motivation==="highlighting"&&(d==null||d.client.emit("mark:submit",{motivation:"highlighting",selector:t.selector}))},[t,d]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Ad,{annotationType:"highlight",count:e.length,title:c("title")}),g.jsxs("div",{ref:p,className:"semiont-panel__content",children:[i&&g.jsx(Rx,{annotationType:"highlight",isAssisting:n,progress:r}),g.jsx("div",{className:"semiont-panel__list",children:b.length===0?g.jsx("p",{className:"semiont-panel__empty",children:c("noHighlights")}):b.map(k=>g.jsx(tJ,{highlight:k,isFocused:k.id===f,isHovered:k.id===l,ref:T=>x(k.id,T)},k.id))})]})]})}function rJ({resource:e}){const t=_.useRef(null),n=_.useRef(null),{showLineNumbers:r}=K0();_.useEffect(()=>{var f;if(!t.current)return;const a=((f=document.documentElement)==null?void 0:f.classList.contains("dark"))??!1,s=JSON.stringify(e,null,2),l=[_R(),$e.editable.of(!1),Kt.readOnly.of(!0)];r&&l.push(hm()),a?l.push(kR):(l.push(ZP),l.push(G0(BP)));const c=Kt.create({doc:s,extensions:l}),d=new $e({state:c,parent:t.current});return n.current=d,()=>{d.destroy(),n.current=null}},[e,r]);const i=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(a){console.error("Failed to copy JSON-LD:",a)}};return g.jsxs("div",{className:"semiont-jsonld-panel",children:[g.jsxs("div",{className:"semiont-jsonld-panel__header",children:[g.jsx("h3",{className:"semiont-jsonld-panel__title",children:"JSON-LD"}),g.jsx("button",{onClick:i,className:"semiont-button semiont-button--icon",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:t,className:"semiont-jsonld-panel__editor"})]})}function iJ({reference:e,isFocused:t,isHovered:n=!1,routes:r,annotateMode:i=!0,isGenerating:a=!1,ref:s}){const l=un("ReferencesPanel"),c=Le(st().activeSession$),d=c==null?void 0:c.client,f=GP(),m=wd(e.id),p=gd(e)||"",O=Vu(e.body),b=O?Ea(e.body):null,x=YP(e),w=An(e.target),k=Kz(w),T=YE(w),j=k?"Fragment annotation":T?"Image annotation":"Annotation",E=e,Q=E._resolvedDocumentName,A=E._resolvedDocumentMediaType,M=VP(A),L=()=>{b&&f(r.resourceDetail(b),{resourceId:b})},D=typeof e.target=="object"&&"source"in e.target?e.target.source:"",P=()=>{D&&b&&d&&d.bind.body(Hi(D),ri(e.id),[{op:"remove",item:{type:"SpecificResource",source:b,purpose:"linking"}}]).catch(()=>{})},B=()=>{c==null||c.client.emit("bind:initiate",{annotationId:ri(e.id),resourceId:Hi(D),defaultTitle:p,entityTypes:x})},X=z=>{z.stopPropagation(),O?L():i&&B()},V=O||i;return g.jsxs("div",{ref:s,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"reference","data-focused":t?"true":"false",onClick:()=>{c==null||c.client.emit("browse:click",{annotationId:e.id,motivation:e.motivation})},...m,children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsxs("div",{className:"semiont-reference-icon-group",children:[g.jsx("button",{className:`semiont-reference-icon${V?" semiont-reference-icon--clickable":""}`,title:l(O?"open":i?"resolve":"stub"),onClick:V?X:void 0,"data-generating":!O&&a?"true":"false",tabIndex:V?0:-1,children:O?"🔗":"❓"}),i&&O&&g.jsx("button",{className:"semiont-reference-unlink",title:l("unlink"),onClick:z=>{z.stopPropagation(),P()},children:"⛓️‍💥"})]}),g.jsxs("div",{className:"semiont-annotation-entry__content",children:[p&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"reference",children:['"',p.substring(0,100),p.length>100?"...":"",'"']}),!p&&g.jsx("div",{className:"semiont-annotation-entry__meta",children:j}),Q&&g.jsx("div",{className:"semiont-reference-link",children:g.jsxs("span",{children:["→ ",M," ",Q]})})]})]}),x.length>0&&g.jsx("div",{className:"semiont-annotation-entry__tags",children:x.map((z,Y)=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:z},Y))}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function aJ(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function sJ({annotations:e=[],isAssisting:t,progress:n,annotateMode:r=!0,Link:i,routes:a,allEntityTypes:s,generatingReferenceId:l,referencedBy:c=[],referencedByLoading:d=!1,pendingAnnotation:f,scrollToAnnotationId:m,onScrollCompleted:p,hoveredAnnotationId:O}){const b=un("ReferencesPanel"),x=Le(st().activeSession$),[w,k]=_.useState([]),[T,j]=_.useState(null),[E,Q]=_.useState([]),[A,M]=_.useState(!1),[L,D]=_.useState(null),P=_.useRef(null),[B,X]=_.useState(()=>{if(typeof window>"u")return!0;const G=localStorage.getItem("assist-section-expanded-reference");return G?G==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-reference",String(B))},[B]);const V=_.useRef(new Map),z=_.useMemo(()=>[...e].sort((G,re)=>{const R=si(An(G.target)),ge=si(An(re.target));return!R||!ge?0:R.start-ge.start}),[e]),Y=_.useCallback((G,re)=>{re?V.current.set(G,re):V.current.delete(G)},[]);_.useEffect(()=>{if(!m)return;const G=V.current.get(m);if(G&&P.current){const re=G.offsetTop,R=P.current.clientHeight,ge=G.offsetHeight,_e=re-R/2+ge/2;P.current.scrollTo({top:_e,behavior:"smooth"}),G.classList.remove("semiont-annotation-pulse"),G.offsetWidth,G.classList.add("semiont-annotation-pulse"),p&&p()}else console.warn("[ReferencesPanel] Element not found for scrollToAnnotationId:",m)},[m]),_.useEffect(()=>{if(!O)return;const G=V.current.get(O);if(!G||!P.current)return;const re=P.current,R=G.getBoundingClientRect(),ge=re.getBoundingClientRect();if(!(R.top>=ge.top&&R.bottom<=ge.bottom)){const ve=G.offsetTop,Xe=re.clientHeight,Ne=G.offsetHeight,Ze=ve-Xe/2+Ne/2;re.scrollTo({top:Ze,behavior:"smooth"})}},[O]);const $=_.useCallback(({annotationId:G})=>{D(G),setTimeout(()=>D(null),3e3)},[]);Ma({"browse:click":$});const q=()=>{j(null),x==null||x.client.emit("mark:assist-request",{motivation:"linking",options:{entityTypes:w,includeDescriptiveReferences:A}})},ee=_.useRef(!1);_.useEffect(()=>{if(t){ee.current=!1;return}!t&&!ee.current&&(n!=null&&n.completedEntityTypes)&&(ee.current=!0,j(n.completedEntityTypes),k([]))},[t,n==null?void 0:n.completedEntityTypes]);const le=G=>{Q(re=>re.includes(G)?re.filter(R=>R!==G):[...re,G])},I=()=>{if(f){const G=E.join(",")||void 0;x==null||x.client.emit("mark:submit",{motivation:"linking",selector:f.selector,body:G?[{type:"TextualBody",value:G,purpose:"tagging"}]:[]}),Q([])}};return _.useEffect(()=>{if(!f)return;const G=re=>{re.key==="Escape"&&(x==null||x.client.emit("mark:cancel-pending",void 0),Q([]))};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[f,x]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Ad,{annotationType:"reference",count:e.length,title:b("title")}),f&&f.motivation==="linking"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"reference",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const G=aJ(f.selector);return G?`"${G.substring(0,100)}${G.length>100?"...":""}"`:b("fragmentSelected")})()}),s.length>0&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("p",{className:"semiont-form-field__label",children:b("entityTypesOptional")}),g.jsx("div",{className:"semiont-tag-selector",children:s.map(G=>g.jsx("button",{onClick:()=>le(G),className:"semiont-tag-selector__item","data-selected":E.includes(G)?"true":"false",children:G},G))})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{x==null||x.client.emit("mark:cancel-pending",void 0),Q([])},className:"semiont-button semiont-button--secondary","data-type":"reference",children:b("cancel")}),g.jsxs("button",{onClick:I,className:"semiont-button semiont-button--primary","data-type":"reference",children:["🔗 ",b("createReference")]})]})})]}),g.jsxs("div",{ref:P,className:"semiont-panel__content",children:[r&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>X(!B),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":B,type:"button",children:[g.jsx("span",{children:b("annotateReferences")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":B,children:"›"})]}),B&&g.jsxs(g.Fragment,{children:[!t&&g.jsx("div",{className:"semiont-assist-widget","data-type":"reference",children:g.jsxs(g.Fragment,{children:[T&&T.length>0&&g.jsx("div",{className:"semiont-assist-widget__log",children:g.jsx("div",{className:"semiont-assist-widget__log-items",children:T.map((G,re)=>g.jsxs("div",{className:"semiont-assist-widget__log-item",children:[g.jsx("span",{className:"semiont-assist-widget__log-check",children:"✓"}),g.jsxs("span",{className:"semiont-assist-widget__log-type",children:[G.entityType,":"]}),g.jsx("span",{children:b("found",{count:G.foundCount})})]},re))})}),g.jsxs("div",{className:"semiont-assist-widget__entity-types",children:[g.jsx("p",{className:"semiont-assist-widget__label",children:b("selectEntityTypes")}),g.jsx("div",{className:"semiont-assist-widget__chips",children:s.length>0?s.map(G=>g.jsx("button",{onClick:()=>{k(re=>re.includes(G)?re.filter(R=>R!==G):[...re,G])},"aria-pressed":w.includes(G),"aria-label":`${w.includes(G)?b("deselect"):b("select")} ${G}`,className:"semiont-chip semiont-chip--selectable","data-selected":w.includes(G),children:G},G)):g.jsx("p",{className:"semiont-assist-widget__no-types",children:b("noEntityTypes")})})]}),w.length>0&&g.jsx("p",{className:"semiont-assist-widget__count",children:b("typesSelected",{count:w.length})}),g.jsxs("div",{className:"semiont-assist-widget__checkbox-group",children:[g.jsxs("label",{className:"semiont-assist-widget__checkbox-label",children:[g.jsx("input",{type:"checkbox",checked:A,onChange:G=>M(G.target.checked),className:"semiont-assist-widget__checkbox"}),g.jsx("span",{children:b("includeDescriptiveReferences")})]}),g.jsx("p",{className:"semiont-assist-widget__checkbox-hint",children:b("descriptiveReferencesTooltip")})]}),g.jsxs("button",{onClick:q,disabled:w.length===0,title:b("annotate"),className:"semiont-button","data-variant":"assist","data-type":"reference",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:b("annotate")})]})]})}),t&&n&&g.jsx(VV,{progress:n,annotationType:"reference"})]})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[b("outgoingReferences")," (",z.length,")"]})}),g.jsx("div",{className:"semiont-panel__list",children:z.length===0?g.jsx("p",{className:"semiont-panel__empty-message",children:b("noReferences")}):z.map(G=>g.jsx(iJ,{reference:G,isFocused:G.id===L,isHovered:G.id===O,routes:a,annotateMode:r,isGenerating:G.id===l,ref:re=>Y(G.id,re)},G.id))})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[b("incomingReferences")," (",c.length,")",d&&g.jsxs("span",{className:"semiont-panel__loading-indicator",children:["(",b("loading"),")"]})]})}),c.length>0?g.jsx("div",{className:"semiont-panel__list",children:c.map(G=>{var R;const re=G.target.source;return g.jsxs("div",{className:"semiont-reference-item semiont-reference-item--incoming",children:[g.jsxs("div",{className:"semiont-reference-item__header",children:[g.jsx("span",{className:"semiont-reference-item__title",children:G.resourceName||b("untitledResource")}),g.jsx(i,{href:a.resourceDetail(re),className:"semiont-reference-item__link",title:b("open"),children:"🔗"})]}),g.jsxs("span",{className:"semiont-reference-item__excerpt",children:['"',((R=G.target.selector)==null?void 0:R.exact)||b("noText"),'"']})]},G.id)})}):g.jsx("p",{className:"semiont-panel__empty-message semiont-panel__empty-message--small",children:b(d?"loadingEllipsis":"noIncomingReferences")})]})]})]})}function oJ({resourceId:e,documentEntityTypes:t,documentLocale:n,primaryMediaType:r,primaryByteSize:i,storageUri:a,isArchived:s=!1,dateCreated:l,dateModified:c,creationMethod:d,wasAttributedTo:f,wasDerivedFrom:m,generator:p}){const O=un("ResourceInfoPanel"),b=Le(st().activeSession$);return g.jsxs("div",{className:"semiont-resource-info-panel",children:[g.jsx("h3",{className:"semiont-resource-info-panel__title",children:O("title")}),g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("locale")}),n?g.jsx("div",{className:"semiont-resource-info-panel__value",children:W$(n)}):g.jsx("div",{className:"semiont-resource-info-panel__value semiont-resource-info-panel__value--empty",children:O("notSpecified")})]}),(r||i!==void 0)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("representation")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[r&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("mediaType")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:r})]}),i!==void 0&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("byteSize")}),g.jsxs("span",{className:"semiont-resource-info-panel__value",children:[i.toLocaleString()," bytes"]})]}),a&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("storageUri")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:a})]})]})]}),(l||c||d||f||m||p)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("provenance")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[l&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("createdAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(l).toLocaleString()})]}),c&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("modifiedAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(c).toLocaleString()})]}),d&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("creationMethod")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:d})]}),f&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("attributedTo")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(f)?f:[f]).map(x=>x.name).join(", ")})]}),m&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("derivedFrom")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(m)?m:[m]).map((x,w)=>g.jsxs("button",{className:"semiont-resource-info-panel__link",onClick:()=>b==null?void 0:b.client.emit("browse:reference-navigate",{resourceId:x}),children:[w>0&&", ",x]},x))})]}),p&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:O("generatedBy")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(p)?p:[p]).map(x=>x.name).join(", ")})]})]})]}),t.length>0&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:O("entityTypeTags")}),g.jsx("div",{className:"semiont-resource-info-panel__tag-list",children:t.map(x=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:x},x))})]}),g.jsxs("div",{className:"semiont-resource-info-panel__action-section",children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.emit("yield:clone",void 0),className:"semiont-resource-button semiont-resource-button--secondary",children:["🔗 ",O("clone")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("cloneDescription")})]}),g.jsx("div",{className:"semiont-resource-info-panel__action-section",children:s?g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.emit("mark:unarchive",{resourceId:Hi(e)}),className:"semiont-resource-button semiont-resource-button--secondary",children:["📤 ",O("unarchive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("unarchiveDescription")})]}):g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.emit("mark:archive",{resourceId:Hi(e)}),className:"semiont-resource-button semiont-resource-button--archive",children:["📦 ",O("archive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:O("archiveDescription")})]})})]})}function lJ({highlights:e,comments:t,assessments:n,references:r,tags:i}){const a=un("StatisticsPanel"),s=r.filter(f=>!Vu(f.body)).length,l=r.filter(f=>Vu(f.body)).length,c=new Map;r.forEach(f=>{YP(f).forEach(p=>{c.set(p,(c.get(p)||0)+1)})});const d=Array.from(c.entries()).sort((f,m)=>m[1]-f[1]);return g.jsx("div",{className:"semiont-statistics-panel",children:g.jsxs("div",{className:"semiont-statistics-panel__content",children:[g.jsx("h2",{className:"semiont-statistics-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-statistics-panel__list",children:[g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("highlights")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:e.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("comments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:t.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("assessments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:n.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("tags")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:i.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("references")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:r.length}),g.jsxs("div",{className:"semiont-statistics-panel__subitems",children:[g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("stub")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:s})]}),g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("resolved")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:l})]})]})]}),d.length>0&&g.jsxs("div",{className:"semiont-statistics-panel__entity-types",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("entityTypes")}),g.jsx("div",{className:"semiont-statistics-panel__entity-list",children:d.map(([f,m])=>g.jsxs("div",{className:"semiont-statistics-panel__entity-item",children:[g.jsx("span",{className:"semiont-statistics-panel__entity-name",children:f}),g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:m})]},f))})]})]})]})})}function cJ({tag:e,isFocused:t,isHovered:n=!1,ref:r}){const i=Le(st().activeSession$),a=wd(e.id),s=gd(e),l=$B(e),c=qB(e),d=c?DB(c):null;return g.jsxs("div",{ref:r,onClick:()=>{i==null||i.client.emit("browse:click",{annotationId:e.id,motivation:e.motivation})},...a,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"tag","data-focused":t?"true":"false",children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsx("span",{className:"semiont-tag-badge","data-variant":"tag",children:l}),d&&g.jsx("span",{className:"semiont-annotation-entry__meta",children:d.name})]}),g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"tag",children:['"',s.substring(0,150),s.length>150?"...":"",'"']}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function uJ(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function dJ({annotations:e,annotateMode:t=!0,isAssisting:n=!1,progress:r,pendingAnnotation:i,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:l}){const c=un("TaggingPanel"),d=Le(st().activeSession$),[f,m]=_.useState("legal-irac"),[p,O]=_.useState(new Set),[b,x]=_.useState(null),w=_.useRef(null),[k,T]=_.useState(()=>{if(typeof window>"u")return!0;const z=localStorage.getItem("assist-section-expanded-tag");return z?z==="true":!0});_.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-tag",String(k))},[k]);const j=_.useCallback(({annotationId:z})=>{x(z),setTimeout(()=>x(null),3e3)},[]);Ma({"browse:click":j});const E=_.useRef(new Map),Q=_.useMemo(()=>[...e].sort((z,Y)=>{const $=si(An(z.target)),q=si(An(Y.target));return!$||!q?0:$.start-q.start}),[e]),A=_.useCallback((z,Y)=>{Y?E.current.set(z,Y):E.current.delete(z)},[]);_.useEffect(()=>{if(!a)return;const z=E.current.get(a);if(z&&w.current){const Y=z.offsetTop,$=w.current.clientHeight,q=z.offsetHeight,ee=Y-$/2+q/2;w.current.scrollTo({top:ee,behavior:"smooth"}),z.classList.remove("semiont-annotation-pulse"),z.offsetWidth,z.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),_.useEffect(()=>{if(!l)return;const z=E.current.get(l);if(!z||!w.current)return;const Y=w.current,$=z.getBoundingClientRect(),q=Y.getBoundingClientRect();if(!($.top>=q.top&&$.bottom<=q.bottom)){const le=z.offsetTop,I=Y.clientHeight,G=z.offsetHeight,re=le-I/2+G/2;Y.scrollTo({top:re,behavior:"smooth"})}},[l]);const M=zB(),L=M.find(z=>z.id===f),D=z=>{m(z),O(new Set)},P=z=>{const Y=new Set(p);Y.has(z)?Y.delete(z):Y.add(z),O(Y)},B=()=>{L&&O(new Set(L.tags.map(z=>z.name)))},X=()=>{O(new Set)},V=()=>{p.size>0&&(d==null||d.client.emit("mark:assist-request",{motivation:"tagging",options:{schemaId:f,categories:Array.from(p)}}),O(new Set))};return _.useEffect(()=>{if(!i)return;const z=Y=>{Y.key==="Escape"&&(d==null||d.client.emit("mark:cancel-pending",void 0))};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[i,d]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Ad,{annotationType:"tag",count:e.length,title:c("title")}),g.jsxs("div",{ref:w,className:"semiont-panel__content",children:[i&&i.motivation==="tagging"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"tag",children:[g.jsx("h3",{className:"semiont-annotation-prompt__title",children:c("createTagForSelection")}),g.jsx("div",{className:"semiont-annotation-prompt__quote",children:g.jsx("p",{className:"semiont-annotation-prompt__text",children:(()=>{const z=uJ(i.selector);return z?`"${z.substring(0,100)}${z.length>100?"...":""}"`:c("fragmentSelected")})()})}),g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectSchema")}),g.jsx("select",{value:f,onChange:z=>D(z.target.value),className:"semiont-select",children:M.map(z=>g.jsx("option",{value:z.id,children:c(`schema${z.id==="legal-irac"?"Legal":z.id==="scientific-imrad"?"Scientific":"Argument"}`)},z.id))})]}),L&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectCategory")}),g.jsxs("select",{className:"semiont-select",onChange:z=>{z.target.value&&i&&(d==null||d.client.emit("mark:submit",{motivation:"tagging",selector:i.selector,body:[{type:"TextualBody",value:z.target.value,purpose:"tagging"},{type:"TextualBody",value:f,purpose:"classifying"}]}))},defaultValue:"",children:[g.jsx("option",{value:"",children:c("chooseCategory")}),L.tags.map(z=>g.jsx("option",{value:z.name,children:z.name},z.name))]})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsx("button",{onClick:()=>d==null?void 0:d.client.emit("mark:cancel-pending",void 0),className:"semiont-button semiont-button--secondary","data-type":"tag",children:c("cancel")})})]}),t&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>T(!k),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":k,type:"button",children:[g.jsx("span",{children:c("annotateTags")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":k,children:"›"})]}),k&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":n&&r?"true":"false","data-type":"tag",children:[!n&&!r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectSchema")}),g.jsx("select",{value:f,onChange:z=>D(z.target.value),className:"semiont-select",children:M.map(z=>g.jsx("option",{value:z.id,children:c(`schema${z.id==="legal-irac"?"Legal":z.id==="scientific-imrad"?"Scientific":"Argument"}`)},z.id))}),L&&g.jsx("p",{className:"semiont-form__help",children:L.description})]}),L&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:c("selectCategories")}),g.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"0.75rem"},children:[g.jsx("button",{onClick:B,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:c("selectAll")}),g.jsx("button",{onClick:X,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:c("deselectAll")})]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:L.tags.map(z=>g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{type:"checkbox",id:`category-${z.name.replace(/\s+/g,"-")}`,checked:p.has(z.name),onChange:()=>P(z.name),className:"semiont-checkbox"}),g.jsxs("label",{htmlFor:`category-${z.name.replace(/\s+/g,"-")}`,className:"semiont-form__checkbox-label",style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("span",{style:{fontWeight:500},children:c(`category${z.name.replace(/\s+/g,"")}`)}),g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-secondary)"},children:z.description})]})]},z.name))}),g.jsx("p",{className:"semiont-form__help",children:c("categoriesSelected",{count:p.size})})]})]}),g.jsxs("button",{onClick:V,disabled:p.size===0||n,className:"semiont-button","data-variant":"assist","data-type":"tag",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:c("annotate")})]}),n&&r&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":"tag",children:[r.requestParams&&r.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":"tag",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),r.requestParams.map((z,Y)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[z.label,":"]})," ",z.value]},Y))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:r.message})]}),r.currentCategory&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",r.currentCategory,r.processedCategories!==void 0&&r.totalCategories!==void 0&&g.jsxs(g.Fragment,{children:[" (",r.processedCategories,"/",r.totalCategories,")"]})]})]}),r.percentage!==void 0&&g.jsx("div",{className:"semiont-progress-bar",children:g.jsx("div",{className:"semiont-progress-bar__fill","data-type":"tag",style:{width:`${r.percentage}%`}})})]})]})]}),g.jsx("div",{className:"semiont-panel__list",children:Q.length===0?g.jsx("p",{className:"semiont-panel__empty",children:c("noTags")}):Q.map(z=>g.jsx(cJ,{tag:z,isFocused:z.id===b,isHovered:z.id===l,ref:Y=>A(z.id,Y)},z.id))})]})]})}var bC=["statistics","reference","highlight","assessment","comment","tag"];function fJ(e){const t=un("UnifiedAnnotationsPanel"),n={highlight:[],comment:[],assessment:[],reference:[],tag:[]};for(const c of e.annotations){const d=Object.values(e.annotators).find(f=>f.matchesAnnotation(c));d&&(n[d.internalType]||(n[d.internalType]=[]),n[d.internalType].push(c))}const r=n,[i,a]=_.useState(()=>{if(typeof window>"u")return e.initialTab||"statistics";const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global",d=localStorage.getItem(c);return d&&bC.includes(d)?d:e.initialTab||"statistics"});_.useEffect(()=>{if(typeof window>"u")return;const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global";localStorage.setItem(c,i)},[i,e.resourceId]),_.useEffect(()=>{e.initialTab&&e.initialTabGeneration!==void 0&&a(e.initialTab)},[e.initialTabGeneration]),_.useEffect(()=>{if(e.pendingAnnotation){const d={linking:"reference",commenting:"comment",tagging:"tag",assessing:"assessment",highlighting:"highlight"}[e.pendingAnnotation.motivation];d&&a(d)}},[e.pendingAnnotation]);const s=c=>{a(c)},l=c=>`semiont-unified-panel__tab-button${i===c?" semiont-unified-panel__tab-button--active":""}`;return g.jsxs("div",{className:"semiont-unified-panel",children:[g.jsx("h3",{className:"semiont-unified-panel__title",children:t("title")}),g.jsx("div",{className:"semiont-unified-panel__tabs",children:bC.map(c=>{if(c==="statistics")return g.jsx("button",{onClick:()=>s(c),className:l(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:"📊"})},c);const d=e.annotators[c];return d?g.jsx("button",{onClick:()=>s(c),className:l(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:d.iconEmoji})},c):null})}),g.jsx("div",{className:"semiont-unified-panel__content",children:(()=>{if(i==="statistics")return g.jsx(lJ,{highlights:r.highlight||[],comments:r.comment||[],assessments:r.assessment||[],references:r.reference||[],tags:r.tag||[]});const c=e.annotators[i];if(!c)return null;const d=r[i]||[],f=e.assistingMotivation===c.motivation,m=f?e.progress??null:null,p={annotations:d,pendingAnnotation:e.pendingAnnotation,isAssisting:f,progress:m,annotateMode:e.annotateMode,locale:e.locale,scrollToAnnotationId:e.scrollToAnnotationId,onScrollCompleted:e.onScrollCompleted,hoveredAnnotationId:e.hoveredAnnotationId};return i==="highlight"?g.jsx(nJ,{...p}):i==="reference"?g.jsx(sJ,{annotations:p.annotations,pendingAnnotation:p.pendingAnnotation,isAssisting:p.isAssisting,progress:p.progress,annotateMode:p.annotateMode,scrollToAnnotationId:p.scrollToAnnotationId,onScrollCompleted:p.onScrollCompleted,hoveredAnnotationId:p.hoveredAnnotationId,allEntityTypes:e.allEntityTypes||[],generatingReferenceId:e.generatingReferenceId,referencedBy:e.referencedBy,referencedByLoading:e.referencedByLoading,Link:e.Link,routes:e.routes}):i==="assessment"?g.jsx(WK,{...p}):i==="comment"?g.jsx(JK,{...p}):i==="tag"?g.jsx(dJ,{...p}):null})()})]})}function hJ({Link:e,routes:t,t:n,CookiePreferences:r,onOpenKeyboardHelp:i,sourceCodeUrl:a="https://github.com/The-AI-Alliance/semiont",showPolicyLinks:s=!0}){var d,f,m;const[l,c]=_.useState(!1);return g.jsxs(g.Fragment,{children:[g.jsx("footer",{role:"contentinfo",className:"semiont-footer",children:g.jsx("div",{className:"semiont-footer__container",children:g.jsxs("div",{className:"semiont-footer__content",children:[g.jsx("div",{className:"semiont-footer__copyright",children:n("copyright",{year:new Date().getFullYear()})}),g.jsxs("div",{className:"semiont-footer__links",children:[s&&g.jsxs(g.Fragment,{children:[g.jsx(e,{href:((d=t.about)==null?void 0:d.call(t))||"/about",className:"semiont-footer__link",children:n("about")}),g.jsx(e,{href:((f=t.privacy)==null?void 0:f.call(t))||"/privacy",className:"semiont-footer__link",children:n("privacyPolicy")}),r&&g.jsx("button",{onClick:()=>c(!0),className:"semiont-footer__link",children:n("cookiePreferences")}),g.jsx(e,{href:((m=t.terms)==null?void 0:m.call(t))||"/terms",className:"semiont-footer__link",children:n("termsOfService")})]}),i&&g.jsxs("button",{onClick:i,className:"semiont-footer__link semiont-footer__link--keyboard",children:[n("keyboardShortcuts"),g.jsx("kbd",{className:"semiont-footer__kbd",children:"?"})]}),g.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"semiont-footer__link",children:n("sourceCode")})]})]})})}),s&&r&&g.jsx(r,{isOpen:l,onClose:()=>c(!1)})]})}function By({Link:e,routes:t,t:n,isAdmin:r=!1,isModerator:i=!1,onItemClick:a,className:s="",currentPath:l}){var f,m,p,O,b,x;const c=s?`semiont-navigation-menu ${s}`:"semiont-navigation-menu",d=w=>l?l===w||l.startsWith(w+"/"):!1;return g.jsxs("nav",{className:c,"aria-label":"Main navigation",children:[g.jsx(e,{href:((f=t.knowledge)==null?void 0:f.call(t))||"/know",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((m=t.knowledge)==null?void 0:m.call(t))||"/know")?"page":void 0,children:n("know")}),(i||r)&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((p=t.moderate)==null?void 0:p.call(t))||"/moderate",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((O=t.moderate)==null?void 0:O.call(t))||"/moderate")?"page":void 0,children:n("moderate")})]}),r&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((b=t.admin)==null?void 0:b.call(t))||"/admin",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((x=t.admin)==null?void 0:x.call(t))||"/admin")?"page":void 0,children:n("administer")})]})]})}function Cre({title:e,items:t,currentPath:n,LinkComponent:r,dropdownContent:i,isCollapsed:a,icons:s,collapseSidebarLabel:l,expandSidebarLabel:c}){const d=s.chevronLeft,f=s.bars,[m,p]=_.useState(!1),O=_.useRef(null),b=st(),x=()=>p(!m),w=()=>p(!1);return _.useEffect(()=>{const k=T=>{O.current&&!O.current.contains(T.target)&&w()};if(m)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[m]),g.jsxs("div",{className:"semiont-simple-nav",children:[g.jsxs("div",{style:{position:"relative"},ref:i?O:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[i?g.jsx("button",{onClick:x,className:"semiont-nav-section__header-button","aria-expanded":m,"aria-haspopup":"true",type:"button",children:!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e})}):!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e}),g.jsx("button",{onClick:()=>b.emit("shell:sidebar-toggle",void 0),className:"semiont-nav-section__header-icon",title:a?c:l,"aria-label":a?c:l,type:"button",children:a?g.jsx(f,{}):g.jsx(d,{})})]}),m&&i&&!a&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:i(w)})]}),!a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(k=>{const T=n===k.href;return g.jsxs(r,{href:k.href,className:`semiont-nav-tab ${T?"semiont-nav-tab--active":""}`,title:k.description||k.name,"aria-current":T?"page":void 0,children:[g.jsx(k.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:k.name})]},k.href)})}),a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(k=>{const T=n===k.href;return g.jsx(r,{href:k.href,className:`semiont-nav-tab ${T?"semiont-nav-tab--active":""}`,title:k.description||k.name,"aria-current":T?"page":void 0,"aria-label":k.name,children:g.jsx(k.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},k.href)})})]})}function mJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}var fp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Mx(e){return"nodeType"in e}function xr(e){var t,n;return e?lc(e)?e:Mx(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Lx(e){const{Document:t}=xr(e);return e instanceof t}function Pd(e){return lc(e)?!1:e instanceof xr(e).HTMLElement}function o5(e){return e instanceof xr(e).SVGElement}function cc(e){return e?lc(e)?e.document:Mx(e)?Lx(e)?e:Pd(e)||o5(e)?e.ownerDocument:document:document:document}var Ki=fp?_.useLayoutEffect:_.useEffect;function Dx(e){const t=_.useRef(e);return Ki(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function pJ(){const e=_.useRef(null),t=_.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=_.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function dd(e,t){t===void 0&&(t=[e]);const n=_.useRef(e);return Ki(()=>{n.current!==e&&(n.current=e)},t),n}function Nd(e,t){const n=_.useRef();return _.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Cm(e){const t=Dx(e),n=_.useRef(null),r=_.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function Vy(e){const t=_.useRef();return _.useEffect(()=>{t.current=e},[e]),t.current}var YO={};function Rd(e,t){return _.useMemo(()=>{if(t)return t;const n=YO[e]==null?0:YO[e]+1;return YO[e]=n,e+"-"+n},[e,t])}function l5(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((a,s)=>{const l=Object.entries(s);for(const[c,d]of l){const f=a[c];f!=null&&(a[c]=f+e*d)}return a},{...t})}}var Ml=l5(1),fd=l5(-1);function gJ(e){return"clientX"in e&&"clientY"in e}function zx(e){if(!e)return!1;const{KeyboardEvent:t}=xr(e.target);return t&&e instanceof t}function vJ(e){if(!e)return!1;const{TouchEvent:t}=xr(e.target);return t&&e instanceof t}function Uy(e){if(vJ(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return gJ(e)?{x:e.clientX,y:e.clientY}:null}var hd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[hd.Translate.toString(e),hd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),yC="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function OJ(e){return e.matches(yC)?e:e.querySelector(yC)}var bJ={display:"none"};function yJ(e){let{id:t,value:n}=e;return ue.createElement("div",{id:t,style:bJ},n)}function xJ(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ue.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function SJ(){const[e,t]=_.useState("");return{announce:_.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}var c5=_.createContext(null);function wJ(e){const t=_.useContext(c5);_.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function _J(){const[e]=_.useState(()=>new Set),t=_.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[_.useCallback(r=>{let{type:i,event:a}=r;e.forEach(s=>{var l;return(l=s[i])==null?void 0:l.call(s,a)})},[e]),t]}var kJ={draggable:`
164
+ To pick up a draggable item, press the space bar.
165
+ While dragging, use the arrow keys to move the item.
166
+ Press space again to drop the item in its new position, or press escape to cancel.
167
+ `},jJ={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function TJ(e){let{announcements:t=jJ,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=kJ}=e;const{announce:a,announcement:s}=SJ(),l=Rd("DndLiveRegion"),[c,d]=_.useState(!1);if(_.useEffect(()=>{d(!0)},[]),wJ(_.useMemo(()=>({onDragStart(m){let{active:p}=m;a(t.onDragStart({active:p}))},onDragMove(m){let{active:p,over:O}=m;t.onDragMove&&a(t.onDragMove({active:p,over:O}))},onDragOver(m){let{active:p,over:O}=m;a(t.onDragOver({active:p,over:O}))},onDragEnd(m){let{active:p,over:O}=m;a(t.onDragEnd({active:p,over:O}))},onDragCancel(m){let{active:p,over:O}=m;a(t.onDragCancel({active:p,over:O}))}}),[a,t])),!c)return null;const f=ue.createElement(ue.Fragment,null,ue.createElement(yJ,{id:r,value:i.draggable}),ue.createElement(xJ,{id:l,announcement:s}));return n?go.createPortal(f,n):f}var wn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(wn||(wn={}));function Em(){}function xC(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function CJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}var ji=Object.freeze({x:0,y:0});function u5(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function d5(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function EJ(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function SC(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function f5(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function wC(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var QJ=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=wC(t,t.left,t.top),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const d=u5(wC(c),i);a.push({id:l,data:{droppableContainer:s,value:d}})}}return a.sort(d5)},AJ=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=SC(t),a=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const d=SC(c),f=i.reduce((p,O,b)=>p+u5(d[b],O),0),m=Number((f/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:m}})}}return a.sort(d5)};function PJ(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=i-r,l=a-n;if(r<i&&n<a){const c=t.width*t.height,d=e.width*e.height,f=s*l,m=f/(c+d-f);return Number(m.toFixed(4))}return 0}var NJ=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const c=PJ(l,t);c>0&&i.push({id:s,data:{droppableContainer:a,value:c}})}}return i.sort(EJ)};function RJ(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function h5(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ji}function MJ(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return i.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}var LJ=MJ(1);function DJ(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function zJ(e,t,n){const r=DJ(t);if(!r)return e;const{scaleX:i,scaleY:a,x:s,y:l}=r,c=e.left-s-(1-i)*parseFloat(n),d=e.top-l-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,m=a?e.height/a:e.height;return{width:f,height:m,top:d,right:c+f,bottom:d+m,left:c}}var $J={ignoreTransform:!1};function uc(e,t){t===void 0&&(t=$J);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:f}=xr(e).getComputedStyle(e);d&&(n=zJ(n,d,f))}const{top:r,left:i,width:a,height:s,bottom:l,right:c}=n;return{top:r,left:i,width:a,height:s,bottom:l,right:c}}function _C(e){return uc(e,{ignoreTransform:!0})}function qJ(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function IJ(e,t){return t===void 0&&(t=xr(e).getComputedStyle(e)),t.position==="fixed"}function XJ(e,t){t===void 0&&(t=xr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function hp(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Lx(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Pd(i)||o5(i)||n.includes(i))return n;const a=xr(e).getComputedStyle(i);return i!==e&&XJ(i,a)&&n.push(i),IJ(i,a)?n:r(i.parentNode)}return e?r(e):n}function m5(e){const[t]=hp(e,1);return t??null}function WO(e){return!fp||!e?null:lc(e)?e:Mx(e)?Lx(e)||e===cc(e).scrollingElement?window:Pd(e)?e:null:null}function p5(e){return lc(e)?e.scrollX:e.scrollLeft}function g5(e){return lc(e)?e.scrollY:e.scrollTop}function Yy(e){return{x:p5(e),y:g5(e)}}var Qn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Qn||(Qn={}));function v5(e){return!fp||!e?!1:e===document.scrollingElement}function O5(e){const t={x:0,y:0},n=v5(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:a,isBottom:s,isRight:l,maxScroll:r,minScroll:t}}var ZJ={x:.2,y:.2};function BJ(e,t,n,r,i){let{top:a,left:s,right:l,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=ZJ);const{isTop:d,isBottom:f,isLeft:m,isRight:p}=O5(e),O={x:0,y:0},b={x:0,y:0},x={height:t.height*i.y,width:t.width*i.x};return!d&&a<=t.top+x.height?(O.y=Qn.Backward,b.y=r*Math.abs((t.top+x.height-a)/x.height)):!f&&c>=t.bottom-x.height&&(O.y=Qn.Forward,b.y=r*Math.abs((t.bottom-x.height-c)/x.height)),!p&&l>=t.right-x.width?(O.x=Qn.Forward,b.x=r*Math.abs((t.right-x.width-l)/x.width)):!m&&s<=t.left+x.width&&(O.x=Qn.Backward,b.x=r*Math.abs((t.left+x.width-s)/x.width)),{direction:O,speed:b}}function VJ(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function b5(e){return e.reduce((t,n)=>Ml(t,Yy(n)),ji)}function UJ(e){return e.reduce((t,n)=>t+p5(n),0)}function YJ(e){return e.reduce((t,n)=>t+g5(n),0)}function WJ(e,t){if(t===void 0&&(t=uc),!e)return;const{top:n,left:r,bottom:i,right:a}=t(e);m5(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var FJ=[["x",["left","right"],UJ],["y",["top","bottom"],YJ]],$x=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=hp(t),r=b5(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,a,s]of FJ)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(n),d=r[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Du=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function HJ(e){const{EventTarget:t}=xr(e);return e instanceof t?e:cc(e)}function FO(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Kr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Kr||(Kr={}));function kC(e){e.preventDefault()}function GJ(e){e.stopPropagation()}var ft;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ft||(ft={}));var y5={start:[ft.Space,ft.Enter],cancel:[ft.Esc],end:[ft.Space,ft.Enter,ft.Tab]},KJ=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ft.Right:return{...n,x:n.x+25};case ft.Left:return{...n,x:n.x-25};case ft.Down:return{...n,y:n.y+25};case ft.Up:return{...n,y:n.y-25}}},qx=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Du(cc(t)),this.windowListeners=new Du(xr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kr.Resize,this.handleCancel),this.windowListeners.add(Kr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Kr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&WJ(n),t(ji)}handleKeyDown(e){if(zx(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=y5,coordinateGetter:a=KJ,scrollBehavior:s="smooth"}=r,{code:l}=e;if(i.end.includes(l)){this.handleEnd(e);return}if(i.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:ji;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(e,{active:t,context:n.current,currentCoordinates:d});if(f){const m=fd(f,d),p={x:0,y:0},{scrollableAncestors:O}=n.current;for(const b of O){const x=e.code,{isTop:w,isRight:k,isLeft:T,isBottom:j,maxScroll:E,minScroll:Q}=O5(b),A=VJ(b),M={x:Math.min(x===ft.Right?A.right-A.width/2:A.right,Math.max(x===ft.Right?A.left:A.left+A.width/2,f.x)),y:Math.min(x===ft.Down?A.bottom-A.height/2:A.bottom,Math.max(x===ft.Down?A.top:A.top+A.height/2,f.y))},L=x===ft.Right&&!k||x===ft.Left&&!T,D=x===ft.Down&&!j||x===ft.Up&&!w;if(L&&M.x!==f.x){const P=b.scrollLeft+m.x,B=x===ft.Right&&P<=E.x||x===ft.Left&&P>=Q.x;if(B&&!m.y){b.scrollTo({left:P,behavior:s});return}B?p.x=b.scrollLeft-P:p.x=x===ft.Right?b.scrollLeft-E.x:b.scrollLeft-Q.x,p.x&&b.scrollBy({left:-p.x,behavior:s});break}else if(D&&M.y!==f.y){const P=b.scrollTop+m.y,B=x===ft.Down&&P<=E.y||x===ft.Up&&P>=Q.y;if(B&&!m.x){b.scrollTo({top:P,behavior:s});return}B?p.y=b.scrollTop-P:p.y=x===ft.Down?b.scrollTop-E.y:b.scrollTop-Q.y,p.y&&b.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(e,Ml(fd(f,this.referenceCoordinates),p))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};qx.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=y5,onActivation:i}=t,{active:a}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function jC(e){return!!(e&&"distance"in e)}function TC(e){return!!(e&&"delay"in e)}var Ix=class{constructor(e,t,n){var r;n===void 0&&(n=HJ(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=cc(a),this.documentListeners=new Du(this.document),this.listeners=new Du(n),this.windowListeners=new Du(xr(a)),this.initialCoordinates=(r=Uy(i))!=null?r:ji,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Kr.Resize,this.handleCancel),this.windowListeners.add(Kr.DragStart,kC),this.windowListeners.add(Kr.VisibilityChange,this.handleCancel),this.windowListeners.add(Kr.ContextMenu,kC),this.documentListeners.add(Kr.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(TC(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(jC(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Kr.Click,GJ,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kr.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!r)return;const l=(t=Uy(e))!=null?t:ji,c=fd(r,l);if(!n&&s){if(jC(s)){if(s.tolerance!=null&&FO(c,s.tolerance))return this.handleCancel();if(FO(c,s.distance))return this.handleStart()}if(TC(s)&&FO(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===ft.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},JJ={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Xx=class extends Ix{constructor(e){const{event:t}=e,n=cc(t.target);super(e,JJ,n)}};Xx.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];var eee={move:{name:"mousemove"},end:{name:"mouseup"}},Wy;(function(e){e[e.RightClick=2]="RightClick"})(Wy||(Wy={}));var tee=class extends Ix{constructor(e){super(e,eee,cc(e.event.target))}};tee.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Wy.RightClick?!1:(r==null||r({event:n}),!0)}}];var HO={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},nee=class extends Ix{constructor(e){super(e,HO)}static setup(){return window.addEventListener(HO.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(HO.move.name,e)};function e(){}}};nee.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var zu;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(zu||(zu={}));var Qm;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Qm||(Qm={}));function ree(e){let{acceleration:t,activator:n=zu.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:l=Qm.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:f,delta:m,threshold:p}=e;const O=aee({delta:m,disabled:!a}),[b,x]=pJ(),w=_.useRef({x:0,y:0}),k=_.useRef({x:0,y:0}),T=_.useMemo(()=>{switch(n){case zu.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case zu.DraggableRect:return i}},[n,i,c]),j=_.useRef(null),E=_.useCallback(()=>{const A=j.current;if(!A)return;const M=w.current.x*k.current.x,L=w.current.y*k.current.y;A.scrollBy(M,L)},[]),Q=_.useMemo(()=>l===Qm.TreeOrder?[...d].reverse():d,[l,d]);_.useEffect(()=>{if(!a||!d.length||!T){x();return}for(const A of Q){if((r==null?void 0:r(A))===!1)continue;const M=d.indexOf(A),L=f[M];if(!L)continue;const{direction:D,speed:P}=BJ(A,L,T,t,p);for(const B of["x","y"])O[B][D[B]]||(P[B]=0,D[B]=0);if(P.x>0||P.y>0){x(),j.current=A,b(E,s),w.current=P,k.current=D;return}}w.current={x:0,y:0},k.current={x:0,y:0},x()},[t,E,r,x,a,s,JSON.stringify(T),JSON.stringify(O),b,d,Q,f,JSON.stringify(p)])}var iee={x:{[Qn.Backward]:!1,[Qn.Forward]:!1},y:{[Qn.Backward]:!1,[Qn.Forward]:!1}};function aee(e){let{delta:t,disabled:n}=e;const r=Vy(t);return Nd(i=>{if(n||!r||!i)return iee;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Qn.Backward]:i.x[Qn.Backward]||a.x===-1,[Qn.Forward]:i.x[Qn.Forward]||a.x===1},y:{[Qn.Backward]:i.y[Qn.Backward]||a.y===-1,[Qn.Forward]:i.y[Qn.Forward]||a.y===1}}},[n,t,r])}function see(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Nd(i=>{var a;return t==null?null:(a=r??i)!=null?a:null},[r,t])}function oee(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,a=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...a]},[]),[e,t])}var md;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(md||(md={}));var Fy;(function(e){e.Optimized="optimized"})(Fy||(Fy={}));var CC=new Map;function lee(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=_.useState(null),{frequency:l,measure:c,strategy:d}=i,f=_.useRef(e),m=w(),p=dd(m),O=_.useCallback(function(k){k===void 0&&(k=[]),!p.current&&s(T=>T===null?k:T.concat(k.filter(j=>!T.includes(j))))},[p]),b=_.useRef(null),x=Nd(k=>{if(m&&!n)return CC;if(!k||k===CC||f.current!==e||a!=null){const T=new Map;for(let j of e){if(!j)continue;if(a&&a.length>0&&!a.includes(j.id)&&j.rect.current){T.set(j.id,j.rect.current);continue}const E=j.node.current,Q=E?new $x(c(E),E):null;j.rect.current=Q,Q&&T.set(j.id,Q)}return T}return k},[e,a,n,m,c]);return _.useEffect(()=>{f.current=e},[e]),_.useEffect(()=>{m||O()},[n,m]),_.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),_.useEffect(()=>{m||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{O(),b.current=null},l))},[l,m,O,...r]),{droppableRects:x,measureDroppableContainers:O,measuringScheduled:a!=null};function w(){switch(d){case md.Always:return!1;case md.BeforeDragging:return n;default:return!n}}}function x5(e,t){return Nd(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function cee(e,t){return x5(e,t)}function uee(e){let{callback:t,disabled:n}=e;const r=Dx(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function mp(e){let{callback:t,disabled:n}=e;const r=Dx(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function dee(e){return new $x(uc(e),e)}function EC(e,t,n){t===void 0&&(t=dee);const[r,i]=_.useState(null);function a(){i(c=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=c??n)!=null?d:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const s=uee({callback(c){if(e)for(const d of c){const{type:f,target:m}=d;if(f==="childList"&&m instanceof HTMLElement&&m.contains(e)){a();break}}}}),l=mp({callback:a});return Ki(()=>{a(),e?(l==null||l.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),s==null||s.disconnect())},[e]),r}function fee(e){const t=x5(e);return h5(e,t)}var QC=[];function hee(e){const t=_.useRef(e),n=Nd(r=>e?r&&r!==QC&&e&&t.current&&e.parentNode===t.current.parentNode?r:hp(e):QC,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function mee(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(a=>{const s=WO(a.target);s&&n(l=>l?(l.set(s,Yy(s)),new Map(l)):null)},[]);return _.useEffect(()=>{const a=r.current;if(e!==a){s(a);const l=e.map(c=>{const d=WO(c);return d?(d.addEventListener("scroll",i,{passive:!0}),[d,Yy(d)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(c=>{const d=WO(c);d==null||d.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>Ml(a,s),ji):b5(e):ji,[e,t])}function AC(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==ji;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?fd(e,n.current):ji}function pee(e){_.useEffect(()=>{if(!fp)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function gee(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:a}=r;return n[i]=s=>{a(s,t)},n},{}),[e,t])}function S5(e){return _.useMemo(()=>e?qJ(e):null,[e])}var PC=[];function vee(e,t){t===void 0&&(t=uc);const[n]=e,r=S5(n?xr(n):null),[i,a]=_.useState(PC);function s(){a(()=>e.length?e.map(c=>v5(c)?r:new $x(t(c),c)):PC)}const l=mp({callback:s});return Ki(()=>{l==null||l.disconnect(),s(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),i}function Oee(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Pd(t)?t:e}function bee(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(d=>{for(const{target:f}of d)if(Pd(f)){r(m=>{const p=t(f);return m?{...m,width:p.width,height:p.height}:p});break}},[t]),a=mp({callback:i}),s=_.useCallback(d=>{const f=Oee(d);a==null||a.disconnect(),f&&(a==null||a.observe(f)),r(f?t(f):null)},[t,a]),[l,c]=Cm(s);return _.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}var yee=[{sensor:Xx,options:{}},{sensor:qx,options:{}}],xee={current:{}},Kh={draggable:{measure:_C},droppable:{measure:_C,strategy:md.WhileDragging,frequency:Fy.Optimized},dragOverlay:{measure:uc}},$u=class extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}},See={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new $u,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Em},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Kh,measureDroppableContainers:Em,windowRect:null,measuringScheduled:!1},wee={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Em,draggableNodes:new Map,over:null,measureDroppableContainers:Em},pp=_.createContext(wee),w5=_.createContext(See);function _ee(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new $u}}}function kee(e,t){switch(t.type){case wn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case wn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case wn.DragEnd:case wn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case wn.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new $u(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case wn.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const s=new $u(e.droppable.containers);return s.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case wn.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new $u(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function jee(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(pp),a=Vy(r),s=Vy(n==null?void 0:n.id);return _.useEffect(()=>{if(!t&&!r&&a&&s!=null){if(!zx(a)||document.activeElement===a.target)return;const l=i.get(s);if(!l)return;const{activatorNode:c,node:d}=l;if(!c.current&&!d.current)return;requestAnimationFrame(()=>{for(const f of[c.current,d.current]){if(!f)continue;const m=OJ(f);if(m){m.focus();break}}})}},[r,t,i,s,a]),null}function Tee(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...r}),n):n}function Cee(e){return _.useMemo(()=>({draggable:{...Kh.draggable,...e==null?void 0:e.draggable},droppable:{...Kh.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Kh.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Eee(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=_.useRef(!1),{x:s,y:l}=typeof i=="boolean"?{x:i,y:i}:i;Ki(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!r)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const f=n(d),m=h5(f,r);if(s||(m.x=0),l||(m.y=0),a.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const p=m5(d);p&&p.scrollBy({top:m.y,left:m.x})}},[t,s,l,r,n])}var _5=_.createContext({...ji,scaleX:1,scaleY:1}),Os;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Os||(Os={}));var Qee=_.memo(function(t){var n,r,i,a;let{id:s,accessibility:l,autoScroll:c=!0,children:d,sensors:f=yee,collisionDetection:m=NJ,measuring:p,modifiers:O,...b}=t;const x=_.useReducer(kee,void 0,_ee),[w,k]=x,[T,j]=_J(),[E,Q]=_.useState(Os.Uninitialized),A=E===Os.Initialized,{draggable:{active:M,nodes:L,translate:D},droppable:{containers:P}}=w,B=M!=null?L.get(M):null,X=_.useRef({initial:null,translated:null}),V=_.useMemo(()=>{var $t;return M!=null?{id:M,data:($t=B==null?void 0:B.data)!=null?$t:xee,rect:X}:null},[M,B]),z=_.useRef(null),[Y,$]=_.useState(null),[q,ee]=_.useState(null),le=dd(b,Object.values(b)),I=Rd("DndDescribedBy",s),G=_.useMemo(()=>P.getEnabled(),[P]),re=Cee(p),{droppableRects:R,measureDroppableContainers:ge,measuringScheduled:_e}=lee(G,{dragging:A,dependencies:[D.x,D.y],config:re.droppable}),ve=see(L,M),Xe=_.useMemo(()=>q?Uy(q):null,[q]),Ne=fi(),Ze=cee(ve,re.draggable.measure);Eee({activeNode:M!=null?L.get(M):null,config:Ne.layoutShiftCompensation,initialRect:Ze,measure:re.draggable.measure});const be=EC(ve,re.draggable.measure,Ze),Fe=EC(ve?ve.parentElement:null),Se=_.useRef({activatorEvent:null,active:null,activeNode:ve,collisionRect:null,collisions:null,droppableRects:R,draggableNodes:L,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ve=P.getNodeFor((n=Se.current.over)==null?void 0:n.id),ot=bee({measure:re.dragOverlay.measure}),vt=(r=ot.nodeRef.current)!=null?r:ve,et=A?(i=ot.rect)!=null?i:be:null,yn=!!(ot.nodeRef.current&&ot.rect),Te=fee(yn?null:be),lt=S5(vt?xr(vt):null),me=hee(A?Ve??ve:null),Ot=vee(me),Dt=Tee(O,{transform:{x:D.x-Te.x,y:D.y-Te.y,scaleX:1,scaleY:1},activatorEvent:q,active:V,activeNodeRect:be,containerNodeRect:Fe,draggingNodeRect:et,over:Se.current.over,overlayNodeRect:ot.rect,scrollableAncestors:me,scrollableAncestorRects:Ot,windowRect:lt}),Wt=Xe?Ml(Xe,D):null,tt=mee(me),Un=AC(tt),ie=AC(tt,[be]),de=Ml(Dt,Un),Qe=et?LJ(et,Dt):null,Be=V&&Qe?m({active:V,collisionRect:Qe,droppableRects:R,droppableContainers:G,pointerCoordinates:Wt}):null,nt=f5(Be,"id"),[zt,zn]=_.useState(null),sn=yn?Dt:Ml(Dt,ie),Zt=RJ(sn,(a=zt==null?void 0:zt.rect)!=null?a:null,be),Jt=_.useRef(null),mt=_.useCallback(($t,Bt)=>{let{sensor:Pt,options:jn}=Bt;if(z.current==null)return;const Tn=L.get(z.current);if(!Tn)return;const on=$t.nativeEvent,Cn=new Pt({active:z.current,activeNode:Tn,event:on,options:jn,context:Se,onAbort(Gt){if(!L.get(Gt))return;const{onDragAbort:je}=le.current,Je={id:Gt};je==null||je(Je),T({type:"onDragAbort",event:Je})},onPending(Gt,Yn,je,Je){if(!L.get(Gt))return;const{onDragPending:Sr}=le.current,Wn={id:Gt,constraint:Yn,initialCoordinates:je,offset:Je};Sr==null||Sr(Wn),T({type:"onDragPending",event:Wn})},onStart(Gt){const Yn=z.current;if(Yn==null)return;const je=L.get(Yn);if(!je)return;const{onDragStart:Je}=le.current,dn={activatorEvent:on,active:{id:Yn,data:je.data,rect:X}};go.unstable_batchedUpdates(()=>{Je==null||Je(dn),Q(Os.Initializing),k({type:wn.DragStart,initialCoordinates:Gt,active:Yn}),T({type:"onDragStart",event:dn}),$(Jt.current),ee(on)})},onMove(Gt){k({type:wn.DragMove,coordinates:Gt})},onEnd:$n(wn.DragEnd),onCancel:$n(wn.DragCancel)});Jt.current=Cn;function $n(Gt){return async function(){const{active:je,collisions:Je,over:dn,scrollAdjustedTranslate:Sr}=Se.current;let Wn=null;if(je&&Sr){const{cancelDrop:zr}=le.current;Wn={activatorEvent:on,active:je,collisions:Je,delta:Sr,over:dn},Gt===wn.DragEnd&&typeof zr=="function"&&await Promise.resolve(zr(Wn))&&(Gt=wn.DragCancel)}z.current=null,go.unstable_batchedUpdates(()=>{k({type:Gt}),Q(Os.Uninitialized),zn(null),$(null),ee(null),Jt.current=null;const zr=Gt===wn.DragEnd?"onDragEnd":"onDragCancel";if(Wn){const rr=le.current[zr];rr==null||rr(Wn),T({type:zr,event:Wn})}})}}},[L]),nr=_.useCallback(($t,Bt)=>(Pt,jn)=>{const Tn=Pt.nativeEvent,on=L.get(jn);if(z.current!==null||!on||Tn.dndKit||Tn.defaultPrevented)return;const Cn={active:on};$t(Pt,Bt.options,Cn)===!0&&(Tn.dndKit={capturedBy:Bt.sensor},z.current=jn,mt(Pt,Bt))},[L,mt]),kn=oee(f,nr);pee(f),Ki(()=>{be&&E===Os.Initializing&&Q(Os.Initialized)},[be,E]),_.useEffect(()=>{const{onDragMove:$t}=le.current,{active:Bt,activatorEvent:Pt,collisions:jn,over:Tn}=Se.current;if(!Bt||!Pt)return;const on={active:Bt,activatorEvent:Pt,collisions:jn,delta:{x:de.x,y:de.y},over:Tn};go.unstable_batchedUpdates(()=>{$t==null||$t(on),T({type:"onDragMove",event:on})})},[de.x,de.y]),_.useEffect(()=>{const{active:$t,activatorEvent:Bt,collisions:Pt,droppableContainers:jn,scrollAdjustedTranslate:Tn}=Se.current;if(!$t||z.current==null||!Bt||!Tn)return;const{onDragOver:on}=le.current,Cn=jn.get(nt),$n=Cn&&Cn.rect.current?{id:Cn.id,rect:Cn.rect.current,data:Cn.data,disabled:Cn.disabled}:null,Gt={active:$t,activatorEvent:Bt,collisions:Pt,delta:{x:Tn.x,y:Tn.y},over:$n};go.unstable_batchedUpdates(()=>{zn($n),on==null||on(Gt),T({type:"onDragOver",event:Gt})})},[nt]),Ki(()=>{Se.current={activatorEvent:q,active:V,activeNode:ve,collisionRect:Qe,collisions:Be,droppableRects:R,draggableNodes:L,draggingNode:vt,draggingNodeRect:et,droppableContainers:P,over:zt,scrollableAncestors:me,scrollAdjustedTranslate:de},X.current={initial:et,translated:Qe}},[V,ve,Be,Qe,L,vt,et,R,P,zt,me,de]),ree({...Ne,delta:D,draggingRect:Qe,pointerCoordinates:Wt,scrollableAncestors:me,scrollableAncestorRects:Ot});const Is=_.useMemo(()=>({active:V,activeNode:ve,activeNodeRect:be,activatorEvent:q,collisions:Be,containerNodeRect:Fe,dragOverlay:ot,draggableNodes:L,droppableContainers:P,droppableRects:R,over:zt,measureDroppableContainers:ge,scrollableAncestors:me,scrollableAncestorRects:Ot,measuringConfiguration:re,measuringScheduled:_e,windowRect:lt}),[V,ve,be,q,Be,Fe,ot,L,P,R,zt,ge,me,Ot,re,_e,lt]),Ei=_.useMemo(()=>({activatorEvent:q,activators:kn,active:V,activeNodeRect:be,ariaDescribedById:{draggable:I},dispatch:k,draggableNodes:L,over:zt,measureDroppableContainers:ge}),[q,kn,V,be,k,I,L,zt,ge]);return ue.createElement(c5.Provider,{value:j},ue.createElement(pp.Provider,{value:Ei},ue.createElement(w5.Provider,{value:Is},ue.createElement(_5.Provider,{value:Zt},d)),ue.createElement(jee,{disabled:(l==null?void 0:l.restoreFocus)===!1})),ue.createElement(TJ,{...l,hiddenTextDescribedById:I}));function fi(){const $t=(Y==null?void 0:Y.autoScrollEnabled)===!1,Bt=typeof c=="object"?c.enabled===!1:c===!1,Pt=A&&!$t&&!Bt;return typeof c=="object"?{...c,enabled:Pt}:{enabled:Pt}}}),Aee=_.createContext(null),NC="button",Pee="Draggable";function Nee(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=Rd(Pee),{activators:s,activatorEvent:l,active:c,activeNodeRect:d,ariaDescribedById:f,draggableNodes:m,over:p}=_.useContext(pp),{role:O=NC,roleDescription:b="draggable",tabIndex:x=0}=i??{},w=(c==null?void 0:c.id)===t,k=_.useContext(w?_5:Aee),[T,j]=Cm(),[E,Q]=Cm(),A=gee(s,t),M=dd(n);Ki(()=>(m.set(t,{id:t,key:a,node:T,activatorNode:E,data:M}),()=>{const D=m.get(t);D&&D.key===a&&m.delete(t)}),[m,t]);const L=_.useMemo(()=>({role:O,tabIndex:x,"aria-disabled":r,"aria-pressed":w&&O===NC?!0:void 0,"aria-roledescription":b,"aria-describedby":f.draggable}),[r,O,x,w,b,f.draggable]);return{active:c,activatorEvent:l,activeNodeRect:d,attributes:L,isDragging:w,listeners:r?void 0:A,node:T,over:p,setNodeRef:j,setActivatorNodeRef:Q,transform:k}}function Ree(){return _.useContext(w5)}var Mee="Droppable",Lee={timeout:25};function Dee(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=Rd(Mee),{active:s,dispatch:l,over:c,measureDroppableContainers:d}=_.useContext(pp),f=_.useRef({disabled:n}),m=_.useRef(!1),p=_.useRef(null),O=_.useRef(null),{disabled:b,updateMeasurementsFor:x,timeout:w}={...Lee,...i},k=dd(x??r),T=_.useCallback(()=>{if(!m.current){m.current=!0;return}O.current!=null&&clearTimeout(O.current),O.current=setTimeout(()=>{d(Array.isArray(k.current)?k.current:[k.current]),O.current=null},w)},[w]),j=mp({callback:T,disabled:b||!s}),E=_.useCallback((L,D)=>{j&&(D&&(j.unobserve(D),m.current=!1),L&&j.observe(L))},[j]),[Q,A]=Cm(E),M=dd(t);return _.useEffect(()=>{!j||!Q.current||(j.disconnect(),m.current=!1,j.observe(Q.current))},[Q,j]),_.useEffect(()=>(l({type:wn.RegisterDroppable,element:{id:r,key:a,disabled:n,node:Q,rect:p,data:M}}),()=>l({type:wn.UnregisterDroppable,key:a,id:r})),[r]),_.useEffect(()=>{n!==f.current.disabled&&(l({type:wn.SetDroppableDisabled,id:r,key:a,disabled:n}),f.current.disabled=n)},[r,a,n,l]),{active:s,rect:p,isOver:(c==null?void 0:c.id)===r,node:Q,over:c,setNodeRef:A}}function k5(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function zee(e,t){return e.reduce((n,r,i)=>{const a=t.get(r);return a&&(n[i]=a),n},Array(e.length))}function Eh(e){return e!==null&&e>=0}function $ee(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function qee(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var j5=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const a=k5(t,r,n),s=t[i],l=a[i];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},Qh={scaleX:1,scaleY:1},Iee=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:a,overIndex:s}=e;const l=(t=a[n])!=null?t:r;if(!l)return null;if(i===n){const d=a[s];return d?{x:0,y:n<s?d.top+d.height-(l.top+l.height):d.top-l.top,...Qh}:null}const c=Xee(a,i,n);return i>n&&i<=s?{x:0,y:-l.height-c,...Qh}:i<n&&i>=s?{x:0,y:l.height+c,...Qh}:{x:0,y:0,...Qh}};function Xee(e,t,n){const r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var T5="Sortable",C5=ue.createContext({activeIndex:-1,containerId:T5,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:j5,disabled:{draggable:!1,droppable:!1}});function Zee(e){let{children:t,id:n,items:r,strategy:i=j5,disabled:a=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:d,measureDroppableContainers:f}=Ree(),m=Rd(T5,n),p=l.rect!==null,O=_.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),b=s!=null,x=s?O.indexOf(s.id):-1,w=d?O.indexOf(d.id):-1,k=_.useRef(O),T=!$ee(O,k.current),j=w!==-1&&x===-1||T,E=qee(a);Ki(()=>{T&&b&&f(O)},[T,O,b,f]),_.useEffect(()=>{k.current=O},[O]);const Q=_.useMemo(()=>({activeIndex:x,containerId:m,disabled:E,disableTransforms:j,items:O,overIndex:w,useDragOverlay:p,sortedRects:zee(O,c),strategy:i}),[x,m,E.draggable,E.droppable,j,O,w,c,p,i]);return ue.createElement(C5.Provider,{value:Q},t)}var Bee=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return k5(n,r,i).indexOf(t)},Vee=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:s,previousItems:l,previousContainerId:c,transition:d}=e;return!d||!r||l!==a&&i===s?!1:n?!0:s!==i&&t===c},Uee={duration:200,easing:"ease"},E5="transform",Yee=hd.Transition.toString({property:E5,duration:0,easing:"linear"}),Wee={roleDescription:"sortable"};function Fee(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=_.useState(null),l=_.useRef(n);return Ki(()=>{if(!t&&n!==l.current&&r.current){const c=i.current;if(c){const d=uc(r.current,{ignoreTransform:!0}),f={x:c.left-d.left,y:c.top-d.top,scaleX:c.width/d.width,scaleY:c.height/d.height};(f.x||f.y)&&s(f)}}n!==l.current&&(l.current=n)},[t,n,r,i]),_.useEffect(()=>{a&&s(null)},[a]),a}function Hee(e){let{animateLayoutChanges:t=Vee,attributes:n,disabled:r,data:i,getNewIndex:a=Bee,id:s,strategy:l,resizeObserverConfig:c,transition:d=Uee}=e;const{items:f,containerId:m,activeIndex:p,disabled:O,disableTransforms:b,sortedRects:x,overIndex:w,useDragOverlay:k,strategy:T}=_.useContext(C5),j=Gee(r,O),E=f.indexOf(s),Q=_.useMemo(()=>({sortable:{containerId:m,index:E,items:f},...i}),[m,i,E,f]),A=_.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:M,node:L,isOver:D,setNodeRef:P}=Dee({id:s,data:Q,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...c}}),{active:B,activatorEvent:X,activeNodeRect:V,attributes:z,setNodeRef:Y,listeners:$,isDragging:q,over:ee,setActivatorNodeRef:le,transform:I}=Nee({id:s,data:Q,attributes:{...Wee,...n},disabled:j.draggable}),G=mJ(P,Y),re=!!B,R=re&&!b&&Eh(p)&&Eh(w),ge=!k&&q,_e=ge&&R?I:null,Xe=R?_e??(l??T)({rects:x,activeNodeRect:V,activeIndex:p,overIndex:w,index:E}):null,Ne=Eh(p)&&Eh(w)?a({id:s,items:f,activeIndex:p,overIndex:w}):E,Ze=B==null?void 0:B.id,be=_.useRef({activeId:Ze,items:f,newIndex:Ne,containerId:m}),Fe=f!==be.current.items,Se=t({active:B,containerId:m,isDragging:q,isSorting:re,id:s,index:E,items:f,newIndex:be.current.newIndex,previousItems:be.current.items,previousContainerId:be.current.containerId,transition:d,wasDragging:be.current.activeId!=null}),Ve=Fee({disabled:!Se,index:E,node:L,rect:M});return _.useEffect(()=>{re&&be.current.newIndex!==Ne&&(be.current.newIndex=Ne),m!==be.current.containerId&&(be.current.containerId=m),f!==be.current.items&&(be.current.items=f)},[re,Ne,m,f]),_.useEffect(()=>{if(Ze===be.current.activeId)return;if(Ze!=null&&be.current.activeId==null){be.current.activeId=Ze;return}const vt=setTimeout(()=>{be.current.activeId=Ze},50);return()=>clearTimeout(vt)},[Ze]),{active:B,activeIndex:p,attributes:z,data:Q,rect:M,index:E,newIndex:Ne,items:f,isOver:D,isSorting:re,isDragging:q,listeners:$,node:L,overIndex:w,over:ee,setNodeRef:G,setActivatorNodeRef:le,setDroppableNodeRef:P,setDraggableNodeRef:Y,transform:Ve??Xe,transition:ot()};function ot(){if(Ve||Fe&&be.current.newIndex===E)return Yee;if(!(ge&&!zx(X)||!d)&&(re||Se))return hd.Transition.toString({...d,property:E5})}}function Gee(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Am(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var Kee=[ft.Down,ft.Right,ft.Up,ft.Left],Jee=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:s,scrollableAncestors:l}}=t;if(Kee.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];a.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const p=i.get(m.id);if(p)switch(e.code){case ft.Down:r.top<p.top&&c.push(m);break;case ft.Up:r.top>p.top&&c.push(m);break;case ft.Left:r.left>p.left&&c.push(m);break;case ft.Right:r.left<p.left&&c.push(m);break}});const d=AJ({collisionRect:r,droppableRects:i,droppableContainers:c});let f=f5(d,"id");if(f===(s==null?void 0:s.id)&&d.length>1&&(f=d[1].id),f!=null){const m=a.get(n.id),p=a.get(f),O=p?i.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&O&&m&&p){const w=hp(b).some((A,M)=>l[M]!==A),k=Q5(m,p),T=ete(m,p),j=w||!k?{x:0,y:0}:{x:T?r.width-O.width:0,y:T?r.height-O.height:0},E={x:O.left,y:O.top};return j.x&&j.y?E:fd(E,j)}}}};function Q5(e,t){return!Am(e)||!Am(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function ete(e,t){return!Am(e)||!Am(t)||!Q5(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function RC({resource:e,isCollapsed:t,isActive:n,href:r,onClose:i,onReorder:a,index:s,totalCount:l,LinkComponent:c,translations:d={},isDragging:f=!1}){const{attributes:m,listeners:p,setNodeRef:O,transform:b,transition:x,isDragging:w}=Hee({id:e.id}),k=_.useRef(a);_.useEffect(()=>{k.current=a});const T={transform:hd.Transform.toString(b),transition:x,opacity:w||f?.5:1},j=VP(e.mediaType),E=w||f,Q=e.storageUri?e.storageUri.replace(/^file:\/\//,""):e.name,A=_.useCallback(M=>{k.current&&M.altKey&&(M.key==="ArrowUp"?(M.preventDefault(),k.current(e.id,"up")):M.key==="ArrowDown"&&(M.preventDefault(),k.current(e.id,"down")))},[e.id]);return g.jsxs("div",{ref:O,style:T,...m,...p,"aria-selected":n,onKeyDown:A,"aria-label":`${e.name}, position ${s!==void 0?s+1:""} of ${l||""}`,className:`semiont-resource-tab ${n?"semiont-resource-tab--active":""} ${E?"semiont-resource-tab--dragging":""}`,role:"tab",children:[g.jsxs(c,{href:r,className:"semiont-resource-tab__link",title:Q,children:[g.jsx("span",{className:"semiont-resource-tab__icon","aria-hidden":"true",children:j}),!t&&g.jsx("span",{className:"semiont-resource-tab__text",children:e.name})]}),!t&&g.jsx("button",{onClick:M=>i(e.id,M),className:"semiont-resource-tab__close",title:d.closeResource||"Close resource","aria-label":`Close ${e.name}`,type:"button",children:g.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",width:"16",height:"16",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function tte(){const{announce:e}=ic(),t=_.useCallback(l=>{e(l,"assertive")},[e]),n=_.useCallback((l,c,d)=>{e(`Picked up ${l}. Position ${c} of ${d}. Use arrow keys to move, space to drop.`,"assertive")},[e]),r=_.useCallback((l,c,d)=>{e(`Dropped ${l} at position ${c} of ${d}.`,"assertive")},[e]),i=_.useCallback((l,c,d,f)=>{e(`Moved ${l} ${c} to position ${d} of ${f}.`,"polite")},[e]),a=_.useCallback((l,c,d,f)=>{e(`${l} moved ${c} to position ${d} of ${f}.`,"assertive")},[e]),s=_.useCallback(l=>{e(`Cannot move ${l}. Already at the ${l==="up"?"top":"bottom"} of the list.`,"polite")},[e]);return{announceReorder:t,announcePickup:n,announceDrop:r,announceMove:i,announceKeyboardReorder:a,announceCannotMove:s}}function Ere({fixedItems:e,resources:t,isCollapsed:n,currentPath:r,LinkComponent:i,onNavigate:a,getResourceHref:s,className:l="",translations:c={},icons:d,navigationMenu:f}){const m=d.chevronLeft,p=d.bars,[O,b]=_.useState(!1),x=_.useRef(null),{announcePickup:w,announceDrop:k,announceKeyboardReorder:T,announceCannotMove:j}=tte(),E=un("CollapsibleResourceNavigation"),Q=st(),A={title:(c==null?void 0:c.title)||E("title"),collapseSidebar:(c==null?void 0:c.collapseSidebar)||E("collapseSidebar"),expandSidebar:(c==null?void 0:c.expandSidebar)||E("expandSidebar"),dragToReorder:(c==null?void 0:c.dragToReorder)||E("dragToReorder"),dragToReorderDoc:(c==null?void 0:c.dragToReorderDoc)||E("dragToReorderDoc"),closeResource:(c==null?void 0:c.closeResource)||E("closeResource"),dragInstructions:(c==null?void 0:c.dragInstructions)||E("dragInstructions")},M=()=>b(!O),L=()=>b(!1);_.useEffect(()=>{const z=Y=>{x.current&&!x.current.contains(Y.target)&&L()};if(O)return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[O]);const D=CJ(xC(Xx,{activationConstraint:{distance:8}}),xC(qx,{coordinateGetter:Jee})),P=_.useCallback((z,Y)=>{const $=t.findIndex(le=>le.id===z);if($===-1)return;const q=Y==="up"?$-1:$+1;if(q<0||q>=t.length){j(Y);return}Q.emit("tabs:reorder",{oldIndex:$,newIndex:q});const ee=t[$];T(ee.name,Y,q+1,t.length)},[t,Q]),B=(z,Y)=>{Y.preventDefault(),Y.stopPropagation(),Q.emit("tabs:close",{resourceId:z});const $=s(z);r===$&&a&&e.length>0&&a(e[0].href)},X=z=>{const{active:Y}=z,$=t.find(q=>q.id===Y.id);if($){const q=t.indexOf($);w($.name,q+1,t.length)}},V=z=>{const{active:Y,over:$}=z;if($&&Y.id!==$.id){const q=t.findIndex(le=>le.id===Y.id),ee=t.findIndex(le=>le.id===$.id);if(q!==-1&&ee!==-1){Q.emit("tabs:reorder",{oldIndex:q,newIndex:ee});const le=t[q];k(le.name,ee+1,t.length)}}};return g.jsxs("div",{className:`semiont-collapsible-nav ${l}`,children:[g.jsx("div",{id:"drag-instructions",className:"sr-only","aria-live":"polite",children:A.dragInstructions}),g.jsx("div",{className:"sr-only",role:"status","aria-atomic":"true",children:"Resources can be reordered using Alt+Up or Alt+Down arrow keys."}),g.jsxs("div",{className:"semiont-collapsible-nav__container",children:[g.jsxs("div",{style:{position:"relative"},ref:f?x:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[!n&&f&&g.jsx("button",{onClick:M,className:"semiont-nav-section__header-text","aria-expanded":O,"aria-haspopup":"true",type:"button",children:A.title}),!n&&!f&&g.jsx("span",{className:"semiont-nav-section__header-text",children:A.title}),g.jsx("button",{onClick:()=>Q.emit("shell:sidebar-toggle",void 0),className:"semiont-nav-section__header-icon",title:n?A.expandSidebar:A.collapseSidebar,"aria-label":n?A.expandSidebar:A.collapseSidebar,type:"button",children:n?g.jsx(p,{}):g.jsx(m,{})})]}),O&&f&&!n&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:f(L)})]}),!n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map(z=>{const Y=r===z.href;return g.jsxs(i,{href:z.href,className:`semiont-nav-tab ${Y?"semiont-nav-tab--active":""}`,title:z.description||z.name,"aria-current":Y?"page":void 0,children:[g.jsx(z.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:z.name})]},z.href)})}),n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map(z=>{const Y=r===z.href;return g.jsx(i,{href:z.href,className:`semiont-nav-tab ${Y?"semiont-nav-tab--active":""}`,title:z.description||z.name,"aria-current":Y?"page":void 0,"aria-label":z.name,children:g.jsx(z.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},z.href)})}),g.jsx("div",{className:"semiont-resource-tabs",role:"tablist","aria-label":"Open resources",children:n?t.map(z=>{const Y=s(z.id),$=r===Y;return g.jsx(RC,{resource:z,isCollapsed:n,isActive:$,href:Y,onClose:B,LinkComponent:i,translations:{dragToReorder:A.dragToReorder,dragToReorderDoc:A.dragToReorderDoc,closeResource:A.closeResource}},z.id)}):g.jsx(Qee,{sensors:D,collisionDetection:QJ,onDragStart:X,onDragEnd:V,children:g.jsx(Zee,{items:t.map(z=>z.id),strategy:Iee,children:t.map((z,Y)=>{const $=s(z.id),q=r===$;return g.jsx(RC,{resource:z,isCollapsed:n,isActive:q,href:$,onClose:B,onReorder:P,index:Y,totalCount:t.length,LinkComponent:i,translations:{dragToReorder:A.dragToReorder,dragToReorderDoc:A.dragToReorderDoc,closeResource:A.closeResource}},z.id)})})})})]})]})}function A5({context:e,translations:t}){const n=e.graphContext,r=(n==null?void 0:n.connections)??[],i=(n==null?void 0:n.citedBy)??[],a=(n==null?void 0:n.citedByCount)??0;return g.jsx(g.Fragment,{children:n&&(r.length>0||a>0)&&g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[r.length>0&&g.jsxs("div",{children:[g.jsx("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:t.connectionsLabel}),g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.375rem",listStyle:"none",padding:0,margin:0},children:r.map(s=>g.jsxs("li",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.375rem",fontSize:"var(--semiont-text-sm)"},children:[g.jsx("span",{style:{color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName}),s.bidirectional&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:"mutual"}),s.entityTypes&&s.entityTypes.map(l=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:l},l))]},s.resourceId))})]}),a>0&&g.jsxs("div",{children:[g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:[t.citedByLabel," (",a,")"]}),i.length>0&&g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.25rem",listStyle:"none",padding:0,margin:0},children:i.map(s=>g.jsx("li",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName},s.resourceId))})]})]})})}function nte({context:e,contextLoading:t,contextError:n,userHint:r,onUserHintChange:i,onBind:a,onGenerate:s,onCompose:l,translations:c}){var b,x,w;const[d,f]=_.useState(!1),m=!t&&!n&&!!e,p=e==null?void 0:e.sourceContext,O=_.useRef(null);return _.useEffect(()=>{O.current&&O.current.scrollIntoView({block:"center",behavior:"instant"})},[e]),g.jsxs("div",{className:"semiont-gather__outer",children:[t&&g.jsxs("div",{className:"semiont-gather__loading",children:[g.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"})]}),g.jsx("span",{className:"semiont-gather__loading-text",children:c.loadingContext})]}),!!n&&g.jsx("div",{style:{textAlign:"center",padding:"1rem 0",color:"var(--semiont-color-red-600)"},children:c.failedContext}),e&&g.jsxs(g.Fragment,{children:[p&&g.jsxs("div",{className:"semiont-gather__source-strip",children:[g.jsxs("label",{className:"semiont-form__label",style:{marginBottom:"0.375rem"},children:[c.sourceContextLabel,(b=e.sourceResource)!=null&&b.name?` "${e.sourceResource.name}"`:""]}),g.jsxs("div",{className:`semiont-gather__source-box${d?" semiont-gather__source-box--expanded":""}`,children:[g.jsx("div",{className:"semiont-gather__source-context",children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[p.before&&g.jsx("span",{children:p.before}),g.jsx("span",{ref:O,style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:p.selected}),(((x=e.metadata)==null?void 0:x.entityTypes)??[]).map(k=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:k},k)),((w=e.annotation)==null?void 0:w.motivation)&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:e.annotation.motivation}),p.after&&g.jsx("span",{children:p.after})]})}),g.jsx("button",{type:"button",className:"semiont-gather__expand-btn",onClick:()=>f(k=>!k),children:d?"▲ less":"▼ more"})]})]}),g.jsxs("div",{className:"semiont-gather__body",children:[g.jsx("div",{className:"semiont-gather__left",children:g.jsx(A5,{context:e,translations:c})}),g.jsx("div",{className:"semiont-gather__right",children:g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:c.userHintLabel}),g.jsx("textarea",{value:r,onChange:k=>i(k.target.value),placeholder:c.userHintPlaceholder,className:"semiont-search-modal__search-input semiont-gather__hint-textarea",style:{resize:"vertical",fontFamily:"inherit"}})]})})]}),g.jsxs("div",{className:"semiont-gather__footer",children:[g.jsx("div",{className:"semiont-gather__footer-label",children:c.resolutionStrategyLabel}),g.jsxs("div",{className:"semiont-gather__actions",children:[g.jsxs("button",{type:"button",onClick:a,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["🔍 ",c.search,"…"]}),g.jsxs("button",{type:"button",onClick:s,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["✨ ",c.generate,"…"]}),g.jsxs("button",{type:"button",onClick:l,disabled:!m,className:"semiont-button--secondary semiont-button--flex",children:["✍️ ",c.compose]})]})]})]})]})}function rte({defaultTitle:e,locale:t,context:n,onBack:r,onCancel:i,onGenerate:a,translations:s}){const[l,c]=_.useState(e),[d,f]=_.useState(""),[m,p]=_.useState(""),[O,b]=_.useState(t),[x,w]=_.useState(.7),[k,T]=_.useState(500),j=E=>{E.preventDefault();const Q=m.trim();a({title:l,storagePath:`file://${d}`,...Q?{prompt:Q}:{},language:O,temperature:x,maxTokens:k,context:n})};return g.jsxs("form",{onSubmit:j,className:"semiont-form semiont-form--scrollable",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-title",className:"semiont-form__label",children:s.resourceTitle}),g.jsx("input",{id:"wizard-title",type:"text",value:l,onChange:E=>c(E.target.value),required:!0,className:"semiont-input",placeholder:s.resourceTitlePlaceholder})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"wizard-storagePath",type:"text",value:d,onChange:E=>f(E.target.value),required:!0,className:"semiont-input semiont-input--addon",placeholder:"generated/my-resource.md"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-prompt",className:"semiont-form__label",children:s.additionalInstructions}),g.jsx("textarea",{id:"wizard-prompt",value:m,onChange:E=>p(E.target.value),rows:2,className:"semiont-textarea",placeholder:s.additionalInstructionsPlaceholder})]}),g.jsxs("div",{className:"semiont-form__inline-row",children:[g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline",children:[g.jsx("label",{htmlFor:"wizard-language",className:"semiont-form__label",children:s.language}),g.jsx("select",{id:"wizard-language",value:O,onChange:E=>b(E.target.value),className:"semiont-select",children:_l.map(E=>g.jsx("option",{value:E.code,children:E.nativeName},E.code))})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--grow",children:[g.jsxs("label",{htmlFor:"wizard-temperature",className:"semiont-form__label",children:[s.creativity," (",x.toFixed(1),")"]}),g.jsx("input",{id:"wizard-temperature",type:"range",min:"0",max:"1",step:"0.1",value:x,onChange:E=>w(parseFloat(E.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels semiont-slider__labels--small",children:[g.jsx("span",{children:s.creativityFocused}),g.jsx("span",{children:s.creativityCreative})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--narrow",children:[g.jsx("label",{htmlFor:"wizard-maxTokens",className:"semiont-form__label",children:s.maxLength}),g.jsx("input",{id:"wizard-maxTokens",type:"number",min:"100",max:"4000",step:"100",value:k,onChange:E=>T(parseInt(E.target.value)),className:"semiont-input"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",s.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",s.back]}),g.jsxs("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",children:["✨ ",s.generate]})]})]})}function ite({isSearching:e=!1,onBack:t,onCancel:n,onSearch:r,translations:i}){const[a,s]=_.useState(10),[l,c]=_.useState(!0),d=f=>{f.preventDefault(),r({limit:a,useSemanticScoring:l})};return g.jsxs("form",{onSubmit:d,className:"semiont-form",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-limit",className:"semiont-form__label",children:i.maxResults}),g.jsxs("select",{id:"wizard-limit",value:a,onChange:f=>s(parseInt(f.target.value)),className:"semiont-select",children:[g.jsx("option",{value:1,children:"1"}),g.jsx("option",{value:5,children:"5"}),g.jsx("option",{value:10,children:"10"}),g.jsx("option",{value:20,children:"20"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsxs("label",{className:"semiont-form__label",style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[g.jsx("input",{type:"checkbox",checked:l,onChange:f=>c(f.target.checked)}),i.semanticScoring]}),g.jsx("p",{className:"semiont-form__help",children:i.semanticScoringHelp})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:n,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["✕ ",i.cancel]}),g.jsxs("button",{type:"button",onClick:t,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["◀ ",i.back]}),g.jsx("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",disabled:e,"data-generating":e?"true":"false",children:e?`✨ ${i.searching}`:`🔍 ${i.search}`})]})]})}function ate({results:e,context:t,onLink:n,onBack:r,onCancel:i,translations:a}){return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-search-results__two-pane",children:[g.jsx("div",{className:"semiont-search-results__context-pane",children:g.jsx(A5,{context:t,translations:a})}),g.jsx("div",{className:"semiont-search-results__results-pane",children:e.length===0?g.jsx("div",{className:"semiont-modal__empty-state",style:{textAlign:"center",padding:"2rem 0"},children:a.noResults}):e.map(s=>{const l=s["@id"];return g.jsxs("div",{style:{padding:"0.75rem",borderBottom:"1px solid var(--semiont-border-primary)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"0.75rem"},children:[g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsx("div",{style:{fontWeight:500,color:"var(--semiont-text-primary)"},children:s.name}),s.description&&g.jsx("div",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)",marginTop:"0.25rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.description}),g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-tertiary)",marginTop:"0.25rem",display:"flex",gap:"0.5rem"},children:[s.score!==void 0&&g.jsxs("span",{children:[a.score,": ",s.score]}),s.matchReason&&g.jsx("span",{children:s.matchReason})]})]}),g.jsxs("button",{type:"button",onClick:()=>n(l),className:"semiont-button--primary",style:{flexShrink:0},children:["🔗 ",a.link]})]},l)})})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",a.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",a.back]})]})]})}function ste({isOpen:e,onClose:t,annotationId:n,resourceId:r,defaultTitle:i,entityTypes:a,locale:s,context:l,contextLoading:c,contextError:d,onGenerateSubmit:f,onLinkResource:m,onComposeNavigate:p,translations:O}){const b=Le(st().activeSession$),[x,w]=_.useState({step:"gather"}),[k,T]=_.useState(!1),[j,E]=_.useState("");_.useEffect(()=>{e&&(w({step:"gather"}),T(!1),E(""))},[e]),YB("match:search-results",V=>{e&&n&&V.referenceId===n&&(T(!1),w({step:"search-results",results:V.response}))});const Q=_.useCallback(()=>{w({step:"configure-search"})},[]),A=_.useCallback(()=>{w({step:"configure-generation"})},[]),M=_.useCallback(()=>{if(!l||!n||!r)return;const V=j?{...l,userHint:j}:l;p(V,n,r,i,a),t()},[l,n,r,i,a,p,t,j]),L=_.useCallback(()=>{w({step:"gather"})},[]),D=_.useCallback(V=>{if(!n||!l||!r)return;T(!0);const z=j?{...l,userHint:j}:l;b==null||b.client.emit("match:search-requested",{correlationId:crypto.randomUUID(),resourceId:r,referenceId:n,context:z,limit:V.limit,useSemanticScoring:V.useSemanticScoring})},[n,r,l,b,j]),P=_.useCallback(V=>{n&&(f(n,V),t())},[n,f,t]),B=_.useCallback(V=>{n&&(m(n,V),t())},[n,m,t]),X=x.step==="gather"?O.gatherTitle:x.step==="configure-generation"?O.configureGenerationTitle:x.step==="configure-search"?O.configureSearchTitle:O.searchResultsTitle;return g.jsx(Mo,{appear:!0,show:e,children:g.jsxs(ac,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering semiont-search-modal__centering--center",children:g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Lo,{className:`semiont-search-modal__panel semiont-search-modal__panel--with-border${x.step==="search-results"?" semiont-search-modal__panel--wide":""}${x.step==="gather"?" semiont-search-modal__panel--gather":""}`,children:[g.jsxs("div",{className:"semiont-search-modal__header",children:[g.jsx(Cd,{className:"semiont-search-modal__title",children:X}),g.jsx("button",{onClick:t,className:"semiont-search-modal__close-button","aria-label":"Close",children:"✕"})]}),x.step==="gather"&&g.jsx(nte,{context:l,contextLoading:c,contextError:d,userHint:j,onUserHintChange:E,onBind:Q,onGenerate:A,onCompose:M,translations:{title:O.gatherTitle,sourceContextLabel:O.sourceContextLabel,connectionsLabel:O.connectionsLabel,citedByLabel:O.citedByLabel,userHintLabel:O.userHintLabel,userHintPlaceholder:O.userHintPlaceholder,loadingContext:O.loadingContext,failedContext:O.failedContext,search:O.search,generate:O.generate,compose:O.compose,resolutionStrategyLabel:O.resolutionStrategyLabel}}),x.step==="configure-generation"&&l&&g.jsx(rte,{defaultTitle:i,locale:s,context:l,onBack:L,onCancel:t,onGenerate:P,translations:{resourceTitle:O.resourceTitle,resourceTitlePlaceholder:O.resourceTitlePlaceholder,additionalInstructions:O.additionalInstructions,additionalInstructionsPlaceholder:O.additionalInstructionsPlaceholder,language:O.language,languageHelp:O.languageHelp,creativity:O.creativity,creativityFocused:O.creativityFocused,creativityCreative:O.creativityCreative,maxLength:O.maxLength,maxLengthHelp:O.maxLengthHelp,cancel:O.cancel,back:O.back,generate:O.generate}}),x.step==="configure-search"&&g.jsx(ite,{isSearching:k,onBack:L,onCancel:t,onSearch:D,translations:{maxResults:O.maxResults,semanticScoring:O.semanticScoring,semanticScoringHelp:O.semanticScoringHelp,cancel:O.cancel,back:O.back,search:O.search,searching:O.searching}}),x.step==="search-results"&&l&&g.jsx(ate,{results:x.results,context:l,onLink:B,onBack:L,onCancel:t,translations:{noResults:O.noResults,link:O.link,back:O.back,cancel:O.cancel,score:O.score,sourceContextLabel:O.sourceContextLabel,connectionsLabel:O.connectionsLabel,citedByLabel:O.citedByLabel,userHintLabel:O.userHintLabel,userHintPlaceholder:O.userHintPlaceholder}})]})})})})]})})}var ote=Rm(VQ());function lte(){const{announce:e}=ic(),t=_.useCallback(()=>{e("Searching...","polite")},[e]),n=_.useCallback((a,s)=>{e(a===0?`No results found for ${s}`:a===1?`1 result found for ${s}`:`${a} results found for ${s}`,"polite")},[e]),r=_.useCallback((a,s)=>{e(`Selected ${s}: ${a}. Press Enter to navigate.`,"polite")},[e]),i=_.useCallback((a,s)=>{e(`Navigating to ${s}: ${a}`,"assertive")},[e]);return{announceSearching:t,announceSearchResults:n,announceSelection:r,announceNavigation:i}}var cte=300,ute=5;function Qre({isOpen:e,onClose:t,onNavigate:n,translations:r={}}){var T;const{announceSearchResults:i,announceSearching:a}=lte(),s=(T=Le(st().activeSession$))==null?void 0:T.client,l=_.useRef(s);l.current=s;const[c,d]=_.useState(0),f={placeholder:r.placeholder||"Search resources, entities...",searching:r.searching||"Searching...",noResults:r.noResults||"No results found for",startTyping:r.startTyping||"Start typing to search...",navigate:r.navigate||"Navigate",select:r.select||"Select",close:r.close||"Close",enter:r.enter||"Enter",esc:r.esc||"ESC"},[m]=_.useState(()=>KE(j=>l.current.browse.resources({search:j,limit:ute}).pipe((0,ote.map)(E=>{if(E!==void 0)return E.map(Q=>{var M;const A=pb(Q);return A?{type:"resource",id:A,name:Q.name,content:(M=Q.content)==null?void 0:M.substring(0,150)}:null}).filter(Q=>Q!==null)})),{debounceMs:cte}));_.useEffect(()=>()=>m.dispose(),[m]);const p=Le(m.query$)??"",O=Le(m.state$),b=(O==null?void 0:O.results)??[],x=(O==null?void 0:O.isSearching)??!1;_.useEffect(()=>{e&&(m.setQuery(""),d(0))},[e,m]),_.useEffect(()=>{d(0)},[b.length]),_.useEffect(()=>{p.trim()&&(x?a():i(b.length,p))},[x,b.length]);const w=j=>{j.key==="ArrowDown"?(j.preventDefault(),d(E=>(E+1)%Math.max(1,b.length))):j.key==="ArrowUp"?(j.preventDefault(),d(E=>(E-1+Math.max(1,b.length))%Math.max(1,b.length))):j.key==="Enter"&&b[c]&&(j.preventDefault(),k(b[c]))},k=j=>{t(),n(j.type,j.id)};return g.jsx(Mo,{appear:!0,show:e,children:g.jsxs(ac,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering",children:g.jsx(er,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(Lo,{className:"semiont-search-modal__panel",children:[g.jsxs("div",{className:"semiont-search-modal__input-container",children:[g.jsx("div",{className:"semiont-search-modal__search-icon-wrapper",children:g.jsx("svg",{className:"semiont-search-modal__search-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{type:"text",value:p,onChange:j=>m.setQuery(j.target.value),onKeyDown:w,placeholder:f.placeholder,className:"semiont-search-modal__input",autoFocus:!0}),g.jsx("div",{className:"semiont-search-modal__esc-wrapper",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:f.esc})})]}),g.jsxs("div",{className:"semiont-search-modal__results",children:[x&&g.jsx("div",{className:"semiont-search-modal__empty",children:f.searching}),!x&&p&&b.length===0&&g.jsxs("div",{className:"semiont-search-modal__empty",children:[f.noResults,' "',p,'"']}),!x&&b.length>0&&g.jsx("div",{className:"semiont-search-modal__results-list",children:b.map((j,E)=>g.jsxs("button",{onClick:()=>k(j),onMouseEnter:()=>d(E),className:`semiont-search-modal__result ${E===c?"semiont-search-modal__result--selected":""}`,children:[g.jsx("div",{className:"semiont-search-modal__result-icon-wrapper",children:j.type==="resource"?g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--resource",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--entity",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}),g.jsxs("div",{className:"semiont-search-modal__result-content",children:[g.jsxs("div",{className:"semiont-search-modal__result-header",children:[g.jsx("span",{className:"semiont-search-modal__result-name",children:j.name}),j.type==="entity"&&j.entityType&&g.jsx("span",{className:"semiont-search-modal__result-badge",children:j.entityType})]}),j.content&&g.jsx("p",{className:"semiont-search-modal__result-description",children:j.content})]}),E===c&&g.jsx("div",{className:"semiont-search-modal__result-action",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:f.enter})})]},`${j.type}-${j.id}`))}),!x&&!p&&g.jsxs("div",{className:"semiont-search-modal__help",children:[g.jsx("div",{className:"semiont-search-modal__help-text",children:f.startTyping}),g.jsxs("div",{className:"semiont-search-modal__shortcuts",children:[g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"↑↓"}),f.navigate]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:f.enter}),f.select]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"Esc"}),f.close]})]})]})]})]})})})})]})})}Rm(VQ());function dte(){return g.jsx("div",{className:"semiont-skip-links",children:g.jsxs("div",{className:"semiont-skip-links-container",children:[g.jsx("a",{href:"#main-content",className:"semiont-skip-link semiont-skip-link-first",children:"Skip to main content"}),g.jsx("a",{href:"#main-navigation",className:"semiont-skip-link",children:"Skip to navigation"}),g.jsx("a",{href:"#search",className:"semiont-skip-link semiont-skip-link-last",children:"Skip to search"})]})})}function Are({isFullyAuthenticated:e=!1,isAuthenticated:t=!1,hasValidBackendToken:n=!1}){var p;const r=(p=Le(st().activeSession$))==null?void 0:p.client,[i,a]=_.useState(null),[s,l]=_.useState(!0),[c,d]=_.useState(null);_.useEffect(()=>{if(!r){l(!1);return}const O=()=>{r.getStatus().then(x=>{a(x),d(null),l(!1)}).catch(x=>{d(x instanceof Error?x:new Error(String(x))),l(!1)})};O();const b=setInterval(O,3e4);return()=>clearInterval(b)},[r]);const f=()=>{if(t&&!n)return"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again to reconnect";if(!e)return"🚀 Frontend Status: Ready • Backend: Authentication required";if(i)return`🚀 Frontend Status: Ready • Backend: ${i.status} (v${i.version})`;if(s)return"🚀 Frontend Status: Ready • Backend: Connecting...";if(c){const O=c.message;return O.includes("401")||O.includes("Unauthorized")?"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again":"🚀 Frontend Status: Ready • Backend: Connection failed"}return"🚀 Frontend Status: Ready • Backend: Unknown"},m=()=>t&&!n?"warning":e?i?"success":s?"loading":"error":"info";return g.jsxs("section",{className:"semiont-status-display","data-status":m(),role:"status","aria-live":"polite","aria-label":"System status information",children:[g.jsxs("p",{className:"semiont-status-message",children:[g.jsx("span",{className:"sr-only",children:"System status: "}),f()]}),e?c?g.jsxs("p",{className:"semiont-status-hint semiont-status-error-hint",role:"alert",children:[g.jsx("span",{className:"sr-only",children:"Error: "}),"Check that the backend server is running and accessible"]}):null:g.jsx("p",{className:"semiont-status-hint",children:"Sign in to view backend status"})]})}function Pm({t:e,className:t="",size:n="lg",showTagline:r=!0,animated:i=!0,compactTagline:a=!1}){return g.jsxs("div",{className:`semiont-branding ${t}`,"data-size":n,"data-animated":i,"data-compact-tagline":a,children:[g.jsx("h1",{className:"semiont-branding-title",children:g.jsx("span",{className:"semiont-branding-text",children:"Semiont"})}),r&&g.jsx("h2",{className:"semiont-branding-tagline",children:e("tagline")})]})}function fte({Link:e,routes:t,t:n,tHome:r,showBranding:i=!0,brandingLink:a="/",variant:s="standalone",isAuthenticated:l=!1,isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const{isOpen:m,toggle:p,close:O,dropdownRef:b}=VB();if(s==="floating"&&i)return g.jsxs("div",{className:"semiont-unified-header semiont-unified-header--floating","data-variant":"floating",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-1","aria-haspopup":"true",id:"nav-menu-button-1",children:g.jsx(Pm,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&l&&g.jsx("div",{id:"nav-menu-dropdown-1",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-1",children:g.jsx(By,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:O,currentPath:f})})]});const x=g.jsxs("div",{className:"semiont-unified-header__content","data-variant":s,children:[i?g.jsxs("div",{className:"semiont-unified-header__branding-wrapper",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-2","aria-haspopup":"true",id:"nav-menu-button-2",children:g.jsx(Pm,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&l&&g.jsx("div",{id:"nav-menu-dropdown-2",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-2",children:g.jsx(By,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:O,currentPath:f})})]}):g.jsx("div",{}),g.jsx("div",{className:"semiont-unified-header__actions","data-variant":s})]});return s==="standalone"?g.jsx("header",{className:"semiont-unified-header semiont-unified-header--standalone","data-variant":"standalone",children:g.jsx("div",{className:"semiont-unified-header__container",children:x})}):x}function Pre({Link:e,routes:t,t:n,tHome:r,children:i,brandingLink:a="/",collapsible:s=!1,storageKey:l="leftSidebarCollapsed",isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const[m,p]=_.useState(!1),{width:O,setWidth:b,minWidth:x,maxWidth:w}=ZB({defaultWidth:256,minWidth:192,maxWidth:400,storageKey:"semiont-left-sidebar-width"});_.useEffect(()=>{s&&localStorage.getItem(l)==="true"&&p(!0)},[s,l]);const k=()=>{if(!s)return;const j=!m;p(j),localStorage.setItem(l,j.toString())},T=j=>g.jsx(By,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:j,currentPath:f});return g.jsxs("aside",{className:"semiont-left-sidebar","data-collapsed":m,style:m?void 0:{width:`${O}px`,position:"relative"},children:[!m&&g.jsx(HV,{onResize:b,minWidth:x,maxWidth:w,position:"right",ariaLabel:"Resize left sidebar"}),g.jsx("div",{className:"semiont-left-sidebar__header","data-collapsed":m,children:g.jsx(e,{href:a,className:"semiont-left-sidebar__branding-button","aria-label":"Go to home page",children:m?g.jsx("div",{className:"semiont-left-sidebar__logo-collapsed",children:g.jsx("span",{className:"semiont-left-sidebar__logo-text",children:"S"})}):g.jsx(Pm,{t:r,size:"sm",showTagline:!1,animated:!1,className:""})})}),g.jsx("nav",{role:"navigation","aria-label":"Main navigation",id:"main-navigation",className:"semiont-left-sidebar__content",children:typeof i=="function"?i(m,k,T):i})]})}function Nre({Link:e,routes:t,t:n,tNav:r,tHome:i,children:a,className:s="",showAuthLinks:l=!0,CookiePreferences:c,onOpenKeyboardHelp:d}){return g.jsxs("div",{className:"semiont-page-layout",children:[g.jsx(dte,{}),g.jsx("header",{role:"banner",className:"semiont-page-layout__header",children:g.jsx("div",{className:"semiont-page-layout__header-container",children:g.jsx(fte,{Link:e,routes:t,t:r,tHome:i,showAuthLinks:l,brandingLink:"/",variant:"embedded"})})}),g.jsx("main",{role:"main",id:"main-content",tabIndex:-1,className:`semiont-page-layout__main ${s}`,children:a}),g.jsx(hJ,{Link:e,routes:t,t:n,...c&&{CookiePreferences:c},...d&&{onOpenKeyboardHelp:d}})]})}var Hr={colors:{primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#0080ff",600:"#0066cc",700:"#0052a3",800:"#1e40af",900:"#1e3a8a"},secondary:{50:"#f0fffe",100:"#e0fffd",200:"#b3fffa",300:"#66fff6",400:"#1afff1",500:"#00ffff",600:"#00cccc",700:"#00a3a3",800:"#007a7a",900:"#005252"},semantic:{error:"#ef4444",errorLight:"#fca5a5",errorDark:"#b91c1c",warning:"#f59e0b",warningLight:"#fcd34d",warningDark:"#d97706",success:"#10b981",successLight:"#6ee7b7",successDark:"#047857",info:"#3b82f6",infoLight:"#93c5fd",infoDark:"#1d4ed8"},neutral:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",1e3:"#000000"}},spacing:{0:"0",xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"2.5rem","3xl":"3rem","4xl":"4rem","5xl":"5rem"},typography:{fontFamily:{sans:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mono:'JetBrains Mono, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"},fontWeight:{thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,black:900}},borderRadius:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",base:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},transitions:{duration:{fast:"150ms",base:"250ms",slow:"350ms",slower:"500ms"}}};function hte(){const e=[":root {"];return Object.entries(Hr.colors.primary).forEach(([t,n])=>{e.push(` --semiont-color-primary-${t}: ${n};`)}),Object.entries(Hr.colors.secondary).forEach(([t,n])=>{e.push(` --semiont-color-secondary-${t}: ${n};`)}),Object.entries(Hr.colors.semantic).forEach(([t,n])=>{e.push(` --semiont-color-${t.toLowerCase().replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n};`)}),Object.entries(Hr.colors.neutral).forEach(([t,n])=>{e.push(` --semiont-color-neutral-${t}: ${n};`)}),Object.entries(Hr.spacing).forEach(([t,n])=>{e.push(` --semiont-spacing-${t}: ${n};`)}),Object.entries(Hr.typography.fontSize).forEach(([t,n])=>{e.push(` --semiont-text-${t}: ${n};`)}),Object.entries(Hr.typography.fontWeight).forEach(([t,n])=>{e.push(` --semiont-font-${t}: ${n};`)}),e.push(` --semiont-font-sans: ${Hr.typography.fontFamily.sans};`),e.push(` --semiont-font-mono: ${Hr.typography.fontFamily.mono};`),Object.entries(Hr.borderRadius).forEach(([t,n])=>{e.push(` --semiont-radius-${t}: ${n};`)}),Object.entries(Hr.shadows).forEach(([t,n])=>{e.push(` --semiont-shadow-${t}: ${n};`)}),Object.entries(Hr.transitions.duration).forEach(([t,n])=>{e.push(` --semiont-duration-${t}: ${n};`)}),e.push("}"),e.join(`
168
+ `)}hte();function Rre({message:e}){return g.jsx("div",{className:"semiont-loading-state-wrapper",children:g.jsx("div",{className:"semiont-loading-state semiont-loading-state-compose",children:g.jsx("p",{className:"semiont-loading-message",children:e})})})}function Mre(){return g.jsx("div",{className:"semiont-loading-state semiont-loading-state-resource",children:g.jsx("p",{className:"semiont-loading-message",children:"Loading resource..."})})}function mte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"}))}var pte=_.forwardRef(mte),gte=pte;function vte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var Ote=_.forwardRef(vte),bte=Ote;function yte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var xte=_.forwardRef(yte),Ste=xte;function wte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"}))}var _te=_.forwardRef(wte),kte=_te;function jte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}var Tte=_.forwardRef(jte),Cte=Tte;function Ete({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}var Qte=_.forwardRef(Ete),Ate=Qte;function Pte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}var Nte=_.forwardRef(Pte),Rte=Nte;function Mte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}var Lte=_.forwardRef(Mte),Dte=Lte;function zte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}var $te=_.forwardRef(zte),P5=$te;function qte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}var Ite=_.forwardRef(qte),Xte=Ite;function Zte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}var Bte=_.forwardRef(Zte),Vte=Bte;function Ute({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}var Yte=_.forwardRef(Ute),N5=Yte;function Wte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z"}))}var Fte=_.forwardRef(Wte),Hte=Fte;function Gte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}var Kte=_.forwardRef(Gte),Zx=Kte;function Jte({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}var ene=_.forwardRef(Jte),tne=ene;function nne({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}var rne=_.forwardRef(nne),ine=rne;function ane({title:e,titleId:t,...n},r){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}var sne=_.forwardRef(ane),Hy=sne;function Lre({suggestedFeatures:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,StatusDisplay:a,ToolbarPanels:s,Toolbar:l}){return g.jsxs("div",{className:`semiont-page${r&&Ji.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.title}),g.jsx("p",{className:"semiont-page__subtitle",children:i.subtitle})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.systemStatus}),g.jsx(a,{})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.cliOperations}),g.jsx("p",{className:"semiont-admin__section-description",children:i.cliOperationsDescription}),g.jsx("div",{className:"semiont-admin__features-grid",children:e.map(c=>g.jsx("div",{className:"semiont-devops-feature",children:g.jsxs("div",{className:"semiont-devops-feature__header",children:[g.jsx("div",{className:"semiont-devops-feature__icon-box",children:g.jsx(c.icon,{className:"semiont-devops-feature__icon"})}),g.jsxs("div",{className:"semiont-devops-feature__content",children:[g.jsx("h3",{className:"semiont-devops-feature__title",children:c.title}),g.jsx("p",{className:"semiont-devops-feature__description",children:c.description}),g.jsx("p",{className:"semiont-devops-feature__available",children:c.available})]})]})},c.title))})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-admin__info-box-content",children:[g.jsx("div",{className:"semiont-admin__info-box-icon",children:g.jsx(kte,{className:"semiont-icon semiont-icon--info"})}),g.jsxs("div",{className:"semiont-admin__info-box-text",children:[g.jsx("h3",{className:"semiont-admin__info-box-title",children:i.cliTitle}),g.jsxs("div",{className:"semiont-admin__info-box-description",children:[g.jsx("p",{children:i.cliDescription}),g.jsx("code",{className:"semiont-admin__info-box-code",children:"semiont --help"})]})]})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(l,{context:"simple",activePanel:r})]})]})}function R5({onExport:e,isExporting:t,translations:n}){return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:n.title}),g.jsx("p",{className:"semiont-admin__section-description",children:n.description}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:e,disabled:t,children:t?n.exporting:n.exportButton})]})}function M5({onFileSelected:e,onImport:t,onCancel:n,selectedFile:r,preview:i,isImporting:a,translations:s}){const l=_.useRef(null),[c,d]=_.useState(!1),[f,m]=_.useState(!1),p=_.useCallback(j=>{j.preventDefault(),d(!0)},[]),O=_.useCallback(()=>{d(!1)},[]),b=_.useCallback(j=>{j.preventDefault(),d(!1),m(!1);const E=j.dataTransfer.files[0];E&&e(E)},[e]),x=_.useCallback(j=>{var Q;m(!1);const E=(Q=j.target.files)==null?void 0:Q[0];E&&e(E)},[e]),w=()=>{m(!0)},k=()=>{m(!1),t()},T=()=>{m(!1)};return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:s.title}),g.jsx("p",{className:"semiont-admin__section-description",children:s.description}),g.jsxs("div",{className:`semiont-exchange__dropzone${c?" semiont-exchange__dropzone--active":""}`,onDragOver:p,onDragLeave:O,onDrop:b,onClick:()=>{var j;return(j=l.current)==null?void 0:j.click()},children:[g.jsx("p",{className:"semiont-exchange__dropzone-text",children:c?s.dropzoneActive:s.dropzoneLabel}),r&&g.jsxs("p",{className:"semiont-exchange__file-info",children:[r.name," (",(r.size/1024).toFixed(1)," KB)"]})]}),g.jsx("input",{ref:l,type:"file",accept:".tar.gz,.jsonl,.gz",onChange:x,style:{display:"none"}}),i&&g.jsxs("div",{className:"semiont-exchange__preview",children:[g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.detectedFormat}),g.jsxs("span",{className:"semiont-exchange__preview-value",children:[i.format," v",i.version]})]}),i.sourceUrl&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:"Source"}),g.jsx("span",{className:"semiont-exchange__preview-value",children:i.sourceUrl})]}),Object.keys(i.stats).length>0&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.statsPreview}),g.jsx("span",{className:"semiont-exchange__preview-value",children:Object.entries(i.stats).map(([j,E])=>`${E} ${j}`).join(", ")})]})]}),f&&g.jsxs("div",{className:"semiont-exchange__confirm",children:[g.jsx("p",{className:"semiont-exchange__confirm-title",children:s.importConfirmTitle}),g.jsx("p",{className:"semiont-exchange__confirm-message",children:s.importConfirmMessage}),g.jsxs("div",{className:"semiont-exchange__confirm-actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:k,children:s.confirmImport}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:T,children:s.cancelImport})]})]}),!f&&g.jsxs("div",{className:"semiont-exchange__actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:w,disabled:!i||a,children:a?s.importing:s.importButton}),r&&g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:n,disabled:a,children:s.cancelImport})]})]})}var one={started:"phaseStarted","entity-types":"phaseEntityTypes",resources:"phaseResources",annotations:"phaseAnnotations",complete:"phaseComplete",error:"phaseError"};function L5({phase:e,message:t,result:n,translations:r}){const i=one[e],a=i?r[i]:e,s=e==="complete",l=e==="error";return g.jsxs("div",{className:"semiont-exchange__progress",children:[g.jsx("div",{className:`semiont-exchange__phase-label${l?" semiont-exchange__phase-label--error":s?" semiont-exchange__phase-label--complete":""}`,children:a}),t&&!s&&!l&&g.jsx("p",{className:"semiont-exchange__progress-message",children:t}),s&&n&&g.jsxs("div",{className:"semiont-exchange__result",children:[n.stats!=null&&typeof n.stats=="object"&&g.jsx(g.Fragment,{children:Object.entries(n.stats).map(([c,d])=>{const f=c==="streams"?r.streams:c==="events"?r.events:c==="blobs"?r.blobs:c;return g.jsxs("div",{className:"semiont-exchange__result-stat",children:[g.jsx("span",{className:"semiont-exchange__result-value",children:d}),g.jsx("span",{className:"semiont-exchange__result-label",children:f})]},c)})}),n.hashChainValid!==void 0&&g.jsx("div",{className:`semiont-exchange__hash-badge${n.hashChainValid?" semiont-exchange__hash-badge--valid":" semiont-exchange__hash-badge--invalid"}`,children:n.hashChainValid?r.hashChainValid:r.hashChainInvalid})]}),l&&t&&g.jsx("p",{className:"semiont-exchange__error-message",children:t})]})}function Dre({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:l,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:O,translations:b,ToolbarPanels:x,Toolbar:w}){return g.jsxs("div",{className:`semiont-page${O&&Ji.includes(O)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(R5,{onExport:e,isExporting:t,translations:b.export}),g.jsx(M5,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:l,translations:b.import})]}),c&&g.jsx(L5,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(x,{activePanel:O,theme:m,showLineNumbers:p}),g.jsx(w,{context:"simple",activePanel:O})]})]})}function zre({providers:e,allowedDomains:t,isLoading:n,theme:r,showLineNumbers:i,activePanel:a,translations:s,ToolbarPanels:l,Toolbar:c}){return g.jsxs("div",{className:`semiont-page${a&&Ji.includes(a)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:s.title}),g.jsx("p",{className:"semiont-page__subtitle",children:s.subtitle})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(Zx,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.oauthProviders}),g.jsx("p",{className:"semiont-admin__card-description",children:s.oauthProvidersDescription})]})]}),n?g.jsx("div",{className:"semiont-skeleton-group",children:g.jsx("div",{className:"semiont-skeleton semiont-skeleton--bar"})}):e.length>0?g.jsx("div",{className:"semiont-provider-list",children:e.map(d=>g.jsxs("div",{className:"semiont-provider-item",children:[g.jsxs("div",{className:"semiont-provider-item__info",children:[g.jsx(bte,{className:"semiont-provider-item__icon semiont-provider-item__icon--success"}),g.jsx("span",{className:"semiont-provider-item__name",children:d.name}),d.clientId&&g.jsxs("span",{className:"semiont-provider-item__client-id",children:[s.clientId,": ",d.clientId]})]}),g.jsx("span",{className:"semiont-badge semiont-badge--success",children:s.configured})]},d.name))}):g.jsx("div",{className:"semiont-empty-message",children:s.noProvidersConfigured})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(Rte,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.allowedDomains}),g.jsx("p",{className:"semiont-admin__card-description",children:s.allowedDomainsDescription})]})]}),n?g.jsxs("div",{className:"semiont-skeleton-group",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip semiont-skeleton--chip-lg"})]}):t.length>0?g.jsx("div",{className:"semiont-domain-list",children:t.map(d=>g.jsxs("div",{className:"semiont-chip semiont-chip--primary",children:["@",d]},d))}):g.jsx("div",{className:"semiont-empty-message",children:s.noDomainsConfigured})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-info-box__content",children:[g.jsx(Dte,{className:"semiont-info-box__icon"}),g.jsxs("div",{className:"semiont-info-box__text",children:[g.jsx("p",{className:"semiont-info-box__title",children:s.configManagementTitle}),g.jsx("p",{className:"semiont-info-box__description",children:s.configManagementDescription}),g.jsxs("ul",{className:"semiont-info-box__list",children:[g.jsx("li",{children:s.configLocalDev}),g.jsxs("li",{children:[s.configCloudDeploy," ",g.jsx("code",{className:"semiont-code-inline",children:s.configCloudDeployCommand})," ",s.configCloudDeployEnd]}),g.jsx("li",{children:s.configAWS})]})]})]})})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(l,{activePanel:a,theme:r,showLineNumbers:i}),g.jsx(c,{context:"simple",activePanel:a})]})]})}function $re({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:l,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:O,translations:b,ToolbarPanels:x,Toolbar:w}){return g.jsxs("div",{className:`semiont-page${O&&Ji.includes(O)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(R5,{onExport:e,isExporting:t,translations:b.export}),g.jsx(M5,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:l,translations:b.import})]}),c&&g.jsx(L5,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(x,{activePanel:O,theme:m,showLineNumbers:p}),g.jsx(w,{context:"simple",activePanel:O})]})]})}function lne({user:e,onUpdate:t,onDelete:n,translations:r}){const i={admin:"semiont-badge semiont-badge--danger",user:"semiont-badge semiont-badge--default"},a={active:"semiont-badge semiont-badge--success",inactive:"semiont-badge semiont-badge--default"},s=e.isAdmin?"admin":"user",l=e.isActive?"active":"inactive";return g.jsxs("tr",{className:"semiont-table__row",children:[g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("div",{className:"semiont-user-info",children:[g.jsx(Hy,{className:"semiont-user-info__avatar"}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-user-info__name",children:e.name||r.noName}),g.jsx("div",{className:"semiont-user-info__email",children:e.email})]})]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("span",{className:"semiont-table__text--secondary",children:["@",e.domain]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:i[s],children:r[s]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:a[l],children:r[l]})}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:e.lastLogin?new Date(e.lastLogin).toLocaleDateString():r.never}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:new Date(e.created).toLocaleDateString()}),g.jsx("td",{className:"semiont-table__cell semiont-table__cell--actions",children:g.jsxs("div",{className:"semiont-table__actions",children:[g.jsx("button",{onClick:()=>t(e.id,{isAdmin:!e.isAdmin}),className:"semiont-action-button semiont-action-button--info",title:e.isAdmin?r.removeAdmin:r.makeAdmin,children:g.jsx(Zx,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>t(e.id,{isActive:!e.isActive}),className:"semiont-action-button semiont-action-button--warning",title:e.isActive?r.deactivateUser:r.activateUser,children:g.jsx(Vte,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>n(e.id),className:"semiont-action-button semiont-action-button--danger",title:r.deleteUser,children:g.jsx(ine,{className:"semiont-action-button__icon"})})]})})]})}function qre({users:e,userStats:t,isLoadingUsers:n,isLoadingStats:r,onUpdateUser:i,onDeleteUser:a,onAddUser:s,onExportUsers:l,theme:c,showLineNumbers:d,activePanel:f,translations:m,ToolbarPanels:p,Toolbar:O,buttonStyles:b}){var A;const[x,w]=_.useState(""),[k,T]=_.useState("all"),[j,E]=_.useState("all"),Q=e.filter(M=>{const L=(M.name||"").toLowerCase().includes(x.toLowerCase())||M.email.toLowerCase().includes(x.toLowerCase()),D=M.isAdmin?"admin":"user",P=M.isActive?"active":"inactive";return L&&(k==="all"||D===k)&&(j==="all"||P===j)});return g.jsxs("div",{className:`semiont-page${f&&Ji.includes(f)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header-with-action",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"semiont-page__title",children:m.title}),g.jsx("p",{className:"semiont-page__subtitle",children:m.subtitle})]}),g.jsxs("button",{onClick:s,className:b.primary.base,children:[g.jsx(N5,{className:"semiont-button__icon"}),m.addUser]})]}),g.jsx("div",{className:"semiont-admin__stats-grid",children:r?Array(4).fill(0).map((M,L)=>g.jsx("div",{className:"semiont-stat-card semiont-stat-card--loading",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--icon"}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--text"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--number"})]})]})},L)):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(Hy,{className:"semiont-stat-card__icon semiont-stat-card__icon--primary"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.totalUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.totalUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx("div",{className:"semiont-stat-card__status-indicator semiont-stat-card__status-indicator--active",children:g.jsx("div",{className:"semiont-stat-card__status-dot"})})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.activeUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.activeUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(Zx,{className:"semiont-stat-card__icon semiont-stat-card__icon--danger"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.administrators}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.adminUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(Ate,{className:"semiont-stat-card__icon semiont-stat-card__icon--warning"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.recentUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:((A=t==null?void 0:t.recentSignups)==null?void 0:A.length)??0})]})]})})]})}),g.jsx("div",{className:"semiont-admin__filters-card",children:g.jsxs("div",{className:"semiont-admin__filters-grid",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"search",className:"semiont-form__label",children:m.searchUsers}),g.jsxs("div",{className:"semiont-search-input",children:[g.jsx("div",{className:"semiont-search-input__icon",children:g.jsx(Xte,{className:"semiont-icon semiont-icon--small"})}),g.jsx("input",{type:"text",id:"search",className:"semiont-search-input__field",placeholder:m.searchPlaceholder,value:x,onChange:M=>w(M.target.value)})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"role",className:"semiont-form__label",children:m.role}),g.jsxs("select",{id:"role",className:"semiont-select",value:k,onChange:M=>T(M.target.value),children:[g.jsx("option",{value:"all",children:m.allRoles}),g.jsx("option",{value:"admin",children:m.admin}),g.jsx("option",{value:"user",children:m.user})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"status",className:"semiont-form__label",children:m.status}),g.jsxs("select",{id:"status",className:"semiont-select",value:j,onChange:M=>E(M.target.value),children:[g.jsx("option",{value:"all",children:m.allStatus}),g.jsx("option",{value:"active",children:m.active}),g.jsx("option",{value:"inactive",children:m.inactive})]})]}),g.jsx("div",{className:"semiont-form__field semiont-form__field--align-end",children:g.jsx("button",{onClick:l,className:`${b.secondary.base} semiont-button--full-width`,children:m.exportUsers})})]})}),g.jsxs("div",{className:"semiont-admin__table-card",children:[g.jsx("div",{className:"semiont-table-container",children:n?g.jsxs("div",{className:"semiont-loading-state",children:[g.jsx("div",{className:"semiont-spinner"}),g.jsx("p",{className:"semiont-loading-state__text",children:m.loadingUsers})]}):g.jsxs("table",{className:"semiont-table",children:[g.jsx("thead",{className:"semiont-table__head",children:g.jsxs("tr",{children:[g.jsx("th",{className:"semiont-table__header",children:m.userColumn}),g.jsx("th",{className:"semiont-table__header",children:m.domainColumn}),g.jsx("th",{className:"semiont-table__header",children:m.roleColumn}),g.jsx("th",{className:"semiont-table__header",children:m.statusColumn}),g.jsx("th",{className:"semiont-table__header",children:m.lastLoginColumn}),g.jsx("th",{className:"semiont-table__header",children:m.joinedColumn}),g.jsx("th",{className:"semiont-table__header semiont-table__header--actions",children:m.actionsColumn})]})}),g.jsx("tbody",{className:"semiont-table__body",children:Q.map(M=>g.jsx(lne,{user:M,onUpdate:i,onDelete:a,translations:m},M.id))})]})}),!n&&Q.length===0&&g.jsxs("div",{className:"semiont-empty-state",children:[g.jsx(Hy,{className:"semiont-empty-state__icon"}),g.jsx("h3",{className:"semiont-empty-state__title",children:m.noUsersFound}),g.jsx("p",{className:"semiont-empty-state__description",children:m.noUsersFoundDescription})]})]})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(p,{activePanel:f,theme:c,showLineNumbers:d}),g.jsx(O,{context:"simple",activePanel:f})]})]})}function cne(){return g.jsxs("svg",{className:"semiont-icon semiont-icon--small semiont-icon--inline",viewBox:"0 0 24 24",children:[g.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),g.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),g.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),g.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function Ire({onSignUp:e,Link:t,translations:n}){const[r,i]=_.useState(!1),a=async()=>{i(!0);try{await e()}catch(s){console.error("Failed to initiate Google sign-up:",s),i(!1)}};return g.jsx("main",{className:"semiont-auth__main",role:"main",children:g.jsx("div",{className:"semiont-auth__container",children:g.jsxs("div",{className:"semiont-auth__content",children:[g.jsxs("section",{"aria-labelledby":"signup-heading",className:"semiont-auth__branding",children:[g.jsx("h1",{id:"signup-heading",className:"sr-only",children:n.pageTitle}),g.jsx(Pm,{t:s=>n[s]||s,size:"xl",animated:!0,className:"semiont-auth__logo"}),g.jsx("p",{className:"semiont-auth__welcome",children:n.pageTitle}),g.jsx("p",{className:"semiont-auth__subtitle",children:n.signUpPrompt})]}),g.jsxs("div",{className:"semiont-auth__forms",children:[g.jsxs("button",{onClick:a,disabled:r,className:`${Su.primary.base} semiont-button--full-width`,children:[r?g.jsx("div",{className:"semiont-auth__spinner"}):g.jsx(cne,{}),r?n.creatingAccount:n.signUpWithGoogle]}),g.jsxs("div",{className:"semiont-auth__info",children:[n.approvedDomainsInfo,g.jsx("br",{}),n.termsAgreement]})]}),g.jsxs("div",{className:"semiont-auth__links",children:[g.jsx(t,{href:"/",className:Su.secondary.base,children:n.backToHome}),g.jsx(t,{href:"/auth/signin",className:Su.primary.base,children:n.alreadyHaveAccount})]})]})})})}function une(e,t){switch(e){case"Configuration":return t.errorConfiguration;case"AccessDenied":return t.errorAccessDenied;case"Verification":return t.errorVerification;default:return t.errorGeneric}}function Xre({errorType:e,Link:t,translations:n}){const r=une(e,n);return g.jsx("div",{className:"semiont-auth-error-display",children:g.jsxs("div",{className:"semiont-auth-error-display__container",children:[g.jsx("div",{children:g.jsx("h2",{className:"semiont-auth-error-display__title",children:n.pageTitle})}),g.jsx("div",{className:"semiont-auth-error-display__error-box",children:g.jsx("div",{className:"semiont-auth-error-display__error-message",children:r})}),g.jsx("div",{className:"semiont-auth-error-display__actions",children:g.jsx(t,{href:"/auth/signin",className:"semiont-auth-error-display__link",children:n.tryAgain})})]})})}function Zre({userName:e,status:t,isProcessing:n,onAccept:r,onDecline:i,translations:a,PageLayout:s,Link:l}){return t==="loading"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__loading",children:g.jsxs("div",{className:"semiont-welcome-page__loading-content",children:[g.jsx("div",{className:"semiont-welcome-page__spinner"}),g.jsx("p",{className:"semiont-welcome-page__loading-text",children:a.loading})]})})}):t==="accepted"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__accepted",children:g.jsxs("div",{className:"semiont-welcome-page__accepted-content",children:[g.jsx("div",{className:"semiont-welcome-page__accepted-icon",children:g.jsx("svg",{className:"semiont-welcome-page__accepted-checkmark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),g.jsxs("div",{children:[g.jsx("h2",{className:"semiont-welcome-page__accepted-title",children:a.welcomeTitle}),g.jsx("p",{className:"semiont-welcome-page__accepted-subtitle",children:a.thanksForAccepting})]})]})})}):g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__form-wrapper",children:g.jsxs("div",{className:"semiont-welcome-page__form",children:[g.jsxs("div",{className:"semiont-welcome-page__form-header",children:[g.jsx("div",{className:"semiont-welcome-page__form-icon",children:g.jsx("svg",{className:"semiont-welcome-page__form-icon-svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),g.jsx("h1",{className:"semiont-welcome-page__form-title",children:a.welcomeUser.replace("{firstName}",e||"")}),g.jsx("p",{className:"semiont-welcome-page__form-subtitle",children:a.reviewTermsPrompt})]}),g.jsx("div",{className:"semiont-welcome-page__terms-content",children:g.jsxs("div",{className:"semiont-welcome-page__prose",children:[g.jsx("h3",{children:a.termsSummaryTitle}),g.jsx("p",{children:a.termsSummaryIntro}),g.jsx("h4",{children:a.acceptableUseTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.acceptableUseResponsible}),g.jsx("li",{children:a.acceptableUseRespect}),g.jsx("li",{children:a.acceptableUseConduct})]}),g.jsx("h4",{children:a.prohibitedContentTitle}),g.jsx("p",{children:a.prohibitedContentIntro}),g.jsxs("ul",{children:[g.jsx("li",{children:a.prohibitedIllegal}),g.jsx("li",{children:a.prohibitedAdult}),g.jsx("li",{children:a.prohibitedHate}),g.jsx("li",{children:a.prohibitedViolence}),g.jsx("li",{children:a.prohibitedMisinformation}),g.jsx("li",{children:a.prohibitedPrivacy}),g.jsx("li",{children:a.prohibitedCopyright}),g.jsx("li",{children:a.prohibitedMalware}),g.jsx("li",{children:a.prohibitedSpam})]}),g.jsx("h4",{children:a.conductTitle}),g.jsxs("p",{children:[a.conductDescription," ",g.jsx("a",{href:"https://ai-alliance.cdn.prismic.io/ai-alliance/Zl-MG5m069VX1dgH_AIAllianceCodeofConduct.pdf",target:"_blank",rel:"noopener noreferrer",className:"semiont-link",children:a.conductLink}),a.conductPromotion]}),g.jsx("h4",{children:a.responsibilitiesTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.responsibilitiesSecure}),g.jsx("li",{children:a.responsibilitiesReport}),g.jsx("li",{children:a.responsibilitiesAccurate}),g.jsx("li",{children:a.responsibilitiesComply})]}),g.jsx("p",{className:"semiont-welcome-page__warning",children:a.violationsWarning})]})}),g.jsxs("div",{className:"semiont-welcome-page__actions",children:[g.jsxs("p",{className:"semiont-welcome-page__legal-links",children:[a.readFullTerms," ",g.jsx(l,{href:"/terms",target:"_blank",className:"semiont-welcome-page__link",children:a.termsOfService})," ",a.and," ",g.jsx(l,{href:"/privacy",target:"_blank",className:"semiont-welcome-page__link",children:a.privacyPolicy})]}),g.jsxs("div",{className:"semiont-welcome-page__buttons",children:[g.jsx("button",{onClick:i,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--secondary",children:a.declineAndSignOut}),g.jsx("button",{onClick:r,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--primary",children:n?a.processing:a.acceptAndContinue})]}),g.jsx("p",{className:"semiont-welcome-page__legal-notice",children:a.legallyBound})]})]})})})}function Bre({entityTypes:e,error:t,newTag:n,onNewTagChange:r,onAddTag:i,isAddingTag:a,theme:s,showLineNumbers:l,activePanel:c,translations:d,ToolbarPanels:f,Toolbar:m}){const p=O=>{O.key==="Enter"&&i()};return g.jsxs("div",{className:`semiont-page${c&&Ji.includes(c)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:d.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:d.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-entity-tags__header",children:[g.jsx("div",{className:"semiont-entity-tags__icon-box",children:g.jsx(tne,{className:"semiont-entity-tags__icon"})}),g.jsxs("div",{className:"semiont-entity-tags__content",children:[g.jsx("h3",{className:"semiont-entity-tags__title",children:d.sectionTitle}),g.jsx("p",{className:"semiont-entity-tags__description",children:d.sectionDescription})]})]}),g.jsx("div",{className:"semiont-entity-tags__tags-section",children:g.jsx("div",{className:"semiont-tags",children:e.map(O=>g.jsx("span",{className:"semiont-tag semiont-tag--info semiont-tag--rounded-md",children:O},O))})}),g.jsxs("div",{className:"semiont-entity-tags__input-group",children:[g.jsx("input",{type:"text",value:n,onChange:O=>r(O.target.value),onKeyDown:p,placeholder:d.inputPlaceholder,className:"semiont-entity-tags__input",disabled:a}),g.jsx("button",{onClick:i,disabled:a||!n.trim(),className:"semiont-button semiont-button--primary",children:a?d.adding:g.jsxs(g.Fragment,{children:[g.jsx(N5,{className:"semiont-icon semiont-icon--small semiont-icon--inline"}),d.addTag]})})]}),t&&g.jsxs("div",{className:"semiont-entity-tags__error",children:[g.jsx(Cte,{className:"semiont-entity-tags__error-icon"}),t]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(f,{activePanel:c,theme:s,showLineNumbers:l}),g.jsx(m,{context:"simple",activePanel:c})]})]})}function Vre({isLoading:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,ToolbarPanels:a,Toolbar:s}){return e?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:i.loading})}):g.jsxs("div",{className:`semiont-page${r&&Ji.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:i.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-recent-docs__header",children:[g.jsx("div",{className:"semiont-recent-docs__icon-box",children:g.jsx(Ste,{className:"semiont-recent-docs__icon"})}),g.jsxs("div",{className:"semiont-recent-docs__content",children:[g.jsx("h3",{className:"semiont-recent-docs__title",children:i.sectionTitle}),g.jsx("p",{className:"semiont-recent-docs__description",children:i.sectionDescription})]})]}),g.jsxs("div",{className:"semiont-recent-docs__empty-state",children:[g.jsx("svg",{className:"semiont-recent-docs__empty-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),g.jsx("p",{className:"semiont-recent-docs__empty-message",children:i.noDocuments}),g.jsx("p",{className:"semiont-recent-docs__empty-hint",children:i.activityWillAppear})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(a,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(s,{context:"simple",activePanel:r})]})]})}var dne={legal:Hte,scientific:gte,general:P5},MC={legal:"semiont-schema-domain--legal",scientific:"semiont-schema-domain--scientific",general:"semiont-schema-domain--general"};function Ure({schemas:e,isLoading:t,theme:n,showLineNumbers:r,activePanel:i,translations:a,ToolbarPanels:s,Toolbar:l}){return t?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:a.loading})}):g.jsxs("div",{className:`semiont-page${i&&Ji.includes(i)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:a.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:a.pageDescription})]}),g.jsx("div",{className:"semiont-card-grid semiont-card-grid--two-columns",children:e.map(c=>{const d=dne[c.domain]||P5,f=MC[c.domain]||MC.general;return g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-schema__header",children:[g.jsx("div",{className:`semiont-schema__icon-wrapper ${f}`,children:d&&g.jsx(d,{className:"semiont-schema__icon"})}),g.jsxs("div",{className:"semiont-schema__content",children:[g.jsx("h3",{className:"semiont-schema__title",children:c.name}),g.jsx("p",{className:"semiont-schema__description",children:c.description}),g.jsx("span",{className:`semiont-schema__badge ${f}`,children:c.domain})]})]}),g.jsxs("div",{className:"semiont-schema__categories",children:[g.jsx("h4",{className:"semiont-schema__categories-title",children:a.categories}),c.tags.map(m=>g.jsxs("div",{className:"semiont-schema__category",children:[g.jsx("div",{className:"semiont-schema__category-name",children:m.name}),g.jsx("div",{className:"semiont-schema__category-description",children:m.description}),g.jsxs("div",{className:"semiont-schema__examples",children:[m.examples.slice(0,2).map((p,O)=>g.jsx("span",{className:"semiont-schema__example",children:p},O)),m.examples.length>2&&g.jsxs("span",{className:"semiont-schema__example-more",children:["+",m.examples.length-2," more"]})]})]},m.name))]})]},c.id)})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:i,theme:n,showLineNumbers:r}),g.jsx(l,{context:"simple",activePanel:i})]})]})}function Yre({mode:e,cloneData:t,referenceData:n,gatheredContext:r,availableEntityTypes:i,initialLocale:a,theme:s,showLineNumbers:l,hoverDelayMs:c,activePanel:d,onSaveResource:f,onCancel:m,translations:p,ToolbarPanels:O,Toolbar:b}){const{announceFormSubmitting:x,announceFormSuccess:w,announceFormError:k}=FB(),[T,j]=_.useState(""),[E,Q]=_.useState(""),[A,M]=_.useState([]),[L,D]=_.useState(!1),[P,B]=_.useState("write"),[X,V]=_.useState(null),[z,Y]=_.useState("text/markdown"),[$,q]=_.useState(null),[ee,le]=_.useState("text/markdown"),[I,G]=_.useState(a),[re,R]=_.useState(""),[ge,_e]=_.useState(""),[ve,Xe]=_.useState(!0);_.useEffect(()=>{e==="clone"&&t?(j(t.sourceResource.name),Q(t.sourceContent)):e==="reference"&&n&&(j(n.name),n.entityTypes.length>0&&M(n.entityTypes))},[e,t,n]);const Ne=Se=>{var ot;const Ve=(ot=Se.target.files)==null?void 0:ot[0];if(Ve){if(V(Ve),Y(Ve.type),B("upload"),!T){const vt=Ve.name.replace(/\.[^/.]+$/,"");j(vt)}if(gb(Ve.type)||Kl(Ve.type)){const vt=URL.createObjectURL(Ve);q(vt)}else{const vt=new FileReader;vt.onload=et=>{var Te;const yn=(Te=et.target)==null?void 0:Te.result;Q(yn)},vt.readAsText(Ve)}}};_.useEffect(()=>()=>{$&&URL.revokeObjectURL($)},[$]);const Ze=async Se=>{if(Se.preventDefault(),!!T.trim()){D(!0),x();try{const Ve={mode:e,name:T,storageUri:`file://${ge}`,content:E,format:X?z:ee,entityTypes:A,language:I};X&&(Ve.file=X),re&&(Ve.charset=re),e==="clone"&&(Ve.archiveOriginal=ve),n!=null&&n.annotationUri&&(Ve.annotationUri=n.annotationUri),n!=null&&n.sourceDocumentId&&(Ve.sourceDocumentId=n.sourceDocumentId),await f(Ve),w(e==="clone"?"Resource cloned successfully":e==="reference"?"Reference completed successfully":"Resource created successfully")}catch(Ve){throw k("Failed to save resource. Please try again."),Ve}finally{D(!1)}}},be=e==="clone",Fe=e==="reference";return g.jsxs("div",{className:`semiont-page${d&&Ji.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content semiont-page__compose",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:be?p.titleEditClone:Fe?p.titleCompleteReference:p.title}),(be||Fe)&&g.jsx("p",{className:"semiont-page__subtitle",children:be?p.subtitleClone:p.subtitleReference}),Fe&&g.jsx("div",{className:"semiont-page__reference-notice",children:g.jsx("p",{className:"semiont-page__reference-notice-text",children:p.linkedNoticePrefix})})]}),r&&g.jsxs("div",{className:"semiont-form__field",style:{marginBottom:"1.5rem",padding:"1rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)"},children:[g.jsx("h3",{className:"semiont-form__label",style:{marginBottom:"0.75rem"},children:"Gathered Context"}),r.sourceContext&&g.jsx("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-primary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)",maxHeight:"150px",overflowY:"auto",marginBottom:"0.5rem"},children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[r.sourceContext.before&&g.jsx("span",{children:r.sourceContext.before}),g.jsx("span",{style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:r.sourceContext.selected}),r.sourceContext.after&&g.jsx("span",{children:r.sourceContext.after})]})}),r.graphContext&&r.graphContext.connections&&r.graphContext.connections.length>0&&g.jsxs("div",{style:{padding:"0.5rem 0",fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)"},children:[g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:500,marginRight:"0.5rem"},children:"Connections:"}),r.graphContext.connections.map(Se=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.5rem",marginRight:"0.25rem"},children:Se.resourceName},Se.resourceId))]})]}),g.jsx("div",{className:"semiont-form",children:g.jsxs("form",{onSubmit:Ze,className:"semiont-form__fields semiont-compose-grid",children:[g.jsxs("div",{className:"semiont-compose-grid__meta",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"docName",className:"semiont-form__label",children:p.resourceName}),g.jsx("input",{id:"docName",type:"text",value:T,onChange:Se=>j(Se.target.value),placeholder:p.resourceNamePlaceholder,className:"semiont-input",required:!0,disabled:L})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"storagePath",type:"text",value:ge,onChange:Se=>_e(Se.target.value),placeholder:"docs/my-resource.md",required:!0,className:"semiont-input semiont-input--addon",disabled:L})]})]}),(!Fe||A.length===0)&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types",children:[g.jsx("div",{className:"semiont-form__label",children:p.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-buttons",role:"group","aria-describedby":"entity-types-description",children:i.map(Se=>{const Ve=A.includes(Se);return g.jsx("button",{type:"button",onClick:()=>{M(ot=>ot.includes(Se)?ot.filter(vt=>vt!==Se):[...ot,Se])},className:"semiont-form__entity-type-button","data-selected":Ve,disabled:L,"aria-pressed":Ve,"aria-label":`${Se} entity type, ${Ve?"selected":"not selected"}`,children:Se},Se)})}),A.length>0&&g.jsxs("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:[A.length," entity type",A.length!==1?"s":""," selected: ",A.join(", ")]})]}),Fe&&A.length>0&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types-display",role:"region","aria-labelledby":"selected-entity-types-label",children:[g.jsx("h3",{id:"selected-entity-types-label",className:"semiont-form__label",children:p.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-tags",role:"list",children:A.map(Se=>g.jsx("span",{role:"listitem",className:"semiont-form__entity-type-tag","aria-label":`Entity type: ${Se}`,children:Se},Se))}),g.jsx("p",{className:"semiont-form__helper-text",id:"reference-entity-types-description",children:"These entity types were selected when creating the reference"})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:p.language}),g.jsx("select",{id:"language-select",value:I,onChange:Se=>G(Se.target.value),disabled:L,className:"semiont-select",children:_l.map(Se=>g.jsx("option",{value:Se.code,children:Se.nativeName},Se.code))})]})]}),g.jsxs("div",{className:"semiont-compose-grid__content",children:[!be&&!Fe&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:p.contentSource}),g.jsxs("div",{className:"semiont-form__content-source-toggle",children:[g.jsxs("button",{type:"button",onClick:()=>B("upload"),disabled:L,className:"semiont-form__content-source-button","data-active":P==="upload",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"📎"}),g.jsx("span",{className:"semiont-form__content-source-label",children:p.uploadFile})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:p.uploadFileDescription})]}),g.jsxs("button",{type:"button",onClick:()=>B("write"),disabled:L,className:"semiont-form__content-source-button","data-active":P==="write",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"✍️"}),g.jsx("span",{className:"semiont-form__content-source-label",children:p.writeContent})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:p.writeContentDescription})]})]})]}),!be&&!Fe&&P==="upload"&&g.jsxs("div",{className:"semiont-form__upload-section",children:[g.jsx("div",{children:g.jsxs("div",{className:"semiont-form__upload-container",children:[g.jsx("label",{className:"semiont-form__upload-dropzone",children:g.jsxs("div",{className:"semiont-form__upload-area",children:[g.jsx("input",{type:"file",accept:"text/plain,text/markdown,image/png,image/jpeg,application/pdf",onChange:Ne,className:"semiont-form__upload-input",disabled:L}),g.jsx("p",{className:"semiont-form__upload-text",children:X?X.name:p.dropFileOrClick}),g.jsx("p",{className:"semiont-form__upload-hint",children:p.supportedFormats})]})}),X&&g.jsx("button",{type:"button",onClick:()=>{V(null),q(null),Y("text/markdown")},className:"semiont-button semiont-button--danger semiont-button--small",disabled:L,children:"Clear"})]})}),X&&g.jsxs("div",{className:"semiont-form__media-type",children:[g.jsxs("span",{className:"semiont-form__media-type-label",children:[p.mediaType,":"]}),g.jsx("code",{className:"semiont-form__media-type-value",children:z}),g.jsx("span",{className:"semiont-form__media-type-lock",title:p.autoDetected,children:"🔒"})]}),X&&$&&gb(z)&&g.jsxs("div",{className:"semiont-form__image-preview",children:[g.jsx("p",{className:"semiont-form__image-preview-label",children:"Preview:"}),g.jsx("div",{className:"semiont-form__image-preview-container",children:g.jsx("img",{src:$,alt:"Upload preview",className:"semiont-form__image-preview-img"})})]})]}),(be||Fe||P==="write")&&g.jsxs("div",{className:"semiont-form__write-section",children:[!be&&!Fe&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"format-select",className:"semiont-form__label",children:p.format}),g.jsxs("select",{id:"format-select",value:ee,onChange:Se=>le(Se.target.value),disabled:L,className:"semiont-select",children:[g.jsx("option",{value:"text/markdown",children:"Markdown (text/markdown)"}),g.jsx("option",{value:"text/plain",children:"Plain Text (text/plain)"}),g.jsx("option",{value:"text/html",children:"HTML (text/html)"})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__editor",children:[g.jsx("label",{className:"semiont-form__label",children:be?p.resourceContent:p.content}),g.jsx("div",{className:"semiont-form__editor-wrapper",lang:I,children:g.jsx(SR,{content:E,editable:!L,sourceView:!0,showLineNumbers:l,hoverDelayMs:c,onChange:Se=>Q(Se)})})]}),!be&&!Fe&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"charset-select",className:"semiont-form__label",children:p.encoding}),g.jsxs("select",{id:"charset-select",value:re,onChange:Se=>R(Se.target.value),disabled:L,className:"semiont-select",children:[g.jsx("option",{value:"",children:"UTF-8 (default)"}),g.jsx("option",{value:"iso-8859-1",children:"ISO-8859-1 (Latin-1)"}),g.jsx("option",{value:"windows-1252",children:"Windows-1252"}),g.jsx("option",{value:"ascii",children:"ASCII"}),g.jsx("option",{value:"utf-16le",children:"UTF-16LE"})]})]})]}),be&&g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{id:"archiveOriginal",type:"checkbox",checked:ve,onChange:Se=>Xe(Se.target.checked),className:"semiont-checkbox",disabled:L}),g.jsx("label",{htmlFor:"archiveOriginal",className:"semiont-form__checkbox-label",children:p.archiveOriginal})]})]}),g.jsxs("div",{className:"semiont-form__actions",children:[g.jsx("button",{type:"button",onClick:m,disabled:L,className:Su.tertiary.base,children:p.cancel}),g.jsx("button",{type:"submit",disabled:L||!T.trim(),className:Su.primary.base,children:L?be?p.saving:Fe?p.creatingAndLinking:p.creating:be?p.saveClonedResource:Fe?p.createAndLinkResource:p.createResource})]})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(O,{activePanel:d,theme:s,showLineNumbers:l}),g.jsx(b,{context:"simple",activePanel:d})]})]})}var D5=ue.memo(({resource:e,onOpen:t,tabIndex:n=0,archivedLabel:r,createdLabel:i})=>g.jsxs("div",{onClick:()=>t(e),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),t(e))},role:"button",tabIndex:n,"aria-label":`Open resource: ${e.name}`,className:"semiont-resource-card",children:[g.jsxs("div",{className:"semiont-resource-card__header",children:[g.jsx("h4",{className:"semiont-resource-card__title",children:e.name}),e.archived&&g.jsx("span",{className:"semiont-resource-card__badge","data-type":"archived",children:r})]}),g.jsxs("div",{className:"semiont-resource-card__metadata",children:[g.jsxs("span",{className:"semiont-resource-card__date",children:[i," ",e.dateCreated?new Date(e.dateCreated).toLocaleDateString():"N/A"]}),e.entityTypes&&e.entityTypes.length>0&&g.jsxs("div",{className:"semiont-tags",children:[e.entityTypes.slice(0,2).map(a=>g.jsx("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:a},a)),e.entityTypes.length>2&&g.jsxs("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:["+",e.entityTypes.length-2]})]})]})]}));D5.displayName="ResourceCard";function Wre({recentDocuments:e,searchDocuments:t,entityTypes:n,isLoadingRecent:r,isSearching:i,searchQuery:a,onSearchQueryChange:s,theme:l,showLineNumbers:c,activePanel:d,onNavigateToResource:f,onNavigateToCompose:m,translations:p,ToolbarPanels:O}){const[b,x]=_.useState(""),w=a.trim()!=="",k=w?t:e,T=b?k.filter(D=>D.entityTypes&&D.entityTypes.includes(b)):k,j=Sj(n.length+1,{orientation:"horizontal"}),E=Sj(T.length,{orientation:"grid",cols:2}),Q=_.useRef(f);Q.current=f;const A=_.useCallback(D=>{x(D)},[]),M=_.useCallback(D=>{const P=pb(D);P&&Q.current(P)},[]);if(r)return g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:p.loadingKnowledgeBase})});const L=w&&t.length===0&&!i;return g.jsxs("div",{className:`semiont-page${d&&Ji.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:p.title}),g.jsx("p",{className:"semiont-page__subtitle",children:p.subtitle})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsx("div",{className:"semiont-card__search-form",children:g.jsxs("div",{className:"semiont-card__search-wrapper",children:[g.jsx("input",{type:"text",value:a,onChange:D=>s(D.target.value),placeholder:p.searchPlaceholder,className:"semiont-card__search-input","aria-label":p.searchPlaceholder}),i&&g.jsx("span",{className:"semiont-card__search-status","aria-live":"polite",children:p.searching})]})}),n.length>0&&g.jsxs("div",{className:"semiont-card__filters",children:[g.jsx("h3",{className:"semiont-card__filters-label",children:p.filterByEntityType}),g.jsxs("div",{ref:j.containerRef,onKeyDown:j.handleKeyDown,className:"semiont-card__filter-buttons",role:"group","aria-label":"Entity type filters",children:[g.jsx("button",{onClick:()=>A(""),tabIndex:0,"aria-pressed":b==="",className:"semiont-card__filter-button","data-active":b==="",children:p.all}),n.map(D=>g.jsx("button",{onClick:()=>A(D),tabIndex:-1,"aria-pressed":b===D,className:"semiont-card__filter-button","data-active":b===D,children:D},D))]})]}),g.jsxs("div",{className:"semiont-card__documents",children:[g.jsx("h3",{className:"semiont-card__documents-label",children:w&&t.length>0?p.searchResults(t.length):b?p.documentsTaggedWith(b):p.recentResources}),L&&g.jsx("div",{className:"semiont-card__warning",children:g.jsx("p",{className:"semiont-card__warning-text",children:p.noResultsFound(a)})}),T.length>0?g.jsx("div",{ref:E.containerRef,onKeyDown:E.handleKeyDown,className:"semiont-card-grid",role:"group","aria-label":"Document grid",children:T.map((D,P)=>g.jsx(D5,{resource:D,onOpen:M,tabIndex:P===0?0:-1,archivedLabel:p.archived,createdLabel:p.created},pb(D)))}):g.jsxs("div",{className:"semiont-card__empty",children:[g.jsx("p",{className:"semiont-card__empty-text",children:p.noResourcesAvailable}),!w&&g.jsx("button",{onClick:m,className:"semiont-card__empty-button",children:p.composeFirstResource})]})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(O,{activePanel:d,theme:l,showLineNumbers:c}),g.jsx(wR,{context:"simple",activePanel:d})]})]})}function fne(e){var s;const t=(s=Le(st().activeSession$))==null?void 0:s.client,[n,r]=_.useState(void 0),[i,a]=_.useState(!0);return _.useEffect(()=>{if(!t||!e){a(!1);return}a(!0),t.getMediaToken(e).then(({token:c})=>{r(c),a(!1)}).catch(()=>{a(!1)});const l=setInterval(()=>{t.getMediaToken(e).then(({token:c})=>r(c)).catch(()=>{})},240*1e3);return()=>clearInterval(l)},[t,e]),{token:n,loading:i}}function hne(){return typeof window>"u"?null:localStorage.getItem("activeToolbarPanel")||"knowledge-base"}function mne(e){typeof window>"u"||(e?localStorage.setItem("activeToolbarPanel",e):localStorage.removeItem("activeToolbarPanel"))}function pne(){const e=st();return FP(()=>A$(e,{initialPanel:hne(),onPanelChange:mne}))}function Fre({resource:e,rUri:t,locale:n,Link:r,routes:i,ToolbarPanels:a,refetchDocument:s,streamStatus:l,knowledgeBaseName:c}){const d=un("ReferenceWizard"),f=st(),m=Le(f.activeSession$),p=m==null?void 0:m.client,{showError:O,showSuccess:b,showInfo:x}=BQ(),{theme:w,setTheme:k}=BB(),{showLineNumbers:T,toggleLineNumbers:j}=K0(),{hoverDelayMs:E}=HP(),{triggerSparkleAnimation:Q,clearNewAnnotationId:A}=J0(),M=rm(e)||"text/plain",L=c0(M)==="image",{content:D,loading:P}=UB(t,e,!L),{token:B,loading:X}=fne(t),V=L&&B&&p?`${p.baseUrl}/api/resources/${t}?token=${B}`:"",z=L?V:D,Y=L?X:P,$=pne(),q=FP(()=>I$(p,t,n,$)),ee=Le(q.annotations$)??[],le=Le(q.annotationGroups$),I=Le(q.entityTypes$)??[],G=Le(q.referencedBy$),re=G??[],R=G===void 0,ge=Le(q.beckon.hoveredAnnotationId$)??null,_e=Le(q.mark.pendingAnnotation$)??null,ve=Le(q.mark.assistingMotivation$)??null,Xe=Le(q.mark.progress$)??null,Ne=Le(q.browse.activePanel$)??null,Ze=Le(q.browse.scrollToAnnotationId$)??null,be=Le(q.browse.panelInitialTab$)??null,Fe=q.browse.onScrollCompleted,Se=Le(q.yield.progress$)??null,Ve=Le(q.gather.context$)??null,ot=Le(q.gather.loading$)??!1,vt=Le(q.gather.error$)??null,et=Le(q.wizard$),yn=(et==null?void 0:et.open)??!1,Te=(et==null?void 0:et.annotationId)??null,lt=(et==null?void 0:et.resourceId)??null,me=(et==null?void 0:et.defaultTitle)??"",Ot=(et==null?void 0:et.entityTypes)??[],Dt=_.useCallback(()=>{q.closeWizard()},[q]),Wt=_.useCallback((je,Je)=>{A(ri(je)),q.yield.generate(je,{title:Je.title,storageUri:Je.storagePath,prompt:Je.prompt,language:Je.language,temperature:Je.temperature,maxTokens:Je.maxTokens,context:Je.context})},[q,A]),tt=_.useCallback(async(je,Je)=>{if(p)try{await p.bind.body(t,ri(je),[{op:"add",item:{type:"SpecificResource",source:Je,purpose:"linking"}}]),b("Reference linked successfully")}catch(dn){O(`Failed to link reference: ${dn instanceof Error?dn.message:String(dn)}`)}},[t,p,b,O]),Un=_.useCallback((je,Je,dn,Sr,Wn)=>{sessionStorage.setItem(`gather-context:${Je}`,JSON.stringify(je));const zr=new URLSearchParams({annotationUri:Je,sourceDocumentId:dn,name:Sr,entityTypes:Wn.join(",")});f.emit("nav:push",{path:`/know/compose?${zr.toString()}`,reason:"compose-from-wizard"})},[m]);_.useEffect(()=>{if(e&&t){const je=rm(e);f.addOpenResource(t,e.name,je||void 0,e.storageUri),typeof localStorage<"u"&&localStorage.setItem("lastViewedDocumentId",t)}},[e,t,f]),_.useEffect(()=>{_e&&f.emit("panel:open",{panel:"annotations"})},[_e,f]);const ie=_.useCallback(async()=>{if(p)try{await p.updateResource(t,{archived:!0}),await s()}catch(je){console.error("Failed to archive document:",je),O("Failed to archive document")}},[p,t,s,O]),de=_.useCallback(async()=>{if(p)try{await p.updateResource(t,{archived:!1}),await s()}catch(je){console.error("Failed to unarchive document:",je),O("Failed to unarchive document")}},[p,t,s,O]),Qe=_.useCallback(async()=>{if(p)try{const Je=(await p.generateCloneToken(t)).token;f.emit("nav:push",{path:`/know/compose?mode=clone&token=${Je}`,reason:"clone"})}catch(je){console.error("Failed to generate clone token:",je),O("Failed to generate clone link")}},[p,t,O,m]),Be=_.useCallback(({annotationId:je})=>{Q(je)},[Q]),nt=_.useCallback(je=>{Q(je.payload.annotation.id)},[Q]),zt=_.useCallback(({message:je})=>O(`Failed to create annotation: ${je||"unknown error"}`),[O]),zn=_.useCallback(({message:je})=>O(`Failed to delete annotation: ${je||"unknown error"}`),[O]),sn=_.useCallback(()=>{},[]),Zt=_.useCallback(({message:je})=>O(`Failed to update reference: ${je}`),[O]),Jt=_.useCallback(({theme:je})=>k(je),[k]),mt=_.useCallback(je=>{if(je.resourceId===e.id)if(je.jobType==="generation"){const Je=je.result,dn=Je==null?void 0:Je.resourceName;b(dn?`Resource "${dn}" created successfully!`:"Resource created successfully!")}else b("Annotation complete")},[e.id,b]),nr=_.useCallback(je=>{je.resourceId===e.id&&(je.jobType==="generation"?O(`Resource generation failed: ${je.error}`):O(je.error||"Annotation failed"))},[e.id,O]),kn=_.useCallback(({resourceId:je})=>{if(i.resourceDetail){const Je=i.resourceDetail(je);f.emit("nav:push",{path:Je,reason:"reference-link"})}},[i.resourceDetail,m]),Is=_.useCallback(({entityType:je})=>{if(i.know){const Je=`${i.know}?entityType=${encodeURIComponent(je)}`;f.emit("nav:push",{path:Je,reason:"entity-type-filter"})}},[i.know,m]),Ei=_.useCallback(()=>{Cn(je=>!je)},[]);Ma({"mark:mode-toggled":Ei,"mark:archive":ie,"mark:unarchive":de,"yield:clone":Qe,"beckon:sparkle":Be,"mark:added":nt,"mark:create-failed":zt,"mark:delete-failed":zn,"mark:body-updated":sn,"bind:body-update-failed":Zt,"settings:theme-changed":Jt,"settings:line-numbers-toggled":j,"job:complete":mt,"job:fail":nr,"mark:assist-cancelled":()=>x("Annotation cancelled"),"browse:reference-navigate":kn,"browse:entity-type-clicked":Is});const{announceResourceLoading:fi,announceResourceLoaded:$t}=WB();_.useEffect(()=>{Y?fi(e.name):z&&$t(e.name)},[Y,z,e.name,fi,$t]);const Bt=e.entityTypes||[],Pt=o0(e),jn=Pt==null?void 0:Pt.mediaType,Tn=Pt==null?void 0:Pt.byteSize,[on,Cn]=_.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1),$n={...e,content:z},Gt=_.useCallback(je=>{je&&(m==null||m.client.emit("beckon:sparkle",{annotationId:je}))},[m]),Yn=_.useCallback(je=>{},[]);return g.jsxs("div",{className:`semiont-document-viewer${Ne?" semiont-document-viewer--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-document-viewer__main",children:[g.jsxs("div",{className:"semiont-document-viewer__content",children:[g.jsx("div",{className:"semiont-document-viewer__header",children:g.jsx("div",{className:"semiont-document-viewer__header-inner",children:g.jsx("h2",{className:"semiont-document-viewer__title",children:e.name})})}),g.jsx("div",{className:"semiont-document-viewer__scrollable-body",lang:rk(e)||void 0,children:g.jsx(UV,{fallback:(je,Je)=>g.jsxs("div",{className:"semiont-document-viewer__error",children:[g.jsx("h3",{className:"semiont-document-viewer__error-title",children:"Error loading document viewer"}),g.jsx("p",{className:"semiont-document-viewer__error-message",children:je.message}),g.jsx("button",{onClick:Je,className:"semiont-document-viewer__error-button",children:"Try again"})]}),children:Y?g.jsx("div",{className:"semiont-document-viewer__loading",children:"Loading document content..."}):g.jsx(ZK,{resource:$n,annotations:le??{highlights:[],comments:[],assessments:[],references:[],tags:[]},generatingReferenceId:(Se==null?void 0:Se.annotationId)??null,showLineNumbers:T,hoverDelayMs:E,hoveredAnnotationId:ge})})})]}),g.jsxs("div",{className:"semiont-document-viewer__sidebar",children:[g.jsxs(a,{activePanel:Ne,theme:w,showLineNumbers:T,hoverDelayMs:E,width:Ne==="jsonld"?"w-[600px]":Ne==="annotations"?"w-[400px]":"w-64",children:[on&&e.archived&&g.jsx("div",{className:"semiont-document-viewer__archived-status",children:g.jsx("div",{className:"semiont-document-viewer__archived-text",children:"📦 Archived"})}),Ne==="annotations"&&!e.archived&&g.jsx(fJ,{annotations:ee,annotators:Jn,annotateMode:on,assistingMotivation:ve,progress:Xe,pendingAnnotation:_e,allEntityTypes:I,generatingReferenceId:(Se==null?void 0:Se.annotationId)??null,referencedBy:re,referencedByLoading:R,resourceId:t,locale:n,scrollToAnnotationId:Ze,hoveredAnnotationId:ge,onScrollCompleted:Fe,initialTab:be==null?void 0:be.tab,initialTabGeneration:be==null?void 0:be.generation,Link:r,routes:i}),Ne==="history"&&g.jsx(EY,{rUri:t,hoveredAnnotationId:ge,onEventHover:Gt,onEventClick:Yn,Link:r,routes:i}),Ne==="info"&&g.jsx(oJ,{resourceId:t,documentEntityTypes:Bt,documentLocale:rk(e),primaryMediaType:jn,primaryByteSize:Tn,storageUri:e.storageUri,isArchived:e.archived??!1,dateCreated:e.dateCreated,dateModified:e.dateModified,creationMethod:e.creationMethod,wasAttributedTo:e.wasAttributedTo,wasDerivedFrom:e.wasDerivedFrom,generator:e.generator}),Ne==="collaboration"&&g.jsx(FK,{state:l,eventCount:0,knowledgeBaseName:c}),Ne==="jsonld"&&g.jsx(rJ,{resource:e})]}),g.jsx(wR,{context:"document",activePanel:Ne,isArchived:e.archived??!1})]})]}),g.jsx(ste,{isOpen:yn,onClose:Dt,annotationId:Te,resourceId:lt,defaultTitle:me,entityTypes:Ot,locale:n,context:Ve,contextLoading:ot,contextError:vt,onGenerateSubmit:Wt,onLinkResource:tt,onComposeNavigate:Un,translations:{gatherTitle:d("gatherTitle"),configureGenerationTitle:d("configureGenerationTitle"),configureSearchTitle:d("configureSearchTitle"),searchResultsTitle:d("searchResultsTitle"),sourceContextLabel:d("sourceContextLabel"),connectionsLabel:d("connectionsLabel"),citedByLabel:d("citedByLabel"),userHintLabel:d("userHintLabel"),userHintPlaceholder:d("userHintPlaceholder"),loadingContext:d("loadingContext"),failedContext:d("failedContext"),cancel:d("cancel"),search:d("search"),searching:d("searching"),generate:d("generate"),compose:d("compose"),resolutionStrategyLabel:d("resolutionStrategyLabel"),back:d("back"),link:d("link"),score:d("score"),noResults:d("noResults"),resourceTitle:d("resourceTitle"),resourceTitlePlaceholder:d("resourceTitlePlaceholder"),additionalInstructions:d("additionalInstructions"),additionalInstructionsPlaceholder:d("additionalInstructionsPlaceholder"),language:d("language"),languageHelp:d("languageHelp"),creativity:d("creativity"),creativityFocused:d("creativityFocused"),creativityCreative:d("creativityCreative"),maxLength:d("maxLength"),maxLengthHelp:d("maxLengthHelp"),maxResults:d("maxResults"),semanticScoring:d("semanticScoring"),semanticScoringHelp:d("semanticScoringHelp")}})]})}function gne({children:e}){const t=HD();return g.jsxs(WV,{resetKeys:[t.pathname],children:[g.jsx(vY,{}),g.jsx(gY,{}),e]})}const vne=ue.lazy(()=>Pe(()=>import("./layout-BgHlzaj1.js"),__vite__mapDeps([4,5,1,6,3]))),One=ue.lazy(()=>Pe(()=>import("./page-DBoIW_-n.js"),__vite__mapDeps([7,1,6,3]))),bne=ue.lazy(()=>Pe(()=>import("./page-BDMxGD5Z.js"),__vite__mapDeps([8,1,9,5,6,3,10,11]))),yne=ue.lazy(()=>Pe(()=>import("./page-C8zOqZ8M.js"),__vite__mapDeps([12,1,9,5,6,3,10,11]))),xne=ue.lazy(()=>Pe(()=>import("./page-DWS9ulKD.js"),__vite__mapDeps([13,1,6,3,9,5,10,11]))),Sne=ue.lazy(()=>Pe(()=>import("./page-DEHEdU59.js"),__vite__mapDeps([14,1,6,3]))),wne=ue.lazy(()=>Pe(()=>import("./page-By8BIN8Q.js"),__vite__mapDeps([15,1,6,3,9,5,10,11]))),_ne=ue.lazy(()=>Pe(()=>import("./page-BD9EKRMV.js"),__vite__mapDeps([16,1,9,5,6,3,10,11]))),kne=ue.lazy(()=>Pe(()=>import("./page-DoqFVg4p.js"),__vite__mapDeps([17,1,6,3]))),jne=ue.lazy(()=>Pe(()=>import("./layout-Dj1MEjN6.js"),__vite__mapDeps([18,1,6,3,19,10,20,11,9,5]))),Tne=ue.lazy(()=>Pe(()=>import("./page-DB1HZ_Jr.js"),__vite__mapDeps([21,1,6,3]))),Cne=ue.lazy(()=>Pe(()=>import("./page-ChjwiTJ8.js"),__vite__mapDeps([22,1,6,3,19,10]))),Ene=ue.lazy(()=>Pe(()=>import("./page-jr_Rqa0A.js"),__vite__mapDeps([23,1,6,3,19,10]))),Qne=ue.lazy(()=>Pe(()=>import("./page-BwiRQxa7.js"),__vite__mapDeps([24,1,6,3,11,19,10]))),Ane=ue.lazy(()=>Pe(()=>import("./layout-BLGpzYwk.js"),__vite__mapDeps([25,1,6,3,9,5,10,26,27,20,11]))),Pne=ue.lazy(()=>Pe(()=>import("./page-D8JSCVFI.js"),__vite__mapDeps([28,6,1,3]))),Nne=ue.lazy(()=>Pe(()=>import("./client-Bvrf4lLa.js"),__vite__mapDeps([29,1,19,6,3,10]))),Rne=ue.lazy(()=>Pe(()=>import("./client-9KMfqezG.js"),__vite__mapDeps([30,1,19,6,3,10]))),Mne=ue.lazy(()=>Pe(()=>import("./client-D9qa8fAn.js"),__vite__mapDeps([31,1,19,6,3,10]))),Lne=ue.lazy(()=>Pe(()=>import("./page-8zC_t3l-.js"),__vite__mapDeps([32,1,19,6,3,10,27]))),Dne=ue.lazy(()=>Pe(()=>import("./layout-easR0slx.js"),__vite__mapDeps([33,1,6,3,26,20,9,5,10,11]))),zne=ue.lazy(()=>Pe(()=>import("./page-kLVTeA46.js"),__vite__mapDeps([34,1,6,3]))),$ne=ue.lazy(()=>Pe(()=>import("./page-CQsfujTh.js"),__vite__mapDeps([35,1,19,6,3,10]))),qne=ue.lazy(()=>Pe(()=>import("./page-btIB2WK4.js"),__vite__mapDeps([36,1,19,6,3,10]))),Ine=ue.lazy(()=>Pe(()=>import("./page-CTvUxWH5.js"),__vite__mapDeps([37,1,19,6,3,10]))),Xne=ue.lazy(()=>Pe(()=>import("./client-kIBNRH2w.js"),__vite__mapDeps([38,1,19,6,3,10]))),Zne=ue.lazy(()=>Pe(()=>import("./not-found-nC4IaXPt.js"),__vite__mapDeps([39,6,1,3])));function Bne({children:e}){const{locale:t}=JD(),{i18n:n}=r3();return _.useEffect(()=>{if(!t)return;const r=JO(t)?t:Dl;n.language!==r&&n.changeLanguage(r)},[t,n]),!t||!JO(t)?g.jsx(zC,{to:`/${Dl}`,replace:!0}):g.jsx(g.Fragment,{children:e})}function Vne(){const e=KD();return _.useEffect(()=>{const t=navigator.language.split("-")[0]??Dl,n=JO(t)?t:Dl;e(`/${n}`,{replace:!0})},[e]),null}function Une(){return g.jsx(ue.Suspense,{fallback:null,children:g.jsxs(GD,{children:[g.jsx(Tt,{path:"/",element:g.jsx(Vne,{})}),g.jsxs(Tt,{path:"/:locale",element:g.jsx(Bne,{children:g.jsx(vne,{})}),children:[g.jsx(Tt,{index:!0,element:g.jsx(One,{})}),g.jsx(Tt,{path:"about",element:g.jsx(bne,{})}),g.jsx(Tt,{path:"privacy",element:g.jsx(yne,{})}),g.jsx(Tt,{path:"terms",element:g.jsx(xne,{})}),g.jsx(Tt,{path:"auth/connect",element:g.jsx(Sne,{})}),g.jsx(Tt,{path:"auth/signup",element:g.jsx(wne,{})}),g.jsx(Tt,{path:"auth/error",element:g.jsx(_ne,{})}),g.jsx(Tt,{path:"auth/welcome",element:g.jsx(gne,{children:g.jsx(kne,{})})}),g.jsxs(Tt,{path:"know",element:g.jsx(jne,{}),children:[g.jsx(Tt,{index:!0,element:g.jsx(Tne,{})}),g.jsx(Tt,{path:"discover",element:g.jsx(Cne,{})}),g.jsx(Tt,{path:"compose",element:g.jsx(Ene,{})}),g.jsx(Tt,{path:"resource/:id",element:g.jsx(Qne,{})})]}),g.jsxs(Tt,{path:"admin",element:g.jsx(Ane,{}),children:[g.jsx(Tt,{index:!0,element:g.jsx(Pne,{})}),g.jsx(Tt,{path:"users",element:g.jsx(Nne,{})}),g.jsx(Tt,{path:"security",element:g.jsx(Rne,{})}),g.jsx(Tt,{path:"exchange",element:g.jsx(Mne,{})}),g.jsx(Tt,{path:"devops",element:g.jsx(Lne,{})})]}),g.jsxs(Tt,{path:"moderate",element:g.jsx(Dne,{}),children:[g.jsx(Tt,{index:!0,element:g.jsx(zne,{})}),g.jsx(Tt,{path:"recent",element:g.jsx($ne,{})}),g.jsx(Tt,{path:"entity-tags",element:g.jsx(qne,{})}),g.jsx(Tt,{path:"tag-schemas",element:g.jsx(Ine,{})}),g.jsx(Tt,{path:"linked-data",element:g.jsx(Xne,{})})]}),g.jsx(Tt,{path:"*",element:g.jsx(Zne,{})})]}),g.jsx(Tt,{path:"*",element:g.jsx(zC,{to:`/${Dl}`,replace:!0})})]})})}const z5=document.getElementById("root");if(!z5)throw new Error("Root element not found");d3.createRoot(z5).render(g.jsx(ue.StrictMode,{children:g.jsx(e3,{children:g.jsx(Une,{})})}));const Yne=Object.freeze(Object.defineProperty({__proto__:null,AnnotateToolbar:nE,AnnotateView:sE,AnnotationHistory:YC,AssessmentPanel:HC,CollaborationPanel:UC,CollapsibleResourceNavigation:rE,CommentsPanel:WC,HighlightPanel:FC,KeyboardShortcuts:tE,ReferenceWizard:oE,ReferencesPanel:eE,ResourceInfoPanel:VC,ResourceViewer:iE,Settings:aE,StatisticsPanel:JC,TaggingPanel:GC,Toolbar:BC,UnifiedAnnotationsPanel:KC,default:yo},Symbol.toStringTag,{value:"Module"}));export{Tre as $,Xre as A,Vre as B,Rre as C,rre as D,Bre as E,Dl as F,JO as G,An as H,i0 as I,Ure as J,Ere as K,$re as L,Pre as M,gne as N,_re as O,Nre as P,hJ as Q,Wre as R,Pm as S,wR as T,Cre as U,Lre as V,Zre as W,Are as X,Qre as Y,bre as Z,yre as _,Ire as a,cre as a0,xre as a1,vre as a2,Ore as a3,tre as a4,y$ as a5,ob as a6,ere as a7,Kne as a8,Jne as a9,ZB as aa,Ji as ab,HV as ac,jre as ad,hre as ae,dre as af,fre as ag,wre as ah,Sre as ai,dte as aj,Su as b,Le as c,BQ as d,FP as e,ore as f,pne as g,BB as h,K0 as i,g as j,Ma as k,nre as l,ure as m,HP as n,Yre as o,lre as p,Mre as q,Hi as r,Fre as s,qre as t,st as u,are as v,zre as w,sre as x,Dre as y,ire as z};
169
+ //# sourceMappingURL=index-DaA8-3Y1.js.map