@ganglion/xacpx-relay 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +10 -0
  2. package/dist/auth.d.ts +6 -0
  3. package/dist/cli.d.ts +24 -0
  4. package/dist/cli.js +1168 -0
  5. package/dist/db.d.ts +9 -0
  6. package/dist/gateway/instance-gateway.d.ts +30 -0
  7. package/dist/gateway/web-gateway.d.ts +11 -0
  8. package/dist/http/app.d.ts +33 -0
  9. package/dist/http/client-ip.d.ts +2 -0
  10. package/dist/maintenance.d.ts +22 -0
  11. package/dist/relay-web/assets/BrandLogo.vue_vue_type_script_setup_true_lang-CSPZDDtK.js +1 -0
  12. package/dist/relay-web/assets/DashboardView-AMivJ-D8.css +1 -0
  13. package/dist/relay-web/assets/DashboardView-Bhx2FJSv.js +256 -0
  14. package/dist/relay-web/assets/LoginView-CYhQnBi-.js +1 -0
  15. package/dist/relay-web/assets/SettingsView-hmSvIsKD.js +6 -0
  16. package/dist/relay-web/assets/index-DC1zO5jV.css +1 -0
  17. package/dist/relay-web/assets/index-DE2bTqBl.js +80 -0
  18. package/dist/relay-web/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  19. package/dist/relay-web/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  20. package/dist/relay-web/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  21. package/dist/relay-web/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  22. package/dist/relay-web/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
  23. package/dist/relay-web/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
  24. package/dist/relay-web/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
  25. package/dist/relay-web/assets/inter-cyrillic-700-normal-DrXBdSj3.woff +0 -0
  26. package/dist/relay-web/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  27. package/dist/relay-web/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  28. package/dist/relay-web/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  29. package/dist/relay-web/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  30. package/dist/relay-web/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
  31. package/dist/relay-web/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
  32. package/dist/relay-web/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
  33. package/dist/relay-web/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff +0 -0
  34. package/dist/relay-web/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  35. package/dist/relay-web/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  36. package/dist/relay-web/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  37. package/dist/relay-web/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  38. package/dist/relay-web/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
  39. package/dist/relay-web/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
  40. package/dist/relay-web/assets/inter-greek-700-normal-BUv2fZ6O.woff +0 -0
  41. package/dist/relay-web/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
  42. package/dist/relay-web/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  43. package/dist/relay-web/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  44. package/dist/relay-web/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  45. package/dist/relay-web/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  46. package/dist/relay-web/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
  47. package/dist/relay-web/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
  48. package/dist/relay-web/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff +0 -0
  49. package/dist/relay-web/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
  50. package/dist/relay-web/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  51. package/dist/relay-web/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  52. package/dist/relay-web/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  53. package/dist/relay-web/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  54. package/dist/relay-web/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
  55. package/dist/relay-web/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  56. package/dist/relay-web/assets/inter-latin-700-normal-BLAVimhd.woff +0 -0
  57. package/dist/relay-web/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
  58. package/dist/relay-web/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  59. package/dist/relay-web/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  60. package/dist/relay-web/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  61. package/dist/relay-web/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  62. package/dist/relay-web/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
  63. package/dist/relay-web/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
  64. package/dist/relay-web/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
  65. package/dist/relay-web/assets/inter-latin-ext-700-normal-TidjK2hL.woff +0 -0
  66. package/dist/relay-web/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  67. package/dist/relay-web/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  68. package/dist/relay-web/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  69. package/dist/relay-web/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  70. package/dist/relay-web/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
  71. package/dist/relay-web/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  72. package/dist/relay-web/assets/inter-vietnamese-700-normal-BZaoP0fm.woff +0 -0
  73. package/dist/relay-web/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
  74. package/dist/relay-web/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  75. package/dist/relay-web/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  76. package/dist/relay-web/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
  77. package/dist/relay-web/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
  78. package/dist/relay-web/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  79. package/dist/relay-web/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  80. package/dist/relay-web/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
  81. package/dist/relay-web/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
  82. package/dist/relay-web/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  83. package/dist/relay-web/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  84. package/dist/relay-web/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  85. package/dist/relay-web/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  86. package/dist/relay-web/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  87. package/dist/relay-web/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  88. package/dist/relay-web/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  89. package/dist/relay-web/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
  90. package/dist/relay-web/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  91. package/dist/relay-web/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
  92. package/dist/relay-web/assets/theme-CaepIjgl.js +1 -0
  93. package/dist/relay-web/index.html +28 -0
  94. package/dist/server.d.ts +42 -0
  95. package/dist/stores/accounts.d.ts +74 -0
  96. package/dist/stores/instances.d.ts +42 -0
  97. package/dist/stores/messages.d.ts +30 -0
  98. package/package.json +24 -0
