@luzmo/analytics-components-kit 1.0.9-beta.12 → 1.0.9-beta.13

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 (1203) hide show
  1. package/README.md +5 -1
  2. package/components/ad-hoc-slot-content-B-qsBK5Y.cjs +20 -0
  3. package/components/ad-hoc-slot-content-BJ2TwuZ_.js +29 -0
  4. package/components/add-to-dashboard/index.cjs +1 -1
  5. package/components/add-to-dashboard/index.js +1 -1
  6. package/components/add-to-dashboard-B702runr.cjs +166 -0
  7. package/components/add-to-dashboard-O9tn5g_w.js +805 -0
  8. package/components/ai-chat/index.cjs +1 -1
  9. package/components/ai-chat/index.js +2 -2
  10. package/components/ai-chat-BBUKgMVk.js +4464 -0
  11. package/components/ai-chat-DxpHdNnM.cjs +393 -0
  12. package/components/ai-interaction-textarea/index.cjs +1 -1
  13. package/components/ai-interaction-textarea/index.js +1 -1
  14. package/components/ai-interaction-textarea-BCa1PnPL.js +823 -0
  15. package/components/ai-interaction-textarea-DSk1A1a5.cjs +101 -0
  16. package/components/area-chart-options.config-CPHMgC3Z.cjs +20 -0
  17. package/components/area-chart-options.config-_vAFPSCl.js +219 -0
  18. package/components/area-chart-options.de-D5Wto0ja.cjs +20 -0
  19. package/components/area-chart-options.de-DQgBZ85Q.js +95 -0
  20. package/components/area-chart-options.en-C_8QeDtL.js +95 -0
  21. package/components/area-chart-options.en-CrffNamW.cjs +20 -0
  22. package/components/area-chart-options.es-BPpe9WGc.cjs +20 -0
  23. package/components/area-chart-options.es-qtqhkLAN.js +95 -0
  24. package/components/area-chart-options.fr-CdlaMfpz.cjs +20 -0
  25. package/components/area-chart-options.fr-Dj1ppAEP.js +95 -0
  26. package/components/area-chart-options.nl-C7RTsytw.cjs +20 -0
  27. package/components/area-chart-options.nl-zW_03PWa.js +95 -0
  28. package/components/area-chart-positioning.config-DDMlv_1g.js +55 -0
  29. package/components/area-chart-positioning.config-DgIFeUfD.cjs +20 -0
  30. package/components/axis-options.config-Dg9pczlQ.cjs +20 -0
  31. package/components/axis-options.config-Dv2BIt_L.js +270 -0
  32. package/components/axis-options.i18n-B4Oq86I1.cjs +20 -0
  33. package/components/axis-options.i18n-b4sAT2xv.js +486 -0
  34. package/components/bar-chart-options.config-CIoiRY3c.cjs +20 -0
  35. package/components/bar-chart-options.config-DTg8EtZB.js +266 -0
  36. package/components/bar-chart-options.de-Cx7sIY-k.js +111 -0
  37. package/components/bar-chart-options.de-D7Aam6Mv.cjs +20 -0
  38. package/components/bar-chart-options.en-CkdOHM9S.cjs +20 -0
  39. package/components/bar-chart-options.en-TmptkrCq.js +111 -0
  40. package/components/bar-chart-options.es-BOKqltQs.js +111 -0
  41. package/components/bar-chart-options.es-C3SZOSiN.cjs +20 -0
  42. package/components/bar-chart-options.fr-_QYj4ma-.js +111 -0
  43. package/components/bar-chart-options.fr-aVs2K5Qh.cjs +20 -0
  44. package/components/bar-chart-options.nl-BoGYJH70.cjs +20 -0
  45. package/components/bar-chart-options.nl-zBlLF4Am.js +111 -0
  46. package/components/bar-chart-positioning.config-CfIg055Z.js +59 -0
  47. package/components/bar-chart-positioning.config-D6pFsRHW.cjs +20 -0
  48. package/components/base-ClbyBq3g.js +248 -0
  49. package/components/base-DOqHO4T0.cjs +20 -0
  50. package/components/box-plot-options.config-rGZR7gQB.js +352 -0
  51. package/components/box-plot-options.config-zD7Csp-M.cjs +20 -0
  52. package/components/box-plot-options.de-CJ5uTyj4.cjs +20 -0
  53. package/components/box-plot-options.de-DkOqW1qm.js +108 -0
  54. package/components/box-plot-options.en-BwkPF9ow.js +108 -0
  55. package/components/box-plot-options.en-D91y5Yn2.cjs +20 -0
  56. package/components/box-plot-options.es-BE_gbUfY.cjs +20 -0
  57. package/components/box-plot-options.es-Bem6QOwX.js +108 -0
  58. package/components/box-plot-options.fr-D6uGRFn8.js +108 -0
  59. package/components/box-plot-options.fr-w8w9Ulrk.cjs +20 -0
  60. package/components/box-plot-options.nl-Dl6tln-c.cjs +20 -0
  61. package/components/box-plot-options.nl-KTVKF4-A.js +108 -0
  62. package/components/box-plot-positioning.config-55vAfMWq.cjs +20 -0
  63. package/components/box-plot-positioning.config-B4w3qGMD.js +48 -0
  64. package/components/bubble-chart-positioning.config-R9U2QcYb.cjs +20 -0
  65. package/components/bubble-chart-positioning.config-sPR3ptvR.js +55 -0
  66. package/components/bullet-chart-options.config-BHw1SMf2.cjs +20 -0
  67. package/components/bullet-chart-options.config-BMWFhdUY.js +95 -0
  68. package/components/bullet-chart-options.de-C6HTRMYV.cjs +20 -0
  69. package/components/bullet-chart-options.de-DeGc5a3k.js +47 -0
  70. package/components/bullet-chart-options.en-BCzDF69d.js +47 -0
  71. package/components/bullet-chart-options.en-C2MDX5A3.cjs +20 -0
  72. package/components/bullet-chart-options.es-CGqpJxSU.cjs +20 -0
  73. package/components/bullet-chart-options.es-D6acIGZV.js +47 -0
  74. package/components/bullet-chart-options.fr-BFtQlQrs.cjs +20 -0
  75. package/components/bullet-chart-options.fr-Bb6iNEnb.js +47 -0
  76. package/components/bullet-chart-options.nl-BSRoEom3.js +47 -0
  77. package/components/bullet-chart-options.nl-BaZDLnDS.cjs +20 -0
  78. package/components/bullet-chart-positioning.config-2TaqHX1E.cjs +20 -0
  79. package/components/bullet-chart-positioning.config-CIMnOzrw.js +56 -0
  80. package/components/choropleth-map-positioning.config-C5yUI4Kf.js +55 -0
  81. package/components/choropleth-map-positioning.config-DzRWowUN.cjs +20 -0
  82. package/components/circle-pack-chart-positioning.config-Bi8XmRUJ.js +48 -0
  83. package/components/circle-pack-chart-positioning.config-DriGXH0O.cjs +20 -0
  84. package/components/circular-gauge-positioning.config--SgX1JzM.cjs +20 -0
  85. package/components/circular-gauge-positioning.config-BcJ0YoWv.js +48 -0
  86. package/components/column-chart-options.config-TQf4dANz.cjs +20 -0
  87. package/components/column-chart-options.config-YW0LC1-g.js +265 -0
  88. package/components/column-chart-options.de-B3M7bxIf.js +111 -0
  89. package/components/column-chart-options.de-BOp0fmxj.cjs +20 -0
  90. package/components/column-chart-options.en-BBFX9b4K.js +111 -0
  91. package/components/column-chart-options.en-CkdOHM9S.cjs +20 -0
  92. package/components/column-chart-options.es-BEfuaiCj.js +111 -0
  93. package/components/column-chart-options.es-BiPP9jKx.cjs +20 -0
  94. package/components/column-chart-options.fr-DVqNXI8g.js +111 -0
  95. package/components/column-chart-options.fr-aVs2K5Qh.cjs +20 -0
  96. package/components/column-chart-options.nl-BoGYJH70.cjs +20 -0
  97. package/components/column-chart-options.nl-CinPRAJ5.js +111 -0
  98. package/components/column-chart-positioning.config-CZ0_ElCf.js +55 -0
  99. package/components/column-chart-positioning.config-Dts3D63x.cjs +20 -0
  100. package/components/combination-chart-options.config-C8SPwDDG.cjs +20 -0
  101. package/components/combination-chart-options.config-DeWB-bAh.js +157 -0
  102. package/components/combination-chart-options.de-COVn8bgM.js +74 -0
  103. package/components/combination-chart-options.de-DycthBF_.cjs +20 -0
  104. package/components/combination-chart-options.en-3zjVUwIY.js +74 -0
  105. package/components/combination-chart-options.en-BIosKCWf.cjs +20 -0
  106. package/components/combination-chart-options.es-CZ6uoD-U.cjs +20 -0
  107. package/components/combination-chart-options.es-Cl5Z-GI5.js +74 -0
  108. package/components/combination-chart-options.fr-B2NH27P6.cjs +20 -0
  109. package/components/combination-chart-options.fr-CBaz1Lhf.js +74 -0
  110. package/components/combination-chart-options.nl-B-vNeGxb.cjs +20 -0
  111. package/components/combination-chart-options.nl-D32yA2uX.js +74 -0
  112. package/components/combination-chart-positioning.config-BTNl8Q0Y.js +48 -0
  113. package/components/combination-chart-positioning.config-CM0o3yFT.cjs +20 -0
  114. package/components/conditional-number-positioning.config-C80ePFmt.js +48 -0
  115. package/components/conditional-number-positioning.config-Ce8Deg6R.cjs +20 -0
  116. package/components/data-field/index.cjs +1 -1
  117. package/components/data-field/index.js +1 -1
  118. package/components/data-field-BLgof095.cjs +54 -0
  119. package/components/data-field-DtiBQ3ec.js +119 -0
  120. package/components/data-field-level/index.cjs +1 -1
  121. package/components/data-field-level/index.js +1 -1
  122. package/components/data-field-level-8Sm39bRZ.js +245 -0
  123. package/components/data-field-level-vBzXLqit.cjs +55 -0
  124. package/components/data-field-panel/index.cjs +1 -1
  125. package/components/data-field-panel/index.js +1 -1
  126. package/components/data-field-panel-DOvbsj7k.cjs +87 -0
  127. package/components/data-field-panel-YL5pqk0y.js +383 -0
  128. package/components/data-fields-select/index.cjs +1 -1
  129. package/components/data-fields-select/index.js +1 -1
  130. package/components/data-fields-select-SKpx1U5b.cjs +43 -0
  131. package/components/data-fields-select-lx0hau0V.js +293 -0
  132. package/components/dataset-selector-list/index.cjs +1 -1
  133. package/components/dataset-selector-list/index.js +1 -1
  134. package/components/dataset-selector-list-DVv3OLwc.cjs +75 -0
  135. package/components/dataset-selector-list-Dw8SseBg.js +321 -0
  136. package/components/dataset-selector-row/index.cjs +1 -1
  137. package/components/dataset-selector-row/index.js +1 -1
  138. package/components/dataset-selector-row-Dfk5cP49.cjs +104 -0
  139. package/components/dataset-selector-row-q3JwXkc7.js +448 -0
  140. package/components/date-comparison-filter-slots.config-BNgZHORP.cjs +20 -0
  141. package/components/date-comparison-filter-slots.config-CO_C1qq2.js +37 -0
  142. package/components/de-DfxglHXp.js +599 -0
  143. package/components/de-k95wCo8e.cjs +20 -0
  144. package/components/display-settings/index.cjs +1 -1
  145. package/components/display-settings/index.js +1 -1
  146. package/components/display-settings-BGU97VQm.cjs +143 -0
  147. package/components/display-settings-CW-aM6Tg.js +317 -0
  148. package/components/display-settings-binning/index.cjs +1 -1
  149. package/components/display-settings-binning/index.js +1 -1
  150. package/components/display-settings-binning-C18iQPBR.js +111 -0
  151. package/components/display-settings-binning-ChgYSZVd.cjs +56 -0
  152. package/components/display-settings-datetime/index.cjs +1 -1
  153. package/components/display-settings-datetime/index.js +1 -1
  154. package/components/display-settings-datetime-DssZrTKW.cjs +217 -0
  155. package/components/display-settings-datetime-NhrNS7pq.js +414 -0
  156. package/components/display-settings-grand-totals/index.cjs +1 -1
  157. package/components/display-settings-grand-totals/index.js +1 -1
  158. package/components/display-settings-grand-totals-CPTypeXs.cjs +44 -0
  159. package/components/display-settings-grand-totals-D0UduzQs.js +90 -0
  160. package/components/display-settings-numeric/index.cjs +1 -1
  161. package/components/display-settings-numeric/index.js +1 -1
  162. package/components/display-settings-numeric-B2AuI2qg.js +480 -0
  163. package/components/display-settings-numeric-BzWEYoHj.cjs +190 -0
  164. package/components/display-settings-period-over-period/index.cjs +1 -1
  165. package/components/display-settings-period-over-period/index.js +1 -1
  166. package/components/display-settings-period-over-period-DfXdZPP9.js +443 -0
  167. package/components/display-settings-period-over-period-Yy1voN9g.cjs +227 -0
  168. package/components/donut-chart-options.config-DAetuaMj.cjs +20 -0
  169. package/components/donut-chart-options.config-DoX09FLQ.js +226 -0
  170. package/components/donut-chart-options.de-AXRfsiXW.cjs +20 -0
  171. package/components/donut-chart-options.de-CSSodjBg.js +86 -0
  172. package/components/donut-chart-options.en-Du6sBhqy.js +86 -0
  173. package/components/donut-chart-options.en-aZqu2oEV.cjs +20 -0
  174. package/components/donut-chart-options.es-7WgxuaDe.cjs +20 -0
  175. package/components/donut-chart-options.es-BWI72OH_.js +86 -0
  176. package/components/donut-chart-options.fr-C0Z8xEyF.cjs +20 -0
  177. package/components/donut-chart-options.fr-DeUbrL1Y.js +86 -0
  178. package/components/donut-chart-options.nl-aKVLbRJY.cjs +20 -0
  179. package/components/donut-chart-options.nl-bixP46Bs.js +86 -0
  180. package/components/donut-chart-positioning.config-0z7hLOs9.js +48 -0
  181. package/components/donut-chart-positioning.config-jWQOJfuv.cjs +20 -0
  182. package/components/es-B4X3tN70.js +599 -0
  183. package/components/es-BvDMibMQ.cjs +20 -0
  184. package/components/evolution-number-options.config-B6iEr_Bp.cjs +20 -0
  185. package/components/evolution-number-options.config-BGvfrpHI.js +230 -0
  186. package/components/evolution-number-options.de-DcLx_BOR.js +76 -0
  187. package/components/evolution-number-options.de-va_ypOy6.cjs +20 -0
  188. package/components/evolution-number-options.en-Afr-jy0u.js +76 -0
  189. package/components/evolution-number-options.en-CtAX9A-5.cjs +20 -0
  190. package/components/evolution-number-options.es-BQKSc22r.js +76 -0
  191. package/components/evolution-number-options.es-CCkbdLdF.cjs +20 -0
  192. package/components/evolution-number-options.fr-97NjkE_T.js +76 -0
  193. package/components/evolution-number-options.fr-QIK5EXQs.cjs +20 -0
  194. package/components/evolution-number-options.nl-BxQ9H4Ml.js +76 -0
  195. package/components/evolution-number-options.nl-CwUSSlVi.cjs +20 -0
  196. package/components/evolution-number-positioning.config-CNwQK1ho.cjs +20 -0
  197. package/components/evolution-number-positioning.config-Ccn4319Q.js +48 -0
  198. package/components/filter-expression-picker/index.cjs +1 -1
  199. package/components/filter-expression-picker/index.js +1 -1
  200. package/components/filter-expression-picker-C5s82Kj8.cjs +40 -0
  201. package/components/filter-expression-picker-ChPk7AhZ.js +434 -0
  202. package/components/filter-item/index.cjs +1 -1
  203. package/components/filter-item/index.js +1 -1
  204. package/components/filter-item-BsUxTNwl.cjs +111 -0
  205. package/components/filter-item-CEIBzW6Y.js +793 -0
  206. package/components/filter-parameter-picker/index.cjs +1 -1
  207. package/components/filter-parameter-picker/index.js +1 -1
  208. package/components/filter-parameter-picker-CBQlNMvr.cjs +124 -0
  209. package/components/filter-parameter-picker-CMQpNcck.js +372 -0
  210. package/components/filter-value-picker/index.cjs +1 -1
  211. package/components/filter-value-picker/index.js +1 -1
  212. package/components/filter-value-picker-6UbVX8EX.cjs +69 -0
  213. package/components/filter-value-picker-CD9AfCEx.js +170 -0
  214. package/components/filter-value-picker-datetime/index.cjs +1 -1
  215. package/components/filter-value-picker-datetime/index.js +1 -1
  216. package/components/filter-value-picker-datetime-BkaNyKM5.cjs +51 -0
  217. package/components/filter-value-picker-datetime-C80_9zmR.js +160 -0
  218. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  219. package/components/filter-value-picker-hierarchy/index.js +1 -1
  220. package/components/filter-value-picker-hierarchy-Dcuq6QyL.cjs +54 -0
  221. package/components/filter-value-picker-hierarchy-DkoquwOp.js +316 -0
  222. package/components/filter-value-picker-numeric/index.cjs +1 -1
  223. package/components/filter-value-picker-numeric/index.js +1 -1
  224. package/components/filter-value-picker-numeric-BD9OX_qJ.cjs +54 -0
  225. package/components/filter-value-picker-numeric-C5FI37KY.js +237 -0
  226. package/components/filters/filters.d.ts +11 -0
  227. package/components/filters/index.cjs +1 -1
  228. package/components/filters/index.js +1 -1
  229. package/components/filters-BnH330me.js +942 -0
  230. package/components/filters-CBFB5tNm.cjs +187 -0
  231. package/components/formula/index.cjs +1 -1
  232. package/components/formula/index.js +1 -1
  233. package/components/formula--9ohJwgp.js +136 -0
  234. package/components/formula-PROK1Bg8.cjs +45 -0
  235. package/components/formula-codemirror-CF4MDQHE.js +12008 -0
  236. package/components/formula-codemirror-Q1mjfL4P.cjs +215 -0
  237. package/components/formula-display-store-B1rP7Z1I.js +1087 -0
  238. package/components/formula-display-store-kVLhQbcs.cjs +20 -0
  239. package/components/formula-editor/index.cjs +1 -1
  240. package/components/formula-editor/index.js +3 -3
  241. package/components/formula-editor-DQgpmzJD.js +685 -0
  242. package/components/formula-editor-DihYwWUJ.cjs +224 -0
  243. package/components/formula-field/index.cjs +1 -1
  244. package/components/formula-field/index.js +1 -1
  245. package/components/formula-field-3w3LUoPv.js +38 -0
  246. package/components/formula-field-D2pgnvqx.cjs +20 -0
  247. package/components/formula-input-base-BlqLDV8C.js +236 -0
  248. package/components/formula-input-base-YLUm2p_4.cjs +49 -0
  249. package/components/fr-DdBfGHSA.js +599 -0
  250. package/components/fr-RTKQS7AJ.cjs +20 -0
  251. package/components/funnel-chart-options.config-BjAeGQO1.js +220 -0
  252. package/components/funnel-chart-options.config-D2zw9c3U.cjs +20 -0
  253. package/components/funnel-chart-options.de-B2f_xxvV.cjs +20 -0
  254. package/components/funnel-chart-options.de-D677e-vT.js +77 -0
  255. package/components/funnel-chart-options.en-B7fjBNs8.js +77 -0
  256. package/components/funnel-chart-options.en-Cdvkged9.cjs +20 -0
  257. package/components/funnel-chart-options.es-CrAp7hOK.cjs +20 -0
  258. package/components/funnel-chart-options.es-CyfC7rHm.js +77 -0
  259. package/components/funnel-chart-options.fr-0RxiqeZg.cjs +20 -0
  260. package/components/funnel-chart-options.fr-BnAHH5Tc.js +77 -0
  261. package/components/funnel-chart-options.nl-DeidG7iM.js +77 -0
  262. package/components/funnel-chart-options.nl-r_wRg5qR.cjs +20 -0
  263. package/components/funnel-chart-positioning.config-CGQlxp-N.js +48 -0
  264. package/components/funnel-chart-positioning.config-CuPbQwNk.cjs +20 -0
  265. package/components/get-dataset-name-BYvHNJQ6.js +32 -0
  266. package/components/get-dataset-name-Di7POfCE.cjs +20 -0
  267. package/components/groupings-C9y28uVF.js +52 -0
  268. package/components/groupings-Djt4x-m8.cjs +20 -0
  269. package/components/heat-map-positioning.config-B4Mt-5Z-.js +48 -0
  270. package/components/heat-map-positioning.config-DhBaQp_z.cjs +20 -0
  271. package/components/heat-table-options.config-CcG12s1p.cjs +20 -0
  272. package/components/heat-table-options.config-CiAQfvyb.js +277 -0
  273. package/components/heat-table-options.de-Br9DbeCp.cjs +20 -0
  274. package/components/heat-table-options.de-CuJLYAKD.js +114 -0
  275. package/components/heat-table-options.en-BxaSIKKl.js +114 -0
  276. package/components/heat-table-options.en-Cdn-xUSD.cjs +20 -0
  277. package/components/heat-table-options.es-Dkv8Q0Gi.cjs +20 -0
  278. package/components/heat-table-options.es-IS8jBtX3.js +114 -0
  279. package/components/heat-table-options.fr-Rnhqij20.js +114 -0
  280. package/components/heat-table-options.fr-uLTRU2oE.cjs +20 -0
  281. package/components/heat-table-options.nl-Blzg45N9.js +114 -0
  282. package/components/heat-table-options.nl-DaYIbnqr.cjs +20 -0
  283. package/components/heat-table-positioning.config-CY8sBOrD.js +55 -0
  284. package/components/heat-table-positioning.config-nEY0dbDM.cjs +20 -0
  285. package/components/hexbin-map-positioning.config--wq1zdhz.js +48 -0
  286. package/components/hexbin-map-positioning.config-DdWya10E.cjs +20 -0
  287. package/components/index.cjs +1 -1
  288. package/components/index.js +55 -55
  289. package/components/interactive-viz-item/index.cjs +1 -1
  290. package/components/interactive-viz-item/index.js +1 -1
  291. package/components/interactive-viz-item-CMpwMtM-.cjs +261 -0
  292. package/components/interactive-viz-item-DBxAlfyo.js +528 -0
  293. package/components/item-grid/index.cjs +1 -1
  294. package/components/item-grid/index.js +2 -2
  295. package/components/item-grid-DMCkHIh_.cjs +41 -0
  296. package/components/item-grid-NWnUnlNW.js +245 -0
  297. package/components/item-grid-item-actions-menu/index.cjs +1 -1
  298. package/components/item-grid-item-actions-menu/index.js +1 -1
  299. package/components/item-grid-item-actions-menu-CnC_fFq4.cjs +52 -0
  300. package/components/item-grid-item-actions-menu-DfA4PKM9.js +199 -0
  301. package/components/item-option/index.cjs +1 -1
  302. package/components/item-option/index.js +1 -1
  303. package/components/item-option-CFSZXwLt.cjs +269 -0
  304. package/components/item-option-YpwMa7la.js +959 -0
  305. package/components/item-option-action-button-group/index.cjs +1 -1
  306. package/components/item-option-action-button-group/index.js +1 -1
  307. package/components/item-option-action-button-group-BLoh0dmU.js +117 -0
  308. package/components/item-option-action-button-group-Dg87SFd8.cjs +53 -0
  309. package/components/item-option-base-5PYKLoC7.js +120 -0
  310. package/components/item-option-base-CY2pOzjk.cjs +56 -0
  311. package/components/item-option-color-palette-picker/index.cjs +1 -1
  312. package/components/item-option-color-palette-picker/index.js +1 -1
  313. package/components/item-option-color-palette-picker-B0vPoYn4.js +2040 -0
  314. package/components/item-option-color-palette-picker-DfWOwc6s.cjs +40 -0
  315. package/components/item-option-color-picker/index.cjs +1 -1
  316. package/components/item-option-color-picker/index.js +1 -1
  317. package/components/item-option-color-picker-BQ1Kichc.cjs +34 -0
  318. package/components/item-option-color-picker-BgLqlgMF.js +86 -0
  319. package/components/item-option-color-range/index.cjs +1 -1
  320. package/components/item-option-color-range/index.js +1 -1
  321. package/components/item-option-color-range-AadyK2zm.cjs +98 -0
  322. package/components/item-option-color-range-r7Psy6yt.js +219 -0
  323. package/components/item-option-guidelines/index.cjs +1 -1
  324. package/components/item-option-guidelines/index.js +1 -1
  325. package/components/item-option-guidelines-Dj5vjMOy.cjs +135 -0
  326. package/components/item-option-guidelines-WfKKowZh.js +420 -0
  327. package/components/item-option-multi-language-field/index.cjs +1 -1
  328. package/components/item-option-multi-language-field/index.js +1 -1
  329. package/components/item-option-multi-language-field-Cbj5QUsQ.cjs +33 -0
  330. package/components/item-option-multi-language-field-p26WS8e2.js +81 -0
  331. package/components/item-option-number-field/index.cjs +1 -1
  332. package/components/item-option-number-field/index.js +1 -1
  333. package/components/item-option-number-field-CnZQfLko.js +101 -0
  334. package/components/item-option-number-field-DokKaZNJ.cjs +38 -0
  335. package/components/item-option-panel/index.cjs +1 -1
  336. package/components/item-option-panel/index.js +1 -1
  337. package/components/item-option-panel-Cs9BGllC.js +181 -0
  338. package/components/item-option-panel-IeqCr-0M.cjs +67 -0
  339. package/components/item-option-picker/index.cjs +1 -1
  340. package/components/item-option-picker/index.js +1 -1
  341. package/components/item-option-picker-BwZAq7t8.js +76 -0
  342. package/components/item-option-picker-DV-k1tkm.cjs +37 -0
  343. package/components/item-option-position-picker/index.cjs +1 -1
  344. package/components/item-option-position-picker/index.js +1 -1
  345. package/components/item-option-position-picker-CCikjVLj.cjs +32 -0
  346. package/components/item-option-position-picker-D5a_gcn6.js +116 -0
  347. package/components/item-option-positions-number-field/index.cjs +1 -1
  348. package/components/item-option-positions-number-field/index.js +1 -1
  349. package/components/item-option-positions-number-field-Bn8Dwath.js +165 -0
  350. package/components/item-option-positions-number-field-wcQHJTZW.cjs +49 -0
  351. package/components/item-option-radio-button-group/index.cjs +1 -1
  352. package/components/item-option-radio-button-group/index.js +1 -1
  353. package/components/item-option-radio-button-group-DiElJAIW.cjs +37 -0
  354. package/components/item-option-radio-button-group-sZ5dW5N0.js +73 -0
  355. package/components/item-option-slider/index.cjs +1 -1
  356. package/components/item-option-slider/index.js +1 -1
  357. package/components/item-option-slider-CzL6OVqv.cjs +33 -0
  358. package/components/item-option-slider-DH5Q2WZt.js +97 -0
  359. package/components/item-option-switch/index.cjs +1 -1
  360. package/components/item-option-switch/index.js +1 -1
  361. package/components/item-option-switch-DkMh3RqG.cjs +30 -0
  362. package/components/item-option-switch-p552By7W.js +68 -0
  363. package/components/item-option-text-field/index.cjs +1 -1
  364. package/components/item-option-text-field/index.js +1 -1
  365. package/components/item-option-text-field-CDFWXxCi.cjs +33 -0
  366. package/components/item-option-text-field-DXwWeQLc.js +79 -0
  367. package/components/item-options-configs.cjs +1 -1
  368. package/components/item-options-configs.js +16 -16
  369. package/components/item-slot-drop/index.cjs +1 -1
  370. package/components/item-slot-drop/index.js +1 -1
  371. package/components/item-slot-drop-B7xHip7W.js +329 -0
  372. package/components/item-slot-drop-D0aDeRzk.cjs +91 -0
  373. package/components/item-slot-drop-panel/index.cjs +1 -1
  374. package/components/item-slot-drop-panel/index.js +1 -1
  375. package/components/item-slot-drop-panel-CN14Fhl_.js +354 -0
  376. package/components/item-slot-drop-panel-PpoHWxpZ.cjs +57 -0
  377. package/components/item-slot-picker/index.cjs +1 -1
  378. package/components/item-slot-picker/index.js +1 -1
  379. package/components/item-slot-picker/item-slot-picker.d.ts +22 -0
  380. package/components/item-slot-picker-BGQn6mCM.cjs +158 -0
  381. package/components/item-slot-picker-DSliJni4.js +556 -0
  382. package/components/item-slot-picker-panel/index.cjs +1 -1
  383. package/components/item-slot-picker-panel/index.js +1 -1
  384. package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +6 -0
  385. package/components/item-slot-picker-panel-BV3WnS9j.js +451 -0
  386. package/components/item-slot-picker-panel-CZHlazfn.cjs +82 -0
  387. package/components/item-slots-configs.cjs +1 -1
  388. package/components/item-slots-configs.js +1 -1
  389. package/components/kpi-options.config-CNBlWUeE.js +334 -0
  390. package/components/kpi-options.config-DJW44vTd.cjs +20 -0
  391. package/components/kpi-options.de-BNSyszd2.cjs +20 -0
  392. package/components/kpi-options.de-DTuT_w_B.js +109 -0
  393. package/components/kpi-options.en-Bnf64PJC.js +109 -0
  394. package/components/kpi-options.en-DZkxgBCc.cjs +20 -0
  395. package/components/kpi-options.es-DQFRSRwE.cjs +20 -0
  396. package/components/kpi-options.es-a0gSVDp5.js +109 -0
  397. package/components/kpi-options.fr-BRlaWkQ_.js +109 -0
  398. package/components/kpi-options.fr-Cpm8BfZ9.cjs +20 -0
  399. package/components/kpi-options.nl-01k2djoO.js +109 -0
  400. package/components/kpi-options.nl-W4ujxuOd.cjs +20 -0
  401. package/components/kpi-positioning.config-Bo0-gfhW.cjs +20 -0
  402. package/components/kpi-positioning.config-Cg8-gz35.js +48 -0
  403. package/components/kpi-slots.config-BvTgcJ9e.cjs +20 -0
  404. package/components/kpi-slots.config-tk6nFpOZ.js +36 -0
  405. package/components/line-chart-options.config-Bmru689o.cjs +20 -0
  406. package/components/line-chart-options.config-fYL7fjSK.js +255 -0
  407. package/components/line-chart-options.de-CB8mHJhD.cjs +20 -0
  408. package/components/line-chart-options.de-CFcXltXH.js +89 -0
  409. package/components/line-chart-options.en-B2gp-KSj.js +89 -0
  410. package/components/line-chart-options.en-BrKt9W7U.cjs +20 -0
  411. package/components/line-chart-options.es-BgnNvocl.cjs +20 -0
  412. package/components/line-chart-options.es-OxOYh4jd.js +89 -0
  413. package/components/line-chart-options.fr-CHk40Imh.js +89 -0
  414. package/components/line-chart-options.fr-Jl6XdyHr.cjs +20 -0
  415. package/components/line-chart-options.nl-C6ncBb5a.js +89 -0
  416. package/components/line-chart-options.nl-esSfBoBW.cjs +20 -0
  417. package/components/line-chart-positioning.config-Bb87MKxZ.cjs +20 -0
  418. package/components/line-chart-positioning.config-UEksxjo2.js +55 -0
  419. package/components/localized-mixin-DdMOQmkW.cjs +20 -0
  420. package/components/localized-mixin-Dv4dT_Qo.js +45 -0
  421. package/components/marker-map-positioning.config-3Vbat2pI.js +48 -0
  422. package/components/marker-map-positioning.config-CFmqWXOL.cjs +20 -0
  423. package/components/nl-CA2Q5zqK.cjs +20 -0
  424. package/components/nl-Dvklxh6k.js +599 -0
  425. package/components/ohlc-chart-options.config-C2Ki7XH3.cjs +20 -0
  426. package/components/ohlc-chart-options.config-DpYG3lZD.js +94 -0
  427. package/components/ohlc-chart-positioning.config-CPXmE2C6.js +78 -0
  428. package/components/ohlc-chart-positioning.config-DPG62QFZ.cjs +20 -0
  429. package/components/parallel-coordinates-plot-positioning.config-CiHl_5PC.js +48 -0
  430. package/components/parallel-coordinates-plot-positioning.config-GLUY-_3r.cjs +20 -0
  431. package/components/pivot-table-positioning.config-CBckdPF6.cjs +20 -0
  432. package/components/pivot-table-positioning.config-DlaxbJDe.js +55 -0
  433. package/components/pyramid-chart-options.config-BCBDjb4p.js +222 -0
  434. package/components/pyramid-chart-options.config-CCts-5RK.cjs +20 -0
  435. package/components/pyramid-chart-options.de-DF-c80dq.js +103 -0
  436. package/components/pyramid-chart-options.de-DuOpsLs5.cjs +20 -0
  437. package/components/pyramid-chart-options.en-C3DkPcBH.cjs +20 -0
  438. package/components/pyramid-chart-options.en-CUA9TibF.js +103 -0
  439. package/components/pyramid-chart-options.es-DOU8E08a.js +103 -0
  440. package/components/pyramid-chart-options.es-DWJdStho.cjs +20 -0
  441. package/components/pyramid-chart-options.fr-DqUZ4U9J.js +103 -0
  442. package/components/pyramid-chart-options.fr-Wb5tFvLC.cjs +20 -0
  443. package/components/pyramid-chart-options.nl-8nKaQ7cp.js +103 -0
  444. package/components/pyramid-chart-options.nl-Csec8VMp.cjs +20 -0
  445. package/components/pyramid-chart-positioning.config-B_hdKwE-.cjs +20 -0
  446. package/components/pyramid-chart-positioning.config-DIttV8Bd.js +55 -0
  447. package/components/radar-chart-options.config-BR1P1bC2.cjs +20 -0
  448. package/components/radar-chart-options.config-Cso1juLq.js +173 -0
  449. package/components/radar-chart-options.de-Er7fpAGV.cjs +20 -0
  450. package/components/radar-chart-options.de-vQACT9qo.js +54 -0
  451. package/components/radar-chart-options.en-BEJDfdE6.cjs +20 -0
  452. package/components/radar-chart-options.en-DPzqlJP6.js +54 -0
  453. package/components/radar-chart-options.es-CYh8qQtu.js +54 -0
  454. package/components/radar-chart-options.es-L88u7bqn.cjs +20 -0
  455. package/components/radar-chart-options.fr-CslMsBcG.cjs +20 -0
  456. package/components/radar-chart-options.fr-xpzxqPGa.js +54 -0
  457. package/components/radar-chart-options.nl-03B6BgO1.js +54 -0
  458. package/components/radar-chart-options.nl-CIvGrz_A.cjs +20 -0
  459. package/components/radar-chart-positioning.config-BCmKaEU3.cjs +20 -0
  460. package/components/radar-chart-positioning.config-SuMx33Rb.js +55 -0
  461. package/components/route-map-positioning.config-BHgJfD2W.cjs +20 -0
  462. package/components/route-map-positioning.config-os7LBECw.js +66 -0
  463. package/components/sankey-diagram-positioning.config-BkZ-z93h.cjs +20 -0
  464. package/components/sankey-diagram-positioning.config-CefPXYny.js +66 -0
  465. package/components/scatter-plot-options.config-BjkL6NKA.js +165 -0
  466. package/components/scatter-plot-options.config-iJwa8WRA.cjs +20 -0
  467. package/components/scatter-plot-options.de-CUPe1USU.cjs +20 -0
  468. package/components/scatter-plot-options.de-DiT6Dfgy.js +115 -0
  469. package/components/scatter-plot-options.en-DaPAnBDH.js +115 -0
  470. package/components/scatter-plot-options.en-aCHwE_2o.cjs +20 -0
  471. package/components/scatter-plot-options.es-B2sIEexr.cjs +20 -0
  472. package/components/scatter-plot-options.es-DKVASEN4.js +115 -0
  473. package/components/scatter-plot-options.fr-B-7GyEXc.cjs +20 -0
  474. package/components/scatter-plot-options.fr-DPt3Ffoy.js +115 -0
  475. package/components/scatter-plot-options.nl-B5ytQ1Si.js +115 -0
  476. package/components/scatter-plot-options.nl-Cz-6m7sg.cjs +20 -0
  477. package/components/scatter-plot-positioning.config-Cj97qUBu.cjs +20 -0
  478. package/components/scatter-plot-positioning.config-tPnsj0Bi.js +77 -0
  479. package/components/set-locale-4ytzZDhn.cjs +20 -0
  480. package/components/set-locale-w6Y3RUvf.js +43 -0
  481. package/components/slicer-filter-positioning.config-Bh_p1GYx.js +48 -0
  482. package/components/slicer-filter-positioning.config-CS51YpGW.cjs +20 -0
  483. package/components/slot-content-C9m-z0Ux.js +23 -0
  484. package/components/slot-content-DYiwtIBX.cjs +20 -0
  485. package/components/slot-menu/index.cjs +1 -1
  486. package/components/slot-menu/index.js +1 -1
  487. package/components/slot-menu/slot-menu.d.ts +5 -0
  488. package/components/slot-menu-B7q15GwU.js +436 -0
  489. package/components/slot-menu-H-hVDVNW.cjs +71 -0
  490. package/components/slot-menu-list/index.cjs +1 -1
  491. package/components/slot-menu-list/index.js +1 -1
  492. package/components/slot-menu-list-C1rVkQEG.cjs +44 -0
  493. package/components/slot-menu-list-CMaf2WZ9.js +348 -0
  494. package/components/slot-role-classification-BtYLRqq0.cjs +20 -0
  495. package/components/slot-role-classification-DKClEpT3.js +133 -0
  496. package/components/slots-config-ChJNgCJz.js +77 -0
  497. package/components/slots-config-Cy9pA0wm.cjs +20 -0
  498. package/components/speedometer-chart-positioning.config-CA4mIQVz.cjs +20 -0
  499. package/components/speedometer-chart-positioning.config-DxmmNwvU.js +48 -0
  500. package/components/spike-map-positioning.config-BMnS3qbm.js +55 -0
  501. package/components/spike-map-positioning.config-Drj2qKMJ.cjs +20 -0
  502. package/components/strip-plot-positioning.config-CiGPeVyq.cjs +20 -0
  503. package/components/strip-plot-positioning.config-DOPNhBEE.js +48 -0
  504. package/components/sunburst-chart-options.config-C5ChdoMM.js +190 -0
  505. package/components/sunburst-chart-options.config-CtT-pBM0.cjs +20 -0
  506. package/components/sunburst-chart-options.de-DO65RQI_.cjs +20 -0
  507. package/components/sunburst-chart-options.de-DPRW5IB9.js +61 -0
  508. package/components/sunburst-chart-options.en-BU4abvh8.js +61 -0
  509. package/components/sunburst-chart-options.en-C3IkkUBW.cjs +20 -0
  510. package/components/sunburst-chart-options.es-BV_4fN10.cjs +20 -0
  511. package/components/sunburst-chart-options.es-Bo65ZQ0Y.js +61 -0
  512. package/components/sunburst-chart-options.fr-5_0gm7hs.js +61 -0
  513. package/components/sunburst-chart-options.fr-DO7-oeNe.cjs +20 -0
  514. package/components/sunburst-chart-options.nl-Bcqm8ykQ.js +61 -0
  515. package/components/sunburst-chart-options.nl-DsecjcfE.cjs +20 -0
  516. package/components/sunburst-chart-positioning.config-CveUDnv_.cjs +20 -0
  517. package/components/sunburst-chart-positioning.config-cwQaxuYH.js +48 -0
  518. package/components/symbol-map-positioning.config-CUaCGtpk.cjs +20 -0
  519. package/components/symbol-map-positioning.config-W6EMKyLL.js +55 -0
  520. package/components/treemap-chart-positioning.config-CynNsRhu.cjs +20 -0
  521. package/components/treemap-chart-positioning.config-bQdU3kX_.js +55 -0
  522. package/components/utils/base.cjs +1 -1
  523. package/components/utils/base.js +2 -2
  524. package/components/utils/store.cjs +1 -1
  525. package/components/utils/store.js +1 -1
  526. package/components/utils-1zaS4yM5.js +240 -0
  527. package/components/utils-B_KSNNkR.cjs +20 -0
  528. package/components/utils.cjs +1 -1
  529. package/components/utils.js +2 -2
  530. package/components/venn-diagram-positioning.config-Bv5zft18.js +55 -0
  531. package/components/venn-diagram-positioning.config-CZv8APyM.cjs +20 -0
  532. package/components/wordcloud-chart-positioning.config-BrbvVug5.cjs +20 -0
  533. package/components/wordcloud-chart-positioning.config-C0lpiEgP.js +55 -0
  534. package/custom-elements.json +92 -0
  535. package/package.json +2 -2
  536. package/react/package.json +2 -2
  537. package/standalone/chunks/add-to-dashboard-BlrZ08qE.js +148 -0
  538. package/standalone/chunks/area-chart-options.config-BMvUma_d.js +2 -0
  539. package/standalone/chunks/area-chart-options.de-CiUYKjuF.js +2 -0
  540. package/standalone/chunks/area-chart-options.en-ClANS4ox.js +2 -0
  541. package/standalone/chunks/area-chart-options.es-CJ9G7w-d.js +2 -0
  542. package/standalone/chunks/area-chart-options.fr-HT5lv1Xa.js +2 -0
  543. package/standalone/chunks/area-chart-options.nl-BLkEkEtR.js +2 -0
  544. package/standalone/chunks/axis-options.config-DOE0YdaK.js +2 -0
  545. package/standalone/chunks/axis-options.i18n-WUQx3mVm.js +2 -0
  546. package/standalone/chunks/bar-chart-options.config-BpHqXBFq.js +2 -0
  547. package/standalone/chunks/bar-chart-options.de-BFaQAeSt.js +2 -0
  548. package/standalone/chunks/bar-chart-options.en-uZbbpK84.js +2 -0
  549. package/standalone/chunks/bar-chart-options.es-twNx5B2m.js +2 -0
  550. package/standalone/chunks/bar-chart-options.fr-DRaaaSSH.js +2 -0
  551. package/standalone/chunks/bar-chart-options.nl-CJiMjH5v.js +2 -0
  552. package/standalone/chunks/base-Bo6Un1Yu.js +2 -0
  553. package/standalone/chunks/box-plot-options.config-DDWb_KmV.js +2 -0
  554. package/standalone/chunks/box-plot-options.de-CI5qJAF7.js +2 -0
  555. package/standalone/chunks/box-plot-options.en-BQtMNcl5.js +2 -0
  556. package/standalone/chunks/box-plot-options.es-CHjivUoY.js +2 -0
  557. package/standalone/chunks/box-plot-options.fr-FkvAk1kX.js +2 -0
  558. package/standalone/chunks/box-plot-options.nl-BRnSzvbY.js +2 -0
  559. package/standalone/chunks/bullet-chart-options.config-BhYe0N0o.js +2 -0
  560. package/standalone/chunks/bullet-chart-options.de-kCP9VTDJ.js +2 -0
  561. package/standalone/chunks/bullet-chart-options.en-CQ7u24xM.js +2 -0
  562. package/standalone/chunks/bullet-chart-options.es-CMRwpRyH.js +2 -0
  563. package/standalone/chunks/bullet-chart-options.fr-NLzgxbaB.js +2 -0
  564. package/standalone/chunks/bullet-chart-options.nl-BxNIes0u.js +2 -0
  565. package/standalone/chunks/column-chart-options.config-YIe6cMV5.js +2 -0
  566. package/standalone/chunks/column-chart-options.de-CpCK5x2F.js +2 -0
  567. package/standalone/chunks/column-chart-options.en-uZbbpK84.js +2 -0
  568. package/standalone/chunks/column-chart-options.es-CNgSUKXK.js +2 -0
  569. package/standalone/chunks/column-chart-options.fr-DRaaaSSH.js +2 -0
  570. package/standalone/chunks/column-chart-options.nl-CJiMjH5v.js +2 -0
  571. package/standalone/chunks/combination-chart-options.config-Bf7cNmpc.js +2 -0
  572. package/standalone/chunks/combination-chart-options.de-BarapFn7.js +2 -0
  573. package/standalone/chunks/combination-chart-options.en-Dip8nNUE.js +2 -0
  574. package/standalone/chunks/combination-chart-options.es-3xQbg-Up.js +2 -0
  575. package/standalone/chunks/combination-chart-options.fr-BsXLtxB_.js +2 -0
  576. package/standalone/chunks/combination-chart-options.nl-8LA_bn9G.js +2 -0
  577. package/standalone/chunks/date-comparison-filter-slots.config-GxZF3vb3.js +2 -0
  578. package/standalone/chunks/de-DNm8GJah.js +2 -0
  579. package/standalone/chunks/display-settings-binning-BcAygd33.js +38 -0
  580. package/standalone/chunks/display-settings-datetime-C-c7VS62.js +199 -0
  581. package/standalone/chunks/display-settings-grand-totals-CHUPJMiO.js +26 -0
  582. package/standalone/chunks/display-settings-numeric-CwIsAjlA.js +172 -0
  583. package/standalone/chunks/display-settings-period-over-period-Dgr8fANF.js +209 -0
  584. package/standalone/chunks/donut-chart-options.config-DWpePR5V.js +2 -0
  585. package/standalone/chunks/donut-chart-options.de-IKGJRoDL.js +2 -0
  586. package/standalone/chunks/donut-chart-options.en-O2IK3YiS.js +2 -0
  587. package/standalone/chunks/donut-chart-options.es-gKAHuFAU.js +2 -0
  588. package/standalone/chunks/donut-chart-options.fr-Q-uMrtQG.js +2 -0
  589. package/standalone/chunks/donut-chart-options.nl-B6v6jK4l.js +2 -0
  590. package/standalone/chunks/embed-NStEUFPE.js +228 -0
  591. package/standalone/chunks/es-BKlgDDOM.js +2 -0
  592. package/standalone/chunks/evolution-number-options.config-Brbyq_TD.js +2 -0
  593. package/standalone/chunks/evolution-number-options.de-NPOdl5mB.js +2 -0
  594. package/standalone/chunks/evolution-number-options.en-Eq53ZOMK.js +2 -0
  595. package/standalone/chunks/evolution-number-options.es-WS8nAzvW.js +2 -0
  596. package/standalone/chunks/evolution-number-options.fr-DmcY0jGH.js +2 -0
  597. package/standalone/chunks/evolution-number-options.nl-CvjB2qil.js +2 -0
  598. package/standalone/chunks/filters-BqUlasEq.js +532 -0
  599. package/standalone/chunks/formula-codemirror-CJ8OazqM.js +197 -0
  600. package/standalone/chunks/fr-CYhAyq_i.js +2 -0
  601. package/standalone/chunks/funnel-chart-options.config-S1yxc6IG.js +2 -0
  602. package/standalone/chunks/funnel-chart-options.de-u5OrFyng.js +2 -0
  603. package/standalone/chunks/funnel-chart-options.en-BEGSBn35.js +2 -0
  604. package/standalone/chunks/funnel-chart-options.es-CxWkEgMs.js +2 -0
  605. package/standalone/chunks/funnel-chart-options.fr-DZmmgK2t.js +2 -0
  606. package/standalone/chunks/funnel-chart-options.nl-C6BitaEJ.js +2 -0
  607. package/standalone/chunks/heat-table-options.config-BmtIS2zc.js +2 -0
  608. package/standalone/chunks/heat-table-options.de-B4y9dcra.js +2 -0
  609. package/standalone/chunks/heat-table-options.en-Bouip0NE.js +2 -0
  610. package/standalone/chunks/heat-table-options.es-BRAQP8GK.js +2 -0
  611. package/standalone/chunks/heat-table-options.fr-CTzciHeO.js +2 -0
  612. package/standalone/chunks/heat-table-options.nl-DzmWrTeQ.js +2 -0
  613. package/standalone/chunks/item-option-action-button-group-Z_QOXgGF.js +35 -0
  614. package/standalone/chunks/item-option-base-CwSzaefN.js +38 -0
  615. package/standalone/chunks/item-option-color-palette-picker-ClPI-5Hn.js +22 -0
  616. package/standalone/chunks/item-option-color-picker-1q1JlJS_.js +16 -0
  617. package/standalone/chunks/item-option-color-range-Chg6l7xN.js +80 -0
  618. package/standalone/chunks/item-option-guidelines-LNRztY8Q.js +117 -0
  619. package/standalone/chunks/item-option-multi-language-field-BaN_uPvS.js +15 -0
  620. package/standalone/chunks/item-option-number-field-DOuUp77S.js +20 -0
  621. package/standalone/chunks/item-option-panel-B1Qr4UIW.js +298 -0
  622. package/standalone/chunks/item-option-picker-Zrazb--P.js +19 -0
  623. package/standalone/chunks/item-option-position-picker-CSBgzh-h.js +14 -0
  624. package/standalone/chunks/item-option-positions-number-field-UTA1MQSS.js +31 -0
  625. package/standalone/chunks/item-option-radio-button-group-ClOt6Z30.js +19 -0
  626. package/standalone/chunks/item-option-slider-BLM_vGgf.js +15 -0
  627. package/standalone/chunks/item-option-switch-B-HFT1q3.js +12 -0
  628. package/standalone/chunks/item-option-text-field-CNQhKUVn.js +15 -0
  629. package/standalone/chunks/item-slot-picker-panel-BdW4zXxN.js +425 -0
  630. package/standalone/chunks/kpi-options.config-Brq70MGS.js +2 -0
  631. package/standalone/chunks/kpi-options.de-CJMQBEs7.js +2 -0
  632. package/standalone/chunks/kpi-options.en-BzKmi3Bd.js +2 -0
  633. package/standalone/chunks/kpi-options.es-BTmFYV0w.js +2 -0
  634. package/standalone/chunks/kpi-options.fr-mlazGpRq.js +2 -0
  635. package/standalone/chunks/kpi-options.nl-BV1eFo_U.js +2 -0
  636. package/standalone/chunks/kpi-slots.config-DAjLHdEj.js +2 -0
  637. package/standalone/chunks/line-chart-options.config--_LXaPbB.js +2 -0
  638. package/standalone/chunks/line-chart-options.de-CCCH4dI_.js +2 -0
  639. package/standalone/chunks/line-chart-options.en-BwtEj00F.js +2 -0
  640. package/standalone/chunks/line-chart-options.es-BWWaIDbd.js +2 -0
  641. package/standalone/chunks/line-chart-options.fr-Rp7fs4Id.js +2 -0
  642. package/standalone/chunks/line-chart-options.nl-DcgJ9CUw.js +2 -0
  643. package/standalone/chunks/load-data-fields-for-datasets-CH-5tbXr.js +25 -0
  644. package/standalone/chunks/load-formula-codemirror-CgSaMENO.js +6 -0
  645. package/standalone/chunks/localized-mixin-BAHP4Cln.js +2 -0
  646. package/standalone/chunks/nl-zkCduSpz.js +2 -0
  647. package/standalone/chunks/ohlc-chart-options.config-kyYOgBtR.js +2 -0
  648. package/standalone/chunks/pyramid-chart-options.config-xYIVE_ib.js +2 -0
  649. package/standalone/chunks/pyramid-chart-options.de-CaxalCcg.js +2 -0
  650. package/standalone/chunks/pyramid-chart-options.en-B-weoYGh.js +2 -0
  651. package/standalone/chunks/pyramid-chart-options.es-BahFoH3_.js +2 -0
  652. package/standalone/chunks/pyramid-chart-options.fr-DcTxsNGH.js +2 -0
  653. package/standalone/chunks/pyramid-chart-options.nl-ChImCr8r.js +2 -0
  654. package/standalone/chunks/radar-chart-options.config-CoGFqCqy.js +2 -0
  655. package/standalone/chunks/radar-chart-options.de-vruPXtB4.js +2 -0
  656. package/standalone/chunks/radar-chart-options.en-D8rstMVn.js +2 -0
  657. package/standalone/chunks/radar-chart-options.es-By21lK8S.js +2 -0
  658. package/standalone/chunks/radar-chart-options.fr-C4b5cJxg.js +2 -0
  659. package/standalone/chunks/radar-chart-options.nl-CzEi0MTf.js +2 -0
  660. package/standalone/chunks/scatter-plot-options.config-DG9Ki-mt.js +2 -0
  661. package/standalone/chunks/scatter-plot-options.de-eebqIJA1.js +2 -0
  662. package/standalone/chunks/scatter-plot-options.en-5i08biJm.js +2 -0
  663. package/standalone/chunks/scatter-plot-options.es-Bx8kHesL.js +2 -0
  664. package/standalone/chunks/scatter-plot-options.fr-DK6rPCT_.js +2 -0
  665. package/standalone/chunks/scatter-plot-options.nl-9mS62LyK.js +2 -0
  666. package/standalone/chunks/slot-content-BZhmLTG1.js +2 -0
  667. package/standalone/chunks/sunburst-chart-options.config-DOBSe3i5.js +2 -0
  668. package/standalone/chunks/sunburst-chart-options.de-D3iq4Q-m.js +2 -0
  669. package/standalone/chunks/sunburst-chart-options.en-BUJ_Pr9C.js +2 -0
  670. package/standalone/chunks/sunburst-chart-options.es-stKrKGz2.js +2 -0
  671. package/standalone/chunks/sunburst-chart-options.fr-RkBtlMNp.js +2 -0
  672. package/standalone/chunks/sunburst-chart-options.nl-BUeDNot_.js +2 -0
  673. package/standalone/chunks/version-Byoa09L1.js +2 -0
  674. package/standalone/interactive-viz-item.js +1 -1
  675. package/standalone/item-grid.js +1 -1
  676. package/standalone/manifest.json +137 -129
  677. package/utils/store/index.d.ts +1 -0
  678. package/utils/store/tests/store-base.test.d.ts +1 -0
  679. package/components/ad-hoc-slot-content-BwcFfXCV.cjs +0 -20
  680. package/components/ad-hoc-slot-content-hSlT62VS.js +0 -29
  681. package/components/add-to-dashboard-D11b-HS7.cjs +0 -166
  682. package/components/add-to-dashboard-KLYGiqKE.js +0 -805
  683. package/components/ai-chat-C0XZ_pvG.cjs +0 -393
  684. package/components/ai-chat-CYrWJ8Wa.js +0 -4464
  685. package/components/ai-interaction-textarea-CT698Pph.js +0 -823
  686. package/components/ai-interaction-textarea-Da1ErRHy.cjs +0 -101
  687. package/components/area-chart-options.config-Bf5kti7Z.cjs +0 -20
  688. package/components/area-chart-options.config-DJnPr93H.js +0 -201
  689. package/components/area-chart-options.de-_tPBzxvf.cjs +0 -20
  690. package/components/area-chart-options.de-pUCTG-s0.js +0 -87
  691. package/components/area-chart-options.en-AuSHs27k.cjs +0 -20
  692. package/components/area-chart-options.en-YNsUeMwN.js +0 -87
  693. package/components/area-chart-options.es-2styw_Fz.js +0 -87
  694. package/components/area-chart-options.es-BzRHGbo6.cjs +0 -20
  695. package/components/area-chart-options.fr--WzQVf2z.js +0 -87
  696. package/components/area-chart-options.fr-DYxUQE3x.cjs +0 -20
  697. package/components/area-chart-options.nl-BTEIqBtE.js +0 -87
  698. package/components/area-chart-options.nl-M0xQQ_la.cjs +0 -20
  699. package/components/area-chart-positioning.config-DWLy-uS1.cjs +0 -20
  700. package/components/area-chart-positioning.config-Dpi4gakJ.js +0 -55
  701. package/components/axis-options.config-BCP0Z8VI.js +0 -270
  702. package/components/axis-options.config-s-Js3ug-.cjs +0 -20
  703. package/components/axis-options.i18n-BOGRmWjp.js +0 -486
  704. package/components/axis-options.i18n-Cw-DmewV.cjs +0 -20
  705. package/components/bar-chart-options.config-CI17HU2I.cjs +0 -20
  706. package/components/bar-chart-options.config-D1x5WPbL.js +0 -261
  707. package/components/bar-chart-options.de-3qSh2TNr.js +0 -110
  708. package/components/bar-chart-options.de-545XMRGl.cjs +0 -20
  709. package/components/bar-chart-options.en-DAee9yHp.cjs +0 -20
  710. package/components/bar-chart-options.en-DrhQe9rV.js +0 -110
  711. package/components/bar-chart-options.es-BZ1yNzUQ.js +0 -110
  712. package/components/bar-chart-options.es-CfoAEZ-0.cjs +0 -20
  713. package/components/bar-chart-options.fr-5i13R8bs.js +0 -110
  714. package/components/bar-chart-options.fr-C2Ic0Dq0.cjs +0 -20
  715. package/components/bar-chart-options.nl-Bb6XiSDH.cjs +0 -20
  716. package/components/bar-chart-options.nl-DLj-qucU.js +0 -110
  717. package/components/bar-chart-positioning.config-B3U1-22D.cjs +0 -20
  718. package/components/bar-chart-positioning.config-DDv8hNyi.js +0 -59
  719. package/components/base-BdkFbMZR.cjs +0 -20
  720. package/components/base-Cvcpdy0h.js +0 -248
  721. package/components/box-plot-options.config-CooBIc6N.js +0 -334
  722. package/components/box-plot-options.config-Cp6H9fyb.cjs +0 -20
  723. package/components/box-plot-options.de-BkgscmvG.js +0 -100
  724. package/components/box-plot-options.de-alI5_N9d.cjs +0 -20
  725. package/components/box-plot-options.en-5kGlvxx8.js +0 -100
  726. package/components/box-plot-options.en-DUlXF9r9.cjs +0 -20
  727. package/components/box-plot-options.es-CIm06Gpk.cjs +0 -20
  728. package/components/box-plot-options.es-v_B9Xb9H.js +0 -100
  729. package/components/box-plot-options.fr-C5j-Dzj6.cjs +0 -20
  730. package/components/box-plot-options.fr-CRSOCgU5.js +0 -100
  731. package/components/box-plot-options.nl-DtnBbRo5.cjs +0 -20
  732. package/components/box-plot-options.nl-ZQjVZPau.js +0 -100
  733. package/components/box-plot-positioning.config-1BuF6Gjj.js +0 -48
  734. package/components/box-plot-positioning.config-lfqDTCdY.cjs +0 -20
  735. package/components/bubble-chart-positioning.config-DVBuVeSs.cjs +0 -20
  736. package/components/bubble-chart-positioning.config-V8KfvCkY.js +0 -55
  737. package/components/bullet-chart-options.config-CBmbmhzI.js +0 -76
  738. package/components/bullet-chart-options.config-Drv0yQ4x.cjs +0 -20
  739. package/components/bullet-chart-options.de-DHqxFlm7.js +0 -39
  740. package/components/bullet-chart-options.de-DQhoZIdV.cjs +0 -20
  741. package/components/bullet-chart-options.en-6vj0tO4B.js +0 -39
  742. package/components/bullet-chart-options.en-CTpxw73t.cjs +0 -20
  743. package/components/bullet-chart-options.es-Cc4GzyJG.cjs +0 -20
  744. package/components/bullet-chart-options.es-DeDFLO8Z.js +0 -39
  745. package/components/bullet-chart-options.fr-750sl4sT.js +0 -39
  746. package/components/bullet-chart-options.fr-D2Z5WBfJ.cjs +0 -20
  747. package/components/bullet-chart-options.nl-B7tw2hO6.cjs +0 -20
  748. package/components/bullet-chart-options.nl-CS-xSSVr.js +0 -39
  749. package/components/bullet-chart-positioning.config-CtlmKdzp.cjs +0 -20
  750. package/components/bullet-chart-positioning.config-IrK6KYbE.js +0 -56
  751. package/components/choropleth-map-positioning.config-BSb0ig5Y.js +0 -55
  752. package/components/choropleth-map-positioning.config-ahRkoZNv.cjs +0 -20
  753. package/components/circle-pack-chart-positioning.config-CS1dbWgR.cjs +0 -20
  754. package/components/circle-pack-chart-positioning.config-DfQztqxL.js +0 -48
  755. package/components/circular-gauge-positioning.config-1HH3Rw2L.js +0 -48
  756. package/components/circular-gauge-positioning.config-BeLsxbow.cjs +0 -20
  757. package/components/column-chart-options.config-B2LIl9lL.js +0 -260
  758. package/components/column-chart-options.config-xmSH4NKF.cjs +0 -20
  759. package/components/column-chart-options.de-BX13JkAO.cjs +0 -20
  760. package/components/column-chart-options.de-CIYtauiG.js +0 -110
  761. package/components/column-chart-options.en-BkAsfXYV.js +0 -110
  762. package/components/column-chart-options.en-DAee9yHp.cjs +0 -20
  763. package/components/column-chart-options.es-CClMQLE-.cjs +0 -20
  764. package/components/column-chart-options.es-jWM7TxS7.js +0 -110
  765. package/components/column-chart-options.fr-BB6301nS.js +0 -110
  766. package/components/column-chart-options.fr-C2Ic0Dq0.cjs +0 -20
  767. package/components/column-chart-options.nl-Bb6XiSDH.cjs +0 -20
  768. package/components/column-chart-options.nl-HUMDgKdl.js +0 -110
  769. package/components/column-chart-positioning.config-CLZuZiVa.cjs +0 -20
  770. package/components/column-chart-positioning.config-DVeVPtzS.js +0 -55
  771. package/components/combination-chart-options.config-0ATFph8S.js +0 -139
  772. package/components/combination-chart-options.config-IEamJGCp.cjs +0 -20
  773. package/components/combination-chart-options.de-BiGjuWUS.cjs +0 -20
  774. package/components/combination-chart-options.de-DVJ9sfLC.js +0 -66
  775. package/components/combination-chart-options.en-B5piXq82.js +0 -66
  776. package/components/combination-chart-options.en-e4XMalU0.cjs +0 -20
  777. package/components/combination-chart-options.es-BmuyyP32.js +0 -66
  778. package/components/combination-chart-options.es-OXb8nozF.cjs +0 -20
  779. package/components/combination-chart-options.fr-CIrnpWEu.js +0 -66
  780. package/components/combination-chart-options.fr-CYzANyZs.cjs +0 -20
  781. package/components/combination-chart-options.nl-BDJ7t0BY.js +0 -66
  782. package/components/combination-chart-options.nl-DyAUjvqC.cjs +0 -20
  783. package/components/combination-chart-positioning.config-BPXqur2s.js +0 -48
  784. package/components/combination-chart-positioning.config-DKNRMoZN.cjs +0 -20
  785. package/components/conditional-number-positioning.config-BWJAnFTq.js +0 -48
  786. package/components/conditional-number-positioning.config-HXcO-Ej5.cjs +0 -20
  787. package/components/data-field-BMeV_pUL.js +0 -119
  788. package/components/data-field-C204ZKd3.cjs +0 -54
  789. package/components/data-field-level-Cv4Vgi_o.cjs +0 -55
  790. package/components/data-field-level-Dpta9m5I.js +0 -245
  791. package/components/data-field-panel-Beg-fx10.js +0 -383
  792. package/components/data-field-panel-D71J7_IE.cjs +0 -87
  793. package/components/data-fields-select-BKoQMwZd.js +0 -293
  794. package/components/data-fields-select-CBTGcYRL.cjs +0 -43
  795. package/components/dataset-selector-list-D9ZmjTyU.cjs +0 -75
  796. package/components/dataset-selector-list-DFMfknD5.js +0 -321
  797. package/components/dataset-selector-row-Bq_yYpb9.cjs +0 -104
  798. package/components/dataset-selector-row-DFPwXde5.js +0 -448
  799. package/components/date-comparison-filter-slots.config-BKZ13uzB.js +0 -33
  800. package/components/date-comparison-filter-slots.config-oABOLs3D.cjs +0 -20
  801. package/components/de-DPhR2zPG.js +0 -598
  802. package/components/de-DUAXVtRS.cjs +0 -20
  803. package/components/display-settings-BkbdgMvh.cjs +0 -143
  804. package/components/display-settings-MnSyqIog.js +0 -317
  805. package/components/display-settings-binning-BQYxWvFI.js +0 -111
  806. package/components/display-settings-binning-DqcCzBrG.cjs +0 -56
  807. package/components/display-settings-datetime-9WraOyqr.cjs +0 -217
  808. package/components/display-settings-datetime-D5UwdwAI.js +0 -414
  809. package/components/display-settings-grand-totals-DYSVU-9G.js +0 -90
  810. package/components/display-settings-grand-totals-w2Zbxwt4.cjs +0 -44
  811. package/components/display-settings-numeric-DGyMDswg.cjs +0 -190
  812. package/components/display-settings-numeric-YOsAAqyJ.js +0 -480
  813. package/components/display-settings-period-over-period-CYwQ6KQI.js +0 -443
  814. package/components/display-settings-period-over-period-zme6yEAi.cjs +0 -227
  815. package/components/donut-chart-options.config-C8wpZzyJ.js +0 -217
  816. package/components/donut-chart-options.config-LbmJpNlm.cjs +0 -20
  817. package/components/donut-chart-options.de-MwhxVUQU.cjs +0 -20
  818. package/components/donut-chart-options.de-yLZjyrqC.js +0 -85
  819. package/components/donut-chart-options.en-CtvZekZO.js +0 -85
  820. package/components/donut-chart-options.en-Z9kCIcjz.cjs +0 -20
  821. package/components/donut-chart-options.es-C89OYrl4.js +0 -85
  822. package/components/donut-chart-options.es-Ch83fRxI.cjs +0 -20
  823. package/components/donut-chart-options.fr-B7JWWsro.cjs +0 -20
  824. package/components/donut-chart-options.fr-Cy4UUjdS.js +0 -85
  825. package/components/donut-chart-options.nl-BT6vFbJ5.js +0 -85
  826. package/components/donut-chart-options.nl-Brxyw7wD.cjs +0 -20
  827. package/components/donut-chart-positioning.config-ovPyzL2x.js +0 -48
  828. package/components/donut-chart-positioning.config-xwoqdu-c.cjs +0 -20
  829. package/components/es-C9faREu_.js +0 -598
  830. package/components/es-DKP3YRmv.cjs +0 -20
  831. package/components/evolution-number-options.config-Ca9ABNVM.js +0 -230
  832. package/components/evolution-number-options.config-CoGBgLLw.cjs +0 -20
  833. package/components/evolution-number-options.de-BrdcqfjF.js +0 -76
  834. package/components/evolution-number-options.de-CjNBpzAw.cjs +0 -20
  835. package/components/evolution-number-options.en-B9BpR4nq.cjs +0 -20
  836. package/components/evolution-number-options.en-Sd6L4_T9.js +0 -76
  837. package/components/evolution-number-options.es-CxbiY9G6.cjs +0 -20
  838. package/components/evolution-number-options.es-RgSav5iQ.js +0 -76
  839. package/components/evolution-number-options.fr-BD73JeDU.js +0 -76
  840. package/components/evolution-number-options.fr-Cae20bgZ.cjs +0 -20
  841. package/components/evolution-number-options.nl-BJ-5M5kB.cjs +0 -20
  842. package/components/evolution-number-options.nl-WHBQ04_S.js +0 -76
  843. package/components/evolution-number-positioning.config-B-H5aEXI.js +0 -48
  844. package/components/evolution-number-positioning.config-CfcajD4B.cjs +0 -20
  845. package/components/filter-expression-picker-BBZ7KHqG.cjs +0 -40
  846. package/components/filter-expression-picker-kLhzHUEW.js +0 -434
  847. package/components/filter-item-Dgh9nHGz.js +0 -793
  848. package/components/filter-item-DnYGrUzZ.cjs +0 -111
  849. package/components/filter-parameter-picker-DhTMuymq.js +0 -372
  850. package/components/filter-parameter-picker-UwSmMkoB.cjs +0 -124
  851. package/components/filter-value-picker-CPuUfjLo.cjs +0 -69
  852. package/components/filter-value-picker-Ch4k6xIK.js +0 -170
  853. package/components/filter-value-picker-datetime-BHtjVhx1.cjs +0 -51
  854. package/components/filter-value-picker-datetime-hTOIBHMi.js +0 -160
  855. package/components/filter-value-picker-hierarchy-Bu1OiV4T.js +0 -316
  856. package/components/filter-value-picker-hierarchy-CTZQfWEJ.cjs +0 -54
  857. package/components/filter-value-picker-numeric-BOY9I-y3.cjs +0 -54
  858. package/components/filter-value-picker-numeric-tstYPaES.js +0 -237
  859. package/components/filters-B_43Qb_P.cjs +0 -199
  860. package/components/filters-ESeCEQPQ.js +0 -927
  861. package/components/formula--lmxX7EE.js +0 -136
  862. package/components/formula-CC33nJ0T.cjs +0 -45
  863. package/components/formula-codemirror-CD2ejhzw.js +0 -12008
  864. package/components/formula-codemirror-za5kEnKc.cjs +0 -215
  865. package/components/formula-display-store-B1qQtQbU.cjs +0 -20
  866. package/components/formula-display-store-dxzteJ_B.js +0 -1087
  867. package/components/formula-editor-BDckEUnh.cjs +0 -224
  868. package/components/formula-editor-DNduncPi.js +0 -685
  869. package/components/formula-field-Cs7SaL-J.cjs +0 -20
  870. package/components/formula-field-dSYKahSQ.js +0 -38
  871. package/components/formula-input-base-CzMOxMBx.js +0 -236
  872. package/components/formula-input-base-DCI3s_eW.cjs +0 -49
  873. package/components/fr-BNVUrX6D.cjs +0 -20
  874. package/components/fr-Dfp7e-Vj.js +0 -598
  875. package/components/funnel-chart-options.config-CygQsQVD.js +0 -211
  876. package/components/funnel-chart-options.config-DgpM8mWb.cjs +0 -20
  877. package/components/funnel-chart-options.de-CW29wkd4.cjs +0 -20
  878. package/components/funnel-chart-options.de-DIoKO3fr.js +0 -76
  879. package/components/funnel-chart-options.en-CGVFwHzU.cjs +0 -20
  880. package/components/funnel-chart-options.en-Doj4mREG.js +0 -76
  881. package/components/funnel-chart-options.es-Bcot5MS3.cjs +0 -20
  882. package/components/funnel-chart-options.es-D-GP_b6C.js +0 -76
  883. package/components/funnel-chart-options.fr-7ZROacsE.cjs +0 -20
  884. package/components/funnel-chart-options.fr-BoQkeuls.js +0 -76
  885. package/components/funnel-chart-options.nl-C0VZ6Ure.cjs +0 -20
  886. package/components/funnel-chart-options.nl-CRq-RjxK.js +0 -76
  887. package/components/funnel-chart-positioning.config-2mR2EyN4.cjs +0 -20
  888. package/components/funnel-chart-positioning.config-Bth5tggl.js +0 -48
  889. package/components/get-dataset-name-CSvAYeJM.js +0 -32
  890. package/components/get-dataset-name-DhYRY3e-.cjs +0 -20
  891. package/components/groupings-14w1cCc3.js +0 -52
  892. package/components/groupings-DxuknvWu.cjs +0 -20
  893. package/components/heat-map-positioning.config-B4bGYbFk.js +0 -48
  894. package/components/heat-map-positioning.config-CwcQrF53.cjs +0 -20
  895. package/components/heat-table-options.config-AhmEjDAb.cjs +0 -20
  896. package/components/heat-table-options.config-x-KBTZo1.js +0 -269
  897. package/components/heat-table-options.de-D16uyY3b.cjs +0 -20
  898. package/components/heat-table-options.de-PCwpTsHu.js +0 -112
  899. package/components/heat-table-options.en-DCNhZ0Qw.js +0 -112
  900. package/components/heat-table-options.en-Dhd_yZdX.cjs +0 -20
  901. package/components/heat-table-options.es-DPqviw02.cjs +0 -20
  902. package/components/heat-table-options.es-Dhtu0ztS.js +0 -112
  903. package/components/heat-table-options.fr-BVwdrQWA.cjs +0 -20
  904. package/components/heat-table-options.fr-dtKsuwpe.js +0 -112
  905. package/components/heat-table-options.nl-BAiKDY6k.cjs +0 -20
  906. package/components/heat-table-options.nl-Bc0JFpfk.js +0 -112
  907. package/components/heat-table-positioning.config-BXCOZwaN.js +0 -55
  908. package/components/heat-table-positioning.config-D8UNVnTk.cjs +0 -20
  909. package/components/hexbin-map-positioning.config-B-WZWfLq.js +0 -48
  910. package/components/hexbin-map-positioning.config-Dn-bgQZ8.cjs +0 -20
  911. package/components/interactive-viz-item-CMxReAvq.js +0 -528
  912. package/components/interactive-viz-item-CQz2XYj8.cjs +0 -261
  913. package/components/item-grid-BYqUrmJa.js +0 -245
  914. package/components/item-grid-DKpxUsMo.cjs +0 -41
  915. package/components/item-grid-item-actions-menu-D3WeDgxI.js +0 -199
  916. package/components/item-grid-item-actions-menu-Dhv9sTNi.cjs +0 -52
  917. package/components/item-option-BWGwUzLt.cjs +0 -269
  918. package/components/item-option-DYXzQ13_.js +0 -953
  919. package/components/item-option-action-button-group-B3PD2K1l.js +0 -117
  920. package/components/item-option-action-button-group-Bc26loDM.cjs +0 -53
  921. package/components/item-option-base-B6axTng-.cjs +0 -56
  922. package/components/item-option-base-BJdtApx5.js +0 -120
  923. package/components/item-option-color-palette-picker-BxIWdQLy.js +0 -2040
  924. package/components/item-option-color-palette-picker-C1t_nY1O.cjs +0 -40
  925. package/components/item-option-color-picker-1BzUBXz-.cjs +0 -34
  926. package/components/item-option-color-picker-9DEx5w-z.js +0 -86
  927. package/components/item-option-color-range-B_gmxlEl.cjs +0 -98
  928. package/components/item-option-color-range-DBtnzfJa.js +0 -219
  929. package/components/item-option-guidelines-DhuU5VZu.js +0 -420
  930. package/components/item-option-guidelines-Dv4EoY3s.cjs +0 -135
  931. package/components/item-option-multi-language-field-BoXUM6-u.js +0 -81
  932. package/components/item-option-multi-language-field-C_eP2I2u.cjs +0 -33
  933. package/components/item-option-number-field-BrEXkjWl.js +0 -101
  934. package/components/item-option-number-field-kXpCE4FI.cjs +0 -38
  935. package/components/item-option-panel-CB338Rgo.cjs +0 -67
  936. package/components/item-option-panel-CUoozNxD.js +0 -181
  937. package/components/item-option-picker-BvT4ITzX.cjs +0 -37
  938. package/components/item-option-picker-fKn763j4.js +0 -76
  939. package/components/item-option-position-picker-D7smHuW7.js +0 -116
  940. package/components/item-option-position-picker-D96vKNTF.cjs +0 -32
  941. package/components/item-option-positions-number-field-BPEATH4R.js +0 -165
  942. package/components/item-option-positions-number-field-C4IOForB.cjs +0 -49
  943. package/components/item-option-radio-button-group-Bb-Rc5nv.cjs +0 -37
  944. package/components/item-option-radio-button-group-DQ0knjcY.js +0 -73
  945. package/components/item-option-slider-BuA7tdbc.js +0 -97
  946. package/components/item-option-slider-CLqtmYAE.cjs +0 -33
  947. package/components/item-option-switch-CvzS-KN9.js +0 -68
  948. package/components/item-option-switch-DtRz_zTM.cjs +0 -30
  949. package/components/item-option-text-field-CW3R8voC.js +0 -79
  950. package/components/item-option-text-field-D1NFqoms.cjs +0 -33
  951. package/components/item-slot-drop-B7JmgKMJ.cjs +0 -91
  952. package/components/item-slot-drop-DaTJ-Gym.js +0 -329
  953. package/components/item-slot-drop-panel-0wUkaWiM.js +0 -353
  954. package/components/item-slot-drop-panel-CdCEWBGb.cjs +0 -57
  955. package/components/item-slot-picker-BiHy7QX1.js +0 -524
  956. package/components/item-slot-picker-BvrK1U4h.cjs +0 -169
  957. package/components/item-slot-picker-panel-BmlCimZ9.js +0 -446
  958. package/components/item-slot-picker-panel-CeT847QM.cjs +0 -81
  959. package/components/line-chart-options.config-C3_RnROS.js +0 -237
  960. package/components/line-chart-options.config-RTYFJQSE.cjs +0 -20
  961. package/components/line-chart-options.de-CKbHARjX.cjs +0 -20
  962. package/components/line-chart-options.de-CtxTZ-Nx.js +0 -81
  963. package/components/line-chart-options.en-BgXtU92P.js +0 -81
  964. package/components/line-chart-options.en-DmtT3Hbw.cjs +0 -20
  965. package/components/line-chart-options.es--u7QlrhG.js +0 -81
  966. package/components/line-chart-options.es-BwyQviz-.cjs +0 -20
  967. package/components/line-chart-options.fr-BUwOFGR7.cjs +0 -20
  968. package/components/line-chart-options.fr-BaPc1M70.js +0 -81
  969. package/components/line-chart-options.nl-BkPXShNF.cjs +0 -20
  970. package/components/line-chart-options.nl-C86fSn7a.js +0 -81
  971. package/components/line-chart-positioning.config-DaDYXk9Z.cjs +0 -20
  972. package/components/line-chart-positioning.config-Imvzv3EC.js +0 -55
  973. package/components/localized-mixin-BLUbrY_Z.js +0 -45
  974. package/components/localized-mixin-DceE4W-d.cjs +0 -20
  975. package/components/marker-map-positioning.config-BGDRklk5.cjs +0 -20
  976. package/components/marker-map-positioning.config-DouILqTQ.js +0 -48
  977. package/components/nl-BFAURMxk.cjs +0 -20
  978. package/components/nl-Cs2_7YBI.js +0 -598
  979. package/components/ohlc-chart-options.config-CWRI5bXI.js +0 -94
  980. package/components/ohlc-chart-options.config-Pqd5MFIv.cjs +0 -20
  981. package/components/ohlc-chart-positioning.config-Bcpj8NAt.js +0 -78
  982. package/components/ohlc-chart-positioning.config-CHJbhqWA.cjs +0 -20
  983. package/components/parallel-coordinates-plot-positioning.config-BRPawZLg.js +0 -48
  984. package/components/parallel-coordinates-plot-positioning.config-CnyUP9E-.cjs +0 -20
  985. package/components/pivot-table-positioning.config-8rROPmIw.js +0 -55
  986. package/components/pivot-table-positioning.config-BvD825Uc.cjs +0 -20
  987. package/components/pyramid-chart-options.config-C7btzuZj.js +0 -220
  988. package/components/pyramid-chart-options.config-ClLsv7PT.cjs +0 -20
  989. package/components/pyramid-chart-options.de-BYqibA2g.cjs +0 -20
  990. package/components/pyramid-chart-options.de-C7n_k-tE.js +0 -102
  991. package/components/pyramid-chart-options.en-Cu93qdAo.js +0 -102
  992. package/components/pyramid-chart-options.en-HiLgjfbn.cjs +0 -20
  993. package/components/pyramid-chart-options.es-BQ8qCZ32.cjs +0 -20
  994. package/components/pyramid-chart-options.es-DCRAv4r_.js +0 -102
  995. package/components/pyramid-chart-options.fr-BA7xAAsG.cjs +0 -20
  996. package/components/pyramid-chart-options.fr-CLXgcrPz.js +0 -102
  997. package/components/pyramid-chart-options.nl-BYiPyjuQ.cjs +0 -20
  998. package/components/pyramid-chart-options.nl-CylUmHpw.js +0 -102
  999. package/components/pyramid-chart-positioning.config-CqL_Z0Ok.js +0 -55
  1000. package/components/pyramid-chart-positioning.config-DKd65Pdf.cjs +0 -20
  1001. package/components/radar-chart-options.config-B5WP2MPc.cjs +0 -20
  1002. package/components/radar-chart-options.config-CtA6MpUp.js +0 -152
  1003. package/components/radar-chart-options.de-BZPerBca.js +0 -46
  1004. package/components/radar-chart-options.de-D9sVJ3e-.cjs +0 -20
  1005. package/components/radar-chart-options.en-Brb_kgjH.cjs +0 -20
  1006. package/components/radar-chart-options.en-tDJgJQVC.js +0 -46
  1007. package/components/radar-chart-options.es-BmpV458O.cjs +0 -20
  1008. package/components/radar-chart-options.es-Dz4wRR-P.js +0 -46
  1009. package/components/radar-chart-options.fr-B-gaDJX4.cjs +0 -20
  1010. package/components/radar-chart-options.fr-D5KXeury.js +0 -46
  1011. package/components/radar-chart-options.nl-D3_CmNB3.js +0 -46
  1012. package/components/radar-chart-options.nl-DH_wKvgI.cjs +0 -20
  1013. package/components/radar-chart-positioning.config-CpYbMIeY.js +0 -55
  1014. package/components/radar-chart-positioning.config-oPyZCdrF.cjs +0 -20
  1015. package/components/route-map-positioning.config-BCOVbseo.cjs +0 -20
  1016. package/components/route-map-positioning.config-DPspLTzr.js +0 -66
  1017. package/components/sankey-diagram-positioning.config-BVNDJhvU.js +0 -66
  1018. package/components/sankey-diagram-positioning.config-Da0e_DAS.cjs +0 -20
  1019. package/components/scatter-plot-options.config-BplrME7w.js +0 -133
  1020. package/components/scatter-plot-options.config-DJW85uFv.cjs +0 -20
  1021. package/components/scatter-plot-options.de-3CPVK7Hi.cjs +0 -20
  1022. package/components/scatter-plot-options.de-CNLrv6j3.js +0 -99
  1023. package/components/scatter-plot-options.en-DigMzpQy.js +0 -99
  1024. package/components/scatter-plot-options.en-Dzvigy8-.cjs +0 -20
  1025. package/components/scatter-plot-options.es-C-IH7GVH.cjs +0 -20
  1026. package/components/scatter-plot-options.es-CQm_VVqJ.js +0 -99
  1027. package/components/scatter-plot-options.fr-Cdp6kPQi.cjs +0 -20
  1028. package/components/scatter-plot-options.fr-s0M39VT4.js +0 -99
  1029. package/components/scatter-plot-options.nl-CqpPIO03.js +0 -99
  1030. package/components/scatter-plot-options.nl-DeINlMqc.cjs +0 -20
  1031. package/components/scatter-plot-positioning.config-DMZuAjXU.js +0 -77
  1032. package/components/scatter-plot-positioning.config-vR2_9XYh.cjs +0 -20
  1033. package/components/set-locale-B9greCq4.js +0 -43
  1034. package/components/set-locale-BkbSlaQk.cjs +0 -20
  1035. package/components/slicer-filter-positioning.config-Byf9Q8gT.cjs +0 -20
  1036. package/components/slicer-filter-positioning.config-CzzuCQDP.js +0 -48
  1037. package/components/slot-menu-BAtOYWxs.js +0 -429
  1038. package/components/slot-menu-C_iIcdDw.cjs +0 -71
  1039. package/components/slot-menu-list-DoRLtT2d.js +0 -348
  1040. package/components/slot-menu-list-K4_pghrC.cjs +0 -44
  1041. package/components/slot-role-classification-2wChhpcq.cjs +0 -20
  1042. package/components/slot-role-classification-B8bkGhQ_.js +0 -133
  1043. package/components/slots-config-Cd4xAG4H.cjs +0 -20
  1044. package/components/slots-config-GlSNH7Gr.js +0 -76
  1045. package/components/speedometer-chart-positioning.config-DfnWIx7U.cjs +0 -20
  1046. package/components/speedometer-chart-positioning.config-DsCodDVP.js +0 -48
  1047. package/components/spike-map-positioning.config-DPbVWLF7.cjs +0 -20
  1048. package/components/spike-map-positioning.config-sSSQuxIm.js +0 -55
  1049. package/components/strip-plot-positioning.config-C01KV7Er.js +0 -48
  1050. package/components/strip-plot-positioning.config-Czz4B-U5.cjs +0 -20
  1051. package/components/sunburst-chart-options.config-Bjue_lQN.js +0 -184
  1052. package/components/sunburst-chart-options.config-DszAtggj.cjs +0 -20
  1053. package/components/sunburst-chart-options.de-Cv5jxNjX.js +0 -60
  1054. package/components/sunburst-chart-options.de-DV_80qR9.cjs +0 -20
  1055. package/components/sunburst-chart-options.en-Zfns8M0i.cjs +0 -20
  1056. package/components/sunburst-chart-options.en-wsOVOyb6.js +0 -60
  1057. package/components/sunburst-chart-options.es-BSKiBxl_.cjs +0 -20
  1058. package/components/sunburst-chart-options.es-Qhu6VcVi.js +0 -60
  1059. package/components/sunburst-chart-options.fr-DOcWgNOZ.cjs +0 -20
  1060. package/components/sunburst-chart-options.fr-GdCEoo8O.js +0 -60
  1061. package/components/sunburst-chart-options.nl-D2JXoYTB.cjs +0 -20
  1062. package/components/sunburst-chart-options.nl-oTUKol5z.js +0 -60
  1063. package/components/sunburst-chart-positioning.config-C4u-zAIV.js +0 -48
  1064. package/components/sunburst-chart-positioning.config-g8eXAhP4.cjs +0 -20
  1065. package/components/symbol-map-positioning.config-Be2wvwUD.cjs +0 -20
  1066. package/components/symbol-map-positioning.config-CRZwvQS5.js +0 -55
  1067. package/components/treemap-chart-positioning.config-CvMw2lMe.cjs +0 -20
  1068. package/components/treemap-chart-positioning.config-Dq1nuvca.js +0 -55
  1069. package/components/utils-Bkykodi1.cjs +0 -20
  1070. package/components/utils-C3-82TMs.js +0 -240
  1071. package/components/venn-diagram-positioning.config-CJbmXy8r.cjs +0 -20
  1072. package/components/venn-diagram-positioning.config-DoYvs8k_.js +0 -55
  1073. package/components/wordcloud-chart-positioning.config-BYz4mqOF.cjs +0 -20
  1074. package/components/wordcloud-chart-positioning.config-C5gc4v7C.js +0 -55
  1075. package/standalone/chunks/add-to-dashboard-BitIAbse.js +0 -148
  1076. package/standalone/chunks/area-chart-options.config-CXWPLl-0.js +0 -2
  1077. package/standalone/chunks/area-chart-options.de-Dr8RVJtb.js +0 -2
  1078. package/standalone/chunks/area-chart-options.en-DV1AZ274.js +0 -2
  1079. package/standalone/chunks/area-chart-options.es-Cg7uU7OK.js +0 -2
  1080. package/standalone/chunks/area-chart-options.fr-CJjgrAt2.js +0 -2
  1081. package/standalone/chunks/area-chart-options.nl-CTGxVXNo.js +0 -2
  1082. package/standalone/chunks/axis-options.config-DP9f04t6.js +0 -2
  1083. package/standalone/chunks/axis-options.i18n-BwkGC9PX.js +0 -2
  1084. package/standalone/chunks/bar-chart-options.config-w4REKu0t.js +0 -2
  1085. package/standalone/chunks/bar-chart-options.de-DCVBVtFi.js +0 -2
  1086. package/standalone/chunks/bar-chart-options.en-B4xiZxTy.js +0 -2
  1087. package/standalone/chunks/bar-chart-options.es-UqehXB9Z.js +0 -2
  1088. package/standalone/chunks/bar-chart-options.fr-CaUBeZBK.js +0 -2
  1089. package/standalone/chunks/bar-chart-options.nl-C2tFvUE8.js +0 -2
  1090. package/standalone/chunks/base-DetXzglI.js +0 -2
  1091. package/standalone/chunks/box-plot-options.config-BlYMd4FN.js +0 -2
  1092. package/standalone/chunks/box-plot-options.de-RDAv8kHb.js +0 -2
  1093. package/standalone/chunks/box-plot-options.en-kGLfLsv3.js +0 -2
  1094. package/standalone/chunks/box-plot-options.es-Dw3ivv22.js +0 -2
  1095. package/standalone/chunks/box-plot-options.fr-De5nkQNr.js +0 -2
  1096. package/standalone/chunks/box-plot-options.nl-DD1f-Nlt.js +0 -2
  1097. package/standalone/chunks/bullet-chart-options.config-Cc5lKDjs.js +0 -2
  1098. package/standalone/chunks/bullet-chart-options.de-Ci81seQn.js +0 -2
  1099. package/standalone/chunks/bullet-chart-options.en-Dk95moRX.js +0 -2
  1100. package/standalone/chunks/bullet-chart-options.es-eIqahAOr.js +0 -2
  1101. package/standalone/chunks/bullet-chart-options.fr-CEABbpT0.js +0 -2
  1102. package/standalone/chunks/bullet-chart-options.nl-B3gOPn5D.js +0 -2
  1103. package/standalone/chunks/column-chart-options.config-v7fBgXRI.js +0 -2
  1104. package/standalone/chunks/column-chart-options.de-OoMpZc7N.js +0 -2
  1105. package/standalone/chunks/column-chart-options.en-B4xiZxTy.js +0 -2
  1106. package/standalone/chunks/column-chart-options.es-BL-wKXpp.js +0 -2
  1107. package/standalone/chunks/column-chart-options.fr-CaUBeZBK.js +0 -2
  1108. package/standalone/chunks/column-chart-options.nl-C2tFvUE8.js +0 -2
  1109. package/standalone/chunks/combination-chart-options.config-C9hmUPal.js +0 -2
  1110. package/standalone/chunks/combination-chart-options.de-ChlEhT09.js +0 -2
  1111. package/standalone/chunks/combination-chart-options.en-DhCXqnwj.js +0 -2
  1112. package/standalone/chunks/combination-chart-options.es-DESqZp0U.js +0 -2
  1113. package/standalone/chunks/combination-chart-options.fr-v6P2xQCi.js +0 -2
  1114. package/standalone/chunks/combination-chart-options.nl-D8ato2ve.js +0 -2
  1115. package/standalone/chunks/date-comparison-filter-slots.config-DfHq9lB8.js +0 -2
  1116. package/standalone/chunks/de-DasXCtPF.js +0 -2
  1117. package/standalone/chunks/display-settings-binning-D7udCQZB.js +0 -38
  1118. package/standalone/chunks/display-settings-datetime-DoDqA4cJ.js +0 -199
  1119. package/standalone/chunks/display-settings-grand-totals-LZT2gYJu.js +0 -26
  1120. package/standalone/chunks/display-settings-numeric-7Vq_f1D0.js +0 -172
  1121. package/standalone/chunks/display-settings-period-over-period-CBjYIyKC.js +0 -209
  1122. package/standalone/chunks/donut-chart-options.config-BuZj-QX5.js +0 -2
  1123. package/standalone/chunks/donut-chart-options.de-QusCBL9B.js +0 -2
  1124. package/standalone/chunks/donut-chart-options.en-D0ligFH6.js +0 -2
  1125. package/standalone/chunks/donut-chart-options.es-Bmn34sGt.js +0 -2
  1126. package/standalone/chunks/donut-chart-options.fr-DGBawYKp.js +0 -2
  1127. package/standalone/chunks/donut-chart-options.nl-DzNTu0v4.js +0 -2
  1128. package/standalone/chunks/embed-Dymwil3u.js +0 -228
  1129. package/standalone/chunks/es-cQV58zLc.js +0 -2
  1130. package/standalone/chunks/evolution-number-options.config-B5Cj0YAQ.js +0 -2
  1131. package/standalone/chunks/evolution-number-options.de-Ch0LaHwI.js +0 -2
  1132. package/standalone/chunks/evolution-number-options.en-riChGfa6.js +0 -2
  1133. package/standalone/chunks/evolution-number-options.es-BdG3lvVQ.js +0 -2
  1134. package/standalone/chunks/evolution-number-options.fr-_h0kLeRL.js +0 -2
  1135. package/standalone/chunks/evolution-number-options.nl-CqycrLe1.js +0 -2
  1136. package/standalone/chunks/filters-CF1JZIC1.js +0 -544
  1137. package/standalone/chunks/formula-codemirror-DSKNnuLg.js +0 -197
  1138. package/standalone/chunks/fr-DzRE2NaZ.js +0 -2
  1139. package/standalone/chunks/funnel-chart-options.config-1SyJ_qYd.js +0 -2
  1140. package/standalone/chunks/funnel-chart-options.de-BTxwd7Pe.js +0 -2
  1141. package/standalone/chunks/funnel-chart-options.en-CmY-uO1P.js +0 -2
  1142. package/standalone/chunks/funnel-chart-options.es-DLqBydsE.js +0 -2
  1143. package/standalone/chunks/funnel-chart-options.fr-ztQ5OMZi.js +0 -2
  1144. package/standalone/chunks/funnel-chart-options.nl-DVysx7tP.js +0 -2
  1145. package/standalone/chunks/heat-table-options.config-ByHwT44G.js +0 -2
  1146. package/standalone/chunks/heat-table-options.de-BMx67hXo.js +0 -2
  1147. package/standalone/chunks/heat-table-options.en-BbobGoXs.js +0 -2
  1148. package/standalone/chunks/heat-table-options.es-zKo-QMBY.js +0 -2
  1149. package/standalone/chunks/heat-table-options.fr-XSTL1CSb.js +0 -2
  1150. package/standalone/chunks/heat-table-options.nl-Cgcccsee.js +0 -2
  1151. package/standalone/chunks/item-option-action-button-group-CM3q7mFJ.js +0 -35
  1152. package/standalone/chunks/item-option-base-BoBGd2zN.js +0 -38
  1153. package/standalone/chunks/item-option-color-palette-picker-BTGLKRU6.js +0 -22
  1154. package/standalone/chunks/item-option-color-picker-WIaAaoWa.js +0 -16
  1155. package/standalone/chunks/item-option-color-range-DP8KXyD7.js +0 -80
  1156. package/standalone/chunks/item-option-guidelines-CvvRU02d.js +0 -117
  1157. package/standalone/chunks/item-option-multi-language-field-DOc_5pUa.js +0 -15
  1158. package/standalone/chunks/item-option-number-field-fj7jIBZ4.js +0 -20
  1159. package/standalone/chunks/item-option-panel-C1GmQ9SW.js +0 -298
  1160. package/standalone/chunks/item-option-picker-D0d0BXk7.js +0 -19
  1161. package/standalone/chunks/item-option-position-picker-BpYLyMS7.js +0 -14
  1162. package/standalone/chunks/item-option-positions-number-field-p6ghB0uD.js +0 -31
  1163. package/standalone/chunks/item-option-radio-button-group-DinqecBS.js +0 -19
  1164. package/standalone/chunks/item-option-slider--YXct33p.js +0 -15
  1165. package/standalone/chunks/item-option-switch-BRuMJhT2.js +0 -12
  1166. package/standalone/chunks/item-option-text-field-Cvu0fi5x.js +0 -15
  1167. package/standalone/chunks/item-slot-picker-panel-4ATGR7nP.js +0 -435
  1168. package/standalone/chunks/line-chart-options.config-DyqQLGw8.js +0 -2
  1169. package/standalone/chunks/line-chart-options.de-BScjvJsI.js +0 -2
  1170. package/standalone/chunks/line-chart-options.en-BVWFsre-.js +0 -2
  1171. package/standalone/chunks/line-chart-options.es-CxNJevNs.js +0 -2
  1172. package/standalone/chunks/line-chart-options.fr-LCsLx0Uh.js +0 -2
  1173. package/standalone/chunks/line-chart-options.nl-BOgcjx48.js +0 -2
  1174. package/standalone/chunks/load-data-fields-for-datasets-DWys6Xqn.js +0 -25
  1175. package/standalone/chunks/load-formula-codemirror-BP6dGYyV.js +0 -6
  1176. package/standalone/chunks/localized-mixin-D3GVo182.js +0 -2
  1177. package/standalone/chunks/nl-Bzvdbvjs.js +0 -2
  1178. package/standalone/chunks/ohlc-chart-options.config-Bu2GKlAH.js +0 -2
  1179. package/standalone/chunks/pyramid-chart-options.config-CBd-pgn_.js +0 -2
  1180. package/standalone/chunks/pyramid-chart-options.de-CBL_8UjH.js +0 -2
  1181. package/standalone/chunks/pyramid-chart-options.en-CTozc1Uh.js +0 -2
  1182. package/standalone/chunks/pyramid-chart-options.es-BKciL-nO.js +0 -2
  1183. package/standalone/chunks/pyramid-chart-options.fr-B04m8B_b.js +0 -2
  1184. package/standalone/chunks/pyramid-chart-options.nl-DIhj1NYF.js +0 -2
  1185. package/standalone/chunks/radar-chart-options.config-CnQ8mbs9.js +0 -2
  1186. package/standalone/chunks/radar-chart-options.de-_LSueG69.js +0 -2
  1187. package/standalone/chunks/radar-chart-options.en-DBA8TpKJ.js +0 -2
  1188. package/standalone/chunks/radar-chart-options.es-DjSsFQkP.js +0 -2
  1189. package/standalone/chunks/radar-chart-options.fr-CCh2jYPS.js +0 -2
  1190. package/standalone/chunks/radar-chart-options.nl-tZ0JRjXD.js +0 -2
  1191. package/standalone/chunks/scatter-plot-options.config-BV9Lb6-v.js +0 -2
  1192. package/standalone/chunks/scatter-plot-options.de-Dg3O1b2R.js +0 -2
  1193. package/standalone/chunks/scatter-plot-options.en-CJH2ZlFW.js +0 -2
  1194. package/standalone/chunks/scatter-plot-options.es-7kExRi4J.js +0 -2
  1195. package/standalone/chunks/scatter-plot-options.fr-Bbkf8efT.js +0 -2
  1196. package/standalone/chunks/scatter-plot-options.nl-zrEXoM-k.js +0 -2
  1197. package/standalone/chunks/sunburst-chart-options.config-DRjBFJV0.js +0 -2
  1198. package/standalone/chunks/sunburst-chart-options.de-D6enQCjV.js +0 -2
  1199. package/standalone/chunks/sunburst-chart-options.en-D9DSivE2.js +0 -2
  1200. package/standalone/chunks/sunburst-chart-options.es-Bb7iCI1h.js +0 -2
  1201. package/standalone/chunks/sunburst-chart-options.fr-CCzUgv7r.js +0 -2
  1202. package/standalone/chunks/sunburst-chart-options.nl-bGOCvc4m.js +0 -2
  1203. package/standalone/chunks/version-DJES6maY.js +0 -2
