useblocks 1.0.33 → 1.0.34

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 (394) hide show
  1. package/README.md +1 -1
  2. package/asset-manifest.json +377 -0
  3. package/css.worker.js +2 -0
  4. package/css.worker.js.LICENSE.txt +6 -0
  5. package/editor.worker.js +1 -0
  6. package/html.worker.js +2 -0
  7. package/html.worker.js.LICENSE.txt +14 -0
  8. package/iframe/{iframe-eblock.4d894a419fe4ff94d516.html → iframe-eblock.ddd7daa2df902eb62faf.html} +1 -1
  9. package/iframe/{iframe.4d894a419fe4ff94d516.html → iframe.ddd7daa2df902eb62faf.html} +1 -1
  10. package/iframe/js/cssbeautify.js +1 -1
  11. package/iframe/sandbox-eblock.js +1 -1
  12. package/iframe/sandbox.js +1 -1
  13. package/json.worker.js +2 -0
  14. package/json.worker.js.LICENSE.txt +6 -0
  15. package/package.json +1 -1
  16. package/plugin.html +281 -0
  17. package/plugin_blocks_test.html +144 -0
  18. package/plugin_default.html +56 -0
  19. package/plugin_s.html +31 -0
  20. package/static/css/1795.3b54559d.css +1 -0
  21. package/static/css/2256.15cb333e.css +1 -0
  22. package/static/css/4877.237f7f6b.css +1 -0
  23. package/static/css/5571.e9720eda.css +1 -0
  24. package/static/css/6677.3a2b7cfe.css +1 -0
  25. package/static/css/698.9a48c3be.css +1 -0
  26. package/static/css/984.b0f773d2.css +1 -0
  27. package/static/js/1049.4172dffd.chunk.js +2 -0
  28. package/static/js/1049.4172dffd.chunk.js.LICENSE.txt +6 -0
  29. package/static/js/1052.d1f85a29.js +1 -0
  30. package/static/js/1185.6bf6f9aa.chunk.js +2 -0
  31. package/static/js/1185.6bf6f9aa.chunk.js.LICENSE.txt +6 -0
  32. package/static/js/1212.15b852ca.js +1 -0
  33. package/static/js/1265.a2619e5d.chunk.js +2 -0
  34. package/static/js/1265.a2619e5d.chunk.js.LICENSE.txt +6 -0
  35. package/static/js/1307.74cb7b10.js +1 -0
  36. package/static/js/1329.579d774a.chunk.js +2 -0
  37. package/static/js/1329.579d774a.chunk.js.LICENSE.txt +6 -0
  38. package/static/js/1399.71fa61b5.js +1 -0
  39. package/static/js/1403.68211890.js +1 -0
  40. package/static/js/1459.3976d721.chunk.js +2 -0
  41. package/static/js/1459.3976d721.chunk.js.LICENSE.txt +6 -0
  42. package/static/js/1472.683ade96.js +1 -0
  43. package/static/js/150.e6ab4dd6.js +2 -0
  44. package/static/js/150.e6ab4dd6.js.LICENSE.txt +1 -0
  45. package/static/js/1579.1a9c02cc.chunk.js +2 -0
  46. package/static/js/1579.1a9c02cc.chunk.js.LICENSE.txt +6 -0
  47. package/static/js/1653.4c4a3135.chunk.js +2 -0
  48. package/static/js/1653.4c4a3135.chunk.js.LICENSE.txt +6 -0
  49. package/static/js/1729.b71e4a99.chunk.js +1 -0
  50. package/static/js/1795.02f7d573.js +1 -0
  51. package/static/js/1841.5da7bf01.chunk.js +2 -0
  52. package/static/js/1841.5da7bf01.chunk.js.LICENSE.txt +6 -0
  53. package/static/js/1861.b8c224a2.chunk.js +2 -0
  54. package/static/js/1861.b8c224a2.chunk.js.LICENSE.txt +6 -0
  55. package/static/js/192.c5769095.js +1 -0
  56. package/static/js/197.a135382e.js +1 -0
  57. package/static/js/2016.e08ef9ce.js +1 -0
  58. package/static/js/2049.ae85de41.chunk.js +2 -0
  59. package/static/js/2049.ae85de41.chunk.js.LICENSE.txt +6 -0
  60. package/static/js/2088.1813eba6.js +1 -0
  61. package/static/js/2132.3e700acc.js +2 -0
  62. package/static/js/2132.3e700acc.js.LICENSE.txt +6 -0
  63. package/static/js/2217.2e801f1a.chunk.js +2 -0
  64. package/static/js/2217.2e801f1a.chunk.js.LICENSE.txt +6 -0
  65. package/static/js/2223.17806e9a.js +2 -0
  66. package/static/js/2223.17806e9a.js.LICENSE.txt +10 -0
  67. package/static/js/2256.8cc91416.js +1 -0
  68. package/static/js/2273.9a82beda.chunk.js +2 -0
  69. package/static/js/2273.9a82beda.chunk.js.LICENSE.txt +6 -0
  70. package/static/js/2279.8fca3f80.js +1 -0
  71. package/static/js/2353.e7f622b0.chunk.js +2 -0
  72. package/static/js/2353.e7f622b0.chunk.js.LICENSE.txt +6 -0
  73. package/static/js/2464.2c009f8c.js +2 -0
  74. package/static/js/2464.2c009f8c.js.LICENSE.txt +6 -0
  75. package/static/js/2469.b6573b5d.js +1 -0
  76. package/static/js/2579.ad196e9b.js +1 -0
  77. package/static/js/2582.b2b22fe0.js +2 -0
  78. package/static/js/2582.b2b22fe0.js.LICENSE.txt +31 -0
  79. package/static/js/2617.84f5300d.js +1 -0
  80. package/static/js/2642.53da04d8.js +1 -0
  81. package/static/js/2896.fac80e3c.js +2 -0
  82. package/static/js/2896.fac80e3c.js.LICENSE.txt +6 -0
  83. package/static/js/2987.6e35b276.chunk.js +2 -0
  84. package/static/js/2987.6e35b276.chunk.js.LICENSE.txt +6 -0
  85. package/static/js/3031.84c39f37.chunk.js +2 -0
  86. package/static/js/3031.84c39f37.chunk.js.LICENSE.txt +6 -0
  87. package/static/js/3142.506128bd.js +1 -0
  88. package/static/js/3143.1ba23572.chunk.js +2 -0
  89. package/static/js/3143.1ba23572.chunk.js.LICENSE.txt +6 -0
  90. package/static/js/3273.17658f13.chunk.js +2 -0
  91. package/static/js/3273.17658f13.chunk.js.LICENSE.txt +6 -0
  92. package/static/js/3303.576ded0e.js +1 -0
  93. package/static/js/3393.192ef5c3.chunk.js +2 -0
  94. package/static/js/3393.192ef5c3.chunk.js.LICENSE.txt +6 -0
  95. package/static/js/3441.c99ed155.chunk.js +2 -0
  96. package/static/js/3441.c99ed155.chunk.js.LICENSE.txt +6 -0
  97. package/static/js/3501.86e3c48e.chunk.js +2 -0
  98. package/static/js/3501.86e3c48e.chunk.js.LICENSE.txt +6 -0
  99. package/static/js/3511.80b2af5b.chunk.js +2 -0
  100. package/static/js/3511.80b2af5b.chunk.js.LICENSE.txt +6 -0
  101. package/static/js/353.3e6b29fb.js +1 -0
  102. package/static/js/3593.e62e49f2.chunk.js +2 -0
  103. package/static/js/3593.e62e49f2.chunk.js.LICENSE.txt +6 -0
  104. package/static/js/3665.12d06fc4.chunk.js +2 -0
  105. package/static/js/3665.12d06fc4.chunk.js.LICENSE.txt +6 -0
  106. package/static/js/3682.d155b110.js +2 -0
  107. package/static/js/3682.d155b110.js.LICENSE.txt +18 -0
  108. package/static/js/3713.ecd8d4d5.chunk.js +2 -0
  109. package/static/js/3713.ecd8d4d5.chunk.js.LICENSE.txt +6 -0
  110. package/static/js/3724.b7878b14.js +1 -0
  111. package/static/js/3737.df8953d0.chunk.js +2 -0
  112. package/static/js/3737.df8953d0.chunk.js.LICENSE.txt +6 -0
  113. package/static/js/3744.86c2957a.js +1 -0
  114. package/static/js/3921.99dffea2.chunk.js +2 -0
  115. package/static/js/3921.99dffea2.chunk.js.LICENSE.txt +6 -0
  116. package/static/js/3959.42824ee0.js +1 -0
  117. package/static/js/3969.d76517dd.chunk.js +2 -0
  118. package/static/js/3969.d76517dd.chunk.js.LICENSE.txt +6 -0
  119. package/static/js/3991.d0073826.js +1 -0
  120. package/static/js/4009.088de4c8.js +1 -0
  121. package/static/js/4046.b9a6a0d1.chunk.js +1 -0
  122. package/static/js/4047.9b1db1a0.chunk.js +2 -0
  123. package/static/js/4047.9b1db1a0.chunk.js.LICENSE.txt +6 -0
  124. package/static/js/4161.10fa2db8.chunk.js +2 -0
  125. package/static/js/4161.10fa2db8.chunk.js.LICENSE.txt +6 -0
  126. package/static/js/4197.8eec4e1e.chunk.js +2 -0
  127. package/static/js/4197.8eec4e1e.chunk.js.LICENSE.txt +6 -0
  128. package/static/js/4231.0dca1f81.js +1 -0
  129. package/static/js/433.e0f675e7.chunk.js +2 -0
  130. package/static/js/433.e0f675e7.chunk.js.LICENSE.txt +6 -0
  131. package/static/js/4337.cfa4be7c.chunk.js +2 -0
  132. package/static/js/4337.cfa4be7c.chunk.js.LICENSE.txt +6 -0
  133. package/static/js/4384.d7dc931a.js +2 -0
  134. package/static/js/4384.d7dc931a.js.LICENSE.txt +15 -0
  135. package/static/js/4465.1af39ca8.chunk.js +2 -0
  136. package/static/js/4465.1af39ca8.chunk.js.LICENSE.txt +6 -0
  137. package/static/js/4471.c28a2129.chunk.js +2 -0
  138. package/static/js/4471.c28a2129.chunk.js.LICENSE.txt +6 -0
  139. package/static/js/4609.b1d09cb3.chunk.js +2 -0
  140. package/static/js/4609.b1d09cb3.chunk.js.LICENSE.txt +6 -0
  141. package/static/js/4675.5a245a7a.js +1 -0
  142. package/static/js/4877.79afdd18.js +1 -0
  143. package/static/js/493.56a9ec50.chunk.js +2 -0
  144. package/static/js/493.56a9ec50.chunk.js.LICENSE.txt +6 -0
  145. package/static/js/4957.824c7499.chunk.js +2 -0
  146. package/static/js/4957.824c7499.chunk.js.LICENSE.txt +6 -0
  147. package/static/js/4963.d5f498ed.chunk.js +2 -0
  148. package/static/js/4963.d5f498ed.chunk.js.LICENSE.txt +6 -0
  149. package/static/js/5130.5a4cb31f.js +2 -0
  150. package/static/js/5130.5a4cb31f.js.LICENSE.txt +6 -0
  151. package/static/js/515.16219a24.js +2 -0
  152. package/static/js/515.16219a24.js.LICENSE.txt +6 -0
  153. package/static/js/5234.f4717ce4.js +1 -0
  154. package/static/js/5256.5152ffd5.js +1 -0
  155. package/static/js/5571.e9032e61.js +1 -0
  156. package/static/js/5606.a93f532c.js +1 -0
  157. package/static/js/5873.5fdbcd6c.js +1 -0
  158. package/static/js/5927.4c81b127.chunk.js +1 -0
  159. package/static/js/5957.d2ad88af.js +2 -0
  160. package/static/js/5957.d2ad88af.js.LICENSE.txt +9 -0
  161. package/static/js/5969.2b9f0751.js +1 -0
  162. package/static/js/5974.1a3cdd81.js +1 -0
  163. package/static/js/6133.0da38de9.js +1 -0
  164. package/static/js/6154.eda7a5eb.js +1 -0
  165. package/static/js/6177.cfd53511.chunk.js +2 -0
  166. package/static/js/6177.cfd53511.chunk.js.LICENSE.txt +6 -0
  167. package/static/js/6209.367effd7.chunk.js +2 -0
  168. package/static/js/6209.367effd7.chunk.js.LICENSE.txt +6 -0
  169. package/static/js/6210.e0532bdd.js +1 -0
  170. package/static/js/6219.e2ba95f7.chunk.js +2 -0
  171. package/static/js/6219.e2ba95f7.chunk.js.LICENSE.txt +6 -0
  172. package/static/js/6242.14f46d39.js +2 -0
  173. package/static/js/6242.14f46d39.js.LICENSE.txt +43 -0
  174. package/static/js/6289.46413f79.chunk.js +2 -0
  175. package/static/js/6289.46413f79.chunk.js.LICENSE.txt +6 -0
  176. package/static/js/6305.13b451ab.chunk.js +2 -0
  177. package/static/js/6305.13b451ab.chunk.js.LICENSE.txt +6 -0
  178. package/static/js/6313.16f2ea70.chunk.js +2 -0
  179. package/static/js/6313.16f2ea70.chunk.js.LICENSE.txt +6 -0
  180. package/static/js/6403.fdddaab8.js +1 -0
  181. package/static/js/6487.1bcde185.js +1 -0
  182. package/static/js/6529.67b52fe1.chunk.js +2 -0
  183. package/static/js/6529.67b52fe1.chunk.js.LICENSE.txt +6 -0
  184. package/static/js/6545.798ceede.chunk.js +2 -0
  185. package/static/js/6545.798ceede.chunk.js.LICENSE.txt +6 -0
  186. package/static/js/6567.636a8f84.js +1 -0
  187. package/static/js/657.c68af219.js +1 -0
  188. package/static/js/6633.2645f8a5.chunk.js +2 -0
  189. package/static/js/6633.2645f8a5.chunk.js.LICENSE.txt +6 -0
  190. package/static/js/665.6b528187.chunk.js +2 -0
  191. package/static/js/665.6b528187.chunk.js.LICENSE.txt +6 -0
  192. package/static/js/6659.3f40e62e.chunk.js +2 -0
  193. package/static/js/6659.3f40e62e.chunk.js.LICENSE.txt +6 -0
  194. package/static/js/6712.a85c5bf3.js +1 -0
  195. package/static/js/6873.36666f3b.chunk.js +2 -0
  196. package/static/js/6873.36666f3b.chunk.js.LICENSE.txt +6 -0
  197. package/static/js/6931.f1bfddce.chunk.js +2 -0
  198. package/static/js/6931.f1bfddce.chunk.js.LICENSE.txt +6 -0
  199. package/static/js/6945.feae0e01.js +1 -0
  200. package/static/js/6978.4572de86.chunk.js +2 -0
  201. package/static/js/6978.4572de86.chunk.js.LICENSE.txt +6 -0
  202. package/static/js/698.7fc7c6dc.js +1 -0
  203. package/static/js/7099.df805007.js +1 -0
  204. package/static/js/7137.ce26a473.chunk.js +2 -0
  205. package/static/js/7137.ce26a473.chunk.js.LICENSE.txt +6 -0
  206. package/static/js/7167.8d977301.js +1 -0
  207. package/static/js/7297.55905776.chunk.js +2 -0
  208. package/static/js/7297.55905776.chunk.js.LICENSE.txt +6 -0
  209. package/static/js/7386.e4419bd3.js +1 -0
  210. package/static/js/7400.a9f59fa2.js +1 -0
  211. package/static/js/7457.9d3d73f0.chunk.js +2 -0
  212. package/static/js/7457.9d3d73f0.chunk.js.LICENSE.txt +6 -0
  213. package/static/js/747.e69631e9.chunk.js +2 -0
  214. package/static/js/747.e69631e9.chunk.js.LICENSE.txt +6 -0
  215. package/static/js/753.3912652b.chunk.js +2 -0
  216. package/static/js/753.3912652b.chunk.js.LICENSE.txt +6 -0
  217. package/static/js/7698.28da948c.js +1 -0
  218. package/static/js/7768.49b35c46.js +1 -0
  219. package/static/js/7773.dbe2ce9b.js +1 -0
  220. package/static/js/7813.a2698e19.chunk.js +2 -0
  221. package/static/js/7813.a2698e19.chunk.js.LICENSE.txt +6 -0
  222. package/static/js/790.05e9f9b9.js +1 -0
  223. package/static/js/799.7d4b7962.chunk.js +2 -0
  224. package/static/js/799.7d4b7962.chunk.js.LICENSE.txt +6 -0
  225. package/static/js/8073.b0e835de.chunk.js +2 -0
  226. package/static/js/8073.b0e835de.chunk.js.LICENSE.txt +6 -0
  227. package/static/js/8154.ef02a714.js +1 -0
  228. package/static/js/8161.5ffffff0.chunk.js +2 -0
  229. package/static/js/8161.5ffffff0.chunk.js.LICENSE.txt +6 -0
  230. package/static/js/8179.acf16a1a.chunk.js +1 -0
  231. package/static/js/823.48325ac1.js +2 -0
  232. package/static/js/823.48325ac1.js.LICENSE.txt +7 -0
  233. package/static/js/8236.b3951f96.js +2 -0
  234. package/static/js/8236.b3951f96.js.LICENSE.txt +42 -0
  235. package/static/js/8325.41ced5ea.chunk.js +2 -0
  236. package/static/js/8325.41ced5ea.chunk.js.LICENSE.txt +6 -0
  237. package/static/js/8345.e3795419.js +1 -0
  238. package/static/js/8401.c2682208.chunk.js +2 -0
  239. package/static/js/8401.c2682208.chunk.js.LICENSE.txt +6 -0
  240. package/static/js/8405.427451ca.chunk.js +2 -0
  241. package/static/js/8405.427451ca.chunk.js.LICENSE.txt +6 -0
  242. package/static/js/8417.dd8c3bf1.chunk.js +2 -0
  243. package/static/js/8417.dd8c3bf1.chunk.js.LICENSE.txt +6 -0
  244. package/static/js/8447.56f9c146.js +1 -0
  245. package/static/js/8449.3924eedc.chunk.js +2 -0
  246. package/static/js/8449.3924eedc.chunk.js.LICENSE.txt +6 -0
  247. package/static/js/8545.5232cd96.chunk.js +2 -0
  248. package/static/js/8545.5232cd96.chunk.js.LICENSE.txt +6 -0
  249. package/static/js/8571.3cd299f9.chunk.js +2 -0
  250. package/static/js/8571.3cd299f9.chunk.js.LICENSE.txt +6 -0
  251. package/static/js/8573.2eb0c558.chunk.js +2 -0
  252. package/static/js/8573.2eb0c558.chunk.js.LICENSE.txt +6 -0
  253. package/static/js/8576.7d2900f8.js +1 -0
  254. package/static/js/8652.dd930977.js +1 -0
  255. package/static/js/8671.6a83db75.js +1 -0
  256. package/static/js/8689.e2d021af.chunk.js +1 -0
  257. package/static/js/8738.3ba7b2e7.js +2 -0
  258. package/static/js/8738.3ba7b2e7.js.LICENSE.txt +87 -0
  259. package/static/js/8740.a2a83fd4.js +1 -0
  260. package/static/js/8849.822eb43c.chunk.js +2 -0
  261. package/static/js/8849.822eb43c.chunk.js.LICENSE.txt +6 -0
  262. package/static/js/8865.19a4685d.chunk.js +2 -0
  263. package/static/js/8865.19a4685d.chunk.js.LICENSE.txt +6 -0
  264. package/static/js/8879.10db9af5.js +2 -0
  265. package/static/js/8879.10db9af5.js.LICENSE.txt +86 -0
  266. package/static/js/8912.0202829b.js +1 -0
  267. package/static/js/898.f4c54861.js +1 -0
  268. package/static/js/9009.3a3823fe.chunk.js +2 -0
  269. package/static/js/9009.3a3823fe.chunk.js.LICENSE.txt +10 -0
  270. package/static/js/9019.7efd13af.js +2 -0
  271. package/static/js/9019.7efd13af.js.LICENSE.txt +96 -0
  272. package/static/js/9328.74394e00.js +1 -0
  273. package/static/js/9331.fb590698.js +1 -0
  274. package/static/js/9420.28e956c3.js +1 -0
  275. package/static/js/9484.7637c43c.js +1 -0
  276. package/static/js/9485.9eeca498.chunk.js +2 -0
  277. package/static/js/9485.9eeca498.chunk.js.LICENSE.txt +6 -0
  278. package/static/js/9573.e444964a.chunk.js +2 -0
  279. package/static/js/9573.e444964a.chunk.js.LICENSE.txt +6 -0
  280. package/static/js/9669.d08bf80a.chunk.js +2 -0
  281. package/static/js/9669.d08bf80a.chunk.js.LICENSE.txt +6 -0
  282. package/static/js/9691.ca82588e.chunk.js +2 -0
  283. package/static/js/9691.ca82588e.chunk.js.LICENSE.txt +6 -0
  284. package/static/js/9723.c2245912.chunk.js +2 -0
  285. package/static/js/9723.c2245912.chunk.js.LICENSE.txt +6 -0
  286. package/static/js/9725.60640f5c.chunk.js +2 -0
  287. package/static/js/9725.60640f5c.chunk.js.LICENSE.txt +6 -0
  288. package/static/js/9800.0bef2fed.chunk.js +2 -0
  289. package/static/js/9800.0bef2fed.chunk.js.LICENSE.txt +6 -0
  290. package/static/js/9878.cca6854e.js +2 -0
  291. package/static/js/9878.cca6854e.js.LICENSE.txt +8 -0
  292. package/static/js/9895.8824cd4c.chunk.js +2 -0
  293. package/static/js/9895.8824cd4c.chunk.js.LICENSE.txt +6 -0
  294. package/static/js/9907.0d22d89d.js +1 -0
  295. package/static/js/9969.455a2030.chunk.js +2 -0
  296. package/static/js/9969.455a2030.chunk.js.LICENSE.txt +6 -0
  297. package/static/js/ant-locale/locale0.fdb32a9f.chunk.js +1 -0
  298. package/static/js/ant-locale/locale1.5b1308da.chunk.js +1 -0
  299. package/static/js/ant-locale/locale10.f74ae841.chunk.js +1 -0
  300. package/static/js/ant-locale/locale11.cf703a34.chunk.js +1 -0
  301. package/static/js/ant-locale/locale13.9bcbe954.chunk.js +1 -0
  302. package/static/js/ant-locale/locale14.cb658550.chunk.js +1 -0
  303. package/static/js/ant-locale/locale15.e80eb12a.chunk.js +1 -0
  304. package/static/js/ant-locale/locale16.49bc0148.chunk.js +1 -0
  305. package/static/js/ant-locale/locale17.2daaf9a6.chunk.js +1 -0
  306. package/static/js/ant-locale/locale18.f9e62843.chunk.js +1 -0
  307. package/static/js/ant-locale/locale19.c98c053a.chunk.js +1 -0
  308. package/static/js/ant-locale/locale2.b54c0d79.chunk.js +1 -0
  309. package/static/js/ant-locale/locale20.b5cb6b02.chunk.js +1 -0
  310. package/static/js/ant-locale/locale21.7764c4b3.chunk.js +1 -0
  311. package/static/js/ant-locale/locale22.5cbb9959.chunk.js +1 -0
  312. package/static/js/ant-locale/locale23.2342f692.chunk.js +1 -0
  313. package/static/js/ant-locale/locale24.3c622cfa.chunk.js +1 -0
  314. package/static/js/ant-locale/locale25.7658de4e.chunk.js +1 -0
  315. package/static/js/ant-locale/locale26.b7e751bd.chunk.js +1 -0
  316. package/static/js/ant-locale/locale27.a47676d9.chunk.js +1 -0
  317. package/static/js/ant-locale/locale28.c89eee28.chunk.js +1 -0
  318. package/static/js/ant-locale/locale3.48f0afe7.chunk.js +1 -0
  319. package/static/js/ant-locale/locale30.4d3672db.chunk.js +1 -0
  320. package/static/js/ant-locale/locale31.406215d5.chunk.js +1 -0
  321. package/static/js/ant-locale/locale32.6167b5e8.chunk.js +1 -0
  322. package/static/js/ant-locale/locale33.4be05b3c.chunk.js +1 -0
  323. package/static/js/ant-locale/locale34.3813ab2f.chunk.js +1 -0
  324. package/static/js/ant-locale/locale35.d58b9c31.chunk.js +1 -0
  325. package/static/js/ant-locale/locale36.34d5c9ee.chunk.js +1 -0
  326. package/static/js/ant-locale/locale37.1c16e25b.chunk.js +1 -0
  327. package/static/js/ant-locale/locale38.dfa6d712.chunk.js +1 -0
  328. package/static/js/ant-locale/locale39.31c90381.chunk.js +1 -0
  329. package/static/js/ant-locale/locale4.e6fdd0ee.chunk.js +1 -0
  330. package/static/js/ant-locale/locale40.fe7ab935.chunk.js +1 -0
  331. package/static/js/ant-locale/locale41.4dee0621.chunk.js +1 -0
  332. package/static/js/ant-locale/locale42.7061d0fc.chunk.js +1 -0
  333. package/static/js/ant-locale/locale43.b3c810a8.chunk.js +1 -0
  334. package/static/js/ant-locale/locale44.df0a5a76.chunk.js +1 -0
  335. package/static/js/ant-locale/locale45.a7f6f97e.chunk.js +1 -0
  336. package/static/js/ant-locale/locale46.8f49c2cd.chunk.js +1 -0
  337. package/static/js/ant-locale/locale47.b84733ce.chunk.js +1 -0
  338. package/static/js/ant-locale/locale48.bfb8c2b3.chunk.js +1 -0
  339. package/static/js/ant-locale/locale49.c67382b7.chunk.js +1 -0
  340. package/static/js/ant-locale/locale5.b2b61134.chunk.js +1 -0
  341. package/static/js/ant-locale/locale50.6520fd45.chunk.js +1 -0
  342. package/static/js/ant-locale/locale51.9b89fb56.chunk.js +1 -0
  343. package/static/js/ant-locale/locale52.11d21631.chunk.js +1 -0
  344. package/static/js/ant-locale/locale53.cea142dd.chunk.js +1 -0
  345. package/static/js/ant-locale/locale54.16ef125d.chunk.js +1 -0
  346. package/static/js/ant-locale/locale55.b1a653c1.chunk.js +1 -0
  347. package/static/js/ant-locale/locale56.83c76bd5.chunk.js +1 -0
  348. package/static/js/ant-locale/locale57.e685764a.chunk.js +1 -0
  349. package/static/js/ant-locale/locale58.d003f49e.chunk.js +1 -0
  350. package/static/js/ant-locale/locale59.556522b5.chunk.js +1 -0
  351. package/static/js/ant-locale/locale60.bf3ddb83.chunk.js +1 -0
  352. package/static/js/ant-locale/locale61.30fe9720.chunk.js +1 -0
  353. package/static/js/ant-locale/locale62.b21e6edb.chunk.js +1 -0
  354. package/static/js/ant-locale/locale63.8e66417e.chunk.js +1 -0
  355. package/static/js/ant-locale/locale64.fdae6858.chunk.js +1 -0
  356. package/static/js/ant-locale/locale65.58003560.chunk.js +1 -0
  357. package/static/js/ant-locale/locale66.94ea41f2.chunk.js +1 -0
  358. package/static/js/ant-locale/locale68.8a9f32b5.chunk.js +1 -0
  359. package/static/js/ant-locale/locale69.27295717.chunk.js +1 -0
  360. package/static/js/ant-locale/locale7.1509b3e0.chunk.js +1 -0
  361. package/static/js/ant-locale/locale70.964bc038.chunk.js +1 -0
  362. package/static/js/ant-locale/locale71.99926e0d.chunk.js +1 -0
  363. package/static/js/ant-locale/locale8.134136c4.chunk.js +1 -0
  364. package/static/js/ant-locale/locale9.9b87d751.chunk.js +1 -0
  365. package/static/js/mergeTags/locale0.23c595c1.chunk.js +1 -0
  366. package/static/js/mergeTags/locale1.3448e6cb.chunk.js +1 -0
  367. package/static/js/mocks.90ebae7c.chunk.js +1 -0
  368. package/static/js/useblocks_core.55eab1be.js +1 -0
  369. package/static/media/ai-image.7c42c2e1.png +0 -0
  370. package/static/media/codicon.f13d28f3.ttf +0 -0
  371. package/static/media/empty-image.1827d656.png +0 -0
  372. package/static/media/frame_dark.318d7ed5.png +0 -0
  373. package/static/media/frame_light.22a9b4ec.png +0 -0
  374. package/static/media/frame_template_gallery.85693b39.png +0 -0
  375. package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +1 -0
  376. package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +1 -0
  377. package/static/media/sign_up_01.33327158.png +0 -0
  378. package/static/media/sign_up_01_blocks.5538cfdb.png +0 -0
  379. package/static/media/sign_up_02.d99d2aa6.png +0 -0
  380. package/static/media/sign_up_02_blocks.837fc2c9.png +0 -0
  381. package/static/media/sign_up_03.5545ffad.png +0 -0
  382. package/static/media/sign_up_03_blocks.126601f7.png +0 -0
  383. package/static/media/sign_up_04.398a4ca5.png +0 -0
  384. package/static/media/sign_up_04_blocks.255c5c07.png +0 -0
  385. package/static/media/sign_up_05.4c58df1b.png +0 -0
  386. package/static/media/sign_up_05_blocks.431b6844.png +0 -0
  387. package/static/media/video.854adea5.png +0 -0
  388. package/translations.pot +92 -92
  389. package/ts.worker.js +2 -0
  390. package/ts.worker.js.LICENSE.txt +21 -0
  391. package/useblocks-esm.js +1 -0
  392. package/useblocks.d.ts +1072 -0
  393. package/useblocks.js +1 -0
  394. package/iframe/429.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[5969],{28965:(e,t,i)=>{i.d(t,{Zt:()=>c});var n=i(85345),o=i(99826),s=i(79734),r=i(95713),a=i(51209),l=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class d{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function c(e,t,i,o){const r=e.ordered(t).map(((e,n)=>function(e,t,i,n,o){return l(this,void 0,void 0,(function*(){try{const s=yield Promise.resolve(e.provideHover(i,n,o));if(s&&function(e){const t="undefined"!==typeof e.range,i="undefined"!==typeof e.contents&&e.contents&&e.contents.length>0;return t&&i}(s))return new d(e,s,t)}catch(r){(0,s.M_)(r)}}))}(e,n,t,i,o)));return n.AE.fromPromises(r).coalesce()}(0,r.ke)("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return c(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(a.u).hoverProvider,t,i,o.X.None)))},71823:(e,t,i)=>{i.r(t),i.d(t,{ModesHoverController:()=>de});var n=i(55746),o=i(33793),s=i(95713),r=i(93708),a=i(35725),l=i(21051),d=i(58811),c=i(69848),h=i(37600),u=i(8415),g=i(63102),p=i(21174),m=i(52174),f=i(85345),v=i(79734),_=i(16201),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},b=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"===typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,o,(t=e[i](t)).done,t.value)}))}}};class w{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class S extends o.jG{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new _.vl),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new f.uC((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new f.uC((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new f.uC((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(54).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,f.bI)((e=>this._computer.computeAsync(e))),(()=>{C(this,void 0,void 0,(function*(){var e,t;try{try{for(var i,n=b(this._asyncIterable);!(i=yield n.next()).done;){const e=i.value;e&&(this._result.push(e),this._fireResult())}}catch(o){e={error:o}}finally{try{i&&!i.done&&(t=n.return)&&(yield t.call(n))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(s){(0,v.dz)(s)}}))})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new w(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}var y=i(90420),L=i(75664),x=i(3660),I=i(3960),D=i(31141),k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};const R=c.$;let M=class e extends o.jG{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(E,this._editor)),this._isChangingDecorations=!1,this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const n of y.B2.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new P(this._editor,this._participants),this._hoverOperation=this._register(new S(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value,e.isComplete,e.hasLoadingMessage)}))),this._register(this._editor.onDidChangeModelDecorations((()=>{this._isChangingDecorations||this._onModelDecorationsChanged()}))),this._register(c.b2(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(m.dG.onDidChange((()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))})))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const i=n.suggestHoverAnchor(e);i&&t.push(i)}const i=e.target;if(6===i.type&&t.push(new y.hx(0,i.range)),7===i.type){const e=this._editor.getOption(45).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"===typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToText<e&&t.push(new y.hx(0,i.range))}return 0!==t.length&&(t.sort(((e,t)=>t.priority-e.priority)),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,i){this._startShowingAt(new y.hx(0,e),t,i)}_startShowingAt(e,t,i){if(!this._computer.anchor||!this._computer.anchor.equals(e)){if(this._hoverOperation.cancel(),this._widget.position)if(this._computer.anchor&&e.canAdoptVisibleHover(this._computer.anchor,this._widget.position)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,t)}}else this.hide();this._computer.anchor=e,this._computer.shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}containsNode(e){return this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e,t,i){this._messages=i?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(t,i){const{showAtPosition:n,showAtRange:s,highlightRange:r}=e.computeHoverRanges(t.range,i),a=new o.Cm,l=a.add(new A(this._keybindingService)),d=document.createDocumentFragment();let c=null;const h={fragment:d,statusBar:l,setColorPicker:e=>c=e,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const e of this._participants){const t=i.filter((t=>t.owner===e));t.length>0&&a.add(e.renderHoverParts(h,t))}if(l.hasContent&&d.appendChild(l.hoverElement),d.hasChildNodes()){if(r){const t=this._editor.createDecorationsCollection();try{this._isChangingDecorations=!0,t.set([{range:r,options:e._DECORATION_OPTIONS}])}finally{this._isChangingDecorations=!1}a.add((0,o.s)((()=>{try{this._isChangingDecorations=!0,t.clear()}finally{this._isChangingDecorations=!1}})))}this._widget.showAt(d,new T(c,n,s,this._editor.getOption(54).above,this._computer.shouldFocus,a))}else a.dispose()}static computeHoverRanges(e,t){const i=e.startLineNumber;let n=e.startColumn,o=e.endColumn,s=t[0].range,a=null;for(const l of t)s=r.Q.plusRange(s,l.range),l.range.startLineNumber===i&&l.range.endLineNumber===i&&(n=Math.min(n,l.range.startColumn),o=Math.max(o,l.range.endColumn)),l.forceShowAtRange&&(a=l.range);return{showAtPosition:a?a.getStartPosition():new g.y(e.startLineNumber,n),showAtRange:a||new r.Q(i,n,i,o),highlightRange:s}}};M._DECORATION_OPTIONS=p.kI.register({description:"content-hover-highlight",className:"hoverHighlight"}),M=k([N(1,x._Y),N(2,I.b)],M);class T{constructor(e,t,i,n,o,s){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=i,this.preferAbove=n,this.stoleFocus=o,this.disposables=s}}let E=class e extends o.jG{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=a.R.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new h.N),this._visibleData=null,this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(45)&&this._updateFont()}))),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return null!==(t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition)&&void 0!==t?t:null}get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return e.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(D.ob.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(45);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=""+i/t,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const e=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==e&&(this._hover.contentsDomNode.style.paddingBottom=e,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};E.ID="editor.contrib.contentHoverWidget",E=k([N(1,L.fN)],E);let A=class extends o.jG{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=R("div.hover-row.status-bar"),this.actionsElement=c.BC(this.hoverElement,R("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(h.j.render(this.actionsElement,e,i))}append(e){const t=c.BC(this.actionsElement,e);return this._hasContent=!0,t}};A=k([N(0,I.b)],A);class P{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(1!==t.type)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(i>t.range.startColumn||t.range.endColumn>s)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return f.AE.EMPTY;const i=P._getLineDecorations(this._editor,t);return f.AE.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):f.AE.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=P._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,u.Yc)(t)}}var O=i(82183),F=i(7965),H=i(49172);const U=c.$;class W extends o.jG{constructor(e,t,i=H.m5){super(),this._renderDisposeables=this._register(new o.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new h.N),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new F.T({editor:this._editor},t,i)),this._computer=new V(this._editor),this._hoverOperation=this._register(new S(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(45)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return W.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const e=U("div.hover-row.markdown-hover"),t=c.BC(e,U("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(n.value));t.appendChild(o.element),i.appendChild(e)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(60),s=i-n-(this._hover.containerDomNode.clientHeight-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(s),0)}px`}}W.ID="editor.contrib.modesGlyphHoverWidget";class V{constructor(e){this._editor=e,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!(0,O.it)(t)&&i.push(...(0,u._j)(t).map(e))}return i}}var z=i(84978),j=i(64709),B=i(87357),Q=i(49345),$=i(68040),K=i(25879),q=i(52491),G=i(769),Z=i(33643),Y=i(2525),J=i(30276),X=i(86480),ee=i(51209),te=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ie=function(e,t){return function(i,n){t(i,n,e)}};const ne=c.$;class oe{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const se={type:1,filter:{include:Z.gB.QuickFix},triggerAction:Z.fo.QuickFixHover};let re=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const a of t){const t=a.range.startLineNumber===n?a.range.startColumn:1,l=a.range.endLineNumber===n?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(i.uri,a);if(!d)continue;const c=new r.Q(e.range.startLineNumber,t,e.range.startLineNumber,l);s.push(new oe(this,c,d))}return s}renderHoverParts(e,t){if(!t.length)return o.jG.None;const i=new o.Cm;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>J.cj.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=ne("div.hover-row"),n=c.BC(i,ne("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=c.BC(n,ne("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!==typeof r){const e=ne("span");if(o){c.BC(e,ne("span")).innerText=o}const i=c.BC(e,ne("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(c.ko(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})));c.BC(i,ne("span")).innerText=r.value;const s=c.BC(n,e);s.style.opacity="0.6",s.style.paddingLeft="6px"}else{const e=c.BC(n,ne("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if((0,u.EI)(a))for(const{message:d,resource:h,startLineNumber:u,startColumn:g}of a){const e=c.BC(n,ne("div"));e.style.marginTop="8px";const i=c.BC(e,ne("a"));i.innerText=`${(0,$.P8)(h)}(${u}, ${g}): `,i.style.cursor="pointer",t.add(c.ko(i,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:g}}}).catch(v.dz)})));const o=c.BC(e,ne("span"));o.innerText=d,this._editor.applyFontInfo(o)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity!==J.cj.Error&&t.marker.severity!==J.cj.Warning&&t.marker.severity!==J.cj.Info||e.statusBar.addAction({label:z.kg("view problem","View Problem"),commandId:Y.NextMarkerAction.ID,run:()=>{var i;e.hide(),null===(i=Y.MarkerController.get(this._editor))||void 0===i||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(82)){const n=e.statusBar.append(ne("div"));this.recentMarkerCodeActionsInfo&&(J.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===J.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=z.kg("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?o.jG.None:i.add((0,f.EQ)((()=>n.textContent=z.kg("checkingForQuickFixes","Checking for quick fixes...")),200));n.textContent||(n.textContent=String.fromCharCode(160));const r=this.getCodeActions(t.marker);i.add((0,o.s)((()=>r.cancel()))),r.then((r=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:r.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return r.dispose(),void(n.textContent=z.kg("noQuickFixes","No quick fixes available"));n.style.display="none";let a=!1;i.add((0,o.s)((()=>{a||r.dispose()}))),e.statusBar.addAction({label:z.kg("quick fixes","Quick Fix..."),commandId:G.hi.Id,run:t=>{a=!0;const i=G.d1.get(this._editor),n=c.BK(t);e.hide(),null===i||void 0===i||i.showCodeActions(se,r,{x:n.left+6,y:n.top+n.height+6,width:n.width,height:n.height})}})}),v.dz)}}getCodeActions(e){return(0,f.SS)((t=>(0,q.dU)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new r.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),se,X.ke.None,t)))}};re=te([ie(1,K.A),ie(2,H.Cr),ie(3,ee.u)],re),(0,B.zy)(((e,t)=>{const i=e.getColor(j.vwp);i&&t.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${i}; }`);const n=e.getColor(j.FEE);n&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${n}; }`)}));var ae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},le=function(e,t){return function(i,n){t(i,n,e)}};let de=class e{constructor(e,t,i,n,s){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._toUnhook=new o.Cm,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(54)&&(this._unhookEvents(),this._hookEvents())}))}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=this._editor.getOption(54);this._isHoverEnabled=e.enabled,this._isHoverSticky=e.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._toUnhook.add(this._editor.onDidChangeModel((()=>this._hideWidgets()))),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;9!==t.type||t.detail!==E.ID?12===t.type&&t.detail===W.ID||(12!==t.type&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;const i=e.event.browserEvent.relatedTarget;(null===(t=this._contentWidget)||void 0===t?void 0:t.containsNode(i))||this._hideWidgets()}_onEditorMouseMove(e){var t,i,n,o,s;const r=e.target;if(this._isMouseDown&&this._hoverClicked)return;if(this._isHoverSticky&&9===r.type&&r.detail===E.ID)return;if(this._isHoverSticky&&!(null===(i=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===i?void 0:i.isCollapsed))return;if(!this._isHoverSticky&&9===r.type&&r.detail===E.ID&&(null===(n=this._contentWidget)||void 0===n?void 0:n.isColorPickerVisible()))return;if(this._isHoverSticky&&12===r.type&&r.detail===W.ID)return;if(!this._isHoverEnabled)return void this._hideWidgets();if(!this._getOrCreateContentWidget().maybeShowAt(e))return 2===r.type&&r.position?(null===(s=this._contentWidget)||void 0===s||s.hide(),this._glyphWidget||(this._glyphWidget=new W(this._editor,this._languageService,this._openerService)),void this._glyphWidget.startShowingAt(r.position.lineNumber)):void this._hideWidgets();null===(o=this._glyphWidget)||void 0===o||o.hide()}_onKeyDown(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(M,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};de.ID="editor.contrib.hover",de=ae([le(1,x._Y),le(2,H.Cr),le(3,l.L),le(4,L.fN)],de);class ce extends s.ks{constructor(){super({id:"editor.action.showHover",label:z.kg({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:a.R.editorTextFocus,primary:(0,n.m5)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;const i=de.get(t);if(!i)return;const n=t.getPosition(),o=new r.Q(n.lineNumber,n.column,n.lineNumber,n.column),s=2===t.getOption(2);i.showContentHover(o,1,s)}}class he extends s.ks{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:z.kg({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=de.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new r.Q(n.lineNumber,n.column,n.lineNumber,n.column),s=d.GotoDefinitionAtPositionEditorContribution.get(t);if(!s)return;s.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,!0)}))}}(0,s.HW)(de.ID,de),(0,s.Fl)(ce),(0,s.Fl)(he),y.B2.register(Q.xJ),y.B2.register(re),(0,B.zy)(((e,t)=>{const i=e.getColor(j.mH6);i&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${i}; }`);const n=e.getColor(j.WfR);n&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${n}; }`);const o=e.getColor(j.oZ8);o&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${o.transparent(.5)}; }`));const s=e.getColor(j.vwp);s&&t.addRule(`.monaco-editor .monaco-hover a { color: ${s}; }`);const r=e.getColor(j.FEE);r&&t.addRule(`.monaco-editor .monaco-hover a:hover { color: ${r}; }`);const a=e.getColor(j.Xo2);a&&t.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=e.getColor(j.rRi);l&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const d=e.getColor(j.S6W);d&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${d}; }`)}))},90420:(e,t,i)=>{i.d(t,{B2:()=>s,hx:()=>n,mm:()=>o});class n{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class o{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const s=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},49345:(e,t,i)=>{i.d(t,{eH:()=>b,fm:()=>S,xJ:()=>w});var n=i(69848),o=i(8415),s=i(85345),r=i(82183),a=i(33793),l=i(7965),d=i(63102),c=i(93708),h=i(21051),u=i(28965),g=i(84978),p=i(17030),m=i(49172),f=i(51209),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};const C=n.$;class b{constructor(e,t,i,n){this.owner=e,this.range=t,this.contents=i,this.ordinal=n}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let w=class{constructor(e,t,i,n,o){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=o,this.hoverOrdinal=2}createLoadingMessage(e){return new b(this,e.range,[(new r.Bc).appendText(g.kg("modesContentHover.loading","Loading..."))],2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),a=[];let l=1e3;const d=i.getLineLength(n),h=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:h});"number"===typeof u&&d>=u&&a.push(new b(this,e.range,[{value:g.kg("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],l++));for(const g of t){const t=g.range.startLineNumber===n?g.range.startColumn:1,i=g.range.endLineNumber===n?g.range.endColumn:s,d=g.options.hoverMessage;if(!d||(0,r.it)(d))continue;const h=new c.Q(e.range.startLineNumber,t,e.range.startLineNumber,i);a.push(new b(this,h,(0,o._j)(d),l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return s.AE.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return s.AE.EMPTY;const o=new d.y(e.range.startLineNumber,e.range.startColumn);return(0,u.Zt)(this._languageFeaturesService.hoverProvider,n,o,i).filter((e=>!(0,r.it)(e.hover.contents))).map((t=>{const i=t.hover.range?c.Q.lift(t.hover.range):e.range;return new b(this,i,t.hover.contents,t.ordinal)}))}renderHoverParts(e,t){return S(e,t,this._editor,this._languageService,this._openerService)}};function S(e,t,i,o,s){t.sort(((e,t)=>e.ordinal-t.ordinal));const d=new a.Cm;for(const a of t)for(const t of a.contents){if((0,r.it)(t))continue;const a=C("div.hover-row.markdown-hover"),c=n.BC(a,C("div.hover-contents")),h=d.add(new l.T({editor:i},o,s));d.add(h.onDidRenderAsync((()=>{c.className="hover-contents code-hover-contents",e.onContentsChanged()})));const u=d.add(h.render(t));c.appendChild(u.element),e.fragment.appendChild(a)}return d}w=v([_(1,h.L),_(2,m.Cr),_(3,p.pG),_(4,f.u)],w)},7499:(e,t,i)=>{i.r(t);var n=i(85345),o=i(79734),s=i(93363),r=i(95713),a=i(93708),l=i(4707),d=i(35725),c=i(21174),h=i(22371),u=i(69018),g=i(84978),p=i(87357);class m{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new l.L(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new l.L(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},v=function(e,t){return function(i,n){t(i,n,e)}};let _=class e{constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,i){this.currentRequest&&this.currentRequest.cancel();const r=this.editor.getSelection(),d=this.editor.getModel();if(!d||!r)return;let c=r;if(c.startLineNumber!==c.endLineNumber)return;const h=new s.$t(this.editor,5),u=d.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=(0,n.SS)((e=>this.editorWorkerService.navigateValueSet(u,c,i))),this.currentRequest.then((i=>{if(!i||!i.range||!i.value)return;if(!h.validate(this.editor))return;const s=a.Q.lift(i.range);let r=i.range;const d=i.value.length-(c.endColumn-c.startColumn);r={startLineNumber:r.startLineNumber,startColumn:r.startColumn,endLineNumber:r.endLineNumber,endColumn:r.startColumn+i.value.length},d>1&&(c=new l.L(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn+d-1));const u=new m(s,c,i.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,u),this.editor.pushUndoStop(),this.decorations.set([{range:r,options:e.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,n.wR)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(o.dz)})).catch(o.dz)):Promise.resolve(void 0)}};_.ID="editor.contrib.inPlaceReplaceController",_.DECORATION=c.kI.register({description:"in-place-replace",className:"valueSetReplacement"}),_=f([v(1,h.w)],_);class C extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:g.kg("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:d.R.writable,kbOpts:{kbExpr:d.R.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=_.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class b extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:g.kg("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:d.R.writable,kbOpts:{kbExpr:d.R.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=_.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}(0,r.HW)(_.ID,_),(0,r.Fl)(C),(0,r.Fl)(b),(0,p.zy)(((e,t)=>{const i=e.getColor(u.$u);i&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${i}; }`)}))},97177:(e,t,i)=>{function n(e,t){let i=0;for(let n=0;n<e.length;n++)"\t"===e.charAt(n)?i+=t:i++;return i}function o(e,t,i){e=e<0?0:e;let n="";if(!i){const i=Math.floor(e/t);e%=t;for(let e=0;e<i;e++)n+="\t"}for(let o=0;o<e;o++)n+=" ";return n}i.d(t,{c:()=>n,k:()=>o})},92793:(e,t,i)=>{i.r(t),i.d(t,{AutoIndentOnPaste:()=>R,AutoIndentOnPasteCommand:()=>N,ChangeIndentationSizeAction:()=>y,DetectIndentation:()=>I,IndentUsingSpaces:()=>x,IndentUsingTabs:()=>L,IndentationToSpacesAction:()=>w,IndentationToSpacesCommand:()=>T,IndentationToTabsAction:()=>S,IndentationToTabsCommand:()=>E,ReindentLinesAction:()=>D,ReindentSelectedLinesAction:()=>k,getReindentEditOperations:()=>b});var n=i(33793),o=i(22231),s=i(95713),r=i(21887),a=i(91536),l=i(93708),d=i(4707),c=i(35725),h=i(7117),u=i(61883),g=i(97177),p=i(84978),m=i(956),f=i(35246),v=i(95972),_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};function b(e,t,i,n,s){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const l=t.getLanguageConfiguration(e.getLanguageId()).indentationRules;if(!l)return[];for(n=Math.min(n,e.getLineCount());i<=n&&l.unIndentedLinePattern;){const t=e.getLineContent(i);if(!l.unIndentedLinePattern.test(t))break;i++}if(i>n-1)return[];const{tabSize:c,indentSize:h,insertSpaces:u}=e.getOptions(),g=(e,t)=>(t=t||1,r.Y.shiftIndent(e,e.length+t,c,h,u)),p=(e,t)=>(t=t||1,r.Y.unshiftIndent(e,e.length+t,c,h,u)),m=[];let v;const _=e.getLineContent(i);let C=_;if(void 0!==s&&null!==s){v=s;const e=o.UU(_);C=v+_.substring(e.length),l.decreaseIndentPattern&&l.decreaseIndentPattern.test(C)&&(v=p(v),C=v+_.substring(e.length)),_!==C&&m.push(a.k.replaceMove(new d.L(i,1,i,e.length+1),(0,f.P)(v,h,u)))}else v=o.UU(_);let b=v;l.increaseIndentPattern&&l.increaseIndentPattern.test(C)?(b=g(b),v=g(v)):l.indentNextLinePattern&&l.indentNextLinePattern.test(C)&&(b=g(b));for(let r=++i;r<=n;r++){const t=e.getLineContent(r),i=o.UU(t),n=b+t.substring(i.length);l.decreaseIndentPattern&&l.decreaseIndentPattern.test(n)&&(b=p(b),v=p(v)),i!==b&&m.push(a.k.replaceMove(new d.L(r,1,r,i.length+1),(0,f.P)(b,h,u))),l.unIndentedLinePattern&&l.unIndentedLinePattern.test(t)||(l.increaseIndentPattern&&l.increaseIndentPattern.test(n)?(v=g(v),b=v):b=l.indentNextLinePattern&&l.indentNextLinePattern.test(n)?g(b):v)}return m}class w extends s.ks{constructor(){super({id:w.ID,label:p.kg("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:c.R.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new T(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}w.ID="editor.action.indentationToSpaces";class S extends s.ks{constructor(){super({id:S.ID,label:p.kg("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:c.R.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new E(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}S.ID="editor.action.indentationToTabs";class y extends s.ks{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get(m.GK),n=e.get(u.S),o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize?p.kg("configuredTabSize","Configured Tab Size"):void 0}))),a=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(r,{placeHolder:p.kg({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:r[a]}).then((e=>{e&&o&&!o.isDisposed()&&o.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})}))}),50)}}class L extends y{constructor(){super(!1,{id:L.ID,label:p.kg("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}L.ID="editor.action.indentUsingTabs";class x extends y{constructor(){super(!0,{id:x.ID,label:p.kg("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}x.ID="editor.action.indentUsingSpaces";class I extends s.ks{constructor(){super({id:I.ID,label:p.kg("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(u.S),n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}I.ID="editor.action.detectIndentation";class D extends s.ks{constructor(){super({id:"editor.action.reindentlines",label:p.kg("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:c.R.writable})}run(e,t){const i=e.get(h.JZ),n=t.getModel();if(!n)return;const o=b(n,i,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class k extends s.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:p.kg("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:c.R.writable})}run(e,t){const i=e.get(h.JZ),n=t.getModel();if(!n)return;const o=t.getSelections();if(null===o)return;const s=[];for(const r of o){let e=r.startLineNumber,t=r.endLineNumber;if(e!==t&&1===r.endColumn&&t--,1===e){if(e===t)continue}else e--;const o=b(n,i,e,t);s.push(...o)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class N{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&"string"===typeof i.text&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(l.Q.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let R=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.Cm,this.callOnModel=new n.Cm,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(9)<4||this.editor.getOption(49)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:s,indentSize:a,insertSpaces:d}=i.getOptions(),c=[],h={shiftIndent:e=>r.Y.shiftIndent(e,e.length+1,s,a,d),unshiftIndent:e=>r.Y.unshiftIndent(e,e.length+1,s,a,d)};let u=e.startLineNumber;for(;u<=e.endLineNumber&&this.shouldIgnoreLine(i,u);)u++;if(u>e.endLineNumber)return;let p=i.getLineContent(u);if(!/\S/.test(p.substring(0,e.startColumn-1))){const e=(0,v.$f)(n,i,i.getLanguageId(),u,h,this._languageConfigurationService);if(null!==e){const t=o.UU(p),n=g.c(e,s);if(n!==g.c(t,s)){const e=g.k(n,s,d);c.push({range:new l.Q(u,1,u,t.length+1),text:e}),p=e+p.substr(t.length)}else{const e=(0,v.Yb)(i,u,this._languageConfigurationService);if(0===e||8===e)return}}}const m=u;for(;u<e.endLineNumber&&!/\S/.test(i.getLineContent(u+1));)u++;if(u!==e.endLineNumber){const t={tokenization:{getLineTokens:e=>i.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===m?p:i.getLineContent(e)},r=(0,v.$f)(n,t,i.getLanguageId(),u+1,h,this._languageConfigurationService);if(null!==r){const t=g.c(r,s),n=g.c(o.UU(i.getLineContent(u+1)),s);if(t!==n){const r=t-n;for(let t=u+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),n=o.UU(e),a=g.c(n,s)+r,h=g.k(a,s,d);h!==n&&c.push({range:new l.Q(t,1,t,n.length+1),text:h})}}}}if(c.length>0){this.editor.pushUndoStop();const e=new N(c,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function M(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let r=0;r<i;r++)o+=" ";const s=new RegExp(o,"gi");for(let r=1,a=e.getLineCount();r<=a;r++){let i=e.getLineFirstNonWhitespaceColumn(r);if(0===i&&(i=e.getLineMaxColumn(r)),1===i)continue;const a=new l.Q(r,1,r,i),d=e.getValueInRange(a),c=n?d.replace(/\t/gi,o):d.replace(s,"\t");t.addEditOperation(a,c)}}R.ID="editor.contrib.autoIndentOnPaste",R=_([C(1,h.JZ)],R);class T{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),M(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class E{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),M(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,s.HW)(R.ID,R),(0,s.Fl)(w),(0,s.Fl)(S),(0,s.Fl)(L),(0,s.Fl)(x),(0,s.Fl)(I),(0,s.Fl)(D),(0,s.Fl)(k)},56033:(e,t,i)=>{i.r(t);var n=i(95713),o=i(90420),s=i(69848),r=i(8415),a=i(85345),l=i(99826),d=i(79734),c=i(33793),h=i(19459),u=i(86448),g=i(34235),p=i(68935),m=i(99281),f=i(91536),v=i(93708),_=i(52174),C=i(1528),b=i(21174),w=i(56345),S=i(51209),y=i(11615),L=i(43364),x=i(63102),I=i(15263),D=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class k{constructor(e,t){this.range=e,this.direction=t}}class N{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new N(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return D(this,void 0,void 0,(function*(){if("function"===typeof this.provider.resolveInlayHint){if(this._currentResolve){if(yield this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),yield this._currentResolve}}))}_doResolve(e){var t,i;return D(this,void 0,void 0,(function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null===n||void 0===n?void 0:n.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null===n||void 0===n?void 0:n.label)&&void 0!==i?i:this.hint.label,this._isResolved=!0}catch(n){(0,d.M_)(n),this._isResolved=!1}}))}}class R{constructor(e,t,i){this._disposables=new c.Cm,this.ranges=e,this.provider=new Set;const n=[];for(const[o,s]of t){this._disposables.add(o),this.provider.add(s);for(const e of o.hints){const t=i.validatePosition(e.position);let o="before";const r=R._getRangeAtPosition(i,t);let a;r.getStartPosition().isBefore(t)?(a=v.Q.fromPositions(r.getStartPosition(),t),o="after"):(a=v.Q.fromPositions(t,r.getEndPosition()),o="before"),n.push(new N(e,new k(a,o),s))}}this.items=n.sort(((e,t)=>x.y.compare(e.hint.position,t.hint.position)))}static create(e,t,i,n){return D(this,void 0,void 0,(function*(){const o=[],s=e.ordered(t).reverse().map((e=>i.map((i=>D(this,void 0,void 0,(function*(){try{const s=yield e.provideInlayHints(t,i,n);(null===s||void 0===s?void 0:s.hints.length)&&o.push([s,e])}catch(s){(0,d.M_)(s)}}))))));if(yield Promise.all(s.flat()),n.isCancellationRequested||t.isDisposed())throw new d.AL;return new R(i,o,t)}))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new v.Q(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=t.column-1,r=o.findTokenIndexAtOffset(s);let a=o.getStartOffset(r),l=o.getEndOffset(r);return l-a===1&&(a===s&&r>1?(a=o.getStartOffset(r-1),l=o.getEndOffset(r-1)):l===s&&r<o.getCount()-1&&(a=o.getStartOffset(r+1),l=o.getEndOffset(r+1))),new v.Q(i,a+1,i,l+1)}}var M=i(25442),T=i(44238),E=i(55643),A=i(52692),P=i(93308),O=i(75664),F=i(70497),H=i(3660),U=i(24096),W=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function V(e,t,i,o){var r;return W(this,void 0,void 0,(function*(){const a=e.get(y.b),d=e.get(F.Z),c=e.get(P.wT),h=e.get(H._Y),u=e.get(U.Ot);if(yield o.item.resolve(l.X.None),!o.part.location)return;const g=o.part.location,p=[],m=new Set(A.ZG.getMenuItems(A.D8.EditorContext).map((e=>(0,A.is)(e)?e.command.id:"")));for(const e of n.dS.getEditorActions())e instanceof T.SymbolNavigationAction&&m.has(e.id)&&p.push(new M.rc(e.id,e.label,void 0,!0,(()=>W(this,void 0,void 0,(function*(){const i=yield a.createModelReference(g.uri);try{yield h.invokeFunction(e.run.bind(e),t,new T.SymbolNavigationAnchor(i.object.textEditorModel,v.Q.getStartPosition(g.range)))}finally{i.dispose()}})))));if(o.part.command){const{command:e}=o.part;p.push(new M.wv),p.push(new M.rc(e.id,e.title,void 0,!0,(()=>W(this,void 0,void 0,(function*(){var t;try{yield c.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(i){u.notify({severity:U.AI.Error,source:o.item.provider.displayName,message:i})}})))))}const f=t.getOption(116);d.showContextMenu({domForShadowRoot:f&&null!==(r=t.getDomNode())&&void 0!==r?r:void 0,getAnchor:()=>{const e=s.BK(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>p,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}))}function z(e,t,i,n){return W(this,void 0,void 0,(function*(){const o=e.get(y.b),s=yield o.createModelReference(n.uri);yield i.invokeWithinContext((e=>W(this,void 0,void 0,(function*(){const o=t.hasSideBySideModifier,r=e.get(O.fN),a=E.x2.inPeekEditor.getValue(r),l=!o&&i.getOption(79)&&!a;return new T.DefinitionAction({openToSide:o,openInPeek:l,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,i,{model:s.object.textEditorModel,position:v.Q.getStartPosition(n.range)})})))),s.dispose()}))}var j=i(22967),B=i(64709),Q=i(87357),$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},K=function(e,t){return function(i,n){t(i,n,e)}},q=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class G{constructor(){this._entries=new h.qK(50)}get(e){const t=G._key(e);return this._entries.get(t)}set(e,t){const i=G._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const Z=(0,H.u1)("IInlayHintsCache");(0,j.v)(Z,G,!0);class Y{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"===typeof e?{label:e}:e[this.index]}}class J{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let X=class e{constructor(e,t,i,n,o,s,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=r,this._disposables=new c.Cm,this._sessionDisposables=new c.Cm,this._decorationsMetadata=new Map,this._ruleFactory=new p.Qn(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(128)&&this._update()}))),this._update()}static get(t){var i;return null!==(i=t.getContribution(e.ID))&&void 0!==i?i:void 0}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(128);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,c.s)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const o=new Set,r=new a.uC((()=>q(this,void 0,void 0,(function*(){const e=Date.now();null===n||void 0===n||n.dispose(!0),n=new l.Q;const i=t.onWillDispose((()=>null===n||void 0===n?void 0:n.cancel()));try{const i=n.token,s=yield R.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(r.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void s.dispose();for(const e of s.provider)"function"!==typeof e.onDidChangeInlayHints||o.has(e)||(o.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{r.isScheduled()||r.schedule()}))));this._sessionDisposables.add(s),this._updateHintsDecorators(s.ranges,s.items),this._cacheHintsForFastRestore(t)}catch(s){(0,d.dz)(s)}finally{n.dispose(),i.dispose()}}))),this._debounceInfo.get(t));if(this._sessionDisposables.add(r),this._sessionDisposables.add((0,c.s)((()=>null===n||void 0===n?void 0:n.dispose(!0)))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&r.isScheduled()||r.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{const t=Math.max(r.delay,1250);r.schedule(t)}))),"on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(s.Di.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),r.schedule(0)}})))}this._sessionDisposables.add(this._installDblClickGesture((()=>r.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new c.Cm,t=e.add(new L.gi(this._editor)),i=new c.Cm;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),o=this._editor.getModel();if(!n||!o)return void i.clear();const s=new l.Q;i.add((0,c.s)((()=>s.dispose(!0)))),n.item.resolve(s.token),this._activeInlayHintPart=n.part.command||n.part.location?new J(n,t.hasTriggerModifier):void 0;const r=n.item.hint.position.lineNumber,a=new v.Q(r,1,r,o.getLineMaxColumn(r)),d=this._getInlineHintsForRange(a);this._updateHintsDecorators([a],d),i.add((0,c.s)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([a],d)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((e=>q(this,void 0,void 0,(function*(){const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(z,e,this._editor,i.location):_.uB.is(i.command)&&(yield this._invokeCommand(i.command,t.item))}}))))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((t=>q(this,void 0,void 0,(function*(){if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),yield i.item.resolve(l.X.None),(0,r.EI)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>f.k.replace(v.Q.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))))}_installContextMenu(){return this._editor.onContextMenu((e=>q(this,void 0,void 0,(function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(V,this._editor,e.event.target,t))}))))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof b.Ho&&(null===i||void 0===i?void 0:i.attachedData)instanceof Y?i.attachedData:void 0}_invokeCommand(e,t){var i;return q(this,void 0,void 0,(function*(){try{yield this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(n){this._notificationService.notify({severity:U.AI.Error,source:t.provider.displayName,message:n})}}))}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const o=e.getDecorationRange(i);if(o){const e=new k(o,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(v.Q.compareRangesUsingStarts)){const t=e.validateRange(new v.Q(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&v.Q.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=v.Q.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(t,i){var n,o;const s=[],a=(e,t,i,n,o)=>{const r={content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:o};s.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},l=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(d/3|0)+"px",display:"inline-block"});a(e,i,"\u200a",t?C.VW.Right:C.VW.None)},{fontSize:d,fontFamily:c,padding:h,isUniform:u}=this._getLayoutInfo(),g="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(g,c);for(const f of i){f.hint.paddingLeft&&l(f,!1);const t="string"===typeof f.hint.label?[{label:f.hint.label}]:f.hint.label;for(let e=0;e<t.length;e++){const i=t[e],o=0===e,s=e===t.length-1,l={fontSize:`${d}px`,fontFamily:`var(${g}), ${m.jU.fontFamily}`,verticalAlign:u?"baseline":"middle"};(0,r.EI)(f.hint.textEdits)&&(l.cursor="default"),this._fillInColors(l,f.hint),(i.command||i.location)&&(null===(n=this._activeInlayHintPart)||void 0===n?void 0:n.part.item)===f&&this._activeInlayHintPart.part.index===e&&(l.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(l.color=(0,Q.Yf)(B.Ztu),l.cursor="pointer")),h&&(o&&s?(l.padding=`1px ${0|Math.max(1,d/4)}px`,l.borderRadius=(d/4|0)+"px"):o?(l.padding=`1px 0 1px ${0|Math.max(1,d/4)}px`,l.borderRadius=`${d/4|0}px 0 0 ${d/4|0}px`):s?(l.padding=`1px ${0|Math.max(1,d/4)}px 1px 0`,l.borderRadius=`0 ${d/4|0}px ${d/4|0}px 0`):l.padding="1px 0 1px 0"),a(f,this._ruleFactory.createClassNameRef(l),ee(i.label),s&&!f.hint.paddingRight?C.VW.Right:C.VW.None,new Y(f,e))}if(f.hint.paddingRight&&l(f,!0),s.length>e._MAX_DECORATORS)break}const p=[];for(const e of t)for(const{id:t}of null!==(o=this._editor.getDecorationsInRange(e))&&void 0!==o?o:[]){const e=this._decorationsMetadata.get(t);e&&(p.push(t),e.classNameRef.dispose(),this._decorationsMetadata.delete(t))}this._editor.changeDecorations((e=>{const t=e.deltaDecorations(p,s.map((e=>e.decoration)));for(let i=0;i<t.length;i++){const e=s[i];this._decorationsMetadata.set(t[i],e)}}))}_fillInColors(e,t){t.kind===_.r4.Parameter?(e.backgroundColor=(0,Q.Yf)(B.B2L),e.color=(0,Q.Yf)(B.sjA)):t.kind===_.r4.Type?(e.backgroundColor=(0,Q.Yf)(B._pU),e.color=(0,Q.Yf)(B.HwT)):(e.backgroundColor=(0,Q.Yf)(B.WL6),e.color=(0,Q.Yf)(B.P6i))}_getLayoutInfo(){const e=this._editor.getOption(128),t=e.padding,i=this._editor.getOption(47),n=this._editor.getOption(44);let o=e.fontSize;(!o||o<5||o>i)&&(o=i);const s=e.fontFamily||n;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===n&&o===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};function ee(e){return e.replace(/[ \t]/g,"\xa0")}X.ID="editor.contrib.InlayHints",X._MAX_DECORATORS=1500,X=$([K(1,S.u),K(2,w.U),K(3,Z),K(4,P.wT),K(5,U.Ot),K(6,H._Y)],X),P.wb.registerCommand("_executeInlayHintProvider",((e,...t)=>q(void 0,void 0,void 0,(function*(){const[i,n]=t;(0,u.j)(g.r.isUri(i)),(0,u.j)(v.Q.isIRange(n));const{inlayHintsProvider:o}=e.get(S.u),s=yield e.get(y.b).createModelReference(i);try{const e=yield R.create(o,s.object.textEditorModel,[v.Q.lift(n)],l.X.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{s.dispose()}}))));var te=i(82183),ie=i(21051),ne=i(28965),oe=i(49345),se=i(17030),re=i(49172),ae=i(84978),le=i(76394),de=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ce=function(e,t){return function(i,n){t(i,n,e)}},he=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},ue=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"===typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,o,(t=e[i](t)).done,t.value)}))}}};class ge extends o.mm{constructor(e,t){super(10,t,e.item.anchor.range),this.part=e}}let pe=class extends oe.xJ{constructor(e,t,i,n,o,s){super(e,t,i,n,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!X.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof b.Ho&&i.attachedData instanceof Y?new ge(i.attachedData,this):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof ge?new a.AE((t=>he(this,void 0,void 0,(function*(){var n,o;const{part:s}=e;if(yield s.item.resolve(i),i.isCancellationRequested)return;let a,l;if("string"===typeof s.item.hint.tooltip?a=(new te.Bc).appendText(s.item.hint.tooltip):s.item.hint.tooltip&&(a=s.item.hint.tooltip),a&&t.emitOne(new oe.eH(this,e.range,[a],0)),(0,r.EI)(s.item.hint.textEdits)&&t.emitOne(new oe.eH(this,e.range,[(new te.Bc).appendText((0,ae.kg)("hint.dbl","Double click to insert"))],10001)),"string"===typeof s.part.tooltip?l=(new te.Bc).appendText(s.part.tooltip):s.part.tooltip&&(l=s.part.tooltip),l&&t.emitOne(new oe.eH(this,e.range,[l],1)),s.part.location||s.part.command){let i;const n="altKey"===this._editor.getOption(71)?le.zx?(0,ae.kg)("links.navigate.kb.meta.mac","cmd + click"):(0,ae.kg)("links.navigate.kb.meta","ctrl + click"):le.zx?(0,ae.kg)("links.navigate.kb.alt.mac","option + click"):(0,ae.kg)("links.navigate.kb.alt","alt + click");s.part.location&&s.part.command?i=(new te.Bc).appendText((0,ae.kg)("hint.defAndCommand","Go to Definition ({0}), right click for more",n)):s.part.location?i=(new te.Bc).appendText((0,ae.kg)("hint.def","Go to Definition ({0})",n)):s.part.command&&(i=new te.Bc(`[${(0,ae.kg)("hint.cmd","Execute Command")}](${d=s.part.command,g.r.from({scheme:I.ny.command,path:d.id,query:d.arguments&&encodeURIComponent(JSON.stringify(d.arguments))}).toString()} "${s.part.command.title}") (${n})`,{isTrusted:!0})),i&&t.emitOne(new oe.eH(this,e.range,[i],1e4))}var d;const c=yield this._resolveInlayHintLabelPartHover(s,i);try{for(var h,u=ue(c);!(h=yield u.next()).done;){const e=h.value;t.emitOne(e)}}catch(p){n={error:p}}finally{try{h&&!h.done&&(o=u.return)&&(yield o.call(u))}finally{if(n)throw n.error}}})))):a.AE.EMPTY}_resolveInlayHintLabelPartHover(e,t){return he(this,void 0,void 0,(function*(){if(!e.part.location)return a.AE.EMPTY;const{uri:i,range:n}=e.part.location,o=yield this._resolverService.createModelReference(i);try{const i=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,ne.Zt)(this._languageFeaturesService.hoverProvider,i,new x.y(n.startLineNumber,n.startColumn),t).filter((e=>!(0,te.it)(e.hover.contents))).map((t=>new oe.eH(this,e.item.anchor.range,t.hover.contents,2+t.ordinal))):a.AE.EMPTY}finally{o.dispose()}}))}};pe=de([ce(1,ie.L),ce(2,re.Cr),ce(3,se.pG),ce(4,y.b),ce(5,S.u)],pe),(0,n.HW)(X.ID,X),o.B2.register(pe)},13481:(e,t,i)=>{i.r(t),i.d(t,{commitInlineSuggestionAction:()=>tt});var n=i(95713),o=i(35725),s=i(90420);const r="editor.action.inlineSuggest.commit";var a=i(16201),l=i(33793),d=i(22231),c=i(8688),h=i(63102),u=i(52174),g=i(85345),p=i(99826),m=i(79734),f=i(63415),v=i(91536),_=i(93708);class C{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)"\n"===e.charAt(t)&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}const b=[];class w{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1];return function(e,t){const i=new C(e),n=t.map((e=>{const t=_.Q.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const o of n)e=e.substring(0,o.startOffset)+o.text+e.substring(o.endOffset);return e}(e.substr(0,t.column-1),this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")})))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}}class S{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class y{constructor(e,t,i,n,o=0){this.lineNumber=e,this.columnStart=t,this.length=i,this.newLines=n,this.additionalReservedLineCount=o,this.parts=[new S(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join("\n")}}class L extends l.jG{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new a.vl,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(107)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()})))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}var x=i(93308),I=i(75923);function D(e,t){if(!t)return t;const i=e.getValueInRange(t.range),n=d.Qp(i,t.insertText),o=e.getOffsetAt(t.range.getStartPosition())+n,s=e.getPositionAt(o),r=i.substr(n),a=d.Vi(r,t.insertText),l=e.getPositionAt(Math.max(o,e.getOffsetAt(t.range.getEndPosition())-a));return{range:_.Q.fromPositions(s,l),insertText:t.insertText.substr(n,t.insertText.length-n-a),snippetInfo:t.snippetInfo,filterText:t.filterText,additionalTextEdits:t.additionalTextEdits}}function k(e,t,i,n,o=0){if(e.range.startLineNumber!==e.range.endLineNumber)return;const s=t.getLineContent(e.range.startLineNumber),r=d.UU(s).length;if(e.range.startColumn-1<=r){const t=d.UU(e.insertText).length,i=s.substring(e.range.startColumn-1,r),n=_.Q.fromPositions(e.range.getStartPosition().delta(0,i.length),e.range.getEndPosition()),o=e.insertText.startsWith(i)?e.insertText.substring(i.length):e.insertText.substring(t);e={range:n,insertText:o,command:e.command,snippetInfo:void 0,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}const a=t.getValueInRange(e.range),l=function(e,t){if((null===N||void 0===N?void 0:N.originalValue)===e&&(null===N||void 0===N?void 0:N.newValue)===t)return null===N||void 0===N?void 0:N.changes;{let i=M(e,t,!0);if(i){const n=R(i);if(n>0){const o=M(e,t,!1);o&&R(o)<n&&(i=o)}}return N={originalValue:e,newValue:t,changes:i},i}}(a,e.insertText);if(!l)return;const c=e.range.startLineNumber,h=new Array;if("prefix"===i){const e=l.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==a.length)return}const u=e.insertText.length-o;for(const g of l){const t=e.range.startColumn+g.originalStart+g.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===e.range.startLineNumber&&t<n.column)return;if(g.originalLength>0)return;if(0===g.modifiedLength)continue;const o=g.modifiedStart+g.modifiedLength,s=Math.max(g.modifiedStart,Math.min(o,u)),r=e.insertText.substring(g.modifiedStart,s),a=e.insertText.substring(s,Math.max(g.modifiedStart,o));if(r.length>0){const e=d.uz(r);h.push(new S(t,e,!1))}if(a.length>0){const e=d.uz(a);h.push(new S(t,e,!0))}}return new w(c,h,0)}let N;function R(e){let t=0;for(const i of e)t+=Math.max(i.originalLength-i.modifiedLength,0);return t}function M(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);n>t&&(t=n)}return t}const o=Math.max(n(e),n(t));function s(e){if(e<0)throw new Error("unexpected");return o+e+1}function r(e){let t=0,n=0;const o=new Int32Array(e.length);for(let r=0,a=e.length;r<a;r++)if(i&&"("===e[r]){const e=100*n+t;o[r]=s(2*e),t++}else if(i&&")"===e[r]){t=Math.max(t-1,0);const e=100*n+t;o[r]=s(2*e+1),0===t&&n++}else o[r]=e.charCodeAt(r);return o}const a=r(e),l=r(t);return new I.uP({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var T=i(7117),E=i(12900),A=i(51209),P=i(56345),O=i(7422),F=i(53607),H=i(86448),U=i(74790),W=i(17030),V=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}},j=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let B=class extends l.jG{constructor(e,t,i,n,o,s,d){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurationService=n,this.languageFeaturesService=o,this.debounceService=s,this.onDidChangeEmitter=new a.vl,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new l.HE),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(i.onDidExecuteCommand((t=>{new Set([f.CoreEditingCommands.Tab.id,f.CoreEditingCommands.DeleteLeft.id,f.CoreEditingCommands.DeleteRight.id,r,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()}))),this._register(this.editor.onDidType((e=>{this.handleUserInput()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{(3===e.reason||this.session&&!this.session.isValid)&&this.hide()}))),this._register((0,l.s)((()=>{this.disposed=!0}))),this._register(this.editor.onDidBlurEditorWidget((()=>{d.getValue("editor.inlineSuggest.hideOnBlur")||this.hide()})))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout((()=>{this.disposed||this.startSessionIfTriggered()}),0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(56).enabled&&(this.session&&this.session.isValid||this.trigger(u.qw.Automatic))}trigger(e){this.completionSession.value?e===u.qw.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext():(this.completionSession.value=new Q(this.editor,this.editor.getPosition(),(()=>this.active),this.commandService,this.cache,e,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange((()=>{this.onDidChangeEmitter.fire()}))))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return j(this,void 0,void 0,(function*(){const t=yield null===(e=this.session)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};B=V([z(2,x.wT),z(3,T.JZ),z(4,A.u),z(5,P.U),z(6,W.pG)],B);class Q extends L{constructor(e,t,i,n,o,s,r,a,d){let c;super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=o,this.initialTriggerKind=s,this.languageConfigurationService=r,this.registry=a,this.debounce=d,this.minReservedLineCount=0,this.updateOperation=this._register(new l.HE),this.updateSoon=this._register(new g.uC((()=>{const e=this.initialTriggerKind;return this.initialTriggerKind=u.qw.Automatic,this.update(e)}),50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0,this._register(this.onDidChange((()=>{var e;const t=this.currentCompletion;if(t&&t.sourceInlineCompletion!==c){c=t.sourceInlineCompletion;const i=t.sourceProvider;null===(e=i.handleItemDidShow)||void 0===e||e.call(i,t.sourceInlineCompletions,c)}}))),this._register((0,l.s)((()=>{this.cache.clear()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{var t;3!==e.reason&&(null===(t=this.cache.value)||void 0===t||t.updateRanges(),this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire()))}))),this._register(this.editor.onDidChangeModelContent((e=>{var t;null===(t=this.cache.value)||void 0===t||t.updateRanges(),this.updateFilteredInlineCompletions(),this.scheduleAutomaticUpdate()}))),this._register(this.registry.onDidChange((()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}))),this.scheduleAutomaticUpdate()}updateFilteredInlineCompletions(){if(!this.cache.value)return void(this.filteredCompletions=[]);const e=this.editor.getModel(),t=e.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter((i=>{const n=e.getValueInRange(i.synchronizedRange).toLowerCase(),o=i.inlineCompletion.filterText.toLowerCase(),s=e.getLineIndentColumn(i.synchronizedRange.startLineNumber),r=Math.max(0,t.column-i.synchronizedRange.startColumn);let a=o.substring(0,r),l=o.substring(r),d=n.substring(0,r),c=n.substring(r);return i.synchronizedRange.startColumn<=s&&(d=d.trimStart(),0===d.length&&(c=c.trimStart()),a=a.trimStart(),0===a.length&&(l=l.trimStart())),a.startsWith(d)&&(0,U.dE)(c,l)}))}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.filteredCompletions.findIndex((e=>e.semanticId===this.currentlySelectedCompletionId));return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){return j(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){return j(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const e=this.filteredCompletions||[];if(e.length>0){const t=(this.fixAndGetIndexOfCurrentSelection()+e.length-1)%e.length;this.currentlySelectedCompletionId=e[t].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}ensureUpdateWithExplicitContext(){var e;return j(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===u.qw.Explicit?yield this.updateOperation.value.promise:yield this.update(u.qw.Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==u.qw.Explicit&&(yield this.update(u.qw.Explicit))}))}hasMultipleInlineCompletions(){var e;return j(this,void 0,void 0,(function*(){return yield this.ensureUpdateWithExplicitContext(),((null===(e=this.cache.value)||void 0===e?void 0:e.completions.length)||0)>1}))}get ghostText(){const e=this.currentCompletion;if(!e)return;const t=this.editor.getPosition();if(e.range.getEndPosition().isBefore(t))return;const i=this.editor.getOptions().get(56).mode,n=k(e,this.editor.getModel(),i,t);if(n){if(n.isEmpty())return;return n}return new y(e.range.startLineNumber,e.range.startColumn,e.range.endColumn-e.range.startColumn,e.insertText.split("\n"),0)}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return j(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=(0,g.SS)((n=>j(this,void 0,void 0,(function*(){let o;try{o=yield G(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},n,this.languageConfigurationService);const s=new Date;this.debounce.update(this.editor.getModel(),s.getTime()-i.getTime())}catch(s){return void(0,m.dz)(s)}n.isCancellationRequested||(this.cache.setValue(this.editor,o,e),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})))),o=new $(n,e);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){var t;const i=this.cache.clearAndLeak();e.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[v.k.replaceMove(e.range,""),...e.additionalTextEdits]),this.editor.setPosition(e.snippetInfo.range.getStartPosition()),null===(t=F.SnippetController2.get(this.editor))||void 0===t||t.insert(e.snippetInfo.snippet)):this.editor.executeEdits("inlineSuggestion.accept",[v.k.replaceMove(e.range,e.insertText),...e.additionalTextEdits]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally((()=>{null===i||void 0===i||i.dispose()})).then(void 0,m.M_):null===i||void 0===i||i.dispose(),this.onDidChangeEmitter.fire()}get commands(){var e;return[...new Set((null===(e=this.cache.value)||void 0===e?void 0:e.completions.map((e=>e.inlineCompletion.sourceInlineCompletions)))||[])].flatMap((e=>e.commands||[]))}}class ${constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class K extends l.jG{constructor(e,t,i,n){super(),this.editor=t,this.onChange=i,this.triggerKind=n,this.isDisposing=!1;const o=t.changeDecorations((t=>t.deltaDecorations([],e.items.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))))));this._register((0,l.s)((()=>{this.isDisposing=!0,t.removeDecorations(o)}))),this.completions=e.items.map(((e,t)=>new q(e,o[t]))),this._register(t.onDidChangeModelContent((()=>{this.updateRanges()}))),this._register(e)}updateRanges(){if(this.isDisposing)return;let e=!1;const t=this.editor.getModel();for(const i of this.completions){const n=t.getDecorationRange(i.decorationId);n?i.synchronizedRange.equalsRange(n)||(e=!0,i.synchronizedRange=n):(0,m.dz)(new Error("Decoration has no range"))}e&&this.onChange()}}class q{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}function G(e,t,i,n,o=p.X.None,s){return j(this,void 0,void 0,(function*(){const r=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new _.Q(e.lineNumber,i.startColumn,e.lineNumber,n):_.Q.fromPositions(e,e.with(void 0,n))}(t,i),a=e.all(i),l=yield Promise.all(a.map((e=>j(this,void 0,void 0,(function*(){const s=yield Promise.resolve(e.provideInlineCompletions(i,t,n,o)).catch(m.M_);return{completions:s,provider:e,dispose:()=>{s&&e.freeInlineCompletions(s)}}}))))),d=new Map;for(const e of l){const t=e.completions;if(t)for(const n of t.items){const o=n.range?_.Q.lift(n.range):r;if(o.startLineNumber!==o.endLineNumber)continue;let a,l;if("string"===typeof n.insertText)a=n.insertText,s&&n.completeBracketPairs&&(a=Z(a,o.getStartPosition(),i,s)),l=void 0;else if("snippet"in n.insertText){a=(new O.fr).parse(n.insertText.snippet).toString(),l={snippet:n.insertText.snippet,range:o}}else(0,H.xb)(n.insertText);const c={insertText:a,snippetInfo:l,range:o,command:n.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:n,filterText:n.filterText||a,additionalTextEdits:n.additionalTextEdits||b};d.set(JSON.stringify({insertText:a,range:n.range}),c)}}return{items:[...d.values()],dispose:()=>{for(const e of l)e.dispose()}}}))}function Z(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,s=i.tokenization.tokenizeLineWithEdit(t,o.length-(t.column-1),e),r=null===s||void 0===s?void 0:s.sliceAndInflate(t.column-1,o.length,0);if(!r)return e;return(0,E.I)(r,n)}var Y=i(8415),J=i(12643),X=i(14555);class ee extends l.jG{constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new a.vl,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new g.uC((()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())}),100)),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const i=X.SuggestController.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(e,t,n)=>{const o=this.editor.getModel(),s=D(o,this.suggestControllerPreselector());if(!s)return-1;const r=h.y.lift(t),a=n.map(((e,t)=>{const n=te(i,r,e,this.isShiftKeyPressed),a=D(o,null===n||void 0===n?void 0:n.normalizedInlineCompletion);if(!a)return;var l,d;return{index:t,valid:(l=s.range,(d=a.range).startLineNumber===l.startLineNumber&&d.startColumn===l.startColumn&&(d.endLineNumber<l.endLineNumber||d.endLineNumber===l.endLineNumber&&d.endColumn<=l.endColumn)&&s.insertText.startsWith(a.insertText)),prefixLength:a.insertText.length,suggestItem:e}})).filter((e=>e&&e.valid)),l=(0,Y.vj)(a,(0,Y.VE)((e=>e.prefixLength),Y.U9));return l?l.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(i.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(i.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)}))),this._register(i.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(a.Jh.once(i.model.onDidTrigger)((e=>{t()})))}this.update(this._isActive)}get state(){if(this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(e){const t=this.getSuggestItemInfo();let i=!1;(function(e,t){if(e===t)return!0;if(!e||!t)return!1;return e.completionItemKind===t.completionItemKind&&e.isSnippetText===t.isSnippetText&&function(e,t){return e===t||!(!e||!t)&&e.range.equalsRange(t.range)&&e.insertText===t.insertText&&e.command===t.command}(e.normalizedInlineCompletion,t.normalizedInlineCompletion)})(this._currentSuggestItemInfo,t)||(this._currentSuggestItemInfo=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const e=X.SuggestController.get(this.editor);if(!e)return;if(!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();return t?te(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=X.SuggestController.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=X.SuggestController.get(this.editor);e&&e.forceRenderingAbove()}}function te(e,t,i,n){if(Array.isArray(i.completion.additionalTextEdits)&&i.completion.additionalTextEdits.length>0)return{completionItemKind:i.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:_.Q.fromPositions(t,t),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:o}=i.completion,s=!1;if(4&i.completion.insertTextRules){const i=(new O.fr).parse(o),n=e.editor.getModel();if(i.children.length>100)return;J.O.adjustWhitespace(n,t,i,!0,!0),o=i.toString(),s=!0}const r=e.getOverwriteInfo(i,n);return{isSnippetText:s,completionItemKind:i.completion.kind,normalizedInlineCompletion:{insertText:o,filterText:o,range:_.Q.fromPositions(t.delta(0,-r.overwriteBefore),t.delta(0,Math.max(r.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}var ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ne=function(e,t){return function(i,n){t(i,n,e)}},oe=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let se=class extends L{constructor(e,t,i){super(e),this.cache=t,this.languageFeaturesService=i,this.suggestionInlineCompletionSource=this._register(new ee(this.editor,(()=>{var e,t;return null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()}))),this.updateOperation=this._register(new l.HE),this.updateCacheSoon=this._register(new g.uC((()=>this.updateCache()),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange((()=>{if(!this.editor.hasModel())return;this.updateCacheSoon.schedule();this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const e=this.ghostText;e&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,e.parts.map((e=>e.lines.length-1)).reduce(((e,t)=>e+t),0))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()}))),this._register(this.cache.onDidChange((()=>{this.onDidChangeEmitter.fire()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()}))),this._register((0,l.s)((()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove())))}get isActive(){return void 0!==this.suggestionInlineCompletionSource.state}isSuggestionPreviewEnabled(){return this.editor.getOption(107).preview}updateCache(){return oe(this,void 0,void 0,(function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItem)return;const t={text:e.selectedItem.normalizedInlineCompletion.insertText,range:e.selectedItem.normalizedInlineCompletion.range,isSnippetText:e.selectedItem.isSnippetText,completionKind:e.selectedItem.completionItemKind},i=this.editor.getPosition();if(e.selectedItem.isSnippetText||27===e.selectedItem.completionItemKind||20===e.selectedItem.completionItemKind||23===e.selectedItem.completionItemKind)return void this.cache.clear();const n=(0,g.SS)((e=>oe(this,void 0,void 0,(function*(){let n;try{n=yield G(this.languageFeaturesService.inlineCompletionsProvider,i,this.editor.getModel(),{triggerKind:u.qw.Automatic,selectedSuggestionInfo:t},e)}catch(o){return void(0,m.dz)(o)}e.isCancellationRequested?n.dispose():(this.cache.setValue(this.editor,n,u.qw.Automatic),this.onDidChangeEmitter.fire())})))),o=new $(n,u.qw.Automatic);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()}))}get ghostText(){var e,t,i;const n=this.isSuggestionPreviewEnabled(),o=this.editor.getModel(),s=D(o,null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()),r=this.suggestionInlineCompletionSource.state,a=D(o,null===(i=null===r||void 0===r?void 0:r.selectedItem)||void 0===i?void 0:i.normalizedInlineCompletion),l=s&&a&&s.insertText.startsWith(a.insertText)&&s.range.equalsRange(a.range);if(!n&&!l)return;const d=l?s:a||s,c=l?d.insertText.length-a.insertText.length:0;return this.toGhostText(d,c)}toGhostText(e,t){const i=this.editor.getOptions().get(107).previewMode;return e?k(e,this.editor.getModel(),i,this.editor.getPosition(),t)||new w(e.range.endLineNumber,[],this.minReservedLineCount):void 0}};se=ie([ne(2,A.u)],se);var re=i(3660),ae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},le=function(e,t){return function(i,n){t(i,n,e)}},de=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ce extends l.jG{constructor(){super(...arguments),this.onDidChangeEmitter=new a.vl,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new l.HE)}get targetModel(){var e;return null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object}setTargetModel(e){var t,i,n;(null===(t=this.currentModelRef.value)||void 0===t?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?(i=e,n=e.onDidChange((()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})),{object:i,dispose:()=>null===n||void 0===n?void 0:n.dispose()}):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=null===(t=null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object)||void 0===t?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;null===(t=this.targetModel)||void 0===t||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let he=class extends ce{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.sharedCache=this._register(new ue),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(se,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(B,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange((()=>{this.updateModel()}))),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!i&&i.parts.some((t=>e.containsPosition(new h.y(i.lineNumber,t.column))))}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.trigger(u.qw.Explicit)}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}hasMultipleInlineCompletions(){var e;return de(this,void 0,void 0,(function*(){const t=yield null===(e=this.activeInlineCompletionsModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};he=ae([le(1,re._Y)],he);class ue extends l.jG{constructor(){super(...arguments),this.onDidChangeEmitter=new a.vl,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new l.HE)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new K(t,e,(()=>this.onDidChangeEmitter.fire()),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var ge,pe=i(69848),me=i(24542),fe=i(99281),ve=i(41630),_e=i(11661),Ce=i(1528),be=i(21051),we=i(69018),Se=i(47352),ye=i(14067),Le=i(87357),xe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ie=function(e,t){return function(i,n){t(i,n,e)}};const De=null===(ge=window.trustedTypes)||void 0===ge?void 0:ge.createPolicy("editorGhostText",{createHTML:e=>e});let ke=class extends l.jG{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.instantiationService=i,this.languageService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(Re,this.editor)),this.additionalLinesWidget=this._register(new Me(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new Ne(this.editor)),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(29)||e.hasChanged(106)||e.hasChanged(89)||e.hasChanged(84)||e.hasChanged(46)||e.hasChanged(45)||e.hasChanged(60))&&this.update()}))),this._register((0,l.s)((()=>{var e;this.disposed=!0,this.update(),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0}))),this._register(t.onDidChange((()=>{this.update()}))),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed)return this.partsWidget.clear(),this.additionalLinesWidget.clear(),void this.replacementDecoration.clear();const i=new Array,n=new Array;function o(e,t){if(n.length>0){const i=n[n.length-1];t&&i.decorations.push(new Se.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)n.push({content:i,decorations:t?[new Se.d(1,i.length+1,t,0)]:[]})}t instanceof y?this.replacementDecoration.setDecorations([{range:new _.Q(t.lineNumber,t.columnStart,t.lineNumber,t.columnStart+t.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const s=this.editor.getModel().getLineContent(t.lineNumber);let r,a=0;for(const l of t.parts){let e=l.lines;void 0===r?(i.push({column:l.column,text:e[0],preview:l.preview}),e=e.slice(1)):o([s.substring(a,l.column-1)],void 0),e.length>0&&(o(e,"ghost-text"),void 0===r&&l.column<=s.length&&(r=l.column)),a=l.column-1}void 0!==r&&o([s.substring(a)],void 0),this.partsWidget.setParts(t.lineNumber,i,void 0!==r?{column:r,length:s.length+1-r}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0}renderViewMoreLines(e,t,i){const n=this.editor.getOption(45),o=document.createElement("div");o.className="suggest-preview-additional-widget",(0,me.M)(o,n);const s=document.createElement("span");s.className="content-spacer",s.append(t),o.append(s);const r=document.createElement("span");r.className="content-newline suggest-preview-text",r.append("\u23ce "),o.append(r);const a=new l.Cm,d=document.createElement("div");return d.className="button suggest-preview-text",d.append(`+${i} lines\u2026`),a.add(pe.b2(d,"mousedown",(e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()}))),o.append(d),new Te(this.editor,e,o,a)}};ke=xe([Ie(2,re._Y),Ie(3,be.L)],ke);class Ne{constructor(e){this.editor=e,this.decorationIds=[]}setDecorations(e){this.editor.changeDecorations((t=>{this.decorationIds=t.deltaDecorations(this.decorationIds,e)}))}clear(){this.setDecorations([])}dispose(){this.clear()}}class Re{constructor(e){this.editor=e,this.decorationIds=[]}dispose(){this.clear()}clear(){this.editor.changeDecorations((e=>{this.decorationIds=e.deltaDecorations(this.decorationIds,[])}))}setParts(e,t,i){if(!this.editor.getModel())return;const n=new Array;i&&n.push({range:_.Q.fromPositions(new h.y(e,i.column),new h.y(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.editor.changeDecorations((i=>{this.decorationIds=i.deltaDecorations(this.decorationIds,t.map((t=>({range:_.Q.fromPositions(new h.y(e,t.column)),options:{description:"ghost-text",after:{content:t.text,inlineClassName:t.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:Ce.VW.Left},showIfCollapsed:!0}}))).concat(n))}))}}class Me{constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");!function(e,t,i,n,o){const s=n.get(29),r=n.get(106),a="none",l=n.get(84),c=n.get(46),h=n.get(45),u=n.get(60),g=(0,_e.Du)(1e4);g.appendASCIIString('<div class="suggest-preview-text">');for(let f=0,v=i.length;f<v;f++){const e=i[f],n=e.content;g.appendASCIIString('<div class="view-line'),g.appendASCIIString('" style="top:'),g.appendASCIIString(String(f*u)),g.appendASCIIString('px;width:1000000px;">');const p=d.aC(n),m=d.E_(n),v=ve.f.createEmpty(n,o);(0,ye.UW)(new ye.zL(h.isMonospace&&!s,h.canUseHalfwidthRightwardsArrow,n,!1,p,m,0,v,e.decorations,t,0,h.spaceWidth,h.middotWidth,h.wsmiddotWidth,r,a,l,c!==fe.Bc.OFF,null),g),g.appendASCIIString("</div>")}g.appendASCIIString("</div>"),(0,me.M)(e,h);const p=g.build(),m=De?De.createHTML(p):p;e.innerHTML=m}(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}}))}}class Te extends l.jG{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register((0,l.s)((()=>{this.editor.removeContentWidget(this)}))),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,Le.zy)(((e,t)=>{const i=e.getColor(we.Ek);i&&(t.addRule(`.monaco-editor .ghost-text-decoration { color: ${i.toString()} !important; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${i.toString()} !important; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${i.toString()} !important; }`));const n=e.getColor(we.RH);n&&(t.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${n.toString()}; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${n.toString()}; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${n.toString()}; }`));const o=e.getColor(we.DH);o&&(t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${o}; }`))}));var Ee=i(84978),Ae=i(75664),Pe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Oe=function(e,t){return function(i,n){t(i,n,e)}},Fe=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let He=class e extends l.jG{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new l.HE),this.activeModelDidChangeEmitter=this._register(new a.vl),this._register(this.editor.onDidChangeModel((()=>{this.updateModelController()}))),this._register(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(107)&&this.updateModelController(),e.hasChanged(56)&&this.updateModelController()}))),this.updateModelController()}static get(t){return t.getContribution(e.ID)}get activeModel(){var e;return null===(e=this.activeController.value)||void 0===e?void 0:e.model}updateModelController(){const e=this.editor.getOption(107),t=this.editor.getOption(56);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(We,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(e){var t;return(null===(t=this.activeModel)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return(null===(i=null===(t=this.activeController.value)||void 0===t?void 0:t.widget)||void 0===i?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),null===(e=this.activeModel)||void 0===e||e.triggerInlineCompletion()}commit(){var e;null===(e=this.activeModel)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeModel)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Fe(this,void 0,void 0,(function*(){const t=yield null===(e=this.activeModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};He.inlineSuggestionVisible=new Ae.N1("inlineSuggestionVisible",!1,Ee.kg("inlineSuggestionVisible","Whether an inline suggestion is visible")),He.inlineSuggestionHasIndentation=new Ae.N1("inlineSuggestionHasIndentation",!1,Ee.kg("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),He.inlineSuggestionHasIndentationLessThanTabSize=new Ae.N1("inlineSuggestionHasIndentationLessThanTabSize",!0,Ee.kg("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),He.ID="editor.contrib.ghostTextController",He=Pe([Oe(1,re._Y)],He);class Ue{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=He.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=He.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=He.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let We=class extends l.jG{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new Ue(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(he,this.editor)),this.widget=this._register(this.instantiationService.createInstance(ke,this.editor,this.model)),this._register((0,l.s)((()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)}))),this._register(this.model.onDidChange((()=>{this.updateContextKeys()}))),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(void 0!==(null===(e=this.model.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText));let t=!1,i=!0;const n=this.model.inlineCompletionsModel.ghostText;if(this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:e,lines:o}=n.parts[0],s=o[0];if(e<=this.editor.getModel().getLineIndentColumn(n.lineNumber)){let e=(0,d.HG)(s);-1===e&&(e=s.length-1),t=e>0;const n=this.editor.getModel().getOptions().tabSize;i=c.A.visibleColumnFromColumn(s,e+1,n)<n}}this.contextKeys.inlineCompletionSuggestsIndentation.set(t),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(i)}};We=Pe([Oe(1,re._Y),Oe(2,Ae.fN)],We);class Ve extends n.ks{constructor(){super({id:Ve.ID,label:Ee.kg("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Ae.M$.and(o.R.writable,He.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=He.get(t);e&&(e.showNextInlineCompletion(),t.focus())}))}}Ve.ID="editor.action.inlineSuggest.showNext";class ze extends n.ks{constructor(){super({id:ze.ID,label:Ee.kg("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Ae.M$.and(o.R.writable,He.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=He.get(t);e&&(e.showPreviousInlineCompletion(),t.focus())}))}}ze.ID="editor.action.inlineSuggest.showPrevious";class je extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:Ee.kg("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:o.R.writable})}run(e,t){return Fe(this,void 0,void 0,(function*(){const e=He.get(t);e&&e.trigger()}))}}var Be=i(82183),Qe=i(7965),$e=i(84142),Ke=i(52692),qe=i(49172),Ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ze=function(e,t){return function(i,n){t(i,n,e)}};class Ye{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}get commands(){var e,t,i;return(null===(i=null===(t=null===(e=this.controller.activeModel)||void 0===e?void 0:e.activeInlineCompletionsModel)||void 0===t?void 0:t.completionSession.value)||void 0===i?void 0:i.commands)||[]}}let Je=class{constructor(e,t,i,n,o,s,r){this._editor=e,this._commandService=t,this._menuService=i,this._contextKeyService=n,this._languageService=o,this._openerService=s,this.accessibilityService=r,this.hoverOrdinal=3}suggestHoverAnchor(e){const t=He.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const e=i.detail;if(t.shouldShowHoverAtViewZone(e.viewZoneId))return new s.mm(1e3,this,_.Q.fromPositions(e.positionBefore||e.position,e.positionBefore||e.position))}if(7===i.type&&t.shouldShowHoverAt(i.range))return new s.mm(1e3,this,i.range);if(6===i.type){if(i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new s.mm(1e3,this,i.range)}return null}computeSync(e,t){const i=He.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new Ye(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new l.Cm,n=t[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,n,i);const o=i.add(this._menuService.createMenu(Ke.D8.InlineCompletionsActions,this._contextKeyService)),s=e.statusBar.addAction({label:Ee.kg("showNextInlineSuggestion","Next"),commandId:Ve.ID,run:()=>this._commandService.executeCommand(Ve.ID)}),a=e.statusBar.addAction({label:Ee.kg("showPreviousInlineSuggestion","Previous"),commandId:ze.ID,run:()=>this._commandService.executeCommand(ze.ID)});e.statusBar.addAction({label:Ee.kg("acceptInlineSuggestion","Accept"),commandId:r,run:()=>this._commandService.executeCommand(r)});const d=[s,a];for(const r of d)r.setEnabled(!1);n.hasMultipleSuggestions().then((e=>{for(const t of d)t.setEnabled(e)}));for(const r of n.commands)e.statusBar.addAction({label:r.title,commandId:r.id,run:()=>this._commandService.executeCommand(r.id,...r.arguments||[])});for(const[r,l]of o.getActions())for(const t of l)t instanceof Ke.Xe&&e.statusBar.addAction({label:t.label,commandId:t.item.id,run:()=>this._commandService.executeCommand(t.item.id)});return i}renderScreenReaderText(e,t,i){var n,o;const s=pe.$,r=s("div.hover-row.markdown-hover"),a=pe.BC(r,s("div.hover-contents")),l=i.add(new Qe.T({editor:this._editor},this._languageService,this._openerService)),d=null===(o=null===(n=t.controller.activeModel)||void 0===n?void 0:n.inlineCompletionsModel)||void 0===o?void 0:o.ghostText;if(d){const t=this._editor.getModel().getLineContent(d.lineNumber);(t=>{i.add(l.onDidRenderAsync((()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=Ee.kg("inlineSuggestionFollows","Suggestion:"),o=i.add(l.render((new Be.Bc).appendText(n).appendCodeblock("text",t)));a.replaceChildren(o.element)})(d.renderForScreenReader(t))}e.fragment.appendChild(r)}};Je=Ge([Ze(1,x.wT),Ze(2,Ke.ez),Ze(3,Ae.fN),Ze(4,be.L),Ze(5,qe.Cr),Ze(6,$e.j)],Je);var Xe=i(7492);(0,n.HW)(He.ID,He),(0,n.Fl)(je),(0,n.Fl)(Ve),(0,n.Fl)(ze),s.B2.register(Je);const et=n.DX.bindToContribution(He.get),tt=new et({id:r,precondition:He.inlineSuggestionVisible,handler(e){e.commit(),e.editor.focus()}});(0,n.E_)(tt),Xe.f.registerKeybindingRule({primary:2,weight:200,id:tt.id,when:Ae.M$.and(tt.precondition,o.R.tabMovesFocus.toNegated(),He.inlineSuggestionHasIndentationLessThanTabSize)}),(0,n.E_)(new et({id:"editor.action.inlineSuggest.hide",precondition:He.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(e){e.hide()}}))},59473:(e,t,i)=>{i.r(t),i.d(t,{ExpandLineSelectionAction:()=>a});var n=i(95713),o=i(72839),s=i(35725),r=i(84978);class a extends n.ks{constructor(){super({id:"expandLineSelection",label:r.kg("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:s.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,o.c.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}(0,n.Fl)(a)},63841:(e,t,i)=>{i.r(t),i.d(t,{AbstractCaseAction:()=>K,AbstractDeleteAllToBoundaryAction:()=>z,AbstractSortLinesAction:()=>T,DeleteAllLeftAction:()=>j,DeleteAllRightAction:()=>B,DeleteDuplicateLinesAction:()=>P,DeleteLinesAction:()=>F,DuplicateSelectionAction:()=>R,IndentLinesAction:()=>H,InsertLineAfterAction:()=>V,InsertLineBeforeAction:()=>W,JoinLinesAction:()=>Q,KebabCaseAction:()=>X,LowerCaseAction:()=>G,SnakeCaseAction:()=>J,SortLinesAscendingAction:()=>E,SortLinesDescendingAction:()=>A,TitleCaseAction:()=>Y,TransposeAction:()=>$,TrimTrailingWhitespaceAction:()=>O,UpperCaseAction:()=>q});var n=i(55746),o=i(63415),s=i(95713),r=i(51251),a=i(94994),l=i(94890),d=i(91536),c=i(63102),h=i(93708),u=i(4707),g=i(35725);class p{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=[];for(let s=i.startLineNumber;s<=i.endLineNumber;s++)n.push(e.getLineContent(s));const o=n.join("\n");""===o&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new h.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new h.Q(i.startLineNumber,1,i.startLineNumber,1),o+"\n"):t.addEditOperation(new h.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+o),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,o=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,o=1),i=u.L.createWithDirection(e,t,n,o,this._selectionDirection)}return i}}var m=i(22231),f=i(21887),v=i(96257),_=i(7117),C=i(97177),b=i(95972),w=i(71901),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};let L=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&1===n.endColumn&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:o,indentSize:s,insertSpaces:r}=e.getOptions(),a=this.buildIndentConverter(o,s,r),l={tokenization:{getLineTokens:t=>e.tokenization.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){const i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new h.Q(1,1,1,1),null):(t.addEditOperation(new h.Q(i,1,i,1),e.getLineContent(o)),t.addEditOperation(new h.Q(o,1,o,e.getLineMaxColumn(o)),null)),n=new u.L(o,1,o,1)}else{let i,s;if(this._isMovingDown){i=n.endLineNumber+1,s=e.getLineContent(i),t.addEditOperation(new h.Q(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let d=s;if(this.shouldAutoIndent(e,n)){const c=this.matchEnterRule(e,a,o,i,n.startLineNumber-1);if(null!==c){const t=m.UU(e.getLineContent(i)),n=c+C.c(t,o),a=C.k(n,o,r);d=a+this.trimLeft(s)}else{l.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);const t=(0,b.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber,a,this._languageConfigurationService);if(null!==t){const n=m.UU(e.getLineContent(i)),a=C.c(t,o);if(a!==C.c(n,o)){const e=C.k(a,o,r);d=e+this.trimLeft(s)}}}t.addEditOperation(new h.Q(n.startLineNumber,1,n.startLineNumber,1),d+"\n");const u=this.matchEnterRuleMovingDown(e,a,o,n.startLineNumber,i,d);if(null!==u)0!==u&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,u);else{l.getLineContent=t=>t===n.startLineNumber?d:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);const s=(0,b.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,a,this._languageConfigurationService);if(null!==s){const i=m.UU(e.getLineContent(n.startLineNumber)),a=C.c(s,o),l=C.c(i,o);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}else t.addEditOperation(new h.Q(n.startLineNumber,1,n.startLineNumber,1),d+"\n")}else if(i=n.startLineNumber-1,s=e.getLineContent(i),t.addEditOperation(new h.Q(i,1,i+1,1),null),t.addEditOperation(new h.Q(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+s),this.shouldAutoIndent(e,n)){l.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);const s=this.matchEnterRule(e,a,o,n.startLineNumber,n.startLineNumber-2);if(null!==s)0!==s&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,s);else{const s=(0,b.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(n.startLineNumber,1),i,a,this._languageConfigurationService);if(null!==s){const i=m.UU(e.getLineContent(n.startLineNumber)),a=C.c(s,o),l=C.c(i,o);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>f.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>f.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===v.l.None||o.indentAction===v.l.Indent?s=o.indentation+o.appendText:o.indentAction===v.l.IndentOutdent?s=o.indentation:o.indentAction===v.l.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);const r=e.getLineContent(n);if(this.trimLeft(r).indexOf(this.trimLeft(s))>=0){const o=m.UU(e.getLineContent(n));let r=m.UU(s);const a=(0,b.Yb)(e,n,this._languageConfigurationService);null!==a&&2&a&&(r=t.unshiftIndent(r));return C.c(r,i)-C.c(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(m.lT(s)>=0){const s=e.getLineMaxColumn(o),r=(0,w.h)(this._autoIndent,e,new h.Q(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;for(;o>=1;){const t=e.getLineContent(o);if(m.lT(t)>=0)break;o--}if(o<1||n>e.getLineCount())return null;const s=e.getLineMaxColumn(o),r=(0,w.h)(this._autoIndent,e,new h.Q(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;for(;r>=1;){let t;t=r===o&&void 0!==s?s:e.getLineContent(r);if(m.lT(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const a=e.getLineMaxColumn(r),l=(0,w.h)(this._autoIndent,e,new h.Q(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const a=e.getLineContent(r),l=m.UU(a),d=C.c(l,n)+s,c=C.k(d,n,o);c!==l&&(t.addEditOperation(new h.Q(r,1,r,l.length+1),c),r===i.endLineNumber&&i.endColumn<=l.length+1&&""===c&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};L=S([y(3,_.JZ)],L);class x{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return x._COLLATOR||(x._COLLATOR=new Intl.Collator),x._COLLATOR}getEditOperations(e,t){const i=function(e,t,i){const n=I(e,t,i);if(!n)return null;return d.k.replace(new h.Q(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n"))}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;const n=I(e,t,i);if(!n)return!1;for(let o=0,s=n.before.length;o<s;o++)if(n.before[o]!==n.after[o])return!0;return!1}}function I(e,t,i){const n=t.startLineNumber;let o=t.endLineNumber;if(1===t.endColumn&&o--,n>=o)return null;const s=[];for(let a=n;a<=o;a++)s.push(e.getLineContent(a));let r=s.slice(0);return r.sort(x.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}x._COLLATOR=null;var D=i(84978),k=i(52692);class N extends s.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>h.Q.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let s=1;s<i.length;s++){const e=i[s];n.selection.endLineNumber===e.selection.startLineNumber&&(n.index<e.index?e.ignore=!0:(n.ignore=!0,n=e))}const o=[];for(const s of i)o.push(new p(s.selection,this.down,s.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class R extends s.ks{constructor(){super({id:"editor.action.duplicateSelection",label:D.kg("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:g.R.writable,menuOpts:{menuId:k.D8.MenubarSelectionMenu,group:"2_line",title:D.kg({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],o=t.getSelections(),s=t.getModel();for(const a of o)if(a.isEmpty())n.push(new p(a,!0));else{const e=new u.L(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new r.tA(e,s.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class M extends s.ks{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(_.JZ),n=[],o=t.getSelections()||[],s=t.getOption(9);for(const r of o)n.push(new L(r,this.down,s,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class T extends s.ks{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const o of i)if(!x.canRun(t.getModel(),o,this.descending))return;const n=[];for(let o=0,s=i.length;o<s;o++)n[o]=new x(i[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class E extends T{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:D.kg("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:g.R.writable})}}class A extends T{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:D.kg("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:g.R.writable})}}class P extends s.ks{constructor(){super({id:"editor.action.removeDuplicateLines",label:D.kg("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:g.R.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;const n=[],o=[];let s=0;for(const r of t.getSelections()){const e=new Set,t=[];for(let n=r.startLineNumber;n<=r.endLineNumber;n++){const o=i.getLineContent(n);e.has(o)||(t.push(o),e.add(o))}const a=new u.L(r.startLineNumber,1,r.endLineNumber,i.getLineMaxColumn(r.endLineNumber)),l=r.startLineNumber-s,c=new u.L(l,1,l+t.length-1,t[t.length-1].length);n.push(d.k.replace(a,t.join("\n"))),o.push(c),s+=r.endLineNumber-r.startLineNumber+1-t.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}}class O extends s.ks{constructor(){super({id:O.ID,label:D.kg("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:(0,n.m5)(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map((e=>new c.y(e.positionLineNumber,e.positionColumn))));const o=t.getSelection();if(null===o)return;const s=new a.d(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}O.ID="editor.action.trimTrailingWhitespace";class F extends s.ks{constructor(){super({id:"editor.action.deleteLines",label:D.kg("lines.delete","Delete Line"),alias:"Delete Line",precondition:g.R.writable,kbOpts:{kbExpr:g.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0;const s=[],r=[];for(let a=0,l=i.length;a<l;a++){const e=i[a];let t=e.startLineNumber,l=e.endLineNumber,c=1,h=n.getLineMaxColumn(l);l<n.getLineCount()?(l+=1,h=1):t>1&&(t-=1,c=n.getLineMaxColumn(t)),s.push(d.k.replace(new u.L(t,c,l,h),"")),r.push(new u.L(t-o,e.positionColumn,t-o,e.positionColumn)),o+=e.endLineNumber-e.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}}));t.sort(((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let o=1;o<t.length;o++)n.endLineNumber+1>=t[o].startLineNumber?n.endLineNumber=t[o].endLineNumber:(i.push(n),n=t[o]);return i.push(n),i}}class H extends s.ks{constructor(){super({id:"editor.action.indentLines",label:D.kg("lines.indent","Indent Line"),alias:"Indent Line",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l.TK.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class U extends s.ks{constructor(){super({id:"editor.action.outdentLines",label:D.kg("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:2135,weight:100}})}run(e,t){o.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class W extends s.ks{constructor(){super({id:"editor.action.insertLineBefore",label:D.kg("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l.TK.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class V extends s.ks{constructor(){super({id:"editor.action.insertLineAfter",label:D.kg("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l.TK.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class z extends s.ks{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let a=0,l=n.length-1;a<l;a++){const e=n[a],t=n[a+1];null===h.Q.intersectRanges(e,t)?o.push(e):n[a+1]=h.Q.plusRange(e,t)}o.push(n[n.length-1]);const s=this._getEndCursorState(i,o),r=o.map((e=>d.k.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class j extends z{constructor(){super({id:"deleteAllLeft",label:D.kg("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:g.R.writable,kbOpts:{kbExpr:g.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){const e=t.startLineNumber-o;s=new u.L(e,t.startColumn,e,t.startColumn)}else s=new u.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(h.Q.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new h.Q(t,i,e.startLineNumber,1)}return new h.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new h.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}class B extends z{constructor(){super({id:"deleteAllRight",label:D.kg("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:g.R.writable,kbOpts:{kbExpr:g.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let o=0,s=t.length,r=0;o<s;o++){const s=t[o],a=new u.L(s.startLineNumber-r,s.startColumn,s.startLineNumber-r,s.startColumn);s.intersectRanges(e)?i=a:n.push(a)}return i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getModel();if(null===t)return[];const i=e.getSelections();if(null===i)return[];const n=i.map((e=>{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new h.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new h.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(h.Q.compareRangesUsingStarts),n}}class Q extends s.ks{constructor(){super({id:"editor.action.joinLines",label:D.kg("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(h.Q.compareRangesUsingStarts);const o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new u.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new u.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);const r=t.getModel();if(null===r)return;const a=[],l=[];let c=n,g=0;for(let p=0,m=o.length;p<m;p++){const e=o[p],t=e.startLineNumber,i=1;let s,m,f=0;const v=r.getLineContent(e.endLineNumber).length-e.endColumn;if(e.isEmpty()||e.startLineNumber===e.endLineNumber){const i=e.getStartPosition();i.lineNumber<r.getLineCount()?(s=t+1,m=r.getLineMaxColumn(s)):(s=i.lineNumber,m=r.getLineMaxColumn(i.lineNumber))}else s=e.endLineNumber,m=r.getLineMaxColumn(s);let _=r.getLineContent(t);for(let n=t+1;n<=s;n++){const e=r.getLineContent(n),t=r.getLineFirstNonWhitespaceColumn(n);if(t>=1){let i=!0;""===_&&(i=!1),!i||" "!==_.charAt(_.length-1)&&"\t"!==_.charAt(_.length-1)||(i=!1,_=_.replace(/[\s\uFEFF\xA0]+$/g," "));const n=e.substr(t-1);_+=(i?" ":"")+n,f=i?n.length+1:n.length}else f=0}const C=new h.Q(t,i,s,m);if(!C.isEmpty()){let i;e.isEmpty()?(a.push(d.k.replace(C,_)),i=new u.L(C.startLineNumber-g,_.length-f+1,t-g,_.length-f+1)):e.startLineNumber===e.endLineNumber?(a.push(d.k.replace(C,_)),i=new u.L(e.startLineNumber-g,e.startColumn,e.endLineNumber-g,e.endColumn)):(a.push(d.k.replace(C,_)),i=new u.L(e.startLineNumber-g,e.startColumn,e.startLineNumber-g,_.length-v)),null!==h.Q.intersectRanges(C,n)?c=i:l.push(i)}g+=C.endLineNumber-C.startLineNumber}l.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class $ extends s.ks{constructor(){super({id:"editor.action.transpose",label:D.kg("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:g.R.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=[];for(let s=0,a=i.length;s<a;s++){const e=i[s];if(!e.isEmpty())continue;const t=e.getStartPosition(),a=n.getLineMaxColumn(t.lineNumber);if(t.column>=a){if(t.lineNumber===n.getLineCount())continue;const e=new h.Q(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i=n.getValueInRange(e).split("").reverse().join("");o.push(new r.iu(new u.L(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i))}else{const e=new h.Q(t.lineNumber,Math.max(1,t.column-1),t.lineNumber,t.column+1),i=n.getValueInRange(e).split("").reverse().join("");o.push(new r.ui(e,i,new u.L(t.lineNumber,t.column+1,t.lineNumber,t.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class K extends s.ks{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(118),s=[];for(const r of i)if(r.isEmpty()){const e=r.getStartPosition(),i=t.getConfiguredWordAtPosition(e);if(!i)continue;const a=new h.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),l=n.getValueInRange(a);s.push(d.k.replace(a,this._modifyText(l,o)))}else{const e=n.getValueInRange(r);s.push(d.k.replace(r,this._modifyText(e,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class q extends K{constructor(){super({id:"editor.action.transformToUppercase",label:D.kg("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:g.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class G extends K{constructor(){super({id:"editor.action.transformToLowercase",label:D.kg("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:g.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Z{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class Y extends K{constructor(){super({id:"editor.action.transformToTitlecase",label:D.kg("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:g.R.writable})}_modifyText(e,t){const i=Y.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}Y.titleBoundary=new Z("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class J extends K{constructor(){super({id:"editor.action.transformToSnakecase",label:D.kg("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:g.R.writable})}_modifyText(e,t){const i=J.caseBoundary.get(),n=J.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}J.caseBoundary=new Z("(\\p{Ll})(\\p{Lu})","gmu"),J.singleLetters=new Z("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class X extends K{constructor(){super({id:"editor.action.transformToKebabcase",label:D.kg("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:g.R.writable})}static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}_modifyText(e,t){const i=X.caseBoundary.get(),n=X.singleLetters.get(),o=X.underscoreBoundary.get();return i&&n&&o?e.replace(o,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}X.caseBoundary=new Z("(\\p{Ll})(\\p{Lu})","gmu"),X.singleLetters=new Z("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),X.underscoreBoundary=new Z("(\\S)(_)(\\S)","gm"),(0,s.Fl)(class extends N{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:D.kg("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:k.D8.MenubarSelectionMenu,group:"2_line",title:D.kg({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,s.Fl)(class extends N{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:D.kg("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:k.D8.MenubarSelectionMenu,group:"2_line",title:D.kg({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,s.Fl)(R),(0,s.Fl)(class extends M{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:D.kg("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:k.D8.MenubarSelectionMenu,group:"2_line",title:D.kg({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,s.Fl)(class extends M{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:D.kg("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:g.R.writable,kbOpts:{kbExpr:g.R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:k.D8.MenubarSelectionMenu,group:"2_line",title:D.kg({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,s.Fl)(E),(0,s.Fl)(A),(0,s.Fl)(P),(0,s.Fl)(O),(0,s.Fl)(F),(0,s.Fl)(H),(0,s.Fl)(U),(0,s.Fl)(W),(0,s.Fl)(V),(0,s.Fl)(j),(0,s.Fl)(B),(0,s.Fl)(Q),(0,s.Fl)($),(0,s.Fl)(q),(0,s.Fl)(G),J.caseBoundary.isSupported()&&J.singleLetters.isSupported()&&(0,s.Fl)(J),Y.titleBoundary.isSupported()&&(0,s.Fl)(Y),X.isSupported()&&(0,s.Fl)(X)},13529:(e,t,i)=>{i.r(t),i.d(t,{CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE:()=>N,LinkedEditingAction:()=>T,LinkedEditingContribution:()=>M,editorLinkedEditingBackground:()=>P});var n=i(8415),o=i(85345),s=i(99826),r=i(59638),a=i(79734),l=i(16201),d=i(33793),c=i(22231),h=i(34235),u=i(95713),g=i(39946),p=i(63102),m=i(93708),f=i(35725),v=i(21174),_=i(7117),C=i(84978),b=i(75664),w=i(64709),S=i(87357),y=i(51209),L=i(56345),x=i(39154),I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},D=function(e,t){return function(i,n){t(i,n,e)}},k=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const N=new b.N1("LinkedEditingInputVisible",!1),R="linked-editing-decoration";let M=class e extends d.jG{constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new d.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=N.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new d.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(63)||e.hasChanged(83))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}static get(t){return t.getContribution(e.ID)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(63)||this._editor.getOption(83))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(l.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new o.ve(this._debounceInformation.get(t)),s=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},r=new o.ve(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const o=[];for(let s=1,r=this._currentDecorations.length;s<r;s++){const e=this._currentDecorations.getRange(s);if(e)if(e.startLineNumber!==e.endLineNumber)o.push({range:e,text:n});else{let i=t.getValueInRange(e),s=n,r=e.startColumn,a=e.endColumn;const l=c.Qp(i,s);r+=l,i=i.substr(l),s=s.substr(l);const d=c.Vi(i,s);a-=d,i=i.substr(0,i.length-d),s=s.substr(0,s.length-d),r===a&&0===s.length||o.push({range:new m.Q(e.startLineNumber,r,e.endLineNumber,a),text:s})}}if(0!==o.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(t=!1){return k(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return void this.clearRanges();const i=this._editor.getPosition();if(!this._enabled&&!t||this._editor.getSelections().length>1)return void this.clearRanges();const n=this._editor.getModel(),s=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=s;const r=(0,o.SS)((t=>k(this,void 0,void 0,(function*(){try{const o=new x.W(!1),a=yield A(this._providers,n,i,t);if(this._debounceInformation.update(n,o.elapsed()),r!==this._currentRequest)return;if(this._currentRequest=null,s!==n.getVersionId())return;let l=[];(null===a||void 0===a?void 0:a.ranges)&&(l=a.ranges),this._currentWordPattern=(null===a||void 0===a?void 0:a.wordPattern)||this._languageWordPattern;let d=!1;for(let e=0,t=l.length;e<t;e++)if(m.Q.containsPosition(l[e],i)){if(d=!0,0!==e){const t=l[e];l.splice(e,1),l.unshift(t)}break}if(!d)return void this.clearRanges();const c=l.map((t=>({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(c),this._syncRangesToken++}catch(o){(0,a.MB)(o)||(0,a.dz)(o),this._currentRequest!==r&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=r,r}))}};M.ID="editor.contrib.linkedEditing",M.DECORATION=v.kI.register({description:"linked-editing",stickiness:0,className:R}),M=I([D(1,b.fN),D(2,y.u),D(3,_.JZ),D(4,L.U)],M);class T extends u.ks{constructor(){super({id:"editor.action.linkedEditing",label:C.kg("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:b.M$.and(f.R.writable,f.R.hasRenameProvider),kbOpts:{kbExpr:f.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(g.T),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return h.r.isUri(n)&&p.y.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),a.dz):super.runCommand(e,t)}run(e,t){const i=M.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const E=u.DX.bindToContribution(M.get);function A(e,t,i,s){const r=e.ordered(t);return(0,o.$1)(r.map((e=>()=>k(this,void 0,void 0,(function*(){try{return yield e.provideLinkedEditingRanges(t,i,s)}catch(n){return void(0,a.M_)(n)}})))),(e=>!!e&&n.EI(null===e||void 0===e?void 0:e.ranges)))}(0,u.E_)(new E({id:"cancelLinkedEditingInput",precondition:N,handler:e=>e.clearRanges(),kbOpts:{kbExpr:f.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const P=(0,w.x1A)("editor.linkedEditingBackground",{dark:r.Q1.fromHex("#f00").transparent(.3),light:r.Q1.fromHex("#f00").transparent(.3),hcDark:r.Q1.fromHex("#f00").transparent(.3),hcLight:r.Q1.white},C.kg("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,S.zy)(((e,t)=>{const i=e.getColor(P);i&&t.addRule(`.monaco-editor .${R} { background: ${i}; border-left-color: ${i}; }`)})),(0,u.ke)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(y.u);return A(n,t,i,s.X.None)})),(0,u.HW)(M.ID,M),(0,u.Fl)(T)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[5974],{84007:(e,t,r)=>{r.d(t,{$$:()=>m,Os:()=>l});var o=r(16799),n=r(8357),s=r(61704);const c=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],i=new o.H(c),a=new n.X(i);function l(e,t,r){try{e.setAttribute(t,r)}catch{let o=e.tagName.toLowerCase();"html"===o&&(o="div");const n=`<${o} ${t}="${r}"/>`;let s=function(e){let t;switch(null===e||void 0===e?void 0:e.toLowerCase()){case"tr":t=document.createElement("table");break;case"td":t=document.createElement("tr");break;case"head":case"body":t=document.createElement("html");break;case"DocumentType":case"html":{const e=document.implementation.createHTMLDocument();for(const t of[...e.childNodes])t.remove();return e}default:t=document.createElement("div")}return t}(o);if(s instanceof Document)return;s.innerHTML=n;const c=1===s.children.length?s.firstElementChild:s.getElementsByTagName(o)[0];if(!c)throw new Error("targetElement is not defined");const i=c.getAttributeNode(t);i&&e.setAttributeNode(i.cloneNode())}}function u(e,t=!0){let r=e.content;switch(e.type){case s.Z.ROOT:{const r=document.implementation.createHTMLDocument();for(const e of[...r.childNodes])r.removeChild(e);if(t)for(const t of e.children)r.appendChild(u(t));return r}case s.Z.DOCTYPE:return(new DOMParser).parseFromString(`<!DOCTYPE${e.content}>`,"text/html").doctype;case s.Z.COMMENT:return document.createComment(r||"");case s.Z.ELEMENT:if(e.tag){const r=document.createElement(e.tag);if(Object.defineProperty(r,"$$tagName",{enumerable:!1,configurable:!1,value:e.tag}),e.attributes)for(const t of e.attributeNames){const n=e.attributes[t];try{l(r,t,"string"===typeof n?n:"")}catch(o){}}if(t)for(const t of e.children)r.appendChild(u(t));return r}return document.createTextNode("<");case s.Z.HTML:return function(e){if(e){const t=document.createElement("div");return t.insertAdjacentHTML("afterbegin",e),t.firstChild||document.createTextNode("")}return document.createTextNode("")}(r||"");default:throw new Error("unsupported node")}}function m(e){var t;return(t=e,a.parse(t)).roots.map((e=>u(e)))}},85974:(e,t,r)=>{r.d(t,{Km:()=>C,Sc:()=>E,Nh:()=>A});var o=r(90854),n=r(84007),s=r(74851),c=r(69279);const i='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',a="<!doctype html>";var l=r(97717);async function u(e,t={}){const r=document.createElement("amp-img"),s=await(0,o.rq)(e)||void 0,c=null!==s&&void 0!==s&&s.height?`${parseInt(s.height)}px`:"",i=null!==s&&void 0!==s&&s.width?`${parseInt(s.width)}px`:"",a=e.src||e.srcset.split(",")[0];"100%"===e.style.width&&e.style.removeProperty("width"),"100%"===e.style.maxWidth&&e.style.removeProperty("max-width"),t={...(0,l.gu)(e),alt:e.alt,width:i,height:c,src:a,layout:"responsive",...t};for(const o of Object.keys(t))(0,n.Os)(r,o,t[o]);return r}function m(e){const t=document.createElement("img"),{layout:r,height:o,...s}=(0,l.gu)(e),c="responsive"===r;for(const i of Object.keys(s))(0,n.Os)(t,i,s[i]);return c&&(t.style.maxWidth=s.width||"0px",t.style.width="100%"),t}var d=r(59896),f=r(91981),p=r(91391);var y=r(80424);const h=new Map;const v=new Map;const g="$GLOBAL_ATTRS",b=new Map;async function w(){if(!b.size){var e;const t=null===(e=(await(0,y.F)()).attrLists.find((e=>e.name===g)))||void 0===e?void 0:e.attrs;if(t)for(const e of t)b.set(e.name,e)}return b}function A(e){var t;return(0,o.vq)(e)&&(e.tagName.startsWith("AMP")||"FORM"===e.tagName||"TEMPLATE"===e.tagName&&"amp-mustache"===(null===(t=e.getAttribute("type"))||void 0===t?void 0:t.toLowerCase()))}function x(e,t,r){var n,s,c;if(t)if((0,o.vq)(e))switch(e.tagName.toLowerCase()){case"body":case r("script"):case"style":case"meta":case"title":return;case"head":case"html":a();break;default:i()||a()}else(0,o.wz)(e)?a():(0,o.ir)(e)&&(null!==(n=e.textContent)&&void 0!==n&&n.trim()||null!==(s=e.nextSibling)&&void 0!==s&&null!==(c=s.textContent)&&void 0!==c&&c.trim()&&(0,o.ir)(e.nextSibling))&&i();function i(){const r=t.compareDocumentPosition(e);if(!(8&r)){if(2&r)return t.insertBefore(e,t.firstChild),!0;if(4&r)return t.appendChild(e),!0}return!1}function a(){const o=[...e.childNodes];for(let e=o.length-1;e>=0;e--)x(o[e],t,r)}}async function T(e,t){const r=e=>t.replaceSelectors(e.toLowerCase());if(t.replaceImages&&await async function(e){const t=e.querySelectorAll("img");for(const o of t)o.replaceWith(await u(o));const r=e.querySelectorAll("picture");for(const o of r){const e=o.querySelector("img");if(e){const t=await u(e);o.replaceWith(t)}else o.remove()}}(e),t.injectExtensions){const A=t.replaceSelectors(p.Vq);if(!e.querySelector(A)){const T=t.createElementFn("script");T.setAttribute("src",p.zq),T.setAttribute("async","");(0,l.xy)(e).appendChild(T)}}t.injectRequiredTags&&((0,f.y)(e,t.createElementFn,r),function(e){const t=e.doctype;if(t){if((0,o.TM)(t)===a)return;const r=(new DOMParser).parseFromString(a,"text/html").doctype;e.replaceChild(r,t)}else{const t=(new DOMParser).parseFromString(a,"text/html").doctype;e.insertBefore(t,e.firstChild)}}(e),(0,s.R)(e),(0,d.C)(e)),t.replaceStylesAndLinks&&(0,c.Q)(e);const i=await(0,y.F)(),m=await async function(){if(!h.size){const e=await(0,y.F)(),t=e.tags;for(let r=0;r<t.length;r++){const o=t[r],{selector:n,attrs:s,attrLists:c}=o,i=(null===c||void 0===c?void 0:c.flatMap((t=>e.attrLists.filter((({name:e})=>e===t)).flatMap((e=>e.attrs)))))||[];h.set(n,{...o,priority:r,attrs:new Map([...s,...i].map((e=>[e.name,e])))})}}return h}(),g=new Set(t.removeUnsupportedTags?e.querySelectorAll("*"):[]),b=new Map;for(let[S,E]of m){S=r(S);let C=e.querySelectorAll(S);t.injectRequiredTags&&E.required&&!C.length&&(C=[...C,t.createElementFn(E.name)]);for(const q of C){const R=b.get(q);R&&R.priority>E.priority||b.set(q,E)}}for(let[O,L]of b){const P=L.requiredParent?"$ROOT"===L.requiredParent?e:e.querySelector(L.requiredParent):null;!P||O.parentNode&&!t.moveInvalidTagPosition?O.parentNode||e.body.appendChild(O):P!==O.parentNode&&("HEAD"===L.name?P.insertBefore(O,P.firstChild):P.appendChild(O)),t.removeUnsupportedTags&&g.delete(O);const M=await w();if(t.removeUnsupportedAttributes||t.injectRequiredAttributes){const N=L.attrs,k=t.injectRequiredAttributes?new Set([...N].map((([e,t])=>t)).filter((e=>e.required&&e.value))):void 0,F=O.getAttributeNames();for(const $ of F){const j=N.get($)||M.get($);if(j){if("id"===$||"class"===$||"style"===$){null===k||void 0===k||k.delete(j);continue}if(t.removeUnsupportedAttributes){const D=O.getAttribute($);if(j.value&&j.value.indexOf(D)<0&&O.removeAttribute($),j.valueRegex){new RegExp(j.valueRegex).test(D)||O.removeAttribute($)}if(j.disallowedValueRegex){new RegExp(j.disallowedValueRegex).test(D)&&O.removeAttribute($)}const U=j.valueUrl;if(U)if(""===D)U.allowEmpty||O.removeAttribute($);else if(D.indexOf("\x3c!--")>0&&D.indexOf("--\x3e")>0);else if(!U.allowRelative)if(D.startsWith("#")||D.startsWith("/"))O.removeAttribute($);else{const H=U.protocol.length?U.protocol:["https"];let W=D.substring(0,D.indexOf(":"));if(W)if(H.indexOf(W)<0){let I=H[0]+D.substring(D.indexOf(":"));URL.canParse(I)?(0,n.Os)(O,$,I):O.removeAttribute($)}else URL.canParse(D)||O.removeAttribute($);else{let z=H[0]+D;URL.canParse(z)?(0,n.Os)(O,$,z):O.removeAttribute($)}}}null===k||void 0===k||k.delete(j)}else{if("id"===$||"class"===$||"style"===$)continue;t.removeUnsupportedAttributes&&O.removeAttribute($)}}if(k)for(const B of k)(0,n.Os)(O,B.name,B.value[0])}}t.moveInvalidTagPosition&&x(e,e.body,r);for(const Z of g)Z.remove();if(t.removeUnsupportedStyles){const V=e.querySelectorAll("*"),Y=await async function(){if(!v.size){const e=await(0,y.F)();for(const t of e.declarations)v.set(t.name,t)}return v}();function _(e){const t=e.cssText.replaceAll(/\".*\"/g,"").replaceAll(/\'.*\'/g,"").replaceAll(/\/\*.*\*\/|(-moz-|-ms-|-o-|-webkit-)+\w+(?=:)/g,"").match(/[a-z-]+(?=:[^before|after|hover])/gi)||[];for(const r of t){if(!r)continue;const t=e.getPropertyValue(r);"important"===e.getPropertyPriority(r)&&e.setProperty(r,t);const o=Y.get(r);if(o){if(o.value)o.value.indexOf(t)<0&&e.removeProperty(r);else if(o.valueRegex){new RegExp(o.valueRegex).test(t)||e.removeProperty(r)}}else e.removeProperty(r)}}function G(e){return"CSSStyleRule"===e.constructor.name}function K(e){return"CSSMediaRule"===e.constructor.name}function Q(e){const t=e.cssRules;for(let r=t.length-1;r>=0;r--){const o=t[r];G(o)?o.selectorText.indexOf("[")>=0||o.selectorText.indexOf(":")>=0?e.deleteRule(r):(_(o.style),o.style.cssText||e.deleteRule(r)):K(o)?(Q(o),o.cssRules.length||e.deleteRule(r)):e.deleteRule(r)}}for(const J of V)if((0,o.uE)(J)){const ee=J.getAttribute("style");ee&&(_(J.style),J.style.length?J.style.cssText!==ee&&J.setAttribute("style",J.style.cssText):J.removeAttribute("style"))}const X=e.querySelector("style[amp-custom]");if(X){const te=X.sheet;te&&(Q(te),X.innerHTML=[...te.cssRules].map((e=>e.cssText)).join("\n"))}}await async function(e,t,r){for(const{name:s,versions:c}of t){let t=!1;switch(s){case"amp-mustache":t=!!e.querySelector("template[type='amp-mustache']"),t||(t=!!e.querySelector(r.replaceSelectors(r.replaceSelectors("script[template='amp-mustache']"))));break;case"amp-form":t=!!e.querySelector(s),!t&&r.formsAsAmpForms&&"amp-form"===s&&(t=!!e.querySelector("form"));break;case"amp-bind":t=!!e.querySelector(s),t||(t=!!e.querySelector("[on]"));break;default:t=!!e.querySelector(s)}if(t){const t=r.replaceSelectors("amp-mustache"===s?`script[async][custom-template='${s}']`:`script[async][custom-element='${s}']`);if(!e.querySelector(t)){const t=(0,l.xy)(e),i=r.createElementFn("script"),a=(o=s,n=c.findLast((e=>"latest"!==e))||"v0",`${p.gP}/${o.toLowerCase()}-${n}.js`);i.setAttribute("async",""),i.setAttribute("amp-mustache"===s?"custom-template":"custom-element",s),i.setAttribute("src",a),t.appendChild(i),t.appendChild(e.createTextNode("\n"))}}}var o,n}(e,i.extensions,t)}function S(e,t){return Object.keys(t).reduce(((e,r)=>e.replaceAll(r,t[r])),e)}function E(e,t={}){const{correct:r=!0,injectExtensions:o=!0,mappedTags:n={}}=t;return T(e,{replaceImages:r,replaceStylesAndLinks:r,injectRequiredTags:r,injectExtensions:o,formsAsAmpForms:o,injectRequiredAttributes:r,moveInvalidTagPosition:r,removeUnsupportedTags:r,removeUnsupportedAttributes:r,removeUnsupportedStyles:r,createElementFn:t=>e.createElement(n[t.toLowerCase()]||t),replaceSelectors:e=>S(e.toLowerCase(),n)})}function C(e,t={}){const{correct:r=!0,removeExtensions:n=!0,mappedTags:u={}}=t,d=t=>e.createElement(u[t.toLowerCase()]||t),f=e=>S(e,u);if(r){!function(e){const t=e.querySelectorAll("amp-img");for(const r of t)r.replaceWith(m(r))}(e),function(e){const t=e.doctype;if(t&&(0,o.TM)(t).toLowerCase()===a){const r=(new DOMParser).parseFromString(i,"text/html").doctype;e.replaceChild(r,t)}}(e),(0,c.h)(e),(0,s.C)(e);const t=(0,l.ep)(e);t.removeAttribute("\u26a14email"),t.removeAttribute("data-css-strict")}n&&function(e,t){const r=e.querySelectorAll("*"),o=e.querySelectorAll(t.replaceSelectors("script[src]"));for(const s of o){var n;null!==(n=s.getAttribute("src"))&&void 0!==n&&n.startsWith(p.gP)&&s.remove()}for(const s of r)A(s)&&"FORM"!==s.tagName&&s.remove()}(e,{formsAsAmpForms:t.removeExtensions,createElementFn:d,replaceSelectors:f})}}}]);