@@ -0,0 +1,256 @@
1
+ import{j as X,k as xt,r as C,l as ue,A as Su,m as K,d as ae,n as ht,p as Ou,o as d,c as y,a as b,q as W,t as S,b as L,f as v,F as G,s as re,g as I,h as Ye,x as q,y as he,e as oe,w as Se,v as Le,z as rr,B as Tn,T as au,C as pu,D as Da,E as Sn,G as st,H as Ta,I as Dt,J as ct,K as ar,L as or,M as Sa,N as Fa}from"./index-DE2bTqBl.js";import{_ as $a}from"./BrandLogo.vue_vue_type_script_setup_true_lang-CSPZDDtK.js";import{u as Ia}from"./theme-CaepIjgl.js";/**
2
+ * @license lucide-vue-next v1.0.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const is=X("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
7
+ * @license lucide-vue-next v1.0.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const ir=X("ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]);/**
12
+ * @license lucide-vue-next v1.0.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Ma=X("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
17
+ * @license lucide-vue-next v1.0.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const _n=X("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
22
+ * @license lucide-vue-next v1.0.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const Fn=X("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);/**
27
+ * @license lucide-vue-next v1.0.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Zt=X("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
32
+ * @license lucide-vue-next v1.0.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const Xe=X("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
37
+ * @license lucide-vue-next v1.0.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const Tt=X("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
42
+ * @license lucide-vue-next v1.0.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Oa=X("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
47
+ * @license lucide-vue-next v1.0.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const lr=X("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
52
+ * @license lucide-vue-next v1.0.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const Ra=X("circle-stop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
57
+ * @license lucide-vue-next v1.0.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const za=X("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
62
+ * @license lucide-vue-next v1.0.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const La=X("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
67
+ * @license lucide-vue-next v1.0.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const cr=X("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
72
+ * @license lucide-vue-next v1.0.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const Na=X("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
77
+ * @license lucide-vue-next v1.0.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const Pa=X("corner-left-up",[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]);/**
82
+ * @license lucide-vue-next v1.0.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Ba=X("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
87
+ * @license lucide-vue-next v1.0.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const qa=X("file-diff",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);/**
92
+ * @license lucide-vue-next v1.0.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const ou=X("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
97
+ * @license lucide-vue-next v1.0.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Fu=X("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
102
+ * @license lucide-vue-next v1.0.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const wn=X("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
107
+ * @license lucide-vue-next v1.0.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const dr=X("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);/**
112
+ * @license lucide-vue-next v1.0.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const St=X("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
117
+ * @license lucide-vue-next v1.0.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const $u=X("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);/**
122
+ * @license lucide-vue-next v1.0.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const Ua=X("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);/**
127
+ * @license lucide-vue-next v1.0.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const ja=X("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);/**
132
+ * @license lucide-vue-next v1.0.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const Ha=X("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);/**
137
+ * @license lucide-vue-next v1.0.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const Va=X("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
142
+ * @license lucide-vue-next v1.0.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const Wa=X("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
147
+ * @license lucide-vue-next v1.0.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const Ga=X("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
152
+ * @license lucide-vue-next v1.0.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const Ka=X("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
157
+ * @license lucide-vue-next v1.0.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const Za=X("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
162
+ * @license lucide-vue-next v1.0.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const Ya=X("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
167
+ * @license lucide-vue-next v1.0.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const Ru=X("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
172
+ * @license lucide-vue-next v1.0.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const Xa=X("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
177
+ * @license lucide-vue-next v1.0.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const Ja=X("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
182
+ * @license lucide-vue-next v1.0.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const Qa=X("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
187
+ * @license lucide-vue-next v1.0.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const eo=X("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
192
+ * @license lucide-vue-next v1.0.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const to=X("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
197
+ * @license lucide-vue-next v1.0.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const zu=X("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
202
+ * @license lucide-vue-next v1.0.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const fr=X("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);/**
207
+ * @license lucide-vue-next v1.0.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const rt=X("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var ls=1;function uo(e){let t;try{t=JSON.parse(e)}catch{return{ok:!1,error:"invalid-json"}}return no(t)?t.protocolVersion!==ls?{ok:!1,error:"version-mismatch",detail:`expected protocolVersion ${ls}, got ${t.protocolVersion}`}:{ok:!0,envelope:t}:{ok:!1,error:"invalid-envelope"}}function no(e){if(typeof e!="object"||e===null)return!1;const t=e;return!(typeof t.protocolVersion!="number"||!Number.isInteger(t.protocolVersion)||t.kind!=="req"&&t.kind!=="res"&&t.kind!=="event"||typeof t.type!="string"||t.type.trim().length===0||t.id!==void 0&&typeof t.id!="string"||(t.kind==="req"||t.kind==="res")&&(typeof t.id!="string"||t.id.length===0))}function Wt(e){if(typeof e!="object"||e===null)return!1;const t=e.error;if(typeof t!="object"||t===null)return!1;const u=t;return typeof u.code=="string"&&typeof u.message=="string"}var so="web.event",ro=new Set(["instance-status","control-event","notice"]),ao=new Set(["turn-output","turn-started","tool-event","turn-thought","plan","turn-finished","sessions-changed","scheduled-changed","orchestration-changed"]),oo=new Set(["read","search","execute","edit","think","other"]),io=new Set(["running","success","error"]),ut=e=>typeof e=="string",jt=e=>e===void 0||typeof e=="string",lo=e=>e===void 0||typeof e=="number";function co(e){switch(e.type){case"diff":return ut(e.path)&&ut(e.oldText)&&ut(e.newText);case"read":return ut(e.path)&&jt(e.lines)&&jt(e.preview);case"command":return ut(e.command)&&jt(e.output)&&lo(e.exitCode);case"search":return ut(e.query)&&jt(e.output);case"text":return ut(e.text);case"fields":return Array.isArray(e.fields)&&e.fields.every(t=>t!==null&&typeof t=="object"&&ut(t.label)&&ut(t.value))&&jt(e.output);default:return!1}}function fo(e){if(typeof e!="object"||e===null)return!1;const t=e;return!(typeof t.toolCallId!="string"||typeof t.toolName!="string"||typeof t.title!="string"||typeof t.kind!="string"||!oo.has(t.kind)||typeof t.status!="string"||!io.has(t.status)||!jt(t.error)||t.detail!==void 0&&(typeof t.detail!="object"||t.detail===null||!co(t.detail)))}function po(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.type!="string"||!ao.has(t.type)?!1:t.type==="turn-output"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&typeof t.chunk=="string":t.type==="turn-finished"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&typeof t.ok=="boolean":t.type==="scheduled-changed"?typeof t.chatKey=="string":t.type==="turn-started"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string":t.type==="turn-thought"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&typeof t.chunk=="string":t.type==="plan"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&Array.isArray(t.entries):t.type==="tool-event"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&fo(t.step):!0}var ho=new Set(["task-completion","task-progress","coordinator-message"]);function bo(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.kind=="string"&&ho.has(t.kind)&&typeof t.text=="string"}function mo(e){if(e.kind!=="event"||e.type!==so)return null;const t=e.payload;if(typeof t!="object"||t===null)return null;const u=t;return typeof u.instanceId!="string"||typeof u.kind!="string"||!ro.has(u.kind)||u.kind==="instance-status"&&typeof u.online!="boolean"||u.kind==="control-event"&&!po(u.event)||u.kind==="notice"&&!bo(u.notice)?null:t}function go(e,t){let u=null,n=!1,s=0,r=null;const o=()=>{const a=location.protocol==="https:"?"wss":"ws";u=new WebSocket(`${a}://${location.host}/ws`),u.onmessage=i=>{const l=uo(String(i.data));if(!l.ok)return;const c=mo(l.envelope);c&&e(c)},u.onopen=()=>{s=0,t==null||t(!0)},u.onclose=()=>{t==null||t(!1),!n&&(s=Math.min(s+1,6),r=setTimeout(()=>{r=null,n||o()},250*2**(s-1)))}};return o(),()=>{n=!0,r&&(clearTimeout(r),r=null),u==null||u.close()}}function Et(e){if(Wt(e))throw e.error.code==="unknown-type"?new Error("This feature needs a newer connector — rebuild and reconnect the relay channel on that instance."):new Error(e.error.message||e.error.code);return e}const at=xt("instances",()=>{const e=C([]);async function t(){const{instances:g}=await ue.get("/api/instances");e.value=g.map(_=>{const E=x(_.id);return{..._,sessions:(E==null?void 0:E.sessions)??[],sessionsLoaded:(E==null?void 0:E.sessionsLoaded)??!1,agents:(E==null?void 0:E.agents)??[],workspaces:(E==null?void 0:E.workspaces)??[],agentCatalog:(E==null?void 0:E.agentCatalog)??[]}});for(const _ of e.value)_.online&&!_.sessionsLoaded&&u(_.id).catch(()=>{})}async function u(g){const{sessions:_}=await ue.rpc(g,"control.sessions.list"),E=x(g);E&&(E.sessions=_,E.sessionsLoaded=!0)}async function n(g){const{workspaces:_}=await ue.rpc(g,"control.workspaces.list"),E=x(g);E&&(E.workspaces=_)}async function s(g){const[{agents:_},{workspaces:E},{agents:F}]=await Promise.all([ue.rpc(g,"control.agents.list"),ue.rpc(g,"control.workspaces.list"),ue.rpc(g,"control.agents.catalog")]),D=x(g);D&&(D.agents=_,D.workspaces=E,D.agentCatalog=F)}async function r(g){const{agents:_}=await ue.rpc(g,"control.agents.catalog"),E=x(g);E&&(E.agentCatalog=_)}async function o(g,_,E){Et(await ue.rpc(g,"control.agents.create",{name:_,driver:E})),await s(g)}async function a(g,_){Et(await ue.rpc(g,"control.agents.remove",{name:_})),await s(g)}async function i(g,_){Et(await ue.rpc(g,"control.workspaces.remove",{name:_})),await s(g)}async function l(g,_,E,F){const{workspace:D}=Et(await ue.rpc(g,"control.workspaces.create",{name:_,cwd:E,description:F})),M=x(g);return M&&!M.workspaces.some(A=>A.name===D.name)&&(M.workspaces=[...M.workspaces,D]),D}async function c(g,_,E,F,D,M){try{Et(await ue.rpc(g,"control.sessions.create",{alias:_,agent:E,workspace:F,...D?{agentSessionId:D}:{},...M?{model:M}:{}}))}catch(A){if(A instanceof Su&&(A.status===504||A.code==="timeout"))return{pending:!0};throw A}return await u(g),{pending:!1}}async function f(g,_,E){const{sessions:F}=Et(await ue.rpc(g,"control.sessions.native.list",{agent:_,workspace:E}));return F}async function k(g,_,E){const F=x(g),D=((F==null?void 0:F.sessions)??[]).find(M=>M.agent===_&&M.workspace===E);if(!D)return[];try{const M=Et(await ue.rpc(g,"control.session.model.get",{sessionAlias:D.alias})),A=new Set,O=[];for(const T of[...M.current?[M.current]:[],...M.available])T&&!A.has(T)&&(A.add(T),O.push(T));return O}catch{return[]}}async function m(g,_){await ue.rpc(g,"control.sessions.remove",{alias:_}),await u(g)}function h(g){if(g.kind==="instance-status"){const _=x(g.instanceId);_&&(_.online=g.online,g.online&&!_.sessionsLoaded&&u(g.instanceId).catch(()=>{}))}else g.kind==="control-event"&&g.event.type==="sessions-changed"&&u(g.instanceId).catch(()=>{})}function x(g){return e.value.find(_=>_.id===g)}return{instances:e,loadInstances:t,loadSessions:u,loadWorkspaces:n,loadFormOptions:s,loadAgentCatalog:r,createWorkspace:l,createAgent:o,removeAgent:a,removeWorkspace:i,createSession:c,listNativeSessions:f,listModelSuggestions:k,removeSession:m,applyEvent:h,byId:x}}),pr="xrelay.selectedSession";function xo(e,t){try{localStorage.setItem(pr,JSON.stringify({instanceId:e,alias:t}))}catch{}}function vo(){try{const e=localStorage.getItem(pr);if(!e)return null;const t=JSON.parse(e);return typeof t.instanceId=="string"&&typeof t.alias=="string"?{instanceId:t.instanceId,alias:t.alias}:null}catch{return null}}function yo(e,t){const u=e[e.length-1];(u==null?void 0:u.type)==="text"?u.text+=t:e.push({type:"text",text:t})}function ko(e,t){const u=e[e.length-1];(u==null?void 0:u.type)==="reasoning"?u.text+=t:e.push({type:"reasoning",text:t})}function _o(e,t){const u=e.findIndex(n=>n.type==="tool"&&n.step.toolCallId===t.toolCallId);u>=0?e[u]={type:"tool",step:t}:e.push({type:"tool",step:t})}const cs=e=>e.filter(t=>t.type==="text").map(t=>t.text).join(""),ds=e=>e.filter(t=>t.type==="tool").map(t=>t.step),wo=e=>e.filter(t=>t.type==="reasoning").map(t=>t.text).join(""),Ft=xt("chat",()=>{const e=C(null),t=C(null),u=C([]),n=C({}),s=C({}),r=C(new Set),o=new Set,a=(U,P)=>`${U}\0${P}`;function i(U,P){const B=a(U,P);return n.value[B]?"working":r.value.has(B)?"unread":"idle"}function l(U,P){var B;return((B=n.value[a(U,P)])==null?void 0:B.startedAt)??null}const c=K(()=>e.value&&t.value?a(e.value,t.value):null),f=K(()=>c.value?n.value[c.value]??null:null),k=K(()=>c.value?s.value[c.value]??null:null),m=K(()=>f.value?cs(f.value.parts):""),h=K(()=>f.value?ds(f.value.parts):[]),x=K(()=>f.value!==null),g=C(!1),_=C(""),E=C(null);let F=0;function D(U){E.value={taskId:U,nonce:++F}}const M=100,A=C(!1),O=C(!1);function T(U){let P=n.value[U];return P||(P={parts:[],status:"working",startedAt:Date.now()},n.value[U]=P),P}function R(U,P,B,me){const ge=a(U,P),$e=n.value[ge];delete n.value[ge];const yt=U===e.value&&P===t.value;if(B==="error"&&yt&&(_.value=me??"turn-failed"),!$e)return;const Mt=cs($e.parts),kt=ds($e.parts),qe=wo($e.parts);if((Mt.length>0||kt.length>0||qe.length>0)&&yt){const $=kt.length>0||qe.length>0?{toolSteps:kt,...qe?{reasoning:qe}:{},parts:$e.parts}:void 0;u.value.push({instanceId:U,sessionAlias:P,direction:"out",text:Mt,createdAt:new Date().toISOString(),failed:B==="error",status:B,...$?{structured:$}:{}})}}function ce(U,P){e.value=U,t.value=P,xo(U,P),u.value=[],_.value="",A.value=!1,O.value=!1;const B=a(U,P);if(r.value.has(B)){const me=new Set(r.value);me.delete(B),r.value=me}}async function ee(){if(!e.value||!t.value)return;const{messages:U,hasMore:P}=await ue.get(`/api/instances/${e.value}/sessions/${t.value}/messages?limit=${M}`);u.value=U,A.value=P??!1}async function J(){var me;if(!e.value||!t.value||O.value||!A.value)return;const U=(me=u.value.find(ge=>typeof ge.id=="number"))==null?void 0:me.id;if(U===void 0)return;const P=e.value,B=t.value;O.value=!0;try{const{messages:ge,hasMore:$e}=await ue.get(`/api/instances/${P}/sessions/${B}/messages?before=${U}&limit=${M}`);if(P!==e.value||B!==t.value)return;ge.length>0&&(u.value=[...ge,...u.value]),A.value=$e??!1}catch{}finally{O.value=!1}}function Z(U){for(const P of U){const B=a(P.instanceId,P.sessionAlias);n.value[B]||o.has(B)||(n.value[B]={parts:P.parts,status:P.status,startedAt:P.startedAt})}}async function ie(){const{turns:U}=await ue.get("/api/active-turns");Z(U)}function fe(U){if(U.kind==="instance-status"&&!U.online){const B=`${U.instanceId}\0`;for(const ge of Object.keys(n.value))ge.startsWith(B)&&delete n.value[ge];const me=new Set([...r.value].filter(ge=>!ge.startsWith(B)));me.size!==r.value.size&&(r.value=me);return}if(U.kind!=="control-event")return;const P=U.event;if(P.type==="turn-started"){const B=a(U.instanceId,P.sessionAlias);o.delete(B),T(B);const me=U.instanceId===e.value&&P.sessionAlias===t.value;P.prompt&&me&&u.value.push({instanceId:U.instanceId,sessionAlias:P.sessionAlias,direction:"in",text:P.prompt,createdAt:new Date().toISOString(),...P.scheduled?{scheduled:P.scheduled}:{}})}else if(P.type==="turn-output"){const B=T(a(U.instanceId,P.sessionAlias));yo(B.parts,P.chunk),B.status="streaming"}else if(P.type==="tool-event"){const B=T(a(U.instanceId,P.sessionAlias));_o(B.parts,P.step)}else if(P.type==="turn-thought")ko(T(a(U.instanceId,P.sessionAlias)).parts,P.chunk);else if(P.type==="plan")s.value[a(U.instanceId,P.sessionAlias)]=P.entries;else if(P.type==="session-history")U.instanceId===e.value&&P.sessionAlias===t.value&&ee().catch(()=>{});else if(P.type==="turn-finished"){const B=P.cancelled?"cancelled":P.ok?"done":"error",me=U.instanceId===e.value&&P.sessionAlias===t.value;if(o.add(a(U.instanceId,P.sessionAlias)),R(U.instanceId,P.sessionAlias,B,P.errorMessage),!me&&(B==="done"||B==="error")){const ge=a(U.instanceId,P.sessionAlias),$e=new Set(r.value);$e.add(ge),r.value=$e}}}async function Ee(U){if(!e.value||!t.value)return;_.value="",g.value=!0;const P={instanceId:e.value,sessionAlias:t.value,direction:"in",text:U,createdAt:new Date().toISOString()};u.value.push(P);try{const B=await ue.rpc(e.value,"control.prompt",{sessionAlias:t.value,text:U});B&&B.ok===!1&&(_.value=B.errorMessage??"prompt-failed",P.failed=!0)}catch(B){B instanceof Su&&(B.status===504||B.code==="timeout")||(_.value=B instanceof Su?B.code:"send-failed",P.failed=!0)}finally{g.value=!1}}async function vt(U){if(!U.failed||U.direction!=="in")return;const P=u.value.indexOf(U);P>=0&&u.value.splice(P,1),await Ee(U.text)}async function It(){if(!e.value||!t.value)return;const U=e.value,P=t.value;R(U,P,"cancelled");try{await ue.rpc(U,"control.prompt.cancel",{sessionAlias:P})}catch(B){_.value=B instanceof Su?B.code:"cancel-failed"}}return{instanceId:e,sessionAlias:t,messages:u,streaming:m,liveTurn:f,sessionPlan:k,liveToolSteps:h,busy:x,unread:r,sessionAttention:i,runningSince:l,sending:g,error:_,scrollRequest:E,requestScrollToScheduled:D,hasMoreOlder:A,loadingOlder:O,select:ce,loadHistory:ee,loadOlder:J,loadActiveTurns:ie,seedActiveTurns:Z,applyEvent:fe,send:Ee,resend:vt,cancel:It}}),hu=xt("tasks",()=>{const e=C([]),t=C([]),u=C(null);async function n(c,f){const{tasks:k}=await ue.rpc(c,"control.scheduled.list");e.value=k.filter(m=>m.sessionAlias===f)}async function s(c){const{tasks:f}=await ue.rpc(c,"control.orchestration.list");t.value=f}async function r(c,f){u.value={instanceId:c,sessionAlias:f},await Promise.all([n(c,f).catch(()=>{e.value=[]}),s(c).catch(()=>{t.value=[]})])}async function o(c,f,k,m){await ue.rpc(c,"control.scheduled.create",{sessionAlias:f,executeAt:k,message:m}),await n(c,f)}async function a(c){const f=u.value;f&&(await ue.rpc(f.instanceId,"control.scheduled.cancel",{id:c}),await n(f.instanceId,f.sessionAlias))}async function i(c){const f=u.value;f&&(await ue.rpc(f.instanceId,"control.orchestration.cancel",{taskId:c}),await s(f.instanceId))}function l(c){if(c.kind!=="control-event")return;const f=u.value;!f||c.instanceId!==f.instanceId||(c.event.type==="scheduled-changed"?n(f.instanceId,f.sessionAlias).catch(()=>{}):c.event.type==="orchestration-changed"&&s(f.instanceId).catch(()=>{}))}return{scheduled:e,orchestration:t,scope:u,loadScheduled:n,loadOrchestration:s,loadFor:r,createScheduled:o,cancelScheduled:a,cancelOrchestration:i,applyEvent:l}}),fs=20,hr=xt("notices",()=>{const e=C([]);let t=0;function u(s){s.kind==="notice"&&(e.value.unshift({id:++t,instanceId:s.instanceId,kind:s.notice.kind,text:s.notice.text}),e.value.length>fs&&(e.value.length=fs))}function n(s){e.value=e.value.filter(r=>r.id!==s)}return{items:e,applyEvent:u,dismiss:n}}),br=xt("connection",()=>{const e=C(!1);function t(u){e.value=u}return{online:e,setOnline:t}});function eu(e){if(Wt(e))throw new Error(e.error.message||e.error.code);return e}const Lu=xt("files",()=>{const e=C(null),t=C(null),u=C(""),n=C([]),s=C(null),r=C(null),o=C(null),a=C(!1),i=C("files"),l=C({}),c=C(null),f=C(""),k=C([]),m=C(!1),h=C(!1),x=C(!1),g=C("");function _(){t.value=null,u.value="",n.value=[],s.value=null,r.value=null,o.value=null,a.value=!1,l.value={},f.value="",k.value=[],g.value=""}async function E(J,Z){e.value=J,t.value=Z,s.value=null,r.value=null,o.value=null,a.value=!1,l.value={},f.value="",k.value=[],await M(""),F()}async function F(){if(!(!e.value||!t.value))try{const J=await ue.rpc(e.value,"control.fs.diff",{workspace:t.value});if(Wt(J)){l.value={};return}const Z={};for(const ie of J.files)Z[ie.path]=ie.status;l.value=Z}catch{l.value={}}}async function D(J,Z){if(!J||!Z){c.value=null;return}try{const ie=await ue.rpc(J,"control.fs.diff",{workspace:Z});if(Wt(ie)){c.value=null;return}const fe=typeof ie.branch=="string"?ie.branch:void 0;c.value={workspace:Z,changedCount:ie.files.length,...fe?{branch:fe}:{}}}catch{c.value=null}}async function M(J){if(!(!e.value||!t.value)){x.value=!0,g.value="",s.value=null;try{const Z=eu(await ue.rpc(e.value,"control.fs.list",{workspace:t.value,path:J}));u.value=Z.path,n.value=Z.entries}catch(Z){g.value=Z instanceof Error?Z.message:"list-failed"}finally{x.value=!1}}}async function A(J){const Z=u.value?`${u.value}/${J.name}`:J.name;if(J.type==="dir")return M(Z);if(!(!e.value||!t.value)){x.value=!0,g.value="";try{s.value=eu(await ue.rpc(e.value,"control.fs.read",{workspace:t.value,path:Z}))}catch(ie){g.value=ie instanceof Error?ie.message:"read-failed"}finally{x.value=!1}}}async function O(J){if(!(!e.value||!t.value)){x.value=!0,g.value="";try{s.value=eu(await ue.rpc(e.value,"control.fs.read",{workspace:t.value,path:J}))}catch(Z){g.value=Z instanceof Error?Z.message:"read-failed"}finally{x.value=!1}}}async function T(){if(!(!e.value||!t.value)){if(i.value==="changes"){await ee(o.value??void 0);return}await M(u.value),await F(),await D(e.value,t.value)}}function R(J){const Z=u.value?u.value.split("/"):[];M(Z.slice(0,J+1).join("/"))}async function ce(J){if(f.value=J,!e.value||!t.value||!J.trim()){k.value=[],m.value=!1;return}h.value=!0,g.value="";try{const Z=eu(await ue.rpc(e.value,"control.fs.search",{workspace:t.value,query:J}));k.value=Z.matches,m.value=Z.truncated}catch(Z){g.value=Z instanceof Error?Z.message:"search-failed"}finally{h.value=!1}}async function ee(J){if(!(!e.value||!t.value)){x.value=!0,g.value="",o.value=J??null;try{r.value=eu(await ue.rpc(e.value,"control.fs.diff",{workspace:t.value,...J?{path:J}:{}})),a.value=!1}catch(Z){const ie=Z instanceof Error?Z.message:"diff-failed";r.value=null,ie==="not-a-git-repo"?a.value=!0:g.value=ie}finally{x.value=!1}}}return{instanceId:e,workspace:t,path:u,entries:n,file:s,diff:r,diffPath:o,notGit:a,changed:l,gitSummary:c,tab:i,query:f,results:k,searchTruncated:m,searching:h,loading:x,error:g,reset:_,selectWorkspace:E,list:M,open:A,openFile:O,up:R,search:ce,loadDiff:ee,loadStatus:F,loadGitSummary:D,refresh:T}});function mr(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function rn(e,t){return mr(`${e}-${t}`)}function an(e,t){const u=new Set(t);if(!u.has(e))return e;for(let n=2;;n+=1){const s=`${e}-${n}`;if(!u.has(s))return s}}function ps(e){const u=e.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??"";return mr(u)}const Eo=["data-test","aria-label","aria-expanded"],Ao={key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-border bg-raised py-1 shadow-xl"},Co={key:0,class:"px-3 pb-0.5 pt-1.5 text-[11px] font-medium uppercase tracking-wide text-fg-muted"},Do=["data-value","onMousedown","onMouseenter"],To={class:"truncate"},on=ae({__name:"SelectMenu",props:{modelValue:{},groups:{},placeholder:{},dataTest:{},ariaLabel:{}},emits:["update:modelValue"],setup(e,{emit:t}){const u=e,n=t,s=C(!1),r=C(null),o=C(-1),a=K(()=>u.groups.flatMap(_=>_.options)),i=K(()=>{var _;return((_=a.value.find(E=>E.value===u.modelValue))==null?void 0:_.label)??""});function l(){s.value=!0;const _=a.value.findIndex(E=>E.value===u.modelValue&&!E.disabled);o.value=_>=0?_:a.value.findIndex(E=>!E.disabled)}function c(){s.value=!1}function f(){s.value?c():l()}function k(_){_.disabled||(n("update:modelValue",_.value),c())}function m(_){const E=a.value;if(!E.length)return;let F=o.value;for(let D=0;D<E.length;D++)if(F=(F+_+E.length)%E.length,!E[F].disabled){o.value=F;return}}function h(_){if(!s.value){(_.key==="Enter"||_.key===" "||_.key==="ArrowDown")&&(_.preventDefault(),l());return}if(_.key==="ArrowDown")_.preventDefault(),m(1);else if(_.key==="ArrowUp")_.preventDefault(),m(-1);else if(_.key==="Enter"||_.key===" "){_.preventDefault();const E=a.value[o.value];E&&k(E)}else _.key==="Escape"&&(_.stopPropagation(),c())}function x(_){s.value&&r.value&&!r.value.contains(_.target)&&c()}ht(()=>document.addEventListener("mousedown",x)),Ou(()=>document.removeEventListener("mousedown",x));function g(_,E){let F=0;for(let D=0;D<_;D++)F+=u.groups[D].options.length;return F+E}return(_,E)=>(d(),y("div",{ref_key:"boxEl",ref:r,class:"relative"},[b("button",{type:"button","data-test":e.dataTest,"aria-label":e.ariaLabel,"aria-expanded":s.value,class:"flex w-full items-center justify-between rounded-lg border border-border bg-bg py-2 pl-3 pr-2 text-left text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onClick:f,onKeydown:h},[b("span",{class:W(["truncate",i.value?"text-fg":"text-fg-muted"])},S(i.value||e.placeholder||"Select…"),3),L(v(Xe),{size:16,class:W(["ml-2 shrink-0 text-fg-muted transition-transform",s.value?"rotate-180":""])},null,8,["class"])],40,Eo),s.value?(d(),y("ul",Ao,[(d(!0),y(G,null,re(e.groups,(F,D)=>(d(),y(G,{key:D},[F.label?(d(),y("li",Co,S(F.label),1)):I("",!0),(d(!0),y(G,null,re(F.options,(M,A)=>(d(),y("li",{key:M.value,"data-value":M.value,class:W(["flex items-center justify-between px-3 py-1.5 text-sm",[M.disabled?"cursor-not-allowed text-fg-muted/50":g(D,A)===o.value?"cursor-pointer bg-accent/15 text-fg":"cursor-pointer text-fg-muted hover:bg-fg/5"]]),onMousedown:Ye(O=>k(M),["prevent"]),onMouseenter:O=>!M.disabled&&(o.value=g(D,A))},[b("span",To,S(M.label),1),M.value===e.modelValue?(d(),q(v(Zt),{key:0,size:14,class:"ml-2 shrink-0 text-accent"})):I("",!0)],42,Do))),128))],64))),128))])):I("",!0)],512))}}),So={class:"w-full max-w-md rounded-xl border border-border bg-raised shadow-xl","data-test":"new-session-dialog"},Fo={class:"flex items-center justify-between border-b border-border px-5 py-3"},$o={class:"text-sm font-semibold text-fg"},Io={class:"font-normal text-fg-muted"},Mo={class:"space-y-4 px-5 py-4"},Oo={key:0,"data-test":"ns-pending",class:"rounded-lg bg-info/10 px-3 py-3 text-xs text-info"},Ro={key:1,class:"py-6 text-center text-sm text-fg-muted"},zo={class:"block"},Lo={class:"flex gap-1"},No={class:"block"},Po=["placeholder"],Bo={class:"block"},qo={class:"block"},Uo={class:"mb-1 flex items-center justify-between"},jo={key:0,class:"flex gap-1"},Ho={key:0,class:"block"},Vo={key:0,"data-test":"ns-model-list",class:"absolute z-10 mt-1 max-h-48 w-full overflow-auto rounded-lg border border-border bg-raised py-1 shadow-xl"},Wo=["onMousedown","onMouseenter"],Go={class:"truncate"},Ko={key:0,class:"ml-2 shrink-0 text-xs text-fg-muted"},Zo={key:1,class:"block"},Yo={key:0,"data-test":"ns-native-loading",class:"space-y-1.5"},Xo={class:"flex items-center gap-2 text-xs text-fg-muted"},Jo={key:2,"data-test":"ns-native-error",class:"rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger"},Qo={class:"flex items-start gap-1.5"},ei={class:"min-w-0"},ti={class:"break-words font-medium"},ui={key:0,class:"mt-1 text-danger/80"},ni={key:3,"data-test":"ns-native-empty",class:"rounded-lg bg-bg px-3 py-2 text-xs text-fg-muted"},si={key:2,"data-test":"ns-error",class:"rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger"},ri={class:"flex justify-end gap-2 border-t border-border px-5 py-3"},ai=["disabled"],oi=ae({__name:"NewSessionDialog",props:{instanceId:{},instanceName:{}},emits:["created","close"],setup(e,{emit:t}){const u=e,n=t,s=at(),r=K(()=>s.byId(u.instanceId)),o=C(""),a=C(""),i=C("new"),l=C("existing"),c=C(""),f=C(""),k=C(""),m=C([]),h=C(!1),x=C(0),g=C(null),_=K(()=>{const j=new Set(["default"]),$=["default"];for(const V of m.value)V&&!j.has(V)&&(j.add(V),$.push(V));return $}),E=K(()=>{const j=k.value.trim().toLowerCase();return j?_.value.filter($=>$.toLowerCase().includes(j)):_.value});function F(){h.value=!0,x.value=0}function D(){h.value=!1}function M(j){k.value=j==="default"?"":j,D()}function A(j){if(j.key==="ArrowDown"){if(j.preventDefault(),!h.value){F();return}x.value=Math.min(x.value+1,E.value.length-1)}else j.key==="ArrowUp"?(j.preventDefault(),x.value=Math.max(x.value-1,0)):j.key==="Enter"?h.value&&x.value>=0&&x.value<E.value.length?(j.preventDefault(),M(E.value[x.value])):Ot():j.key==="Escape"&&h.value&&(j.stopPropagation(),D())}function O(j){h.value&&g.value&&!g.value.contains(j.target)&&D()}ht(()=>document.addEventListener("mousedown",O)),Ou(()=>document.removeEventListener("mousedown",O));const T=C(!1),R=C(!1),ce=C(""),ee=C(""),J=C(!0),Z=C([]),ie=C(""),fe=C(!1),Ee=C("");ht(async()=>{var j,$,V,Y,Ie,se;try{await s.loadFormOptions(u.instanceId)}catch(Me){ee.value=Me instanceof Error?Me.message:"failed to load options"}finally{J.value=!1}a.value=(($=(j=r.value)==null?void 0:j.agents[0])==null?void 0:$.name)??((Y=(V=r.value)==null?void 0:V.agentCatalog.find(Me=>Me.installed!=="unknown"))==null?void 0:Y.driver)??"",c.value=((se=(Ie=r.value)==null?void 0:Ie.workspaces[0])==null?void 0:se.name)??""});const vt=K(()=>{var j;return new Set((((j=r.value)==null?void 0:j.agents)??[]).map($=>$.name))}),It=K(()=>{var j;return(((j=r.value)==null?void 0:j.agentCatalog)??[]).filter($=>!$.configured)}),U=K(()=>{var V;const j=[],$=((V=r.value)==null?void 0:V.agents)??[];return $.length&&j.push({label:"Configured",options:$.map(Y=>({value:Y.name,label:`${Y.name} · ${Y.driver}`}))}),It.value.length&&j.push({label:"Available drivers",options:It.value.map(Y=>({value:Y.driver,label:Y.installed==="unknown"?`${Y.driver} — CLI not detected`:Y.driver,disabled:Y.installed==="unknown"}))}),j}),P=K(()=>{var j;return[{options:(((j=r.value)==null?void 0:j.workspaces)??[]).map($=>({value:$.name,label:`${$.name} — ${$.cwd}`}))}]}),B=K(()=>l.value==="path"?f.value.trim()?ps(f.value):"":c.value),me=K(()=>B.value&&a.value?rn(B.value,a.value):"auto"),ge=K(()=>vt.value.has(a.value));async function $e(){var j;if(ie.value="",Z.value=[],Ee.value="",!(i.value!=="native"||!a.value||!c.value)){if(!ge.value){Ee.value="Pick a configured agent to list its native sessions.";return}fe.value=!0;try{Z.value=await s.listNativeSessions(u.instanceId,a.value,c.value),ie.value=((j=Z.value[0])==null?void 0:j.sessionId)??""}catch($){Ee.value=$ instanceof Error?$.message:"failed to list native sessions"}finally{fe.value=!1}}}he([i,a,c],()=>{i.value==="native"&&(l.value="existing",$e())}),he([a,c],async()=>{m.value=[],!(!a.value||!c.value)&&(m.value=await s.listModelSuggestions(u.instanceId,a.value,c.value))});const yt=K(()=>{const j=Ee.value;return j&&/auth|login|unauthor|credential|sign[\s-]?in/i.test(j)?`${a.value||"This agent"} isn't authenticated on the host — log it in there (e.g. run its CLI login), then retry.`:""});function Mt(j){const $=(j.title??"").trim()||j.sessionId,V=j.sessionId.length>8?`…${j.sessionId.slice(-8)}`:j.sessionId,Y=j.updatedAt?` · ${new Date(j.updatedAt).toLocaleString()}`:"";return`${$} (${V})${Y}`}const kt=K(()=>[{options:Z.value.map(j=>({value:j.sessionId,label:Mt(j)}))}]),qe=K(()=>T.value||!a.value?!1:i.value==="native"?!!ie.value:l.value==="existing"?!!c.value:!!f.value.trim());async function Ot(){var j,$;if(qe.value){T.value=!0,ee.value="";try{const V=a.value,Y=(((j=r.value)==null?void 0:j.sessions)??[]).map(Ue=>Ue.alias);if(i.value==="native"){const Ue=c.value,je=o.value.trim()||an(rn(Ue,V),Y);if(!Ue||!je||!ie.value){ee.value="pick a native session and a valid alias";return}if((await s.createSession(u.instanceId,je,V,Ue,ie.value)).pending){ce.value=je,R.value=!0;return}n("created",je),n("close");return}let Ie=c.value;if(l.value==="path"){const Ue=((($=r.value)==null?void 0:$.workspaces)??[]).map(je=>je.name);Ie=an(ps(f.value),Ue)}const se=o.value.trim()||an(rn(Ie,V),Y);if(!Ie||!se){ee.value="could not derive a valid name — please enter an alias or a normal path";return}vt.value.has(V)||await s.createAgent(u.instanceId,V,V),l.value==="path"&&await s.createWorkspace(u.instanceId,Ie,f.value.trim());const Me=k.value.trim(),xu=Me&&Me.toLowerCase()!=="default"?Me:void 0;if((await s.createSession(u.instanceId,se,V,Ie,void 0,xu)).pending){ce.value=se,R.value=!0;return}n("created",se),n("close")}catch(V){ee.value=V instanceof Error?V.message:"create failed"}finally{T.value=!1}}}return(j,$)=>(d(),y("div",{class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:$[14]||($[14]=Ye(V=>n("close"),["self"]))},[b("div",So,[b("header",Fo,[b("h2",$o,[$[15]||($[15]=oe("New session ",-1)),b("span",Io,"· "+S(e.instanceName),1)]),b("button",{class:"rounded p-1 text-fg-muted hover:bg-fg/5 hover:text-fg","aria-label":"Close",onClick:$[0]||($[0]=V=>n("close"))},[L(v(rt),{size:16})])]),b("div",Mo,[R.value?(d(),y("div",Oo," Session is being created and will appear in the list shortly… ")):J.value?(d(),y("div",Ro,"Loading options…")):(d(),y(G,{key:2},[b("div",zo,[$[16]||($[16]=b("span",{class:"mb-1 block text-xs font-medium text-fg-muted"},"Source",-1)),b("div",Lo,[b("button",{type:"button","data-test":"ns-source-new",class:W(["flex-1 rounded px-2 py-1 text-xs",i.value==="new"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:$[1]||($[1]=V=>i.value="new")},"New session",2),b("button",{type:"button","data-test":"ns-source-native",class:W(["flex-1 rounded px-2 py-1 text-xs",i.value==="native"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:$[2]||($[2]=V=>i.value="native")},"Native session",2)])]),b("label",No,[$[17]||($[17]=b("span",{class:"mb-1 block text-xs font-medium text-fg-muted"},[oe("Session alias "),b("span",{class:"font-normal text-fg-muted"},"(optional)")],-1)),Se(b("input",{"onUpdate:modelValue":$[3]||($[3]=V=>o.value=V),"data-test":"ns-alias",placeholder:me.value,class:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onKeydown:rr(Ot,["enter"])},null,40,Po),[[Le,o.value]])]),b("div",Bo,[$[18]||($[18]=b("span",{class:"mb-1 block text-xs font-medium text-fg-muted"},"Agent",-1)),L(on,{modelValue:a.value,"onUpdate:modelValue":$[4]||($[4]=V=>a.value=V),groups:U.value,"data-test":"ns-agent","aria-label":"Agent",placeholder:"Select an agent"},null,8,["modelValue","groups"])]),b("div",qo,[b("div",Uo,[$[19]||($[19]=b("span",{class:"text-xs font-medium text-fg-muted"},"Workspace",-1)),i.value==="new"?(d(),y("div",jo,[b("button",{type:"button","data-test":"ns-ws-mode-existing",class:W(["rounded px-2 py-0.5 text-xs",l.value==="existing"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:$[5]||($[5]=V=>l.value="existing")},"Existing",2),b("button",{type:"button","data-test":"ns-ws-mode-path",class:W(["rounded px-2 py-0.5 text-xs",l.value==="path"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:$[6]||($[6]=V=>l.value="path")},"New path",2)])):I("",!0)]),l.value==="existing"?(d(),q(on,{key:0,modelValue:c.value,"onUpdate:modelValue":$[7]||($[7]=V=>c.value=V),groups:P.value,"data-test":"ns-workspace","aria-label":"Workspace",placeholder:"Select a workspace"},null,8,["modelValue","groups"])):Se((d(),y("input",{key:1,"onUpdate:modelValue":$[8]||($[8]=V=>f.value=V),"data-test":"ns-ws-path",placeholder:"/abs/path",class:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,512)),[[Le,f.value]])]),i.value==="new"?(d(),y("div",Ho,[$[20]||($[20]=b("span",{class:"mb-1 block text-xs font-medium text-fg-muted"},[oe("Model "),b("span",{class:"font-normal text-fg-muted"},"(optional)")],-1)),b("div",{ref_key:"modelBoxEl",ref:g,class:"relative"},[Se(b("input",{"onUpdate:modelValue":$[9]||($[9]=V=>k.value=V),"data-test":"ns-model",placeholder:"default",autocomplete:"off",class:"w-full rounded-lg border border-border bg-bg py-2 pl-3 pr-9 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onFocus:F,onInput:F,onKeydown:A},null,544),[[Le,k.value]]),b("button",{type:"button",tabindex:"-1","aria-label":"Toggle model list",class:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-1 text-fg-muted hover:text-fg",onClick:$[10]||($[10]=V=>h.value?D():F())},[L(v(Xe),{size:16,class:W(["transition-transform",h.value?"rotate-180":""])},null,8,["class"])]),h.value&&E.value.length?(d(),y("ul",Vo,[(d(!0),y(G,null,re(E.value,(V,Y)=>(d(),y("li",{key:V,class:W(["flex cursor-pointer items-center justify-between px-3 py-1.5 text-sm",Y===x.value?"bg-accent/15 text-fg":"text-fg-muted hover:bg-fg/5"]),onMousedown:Ye(Ie=>M(V),["prevent"]),onMouseenter:Ie=>x.value=Y},[b("span",Go,S(V),1),V==="default"?(d(),y("span",Ko,"agent default")):I("",!0)],42,Wo))),128))])):I("",!0)],512)])):I("",!0),i.value==="native"?(d(),y("div",Zo,[$[22]||($[22]=b("span",{class:"mb-1 block text-xs font-medium text-fg-muted"},"Native session",-1)),fe.value?(d(),y("div",Yo,[b("div",Xo,[L(v(St),{size:13,class:"animate-spin motion-reduce:animate-none text-accent"}),$[21]||($[21]=oe(" Listing native sessions… ",-1))]),(d(),y(G,null,re(3,V=>b("div",{key:V,class:"h-7 animate-pulse rounded-lg bg-fg/5 motion-reduce:animate-none",style:Tn({width:`${92-V*12}%`})},null,4)),64))])):Z.value.length?(d(),q(on,{key:1,modelValue:ie.value,"onUpdate:modelValue":$[11]||($[11]=V=>ie.value=V),groups:kt.value,"data-test":"ns-native","aria-label":"Native session",placeholder:"Select a native session"},null,8,["modelValue","groups"])):Ee.value?(d(),y("div",Jo,[b("div",Qo,[L(v(au),{size:13,class:"mt-0.5 shrink-0"}),b("div",ei,[b("p",ti,S(Ee.value),1),yt.value?(d(),y("p",ui,S(yt.value),1)):I("",!0)])])])):(d(),y("p",ni," No native sessions found for this agent + workspace. "))])):I("",!0),ee.value?(d(),y("p",si,S(ee.value),1)):I("",!0)],64))]),b("footer",ri,[R.value?(d(),y("button",{key:0,"data-test":"ns-pending-close",class:"rounded-lg bg-accent px-4 py-1.5 text-sm font-medium text-white hover:bg-accent-hover",onClick:$[12]||($[12]=V=>{n("created",ce.value),n("close")})},"OK")):(d(),y(G,{key:1},[b("button",{class:"rounded-lg px-3 py-1.5 text-sm text-fg-muted hover:bg-fg/5",onClick:$[13]||($[13]=V=>n("close"))},"Cancel"),b("button",{"data-test":"ns-create",disabled:!qe.value,class:"rounded-lg bg-accent px-4 py-1.5 text-sm font-medium text-white enabled:hover:bg-accent-hover disabled:opacity-40",onClick:Ot},S(T.value?"Creating…":"Create"),9,ai)],64))])])]))}}),ii={class:"space-y-3"},li={key:0,"data-test":"wm-error",class:"rounded bg-danger/10 px-3 py-2 text-sm text-danger"},ci={key:1,"data-test":"wm-empty",class:"text-sm text-fg-muted"},di={key:2,class:"divide-y divide-border rounded border border-border"},fi={class:"font-medium"},pi={class:"text-fg-muted"},hi=["data-test","title","aria-label","disabled","onClick"],bi={class:"grid grid-cols-1 gap-2 sm:grid-cols-3"},mi=["disabled"],gi=ae({__name:"WorkspacesManager",props:{instanceId:{}},setup(e){const t=e,u=at(),n=K(()=>u.byId(t.instanceId)),s=C(""),r=C(""),o=C(""),a=C(""),i=C(!1);async function l(){if(!(!s.value.trim()||!r.value.trim()||i.value)){i.value=!0,a.value="";try{await u.createWorkspace(t.instanceId,s.value.trim(),r.value.trim(),o.value.trim()||void 0),s.value="",r.value="",o.value=""}catch(f){a.value=f instanceof Error?f.message:"create failed"}finally{i.value=!1}}}async function c(f){if(!(i.value||!await pu({title:"Remove workspace?",message:`"${f}" will be removed from this instance.`,confirmLabel:"Remove",tone:"danger"}))){i.value=!0,a.value="";try{await u.removeWorkspace(t.instanceId,f)}catch(m){a.value=m instanceof Error?m.message:"remove failed"}finally{i.value=!1}}}return(f,k)=>{var m,h;return d(),y("section",ii,[k[4]||(k[4]=b("h3",{class:"text-sm font-semibold uppercase text-fg-muted"},"Workspaces",-1)),a.value?(d(),y("p",li,S(a.value),1)):I("",!0),(((m=n.value)==null?void 0:m.workspaces)??[]).length?(d(),y("ul",di,[(d(!0),y(G,null,re(((h=n.value)==null?void 0:h.workspaces)??[],x=>(d(),y("li",{key:x.name,class:"flex items-center justify-between px-3 py-2 text-sm text-fg"},[b("span",null,[b("span",fi,S(x.name),1),k[3]||(k[3]=oe(" — ",-1)),b("span",pi,S(x.cwd),1)]),b("button",{"data-test":`wm-remove-${x.name}`,title:`Remove ${x.name}`,"aria-label":`Remove workspace ${x.name}`,class:"grid h-7 w-7 shrink-0 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger disabled:opacity-50",disabled:i.value,onClick:g=>c(x.name)},[L(v(zu),{size:14})],8,hi)]))),128))])):(d(),y("p",ci,"No workspaces yet.")),b("div",bi,[Se(b("input",{"onUpdate:modelValue":k[0]||(k[0]=x=>s.value=x),"data-test":"wm-name",placeholder:"name",class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,512),[[Le,s.value]]),Se(b("input",{"onUpdate:modelValue":k[1]||(k[1]=x=>r.value=x),"data-test":"wm-path",placeholder:"/abs/path",class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,512),[[Le,r.value]]),Se(b("input",{"onUpdate:modelValue":k[2]||(k[2]=x=>o.value=x),"data-test":"wm-desc",placeholder:"description (optional)",class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,512),[[Le,o.value]])]),b("button",{"data-test":"wm-create",class:"rounded bg-accent px-3 py-1.5 text-sm text-white hover:bg-accent-hover disabled:opacity-50",disabled:i.value||!s.value.trim()||!r.value.trim(),onClick:l},"Add workspace",8,mi)])}}}),xi={class:"space-y-3"},vi={key:0,"data-test":"am-error",class:"rounded bg-danger/10 px-3 py-2 text-sm text-danger"},yi={key:1,"data-test":"am-empty",class:"text-sm text-fg-muted"},ki={key:2,class:"divide-y divide-border rounded border border-border"},_i={class:"font-medium"},wi={class:"text-fg-muted"},Ei=["data-test","title","aria-label","disabled","onClick"],Ai={class:"grid grid-cols-1 gap-2 sm:grid-cols-3"},Ci=["value","disabled"],Di=["disabled"],Ti=ae({__name:"AgentsManager",props:{instanceId:{}},setup(e){const t=e,u=at(),n=K(()=>u.byId(t.instanceId)),s=C(""),r=C(""),o=C(""),a=C(!1),i=K(()=>{var k;return(((k=n.value)==null?void 0:k.agentCatalog)??[]).filter(m=>!m.configured)});async function l(){if(!(!s.value||a.value)){a.value=!0,o.value="";try{await u.createAgent(t.instanceId,r.value.trim()||s.value,s.value),s.value="",r.value=""}catch(k){o.value=k instanceof Error?k.message:"add failed"}finally{a.value=!1}}}async function c(k){if(!(a.value||!await pu({title:"Remove agent?",message:`"${k}" will be removed from this instance.`,confirmLabel:"Remove",tone:"danger"}))){a.value=!0,o.value="";try{await u.removeAgent(t.instanceId,k)}catch(h){o.value=h instanceof Error?h.message:"remove failed"}finally{a.value=!1}}}function f(k){return k==="builtin"?"built-in":k==="yes"?"installed":"CLI not detected"}return(k,m)=>{var h,x;return d(),y("section",xi,[m[4]||(m[4]=b("h3",{class:"text-sm font-semibold uppercase text-fg-muted"},"Agents",-1)),o.value?(d(),y("p",vi,S(o.value),1)):I("",!0),(((h=n.value)==null?void 0:h.agents)??[]).length?(d(),y("ul",ki,[(d(!0),y(G,null,re(((x=n.value)==null?void 0:x.agents)??[],g=>(d(),y("li",{key:g.name,class:"flex items-center justify-between px-3 py-2 text-sm text-fg"},[b("span",null,[b("span",_i,S(g.name),1),m[2]||(m[2]=oe(" · ",-1)),b("span",wi,S(g.driver),1)]),b("button",{"data-test":`am-remove-${g.name}`,title:`Remove ${g.name}`,"aria-label":`Remove agent ${g.name}`,class:"grid h-7 w-7 shrink-0 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger disabled:opacity-50",disabled:a.value,onClick:_=>c(g.name)},[L(v(zu),{size:14})],8,Ei)]))),128))])):(d(),y("p",yi,"No agents yet.")),b("div",Ai,[Se(b("select",{"onUpdate:modelValue":m[0]||(m[0]=g=>s.value=g),"data-test":"am-driver",class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},[m[3]||(m[3]=b("option",{value:"",disabled:""},"Choose a driver…",-1)),(d(!0),y(G,null,re(i.value,g=>(d(),y("option",{key:g.driver,value:g.driver,disabled:g.installed==="unknown"},S(g.driver)+" ("+S(f(g.installed))+") ",9,Ci))),128))],512),[[Da,s.value]]),Se(b("input",{"onUpdate:modelValue":m[1]||(m[1]=g=>r.value=g),"data-test":"am-name",placeholder:"name (optional, = driver)",class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,512),[[Le,r.value]]),b("button",{"data-test":"am-add",class:"rounded bg-accent px-3 py-1.5 text-sm text-white hover:bg-accent-hover disabled:opacity-50",disabled:a.value||!s.value,onClick:l},"Add agent",8,Di)])])}}}),Si={class:"max-h-[85vh] w-full max-w-xl overflow-y-auto rounded-xl border border-border bg-raised shadow-xl","data-test":"manage-instance-dialog"},Fi={class:"flex items-center justify-between border-b border-border px-5 py-3"},$i={class:"text-sm font-semibold text-fg"},Ii={key:0,class:"py-6 text-center text-sm text-fg-muted"},Mi={key:1,class:"space-y-6 p-5"},Oi=ae({__name:"ManageInstanceDialog",props:{instanceId:{},instanceName:{}},emits:["close"],setup(e,{emit:t}){const u=e,n=t,s=at(),r=C(!0);return ht(async()=>{try{await s.loadFormOptions(u.instanceId)}catch{}finally{r.value=!1}}),(o,a)=>(d(),y("div",{class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:a[1]||(a[1]=Ye(i=>n("close"),["self"]))},[b("div",Si,[b("header",Fi,[b("h2",$i,"Manage · "+S(e.instanceName),1),b("button",{class:"rounded p-1 text-fg-muted hover:bg-fg/5 hover:text-fg","aria-label":"Close",onClick:a[0]||(a[0]=i=>n("close"))},[L(v(rt),{size:16})])]),r.value?(d(),y("div",Ii,"Loading…")):(d(),y("div",Mi,[L(gi,{"instance-id":e.instanceId},null,8,["instance-id"]),L(Ti,{"instance-id":e.instanceId},null,8,["instance-id"])]))])]))}}),Ri={class:"thin-scroll flex h-full flex-1 flex-col space-y-1.5 overflow-y-auto px-2 pb-2 pt-1.5"},zi=["onClick"],Li=["title"],Ni={key:2,class:"font-mono text-[10px] tabular-nums text-fg-muted"},Pi={key:3,class:"text-[10px] font-medium text-fg-muted"},Bi={class:"ml-2.5 mt-px space-y-px border-l border-border pl-2.5"},qi={key:0,class:"absolute bottom-1 left-0 top-1 w-[3px] rounded-full bg-accent"},Ui=["onClick"],ji={key:0,"data-test":"attention-dot","data-attention":"working",class:"pulse-dot h-2 w-2 shrink-0 rounded-full bg-run-bright"},Hi={key:1,"data-test":"attention-dot","data-attention":"unread",class:"h-2 w-2 shrink-0 rounded-full bg-info"},Vi={key:2,"data-test":"attention-dot","data-attention":"running",class:"h-2 w-2 shrink-0 rounded-full bg-run"},Wi={key:3,"data-test":"session-elapsed",class:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-run"},Gi=["onClick"],Ki={key:0,"data-test":"sessions-loading",class:"py-1 pl-2.5 text-[11px] text-fg-muted"},Zi={key:1,"data-test":"no-sessions",class:"py-1 pl-2.5 text-[11px] text-fg-muted"},Yi={class:"flex items-center gap-0.5 pb-px pl-2 pt-0.5"},Xi=["onClick"],Ji=["onClick"],Qi=ae({__name:"InstanceTree",emits:["select"],setup(e,{emit:t}){const u=at(),n=Ft(),s=t,r=C(null),o=C(null),a=C(Date.now()),i=setInterval(()=>{a.value=Date.now()},1e3);Sn(()=>clearInterval(i));function l(m,h){const x=n.runningSince(m,h);if(x===null)return"";const g=Math.max(0,Math.floor((a.value-x)/1e3));return g<60?`${g}s`:g<3600?`${Math.floor(g/60)}m`:`${Math.floor(g/3600)}h`}function c(m,h){return n.instanceId===m&&n.sessionAlias===h}async function f(m){await u.loadSessions(m).catch(()=>{})}async function k(m,h){await pu({title:"Delete session?",message:`"${h}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete",tone:"danger"})&&u.removeSession(m,h).catch(()=>{})}return(m,h)=>(d(),y("nav",Ri,[(d(!0),y(G,null,re(v(u).instances,x=>(d(),y("div",{key:x.id,class:W(x.online?"":"opacity-60")},[b("button",{class:"group flex h-7 w-full items-center gap-1.5 rounded-md px-1.5 transition-colors hover:bg-raised",onClick:g=>f(x.id)},[x.sessionsLoaded?(d(),q(v(Xe),{key:0,size:12,class:"shrink-0 text-fg-muted"})):(d(),q(v(Tt),{key:1,size:12,class:"shrink-0 text-fg-muted"})),b("span",{class:W(["h-2 w-2 shrink-0 rounded-full",x.online?"bg-run":"bg-fg-muted"]),"data-test":"online-dot"},null,2),b("span",{class:W(["flex-1 truncate text-left text-[12.5px] font-semibold",x.online?"text-fg":"text-fg-muted"]),title:x.coreVersion?`connector core ${x.coreVersion}`:"connector core version unknown (legacy or pre-version connector)"},S(x.name),11,Li),x.online?(d(),y("span",Ni,S(x.sessions.length),1)):(d(),y("span",Pi,"offline"))],8,zi),b("div",Bi,[(d(!0),y(G,null,re(x.sessions,g=>(d(),y("div",{key:g.alias,class:W(["group relative flex items-center rounded-md transition-colors",c(x.id,g.alias)?"bg-accent/10":"hover:bg-raised"])},[c(x.id,g.alias)?(d(),y("span",qi)):I("",!0),b("button",{class:"flex min-w-0 flex-1 items-center gap-2 py-1 pl-2.5 pr-1.5 text-left",onClick:_=>s("select",x.id,g.alias)},[v(n).sessionAttention(x.id,g.alias)==="working"?(d(),y("span",ji)):v(n).sessionAttention(x.id,g.alias)==="unread"?(d(),y("span",Hi)):g.running?(d(),y("span",Vi)):I("",!0),b("span",{class:W(["truncate text-[12.5px] font-medium",c(x.id,g.alias)?"font-semibold text-accent":"text-fg"])},S(g.alias),3),b("span",{class:W(["shrink-0 rounded px-1 py-px font-mono text-[9.5px]",c(x.id,g.alias)?"bg-accent/15 text-accent":"bg-bg text-fg-muted"])},S(g.agent),3),l(x.id,g.alias)?(d(),y("span",Wi,S(l(x.id,g.alias)),1)):I("",!0)],8,Ui),b("button",{"data-test":"delete-session",title:"Delete session","aria-label":"Delete session",class:"mr-1 grid h-5 w-5 shrink-0 place-items-center rounded text-fg-muted opacity-0 transition-opacity hover:bg-danger/15 hover:text-danger group-hover:opacity-100",onClick:Ye(_=>k(x.id,g.alias),["stop"])},[L(v(zu),{size:12})],8,Gi)],2))),128)),x.online&&!x.sessionsLoaded&&!x.sessions.length?(d(),y("div",Ki,"loading…")):x.sessionsLoaded&&!x.sessions.length?(d(),y("div",Zi,"no sessions yet")):I("",!0),b("div",Yi,[b("button",{"data-test":"new-session",title:"New session","aria-label":"New session",class:"grid h-6 w-6 place-items-center rounded text-accent transition-colors hover:bg-accent/10",onClick:g=>r.value={id:x.id,name:x.name}},[L(v(Ka),{size:14})],8,Xi),b("button",{"data-test":"manage-instance",title:"Manage instance","aria-label":"Manage instance",class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-raised hover:text-fg",onClick:g=>o.value={id:x.id,name:x.name}},[L(v(Ja),{size:13})],8,Ji)])])],2))),128)),r.value?(d(),q(oi,{key:0,"instance-id":r.value.id,"instance-name":r.value.name,onClose:h[0]||(h[0]=x=>r.value=null),onCreated:h[1]||(h[1]=x=>r.value=null)},null,8,["instance-id","instance-name"])):I("",!0),o.value?(d(),q(Oi,{key:1,"instance-id":o.value.id,"instance-name":o.value.name,onClose:h[2]||(h[2]=x=>o.value=null)},null,8,["instance-id","instance-name"])):I("",!0)]))}}),hs={};function el(e){let t=hs[e];if(t)return t;t=hs[e]=[];for(let u=0;u<128;u++){const n=String.fromCharCode(u);t.push(n)}for(let u=0;u<e.length;u++){const n=e.charCodeAt(u);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}function Gt(e,t){typeof t!="string"&&(t=Gt.defaultChars);const u=el(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let s="";for(let r=0,o=n.length;r<o;r+=3){const a=parseInt(n.slice(r+1,r+3),16);if(a<128){s+=u[a];continue}if((a&224)===192&&r+3<o){const i=parseInt(n.slice(r+4,r+6),16);if((i&192)===128){const l=a<<6&1984|i&63;l<128?s+="��":s+=String.fromCharCode(l),r+=3;continue}}if((a&240)===224&&r+6<o){const i=parseInt(n.slice(r+4,r+6),16),l=parseInt(n.slice(r+7,r+9),16);if((i&192)===128&&(l&192)===128){const c=a<<12&61440|i<<6&4032|l&63;c<2048||c>=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),r+=6;continue}}if((a&248)===240&&r+9<o){const i=parseInt(n.slice(r+4,r+6),16),l=parseInt(n.slice(r+7,r+9),16),c=parseInt(n.slice(r+10,r+12),16);if((i&192)===128&&(l&192)===128&&(c&192)===128){let f=a<<18&1835008|i<<12&258048|l<<6&4032|c&63;f<65536||f>1114111?s+="����":(f-=65536,s+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),r+=9;continue}}s+="�"}return s})}Gt.defaultChars=";/?:@&=+$,#";Gt.componentChars="";const bs={};function tl(e){let t=bs[e];if(t)return t;t=bs[e]=[];for(let u=0;u<128;u++){const n=String.fromCharCode(u);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+u.toString(16).toUpperCase()).slice(-2))}for(let u=0;u<e.length;u++)t[e.charCodeAt(u)]=e[u];return t}function bu(e,t,u){typeof t!="string"&&(u=t,t=bu.defaultChars),typeof u>"u"&&(u=!0);const n=tl(t);let s="";for(let r=0,o=e.length;r<o;r++){const a=e.charCodeAt(r);if(u&&a===37&&r+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){s+=e.slice(r,r+3),r+=2;continue}if(a<128){s+=n[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&r+1<o){const i=e.charCodeAt(r+1);if(i>=56320&&i<=57343){s+=encodeURIComponent(e[r]+e[r+1]),r++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[r])}return s}bu.defaultChars=";/?:@&=+$,-_.!~*'()#";bu.componentChars="-_.!~*'()";function $n(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Iu(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const ul=/^([a-z0-9.+-]+:)/i,nl=/:[0-9]*$/,sl=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,rl=["<",">",'"',"`"," ","\r",`
212
+ `," "],al=["{","}","|","\\","^","`"].concat(rl),ol=["'"].concat(al),ms=["%","/","?",";","#"].concat(ol),gs=["/","?","#"],il=255,xs=/^[+a-z0-9A-Z_-]{0,63}$/,ll=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,vs={javascript:!0,"javascript:":!0},ys={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function In(e,t){if(e&&e instanceof Iu)return e;const u=new Iu;return u.parse(e,t),u}Iu.prototype.parse=function(e,t){let u,n,s,r=e;if(r=r.trim(),!t&&e.split("#").length===1){const l=sl.exec(r);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let o=ul.exec(r);if(o&&(o=o[0],u=o.toLowerCase(),this.protocol=o,r=r.substr(o.length)),(t||o||r.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=r.substr(0,2)==="//",s&&!(o&&vs[o])&&(r=r.substr(2),this.slashes=!0)),!vs[o]&&(s||o&&!ys[o])){let l=-1;for(let h=0;h<gs.length;h++)n=r.indexOf(gs[h]),n!==-1&&(l===-1||n<l)&&(l=n);let c,f;l===-1?f=r.lastIndexOf("@"):f=r.lastIndexOf("@",l),f!==-1&&(c=r.slice(0,f),r=r.slice(f+1),this.auth=c),l=-1;for(let h=0;h<ms.length;h++)n=r.indexOf(ms[h]),n!==-1&&(l===-1||n<l)&&(l=n);l===-1&&(l=r.length),r[l-1]===":"&&l--;const k=r.slice(0,l);r=r.slice(l),this.parseHost(k),this.hostname=this.hostname||"";const m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m){const h=this.hostname.split(/\./);for(let x=0,g=h.length;x<g;x++){const _=h[x];if(_&&!_.match(xs)){let E="";for(let F=0,D=_.length;F<D;F++)_.charCodeAt(F)>127?E+="x":E+=_[F];if(!E.match(xs)){const F=h.slice(0,x),D=h.slice(x+1),M=_.match(ll);M&&(F.push(M[1]),D.unshift(M[2])),D.length&&(r=D.join(".")+r),this.hostname=F.join(".");break}}}}this.hostname.length>il&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=r.indexOf("#");a!==-1&&(this.hash=r.substr(a),r=r.slice(0,a));const i=r.indexOf("?");return i!==-1&&(this.search=r.substr(i),r=r.slice(0,i)),r&&(this.pathname=r),ys[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Iu.prototype.parseHost=function(e){let t=nl.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const cl=Object.freeze(Object.defineProperty({__proto__:null,decode:Gt,encode:bu,format:$n,parse:In},Symbol.toStringTag,{value:"Module"})),gr=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xr=/[\0-\x1F\x7F-\x9F]/,dl=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Mn=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,vr=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,yr=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,fl=Object.freeze(Object.defineProperty({__proto__:null,Any:gr,Cc:xr,Cf:dl,P:Mn,S:vr,Z:yr},Symbol.toStringTag,{value:"Module"})),pl=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),hl=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ln;const bl=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ml=(ln=String.fromCodePoint)!==null&&ln!==void 0?ln:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function gl(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=bl.get(e))!==null&&t!==void 0?t:e}var ye;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ye||(ye={}));const xl=32;var pt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pt||(pt={}));function En(e){return e>=ye.ZERO&&e<=ye.NINE}function vl(e){return e>=ye.UPPER_A&&e<=ye.UPPER_F||e>=ye.LOWER_A&&e<=ye.LOWER_F}function yl(e){return e>=ye.UPPER_A&&e<=ye.UPPER_Z||e>=ye.LOWER_A&&e<=ye.LOWER_Z||En(e)}function kl(e){return e===ye.EQUALS||yl(e)}var ve;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ve||(ve={}));var nt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(nt||(nt={}));class _l{constructor(t,u,n){this.decodeTree=t,this.emitCodePoint=u,this.errors=n,this.state=ve.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=nt.Strict}startEntity(t){this.decodeMode=t,this.state=ve.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,u){switch(this.state){case ve.EntityStart:return t.charCodeAt(u)===ye.NUM?(this.state=ve.NumericStart,this.consumed+=1,this.stateNumericStart(t,u+1)):(this.state=ve.NamedEntity,this.stateNamedEntity(t,u));case ve.NumericStart:return this.stateNumericStart(t,u);case ve.NumericDecimal:return this.stateNumericDecimal(t,u);case ve.NumericHex:return this.stateNumericHex(t,u);case ve.NamedEntity:return this.stateNamedEntity(t,u)}}stateNumericStart(t,u){return u>=t.length?-1:(t.charCodeAt(u)|xl)===ye.LOWER_X?(this.state=ve.NumericHex,this.consumed+=1,this.stateNumericHex(t,u+1)):(this.state=ve.NumericDecimal,this.stateNumericDecimal(t,u))}addToNumericResult(t,u,n,s){if(u!==n){const r=n-u;this.result=this.result*Math.pow(s,r)+parseInt(t.substr(u,r),s),this.consumed+=r}}stateNumericHex(t,u){const n=u;for(;u<t.length;){const s=t.charCodeAt(u);if(En(s)||vl(s))u+=1;else return this.addToNumericResult(t,n,u,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,n,u,16),-1}stateNumericDecimal(t,u){const n=u;for(;u<t.length;){const s=t.charCodeAt(u);if(En(s))u+=1;else return this.addToNumericResult(t,n,u,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,n,u,10),-1}emitNumericEntity(t,u){var n;if(this.consumed<=u)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ye.SEMI)this.consumed+=1;else if(this.decodeMode===nt.Strict)return 0;return this.emitCodePoint(gl(this.result),this.consumed),this.errors&&(t!==ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,u){const{decodeTree:n}=this;let s=n[this.treeIndex],r=(s&pt.VALUE_LENGTH)>>14;for(;u<t.length;u++,this.excess++){const o=t.charCodeAt(u);if(this.treeIndex=wl(n,s,this.treeIndex+Math.max(1,r),o),this.treeIndex<0)return this.result===0||this.decodeMode===nt.Attribute&&(r===0||kl(o))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],r=(s&pt.VALUE_LENGTH)>>14,r!==0){if(o===ye.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==nt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:u,decodeTree:n}=this,s=(n[u]&pt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(u,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,u,n){const{decodeTree:s}=this;return this.emitCodePoint(u===1?s[t]&~pt.VALUE_LENGTH:s[t+1],n),u===3&&this.emitCodePoint(s[t+2],n),n}end(){var t;switch(this.state){case ve.NamedEntity:return this.result!==0&&(this.decodeMode!==nt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ve.NumericDecimal:return this.emitNumericEntity(0,2);case ve.NumericHex:return this.emitNumericEntity(0,3);case ve.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ve.EntityStart:return 0}}}function kr(e){let t="";const u=new _l(e,n=>t+=ml(n));return function(s,r){let o=0,a=0;for(;(a=s.indexOf("&",a))>=0;){t+=s.slice(o,a),u.startEntity(r);const l=u.write(s,a+1);if(l<0){o=a+u.end();break}o=a+l,a=l===0?o+1:o}const i=t+s.slice(o);return t="",i}}function wl(e,t,u,n){const s=(t&pt.BRANCH_LENGTH)>>7,r=t&pt.JUMP_TABLE;if(s===0)return r!==0&&n===r?u:-1;if(r){const i=n-r;return i<0||i>=s?-1:e[u+i]-1}let o=u,a=o+s-1;for(;o<=a;){const i=o+a>>>1,l=e[i];if(l<n)o=i+1;else if(l>n)a=i-1;else return e[i+s]}return-1}const _r=kr(pl);kr(hl);function El(e,t=nt.Legacy){return _r(e,t)}function Al(e){return _r(e,nt.Strict)}function Cl(e){return Object.prototype.toString.call(e)}function On(e){return Cl(e)==="[object String]"}const Dl=Object.prototype.hasOwnProperty;function Tl(e,t){return Dl.call(e,t)}function Nu(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){if(u){if(typeof u!="object")throw new TypeError(u+"must be object");Object.keys(u).forEach(function(n){e[n]=u[n]})}}),e}function wr(e,t,u){return[].concat(e.slice(0,t),u,e.slice(t+1))}function Rn(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function iu(e){if(e>65535){e-=65536;const t=55296+(e>>10),u=56320+(e&1023);return String.fromCharCode(t,u)}return String.fromCharCode(e)}const Er=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Sl=/&([a-z#][a-z0-9]{1,31});/gi,Fl=new RegExp(Er.source+"|"+Sl.source,"gi"),$l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Il(e,t){if(t.charCodeAt(0)===35&&$l.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Rn(n)?iu(n):e}const u=El(e);return u!==e?u:e}function Ml(e){return e.indexOf("\\")<0?e:e.replace(Er,"$1")}function Kt(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Fl,function(t,u,n){return u||Il(t,n)})}const Ol=/[&<>"]/,Rl=/[&<>"]/g,zl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Ll(e){return zl[e]}function bt(e){return Ol.test(e)?e.replace(Rl,Ll):e}const Nl=/[.?*+^$[\]\\(){}|-]/g;function Pl(e){return e.replace(Nl,"\\$&")}function le(e){switch(e){case 9:case 32:return!0}return!1}function lu(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ar(e){return Mn.test(e)||vr.test(e)}function cu(e){return Ar(iu(e))}function du(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Pu(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function ks(e){return e===32||e===9||e===10||e===13}function Bu(e){let t=0;for(;t<e.length&&ks(e.charCodeAt(t));t++);let u=e.length-1;for(;u>=t&&ks(e.charCodeAt(u));u--);return e.slice(t,u+1)}const Bl={mdurl:cl,ucmicro:fl},ql=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:wr,asciiTrim:Bu,assign:Nu,escapeHtml:bt,escapeRE:Pl,fromCodePoint:iu,has:Tl,isMdAsciiPunct:du,isPunctChar:Ar,isPunctCharCode:cu,isSpace:le,isString:On,isValidEntityCode:Rn,isWhiteSpace:lu,lib:Bl,normalizeReference:Pu,unescapeAll:Kt,unescapeMd:Ml},Symbol.toStringTag,{value:"Module"}));function Ul(e,t,u){let n,s,r,o;const a=e.posMax,i=e.pos;for(e.pos=t+1,n=1;e.pos<a;){if(r=e.src.charCodeAt(e.pos),r===93&&(n--,n===0)){s=!0;break}if(o=e.pos,e.md.inline.skipToken(e),r===91){if(o===e.pos-1)n++;else if(u)return e.pos=i,-1}}let l=-1;return s&&(l=e.pos),e.pos=i,l}function jl(e,t,u){let n,s=t;const r={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){for(s++;s<u;){if(n=e.charCodeAt(s),n===10||n===60)return r;if(n===62)return r.pos=s+1,r.str=Kt(e.slice(t+1,s)),r.ok=!0,r;if(n===92&&s+1<u){s+=2;continue}s++}return r}let o=0;for(;s<u&&(n=e.charCodeAt(s),!(n===32||n<32||n===127));){if(n===92&&s+1<u){if(e.charCodeAt(s+1)===32)break;s+=2;continue}if(n===40&&(o++,o>32))return r;if(n===41){if(o===0)break;o--}s++}return t===s||o!==0||(r.str=Kt(e.slice(t,s)),r.pos=s,r.ok=!0),r}function Hl(e,t,u,n){let s,r=t;const o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)o.str=n.str,o.marker=n.marker;else{if(r>=u)return o;let a=e.charCodeAt(r);if(a!==34&&a!==39&&a!==40)return o;t++,r++,a===40&&(a=41),o.marker=a}for(;r<u;){if(s=e.charCodeAt(r),s===o.marker)return o.pos=r+1,o.str+=Kt(e.slice(t,r)),o.ok=!0,o;if(s===40&&o.marker===41)return o;s===92&&r+1<u&&r++,r++}return o.can_continue=!0,o.str+=Kt(e.slice(t,r)),o}const Vl=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:jl,parseLinkLabel:Ul,parseLinkTitle:Hl},Symbol.toStringTag,{value:"Module"})),Je={};Je.code_inline=function(e,t,u,n,s){const r=e[t];return"<code"+s.renderAttrs(r)+">"+bt(r.content)+"</code>"};Je.code_block=function(e,t,u,n,s){const r=e[t];return"<pre"+s.renderAttrs(r)+"><code>"+bt(e[t].content)+`</code></pre>
213
+ `};Je.fence=function(e,t,u,n,s){const r=e[t],o=r.info?Kt(r.info).trim():"";let a="",i="";if(o){const c=o.split(/(\s+)/g);a=c[0],i=c.slice(2).join("")}let l;if(u.highlight?l=u.highlight(r.content,a,i)||bt(r.content):l=bt(r.content),l.indexOf("<pre")===0)return l+`
214
+ `;if(o){const c=r.attrIndex("class"),f=r.attrs?r.attrs.slice():[];c<0?f.push(["class",u.langPrefix+a]):(f[c]=f[c].slice(),f[c][1]+=" "+u.langPrefix+a);const k={attrs:f};return`<pre><code${s.renderAttrs(k)}>${l}</code></pre>
215
+ `}return`<pre><code${s.renderAttrs(r)}>${l}</code></pre>
216
+ `};Je.image=function(e,t,u,n,s){const r=e[t];return r.attrs[r.attrIndex("alt")][1]=s.renderInlineAsText(r.children,u,n),s.renderToken(e,t,u)};Je.hardbreak=function(e,t,u){return u.xhtmlOut?`<br />
217
+ `:`<br>
218
+ `};Je.softbreak=function(e,t,u){return u.breaks?u.xhtmlOut?`<br />
219
+ `:`<br>
220
+ `:`
221
+ `};Je.text=function(e,t){return bt(e[t].content)};Je.html_block=function(e,t){return e[t].content};Je.html_inline=function(e,t){return e[t].content};function Yt(){this.rules=Nu({},Je)}Yt.prototype.renderAttrs=function(t){let u,n,s;if(!t.attrs)return"";for(s="",u=0,n=t.attrs.length;u<n;u++)s+=" "+bt(t.attrs[u][0])+'="'+bt(t.attrs[u][1])+'"';return s};Yt.prototype.renderToken=function(t,u,n){const s=t[u];let r="";if(s.hidden)return"";s.block&&s.nesting!==-1&&u&&t[u-1].hidden&&(r+=`
222
+ `),r+=(s.nesting===-1?"</":"<")+s.tag,r+=this.renderAttrs(s),s.nesting===0&&n.xhtmlOut&&(r+=" /");let o=!1;if(s.block&&(o=!0,s.nesting===1&&u+1<t.length)){const a=t[u+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===s.tag)&&(o=!1)}return r+=o?`>
223
+ `:">",r};Yt.prototype.renderInline=function(e,t,u){let n="";const s=this.rules;for(let r=0,o=e.length;r<o;r++){const a=e[r].type;typeof s[a]<"u"?n+=s[a](e,r,t,u,this):n+=this.renderToken(e,r,t)}return n};Yt.prototype.renderInlineAsText=function(e,t,u){let n="";for(let s=0,r=e.length;s<r;s++)switch(e[s].type){case"text":n+=e[s].content;break;case"image":n+=this.renderInlineAsText(e[s].children,t,u);break;case"html_inline":case"html_block":n+=e[s].content;break;case"softbreak":case"hardbreak":n+=`
224
+ `;break}return n};Yt.prototype.render=function(e,t,u){let n="";const s=this.rules;for(let r=0,o=e.length;r<o;r++){const a=e[r].type;a==="inline"?n+=this.renderInline(e[r].children,t,u):typeof s[a]<"u"?n+=s[a](e,r,t,u,this):n+=this.renderToken(e,r,t,u)}return n};function Oe(){this.__rules__=[],this.__cache__=null}Oe.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Oe.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(u){u.enabled&&u.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(u){e.__cache__[u]=[],e.__rules__.forEach(function(n){n.enabled&&(u&&n.alt.indexOf(u)<0||e.__cache__[u].push(n.fn))})})};Oe.prototype.at=function(e,t,u){const n=this.__find__(e),s=u||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=s.alt||[],this.__cache__=null};Oe.prototype.before=function(e,t,u,n){const s=this.__find__(e),r=n||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:u,alt:r.alt||[]}),this.__cache__=null};Oe.prototype.after=function(e,t,u,n){const s=this.__find__(e),r=n||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:u,alt:r.alt||[]}),this.__cache__=null};Oe.prototype.push=function(e,t,u){const n=u||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Oe.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(n){const s=this.__find__(n);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[s].enabled=!0,u.push(n)},this),this.__cache__=null,u};Oe.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(u){u.enabled=!1}),this.enable(e,t)};Oe.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(n){const s=this.__find__(n);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[s].enabled=!1,u.push(n)},this),this.__cache__=null,u};Oe.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Be(e,t,u){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=u,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Be.prototype.attrIndex=function(t){if(!this.attrs)return-1;const u=this.attrs;for(let n=0,s=u.length;n<s;n++)if(u[n][0]===t)return n;return-1};Be.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Be.prototype.attrSet=function(t,u){const n=this.attrIndex(t),s=[t,u];n<0?this.attrPush(s):this.attrs[n]=s};Be.prototype.attrGet=function(t){const u=this.attrIndex(t);let n=null;return u>=0&&(n=this.attrs[u][1]),n};Be.prototype.attrJoin=function(t,u){const n=this.attrIndex(t);n<0?this.attrPush([t,u]):this.attrs[n][1]=this.attrs[n][1]+" "+u};function Cr(e,t,u){this.src=e,this.env=u,this.tokens=[],this.inlineMode=!1,this.md=t}Cr.prototype.Token=Be;const Wl=/\r\n?|\n/g,Gl=/\0/g;function Kl(e){let t;t=e.src.replace(Wl,`
225
+ `),t=t.replace(Gl,"�"),e.src=t}function Zl(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Yl(e){const t=e.tokens;for(let u=0,n=t.length;u<n;u++){const s=t[u];s.type==="inline"&&e.md.inline.parse(s.content,e.md,e.env,s.children)}}function Xl(e){return/^<a[>\s]/i.test(e)}function Jl(e){return/^<\/a\s*>/i.test(e)}function Ql(e){const t=e.tokens;if(e.md.options.linkify)for(let u=0,n=t.length;u<n;u++){if(t[u].type!=="inline"||!e.md.linkify.pretest(t[u].content))continue;let s=t[u].children,r=0;for(let o=s.length-1;o>=0;o--){const a=s[o];if(a.type==="link_close"){for(o--;s[o].level!==a.level&&s[o].type!=="link_open";)o--;continue}if(a.type==="html_inline"&&(Xl(a.content)&&r>0&&r--,Jl(a.content)&&r++),!(r>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const i=a.content;let l=e.md.linkify.match(i);const c=[];let f=a.level,k=0;l.length>0&&l[0].index===0&&o>0&&s[o-1].type==="text_special"&&(l=l.slice(1));for(let m=0;m<l.length;m++){const h=l[m].url,x=e.md.normalizeLink(h);if(!e.md.validateLink(x))continue;let g=l[m].text;l[m].schema?l[m].schema==="mailto:"&&!/^mailto:/i.test(g)?g=e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):g=e.md.normalizeLinkText(g):g=e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,"");const _=l[m].index;if(_>k){const M=new e.Token("text","",0);M.content=i.slice(k,_),M.level=f,c.push(M)}const E=new e.Token("link_open","a",1);E.attrs=[["href",x]],E.level=f++,E.markup="linkify",E.info="auto",c.push(E);const F=new e.Token("text","",0);F.content=g,F.level=f,c.push(F);const D=new e.Token("link_close","a",-1);D.level=--f,D.markup="linkify",D.info="auto",c.push(D),k=l[m].lastIndex}if(k<i.length){const m=new e.Token("text","",0);m.content=i.slice(k),m.level=f,c.push(m)}t[u].children=s=wr(s,o,c)}}}}const Dr=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ec=/\((c|tm|r)\)/i,tc=/\((c|tm|r)\)/ig,uc={c:"©",r:"®",tm:"™"};function nc(e,t){return uc[t.toLowerCase()]}function sc(e){let t=0;for(let u=e.length-1;u>=0;u--){const n=e[u];n.type==="text"&&!t&&(n.content=n.content.replace(tc,nc)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function rc(e){let t=0;for(let u=e.length-1;u>=0;u--){const n=e[u];n.type==="text"&&!t&&Dr.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function ac(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(ec.test(e.tokens[t].content)&&sc(e.tokens[t].children),Dr.test(e.tokens[t].content)&&rc(e.tokens[t].children))}const oc=/['"]/,_s=/['"]/g,ws="’";function Cu(e,t,u,n){e[t]||(e[t]=[]),e[t].push({pos:u,ch:n})}function ic(e,t){let u="",n=0;t.sort((s,r)=>s.pos-r.pos);for(let s=0;s<t.length;s++){const r=t[s];u+=e.slice(n,r.pos)+r.ch,n=r.pos+1}return u+e.slice(n)}function lc(e,t){let u;const n=[],s={};for(let r=0;r<e.length;r++){const o=e[r],a=e[r].level;for(u=n.length-1;u>=0&&!(n[u].level<=a);u--);if(n.length=u+1,o.type!=="text")continue;const i=o.content;let l=0;const c=i.length;e:for(;l<c;){_s.lastIndex=l;const f=_s.exec(i);if(!f)break;let k=!0,m=!0;l=f.index+1;const h=f[0]==="'";let x=32;if(f.index-1>=0)x=i.charCodeAt(f.index-1);else for(u=r-1;u>=0&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u--)if(e[u].content){x=e[u].content.charCodeAt(e[u].content.length-1);break}let g=32;if(l<c)g=i.charCodeAt(l);else for(u=r+1;u<e.length&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u++)if(e[u].content){g=e[u].content.charCodeAt(0);break}const _=du(x)||cu(x),E=du(g)||cu(g),F=lu(x),D=lu(g);if(D?k=!1:E&&(F||_||(k=!1)),F?m=!1:_&&(D||E||(m=!1)),g===34&&f[0]==='"'&&x>=48&&x<=57&&(m=k=!1),k&&m&&(k=_,m=E),!k&&!m){h&&Cu(s,r,f.index,ws);continue}if(m)for(u=n.length-1;u>=0;u--){let M=n[u];if(n[u].level<a)break;if(M.single===h&&n[u].level===a){M=n[u];let A,O;h?(A=t.md.options.quotes[2],O=t.md.options.quotes[3]):(A=t.md.options.quotes[0],O=t.md.options.quotes[1]),Cu(s,r,f.index,O),Cu(s,M.token,M.pos,A),n.length=u;continue e}}k?n.push({token:r,pos:f.index,single:h,level:a}):m&&h&&Cu(s,r,f.index,ws)}}Object.keys(s).forEach(function(r){e[r].content=ic(e[r].content,s[r])})}function cc(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!oc.test(e.tokens[t].content)||lc(e.tokens[t].children,e)}function dc(e){let t,u;const n=e.tokens,s=n.length;for(let r=0;r<s;r++){if(n[r].type!=="inline")continue;const o=n[r].children,a=o.length;for(t=0;t<a;t++)o[t].type==="text_special"&&(o[t].type="text");for(t=u=0;t<a;t++)o[t].type==="text"&&t+1<a&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==u&&(o[u]=o[t]),u++);t!==u&&(o.length=u)}}const cn=[["normalize",Kl],["block",Zl],["inline",Yl],["linkify",Ql],["replacements",ac],["smartquotes",cc],["text_join",dc]];function zn(){this.ruler=new Oe;for(let e=0;e<cn.length;e++)this.ruler.push(cn[e][0],cn[e][1])}zn.prototype.process=function(e){const t=this.ruler.getRules("");for(let u=0,n=t.length;u<n;u++)t[u](e)};zn.prototype.State=Cr;function Qe(e,t,u,n){this.src=e,this.md=t,this.env=u,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const s=this.src;for(let r=0,o=0,a=0,i=0,l=s.length,c=!1;o<l;o++){const f=s.charCodeAt(o);if(!c)if(le(f)){a++,f===9?i+=4-i%4:i++;continue}else c=!0;(f===10||o===l-1)&&(f!==10&&o++,this.bMarks.push(r),this.eMarks.push(o),this.tShift.push(a),this.sCount.push(i),this.bsCount.push(0),c=!1,a=0,i=0,r=o+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Qe.prototype.push=function(e,t,u){const n=new Be(e,t,u);return n.block=!0,u<0&&this.level--,n.level=this.level,u>0&&this.level++,this.tokens.push(n),n};Qe.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Qe.prototype.skipEmptyLines=function(t){for(let u=this.lineMax;t<u&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Qe.prototype.skipSpaces=function(t){for(let u=this.src.length;t<u;t++){const n=this.src.charCodeAt(t);if(!le(n))break}return t};Qe.prototype.skipSpacesBack=function(t,u){if(t<=u)return t;for(;t>u;)if(!le(this.src.charCodeAt(--t)))return t+1;return t};Qe.prototype.skipChars=function(t,u){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===u;t++);return t};Qe.prototype.skipCharsBack=function(t,u,n){if(t<=n)return t;for(;t>n;)if(u!==this.src.charCodeAt(--t))return t+1;return t};Qe.prototype.getLines=function(t,u,n,s){if(t>=u)return"";const r=new Array(u-t);for(let o=0,a=t;a<u;a++,o++){let i=0;const l=this.bMarks[a];let c=l,f;for(a+1<u||s?f=this.eMarks[a]+1:f=this.eMarks[a];c<f&&i<n;){const k=this.src.charCodeAt(c);if(le(k))k===9?i+=4-(i+this.bsCount[a])%4:i++;else if(c-l<this.tShift[a])i++;else break;c++}i>n?r[o]=new Array(i-n+1).join(" ")+this.src.slice(c,f):r[o]=this.src.slice(c,f)}return r.join("")};Qe.prototype.Token=Be;const fc=65536;function dn(e,t){const u=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(u,n)}function Es(e){const t=[],u=e.length;let n=0,s=e.charCodeAt(n),r=!1,o=0,a="";for(;n<u;)s===124&&(r?(a+=e.substring(o,n-1),o=n):(t.push(a+e.substring(o,n)),a="",o=n+1)),r=s===92,n++,s=e.charCodeAt(n);return t.push(a+e.substring(o)),t}function pc(e,t,u,n){if(t+2>u)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let r=e.bMarks[s]+e.tShift[s];if(r>=e.eMarks[s])return!1;const o=e.src.charCodeAt(r++);if(o!==124&&o!==45&&o!==58||r>=e.eMarks[s])return!1;const a=e.src.charCodeAt(r++);if(a!==124&&a!==45&&a!==58&&!le(a)||o===45&&le(a))return!1;for(;r<e.eMarks[s];){const D=e.src.charCodeAt(r);if(D!==124&&D!==45&&D!==58&&!le(D))return!1;r++}let i=dn(e,t+1),l=i.split("|");const c=[];for(let D=0;D<l.length;D++){const M=l[D].trim();if(!M){if(D===0||D===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(M))return!1;M.charCodeAt(M.length-1)===58?c.push(M.charCodeAt(0)===58?"center":"right"):M.charCodeAt(0)===58?c.push("left"):c.push("")}if(i=dn(e,t).trim(),i.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=Es(i),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==c.length)return!1;if(n)return!0;const k=e.parentType;e.parentType="table";const m=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),x=[t,0];h.map=x;const g=e.push("thead_open","thead",1);g.map=[t,t+1];const _=e.push("tr_open","tr",1);_.map=[t,t+1];for(let D=0;D<l.length;D++){const M=e.push("th_open","th",1);c[D]&&(M.attrs=[["style","text-align:"+c[D]]]);const A=e.push("inline","",0);A.content=l[D].trim(),A.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let E,F=0;for(s=t+2;s<u&&!(e.sCount[s]<e.blkIndent);s++){let D=!1;for(let A=0,O=m.length;A<O;A++)if(m[A](e,s,u,!0)){D=!0;break}if(D||(i=dn(e,s).trim(),!i)||e.sCount[s]-e.blkIndent>=4||(l=Es(i),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),F+=f-l.length,F>fc))break;if(s===t+2){const A=e.push("tbody_open","tbody",1);A.map=E=[t+2,0]}const M=e.push("tr_open","tr",1);M.map=[s,s+1];for(let A=0;A<f;A++){const O=e.push("td_open","td",1);c[A]&&(O.attrs=[["style","text-align:"+c[A]]]);const T=e.push("inline","",0);T.content=l[A]?l[A].trim():"",T.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return E&&(e.push("tbody_close","tbody",-1),E[1]=s),e.push("table_close","table",-1),x[1]=s,e.parentType=k,e.line=s,!0}function hc(e,t,u){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,s=n;for(;n<u;){if(e.isEmpty(n)){n++;continue}if(e.sCount[n]-e.blkIndent>=4){n++,s=n;continue}break}e.line=s;const r=e.push("code_block","code",0);return r.content=e.getLines(t,s,4+e.blkIndent,!1)+`
226
+ `,r.map=[t,e.line],!0}function bc(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>r)return!1;const o=e.src.charCodeAt(s);if(o!==126&&o!==96)return!1;let a=s;s=e.skipChars(s,o);let i=s-a;if(i<3)return!1;const l=e.src.slice(a,s),c=e.src.slice(s,r);if(o===96&&c.indexOf(String.fromCharCode(o))>=0)return!1;if(n)return!0;let f=t,k=!1;for(;f++,!(f>=u||(s=a=e.bMarks[f]+e.tShift[f],r=e.eMarks[f],s<r&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(s)===o&&!(e.sCount[f]-e.blkIndent>=4)&&(s=e.skipChars(s,o),!(s-a<i)&&(s=e.skipSpaces(s),!(s<r)))){k=!0;break}i=e.sCount[t],e.line=f+(k?1:0);const m=e.push("fence","code",0);return m.info=c,m.content=e.getLines(t+1,f,i,!0),m.markup=l,m.map=[t,e.line],!0}function mc(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];const o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==62)return!1;if(n)return!0;const a=[],i=[],l=[],c=[],f=e.md.block.ruler.getRules("blockquote"),k=e.parentType;e.parentType="blockquote";let m=!1,h;for(h=t;h<u;h++){const F=e.sCount[h]<e.blkIndent;if(s=e.bMarks[h]+e.tShift[h],r=e.eMarks[h],s>=r)break;if(e.src.charCodeAt(s++)===62&&!F){let M=e.sCount[h]+1,A,O;e.src.charCodeAt(s)===32?(s++,M++,O=!1,A=!0):e.src.charCodeAt(s)===9?(A=!0,(e.bsCount[h]+M)%4===3?(s++,M++,O=!1):O=!0):A=!1;let T=M;for(a.push(e.bMarks[h]),e.bMarks[h]=s;s<r;){const R=e.src.charCodeAt(s);if(le(R))R===9?T+=4-(T+e.bsCount[h]+(O?1:0))%4:T++;else break;s++}m=s>=r,i.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(A?1:0),l.push(e.sCount[h]),e.sCount[h]=T-M,c.push(e.tShift[h]),e.tShift[h]=s-e.bMarks[h];continue}if(m)break;let D=!1;for(let M=0,A=f.length;M<A;M++)if(f[M](e,h,u,!0)){D=!0;break}if(D){e.lineMax=h,e.blkIndent!==0&&(a.push(e.bMarks[h]),i.push(e.bsCount[h]),c.push(e.tShift[h]),l.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}a.push(e.bMarks[h]),i.push(e.bsCount[h]),c.push(e.tShift[h]),l.push(e.sCount[h]),e.sCount[h]=-1}const x=e.blkIndent;e.blkIndent=0;const g=e.push("blockquote_open","blockquote",1);g.markup=">";const _=[t,0];g.map=_,e.md.block.tokenize(e,t,h);const E=e.push("blockquote_close","blockquote",-1);E.markup=">",e.lineMax=o,e.parentType=k,_[1]=e.line;for(let F=0;F<c.length;F++)e.bMarks[F+t]=a[F],e.tShift[F+t]=c[F],e.sCount[F+t]=l[F],e.bsCount[F+t]=i[F];return e.blkIndent=x,!0}function gc(e,t,u,n){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;for(;r<s;){const l=e.src.charCodeAt(r++);if(l!==o&&!le(l))return!1;l===o&&a++}if(a<3)return!1;if(n)return!0;e.line=t+1;const i=e.push("hr","hr",0);return i.map=[t,e.line],i.markup=Array(a+1).join(String.fromCharCode(o)),!0}function As(e,t){const u=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(n++);if(s!==42&&s!==45&&s!==43)return-1;if(n<u){const r=e.src.charCodeAt(n);if(!le(r))return-1}return n}function Cs(e,t){const u=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let s=u;if(s+1>=n)return-1;let r=e.src.charCodeAt(s++);if(r<48||r>57)return-1;for(;;){if(s>=n)return-1;if(r=e.src.charCodeAt(s++),r>=48&&r<=57){if(s-u>=10)return-1;continue}if(r===41||r===46)break;return-1}return s<n&&(r=e.src.charCodeAt(s),!le(r))?-1:s}function xc(e,t){const u=e.level+2;for(let n=t+2,s=e.tokens.length-2;n<s;n++)e.tokens[n].level===u&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function vc(e,t,u,n){let s,r,o,a,i=t,l=!0;if(e.sCount[i]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[i]-e.listIndent>=4&&e.sCount[i]<e.blkIndent)return!1;let c=!1;n&&e.parentType==="paragraph"&&e.sCount[i]>=e.blkIndent&&(c=!0);let f,k,m;if((m=Cs(e,i))>=0){if(f=!0,o=e.bMarks[i]+e.tShift[i],k=Number(e.src.slice(o,m-1)),c&&k!==1)return!1}else if((m=As(e,i))>=0)f=!1;else return!1;if(c&&e.skipSpaces(m)>=e.eMarks[i])return!1;if(n)return!0;const h=e.src.charCodeAt(m-1),x=e.tokens.length;f?(a=e.push("ordered_list_open","ol",1),k!==1&&(a.attrs=[["start",k]])):a=e.push("bullet_list_open","ul",1);const g=[i,0];a.map=g,a.markup=String.fromCharCode(h);let _=!1;const E=e.md.block.ruler.getRules("list"),F=e.parentType;for(e.parentType="list";i<u;){r=m,s=e.eMarks[i];const D=e.sCount[i]+m-(e.bMarks[i]+e.tShift[i]);let M=D;for(;r<s;){const fe=e.src.charCodeAt(r);if(fe===9)M+=4-(M+e.bsCount[i])%4;else if(fe===32)M++;else break;r++}const A=r;let O;A>=s?O=1:O=M-D,O>4&&(O=1);const T=D+O;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);const R=[i,0];a.map=R,f&&(a.info=e.src.slice(o,m-1));const ce=e.tight,ee=e.tShift[i],J=e.sCount[i],Z=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=T,e.tight=!0,e.tShift[i]=A-e.bMarks[i],e.sCount[i]=M,A>=s&&e.isEmpty(i+1)?e.line=Math.min(e.line+2,u):e.md.block.tokenize(e,i,u,!0),(!e.tight||_)&&(l=!1),_=e.line-i>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Z,e.tShift[i]=ee,e.sCount[i]=J,e.tight=ce,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),i=e.line,R[1]=i,i>=u||e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)break;let ie=!1;for(let fe=0,Ee=E.length;fe<Ee;fe++)if(E[fe](e,i,u,!0)){ie=!0;break}if(ie)break;if(f){if(m=Cs(e,i),m<0)break;o=e.bMarks[i]+e.tShift[i]}else if(m=As(e,i),m<0)break;if(h!==e.src.charCodeAt(m-1))break}return f?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(h),g[1]=i,e.line=i,e.parentType=F,l&&xc(e,x),!0}function yc(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function a(E){const F=e.lineMax;if(E>=F||e.isEmpty(E))return null;let D=!1;if(e.sCount[E]-e.blkIndent>3&&(D=!0),e.sCount[E]<0&&(D=!0),!D){const O=e.md.block.ruler.getRules("reference"),T=e.parentType;e.parentType="reference";let R=!1;for(let ce=0,ee=O.length;ce<ee;ce++)if(O[ce](e,E,F,!0)){R=!0;break}if(e.parentType=T,R)return null}const M=e.bMarks[E]+e.tShift[E],A=e.eMarks[E];return e.src.slice(M,A+1)}let i=e.src.slice(s,r+1);r=i.length;let l=-1;for(s=1;s<r;s++){const E=i.charCodeAt(s);if(E===91)return!1;if(E===93){l=s;break}else if(E===10){const F=a(o);F!==null&&(i+=F,r=i.length,o++)}else if(E===92&&(s++,s<r&&i.charCodeAt(s)===10)){const F=a(o);F!==null&&(i+=F,r=i.length,o++)}}if(l<0||i.charCodeAt(l+1)!==58)return!1;for(s=l+2;s<r;s++){const E=i.charCodeAt(s);if(E===10){const F=a(o);F!==null&&(i+=F,r=i.length,o++)}else if(!le(E))break}const c=e.md.helpers.parseLinkDestination(i,s,r);if(!c.ok)return!1;const f=e.md.normalizeLink(c.str);if(!e.md.validateLink(f))return!1;s=c.pos;const k=s,m=o,h=s;for(;s<r;s++){const E=i.charCodeAt(s);if(E===10){const F=a(o);F!==null&&(i+=F,r=i.length,o++)}else if(!le(E))break}let x=e.md.helpers.parseLinkTitle(i,s,r);for(;x.can_continue;){const E=a(o);if(E===null)break;i+=E,s=r,r=i.length,o++,x=e.md.helpers.parseLinkTitle(i,s,r,x)}let g;for(s<r&&h!==s&&x.ok?(g=x.str,s=x.pos):(g="",s=k,o=m);s<r;){const E=i.charCodeAt(s);if(!le(E))break;s++}if(s<r&&i.charCodeAt(s)!==10&&g)for(g="",s=k,o=m;s<r;){const E=i.charCodeAt(s);if(!le(E))break;s++}if(s<r&&i.charCodeAt(s)!==10)return!1;const _=Pu(i.slice(1,l));return _?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[_]>"u"&&(e.env.references[_]={title:g,href:f}),e.line=o),!0):!1}const kc=["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"],_c="[a-zA-Z_:][a-zA-Z0-9:._-]*",wc="[^\"'=<>`\\x00-\\x20]+",Ec="'[^']*'",Ac='"[^"]*"',Cc="(?:"+wc+"|"+Ec+"|"+Ac+")",Dc="(?:\\s+"+_c+"(?:\\s*=\\s*"+Cc+")?)",Tr="<[A-Za-z][A-Za-z0-9\\-]*"+Dc+"*\\s*\\/?>",Sr="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Tc="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Sc="<[?][\\s\\S]*?[?]>",Fc="<![A-Za-z][^>]*>",$c="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Ic=new RegExp("^(?:"+Tr+"|"+Sr+"|"+Tc+"|"+Sc+"|"+Fc+"|"+$c+")"),Mc=new RegExp("^(?:"+Tr+"|"+Sr+")"),At=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+kc.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Mc.source+"\\s*$"),/^$/,!1]];function Oc(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let o=e.src.slice(s,r),a=0;for(;a<At.length&&!At[a][0].test(o);a++);if(a===At.length)return!1;if(n)return At[a][2];let i=t+1;const l=At[a][1].test("");if(!At[a][1].test(o)){for(;i<u&&!(e.sCount[i]<e.blkIndent&&(l||!e.isEmpty(i)));i++)if(s=e.bMarks[i]+e.tShift[i],r=e.eMarks[i],o=e.src.slice(s,r),At[a][1].test(o)){o.length!==0&&i++;break}}e.line=i;const c=e.push("html_block","",0);return c.map=[t,i],c.content=e.getLines(t,i,e.blkIndent,!0),!0}function Rc(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(s);if(o!==35||s>=r)return!1;let a=1;for(o=e.src.charCodeAt(++s);o===35&&s<r&&a<=6;)a++,o=e.src.charCodeAt(++s);if(a>6||s<r&&!le(o))return!1;if(n)return!0;r=e.skipSpacesBack(r,s);const i=e.skipCharsBack(r,35,s);i>s&&le(e.src.charCodeAt(i-1))&&(r=i),e.line=t+1;const l=e.push("heading_open","h"+String(a),1);l.markup="########".slice(0,a),l.map=[t,e.line];const c=e.push("inline","",0);c.content=Bu(e.src.slice(s,r)),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(a),-1);return f.markup="########".slice(0,a),!0}function zc(e,t,u){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const s=e.parentType;e.parentType="paragraph";let r=0,o,a=t+1;for(;a<u&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let m=e.bMarks[a]+e.tShift[a];const h=e.eMarks[a];if(m<h&&(o=e.src.charCodeAt(m),(o===45||o===61)&&(m=e.skipChars(m,o),m=e.skipSpaces(m),m>=h))){r=o===61?1:2;break}}if(e.sCount[a]<0)continue;let k=!1;for(let m=0,h=n.length;m<h;m++)if(n[m](e,a,u,!0)){k=!0;break}if(k)break}if(!r)return e.parentType=s,!1;const i=Bu(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const l=e.push("heading_open","h"+String(r),1);l.markup=String.fromCharCode(o),l.map=[t,e.line];const c=e.push("inline","",0);c.content=i,c.map=[t,e.line-1],c.children=[];const f=e.push("heading_close","h"+String(r),-1);return f.markup=String.fromCharCode(o),e.parentType=s,!0}function Lc(e,t,u){const n=e.md.block.ruler.getRules("paragraph"),s=e.parentType;let r=t+1;for(e.parentType="paragraph";r<u&&!e.isEmpty(r);r++){if(e.sCount[r]-e.blkIndent>3||e.sCount[r]<0)continue;let l=!1;for(let c=0,f=n.length;c<f;c++)if(n[c](e,r,u,!0)){l=!0;break}if(l)break}const o=Bu(e.getLines(t,r,e.blkIndent,!1));e.line=r;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const i=e.push("inline","",0);return i.content=o,i.map=[t,e.line],i.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}const Du=[["table",pc,["paragraph","reference"]],["code",hc],["fence",bc,["paragraph","reference","blockquote","list"]],["blockquote",mc,["paragraph","reference","blockquote","list"]],["hr",gc,["paragraph","reference","blockquote","list"]],["list",vc,["paragraph","reference","blockquote"]],["reference",yc],["html_block",Oc,["paragraph","reference","blockquote"]],["heading",Rc,["paragraph","reference","blockquote"]],["lheading",zc],["paragraph",Lc]];function qu(){this.ruler=new Oe;for(let e=0;e<Du.length;e++)this.ruler.push(Du[e][0],Du[e][1],{alt:(Du[e][2]||[]).slice()})}qu.prototype.tokenize=function(e,t,u){const n=this.ruler.getRules(""),s=n.length,r=e.md.options.maxNesting;let o=t,a=!1;for(;o<u&&(e.line=o=e.skipEmptyLines(o),!(o>=u||e.sCount[o]<e.blkIndent));){if(e.level>=r){e.line=u;break}const i=e.line;let l=!1;for(let c=0;c<s;c++)if(l=n[c](e,o,u,!1),l){if(i>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),o=e.line,o<u&&e.isEmpty(o)&&(a=!0,o++,e.line=o)}};qu.prototype.parse=function(e,t,u,n){if(!e)return;const s=new this.State(e,t,u,n);this.tokenize(s,s.line,s.lineMax)};qu.prototype.State=Qe;function mu(e,t,u,n){this.src=e,this.env=u,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}mu.prototype.pushPending=function(){const e=new Be("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};mu.prototype.push=function(e,t,u){this.pending&&this.pushPending();const n=new Be(e,t,u);let s=null;return u<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,u>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(s),n};mu.prototype.scanDelims=function(e,t){const u=this.posMax,n=this.src.charCodeAt(e);let s;if(e===0)s=32;else if(e===1)s=this.src.charCodeAt(0),(s&63488)===55296&&(s=65533);else if(s=this.src.charCodeAt(e-1),(s&64512)===56320){const g=this.src.charCodeAt(e-2);s=(g&64512)===55296?65536+(g-55296<<10)+(s-56320):65533}else(s&64512)===55296&&(s=65533);let r=e;for(;r<u&&this.src.charCodeAt(r)===n;)r++;const o=r-e;let a=r<u?this.src.charCodeAt(r):32;if((a&64512)===55296){const g=this.src.charCodeAt(r+1);a=(g&64512)===56320?65536+(a-55296<<10)+(g-56320):65533}else(a&64512)===56320&&(a=65533);const i=du(s)||cu(s),l=du(a)||cu(a),c=lu(s),f=lu(a),k=!f&&(!l||c||i),m=!c&&(!i||f||l);return{can_open:k&&(t||!m||i),can_close:m&&(t||!k||l),length:o}};mu.prototype.Token=Be;function Nc(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Pc(e,t){let u=e.pos;for(;u<e.posMax&&!Nc(e.src.charCodeAt(u));)u++;return u===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,u)),e.pos=u,!0)}const Bc=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function qc(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const u=e.pos,n=e.posMax;if(u+3>n||e.src.charCodeAt(u)!==58||e.src.charCodeAt(u+1)!==47||e.src.charCodeAt(u+2)!==47)return!1;const s=e.pending.match(Bc);if(!s)return!1;const r=s[1],o=e.md.linkify.matchAtStart(e.src.slice(u-r.length));if(!o)return!1;let a=o.url;if(a.length<=r.length)return!1;let i=a.length;for(;i>0&&a.charCodeAt(i-1)===42;)i--;i!==a.length&&(a=a.slice(0,i));const l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-r.length);const c=e.push("link_open","a",1);c.attrs=[["href",l]],c.markup="linkify",c.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(a);const k=e.push("link_close","a",-1);k.markup="linkify",k.info="auto"}return e.pos+=a.length-r.length,!0}function Uc(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==10)return!1;const n=e.pending.length-1,s=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let r=n-1;for(;r>=1&&e.pending.charCodeAt(r-1)===32;)r--;e.pending=e.pending.slice(0,r),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(u++;u<s&&le(e.src.charCodeAt(u));)u++;return e.pos=u,!0}const Ln=[];for(let e=0;e<256;e++)Ln.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Ln[e.charCodeAt(0)]=1});function jc(e,t){let u=e.pos;const n=e.posMax;if(e.src.charCodeAt(u)!==92||(u++,u>=n))return!1;let s=e.src.charCodeAt(u);if(s===10){for(t||e.push("hardbreak","br",0),u++;u<n&&(s=e.src.charCodeAt(u),!!le(s));)u++;return e.pos=u,!0}let r=e.src[u];if(s>=55296&&s<=56319&&u+1<n){const a=e.src.charCodeAt(u+1);a>=56320&&a<=57343&&(r+=e.src[u+1],u++)}const o="\\"+r;if(!t){const a=e.push("text_special","",0);s<256&&Ln[s]!==0?a.content=r:a.content=o,a.markup=o,a.info="escape"}return e.pos=u+1,!0}function Hc(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==96)return!1;const s=u;u++;const r=e.posMax;for(;u<r&&e.src.charCodeAt(u)===96;)u++;const o=e.src.slice(s,u),a=o.length;if(e.backticksScanned&&(e.backticks[a]||0)<=s)return t||(e.pending+=o),e.pos+=a,!0;let i=u,l;for(;(l=e.src.indexOf("`",i))!==-1;){for(i=l+1;i<r&&e.src.charCodeAt(i)===96;)i++;const c=i-l;if(c===a){if(!t){const f=e.push("code_inline","code",0);f.markup=o,f.content=e.src.slice(u,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=i,!0}e.backticks[c]=l}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=a,!0}function Vc(e,t){const u=e.pos,n=e.src.charCodeAt(u);if(t||n!==126)return!1;const s=e.scanDelims(e.pos,!0);let r=s.length;const o=String.fromCharCode(n);if(r<2)return!1;let a;r%2&&(a=e.push("text","",0),a.content=o,r--);for(let i=0;i<r;i+=2)a=e.push("text","",0),a.content=o+o,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function Ds(e,t){let u;const n=[],s=t.length;for(let r=0;r<s;r++){const o=t[r];if(o.marker!==126||o.end===-1)continue;const a=t[o.end];u=e.tokens[o.token],u.type="s_open",u.tag="s",u.nesting=1,u.markup="~~",u.content="",u=e.tokens[a.token],u.type="s_close",u.tag="s",u.nesting=-1,u.markup="~~",u.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&n.push(a.token-1)}for(;n.length;){const r=n.pop();let o=r+1;for(;o<e.tokens.length&&e.tokens[o].type==="s_close";)o++;o--,r!==o&&(u=e.tokens[o],e.tokens[o]=e.tokens[r],e.tokens[r]=u)}}function Wc(e){const t=e.tokens_meta,u=e.tokens_meta.length;Ds(e,e.delimiters);for(let n=0;n<u;n++)t[n]&&t[n].delimiters&&Ds(e,t[n].delimiters)}const Fr={tokenize:Vc,postProcess:Wc};function Gc(e,t){const u=e.pos,n=e.src.charCodeAt(u);if(t||n!==95&&n!==42)return!1;const s=e.scanDelims(e.pos,n===42);for(let r=0;r<s.length;r++){const o=e.push("text","",0);o.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0}function Ts(e,t){const u=t.length;for(let n=u-1;n>=0;n--){const s=t[n];if(s.marker!==95&&s.marker!==42||s.end===-1)continue;const r=t[s.end],o=n>0&&t[n-1].end===s.end+1&&t[n-1].marker===s.marker&&t[n-1].token===s.token-1&&t[s.end+1].token===r.token+1,a=String.fromCharCode(s.marker),i=e.tokens[s.token];i.type=o?"strong_open":"em_open",i.tag=o?"strong":"em",i.nesting=1,i.markup=o?a+a:a,i.content="";const l=e.tokens[r.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?a+a:a,l.content="",o&&(e.tokens[t[n-1].token].content="",e.tokens[t[s.end+1].token].content="",n--)}}function Kc(e){const t=e.tokens_meta,u=e.tokens_meta.length;Ts(e,e.delimiters);for(let n=0;n<u;n++)t[n]&&t[n].delimiters&&Ts(e,t[n].delimiters)}const $r={tokenize:Gc,postProcess:Kc};function Zc(e,t){let u,n,s,r,o="",a="",i=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const c=e.pos,f=e.posMax,k=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let h=m+1;if(h<f&&e.src.charCodeAt(h)===40){for(l=!1,h++;h<f&&(u=e.src.charCodeAt(h),!(!le(u)&&u!==10));h++);if(h>=f)return!1;if(i=h,s=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),s.ok){for(o=e.md.normalizeLink(s.str),e.md.validateLink(o)?h=s.pos:o="",i=h;h<f&&(u=e.src.charCodeAt(h),!(!le(u)&&u!==10));h++);if(s=e.md.helpers.parseLinkTitle(e.src,h,e.posMax),h<f&&i!==h&&s.ok)for(a=s.str,h=s.pos;h<f&&(u=e.src.charCodeAt(h),!(!le(u)&&u!==10));h++);}(h>=f||e.src.charCodeAt(h)!==41)&&(l=!0),h++}if(l){if(typeof e.env.references>"u")return!1;if(h<f&&e.src.charCodeAt(h)===91?(i=h+1,h=e.md.helpers.parseLinkLabel(e,h),h>=0?n=e.src.slice(i,h++):h=m+1):h=m+1,n||(n=e.src.slice(k,m)),r=e.env.references[Pu(n)],!r)return e.pos=c,!1;o=r.href,a=r.title}if(!t){e.pos=k,e.posMax=m;const x=e.push("link_open","a",1),g=[["href",o]];x.attrs=g,a&&g.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=f,!0}function Yc(e,t){let u,n,s,r,o,a,i,l,c="";const f=e.pos,k=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const m=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(r=h+1,r<k&&e.src.charCodeAt(r)===40){for(r++;r<k&&(u=e.src.charCodeAt(r),!(!le(u)&&u!==10));r++);if(r>=k)return!1;for(l=r,a=e.md.helpers.parseLinkDestination(e.src,r,e.posMax),a.ok&&(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?r=a.pos:c=""),l=r;r<k&&(u=e.src.charCodeAt(r),!(!le(u)&&u!==10));r++);if(a=e.md.helpers.parseLinkTitle(e.src,r,e.posMax),r<k&&l!==r&&a.ok)for(i=a.str,r=a.pos;r<k&&(u=e.src.charCodeAt(r),!(!le(u)&&u!==10));r++);else i="";if(r>=k||e.src.charCodeAt(r)!==41)return e.pos=f,!1;r++}else{if(typeof e.env.references>"u")return!1;if(r<k&&e.src.charCodeAt(r)===91?(l=r+1,r=e.md.helpers.parseLinkLabel(e,r),r>=0?s=e.src.slice(l,r++):r=h+1):r=h+1,s||(s=e.src.slice(m,h)),o=e.env.references[Pu(s)],!o)return e.pos=f,!1;c=o.href,i=o.title}if(!t){n=e.src.slice(m,h);const x=[];e.md.inline.parse(n,e.md,e.env,x);const g=e.push("image","img",0),_=[["src",c],["alt",""]];g.attrs=_,g.children=x,g.content=n,i&&_.push(["title",i])}return e.pos=r,e.posMax=k,!0}const Xc=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Jc=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Qc(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;const n=e.pos,s=e.posMax;for(;;){if(++u>=s)return!1;const o=e.src.charCodeAt(u);if(o===60)return!1;if(o===62)break}const r=e.src.slice(n+1,u);if(Jc.test(r)){const o=e.md.normalizeLink(r);if(!e.md.validateLink(o))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const i=e.push("text","",0);i.content=e.md.normalizeLinkText(r);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=r.length+2,!0}if(Xc.test(r)){const o=e.md.normalizeLink("mailto:"+r);if(!e.md.validateLink(o))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const i=e.push("text","",0);i.content=e.md.normalizeLinkText(r);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=r.length+2,!0}return!1}function e0(e){return/^<a[>\s]/i.test(e)}function t0(e){return/^<\/a\s*>/i.test(e)}function u0(e){const t=e|32;return t>=97&&t<=122}function n0(e,t){if(!e.md.options.html)return!1;const u=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=u)return!1;const s=e.src.charCodeAt(n+1);if(s!==33&&s!==63&&s!==47&&!u0(s))return!1;const r=e.src.slice(n).match(Ic);if(!r)return!1;if(!t){const o=e.push("html_inline","",0);o.content=r[0],e0(o.content)&&e.linkLevel++,t0(o.content)&&e.linkLevel--}return e.pos+=r[0].length,!0}const s0=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,r0=/^&([a-z][a-z0-9]{1,31});/i;function a0(e,t){const u=e.pos,n=e.posMax;if(e.src.charCodeAt(u)!==38||u+1>=n)return!1;if(e.src.charCodeAt(u+1)===35){const r=e.src.slice(u).match(s0);if(r){if(!t){const o=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),a=e.push("text_special","",0);a.content=Rn(o)?iu(o):iu(65533),a.markup=r[0],a.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(u).match(r0);if(r){const o=Al(r[0]);if(o!==r[0]){if(!t){const a=e.push("text_special","",0);a.content=o,a.markup=r[0],a.info="entity"}return e.pos+=r[0].length,!0}}}return!1}function Ss(e){const t={},u=e.length;if(!u)return;let n=0,s=-2;const r=[];for(let o=0;o<u;o++){const a=e[o];if(r.push(0),(e[n].marker!==a.marker||s!==a.token-1)&&(n=o),s=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const i=t[a.marker][(a.open?3:0)+a.length%3];let l=n-r[n]-1,c=l;for(;l>i;l-=r[l]+1){const f=e[l];if(f.marker===a.marker&&f.open&&f.end<0){let k=!1;if((f.close||a.open)&&(f.length+a.length)%3===0&&(f.length%3!==0||a.length%3!==0)&&(k=!0),!k){const m=l>0&&!e[l-1].open?r[l-1]+1:0;r[o]=o-l+m,r[l]=m,a.open=!1,f.end=o,f.close=!1,c=-1,s=-2;break}}}c!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function o0(e){const t=e.tokens_meta,u=e.tokens_meta.length;Ss(e.delimiters);for(let n=0;n<u;n++)t[n]&&t[n].delimiters&&Ss(t[n].delimiters)}function i0(e){let t,u,n=0;const s=e.tokens,r=e.tokens.length;for(t=u=0;t<r;t++)s[t].nesting<0&&n--,s[t].level=n,s[t].nesting>0&&n++,s[t].type==="text"&&t+1<r&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==u&&(s[u]=s[t]),u++);t!==u&&(s.length=u)}const fn=[["text",Pc],["linkify",qc],["newline",Uc],["escape",jc],["backticks",Hc],["strikethrough",Fr.tokenize],["emphasis",$r.tokenize],["link",Zc],["image",Yc],["autolink",Qc],["html_inline",n0],["entity",a0]],pn=[["balance_pairs",o0],["strikethrough",Fr.postProcess],["emphasis",$r.postProcess],["fragments_join",i0]];function gu(){this.ruler=new Oe;for(let e=0;e<fn.length;e++)this.ruler.push(fn[e][0],fn[e][1]);this.ruler2=new Oe;for(let e=0;e<pn.length;e++)this.ruler2.push(pn[e][0],pn[e][1])}gu.prototype.skipToken=function(e){const t=e.pos,u=this.ruler.getRules(""),n=u.length,s=e.md.options.maxNesting,r=e.cache;if(typeof r[t]<"u"){e.pos=r[t];return}let o=!1;if(e.level<s){for(let a=0;a<n;a++)if(e.level++,o=u[a](e,!0),e.level--,o){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;o||e.pos++,r[t]=e.pos};gu.prototype.tokenize=function(e){const t=this.ruler.getRules(""),u=t.length,n=e.posMax,s=e.md.options.maxNesting;for(;e.pos<n;){const r=e.pos;let o=!1;if(e.level<s){for(let a=0;a<u;a++)if(o=t[a](e,!1),o){if(r>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};gu.prototype.parse=function(e,t,u,n){const s=new this.State(e,t,u,n);this.tokenize(s);const r=this.ruler2.getRules(""),o=r.length;for(let a=0;a<o;a++)r[a](s)};gu.prototype.State=mu;function l0(e){const t={};e=e||{},t.src_Any=gr.source,t.src_Cc=xr.source,t.src_Z=yr.source,t.src_P=Mn.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const u="[><|]";return t.src_pseudo_letter="(?:(?!"+u+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+u+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+u+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+u+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function An(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){u&&Object.keys(u).forEach(function(n){e[n]=u[n]})}),e}function Uu(e){return Object.prototype.toString.call(e)}function c0(e){return Uu(e)==="[object String]"}function d0(e){return Uu(e)==="[object Object]"}function f0(e){return Uu(e)==="[object RegExp]"}function Fs(e){return Uu(e)==="[object Function]"}function p0(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Ir={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function h0(e){return Object.keys(e||{}).reduce(function(t,u){return t||Ir.hasOwnProperty(u)},!1)}const b0={"http:":{validate:function(e,t,u){const n=e.slice(t);return u.re.http||(u.re.http=new RegExp("^\\/\\/"+u.re.src_auth+u.re.src_host_port_strict+u.re.src_path,"i")),u.re.http.test(n)?n.match(u.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,u){const n=e.slice(t);return u.re.no_http||(u.re.no_http=new RegExp("^"+u.re.src_auth+"(?:localhost|(?:(?:"+u.re.src_domain+")\\.)+"+u.re.src_domain_root+")"+u.re.src_port+u.re.src_host_terminator+u.re.src_path,"i")),u.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(u.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,u){const n=e.slice(t);return u.re.mailto||(u.re.mailto=new RegExp("^"+u.re.src_email_name+"@"+u.re.src_host_strict,"i")),u.re.mailto.test(n)?n.match(u.re.mailto)[0].length:0}}},m0="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",g0="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function x0(e){return function(t,u){const n=t.slice(u);return e.test(n)?n.match(e)[0].length:0}}function $s(){return function(e,t){t.normalize(e)}}function Mu(e){const t=e.re=l0(e.__opts__),u=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||u.push(m0),u.push(t.src_xn),t.src_tlds=u.join("|");function n(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(n(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(n(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(n(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const s=[];e.__compiled__={};function r(a,i){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+i)}Object.keys(e.__schemas__).forEach(function(a){const i=e.__schemas__[a];if(i===null)return;const l={validate:null,link:null};if(e.__compiled__[a]=l,d0(i)){f0(i.validate)?l.validate=x0(i.validate):Fs(i.validate)?l.validate=i.validate:r(a,i),Fs(i.normalize)?l.normalize=i.normalize:i.normalize?r(a,i):l.normalize=$s();return}if(c0(i)){s.push(a);return}r(a,i)}),s.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:$s()};const o=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(p0).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function Mr(e,t,u,n){const s=e.slice(u,n);this.schema=t.toLowerCase(),this.index=u,this.lastIndex=n,this.raw=s,this.text=s,this.url=s}function Re(e,t){if(!(this instanceof Re))return new Re(e,t);t||h0(e)&&(t=e,e={}),this.__opts__=An({},Ir,t),this.__schemas__=An({},b0,e),this.__compiled__={},this.__tlds__=g0,this.__tlds_replaced__=!1,this.re={},Mu(this)}Re.prototype.add=function(t,u){return this.__schemas__[t]=u,Mu(this),this};Re.prototype.set=function(t){return this.__opts__=An(this.__opts__,t),this};Re.prototype.test=function(t){if(!t.length)return!1;let u,n;if(this.re.schema_test.test(t)){for(n=this.re.schema_search,n.lastIndex=0;(u=n.exec(t))!==null;)if(this.testSchemaAt(t,u[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};Re.prototype.pretest=function(t){return this.re.pretest.test(t)};Re.prototype.testSchemaAt=function(t,u,n){return this.__compiled__[u.toLowerCase()]?this.__compiled__[u.toLowerCase()].validate(t,n,this):0};Re.prototype.match=function(t){const u=[],n=[],s=[],r=[];let o,a,i;function l(k,m){return k?m?k.index!==m.index?k.index<m.index?k:m:k.lastIndex>=m.lastIndex?k:m:k:m}if(!t.length)return null;if(this.re.schema_test.test(t))for(i=this.re.schema_search,i.lastIndex=0;(o=i.exec(t))!==null;)a=this.testSchemaAt(t,o[2],i.lastIndex),a&&n.push({schema:o[2],index:o.index+o[1].length,lastIndex:o.index+o[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(i=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,i.lastIndex=0;(o=i.exec(t))!==null;)s.push({schema:"",index:o.index+o[1].length,lastIndex:o.index+o[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(i=this.re.email_fuzzy_global,i.lastIndex=0;(o=i.exec(t))!==null;)r.push({schema:"mailto:",index:o.index+o[1].length,lastIndex:o.index+o[0].length});const c=[0,0,0];let f=0;for(;;){const k=[n[c[0]],r[c[1]],s[c[2]]],m=l(l(k[0],k[1]),k[2]);if(!m)break;if(m===k[0]?c[0]++:m===k[1]?c[1]++:c[2]++,m.index<f)continue;const h=new Mr(t,m.schema,m.index,m.lastIndex);this.__compiled__[h.schema].normalize(h,this),u.push(h),f=m.lastIndex}return u.length?u:null};Re.prototype.matchAtStart=function(t){if(!t.length)return null;const u=this.re.schema_at_start.exec(t);if(!u)return null;const n=this.testSchemaAt(t,u[2],u[0].length);if(!n)return null;const s=new Mr(t,u[2],u.index+u[1].length,u.index+u[0].length+n);return this.__compiled__[s.schema].normalize(s,this),s};Re.prototype.tlds=function(t,u){return t=Array.isArray(t)?t:[t],u?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,s,r){return n!==r[s-1]}).reverse(),Mu(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Mu(this),this)};Re.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Re.prototype.onCompile=function(){};const Vt=2147483647,Ke=36,Nn=1,fu=26,v0=38,y0=700,Or=72,Rr=128,zr="-",k0=/^xn--/,_0=/[^\0-\x7F]/,w0=/[\x2E\u3002\uFF0E\uFF61]/g,E0={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},hn=Ke-Nn,Ze=Math.floor,bn=String.fromCharCode;function dt(e){throw new RangeError(E0[e])}function A0(e,t){const u=[];let n=e.length;for(;n--;)u[n]=t(e[n]);return u}function Lr(e,t){const u=e.split("@");let n="";u.length>1&&(n=u[0]+"@",e=u[1]),e=e.replace(w0,".");const s=e.split("."),r=A0(s,t).join(".");return n+r}function Nr(e){const t=[];let u=0;const n=e.length;for(;u<n;){const s=e.charCodeAt(u++);if(s>=55296&&s<=56319&&u<n){const r=e.charCodeAt(u++);(r&64512)==56320?t.push(((s&1023)<<10)+(r&1023)+65536):(t.push(s),u--)}else t.push(s)}return t}const C0=e=>String.fromCodePoint(...e),D0=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ke},Is=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Pr=function(e,t,u){let n=0;for(e=u?Ze(e/y0):e>>1,e+=Ze(e/t);e>hn*fu>>1;n+=Ke)e=Ze(e/hn);return Ze(n+(hn+1)*e/(e+v0))},Br=function(e){const t=[],u=e.length;let n=0,s=Rr,r=Or,o=e.lastIndexOf(zr);o<0&&(o=0);for(let a=0;a<o;++a)e.charCodeAt(a)>=128&&dt("not-basic"),t.push(e.charCodeAt(a));for(let a=o>0?o+1:0;a<u;){const i=n;for(let c=1,f=Ke;;f+=Ke){a>=u&&dt("invalid-input");const k=D0(e.charCodeAt(a++));k>=Ke&&dt("invalid-input"),k>Ze((Vt-n)/c)&&dt("overflow"),n+=k*c;const m=f<=r?Nn:f>=r+fu?fu:f-r;if(k<m)break;const h=Ke-m;c>Ze(Vt/h)&&dt("overflow"),c*=h}const l=t.length+1;r=Pr(n-i,l,i==0),Ze(n/l)>Vt-s&&dt("overflow"),s+=Ze(n/l),n%=l,t.splice(n++,0,s)}return String.fromCodePoint(...t)},qr=function(e){const t=[];e=Nr(e);const u=e.length;let n=Rr,s=0,r=Or;for(const i of e)i<128&&t.push(bn(i));const o=t.length;let a=o;for(o&&t.push(zr);a<u;){let i=Vt;for(const c of e)c>=n&&c<i&&(i=c);const l=a+1;i-n>Ze((Vt-s)/l)&&dt("overflow"),s+=(i-n)*l,n=i;for(const c of e)if(c<n&&++s>Vt&&dt("overflow"),c===n){let f=s;for(let k=Ke;;k+=Ke){const m=k<=r?Nn:k>=r+fu?fu:k-r;if(f<m)break;const h=f-m,x=Ke-m;t.push(bn(Is(m+h%x,0))),f=Ze(h/x)}t.push(bn(Is(f,0))),r=Pr(s,l,a===o),s=0,++a}++s,++n}return t.join("")},T0=function(e){return Lr(e,function(t){return k0.test(t)?Br(t.slice(4).toLowerCase()):t})},S0=function(e){return Lr(e,function(t){return _0.test(t)?"xn--"+qr(t):t})},Ur={version:"2.3.1",ucs2:{decode:Nr,encode:C0},decode:Br,encode:qr,toASCII:S0,toUnicode:T0},F0={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},$0={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},I0={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},M0={default:F0,zero:$0,commonmark:I0},O0=/^(vbscript|javascript|file|data):/,R0=/^data:image\/(gif|png|jpeg|webp);/;function z0(e){const t=e.trim().toLowerCase();return O0.test(t)?R0.test(t):!0}const jr=["http:","https:","mailto:"];function L0(e){const t=In(e,!0);if(t.hostname&&(!t.protocol||jr.indexOf(t.protocol)>=0))try{t.hostname=Ur.toASCII(t.hostname)}catch{}return bu($n(t))}function N0(e){const t=In(e,!0);if(t.hostname&&(!t.protocol||jr.indexOf(t.protocol)>=0))try{t.hostname=Ur.toUnicode(t.hostname)}catch{}return Gt($n(t),Gt.defaultChars+"%")}function Ne(e,t){if(!(this instanceof Ne))return new Ne(e,t);t||On(e)||(t=e||{},e="default"),this.inline=new gu,this.block=new qu,this.core=new zn,this.renderer=new Yt,this.linkify=new Re,this.validateLink=z0,this.normalizeLink=L0,this.normalizeLinkText=N0,this.utils=ql,this.helpers=Nu({},Vl),this.options={},this.configure(e),t&&this.set(t)}Ne.prototype.set=function(e){return Nu(this.options,e),this};Ne.prototype.configure=function(e){const t=this;if(On(e)){const u=e;if(e=M0[u],!e)throw new Error('Wrong `markdown-it` preset "'+u+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(u){e.components[u].rules&&t[u].ruler.enableOnly(e.components[u].rules),e.components[u].rules2&&t[u].ruler2.enableOnly(e.components[u].rules2)}),this};Ne.prototype.enable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){u=u.concat(this[s].ruler.enable(e,!0))},this),u=u.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(s){return u.indexOf(s)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};Ne.prototype.disable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){u=u.concat(this[s].ruler.disable(e,!0))},this),u=u.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(s){return u.indexOf(s)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};Ne.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Ne.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const u=new this.core.State(e,this,t);return this.core.process(u),u.tokens};Ne.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Ne.prototype.parseInline=function(e,t){const u=new this.core.State(e,this,t);return u.inlineMode=!0,this.core.process(u),u.tokens};Ne.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};/*! @license DOMPurify 3.4.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.10/LICENSE */function Ms(e,t){(t==null||t>e.length)&&(t=e.length);for(var u=0,n=Array(t);u<t;u++)n[u]=e[u];return n}function P0(e){if(Array.isArray(e))return e}function B0(e,t){var u=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(u!=null){var n,s,r,o,a=[],i=!0,l=!1;try{if(r=(u=u.call(e)).next,t!==0)for(;!(i=(n=r.call(u)).done)&&(a.push(n.value),a.length!==t);i=!0);}catch(c){l=!0,s=c}finally{try{if(!i&&u.return!=null&&(o=u.return(),Object(o)!==o))return}finally{if(l)throw s}}return a}}function q0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
227
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U0(e,t){return P0(e)||B0(e,t)||j0(e,t)||q0()}function j0(e,t){if(e){if(typeof e=="string")return Ms(e,t);var u={}.toString.call(e).slice(8,-1);return u==="Object"&&e.constructor&&(u=e.constructor.name),u==="Map"||u==="Set"?Array.from(e):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?Ms(e,t):void 0}}const Hr=Object.entries,Os=Object.setPrototypeOf,H0=Object.isFrozen,V0=Object.getPrototypeOf,W0=Object.getOwnPropertyDescriptor;let _e=Object.freeze,we=Object.seal,Ht=Object.create,Vr=typeof Reflect<"u"&&Reflect,Cn=Vr.apply,Dn=Vr.construct;_e||(_e=function(t){return t});we||(we=function(t){return t});Cn||(Cn=function(t,u){for(var n=arguments.length,s=new Array(n>2?n-2:0),r=2;r<n;r++)s[r-2]=arguments[r];return t.apply(u,s)});Dn||(Dn=function(t){for(var u=arguments.length,n=new Array(u>1?u-1:0),s=1;s<u;s++)n[s-1]=arguments[s];return new t(...n)});const tu=be(Array.prototype.forEach),G0=be(Array.prototype.lastIndexOf),Rs=be(Array.prototype.pop),Bt=be(Array.prototype.push),K0=be(Array.prototype.splice),ft=Array.isArray,su=be(String.prototype.toLowerCase),mn=be(String.prototype.toString),zs=be(String.prototype.match),uu=be(String.prototype.replace),Ls=be(String.prototype.indexOf),Z0=be(String.prototype.trim),Y0=be(Number.prototype.toString),X0=be(Boolean.prototype.toString),Ns=typeof BigInt>"u"?null:be(BigInt.prototype.toString),Ps=typeof Symbol>"u"?null:be(Symbol.prototype.toString),Te=be(Object.prototype.hasOwnProperty),nu=be(Object.prototype.toString),ke=be(RegExp.prototype.test),Ct=J0(TypeError);function be(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var u=arguments.length,n=new Array(u>1?u-1:0),s=1;s<u;s++)n[s-1]=arguments[s];return Cn(e,t,n)}}function J0(e){return function(){for(var t=arguments.length,u=new Array(t),n=0;n<t;n++)u[n]=arguments[n];return Dn(e,u)}}function te(e,t){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:su;if(Os&&Os(e,null),!ft(t))return e;let n=t.length;for(;n--;){let s=t[n];if(typeof s=="string"){const r=u(s);r!==s&&(H0(t)||(t[n]=r),s=r)}e[s]=!0}return e}function Q0(e){for(let t=0;t<e.length;t++)Te(e,t)||(e[t]=null);return e}function De(e){const t=Ht(null);for(const n of Hr(e)){var u=U0(n,2);const s=u[0],r=u[1];Te(e,s)&&(ft(r)?t[s]=Q0(r):r&&typeof r=="object"&&r.constructor===Object?t[s]=De(r):t[s]=r)}return t}function ed(e){switch(typeof e){case"string":return e;case"number":return Y0(e);case"boolean":return X0(e);case"bigint":return Ns?Ns(e):"0";case"symbol":return Ps?Ps(e):"Symbol()";case"undefined":return nu(e);case"function":case"object":{if(e===null)return nu(e);const t=e,u=Ge(t,"toString");if(typeof u=="function"){const n=u(t);return typeof n=="string"?n:nu(n)}return nu(e)}default:return nu(e)}}function Ge(e,t){for(;e!==null;){const n=W0(e,t);if(n){if(n.get)return be(n.get);if(typeof n.value=="function")return be(n.value)}e=V0(e)}function u(){return null}return u}function td(e){try{return ke(e,""),!0}catch{return!1}}const Bs=_e(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),gn=_e(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),xn=_e(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ud=_e(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vn=_e(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),nd=_e(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qs=_e(["#text"]),Us=_e(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),yn=_e(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),js=_e(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tu=_e(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sd=we(/{{[\w\W]*|^[\w\W]*}}/g),rd=we(/<%[\w\W]*|^[\w\W]*%>/g),ad=we(/\${[\w\W]*/g),od=we(/^data-[\-\w.\u00B7-\uFFFF]+$/),id=we(/^aria-[\-\w]+$/),Hs=we(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ld=we(/^(?:\w+script|data):/i),cd=we(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dd=we(/^html$/i),fd=we(/^[a-z][.\w]*(-[.\w]+)+$/i),Vs=we(/<[/\w!]/g),pd=we(/<[/\w]/g),hd=we(/<\/no(script|embed|frames)/i),bd=we(/\/>/i),We={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},md=function(){return typeof window>"u"?null:window},gd=function(t,u){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";u&&u.hasAttribute(s)&&(n=u.getAttribute(s));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Ws=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},lt=function(t,u,n,s){return Te(t,u)&&ft(t[u])?te(s.base?De(s.base):{},t[u],s.transform):n};function Wr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:md();const t=N=>Wr(N);if(t.version="3.4.10",t.removed=[],!e||!e.document||e.document.nodeType!==We.document||!e.Element)return t.isSupported=!1,t;let u=e.document;const n=u,s=n.currentScript;e.DocumentFragment;const r=e.HTMLTemplateElement,o=e.Node,a=e.Element,i=e.NodeFilter,l=e.NamedNodeMap;l===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,k=a.prototype,m=Ge(k,"cloneNode"),h=Ge(k,"remove"),x=Ge(k,"nextSibling"),g=Ge(k,"childNodes"),_=Ge(k,"parentNode"),E=Ge(k,"shadowRoot"),F=Ge(k,"attributes"),D=o&&o.prototype?Ge(o.prototype,"nodeType"):null,M=o&&o.prototype?Ge(o.prototype,"nodeName"):null;if(typeof r=="function"){const N=u.createElement("template");N.content&&N.content.ownerDocument&&(u=N.content.ownerDocument)}let A,O="",T,R=!1,ce=0;const ee=function(){if(ce>0)throw Ct('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},J=function(p){ee(),ce++;try{return A.createHTML(p)}finally{ce--}},Z=function(p){ee(),ce++;try{return A.createScriptURL(p)}finally{ce--}},ie=function(){return R||(T=gd(f,s),R=!0),T},fe=u,Ee=fe.implementation,vt=fe.createNodeIterator,It=fe.createDocumentFragment,U=fe.getElementsByTagName,P=n.importNode;let B=Ws();t.isSupported=typeof Hr=="function"&&typeof _=="function"&&Ee&&Ee.createHTMLDocument!==void 0;const me=sd,ge=rd,$e=ad,yt=od,Mt=id,kt=ld,qe=cd,Ot=fd;let j=Hs,$=null;const V=te({},[...Bs,...gn,...xn,...vn,...qs]);let Y=null;const Ie=te({},[...Us,...yn,...js,...Tu]);let se=Object.seal(Ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Me=null,xu=null;const et=Object.seal(Ht(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ue=!0,je=!0,Hu=!1,jn=!0,ot=!1,Xt=!0,_t=!1,Vu=!1,Wu=!1,Rt=!1,vu=!1,yu=!1,Hn=!0,Vn=!1;const Wn="user-content-";let Gu=!0,Ku=!1,zt={},He=null;const Zu=te({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Gn=null;const Kn=te({},["audio","video","img","source","image","track"]);let Yu=null;const Zn=te({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ku="http://www.w3.org/1998/Math/MathML",_u="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let Lt=Ve,Xu=!1,Ju=null;const da=te({},[ku,_u,Ve],mn),Yn=_e(["mi","mo","mn","ms","mtext"]);let Qu=te({},Yn);const Xn=_e(["annotation-xml"]);let en=te({},Xn);const fa=te({},["title","style","font","a","script"]);let Jt=null;const pa=["application/xhtml+xml","text/html"],ha="text/html";let de=null,Nt=null;const ba=u.createElement("form"),Jn=function(p){return p instanceof RegExp||p instanceof Function},tn=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Nt&&Nt===p)return;(!p||typeof p!="object")&&(p={}),p=De(p),Jt=pa.indexOf(p.PARSER_MEDIA_TYPE)===-1?ha:p.PARSER_MEDIA_TYPE,de=Jt==="application/xhtml+xml"?mn:su,$=lt(p,"ALLOWED_TAGS",V,{transform:de}),Y=lt(p,"ALLOWED_ATTR",Ie,{transform:de}),Ju=lt(p,"ALLOWED_NAMESPACES",da,{transform:mn}),Yu=lt(p,"ADD_URI_SAFE_ATTR",Zn,{transform:de,base:Zn}),Gn=lt(p,"ADD_DATA_URI_TAGS",Kn,{transform:de,base:Kn}),He=lt(p,"FORBID_CONTENTS",Zu,{transform:de}),Me=lt(p,"FORBID_TAGS",De({}),{transform:de}),xu=lt(p,"FORBID_ATTR",De({}),{transform:de}),zt=Te(p,"USE_PROFILES")?p.USE_PROFILES&&typeof p.USE_PROFILES=="object"?De(p.USE_PROFILES):p.USE_PROFILES:!1,Ue=p.ALLOW_ARIA_ATTR!==!1,je=p.ALLOW_DATA_ATTR!==!1,Hu=p.ALLOW_UNKNOWN_PROTOCOLS||!1,jn=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ot=p.SAFE_FOR_TEMPLATES||!1,Xt=p.SAFE_FOR_XML!==!1,_t=p.WHOLE_DOCUMENT||!1,Rt=p.RETURN_DOM||!1,vu=p.RETURN_DOM_FRAGMENT||!1,yu=p.RETURN_TRUSTED_TYPE||!1,Wu=p.FORCE_BODY||!1,Hn=p.SANITIZE_DOM!==!1,Vn=p.SANITIZE_NAMED_PROPS||!1,Gu=p.KEEP_CONTENT!==!1,Ku=p.IN_PLACE||!1,j=td(p.ALLOWED_URI_REGEXP)?p.ALLOWED_URI_REGEXP:Hs,Lt=typeof p.NAMESPACE=="string"?p.NAMESPACE:Ve,Qu=Te(p,"MATHML_TEXT_INTEGRATION_POINTS")&&p.MATHML_TEXT_INTEGRATION_POINTS&&typeof p.MATHML_TEXT_INTEGRATION_POINTS=="object"?De(p.MATHML_TEXT_INTEGRATION_POINTS):te({},Yn),en=Te(p,"HTML_INTEGRATION_POINTS")&&p.HTML_INTEGRATION_POINTS&&typeof p.HTML_INTEGRATION_POINTS=="object"?De(p.HTML_INTEGRATION_POINTS):te({},Xn);const w=Te(p,"CUSTOM_ELEMENT_HANDLING")&&p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING=="object"?De(p.CUSTOM_ELEMENT_HANDLING):Ht(null);if(se=Ht(null),Te(w,"tagNameCheck")&&Jn(w.tagNameCheck)&&(se.tagNameCheck=w.tagNameCheck),Te(w,"attributeNameCheck")&&Jn(w.attributeNameCheck)&&(se.attributeNameCheck=w.attributeNameCheck),Te(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),we(se),ot&&(je=!1),vu&&(Rt=!0),zt&&($=te({},qs),Y=Ht(null),zt.html===!0&&(te($,Bs),te(Y,Us)),zt.svg===!0&&(te($,gn),te(Y,yn),te(Y,Tu)),zt.svgFilters===!0&&(te($,xn),te(Y,yn),te(Y,Tu)),zt.mathMl===!0&&(te($,vn),te(Y,js),te(Y,Tu))),et.tagCheck=null,et.attributeCheck=null,Te(p,"ADD_TAGS")&&(typeof p.ADD_TAGS=="function"?et.tagCheck=p.ADD_TAGS:ft(p.ADD_TAGS)&&($===V&&($=De($)),te($,p.ADD_TAGS,de))),Te(p,"ADD_ATTR")&&(typeof p.ADD_ATTR=="function"?et.attributeCheck=p.ADD_ATTR:ft(p.ADD_ATTR)&&(Y===Ie&&(Y=De(Y)),te(Y,p.ADD_ATTR,de))),Te(p,"ADD_URI_SAFE_ATTR")&&ft(p.ADD_URI_SAFE_ATTR)&&te(Yu,p.ADD_URI_SAFE_ATTR,de),Te(p,"FORBID_CONTENTS")&&ft(p.FORBID_CONTENTS)&&(He===Zu&&(He=De(He)),te(He,p.FORBID_CONTENTS,de)),Te(p,"ADD_FORBID_CONTENTS")&&ft(p.ADD_FORBID_CONTENTS)&&(He===Zu&&(He=De(He)),te(He,p.ADD_FORBID_CONTENTS,de)),Gu&&($["#text"]=!0),_t&&te($,["html","head","body"]),$.table&&(te($,["tbody"]),delete Me.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ct('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ct('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const z=A;A=p.TRUSTED_TYPES_POLICY;try{O=J("")}catch(H){throw A=z,H}}else p.TRUSTED_TYPES_POLICY===null?(A=void 0,O=""):(A===void 0&&(A=ie()),A&&typeof O=="string"&&(O=J("")));(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&$===V&&($=De($)),B.uponSanitizeAttribute.length>0&&Y===Ie&&(Y=De(Y)),_e&&_e(p),Nt=p},Qn=te({},[...gn,...xn,...ud]),es=te({},[...vn,...nd]),ma=function(p,w,z){return w.namespaceURI===Ve?p==="svg":w.namespaceURI===ku?p==="svg"&&(z==="annotation-xml"||Qu[z]):!!Qn[p]},ga=function(p,w,z){return w.namespaceURI===Ve?p==="math":w.namespaceURI===_u?p==="math"&&en[z]:!!es[p]},xa=function(p,w,z){return w.namespaceURI===_u&&!en[z]||w.namespaceURI===ku&&!Qu[z]?!1:!es[p]&&(fa[p]||!Qn[p])},va=function(p){let w=_(p);(!w||!w.tagName)&&(w={namespaceURI:Lt,tagName:"template"});const z=su(p.tagName),H=su(w.tagName);return Ju[p.namespaceURI]?p.namespaceURI===_u?ma(z,w,H):p.namespaceURI===ku?ga(z,w,H):p.namespaceURI===Ve?xa(z,w,H):!!(Jt==="application/xhtml+xml"&&Ju[p.namespaceURI]):!1},it=function(p){Bt(t.removed,{element:p});try{_(p).removeChild(p)}catch{if(h(p),!_(p))throw Ct("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ts=function(p){const w=g(p);if(w){const H=[];tu(w,Q=>{Bt(H,Q)}),tu(H,Q=>{try{h(Q)}catch{}})}const z=F(p);if(z)for(let H=z.length-1;H>=0;--H){const Q=z[H],ne=Q&&Q.name;if(typeof ne=="string")try{p.removeAttribute(ne)}catch{}}},wt=function(p,w){try{Bt(t.removed,{attribute:w.getAttributeNode(p),from:w})}catch{Bt(t.removed,{attribute:null,from:w})}if(w.removeAttribute(p),p==="is")if(Rt||vu)try{it(w)}catch{}else try{w.setAttribute(p,"")}catch{}},ya=function(p){const w=F(p);if(w)for(let z=w.length-1;z>=0;--z){const H=w[z],Q=H&&H.name;if(!(typeof Q!="string"||Y[de(Q)]))try{p.removeAttribute(Q)}catch{}}},ka=function(p){const w=[p];for(;w.length>0;){const z=w.pop();(D?D(z):z.nodeType)===We.element&&ya(z);const Q=g(z);if(Q)for(let ne=Q.length-1;ne>=0;--ne)w.push(Q[ne])}},us=function(p){let w=null,z=null;if(Wu)p="<remove></remove>"+p;else{const ne=zs(p,/^[\r\n\t ]+/);z=ne&&ne[0]}Jt==="application/xhtml+xml"&&Lt===Ve&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");const H=A?J(p):p;if(Lt===Ve)try{w=new c().parseFromString(H,Jt)}catch{}if(!w||!w.documentElement){w=Ee.createDocument(Lt,"template",null);try{w.documentElement.innerHTML=Xu?O:H}catch{}}const Q=w.body||w.documentElement;return p&&z&&Q.insertBefore(u.createTextNode(z),Q.childNodes[0]||null),Lt===Ve?U.call(w,_t?"html":"body")[0]:_t?w.documentElement:Q},ns=function(p){return vt.call(p.ownerDocument||p,p,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},wu=function(p){return p=uu(p,me," "),p=uu(p,ge," "),p=uu(p,$e," "),p},un=function(p){var w;p.normalize();const z=vt.call(p.ownerDocument||p,p,i.SHOW_TEXT|i.SHOW_COMMENT|i.SHOW_CDATA_SECTION|i.SHOW_PROCESSING_INSTRUCTION,null);let H=z.nextNode();for(;H;)H.data=wu(H.data),H=z.nextNode();const Q=(w=p.querySelectorAll)===null||w===void 0?void 0:w.call(p,"template");Q&&tu(Q,ne=>{Pt(ne.content)&&un(ne.content)})},Eu=function(p){const w=M?M(p):null;return typeof w!="string"||de(w)!=="form"?!1:typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||p.attributes!==F(p)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function"||p.nodeType!==D(p)||p.childNodes!==g(p)},Pt=function(p){if(!D||typeof p!="object"||p===null)return!1;try{return D(p)===We.documentFragment}catch{return!1}},Qt=function(p){if(!D||typeof p!="object"||p===null)return!1;try{return typeof D(p)=="number"}catch{return!1}};function tt(N,p,w){N.length!==0&&tu(N,z=>{z.call(t,p,w,Nt)})}const _a=function(p,w){return!!(Xt&&p.hasChildNodes()&&!Qt(p.firstElementChild)&&ke(Vs,p.textContent)&&ke(Vs,p.innerHTML)||Xt&&p.namespaceURI===Ve&&w==="style"&&Qt(p.firstElementChild)||p.nodeType===We.processingInstruction||Xt&&p.nodeType===We.comment&&ke(pd,p.data))},wa=function(p,w){if(!Me[w]&&as(w)&&(se.tagNameCheck instanceof RegExp&&ke(se.tagNameCheck,w)||se.tagNameCheck instanceof Function&&se.tagNameCheck(w)))return!1;if(Gu&&!He[w]){const z=_(p),H=g(p);if(H&&z){const Q=H.length;for(let ne=Q-1;ne>=0;--ne){const xe=Ku?H[ne]:m(H[ne],!0);z.insertBefore(xe,x(p))}}}return it(p),!0},ss=function(p){if(tt(B.beforeSanitizeElements,p,null),Eu(p))return it(p),!0;const w=de(M?M(p):p.nodeName);if(tt(B.uponSanitizeElement,p,{tagName:w,allowedTags:$}),_a(p,w))return it(p),!0;if(Me[w]||!(et.tagCheck instanceof Function&&et.tagCheck(w))&&!$[w])return wa(p,w);if((D?D(p):p.nodeType)===We.element&&!va(p)||(w==="noscript"||w==="noembed"||w==="noframes")&&ke(hd,p.innerHTML))return it(p),!0;if(ot&&p.nodeType===We.text){const H=wu(p.textContent);p.textContent!==H&&(Bt(t.removed,{element:p.cloneNode()}),p.textContent=H)}return tt(B.afterSanitizeElements,p,null),!1},rs=function(p,w,z){if(xu[w]||Hn&&(w==="id"||w==="name")&&(z in u||z in ba))return!1;const H=Y[w]||et.attributeCheck instanceof Function&&et.attributeCheck(w,p);if(!(je&&ke(yt,w))){if(!(Ue&&ke(Mt,w))){if(H){if(!Yu[w]){if(!ke(j,uu(z,qe,""))){if(!((w==="src"||w==="xlink:href"||w==="href")&&p!=="script"&&Ls(z,"data:")===0&&Gn[p])){if(!(Hu&&!ke(kt,uu(z,qe,"")))){if(z)return!1}}}}}else if(!(as(p)&&(se.tagNameCheck instanceof RegExp&&ke(se.tagNameCheck,p)||se.tagNameCheck instanceof Function&&se.tagNameCheck(p))&&(se.attributeNameCheck instanceof RegExp&&ke(se.attributeNameCheck,w)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(w,p))||w==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&ke(se.tagNameCheck,z)||se.tagNameCheck instanceof Function&&se.tagNameCheck(z))))return!1}}return!0},Ea=te({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),as=function(p){return!Ea[su(p)]&&ke(Ot,p)},Aa=function(p,w,z,H){if(A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!z)switch(f.getAttributeType(p,w)){case"TrustedHTML":return J(H);case"TrustedScriptURL":return Z(H)}return H},Ca=function(p,w,z,H){try{z?p.setAttributeNS(z,w,H):p.setAttribute(w,H),Eu(p)?it(p):Rs(t.removed)}catch{wt(w,p)}},os=function(p){tt(B.beforeSanitizeAttributes,p,null);const w=p.attributes;if(!w||Eu(p))return;const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let H=w.length;const Q=de(p.nodeName);for(;H--;){const ne=w[H],xe=ne.name,pe=ne.namespaceURI,ze=ne.value,Pe=de(xe),sn=ze;let Ae=xe==="value"?sn:Z0(sn);if(z.attrName=Pe,z.attrValue=Ae,z.keepAttr=!0,z.forceKeepAttr=void 0,tt(B.uponSanitizeAttribute,p,z),Ae=z.attrValue,Vn&&(Pe==="id"||Pe==="name")&&Ls(Ae,Wn)!==0&&(wt(xe,p),Ae=Wn+Ae),Xt&&ke(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ae)){wt(xe,p);continue}if(Pe==="attributename"&&zs(Ae,"href")){wt(xe,p);continue}if(!z.forceKeepAttr){if(!z.keepAttr){wt(xe,p);continue}if(!jn&&ke(bd,Ae)){wt(xe,p);continue}if(ot&&(Ae=wu(Ae)),!rs(Q,Pe,Ae)){wt(xe,p);continue}Ae=Aa(Q,Pe,pe,Ae),Ae!==sn&&Ca(p,xe,pe,Ae)}}tt(B.afterSanitizeAttributes,p,null)},Au=function(p){let w=null;const z=ns(p);for(tt(B.beforeSanitizeShadowDOM,p,null);w=z.nextNode();)if(tt(B.uponSanitizeShadowNode,w,null),ss(w),os(w),Pt(w.content)&&Au(w.content),(D?D(w):w.nodeType)===We.element){const Q=E(w);Pt(Q)&&(nn(Q),Au(Q))}tt(B.afterSanitizeShadowDOM,p,null)},nn=function(p){const w=[{node:p,shadow:null}];for(;w.length>0;){const z=w.pop();if(z.shadow){Au(z.shadow);continue}const H=z.node,ne=(D?D(H):H.nodeType)===We.element,xe=g(H);if(xe)for(let pe=xe.length-1;pe>=0;--pe)w.push({node:xe[pe],shadow:null});if(ne){const pe=M?M(H):null;if(typeof pe=="string"&&de(pe)==="template"){const ze=H.content;Pt(ze)&&w.push({node:ze,shadow:null})}}if(ne){const pe=E(H);Pt(pe)&&w.push({node:null,shadow:pe},{node:pe,shadow:null})}}};return t.sanitize=function(N){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,z=null,H=null,Q=null;if(Xu=!N,Xu&&(N="<!-->"),typeof N!="string"&&!Qt(N)&&(N=ed(N),typeof N!="string"))throw Ct("dirty is not a string, aborting");if(!t.isSupported)return N;Vu||tn(p),t.removed=[];const ne=Ku&&typeof N!="string"&&Qt(N);if(ne){const ze=M?M(N):N.nodeName;if(typeof ze=="string"){const Pe=de(ze);if(!$[Pe]||Me[Pe])throw Ct("root node is forbidden and cannot be sanitized in-place")}if(Eu(N))throw Ct("root node is clobbered and cannot be sanitized in-place");try{nn(N)}catch(Pe){throw ts(N),Pe}}else if(Qt(N))w=us("<!---->"),z=w.ownerDocument.importNode(N,!0),z.nodeType===We.element&&z.nodeName==="BODY"||z.nodeName==="HTML"?w=z:w.appendChild(z),nn(z);else{if(!Rt&&!ot&&!_t&&N.indexOf("<")===-1)return A&&yu?J(N):N;if(w=us(N),!w)return Rt?null:yu?O:""}w&&Wu&&it(w.firstChild);const xe=ns(ne?N:w);try{for(;H=xe.nextNode();)ss(H),os(H),Pt(H.content)&&Au(H.content)}catch(ze){throw ne&&ts(N),ze}if(ne)return tu(t.removed,ze=>{ze.element&&ka(ze.element)}),ot&&un(N),N;if(Rt){if(ot&&un(w),vu)for(Q=It.call(w.ownerDocument);w.firstChild;)Q.appendChild(w.firstChild);else Q=w;return(Y.shadowroot||Y.shadowrootmode)&&(Q=P.call(n,Q,!0)),Q}let pe=_t?w.outerHTML:w.innerHTML;return _t&&$["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&ke(dd,w.ownerDocument.doctype.name)&&(pe="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
228
+ `+pe),ot&&(pe=wu(pe)),A&&yu?J(pe):pe},t.setConfig=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tn(N),Vu=!0},t.clearConfig=function(){Nt=null,Vu=!1,A=T,O=""},t.isValidAttribute=function(N,p,w){Nt||tn({});const z=de(N),H=de(p);return rs(z,H,w)},t.addHook=function(N,p){typeof p=="function"&&Bt(B[N],p)},t.removeHook=function(N,p){if(p!==void 0){const w=G0(B[N],p);return w===-1?void 0:K0(B[N],w,1)[0]}return Rs(B[N])},t.removeHooks=function(N){B[N]=[]},t.removeAllHooks=function(){B=Ws()},t}var Gr=Wr(),xd=Object.defineProperty,vd=Object.defineProperties,yd=Object.getOwnPropertyDescriptors,Gs=Object.getOwnPropertySymbols,kd=Object.prototype.hasOwnProperty,_d=Object.prototype.propertyIsEnumerable,Ks=(e,t,u)=>t in e?xd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,Kr=(e,t)=>{for(var u in t||(t={}))kd.call(t,u)&&Ks(e,u,t[u]);if(Gs)for(var u of Gs(t))_d.call(t,u)&&Ks(e,u,t[u]);return e},Zr=(e,t)=>vd(e,yd(t)),Fe=(e,t)=>{let u=!1,n=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){n=!n,s+=2;continue}!n&&e[s]==="`"&&(u=!u)}return u||n},wd=(e,t)=>{let u=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return u||n||s},Ed=e=>{let t=0;for(let u=0;u<e.length;u+=1){if(e[u]==="\\"&&u+1<e.length&&e[u+1]==="`"){u+=1;continue}e[u]==="`"&&!wd(e,u)&&(t+=1)}return t},mt=(e,t)=>{let u=!1,n=!1,s=-1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"&&r+1<e.length&&e[r+1]==="`"){r+=1;continue}if(e.substring(r,r+3)==="```"){n=!n,r+=2;continue}if(!n&&e[r]==="`")if(u){if(s<t&&t<r)return!0;u=!1,s=-1}else u=!0,s=r}return!1},Ad=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Cd=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Ad,(t,u,n,s)=>Fe(e,s)?t:`${u}\\>${n}`),Dd=/(\*\*)([^*]*\*?)$/,Td=/(__)([^_]*?)$/,Sd=/(\*\*\*)([^*]*?)$/,Fd=/(\*)([^*]*?)$/,$d=/(_)([^_]*?)$/,Id=/(`)([^`]*?)$/,Md=/(~~)([^~]*?)$/,$t=/^[\s_~*`]*$/,Yr=/^[\s]*[-*+][\s]+$/,Od=/[\p{L}\p{N}_]/u,Rd=/^```[^`\n]*```?$/,zd=/^\*{4,}$/,Ld=/(__)([^_]+)_$/,Nd=/(~~)([^~]+)~$/,Zs=/~~/g,gt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Od.test(e)},Pd=(e,t)=>{let u=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")u+=1;else if(e[n]==="["&&(u-=1,u===0))return n;return-1},Xr=(e,t)=>{let u=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")u+=1;else if(e[n]==="]"&&(u-=1,u===0))return n;return-1},ju=(e,t)=>{let u=!1,n=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(n=!n,s+=1,u=!1):n||(u=!u))}return u||n},Bd=(e,t)=>{for(let u=t;u<e.length;u+=1){if(e[u]===")")return!0;if(e[u]===`
229
+ `)return!1}return!1},Jr=(e,t)=>{for(let u=t-1;u>=0;u-=1){if(e[u]===")")return!1;if(e[u]==="(")return u>0&&e[u-1]==="]"?Bd(e,t):!1;if(e[u]===`
230
+ `)return!1}return!1},qd=(e,t)=>{for(let u=t-1;u>=0;u-=1){if(e[u]===">")return!1;if(e[u]==="<"){let n=u+1<e.length?e[u+1]:"";return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(e[u]===`
231
+ `)return!1}return!1},Pn=(e,t,u)=>{let n=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
232
+ `){n=i+1;break}let s=e.length;for(let i=t;i<e.length;i+=1)if(e[i]===`
233
+ `){s=i;break}let r=e.substring(n,s),o=0,a=!1;for(let i of r)if(i===u)o+=1;else if(i!==" "&&i!==" "){a=!0;break}return o>=3&&!a},Ud=(e,t,u,n)=>u==="\\"||e.includes("$")&&ju(e,t)?!0:u!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(u==="*"||u&&n&&gt(u)&&gt(n)||(!u||u===" "||u===" "||u===`
234
+ `)&&(!n||n===" "||n===" "||n===`
235
+ `)),Qr=e=>{let t=0,u=!1,n=e.length;for(let s=0;s<n;s+=1){if(e[s]==="`"&&s+2<n&&e[s+1]==="`"&&e[s+2]==="`"){u=!u,s+=2;continue}if(u||e[s]!=="*")continue;let r=s>0?e[s-1]:"",o=s<n-1?e[s+1]:"";Ud(e,s,r,o)||(t+=1)}return t},jd=(e,t,u,n)=>!!(u==="\\"||e.includes("$")&&ju(e,t)||Jr(e,t)||qd(e,t)||u==="_"||n==="_"||u&&n&&gt(u)&&gt(n)),Hd=e=>{let t=0,u=!1,n=e.length;for(let s=0;s<n;s+=1){if(e[s]==="`"&&s+2<n&&e[s+1]==="`"&&e[s+2]==="`"){u=!u,s+=2;continue}if(u||e[s]!=="_")continue;let r=s>0?e[s-1]:"",o=s<n-1?e[s+1]:"";jd(e,s,r,o)||(t+=1)}return t},Vd=e=>{let t=0,u=0,n=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){u>=3&&(t+=Math.floor(u/3)),u=0,n=!n,s+=2;continue}n||(e[s]==="*"?u+=1:(u>=3&&(t+=Math.floor(u/3)),u=0))}return u>=3&&(t+=Math.floor(u/3)),t},Bn=e=>{let t=0,u=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){u=!u,n+=2;continue}u||e[n]==="*"&&n+1<e.length&&e[n+1]==="*"&&(t+=1,n+=1)}return t},Ys=e=>{let t=0,u=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){u=!u,n+=2;continue}u||e[n]==="_"&&n+1<e.length&&e[n+1]==="_"&&(t+=1,n+=1)}return t},Wd=(e,t,u)=>{if(!t||$t.test(t))return!0;let n=e.substring(0,u).lastIndexOf(`
236
+ `),s=n===-1?0:n+1,r=e.substring(s,u);return Yr.test(r)&&t.includes(`
237
+ `)?!0:Pn(e,u,"*")},Gd=e=>{let t=e.match(Dd);if(!t)return e;let u=t[2],n=e.lastIndexOf(t[1]);return Fe(e,n)||mt(e,n)||Wd(e,u,n)?e:Bn(e)%2===1?u.endsWith("*")?`${e}*`:`${e}**`:e},Kd=(e,t,u)=>{if(!t||$t.test(t))return!0;let n=e.substring(0,u).lastIndexOf(`
238
+ `),s=n===-1?0:n+1,r=e.substring(s,u);return Yr.test(r)&&t.includes(`
239
+ `)?!0:Pn(e,u,"_")},Zd=e=>{let t=e.match(Td);if(!t){let s=e.match(Ld);if(s){let r=e.lastIndexOf(s[1]);if(!(Fe(e,r)||mt(e,r))&&Ys(e)%2===1)return`${e}_`}return e}let u=t[2],n=e.lastIndexOf(t[1]);return Fe(e,n)||mt(e,n)||Kd(e,u,n)?e:Ys(e)%2===1?`${e}__`:e},Yd=e=>{let t=!1;for(let u=0;u<e.length;u+=1){if(e[u]==="`"&&u+2<e.length&&e[u+1]==="`"&&e[u+2]==="`"){t=!t,u+=2;continue}if(!t&&e[u]==="*"&&e[u-1]!=="*"&&e[u+1]!=="*"&&e[u-1]!=="\\"&&!ju(e,u)){let n=u>0?e[u-1]:"",s=u<e.length-1?e[u+1]:"";if((!n||n===" "||n===" "||n===`
240
+ `)&&(!s||s===" "||s===" "||s===`
241
+ `)||n&&s&&gt(n)&&gt(s))continue;return u}}return-1},Xd=e=>{if(!e.match(Fd))return e;let t=Yd(e);if(t===-1||Fe(e,t)||mt(e,t))return e;let u=e.substring(t+1);return!u||$t.test(u)?e:Qr(e)%2===1?`${e}*`:e},ea=e=>{let t=!1;for(let u=0;u<e.length;u+=1){if(e[u]==="`"&&u+2<e.length&&e[u+1]==="`"&&e[u+2]==="`"){t=!t,u+=2;continue}if(!t&&e[u]==="_"&&e[u-1]!=="_"&&e[u+1]!=="_"&&e[u-1]!=="\\"&&!ju(e,u)&&!Jr(e,u)){let n=u>0?e[u-1]:"",s=u<e.length-1?e[u+1]:"";if(n&&s&&gt(n)&&gt(s))continue;return u}}return-1},Jd=e=>{let t=e.length;for(;t>0&&e[t-1]===`
242
+ `;)t-=1;if(t<e.length){let u=e.slice(0,t),n=e.slice(t);return`${u}_${n}`}return`${e}_`},Qd=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Bn(t)%2!==1)return null;let u=t.indexOf("**"),n=ea(t);return u!==-1&&n!==-1&&u<n?`${t}_**`:null},ef=e=>{if(!e.match($d))return e;let t=ea(e);if(t===-1)return e;let u=e.substring(t+1);if(!u||$t.test(u)||Fe(e,t)||mt(e,t))return e;if(Hd(e)%2===1){let n=Qd(e);return n!==null?n:Jd(e)}return e},tf=e=>{let t=Bn(e),u=Qr(e);return t%2===0&&u%2===0},uf=(e,t,u)=>!t||$t.test(t)||Fe(e,u)||mt(e,u)?!0:Pn(e,u,"*"),nf=e=>{if(zd.test(e))return e;let t=e.match(Sd);if(!t)return e;let u=t[2],n=e.lastIndexOf(t[1]);return uf(e,u,n)?e:Vd(e)%2===1?tf(e)?e:`${e}***`:e},sf=/<[a-zA-Z/][^>]*$/,rf=e=>{let t=e.match(sf);return!t||t.index===void 0||Fe(e,t.index)?e:e.substring(0,t.index).trimEnd()},af=e=>!e.match(Rd)||e.includes(`
243
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,of=e=>(e.match(/```/g)||[]).length%2===1,lf=e=>{let t=af(e);if(t!==null)return t;let u=e.match(Id);if(u&&!of(e)){let n=u[2];if(!n||$t.test(n))return e;if(Ed(e)%2===1)return`${e}\``}return e},ta=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",cf=e=>{let t=0,u=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!ta(e,n)&&(u=!u),!u&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},df=e=>{let t=0,u=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}if(e[n]==="`"&&!ta(e,n)){u=!u;continue}!u&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:t+=1)}return t},ff=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
244
+ `,t)!==-1&&!e.endsWith(`
245
+ `)?`${e}
246
+ $$`:`${e}$$`},pf=e=>cf(e)%2===0?e:ff(e),hf=e=>df(e)%2===1?`${e}$`:e,bf=(e,t,u)=>{if(e.substring(t+2).includes(")"))return null;let n=Pd(e,t);if(n===-1||Fe(e,n))return null;let s=n>0&&e[n-1]==="!",r=s?n-1:n,o=e.substring(0,r);if(s)return o;let a=e.substring(n+1,t);return u==="text-only"?`${o}${a}`:`${o}[${a}](streamdown:incomplete-link)`},Xs=(e,t)=>{for(let u=0;u<t;u++)if(e[u]==="["&&!Fe(e,u)){if(u>0&&e[u-1]==="!")continue;let n=Xr(e,u);if(n===-1)return u;if(n+1<e.length&&e[n+1]==="("){let s=e.indexOf(")",n+2);s!==-1&&(u=s)}}return t},mf=(e,t,u)=>{let n=t>0&&e[t-1]==="!",s=n?t-1:t;if(!e.substring(t+1).includes("]")){let r=e.substring(0,s);if(n)return r;if(u==="text-only"){let o=Xs(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}if(Xr(e,t)===-1){let r=e.substring(0,s);if(n)return r;if(u==="text-only"){let o=Xs(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}return null},ua=(e,t="protocol")=>{let u=e.lastIndexOf("](");if(u!==-1&&!Fe(e,u)){let n=bf(e,u,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!Fe(e,n)){let s=mf(e,n,t);if(s!==null)return s}return e},gf=/^-{1,2}$/,xf=/^[\s]*-{1,2}[\s]+$/,vf=/^={1,2}$/,yf=/^[\s]*={1,2}[\s]+$/,kf=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
247
+ `);if(t===-1)return e;let u=e.substring(t+1),n=e.substring(0,t),s=u.trim();if(gf.test(s)&&!u.match(xf)){let r=n.split(`
248
+ `).at(-1);if(r&&r.trim().length>0)return`${e}​`}if(vf.test(s)&&!u.match(yf)){let r=n.split(`
249
+ `).at(-1);if(r&&r.trim().length>0)return`${e}​`}return e},_f=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),wf=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(_f,(t,u)=>Fe(e,u)?t:"\\~"),Ef=e=>{var t,u;let n=e.match(Md);if(n){let s=n[2];if(!s||$t.test(s))return e;let r=e.lastIndexOf(n[1]);if(Fe(e,r)||mt(e,r))return e;if(((t=e.match(Zs))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(Nd);if(s){let r=e.lastIndexOf(s[0].slice(0,2));if(Fe(e,r)||mt(e,r))return e;if(((u=e.match(Zs))==null?void 0:u.length)%2===1)return`${e}~`}}return e},kn=e=>e!==!1,Af=e=>e===!0,Ce={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},Cf=[{handler:{name:"singleTilde",handle:wf,priority:Ce.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Cd,priority:Ce.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:rf,priority:Ce.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:kf,priority:Ce.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:ua,priority:Ce.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:nf,priority:Ce.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Gd,priority:Ce.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Zd,priority:Ce.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Xd,priority:Ce.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:ef,priority:Ce.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:lf,priority:Ce.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Ef,priority:Ce.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:pf,priority:Ce.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:hf,priority:Ce.INLINE_KATEX},optionKey:"inlineKatex"}],Df=e=>{var t;let u=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return Cf.filter(({handler:n,optionKey:s})=>n.name==="links"?kn(e==null?void 0:e.links)||kn(e==null?void 0:e.images):n.name==="inlineKatex"?Af(e==null?void 0:e.inlineKatex):kn(e==null?void 0:e[s])).map(({handler:n,earlyReturn:s})=>n.name==="links"?{handler:Zr(Kr({},n),{handle:r=>ua(r,u)}),earlyReturn:u==="protocol"?s:void 0}:{handler:n,earlyReturn:s})},Tf=(e,t)=>{var u;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=Df(t),r=((u=t==null?void 0:t.handlers)!=null?u:[]).map(a=>{var i;return{handler:Zr(Kr({},a),{priority:(i=a.priority)!=null?i:Ce.DEFAULT}),earlyReturn:void 0}}),o=[...s,...r].sort((a,i)=>{var l,c;return((l=a.handler.priority)!=null?l:0)-((c=i.handler.priority)!=null?c:0)});for(let{handler:a,earlyReturn:i}of o)if(n=a.handle(n),i!=null&&i(n))return n;return n},Sf=Tf;function ru(e){return e.trim().startsWith("|")}function Ff(e){return/^(?: {4,}|\t)/.test(e)}function na(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function Js(e){if(!ru(e))return!1;const t=na(e);return t.length===0?!1:t.every(u=>/^\s*:?-+:?\s*$/.test(u))}function $f(e){return"| "+Array(e).fill("---").join(" | ")+" |"}function If(e){if(e==="")return"";const t=e.split(`
250
+ `),u=[];let n=!1;for(let s=0;s<t.length;s++){const r=t[s];if(/^\s*(```|~~~)/.test(r)){n=!n,u.push(r);continue}if(n){u.push(r);continue}const o=u.length>0?u[u.length-1]:null,a=o!==null&&ru(o);if(ru(r)&&!Ff(r)&&!a&&!Js(r)){const i=s+1<t.length?t[s+1]:null;if(i!==null&&ru(i)&&Js(i)){u.length>0&&u[u.length-1].trim()!==""&&u.push(""),u.push(r);continue}if(i!==null&&ru(i)){u.length>0&&u[u.length-1].trim()!==""&&u.push(""),u.push(r),u.push($f(na(r).length));continue}u.push(r);continue}u.push(r)}return u.join(`
251
+ `)}const qn=new Ne({html:!1,linkify:!0,breaks:!0});qn.renderer.rules.table_open=()=>'<div class="md-table-wrap"><table>';qn.renderer.rules.table_close=()=>"</table></div>";Gr.addHook("afterSanitizeAttributes",e=>{e.nodeName==="A"&&e.hasAttribute("href")&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer nofollow"))});function Mf(e,t={}){const u=t.streaming?Sf(e):e,n=If(u),s=qn.render(n);return Gr.sanitize(s)}const Of=["innerHTML"],sa=ae({__name:"StreamMarkdown",props:{text:{},streaming:{type:Boolean}},setup(e){const t=e,u=K(()=>Mf(t.text,{streaming:t.streaming}));return(n,s)=>(d(),y("div",{class:"stream-md text-sm",innerHTML:u.value},null,8,Of))}}),qt=ae({__name:"ExpandableBlock",props:{maxPx:{default:200}},setup(e){const t=e,u=C(!1),n=C(!1),s=C(null);let r=null;function o(){const a=s.value;a&&(n.value=a.scrollHeight>t.maxPx+8)}return ht(()=>{st(o),typeof ResizeObserver<"u"&&s.value&&(r=new ResizeObserver(()=>o()),r.observe(s.value))}),Ou(()=>r==null?void 0:r.disconnect()),he(u,()=>{u.value||st(o)}),(a,i)=>(d(),y("div",null,[b("div",{ref_key:"inner",ref:s,"data-test":"clamp-inner",class:W(!u.value&&n.value?"overflow-hidden":""),style:Tn(!u.value&&n.value?{maxHeight:e.maxPx+"px"}:void 0)},[Ta(a.$slots,"default")],6),n.value?(d(),y("button",{key:0,type:"button","data-test":"expand-toggle",class:"mt-1 inline-flex items-center gap-1 text-[10.5px] font-medium text-accent hover:underline",onClick:i[0]||(i[0]=l=>u.value=!u.value)},[(d(),q(Dt(u.value?v(Oa):v(Xe)),{size:12})),oe(" "+S(u.value?"Show less":"Show more"),1)])):I("",!0)]))}}),Rf={class:"mt-1 space-y-1 text-xs"},zf={class:"flex min-w-0 items-center gap-2 font-mono text-fg-muted"},Lf={class:"inline-flex min-w-0 items-center gap-1"},Nf={class:"truncate"},Pf={"data-test":"diff-stats",class:"ml-auto flex shrink-0 items-center gap-2 font-mono text-[10px]"},Bf={key:0,class:"text-run"},qf={key:1,class:"text-danger"},Uf={class:"overflow-x-auto rounded bg-bg p-2 font-mono"},jf={"data-test":"cmd-command",class:"break-all font-mono text-fg"},Hf={"data-test":"cmd-output",class:"overflow-x-auto rounded bg-raised p-2 font-mono text-fg whitespace-pre-wrap"},Vf={key:1,class:"text-fg-muted"},Wf={"data-test":"read-path",class:"flex min-w-0 items-center gap-1 font-mono text-fg"},Gf={class:"truncate"},Kf={key:0,class:"ml-2 shrink-0 text-fg-muted"},Zf={class:"overflow-x-auto rounded bg-bg p-2 font-mono text-fg-muted whitespace-pre-wrap"},Yf={"data-test":"search-query",class:"flex min-w-0 items-center gap-1 font-mono text-fg"},Xf={class:"truncate"},Jf={"data-test":"search-output",class:"overflow-x-auto rounded bg-bg p-2 font-mono text-fg-muted whitespace-pre-wrap"},Qf={class:"grid grid-cols-[auto,1fr] gap-x-3 gap-y-1"},e1={class:"text-fg-muted"},t1=["data-test"],u1={class:"overflow-x-auto rounded bg-bg p-2 font-mono text-fg-muted whitespace-pre-wrap"},n1={"data-test":"tool-text",class:"whitespace-pre-wrap text-fg-muted"},ra=ae({__name:"ToolDetail",props:{detail:{}},setup(e){const t=e,u=K(()=>t.detail.type!=="diff"?{del:[],add:[]}:{del:t.detail.oldText.split(`
252
+ `),add:t.detail.newText.split(`
253
+ `)}),n=K(()=>({add:u.value.add.filter(s=>s.length>0).length,del:u.value.del.filter(s=>s.length>0).length}));return(s,r)=>(d(),y("div",Rf,[e.detail.type==="diff"?(d(),y(G,{key:0},[b("div",zf,[b("span",Lf,[L(v(Fu),{size:14,class:"shrink-0"}),b("span",Nf,S(e.detail.path),1)]),b("span",Pf,[n.value.add?(d(),y("span",Bf,"+"+S(n.value.add),1)):I("",!0),n.value.del?(d(),y("span",qf,"−"+S(n.value.del),1)):I("",!0)])]),L(qt,null,{default:ct(()=>[b("div",Uf,[(d(!0),y(G,null,re(u.value.del,(o,a)=>(d(),y("div",{key:"d"+a,"data-test":"diff-del",class:"whitespace-pre text-danger"},"- "+S(o),1))),128)),(d(!0),y(G,null,re(u.value.add,(o,a)=>(d(),y("div",{key:"a"+a,"data-test":"diff-add",class:"whitespace-pre text-run"},"+ "+S(o),1))),128))])]),_:1})],64)):e.detail.type==="command"?(d(),y(G,{key:1},[b("div",jf,"$ "+S(e.detail.command),1),e.detail.output?(d(),q(qt,{key:0},{default:ct(()=>[b("pre",Hf,S(e.detail.output),1)]),_:1})):I("",!0),e.detail.exitCode!==void 0?(d(),y("div",Vf,"exit "+S(e.detail.exitCode),1)):I("",!0)],64)):e.detail.type==="read"?(d(),y(G,{key:2},[b("div",Wf,[L(v(Fu),{size:14,class:"shrink-0"}),b("span",Gf,S(e.detail.path),1),e.detail.lines?(d(),y("span",Kf,S(e.detail.lines),1)):I("",!0)]),e.detail.preview?(d(),q(qt,{key:0},{default:ct(()=>[b("pre",Zf,S(e.detail.preview),1)]),_:1})):I("",!0)],64)):e.detail.type==="search"?(d(),y(G,{key:3},[b("div",Yf,[L(v(Ru),{size:14,class:"shrink-0"}),b("span",Xf,S(e.detail.query),1)]),e.detail.output?(d(),q(qt,{key:0},{default:ct(()=>[b("pre",Jf,S(e.detail.output),1)]),_:1})):I("",!0)],64)):e.detail.type==="fields"?(d(),y(G,{key:4},[b("dl",Qf,[(d(!0),y(G,null,re(e.detail.fields,o=>(d(),y(G,{key:o.label},[b("dt",e1,S(o.label),1),b("dd",{"data-test":"field-"+o.label,class:"font-mono text-fg break-all"},S(o.value),9,t1)],64))),128))]),e.detail.output?(d(),q(qt,{key:0},{default:ct(()=>[b("pre",u1,S(e.detail.output),1)]),_:1})):I("",!0)],64)):e.detail.type==="text"?(d(),q(qt,{key:5},{default:ct(()=>[b("p",n1,S(e.detail.text),1)]),_:1})):I("",!0)]))}}),s1=ae({__name:"FueDot",props:{pulsing:{type:Boolean,default:!0}},setup(e){return(t,u)=>(d(),y("span",{"data-test":"fue-dot",class:W(["inline-block h-2 w-2 rounded-full bg-accent",e.pulsing?"animate-pulse motion-reduce:animate-none":""]),"aria-hidden":"true"},null,2))}}),Ut=8;function r1(e,t,u,n=Ut){const s=e.top+e.height+n,r=e.top-t.height-n,o=u.height-(e.top+e.height),a=e.top,c=s+t.height>u.height-Ut&&a>o?"above":"below",f=c==="above"?Math.max(Ut,r):s,k=e.left+e.width/2-t.width/2,m=Math.max(Ut,u.width-t.width-Ut),h=Math.min(Math.max(Ut,k),m);return{top:f,left:h,placement:c}}const a1={class:"flex items-center gap-2 font-medium text-fg"},o1={class:"mt-1 text-xs text-fg-muted"},i1={class:"mt-2 flex justify-end"},l1=ae({__name:"FueCallout",props:{title:{},body:{},anchor:{}},emits:["dismiss"],setup(e,{emit:t}){const u=e,n=t,s=C(null),r=C({visibility:"hidden"});function o(){const i=s.value;if(!i)return;const l={width:i.offsetWidth||256,height:i.offsetHeight||96},c={width:window.innerWidth,height:window.innerHeight};if(u.anchor){const f=r1(u.anchor,l,c);r.value={top:`${f.top}px`,left:`${f.left}px`,visibility:"visible"}}else r.value={top:`${Math.max(8,c.height/2-l.height/2)}px`,left:`${Math.max(8,c.width/2-l.width/2)}px`,visibility:"visible"}}function a(i){i.key==="Escape"&&n("dismiss")}return ht(()=>{o(),window.addEventListener("keydown",a),window.addEventListener("resize",o)}),Ou(()=>{window.removeEventListener("keydown",a),window.removeEventListener("resize",o)}),(i,l)=>(d(),q(ar,{to:"body"},[b("div",{ref_key:"card",ref:s,"data-test":"fue-callout",class:"fixed z-50 w-64 rounded-lg border border-border bg-raised p-3 text-sm shadow-lg",style:Tn(r.value),role:"dialog"},[b("p",a1,[l[1]||(l[1]=b("span",{class:"inline-block h-2 w-2 rounded-full bg-accent","aria-hidden":"true"},null,-1)),oe(" "+S(e.title),1)]),b("p",o1,S(e.body),1),b("div",i1,[b("button",{"data-test":"fue-dismiss",type:"button",class:"rounded bg-accent px-2 py-1 text-xs font-medium text-white hover:bg-accent-hover",onClick:l[0]||(l[0]=c=>n("dismiss"))}," Got it ")])],4)]))}}),aa="xacpx.fue.v1.";function c1(e){try{return localStorage.getItem(aa+e)==="1"}catch{return!1}}function d1(e){try{localStorage.setItem(aa+e,"1")}catch{}}function f1(e){const t=C(c1(e)?"acknowledged":"unseen");function u(){t.value==="unseen"&&(t.value="engaging")}function n(){t.value="acknowledged",d1(e)}return{status:t,engage:u,dismiss:n}}const Un={read:Ma,search:Ru,execute:eo,edit:Ga,think:Fn,other:fr},p1={running:St,success:Zt,error:rt},h1=["read","search","execute","edit","think","other"],b1=["running","success","error"],Qs=5;function m1(e){const t=new Map,u=new Map;for(const n of e)t.set(n.kind,(t.get(n.kind)??0)+1),u.set(n.status,(u.get(n.status)??0)+1);return{kinds:h1.filter(n=>t.has(n)).map(n=>({icon:Un[n],count:t.get(n),label:n})),statuses:b1.filter(n=>u.has(n)).map(n=>({icon:p1[n],count:u.get(n),label:n}))}}const g1={class:"overflow-hidden rounded-lg border border-border bg-surface text-xs shadow-e1"},x1={class:"inline-flex items-center gap-1.5 text-[11.5px] font-semibold text-fg-muted"},v1={key:3,"data-test":"tool-count",class:"font-mono text-[10.5px] text-fg-muted"},y1={"data-test":"tool-summary",class:"ml-1 flex items-center gap-1.5 text-[10.5px] text-fg-muted"},k1=["data-test"],_1={class:"tabular-nums"},w1={key:0,class:"text-fg-muted"},E1=["data-test"],A1={class:"tabular-nums"},C1={key:1,class:"space-y-1 border-t border-border px-3 pb-2.5 pt-2"},D1=["onClick"],T1={class:"truncate font-mono text-[11px] text-fg"},S1={key:0,class:"ml-auto font-mono text-[10.5px] text-fg-muted"},F1={key:0,class:"px-2 pb-2 pt-1"},$1=ae({__name:"ToolCallPanel",props:{steps:{}},setup(e){const t=e,u=C(t.steps.length<=Qs),n=C(new Set);function s(m){n.value.has(m)?n.value.delete(m):n.value.add(m),n.value=new Set(n.value)}const r=K(()=>m1(t.steps)),o=f1("tool-group-collapse"),a=K(()=>t.steps.length>Qs),i=K(()=>a.value&&o.status.value!=="acknowledged"),l=C(null),c=C(null);function f(){var m;if(u.value=!u.value,i.value){const h=(m=l.value)==null?void 0:m.getBoundingClientRect();h&&(c.value={top:h.top,left:h.left,width:h.width,height:h.height}),o.engage()}}function k(m){return m===void 0?"":m>=1e3?`${(m/1e3).toFixed(1)}s`:`${m}ms`}return(m,h)=>(d(),y("div",g1,[b("button",{ref_key:"header",ref:l,type:"button",class:"flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-bg",onClick:f},[u.value?(d(),q(v(Xe),{key:0,size:13,class:"text-fg-muted"})):(d(),q(v(Tt),{key:1,size:13,class:"text-fg-muted"})),b("span",x1,[L(v(fr),{size:13}),h[1]||(h[1]=oe(" Tool steps",-1))]),i.value?(d(),q(s1,{key:2,pulsing:v(o).status.value==="unseen"},null,8,["pulsing"])):(d(),y("span",v1,S(e.steps.length),1)),b("span",y1,[(d(!0),y(G,null,re(r.value.kinds,x=>(d(),y("span",{key:"k"+x.label,"data-test":"sum-"+x.label,class:"inline-flex items-center gap-0.5"},[(d(),q(Dt(x.icon),{size:11})),b("span",_1,S(x.count),1)],8,k1))),128)),r.value.statuses.length?(d(),y("span",w1,"·")):I("",!0),(d(!0),y(G,null,re(r.value.statuses,x=>(d(),y("span",{key:"s"+x.label,"data-test":"sum-"+x.label,class:W(["inline-flex items-center gap-0.5",x.label==="success"?"text-run":x.label==="error"?"text-danger":"text-fg-muted"])},[(d(),q(Dt(x.icon),{size:11,class:W(x.label==="running"?"animate-spin motion-reduce:animate-none":"")},null,8,["class"])),b("span",A1,S(x.count),1)],10,E1))),128))])],512),v(o).status.value==="engaging"?(d(),q(l1,{key:0,title:"Tool steps collapsed",body:"Multi-step tool runs are collapsed by default to keep replies readable. Click the header to expand and inspect each step.",anchor:c.value,onDismiss:h[0]||(h[0]=x=>v(o).dismiss())},null,8,["anchor"])):I("",!0),u.value?(d(),y("ul",C1,[(d(!0),y(G,null,re(e.steps,x=>(d(),y("li",{key:x.toolCallId},[b("button",{type:"button","data-test":"tool-row",class:"flex w-full items-center gap-2 rounded text-left text-[12px] hover:bg-fg/5",onClick:g=>s(x.toolCallId)},[b("span",{class:W(["grid h-4 w-4 shrink-0 place-items-center rounded-full",x.status==="success"?"bg-run/15":x.status==="running"?"bg-accent/15":"bg-danger/15"])},[x.status==="success"?(d(),q(v(Zt),{key:0,"data-test":"step-status-success",size:9,class:"text-run"})):x.status==="running"?(d(),q(v(St),{key:1,"data-test":"step-status-running",size:9,class:"animate-spin motion-reduce:animate-none text-accent"})):(d(),q(v(au),{key:2,"data-test":"step-status-error",size:9,class:"text-danger"}))],2),(d(),q(Dt(v(Un)[x.kind]),{size:12,class:"shrink-0 text-fg-muted"})),b("span",T1,S(x.title),1),x.durationMs!==void 0?(d(),y("span",S1,S(k(x.durationMs)),1)):I("",!0)],8,D1),n.value.has(x.toolCallId)&&x.detail?(d(),y("div",F1,[L(ra,{detail:x.detail},null,8,["detail"])])):I("",!0)]))),128))])):I("",!0)]))}}),I1={class:"overflow-hidden rounded-lg border border-border bg-surface text-xs shadow-e1"},M1={key:2,"data-test":"reasoning-shimmer",class:"ml-1 inline-block h-1.5 w-1.5 animate-pulse motion-reduce:animate-none rounded-full bg-fg-muted","aria-hidden":"true"},O1={key:0,"data-test":"reasoning-body",class:"whitespace-pre-wrap border-t border-border px-3 pb-2.5 pt-2 text-[12px] leading-relaxed text-fg-muted"},oa=ae({__name:"ReasoningPanel",props:{reasoning:{},defaultOpen:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){const u=C(e.defaultOpen??!1),n=K(()=>u.value);return(s,r)=>(d(),y("div",I1,[b("button",{type:"button",class:"flex w-full items-center gap-1.5 px-3 py-2 text-left text-fg-muted",onClick:r[0]||(r[0]=o=>u.value=!u.value)},[n.value?(d(),q(v(Xe),{key:0,size:13})):(d(),q(v(Tt),{key:1,size:13})),L(v(Fn),{size:13,class:W(e.streaming?"text-accent":"")},null,8,["class"]),b("span",{class:W(["text-[12px] font-medium",e.streaming?"shimmer-text":""])},S(e.streaming?"Reasoning…":"Reasoning"),3),e.streaming?(d(),y("span",M1)):I("",!0)]),n.value?(d(),y("p",O1,S(e.reasoning),1)):I("",!0)]))}}),R1={class:"truncate font-mono text-[11.5px] text-fg"},z1={class:"ml-auto flex shrink-0 items-center gap-2"},L1={key:0,class:"font-mono text-[10.5px] text-fg-muted"},N1={key:0,class:"border-t border-border px-3 pb-2.5 pt-2"},P1={key:0,"data-test":"tool-step-error",class:"mb-1.5 flex items-start gap-1.5 rounded bg-danger/10 px-2 py-1.5 text-danger"},B1={class:"whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed"},q1=ae({__name:"ToolStepCard",props:{step:{}},setup(e){const t=C(!0);function u(n){return n===void 0?"":n>=1e3?`${(n/1e3).toFixed(1)}s`:`${n}ms`}return(n,s)=>(d(),y("div",{"data-test":"tool-step-card",class:W(["overflow-hidden rounded-lg border bg-surface text-xs shadow-e1",e.step.status==="error"?"border-danger/40":"border-border"])},[b("button",{type:"button","data-test":"tool-step-header",class:"flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-bg",onClick:s[0]||(s[0]=r=>t.value=!t.value)},[t.value?(d(),q(v(Xe),{key:0,size:13,class:"text-fg-muted"})):(d(),q(v(Tt),{key:1,size:13,class:"text-fg-muted"})),(d(),q(Dt(v(Un)[e.step.kind]),{size:13,class:"shrink-0 text-fg-muted"})),b("span",R1,S(e.step.title),1),b("span",z1,[e.step.durationMs!==void 0?(d(),y("span",L1,S(u(e.step.durationMs)),1)):I("",!0),e.step.status==="success"?(d(),q(v(Zt),{key:1,"data-test":"step-status-success",size:13,class:"text-run"})):e.step.status==="running"?(d(),q(v(St),{key:2,"data-test":"step-status-running",size:13,class:"animate-spin motion-reduce:animate-none text-accent"})):(d(),q(v(au),{key:3,"data-test":"step-status-error",size:13,class:"text-danger"}))])]),t.value?(d(),y("div",N1,[e.step.status==="error"&&e.step.error?(d(),y("div",P1,[L(v(au),{size:13,class:"mt-0.5 shrink-0"}),b("span",B1,S(e.step.error),1)])):I("",!0),e.step.detail?(d(),q(ra,{key:1,detail:e.step.detail},null,8,["detail"])):I("",!0)])):I("",!0)],2))}}),U1={class:"space-y-2.5"},er=ae({__name:"TurnParts",props:{parts:{},streaming:{type:Boolean}},setup(e){const t=e,u=n=>t.streaming===!0&&n===t.parts.length-1;return(n,s)=>(d(),y("div",U1,[(d(!0),y(G,null,re(e.parts,(r,o)=>(d(),y(G,{key:o},[r.type==="reasoning"?(d(),q(oa,{key:0,reasoning:r.text,streaming:u(o),"default-open":!1},null,8,["reasoning","streaming"])):r.type==="tool"?(d(),q(q1,{key:1,step:r.step},null,8,["step"])):(d(),q(sa,{key:2,text:r.text,streaming:u(o),class:W(["text-[14px] leading-relaxed text-fg",u(o)?"caret":""])},null,8,["text","streaming","class"]))],64))),128))]))}}),j1=["title"],ia=ae({__name:"CopyButton",props:{text:{}},setup(e){const t=e,u=C(!1);let n=null;async function s(){try{await navigator.clipboard.writeText(t.text)}catch{const r=document.createElement("textarea");r.value=t.text,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select();try{document.execCommand("copy")}catch{}document.body.removeChild(r)}u.value=!0,n&&clearTimeout(n),n=setTimeout(()=>u.value=!1,1200)}return(r,o)=>(d(),y("button",{"data-test":"copy-button",type:"button","aria-label":"Copy",title:u.value?"Copied":"Copy",class:"rounded p-1 leading-none text-fg-muted hover:bg-fg/5 hover:text-fg",onClick:Ye(s,["stop"])},[u.value?(d(),q(v(Zt),{key:0,size:14,class:"text-run"})):(d(),q(v(Na),{key:1,size:14}))],8,j1))}}),H1={class:"relative flex-1 overflow-hidden"},V1={class:"mx-auto max-w-3xl space-y-5"},W1={key:0,"data-test":"loading-older",class:"flex justify-center py-1 text-[11px] text-fg-muted"},G1=["data-scheduled-task"],K1={class:"flex max-w-[80%] flex-col items-end"},Z1=["title"],Y1={class:"whitespace-pre-wrap text-[14px] leading-relaxed text-fg"},X1={key:1,class:"mt-1 flex items-center gap-2"},J1=["onClick"],Q1={key:1,class:"cv-row group flex gap-2.5"},ep={class:"mt-0.5 grid h-6 w-6 shrink-0 place-items-center rounded-lg border border-border bg-surface"},tp={"data-test":"msg-actions",class:"flex items-center gap-1.5 pt-0.5 text-fg-muted"},up={key:1,"data-test":"msg-time",class:"font-mono text-[10.5px] tabular-nums"},np={key:2,"data-test":"msg-cancelled",class:"inline-flex items-center gap-1 text-[11px] text-warn"},sp={key:3,"data-test":"msg-failed",class:"text-[11px] text-danger"},rp={key:1,class:"flex gap-2.5"},ap={class:"mt-0.5 grid h-6 w-6 shrink-0 place-items-center rounded-lg border border-border bg-surface"},op={"data-test":"msg-streaming",class:"min-w-0 flex-1"},ip=48,lp=240,cp=ae({__name:"MessageList",props:{messages:{},liveTurn:{},hasMoreOlder:{type:Boolean},loadingOlder:{type:Boolean},sessionKey:{},scrollToScheduled:{}},emits:["resend","loadOlder"],setup(e,{emit:t}){const u=e,n=t;function s(k){var m;return k.scheduled??((m=k.structured)==null?void 0:m.scheduled)}const r=C(null),o=C(!0);let a=null;function i(){const k=r.value;k&&(o.value=k.scrollHeight-k.scrollTop-k.clientHeight<=ip,k.scrollTop<=lp&&u.hasMoreOlder&&!u.loadingOlder&&a===null&&(a=k.scrollHeight-k.scrollTop,n("loadOlder")))}he(()=>u.loadingOlder,(k,m)=>{if(!(m&&!k)||a===null)return;const h=a;a=null,st(()=>{const x=r.value;x&&(x.scrollTop=x.scrollHeight-h)})});let l=0;function c(k=!1){const m=r.value;if(!m||(typeof m.scrollTo=="function"?m.scrollTo({top:m.scrollHeight,behavior:k?"smooth":"auto"}):m.scrollTop=m.scrollHeight,o.value=!0,k||typeof requestAnimationFrame!="function"))return;l&&cancelAnimationFrame(l);let h=0;const x=()=>{l=0;const g=r.value;g&&(g.scrollHeight-g.scrollTop-g.clientHeight>1&&(g.scrollTop=g.scrollHeight),++h<4&&(l=requestAnimationFrame(x)))};l=requestAnimationFrame(x)}he(()=>u.sessionKey,()=>{o.value=!0,a=null,st(()=>c(!1))}),he(()=>{var k;return(k=u.scrollToScheduled)==null?void 0:k.nonce},()=>{var m;const k=(m=u.scrollToScheduled)==null?void 0:m.taskId;k&&st(()=>{var x;const h=(x=r.value)==null?void 0:x.querySelector(`[data-scheduled-task="${k}"]`);h&&typeof h.scrollIntoView=="function"&&(h.scrollIntoView({behavior:"smooth",block:"center"}),o.value=!1)})}),he(()=>{const k=u.liveTurn,m=k==null?void 0:k.parts[k.parts.length-1],h=m?m.type==="tool"?m.step.status:m.text.length:0;return[u.messages.length,(k==null?void 0:k.parts.length)??0,h]},()=>{o.value&&st(()=>c(!1))});function f(k){if(!k)return"";const m=new Date(k);return Number.isNaN(m.getTime())?"":m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}return(k,m)=>(d(),y("div",H1,[b("div",{ref_key:"scroller",ref:r,"data-test":"msg-scroller",class:"thin-scroll h-full overflow-y-auto px-3 py-4 lg:px-5 lg:py-5",onScroll:i},[b("div",V1,[e.loadingOlder?(d(),y("div",W1,[L(v(St),{size:13,class:"animate-spin motion-reduce:animate-none"})])):I("",!0),(d(!0),y(G,null,re(e.messages,(h,x)=>{var g,_,E,F,D,M;return d(),y(G,{key:h.id!==void 0?`p${h.id}`:`o${h.createdAt}:${x}`},[h.direction==="in"?(d(),y("div",{key:0,class:"cv-row flex justify-end","data-scheduled-task":(g=s(h))==null?void 0:g.taskId},[b("div",K1,[s(h)?(d(),y("span",{key:0,"data-test":"msg-scheduled-badge",class:"mb-1 inline-flex items-center gap-1 rounded-full bg-accent/10 px-2 py-0.5 text-[10.5px] font-medium text-accent",title:`Scheduled for ${new Date(s(h).executeAt).toLocaleString()}`},[L(v(cr),{size:11}),m[1]||(m[1]=oe("Scheduled ",-1))],8,Z1)):I("",!0),b("div",{"data-test":"msg-in",class:W(["rounded-2xl rounded-tr-md border border-accent/15 bg-accent/10 px-3.5 py-2",h.failed?"ring-1 ring-danger":""])},[b("p",Y1,S(h.text),1)],2),h.failed?(d(),y("div",X1,[m[3]||(m[3]=b("span",{"data-test":"msg-failed",class:"text-xs text-danger"},"Failed to send",-1)),b("button",{type:"button","data-test":"msg-resend",class:"inline-flex items-center gap-1 text-xs font-medium text-accent hover:opacity-80",title:"Resend this message",onClick:A=>n("resend",h)},[L(v(Ya),{size:12}),m[2]||(m[2]=oe("Resend",-1))],8,J1)])):I("",!0)])],8,G1)):(d(),y("div",Q1,[b("div",ep,[L(v(_n),{size:13,class:"text-accent"})]),b("div",{"data-test":"msg-out",class:W(["min-w-0 flex-1 space-y-2.5",h.failed?"rounded-lg ring-1 ring-danger":""])},[(E=(_=h.structured)==null?void 0:_.parts)!=null&&E.length?(d(),q(er,{key:0,parts:h.structured.parts},null,8,["parts"])):(d(),y(G,{key:1},[(D=(F=h.structured)==null?void 0:F.toolSteps)!=null&&D.length?(d(),q($1,{key:0,steps:h.structured.toolSteps},null,8,["steps"])):I("",!0),(M=h.structured)!=null&&M.reasoning?(d(),q(oa,{key:1,reasoning:h.structured.reasoning,"default-open":!1},null,8,["reasoning"])):I("",!0),h.text?(d(),q(sa,{key:2,text:h.text,class:"text-[14px] leading-relaxed text-fg"},null,8,["text"])):I("",!0)],64)),b("div",tp,[h.text?(d(),q(ia,{key:0,text:h.text},null,8,["text"])):I("",!0),f(h.createdAt)?(d(),y("span",up,S(f(h.createdAt)),1)):I("",!0),h.status==="cancelled"?(d(),y("span",np,[L(v(Ra),{size:12}),m[4]||(m[4]=oe(" Stopped",-1))])):I("",!0),h.failed?(d(),y("span",sp,"failed")):I("",!0)])],2)]))],64)}),128)),e.liveTurn&&e.liveTurn.parts.length?(d(),y("div",rp,[b("div",ap,[L(v(_n),{size:13,class:"text-accent"})]),b("div",op,[L(er,{parts:e.liveTurn.parts,streaming:!0},null,8,["parts"])])])):I("",!0)])],544),Se(b("button",{"data-test":"jump-latest",type:"button",class:"absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full border border-border bg-raised px-3 py-1 text-xs text-fg-muted shadow hover:bg-fg/5",onClick:m[0]||(m[0]=h=>c(!0))}," ↓ Latest ",512),[[or,!o.value]])]))}}),dp=(e,t)=>{const u=e.__vccOpts||e;for(const[n,s]of t)u[n]=s;return u},fp=dp(cp,[["__scopeId","data-v-b30d2ff4"]]),la="xacpx.composer-drafts.v1";function ca(){try{const e=sessionStorage.getItem(la);return e?JSON.parse(e):{}}catch{return{}}}function pp(e){try{sessionStorage.setItem(la,JSON.stringify(e))}catch{}}function tr(e){return e?ca()[e]??"":""}function ur(e,t){if(!e)return;const u=ca();t?u[e]=t:delete u[e],pp(u)}const hp=xt("composer",()=>{const e=C(null);let t=0;function u(n,s){e.value={key:n,text:s,seq:++t}}return{insertRequest:e,requestInsert:u}}),bp=xt("session-controls",()=>{const e=C(void 0),t=C([]),u=C(!1),n=C("");function s(){e.value=void 0,t.value=[],n.value=""}async function r(a,i){if(!a||!i){s();return}u.value=!0,n.value="";try{const l=await ue.rpc(a,"control.session.model.get",{sessionAlias:i});if(Wt(l)){s();return}e.value=l.current,t.value=l.available}catch{s()}finally{u.value=!1}}async function o(a,i,l){n.value="";const c=e.value;e.value=l;try{const f=await ue.rpc(a,"control.session.model.set",{sessionAlias:i,modelId:l});return Wt(f)?(e.value=c,n.value=f.error.message,!1):!0}catch(f){return e.value=c,n.value=f instanceof Error?f.message:"set-failed",!1}}return{current:e,available:t,loading:u,error:n,reset:s,loadModel:r,setModel:o}}),mp={class:"rounded-lg border border-border bg-surface shadow-e2 focus-within:border-accent/50 transition-colors"},gp=["placeholder"],xp={class:"flex items-center justify-between px-2.5 pb-2.5 pt-0.5"},vp={key:0,class:"relative flex items-center gap-2"},yp=["disabled"],kp={class:"font-mono text-[11.5px] font-medium text-fg"},_p={key:0,"data-test":"model-menu",class:"absolute bottom-full left-0 z-10 mb-1 max-h-48 min-w-40 overflow-y-auto rounded-lg border border-border bg-raised shadow-lg"},wp=["onClick"],Ep={class:"font-mono"},Ap={key:1,"data-test":"model-error",class:"text-xs text-danger"},Cp={key:1},Dp=["disabled"],Tp=ae({__name:"PromptInput",props:{busy:{type:Boolean},draftKey:{},instanceId:{},sessionAlias:{}},emits:["send","cancel"],setup(e,{emit:t}){const u=e,n=t,s=hp(),r=bp(),o=C(!1);he(()=>[u.instanceId,u.sessionAlias],([g,_])=>{r.loadModel(g??null,_??null),o.value=!1},{immediate:!0});async function a(g){o.value=!1,u.instanceId&&u.sessionAlias&&await r.setModel(u.instanceId,u.sessionAlias,g)}const i=C(tr(u.draftKey??"")),l=C(null);he(i,g=>ur(u.draftKey??"",g)),he(()=>u.draftKey,(g,_)=>{_&&ur(_,i.value),i.value=tr(g??"")}),he(()=>s.insertRequest,g=>{!g||g.key!==(u.draftKey??"")||(i.value=i.value.trim()?`${i.value.trimEnd()} ${g.text}`:g.text,st(()=>{var _;return(_=l.value)==null?void 0:_.focus()}))});const c=C([]);let f=-1;function k(){if(u.busy)return;const g=i.value.trim();g&&(n("send",g),c.value[c.value.length-1]!==g&&c.value.push(g),f=-1,i.value="")}function m(g){if(c.value.length!==0){if(g===-1)f=f===-1?c.value.length-1:Math.max(0,f-1);else{if(f===-1)return;if(f=f+1,f>=c.value.length){f=-1,i.value="";return}}i.value=c.value[f]}}function h(g){var E,F;if(g.isComposing)return;if(g.key==="Escape"){u.busy&&(n("cancel"),g.preventDefault());return}if(g.key==="Enter"&&!g.shiftKey){k(),g.preventDefault();return}const _=(((E=l.value)==null?void 0:E.selectionStart)??0)===0&&(((F=l.value)==null?void 0:F.selectionEnd)??0)===0;if(g.key==="ArrowUp"&&_){m(-1),g.preventDefault();return}if(g.key==="ArrowDown"&&f!==-1&&_){m(1),g.preventDefault();return}}function x(){f=-1}return(g,_)=>(d(),y("form",{class:"relative border-t border-border px-0 py-3 lg:p-3",onSubmit:Ye(k,["prevent"])},[b("div",mp,[Se(b("textarea",{ref_key:"textarea",ref:l,"onUpdate:modelValue":_[0]||(_[0]=E=>i.value=E),rows:"2",class:"w-full resize-none bg-transparent px-3.5 pt-2.5 pb-1 text-[16px] lg:text-[14px] leading-relaxed text-fg placeholder:text-fg-muted focus:outline-none",placeholder:e.busy?"Agent is working… (Esc to stop)":"Message",onInput:x,onKeydown:h},null,40,gp),[[Le,i.value]]),b("div",xp,[e.instanceId&&e.sessionAlias?(d(),y("div",vp,[b("button",{type:"button","data-test":"model-chip",class:"flex items-center gap-1.5 px-1.5 py-1 rounded-md text-fg-muted hover:bg-raised transition-colors disabled:opacity-60",disabled:!v(r).available.length,onClick:_[1]||(_[1]=E=>o.value=!o.value)},[L(v(Fn),{size:14,class:"text-accent"}),b("span",kp,S(v(r).current||"model"),1),v(r).available.length?(d(),q(v(Xe),{key:0,size:13})):I("",!0)],8,yp),o.value&&v(r).available.length?(d(),y("ul",_p,[(d(!0),y(G,null,re(v(r).available,E=>(d(),y("li",{key:E},[b("button",{type:"button","data-test":"model-option",class:W(["flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",E===v(r).current?"bg-accent/10 text-accent":"hover:bg-fg/10 text-fg-muted"]),onClick:F=>a(E)},[b("span",Ep,S(E),1),E===v(r).current?(d(),q(v(Zt),{key:0,size:14,class:"ml-auto"})):I("",!0)],10,wp)]))),128))])):I("",!0),v(r).error?(d(),y("span",Ap,S(v(r).error),1)):I("",!0)])):(d(),y("span",Cp)),e.busy?(d(),y("button",{key:2,type:"button","data-test":"composer-stop",class:"flex items-center gap-1.5 pl-3 pr-2.5 py-1.5 rounded-md bg-danger text-white text-[12.5px] font-semibold hover:opacity-90 transition-all",onClick:_[2]||(_[2]=E=>n("cancel"))},"Stop")):(d(),y("button",{key:3,type:"submit","data-test":"composer-send",disabled:!i.value.trim(),class:"flex items-center gap-1.5 pl-3 pr-2.5 py-1.5 rounded-md bg-accent text-white text-[12.5px] font-semibold shadow-e1 hover:bg-accent-hover hover:shadow-e2 transition-all disabled:bg-fg/10 disabled:text-fg-muted disabled:shadow-none"},[_[3]||(_[3]=oe(" Send ",-1)),L(v(Xa),{size:14})],8,Dp))])])],32))}}),Sp={key:0,"data-test":"plan-panel",class:"rounded-md border border-border bg-surface p-2 text-sm"},Fp=["aria-expanded"],$p={class:"ml-auto font-mono tabular-nums"},Ip=["data-test"],Mp=ae({__name:"PlanPanel",props:{entries:{},active:{type:Boolean,default:void 0}},setup(e){const t=e,u=C(t.active??!0),n=C(null),s=K(()=>t.entries.filter(l=>l.status==="completed").length),r=K(()=>{let l=-1;return t.entries.forEach((c,f)=>{c.status==="in_progress"&&(l=f)}),l>=0?l:(t.entries.forEach((c,f)=>{c.status==="completed"&&(l=f)}),l>=0?l:t.entries.length-1)}),o=l=>l==="completed"?lr:l==="in_progress"?St:La,a=l=>l==="completed"?"text-run":l==="in_progress"?"text-accent":"text-fg-muted";async function i(){var f;if(!u.value)return;await st();const l=n.value;if(!l)return;const c=l.children[r.value];(f=c==null?void 0:c.scrollIntoView)==null||f.call(c,{block:"nearest"})}return he(()=>t.entries,i,{flush:"post"}),he(u,i),he(()=>t.active,l=>{l!==void 0&&(u.value=l)}),(l,c)=>e.entries.length?(d(),y("div",Sp,[b("button",{type:"button","data-test":"plan-toggle","aria-expanded":u.value,"aria-controls":"plan-list","aria-label":"Toggle plan",class:"mb-1 flex w-full items-center gap-1.5 text-xs font-semibold uppercase text-fg-muted hover:text-fg transition-colors",onClick:c[0]||(c[0]=f=>u.value=!u.value)},[u.value?(d(),q(v(Xe),{key:0,size:12,class:"shrink-0"})):(d(),q(v(Tt),{key:1,size:12,class:"shrink-0"})),c[1]||(c[1]=oe(" Plan ",-1)),b("span",$p,S(s.value)+"/"+S(e.entries.length),1)],8,Fp),Se(b("ul",{id:"plan-list",ref_key:"listEl",ref:n,class:"max-h-48 overflow-y-auto thin-scroll space-y-0.5"},[(d(!0),y(G,null,re(e.entries,(f,k)=>(d(),y("li",{key:k,"data-test":k===r.value?"plan-active":void 0,class:"flex items-start gap-1.5"},[(d(),q(Dt(o(f.status)),{size:13,class:W([a(f.status),"mt-0.5 shrink-0",f.status==="in_progress"?"animate-spin motion-reduce:animate-none":""])},null,8,["class"])),b("span",{class:W(["min-w-0",f.status==="completed"?"text-fg-muted line-through":"text-fg"])},S(f.content),3)],8,Ip))),128))],512),[[or,u.value]])])):I("",!0)}}),Op={class:"flex h-full flex-1 flex-col"},Rp={key:0,class:"flex flex-1 items-center justify-center text-fg-muted"},zp={class:"shrink-0 flex min-h-11 lg:h-11 items-center gap-2.5 border-b border-border bg-surface/60 px-3 lg:px-5 py-1.5 lg:py-0 backdrop-blur-md"},Lp={class:"hidden lg:block text-[14px] font-semibold tracking-tight text-fg"},Np={key:0,class:"flex flex-wrap items-center gap-1"},Pp={key:1,"data-test":"ctx-chip-instance",class:"flex items-center gap-1 rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted"},Bp={key:2,"data-test":"ctx-chip-agent",class:"flex items-center gap-1.5 rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted"},qp={key:0},Up={class:"text-warn"},jp={key:0,"data-test":"chat-error",class:"bg-danger/10 px-4 py-1 text-xs text-danger"},Hp={class:"shrink-0 space-y-2 bg-gradient-to-t from-bg to-transparent px-2 lg:px-5 pb-4 pt-1.5"},Vp={key:0,"data-test":"turn-hud",class:"flex items-center gap-2 rounded-lg border border-run/20 bg-run/8 px-3 py-1.5"},Wp={class:"text-[12px] font-semibold text-run"},Gp={class:"font-mono text-[12px] font-semibold tabular-nums text-run"},Kp={key:0,class:"text-[11.5px] text-fg-muted"},Zp=ae({__name:"ChatPane",emits:["show-files"],setup(e,{emit:t}){const u=t,n=Ft(),s=at(),r=Lu(),o=K(()=>n.instanceId?s.byId(n.instanceId):void 0),a=K(()=>{var h;return(h=o.value)==null?void 0:h.sessions.find(x=>x.alias===n.sessionAlias)});he(()=>{var h;return[n.instanceId,(h=a.value)==null?void 0:h.workspace]},([h,x])=>{h&&x?r.loadGitSummary(h,x):r.gitSummary=null},{immediate:!0});const i=C(Date.now()),l=setInterval(()=>{i.value=Date.now()},1e3);Sn(()=>clearInterval(l));const c=K(()=>{if(!n.liveTurn)return"";const h=Math.max(0,Math.floor((i.value-n.liveTurn.startedAt)/1e3));return`${Math.floor(h/60)}:${String(h%60).padStart(2,"0")}`}),f=K(()=>n.liveToolSteps.filter(h=>h.status==="running").length),k=["Working","Thinking","Pondering","Cogitating","Reasoning","Computing","Churning","Crunching","Percolating","Noodling","Mulling","Brewing","Processing","Deliberating","Ruminating","Synthesizing","Wrangling","Tinkering"],m=K(()=>{if(!n.liveTurn)return k[0];const h=Math.max(0,Math.floor((i.value-n.liveTurn.startedAt)/1e3));return k[Math.floor(h/4)%k.length]});return(h,x)=>{var g,_,E,F;return d(),y("div",Op,[v(n).sessionAlias?(d(),y(G,{key:1},[b("div",zp,[b("h1",Lp,S(v(n).sessionAlias),1),a.value||o.value?(d(),y("div",Np,[(g=a.value)!=null&&g.workspace?(d(),y("button",{key:0,"data-test":"ctx-chip-workspace",class:"flex items-center gap-1.5 rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted hover:bg-fg/5",title:"Browse files",onClick:x[0]||(x[0]=D=>u("show-files"))},[L(v(wn),{size:11,class:"text-warn"}),oe(S(a.value.workspace),1)])):I("",!0),(_=o.value)!=null&&_.name?(d(),y("span",Pp,[x[4]||(x[4]=b("span",{class:"font-mono text-accent"},"@",-1)),oe(S(o.value.name),1)])):I("",!0),(E=a.value)!=null&&E.agent?(d(),y("span",Bp,[L(v(_n),{size:11,class:"text-accent"}),oe(S(a.value.agent),1)])):I("",!0),v(r).gitSummary?(d(),y("button",{key:3,"data-test":"git-summary",class:"flex items-center gap-1.5 rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted hover:bg-fg/5",title:"View changes",onClick:x[1]||(x[1]=D=>{v(r).tab="changes",u("show-files")})},[L(v(dr),{size:11,class:"text-warn"}),v(r).gitSummary.branch?(d(),y("span",qp,S(v(r).gitSummary.branch),1)):I("",!0),x[5]||(x[5]=b("span",{class:"h-1 w-1 rounded-full bg-warn","aria-hidden":"true"},null,-1)),b("span",Up,S(v(r).gitSummary.changedCount)+" changed",1)])):I("",!0)])):I("",!0)]),v(n).error?(d(),y("div",jp,[oe(S(v(n).error)+" ",1),b("button",{class:"ml-2 text-danger underline",onClick:x[2]||(x[2]=D=>v(n).error="")},"dismiss")])):I("",!0),L(fp,{messages:v(n).messages,"live-turn":v(n).liveTurn,"session-key":`${v(n).instanceId}\0${v(n).sessionAlias}`,"scroll-to-scheduled":v(n).scrollRequest,"has-more-older":v(n).hasMoreOlder,"loading-older":v(n).loadingOlder,onResend:v(n).resend,onLoadOlder:v(n).loadOlder},null,8,["messages","live-turn","session-key","scroll-to-scheduled","has-more-older","loading-older","onResend","onLoadOlder"]),b("div",Hp,[v(n).busy?(d(),y("div",Vp,[x[7]||(x[7]=b("span",{class:"h-2 w-2 rounded-full bg-run pulse-dot","aria-hidden":"true"},null,-1)),b("span",Wp,S(m.value)+"…",1),b("span",Gp,S(c.value),1),f.value>0?(d(),y("span",Kp,"· "+S(f.value)+" "+S(f.value===1?"tool":"tools"),1)):I("",!0),x[8]||(x[8]=b("span",{class:"flex-1"},null,-1)),b("button",{"data-test":"cancel-turn",class:"flex items-center gap-1.5 text-[11.5px] font-medium text-danger transition-opacity hover:opacity-80",onClick:x[3]||(x[3]=(...D)=>v(n).cancel&&v(n).cancel(...D))},[L(v(rt),{size:13}),x[6]||(x[6]=oe("Cancel",-1))])])):I("",!0),(F=v(n).sessionPlan)!=null&&F.length?(d(),q(Mp,{key:1,entries:v(n).sessionPlan,active:v(n).busy},null,8,["entries","active"])):I("",!0),L(Tp,{busy:v(n).busy,"draft-key":`${v(n).instanceId}\0${v(n).sessionAlias}`,"instance-id":v(n).instanceId,"session-alias":v(n).sessionAlias,onSend:v(n).send,onCancel:v(n).cancel},null,8,["busy","draft-key","instance-id","session-alias","onSend","onCancel"])])],64)):(d(),y("div",Rp," Select a session "))])}}}),Yp={class:"flex h-full flex-1 flex-col bg-bg","data-test":"file-viewer-center"},Xp={class:"flex h-11 shrink-0 items-center gap-2 border-b border-border bg-surface/60 px-3 backdrop-blur-md"},Jp={class:"truncate font-mono text-[12.5px] text-fg"},Qp={class:"shrink-0 text-[11px] text-fg-muted"},e2={key:0,class:"shrink-0 rounded bg-warn/10 px-1 text-[10.5px] text-warn"},t2={key:1,class:"shrink-0 rounded bg-fg/5 px-1 text-[10.5px] text-fg-muted"},u2={class:"truncate font-mono text-[12.5px] text-fg"},n2={class:"ml-auto flex shrink-0 items-center gap-1"},s2={class:"min-h-0 flex-1 overflow-auto thin-scroll"},r2={key:0,"data-test":"fv-file-body",class:"font-mono text-[12.5px] leading-relaxed"},a2={class:"sticky left-0 w-14 shrink-0 select-none border-r border-border bg-surface px-3 text-right text-fg-muted tabular-nums"},o2={class:"whitespace-pre px-4 text-fg"},i2={key:1,class:"overflow-x-auto p-4 font-mono text-[12.5px] leading-relaxed text-fg whitespace-pre"},l2={key:2,class:"p-6 text-sm text-fg-muted"},c2={key:0,"data-test":"fv-diff-body",class:"p-4 font-mono text-[12.5px] leading-relaxed whitespace-pre"},d2={key:1,class:"p-6 text-sm text-fg-muted"},f2={key:2,class:"px-4 py-1 text-xs text-warn"},p2=5e3,h2=ae({__name:"FileViewer",emits:["back","close"],setup(e,{emit:t}){const u=t,n=Lu(),s=K(()=>{const a=n.file;return!a||a.binary?[]:a.content.split(`
254
+ `)});function r(a){return a===void 0?"":a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`}function o(a){return a.startsWith("+")&&!a.startsWith("+++")?"text-run":a.startsWith("-")&&!a.startsWith("---")?"text-danger":a.startsWith("@@")?"text-info":(a.startsWith("diff ")||a.startsWith("index "),"text-fg-muted")}return(a,i)=>(d(),y("div",Yp,[b("div",Xp,[b("button",{"data-test":"fv-back-list","aria-label":"Back to file list",class:"flex lg:hidden items-center gap-1.5 rounded-md px-2 py-1 text-[12px] font-medium text-fg-muted transition-colors hover:bg-raised hover:text-fg",onClick:i[0]||(i[0]=l=>u("back"))},[L(v(is),{size:14}),i[3]||(i[3]=oe("Files",-1))]),b("button",{"data-test":"fv-back","aria-label":"Back",class:"hidden lg:flex items-center gap-1.5 rounded-md px-2 py-1 text-[12px] font-medium text-fg-muted transition-colors hover:bg-raised hover:text-fg",onClick:i[1]||(i[1]=l=>u("close"))},[L(v(is),{size:14}),i[4]||(i[4]=oe("Back",-1))]),i[5]||(i[5]=b("span",{class:"h-4 w-px bg-border","aria-hidden":"true"},null,-1)),v(n).file?(d(),y(G,{key:0},[L(v(ou),{size:14,class:"shrink-0 text-accent"}),b("span",Jp,S(v(n).file.path),1),b("span",Qp,S(r(v(n).file.size)),1),v(n).file.truncated?(d(),y("span",e2,"truncated")):I("",!0),v(n).file.binary?(d(),y("span",t2,"binary")):I("",!0)],64)):v(n).diffPath?(d(),y(G,{key:1},[L(v(qa),{size:14,class:"shrink-0 text-accent"}),b("span",u2,S(v(n).diffPath),1)],64)):I("",!0),b("div",n2,[v(n).file&&!v(n).file.binary?(d(),q(ia,{key:0,text:v(n).file.content},null,8,["text"])):I("",!0),b("button",{"data-test":"fv-close","aria-label":"Close file",class:"grid h-7 w-7 place-items-center rounded text-fg-muted transition-colors hover:bg-raised hover:text-fg lg:hidden",onClick:i[2]||(i[2]=l=>u("close"))},[L(v(rt),{size:16})])])]),b("div",s2,[v(n).file?(d(),y(G,{key:0},[!v(n).file.binary&&s.value.length<=p2?(d(),y("div",r2,[(d(!0),y(G,null,re(s.value,(l,c)=>(d(),y("div",{key:c,"data-test":"fv-line",class:"flex"},[b("span",a2,S(c+1),1),b("span",o2,S(l||" "),1)]))),128))])):v(n).file.binary?(d(),y("div",l2,"Binary file not shown.")):(d(),y("pre",i2,S(v(n).file.content),1))],64)):v(n).diffPath&&v(n).diff?(d(),y(G,{key:1},[v(n).diff.diff?(d(),y("pre",c2,[(d(!0),y(G,null,re(v(n).diff.diff.split(`
255
+ `),(l,c)=>(d(),y("span",{key:c,class:W(["block",o(l)])},S(l),3))),128))])):(d(),y("div",d2,"No diff content.")),v(n).diff.truncated?(d(),y("div",f2,"diff truncated")):I("",!0)],64)):I("",!0)])]))}}),b2={"data-test":"scheduled-item",class:"rounded-md border border-border bg-bg text-sm"},m2={class:"flex items-center gap-1 px-2 py-1.5"},g2=["data-test"],x2=["data-test"],v2={class:"min-w-0 flex-1 truncate text-[12.5px] text-fg"},y2={class:"flex shrink-0 items-center gap-0.5"},k2=["data-test"],_2={class:"whitespace-pre-wrap text-[12.5px] text-fg"},w2={class:"font-mono text-[10.5px] tabular-nums text-fg-muted"},E2=["data-test"],nr=ae({__name:"ScheduledTaskRow",props:{task:{}},emits:["view"],setup(e,{emit:t}){const u=e,n=t,s=hu(),r=Ft(),o=C(!1);function a(c){switch(c){case"pending":return{label:"Upcoming",cls:"text-fg-muted",icon:cr};case"triggering":return{label:"Running",cls:"text-run",icon:St,spin:!0};case"executed":return{label:"Done",cls:"text-run",icon:lr};case"failed":return{label:"Failed",cls:"text-danger",icon:za};case"missed":return{label:"Missed",cls:"text-warn",icon:au};case"cancelled":return{label:"Cancelled",cls:"text-fg-muted",icon:ir}}}function i(){r.requestScrollToScheduled(u.task.id),n("view")}async function l(c){await pu({title:"Cancel scheduled task?",message:"It will be removed from the schedule and won't run.",confirmLabel:"Cancel task",cancelLabel:"Keep",tone:"danger"})&&await s.cancelScheduled(c)}return(c,f)=>(d(),y("li",b2,[b("div",m2,[b("button",{type:"button","data-test":`scheduled-toggle-${e.task.id}`,class:"flex min-w-0 flex-1 items-center gap-1.5 text-left cursor-pointer",onClick:f[0]||(f[0]=k=>o.value=!o.value)},[L(v(Tt),{size:12,class:W(["shrink-0 text-fg-muted transition-transform",o.value?"rotate-90":""])},null,8,["class"]),b("span",{"data-test":`scheduled-status-${e.task.id}`,class:W(["inline-flex shrink-0 items-center gap-1 text-[11px] font-medium",a(e.task.status).cls])},[(d(),q(Dt(a(e.task.status).icon),{size:12,class:W(a(e.task.status).spin?"animate-spin motion-reduce:animate-none":"")},null,8,["class"])),oe(" "+S(a(e.task.status).label),1)],10,x2),b("span",v2,S(e.task.message),1)],8,g2),b("span",y2,[e.task.status==="executed"?(d(),y("button",{key:0,"data-test":"view-scheduled",title:"View this run in the conversation","aria-label":"View run",class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-accent/15 hover:text-accent",onClick:i},[L(v(Ba),{size:13})])):I("",!0),e.task.status==="pending"?(d(),y("button",{key:1,"data-test":"cancel-scheduled",title:"Cancel scheduled task","aria-label":"Cancel scheduled task",class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger",onClick:f[1]||(f[1]=k=>l(e.task.id))},[L(v(zu),{size:13})])):I("",!0)])]),o.value?(d(),y("div",{key:0,"data-test":`scheduled-detail-${e.task.id}`,class:"space-y-1 border-t border-border px-2 py-1.5"},[b("p",_2,S(e.task.message),1),b("p",w2,S(new Date(e.task.executeAt).toLocaleString()),1),e.task.status==="failed"&&e.task.lastError?(d(),y("p",{key:0,"data-test":`scheduled-error-${e.task.id}`,class:"rounded bg-danger/10 px-2 py-1 text-[11px] text-danger"},S(e.task.lastError),9,E2)):I("",!0)],8,k2)):I("",!0)]))}}),A2={class:"border-b border-border bg-surface p-3"},C2={class:"space-y-1"},D2={key:0,class:"text-xs text-fg-muted"},T2={class:"flex h-full w-full max-w-md flex-col border-l border-border bg-raised shadow-xl",role:"dialog","aria-label":"All scheduled tasks"},S2={class:"flex items-center justify-between border-b border-border px-4 py-3"},F2={class:"text-sm font-semibold text-fg"},$2={class:"flex-1 space-y-1 overflow-y-auto p-3"},sr=3,I2=ae({__name:"ScheduledTasks",setup(e){const t=hu(),u=Ft(),n=C(""),s=C(""),r=K(()=>t.scheduled.slice(0,sr)),o=K(()=>Math.max(0,t.scheduled.length-sr)),a=C(!1);async function i(){if(!u.instanceId||!u.sessionAlias||!n.value||!s.value)return;const l=new Date(n.value).toISOString();await t.createScheduled(u.instanceId,u.sessionAlias,l,s.value),n.value="",s.value=""}return(l,c)=>(d(),y("div",A2,[c[8]||(c[8]=b("h3",{class:"mb-2 text-xs font-semibold uppercase text-fg-muted"},"Scheduled",-1)),b("ul",C2,[(d(!0),y(G,null,re(r.value,f=>(d(),q(nr,{key:f.id,task:f},null,8,["task"]))),128)),v(t).scheduled.length===0?(d(),y("li",D2,"No scheduled tasks.")):I("",!0)]),o.value>0?(d(),y("button",{key:0,type:"button","data-test":"scheduled-view-all",class:"mt-1.5 flex w-full items-center justify-center gap-1 rounded-md border border-border bg-bg px-2 py-1 text-[11px] font-medium text-fg-muted transition-colors hover:bg-accent/10 hover:text-accent",onClick:c[0]||(c[0]=f=>a.value=!0)},[oe(" View all "+S(v(t).scheduled.length)+" ",1),L(v(Xe),{size:12})])):I("",!0),b("form",{class:"mt-2 space-y-1",onSubmit:Ye(i,["prevent"])},[Se(b("input",{"onUpdate:modelValue":c[1]||(c[1]=f=>n.value=f),type:"datetime-local",class:"w-full rounded border border-border bg-bg px-1 py-0.5 text-xs text-fg"},null,512),[[Le,n.value]]),Se(b("input",{"onUpdate:modelValue":c[2]||(c[2]=f=>s.value=f),placeholder:"message",class:"w-full rounded border border-border bg-bg px-1 py-0.5 text-xs text-fg placeholder:text-fg-muted"},null,512),[[Le,s.value]]),c[7]||(c[7]=b("button",{type:"submit",class:"w-full rounded bg-accent px-2 py-1 text-xs text-white hover:bg-accent-hover"},"Schedule",-1))],32),(d(),q(ar,{to:"body"},[L(Sa,{"enter-active-class":"transition-opacity duration-200 ease-out motion-reduce:transition-none","enter-from-class":"opacity-0","leave-active-class":"transition-opacity duration-150 ease-in motion-reduce:transition-none","leave-to-class":"opacity-0"},{default:ct(()=>[a.value?(d(),y("div",{key:0,"data-test":"scheduled-drawer",class:"fixed inset-0 z-50 flex justify-end bg-black/50",onClick:c[5]||(c[5]=Ye(f=>a.value=!1,["self"])),onKeydown:c[6]||(c[6]=rr(f=>a.value=!1,["esc"]))},[b("aside",T2,[b("header",S2,[b("h2",F2,"Scheduled · "+S(v(t).scheduled.length),1),b("button",{class:"rounded p-1 text-fg-muted hover:bg-fg/5 hover:text-fg","aria-label":"Close","data-test":"scheduled-drawer-close",onClick:c[3]||(c[3]=f=>a.value=!1)},[L(v(rt),{size:16})])]),b("ul",$2,[(d(!0),y(G,null,re(v(t).scheduled,f=>(d(),q(nr,{key:f.id,task:f,onView:c[4]||(c[4]=k=>a.value=!1)},null,8,["task"]))),128))])])],32)):I("",!0)]),_:1})]))]))}}),M2={class:"bg-surface p-3"},O2={class:"space-y-1"},R2={class:"flex min-w-0 items-center gap-1.5"},z2={class:"truncate"},L2=["onClick"],N2={key:0,class:"text-xs text-fg-muted"},P2=ae({__name:"OrchestrationTasks",setup(e){const t=hu();async function u(s){await pu({title:"Cancel task?",message:"The running orchestration task will be stopped.",confirmLabel:"Cancel task",cancelLabel:"Keep running",tone:"danger"})&&await t.cancelOrchestration(s)}function n(s){const r=s.toLowerCase();return r.includes("run")||r.includes("active")?"text-run":r.includes("fail")||r.includes("error")||r.includes("cancel")?"text-danger":r.includes("wait")||r.includes("pending")||r.includes("block")?"text-warn":"text-fg-muted"}return(s,r)=>(d(),y("div",M2,[r[0]||(r[0]=b("h3",{class:"mb-2 text-xs font-semibold uppercase text-fg-muted"},"Orchestration",-1)),b("ul",O2,[(d(!0),y(G,null,re(v(t).orchestration,o=>(d(),y("li",{key:o.taskId,class:"flex items-center justify-between text-sm text-fg"},[b("span",R2,[L(v($u),{size:14,class:"shrink-0 text-fg-muted"}),b("span",z2,[oe(S(o.task)+" ",1),b("span",{class:W(["text-xs",n(o.status)])},"("+S(o.status)+")",3)])]),b("button",{"data-test":"cancel-orchestration",title:"Cancel task","aria-label":"Cancel orchestration task",class:"ml-2 grid h-6 w-6 shrink-0 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger",onClick:a=>u(o.taskId)},[L(v(ir),{size:13})],8,L2)]))),128)),v(t).orchestration.length===0?(d(),y("li",N2,"No orchestration tasks.")):I("",!0)])]))}}),B2={key:0},q2={key:1,class:"p-4 text-sm text-fg-muted"},U2=ae({__name:"TaskPanel",setup(e){const t=Ft(),u=hu();return he(()=>[t.instanceId,t.sessionAlias],([n,s])=>{n&&s&&u.loadFor(n,s)},{immediate:!0}),(n,s)=>v(t).instanceId&&v(t).sessionAlias?(d(),y("div",B2,[L(I2),L(P2)])):(d(),y("div",q2,"No session selected."))}}),j2={class:"flex h-full flex-col bg-surface text-sm text-fg-muted"},H2={key:0,class:"flex flex-1 items-center justify-center p-4 text-center text-xs text-fg-muted"},V2={class:"flex items-center gap-2 border-b border-border p-2"},W2=["title"],G2={class:"truncate font-medium"},K2={class:"flex shrink-0 items-center gap-1"},Z2=["disabled"],Y2={key:0,"data-test":"files-error",class:"bg-danger/10 px-2 py-1 text-xs text-danger"},X2={key:1,class:"min-h-0 flex-1 overflow-y-auto thin-scroll"},J2={class:"flex items-center gap-1 border-b border-border px-2 py-1"},Q2={key:0,"data-test":"fs-results"},eh={class:"p-2.5 text-[11px] font-mono leading-5 space-y-px"},th=["onClick"],uh={class:"truncate font-sans text-[12px] text-fg-muted"},nh={key:0,class:"px-1.5 py-1 text-xs text-fg-muted"},sh={key:0,class:"px-2.5 pb-1 text-xs text-warn"},rh={key:1,class:"flex flex-wrap items-center gap-1 border-b border-border px-2.5 py-1.5 font-mono text-[11px] text-fg-muted"},ah=["disabled"],oh=["onClick"],ih={key:2,class:"p-2.5 text-[11px] font-mono leading-5 space-y-px"},lh=["onClick"],ch={key:1,class:"w-[11px] shrink-0"},dh=["title"],fh={key:5,class:"shrink-0 font-mono text-[10.5px] text-fg-muted tabular-nums"},ph={key:0,class:"px-1.5 py-1 text-xs text-fg-muted"},hh={key:2,class:"min-h-0 flex-1 overflow-y-auto thin-scroll"},bh={key:0},mh={key:0,"data-test":"changes-summary",class:"flex items-center justify-between border-b border-border px-2.5 py-2"},gh={class:"flex items-center gap-1.5 font-mono text-[10.5px] tabular-nums"},xh={class:"text-fg-muted"},vh={class:"text-run"},yh={class:"text-danger"},kh={class:"p-2.5 space-y-px"},_h=["onClick"],wh={key:0,class:"px-1.5 py-1 text-xs text-fg-muted"},Eh={key:1,"data-test":"changes-not-git",class:"flex flex-col items-center gap-1.5 p-6 text-center text-xs text-fg-muted"},Ah={key:2,class:"p-3 text-xs text-fg-muted"},Ch={key:3,class:"border-t border-border px-3 py-1 text-xs text-fg-muted"},Dh=ae({__name:"FilesPanel",props:{instanceId:{}},setup(e){const t=e,u=Lu(),n=at(),s=Ft(),r=K(()=>u.path?u.path.split("/"):[]),o=K(()=>r.value.length===0);function a(){o.value||u.up(r.value.length-2)}const i=K(()=>{var O;const A=t.instanceId?n.byId(t.instanceId):void 0;return((O=A==null?void 0:A.sessions.find(T=>T.alias===s.sessionAlias))==null?void 0:O.workspace)??null}),l=K(()=>{const A=u.diff;if(!A)return null;let O=0,T=0;for(const R of A.diff?A.diff.split(`
256
+ `):[])R.startsWith("+")&&!R.startsWith("+++")?O++:R.startsWith("-")&&!R.startsWith("---")&&T++;return{fileCount:A.files.length,add:O,del:T}}),c=C("");let f=null;function k(){f&&clearTimeout(f),f=setTimeout(()=>void u.search(c.value),250)}function m(){c.value="",u.search("")}function h(A){return A===void 0?"":A<1024?`${A} B`:A<1024*1024?`${(A/1024).toFixed(1)} KB`:`${(A/1024/1024).toFixed(1)} MB`}function x(A){return u.path?`${u.path}/${A}`:A}function g(A){const O=A.trim();return O.includes("?")?{label:"U",cls:"text-warn",dot:"bg-warn"}:O.includes("A")?{label:"A",cls:"text-run",dot:"bg-run"}:O.includes("D")?{label:"D",cls:"text-danger",dot:"bg-danger"}:O.includes("R")?{label:"R",cls:"text-accent",dot:"bg-accent"}:O.includes("M")?{label:"M",cls:"text-info",dot:"bg-warn"}:{label:O[0]??"•",cls:"text-fg-muted",dot:"bg-warn"}}function _(A){const O=x(A.name);if(A.type==="file"){const R=u.changed[O];return R?g(R):null}const T=`${O}/`;return Object.keys(u.changed).some(R=>R.startsWith(T))?{label:"•",cls:"text-warn",dot:"bg-warn"}:null}function E(A){return!!u.file&&u.file.path===x(A)}function F(A){A.type==="file"&&(u.diffPath=null),u.open(A)}function D(A){u.diffPath=null,u.openFile(A)}function M(A){u.file=null,u.loadDiff(A)}return he(()=>[t.instanceId,i.value],async([A,O])=>{var R,ce,ee;if(u.reset(),c.value="",!A)return;u.instanceId=A,await n.loadWorkspaces(A).catch(()=>{});const T=O??((ee=(ce=(R=n.byId(A))==null?void 0:R.workspaces)==null?void 0:ce[0])==null?void 0:ee.name);T&&u.selectWorkspace(A,T)},{immediate:!0}),he(()=>u.tab,A=>{A==="changes"&&!u.diff&&u.loadDiff()}),(A,O)=>(d(),y("div",j2,[e.instanceId?(d(),y(G,{key:1},[b("div",V2,[b("div",{"data-test":"ws-label",class:"flex min-w-0 flex-1 items-center gap-1.5 text-xs text-fg",title:v(u).workspace??""},[L(v(wn),{size:13,class:"shrink-0 text-warn"}),b("span",G2,S(v(u).workspace??"—"),1)],8,W2),b("div",K2,[b("button",{"data-test":"refresh-files",title:"Refresh file list","aria-label":"Refresh file list",class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-raised hover:text-fg disabled:opacity-50",disabled:v(u).loading,onClick:O[0]||(O[0]=T=>v(u).refresh())},[L(v(Za),{size:13,class:W(v(u).loading?"animate-spin motion-reduce:animate-none":"")},null,8,["class"])],8,Z2),b("button",{"data-test":"tab-files",class:W(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",v(u).tab==="files"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:O[1]||(O[1]=T=>v(u).tab="files")},[L(v(ou),{size:13}),O[5]||(O[5]=oe("Files ",-1))],2),b("button",{"data-test":"tab-changes",class:W(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",v(u).tab==="changes"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:O[2]||(O[2]=T=>v(u).tab="changes")},[L(v($u),{size:13}),O[6]||(O[6]=oe("Changes ",-1))],2)])]),v(u).error?(d(),y("div",Y2,S(v(u).error),1)):I("",!0),v(u).tab==="files"?(d(),y("div",X2,[b("div",J2,[Se(b("input",{"onUpdate:modelValue":O[3]||(O[3]=T=>c.value=T),"data-test":"fs-search",placeholder:"Search files by name…",class:"min-w-0 flex-1 rounded border border-border bg-bg px-2 py-1 text-xs text-fg placeholder:text-fg-muted",onInput:k},null,544),[[Le,c.value]]),c.value?(d(),y("button",{key:0,"aria-label":"Clear search",class:"text-fg-muted hover:text-fg",onClick:m},[L(v(rt),{size:14})])):I("",!0)]),v(u).query.trim()?(d(),y("div",Q2,[b("ul",eh,[(d(!0),y(G,null,re(v(u).results,T=>(d(),y("li",{key:T},[b("button",{"data-test":"fs-result",class:"flex w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-left hover:bg-raised cursor-pointer",onClick:R=>D(T)},[L(v(Fu),{size:13,class:"shrink-0 text-fg-muted"}),b("span",uh,S(T),1)],8,th)]))),128)),!v(u).results.length&&!v(u).searching?(d(),y("li",nh,"no matches")):I("",!0)]),v(u).searchTruncated?(d(),y("div",sh,"showing first 200 matches")):I("",!0)])):I("",!0),v(u).query.trim()?I("",!0):(d(),y("div",rh,[b("button",{"data-test":"fs-up",title:"Up one level","aria-label":"Up one level",class:"grid h-5 w-5 shrink-0 place-items-center rounded text-fg-muted hover:bg-raised hover:text-fg disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-fg-muted",disabled:o.value||v(u).loading,onClick:a},[L(v(Pa),{size:13})],8,ah),b("button",{class:"hover:text-fg",onClick:O[4]||(O[4]=T=>v(u).up(-1))},S(v(u).workspace??"root"),1),(d(!0),y(G,null,re(r.value,(T,R)=>(d(),y(G,{key:R},[O[7]||(O[7]=b("span",null,"/",-1)),b("button",{class:"hover:text-fg",onClick:ce=>v(u).up(R)},S(T),9,oh)],64))),128))])),v(u).query.trim()?I("",!0):(d(),y("ul",ih,[(d(!0),y(G,null,re(v(u).entries,T=>(d(),y("li",{key:T.name},[b("button",{"data-test":"fs-entry",class:W(["flex w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-left cursor-pointer",E(T.name)?"bg-accent/15":_(T)?"bg-accent/10":"hover:bg-raised"]),onClick:R=>F(T)},[T.type==="dir"?(d(),q(v(Tt),{key:0,size:11,class:"shrink-0 text-fg-muted"})):(d(),y("span",ch)),T.type==="dir"?(d(),q(v(wn),{key:2,size:13,class:W(["shrink-0",_(T)?"text-accent":"text-fg-muted"])},null,8,["class"])):(d(),q(v(Fu),{key:3,size:13,class:W(["shrink-0",E(T.name)||_(T)?"text-accent":"text-fg-muted"])},null,8,["class"])),b("span",{class:W(["flex-1 truncate font-sans text-[12px]",E(T.name)||_(T)?"text-accent font-medium":T.type==="dir"?"text-fg font-medium":"text-fg-muted"])},S(T.name),3),_(T)?(d(),y("span",{key:4,"data-test":"fs-status",class:W(["w-1.5 h-1.5 shrink-0 rounded-full",_(T).dot]),title:`${_(T).label} — ${v(u).changed[x(T.name)]||"contains changes"}`},null,10,dh)):I("",!0),T.type==="file"&&!_(T)?(d(),y("span",fh,S(h(T.size)),1)):I("",!0)],10,lh)]))),128)),!v(u).entries.length&&!v(u).loading?(d(),y("li",ph,"empty directory")):I("",!0)]))])):(d(),y("div",hh,[v(u).diff?(d(),y("div",bh,[l.value?(d(),y("div",mh,[O[8]||(O[8]=b("span",{class:"text-[10.5px] font-semibold uppercase tracking-wider text-fg-muted"},"Changes",-1)),b("div",gh,[b("span",xh,S(l.value.fileCount)+" files",1),b("span",vh,"+"+S(l.value.add),1),b("span",yh,"−"+S(l.value.del),1)])])):I("",!0),b("ul",kh,[(d(!0),y(G,null,re(v(u).diff.files,T=>(d(),y("li",{key:T.path},[b("button",{"data-test":"diff-file",class:W(["flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left cursor-pointer",v(u).diffPath===T.path?"bg-accent/10":"hover:bg-raised"]),onClick:R=>M(T.path)},[L(v(ou),{size:12,class:W(["shrink-0",v(u).diffPath===T.path?"text-accent":"text-fg-muted"])},null,8,["class"]),b("span",{class:W(["flex-1 truncate font-mono text-[11px]",v(u).diffPath===T.path?"text-accent":"text-fg"])},S(T.path),3),b("span",{class:W(["shrink-0 font-mono text-[10.5px] uppercase tabular-nums",g(T.status).cls])},S(T.status.trim()||"··"),3)],10,_h)]))),128)),v(u).diff.files.length?I("",!0):(d(),y("li",wh,"no changes"))])])):v(u).notGit?(d(),y("div",Eh,[L(v(dr),{size:20,class:"text-fg-muted/60"}),O[9]||(O[9]=b("span",null,"Not a git repository",-1)),O[10]||(O[10]=b("span",{class:"text-[11px] text-fg-muted/70"},"This workspace has no version control to show changes for.",-1))])):v(u).loading?I("",!0):(d(),y("div",Ah,"no diff loaded"))])),v(u).loading?(d(),y("div",Ch,"loading…")):I("",!0)],64)):(d(),y("div",H2," Select a session to browse its workspace "))]))}}),Th={class:"pointer-events-none fixed bottom-4 right-4 z-50 flex w-72 flex-col gap-2","aria-live":"polite"},Sh={class:"flex items-start justify-between gap-2"},Fh=["onClick"],$h=ae({__name:"NoticeToast",setup(e){const t=hr();function u(n){const s=n.toLowerCase();return s.includes("fail")||s.includes("error")?"text-danger":s.includes("complet")||s.includes("done")||s.includes("success")?"text-run":"text-info"}return(n,s)=>(d(),y("div",Th,[(d(!0),y(G,null,re(v(t).items.slice(0,4),r=>(d(),y("div",{key:r.id,"data-test":"notice",class:"pointer-events-auto rounded border border-border bg-raised px-3 py-2 text-sm text-fg shadow-lg"},[b("div",Sh,[b("span",null,[b("span",{class:W(["text-xs uppercase",u(r.kind)])},S(r.kind),3),s[0]||(s[0]=b("br",null,null,-1)),oe(S(r.text),1)]),b("button",{class:"text-xs text-fg-muted hover:text-fg","aria-label":"Dismiss",onClick:o=>v(t).dismiss(r.id)},"×",8,Fh)])]))),128))]))}}),Ih=["title"],Mh=ae({__name:"ConnectionBadge",setup(e){const t=br();return(u,n)=>(d(),y("div",{"data-test":"conn-badge",class:W(["inline-flex items-center gap-1.5 rounded-full border border-border px-2 py-0.5 text-xs",v(t).online?"text-run":"text-danger"]),title:v(t).online?"Connected":"Reconnecting…"},[b("span",{class:W(["h-2 w-2 rounded-full",v(t).online?"bg-run":"bg-danger"]),"aria-hidden":"true"},null,2),b("span",null,S(v(t).online?"Connected":"Reconnecting…"),1)],10,Ih))}}),Oh={class:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-raised shadow-xl"},Rh={class:"flex items-center gap-2 border-b border-border px-4 py-3"},zh={class:"max-h-80 overflow-y-auto py-1 text-sm"},Lh=["onMouseenter","onClick"],Nh={class:"font-medium"},Ph={class:"truncate text-xs text-fg-muted"},Bh={key:0,class:"px-4 py-3 text-xs text-fg-muted"},qh=ae({__name:"CommandPalette",emits:["close","select-session"],setup(e,{emit:t}){const u=t,n=at(),s=C(""),r=C(null),o=C(0),a=K(()=>n.instances.flatMap(m=>m.sessions.map(h=>({label:h.alias,sub:`${m.name} · ${h.agent}`,instanceId:m.id,alias:h.alias}))));function i(m,h){return h?`${m.label} ${m.sub}`.toLowerCase().includes(h.toLowerCase()):!0}const l=K(()=>{const m=s.value.trim();return a.value.filter(h=>i(h,m))});function c(){o.value>=l.value.length&&(o.value=Math.max(0,l.value.length-1))}function f(m){u("select-session",m.instanceId,m.alias),u("close")}function k(m){if(m.key==="Escape"){u("close");return}if(m.key==="ArrowDown")m.preventDefault(),o.value=Math.min(o.value+1,l.value.length-1);else if(m.key==="ArrowUp")m.preventDefault(),o.value=Math.max(o.value-1,0);else if(m.key==="Enter"){m.preventDefault();const h=l.value[o.value];h&&f(h)}}return ht(()=>void st(()=>{var m;return(m=r.value)==null?void 0:m.focus()})),(m,h)=>(d(),y("div",{class:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 pt-24","data-test":"command-palette",onClick:h[2]||(h[2]=Ye(x=>u("close"),["self"]))},[b("div",Oh,[b("div",Rh,[L(v(Ru),{size:16,class:"shrink-0 text-fg-muted"}),Se(b("input",{ref_key:"input",ref:r,"onUpdate:modelValue":h[0]||(h[0]=x=>s.value=x),"data-test":"palette-input",placeholder:"Jump to a session…",class:"w-full bg-transparent text-sm text-fg placeholder:text-fg-muted outline-none",onInput:h[1]||(h[1]=x=>{o.value=0,c()}),onKeydown:k},null,544),[[Le,s.value]])]),b("ul",zh,[(d(!0),y(G,null,re(l.value,(x,g)=>(d(),y("li",{key:`${x.instanceId}:${x.alias}:${g}`},[b("button",{"data-test":"palette-row",class:W(["flex w-full items-center gap-2 px-4 py-1.5 text-left",g===o.value?"bg-accent/10 text-accent":"text-fg hover:bg-fg/5"]),onMouseenter:_=>o.value=g,onClick:_=>f(x)},[L(v(ja),{size:14,class:"shrink-0"}),b("span",Nh,S(x.label),1),b("span",Ph,S(x.sub),1)],42,Lh)]))),128)),l.value.length?I("",!0):(d(),y("li",Bh,"no matches"))])])]))}}),Uh={class:"flex h-screen flex-col bg-bg text-fg"},jh={class:"sticky top-0 z-30 flex h-11 shrink-0 items-center justify-between border-b border-border bg-surface/80 px-3 backdrop-blur-xl"},Hh={class:"flex items-center gap-2"},Vh={class:"flex items-center gap-1.5"},Wh=["aria-label"],Gh={class:"flex items-center gap-2 border-b border-border bg-surface px-2 py-1.5 lg:hidden"},Kh={class:"min-w-0 flex-1 truncate text-center text-sm font-medium"},Zh={class:"flex shrink-0 items-center gap-0.5"},Yh={class:"flex flex-1 overflow-hidden"},Xh={class:"flex h-9 shrink-0 items-center justify-between px-3 text-xs"},Jh={class:"flex items-center gap-2"},Qh={"data-test":"column",class:"relative flex min-w-0 flex-1 flex-col"},eb={class:"flex h-9 items-center gap-1 border-b border-border px-2.5"},sb=ae({__name:"DashboardView",setup(e){const t=Ia(),u=at(),n=Ft(),s=Lu(),r=hu(),o=hr(),a=br();let i=null;const l=C(!1),c=C(!1),f=C("tasks");function k(){l.value=!1,c.value=!1}function m(T){f.value=T,c.value=!0}function h(){_(),m("files")}const x=C(localStorage.getItem("xacpx.leftCollapsed")==="1");he(x,T=>localStorage.setItem("xacpx.leftCollapsed",T?"1":"0"));const g=K(()=>!!(s.file||s.diffPath));function _(){s.file=null,s.diffPath=null}he(g,T=>{T&&(c.value=!1)});const E=C(!1);function F(T){(T.metaKey||T.ctrlKey)&&T.key.toLowerCase()==="k"&&(T.preventDefault(),E.value=!E.value)}function D(T,R){n.select(T,R),n.loadHistory().catch(()=>{}),l.value=!1}let M=!1;async function A(){await u.loadInstances().catch(()=>{}),await n.loadActiveTurns().catch(()=>{}),n.instanceId&&n.sessionAlias&&(await u.loadSessions(n.instanceId).catch(()=>{}),await n.loadHistory().catch(()=>{}),await r.loadFor(n.instanceId,n.sessionAlias).catch(()=>{}))}function O(T){a.setOnline(T),T&&(M&&A(),M=!0)}return ht(async()=>{window.addEventListener("keydown",F),await u.loadInstances(),i=go(R=>{u.applyEvent(R),n.applyEvent(R),r.applyEvent(R),o.applyEvent(R)},O),await n.loadActiveTurns().catch(()=>{});const T=vo();T&&u.byId(T.instanceId)&&D(T.instanceId,T.alias)}),Sn(()=>{window.removeEventListener("keydown",F),i==null||i()}),(T,R)=>{const ce=Fa("router-link");return d(),y("div",Uh,[b("header",jh,[b("div",Hh,[L($a),L(Mh)]),b("div",Vh,[b("button",{"data-test":"global-search","aria-label":"Search",class:"group flex h-7 items-center gap-2 rounded-lg border border-border bg-bg px-2.5 text-left transition-colors hover:border-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:w-64",onClick:R[0]||(R[0]=ee=>E.value=!0)},[L(v(Ru),{size:14,class:"text-fg-muted"}),R[14]||(R[14]=b("span",{class:"hidden flex-1 text-[12.5px] text-fg-muted sm:inline"},"Search…",-1)),R[15]||(R[15]=b("kbd",{class:"hidden rounded border border-border bg-raised px-1.5 py-0.5 font-mono text-[10px] text-fg-muted sm:inline"},"⌘K",-1))]),b("button",{"data-test":"theme-toggle","aria-label":v(t).mode==="dark"?"Switch to light":"Switch to dark",class:"grid h-7 w-7 place-items-center rounded-lg border border-border text-fg-muted transition-colors hover:bg-raised focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onClick:R[1]||(R[1]=ee=>v(t).toggle())},[v(t).mode==="dark"?(d(),q(v(Ha),{key:0,size:15})):(d(),q(v(to),{key:1,size:15}))],8,Wh),L(ce,{to:"/settings","data-test":"settings-link","aria-label":"Settings",class:"grid h-7 w-7 place-items-center rounded-lg border border-border text-fg-muted transition-colors hover:bg-raised focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},{default:ct(()=>[L(v(Qa),{size:15})]),_:1})])]),b("div",Gh,[b("button",{"data-test":"open-instances","aria-label":"Open instances",class:"rounded p-1 leading-none text-fg-muted hover:bg-fg/5",onClick:R[2]||(R[2]=ee=>l.value=!0)},[L(v(Ua),{size:20})]),b("span",Kh,S(v(n).sessionAlias??"xacpx relay"),1),b("div",Zh,[b("button",{"data-test":"open-files","aria-label":"Open files",title:"Files",class:"grid h-8 w-8 place-items-center rounded text-fg-muted hover:bg-fg/5",onClick:R[3]||(R[3]=ee=>m("files"))},[L(v(ou),{size:18})]),b("button",{"data-test":"open-tasks","aria-label":"Open tasks",title:"Tasks",class:"grid h-8 w-8 place-items-center rounded text-fg-muted hover:bg-fg/5",onClick:R[4]||(R[4]=ee=>m("tasks"))},[L(v($u),{size:18})])])]),b("div",Yh,[l.value||c.value?(d(),y("div",{key:0,"data-test":"drawer-backdrop",class:"fixed inset-0 z-30 bg-black/30 lg:hidden",onClick:k})):I("",!0),b("div",{"data-test":"column","data-drawer":"left",class:W(["fixed inset-y-0 left-0 z-40 flex w-72 max-w-[85%] shrink-0 transform flex-col border-r border-border bg-surface shadow-lg transition-[transform,width] lg:static lg:z-auto lg:max-w-none lg:translate-x-0 lg:transform-none lg:shadow-none",[l.value?"translate-x-0":"-translate-x-full",x.value?"lg:w-0 lg:min-w-0 lg:overflow-hidden lg:border-r-0":"lg:w-[248px]"]])},[b("div",Xh,[R[16]||(R[16]=b("span",{class:"font-semibold uppercase tracking-wider text-fg-muted"},"Instances",-1)),b("div",Jh,[b("button",{"data-test":"toggle-left","aria-label":"Hide sidebar",title:"Hide sidebar",class:"hidden h-6 w-6 place-items-center rounded-md text-fg-muted transition-colors hover:bg-raised hover:text-fg lg:grid",onClick:R[5]||(R[5]=ee=>x.value=!0)},[L(v(Va),{size:15})]),b("button",{"data-test":"close-instances","aria-label":"Close instances",class:"text-fg-muted hover:text-fg lg:hidden",onClick:R[6]||(R[6]=ee=>l.value=!1)},[L(v(rt),{size:18})])])]),L(Qi,{onSelect:D})],2),x.value?(d(),y("button",{key:1,"data-test":"expand-left","aria-label":"Show sidebar",title:"Show sidebar",class:"hidden w-5 shrink-0 items-center justify-center border-r border-border bg-surface/60 text-fg-muted transition-colors hover:bg-raised hover:text-fg lg:flex",onClick:R[7]||(R[7]=ee=>x.value=!1)},[L(v(Wa),{size:15})])):I("",!0),b("div",Qh,[L(Zp,{class:"absolute inset-0",inert:g.value,onShowFiles:R[8]||(R[8]=ee=>f.value="files")},null,8,["inert"]),g.value?(d(),q(h2,{key:0,class:"absolute inset-0 z-10",onBack:h,onClose:_})):I("",!0)]),b("div",{"data-test":"column","data-drawer":"right",class:W(["fixed inset-y-0 right-0 z-40 w-72 max-w-[85%] shrink-0 transform overflow-y-auto border-l border-border bg-surface shadow-lg transition-transform lg:static lg:z-auto lg:w-[296px] lg:max-w-none lg:translate-x-0 lg:transform-none lg:shadow-none",c.value?"translate-x-0":"translate-x-full"])},[b("div",eb,[b("button",{"data-test":"right-tab-files",class:W(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",f.value==="files"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:R[9]||(R[9]=ee=>f.value="files")},[L(v(ou),{size:13}),R[17]||(R[17]=oe("Files ",-1))],2),b("button",{"data-test":"right-tab-tasks",class:W(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",f.value==="tasks"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:R[10]||(R[10]=ee=>f.value="tasks")},[L(v($u),{size:13}),R[18]||(R[18]=oe("Tasks ",-1))],2),b("button",{"data-test":"close-tasks","aria-label":"Close tasks",class:"ml-auto text-fg-muted hover:text-fg lg:hidden",onClick:R[11]||(R[11]=ee=>c.value=!1)},[L(v(rt),{size:18})])]),f.value==="tasks"?(d(),q(U2,{key:0})):(d(),q(Dh,{key:1,"instance-id":v(n).instanceId},null,8,["instance-id"]))],2)]),L($h),E.value?(d(),q(qh,{key:0,onClose:R[12]||(R[12]=ee=>E.value=!1),onSelectSession:R[13]||(R[13]=(ee,J)=>{D(ee,J),E.value=!1})})):I("",!0)])}}});export{sb as default};