@@ -0,0 +1,4464 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2026 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ import "./tokens-Ov1pCR4Y.js";
21
+ import { c as e, d as t, s as n, u as r } from "./ai-interaction-textarea-BCa1PnPL.js";
22
+ import { i, n as a } from "./base-ClbyBq3g.js";
23
+ import { t as o } from "./decorate-DyMgX_Uh.js";
24
+ import { t as s } from "./defineProperty-AldSMFEH.js";
25
+ import { msg as c } from "@lit/localize/lit-localize";
26
+ import { luzmoArrowRotateLeft as l, luzmoEllipsisVertical as u, luzmoIcon as d, luzmoSpin as f, luzmoThumbsDown as p, luzmoThumbsUp as ee } from "@luzmo/icons";
27
+ import "@luzmo/lucero/action-button";
28
+ import "@luzmo/lucero/button";
29
+ import "@luzmo/lucero/chat-message";
30
+ import "@luzmo/lucero/icon";
31
+ import "@luzmo/lucero/overlay";
32
+ import "@luzmo/lucero/popover";
33
+ import "@luzmo/lucero/progress-steps";
34
+ import "@luzmo/lucero/tooltip";
35
+ import { html as m, nothing as h, unsafeCSS as te } from "lit";
36
+ import { property as g, state as ne } from "lit/decorators.js";
37
+ import { unsafeHTML as _ } from "lit/directives/unsafe-html.js";
38
+ import "@luzmo/lucero/question-box";
39
+ import { guard as re } from "lit/directives/guard.js";
40
+ import { keyed as ie } from "lit/directives/keyed.js";
41
+ //#region node_modules/dompurify/dist/purify.es.mjs
42
+ function ae(e, t) {
43
+ this.v = e, this.k = t;
44
+ }
45
+ function oe(e, t) {
46
+ (t == null || t > e.length) && (t = e.length);
47
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
48
+ return r;
49
+ }
50
+ function v(e) {
51
+ if (Array.isArray(e)) return e;
52
+ }
53
+ function se(e, t) {
54
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
55
+ if (n != null) {
56
+ var r, i, a, o, s = [], c = !0, l = !1;
57
+ try {
58
+ if (a = (n = n.call(e)).next, t === 0) {
59
+ if (Object(n) !== n) return;
60
+ c = !1;
61
+ } else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
62
+ } catch (e) {
63
+ l = !0, i = e;
64
+ } finally {
65
+ try {
66
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
67
+ } finally {
68
+ if (l) throw i;
69
+ }
70
+ }
71
+ return s;
72
+ }
73
+ }
74
+ function ce() {
75
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
76
+ }
77
+ function le(e, t) {
78
+ return v(e) || se(e, t) || ue(e, t) || ce();
79
+ }
80
+ function ue(e, t) {
81
+ if (e) {
82
+ if (typeof e == "string") return oe(e, t);
83
+ var n = {}.toString.call(e).slice(8, -1);
84
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? oe(e, t) : void 0;
85
+ }
86
+ }
87
+ function de(e) {
88
+ var t, n;
89
+ function r(t, n) {
90
+ try {
91
+ var a = e[t](n), o = a.value, s = o instanceof ae;
92
+ Promise.resolve(s ? o.v : o).then(function(n) {
93
+ if (s) {
94
+ var c = t === "return" && o.k ? t : "next";
95
+ if (!o.k || n.done) return r(c, n);
96
+ n = e[c](n).value;
97
+ }
98
+ i(!!a.done, n);
99
+ }, function(e) {
100
+ r("throw", e);
101
+ });
102
+ } catch (e) {
103
+ i(2, e);
104
+ }
105
+ }
106
+ function i(e, i) {
107
+ e === 2 ? t.reject(i) : t.resolve({
108
+ value: i,
109
+ done: e
110
+ }), (t = t.next) ? r(t.key, t.arg) : n = null;
111
+ }
112
+ this._invoke = function(e, i) {
113
+ return new Promise(function(a, o) {
114
+ var s = {
115
+ key: e,
116
+ arg: i,
117
+ resolve: a,
118
+ reject: o,
119
+ next: null
120
+ };
121
+ n ? n = n.next = s : (t = n = s, r(e, i));
122
+ });
123
+ }, typeof e.return != "function" && (this.return = void 0);
124
+ }
125
+ de.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
126
+ return this;
127
+ }, de.prototype.next = function(e) {
128
+ return this._invoke("next", e);
129
+ }, de.prototype.throw = function(e) {
130
+ return this._invoke("throw", e);
131
+ }, de.prototype.return = function(e) {
132
+ return this._invoke("return", e);
133
+ };
134
+ var fe = Object.entries, pe = Object.setPrototypeOf, me = Object.isFrozen, he = Object.getPrototypeOf, ge = Object.getOwnPropertyDescriptor, y = Object.freeze, b = Object.seal, _e = Object.create, ve = typeof Reflect < "u" && Reflect, ye = ve.apply, be = ve.construct;
135
+ y ||= function(e) {
136
+ return e;
137
+ }, b ||= function(e) {
138
+ return e;
139
+ }, ye ||= function(e, t) {
140
+ var n = [...arguments].slice(2);
141
+ return e.apply(t, n);
142
+ }, be ||= function(e) {
143
+ return new e(...[...arguments].slice(1));
144
+ };
145
+ var xe = w(Array.prototype.forEach);
146
+ Array.prototype.indexOf;
147
+ var Se = w(Array.prototype.lastIndexOf), Ce = w(Array.prototype.pop), we = w(Array.prototype.push);
148
+ Array.prototype.slice;
149
+ var Te = w(Array.prototype.splice), Ee = Array.isArray, De = w(String.prototype.toLowerCase), Oe = w(String.prototype.toString), ke = w(String.prototype.match), Ae = w(String.prototype.replace), je = w(String.prototype.indexOf), Me = w(String.prototype.trim), Ne = w(Number.prototype.toString), Pe = w(Boolean.prototype.toString), x = typeof BigInt > "u" ? null : w(BigInt.prototype.toString), Fe = typeof Symbol > "u" ? null : w(Symbol.prototype.toString), S = w(Object.prototype.hasOwnProperty), Ie = w(Object.prototype.toString), C = w(RegExp.prototype.test), Le = Re(TypeError);
150
+ function w(e) {
151
+ return function(t) {
152
+ t instanceof RegExp && (t.lastIndex = 0);
153
+ var n = [...arguments].slice(1);
154
+ return ye(e, t, n);
155
+ };
156
+ }
157
+ function Re(e) {
158
+ return function() {
159
+ return be(e, [...arguments]);
160
+ };
161
+ }
162
+ function T(e, t) {
163
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : De;
164
+ if (pe && pe(e, null), !Ee(t)) return e;
165
+ let r = t.length;
166
+ for (; r--;) {
167
+ let i = t[r];
168
+ if (typeof i == "string") {
169
+ let e = n(i);
170
+ e !== i && (me(t) || (t[r] = e), i = e);
171
+ }
172
+ e[i] = !0;
173
+ }
174
+ return e;
175
+ }
176
+ function ze(e) {
177
+ for (let t = 0; t < e.length; t++) S(e, t) || (e[t] = null);
178
+ return e;
179
+ }
180
+ function E(e) {
181
+ let t = _e(null);
182
+ for (let r of fe(e)) {
183
+ var n = le(r, 2);
184
+ let i = n[0], a = n[1];
185
+ S(e, i) && (Ee(a) ? t[i] = ze(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = E(a) : t[i] = a);
186
+ }
187
+ return t;
188
+ }
189
+ function Be(e) {
190
+ switch (typeof e) {
191
+ case "string": return e;
192
+ case "number": return Ne(e);
193
+ case "boolean": return Pe(e);
194
+ case "bigint": return x ? x(e) : "0";
195
+ case "symbol": return Fe ? Fe(e) : "Symbol()";
196
+ case "undefined": return Ie(e);
197
+ case "function":
198
+ case "object": {
199
+ if (e === null) return Ie(e);
200
+ let t = e, n = D(t, "toString");
201
+ if (typeof n == "function") {
202
+ let e = n(t);
203
+ return typeof e == "string" ? e : Ie(e);
204
+ }
205
+ return Ie(e);
206
+ }
207
+ default: return Ie(e);
208
+ }
209
+ }
210
+ function D(e, t) {
211
+ for (; e !== null;) {
212
+ let n = ge(e, t);
213
+ if (n) {
214
+ if (n.get) return w(n.get);
215
+ if (typeof n.value == "function") return w(n.value);
216
+ }
217
+ e = he(e);
218
+ }
219
+ function n() {
220
+ return null;
221
+ }
222
+ return n;
223
+ }
224
+ function Ve(e) {
225
+ try {
226
+ return C(e, ""), !0;
227
+ } catch {
228
+ return !1;
229
+ }
230
+ }
231
+ var He = y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ue = y(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), We = y([
232
+ "feBlend",
233
+ "feColorMatrix",
234
+ "feComponentTransfer",
235
+ "feComposite",
236
+ "feConvolveMatrix",
237
+ "feDiffuseLighting",
238
+ "feDisplacementMap",
239
+ "feDistantLight",
240
+ "feDropShadow",
241
+ "feFlood",
242
+ "feFuncA",
243
+ "feFuncB",
244
+ "feFuncG",
245
+ "feFuncR",
246
+ "feGaussianBlur",
247
+ "feImage",
248
+ "feMerge",
249
+ "feMergeNode",
250
+ "feMorphology",
251
+ "feOffset",
252
+ "fePointLight",
253
+ "feSpecularLighting",
254
+ "feSpotLight",
255
+ "feTile",
256
+ "feTurbulence"
257
+ ]), Ge = y([
258
+ "animate",
259
+ "color-profile",
260
+ "cursor",
261
+ "discard",
262
+ "font-face",
263
+ "font-face-format",
264
+ "font-face-name",
265
+ "font-face-src",
266
+ "font-face-uri",
267
+ "foreignobject",
268
+ "hatch",
269
+ "hatchpath",
270
+ "mesh",
271
+ "meshgradient",
272
+ "meshpatch",
273
+ "meshrow",
274
+ "missing-glyph",
275
+ "script",
276
+ "set",
277
+ "solidcolor",
278
+ "unknown",
279
+ "use"
280
+ ]), Ke = y(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), qe = y([
281
+ "maction",
282
+ "maligngroup",
283
+ "malignmark",
284
+ "mlongdiv",
285
+ "mscarries",
286
+ "mscarry",
287
+ "msgroup",
288
+ "mstack",
289
+ "msline",
290
+ "msrow",
291
+ "semantics",
292
+ "annotation",
293
+ "annotation-xml",
294
+ "mprescripts",
295
+ "none"
296
+ ]), Je = y(["#text"]), Ye = y(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Xe = y(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ze = y(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Qe = y([
297
+ "xlink:href",
298
+ "xml:id",
299
+ "xlink:title",
300
+ "xml:space",
301
+ "xmlns:xlink"
302
+ ]), $e = b(/{{[\w\W]*|^[\w\W]*}}/g), et = b(/<%[\w\W]*|^[\w\W]*%>/g), tt = b(/\${[\w\W]*/g), nt = b(/^data-[\-\w.\u00B7-\uFFFF]+$/), rt = b(/^aria-[\-\w]+$/), it = b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), at = b(/^(?:\w+script|data):/i), ot = b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), st = b(/^html$/i), ct = b(/^[a-z][.\w]*(-[.\w]+)+$/i), lt = b(/<[/\w!]/g), ut = b(/<[/\w]/g), dt = b(/<\/no(script|embed|frames)/i), ft = b(/\/>/i), O = {
303
+ element: 1,
304
+ attribute: 2,
305
+ text: 3,
306
+ cdataSection: 4,
307
+ entityReference: 5,
308
+ entityNode: 6,
309
+ processingInstruction: 7,
310
+ comment: 8,
311
+ document: 9,
312
+ documentType: 10,
313
+ documentFragment: 11,
314
+ notation: 12
315
+ }, pt = [
316
+ "style",
317
+ "script",
318
+ "xmp",
319
+ "iframe",
320
+ "noembed",
321
+ "noframes",
322
+ "plaintext",
323
+ "noscript"
324
+ ], mt = y(T({}, pt)), ht = function() {
325
+ let e = {};
326
+ return xe(pt, (t) => {
327
+ e[t] = b(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
328
+ }), y(e);
329
+ }(), gt = function() {
330
+ return typeof window > "u" ? null : window;
331
+ }, _t = function(e, t) {
332
+ if (typeof e != "object" || typeof e.createPolicy != "function") return null;
333
+ let n = null, r = "data-tt-policy-suffix";
334
+ t && t.hasAttribute(r) && (n = t.getAttribute(r));
335
+ let i = "dompurify" + (n ? "#" + n : "");
336
+ try {
337
+ return e.createPolicy(i, {
338
+ createHTML(e) {
339
+ return e;
340
+ },
341
+ createScriptURL(e) {
342
+ return e;
343
+ }
344
+ });
345
+ } catch {
346
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
347
+ }
348
+ }, vt = function() {
349
+ return {
350
+ afterSanitizeAttributes: [],
351
+ afterSanitizeElements: [],
352
+ afterSanitizeShadowDOM: [],
353
+ beforeSanitizeAttributes: [],
354
+ beforeSanitizeElements: [],
355
+ beforeSanitizeShadowDOM: [],
356
+ uponSanitizeAttribute: [],
357
+ uponSanitizeElement: [],
358
+ uponSanitizeShadowNode: []
359
+ };
360
+ }, yt = function(e, t, n, r) {
361
+ return S(e, t) && Ee(e[t]) ? T(r.base ? E(r.base) : {}, e[t], r.transform) : n;
362
+ }, bt = function(e, t, n) {
363
+ let r = S(e, t) ? e[t] : void 0;
364
+ return r && typeof r == "object" ? E(r) : n();
365
+ };
366
+ function xt() {
367
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gt(), t = (e) => xt(e);
368
+ if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== O.document || !e.Element) return t.isSupported = !1, t;
369
+ let n = e.document, r = n, i = r.currentScript;
370
+ e.DocumentFragment;
371
+ let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
372
+ e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
373
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = D(d, "cloneNode"), p = D(d, "remove"), ee = D(d, "removeAttributeNode"), m = D(d, "nextSibling"), h = D(d, "childNodes"), te = D(d, "parentNode"), g = D(d, "shadowRoot"), ne = D(d, "attributes"), _ = o && o.prototype ? D(o.prototype, "nodeType") : null, re = o && o.prototype ? D(o.prototype, "nodeName") : null, ie = o && o.prototype ? D(o.prototype, "ownerDocument") : null, ae = function(e) {
374
+ return _ ? _(e) : e.nodeType;
375
+ }, oe = function(e) {
376
+ return re ? re(e) : e.nodeName;
377
+ };
378
+ if (typeof a == "function") {
379
+ let e = n.createElement("template");
380
+ e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
381
+ }
382
+ let v, se = "", ce, le = !1, ue = 0, de = function() {
383
+ if (ue > 0) throw Le("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
384
+ }, pe = function(e) {
385
+ de(), ue++;
386
+ try {
387
+ return v.createHTML(e);
388
+ } finally {
389
+ ue--;
390
+ }
391
+ }, me = function(e) {
392
+ de(), ue++;
393
+ try {
394
+ return v.createScriptURL(e);
395
+ } finally {
396
+ ue--;
397
+ }
398
+ }, he = function() {
399
+ return le ||= (ce = _t(u, i), !0), ce;
400
+ }, ge = n, ve = ge.implementation, ye = ge.createNodeIterator, be = ge.createDocumentFragment, Ne = ge.getElementsByTagName, Pe = r.importNode, x = vt();
401
+ t.isSupported = typeof fe == "function" && typeof te == "function" && ve && ve.createHTMLDocument !== void 0;
402
+ let Fe = $e, Ie = et, w = tt, Re = nt, ze = rt, pt = at, St = ot, Ct = ct, wt = it, k = null, Tt = T({}, [
403
+ ...He,
404
+ ...Ue,
405
+ ...We,
406
+ ...Ke,
407
+ ...Je
408
+ ]), A = null, j = T({}, [
409
+ ...Ye,
410
+ ...Xe,
411
+ ...Ze,
412
+ ...Qe
413
+ ]), M = Object.seal(_e(null, {
414
+ tagNameCheck: {
415
+ writable: !0,
416
+ configurable: !1,
417
+ enumerable: !0,
418
+ value: null
419
+ },
420
+ attributeNameCheck: {
421
+ writable: !0,
422
+ configurable: !1,
423
+ enumerable: !0,
424
+ value: null
425
+ },
426
+ allowCustomizedBuiltInElements: {
427
+ writable: !0,
428
+ configurable: !1,
429
+ enumerable: !0,
430
+ value: !1
431
+ }
432
+ })), Et = null, N = null, P = Object.seal(_e(null, {
433
+ tagCheck: {
434
+ writable: !0,
435
+ configurable: !1,
436
+ enumerable: !0,
437
+ value: null
438
+ },
439
+ attributeCheck: {
440
+ writable: !0,
441
+ configurable: !1,
442
+ enumerable: !0,
443
+ value: null
444
+ }
445
+ })), Dt = !0, Ot = !0, kt = !1, At = !0, F = !1, I = !0, L = !1, jt = !1, Mt = null, Nt = null, Pt = !1, Ft = !1, It = !1, Lt = !1, Rt = !0, zt = !1, Bt = "user-content-", Vt = !0, Ht = !1, Ut = {}, Wt = null, Gt = T({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Kt = null, qt = T({}, [
446
+ "audio",
447
+ "video",
448
+ "img",
449
+ "source",
450
+ "image",
451
+ "track"
452
+ ]), Jt = null, Yt = T({}, [
453
+ "alt",
454
+ "class",
455
+ "for",
456
+ "id",
457
+ "label",
458
+ "name",
459
+ "pattern",
460
+ "placeholder",
461
+ "role",
462
+ "summary",
463
+ "title",
464
+ "value",
465
+ "style",
466
+ "xmlns"
467
+ ]), Xt = "http://www.w3.org/1998/Math/MathML", Zt = "http://www.w3.org/2000/svg", R = "http://www.w3.org/1999/xhtml", Qt = R, $t = !1, en = null, tn = T({}, [
468
+ Xt,
469
+ Zt,
470
+ R
471
+ ], Oe), nn = y([
472
+ "mi",
473
+ "mo",
474
+ "mn",
475
+ "ms",
476
+ "mtext"
477
+ ]), rn = T({}, nn), an = y(["annotation-xml"]), on = T({}, an), sn = T({}, [
478
+ "title",
479
+ "style",
480
+ "font",
481
+ "a",
482
+ "script"
483
+ ]), cn = null, ln = ["application/xhtml+xml", "text/html"], z = null, un = null, dn = n.createElement("form"), fn = function(e) {
484
+ return e instanceof RegExp || e instanceof Function;
485
+ }, pn = function() {
486
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
487
+ if (un && un === e) return;
488
+ (!e || typeof e != "object") && (e = {}), e = E(e), cn = ln.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, z = cn === "application/xhtml+xml" ? Oe : De, k = yt(e, "ALLOWED_TAGS", Tt, { transform: z }), A = yt(e, "ALLOWED_ATTR", j, { transform: z }), en = yt(e, "ALLOWED_NAMESPACES", tn, { transform: Oe }), Jt = yt(e, "ADD_URI_SAFE_ATTR", Yt, {
489
+ transform: z,
490
+ base: Yt
491
+ }), Kt = yt(e, "ADD_DATA_URI_TAGS", qt, {
492
+ transform: z,
493
+ base: qt
494
+ }), Wt = yt(e, "FORBID_CONTENTS", Gt, { transform: z }), Et = yt(e, "FORBID_TAGS", E({}), { transform: z }), N = yt(e, "FORBID_ATTR", E({}), { transform: z }), Ut = S(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? E(e.USE_PROFILES) : e.USE_PROFILES : !1, Dt = e.ALLOW_ARIA_ATTR !== !1, Ot = e.ALLOW_DATA_ATTR !== !1, kt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, At = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, F = e.SAFE_FOR_TEMPLATES || !1, I = e.SAFE_FOR_XML !== !1, L = e.WHOLE_DOCUMENT || !1, Ft = e.RETURN_DOM || !1, It = e.RETURN_DOM_FRAGMENT || !1, Lt = e.RETURN_TRUSTED_TYPE || !1, Pt = e.FORCE_BODY || !1, Rt = e.SANITIZE_DOM !== !1, zt = e.SANITIZE_NAMED_PROPS || !1, Vt = e.KEEP_CONTENT !== !1, Ht = e.IN_PLACE || !1, wt = Ve(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : it, Qt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : R, rn = bt(e, "MATHML_TEXT_INTEGRATION_POINTS", () => T({}, nn)), on = bt(e, "HTML_INTEGRATION_POINTS", () => T({}, an));
495
+ let t = bt(e, "CUSTOM_ELEMENT_HANDLING", () => _e(null));
496
+ if (M = _e(null), S(t, "tagNameCheck") && fn(t.tagNameCheck) && (M.tagNameCheck = t.tagNameCheck), S(t, "attributeNameCheck") && fn(t.attributeNameCheck) && (M.attributeNameCheck = t.attributeNameCheck), S(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (M.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), b(M), F && (Ot = !1), It && (Ft = !0), Ut && (k = T({}, Je), A = _e(null), Ut.html === !0 && (T(k, He), T(A, Ye)), Ut.svg === !0 && (T(k, Ue), T(A, Xe), T(A, Qe)), Ut.svgFilters === !0 && (T(k, We), T(A, Xe), T(A, Qe)), Ut.mathMl === !0 && (T(k, Ke), T(A, Ze), T(A, Qe))), P.tagCheck = null, P.attributeCheck = null, S(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? P.tagCheck = e.ADD_TAGS : Ee(e.ADD_TAGS) && (k === Tt && (k = E(k)), T(k, e.ADD_TAGS, z))), S(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? P.attributeCheck = e.ADD_ATTR : Ee(e.ADD_ATTR) && (A === j && (A = E(A)), T(A, e.ADD_ATTR, z))), S(e, "ADD_FORBID_CONTENTS") && Ee(e.ADD_FORBID_CONTENTS) && (Wt === Gt && (Wt = E(Wt)), T(Wt, e.ADD_FORBID_CONTENTS, z)), Vt && (k["#text"] = !0), L && T(k, [
497
+ "html",
498
+ "head",
499
+ "body"
500
+ ]), k.table && (T(k, ["tbody"]), delete Et.tbody), e.TRUSTED_TYPES_POLICY) {
501
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Le("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
502
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Le("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
503
+ let t = v;
504
+ v = e.TRUSTED_TYPES_POLICY;
505
+ try {
506
+ se = pe("");
507
+ } catch (e) {
508
+ throw v = t, e;
509
+ }
510
+ } else e.TRUSTED_TYPES_POLICY === null ? (v = void 0, se = "") : (v === void 0 && (v = he()), v && typeof se == "string" && (se = pe("")));
511
+ y && y(e), un = e;
512
+ }, mn = T({}, [
513
+ ...Ue,
514
+ ...We,
515
+ ...Ge
516
+ ]), hn = T({}, [...Ke, ...qe]), gn = function(e, t, n) {
517
+ return t.namespaceURI === R ? e === "svg" : t.namespaceURI === Xt ? e === "svg" && (n === "annotation-xml" || rn[n]) : !!mn[e];
518
+ }, _n = function(e, t, n) {
519
+ return t.namespaceURI === R ? e === "math" : t.namespaceURI === Zt ? e === "math" && on[n] : !!hn[e];
520
+ }, vn = function(e, t, n) {
521
+ return t.namespaceURI === Zt && !on[n] || t.namespaceURI === Xt && !rn[n] ? !1 : !hn[e] && (sn[e] || !mn[e]);
522
+ }, yn = function(e) {
523
+ let t = te(e);
524
+ (!t || !t.tagName) && (t = {
525
+ namespaceURI: Qt,
526
+ tagName: "template"
527
+ });
528
+ let n = De(e.tagName), r = De(t.tagName);
529
+ return en[e.namespaceURI] ? e.namespaceURI === Zt ? gn(n, t, r) : e.namespaceURI === Xt ? _n(n, t, r) : e.namespaceURI === R ? vn(n, t, r) : !!(cn === "application/xhtml+xml" && en[e.namespaceURI]) : !1;
530
+ }, B = function(e) {
531
+ we(t.removed, { element: e });
532
+ try {
533
+ te(e).removeChild(e);
534
+ } catch {
535
+ if (p(e), !te(e)) throw Le("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
536
+ }
537
+ }, bn = function(e, t, n) {
538
+ try {
539
+ ee(e, t);
540
+ } catch {
541
+ try {
542
+ e.removeAttribute(n);
543
+ } catch {}
544
+ }
545
+ }, xn = function(e) {
546
+ H(e);
547
+ let t = h(e);
548
+ if (t) {
549
+ let e = [];
550
+ xe(t, (t) => {
551
+ we(e, t);
552
+ }), xe(e, (e) => {
553
+ try {
554
+ p(e);
555
+ } catch {}
556
+ });
557
+ }
558
+ let n = ne(e);
559
+ if (n) for (let t = n.length - 1; t >= 0; --t) {
560
+ let r = n[t], i = r && r.name;
561
+ typeof i == "string" && bn(e, r, i);
562
+ }
563
+ }, V = function(e, n, r) {
564
+ if (!r) try {
565
+ r = n.getAttributeNode(e);
566
+ } catch {
567
+ r = null;
568
+ }
569
+ we(t.removed, {
570
+ attribute: r || null,
571
+ from: n
572
+ });
573
+ try {
574
+ r ? ee(n, r) : n.removeAttribute(e);
575
+ } catch {
576
+ try {
577
+ n.removeAttribute(e);
578
+ } catch {}
579
+ }
580
+ if (e === "is") if (Ft || It) try {
581
+ B(n);
582
+ } catch {}
583
+ else try {
584
+ n.setAttribute(e, "");
585
+ } catch {}
586
+ }, Sn = function(e) {
587
+ let t = ne(e);
588
+ if (t) for (let n = t.length - 1; n >= 0; --n) {
589
+ let r = t[n], i = r && r.name;
590
+ typeof i != "string" || A[z(i)] || bn(e, r, i);
591
+ }
592
+ }, H = function(e) {
593
+ let t = [e];
594
+ for (; t.length > 0;) {
595
+ let e = t.pop();
596
+ ae(e) === O.element && Sn(e);
597
+ let n = h(e);
598
+ if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
599
+ }
600
+ }, Cn = function(e, t) {
601
+ return I ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
602
+ }, wn = function(e) {
603
+ if (!I) return;
604
+ let t = [e];
605
+ for (; t.length > 0;) {
606
+ let e = t.pop(), n = ae(e);
607
+ if (n === O.processingInstruction || n === O.comment && C(ut, e.data)) {
608
+ try {
609
+ p(e);
610
+ } catch {}
611
+ continue;
612
+ }
613
+ if (n === O.element) {
614
+ let t = e, n = z(oe(e));
615
+ try {
616
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Cn("for", n) && t.removeAttribute("for");
617
+ } catch {}
618
+ }
619
+ let r = h(e);
620
+ if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
621
+ }
622
+ }, Tn = function(e) {
623
+ let t = null, r = null;
624
+ if (Pt) e = "<remove></remove>" + e;
625
+ else {
626
+ let t = ke(e, /^[\r\n\t ]+/);
627
+ r = t && t[0];
628
+ }
629
+ cn === "application/xhtml+xml" && Qt === R && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
630
+ let i = v ? pe(e) : e;
631
+ if (Qt === R) try {
632
+ t = new l().parseFromString(i, cn);
633
+ } catch {}
634
+ if (!t || !t.documentElement) {
635
+ t = ve.createDocument(Qt, "template", null);
636
+ try {
637
+ t.documentElement.innerHTML = $t ? se : i;
638
+ } catch {}
639
+ }
640
+ let a = t.body || t.documentElement;
641
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Qt === R ? Ne.call(t, L ? "html" : "body")[0] : L ? t.documentElement : a;
642
+ }, U = function(e) {
643
+ let t = ie ? ie(e) : e.ownerDocument;
644
+ return ye.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
645
+ }, En = function(e) {
646
+ return e = Ae(e, Fe, " "), e = Ae(e, Ie, " "), e = Ae(e, w, " "), e;
647
+ }, Dn = function(e) {
648
+ e.normalize();
649
+ let t = ie ? ie(e) : e.ownerDocument, n = ye.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
650
+ for (; r;) r.data = En(r.data), r = n.nextNode();
651
+ let i = e.querySelectorAll?.call(e, "template");
652
+ i && xe(i, (e) => {
653
+ G(e.content) && Dn(e.content);
654
+ });
655
+ }, W = function(e) {
656
+ let t = re ? re(e) : null;
657
+ return typeof t != "string" || z(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ne(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== _(e) || e.childNodes !== h(e);
658
+ }, G = function(e) {
659
+ if (!_ || typeof e != "object" || !e) return !1;
660
+ try {
661
+ return _(e) === O.documentFragment;
662
+ } catch {
663
+ return !1;
664
+ }
665
+ }, On = function(e) {
666
+ if (!_ || typeof e != "object" || !e) return !1;
667
+ try {
668
+ return typeof _(e) == "number";
669
+ } catch {
670
+ return !1;
671
+ }
672
+ };
673
+ function K(e, n, r) {
674
+ e.length !== 0 && xe(e, (e) => {
675
+ e.call(t, n, r, un);
676
+ });
677
+ }
678
+ let kn = function(e, t) {
679
+ return !!(I && e.hasChildNodes() && !On(e.firstElementChild) && C(lt, e.textContent) && C(lt, e.innerHTML) || I && e.namespaceURI === R && mt[t] && (On(e.firstElementChild) || typeof e.textContent == "string" && C(ht[t], e.textContent)) || e.nodeType === O.processingInstruction || I && e.nodeType === O.comment && C(ut, e.data));
680
+ }, An = function(e, t) {
681
+ return e instanceof RegExp ? C(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
682
+ }, jn = function(e, t, n) {
683
+ if (!Et[t] && X(t) && An(M.tagNameCheck, t)) return !1;
684
+ if (Vt && !Wt[t]) {
685
+ let t = te(e), r = h(e);
686
+ if (r && t) {
687
+ let i = r.length;
688
+ for (let a = i - 1; a >= 0; --a) {
689
+ let i = e === n ? f(r[a], !0) : r[a];
690
+ t.insertBefore(i, m(e));
691
+ }
692
+ }
693
+ }
694
+ return B(e), !0;
695
+ }, q = function(e, t, n, r) {
696
+ return e.length === 0 ? t : t === n || t === r ? E(t) : t;
697
+ }, J = function(e, t) {
698
+ return e === t || te(e) !== null ? !1 : (Ht && H(e), !0);
699
+ }, Mn = function(e, n) {
700
+ if (K(x.beforeSanitizeElements, e, null), J(e, n)) return !0;
701
+ if (W(e)) return B(e), !0;
702
+ let r = z(oe(e));
703
+ if (k = q(x.uponSanitizeElement, k, Tt, Mt), K(x.uponSanitizeElement, e, {
704
+ tagName: r,
705
+ allowedTags: k
706
+ }), J(e, n)) return !0;
707
+ if (kn(e, r)) return B(e), !0;
708
+ if (Et[r] || !(P.tagCheck instanceof Function && P.tagCheck(r)) && !k[r]) {
709
+ let t = jn(e, r, n);
710
+ return t === !1 && (K(x.afterSanitizeElements, e, null), J(e, n)) ? !0 : t;
711
+ }
712
+ if (ae(e) === O.element && !yn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && C(dt, e.innerHTML)) return B(e), !0;
713
+ if (F && e.nodeType === O.text) {
714
+ let n = En(e.textContent);
715
+ e.textContent !== n && (we(t.removed, { element: e.cloneNode() }), e.textContent = n);
716
+ }
717
+ return K(x.afterSanitizeElements, e, null), J(e, n);
718
+ }, Y = function(e, t, r) {
719
+ if (N[t] || Cn(t, e) || Rt && (t === "id" || t === "name") && (r in n || r in dn)) return !1;
720
+ let i = A[t] || P.attributeCheck instanceof Function && P.attributeCheck(t, e);
721
+ return Ot && C(Re, t) || Dt && C(ze, t) ? !0 : i ? Jt[t] || C(wt, Ae(r, St, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && je(r, "data:") === 0 && Kt[e] || kt && !C(pt, Ae(r, St, "")) ? !0 : !r : X(e) && An(M.tagNameCheck, e) && An(M.attributeNameCheck, t, e) || t === "is" && M.allowCustomizedBuiltInElements && An(M.tagNameCheck, r);
722
+ }, Nn = T({}, [
723
+ "annotation-xml",
724
+ "color-profile",
725
+ "font-face",
726
+ "font-face-format",
727
+ "font-face-name",
728
+ "font-face-src",
729
+ "font-face-uri",
730
+ "missing-glyph"
731
+ ]), X = function(e) {
732
+ return !Nn[De(e)] && C(Ct, e);
733
+ }, Z = function(e, t, n, r) {
734
+ if (v && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
735
+ case "TrustedHTML": return pe(r);
736
+ case "TrustedScriptURL": return me(r);
737
+ }
738
+ return r;
739
+ }, Pn = function(e, t, n, r) {
740
+ try {
741
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), W(e) ? (B(e), !1) : !0;
742
+ } catch {
743
+ return V(t, e), !1;
744
+ }
745
+ }, Fn = function(e, n) {
746
+ if (K(x.beforeSanitizeAttributes, e, null), J(e, n)) return;
747
+ let r = e.attributes;
748
+ if (!r || W(e)) return;
749
+ A = q(x.uponSanitizeAttribute, A, j, Nt);
750
+ let i = {
751
+ attrName: "",
752
+ attrValue: "",
753
+ keepAttr: !0,
754
+ allowedAttributes: A,
755
+ forceKeepAttr: void 0
756
+ }, a = r.length, o = z(e.nodeName);
757
+ for (; a--;) {
758
+ let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = z(s), d = l, f = s === "value" ? d : Me(d), p = !1;
759
+ if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, K(x.uponSanitizeAttribute, e, i), f = i.attrValue, zt && (u === "id" || u === "name") && je(f, Bt) !== 0 && (V(s, e, n), f = Bt + f, p = !0), I && C(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
760
+ V(s, e, n);
761
+ continue;
762
+ }
763
+ if (u === "attributename" && ke(f, "href")) {
764
+ V(s, e, n);
765
+ continue;
766
+ }
767
+ if (!i.forceKeepAttr) {
768
+ if (!i.keepAttr) {
769
+ V(s, e, n);
770
+ continue;
771
+ }
772
+ if (!At && C(ft, f)) {
773
+ V(s, e, n);
774
+ continue;
775
+ }
776
+ if (F && (f = En(f)), !Y(o, u, f)) {
777
+ V(s, e, n);
778
+ continue;
779
+ }
780
+ f = Z(o, u, c, f), f !== d && Pn(e, s, c, f) && p && Ce(t.removed);
781
+ }
782
+ }
783
+ K(x.afterSanitizeAttributes, e, null), J(e, n);
784
+ }, In = function(e) {
785
+ let t = null, n = U(e);
786
+ for (K(x.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (K(x.uponSanitizeShadowNode, t, null), Mn(t, e), Fn(t, e), G(t.content) && In(t.content), ae(t) === O.element) {
787
+ let e = g(t);
788
+ G(e) && (Ln(e), In(e));
789
+ }
790
+ K(x.afterSanitizeShadowDOM, e, null);
791
+ }, Ln = function(e) {
792
+ let t = [{
793
+ node: e,
794
+ shadow: null
795
+ }];
796
+ for (; t.length > 0;) {
797
+ let e = t.pop();
798
+ if (e.shadow) {
799
+ In(e.shadow);
800
+ continue;
801
+ }
802
+ let n = e.node, r = ae(n) === O.element, i = h(n);
803
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
804
+ node: i[e],
805
+ shadow: null
806
+ });
807
+ if (r) {
808
+ let e = re ? re(n) : null;
809
+ if (typeof e == "string" && z(e) === "template") {
810
+ let e = n.content;
811
+ G(e) && t.push({
812
+ node: e,
813
+ shadow: null
814
+ });
815
+ }
816
+ }
817
+ if (r) {
818
+ let e = g(n);
819
+ G(e) && t.push({
820
+ node: null,
821
+ shadow: e
822
+ }, {
823
+ node: e,
824
+ shadow: null
825
+ });
826
+ }
827
+ }
828
+ };
829
+ return t.sanitize = function(e) {
830
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
831
+ if ($t = !e, $t && (e = "<!-->"), typeof e != "string" && !On(e) && (e = Be(e), typeof e != "string")) throw Le("dirty is not a string, aborting");
832
+ if (!t.isSupported) return e;
833
+ jt ? (k = Mt, A = Nt) : pn(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (k = E(k)), x.uponSanitizeAttribute.length > 0 && (A = E(A)), t.removed = [];
834
+ let c = Ht && typeof e != "string" && On(e);
835
+ if (c) {
836
+ wn(e);
837
+ let t = oe(e);
838
+ if (typeof t == "string") {
839
+ let n = z(t);
840
+ if (!k[n] || Et[n]) throw xn(e), Le("root node is forbidden and cannot be sanitized in-place");
841
+ }
842
+ if (W(e)) throw xn(e), Le("root node is clobbered and cannot be sanitized in-place");
843
+ try {
844
+ Ln(e);
845
+ } catch (t) {
846
+ throw xn(e), t;
847
+ }
848
+ } else if (On(e)) i = Tn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === O.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Ln(i);
849
+ else {
850
+ if (!Ft && !F && !L && e.indexOf("<") === -1) return v && Lt ? pe(e) : e;
851
+ if (i = Tn(e), !i) return Ft ? null : Lt ? se : "";
852
+ }
853
+ i && Pt && B(i.firstChild);
854
+ let l = c ? e : i;
855
+ try {
856
+ let e = U(l);
857
+ for (; o = e.nextNode();) Mn(o, l), Fn(o, l), G(o.content) && In(o.content);
858
+ } catch (n) {
859
+ throw c && (xn(e), xe(t.removed, (e) => {
860
+ e.element && H(e.element);
861
+ })), n;
862
+ }
863
+ if (c) {
864
+ let n = !1;
865
+ if (xe(t.removed, (t) => {
866
+ t.element && (t.element === e && (n = !0), H(t.element));
867
+ }), n) throw Le("a node selected for removal could not be safely returned; refusing to sanitize in place");
868
+ return F && Dn(e), e;
869
+ }
870
+ if (Ft) {
871
+ if (F && Dn(i), It) for (s = be.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
872
+ else s = i;
873
+ return (A.shadowroot || A.shadowrootmode) && (s = Pe.call(r, s, !0)), s;
874
+ }
875
+ let u = L ? i.outerHTML : i.innerHTML;
876
+ return L && k["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && C(st, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), F && (u = En(u)), v && Lt ? pe(u) : u;
877
+ }, t.setConfig = function() {
878
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
879
+ pn(e), jt = !0, Mt = k, Nt = A;
880
+ }, t.clearConfig = function() {
881
+ un = null, jt = !1, Mt = null, Nt = null, v = ce, se = "";
882
+ }, t.isValidAttribute = function(e, t, n) {
883
+ un || pn({});
884
+ let r = z(e), i = z(t);
885
+ return Y(r, i, n);
886
+ }, t.addHook = function(e, t) {
887
+ typeof t == "function" && S(x, e) && we(x[e], t);
888
+ }, t.removeHook = function(e, t) {
889
+ if (S(x, e)) {
890
+ if (t !== void 0) {
891
+ let n = Se(x[e], t);
892
+ return n === -1 ? void 0 : Te(x[e], n, 1)[0];
893
+ }
894
+ return Ce(x[e]);
895
+ }
896
+ }, t.removeHooks = function(e) {
897
+ S(x, e) && (x[e] = []);
898
+ }, t.removeAllHooks = function() {
899
+ x = vt();
900
+ }, t;
901
+ }
902
+ var St = xt(), Ct;
903
+ function wt() {
904
+ return {
905
+ async: !1,
906
+ breaks: !1,
907
+ extensions: null,
908
+ gfm: !0,
909
+ hooks: null,
910
+ pedantic: !1,
911
+ renderer: null,
912
+ silent: !1,
913
+ tokenizer: null,
914
+ walkTokens: null
915
+ };
916
+ }
917
+ var k = wt();
918
+ function Tt(e) {
919
+ k = e;
920
+ }
921
+ var A = { exec: () => null };
922
+ function j(e) {
923
+ let t = [];
924
+ return (n) => {
925
+ let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
926
+ return i || (i = e(r), t[r] = i), i;
927
+ };
928
+ }
929
+ function M(e, t = "") {
930
+ let n = typeof e == "string" ? e : e.source, r = {
931
+ replace: (e, t) => {
932
+ let i = typeof t == "string" ? t : t.source;
933
+ return i = i.replace(N.caret, "$1"), n = n.replace(e, i), r;
934
+ },
935
+ getRegex: () => new RegExp(n, t)
936
+ };
937
+ return r;
938
+ }
939
+ var Et = ((e = "") => {
940
+ try {
941
+ return !!RegExp("(?<=1)(?<!1)" + e);
942
+ } catch {
943
+ return !1;
944
+ }
945
+ })(), N = {
946
+ codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
947
+ outputLinkReplace: /\\([\[\]])/g,
948
+ indentCodeCompensation: /^(\s+)(?:```)/,
949
+ beginningSpace: /^\s+/,
950
+ endingHash: /#$/,
951
+ startingSpaceChar: /^ /,
952
+ endingSpaceChar: / $/,
953
+ nonSpaceChar: /[^ ]/,
954
+ newLineCharGlobal: /\n/g,
955
+ tabCharGlobal: /\t/g,
956
+ multipleSpaceGlobal: /\s+/g,
957
+ blankLine: /^[ \t]*$/,
958
+ doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
959
+ blockquoteStart: /^ {0,3}>/,
960
+ blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
961
+ blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
962
+ listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
963
+ listIsTask: /^\[[ xX]\] +\S/,
964
+ listReplaceTask: /^\[[ xX]\] +/,
965
+ listTaskCheckbox: /\[[ xX]\]/,
966
+ anyLine: /\n.*\n/,
967
+ hrefBrackets: /^<(.*)>$/,
968
+ tableDelimiter: /[:|]/,
969
+ tableAlignChars: /^\||\| *$/g,
970
+ tableRowBlankLine: /\n[ \t]*$/,
971
+ tableAlignRight: /^ *-+: *$/,
972
+ tableAlignCenter: /^ *:-+: *$/,
973
+ tableAlignLeft: /^ *:-+ *$/,
974
+ startATag: /^<a /i,
975
+ endATag: /^<\/a>/i,
976
+ startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
977
+ endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
978
+ startAngleBracket: /^</,
979
+ endAngleBracket: />$/,
980
+ pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
981
+ unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
982
+ escapeTest: /[&<>"']/,
983
+ escapeReplace: /[&<>"']/g,
984
+ escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
985
+ escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
986
+ caret: /(^|[^\[])\^/g,
987
+ percentDecode: /%25/g,
988
+ findPipe: /\|/g,
989
+ splitPipe: / \|/,
990
+ slashPipe: /\\\|/g,
991
+ carriageReturn: /\r\n|\r/g,
992
+ spaceLine: /^ +$/gm,
993
+ notSpaceStart: /^\S*/,
994
+ endingNewline: /\n$/,
995
+ listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
996
+ nextBulletRegex: j((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
997
+ hrRegex: j((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
998
+ fencesBeginRegex: j((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
999
+ headingBeginRegex: j((e) => RegExp(`^ {0,${e}}#`)),
1000
+ htmlBeginRegex: j((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
1001
+ blockquoteBeginRegex: j((e) => RegExp(`^ {0,${e}}>`))
1002
+ }, P = /^(?:[ \t]*(?:\n|$))+/, Dt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ot = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, kt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, At = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = / {0,3}(?:[*+-]|\d{1,9}[.)])/, I = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, L = M(I).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), jt = M(I).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Mt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Nt = /^[^\n]+/, Pt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ft = M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Pt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), It = M(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), Lt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Rt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, zt = M("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Rt).replace("tag", Lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Bt = M(Mt).replace("hr", kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), Vt = {
1003
+ blockquote: M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Bt).getRegex(),
1004
+ code: Dt,
1005
+ def: Ft,
1006
+ fences: Ot,
1007
+ heading: At,
1008
+ hr: kt,
1009
+ html: zt,
1010
+ lheading: L,
1011
+ list: It,
1012
+ newline: P,
1013
+ paragraph: Bt,
1014
+ table: A,
1015
+ text: Nt
1016
+ }, Ht = M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), Ut = {
1017
+ ...Vt,
1018
+ lheading: jt,
1019
+ table: Ht,
1020
+ paragraph: M(Mt).replace("hr", kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ht).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex()
1021
+ }, Wt = {
1022
+ ...Vt,
1023
+ html: M("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Rt).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
1024
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1025
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
1026
+ fences: A,
1027
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1028
+ paragraph: M(Mt).replace("hr", kt).replace("heading", " *#{1,6} *[^\n]").replace("lheading", L).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1029
+ }, Gt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kt = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, qt = /^( {2,}|\\)\n(?!\s*$)/, Jt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Yt = /[\p{P}\p{S}]/u, Xt = /[\s\p{P}\p{S}]/u, Zt = /[^\s\p{P}\p{S}]/u, R = M(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Xt).getRegex(), Qt = /(?!~)[\p{P}\p{S}]/u, $t = /(?!~)[\s\p{P}\p{S}]/u, en = /(?:[^\s\p{P}\p{S}]|~)/u, tn = M(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Et ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), nn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, rn = M(nn, "u").replace(/punct/g, Yt).getRegex(), an = M(nn, "u").replace(/punct/g, Qt).getRegex(), on = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", sn = M(on, "gu").replace(/notPunctSpace/g, Zt).replace(/punctSpace/g, Xt).replace(/punct/g, Yt).getRegex(), cn = M(on, "gu").replace(/notPunctSpace/g, en).replace(/punctSpace/g, $t).replace(/punct/g, Qt).getRegex(), ln = M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Zt).replace(/punctSpace/g, Xt).replace(/punct/g, Yt).getRegex(), z = M(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Yt).getRegex(), un = M("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Zt).replace(/punctSpace/g, Xt).replace(/punct/g, Yt).getRegex(), dn = M(/\\(punct)/, "gu").replace(/punct/g, Yt).getRegex(), fn = M(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), pn = M(Rt).replace("(?:-->|$)", "-->").getRegex(), mn = M("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", pn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), hn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, gn = M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", hn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), _n = M(/^!?\[(label)\]\[(ref)\]/).replace("label", hn).replace("ref", Pt).getRegex(), vn = M(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pt).getRegex(), yn = M("reflink|nolink(?!\\()", "g").replace("reflink", _n).replace("nolink", vn).getRegex(), B = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, bn = {
1030
+ _backpedal: A,
1031
+ anyPunctuation: dn,
1032
+ autolink: fn,
1033
+ blockSkip: tn,
1034
+ br: qt,
1035
+ code: Kt,
1036
+ del: A,
1037
+ delLDelim: A,
1038
+ delRDelim: A,
1039
+ emStrongLDelim: rn,
1040
+ emStrongRDelimAst: sn,
1041
+ emStrongRDelimUnd: ln,
1042
+ escape: Gt,
1043
+ link: gn,
1044
+ nolink: vn,
1045
+ punctuation: R,
1046
+ reflink: _n,
1047
+ reflinkSearch: yn,
1048
+ tag: mn,
1049
+ text: Jt,
1050
+ url: A
1051
+ }, xn = {
1052
+ ...bn,
1053
+ link: M(/^!?\[(label)\]\((.*?)\)/).replace("label", hn).getRegex(),
1054
+ reflink: M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", hn).getRegex()
1055
+ }, V = {
1056
+ ...bn,
1057
+ emStrongRDelimAst: cn,
1058
+ emStrongLDelim: an,
1059
+ delLDelim: z,
1060
+ delRDelim: un,
1061
+ url: M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", B).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
1062
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1063
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
1064
+ text: M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", B).getRegex()
1065
+ }, Sn = {
1066
+ ...V,
1067
+ br: M(qt).replace("{2,}", "*").getRegex(),
1068
+ text: M(V.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1069
+ }, H = {
1070
+ normal: Vt,
1071
+ gfm: Ut,
1072
+ pedantic: Wt
1073
+ }, Cn = {
1074
+ normal: bn,
1075
+ gfm: V,
1076
+ breaks: Sn,
1077
+ pedantic: xn
1078
+ }, wn = {
1079
+ "&": "&amp;",
1080
+ "<": "&lt;",
1081
+ ">": "&gt;",
1082
+ "\"": "&quot;",
1083
+ "'": "&#39;"
1084
+ }, Tn = (e) => wn[e];
1085
+ function U(e, t) {
1086
+ if (t) {
1087
+ if (N.escapeTest.test(e)) return e.replace(N.escapeReplace, Tn);
1088
+ } else if (N.escapeTestNoEncode.test(e)) return e.replace(N.escapeReplaceNoEncode, Tn);
1089
+ return e;
1090
+ }
1091
+ function En(e) {
1092
+ try {
1093
+ e = encodeURI(e).replace(N.percentDecode, "%");
1094
+ } catch {
1095
+ return null;
1096
+ }
1097
+ return e;
1098
+ }
1099
+ function Dn(e, t) {
1100
+ let n = e.replace(N.findPipe, (e, t, n) => {
1101
+ let r = !1, i = t;
1102
+ for (; --i >= 0 && n[i] === "\\";) r = !r;
1103
+ return r ? "|" : " |";
1104
+ }).split(N.splitPipe), r = 0;
1105
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
1106
+ else for (; n.length < t;) n.push("");
1107
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(N.slashPipe, "|");
1108
+ return n;
1109
+ }
1110
+ function W(e, t, n) {
1111
+ let r = e.length;
1112
+ if (r === 0) return "";
1113
+ let i = 0;
1114
+ for (; i < r;) {
1115
+ let a = e.charAt(r - i - 1);
1116
+ if (a === t && !n) i++;
1117
+ else if (a !== t && n) i++;
1118
+ else break;
1119
+ }
1120
+ return e.slice(0, r - i);
1121
+ }
1122
+ function G(e) {
1123
+ let t = e.split("\n"), n = t.length - 1;
1124
+ for (; n >= 0 && N.blankLine.test(t[n]);) n--;
1125
+ return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
1126
+ }
1127
+ function On(e, t) {
1128
+ if (e.indexOf(t[1]) === -1) return -1;
1129
+ let n = 0;
1130
+ for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
1131
+ else if (e[r] === t[0]) n++;
1132
+ else if (e[r] === t[1] && (n--, n < 0)) return r;
1133
+ return n > 0 ? -2 : -1;
1134
+ }
1135
+ function K(e, t = 0) {
1136
+ let n = t, r = "";
1137
+ for (let t of e) if (t === " ") {
1138
+ let e = 4 - n % 4;
1139
+ r += " ".repeat(e), n += e;
1140
+ } else r += t, n++;
1141
+ return r;
1142
+ }
1143
+ function kn(e, t, n, r, i) {
1144
+ let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1145
+ r.state.inLink = !0;
1146
+ let c = {
1147
+ type: e[0].charAt(0) === "!" ? "image" : "link",
1148
+ raw: n,
1149
+ href: a,
1150
+ title: o,
1151
+ text: s,
1152
+ tokens: r.inlineTokens(s)
1153
+ };
1154
+ return r.state.inLink = !1, c;
1155
+ }
1156
+ function An(e, t, n) {
1157
+ let r = e.match(n.other.indentCodeCompensation);
1158
+ if (r === null) return t;
1159
+ let i = r[1];
1160
+ return t.split("\n").map((e) => {
1161
+ let t = e.match(n.other.beginningSpace);
1162
+ if (t === null) return e;
1163
+ let [r] = t;
1164
+ return r.length >= i.length ? e.slice(i.length) : e;
1165
+ }).join("\n");
1166
+ }
1167
+ var jn = class {
1168
+ constructor(e) {
1169
+ s(this, "options", void 0), s(this, "rules", void 0), s(this, "lexer", void 0), this.options = e || k;
1170
+ }
1171
+ space(e) {
1172
+ let t = this.rules.block.newline.exec(e);
1173
+ if (t && t[0].length > 0) return {
1174
+ type: "space",
1175
+ raw: t[0]
1176
+ };
1177
+ }
1178
+ code(e) {
1179
+ let t = this.rules.block.code.exec(e);
1180
+ if (t) {
1181
+ let e = this.options.pedantic ? t[0] : G(t[0]);
1182
+ return {
1183
+ type: "code",
1184
+ raw: e,
1185
+ codeBlockStyle: "indented",
1186
+ text: e.replace(this.rules.other.codeRemoveIndent, "")
1187
+ };
1188
+ }
1189
+ }
1190
+ fences(e) {
1191
+ let t = this.rules.block.fences.exec(e);
1192
+ if (t) {
1193
+ let e = t[0], n = An(e, t[3] || "", this.rules);
1194
+ return {
1195
+ type: "code",
1196
+ raw: e,
1197
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1198
+ text: n
1199
+ };
1200
+ }
1201
+ }
1202
+ heading(e) {
1203
+ let t = this.rules.block.heading.exec(e);
1204
+ if (t) {
1205
+ let e = t[2].trim();
1206
+ if (this.rules.other.endingHash.test(e)) {
1207
+ let t = W(e, "#");
1208
+ (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1209
+ }
1210
+ return {
1211
+ type: "heading",
1212
+ raw: W(t[0], "\n"),
1213
+ depth: t[1].length,
1214
+ text: e,
1215
+ tokens: this.lexer.inline(e)
1216
+ };
1217
+ }
1218
+ }
1219
+ hr(e) {
1220
+ let t = this.rules.block.hr.exec(e);
1221
+ if (t) return {
1222
+ type: "hr",
1223
+ raw: W(t[0], "\n")
1224
+ };
1225
+ }
1226
+ blockquote(e) {
1227
+ let t = this.rules.block.blockquote.exec(e);
1228
+ if (t) {
1229
+ let e = W(t[0], "\n").split("\n"), n = "", r = "", i = [];
1230
+ for (; e.length > 0;) {
1231
+ let t = !1, a = [], o;
1232
+ for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1233
+ else if (!t) a.push(e[o]);
1234
+ else break;
1235
+ e = e.slice(o);
1236
+ let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1237
+ n = n ? `${n}
1238
+ ${s}` : s, r = r ? `${r}
1239
+ ${c}` : c;
1240
+ let l = this.lexer.state.top;
1241
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1242
+ let u = i.at(-1);
1243
+ if (u?.type === "code") break;
1244
+ if (u?.type === "blockquote") {
1245
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1246
+ i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
1247
+ break;
1248
+ } else if (u?.type === "list") {
1249
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1250
+ i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
1251
+ continue;
1252
+ }
1253
+ }
1254
+ return {
1255
+ type: "blockquote",
1256
+ raw: n,
1257
+ tokens: i,
1258
+ text: r
1259
+ };
1260
+ }
1261
+ }
1262
+ list(e) {
1263
+ let t = this.rules.block.list.exec(e);
1264
+ if (t) {
1265
+ let n = t[1].trim(), r = n.length > 1, i = {
1266
+ type: "list",
1267
+ raw: "",
1268
+ ordered: r,
1269
+ start: r ? +n.slice(0, -1) : "",
1270
+ loose: !1,
1271
+ items: []
1272
+ };
1273
+ n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1274
+ let a = this.rules.other.listItemRegex(n), o = !1;
1275
+ for (; e;) {
1276
+ let n = !1, r = "", s = "";
1277
+ if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1278
+ r = t[0], e = e.substring(r.length);
1279
+ let c = K(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1280
+ if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
1281
+ let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), f = this.rules.other.blockquoteBeginRegex(d);
1282
+ for (; e;) {
1283
+ let p = e.split("\n", 1)[0], ee;
1284
+ if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), ee = l) : ee = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || f.test(l) || t.test(l) || n.test(l)) break;
1285
+ if (ee.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ee.slice(d);
1286
+ else {
1287
+ if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1288
+ s += "\n" + l;
1289
+ }
1290
+ u = !l.trim(), r += p + "\n", e = e.substring(p.length + 1), c = ee.slice(d);
1291
+ }
1292
+ }
1293
+ i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1294
+ type: "list_item",
1295
+ raw: r,
1296
+ task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1297
+ loose: !1,
1298
+ text: s,
1299
+ tokens: []
1300
+ }), i.raw += r;
1301
+ }
1302
+ let s = i.items.at(-1);
1303
+ if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1304
+ else return;
1305
+ i.raw = i.raw.trimEnd();
1306
+ for (let e of i.items) {
1307
+ this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1308
+ let t = e.tokens[0];
1309
+ if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1310
+ e.text = e.text.replace(this.rules.other.listReplaceTask, ""), t.raw = t.raw.replace(this.rules.other.listReplaceTask, ""), t.text = t.text.replace(this.rules.other.listReplaceTask, "");
1311
+ for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1312
+ this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1313
+ break;
1314
+ }
1315
+ let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1316
+ if (n) {
1317
+ let t = {
1318
+ type: "checkbox",
1319
+ raw: n[0] + " ",
1320
+ checked: n[0] !== "[ ]"
1321
+ };
1322
+ e.checked = t.checked, i.loose ? e.tokens[0] && ["paragraph", "text"].includes(e.tokens[0].type) && "tokens" in e.tokens[0] && e.tokens[0].tokens ? (e.tokens[0].raw = t.raw + e.tokens[0].raw, e.tokens[0].text = t.raw + e.tokens[0].text, e.tokens[0].tokens.unshift(t)) : e.tokens.unshift({
1323
+ type: "paragraph",
1324
+ raw: t.raw,
1325
+ text: t.raw,
1326
+ tokens: [t]
1327
+ }) : e.tokens.unshift(t);
1328
+ }
1329
+ } else e.task &&= !1;
1330
+ if (!i.loose) {
1331
+ let t = e.tokens.filter((e) => e.type === "space");
1332
+ i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1333
+ }
1334
+ }
1335
+ if (i.loose) for (let e of i.items) {
1336
+ e.loose = !0;
1337
+ for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1338
+ }
1339
+ return i;
1340
+ }
1341
+ }
1342
+ html(e) {
1343
+ let t = this.rules.block.html.exec(e);
1344
+ if (t) {
1345
+ let e = G(t[0]);
1346
+ return {
1347
+ type: "html",
1348
+ block: !0,
1349
+ raw: e,
1350
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1351
+ text: e
1352
+ };
1353
+ }
1354
+ }
1355
+ def(e) {
1356
+ let t = this.rules.block.def.exec(e);
1357
+ if (t) {
1358
+ let e = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1359
+ return {
1360
+ type: "def",
1361
+ tag: e,
1362
+ raw: W(t[0], "\n"),
1363
+ href: n,
1364
+ title: r
1365
+ };
1366
+ }
1367
+ }
1368
+ table(e) {
1369
+ let t = this.rules.block.table.exec(e);
1370
+ if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1371
+ let n = Dn(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1372
+ type: "table",
1373
+ raw: W(t[0], "\n"),
1374
+ header: [],
1375
+ align: [],
1376
+ rows: []
1377
+ };
1378
+ if (n.length === r.length) {
1379
+ for (let e of r) this.rules.other.tableAlignRight.test(e) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(e) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(e) ? a.align.push("left") : a.align.push(null);
1380
+ for (let e = 0; e < n.length; e++) a.header.push({
1381
+ text: n[e],
1382
+ tokens: this.lexer.inline(n[e]),
1383
+ header: !0,
1384
+ align: a.align[e]
1385
+ });
1386
+ for (let e of i) a.rows.push(Dn(e, a.header.length).map((e, t) => ({
1387
+ text: e,
1388
+ tokens: this.lexer.inline(e),
1389
+ header: !1,
1390
+ align: a.align[t]
1391
+ })));
1392
+ return a;
1393
+ }
1394
+ }
1395
+ lheading(e) {
1396
+ let t = this.rules.block.lheading.exec(e);
1397
+ if (t) {
1398
+ let e = t[1].trim();
1399
+ return {
1400
+ type: "heading",
1401
+ raw: W(t[0], "\n"),
1402
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
1403
+ text: e,
1404
+ tokens: this.lexer.inline(e)
1405
+ };
1406
+ }
1407
+ }
1408
+ paragraph(e) {
1409
+ let t = this.rules.block.paragraph.exec(e);
1410
+ if (t) {
1411
+ let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1412
+ return {
1413
+ type: "paragraph",
1414
+ raw: t[0],
1415
+ text: e,
1416
+ tokens: this.lexer.inline(e)
1417
+ };
1418
+ }
1419
+ }
1420
+ text(e) {
1421
+ let t = this.rules.block.text.exec(e);
1422
+ if (t) return {
1423
+ type: "text",
1424
+ raw: t[0],
1425
+ text: t[0],
1426
+ tokens: this.lexer.inline(t[0])
1427
+ };
1428
+ }
1429
+ escape(e) {
1430
+ let t = this.rules.inline.escape.exec(e);
1431
+ if (t) return {
1432
+ type: "escape",
1433
+ raw: t[0],
1434
+ text: t[1]
1435
+ };
1436
+ }
1437
+ tag(e) {
1438
+ let t = this.rules.inline.tag.exec(e);
1439
+ if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
1440
+ type: "html",
1441
+ raw: t[0],
1442
+ inLink: this.lexer.state.inLink,
1443
+ inRawBlock: this.lexer.state.inRawBlock,
1444
+ block: !1,
1445
+ text: t[0]
1446
+ };
1447
+ }
1448
+ link(e) {
1449
+ let t = this.rules.inline.link.exec(e);
1450
+ if (t) {
1451
+ let e = t[2].trim();
1452
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1453
+ if (!this.rules.other.endAngleBracket.test(e)) return;
1454
+ let t = W(e.slice(0, -1), "\\");
1455
+ if ((e.length - t.length) % 2 == 0) return;
1456
+ } else {
1457
+ let e = On(t[2], "()");
1458
+ if (e === -2) return;
1459
+ if (e > -1) {
1460
+ let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1461
+ t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1462
+ }
1463
+ }
1464
+ let n = t[2], r = "";
1465
+ if (this.options.pedantic) {
1466
+ let e = this.rules.other.pedanticHrefTitle.exec(n);
1467
+ e && (n = e[1], r = e[3]);
1468
+ } else r = t[3] ? t[3].slice(1, -1) : "";
1469
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), kn(t, {
1470
+ href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1471
+ title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1472
+ }, t[0], this.lexer, this.rules);
1473
+ }
1474
+ }
1475
+ reflink(e, t) {
1476
+ let n;
1477
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1478
+ let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1479
+ if (!e) {
1480
+ let e = n[0].charAt(0);
1481
+ return {
1482
+ type: "text",
1483
+ raw: e,
1484
+ text: e
1485
+ };
1486
+ }
1487
+ return kn(n, e, n[0], this.lexer, this.rules);
1488
+ }
1489
+ }
1490
+ emStrong(e, t, n = "") {
1491
+ let r = this.rules.inline.emStrongLDelim.exec(e);
1492
+ if (!(!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[3]) || !n || this.rules.inline.punctuation.exec(n))) {
1493
+ let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1494
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1495
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1496
+ if (a = [...i].length, r[3] || r[4]) {
1497
+ o += a;
1498
+ continue;
1499
+ } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1500
+ s += a;
1501
+ continue;
1502
+ }
1503
+ if (o -= a, o > 0) continue;
1504
+ a = Math.min(a, a + o + s);
1505
+ let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1506
+ if (Math.min(n, a) % 2) {
1507
+ let e = c.slice(1, -1);
1508
+ return {
1509
+ type: "em",
1510
+ raw: c,
1511
+ text: e,
1512
+ tokens: this.lexer.inlineTokens(e)
1513
+ };
1514
+ }
1515
+ let l = c.slice(2, -2);
1516
+ return {
1517
+ type: "strong",
1518
+ raw: c,
1519
+ text: l,
1520
+ tokens: this.lexer.inlineTokens(l)
1521
+ };
1522
+ }
1523
+ }
1524
+ }
1525
+ codespan(e) {
1526
+ let t = this.rules.inline.code.exec(e);
1527
+ if (t) {
1528
+ let e = t[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(e), r = this.rules.other.startingSpaceChar.test(e) && this.rules.other.endingSpaceChar.test(e);
1529
+ return n && r && (e = e.substring(1, e.length - 1)), {
1530
+ type: "codespan",
1531
+ raw: t[0],
1532
+ text: e
1533
+ };
1534
+ }
1535
+ }
1536
+ br(e) {
1537
+ let t = this.rules.inline.br.exec(e);
1538
+ if (t) return {
1539
+ type: "br",
1540
+ raw: t[0]
1541
+ };
1542
+ }
1543
+ del(e, t, n = "") {
1544
+ let r = this.rules.inline.delLDelim.exec(e);
1545
+ if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1546
+ let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1547
+ for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1548
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1549
+ if (r[3] || r[4]) {
1550
+ o += a;
1551
+ continue;
1552
+ }
1553
+ if (o -= a, o > 0) continue;
1554
+ a = Math.min(a, a + o);
1555
+ let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1556
+ return {
1557
+ type: "del",
1558
+ raw: s,
1559
+ text: c,
1560
+ tokens: this.lexer.inlineTokens(c)
1561
+ };
1562
+ }
1563
+ }
1564
+ }
1565
+ autolink(e) {
1566
+ let t = this.rules.inline.autolink.exec(e);
1567
+ if (t) {
1568
+ let e, n;
1569
+ return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1570
+ type: "link",
1571
+ raw: t[0],
1572
+ text: e,
1573
+ href: n,
1574
+ tokens: [{
1575
+ type: "text",
1576
+ raw: e,
1577
+ text: e
1578
+ }]
1579
+ };
1580
+ }
1581
+ }
1582
+ url(e) {
1583
+ let t;
1584
+ if (t = this.rules.inline.url.exec(e)) {
1585
+ let e, n;
1586
+ if (t[2] === "@") e = t[0], n = "mailto:" + e;
1587
+ else {
1588
+ let r;
1589
+ do
1590
+ r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1591
+ while (r !== t[0]);
1592
+ e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1593
+ }
1594
+ return {
1595
+ type: "link",
1596
+ raw: t[0],
1597
+ text: e,
1598
+ href: n,
1599
+ tokens: [{
1600
+ type: "text",
1601
+ raw: e,
1602
+ text: e
1603
+ }]
1604
+ };
1605
+ }
1606
+ }
1607
+ inlineText(e) {
1608
+ let t = this.rules.inline.text.exec(e);
1609
+ if (t) {
1610
+ let e = this.lexer.state.inRawBlock;
1611
+ return {
1612
+ type: "text",
1613
+ raw: t[0],
1614
+ text: t[0],
1615
+ escaped: e
1616
+ };
1617
+ }
1618
+ }
1619
+ }, q = class e {
1620
+ constructor(e) {
1621
+ s(this, "tokens", void 0), s(this, "options", void 0), s(this, "state", void 0), s(this, "inlineQueue", void 0), s(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || k, this.options.tokenizer = this.options.tokenizer || new jn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1622
+ inLink: !1,
1623
+ inRawBlock: !1,
1624
+ top: !0
1625
+ };
1626
+ let t = {
1627
+ other: N,
1628
+ block: H.normal,
1629
+ inline: Cn.normal
1630
+ };
1631
+ this.options.pedantic ? (t.block = H.pedantic, t.inline = Cn.pedantic) : this.options.gfm && (t.block = H.gfm, this.options.breaks ? t.inline = Cn.breaks : t.inline = Cn.gfm), this.tokenizer.rules = t;
1632
+ }
1633
+ static get rules() {
1634
+ return {
1635
+ block: H,
1636
+ inline: Cn
1637
+ };
1638
+ }
1639
+ static lex(t, n) {
1640
+ return new e(n).lex(t);
1641
+ }
1642
+ static lexInline(t, n) {
1643
+ return new e(n).inlineTokens(t);
1644
+ }
1645
+ lex(e) {
1646
+ e = e.replace(N.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1647
+ for (let e = 0; e < this.inlineQueue.length; e++) {
1648
+ let t = this.inlineQueue[e];
1649
+ this.inlineTokens(t.src, t.tokens);
1650
+ }
1651
+ return this.inlineQueue = [], this.tokens;
1652
+ }
1653
+ blockTokens(e, t = [], n = !1) {
1654
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(N.tabCharGlobal, " ").replace(N.spaceLine, ""));
1655
+ let r = Infinity;
1656
+ for (; e;) {
1657
+ if (e.length < r) r = e.length;
1658
+ else {
1659
+ this.infiniteLoopError(e.charCodeAt(0));
1660
+ break;
1661
+ }
1662
+ let i;
1663
+ if (this.options.extensions?.block?.some((n) => (i = n.call({ lexer: this }, e, t)) ? (e = e.substring(i.raw.length), t.push(i), !0) : !1)) continue;
1664
+ if (i = this.tokenizer.space(e)) {
1665
+ e = e.substring(i.raw.length);
1666
+ let n = t.at(-1);
1667
+ i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1668
+ continue;
1669
+ }
1670
+ if (i = this.tokenizer.code(e)) {
1671
+ e = e.substring(i.raw.length);
1672
+ let n = t.at(-1);
1673
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.at(-1).src = n.text) : t.push(i);
1674
+ continue;
1675
+ }
1676
+ if (i = this.tokenizer.fences(e)) {
1677
+ e = e.substring(i.raw.length), t.push(i);
1678
+ continue;
1679
+ }
1680
+ if (i = this.tokenizer.heading(e)) {
1681
+ e = e.substring(i.raw.length), t.push(i);
1682
+ continue;
1683
+ }
1684
+ if (i = this.tokenizer.hr(e)) {
1685
+ e = e.substring(i.raw.length), t.push(i);
1686
+ continue;
1687
+ }
1688
+ if (i = this.tokenizer.blockquote(e)) {
1689
+ e = e.substring(i.raw.length), t.push(i);
1690
+ continue;
1691
+ }
1692
+ if (i = this.tokenizer.list(e)) {
1693
+ e = e.substring(i.raw.length), t.push(i);
1694
+ continue;
1695
+ }
1696
+ if (i = this.tokenizer.html(e)) {
1697
+ e = e.substring(i.raw.length), t.push(i);
1698
+ continue;
1699
+ }
1700
+ if (i = this.tokenizer.def(e)) {
1701
+ e = e.substring(i.raw.length);
1702
+ let n = t.at(-1);
1703
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.raw, this.inlineQueue.at(-1).src = n.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = {
1704
+ href: i.href,
1705
+ title: i.title
1706
+ }, t.push(i));
1707
+ continue;
1708
+ }
1709
+ if (i = this.tokenizer.table(e)) {
1710
+ e = e.substring(i.raw.length), t.push(i);
1711
+ continue;
1712
+ }
1713
+ if (i = this.tokenizer.lheading(e)) {
1714
+ e = e.substring(i.raw.length), t.push(i);
1715
+ continue;
1716
+ }
1717
+ let a = e;
1718
+ if (this.options.extensions?.startBlock) {
1719
+ let t = Infinity, n = e.slice(1), r;
1720
+ this.options.extensions.startBlock.forEach((e) => {
1721
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1722
+ }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1723
+ }
1724
+ if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1725
+ let r = t.at(-1);
1726
+ n && r?.type === "paragraph" ? (r.raw += (r.raw.endsWith("\n") ? "" : "\n") + i.raw, r.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = r.text) : t.push(i), n = a.length !== e.length, e = e.substring(i.raw.length);
1727
+ continue;
1728
+ }
1729
+ if (i = this.tokenizer.text(e)) {
1730
+ e = e.substring(i.raw.length);
1731
+ let n = t.at(-1);
1732
+ n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(i);
1733
+ continue;
1734
+ }
1735
+ if (e) {
1736
+ this.infiniteLoopError(e.charCodeAt(0));
1737
+ break;
1738
+ }
1739
+ }
1740
+ return this.state.top = !0, t;
1741
+ }
1742
+ inline(e, t = []) {
1743
+ return this.inlineQueue.push({
1744
+ src: e,
1745
+ tokens: t
1746
+ }), t;
1747
+ }
1748
+ inlineTokens(e, t = []) {
1749
+ this.tokenizer.lexer = this;
1750
+ let n = e, r = null;
1751
+ if (this.tokens.links) {
1752
+ let e = Object.keys(this.tokens.links);
1753
+ if (e.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null;) e.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
1754
+ }
1755
+ for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1756
+ let i;
1757
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1758
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1759
+ let a = !1, o = "", s = Infinity;
1760
+ for (; e;) {
1761
+ if (e.length < s) s = e.length;
1762
+ else {
1763
+ this.infiniteLoopError(e.charCodeAt(0));
1764
+ break;
1765
+ }
1766
+ a || (o = ""), a = !1;
1767
+ let r;
1768
+ if (this.options.extensions?.inline?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
1769
+ if (r = this.tokenizer.escape(e)) {
1770
+ e = e.substring(r.raw.length), t.push(r);
1771
+ continue;
1772
+ }
1773
+ if (r = this.tokenizer.tag(e)) {
1774
+ e = e.substring(r.raw.length), t.push(r);
1775
+ continue;
1776
+ }
1777
+ if (r = this.tokenizer.link(e)) {
1778
+ e = e.substring(r.raw.length), t.push(r);
1779
+ continue;
1780
+ }
1781
+ if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1782
+ e = e.substring(r.raw.length);
1783
+ let n = t.at(-1);
1784
+ r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1785
+ continue;
1786
+ }
1787
+ if (r = this.tokenizer.emStrong(e, n, o)) {
1788
+ e = e.substring(r.raw.length), t.push(r);
1789
+ continue;
1790
+ }
1791
+ if (r = this.tokenizer.codespan(e)) {
1792
+ e = e.substring(r.raw.length), t.push(r);
1793
+ continue;
1794
+ }
1795
+ if (r = this.tokenizer.br(e)) {
1796
+ e = e.substring(r.raw.length), t.push(r);
1797
+ continue;
1798
+ }
1799
+ if (r = this.tokenizer.del(e, n, o)) {
1800
+ e = e.substring(r.raw.length), t.push(r);
1801
+ continue;
1802
+ }
1803
+ if (r = this.tokenizer.autolink(e)) {
1804
+ e = e.substring(r.raw.length), t.push(r);
1805
+ continue;
1806
+ }
1807
+ if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1808
+ e = e.substring(r.raw.length), t.push(r);
1809
+ continue;
1810
+ }
1811
+ let i = e;
1812
+ if (this.options.extensions?.startInline) {
1813
+ let t = Infinity, n = e.slice(1), r;
1814
+ this.options.extensions.startInline.forEach((e) => {
1815
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1816
+ }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1817
+ }
1818
+ if (r = this.tokenizer.inlineText(i)) {
1819
+ e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1820
+ let n = t.at(-1);
1821
+ n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1822
+ continue;
1823
+ }
1824
+ if (e) {
1825
+ this.infiniteLoopError(e.charCodeAt(0));
1826
+ break;
1827
+ }
1828
+ }
1829
+ return t;
1830
+ }
1831
+ infiniteLoopError(e) {
1832
+ let t = "Infinite loop on byte: " + e;
1833
+ if (this.options.silent) console.error(t);
1834
+ else throw Error(t);
1835
+ }
1836
+ }, J = class {
1837
+ constructor(e) {
1838
+ s(this, "options", void 0), s(this, "parser", void 0), this.options = e || k;
1839
+ }
1840
+ space(e) {
1841
+ return "";
1842
+ }
1843
+ code({ text: e, lang: t, escaped: n }) {
1844
+ let r = (t || "").match(N.notSpaceStart)?.[0], i = e.replace(N.endingNewline, "") + "\n";
1845
+ return r ? "<pre><code class=\"language-" + U(r) + "\">" + (n ? i : U(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : U(i, !0)) + "</code></pre>\n";
1846
+ }
1847
+ blockquote({ tokens: e }) {
1848
+ return `<blockquote>
1849
+ ${this.parser.parse(e)}</blockquote>
1850
+ `;
1851
+ }
1852
+ html({ text: e }) {
1853
+ return e;
1854
+ }
1855
+ def(e) {
1856
+ return "";
1857
+ }
1858
+ heading({ tokens: e, depth: t }) {
1859
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1860
+ `;
1861
+ }
1862
+ hr(e) {
1863
+ return "<hr>\n";
1864
+ }
1865
+ list(e) {
1866
+ let t = e.ordered, n = e.start, r = "";
1867
+ for (let t = 0; t < e.items.length; t++) {
1868
+ let n = e.items[t];
1869
+ r += this.listitem(n);
1870
+ }
1871
+ let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1872
+ return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1873
+ }
1874
+ listitem(e) {
1875
+ return `<li>${this.parser.parse(e.tokens)}</li>
1876
+ `;
1877
+ }
1878
+ checkbox({ checked: e }) {
1879
+ return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1880
+ }
1881
+ paragraph({ tokens: e }) {
1882
+ return `<p>${this.parser.parseInline(e)}</p>
1883
+ `;
1884
+ }
1885
+ table(e) {
1886
+ let t = "", n = "";
1887
+ for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1888
+ t += this.tablerow({ text: n });
1889
+ let r = "";
1890
+ for (let t = 0; t < e.rows.length; t++) {
1891
+ let i = e.rows[t];
1892
+ n = "";
1893
+ for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1894
+ r += this.tablerow({ text: n });
1895
+ }
1896
+ return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1897
+ }
1898
+ tablerow({ text: e }) {
1899
+ return `<tr>
1900
+ ${e}</tr>
1901
+ `;
1902
+ }
1903
+ tablecell(e) {
1904
+ let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1905
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1906
+ `;
1907
+ }
1908
+ strong({ tokens: e }) {
1909
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
1910
+ }
1911
+ em({ tokens: e }) {
1912
+ return `<em>${this.parser.parseInline(e)}</em>`;
1913
+ }
1914
+ codespan({ text: e }) {
1915
+ return `<code>${U(e, !0)}</code>`;
1916
+ }
1917
+ br(e) {
1918
+ return "<br>";
1919
+ }
1920
+ del({ tokens: e }) {
1921
+ return `<del>${this.parser.parseInline(e)}</del>`;
1922
+ }
1923
+ link({ href: e, title: t, tokens: n }) {
1924
+ let r = this.parser.parseInline(n), i = En(e);
1925
+ if (i === null) return r;
1926
+ e = i;
1927
+ let a = "<a href=\"" + e + "\"";
1928
+ return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
1929
+ }
1930
+ image({ href: e, title: t, text: n, tokens: r }) {
1931
+ r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1932
+ let i = En(e);
1933
+ if (i === null) return U(n);
1934
+ e = i;
1935
+ let a = `<img src="${e}" alt="${U(n)}"`;
1936
+ return t && (a += ` title="${U(t)}"`), a += ">", a;
1937
+ }
1938
+ text(e) {
1939
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1940
+ }
1941
+ }, Mn = class {
1942
+ strong({ text: e }) {
1943
+ return e;
1944
+ }
1945
+ em({ text: e }) {
1946
+ return e;
1947
+ }
1948
+ codespan({ text: e }) {
1949
+ return e;
1950
+ }
1951
+ del({ text: e }) {
1952
+ return e;
1953
+ }
1954
+ html({ text: e }) {
1955
+ return e;
1956
+ }
1957
+ text({ text: e }) {
1958
+ return e;
1959
+ }
1960
+ link({ text: e }) {
1961
+ return "" + e;
1962
+ }
1963
+ image({ text: e }) {
1964
+ return "" + e;
1965
+ }
1966
+ br() {
1967
+ return "";
1968
+ }
1969
+ checkbox({ raw: e }) {
1970
+ return e;
1971
+ }
1972
+ }, Y = class e {
1973
+ constructor(e) {
1974
+ s(this, "options", void 0), s(this, "renderer", void 0), s(this, "textRenderer", void 0), this.options = e || k, this.options.renderer = this.options.renderer || new J(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Mn();
1975
+ }
1976
+ static parse(t, n) {
1977
+ return new e(n).parse(t);
1978
+ }
1979
+ static parseInline(t, n) {
1980
+ return new e(n).parseInline(t);
1981
+ }
1982
+ parse(e) {
1983
+ this.renderer.parser = this;
1984
+ let t = "";
1985
+ for (let n = 0; n < e.length; n++) {
1986
+ let r = e[n];
1987
+ if (this.options.extensions?.renderers?.[r.type]) {
1988
+ let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1989
+ if (n !== !1 || ![
1990
+ "space",
1991
+ "hr",
1992
+ "heading",
1993
+ "code",
1994
+ "table",
1995
+ "blockquote",
1996
+ "list",
1997
+ "html",
1998
+ "def",
1999
+ "paragraph",
2000
+ "text"
2001
+ ].includes(e.type)) {
2002
+ t += n || "";
2003
+ continue;
2004
+ }
2005
+ }
2006
+ let i = r;
2007
+ switch (i.type) {
2008
+ case "space":
2009
+ t += this.renderer.space(i);
2010
+ break;
2011
+ case "hr":
2012
+ t += this.renderer.hr(i);
2013
+ break;
2014
+ case "heading":
2015
+ t += this.renderer.heading(i);
2016
+ break;
2017
+ case "code":
2018
+ t += this.renderer.code(i);
2019
+ break;
2020
+ case "table":
2021
+ t += this.renderer.table(i);
2022
+ break;
2023
+ case "blockquote":
2024
+ t += this.renderer.blockquote(i);
2025
+ break;
2026
+ case "list":
2027
+ t += this.renderer.list(i);
2028
+ break;
2029
+ case "checkbox":
2030
+ t += this.renderer.checkbox(i);
2031
+ break;
2032
+ case "html":
2033
+ t += this.renderer.html(i);
2034
+ break;
2035
+ case "def":
2036
+ t += this.renderer.def(i);
2037
+ break;
2038
+ case "paragraph":
2039
+ t += this.renderer.paragraph(i);
2040
+ break;
2041
+ case "text":
2042
+ t += this.renderer.text(i);
2043
+ break;
2044
+ default: {
2045
+ let e = "Token with \"" + i.type + "\" type was not found.";
2046
+ if (this.options.silent) return console.error(e), "";
2047
+ throw Error(e);
2048
+ }
2049
+ }
2050
+ }
2051
+ return t;
2052
+ }
2053
+ parseInline(e, t = this.renderer) {
2054
+ this.renderer.parser = this;
2055
+ let n = "";
2056
+ for (let r = 0; r < e.length; r++) {
2057
+ let i = e[r];
2058
+ if (this.options.extensions?.renderers?.[i.type]) {
2059
+ let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
2060
+ if (e !== !1 || ![
2061
+ "escape",
2062
+ "html",
2063
+ "link",
2064
+ "image",
2065
+ "strong",
2066
+ "em",
2067
+ "codespan",
2068
+ "br",
2069
+ "del",
2070
+ "text"
2071
+ ].includes(i.type)) {
2072
+ n += e || "";
2073
+ continue;
2074
+ }
2075
+ }
2076
+ let a = i;
2077
+ switch (a.type) {
2078
+ case "escape":
2079
+ n += t.text(a);
2080
+ break;
2081
+ case "html":
2082
+ n += t.html(a);
2083
+ break;
2084
+ case "link":
2085
+ n += t.link(a);
2086
+ break;
2087
+ case "image":
2088
+ n += t.image(a);
2089
+ break;
2090
+ case "checkbox":
2091
+ n += t.checkbox(a);
2092
+ break;
2093
+ case "strong":
2094
+ n += t.strong(a);
2095
+ break;
2096
+ case "em":
2097
+ n += t.em(a);
2098
+ break;
2099
+ case "codespan":
2100
+ n += t.codespan(a);
2101
+ break;
2102
+ case "br":
2103
+ n += t.br(a);
2104
+ break;
2105
+ case "del":
2106
+ n += t.del(a);
2107
+ break;
2108
+ case "text":
2109
+ n += t.text(a);
2110
+ break;
2111
+ default: {
2112
+ let e = "Token with \"" + a.type + "\" type was not found.";
2113
+ if (this.options.silent) return console.error(e), "";
2114
+ throw Error(e);
2115
+ }
2116
+ }
2117
+ }
2118
+ return n;
2119
+ }
2120
+ }, Nn = (Ct = class {
2121
+ constructor(e) {
2122
+ s(this, "options", void 0), s(this, "block", void 0), this.options = e || k;
2123
+ }
2124
+ preprocess(e) {
2125
+ return e;
2126
+ }
2127
+ postprocess(e) {
2128
+ return e;
2129
+ }
2130
+ processAllTokens(e) {
2131
+ return e;
2132
+ }
2133
+ emStrongMask(e) {
2134
+ return e;
2135
+ }
2136
+ provideLexer(e = this.block) {
2137
+ return e ? q.lex : q.lexInline;
2138
+ }
2139
+ provideParser(e = this.block) {
2140
+ return e ? Y.parse : Y.parseInline;
2141
+ }
2142
+ }, s(Ct, "passThroughHooks", /* @__PURE__ */ new Set([
2143
+ "preprocess",
2144
+ "postprocess",
2145
+ "processAllTokens",
2146
+ "emStrongMask"
2147
+ ])), s(Ct, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set([
2148
+ "preprocess",
2149
+ "postprocess",
2150
+ "processAllTokens"
2151
+ ])), Ct), X = new class {
2152
+ constructor(...e) {
2153
+ s(this, "defaults", wt()), s(this, "options", this.setOptions), s(this, "parse", this.parseMarkdown(!0)), s(this, "parseInline", this.parseMarkdown(!1)), s(this, "Parser", Y), s(this, "Renderer", J), s(this, "TextRenderer", Mn), s(this, "Lexer", q), s(this, "Tokenizer", jn), s(this, "Hooks", Nn), this.use(...e);
2154
+ }
2155
+ walkTokens(e, t) {
2156
+ let n = [];
2157
+ for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2158
+ case "table": {
2159
+ let e = r;
2160
+ for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2161
+ for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2162
+ break;
2163
+ }
2164
+ case "list": {
2165
+ let e = r;
2166
+ n = n.concat(this.walkTokens(e.items, t));
2167
+ break;
2168
+ }
2169
+ default: {
2170
+ let e = r;
2171
+ this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2172
+ let i = e[r].flat(Infinity);
2173
+ n = n.concat(this.walkTokens(i, t));
2174
+ }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2175
+ }
2176
+ }
2177
+ return n;
2178
+ }
2179
+ use(...e) {
2180
+ let t = this.defaults.extensions || {
2181
+ renderers: {},
2182
+ childTokens: {}
2183
+ };
2184
+ return e.forEach((e) => {
2185
+ let n = { ...e };
2186
+ if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2187
+ if (!e.name) throw Error("extension name required");
2188
+ if ("renderer" in e) {
2189
+ let n = t.renderers[e.name];
2190
+ n ? t.renderers[e.name] = function(...t) {
2191
+ let r = e.renderer.apply(this, t);
2192
+ return r === !1 && (r = n.apply(this, t)), r;
2193
+ } : t.renderers[e.name] = e.renderer;
2194
+ }
2195
+ if ("tokenizer" in e) {
2196
+ if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2197
+ let n = t[e.level];
2198
+ n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], e.start && (e.level === "block" ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : e.level === "inline" && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start]));
2199
+ }
2200
+ "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2201
+ }), n.extensions = t), e.renderer) {
2202
+ let t = this.defaults.renderer || new J(this.defaults);
2203
+ for (let n in e.renderer) {
2204
+ if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2205
+ if (["options", "parser"].includes(n)) continue;
2206
+ let r = n, i = e.renderer[r], a = t[r];
2207
+ t[r] = (...e) => {
2208
+ let n = i.apply(t, e);
2209
+ return n === !1 && (n = a.apply(t, e)), n || "";
2210
+ };
2211
+ }
2212
+ n.renderer = t;
2213
+ }
2214
+ if (e.tokenizer) {
2215
+ let t = this.defaults.tokenizer || new jn(this.defaults);
2216
+ for (let n in e.tokenizer) {
2217
+ if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2218
+ if ([
2219
+ "options",
2220
+ "rules",
2221
+ "lexer"
2222
+ ].includes(n)) continue;
2223
+ let r = n, i = e.tokenizer[r], a = t[r];
2224
+ t[r] = (...e) => {
2225
+ let n = i.apply(t, e);
2226
+ return n === !1 && (n = a.apply(t, e)), n;
2227
+ };
2228
+ }
2229
+ n.tokenizer = t;
2230
+ }
2231
+ if (e.hooks) {
2232
+ let t = this.defaults.hooks || new Nn();
2233
+ for (let n in e.hooks) {
2234
+ if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2235
+ if (["options", "block"].includes(n)) continue;
2236
+ let r = n, i = e.hooks[r], a = t[r];
2237
+ Nn.passThroughHooks.has(n) ? t[r] = (e) => {
2238
+ if (this.defaults.async && Nn.passThroughHooksRespectAsync.has(n)) return (async () => {
2239
+ let n = await i.call(t, e);
2240
+ return a.call(t, n);
2241
+ })();
2242
+ let r = i.call(t, e);
2243
+ return a.call(t, r);
2244
+ } : t[r] = (...e) => {
2245
+ if (this.defaults.async) return (async () => {
2246
+ let n = await i.apply(t, e);
2247
+ return n === !1 && (n = await a.apply(t, e)), n;
2248
+ })();
2249
+ let n = i.apply(t, e);
2250
+ return n === !1 && (n = a.apply(t, e)), n;
2251
+ };
2252
+ }
2253
+ n.hooks = t;
2254
+ }
2255
+ if (e.walkTokens) {
2256
+ let t = this.defaults.walkTokens, r = e.walkTokens;
2257
+ n.walkTokens = function(e) {
2258
+ let n = [];
2259
+ return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2260
+ };
2261
+ }
2262
+ this.defaults = {
2263
+ ...this.defaults,
2264
+ ...n
2265
+ };
2266
+ }), this;
2267
+ }
2268
+ setOptions(e) {
2269
+ return this.defaults = {
2270
+ ...this.defaults,
2271
+ ...e
2272
+ }, this;
2273
+ }
2274
+ lexer(e, t) {
2275
+ return q.lex(e, t ?? this.defaults);
2276
+ }
2277
+ parser(e, t) {
2278
+ return Y.parse(e, t ?? this.defaults);
2279
+ }
2280
+ parseMarkdown(e) {
2281
+ return (t, n) => {
2282
+ let r = { ...n }, i = {
2283
+ ...this.defaults,
2284
+ ...r
2285
+ }, a = this.onError(!!i.silent, !!i.async);
2286
+ if (this.defaults.async === !0 && r.async === !1) return a(/* @__PURE__ */ Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
2287
+ if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2288
+ if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2289
+ if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2290
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
2291
+ i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2292
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Y.parse : Y.parseInline)(a, i);
2293
+ return i.hooks ? await i.hooks.postprocess(o) : o;
2294
+ })().catch(a);
2295
+ try {
2296
+ i.hooks && (t = i.hooks.preprocess(t));
2297
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2298
+ i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2299
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? Y.parse : Y.parseInline)(n, i);
2300
+ return i.hooks && (r = i.hooks.postprocess(r)), r;
2301
+ } catch (e) {
2302
+ return a(e);
2303
+ }
2304
+ };
2305
+ }
2306
+ onError(e, t) {
2307
+ return (n) => {
2308
+ if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2309
+ let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
2310
+ return t ? Promise.resolve(e) : e;
2311
+ }
2312
+ if (t) return Promise.reject(n);
2313
+ throw n;
2314
+ };
2315
+ }
2316
+ }();
2317
+ function Z(e, t) {
2318
+ return X.parse(e, t);
2319
+ }
2320
+ Z.options = Z.setOptions = function(e) {
2321
+ return X.setOptions(e), Z.defaults = X.defaults, Tt(Z.defaults), Z;
2322
+ }, Z.getDefaults = wt, Z.defaults = k, Z.use = function(...e) {
2323
+ return X.use(...e), Z.defaults = X.defaults, Tt(Z.defaults), Z;
2324
+ }, Z.walkTokens = function(e, t) {
2325
+ return X.walkTokens(e, t);
2326
+ }, Z.parseInline = X.parseInline, Z.Parser = Y, Z.parser = Y.parse, Z.Renderer = J, Z.TextRenderer = Mn, Z.Lexer = q, Z.lexer = q.lex, Z.Tokenizer = jn, Z.Hooks = Nn, Z.parse = Z, Z.options, Z.setOptions, Z.use, Z.walkTokens, Z.parseInline, Y.parse, q.lex;
2327
+ //#endregion
2328
+ //#region src/components/ai-chat/ai-chat.module.scss?inline
2329
+ var Pn = ":host{box-sizing:border-box;flex-direction:column;width:100%;height:100%;display:flex}:host .chat-container{background:var(--luzmo-ai-chat-background,var(--ai-chat-background));border-radius:var(--luzmo-ai-chat-border-radius,var(--ai-chat-border-radius));width:100%;height:100%;min-height:0;padding:var(--luzmo-ai-chat-padding,var(--ai-chat-padding));gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));border:var(--luzmo-ai-chat-border,var(--ai-chat-border));box-shadow:var(--luzmo-ai-chat-box-shadow,var(--ai-chat-box-shadow));box-sizing:border-box;flex-direction:column;flex:1;display:flex;overflow:hidden}:host .chat-messages-container{gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}:host .chat-messages-container luzmo-ai-chat-empty-state{flex:1;min-height:0}:host .chat-messages-container::-webkit-scrollbar{width:var(--luzmo-ai-chat-scrollbar-width,var(--ai-chat-scrollbar-width))}:host .chat-messages-container::-webkit-scrollbar-track{background:var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background));border-radius:var(--luzmo-ai-chat-scrollbar-track-border-radius,var(--ai-chat-scrollbar-track-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb{background:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background));border-radius:var(--luzmo-ai-chat-scrollbar-thumb-border-radius,var(--ai-chat-scrollbar-thumb-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb:hover{background:var(--luzmo-ai-chat-scrollbar-thumb-hover-background,var(--ai-chat-scrollbar-thumb-hover-background))}:host .chat-messages-container{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background)) var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background))}:host luzmo-chat-message{--luzmo-primary:var(--ai-chat-user-message-background);--chat-message-primary-text-color:var(--luzmo-font-color);--chat-message-primary-border-color:transparent}:host luzmo-chat-message.error{color:var(--luzmo-ai-chat-error-message-color,var(--ai-chat-error-message-color))}:host luzmo-chat-message.cancelled{color:var(--luzmo-ai-chat-cancelled-message-color,var(--ai-chat-cancelled-message-color));font-style:italic}:host .user-message-content{gap:var(--luzmo-spacing-3,8px);flex-direction:column;display:flex}:host .user-message-attachments{gap:var(--luzmo-spacing-2,4px);flex-wrap:wrap;display:flex}:host .user-message-attachment{width:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));height:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));object-fit:cover;object-position:center;border-radius:var(--luzmo-border-radius-s,4px);pointer-events:none;display:block}:host .user-message-text{white-space:pre-wrap;overflow-wrap:anywhere}:host .markdown-content{line-height:var(--luzmo-ai-chat-markdown-line-height,var(--ai-chat-markdown-line-height))}:host .markdown-content>:first-child{margin-top:0}:host .markdown-content>:last-child{margin-bottom:0}:host .markdown-content p,:host .markdown-content ul,:host .markdown-content ol,:host .markdown-content blockquote,:host .markdown-content pre,:host .markdown-content table{margin:0 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing))}:host .markdown-content h1,:host .markdown-content h2,:host .markdown-content h3,:host .markdown-content h4,:host .markdown-content h5,:host .markdown-content h6{margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing));font-weight:var(--luzmo-ai-chat-markdown-heading-font-weight,var(--ai-chat-markdown-heading-font-weight))}:host .markdown-content ul,:host .markdown-content ol{padding-inline-start:var(--luzmo-ai-chat-markdown-list-indent,var(--ai-chat-markdown-list-indent))}:host .markdown-content a{color:var(--luzmo-ai-chat-markdown-link-color,var(--ai-chat-markdown-link-color))}:host .markdown-content code{font-family:var(--luzmo-ai-chat-markdown-code-font-family,var(--ai-chat-markdown-code-font-family));font-size:var(--luzmo-ai-chat-markdown-code-font-size,var(--ai-chat-markdown-code-font-size));background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.1em .3em}:host .markdown-content pre{background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.75em 1em;overflow-x:auto}:host .markdown-content pre code{background:0 0;padding:0}:host .markdown-content blockquote{border-inline-start:.1875rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));padding-inline-start:.75rem}:host .markdown-content hr{border:0;border-top:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0}:host .markdown-content table{border-collapse:collapse;width:100%}:host .markdown-content th,:host .markdown-content td{border:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));text-align:start;padding:.375rem .625rem}:host .markdown-content th{background:var(--luzmo-ai-chat-markdown-table-header-background,var(--ai-chat-markdown-table-header-background));font-weight:600}:host .assistant-message-wrapper{gap:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));flex-direction:column;display:flex}:host luzmo-chat-message[position=left]{--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height))}:host .assistant-message-body{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-feedback{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));display:flex}:host .assistant-message-feedback luzmo-action-button{--luzmo-action-button-background-color-default-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-focus-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-down-selected:var(--ai-chat-user-message-background)}:host .assistant-message-feedback luzmo-action-button[value=up]{--luzmo-action-button-content-color-default-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-positive-color)}:host .assistant-message-feedback luzmo-action-button[value=down]{--luzmo-action-button-content-color-default-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-negative-color)}:host .assistant-message-footer{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-footer.assistant-message-footer--has-content{margin-block-start:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));display:flex}:host luzmo-action-button.assistant-message-action{--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background)}:host .assistant-message-actions{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-actions.assistant-message-actions--has-content{display:contents}:host .assistant-message-actions.assistant-message-actions--confirming{flex-direction:column;flex-basis:100%;align-items:flex-start;display:flex}:host .assistant-message-actions .assistant-message-action-confirm-message{font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color));white-space:pre-line}:host .assistant-message-actions .assistant-message-action-confirm-controls{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:flex}:host .assistant-message-actions luzmo-button.assistant-message-action,:host .assistant-message-actions slot::slotted(luzmo-button),:host .assistant-message-actions slot::slotted(button),:host .assistant-message-actions slot::slotted(a),:host .assistant-message-actions slot::slotted(input),:host .assistant-message-actions slot::slotted(select),:host .assistant-message-actions slot::slotted(textarea){font-style:normal}:host .assistant-message-actions slot::slotted(:not(luzmo-button):not(button):not(a):not(input):not(select):not(textarea)){font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color))}:host .assistant-context-menu-trigger{width:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));height:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));border:.0625rem solid var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));border-radius:var(--luzmo-ai-chat-context-menu-trigger-border-radius,var(--ai-chat-context-menu-trigger-border-radius));background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color));cursor:pointer;font-size:var(--ai-chat-context-menu-trigger-icon-size);justify-content:center;align-items:center;padding:0;line-height:1;transition:all .15s;display:inline-flex}:host .assistant-context-menu-trigger:hover{background:var(--luzmo-ai-chat-context-menu-trigger-hover-background,var(--ai-chat-context-menu-trigger-hover-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-hover-border-color,var(--ai-chat-context-menu-trigger-hover-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-hover-color,var(--ai-chat-context-menu-trigger-hover-color))}:host .assistant-context-menu-trigger:disabled{cursor:not-allowed;opacity:.6}:host .assistant-context-menu-trigger:disabled:hover{background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color))}:host .assistant-context-menu-item{width:100%;color:var(--luzmo-font-color);text-align:start;cursor:pointer;font-family:var(--luzmo-ai-chat-context-menu-item-font-family,var(--ai-chat-context-menu-item-font-family));background:0 0;border:0;padding:.5rem .75rem}:host .assistant-context-menu-item:hover{background:var(--luzmo-ai-chat-context-menu-item-hover-background,var(--ai-chat-context-menu-item-hover-background))}:host .assistant-context-menu-item:disabled{opacity:.4;cursor:not-allowed}:host .assistant-context-menu-item:disabled:hover{background:0 0}:host luzmo-ai-interaction-textarea{flex-grow:0;flex-shrink:0}:host .loading-message{color:var(--luzmo-font-color);align-items:center;gap:.5rem;display:flex}:host .loading-message svg{color:var(--luzmo-ai-chat-loading-message-color,var(--ai-chat-loading-message-color));font-size:var(--luzmo-ai-chat-loading-message-icon-font-size,var(--ai-chat-loading-message-icon-font-size));justify-content:center;align-items:center;display:flex}:host .loading-message svg.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){:host .assistant-context-menu-trigger{transition:none}:host .loading-message svg.spin{animation:none}}:host([dir=rtl]) .assistant-message-footer{direction:rtl}:host{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:var(--luzmo-spacing-5);--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-m);--ai-chat-error-message-color:var(--luzmo-danger,#dc3545);--ai-chat-cancelled-message-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed));--ai-chat-scrollbar-width:var(--luzmo-scrollbar-size);--ai-chat-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--ai-chat-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--ai-chat-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--ai-chat-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--ai-chat-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-xs);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-border-color:var(--luzmo-border-color);--ai-chat-context-menu-trigger-border-radius:.375rem;--ai-chat-context-menu-trigger-background:var(--luzmo-background-color,transparent);--ai-chat-context-menu-trigger-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-trigger-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-trigger-hover-border-color:var(--luzmo-border-color-hover,var(--luzmo-border-color));--ai-chat-context-menu-trigger-hover-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-item-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-item-font-family:var(--luzmo-font-family);--ai-chat-markdown-line-height:1.5;--ai-chat-markdown-spacing:var(--luzmo-spacing-3);--ai-chat-markdown-heading-spacing:var(--luzmo-spacing-4);--ai-chat-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--ai-chat-markdown-list-indent:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-markdown-link-color:var(--luzmo-primary);--ai-chat-markdown-code-font-family:var(--luzmo-font-family-mono,ui-monospace, monospace);--ai-chat-markdown-code-font-size:.875em;--ai-chat-markdown-code-background:var(--luzmo-background-color-highlight);--ai-chat-markdown-code-border-radius:var(--luzmo-border-radius-s);--ai-chat-markdown-border-color:var(--luzmo-border-color);--ai-chat-markdown-table-header-background:var(--luzmo-background-color-highlight);--ai-chat-assistant-message-actions-gap:var(--luzmo-spacing-2);--ai-chat-assistant-message-actions-margin-top:var(--luzmo-spacing-3);--ai-chat-assistant-message-actions-color:var(--luzmo-font-color-extra-dimmed);--ai-chat-assistant-message-actions-font-style:italic;--ai-chat-assistant-message-font-family:var(--luzmo-font-family);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-m);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height);--ai-chat-user-message-background:rgba(var(--luzmo-primary-rgb), .08);--ai-chat-user-message-attachment-size:64px}:host([size=s]){--ai-chat-gap:var(--luzmo-spacing-4);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-xs);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-s)}:host([size=l]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-l);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-m);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-xl);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-l);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-xl)}";
2330
+ //#endregion
2331
+ //#region src/components/ai-chat/helpers/agent-config.ts
2332
+ function Fn(e, t) {
2333
+ if (e.agentConfig) {
2334
+ let n = e.agentConfig, r = t ?? Fn({
2335
+ ...e,
2336
+ agentConfig: void 0
2337
+ });
2338
+ return n.context === void 0 && n.type === r.type ? {
2339
+ ...r,
2340
+ ...n,
2341
+ context: r.context
2342
+ } : n.context === void 0 ? {
2343
+ ...n,
2344
+ context: null
2345
+ } : n;
2346
+ }
2347
+ switch (e.agent ?? "item") {
2348
+ case "item":
2349
+ default: return {
2350
+ type: "item",
2351
+ context: {
2352
+ chart: e.chart,
2353
+ task: e.task
2354
+ }
2355
+ };
2356
+ case "dashboard": return {
2357
+ type: "dashboard",
2358
+ context: {
2359
+ dashboard: e.dashboard,
2360
+ currentScreenMode: e.currentScreenMode
2361
+ }
2362
+ };
2363
+ case "custom-item": return {
2364
+ type: "custom-item",
2365
+ context: { customItem: e.customItem }
2366
+ };
2367
+ case "analyst": return { type: "analyst" };
2368
+ }
2369
+ }
2370
+ function In(e) {
2371
+ return {
2372
+ chart: null,
2373
+ dashboard: null,
2374
+ customItem: null,
2375
+ currentScreenMode: void 0,
2376
+ task: void 0,
2377
+ ...e.context
2378
+ };
2379
+ }
2380
+ //#endregion
2381
+ //#region src/components/ai-chat/helpers/assistant-message-feedback.ts
2382
+ function Ln(e, t) {
2383
+ return e === t ? 0 : t;
2384
+ }
2385
+ var Rn = /* @__PURE__ */ new Set(["feedback", "hideFeedback"]);
2386
+ function zn(e, t) {
2387
+ return e === t || [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) => Rn.has(n) || e[n] === t[n] || JSON.stringify(e[n] ?? null) === JSON.stringify(t[n] ?? null));
2388
+ }
2389
+ function Bn(e, t) {
2390
+ return !e || e === t || e.messages === t.messages || e.messages.length !== t.messages.length ? !1 : [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) => n === "messages" || e[n] === t[n]) && e.messages.every((e, n) => zn(e, t.messages[n]));
2391
+ }
2392
+ function Vn({ labelId: e, rating: t, size: n, disabled: r, onRate: i }) {
2393
+ let a = (e) => (t) => {
2394
+ t.preventDefault(), t.stopPropagation(), i(e);
2395
+ };
2396
+ return m`
2397
+ <div
2398
+ class="assistant-message-feedback"
2399
+ role="group"
2400
+ aria-labelledby=${e}
2401
+ >
2402
+ <span
2403
+ id=${e}
2404
+ hidden
2405
+ >
2406
+ ${c("Rate this response", { desc: "Accessible label for the thumbs up and down buttons on an AI chat response" })}
2407
+ </span>
2408
+ <luzmo-action-button
2409
+ value="up"
2410
+ toggles
2411
+ quiet
2412
+ label=${c("Good response", { desc: "Accessible label for the positive feedback button" })}
2413
+ .size=${n}
2414
+ .selected=${t === 1}
2415
+ ?disabled=${r}
2416
+ @change=${a(1)}
2417
+ >
2418
+ <luzmo-icon slot="icon" .icon=${ee} .size=${n}></luzmo-icon>
2419
+ </luzmo-action-button>
2420
+ <luzmo-action-button
2421
+ value="down"
2422
+ toggles
2423
+ quiet
2424
+ label=${c("Bad response", { desc: "Accessible label for the negative feedback button" })}
2425
+ .size=${n}
2426
+ .selected=${t === -1}
2427
+ ?disabled=${r}
2428
+ @change=${a(-1)}
2429
+ >
2430
+ <luzmo-icon slot="icon" .icon=${p} .size=${n}></luzmo-icon>
2431
+ </luzmo-action-button>
2432
+ </div>
2433
+ `;
2434
+ }
2435
+ //#endregion
2436
+ //#region src/components/ai-chat/empty-state/ai-chat-empty-state.module.scss?inline
2437
+ var Hn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(--luzmo-ai-chat-empty-state-padding-block,var(--ai-chat-empty-state-padding-block));padding-inline:var(--luzmo-ai-chat-empty-state-padding-inline,var(--ai-chat-empty-state-padding-inline));flex:1;justify-content:center;align-items:center;display:flex}.empty-state{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-header-actions-gap,var(--ai-chat-empty-state-header-actions-gap));width:100%;max-width:var(--luzmo-ai-chat-empty-state-max-width,var(--ai-chat-empty-state-max-width));text-align:center;flex-direction:column;display:flex}.header{flex-direction:column;align-items:center;width:100%;display:flex}.actions{align-items:center;gap:var(--luzmo-ai-chat-empty-state-actions-gap,var(--ai-chat-empty-state-actions-gap));flex-direction:column;width:100%;display:flex}.title{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-title-font-size,var(--ai-chat-empty-state-title-font-size));font-weight:var(--luzmo-ai-chat-empty-state-title-font-weight,var(--ai-chat-empty-state-title-font-weight));line-height:var(--luzmo-ai-chat-empty-state-title-line-height,var(--ai-chat-empty-state-title-line-height));color:var(--luzmo-ai-chat-empty-state-title-color,var(--ai-chat-empty-state-title-color));text-wrap:balance;margin:0}.subtitle{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-subtitle-font-size,var(--ai-chat-empty-state-subtitle-font-size));font-weight:var(--luzmo-ai-chat-empty-state-subtitle-font-weight,var(--ai-chat-empty-state-subtitle-font-weight));line-height:var(--luzmo-ai-chat-empty-state-subtitle-line-height,var(--ai-chat-empty-state-subtitle-line-height));color:var(--luzmo-ai-chat-empty-state-subtitle-color,var(--ai-chat-empty-state-subtitle-color));margin:0}.suggestions{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-suggestions-gap,var(--ai-chat-empty-state-suggestions-gap));flex-wrap:wrap;width:100%;display:flex}luzmo-action-button{max-width:100%}:host{--ai-chat-empty-state-header-actions-gap:1.5rem;--ai-chat-empty-state-actions-gap:var(--luzmo-spacing-4);--ai-chat-empty-state-suggestions-gap:var(--luzmo-spacing-3);--ai-chat-empty-state-max-width:22.5rem;--ai-chat-empty-state-padding-block:2rem;--ai-chat-empty-state-padding-inline:var(--luzmo-spacing-5);--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-l);--ai-chat-empty-state-title-font-weight:var(--luzmo-font-weight);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color-hard);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-s);--ai-chat-empty-state-subtitle-font-weight:var(--luzmo-font-weight);--ai-chat-empty-state-subtitle-line-height:var(--luzmo-line-height);--ai-chat-empty-state-subtitle-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed))}:host([size=s]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-m)}:host([size=l]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-xl);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-m)}:host([size=xl]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-xxl);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-l)}", Un, Wn = class extends a(i, { validSizes: [
2438
+ "s",
2439
+ "m",
2440
+ "l",
2441
+ "xl"
2442
+ ] }) {
2443
+ constructor(...e) {
2444
+ super(...e), this.title = c("What can I help you with?", { desc: "Title for the AI chat empty state" }), this.subtitle = "", this.suggestions = [], this.disabled = !1;
2445
+ }
2446
+ _handleSuggestionActivate(e) {
2447
+ if (this.disabled) return;
2448
+ let t = e.prompt ?? e.label;
2449
+ this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2450
+ detail: {
2451
+ label: e.label,
2452
+ prompt: t,
2453
+ selectedDatasets: e.selectedDatasets
2454
+ },
2455
+ bubbles: !0,
2456
+ composed: !0
2457
+ }));
2458
+ }
2459
+ render() {
2460
+ let e = this.suggestions.length > 0;
2461
+ return m`
2462
+ <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2463
+ <header class="header">
2464
+ <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2465
+ </header>
2466
+
2467
+ ${e ? m`
2468
+ <div class="actions">
2469
+ ${this.subtitle ? m`<p class="subtitle">${this.subtitle}</p>` : h}
2470
+ <div
2471
+ class="suggestions"
2472
+ role="group"
2473
+ aria-label=${c("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2474
+ >
2475
+ ${this.suggestions.map((e) => m`
2476
+ <luzmo-action-button
2477
+ variant="accent"
2478
+ .size=${this.size}
2479
+ ?disabled=${this.disabled}
2480
+ @click=${() => this._handleSuggestionActivate(e)}
2481
+ >
2482
+ ${e.label}
2483
+ </luzmo-action-button>
2484
+ `)}
2485
+ </div>
2486
+ </div>
2487
+ ` : h}
2488
+ </section>
2489
+ `;
2490
+ }
2491
+ };
2492
+ //#endregion
2493
+ //#region src/components/ai-chat/empty-state/index.ts
2494
+ Un = Wn, Un.styles = te(Hn), Un.tagName = "luzmo-ai-chat-empty-state", o([g({ type: String })], Wn.prototype, "title", void 0), o([g({ type: String })], Wn.prototype, "subtitle", void 0), o([g({ type: Array })], Wn.prototype, "suggestions", void 0), o([g({
2495
+ type: Boolean,
2496
+ reflect: !0
2497
+ })], Wn.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", Wn);
2498
+ //#endregion
2499
+ //#region src/components/ai-chat/helpers/elicitation-template.ts
2500
+ var Gn = "answer", Kn = (e) => e.stopPropagation();
2501
+ function qn(e) {
2502
+ let t = e.content?.[Gn];
2503
+ return typeof t == "string" ? t : void 0;
2504
+ }
2505
+ async function Jn(e) {
2506
+ e.stopPropagation();
2507
+ let t = e.currentTarget;
2508
+ await t.updateComplete, t.submit();
2509
+ }
2510
+ function Yn({ message: e, state: t, size: n, onSubmit: r }) {
2511
+ let i = e.elicitation;
2512
+ if (!i) return h;
2513
+ let a = [{
2514
+ id: Gn,
2515
+ type: "single",
2516
+ title: i.question,
2517
+ required: !0,
2518
+ options: i.options.map((e) => ({
2519
+ value: e,
2520
+ label: e
2521
+ }))
2522
+ }];
2523
+ return ie(`${e.id}:${t}`, m`
2524
+ <luzmo-question-box
2525
+ .size=${n}
2526
+ .questions=${a}
2527
+ .value=${re([i.answer], () => i.answer ? { [Gn]: i.answer } : {})}
2528
+ .labels=${{
2529
+ submit: c("Submit", { desc: "Button that sends the chosen answer to an AI agent question" }),
2530
+ answerTitle: c("Answer", { desc: "Heading above the answer chosen for an AI agent question" }),
2531
+ change: c("Change", { desc: "Button that goes back to pick another answer for an AI agent question" })
2532
+ }}
2533
+ ?readonly=${t === "answered"}
2534
+ ?disabled=${t === "closed"}
2535
+ hide-close
2536
+ hide-skip
2537
+ @luzmo-submit=${r}
2538
+ @input=${Kn}
2539
+ @change=${Jn}
2540
+ @luzmo-cancel=${Kn}
2541
+ ></luzmo-question-box>
2542
+ `);
2543
+ }
2544
+ //#endregion
2545
+ //#region src/components/ai-chat/ai-chat-request.ts
2546
+ function Xn(e, t) {
2547
+ return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2548
+ }
2549
+ function Zn(e) {
2550
+ return e.type === "placeholder" ? null : {
2551
+ ...e,
2552
+ version: e.version || "",
2553
+ title: e.title || e.options?.title,
2554
+ filters: e.filterGroups || [],
2555
+ aichartId: e.aichartId || ""
2556
+ };
2557
+ }
2558
+ function Qn(e, t, n = []) {
2559
+ return [
2560
+ {
2561
+ type: "text",
2562
+ text: e
2563
+ },
2564
+ ...t.map((e) => ({
2565
+ type: "dataset",
2566
+ id: e
2567
+ })),
2568
+ ...n.map((e) => ({
2569
+ type: "image",
2570
+ url: e
2571
+ }))
2572
+ ];
2573
+ }
2574
+ function $n(e) {
2575
+ return {
2576
+ stream: e.stream ?? !0,
2577
+ response_mode: "mixed",
2578
+ ...e.conversationId ? { conversation_id: e.conversationId } : {},
2579
+ ...e.localeId ? { locale_id: e.localeId } : {}
2580
+ };
2581
+ }
2582
+ function er(e, t, n) {
2583
+ return {
2584
+ agent: e,
2585
+ task: t,
2586
+ ...$n(n)
2587
+ };
2588
+ }
2589
+ function tr(e) {
2590
+ let t = Qn(e.prompt, e.datasetIds, e.attachmentUrls), n = e.chart ? Zn(e.chart) : null;
2591
+ return n && t.push({
2592
+ type: "item",
2593
+ value: n
2594
+ }), {
2595
+ ...er("item", e.task ?? "generate", e),
2596
+ input: t
2597
+ };
2598
+ }
2599
+ function nr(e) {
2600
+ let t = Qn(e.prompt, e.datasetIds, e.attachmentUrls);
2601
+ return e.dashboard && t.push({
2602
+ type: "dashboard",
2603
+ value: e.dashboard,
2604
+ ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2605
+ }), {
2606
+ ...er("dashboard", "generate", e),
2607
+ timezone_id: e.timezoneId ?? "UTC",
2608
+ input: t
2609
+ };
2610
+ }
2611
+ function rr(e) {
2612
+ return {
2613
+ ...er("analyst", "generate", e),
2614
+ input: Qn(e.prompt, e.datasetIds, e.attachmentUrls)
2615
+ };
2616
+ }
2617
+ function ir(e) {
2618
+ let t = Qn(e.prompt, [], e.attachmentUrls);
2619
+ return e.customItem && t.push({
2620
+ type: "custom-item",
2621
+ value: e.customItem
2622
+ }), {
2623
+ ...er("custom-item", "generate", e),
2624
+ text_format: "markdown",
2625
+ ...e.internal ? { internal: !0 } : {},
2626
+ input: t
2627
+ };
2628
+ }
2629
+ function ar(e, t) {
2630
+ let n = Qn(t.prompt, t.datasetIds, t.attachmentUrls), r = t.chart ? Zn(t.chart) : null;
2631
+ return r && n.push({
2632
+ type: "item",
2633
+ value: r
2634
+ }), t.dashboard && n.push({
2635
+ type: "dashboard",
2636
+ value: t.dashboard,
2637
+ ...t.currentScreenMode ? { current_screen_mode: t.currentScreenMode } : {}
2638
+ }), {
2639
+ agent_id: e,
2640
+ ...$n(t),
2641
+ input: n
2642
+ };
2643
+ }
2644
+ function or(e, t) {
2645
+ if (t.agentId) return ar(t.agentId, t);
2646
+ switch (e) {
2647
+ case "dashboard": return nr(t);
2648
+ case "analyst": return rr(t);
2649
+ case "custom-item": return ir(t);
2650
+ default: return tr(t);
2651
+ }
2652
+ }
2653
+ function sr(e, n) {
2654
+ let { authKey: r, authToken: i, apiVersion: a = "0.1.0" } = n;
2655
+ return n.attachmentUrls?.length && t(n.attachmentUrls), {
2656
+ key: r,
2657
+ token: i,
2658
+ action: "create",
2659
+ version: a,
2660
+ properties: or(e, n)
2661
+ };
2662
+ }
2663
+ function cr(e, t, n, r = "0.1.0", i = null) {
2664
+ return {
2665
+ key: t,
2666
+ token: n,
2667
+ action: "delete",
2668
+ version: r,
2669
+ properties: {
2670
+ agent: "item",
2671
+ restore_to_message_id: e,
2672
+ ...i ? { conversation_id: i } : {}
2673
+ }
2674
+ };
2675
+ }
2676
+ //#endregion
2677
+ //#region src/components/ai-chat/stream/transport.ts
2678
+ async function lr(e) {
2679
+ let t = await fetch(e.url, {
2680
+ method: "POST",
2681
+ headers: { "Content-Type": "application/json" },
2682
+ mode: "cors",
2683
+ body: JSON.stringify(e.body),
2684
+ signal: e.signal
2685
+ });
2686
+ if (!t.ok) {
2687
+ let e = await t.json().catch(() => null);
2688
+ throw Error(e?.message || `API request failed with status ${t.status}`);
2689
+ }
2690
+ if (!t.body) throw Error("Response body is not readable");
2691
+ return {
2692
+ body: t.body,
2693
+ conversationId: t.headers.get("x-conversation-id")
2694
+ };
2695
+ }
2696
+ function ur(e) {
2697
+ let t = e.trim();
2698
+ if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2699
+ let n = t;
2700
+ return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2701
+ }
2702
+ function dr(e, t) {
2703
+ try {
2704
+ let n = ur(e);
2705
+ n && t(n);
2706
+ } catch {
2707
+ console.error("Failed to parse stream line");
2708
+ }
2709
+ }
2710
+ async function fr(e, t) {
2711
+ let n = e.getReader(), r = new TextDecoder(), i = "";
2712
+ try {
2713
+ for (;;) {
2714
+ let { done: e, value: a } = await n.read();
2715
+ if (e) break;
2716
+ i += r.decode(a, { stream: !0 });
2717
+ let o = i.split(/\r?\n/);
2718
+ i = o.pop() ?? "";
2719
+ for (let e of o) dr(e, t);
2720
+ }
2721
+ i += r.decode();
2722
+ let e = i.trim();
2723
+ e && dr(e, t);
2724
+ } finally {
2725
+ n.releaseLock();
2726
+ }
2727
+ }
2728
+ //#endregion
2729
+ //#region src/components/ai-chat/stream/progress.ts
2730
+ function pr() {
2731
+ return {
2732
+ id: "root",
2733
+ step: "root",
2734
+ status: "pending",
2735
+ children: [{
2736
+ id: "client-init",
2737
+ step: "iqInit",
2738
+ status: "inProgress",
2739
+ description: c("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2740
+ }]
2741
+ };
2742
+ }
2743
+ function mr(e) {
2744
+ let t = e.progress;
2745
+ return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2746
+ }
2747
+ //#endregion
2748
+ //#region src/components/ai-chat/stream/chunk-extractors.ts
2749
+ function hr(e) {
2750
+ if (!e || typeof e != "object") return "";
2751
+ let t = e.assistant_message;
2752
+ if (!t || typeof t != "object") return "";
2753
+ if (typeof t.message == "string") return t.message;
2754
+ if (typeof t.text == "string") return t.text;
2755
+ if (typeof t.summary == "string") return t.summary;
2756
+ let n = t.content;
2757
+ return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2758
+ }
2759
+ function gr(e) {
2760
+ return e.type === "text_delta" && typeof e.delta == "string" ? e.delta : typeof e.text_delta == "string" ? e.text_delta : typeof e.chunk == "string" ? e.chunk : typeof e.message == "string" ? e.message : typeof e.summary == "string" ? e.summary : "";
2761
+ }
2762
+ function _r(e) {
2763
+ return hr(e.result);
2764
+ }
2765
+ function vr(e) {
2766
+ return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2767
+ }
2768
+ function yr(e, t) {
2769
+ let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2770
+ n && t.callbacks.onConversationIdChange(n);
2771
+ }
2772
+ function br(e) {
2773
+ return typeof e.assistant_message_id == "string" && e.assistant_message_id ? e.assistant_message_id : null;
2774
+ }
2775
+ function xr(e) {
2776
+ for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2777
+ let e = t.value;
2778
+ if (e && typeof e == "object") return e;
2779
+ }
2780
+ return null;
2781
+ }
2782
+ function Sr(e) {
2783
+ let t = e.chart ?? e.generatedChart;
2784
+ if (t && typeof t == "object") return t;
2785
+ let n = e.aiMessageAssets ?? e.ai_message_assets;
2786
+ if (Array.isArray(n)) {
2787
+ let e = xr(n);
2788
+ if (e) return e;
2789
+ }
2790
+ let r = e.result;
2791
+ if (r && typeof r == "object") {
2792
+ let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2793
+ if (Array.isArray(t)) return xr(t);
2794
+ }
2795
+ return null;
2796
+ }
2797
+ function Cr(e) {
2798
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2799
+ let e = t.value;
2800
+ if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2801
+ }
2802
+ return null;
2803
+ }
2804
+ function wr(e) {
2805
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2806
+ let e = t.name;
2807
+ if (e && typeof e == "object") return e;
2808
+ }
2809
+ }
2810
+ function Tr(...e) {
2811
+ return e.find(Array.isArray);
2812
+ }
2813
+ function Er(e) {
2814
+ if (e.views && Array.isArray(e.views)) return e;
2815
+ let t = e.aiMessageAssets ?? e.ai_message_assets;
2816
+ if (Array.isArray(t)) return Cr(t);
2817
+ let n = e.result;
2818
+ if (n && typeof n == "object") {
2819
+ let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2820
+ if (Array.isArray(t)) return Cr(t);
2821
+ }
2822
+ return null;
2823
+ }
2824
+ function Dr(e) {
2825
+ let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Tr(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2826
+ return r ? wr(r) : void 0;
2827
+ }
2828
+ function Or(e) {
2829
+ let t = e.result?.assistant_message;
2830
+ for (let n of [e.aiMessageAssets ?? e.ai_message_assets, t?.aiMessageAssets ?? t?.ai_message_assets]) if (Array.isArray(n)) {
2831
+ for (let e of n) if (e && typeof e == "object" && e.type === "custom-item" && e.value && typeof e.value == "object" && !Array.isArray(e.value)) return e.value;
2832
+ }
2833
+ return null;
2834
+ }
2835
+ //#endregion
2836
+ //#region src/components/ai-chat/stream/stream-processor.ts
2837
+ var kr = /* @__PURE__ */ new Set([
2838
+ "conversation-id",
2839
+ "conversation_id",
2840
+ "keepalive",
2841
+ "ping",
2842
+ "finish",
2843
+ "done"
2844
+ ]);
2845
+ function Ar(e, t) {
2846
+ return (br(e) ?? t.state.assistantMessageId) || (typeof e.messageId == "string" ? e.messageId : void 0);
2847
+ }
2848
+ function jr(e, t, n) {
2849
+ let r = Ar(e, t);
2850
+ return {
2851
+ agent: n.agent,
2852
+ conversationId: t.callbacks.getConversationId(),
2853
+ ...r ? { messageId: r } : {},
2854
+ raw: e
2855
+ };
2856
+ }
2857
+ function Q(e, t, n, r, i) {
2858
+ let a = {
2859
+ ...jr(n, e, t),
2860
+ recognized: !0,
2861
+ type: r,
2862
+ data: i
2863
+ };
2864
+ e.callbacks.onStep(a);
2865
+ }
2866
+ function Mr(e, t, n, r, i) {
2867
+ let a = {
2868
+ ...jr(n, e, t),
2869
+ recognized: !1,
2870
+ type: r,
2871
+ data: i
2872
+ };
2873
+ e.callbacks.onStep(a);
2874
+ }
2875
+ function Nr(e, t) {
2876
+ let n = br(e);
2877
+ n && (t.state.assistantMessageId = n, t.aiMessage.apiMessageId !== n && (t.aiMessage.apiMessageId = n, t.callbacks.onMessageUpdate(t.aiMessage)));
2878
+ }
2879
+ function Pr(e) {
2880
+ e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2881
+ }
2882
+ function Fr(e, t) {
2883
+ Pr(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2884
+ }
2885
+ function Ir(e) {
2886
+ if (!e) return null;
2887
+ let t = e.descriptionMetadata?.decision;
2888
+ if (t === "create" || t === "edit" || t === "question") return t;
2889
+ for (let t of e.children ?? []) {
2890
+ let e = Ir(t);
2891
+ if (e) return e;
2892
+ }
2893
+ return null;
2894
+ }
2895
+ function Lr(e, t, n) {
2896
+ if (!mr(e)) return !1;
2897
+ let r = e.progress;
2898
+ if (t.callbacks.onProgress(r), Q(t, n, e, "progress", r), t.state.decision === null) {
2899
+ let i = Ir(r);
2900
+ i && (t.state.decision = i, Q(t, n, e, "decision", { decision: i }));
2901
+ }
2902
+ return !0;
2903
+ }
2904
+ function Rr(e) {
2905
+ return !!e.error || e.type === "error" || typeof e.error_text == "string";
2906
+ }
2907
+ function zr(e) {
2908
+ return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : c("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
2909
+ }
2910
+ function Br(e, t, n) {
2911
+ if (!Rr(e)) return !1;
2912
+ let r = zr(e);
2913
+ return t.aiMessage.message = r, t.aiMessage.isError = !0, delete t.aiMessage.elicitation, t.callbacks.onMessageUpdate(t.aiMessage), ui(e, t, n, e.error ?? r), !0;
2914
+ }
2915
+ function Vr(e) {
2916
+ return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2917
+ }
2918
+ function Hr(e, t, n) {
2919
+ if (e.type !== "interrupt") return !1;
2920
+ let r = Vr(e);
2921
+ return r && (t.state.interruptQuestion = r, Fr(t, r), Q(t, n, e, "interrupt", { question: r })), ui(e, t, n), !0;
2922
+ }
2923
+ function Ur(e) {
2924
+ let t = e.elicitation;
2925
+ if (!t || typeof t != "object") return null;
2926
+ let { question: n, options: r } = t, i = typeof n == "string" ? n.trim() : "", a = Array.isArray(r) ? [...new Set(r.filter((e) => typeof e == "string").map((e) => e.trim()))].filter(Boolean) : [];
2927
+ return i && a.length >= 2 ? {
2928
+ question: i,
2929
+ options: a
2930
+ } : null;
2931
+ }
2932
+ function Wr(e, t, n) {
2933
+ if (e.type !== "elicitation") return !1;
2934
+ let r = Ur(e);
2935
+ return r ? (Pr(t), t.aiMessage.elicitation = r, t.callbacks.onMessageUpdate(t.aiMessage), Q(t, n, e, "elicitation", {
2936
+ question: r.question,
2937
+ options: r.options
2938
+ }), !0) : (Mr(t, n, e, "elicitation", e), !0);
2939
+ }
2940
+ function Gr(e) {
2941
+ return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2942
+ }
2943
+ function Kr(e) {
2944
+ return typeof e.asset_type == "string" ? e.asset_type : "";
2945
+ }
2946
+ function qr(e) {
2947
+ return {
2948
+ assetType: Kr(e),
2949
+ snapshot: {}
2950
+ };
2951
+ }
2952
+ function Jr(e, t) {
2953
+ return {
2954
+ ...e,
2955
+ ...t
2956
+ };
2957
+ }
2958
+ function Yr(e) {
2959
+ let t = e.asset_delta ?? e.delta;
2960
+ return t && typeof t == "object" ? t : null;
2961
+ }
2962
+ function Xr(e, t) {
2963
+ t.state.assets[Gr(e)] = qr(e);
2964
+ }
2965
+ function Zr(e, t) {
2966
+ let n = Gr(e), r = t.state.assets[n] ?? qr(e), i = Yr(e);
2967
+ i && (r.snapshot = Jr(r.snapshot, i)), t.state.assets[n] = r;
2968
+ }
2969
+ function Qr(e, t) {
2970
+ let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2971
+ return n && typeof n == "object" ? Jr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2972
+ }
2973
+ function $r(e, t, n) {
2974
+ let r = Gr(e), i = t.state.assets[r], a = i?.assetType || Kr(e), o = Qr(e, i);
2975
+ delete t.state.assets[r], ri(a, o, e, t, n);
2976
+ }
2977
+ function ei(e, t, n) {
2978
+ switch (e.type) {
2979
+ case "asset_start": return Xr(e, t), !0;
2980
+ case "asset_delta": return Zr(e, t), !0;
2981
+ case "asset_end": return $r(e, t, n), !0;
2982
+ default: return !1;
2983
+ }
2984
+ }
2985
+ function ti(e, t, n, r) {
2986
+ n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, !n.state.assistantMessageId && typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), Q(n, r, t, "chart", e);
2987
+ }
2988
+ function ni(e, t, n, r) {
2989
+ n.state.customItemSnapshot = e, Q(n, r, t, "custom-item", e);
2990
+ }
2991
+ function ri(e, t, n, r, i) {
2992
+ switch (e) {
2993
+ case "dashboard-title": {
2994
+ let e = t.name;
2995
+ e && typeof e == "object" && (r.state.dashboardName = e, Q(r, i, n, "dashboard-title", { name: e }));
2996
+ return;
2997
+ }
2998
+ case "dashboard-layout":
2999
+ Q(r, i, n, "dashboard-layout", t);
3000
+ return;
3001
+ case "dashboard-item":
3002
+ Q(r, i, n, "dashboard-item", {
3003
+ slot: Number(t.slot),
3004
+ chart: t.chart ?? t
3005
+ });
3006
+ return;
3007
+ case "dashboard":
3008
+ r.state.dashboardSnapshot = t;
3009
+ return;
3010
+ default: ii(e, t, n, r, i);
3011
+ }
3012
+ }
3013
+ function ii(e, t, n, r, i) {
3014
+ if (i.chartAssetType && e === i.chartAssetType) {
3015
+ ti(t, n, r, i);
3016
+ return;
3017
+ }
3018
+ if (i.dashboardAssetType && e === i.dashboardAssetType) {
3019
+ r.state.dashboardSnapshot = t;
3020
+ return;
3021
+ }
3022
+ if (i.customItemAssetType && e === i.customItemAssetType) {
3023
+ ni(t, n, r, i);
3024
+ return;
3025
+ }
3026
+ Mr(r, i, n, e || "asset", t);
3027
+ }
3028
+ function ai(e, t, n) {
3029
+ let r = !1;
3030
+ if (n.dashboardAssetType) {
3031
+ let n = Er(e);
3032
+ if (n) {
3033
+ t.state.dashboardSnapshot = n;
3034
+ let i = Dr(e);
3035
+ i && (t.state.dashboardName = i), r = !0;
3036
+ }
3037
+ }
3038
+ if (n.chartAssetType && !t.state.chartSnapshot) {
3039
+ let i = Sr(e);
3040
+ i && (ti(i, e, t, n), r = !0);
3041
+ }
3042
+ if (n.customItemAssetType && !t.state.customItemSnapshot) {
3043
+ let i = Or(e);
3044
+ i && (ni(i, e, t, n), r = !0);
3045
+ }
3046
+ return r;
3047
+ }
3048
+ function oi(e, t, n) {
3049
+ return {
3050
+ ...e,
3051
+ generatedChart: t,
3052
+ conversationId: n.callbacks.getConversationId()
3053
+ };
3054
+ }
3055
+ function si(e, t, n) {
3056
+ for (let r of Object.keys(t.state.assets)) {
3057
+ let i = t.state.assets[r];
3058
+ delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot || n.customItemAssetType && i.assetType === n.customItemAssetType && t.state.customItemSnapshot) && ri(i.assetType, i.snapshot, e, t, n);
3059
+ }
3060
+ }
3061
+ function ci(e, t) {
3062
+ let n = _r(e);
3063
+ !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
3064
+ }
3065
+ function li(e, t, n) {
3066
+ let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Er(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? Sr(e) : null);
3067
+ return {
3068
+ agent: n.agent,
3069
+ conversationId: t.callbacks.getConversationId(),
3070
+ message: t.aiMessage,
3071
+ ...r ? { dashboard: r } : {},
3072
+ ...i ? { chart: oi(e, i, t) } : {},
3073
+ ...t.state.customItemSnapshot ? { customItem: t.state.customItemSnapshot } : {},
3074
+ ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
3075
+ raw: e
3076
+ };
3077
+ }
3078
+ function ui(e, t, n, r) {
3079
+ if (!t.state.completed) {
3080
+ if (t.state.completed = !0, si(e, t, n), Pr(t), r !== void 0) {
3081
+ t.callbacks.onComplete({
3082
+ agent: n.agent,
3083
+ conversationId: t.callbacks.getConversationId(),
3084
+ message: t.aiMessage,
3085
+ error: r,
3086
+ raw: e
3087
+ });
3088
+ return;
3089
+ }
3090
+ ci(e, t), t.callbacks.onComplete(li(e, t, n));
3091
+ }
3092
+ }
3093
+ function di(e) {
3094
+ return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
3095
+ }
3096
+ function fi(e, t, n) {
3097
+ let r = gr(e);
3098
+ return r ? (t.state.accumulatedText += r, Fr(t, r), Q(t, n, e, "text", {
3099
+ delta: r,
3100
+ text: t.state.accumulatedText
3101
+ }), !0) : !1;
3102
+ }
3103
+ function pi(e, t, n, r, i) {
3104
+ if (r || i) return;
3105
+ let a = di(e);
3106
+ a && !kr.has(a) && Mr(t, n, e, a, e);
3107
+ }
3108
+ function mi(e, t, n) {
3109
+ if (yr(e, t), Nr(e, t), Lr(e, t, n) || Br(e, t, n) || Hr(e, t, n) || Wr(e, t, n) || ei(e, t, n)) return;
3110
+ let r = fi(e, t, n), i = ai(e, t, n), a = r || i, o = vr(e);
3111
+ pi(e, t, n, a, o), o && ui(e, t, n);
3112
+ }
3113
+ //#endregion
3114
+ //#region src/components/ai-chat/stream/registry.ts
3115
+ function hi(e) {
3116
+ switch (e) {
3117
+ case "dashboard": return {
3118
+ agent: e,
3119
+ dashboardAssetType: "dashboard"
3120
+ };
3121
+ case "item": return {
3122
+ agent: e,
3123
+ chartAssetType: "item"
3124
+ };
3125
+ case "custom-item": return {
3126
+ agent: e,
3127
+ customItemAssetType: "custom-item"
3128
+ };
3129
+ default: return { agent: e };
3130
+ }
3131
+ }
3132
+ function gi(e) {
3133
+ let t = hi(e);
3134
+ return (e, n) => mi(e, n, t);
3135
+ }
3136
+ function _i() {
3137
+ return {
3138
+ progressCollapsed: !1,
3139
+ accumulatedText: "",
3140
+ decision: null,
3141
+ assets: {},
3142
+ dashboardSnapshot: null,
3143
+ dashboardName: void 0,
3144
+ chartSnapshot: null,
3145
+ customItemSnapshot: null,
3146
+ interruptQuestion: null,
3147
+ completed: !1
3148
+ };
3149
+ }
3150
+ //#endregion
3151
+ //#region src/components/ai-chat/session/ai-chat-session.ts
3152
+ function vi() {
3153
+ return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
3154
+ }
3155
+ var yi = class {
3156
+ constructor(e, t = {}) {
3157
+ this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
3158
+ messages: [],
3159
+ selectedDatasets: [],
3160
+ isGenerating: !1,
3161
+ progress: null,
3162
+ progressCollapsed: !1,
3163
+ conversationId: null,
3164
+ inflightMessage: null
3165
+ }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
3166
+ apiUrl: "https://api.luzmo.com",
3167
+ apiVersion: "0.1.0",
3168
+ stream: !0,
3169
+ ...e
3170
+ }, e.agentConfig && (this._config.agentConfig = Fn(e)), this._hostCallbacks = t, this._state = {
3171
+ ...this._state,
3172
+ messages: e.messages ? [...e.messages] : [],
3173
+ selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
3174
+ conversationId: e.conversationId ?? null,
3175
+ isGenerating: e.isGenerating ?? !1,
3176
+ progress: e.progress ?? null,
3177
+ progressCollapsed: e.progressCollapsed ?? !1
3178
+ };
3179
+ }
3180
+ get state() {
3181
+ return this._state;
3182
+ }
3183
+ get isGenerating() {
3184
+ return this._state.isGenerating;
3185
+ }
3186
+ get agentConfig() {
3187
+ return Fn(this._config);
3188
+ }
3189
+ subscribe(e) {
3190
+ return this._subscribers.add(e), e(this._state), () => {
3191
+ this._subscribers.delete(e);
3192
+ };
3193
+ }
3194
+ setUiBridge(e) {
3195
+ this._uiBridgeCallbacks = e;
3196
+ }
3197
+ updateConfig(e) {
3198
+ let t = this.agentConfig, n = this._config.agentConfig !== void 0;
3199
+ this._config = {
3200
+ ...this._config,
3201
+ ...e
3202
+ }, e.agentConfig && (this._config.agentConfig = Fn(this._config, t));
3203
+ let r = {};
3204
+ if ("conversationId" in e) {
3205
+ let t = e.conversationId ?? null;
3206
+ t !== this._state.conversationId && (r.conversationId = t);
3207
+ }
3208
+ if ("selectedDatasets" in e && e.selectedDatasets) {
3209
+ let t = [...e.selectedDatasets];
3210
+ this._areSelectedDatasetsEqual(t, this._state.selectedDatasets) || (r.selectedDatasets = t);
3211
+ }
3212
+ if ("messages" in e && e.messages) {
3213
+ let t = [...e.messages];
3214
+ this._areChatMessagesEqual(t, this._state.messages) || (r.messages = t);
3215
+ }
3216
+ if ("isGenerating" in e && e.isGenerating !== this._state.isGenerating && (r.isGenerating = e.isGenerating), "progress" in e && (r.progress = e.progress ?? null), "progressCollapsed" in e && e.progressCollapsed !== this._state.progressCollapsed && (r.progressCollapsed = e.progressCollapsed), Object.keys(r).length > 0) this._patchState(r);
3217
+ else if ("agentConfig" in e && (n || this._config.agentConfig !== void 0)) {
3218
+ let e = this.agentConfig;
3219
+ (e.type !== t.type || e.context !== t.context) && this._notifySubscribers();
3220
+ }
3221
+ }
3222
+ setSelectedDatasets(e) {
3223
+ this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
3224
+ }
3225
+ addDataset(e) {
3226
+ this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
3227
+ }
3228
+ removeDataset(e) {
3229
+ let t = this._state.selectedDatasets.filter((t) => t.id !== e);
3230
+ t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
3231
+ }
3232
+ isDatasetRequirementMet(e) {
3233
+ return !this._config.requireDataset || this._state.selectedDatasets.length > 0 || !!e;
3234
+ }
3235
+ getAiPromptUrl() {
3236
+ return Xn(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
3237
+ }
3238
+ buildRequestBody(e, t, n = [], r = this._config.agentId, i = {}) {
3239
+ return sr(this.agentConfig.type, {
3240
+ prompt: e,
3241
+ datasetIds: t,
3242
+ authKey: this._config.authKey,
3243
+ authToken: this._config.authToken,
3244
+ conversationId: this._state.conversationId,
3245
+ agentId: r,
3246
+ chart: this._config.chart ?? null,
3247
+ dashboard: this._config.dashboard ?? null,
3248
+ customItem: this._config.customItem ?? null,
3249
+ currentScreenMode: this._config.currentScreenMode,
3250
+ localeId: this._config.localeId,
3251
+ timezoneId: this._config.timezoneId,
3252
+ task: this._config.task,
3253
+ ...this._config.agentConfig ? In(this.agentConfig) : {},
3254
+ modelPreference: this._config.modelPreference,
3255
+ apiVersion: this._config.apiVersion,
3256
+ stream: this._config.stream,
3257
+ attachmentUrls: n,
3258
+ internal: i.internal
3259
+ });
3260
+ }
3261
+ buildPromptSubmittedDetail(e) {
3262
+ let t = e.attachmentUrls ?? [];
3263
+ return {
3264
+ prompt: e.prompt,
3265
+ selectedDatasets: e.selectedDatasets,
3266
+ datasetIds: e.datasetIds,
3267
+ agent: this.agentConfig.type,
3268
+ request: this.buildRequestBody(e.prompt, e.datasetIds, t, e.agentId, { internal: e.internal }),
3269
+ url: this.getAiPromptUrl(),
3270
+ ...e.signal ? { signal: e.signal } : {},
3271
+ ...e.attachments?.length ? { attachments: e.attachments } : {},
3272
+ ...t.length ? { attachmentUrls: t } : {}
3273
+ };
3274
+ }
3275
+ async _resolveAttachmentUrls(e, i) {
3276
+ if (e.attachmentUrls?.length) return t(e.attachmentUrls), [...e.attachmentUrls];
3277
+ let a = (e.attachments ?? []).map((e) => e.file).filter((e) => !!e);
3278
+ if (a.length === 0) return [];
3279
+ r(a);
3280
+ let o = this._hostCallbacks.uploadAttachments ?? this._uiBridgeCallbacks.uploadAttachments;
3281
+ if (typeof o == "function") return this._normalizeUploadedUrls(await o(a, { signal: i }), a.length);
3282
+ let { authKey: s, authToken: c, apiUrl: l = "https://api.luzmo.com", apiVersion: u = "0.1.0" } = this._config;
3283
+ if (!s || !c) {
3284
+ if (this._hasCallback("onPromptSubmitted")) return [];
3285
+ throw Error("Image attachments require authKey/authToken for built-in upload, or provide uploadAttachments / attachmentUrls.");
3286
+ }
3287
+ return this._normalizeUploadedUrls(await n({
3288
+ files: a,
3289
+ authKey: s,
3290
+ authToken: c,
3291
+ apiUrl: l,
3292
+ apiVersion: u,
3293
+ signal: i
3294
+ }), a.length);
3295
+ }
3296
+ _normalizeUploadedUrls(e, n) {
3297
+ let r = Array.isArray(e) ? e.filter((e) => typeof e == "string" && e.trim().length > 0) : [];
3298
+ if (r.length !== n) throw Error(`Image upload returned ${r.length} URL(s) for ${n} file(s). Return one non-empty signed URL per file, in the same order.`);
3299
+ return t(r), r;
3300
+ }
3301
+ async submit(e) {
3302
+ await this._submit(e);
3303
+ }
3304
+ async _submit(e) {
3305
+ let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
3306
+ if (!this.isDatasetRequirementMet(e.agentId)) return !1;
3307
+ this._abortInflight();
3308
+ let n = new AbortController();
3309
+ this._abortController = n;
3310
+ let r;
3311
+ try {
3312
+ r = await this._resolveAttachmentUrls(e, n.signal);
3313
+ } catch (e) {
3314
+ if (this._abortController === n && (this._abortController = null), n.signal.aborted || e.name === "AbortError") return !1;
3315
+ throw e;
3316
+ }
3317
+ if (n.signal.aborted || this._abortController !== n) return !1;
3318
+ let i = {
3319
+ id: e.aiMessageId ?? vi(),
3320
+ type: "ai",
3321
+ message: ""
3322
+ }, a = [...this._state.messages];
3323
+ if (!e.skipUserMessage) {
3324
+ let t = {
3325
+ id: vi(),
3326
+ type: "user",
3327
+ message: e.prompt,
3328
+ ...r.length ? { attachmentUrls: r } : {}
3329
+ };
3330
+ a = [...a, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
3331
+ }
3332
+ a = [...a, i], this._inflightMessage = i, this._receivedProgress = !1, this._patchState({
3333
+ messages: a,
3334
+ isGenerating: !0,
3335
+ progress: pr(),
3336
+ progressCollapsed: !1,
3337
+ inflightMessage: i
3338
+ });
3339
+ let o = t, s = [...this._state.selectedDatasets];
3340
+ if (this._hasCallback("onPromptSubmitted")) {
3341
+ let t = this.buildPromptSubmittedDetail({
3342
+ prompt: e.prompt,
3343
+ selectedDatasets: s,
3344
+ datasetIds: o,
3345
+ signal: n.signal,
3346
+ attachments: e.attachments,
3347
+ attachmentUrls: r,
3348
+ agentId: e.agentId,
3349
+ internal: e.internal
3350
+ });
3351
+ try {
3352
+ await this._invokeCallback("onPromptSubmitted", t);
3353
+ } catch (e) {
3354
+ e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, i, t.agent), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
3355
+ }
3356
+ return !0;
3357
+ }
3358
+ let c = this.buildRequestBody(e.prompt, t, r, e.agentId, { internal: e.internal }), l = this.agentConfig.type, u = gi(l), d = {
3359
+ aiMessage: i,
3360
+ callbacks: this._createStreamCallbacks(),
3361
+ state: _i()
3362
+ }, f = this._config.fetchStreaming ?? lr, p = !1;
3363
+ try {
3364
+ let { body: e, conversationId: t } = await f({
3365
+ url: this.getAiPromptUrl(),
3366
+ body: c,
3367
+ signal: n.signal
3368
+ });
3369
+ t && this._setConversationId(t), await fr(e, (e) => u(e, d)), p = !0;
3370
+ } catch (e) {
3371
+ e.name !== "AbortError" && (this._handleSubmitError(e, i, l), p = !0);
3372
+ } finally {
3373
+ this._abortController === n && (p ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
3374
+ }
3375
+ return !0;
3376
+ }
3377
+ async answerElicitation(e, t, n = {}) {
3378
+ let r = this._state.messages.at(-1), i = r?.id === e ? r.elicitation : void 0;
3379
+ if (this._state.isGenerating || !i || i.answer || !i.options.includes(t) || !this.isDatasetRequirementMet(n.agentId)) return !1;
3380
+ let a = (t) => {
3381
+ this._patchState({ messages: this._state.messages.map((n) => n.id === e ? {
3382
+ ...n,
3383
+ elicitation: {
3384
+ ...i,
3385
+ answer: t
3386
+ }
3387
+ } : n) });
3388
+ };
3389
+ a(t);
3390
+ let o = !1;
3391
+ try {
3392
+ o = await this._submit({
3393
+ ...n,
3394
+ prompt: t
3395
+ });
3396
+ } finally {
3397
+ o || a(void 0);
3398
+ }
3399
+ return o;
3400
+ }
3401
+ setMessageFeedback(e, t) {
3402
+ if (t !== -1 && t !== 0 && t !== 1 || e === this._inflightMessage?.id || e === this._state.inflightMessage?.id) return !1;
3403
+ let n = this._state.messages.find((t) => t.id === e);
3404
+ return n?.type !== "ai" || (n.feedback ?? 0) === t ? !1 : (this._patchState({ messages: this._state.messages.map((e) => e === n ? {
3405
+ ...e,
3406
+ feedback: t
3407
+ } : e) }), !0);
3408
+ }
3409
+ async restore(e) {
3410
+ let t = this.agentConfig.type;
3411
+ if (t !== "item") return {};
3412
+ let n = cr(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3413
+ if (this._patchState({
3414
+ isGenerating: !0,
3415
+ progress: null,
3416
+ progressCollapsed: !1
3417
+ }), this._hasCallback("onRestoreRequested")) {
3418
+ let t = {
3419
+ apiMessageId: e.restoreToMessageId,
3420
+ messageIndex: e.messageIndex,
3421
+ request: n,
3422
+ url: this.getAiPromptUrl()
3423
+ };
3424
+ try {
3425
+ await this._invokeCallback("onRestoreRequested", t);
3426
+ } finally {
3427
+ this._patchState({ isGenerating: !1 });
3428
+ }
3429
+ return {};
3430
+ }
3431
+ try {
3432
+ let r = await fetch(this.getAiPromptUrl(), {
3433
+ method: "POST",
3434
+ headers: { "Content-Type": "application/json" },
3435
+ mode: "cors",
3436
+ body: JSON.stringify(n)
3437
+ });
3438
+ if (!r.ok) {
3439
+ let e = await r.json().catch(() => null);
3440
+ throw Error(e?.message || `API request failed with status ${r.status}`);
3441
+ }
3442
+ let i = await r.json().catch(() => null), a = i?.generatedChart ?? (i ? Sr(i) : null), o = {
3443
+ ...typeof i?.message == "string" ? { message: i.message } : {},
3444
+ ...a ? { chart: {
3445
+ ...i,
3446
+ generatedChart: a
3447
+ } } : {}
3448
+ }, s = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
3449
+ if (o.message && s[e.messageIndex]?.type === "ai" && (s[e.messageIndex] = {
3450
+ ...s[e.messageIndex],
3451
+ message: o.message
3452
+ }), this._patchState({ messages: [...s] }), o.chart || o.message) {
3453
+ let n = s[e.messageIndex], r = n?.type === "ai" ? n : {
3454
+ id: vi(),
3455
+ type: "ai",
3456
+ message: o.message ?? ""
3457
+ };
3458
+ this._emit("onComplete", {
3459
+ agent: t,
3460
+ conversationId: this._state.conversationId,
3461
+ message: r,
3462
+ ...o.chart ? { chart: o.chart } : {},
3463
+ ...i ? { raw: i } : {}
3464
+ });
3465
+ }
3466
+ return o;
3467
+ } finally {
3468
+ this._patchState({ isGenerating: !1 });
3469
+ }
3470
+ }
3471
+ buildRestoreRequest(e) {
3472
+ return cr(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3473
+ }
3474
+ abort(e = {}) {
3475
+ this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3476
+ isGenerating: !1,
3477
+ progress: null,
3478
+ progressCollapsed: !1
3479
+ }), e.notify && this._emit("onPromptStopped");
3480
+ }
3481
+ _abortInflight() {
3482
+ this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3483
+ }
3484
+ _createStreamCallbacks() {
3485
+ return {
3486
+ onConversationIdChange: (e) => this._setConversationId(e),
3487
+ onProgress: (e) => {
3488
+ this._receivedProgress = !0, this._patchState({ progress: e });
3489
+ },
3490
+ onProgressCollapsed: (e) => {
3491
+ this._patchState({ progressCollapsed: e });
3492
+ },
3493
+ onMessageUpdate: (e) => {
3494
+ this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3495
+ },
3496
+ getConversationId: () => this._state.conversationId,
3497
+ onStep: (e) => {
3498
+ this._emit("onStep", e);
3499
+ },
3500
+ onComplete: (e) => {
3501
+ this._emit("onComplete", e);
3502
+ }
3503
+ };
3504
+ }
3505
+ _setConversationId(e) {
3506
+ this._config = {
3507
+ ...this._config,
3508
+ conversationId: e
3509
+ }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3510
+ }
3511
+ _upsertMessage(e) {
3512
+ let t = this._state.messages.findIndex((t) => t.id === e.id);
3513
+ if (t === -1) {
3514
+ this._patchState({ messages: [...this._state.messages, { ...e }] });
3515
+ return;
3516
+ }
3517
+ let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3518
+ this._patchState({ messages: n });
3519
+ }
3520
+ _finalizeInflightMessage() {
3521
+ this._inflightMessage && (this._state.progress && this._receivedProgress && (this._inflightMessage.progress = structuredClone(this._state.progress), this._upsertMessage(this._inflightMessage)), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({
3522
+ progress: null,
3523
+ progressCollapsed: !1,
3524
+ inflightMessage: null
3525
+ }));
3526
+ }
3527
+ _removeInflightFromMessages() {
3528
+ this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3529
+ }
3530
+ _markInflightCancelled(e) {
3531
+ this._inflightMessage && (this._inflightMessage.message = e ?? c("Response cancelled.", { desc: "Placeholder shown in ai chat where the assistant reply would appear when the user stops an in-flight response" }), this._inflightMessage.isCancelled = !0, this._inflightMessage.hasChart = !1, delete this._inflightMessage.progress, delete this._inflightMessage.elicitation, this._upsertMessage(this._inflightMessage), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({ inflightMessage: null }));
3532
+ }
3533
+ _discardInflightMessage() {
3534
+ let e = !!(this._inflightMessage || this._state.inflightMessage);
3535
+ this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3536
+ }
3537
+ _handleSubmitError(e, t, n) {
3538
+ t.message = c("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" }), t.isError = !0, delete t.progress, delete t.elicitation, this._inflightMessage = t, this._upsertMessage(t), this._patchState({
3539
+ inflightMessage: { ...t },
3540
+ progress: null,
3541
+ progressCollapsed: !1
3542
+ }), this._emit("onComplete", {
3543
+ agent: n,
3544
+ conversationId: this._state.conversationId,
3545
+ message: t,
3546
+ error: e
3547
+ });
3548
+ }
3549
+ _hasCallback(e) {
3550
+ return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3551
+ }
3552
+ _emit(e, ...t) {
3553
+ this._invokeCallback(e, ...t);
3554
+ }
3555
+ async _invokeCallback(e, ...t) {
3556
+ let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3557
+ typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3558
+ }
3559
+ _patchState(e) {
3560
+ this._state = {
3561
+ ...this._state,
3562
+ ...e
3563
+ }, this._emit("onStateChange", this._state), this._notifySubscribers();
3564
+ }
3565
+ _notifySubscribers() {
3566
+ for (let e of this._subscribers) e(this._state);
3567
+ }
3568
+ _areSelectedDatasetsEqual(e, t) {
3569
+ return e.length === t.length && e.every((e, n) => e.id === t[n]?.id);
3570
+ }
3571
+ _areChatMessagesEqual(e, t) {
3572
+ return e.length === t.length && e.every((e, n) => {
3573
+ let r = t[n];
3574
+ return e.id === r?.id && e.apiMessageId === r?.apiMessageId && e.type === r?.type && e.message === r?.message && e.isError === r?.isError && e.isCancelled === r?.isCancelled && e.hasChart === r?.hasChart && e.feedback === r?.feedback && e.hideFeedback === r?.hideFeedback && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null) && JSON.stringify(e.actions ?? null) === JSON.stringify(r?.actions ?? null) && JSON.stringify(e.attachmentUrls ?? null) === JSON.stringify(r?.attachmentUrls ?? null) && JSON.stringify(e.elicitation ?? null) === JSON.stringify(r?.elicitation ?? null);
3575
+ });
3576
+ }
3577
+ };
3578
+ function bi(e, t) {
3579
+ return new yi(e, t);
3580
+ }
3581
+ //#endregion
3582
+ //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3583
+ var xi = class {
3584
+ constructor(e) {
3585
+ this.options = e, this._session = null, this._ownsSession = !1, this._customItemFromProps = !1, this._seededFromProps = !1, this._unsubscribe = null;
3586
+ }
3587
+ get current() {
3588
+ return this._session;
3589
+ }
3590
+ get state() {
3591
+ if (this._session) return this._session.state;
3592
+ let e = this.options.getSeed();
3593
+ return {
3594
+ messages: e.messages,
3595
+ selectedDatasets: e.selectedDatasets,
3596
+ isGenerating: !1,
3597
+ progress: null,
3598
+ progressCollapsed: !1,
3599
+ conversationId: e.conversationId,
3600
+ inflightMessage: null
3601
+ };
3602
+ }
3603
+ get ownsCurrentSession() {
3604
+ return this._ownsSession;
3605
+ }
3606
+ setSession(e) {
3607
+ if (!e) {
3608
+ this._clearSession();
3609
+ return;
3610
+ }
3611
+ this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, this._mergeHostElementConfig(e), this._wire(e);
3612
+ }
3613
+ syncProperties(e) {
3614
+ if (!e.has("chatSession")) {
3615
+ if (this._createSessionIfMissing(), this._session) {
3616
+ let t = this.options.getConfig();
3617
+ if (Object.keys(t).some((t) => e.has(t)) && (this._ownsSession ? this._session.updateConfig(t) : this._mergeHostElementConfig(this._session)), e.has("selectedDatasets") && this._ownsSession) {
3618
+ let e = this.options.getSeed().selectedDatasets, t = this._session.state.selectedDatasets;
3619
+ (e.length !== t.length || e.some((e, n) => e.id !== t[n]?.id)) && this._session.updateConfig({ selectedDatasets: e });
3620
+ }
3621
+ }
3622
+ (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3623
+ }
3624
+ }
3625
+ requireSession() {
3626
+ return this._createSessionIfMissing(), this._ownsSession ? this._session.updateConfig(this.options.getConfig()) : this._session && this._mergeHostElementConfig(this._session), this._session;
3627
+ }
3628
+ _mergeHostElementConfig(e) {
3629
+ let t = this.options.getConfig(), n = {
3630
+ authKey: t.authKey,
3631
+ authToken: t.authToken,
3632
+ apiUrl: t.apiUrl,
3633
+ apiVersion: t.apiVersion,
3634
+ stream: t.stream,
3635
+ localeId: t.localeId,
3636
+ timezoneId: t.timezoneId,
3637
+ modelPreference: t.modelPreference,
3638
+ requireDataset: t.requireDataset,
3639
+ agent: t.agent
3640
+ };
3641
+ t.agentConfig !== void 0 && (n.agentConfig = t.agentConfig), t.task !== void 0 && (n.task = t.task), t.chart != null && (n.chart = t.chart), t.dashboard != null && (n.dashboard = t.dashboard), t.customItem != null && (this._customItemFromProps = !0), this._customItemFromProps && (n.customItem = t.customItem ?? null), t.currentScreenMode != null && (n.currentScreenMode = t.currentScreenMode), t.conversationId != null && (n.conversationId = t.conversationId), e.updateConfig(n);
3642
+ }
3643
+ connect() {
3644
+ this._session && this._wire(this._session);
3645
+ }
3646
+ teardown() {
3647
+ this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3648
+ }
3649
+ _createSessionIfMissing() {
3650
+ if (this._session) return;
3651
+ let e = this.options.getSeed();
3652
+ this._session = bi({
3653
+ ...this.options.getConfig(),
3654
+ messages: e.messages.length > 0 ? [...e.messages] : void 0,
3655
+ selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3656
+ }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3657
+ }
3658
+ _clearSession() {
3659
+ this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3660
+ }
3661
+ _seedFromPropsOnce() {
3662
+ if (!this._ownsSession || this._seededFromProps) return;
3663
+ let e = this.requireSession(), t = this.options.getSeed(), n = {};
3664
+ e.state.messages.length === 0 && t.messages.length > 0 && (n.messages = [...t.messages]), e.state.selectedDatasets.length === 0 && t.selectedDatasets.length > 0 && (n.selectedDatasets = [...t.selectedDatasets]), Object.keys(n).length > 0 && (e.updateConfig(n), this._seededFromProps = !0);
3665
+ }
3666
+ _wire(e) {
3667
+ this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3668
+ this.options.onRenderNeeded();
3669
+ });
3670
+ }
3671
+ _unwire() {
3672
+ this._unsubscribe?.(), this._unsubscribe = null;
3673
+ }
3674
+ }, Si, $ = class t extends a(i, { validSizes: [
3675
+ "s",
3676
+ "m",
3677
+ "l",
3678
+ "xl"
3679
+ ] }) {
3680
+ constructor(...e) {
3681
+ super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.showAssistantMessageFeedback = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.includePublicDatasets = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.hideAgents = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.allowImages = !1, this.allowVoiceInput = !1, this.acceptedFileTypes = [], this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.customItem = null, this.timezoneId = "UTC", this.apiVersion = "0.1.0", this.stream = !0, this.loadingMessage = null, this.cancelledMessage = null, this.initialPrompt = null, this.emptyStateTitle = "", this.emptyStateSubtitle = "", this.emptyStateSuggestions = [], this._textareaValue = "", this._assistantMessageActionsSlotHasContent = !1, this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._focusedFeedbackWrapper = null, this._lastProcessedInitialPrompt = null, this._lastNotifiedState = null, this._session = new xi({
3682
+ getConfig: () => this._buildSessionConfig(),
3683
+ getSeed: () => ({
3684
+ messages: this.messages,
3685
+ selectedDatasets: Array.isArray(this.selectedDatasets) ? this.selectedDatasets : [],
3686
+ conversationId: this.conversationId
3687
+ }),
3688
+ createDomBridge: () => this._createDomBridgeCallbacks(),
3689
+ onRenderNeeded: () => {
3690
+ let e = this._session.state, t = Bn(this._lastNotifiedState, e);
3691
+ this._lastNotifiedState = e, this.requestUpdate(), t || this.updateComplete.then(() => this._scrollToBottom());
3692
+ }
3693
+ }), this._handleAssistantMessageActionsSlotChange = (e) => {
3694
+ let t = e.target.assignedElements({ flatten: !0 }).length > 0;
3695
+ this._setAssistantMessageActionsSlotHasContent(t);
3696
+ }, this._handleAssistantMessageActionConfirmKeydown = (e) => {
3697
+ e.key !== "Escape" || !this._pendingAssistantMessageAction || (e.preventDefault(), e.stopPropagation(), this._cancelAssistantMessageActionConfirm());
3698
+ };
3699
+ }
3700
+ get flagOpendata() {
3701
+ return this.includePublicDatasets;
3702
+ }
3703
+ set flagOpendata(e) {
3704
+ this.includePublicDatasets = e;
3705
+ }
3706
+ get session() {
3707
+ return this._session.current;
3708
+ }
3709
+ _getRenderState() {
3710
+ return this._session.state;
3711
+ }
3712
+ _createDomBridgeCallbacks() {
3713
+ return {
3714
+ onMessageSent: (e, t) => {
3715
+ this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3716
+ detail: {
3717
+ message: e,
3718
+ selectedDatasets: t
3719
+ },
3720
+ bubbles: !0,
3721
+ composed: !0
3722
+ }));
3723
+ },
3724
+ onDatasetsChanged: (e) => {
3725
+ this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3726
+ detail: { selectedDatasets: e },
3727
+ bubbles: !0,
3728
+ composed: !0
3729
+ }));
3730
+ },
3731
+ onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3732
+ onStep: (e) => {
3733
+ this.dispatchEvent(new CustomEvent("luzmo-step", {
3734
+ detail: e,
3735
+ bubbles: !0,
3736
+ composed: !0
3737
+ }));
3738
+ },
3739
+ onComplete: (e) => {
3740
+ this.dispatchEvent(new CustomEvent("luzmo-complete", {
3741
+ detail: e,
3742
+ bubbles: !0,
3743
+ composed: !0
3744
+ }));
3745
+ },
3746
+ onPromptStopped: () => {
3747
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3748
+ bubbles: !0,
3749
+ composed: !0
3750
+ }));
3751
+ },
3752
+ ...typeof this.uploadAttachments == "function" ? { uploadAttachments: (e, t) => this.uploadAttachments(e, t) } : {}
3753
+ };
3754
+ }
3755
+ get _pickedAgentId() {
3756
+ if (!this.hideAgents) return this.shadowRoot?.querySelector("luzmo-ai-interaction-textarea")?.selectedAgent?.id;
3757
+ }
3758
+ get _oneSizeSmaller() {
3759
+ return {
3760
+ s: "xs",
3761
+ m: "s",
3762
+ l: "m",
3763
+ xl: "l"
3764
+ }[this.size] ?? "s";
3765
+ }
3766
+ get _resolvedAcceptedFileTypes() {
3767
+ return this.acceptedFileTypes.length > 0 ? this.acceptedFileTypes : this.allowImages ? [...e] : [];
3768
+ }
3769
+ _buildSessionConfig() {
3770
+ return {
3771
+ agent: this.agent,
3772
+ agentConfig: this.agentConfig,
3773
+ agentId: this.agentId,
3774
+ authKey: this.authKey,
3775
+ authToken: this.authToken,
3776
+ apiUrl: this.apiUrl,
3777
+ apiVersion: this.apiVersion,
3778
+ stream: this.stream,
3779
+ conversationId: this.conversationId,
3780
+ chart: this.chart,
3781
+ dashboard: this.dashboard,
3782
+ customItem: this.customItem,
3783
+ currentScreenMode: this.currentScreenMode,
3784
+ localeId: this.localeId,
3785
+ timezoneId: this.timezoneId,
3786
+ task: this.task,
3787
+ modelPreference: this.modelPreference,
3788
+ requireDataset: this.requireDataset
3789
+ };
3790
+ }
3791
+ _getAgentConfig() {
3792
+ let e = this._session.current?.agentConfig;
3793
+ return this.agentConfig === void 0 && this.chatSession && e ? e : Fn(this._buildSessionConfig(), e);
3794
+ }
3795
+ _emitConversationIdChanged(e) {
3796
+ this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3797
+ detail: { conversationId: e },
3798
+ bubbles: !0,
3799
+ composed: !0
3800
+ }));
3801
+ }
3802
+ async _restoreViaSession(e, t) {
3803
+ await this._session.requireSession().restore({
3804
+ restoreToMessageId: e,
3805
+ messageIndex: t
3806
+ });
3807
+ }
3808
+ async _handleRestoreState(e, t) {
3809
+ if (e.apiMessageId && this._getAgentConfig().type === "item") try {
3810
+ await this._restoreViaSession(e.apiMessageId, t);
3811
+ } catch (e) {
3812
+ console.error("AI restore error:", e);
3813
+ }
3814
+ }
3815
+ _handleDatasetSelected(e) {
3816
+ this._session.requireSession().addDataset(e.detail);
3817
+ }
3818
+ _handleDatasetRemoved(e) {
3819
+ this._session.requireSession().removeDataset(e.detail.id);
3820
+ }
3821
+ _handleAgentSelected() {
3822
+ this._processInitialPrompt();
3823
+ }
3824
+ async _submitViaSession(e, t = {}) {
3825
+ let n = this._session.requireSession();
3826
+ if (!n.isDatasetRequirementMet(t.agentId)) return !1;
3827
+ this._textareaValue = "";
3828
+ try {
3829
+ return await n.submit({
3830
+ prompt: e,
3831
+ ...t
3832
+ }), !0;
3833
+ } catch (e) {
3834
+ return e.name !== "AbortError" && console.error("AI prompt session error:", e), !1;
3835
+ }
3836
+ }
3837
+ async _handlePromptSubmitted(e) {
3838
+ let t = e.detail.prompt;
3839
+ await this._submitViaSession(t, {
3840
+ ...e.detail.attachments?.length ? { attachments: e.detail.attachments } : {},
3841
+ ...e.detail.attachmentUrls?.length ? { attachmentUrls: e.detail.attachmentUrls } : {},
3842
+ ...e.detail.selectedAgent ? { agentId: e.detail.selectedAgent.id } : {}
3843
+ }) || (this._textareaValue = t);
3844
+ }
3845
+ _handlePromptStopped() {
3846
+ let e = this._session.current;
3847
+ if (this._textareaValue = "", e) {
3848
+ e.abort({
3849
+ notify: !0,
3850
+ cancelledMessage: this.cancelledMessage ?? void 0
3851
+ });
3852
+ return;
3853
+ }
3854
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3855
+ bubbles: !0,
3856
+ composed: !0
3857
+ }));
3858
+ }
3859
+ async _handleEmptyStateSuggestionSelected(e) {
3860
+ let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3861
+ n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t, { agentId: this._pickedAgentId });
3862
+ }
3863
+ async _processInitialPrompt() {
3864
+ if (!this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt) return;
3865
+ let e = this._pickedAgentId;
3866
+ this._session.requireSession().isDatasetRequirementMet(e) && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, {
3867
+ skipUserMessage: !0,
3868
+ agentId: e
3869
+ }));
3870
+ }
3871
+ connectedCallback() {
3872
+ super.connectedCallback(), this._session.connect();
3873
+ }
3874
+ disconnectedCallback() {
3875
+ super.disconnectedCallback(), this._session.teardown();
3876
+ }
3877
+ _scrollToBottom() {
3878
+ let e = this.shadowRoot?.querySelector(".chat-messages-container");
3879
+ e && requestAnimationFrame(() => {
3880
+ requestAnimationFrame(() => {
3881
+ e.scrollTop = e.scrollHeight;
3882
+ });
3883
+ });
3884
+ }
3885
+ willUpdate(e) {
3886
+ super.willUpdate?.(e), this._syncPendingAssistantMessageAction(), this._focusedFeedbackWrapper = this.shadowRoot?.activeElement?.closest(".assistant-message-feedback")?.closest(".assistant-message-wrapper") ?? null;
3887
+ }
3888
+ updated(e) {
3889
+ super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), this._restoreFocusFromRemovedFeedback(), e.has("uploadAttachments") && this._session.current?.setUiBridge(this._createDomBridgeCallbacks()), this.updateComplete.then(() => {
3890
+ this._syncAssistantMessageActionsVisibility(), this._focusPendingAssistantMessageActionConfirm();
3891
+ });
3892
+ }
3893
+ _syncSession(e) {
3894
+ if (e.has("chatSession")) {
3895
+ this._session.setSession(this.chatSession);
3896
+ return;
3897
+ }
3898
+ this._session.syncProperties(e);
3899
+ }
3900
+ _handleInitialPromptChange() {
3901
+ this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3902
+ }
3903
+ _renderMarkdown(e) {
3904
+ let t = String(Z.parse(e, { async: !1 }));
3905
+ return St.sanitize(t, {
3906
+ ALLOWED_TAGS: /* @__PURE__ */ "p.br.strong.em.b.i.u.s.code.pre.blockquote.hr.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tr.th.td.a".split("."),
3907
+ ALLOWED_ATTR: [
3908
+ "href",
3909
+ "title",
3910
+ "target",
3911
+ "rel"
3912
+ ],
3913
+ ALLOW_DATA_ATTR: !1,
3914
+ FORBID_TAGS: [
3915
+ "script",
3916
+ "style",
3917
+ "iframe",
3918
+ "object",
3919
+ "embed",
3920
+ "link",
3921
+ "form",
3922
+ "input",
3923
+ "button"
3924
+ ],
3925
+ FORBID_ATTR: [
3926
+ "onerror",
3927
+ "onload",
3928
+ "onclick",
3929
+ "onmouseover",
3930
+ "onfocus",
3931
+ "onblur"
3932
+ ]
3933
+ });
3934
+ }
3935
+ _renderProgress() {
3936
+ let { progress: e, progressCollapsed: t } = this._getRenderState();
3937
+ return e?.children?.length ? m`
3938
+ <luzmo-progress-steps
3939
+ .progress=${e}
3940
+ ?collapsed=${t}
3941
+ .size=${this.size}
3942
+ ></luzmo-progress-steps>
3943
+ ` : h;
3944
+ }
3945
+ _syncAssistantMessageActionsVisibility() {
3946
+ let e = ((this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`) ?? null)?.assignedElements({ flatten: !0 }).length ?? 0) > 0;
3947
+ this._setAssistantMessageActionsSlotHasContent(e);
3948
+ }
3949
+ _setAssistantMessageActionsSlotHasContent(e) {
3950
+ e !== this._assistantMessageActionsSlotHasContent && (this._assistantMessageActionsSlotHasContent = e);
3951
+ }
3952
+ _isLatestAssistantMessage(e, t) {
3953
+ return !!(t && e === t);
3954
+ }
3955
+ _hasBuiltInAssistantMessageActions(e) {
3956
+ return (e.actions?.length ?? 0) > 0;
3957
+ }
3958
+ _assistantMessageActionsFooterHasContent(e, t) {
3959
+ return this._hasBuiltInAssistantMessageActions(e) || t && this._assistantMessageActionsSlotHasContent;
3960
+ }
3961
+ _syncPendingAssistantMessageAction() {
3962
+ let e = this._pendingAssistantMessageAction;
3963
+ if (!e) return;
3964
+ let { messages: t } = this._getRenderState(), n = t.find((t) => t.id === e.messageId), r = n?.actions?.find((t) => t.id === e.actionId);
3965
+ (!n || !r?.confirm) && (this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1);
3966
+ }
3967
+ _getDefaultAssistantMessageActionConfirmMessage() {
3968
+ return c("Are you sure?", { desc: "Default assistant message action confirmation prompt" });
3969
+ }
3970
+ _isAssistantMessageActionConfirming(e) {
3971
+ let t = this._pendingAssistantMessageAction, n = e.id;
3972
+ return !!(t && n && t.messageId === n);
3973
+ }
3974
+ _getPendingAssistantMessageAction(e) {
3975
+ let t = this._pendingAssistantMessageAction, n = e.id;
3976
+ if (!(!t || !n || t.messageId !== n)) return e.actions?.find((e) => e.id === t.actionId);
3977
+ }
3978
+ _handleAssistantMessageAction(e, t) {
3979
+ let n = e.id;
3980
+ n && this.dispatchEvent(new CustomEvent("luzmo-assistant-message-action", {
3981
+ detail: {
3982
+ messageId: n,
3983
+ actionId: t.id,
3984
+ message: e
3985
+ },
3986
+ bubbles: !0,
3987
+ composed: !0
3988
+ }));
3989
+ }
3990
+ _handleAssistantMessageActionClick(e, t) {
3991
+ let n = e.id;
3992
+ if (n) {
3993
+ if (t.confirm) {
3994
+ this._pendingAssistantMessageAction = {
3995
+ messageId: n,
3996
+ actionId: t.id
3997
+ }, this._shouldFocusAssistantMessageActionConfirm = !0;
3998
+ return;
3999
+ }
4000
+ this._handleAssistantMessageAction(e, t);
4001
+ }
4002
+ }
4003
+ _cancelAssistantMessageActionConfirm() {
4004
+ this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1;
4005
+ }
4006
+ _confirmAssistantMessageAction(e, t) {
4007
+ this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._handleAssistantMessageAction(e, t);
4008
+ }
4009
+ _focusPendingAssistantMessageActionConfirm() {
4010
+ !this._shouldFocusAssistantMessageActionConfirm || !this._pendingAssistantMessageAction || (this._shouldFocusAssistantMessageActionConfirm = !1, (this.shadowRoot?.querySelector("luzmo-button.assistant-message-action-confirm-cancel"))?.focus?.());
4011
+ }
4012
+ _restoreFocusFromRemovedFeedback() {
4013
+ let e = this._focusedFeedbackWrapper;
4014
+ this._focusedFeedbackWrapper = null;
4015
+ let t = !this.shadowRoot?.activeElement && (!document.activeElement || document.activeElement === document.body);
4016
+ !e || !t || e.querySelector(".assistant-message-feedback") || e.isConnected && this._focusFirstAssistantMessageAction(e) || this.shadowRoot?.querySelector("luzmo-ai-interaction-textarea")?.shadowRoot?.querySelector("luzmo-prompt-box")?.focus();
4017
+ }
4018
+ _focusFirstAssistantMessageAction(e) {
4019
+ return Array.from(e.querySelector(".assistant-message-actions")?.children ?? []).flatMap((e) => e instanceof HTMLSlotElement ? e.assignedElements({ flatten: !0 }) : [e]).flatMap((e) => [e, ...e.querySelectorAll("*")]).some((e) => {
4020
+ let t = e;
4021
+ return t.tabIndex < 0 || t.disabled || t.matches(":disabled") || t.getAttribute("aria-disabled") === "true" ? !1 : (t.focus({ preventScroll: !0 }), t.matches(":focus-within"));
4022
+ });
4023
+ }
4024
+ _renderBuiltInAssistantMessageAction(e, t) {
4025
+ let n = this.disabled || t.disabled || !e.id, r = t.icon ?? (t.id === "undo" ? l : void 0);
4026
+ return r ? m`
4027
+ <luzmo-action-button
4028
+ class="assistant-message-action"
4029
+ quiet
4030
+ label=${t.label}
4031
+ .size=${this._oneSizeSmaller}
4032
+ ?disabled=${n}
4033
+ @click=${() => this._handleAssistantMessageActionClick(e, t)}
4034
+ >
4035
+ <luzmo-icon slot="icon" .icon=${r} .size=${this._oneSizeSmaller}></luzmo-icon>
4036
+ <luzmo-tooltip
4037
+ self-managed
4038
+ placement="top"
4039
+ size=${this._oneSizeSmaller}
4040
+ >
4041
+ ${t.label}
4042
+ </luzmo-tooltip>
4043
+ </luzmo-action-button>
4044
+ ` : m`
4045
+ <luzmo-button
4046
+ class="assistant-message-action"
4047
+ .size=${this._oneSizeSmaller}
4048
+ variant="neutral"
4049
+ treatment="outline"
4050
+ ?disabled=${n}
4051
+ @click=${() => this._handleAssistantMessageActionClick(e, t)}
4052
+ >
4053
+ ${t.label}
4054
+ </luzmo-button>
4055
+ `;
4056
+ }
4057
+ _renderAssistantMessageActionConfirm(e) {
4058
+ let t = this._getPendingAssistantMessageAction(e);
4059
+ if (!t) return h;
4060
+ let n = t.confirmMessage ?? this._getDefaultAssistantMessageActionConfirmMessage(), r = this.disabled || t.disabled || !e.id;
4061
+ return m`
4062
+ <span class="assistant-message-action-confirm-message" role="status" aria-live="polite">${n}</span>
4063
+ <div class="assistant-message-action-confirm-controls">
4064
+ <luzmo-button
4065
+ class="assistant-message-action-confirm-cancel"
4066
+ .size=${this._oneSizeSmaller}
4067
+ variant="neutral"
4068
+ treatment="outline"
4069
+ ?disabled=${this.disabled}
4070
+ @click=${this._cancelAssistantMessageActionConfirm}
4071
+ >
4072
+ ${c("Cancel", { desc: "Cancel assistant message action confirmation" })}
4073
+ </luzmo-button>
4074
+ <luzmo-button
4075
+ class="assistant-message-action-confirm-confirm"
4076
+ .size=${this._oneSizeSmaller}
4077
+ variant=${t.confirmVariant ?? "negative"}
4078
+ ?disabled=${r}
4079
+ @click=${() => this._confirmAssistantMessageAction(e, t)}
4080
+ >
4081
+ ${t.label}
4082
+ </luzmo-button>
4083
+ </div>
4084
+ `;
4085
+ }
4086
+ _renderAssistantMessageActions(e, n) {
4087
+ let r = e.actions ?? [], i = r.length > 0, a = this._isLatestAssistantMessage(e, n), o = this._isAssistantMessageActionConfirming(e);
4088
+ return !i && !a ? h : m`
4089
+ <div
4090
+ class="assistant-message-actions ${this._assistantMessageActionsFooterHasContent(e, a) ? "assistant-message-actions--has-content" : ""} ${o ? "assistant-message-actions--confirming" : ""}"
4091
+ @keydown=${o ? this._handleAssistantMessageActionConfirmKeydown : h}
4092
+ >
4093
+ ${o ? this._renderAssistantMessageActionConfirm(e) : m`
4094
+ ${r.map((t) => this._renderBuiltInAssistantMessageAction(e, t))}
4095
+ ${a ? m`
4096
+ <slot
4097
+ name=${t.assistantMessageActionsSlot}
4098
+ @slotchange=${this._handleAssistantMessageActionsSlotChange}
4099
+ ></slot>
4100
+ ` : h}
4101
+ `}
4102
+ </div>
4103
+ `;
4104
+ }
4105
+ _renderAssistantMessageFooter(e, t, n) {
4106
+ let r = this._renderAssistantMessageFeedback(e, t), i = this._renderAssistantMessageActions(e, n);
4107
+ return r === h && i === h ? h : m`
4108
+ <div class="assistant-message-footer ${r !== h || this._assistantMessageActionsFooterHasContent(e, this._isLatestAssistantMessage(e, n)) ? "assistant-message-footer--has-content" : ""}">${r} ${i}</div>
4109
+ `;
4110
+ }
4111
+ _handleAssistantMessageFeedback(e, t) {
4112
+ let n = e.id;
4113
+ if (!n || this.disabled) return;
4114
+ let r = this._session.requireSession(), i = Ln(r.state.messages.find((e) => e.id === n)?.feedback, t);
4115
+ if (!r.setMessageFeedback(n, i)) return;
4116
+ let a = r.state.messages.find((e) => e.id === n);
4117
+ this.dispatchEvent(new CustomEvent("luzmo-assistant-message-feedback", {
4118
+ detail: {
4119
+ messageId: n,
4120
+ rating: i,
4121
+ message: a
4122
+ },
4123
+ bubbles: !0,
4124
+ composed: !0
4125
+ }));
4126
+ }
4127
+ _renderAssistantMessageFeedback(e, t) {
4128
+ return !this.showAssistantMessageFeedback || e.hideFeedback ? h : Vn({
4129
+ labelId: `assistant-message-feedback-label-${t}`,
4130
+ rating: e.feedback ?? 0,
4131
+ size: this._oneSizeSmaller,
4132
+ disabled: this.disabled || !e.id,
4133
+ onRate: (t) => this._handleAssistantMessageFeedback(e, t)
4134
+ });
4135
+ }
4136
+ _renderRestoreMenu(e, t, n, r = !1) {
4137
+ if (!(this._getAgentConfig().type === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== n)) return h;
4138
+ let i = `context-menu-trigger-${e.apiMessageId}`;
4139
+ return m`
4140
+ <div class="assistant-context-menu">
4141
+ <button
4142
+ id=${i}
4143
+ class="assistant-context-menu-trigger"
4144
+ type="button"
4145
+ aria-label=${c("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
4146
+ aria-haspopup="menu"
4147
+ ?disabled=${r}
4148
+ >
4149
+ ${d(u)}
4150
+ </button>
4151
+ <luzmo-overlay
4152
+ trigger="${i}@click"
4153
+ placement="bottom-end"
4154
+ >
4155
+ <luzmo-popover>
4156
+ <button
4157
+ class="assistant-context-menu-item"
4158
+ type="button"
4159
+ ?disabled=${r}
4160
+ @click=${() => this._handleRestoreState(e, t)}
4161
+ >
4162
+ ${c("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
4163
+ </button>
4164
+ </luzmo-popover>
4165
+ </luzmo-overlay>
4166
+ </div>
4167
+ `;
4168
+ }
4169
+ _renderMessages() {
4170
+ let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = e.filter((e) => !t || e.id !== t.id), a = [...i].reverse().find((e) => e.type === "ai"), o = a?.id;
4171
+ return i.map((t) => {
4172
+ let s = t.progress?.children?.length ? m`
4173
+ <luzmo-progress-steps
4174
+ .progress=${t.progress}
4175
+ collapsed
4176
+ no-animate
4177
+ .size=${this.size}
4178
+ ></luzmo-progress-steps>
4179
+ ` : h;
4180
+ if (t.type === "user") {
4181
+ let e = t.attachmentUrls ?? [];
4182
+ return m`
4183
+ <luzmo-chat-message
4184
+ avatar-placement="bottom"
4185
+ position="right"
4186
+ variant="primary"
4187
+ .size=${this.size}
4188
+ >
4189
+ <div class="user-message-content">
4190
+ ${e.length > 0 ? m`
4191
+ <div class="user-message-attachments">
4192
+ ${e.map((e) => m`
4193
+ <img
4194
+ class="user-message-attachment"
4195
+ src=${e}
4196
+ alt=${c("Attached image", { desc: "Accessible label for an image attached to a user chat message" })}
4197
+ width="64"
4198
+ height="64"
4199
+ />
4200
+ `)}
4201
+ </div>
4202
+ ` : h}
4203
+ <div class="user-message-text">${t.message}</div>
4204
+ </div>
4205
+ </luzmo-chat-message>
4206
+ `;
4207
+ }
4208
+ let l = e.indexOf(t), u = t.isError ? "error" : t.isCancelled ? "cancelled" : "", d = !!t.elicitation && (!t.message.trim() || t.message.trim() === t.elicitation?.question), f = t.isCancelled ? t.message : d ? h : m`<div class="markdown-content">${_(this._renderMarkdown(t.message))}</div>`;
4209
+ return m`
4210
+ ${s}
4211
+ <div class="assistant-message-wrapper">
4212
+ <div class="assistant-message-body">
4213
+ <luzmo-chat-message
4214
+ class=${u}
4215
+ role=${t.isError ? "alert" : h}
4216
+ avatar-placement="bottom"
4217
+ position="left"
4218
+ quiet
4219
+ .size=${this.size}
4220
+ >
4221
+ ${f}
4222
+ ${Yn({
4223
+ message: t,
4224
+ size: this.size,
4225
+ state: t.elicitation?.answer ? "answered" : t.id && t === i.at(-1) && !n && !this.disabled ? "open" : "closed",
4226
+ onSubmit: (e) => this._handleElicitationSubmit(t, e)
4227
+ })}
4228
+ ${this._renderAssistantMessageFooter(t, l, a)}
4229
+ </luzmo-chat-message>
4230
+
4231
+ ${this._renderRestoreMenu(t, l, o, r)}
4232
+ </div>
4233
+ </div>
4234
+ `;
4235
+ });
4236
+ }
4237
+ async _handleElicitationSubmit(e, t) {
4238
+ t.stopPropagation();
4239
+ let n = t.currentTarget, r = n.parentElement, i = qn(t.detail), a = !1;
4240
+ if (e.id && i) try {
4241
+ let t = this._session.requireSession().answerElicitation(e.id, i, { agentId: this._pickedAgentId });
4242
+ await this.updateComplete;
4243
+ let n = r?.querySelector("luzmo-question-box[readonly]");
4244
+ await n?.updateComplete, n?.focus(), a = await t;
4245
+ } catch (e) {
4246
+ e.name !== "AbortError" && console.error("AI prompt session error:", e);
4247
+ }
4248
+ a || (n.reset(), await n.updateComplete, n.focus());
4249
+ }
4250
+ _renderStreamingResponse() {
4251
+ let { inflightMessage: e } = this._getRenderState();
4252
+ return e?.message ? m`
4253
+ <luzmo-chat-message
4254
+ avatar-placement="bottom"
4255
+ position="left"
4256
+ quiet
4257
+ .size=${this.size}
4258
+ >
4259
+ <div class="markdown-content">${_(this._renderMarkdown(e.message))}</div>
4260
+ </luzmo-chat-message>
4261
+ ` : h;
4262
+ }
4263
+ _renderLoadingMessage() {
4264
+ let { isGenerating: e, progress: t, inflightMessage: n } = this._getRenderState();
4265
+ if (!e || t?.children?.length || n?.message) return h;
4266
+ let r = this._getAgentConfig(), i = In(r), a = r.type === "dashboard" ? !i.dashboard : i.chart?.type === "placeholder", o = r.type === "dashboard" ? a ? c("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : c("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : a ? c("Creating item...", { desc: "Label for ai chat creating item message" }) : c("Updating item...", { desc: "Label for ai chat updating item message" });
4267
+ return m`
4268
+ <luzmo-chat-message
4269
+ avatar-placement="bottom"
4270
+ position="left"
4271
+ quiet
4272
+ .size=${this.size}
4273
+ >
4274
+ <div class="loading-message" role="status" aria-live="polite">
4275
+ <span class="icon-lg">${d(f, { className: "spin" })}</span>
4276
+ <span class="loading-message-text">${this.loadingMessage || o}</span>
4277
+ </div>
4278
+ </luzmo-chat-message>
4279
+ `;
4280
+ }
4281
+ _renderEmptyState() {
4282
+ if (this._getRenderState().messages.length > 0) return h;
4283
+ let e = c("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
4284
+ return m`
4285
+ <luzmo-ai-chat-empty-state
4286
+ .title=${this.emptyStateTitle || e}
4287
+ .subtitle=${t ? this.emptyStateSubtitle : ""}
4288
+ .suggestions=${this.emptyStateSuggestions}
4289
+ .size=${this.size}
4290
+ ?disabled=${this.disabled || this._getRenderState().isGenerating}
4291
+ @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
4292
+ ></luzmo-ai-chat-empty-state>
4293
+ `;
4294
+ }
4295
+ render() {
4296
+ let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
4297
+ return m`
4298
+ <div class="chat-container" role="region" aria-label=${c("AI Chat", { desc: "Accessible label for AI chat region" })}>
4299
+ <div class="chat-messages-container" role="log" aria-live="polite">
4300
+ ${this._renderEmptyState()}
4301
+ ${this._renderMessages()}
4302
+ ${this._renderProgress()}
4303
+ ${this._renderStreamingResponse()}
4304
+ ${this._renderLoadingMessage()}
4305
+ </div>
4306
+
4307
+ <luzmo-ai-interaction-textarea
4308
+ role="group"
4309
+ aria-label=${c("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
4310
+ .size=${this.size}
4311
+ .value=${this._textareaValue}
4312
+ .selectedDatasets=${e}
4313
+ .placeholder=${this.placeholder}
4314
+ ?disabled=${this.disabled}
4315
+ ?is-generating=${t}
4316
+ ?stoppable=${this.stoppable}
4317
+ ?hide-dataset-button=${this.hideDatasetButton}
4318
+ ?hide-dataset-icons=${this.hideDatasetIcons}
4319
+ ?disable-dataset-modification=${this.disableDatasetModification}
4320
+ ?hide-selected-datasets=${this.hideSelectedDatasets}
4321
+ ?hide-agents=${this.hideAgents}
4322
+ ?disable-column-mentions=${this.disableColumnMentions}
4323
+ ?require-dataset=${this.requireDataset}
4324
+ ?allow-images=${this.allowImages}
4325
+ ?allow-voice-input=${this.allowVoiceInput}
4326
+ .acceptedFileTypes=${this._resolvedAcceptedFileTypes}
4327
+ .uploadAttachments=${this.uploadAttachments}
4328
+ auth-key=${this.authKey}
4329
+ auth-token=${this.authToken}
4330
+ api-url=${this.apiUrl}
4331
+ api-version=${this.apiVersion}
4332
+ app-server=${this.appServer}
4333
+ ?include-public-datasets=${this.includePublicDatasets}
4334
+ @prompt-submitted=${this._handlePromptSubmitted}
4335
+ @prompt-stopped=${this._handlePromptStopped}
4336
+ @dataset-selected=${this._handleDatasetSelected}
4337
+ @dataset-removed=${this._handleDatasetRemoved}
4338
+ @luzmo-agent-selected=${this._handleAgentSelected}
4339
+ ></luzmo-ai-interaction-textarea>
4340
+ </div>
4341
+ `;
4342
+ }
4343
+ };
4344
+ Si = $, Si.styles = te(Pn), Si.tagName = "luzmo-ai-chat", Si.assistantMessageActionsSlot = "assistant-message-actions", o([g({ type: Array })], $.prototype, "messages", void 0), o([g({
4345
+ type: Array,
4346
+ attribute: "selected-datasets"
4347
+ })], $.prototype, "selectedDatasets", void 0), o([g({ type: String })], $.prototype, "placeholder", void 0), o([g({
4348
+ type: Boolean,
4349
+ reflect: !0
4350
+ })], $.prototype, "disabled", void 0), o([g({
4351
+ type: Boolean,
4352
+ reflect: !0
4353
+ })], $.prototype, "stoppable", void 0), o([g({
4354
+ type: Boolean,
4355
+ attribute: "show-assistant-context-menu"
4356
+ })], $.prototype, "showAssistantContextMenu", void 0), o([g({
4357
+ type: Boolean,
4358
+ reflect: !0,
4359
+ attribute: "show-assistant-message-feedback"
4360
+ })], $.prototype, "showAssistantMessageFeedback", void 0), o([g({
4361
+ type: String,
4362
+ attribute: "auth-key"
4363
+ })], $.prototype, "authKey", void 0), o([g({
4364
+ type: String,
4365
+ attribute: "auth-token"
4366
+ })], $.prototype, "authToken", void 0), o([g({
4367
+ type: String,
4368
+ attribute: "api-url"
4369
+ })], $.prototype, "apiUrl", void 0), o([g({
4370
+ type: String,
4371
+ attribute: "app-server"
4372
+ })], $.prototype, "appServer", void 0), o([g({
4373
+ type: Boolean,
4374
+ reflect: !0,
4375
+ attribute: "include-public-datasets"
4376
+ })], $.prototype, "includePublicDatasets", void 0), o([g({
4377
+ type: Boolean,
4378
+ attribute: "flag-opendata"
4379
+ })], $.prototype, "flagOpendata", null), o([g({
4380
+ type: Boolean,
4381
+ attribute: "hide-dataset-button"
4382
+ })], $.prototype, "hideDatasetButton", void 0), o([g({
4383
+ type: Boolean,
4384
+ attribute: "hide-dataset-icons"
4385
+ })], $.prototype, "hideDatasetIcons", void 0), o([g({
4386
+ type: Boolean,
4387
+ attribute: "disable-dataset-modification"
4388
+ })], $.prototype, "disableDatasetModification", void 0), o([g({
4389
+ type: Boolean,
4390
+ attribute: "hide-selected-datasets"
4391
+ })], $.prototype, "hideSelectedDatasets", void 0), o([g({
4392
+ type: Boolean,
4393
+ reflect: !0,
4394
+ attribute: "hide-agents"
4395
+ })], $.prototype, "hideAgents", void 0), o([g({
4396
+ type: Boolean,
4397
+ attribute: "disable-column-mentions"
4398
+ })], $.prototype, "disableColumnMentions", void 0), o([g({
4399
+ type: Boolean,
4400
+ attribute: "require-dataset"
4401
+ })], $.prototype, "requireDataset", void 0), o([g({
4402
+ type: Boolean,
4403
+ reflect: !0,
4404
+ attribute: "allow-images"
4405
+ })], $.prototype, "allowImages", void 0), o([g({
4406
+ type: Boolean,
4407
+ reflect: !0,
4408
+ attribute: "allow-voice-input"
4409
+ })], $.prototype, "allowVoiceInput", void 0), o([g({
4410
+ type: Array,
4411
+ attribute: "accepted-file-types"
4412
+ })], $.prototype, "acceptedFileTypes", void 0), o([g({ attribute: !1 })], $.prototype, "uploadAttachments", void 0), o([g({ type: String })], $.prototype, "agent", void 0), o([g({ attribute: !1 })], $.prototype, "agentConfig", void 0), o([g({
4413
+ type: String,
4414
+ attribute: "agent-id"
4415
+ })], $.prototype, "agentId", void 0), o([g({ type: String })], $.prototype, "task", void 0), o([g({
4416
+ type: String,
4417
+ attribute: "model-preference"
4418
+ })], $.prototype, "modelPreference", void 0), o([g({ attribute: !1 })], $.prototype, "chatSession", void 0), o([g({
4419
+ type: String,
4420
+ attribute: "conversation-id"
4421
+ })], $.prototype, "conversationId", void 0), o([g({
4422
+ type: Object,
4423
+ attribute: "chart"
4424
+ })], $.prototype, "chart", void 0), o([g({ type: Object })], $.prototype, "dashboard", void 0), o([g({ attribute: !1 })], $.prototype, "customItem", void 0), o([g({
4425
+ type: String,
4426
+ attribute: "current-screen-mode"
4427
+ })], $.prototype, "currentScreenMode", void 0), o([g({
4428
+ type: String,
4429
+ attribute: "locale-id"
4430
+ })], $.prototype, "localeId", void 0), o([g({
4431
+ type: String,
4432
+ attribute: "timezone-id"
4433
+ })], $.prototype, "timezoneId", void 0), o([g({
4434
+ type: String,
4435
+ attribute: "api-version"
4436
+ })], $.prototype, "apiVersion", void 0), o([g({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), o([g({
4437
+ type: String,
4438
+ attribute: "loading-message"
4439
+ })], $.prototype, "loadingMessage", void 0), o([g({
4440
+ type: String,
4441
+ attribute: "cancelled-message"
4442
+ })], $.prototype, "cancelledMessage", void 0), o([g({
4443
+ type: String,
4444
+ attribute: "initial-prompt"
4445
+ })], $.prototype, "initialPrompt", void 0), o([g({
4446
+ type: String,
4447
+ attribute: "empty-state-title"
4448
+ })], $.prototype, "emptyStateTitle", void 0), o([g({
4449
+ type: String,
4450
+ attribute: "empty-state-subtitle"
4451
+ })], $.prototype, "emptyStateSubtitle", void 0), o([g({
4452
+ type: Array,
4453
+ attribute: !1
4454
+ })], $.prototype, "emptyStateSuggestions", void 0), o([ne()], $.prototype, "_textareaValue", void 0), o([ne()], $.prototype, "_assistantMessageActionsSlotHasContent", void 0), o([ne()], $.prototype, "_pendingAssistantMessageAction", void 0);
4455
+ //#endregion
4456
+ //#region src/components/ai-chat/ai-chat-events.ts
4457
+ function Ci(e) {
4458
+ return e.recognized === !0;
4459
+ }
4460
+ //#endregion
4461
+ //#region src/components/ai-chat/index.ts
4462
+ customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
4463
+ //#endregion
4464
+ export { tr as C, Wn as D, Xn as E, nr as S, Zn as T, cr as _, bi as a, rr as b, hi as c, Er as d, pr as f, fr as g, ur as h, yi as i, mi as l, lr as m, $ as n, _i as o, mr as p, xi as r, gi as s, Ci as t, Sr as u, or as v, ar as w, ir as x, sr as y };