@luzmo/analytics-components-kit 1.0.4 → 1.0.5-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (595) hide show
  1. package/components/ad-hoc-slot-content-BxpvfmjT.js +29 -0
  2. package/components/ad-hoc-slot-content-DJUmB7pS.cjs +20 -0
  3. package/components/ai-chat/ai-chat-events.d.ts +123 -0
  4. package/components/ai-chat/ai-chat-request.d.ts +11 -0
  5. package/components/ai-chat/ai-chat.d.ts +302 -0
  6. package/components/ai-chat/ai-prompt-types.d.ts +94 -0
  7. package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +46 -0
  8. package/components/ai-chat/empty-state/index.d.ts +8 -0
  9. package/components/ai-chat/empty-state/types.d.ts +14 -0
  10. package/components/ai-chat/index.cjs +20 -0
  11. package/components/ai-chat/index.d.ts +20 -0
  12. package/components/ai-chat/index.js +28 -0
  13. package/components/ai-chat/session/ai-chat-session-controller.d.ts +51 -0
  14. package/components/ai-chat/session/ai-chat-session-types.d.ts +88 -0
  15. package/components/ai-chat/session/ai-chat-session.d.ts +91 -0
  16. package/components/ai-chat/session/index.d.ts +2 -0
  17. package/components/ai-chat/stream/chunk-extractors.d.ts +27 -0
  18. package/components/ai-chat/stream/index.d.ts +52 -0
  19. package/components/ai-chat/stream/progress.d.ts +3 -0
  20. package/components/ai-chat/stream/registry.d.ts +6 -0
  21. package/components/ai-chat/stream/stream-processor.d.ts +2 -0
  22. package/components/ai-chat/stream/transport.d.ts +26 -0
  23. package/components/ai-chat/stream/types.d.ts +55 -0
  24. package/components/ai-chat-BBc330Jm.js +3832 -0
  25. package/components/ai-chat-DLDSaC7W.cjs +300 -0
  26. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +135 -0
  27. package/components/ai-interaction-textarea/index.cjs +20 -0
  28. package/components/ai-interaction-textarea/index.d.ts +8 -0
  29. package/components/ai-interaction-textarea/index.js +28 -0
  30. package/components/ai-interaction-textarea/types.d.ts +5 -0
  31. package/components/ai-interaction-textarea-BCH5_GBO.cjs +68 -0
  32. package/components/ai-interaction-textarea-DzHetSBZ.js +299 -0
  33. package/components/{area-chart-positioning.config-CQW5h7Eg.js → area-chart-positioning.config-CjeYLy6C.js} +1 -1
  34. package/components/{area-chart-positioning.config-CE8lOCfT.cjs → area-chart-positioning.config-DVrykBho.cjs} +1 -1
  35. package/components/{bar-chart-positioning.config-DFI1wzOQ.cjs → bar-chart-positioning.config-DpF15KcV.cjs} +1 -1
  36. package/components/{bar-chart-positioning.config-DaH_x_VU.js → bar-chart-positioning.config-e-SAdpBe.js} +1 -1
  37. package/components/base-DSXeP3BL.cjs +20 -0
  38. package/components/{base-p2I4mVSW.js → base-a89RuUMb.js} +2 -1
  39. package/components/{box-plot-positioning.config-K2tQGMig.js → box-plot-positioning.config-Bq2INEtG.js} +1 -1
  40. package/components/{box-plot-positioning.config-FOyav5Zq.cjs → box-plot-positioning.config-DbwtHJ4q.cjs} +1 -1
  41. package/components/{bubble-chart-positioning.config-B6DXfqa4.cjs → bubble-chart-positioning.config--EBfDgdN.cjs} +1 -1
  42. package/components/{bubble-chart-positioning.config-D2fwO2JM.js → bubble-chart-positioning.config-DFnW4mJ9.js} +1 -1
  43. package/components/{bullet-chart-positioning.config-DZqzqZSQ.cjs → bullet-chart-positioning.config-CZ46z07k.cjs} +1 -1
  44. package/components/{bullet-chart-positioning.config-DOAG2wFN.js → bullet-chart-positioning.config-DS2OmjBY.js} +1 -1
  45. package/components/{choropleth-map-positioning.config-C3jO3j8R.cjs → choropleth-map-positioning.config-Clm5IUT6.cjs} +1 -1
  46. package/components/{choropleth-map-positioning.config-Jw6fAFM1.js → choropleth-map-positioning.config-DgANsGq1.js} +1 -1
  47. package/components/{circle-pack-chart-positioning.config-Ckb-1sUG.js → circle-pack-chart-positioning.config-2H1CrfH_.js} +1 -1
  48. package/components/{circle-pack-chart-positioning.config-DJT6ivEy.cjs → circle-pack-chart-positioning.config-qF0qGcEO.cjs} +1 -1
  49. package/components/{circular-gauge-positioning.config-B8gL5Br9.cjs → circular-gauge-positioning.config-CMttD_BW.cjs} +1 -1
  50. package/components/{circular-gauge-positioning.config-BGlDGhYZ.js → circular-gauge-positioning.config-CusKP9Tq.js} +1 -1
  51. package/components/{column-chart-positioning.config-LzBETWIy.cjs → column-chart-positioning.config-ColoutIT.cjs} +1 -1
  52. package/components/{column-chart-positioning.config-BJGWvFLD.js → column-chart-positioning.config-rRwPVTbj.js} +1 -1
  53. package/components/{combination-chart-positioning.config-DjmWx90S.cjs → combination-chart-positioning.config-DAVrKW-6.cjs} +1 -1
  54. package/components/{combination-chart-positioning.config-DtneKdwK.js → combination-chart-positioning.config-uLf1RJQr.js} +1 -1
  55. package/components/{conditional-number-positioning.config-Ccb2yjJU.js → conditional-number-positioning.config-DZjwZfsH.js} +1 -1
  56. package/components/{conditional-number-positioning.config-C8bRdffQ.cjs → conditional-number-positioning.config-Nwsh-WyG.cjs} +1 -1
  57. package/components/convert-data-field-to-slot-content-BQkSy_8B.cjs +20 -0
  58. package/components/convert-data-field-to-slot-content-C6IIqU7G.js +53 -0
  59. package/components/convert-datasets-to-data-fields-B13rl1an.cjs +20 -0
  60. package/components/convert-datasets-to-data-fields-PmQzeVLG.js +68 -0
  61. package/components/data-field/index.cjs +1 -1
  62. package/components/data-field/index.d.ts +1 -0
  63. package/components/data-field/index.js +1 -1
  64. package/components/data-field-CFX9bhKN.js +121 -0
  65. package/components/data-field-bRmOqmAe.cjs +54 -0
  66. package/components/data-field-level/data-field-level.d.ts +40 -0
  67. package/components/data-field-level/helpers/generate-preview.d.ts +9 -0
  68. package/components/data-field-level/index.cjs +20 -0
  69. package/components/data-field-level/index.d.ts +8 -0
  70. package/components/data-field-level/index.js +28 -0
  71. package/components/{data-field-ll2oFVG2.js → data-field-level-Cc6yEETi.js} +46 -140
  72. package/components/data-field-level-Dnl27sxs.cjs +55 -0
  73. package/components/data-field-panel/index.cjs +1 -1
  74. package/components/data-field-panel/index.d.ts +1 -0
  75. package/components/data-field-panel/index.js +1 -1
  76. package/components/data-field-panel-BDExLalA.cjs +87 -0
  77. package/components/{data-field-panel-ntgCpQ_2.js → data-field-panel-DcqVOzMO.js} +5 -4
  78. package/components/data-fields-select/data-fields-select.d.ts +127 -0
  79. package/components/data-fields-select/index.cjs +20 -0
  80. package/components/data-fields-select/index.d.ts +9 -0
  81. package/components/data-fields-select/index.js +28 -0
  82. package/components/data-fields-select/types.d.ts +4 -0
  83. package/components/data-fields-select-B5aGtDYe.cjs +41 -0
  84. package/components/{data-fields-select-DJFkrrPs.js → data-fields-select-CfAfiV-K.js} +4 -3
  85. package/components/dataset-icon/dataset-icon.d.ts +45 -0
  86. package/components/dataset-icon/index.cjs +20 -0
  87. package/components/dataset-icon/index.d.ts +8 -0
  88. package/components/dataset-icon/index.js +28 -0
  89. package/components/dataset-icon/types.d.ts +11 -0
  90. package/components/dataset-icon-BAV0S4sZ.cjs +64 -0
  91. package/components/dataset-icon-BXEgg_8O.js +125 -0
  92. package/components/dataset-selector-list/dataset-selector-list.d.ts +102 -0
  93. package/components/dataset-selector-list/index.cjs +20 -0
  94. package/components/dataset-selector-list/index.d.ts +8 -0
  95. package/components/dataset-selector-list/index.js +28 -0
  96. package/components/dataset-selector-list-WT2ZHjQ4.cjs +75 -0
  97. package/components/dataset-selector-list-bAFTW1Hr.js +313 -0
  98. package/components/dataset-selector-row/dataset-selector-row.d.ts +89 -0
  99. package/components/dataset-selector-row/index.cjs +20 -0
  100. package/components/dataset-selector-row/index.d.ts +8 -0
  101. package/components/dataset-selector-row/index.js +28 -0
  102. package/components/dataset-selector-row-CXrEKQrA.js +273 -0
  103. package/components/dataset-selector-row-CwkXH93E.cjs +79 -0
  104. package/components/decompose-numeric-format-DGJua3rU.cjs +20 -0
  105. package/components/decompose-numeric-format-DS0j2wa1.js +36 -0
  106. package/components/{localized-mixin-CBMYHOPv.js → decorate-CaYbmmmm.js} +2 -26
  107. package/components/decorate-DCJt-2rt.cjs +20 -0
  108. package/components/display-settings/display-settings.d.ts +117 -0
  109. package/components/display-settings/index.cjs +20 -0
  110. package/components/display-settings/index.d.ts +8 -0
  111. package/components/display-settings/index.js +28 -0
  112. package/components/display-settings/types.d.ts +9 -0
  113. package/components/display-settings-DrcpHnKo.cjs +140 -0
  114. package/components/display-settings-Ec_smyRC.js +313 -0
  115. package/components/display-settings-binning/display-settings-binning.d.ts +32 -0
  116. package/components/display-settings-binning/index.cjs +20 -0
  117. package/components/display-settings-binning/index.d.ts +8 -0
  118. package/components/display-settings-binning/index.js +28 -0
  119. package/components/{display-settings-binning-DGxEB9Fa.js → display-settings-binning-COpQPUin.js} +17 -19
  120. package/components/{display-settings-binning-CQKXGp11.cjs → display-settings-binning-XXJdJeGU.cjs} +2 -2
  121. package/components/display-settings-datetime/display-settings-datetime.d.ts +86 -0
  122. package/components/display-settings-datetime/index.cjs +20 -0
  123. package/components/display-settings-datetime/index.d.ts +8 -0
  124. package/components/display-settings-datetime/index.js +28 -0
  125. package/components/display-settings-datetime-DhSW10ln.cjs +217 -0
  126. package/components/{display-settings-datetime-CLx9sxA7.js → display-settings-datetime-qj86dnHh.js} +69 -71
  127. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +29 -0
  128. package/components/display-settings-grand-totals/index.cjs +20 -0
  129. package/components/display-settings-grand-totals/index.d.ts +8 -0
  130. package/components/display-settings-grand-totals/index.js +28 -0
  131. package/components/{display-settings-grand-totals-B0Px90rH.js → display-settings-grand-totals-D6IDs0U1.js} +17 -19
  132. package/components/display-settings-grand-totals-DTF0sqA1.cjs +44 -0
  133. package/components/display-settings-numeric/display-settings-numeric.d.ts +82 -0
  134. package/components/display-settings-numeric/helpers/constants.d.ts +19 -0
  135. package/components/display-settings-numeric/index.cjs +20 -0
  136. package/components/display-settings-numeric/index.d.ts +8 -0
  137. package/components/display-settings-numeric/index.js +28 -0
  138. package/components/display-settings-numeric-Dt34JHyR.cjs +190 -0
  139. package/components/{display-settings-numeric-CdEgzO7W.js → display-settings-numeric-Dy2EMcKa.js} +79 -81
  140. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +68 -0
  141. package/components/display-settings-period-over-period/helpers/constants.d.ts +44 -0
  142. package/components/display-settings-period-over-period/index.cjs +20 -0
  143. package/components/display-settings-period-over-period/index.d.ts +8 -0
  144. package/components/display-settings-period-over-period/index.js +28 -0
  145. package/components/display-settings-period-over-period-B-ULI6yW.cjs +229 -0
  146. package/components/{display-settings-period-over-period-lo3myRfT.js → display-settings-period-over-period-BMzBnywY.js} +85 -86
  147. package/components/{donut-chart-positioning.config-2cYbI6p-.cjs → donut-chart-positioning.config-BnmePhBH.cjs} +1 -1
  148. package/components/{donut-chart-positioning.config-Dh3XI5f4.js → donut-chart-positioning.config-CnZRc3e8.js} +1 -1
  149. package/components/{en-hPjCnvK0.cjs → en-B34alchz.cjs} +1 -1
  150. package/components/{en-OJGeTneC.js → en-CcLhGxIh.js} +1 -1
  151. package/components/en-GB-B3xz84vF.cjs +20 -0
  152. package/components/{en-GB-D7N1nMuy.js → en-GB-DzkdeUQh.js} +1 -1
  153. package/components/{en-US-hPjCnvK0.cjs → en-US-B34alchz.cjs} +1 -1
  154. package/components/{en-US-OJGeTneC.js → en-US-CcLhGxIh.js} +1 -1
  155. package/components/{evolution-number-positioning.config-BX1lWtDL.cjs → evolution-number-positioning.config-CKgGLWTm.cjs} +1 -1
  156. package/components/{evolution-number-positioning.config-BQQrOKbD.js → evolution-number-positioning.config-DiKxJqRO.js} +1 -1
  157. package/components/filter-expression-picker/filter-expression-picker.d.ts +73 -0
  158. package/components/filter-expression-picker/index.cjs +20 -0
  159. package/components/filter-expression-picker/index.d.ts +7 -0
  160. package/components/filter-expression-picker/index.js +28 -0
  161. package/components/filter-expression-picker-DMZ4sgJ6.js +425 -0
  162. package/components/filter-expression-picker-Dq0X2lo3.cjs +38 -0
  163. package/components/filter-item/filter-item.d.ts +84 -0
  164. package/components/filter-item/index.cjs +20 -0
  165. package/components/filter-item/index.d.ts +7 -0
  166. package/components/filter-item/index.js +28 -0
  167. package/components/filter-item-BEe-Y6l0.js +242 -0
  168. package/components/filter-item-BnxKP0Zg.cjs +58 -0
  169. package/components/filter-parameter-picker/filter-parameter-picker.d.ts +25 -0
  170. package/components/filter-parameter-picker/index.cjs +22 -0
  171. package/components/filter-parameter-picker/index.d.ts +7 -0
  172. package/components/filter-parameter-picker/index.js +58 -0
  173. package/components/filter-value-picker/filter-value-picker.d.ts +65 -0
  174. package/components/filter-value-picker/index.cjs +20 -0
  175. package/components/filter-value-picker/index.d.ts +7 -0
  176. package/components/filter-value-picker/index.js +28 -0
  177. package/components/filter-value-picker-BxaX9BML.cjs +60 -0
  178. package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +42 -0
  179. package/components/filter-value-picker-datetime/index.cjs +20 -0
  180. package/components/filter-value-picker-datetime/index.d.ts +7 -0
  181. package/components/filter-value-picker-datetime/index.js +28 -0
  182. package/components/filter-value-picker-datetime-BryAsOYH.cjs +42 -0
  183. package/components/filter-value-picker-datetime-DtZDr9fY.js +139 -0
  184. package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +81 -0
  185. package/components/filter-value-picker-hierarchy/index.cjs +20 -0
  186. package/components/filter-value-picker-hierarchy/index.d.ts +7 -0
  187. package/components/filter-value-picker-hierarchy/index.js +28 -0
  188. package/components/filter-value-picker-hierarchy-BSKoZJ0F.cjs +47 -0
  189. package/components/filter-value-picker-hierarchy-D9BcuttQ.js +232 -0
  190. package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +82 -0
  191. package/components/filter-value-picker-numeric/index.cjs +20 -0
  192. package/components/filter-value-picker-numeric/index.d.ts +7 -0
  193. package/components/filter-value-picker-numeric/index.js +28 -0
  194. package/components/filter-value-picker-numeric-B2EcfNUR.cjs +48 -0
  195. package/components/filter-value-picker-numeric-CoU9l9wS.js +219 -0
  196. package/components/filter-value-picker-r1zs2IHx.js +151 -0
  197. package/components/filters/index.cjs +1 -1
  198. package/components/filters/index.js +1 -1
  199. package/components/filters-C9DVFS6T.cjs +150 -0
  200. package/components/filters-DVTYmlI1.js +400 -0
  201. package/components/formatter-8m-wrIM-.cjs +20 -0
  202. package/components/{period-over-period-condition.const-DLA60ptm.js → formatter-Cq5dFCyU.js} +44 -235
  203. package/components/formula/index.cjs +1 -1
  204. package/components/formula/index.js +1 -1
  205. package/components/formula--lwYaW2w.cjs +45 -0
  206. package/components/{formula-TyfDRy5X.js → formula-Ekyv6mpo.js} +15 -14
  207. package/components/formula-codemirror/formula-codemirror.d.ts +79 -0
  208. package/components/formula-codemirror/index.d.ts +7 -0
  209. package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +125 -0
  210. package/components/formula-codemirror/pills/formula-aggregation/index.d.ts +7 -0
  211. package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +28 -0
  212. package/components/formula-codemirror/pills/formula-empty-argument-pill/index.d.ts +7 -0
  213. package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +38 -0
  214. package/components/{formula-codemirror-Bewi7Xgc.cjs → formula-codemirror-BZuBN5sE.cjs} +50 -50
  215. package/components/{formula-codemirror-B6ktT1Dm.js → formula-codemirror-DgTmL2Id.js} +21 -19
  216. package/components/formula-display-store-BunPLkc0.cjs +20 -0
  217. package/components/{formula-display-store-ycPV0gru.js → formula-display-store-ezef6EvF.js} +242 -271
  218. package/components/formula-draggable-field/formula-draggable-field.d.ts +53 -0
  219. package/components/formula-draggable-field/index.d.ts +8 -0
  220. package/components/formula-draggable-field/types.d.ts +24 -0
  221. package/components/formula-editor/index.cjs +1 -1
  222. package/components/formula-editor/index.d.ts +1 -0
  223. package/components/formula-editor/index.js +4 -3
  224. package/components/formula-editor-CjVohoJB.cjs +218 -0
  225. package/components/{formula-editor-HkD4KWnN.js → formula-editor-DRpm9ej7.js} +143 -348
  226. package/components/formula-field/formula-field.d.ts +20 -0
  227. package/components/formula-field/index.cjs +20 -0
  228. package/components/formula-field/index.d.ts +7 -0
  229. package/components/formula-field/index.js +28 -0
  230. package/components/formula-field-DcgWLGBD.cjs +20 -0
  231. package/components/formula-field-TwMnyN0t.js +40 -0
  232. package/components/formula-input-base-D6QdnUOa.cjs +49 -0
  233. package/components/formula-input-base-Dxk5euNb.js +236 -0
  234. package/components/{funnel-chart-positioning.config-iHk--8l3.cjs → funnel-chart-positioning.config-DaHDyj7V.cjs} +1 -1
  235. package/components/{funnel-chart-positioning.config-9blBdgB7.js → funnel-chart-positioning.config-DysRV01G.js} +1 -1
  236. package/components/get-dataset-name-D4smY8ms.cjs +20 -0
  237. package/components/get-dataset-name-D_ZiWu64.js +27 -0
  238. package/components/groupings-Bzp2EA65.js +52 -0
  239. package/components/groupings-Wfp8piEu.cjs +20 -0
  240. package/components/{heat-map-positioning.config-DgrZWNiT.js → heat-map-positioning.config-C6CqosaH.js} +1 -1
  241. package/components/{heat-map-positioning.config-CqkTB8nU.cjs → heat-map-positioning.config-hFwq08ML.cjs} +1 -1
  242. package/components/{heat-table-positioning.config-BqsqkftW.js → heat-table-positioning.config-B2RuWLH5.js} +1 -1
  243. package/components/{heat-table-positioning.config-Ca-WBNR-.cjs → heat-table-positioning.config-MJ_ox9iT.cjs} +1 -1
  244. package/components/{hexbin-map-positioning.config-sUIrPJP4.cjs → hexbin-map-positioning.config-Dua5Z8M2.cjs} +1 -1
  245. package/components/{hexbin-map-positioning.config-gkLfwTS6.js → hexbin-map-positioning.config-IiGTpp68.js} +1 -1
  246. package/components/index.cjs +1 -749
  247. package/components/index.js +64 -5577
  248. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +7 -0
  249. package/components/interactive-viz-item/index.cjs +20 -0
  250. package/components/interactive-viz-item/index.d.ts +10 -0
  251. package/components/interactive-viz-item/index.js +28 -0
  252. package/components/interactive-viz-item/interactive-viz-item.d.ts +96 -0
  253. package/components/interactive-viz-item/types.d.ts +117 -0
  254. package/components/interactive-viz-item-O2zj8Ix3.cjs +247 -0
  255. package/components/interactive-viz-item-lBrlvX4F.js +693 -0
  256. package/components/item-grid/index.cjs +1 -1
  257. package/components/item-grid/index.js +1 -1
  258. package/components/{item-grid-C6nEE4Uj.cjs → item-grid-CmuMl0eC.cjs} +22 -22
  259. package/components/{item-grid-B59uyBDP.js → item-grid-Cqi995vx.js} +2 -1
  260. package/components/item-menu/item-list/item-list.d.ts +37 -0
  261. package/components/item-option/index.cjs +1 -1
  262. package/components/item-option/index.js +1 -1
  263. package/components/item-option-CQw6Xsi2.cjs +252 -0
  264. package/components/{item-option-zz-Rqh6o.js → item-option-Cg3zRKlU.js} +2 -2
  265. package/components/item-option-action-button-group/index.cjs +1 -1
  266. package/components/item-option-action-button-group/index.js +1 -1
  267. package/components/{item-option-action-button-group-BEXRueVH.js → item-option-action-button-group-C1TU-ng7.js} +2 -2
  268. package/components/item-option-action-button-group-DBdpU9Ac.cjs +53 -0
  269. package/components/item-option-base/item-option-base.d.ts +23 -0
  270. package/components/{item-option-base-DqDKIqRP.js → item-option-base-4mpxvTpE.js} +2 -2
  271. package/components/item-option-base-BtYcXg-E.cjs +56 -0
  272. package/components/item-option-color-palette-picker/index.cjs +1 -1
  273. package/components/item-option-color-palette-picker/index.js +1 -1
  274. package/components/item-option-color-palette-picker-4so22U-2.cjs +40 -0
  275. package/components/{item-option-color-palette-picker-dk5Nm1XB.js → item-option-color-palette-picker-BBnhEOQj.js} +2 -2
  276. package/components/item-option-color-picker/index.cjs +1 -1
  277. package/components/item-option-color-picker/index.js +1 -1
  278. package/components/{item-option-color-picker-oG-wrEZh.js → item-option-color-picker-CTTEHFVR.js} +2 -2
  279. package/components/{item-option-color-picker-Czr_ojzh.cjs → item-option-color-picker-CUBaIdL-.cjs} +2 -2
  280. package/components/item-option-color-range/index.cjs +1 -1
  281. package/components/item-option-color-range/index.js +1 -1
  282. package/components/{item-option-color-range-RbnPnI3s.js → item-option-color-range-BuLEgB7a.js} +2 -2
  283. package/components/item-option-color-range-H4nV-HoV.cjs +98 -0
  284. package/components/item-option-multi-language-field/index.cjs +1 -1
  285. package/components/item-option-multi-language-field/index.js +1 -1
  286. package/components/{item-option-multi-language-field-BqhBRIFH.js → item-option-multi-language-field-CXQj3kSW.js} +2 -2
  287. package/components/{item-option-multi-language-field-BpyuIPcO.cjs → item-option-multi-language-field-d25tETIC.cjs} +2 -2
  288. package/components/item-option-number-field/index.cjs +1 -1
  289. package/components/item-option-number-field/index.js +1 -1
  290. package/components/{item-option-number-field-BDPEAzdF.js → item-option-number-field-CEQEjnu8.js} +2 -2
  291. package/components/{item-option-number-field-CV2xpQrk.cjs → item-option-number-field-waG1zcr8.cjs} +2 -2
  292. package/components/item-option-panel/index.cjs +1 -1
  293. package/components/item-option-panel/index.js +1 -1
  294. package/components/{item-option-panel-CMrjUb2s.cjs → item-option-panel-Bh4d0Ueb.cjs} +2 -2
  295. package/components/{item-option-panel-XhTxaBZp.js → item-option-panel-CVjT-rr8.js} +3 -3
  296. package/components/item-option-picker/index.cjs +1 -1
  297. package/components/item-option-picker/index.js +1 -1
  298. package/components/{item-option-picker-D_Od3am8.js → item-option-picker-CiEMwzho.js} +2 -2
  299. package/components/{item-option-picker-CvEfEy99.cjs → item-option-picker-YTJ6noOW.cjs} +2 -2
  300. package/components/item-option-position-picker/index.cjs +1 -1
  301. package/components/item-option-position-picker/index.js +1 -1
  302. package/components/item-option-position-picker-DExAtVBF.cjs +32 -0
  303. package/components/{item-option-position-picker-BKw29tj-.js → item-option-position-picker-DVsG8inN.js} +2 -2
  304. package/components/item-option-positions-number-field/index.cjs +1 -1
  305. package/components/item-option-positions-number-field/index.js +1 -1
  306. package/components/{item-option-positions-number-field-lrJdfydy.js → item-option-positions-number-field-7F1_3pxp.js} +2 -2
  307. package/components/item-option-positions-number-field-Ju4e_B6g.cjs +49 -0
  308. package/components/item-option-radio-button-group/index.cjs +1 -1
  309. package/components/item-option-radio-button-group/index.js +1 -1
  310. package/components/{item-option-radio-button-group-DrjpL6YU.cjs → item-option-radio-button-group-6w11UJC-.cjs} +2 -2
  311. package/components/{item-option-radio-button-group-DTyHPaz_.js → item-option-radio-button-group-CHZKF_oZ.js} +2 -2
  312. package/components/item-option-slider/index.cjs +1 -1
  313. package/components/item-option-slider/index.js +1 -1
  314. package/components/{item-option-slider-CIDoZhZl.js → item-option-slider-CQCvF7wI.js} +2 -2
  315. package/components/{item-option-slider-BwKBgW0y.cjs → item-option-slider-DdkgydGa.cjs} +2 -2
  316. package/components/item-option-switch/index.cjs +1 -1
  317. package/components/item-option-switch/index.js +1 -1
  318. package/components/{item-option-switch-DxC1yjeN.js → item-option-switch-68EoGXKU.js} +2 -2
  319. package/components/{item-option-switch-CQtvbTfI.cjs → item-option-switch-IP4wvB7i.cjs} +2 -2
  320. package/components/item-option-text-field/index.cjs +1 -1
  321. package/components/item-option-text-field/index.js +1 -1
  322. package/components/{item-option-text-field-CZtJ1yIj.js → item-option-text-field-0CCtgD5i.js} +2 -2
  323. package/components/{item-option-text-field-pLQzcE25.cjs → item-option-text-field-Be4frWhI.cjs} +2 -2
  324. package/components/item-slot-drop/index.cjs +1 -1
  325. package/components/item-slot-drop/index.d.ts +2 -0
  326. package/components/item-slot-drop/index.js +1 -1
  327. package/components/item-slot-drop-C7BJJcZz.cjs +91 -0
  328. package/components/{item-slot-drop-SqYpfTGj.js → item-slot-drop-PlCmap_s.js} +14 -9
  329. package/components/item-slot-drop-panel/index.cjs +1 -1
  330. package/components/item-slot-drop-panel/index.js +1 -1
  331. package/components/{item-slot-drop-panel-DoWCzjqb.js → item-slot-drop-panel-BevGCcMh.js} +41 -40
  332. package/components/item-slot-drop-panel-hs0gFwb-.cjs +57 -0
  333. package/components/item-slot-picker/index.cjs +1 -1
  334. package/components/item-slot-picker/index.js +1 -1
  335. package/components/{item-slot-picker-CadZEvOA.js → item-slot-picker-BzXlX-Zd.js} +26 -21
  336. package/components/item-slot-picker-dmoR1ZyZ.cjs +174 -0
  337. package/components/item-slot-picker-panel/index.cjs +1 -1
  338. package/components/item-slot-picker-panel/index.js +1 -1
  339. package/components/item-slot-picker-panel-B2TtJUIs.cjs +81 -0
  340. package/components/{item-slot-picker-panel-Bhr6d6Ya.js → item-slot-picker-panel-DnvwcLGy.js} +5 -4
  341. package/components/{line-chart-positioning.config-BIkHxiyg.cjs → line-chart-positioning.config-CYqzjNzS.cjs} +1 -1
  342. package/components/{line-chart-positioning.config-CdnYQBah.js → line-chart-positioning.config-DAs0y-O6.js} +1 -1
  343. package/components/load-data-fields-for-datasets-BVGaku2J.cjs +20 -0
  344. package/components/load-data-fields-for-datasets-DeXLqWt4.js +42 -0
  345. package/components/localized-mixin-BNAt_iYb.cjs +20 -0
  346. package/components/localized-mixin-GXZQgVAD.js +45 -0
  347. package/components/{marker-map-positioning.config-BSz4P-W9.js → marker-map-positioning.config-BQ-kNUJI.js} +1 -1
  348. package/components/{marker-map-positioning.config-t66fioVz.cjs → marker-map-positioning.config-C5h5ydGa.cjs} +1 -1
  349. package/components/{ohlc-chart-positioning.config-tQPPutWX.js → ohlc-chart-positioning.config-BQyRY4rj.js} +1 -1
  350. package/components/{ohlc-chart-positioning.config-BGueS7CJ.cjs → ohlc-chart-positioning.config-fqniDSHf.cjs} +1 -1
  351. package/components/{parallel-coordinates-plot-positioning.config-NrJ2LNM8.cjs → parallel-coordinates-plot-positioning.config-Bhyk-q40.cjs} +1 -1
  352. package/components/{parallel-coordinates-plot-positioning.config-MkX-qYHX.js → parallel-coordinates-plot-positioning.config-DMUrvTKC.js} +1 -1
  353. package/components/period-over-period-condition.const-BZ7j5Z5t.js +29 -0
  354. package/components/period-over-period-condition.const-C1NZ9Bkp.cjs +20 -0
  355. package/components/{pivot-table-positioning.config-DgJ5PPB9.cjs → pivot-table-positioning.config-CRPJ6cp9.cjs} +1 -1
  356. package/components/{pivot-table-positioning.config-Dr_0v4TM.js → pivot-table-positioning.config-kgOD7qg4.js} +1 -1
  357. package/components/{pyramid-chart-positioning.config-BGRtXKWh.cjs → pyramid-chart-positioning.config-B3g4J0Fc.cjs} +1 -1
  358. package/components/{pyramid-chart-positioning.config-DB0BI8vW.js → pyramid-chart-positioning.config-DzmnUNOa.js} +1 -1
  359. package/components/{radar-chart-positioning.config-DQiJ-Z1s.cjs → radar-chart-positioning.config-DeMZx8WU.cjs} +1 -1
  360. package/components/{radar-chart-positioning.config-D6UfRMMA.js → radar-chart-positioning.config-DtCHigcZ.js} +1 -1
  361. package/components/{route-map-positioning.config-D_ZoyhwX.js → route-map-positioning.config-CNNkOriH.js} +1 -1
  362. package/components/{route-map-positioning.config-Cbic0Cbz.cjs → route-map-positioning.config-GRnTnxOT.cjs} +1 -1
  363. package/components/{sankey-diagram-positioning.config-CZDPh7CR.cjs → sankey-diagram-positioning.config-B4dTAI_t.cjs} +1 -1
  364. package/components/{sankey-diagram-positioning.config-CQNdImz0.js → sankey-diagram-positioning.config-DZzxWrlG.js} +1 -1
  365. package/components/{scatter-plot-positioning.config-BTOiZ8cF.js → scatter-plot-positioning.config-7DccAqx9.js} +1 -1
  366. package/components/{scatter-plot-positioning.config-BPEymo3a.cjs → scatter-plot-positioning.config-CUxiLfKj.cjs} +1 -1
  367. package/components/{slicer-filter-positioning.config-CQE4ocpD.cjs → slicer-filter-positioning.config-DUivNE2P.cjs} +1 -1
  368. package/components/{slicer-filter-positioning.config-CC7uoU2D.js → slicer-filter-positioning.config-aOkoNRyY.js} +1 -1
  369. package/components/{en-GB-DCZl8CPc.cjs → slot-menu/index.cjs} +1 -1
  370. package/components/slot-menu/index.d.ts +10 -0
  371. package/components/slot-menu/index.js +28 -0
  372. package/components/slot-menu/slot-menu.d.ts +148 -0
  373. package/components/slot-menu/types.d.ts +24 -0
  374. package/components/slot-menu-Bgoo0gWv.cjs +71 -0
  375. package/components/slot-menu-Cb8piPji.js +422 -0
  376. package/components/slot-menu-list/index.cjs +20 -0
  377. package/components/slot-menu-list/index.d.ts +8 -0
  378. package/components/slot-menu-list/index.js +28 -0
  379. package/components/slot-menu-list/slot-menu-list.d.ts +47 -0
  380. package/components/slot-menu-list-Cy6tegSf.cjs +44 -0
  381. package/components/slot-menu-list-VuVIRNtr.js +346 -0
  382. package/components/slot-role-classification-Bvt3bI01.cjs +20 -0
  383. package/components/slot-role-classification-CCzj4WgN.js +133 -0
  384. package/components/slots-config-P_GXW0tl.js +77 -0
  385. package/components/slots-config-YdyClHLc.cjs +20 -0
  386. package/components/{speedometer-chart-positioning.config-ChH-uAdS.js → speedometer-chart-positioning.config-Dj6XK0gq.js} +1 -1
  387. package/components/{speedometer-chart-positioning.config-DpBVarun.cjs → speedometer-chart-positioning.config-DzCh70X-.cjs} +1 -1
  388. package/components/{spike-map-positioning.config-BnEQJ-rD.js → spike-map-positioning.config-BG2pKkf7.js} +1 -1
  389. package/components/{spike-map-positioning.config-DrSoa8Ol.cjs → spike-map-positioning.config-BQIg4Z0U.cjs} +1 -1
  390. package/components/{strip-plot-positioning.config-DlkZ1i6m.cjs → strip-plot-positioning.config-D3ZNgtC4.cjs} +1 -1
  391. package/components/{strip-plot-positioning.config-Be5Desz2.js → strip-plot-positioning.config-HZCVc6kX.js} +1 -1
  392. package/components/{sunburst-chart-positioning.config-RUEkAgKJ.js → sunburst-chart-positioning.config-0O9eMweg.js} +1 -1
  393. package/components/{sunburst-chart-positioning.config-D4zzci9s.cjs → sunburst-chart-positioning.config-B-hCz3bI.cjs} +1 -1
  394. package/components/{symbol-map-positioning.config-JzgtULMk.js → symbol-map-positioning.config-Dod98HkQ.js} +1 -1
  395. package/components/{symbol-map-positioning.config-Dmgmyhv7.cjs → symbol-map-positioning.config-aHnkaWU6.cjs} +1 -1
  396. package/components/{treemap-chart-positioning.config-CSt_vVgw.js → treemap-chart-positioning.config-XB1_FmX-.js} +1 -1
  397. package/components/{treemap-chart-positioning.config-CqHJxz2j.cjs → treemap-chart-positioning.config-qhPL49um.cjs} +1 -1
  398. package/components/utils/base.cjs +1 -1
  399. package/components/utils/base.js +2 -2
  400. package/components/utils-B1BzV2xl.cjs +20 -0
  401. package/components/{utils-DLTDAer5.js → utils-BMOxXnnX.js} +42 -41
  402. package/components/utils.cjs +1 -1
  403. package/components/utils.js +8 -5
  404. package/components/{venn-diagram-positioning.config-DsPI8qfG.js → venn-diagram-positioning.config-Bh1ypVKP.js} +1 -1
  405. package/components/{venn-diagram-positioning.config-CzhNTma3.cjs → venn-diagram-positioning.config-CimHfhlV.cjs} +1 -1
  406. package/components/viz-item-menu/index.cjs +20 -0
  407. package/components/viz-item-menu/index.d.ts +8 -0
  408. package/components/viz-item-menu/index.js +28 -0
  409. package/components/viz-item-menu/types.d.ts +9 -0
  410. package/components/viz-item-menu/viz-item-menu.d.ts +75 -0
  411. package/components/viz-item-menu-CTPd7QMx.cjs +55 -0
  412. package/components/viz-item-menu-sOvrO3Ku.js +170 -0
  413. package/components/{wordcloud-chart-positioning.config-moNJfL1M.cjs → wordcloud-chart-positioning.config-BR_g8Now.cjs} +1 -1
  414. package/components/{wordcloud-chart-positioning.config-BUE8e4fN.js → wordcloud-chart-positioning.config-CmakCQG0.js} +1 -1
  415. package/custom-elements.json +15942 -5759
  416. package/index.d.ts +24 -0
  417. package/package.json +126 -1
  418. package/react/README.md +31 -6
  419. package/react/components/ai-chat/empty-state/index.ts +1 -0
  420. package/react/components/ai-chat/empty-state/types.ts +16 -0
  421. package/react/components/ai-chat/stream/index.ts +1 -0
  422. package/react/components/ai-chat/stream/types.ts +60 -0
  423. package/react/components/ai-chat.component.ts +45 -0
  424. package/react/components/ai-interaction-textarea/index.ts +1 -0
  425. package/react/components/ai-interaction-textarea/types.ts +6 -0
  426. package/react/components/ai-interaction-textarea.component.ts +30 -0
  427. package/react/components/data-field-level.component.ts +30 -0
  428. package/react/components/data-fields-select/index.ts +1 -0
  429. package/react/components/data-fields-select/types.ts +5 -0
  430. package/react/components/data-fields-select.component.ts +27 -0
  431. package/react/components/dataset-icon/index.ts +1 -0
  432. package/react/components/dataset-icon/types.ts +8 -0
  433. package/react/components/dataset-icon.component.ts +22 -0
  434. package/react/components/dataset-selector-list.component.ts +27 -0
  435. package/react/components/dataset-selector-row.component.ts +30 -0
  436. package/react/components/display-settings/index.ts +1 -0
  437. package/react/components/display-settings/types.ts +12 -0
  438. package/react/components/display-settings-binning.component.ts +27 -0
  439. package/react/components/display-settings-datetime.component.ts +27 -0
  440. package/react/components/display-settings-grand-totals.component.ts +27 -0
  441. package/react/components/display-settings-numeric.component.ts +27 -0
  442. package/react/components/display-settings-period-over-period.component.ts +27 -0
  443. package/react/components/display-settings.component.ts +33 -0
  444. package/react/components/filter-expression-picker.component.ts +27 -0
  445. package/react/components/filter-item.component.ts +27 -0
  446. package/react/components/filter-parameter-picker.component.ts +22 -0
  447. package/react/components/filter-value-picker-datetime.component.ts +27 -0
  448. package/react/components/filter-value-picker-hierarchy.component.ts +27 -0
  449. package/react/components/filter-value-picker-numeric.component.ts +27 -0
  450. package/react/components/filter-value-picker.component.ts +27 -0
  451. package/react/components/formula-draggable-field/index.ts +1 -0
  452. package/react/components/formula-draggable-field/types.ts +26 -0
  453. package/react/components/formula-field.component.ts +30 -0
  454. package/react/components/interactive-viz-item/index.ts +1 -0
  455. package/react/components/interactive-viz-item/types.ts +122 -0
  456. package/react/components/interactive-viz-item.component.ts +33 -0
  457. package/react/components/slot-menu/index.ts +1 -0
  458. package/react/components/slot-menu/types.ts +29 -0
  459. package/react/components/slot-menu-list.component.ts +27 -0
  460. package/react/components/slot-menu.component.ts +42 -0
  461. package/react/components/viz-item-menu/index.ts +1 -0
  462. package/react/components/viz-item-menu/types.ts +11 -0
  463. package/react/components/viz-item-menu.component.ts +33 -0
  464. package/react/esm/components/ai-chat/empty-state/index.d.ts +1 -0
  465. package/react/esm/components/ai-chat/empty-state/index.js +1 -0
  466. package/react/esm/components/ai-chat/empty-state/types.d.ts +14 -0
  467. package/react/esm/components/ai-chat/empty-state/types.js +1 -0
  468. package/react/esm/components/ai-chat/stream/index.d.ts +1 -0
  469. package/react/esm/components/ai-chat/stream/index.js +1 -0
  470. package/react/esm/components/ai-chat/stream/types.d.ts +55 -0
  471. package/react/esm/components/ai-chat/stream/types.js +1 -0
  472. package/react/esm/components/ai-chat.component.d.ts +24 -0
  473. package/react/esm/components/ai-chat.component.js +29 -0
  474. package/react/esm/components/ai-interaction-textarea/index.d.ts +1 -0
  475. package/react/esm/components/ai-interaction-textarea/index.js +1 -0
  476. package/react/esm/components/ai-interaction-textarea/types.d.ts +5 -0
  477. package/react/esm/components/ai-interaction-textarea/types.js +1 -0
  478. package/react/esm/components/ai-interaction-textarea.component.d.ts +14 -0
  479. package/react/esm/components/ai-interaction-textarea.component.js +19 -0
  480. package/react/esm/components/data-field-level.component.d.ts +14 -0
  481. package/react/esm/components/data-field-level.component.js +19 -0
  482. package/react/esm/components/data-fields-select/index.d.ts +1 -0
  483. package/react/esm/components/data-fields-select/index.js +1 -0
  484. package/react/esm/components/data-fields-select/types.d.ts +4 -0
  485. package/react/esm/components/data-fields-select/types.js +1 -0
  486. package/react/esm/components/data-fields-select.component.d.ts +12 -0
  487. package/react/esm/components/data-fields-select.component.js +17 -0
  488. package/react/esm/components/dataset-icon/index.d.ts +1 -0
  489. package/react/esm/components/dataset-icon/index.js +1 -0
  490. package/react/esm/components/dataset-icon/types.d.ts +11 -0
  491. package/react/esm/components/dataset-icon/types.js +1 -0
  492. package/react/esm/components/dataset-icon.component.d.ts +8 -0
  493. package/react/esm/components/dataset-icon.component.js +13 -0
  494. package/react/esm/components/dataset-selector-list.component.d.ts +12 -0
  495. package/react/esm/components/dataset-selector-list.component.js +17 -0
  496. package/react/esm/components/dataset-selector-row.component.d.ts +14 -0
  497. package/react/esm/components/dataset-selector-row.component.js +19 -0
  498. package/react/esm/components/display-settings/index.d.ts +1 -0
  499. package/react/esm/components/display-settings/index.js +1 -0
  500. package/react/esm/components/display-settings/types.d.ts +9 -0
  501. package/react/esm/components/display-settings/types.js +1 -0
  502. package/react/esm/components/display-settings-binning.component.d.ts +12 -0
  503. package/react/esm/components/display-settings-binning.component.js +17 -0
  504. package/react/esm/components/display-settings-datetime.component.d.ts +12 -0
  505. package/react/esm/components/display-settings-datetime.component.js +17 -0
  506. package/react/esm/components/display-settings-grand-totals.component.d.ts +12 -0
  507. package/react/esm/components/display-settings-grand-totals.component.js +17 -0
  508. package/react/esm/components/display-settings-numeric.component.d.ts +12 -0
  509. package/react/esm/components/display-settings-numeric.component.js +17 -0
  510. package/react/esm/components/display-settings-period-over-period.component.d.ts +12 -0
  511. package/react/esm/components/display-settings-period-over-period.component.js +17 -0
  512. package/react/esm/components/display-settings.component.d.ts +16 -0
  513. package/react/esm/components/display-settings.component.js +21 -0
  514. package/react/esm/components/filter-expression-picker.component.d.ts +12 -0
  515. package/react/esm/components/filter-expression-picker.component.js +17 -0
  516. package/react/esm/components/filter-item.component.d.ts +12 -0
  517. package/react/esm/components/filter-item.component.js +17 -0
  518. package/react/esm/components/filter-parameter-picker.component.d.ts +8 -0
  519. package/react/esm/components/filter-parameter-picker.component.js +13 -0
  520. package/react/esm/components/filter-value-picker-datetime.component.d.ts +12 -0
  521. package/react/esm/components/filter-value-picker-datetime.component.js +17 -0
  522. package/react/esm/components/filter-value-picker-hierarchy.component.d.ts +12 -0
  523. package/react/esm/components/filter-value-picker-hierarchy.component.js +17 -0
  524. package/react/esm/components/filter-value-picker-numeric.component.d.ts +12 -0
  525. package/react/esm/components/filter-value-picker-numeric.component.js +17 -0
  526. package/react/esm/components/filter-value-picker.component.d.ts +12 -0
  527. package/react/esm/components/filter-value-picker.component.js +17 -0
  528. package/react/esm/components/formula-draggable-field/index.d.ts +1 -0
  529. package/react/esm/components/formula-draggable-field/index.js +1 -0
  530. package/react/esm/components/formula-draggable-field/types.d.ts +24 -0
  531. package/react/esm/components/formula-draggable-field/types.js +1 -0
  532. package/react/esm/components/formula-field.component.d.ts +14 -0
  533. package/react/esm/components/formula-field.component.js +19 -0
  534. package/react/esm/components/interactive-viz-item/index.d.ts +1 -0
  535. package/react/esm/components/interactive-viz-item/index.js +1 -0
  536. package/react/esm/components/interactive-viz-item/types.d.ts +117 -0
  537. package/react/esm/components/interactive-viz-item/types.js +16 -0
  538. package/react/esm/components/interactive-viz-item.component.d.ts +16 -0
  539. package/react/esm/components/interactive-viz-item.component.js +21 -0
  540. package/react/esm/components/slot-menu/index.d.ts +1 -0
  541. package/react/esm/components/slot-menu/index.js +1 -0
  542. package/react/esm/components/slot-menu/types.d.ts +24 -0
  543. package/react/esm/components/slot-menu/types.js +1 -0
  544. package/react/esm/components/slot-menu-list.component.d.ts +12 -0
  545. package/react/esm/components/slot-menu-list.component.js +17 -0
  546. package/react/esm/components/slot-menu.component.d.ts +22 -0
  547. package/react/esm/components/slot-menu.component.js +27 -0
  548. package/react/esm/components/viz-item-menu/index.d.ts +1 -0
  549. package/react/esm/components/viz-item-menu/index.js +1 -0
  550. package/react/esm/components/viz-item-menu/types.d.ts +9 -0
  551. package/react/esm/components/viz-item-menu/types.js +1 -0
  552. package/react/esm/components/viz-item-menu.component.d.ts +16 -0
  553. package/react/esm/components/viz-item-menu.component.js +21 -0
  554. package/react/esm/index.d.ts +27 -2
  555. package/react/esm/index.js +102 -2
  556. package/react/esm/types.d.ts +15 -0
  557. package/react/index.ts +102 -2
  558. package/react/luzmo-stub.d.ts +164 -0
  559. package/react/types.ts +12 -0
  560. package/storybook/inject-global-vars.d.ts +1 -0
  561. package/storybook/register-components.d.ts +51 -0
  562. package/types/ai-chat.types.d.ts +90 -0
  563. package/types/data-field-events.types.d.ts +7 -0
  564. package/types.d.ts +8 -0
  565. package/components/base-CYiGlWug.cjs +0 -20
  566. package/components/data-field-iGBGWoGH.cjs +0 -89
  567. package/components/data-field-panel-NktuTUUp.cjs +0 -87
  568. package/components/data-fields-select-DL1nFRg3.cjs +0 -41
  569. package/components/display-settings-datetime-25LwuZM_.cjs +0 -217
  570. package/components/display-settings-grand-totals-1tBdxbFY.cjs +0 -44
  571. package/components/display-settings-numeric-Bbx4qmpA.cjs +0 -190
  572. package/components/display-settings-period-over-period-4bJbXWB7.cjs +0 -229
  573. package/components/filters-Bzx4DYm-.cjs +0 -323
  574. package/components/filters-DSod7vIq.js +0 -1637
  575. package/components/formula-DcCDYDt4.cjs +0 -45
  576. package/components/formula-display-store-DxjO7Q-n.cjs +0 -20
  577. package/components/formula-editor-DQp_XiX5.cjs +0 -247
  578. package/components/item-option-C4c-e1QF.cjs +0 -252
  579. package/components/item-option-action-button-group-BU1wvtEd.cjs +0 -53
  580. package/components/item-option-base-DATaPQ-m.cjs +0 -56
  581. package/components/item-option-color-palette-picker-Cc2nTuxC.cjs +0 -40
  582. package/components/item-option-color-range-CTnHZ72E.cjs +0 -98
  583. package/components/item-option-position-picker-DBs4JlFi.cjs +0 -32
  584. package/components/item-option-positions-number-field-DIIEFHd4.cjs +0 -49
  585. package/components/item-slot-drop-UygcXM5D.cjs +0 -91
  586. package/components/item-slot-drop-panel-9T8BWejl.cjs +0 -57
  587. package/components/item-slot-picker-Rnb_wwCV.cjs +0 -174
  588. package/components/item-slot-picker-panel-2VJY6C0b.cjs +0 -81
  589. package/components/load-data-fields-for-datasets-CU75T9Az.js +0 -86
  590. package/components/load-data-fields-for-datasets-DkK1JsFd.cjs +0 -20
  591. package/components/localized-mixin-DAOiXh71.cjs +0 -20
  592. package/components/period-over-period-condition.const-DystGY6B.cjs +0 -20
  593. package/components/slot-menu-BL772rj7.js +0 -1048
  594. package/components/slot-menu-CCbZ-krJ.cjs +0 -215
  595. package/components/utils-Ez3j4EOS.cjs +0 -20
@@ -0,0 +1,3832 @@
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 { i as e } from "./base-a89RuUMb.js";
21
+ import { t } from "./decorate-CaYbmmmm.js";
22
+ import "./ai-interaction-textarea-DzHetSBZ.js";
23
+ import { msg as n } from "@lit/localize/lit-localize";
24
+ import { luzmoEllipsisVertical as r, luzmoIcon as i, luzmoSpin as a } from "@luzmo/icons";
25
+ import "@luzmo/lucero/button";
26
+ import "@luzmo/lucero/chat-message";
27
+ import "@luzmo/lucero/icon";
28
+ import "@luzmo/lucero/overlay";
29
+ import "@luzmo/lucero/popover";
30
+ import "@luzmo/lucero/progress-steps";
31
+ import { html as o, nothing as s, unsafeCSS as c } from "lit";
32
+ import { property as l, state as u } from "lit/decorators.js";
33
+ import { unsafeHTML as d } from "lit/directives/unsafe-html.js";
34
+ import "@luzmo/lucero/action-button";
35
+ //#region node_modules/dompurify/dist/purify.es.mjs
36
+ function ee(e, t) {
37
+ (t == null || t > e.length) && (t = e.length);
38
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
39
+ return r;
40
+ }
41
+ function te(e) {
42
+ if (Array.isArray(e)) return e;
43
+ }
44
+ function ne(e, t) {
45
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
46
+ if (n != null) {
47
+ var r, i, a, o, s = [], c = !0, l = !1;
48
+ try {
49
+ if (a = (n = n.call(e)).next, t !== 0) for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
50
+ } catch (e) {
51
+ l = !0, i = e;
52
+ } finally {
53
+ try {
54
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
55
+ } finally {
56
+ if (l) throw i;
57
+ }
58
+ }
59
+ return s;
60
+ }
61
+ }
62
+ function re() {
63
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
64
+ }
65
+ function ie(e, t) {
66
+ return te(e) || ne(e, t) || ae(e, t) || re();
67
+ }
68
+ function ae(e, t) {
69
+ if (e) {
70
+ if (typeof e == "string") return ee(e, t);
71
+ var n = {}.toString.call(e).slice(8, -1);
72
+ 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) ? ee(e, t) : void 0;
73
+ }
74
+ }
75
+ var oe = Object.entries, se = Object.setPrototypeOf, f = Object.isFrozen, p = Object.getPrototypeOf, m = Object.getOwnPropertyDescriptor, h = Object.freeze, g = Object.seal, ce = Object.create, _ = typeof Reflect < "u" && Reflect, le = _.apply, ue = _.construct;
76
+ h ||= function(e) {
77
+ return e;
78
+ }, g ||= function(e) {
79
+ return e;
80
+ }, le ||= function(e, t) {
81
+ var n = [...arguments].slice(2);
82
+ return e.apply(t, n);
83
+ }, ue ||= function(e) {
84
+ return new e(...[...arguments].slice(1));
85
+ };
86
+ var de = x(Array.prototype.forEach), fe = x(Array.prototype.lastIndexOf), pe = x(Array.prototype.pop), me = x(Array.prototype.push), he = x(Array.prototype.splice), ge = Array.isArray, _e = x(String.prototype.toLowerCase), ve = x(String.prototype.toString), ye = x(String.prototype.match), be = x(String.prototype.replace), xe = x(String.prototype.indexOf), Se = x(String.prototype.trim), Ce = x(Number.prototype.toString), we = x(Boolean.prototype.toString), v = typeof BigInt > "u" ? null : x(BigInt.prototype.toString), Te = typeof Symbol > "u" ? null : x(Symbol.prototype.toString), y = x(Object.prototype.hasOwnProperty), Ee = x(Object.prototype.toString), b = x(RegExp.prototype.test), De = Oe(TypeError);
87
+ function x(e) {
88
+ return function(t) {
89
+ t instanceof RegExp && (t.lastIndex = 0);
90
+ var n = [...arguments].slice(1);
91
+ return le(e, t, n);
92
+ };
93
+ }
94
+ function Oe(e) {
95
+ return function() {
96
+ return ue(e, [...arguments]);
97
+ };
98
+ }
99
+ function S(e, t) {
100
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e;
101
+ if (se && se(e, null), !ge(t)) return e;
102
+ let r = t.length;
103
+ for (; r--;) {
104
+ let i = t[r];
105
+ if (typeof i == "string") {
106
+ let e = n(i);
107
+ e !== i && (f(t) || (t[r] = e), i = e);
108
+ }
109
+ e[i] = !0;
110
+ }
111
+ return e;
112
+ }
113
+ function ke(e) {
114
+ for (let t = 0; t < e.length; t++) y(e, t) || (e[t] = null);
115
+ return e;
116
+ }
117
+ function C(e) {
118
+ let t = ce(null);
119
+ for (let r of oe(e)) {
120
+ var n = ie(r, 2);
121
+ let i = n[0], a = n[1];
122
+ y(e, i) && (ge(a) ? t[i] = ke(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = C(a) : t[i] = a);
123
+ }
124
+ return t;
125
+ }
126
+ function Ae(e) {
127
+ switch (typeof e) {
128
+ case "string": return e;
129
+ case "number": return Ce(e);
130
+ case "boolean": return we(e);
131
+ case "bigint": return v ? v(e) : "0";
132
+ case "symbol": return Te ? Te(e) : "Symbol()";
133
+ case "undefined": return Ee(e);
134
+ case "function":
135
+ case "object": {
136
+ if (e === null) return Ee(e);
137
+ let t = e, n = w(t, "toString");
138
+ if (typeof n == "function") {
139
+ let e = n(t);
140
+ return typeof e == "string" ? e : Ee(e);
141
+ }
142
+ return Ee(e);
143
+ }
144
+ default: return Ee(e);
145
+ }
146
+ }
147
+ function w(e, t) {
148
+ for (; e !== null;) {
149
+ let n = m(e, t);
150
+ if (n) {
151
+ if (n.get) return x(n.get);
152
+ if (typeof n.value == "function") return x(n.value);
153
+ }
154
+ e = p(e);
155
+ }
156
+ function n() {
157
+ return null;
158
+ }
159
+ return n;
160
+ }
161
+ function je(e) {
162
+ try {
163
+ return b(e, ""), !0;
164
+ } catch {
165
+ return !1;
166
+ }
167
+ }
168
+ var Me = h(/* @__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(".")), Ne = h(/* @__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(".")), Pe = h([
169
+ "feBlend",
170
+ "feColorMatrix",
171
+ "feComponentTransfer",
172
+ "feComposite",
173
+ "feConvolveMatrix",
174
+ "feDiffuseLighting",
175
+ "feDisplacementMap",
176
+ "feDistantLight",
177
+ "feDropShadow",
178
+ "feFlood",
179
+ "feFuncA",
180
+ "feFuncB",
181
+ "feFuncG",
182
+ "feFuncR",
183
+ "feGaussianBlur",
184
+ "feImage",
185
+ "feMerge",
186
+ "feMergeNode",
187
+ "feMorphology",
188
+ "feOffset",
189
+ "fePointLight",
190
+ "feSpecularLighting",
191
+ "feSpotLight",
192
+ "feTile",
193
+ "feTurbulence"
194
+ ]), Fe = h([
195
+ "animate",
196
+ "color-profile",
197
+ "cursor",
198
+ "discard",
199
+ "font-face",
200
+ "font-face-format",
201
+ "font-face-name",
202
+ "font-face-src",
203
+ "font-face-uri",
204
+ "foreignobject",
205
+ "hatch",
206
+ "hatchpath",
207
+ "mesh",
208
+ "meshgradient",
209
+ "meshpatch",
210
+ "meshrow",
211
+ "missing-glyph",
212
+ "script",
213
+ "set",
214
+ "solidcolor",
215
+ "unknown",
216
+ "use"
217
+ ]), Ie = h(/* @__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(".")), Le = h([
218
+ "maction",
219
+ "maligngroup",
220
+ "malignmark",
221
+ "mlongdiv",
222
+ "mscarries",
223
+ "mscarry",
224
+ "msgroup",
225
+ "mstack",
226
+ "msline",
227
+ "msrow",
228
+ "semantics",
229
+ "annotation",
230
+ "annotation-xml",
231
+ "mprescripts",
232
+ "none"
233
+ ]), Re = h(["#text"]), ze = h(/* @__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(".")), Be = h(/* @__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.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ve = h(/* @__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(".")), He = h([
234
+ "xlink:href",
235
+ "xml:id",
236
+ "xlink:title",
237
+ "xml:space",
238
+ "xmlns:xlink"
239
+ ]), Ue = g(/{{[\w\W]*|^[\w\W]*}}/g), We = g(/<%[\w\W]*|^[\w\W]*%>/g), Ge = g(/\${[\w\W]*/g), Ke = g(/^data-[\-\w.\u00B7-\uFFFF]+$/), qe = g(/^aria-[\-\w]+$/), Je = g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ye = g(/^(?:\w+script|data):/i), Xe = g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ze = g(/^html$/i), Qe = g(/^[a-z][.\w]*(-[.\w]+)+$/i), $e = g(/<[/\w!]/g), et = g(/<[/\w]/g), tt = g(/<\/no(script|embed|frames)/i), nt = g(/\/>/i), T = {
240
+ element: 1,
241
+ attribute: 2,
242
+ text: 3,
243
+ cdataSection: 4,
244
+ entityReference: 5,
245
+ entityNode: 6,
246
+ processingInstruction: 7,
247
+ comment: 8,
248
+ document: 9,
249
+ documentType: 10,
250
+ documentFragment: 11,
251
+ notation: 12
252
+ }, rt = function() {
253
+ return typeof window > "u" ? null : window;
254
+ }, it = function(e, t) {
255
+ if (typeof e != "object" || typeof e.createPolicy != "function") return null;
256
+ let n = null, r = "data-tt-policy-suffix";
257
+ t && t.hasAttribute(r) && (n = t.getAttribute(r));
258
+ let i = "dompurify" + (n ? "#" + n : "");
259
+ try {
260
+ return e.createPolicy(i, {
261
+ createHTML(e) {
262
+ return e;
263
+ },
264
+ createScriptURL(e) {
265
+ return e;
266
+ }
267
+ });
268
+ } catch {
269
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
270
+ }
271
+ }, at = function() {
272
+ return {
273
+ afterSanitizeAttributes: [],
274
+ afterSanitizeElements: [],
275
+ afterSanitizeShadowDOM: [],
276
+ beforeSanitizeAttributes: [],
277
+ beforeSanitizeElements: [],
278
+ beforeSanitizeShadowDOM: [],
279
+ uponSanitizeAttribute: [],
280
+ uponSanitizeElement: [],
281
+ uponSanitizeShadowNode: []
282
+ };
283
+ }, E = function(e, t, n, r) {
284
+ return y(e, t) && ge(e[t]) ? S(r.base ? C(r.base) : {}, e[t], r.transform) : n;
285
+ };
286
+ function ot() {
287
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rt(), t = (e) => ot(e);
288
+ if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== T.document || !e.Element) return t.isSupported = !1, t;
289
+ let n = e.document, r = n, i = r.currentScript;
290
+ e.DocumentFragment;
291
+ let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
292
+ e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
293
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, ee = w(d, "cloneNode"), te = w(d, "remove"), ne = w(d, "nextSibling"), re = w(d, "childNodes"), ie = w(d, "parentNode"), ae = w(d, "shadowRoot"), se = w(d, "attributes"), f = o && o.prototype ? w(o.prototype, "nodeType") : null, p = o && o.prototype ? w(o.prototype, "nodeName") : null;
294
+ if (typeof a == "function") {
295
+ let e = n.createElement("template");
296
+ e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
297
+ }
298
+ let m, _ = "", le, ue = !1, Ce = 0, we = function() {
299
+ if (Ce > 0) throw De("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.");
300
+ }, v = function(e) {
301
+ we(), Ce++;
302
+ try {
303
+ return m.createHTML(e);
304
+ } finally {
305
+ Ce--;
306
+ }
307
+ }, Te = function(e) {
308
+ we(), Ce++;
309
+ try {
310
+ return m.createScriptURL(e);
311
+ } finally {
312
+ Ce--;
313
+ }
314
+ }, Ee = function() {
315
+ return ue ||= (le = it(u, i), !0), le;
316
+ }, x = n, Oe = x.implementation, ke = x.createNodeIterator, st = x.createDocumentFragment, ct = x.getElementsByTagName, D = r.importNode, O = at();
317
+ t.isSupported = typeof oe == "function" && typeof ie == "function" && Oe && Oe.createHTMLDocument !== void 0;
318
+ let k = Ue, lt = We, A = Ge, ut = Ke, j = qe, dt = Ye, ft = Xe, pt = Qe, mt = Je, M = null, ht = S({}, [
319
+ ...Me,
320
+ ...Ne,
321
+ ...Pe,
322
+ ...Ie,
323
+ ...Re
324
+ ]), N = null, gt = S({}, [
325
+ ...ze,
326
+ ...Be,
327
+ ...Ve,
328
+ ...He
329
+ ]), P = Object.seal(ce(null, {
330
+ tagNameCheck: {
331
+ writable: !0,
332
+ configurable: !1,
333
+ enumerable: !0,
334
+ value: null
335
+ },
336
+ attributeNameCheck: {
337
+ writable: !0,
338
+ configurable: !1,
339
+ enumerable: !0,
340
+ value: null
341
+ },
342
+ allowCustomizedBuiltInElements: {
343
+ writable: !0,
344
+ configurable: !1,
345
+ enumerable: !0,
346
+ value: !1
347
+ }
348
+ })), _t = null, vt = null, F = Object.seal(ce(null, {
349
+ tagCheck: {
350
+ writable: !0,
351
+ configurable: !1,
352
+ enumerable: !0,
353
+ value: null
354
+ },
355
+ attributeCheck: {
356
+ writable: !0,
357
+ configurable: !1,
358
+ enumerable: !0,
359
+ value: null
360
+ }
361
+ })), yt = !0, bt = !0, xt = !1, St = !0, I = !1, Ct = !0, L = !1, wt = !1, Tt = null, Et = null, Dt = !1, Ot = !1, kt = !1, At = !1, R = !0, jt = !1, Mt = "user-content-", Nt = !0, Pt = !1, Ft = {}, z = null, It = S({}, /* @__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(".")), Lt = null, Rt = S({}, [
362
+ "audio",
363
+ "video",
364
+ "img",
365
+ "source",
366
+ "image",
367
+ "track"
368
+ ]), zt = null, Bt = S({}, [
369
+ "alt",
370
+ "class",
371
+ "for",
372
+ "id",
373
+ "label",
374
+ "name",
375
+ "pattern",
376
+ "placeholder",
377
+ "role",
378
+ "summary",
379
+ "title",
380
+ "value",
381
+ "style",
382
+ "xmlns"
383
+ ]), Vt = "http://www.w3.org/1998/Math/MathML", Ht = "http://www.w3.org/2000/svg", B = "http://www.w3.org/1999/xhtml", Ut = B, Wt = !1, Gt = null, Kt = S({}, [
384
+ Vt,
385
+ Ht,
386
+ B
387
+ ], ve), qt = h([
388
+ "mi",
389
+ "mo",
390
+ "mn",
391
+ "ms",
392
+ "mtext"
393
+ ]), Jt = S({}, qt), Yt = h(["annotation-xml"]), Xt = S({}, Yt), Zt = S({}, [
394
+ "title",
395
+ "style",
396
+ "font",
397
+ "a",
398
+ "script"
399
+ ]), Qt = null, $t = ["application/xhtml+xml", "text/html"], V = null, H = null, en = n.createElement("form"), tn = function(e) {
400
+ return e instanceof RegExp || e instanceof Function;
401
+ }, nn = function() {
402
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
403
+ if (H && H === e) return;
404
+ (!e || typeof e != "object") && (e = {}), e = C(e), Qt = $t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, V = Qt === "application/xhtml+xml" ? ve : _e, M = E(e, "ALLOWED_TAGS", ht, { transform: V }), N = E(e, "ALLOWED_ATTR", gt, { transform: V }), Gt = E(e, "ALLOWED_NAMESPACES", Kt, { transform: ve }), zt = E(e, "ADD_URI_SAFE_ATTR", Bt, {
405
+ transform: V,
406
+ base: Bt
407
+ }), Lt = E(e, "ADD_DATA_URI_TAGS", Rt, {
408
+ transform: V,
409
+ base: Rt
410
+ }), z = E(e, "FORBID_CONTENTS", It, { transform: V }), _t = E(e, "FORBID_TAGS", C({}), { transform: V }), vt = E(e, "FORBID_ATTR", C({}), { transform: V }), Ft = y(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? C(e.USE_PROFILES) : e.USE_PROFILES : !1, yt = e.ALLOW_ARIA_ATTR !== !1, bt = e.ALLOW_DATA_ATTR !== !1, xt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, St = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, I = e.SAFE_FOR_TEMPLATES || !1, Ct = e.SAFE_FOR_XML !== !1, L = e.WHOLE_DOCUMENT || !1, Ot = e.RETURN_DOM || !1, kt = e.RETURN_DOM_FRAGMENT || !1, At = e.RETURN_TRUSTED_TYPE || !1, Dt = e.FORCE_BODY || !1, R = e.SANITIZE_DOM !== !1, jt = e.SANITIZE_NAMED_PROPS || !1, Nt = e.KEEP_CONTENT !== !1, Pt = e.IN_PLACE || !1, mt = je(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Je, Ut = typeof e.NAMESPACE == "string" ? e.NAMESPACE : B, Jt = y(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? C(e.MATHML_TEXT_INTEGRATION_POINTS) : S({}, qt), Xt = y(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? C(e.HTML_INTEGRATION_POINTS) : S({}, Yt);
411
+ let t = y(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? C(e.CUSTOM_ELEMENT_HANDLING) : ce(null);
412
+ if (P = ce(null), y(t, "tagNameCheck") && tn(t.tagNameCheck) && (P.tagNameCheck = t.tagNameCheck), y(t, "attributeNameCheck") && tn(t.attributeNameCheck) && (P.attributeNameCheck = t.attributeNameCheck), y(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), g(P), I && (bt = !1), kt && (Ot = !0), Ft && (M = S({}, Re), N = ce(null), Ft.html === !0 && (S(M, Me), S(N, ze)), Ft.svg === !0 && (S(M, Ne), S(N, Be), S(N, He)), Ft.svgFilters === !0 && (S(M, Pe), S(N, Be), S(N, He)), Ft.mathMl === !0 && (S(M, Ie), S(N, Ve), S(N, He))), F.tagCheck = null, F.attributeCheck = null, y(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? F.tagCheck = e.ADD_TAGS : ge(e.ADD_TAGS) && (M === ht && (M = C(M)), S(M, e.ADD_TAGS, V))), y(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? F.attributeCheck = e.ADD_ATTR : ge(e.ADD_ATTR) && (N === gt && (N = C(N)), S(N, e.ADD_ATTR, V))), y(e, "ADD_URI_SAFE_ATTR") && ge(e.ADD_URI_SAFE_ATTR) && S(zt, e.ADD_URI_SAFE_ATTR, V), y(e, "FORBID_CONTENTS") && ge(e.FORBID_CONTENTS) && (z === It && (z = C(z)), S(z, e.FORBID_CONTENTS, V)), y(e, "ADD_FORBID_CONTENTS") && ge(e.ADD_FORBID_CONTENTS) && (z === It && (z = C(z)), S(z, e.ADD_FORBID_CONTENTS, V)), Nt && (M["#text"] = !0), L && S(M, [
413
+ "html",
414
+ "head",
415
+ "body"
416
+ ]), M.table && (S(M, ["tbody"]), delete _t.tbody), e.TRUSTED_TYPES_POLICY) {
417
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
418
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
419
+ let t = m;
420
+ m = e.TRUSTED_TYPES_POLICY;
421
+ try {
422
+ _ = v("");
423
+ } catch (e) {
424
+ throw m = t, e;
425
+ }
426
+ } else e.TRUSTED_TYPES_POLICY === null ? (m = void 0, _ = "") : (m === void 0 && (m = Ee()), m && typeof _ == "string" && (_ = v("")));
427
+ h && h(e), H = e;
428
+ }, rn = S({}, [
429
+ ...Ne,
430
+ ...Pe,
431
+ ...Fe
432
+ ]), an = S({}, [...Ie, ...Le]), on = function(e, t, n) {
433
+ return t.namespaceURI === B ? e === "svg" : t.namespaceURI === Vt ? e === "svg" && (n === "annotation-xml" || Jt[n]) : !!rn[e];
434
+ }, sn = function(e, t, n) {
435
+ return t.namespaceURI === B ? e === "math" : t.namespaceURI === Ht ? e === "math" && Xt[n] : !!an[e];
436
+ }, U = function(e, t, n) {
437
+ return t.namespaceURI === Ht && !Xt[n] || t.namespaceURI === Vt && !Jt[n] ? !1 : !an[e] && (Zt[e] || !rn[e]);
438
+ }, cn = function(e) {
439
+ let t = ie(e);
440
+ (!t || !t.tagName) && (t = {
441
+ namespaceURI: Ut,
442
+ tagName: "template"
443
+ });
444
+ let n = _e(e.tagName), r = _e(t.tagName);
445
+ return Gt[e.namespaceURI] ? e.namespaceURI === Ht ? on(n, t, r) : e.namespaceURI === Vt ? sn(n, t, r) : e.namespaceURI === B ? U(n, t, r) : !!(Qt === "application/xhtml+xml" && Gt[e.namespaceURI]) : !1;
446
+ }, W = function(e) {
447
+ me(t.removed, { element: e });
448
+ try {
449
+ ie(e).removeChild(e);
450
+ } catch {
451
+ if (te(e), !ie(e)) throw De("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
452
+ }
453
+ }, G = function(e) {
454
+ let t = re(e);
455
+ if (t) {
456
+ let e = [];
457
+ de(t, (t) => {
458
+ me(e, t);
459
+ }), de(e, (e) => {
460
+ try {
461
+ te(e);
462
+ } catch {}
463
+ });
464
+ }
465
+ let n = se(e);
466
+ if (n) for (let t = n.length - 1; t >= 0; --t) {
467
+ let r = n[t], i = r && r.name;
468
+ if (typeof i == "string") try {
469
+ e.removeAttribute(i);
470
+ } catch {}
471
+ }
472
+ }, K = function(e, n) {
473
+ try {
474
+ me(t.removed, {
475
+ attribute: n.getAttributeNode(e),
476
+ from: n
477
+ });
478
+ } catch {
479
+ me(t.removed, {
480
+ attribute: null,
481
+ from: n
482
+ });
483
+ }
484
+ if (n.removeAttribute(e), e === "is") if (Ot || kt) try {
485
+ W(n);
486
+ } catch {}
487
+ else try {
488
+ n.setAttribute(e, "");
489
+ } catch {}
490
+ }, ln = function(e) {
491
+ let t = se(e);
492
+ if (t) for (let n = t.length - 1; n >= 0; --n) {
493
+ let r = t[n], i = r && r.name;
494
+ if (!(typeof i != "string" || N[V(i)])) try {
495
+ e.removeAttribute(i);
496
+ } catch {}
497
+ }
498
+ }, un = function(e) {
499
+ let t = [e];
500
+ for (; t.length > 0;) {
501
+ let e = t.pop();
502
+ (f ? f(e) : e.nodeType) === T.element && ln(e);
503
+ let n = re(e);
504
+ if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
505
+ }
506
+ }, dn = function(e) {
507
+ let t = null, r = null;
508
+ if (Dt) e = "<remove></remove>" + e;
509
+ else {
510
+ let t = ye(e, /^[\r\n\t ]+/);
511
+ r = t && t[0];
512
+ }
513
+ Qt === "application/xhtml+xml" && Ut === B && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
514
+ let i = m ? v(e) : e;
515
+ if (Ut === B) try {
516
+ t = new l().parseFromString(i, Qt);
517
+ } catch {}
518
+ if (!t || !t.documentElement) {
519
+ t = Oe.createDocument(Ut, "template", null);
520
+ try {
521
+ t.documentElement.innerHTML = Wt ? _ : i;
522
+ } catch {}
523
+ }
524
+ let a = t.body || t.documentElement;
525
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ut === B ? ct.call(t, L ? "html" : "body")[0] : L ? t.documentElement : a;
526
+ }, fn = function(e) {
527
+ return ke.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
528
+ }, pn = function(e) {
529
+ return e = be(e, k, " "), e = be(e, lt, " "), e = be(e, A, " "), e;
530
+ }, q = function(e) {
531
+ e.normalize();
532
+ let t = ke.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
533
+ for (; n;) n.data = pn(n.data), n = t.nextNode();
534
+ let r = e.querySelectorAll?.call(e, "template");
535
+ r && de(r, (e) => {
536
+ Y(e.content) && q(e.content);
537
+ });
538
+ }, J = function(e) {
539
+ let t = p ? p(e) : null;
540
+ return typeof t != "string" || V(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== se(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== f(e) || e.childNodes !== re(e);
541
+ }, Y = function(e) {
542
+ if (!f || typeof e != "object" || !e) return !1;
543
+ try {
544
+ return f(e) === T.documentFragment;
545
+ } catch {
546
+ return !1;
547
+ }
548
+ }, X = function(e) {
549
+ if (!f || typeof e != "object" || !e) return !1;
550
+ try {
551
+ return typeof f(e) == "number";
552
+ } catch {
553
+ return !1;
554
+ }
555
+ };
556
+ function Z(e, n, r) {
557
+ e.length !== 0 && de(e, (e) => {
558
+ e.call(t, n, r, H);
559
+ });
560
+ }
561
+ let mn = function(e, t) {
562
+ return !!(Ct && e.hasChildNodes() && !X(e.firstElementChild) && b($e, e.textContent) && b($e, e.innerHTML) || Ct && e.namespaceURI === B && t === "style" && X(e.firstElementChild) || e.nodeType === T.processingInstruction || Ct && e.nodeType === T.comment && b(et, e.data));
563
+ }, Q = function(e, t) {
564
+ if (!_t[t] && vn(t) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, t) || P.tagNameCheck instanceof Function && P.tagNameCheck(t))) return !1;
565
+ if (Nt && !z[t]) {
566
+ let t = ie(e), n = re(e);
567
+ if (n && t) {
568
+ let r = n.length;
569
+ for (let i = r - 1; i >= 0; --i) {
570
+ let r = Pt ? n[i] : ee(n[i], !0);
571
+ t.insertBefore(r, ne(e));
572
+ }
573
+ }
574
+ }
575
+ return W(e), !0;
576
+ }, hn = function(e) {
577
+ if (Z(O.beforeSanitizeElements, e, null), J(e)) return W(e), !0;
578
+ let n = V(p ? p(e) : e.nodeName);
579
+ if (Z(O.uponSanitizeElement, e, {
580
+ tagName: n,
581
+ allowedTags: M
582
+ }), mn(e, n)) return W(e), !0;
583
+ if (_t[n] || !(F.tagCheck instanceof Function && F.tagCheck(n)) && !M[n]) return Q(e, n);
584
+ if ((f ? f(e) : e.nodeType) === T.element && !cn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && b(tt, e.innerHTML)) return W(e), !0;
585
+ if (I && e.nodeType === T.text) {
586
+ let n = pn(e.textContent);
587
+ e.textContent !== n && (me(t.removed, { element: e.cloneNode() }), e.textContent = n);
588
+ }
589
+ return Z(O.afterSanitizeElements, e, null), !1;
590
+ }, gn = function(e, t, r) {
591
+ if (vt[t] || R && (t === "id" || t === "name") && (r in n || r in en)) return !1;
592
+ let i = N[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
593
+ if (!(bt && b(ut, t)) && !(yt && b(j, t))) {
594
+ if (!i) {
595
+ if (!(vn(e) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, e) || P.tagNameCheck instanceof Function && P.tagNameCheck(e)) && (P.attributeNameCheck instanceof RegExp && b(P.attributeNameCheck, t) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(t, e)) || t === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, r) || P.tagNameCheck instanceof Function && P.tagNameCheck(r)))) return !1;
596
+ } else if (!zt[t] && !b(mt, be(r, ft, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && xe(r, "data:") === 0 && Lt[e]) && !(xt && !b(dt, be(r, ft, ""))) && r) return !1;
597
+ }
598
+ return !0;
599
+ }, _n = S({}, [
600
+ "annotation-xml",
601
+ "color-profile",
602
+ "font-face",
603
+ "font-face-format",
604
+ "font-face-name",
605
+ "font-face-src",
606
+ "font-face-uri",
607
+ "missing-glyph"
608
+ ]), vn = function(e) {
609
+ return !_n[_e(e)] && b(pt, e);
610
+ }, yn = function(e, t, n, r) {
611
+ if (m && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
612
+ case "TrustedHTML": return v(r);
613
+ case "TrustedScriptURL": return Te(r);
614
+ }
615
+ return r;
616
+ }, bn = function(e, n, r, i) {
617
+ try {
618
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), J(e) ? W(e) : pe(t.removed);
619
+ } catch {
620
+ K(n, e);
621
+ }
622
+ }, xn = function(e) {
623
+ Z(O.beforeSanitizeAttributes, e, null);
624
+ let t = e.attributes;
625
+ if (!t || J(e)) return;
626
+ let n = {
627
+ attrName: "",
628
+ attrValue: "",
629
+ keepAttr: !0,
630
+ allowedAttributes: N,
631
+ forceKeepAttr: void 0
632
+ }, r = t.length, i = V(e.nodeName);
633
+ for (; r--;) {
634
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = V(o), u = c, d = o === "value" ? u : Se(u);
635
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, Z(O.uponSanitizeAttribute, e, n), d = n.attrValue, jt && (l === "id" || l === "name") && xe(d, Mt) !== 0 && (K(o, e), d = Mt + d), Ct && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
636
+ K(o, e);
637
+ continue;
638
+ }
639
+ if (l === "attributename" && ye(d, "href")) {
640
+ K(o, e);
641
+ continue;
642
+ }
643
+ if (!n.forceKeepAttr) {
644
+ if (!n.keepAttr) {
645
+ K(o, e);
646
+ continue;
647
+ }
648
+ if (!St && b(nt, d)) {
649
+ K(o, e);
650
+ continue;
651
+ }
652
+ if (I && (d = pn(d)), !gn(i, l, d)) {
653
+ K(o, e);
654
+ continue;
655
+ }
656
+ d = yn(i, l, s, d), d !== u && bn(e, o, s, d);
657
+ }
658
+ }
659
+ Z(O.afterSanitizeAttributes, e, null);
660
+ }, Sn = function(e) {
661
+ let t = null, n = fn(e);
662
+ for (Z(O.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Z(O.uponSanitizeShadowNode, t, null), hn(t), xn(t), Y(t.content) && Sn(t.content), (f ? f(t) : t.nodeType) === T.element) {
663
+ let e = ae(t);
664
+ Y(e) && (Cn(e), Sn(e));
665
+ }
666
+ Z(O.afterSanitizeShadowDOM, e, null);
667
+ }, Cn = function(e) {
668
+ let t = [{
669
+ node: e,
670
+ shadow: null
671
+ }];
672
+ for (; t.length > 0;) {
673
+ let e = t.pop();
674
+ if (e.shadow) {
675
+ Sn(e.shadow);
676
+ continue;
677
+ }
678
+ let n = e.node, r = (f ? f(n) : n.nodeType) === T.element, i = re(n);
679
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
680
+ node: i[e],
681
+ shadow: null
682
+ });
683
+ if (r) {
684
+ let e = p ? p(n) : null;
685
+ if (typeof e == "string" && V(e) === "template") {
686
+ let e = n.content;
687
+ Y(e) && t.push({
688
+ node: e,
689
+ shadow: null
690
+ });
691
+ }
692
+ }
693
+ if (r) {
694
+ let e = ae(n);
695
+ Y(e) && t.push({
696
+ node: null,
697
+ shadow: e
698
+ }, {
699
+ node: e,
700
+ shadow: null
701
+ });
702
+ }
703
+ }
704
+ };
705
+ return t.sanitize = function(e) {
706
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
707
+ if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !X(e) && (e = Ae(e), typeof e != "string")) throw De("dirty is not a string, aborting");
708
+ if (!t.isSupported) return e;
709
+ wt ? (M = Tt, N = Et) : nn(n), (O.uponSanitizeElement.length > 0 || O.uponSanitizeAttribute.length > 0) && (M = C(M)), O.uponSanitizeAttribute.length > 0 && (N = C(N)), t.removed = [];
710
+ let c = Pt && typeof e != "string" && X(e);
711
+ if (c) {
712
+ let t = p ? p(e) : e.nodeName;
713
+ if (typeof t == "string") {
714
+ let e = V(t);
715
+ if (!M[e] || _t[e]) throw De("root node is forbidden and cannot be sanitized in-place");
716
+ }
717
+ if (J(e)) throw De("root node is clobbered and cannot be sanitized in-place");
718
+ try {
719
+ Cn(e);
720
+ } catch (t) {
721
+ throw G(e), t;
722
+ }
723
+ } else if (X(e)) i = dn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === T.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Cn(a);
724
+ else {
725
+ if (!Ot && !I && !L && e.indexOf("<") === -1) return m && At ? v(e) : e;
726
+ if (i = dn(e), !i) return Ot ? null : At ? _ : "";
727
+ }
728
+ i && Dt && W(i.firstChild);
729
+ let l = fn(c ? e : i);
730
+ try {
731
+ for (; o = l.nextNode();) hn(o), xn(o), Y(o.content) && Sn(o.content);
732
+ } catch (t) {
733
+ throw c && G(e), t;
734
+ }
735
+ if (c) return de(t.removed, (e) => {
736
+ e.element && un(e.element);
737
+ }), I && q(e), e;
738
+ if (Ot) {
739
+ if (I && q(i), kt) for (s = st.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
740
+ else s = i;
741
+ return (N.shadowroot || N.shadowrootmode) && (s = D.call(r, s, !0)), s;
742
+ }
743
+ let u = L ? i.outerHTML : i.innerHTML;
744
+ return L && M["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && b(Ze, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), I && (u = pn(u)), m && At ? v(u) : u;
745
+ }, t.setConfig = function() {
746
+ nn(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), wt = !0, Tt = M, Et = N;
747
+ }, t.clearConfig = function() {
748
+ H = null, wt = !1, Tt = null, Et = null, m = le, _ = "";
749
+ }, t.isValidAttribute = function(e, t, n) {
750
+ return H || nn({}), gn(V(e), V(t), n);
751
+ }, t.addHook = function(e, t) {
752
+ typeof t == "function" && y(O, e) && me(O[e], t);
753
+ }, t.removeHook = function(e, t) {
754
+ if (y(O, e)) {
755
+ if (t !== void 0) {
756
+ let n = fe(O[e], t);
757
+ return n === -1 ? void 0 : he(O[e], n, 1)[0];
758
+ }
759
+ return pe(O[e]);
760
+ }
761
+ }, t.removeHooks = function(e) {
762
+ y(O, e) && (O[e] = []);
763
+ }, t.removeAllHooks = function() {
764
+ O = at();
765
+ }, t;
766
+ }
767
+ var st = ot();
768
+ //#endregion
769
+ //#region node_modules/marked/lib/marked.esm.js
770
+ function ct() {
771
+ return {
772
+ async: !1,
773
+ breaks: !1,
774
+ extensions: null,
775
+ gfm: !0,
776
+ hooks: null,
777
+ pedantic: !1,
778
+ renderer: null,
779
+ silent: !1,
780
+ tokenizer: null,
781
+ walkTokens: null
782
+ };
783
+ }
784
+ var D = ct();
785
+ function O(e) {
786
+ D = e;
787
+ }
788
+ var k = { exec: () => null };
789
+ function lt(e) {
790
+ let t = [];
791
+ return (n) => {
792
+ let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
793
+ return i || (i = e(r), t[r] = i), i;
794
+ };
795
+ }
796
+ function A(e, t = "") {
797
+ let n = typeof e == "string" ? e : e.source, r = {
798
+ replace: (e, t) => {
799
+ let i = typeof t == "string" ? t : t.source;
800
+ return i = i.replace(j.caret, "$1"), n = n.replace(e, i), r;
801
+ },
802
+ getRegex: () => new RegExp(n, t)
803
+ };
804
+ return r;
805
+ }
806
+ var ut = ((e = "") => {
807
+ try {
808
+ return !!RegExp("(?<=1)(?<!1)" + e);
809
+ } catch {
810
+ return !1;
811
+ }
812
+ })(), j = {
813
+ codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
814
+ outputLinkReplace: /\\([\[\]])/g,
815
+ indentCodeCompensation: /^(\s+)(?:```)/,
816
+ beginningSpace: /^\s+/,
817
+ endingHash: /#$/,
818
+ startingSpaceChar: /^ /,
819
+ endingSpaceChar: / $/,
820
+ nonSpaceChar: /[^ ]/,
821
+ newLineCharGlobal: /\n/g,
822
+ tabCharGlobal: /\t/g,
823
+ multipleSpaceGlobal: /\s+/g,
824
+ blankLine: /^[ \t]*$/,
825
+ doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
826
+ blockquoteStart: /^ {0,3}>/,
827
+ blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
828
+ blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
829
+ listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
830
+ listIsTask: /^\[[ xX]\] +\S/,
831
+ listReplaceTask: /^\[[ xX]\] +/,
832
+ listTaskCheckbox: /\[[ xX]\]/,
833
+ anyLine: /\n.*\n/,
834
+ hrefBrackets: /^<(.*)>$/,
835
+ tableDelimiter: /[:|]/,
836
+ tableAlignChars: /^\||\| *$/g,
837
+ tableRowBlankLine: /\n[ \t]*$/,
838
+ tableAlignRight: /^ *-+: *$/,
839
+ tableAlignCenter: /^ *:-+: *$/,
840
+ tableAlignLeft: /^ *:-+ *$/,
841
+ startATag: /^<a /i,
842
+ endATag: /^<\/a>/i,
843
+ startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
844
+ endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
845
+ startAngleBracket: /^</,
846
+ endAngleBracket: />$/,
847
+ pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
848
+ unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
849
+ escapeTest: /[&<>"']/,
850
+ escapeReplace: /[&<>"']/g,
851
+ escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
852
+ escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
853
+ caret: /(^|[^\[])\^/g,
854
+ percentDecode: /%25/g,
855
+ findPipe: /\|/g,
856
+ splitPipe: / \|/,
857
+ slashPipe: /\\\|/g,
858
+ carriageReturn: /\r\n|\r/g,
859
+ spaceLine: /^ +$/gm,
860
+ notSpaceStart: /^\S*/,
861
+ endingNewline: /\n$/,
862
+ listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
863
+ nextBulletRegex: lt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
864
+ hrRegex: lt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
865
+ fencesBeginRegex: lt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
866
+ headingBeginRegex: lt((e) => RegExp(`^ {0,${e}}#`)),
867
+ htmlBeginRegex: lt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
868
+ blockquoteBeginRegex: lt((e) => RegExp(`^ {0,${e}}>`))
869
+ }, dt = /^(?:[ \t]*(?:\n|$))+/, ft = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, pt = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, mt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, M = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ht = / {0,3}(?:[*+-]|\d{1,9}[.)])/, N = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, gt = A(N).replace(/bull/g, ht).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(), P = A(N).replace(/bull/g, ht).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(), _t = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, vt = /^[^\n]+/, F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, yt = A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), bt = A(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, ht).getRegex(), xt = "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", St = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, I = A("^ {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", St).replace("tag", xt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ct = A(_t).replace("hr", mt).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", xt).getRegex(), L = {
870
+ blockquote: A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ct).getRegex(),
871
+ code: ft,
872
+ def: yt,
873
+ fences: pt,
874
+ heading: M,
875
+ hr: mt,
876
+ html: I,
877
+ lheading: gt,
878
+ list: bt,
879
+ newline: dt,
880
+ paragraph: Ct,
881
+ table: k,
882
+ text: vt
883
+ }, wt = A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", mt).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", xt).getRegex(), Tt = {
884
+ ...L,
885
+ lheading: P,
886
+ table: wt,
887
+ paragraph: A(_t).replace("hr", mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", wt).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", xt).getRegex()
888
+ }, Et = {
889
+ ...L,
890
+ html: A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", St).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(),
891
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
892
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
893
+ fences: k,
894
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
895
+ paragraph: A(_t).replace("hr", mt).replace("heading", " *#{1,6} *[^\n]").replace("lheading", gt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
896
+ }, Dt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ot = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, kt = /^( {2,}|\\)\n(?!\s*$)/, At = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, R = /[\p{P}\p{S}]/u, jt = /[\s\p{P}\p{S}]/u, Mt = /[^\s\p{P}\p{S}]/u, Nt = A(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, jt).getRegex(), Pt = /(?!~)[\p{P}\p{S}]/u, Ft = /(?!~)[\s\p{P}\p{S}]/u, z = /(?:[^\s\p{P}\p{S}]|~)/u, It = A(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ut ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Lt = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rt = A(Lt, "u").replace(/punct/g, R).getRegex(), zt = A(Lt, "u").replace(/punct/g, Pt).getRegex(), Bt = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Vt = A(Bt, "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Ht = A(Bt, "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, Ft).replace(/punct/g, Pt).getRegex(), B = A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Ut = A(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, R).getRegex(), Wt = A("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Gt = A(/\\(punct)/, "gu").replace(/punct/g, R).getRegex(), Kt = A(/^<(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(), qt = A(St).replace("(?:-->|$)", "-->").getRegex(), Jt = A("^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", qt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Yt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Xt = A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Yt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Zt = A(/^!?\[(label)\]\[(ref)\]/).replace("label", Yt).replace("ref", F).getRegex(), Qt = A(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(), $t = A("reflink|nolink(?!\\()", "g").replace("reflink", Zt).replace("nolink", Qt).getRegex(), V = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, H = {
897
+ _backpedal: k,
898
+ anyPunctuation: Gt,
899
+ autolink: Kt,
900
+ blockSkip: It,
901
+ br: kt,
902
+ code: Ot,
903
+ del: k,
904
+ delLDelim: k,
905
+ delRDelim: k,
906
+ emStrongLDelim: Rt,
907
+ emStrongRDelimAst: Vt,
908
+ emStrongRDelimUnd: B,
909
+ escape: Dt,
910
+ link: Xt,
911
+ nolink: Qt,
912
+ punctuation: Nt,
913
+ reflink: Zt,
914
+ reflinkSearch: $t,
915
+ tag: Jt,
916
+ text: At,
917
+ url: k
918
+ }, en = {
919
+ ...H,
920
+ link: A(/^!?\[(label)\]\((.*?)\)/).replace("label", Yt).getRegex(),
921
+ reflink: A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Yt).getRegex()
922
+ }, tn = {
923
+ ...H,
924
+ emStrongRDelimAst: Ht,
925
+ emStrongLDelim: zt,
926
+ delLDelim: Ut,
927
+ delRDelim: Wt,
928
+ url: A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", V).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
929
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
930
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
931
+ text: A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", V).getRegex()
932
+ }, nn = {
933
+ ...tn,
934
+ br: A(kt).replace("{2,}", "*").getRegex(),
935
+ text: A(tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
936
+ }, rn = {
937
+ normal: L,
938
+ gfm: Tt,
939
+ pedantic: Et
940
+ }, an = {
941
+ normal: H,
942
+ gfm: tn,
943
+ breaks: nn,
944
+ pedantic: en
945
+ }, on = {
946
+ "&": "&amp;",
947
+ "<": "&lt;",
948
+ ">": "&gt;",
949
+ "\"": "&quot;",
950
+ "'": "&#39;"
951
+ }, sn = (e) => on[e];
952
+ function U(e, t) {
953
+ if (t) {
954
+ if (j.escapeTest.test(e)) return e.replace(j.escapeReplace, sn);
955
+ } else if (j.escapeTestNoEncode.test(e)) return e.replace(j.escapeReplaceNoEncode, sn);
956
+ return e;
957
+ }
958
+ function cn(e) {
959
+ try {
960
+ e = encodeURI(e).replace(j.percentDecode, "%");
961
+ } catch {
962
+ return null;
963
+ }
964
+ return e;
965
+ }
966
+ function W(e, t) {
967
+ let n = e.replace(j.findPipe, (e, t, n) => {
968
+ let r = !1, i = t;
969
+ for (; --i >= 0 && n[i] === "\\";) r = !r;
970
+ return r ? "|" : " |";
971
+ }).split(j.splitPipe), r = 0;
972
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
973
+ else for (; n.length < t;) n.push("");
974
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(j.slashPipe, "|");
975
+ return n;
976
+ }
977
+ function G(e, t, n) {
978
+ let r = e.length;
979
+ if (r === 0) return "";
980
+ let i = 0;
981
+ for (; i < r;) {
982
+ let a = e.charAt(r - i - 1);
983
+ if (a === t && !n) i++;
984
+ else if (a !== t && n) i++;
985
+ else break;
986
+ }
987
+ return e.slice(0, r - i);
988
+ }
989
+ function K(e) {
990
+ let t = e.split("\n"), n = t.length - 1;
991
+ for (; n >= 0 && j.blankLine.test(t[n]);) n--;
992
+ return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
993
+ }
994
+ function ln(e, t) {
995
+ if (e.indexOf(t[1]) === -1) return -1;
996
+ let n = 0;
997
+ for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
998
+ else if (e[r] === t[0]) n++;
999
+ else if (e[r] === t[1] && (n--, n < 0)) return r;
1000
+ return n > 0 ? -2 : -1;
1001
+ }
1002
+ function un(e, t = 0) {
1003
+ let n = t, r = "";
1004
+ for (let t of e) if (t === " ") {
1005
+ let e = 4 - n % 4;
1006
+ r += " ".repeat(e), n += e;
1007
+ } else r += t, n++;
1008
+ return r;
1009
+ }
1010
+ function dn(e, t, n, r, i) {
1011
+ let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1012
+ r.state.inLink = !0;
1013
+ let c = {
1014
+ type: e[0].charAt(0) === "!" ? "image" : "link",
1015
+ raw: n,
1016
+ href: a,
1017
+ title: o,
1018
+ text: s,
1019
+ tokens: r.inlineTokens(s)
1020
+ };
1021
+ return r.state.inLink = !1, c;
1022
+ }
1023
+ function fn(e, t, n) {
1024
+ let r = e.match(n.other.indentCodeCompensation);
1025
+ if (r === null) return t;
1026
+ let i = r[1];
1027
+ return t.split("\n").map((e) => {
1028
+ let t = e.match(n.other.beginningSpace);
1029
+ if (t === null) return e;
1030
+ let [r] = t;
1031
+ return r.length >= i.length ? e.slice(i.length) : e;
1032
+ }).join("\n");
1033
+ }
1034
+ var pn = class {
1035
+ options;
1036
+ rules;
1037
+ lexer;
1038
+ constructor(e) {
1039
+ this.options = e || D;
1040
+ }
1041
+ space(e) {
1042
+ let t = this.rules.block.newline.exec(e);
1043
+ if (t && t[0].length > 0) return {
1044
+ type: "space",
1045
+ raw: t[0]
1046
+ };
1047
+ }
1048
+ code(e) {
1049
+ let t = this.rules.block.code.exec(e);
1050
+ if (t) {
1051
+ let e = this.options.pedantic ? t[0] : K(t[0]);
1052
+ return {
1053
+ type: "code",
1054
+ raw: e,
1055
+ codeBlockStyle: "indented",
1056
+ text: e.replace(this.rules.other.codeRemoveIndent, "")
1057
+ };
1058
+ }
1059
+ }
1060
+ fences(e) {
1061
+ let t = this.rules.block.fences.exec(e);
1062
+ if (t) {
1063
+ let e = t[0], n = fn(e, t[3] || "", this.rules);
1064
+ return {
1065
+ type: "code",
1066
+ raw: e,
1067
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1068
+ text: n
1069
+ };
1070
+ }
1071
+ }
1072
+ heading(e) {
1073
+ let t = this.rules.block.heading.exec(e);
1074
+ if (t) {
1075
+ let e = t[2].trim();
1076
+ if (this.rules.other.endingHash.test(e)) {
1077
+ let t = G(e, "#");
1078
+ (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1079
+ }
1080
+ return {
1081
+ type: "heading",
1082
+ raw: G(t[0], "\n"),
1083
+ depth: t[1].length,
1084
+ text: e,
1085
+ tokens: this.lexer.inline(e)
1086
+ };
1087
+ }
1088
+ }
1089
+ hr(e) {
1090
+ let t = this.rules.block.hr.exec(e);
1091
+ if (t) return {
1092
+ type: "hr",
1093
+ raw: G(t[0], "\n")
1094
+ };
1095
+ }
1096
+ blockquote(e) {
1097
+ let t = this.rules.block.blockquote.exec(e);
1098
+ if (t) {
1099
+ let e = G(t[0], "\n").split("\n"), n = "", r = "", i = [];
1100
+ for (; e.length > 0;) {
1101
+ let t = !1, a = [], o;
1102
+ for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1103
+ else if (!t) a.push(e[o]);
1104
+ else break;
1105
+ e = e.slice(o);
1106
+ let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1107
+ n = n ? `${n}
1108
+ ${s}` : s, r = r ? `${r}
1109
+ ${c}` : c;
1110
+ let l = this.lexer.state.top;
1111
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1112
+ let u = i.at(-1);
1113
+ if (u?.type === "code") break;
1114
+ if (u?.type === "blockquote") {
1115
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1116
+ 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;
1117
+ break;
1118
+ } else if (u?.type === "list") {
1119
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1120
+ 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");
1121
+ continue;
1122
+ }
1123
+ }
1124
+ return {
1125
+ type: "blockquote",
1126
+ raw: n,
1127
+ tokens: i,
1128
+ text: r
1129
+ };
1130
+ }
1131
+ }
1132
+ list(e) {
1133
+ let t = this.rules.block.list.exec(e);
1134
+ if (t) {
1135
+ let n = t[1].trim(), r = n.length > 1, i = {
1136
+ type: "list",
1137
+ raw: "",
1138
+ ordered: r,
1139
+ start: r ? +n.slice(0, -1) : "",
1140
+ loose: !1,
1141
+ items: []
1142
+ };
1143
+ n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1144
+ let a = this.rules.other.listItemRegex(n), o = !1;
1145
+ for (; e;) {
1146
+ let n = !1, r = "", s = "";
1147
+ if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1148
+ r = t[0], e = e.substring(r.length);
1149
+ let c = un(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1150
+ 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) {
1151
+ 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), ee = this.rules.other.blockquoteBeginRegex(d);
1152
+ for (; e;) {
1153
+ let te = e.split("\n", 1)[0], ne;
1154
+ if (l = te, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), ne = l) : ne = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || ee.test(l) || t.test(l) || n.test(l)) break;
1155
+ if (ne.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ne.slice(d);
1156
+ else {
1157
+ if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1158
+ s += "\n" + l;
1159
+ }
1160
+ u = !l.trim(), r += te + "\n", e = e.substring(te.length + 1), c = ne.slice(d);
1161
+ }
1162
+ }
1163
+ i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1164
+ type: "list_item",
1165
+ raw: r,
1166
+ task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1167
+ loose: !1,
1168
+ text: s,
1169
+ tokens: []
1170
+ }), i.raw += r;
1171
+ }
1172
+ let s = i.items.at(-1);
1173
+ if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1174
+ else return;
1175
+ i.raw = i.raw.trimEnd();
1176
+ for (let e of i.items) {
1177
+ this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1178
+ let t = e.tokens[0];
1179
+ if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1180
+ 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, "");
1181
+ for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1182
+ this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1183
+ break;
1184
+ }
1185
+ let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1186
+ if (n) {
1187
+ let t = {
1188
+ type: "checkbox",
1189
+ raw: n[0] + " ",
1190
+ checked: n[0] !== "[ ]"
1191
+ };
1192
+ 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({
1193
+ type: "paragraph",
1194
+ raw: t.raw,
1195
+ text: t.raw,
1196
+ tokens: [t]
1197
+ }) : e.tokens.unshift(t);
1198
+ }
1199
+ } else e.task &&= !1;
1200
+ if (!i.loose) {
1201
+ let t = e.tokens.filter((e) => e.type === "space");
1202
+ i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1203
+ }
1204
+ }
1205
+ if (i.loose) for (let e of i.items) {
1206
+ e.loose = !0;
1207
+ for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1208
+ }
1209
+ return i;
1210
+ }
1211
+ }
1212
+ html(e) {
1213
+ let t = this.rules.block.html.exec(e);
1214
+ if (t) {
1215
+ let e = K(t[0]);
1216
+ return {
1217
+ type: "html",
1218
+ block: !0,
1219
+ raw: e,
1220
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1221
+ text: e
1222
+ };
1223
+ }
1224
+ }
1225
+ def(e) {
1226
+ let t = this.rules.block.def.exec(e);
1227
+ if (t) {
1228
+ 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];
1229
+ return {
1230
+ type: "def",
1231
+ tag: e,
1232
+ raw: G(t[0], "\n"),
1233
+ href: n,
1234
+ title: r
1235
+ };
1236
+ }
1237
+ }
1238
+ table(e) {
1239
+ let t = this.rules.block.table.exec(e);
1240
+ if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1241
+ let n = W(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 = {
1242
+ type: "table",
1243
+ raw: G(t[0], "\n"),
1244
+ header: [],
1245
+ align: [],
1246
+ rows: []
1247
+ };
1248
+ if (n.length === r.length) {
1249
+ 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);
1250
+ for (let e = 0; e < n.length; e++) a.header.push({
1251
+ text: n[e],
1252
+ tokens: this.lexer.inline(n[e]),
1253
+ header: !0,
1254
+ align: a.align[e]
1255
+ });
1256
+ for (let e of i) a.rows.push(W(e, a.header.length).map((e, t) => ({
1257
+ text: e,
1258
+ tokens: this.lexer.inline(e),
1259
+ header: !1,
1260
+ align: a.align[t]
1261
+ })));
1262
+ return a;
1263
+ }
1264
+ }
1265
+ lheading(e) {
1266
+ let t = this.rules.block.lheading.exec(e);
1267
+ if (t) {
1268
+ let e = t[1].trim();
1269
+ return {
1270
+ type: "heading",
1271
+ raw: G(t[0], "\n"),
1272
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
1273
+ text: e,
1274
+ tokens: this.lexer.inline(e)
1275
+ };
1276
+ }
1277
+ }
1278
+ paragraph(e) {
1279
+ let t = this.rules.block.paragraph.exec(e);
1280
+ if (t) {
1281
+ let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1282
+ return {
1283
+ type: "paragraph",
1284
+ raw: t[0],
1285
+ text: e,
1286
+ tokens: this.lexer.inline(e)
1287
+ };
1288
+ }
1289
+ }
1290
+ text(e) {
1291
+ let t = this.rules.block.text.exec(e);
1292
+ if (t) return {
1293
+ type: "text",
1294
+ raw: t[0],
1295
+ text: t[0],
1296
+ tokens: this.lexer.inline(t[0])
1297
+ };
1298
+ }
1299
+ escape(e) {
1300
+ let t = this.rules.inline.escape.exec(e);
1301
+ if (t) return {
1302
+ type: "escape",
1303
+ raw: t[0],
1304
+ text: t[1]
1305
+ };
1306
+ }
1307
+ tag(e) {
1308
+ let t = this.rules.inline.tag.exec(e);
1309
+ 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), {
1310
+ type: "html",
1311
+ raw: t[0],
1312
+ inLink: this.lexer.state.inLink,
1313
+ inRawBlock: this.lexer.state.inRawBlock,
1314
+ block: !1,
1315
+ text: t[0]
1316
+ };
1317
+ }
1318
+ link(e) {
1319
+ let t = this.rules.inline.link.exec(e);
1320
+ if (t) {
1321
+ let e = t[2].trim();
1322
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1323
+ if (!this.rules.other.endAngleBracket.test(e)) return;
1324
+ let t = G(e.slice(0, -1), "\\");
1325
+ if ((e.length - t.length) % 2 == 0) return;
1326
+ } else {
1327
+ let e = ln(t[2], "()");
1328
+ if (e === -2) return;
1329
+ if (e > -1) {
1330
+ let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1331
+ t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1332
+ }
1333
+ }
1334
+ let n = t[2], r = "";
1335
+ if (this.options.pedantic) {
1336
+ let e = this.rules.other.pedanticHrefTitle.exec(n);
1337
+ e && (n = e[1], r = e[3]);
1338
+ } else r = t[3] ? t[3].slice(1, -1) : "";
1339
+ 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)), dn(t, {
1340
+ href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1341
+ title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1342
+ }, t[0], this.lexer, this.rules);
1343
+ }
1344
+ }
1345
+ reflink(e, t) {
1346
+ let n;
1347
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1348
+ let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1349
+ if (!e) {
1350
+ let e = n[0].charAt(0);
1351
+ return {
1352
+ type: "text",
1353
+ raw: e,
1354
+ text: e
1355
+ };
1356
+ }
1357
+ return dn(n, e, n[0], this.lexer, this.rules);
1358
+ }
1359
+ }
1360
+ emStrong(e, t, n = "") {
1361
+ let r = this.rules.inline.emStrongLDelim.exec(e);
1362
+ 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))) {
1363
+ let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1364
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1365
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1366
+ if (a = [...i].length, r[3] || r[4]) {
1367
+ o += a;
1368
+ continue;
1369
+ } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1370
+ s += a;
1371
+ continue;
1372
+ }
1373
+ if (o -= a, o > 0) continue;
1374
+ a = Math.min(a, a + o + s);
1375
+ let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1376
+ if (Math.min(n, a) % 2) {
1377
+ let e = c.slice(1, -1);
1378
+ return {
1379
+ type: "em",
1380
+ raw: c,
1381
+ text: e,
1382
+ tokens: this.lexer.inlineTokens(e)
1383
+ };
1384
+ }
1385
+ let l = c.slice(2, -2);
1386
+ return {
1387
+ type: "strong",
1388
+ raw: c,
1389
+ text: l,
1390
+ tokens: this.lexer.inlineTokens(l)
1391
+ };
1392
+ }
1393
+ }
1394
+ }
1395
+ codespan(e) {
1396
+ let t = this.rules.inline.code.exec(e);
1397
+ if (t) {
1398
+ 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);
1399
+ return n && r && (e = e.substring(1, e.length - 1)), {
1400
+ type: "codespan",
1401
+ raw: t[0],
1402
+ text: e
1403
+ };
1404
+ }
1405
+ }
1406
+ br(e) {
1407
+ let t = this.rules.inline.br.exec(e);
1408
+ if (t) return {
1409
+ type: "br",
1410
+ raw: t[0]
1411
+ };
1412
+ }
1413
+ del(e, t, n = "") {
1414
+ let r = this.rules.inline.delLDelim.exec(e);
1415
+ if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1416
+ let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1417
+ for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1418
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1419
+ if (r[3] || r[4]) {
1420
+ o += a;
1421
+ continue;
1422
+ }
1423
+ if (o -= a, o > 0) continue;
1424
+ a = Math.min(a, a + o);
1425
+ let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1426
+ return {
1427
+ type: "del",
1428
+ raw: s,
1429
+ text: c,
1430
+ tokens: this.lexer.inlineTokens(c)
1431
+ };
1432
+ }
1433
+ }
1434
+ }
1435
+ autolink(e) {
1436
+ let t = this.rules.inline.autolink.exec(e);
1437
+ if (t) {
1438
+ let e, n;
1439
+ return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1440
+ type: "link",
1441
+ raw: t[0],
1442
+ text: e,
1443
+ href: n,
1444
+ tokens: [{
1445
+ type: "text",
1446
+ raw: e,
1447
+ text: e
1448
+ }]
1449
+ };
1450
+ }
1451
+ }
1452
+ url(e) {
1453
+ let t;
1454
+ if (t = this.rules.inline.url.exec(e)) {
1455
+ let e, n;
1456
+ if (t[2] === "@") e = t[0], n = "mailto:" + e;
1457
+ else {
1458
+ let r;
1459
+ do
1460
+ r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1461
+ while (r !== t[0]);
1462
+ e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1463
+ }
1464
+ return {
1465
+ type: "link",
1466
+ raw: t[0],
1467
+ text: e,
1468
+ href: n,
1469
+ tokens: [{
1470
+ type: "text",
1471
+ raw: e,
1472
+ text: e
1473
+ }]
1474
+ };
1475
+ }
1476
+ }
1477
+ inlineText(e) {
1478
+ let t = this.rules.inline.text.exec(e);
1479
+ if (t) {
1480
+ let e = this.lexer.state.inRawBlock;
1481
+ return {
1482
+ type: "text",
1483
+ raw: t[0],
1484
+ text: t[0],
1485
+ escaped: e
1486
+ };
1487
+ }
1488
+ }
1489
+ }, q = class e {
1490
+ tokens;
1491
+ options;
1492
+ state;
1493
+ inlineQueue;
1494
+ tokenizer;
1495
+ constructor(e) {
1496
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || D, this.options.tokenizer = this.options.tokenizer || new pn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1497
+ inLink: !1,
1498
+ inRawBlock: !1,
1499
+ top: !0
1500
+ };
1501
+ let t = {
1502
+ other: j,
1503
+ block: rn.normal,
1504
+ inline: an.normal
1505
+ };
1506
+ this.options.pedantic ? (t.block = rn.pedantic, t.inline = an.pedantic) : this.options.gfm && (t.block = rn.gfm, this.options.breaks ? t.inline = an.breaks : t.inline = an.gfm), this.tokenizer.rules = t;
1507
+ }
1508
+ static get rules() {
1509
+ return {
1510
+ block: rn,
1511
+ inline: an
1512
+ };
1513
+ }
1514
+ static lex(t, n) {
1515
+ return new e(n).lex(t);
1516
+ }
1517
+ static lexInline(t, n) {
1518
+ return new e(n).inlineTokens(t);
1519
+ }
1520
+ lex(e) {
1521
+ e = e.replace(j.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1522
+ for (let e = 0; e < this.inlineQueue.length; e++) {
1523
+ let t = this.inlineQueue[e];
1524
+ this.inlineTokens(t.src, t.tokens);
1525
+ }
1526
+ return this.inlineQueue = [], this.tokens;
1527
+ }
1528
+ blockTokens(e, t = [], n = !1) {
1529
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(j.tabCharGlobal, " ").replace(j.spaceLine, ""));
1530
+ let r = Infinity;
1531
+ for (; e;) {
1532
+ if (e.length < r) r = e.length;
1533
+ else {
1534
+ this.infiniteLoopError(e.charCodeAt(0));
1535
+ break;
1536
+ }
1537
+ let i;
1538
+ 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;
1539
+ if (i = this.tokenizer.space(e)) {
1540
+ e = e.substring(i.raw.length);
1541
+ let n = t.at(-1);
1542
+ i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1543
+ continue;
1544
+ }
1545
+ if (i = this.tokenizer.code(e)) {
1546
+ e = e.substring(i.raw.length);
1547
+ let n = t.at(-1);
1548
+ 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);
1549
+ continue;
1550
+ }
1551
+ if (i = this.tokenizer.fences(e)) {
1552
+ e = e.substring(i.raw.length), t.push(i);
1553
+ continue;
1554
+ }
1555
+ if (i = this.tokenizer.heading(e)) {
1556
+ e = e.substring(i.raw.length), t.push(i);
1557
+ continue;
1558
+ }
1559
+ if (i = this.tokenizer.hr(e)) {
1560
+ e = e.substring(i.raw.length), t.push(i);
1561
+ continue;
1562
+ }
1563
+ if (i = this.tokenizer.blockquote(e)) {
1564
+ e = e.substring(i.raw.length), t.push(i);
1565
+ continue;
1566
+ }
1567
+ if (i = this.tokenizer.list(e)) {
1568
+ e = e.substring(i.raw.length), t.push(i);
1569
+ continue;
1570
+ }
1571
+ if (i = this.tokenizer.html(e)) {
1572
+ e = e.substring(i.raw.length), t.push(i);
1573
+ continue;
1574
+ }
1575
+ if (i = this.tokenizer.def(e)) {
1576
+ e = e.substring(i.raw.length);
1577
+ let n = t.at(-1);
1578
+ 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] = {
1579
+ href: i.href,
1580
+ title: i.title
1581
+ }, t.push(i));
1582
+ continue;
1583
+ }
1584
+ if (i = this.tokenizer.table(e)) {
1585
+ e = e.substring(i.raw.length), t.push(i);
1586
+ continue;
1587
+ }
1588
+ if (i = this.tokenizer.lheading(e)) {
1589
+ e = e.substring(i.raw.length), t.push(i);
1590
+ continue;
1591
+ }
1592
+ let a = e;
1593
+ if (this.options.extensions?.startBlock) {
1594
+ let t = Infinity, n = e.slice(1), r;
1595
+ this.options.extensions.startBlock.forEach((e) => {
1596
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1597
+ }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1598
+ }
1599
+ if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1600
+ let r = t.at(-1);
1601
+ 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);
1602
+ continue;
1603
+ }
1604
+ if (i = this.tokenizer.text(e)) {
1605
+ e = e.substring(i.raw.length);
1606
+ let n = t.at(-1);
1607
+ 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);
1608
+ continue;
1609
+ }
1610
+ if (e) {
1611
+ this.infiniteLoopError(e.charCodeAt(0));
1612
+ break;
1613
+ }
1614
+ }
1615
+ return this.state.top = !0, t;
1616
+ }
1617
+ inline(e, t = []) {
1618
+ return this.inlineQueue.push({
1619
+ src: e,
1620
+ tokens: t
1621
+ }), t;
1622
+ }
1623
+ inlineTokens(e, t = []) {
1624
+ this.tokenizer.lexer = this;
1625
+ let n = e, r = null;
1626
+ if (this.tokens.links) {
1627
+ let e = Object.keys(this.tokens.links);
1628
+ 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));
1629
+ }
1630
+ for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1631
+ let i;
1632
+ 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);
1633
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1634
+ let a = !1, o = "", s = Infinity;
1635
+ for (; e;) {
1636
+ if (e.length < s) s = e.length;
1637
+ else {
1638
+ this.infiniteLoopError(e.charCodeAt(0));
1639
+ break;
1640
+ }
1641
+ a || (o = ""), a = !1;
1642
+ let r;
1643
+ 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;
1644
+ if (r = this.tokenizer.escape(e)) {
1645
+ e = e.substring(r.raw.length), t.push(r);
1646
+ continue;
1647
+ }
1648
+ if (r = this.tokenizer.tag(e)) {
1649
+ e = e.substring(r.raw.length), t.push(r);
1650
+ continue;
1651
+ }
1652
+ if (r = this.tokenizer.link(e)) {
1653
+ e = e.substring(r.raw.length), t.push(r);
1654
+ continue;
1655
+ }
1656
+ if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1657
+ e = e.substring(r.raw.length);
1658
+ let n = t.at(-1);
1659
+ r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1660
+ continue;
1661
+ }
1662
+ if (r = this.tokenizer.emStrong(e, n, o)) {
1663
+ e = e.substring(r.raw.length), t.push(r);
1664
+ continue;
1665
+ }
1666
+ if (r = this.tokenizer.codespan(e)) {
1667
+ e = e.substring(r.raw.length), t.push(r);
1668
+ continue;
1669
+ }
1670
+ if (r = this.tokenizer.br(e)) {
1671
+ e = e.substring(r.raw.length), t.push(r);
1672
+ continue;
1673
+ }
1674
+ if (r = this.tokenizer.del(e, n, o)) {
1675
+ e = e.substring(r.raw.length), t.push(r);
1676
+ continue;
1677
+ }
1678
+ if (r = this.tokenizer.autolink(e)) {
1679
+ e = e.substring(r.raw.length), t.push(r);
1680
+ continue;
1681
+ }
1682
+ if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1683
+ e = e.substring(r.raw.length), t.push(r);
1684
+ continue;
1685
+ }
1686
+ let i = e;
1687
+ if (this.options.extensions?.startInline) {
1688
+ let t = Infinity, n = e.slice(1), r;
1689
+ this.options.extensions.startInline.forEach((e) => {
1690
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1691
+ }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1692
+ }
1693
+ if (r = this.tokenizer.inlineText(i)) {
1694
+ e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1695
+ let n = t.at(-1);
1696
+ n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1697
+ continue;
1698
+ }
1699
+ if (e) {
1700
+ this.infiniteLoopError(e.charCodeAt(0));
1701
+ break;
1702
+ }
1703
+ }
1704
+ return t;
1705
+ }
1706
+ infiniteLoopError(e) {
1707
+ let t = "Infinite loop on byte: " + e;
1708
+ if (this.options.silent) console.error(t);
1709
+ else throw Error(t);
1710
+ }
1711
+ }, J = class {
1712
+ options;
1713
+ parser;
1714
+ constructor(e) {
1715
+ this.options = e || D;
1716
+ }
1717
+ space(e) {
1718
+ return "";
1719
+ }
1720
+ code({ text: e, lang: t, escaped: n }) {
1721
+ let r = (t || "").match(j.notSpaceStart)?.[0], i = e.replace(j.endingNewline, "") + "\n";
1722
+ 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";
1723
+ }
1724
+ blockquote({ tokens: e }) {
1725
+ return `<blockquote>
1726
+ ${this.parser.parse(e)}</blockquote>
1727
+ `;
1728
+ }
1729
+ html({ text: e }) {
1730
+ return e;
1731
+ }
1732
+ def(e) {
1733
+ return "";
1734
+ }
1735
+ heading({ tokens: e, depth: t }) {
1736
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1737
+ `;
1738
+ }
1739
+ hr(e) {
1740
+ return "<hr>\n";
1741
+ }
1742
+ list(e) {
1743
+ let t = e.ordered, n = e.start, r = "";
1744
+ for (let t = 0; t < e.items.length; t++) {
1745
+ let n = e.items[t];
1746
+ r += this.listitem(n);
1747
+ }
1748
+ let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1749
+ return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1750
+ }
1751
+ listitem(e) {
1752
+ return `<li>${this.parser.parse(e.tokens)}</li>
1753
+ `;
1754
+ }
1755
+ checkbox({ checked: e }) {
1756
+ return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1757
+ }
1758
+ paragraph({ tokens: e }) {
1759
+ return `<p>${this.parser.parseInline(e)}</p>
1760
+ `;
1761
+ }
1762
+ table(e) {
1763
+ let t = "", n = "";
1764
+ for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1765
+ t += this.tablerow({ text: n });
1766
+ let r = "";
1767
+ for (let t = 0; t < e.rows.length; t++) {
1768
+ let i = e.rows[t];
1769
+ n = "";
1770
+ for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1771
+ r += this.tablerow({ text: n });
1772
+ }
1773
+ return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1774
+ }
1775
+ tablerow({ text: e }) {
1776
+ return `<tr>
1777
+ ${e}</tr>
1778
+ `;
1779
+ }
1780
+ tablecell(e) {
1781
+ let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1782
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1783
+ `;
1784
+ }
1785
+ strong({ tokens: e }) {
1786
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
1787
+ }
1788
+ em({ tokens: e }) {
1789
+ return `<em>${this.parser.parseInline(e)}</em>`;
1790
+ }
1791
+ codespan({ text: e }) {
1792
+ return `<code>${U(e, !0)}</code>`;
1793
+ }
1794
+ br(e) {
1795
+ return "<br>";
1796
+ }
1797
+ del({ tokens: e }) {
1798
+ return `<del>${this.parser.parseInline(e)}</del>`;
1799
+ }
1800
+ link({ href: e, title: t, tokens: n }) {
1801
+ let r = this.parser.parseInline(n), i = cn(e);
1802
+ if (i === null) return r;
1803
+ e = i;
1804
+ let a = "<a href=\"" + e + "\"";
1805
+ return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
1806
+ }
1807
+ image({ href: e, title: t, text: n, tokens: r }) {
1808
+ r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1809
+ let i = cn(e);
1810
+ if (i === null) return U(n);
1811
+ e = i;
1812
+ let a = `<img src="${e}" alt="${U(n)}"`;
1813
+ return t && (a += ` title="${U(t)}"`), a += ">", a;
1814
+ }
1815
+ text(e) {
1816
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1817
+ }
1818
+ }, Y = class {
1819
+ strong({ text: e }) {
1820
+ return e;
1821
+ }
1822
+ em({ text: e }) {
1823
+ return e;
1824
+ }
1825
+ codespan({ text: e }) {
1826
+ return e;
1827
+ }
1828
+ del({ text: e }) {
1829
+ return e;
1830
+ }
1831
+ html({ text: e }) {
1832
+ return e;
1833
+ }
1834
+ text({ text: e }) {
1835
+ return e;
1836
+ }
1837
+ link({ text: e }) {
1838
+ return "" + e;
1839
+ }
1840
+ image({ text: e }) {
1841
+ return "" + e;
1842
+ }
1843
+ br() {
1844
+ return "";
1845
+ }
1846
+ checkbox({ raw: e }) {
1847
+ return e;
1848
+ }
1849
+ }, X = class e {
1850
+ options;
1851
+ renderer;
1852
+ textRenderer;
1853
+ constructor(e) {
1854
+ this.options = e || D, 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 Y();
1855
+ }
1856
+ static parse(t, n) {
1857
+ return new e(n).parse(t);
1858
+ }
1859
+ static parseInline(t, n) {
1860
+ return new e(n).parseInline(t);
1861
+ }
1862
+ parse(e) {
1863
+ this.renderer.parser = this;
1864
+ let t = "";
1865
+ for (let n = 0; n < e.length; n++) {
1866
+ let r = e[n];
1867
+ if (this.options.extensions?.renderers?.[r.type]) {
1868
+ let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1869
+ if (n !== !1 || ![
1870
+ "space",
1871
+ "hr",
1872
+ "heading",
1873
+ "code",
1874
+ "table",
1875
+ "blockquote",
1876
+ "list",
1877
+ "html",
1878
+ "def",
1879
+ "paragraph",
1880
+ "text"
1881
+ ].includes(e.type)) {
1882
+ t += n || "";
1883
+ continue;
1884
+ }
1885
+ }
1886
+ let i = r;
1887
+ switch (i.type) {
1888
+ case "space":
1889
+ t += this.renderer.space(i);
1890
+ break;
1891
+ case "hr":
1892
+ t += this.renderer.hr(i);
1893
+ break;
1894
+ case "heading":
1895
+ t += this.renderer.heading(i);
1896
+ break;
1897
+ case "code":
1898
+ t += this.renderer.code(i);
1899
+ break;
1900
+ case "table":
1901
+ t += this.renderer.table(i);
1902
+ break;
1903
+ case "blockquote":
1904
+ t += this.renderer.blockquote(i);
1905
+ break;
1906
+ case "list":
1907
+ t += this.renderer.list(i);
1908
+ break;
1909
+ case "checkbox":
1910
+ t += this.renderer.checkbox(i);
1911
+ break;
1912
+ case "html":
1913
+ t += this.renderer.html(i);
1914
+ break;
1915
+ case "def":
1916
+ t += this.renderer.def(i);
1917
+ break;
1918
+ case "paragraph":
1919
+ t += this.renderer.paragraph(i);
1920
+ break;
1921
+ case "text":
1922
+ t += this.renderer.text(i);
1923
+ break;
1924
+ default: {
1925
+ let e = "Token with \"" + i.type + "\" type was not found.";
1926
+ if (this.options.silent) return console.error(e), "";
1927
+ throw Error(e);
1928
+ }
1929
+ }
1930
+ }
1931
+ return t;
1932
+ }
1933
+ parseInline(e, t = this.renderer) {
1934
+ this.renderer.parser = this;
1935
+ let n = "";
1936
+ for (let r = 0; r < e.length; r++) {
1937
+ let i = e[r];
1938
+ if (this.options.extensions?.renderers?.[i.type]) {
1939
+ let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1940
+ if (e !== !1 || ![
1941
+ "escape",
1942
+ "html",
1943
+ "link",
1944
+ "image",
1945
+ "strong",
1946
+ "em",
1947
+ "codespan",
1948
+ "br",
1949
+ "del",
1950
+ "text"
1951
+ ].includes(i.type)) {
1952
+ n += e || "";
1953
+ continue;
1954
+ }
1955
+ }
1956
+ let a = i;
1957
+ switch (a.type) {
1958
+ case "escape":
1959
+ n += t.text(a);
1960
+ break;
1961
+ case "html":
1962
+ n += t.html(a);
1963
+ break;
1964
+ case "link":
1965
+ n += t.link(a);
1966
+ break;
1967
+ case "image":
1968
+ n += t.image(a);
1969
+ break;
1970
+ case "checkbox":
1971
+ n += t.checkbox(a);
1972
+ break;
1973
+ case "strong":
1974
+ n += t.strong(a);
1975
+ break;
1976
+ case "em":
1977
+ n += t.em(a);
1978
+ break;
1979
+ case "codespan":
1980
+ n += t.codespan(a);
1981
+ break;
1982
+ case "br":
1983
+ n += t.br(a);
1984
+ break;
1985
+ case "del":
1986
+ n += t.del(a);
1987
+ break;
1988
+ case "text":
1989
+ n += t.text(a);
1990
+ break;
1991
+ default: {
1992
+ let e = "Token with \"" + a.type + "\" type was not found.";
1993
+ if (this.options.silent) return console.error(e), "";
1994
+ throw Error(e);
1995
+ }
1996
+ }
1997
+ }
1998
+ return n;
1999
+ }
2000
+ }, Z = class {
2001
+ options;
2002
+ block;
2003
+ constructor(e) {
2004
+ this.options = e || D;
2005
+ }
2006
+ static passThroughHooks = new Set([
2007
+ "preprocess",
2008
+ "postprocess",
2009
+ "processAllTokens",
2010
+ "emStrongMask"
2011
+ ]);
2012
+ static passThroughHooksRespectAsync = new Set([
2013
+ "preprocess",
2014
+ "postprocess",
2015
+ "processAllTokens"
2016
+ ]);
2017
+ preprocess(e) {
2018
+ return e;
2019
+ }
2020
+ postprocess(e) {
2021
+ return e;
2022
+ }
2023
+ processAllTokens(e) {
2024
+ return e;
2025
+ }
2026
+ emStrongMask(e) {
2027
+ return e;
2028
+ }
2029
+ provideLexer(e = this.block) {
2030
+ return e ? q.lex : q.lexInline;
2031
+ }
2032
+ provideParser(e = this.block) {
2033
+ return e ? X.parse : X.parseInline;
2034
+ }
2035
+ }, mn = new class {
2036
+ defaults = ct();
2037
+ options = this.setOptions;
2038
+ parse = this.parseMarkdown(!0);
2039
+ parseInline = this.parseMarkdown(!1);
2040
+ Parser = X;
2041
+ Renderer = J;
2042
+ TextRenderer = Y;
2043
+ Lexer = q;
2044
+ Tokenizer = pn;
2045
+ Hooks = Z;
2046
+ constructor(...e) {
2047
+ this.use(...e);
2048
+ }
2049
+ walkTokens(e, t) {
2050
+ let n = [];
2051
+ for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2052
+ case "table": {
2053
+ let e = r;
2054
+ for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2055
+ for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2056
+ break;
2057
+ }
2058
+ case "list": {
2059
+ let e = r;
2060
+ n = n.concat(this.walkTokens(e.items, t));
2061
+ break;
2062
+ }
2063
+ default: {
2064
+ let e = r;
2065
+ this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2066
+ let i = e[r].flat(Infinity);
2067
+ n = n.concat(this.walkTokens(i, t));
2068
+ }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2069
+ }
2070
+ }
2071
+ return n;
2072
+ }
2073
+ use(...e) {
2074
+ let t = this.defaults.extensions || {
2075
+ renderers: {},
2076
+ childTokens: {}
2077
+ };
2078
+ return e.forEach((e) => {
2079
+ let n = { ...e };
2080
+ if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2081
+ if (!e.name) throw Error("extension name required");
2082
+ if ("renderer" in e) {
2083
+ let n = t.renderers[e.name];
2084
+ n ? t.renderers[e.name] = function(...t) {
2085
+ let r = e.renderer.apply(this, t);
2086
+ return r === !1 && (r = n.apply(this, t)), r;
2087
+ } : t.renderers[e.name] = e.renderer;
2088
+ }
2089
+ if ("tokenizer" in e) {
2090
+ if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2091
+ let n = t[e.level];
2092
+ 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]));
2093
+ }
2094
+ "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2095
+ }), n.extensions = t), e.renderer) {
2096
+ let t = this.defaults.renderer || new J(this.defaults);
2097
+ for (let n in e.renderer) {
2098
+ if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2099
+ if (["options", "parser"].includes(n)) continue;
2100
+ let r = n, i = e.renderer[r], a = t[r];
2101
+ t[r] = (...e) => {
2102
+ let n = i.apply(t, e);
2103
+ return n === !1 && (n = a.apply(t, e)), n || "";
2104
+ };
2105
+ }
2106
+ n.renderer = t;
2107
+ }
2108
+ if (e.tokenizer) {
2109
+ let t = this.defaults.tokenizer || new pn(this.defaults);
2110
+ for (let n in e.tokenizer) {
2111
+ if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2112
+ if ([
2113
+ "options",
2114
+ "rules",
2115
+ "lexer"
2116
+ ].includes(n)) continue;
2117
+ let r = n, i = e.tokenizer[r], a = t[r];
2118
+ t[r] = (...e) => {
2119
+ let n = i.apply(t, e);
2120
+ return n === !1 && (n = a.apply(t, e)), n;
2121
+ };
2122
+ }
2123
+ n.tokenizer = t;
2124
+ }
2125
+ if (e.hooks) {
2126
+ let t = this.defaults.hooks || new Z();
2127
+ for (let n in e.hooks) {
2128
+ if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2129
+ if (["options", "block"].includes(n)) continue;
2130
+ let r = n, i = e.hooks[r], a = t[r];
2131
+ Z.passThroughHooks.has(n) ? t[r] = (e) => {
2132
+ if (this.defaults.async && Z.passThroughHooksRespectAsync.has(n)) return (async () => {
2133
+ let n = await i.call(t, e);
2134
+ return a.call(t, n);
2135
+ })();
2136
+ let r = i.call(t, e);
2137
+ return a.call(t, r);
2138
+ } : t[r] = (...e) => {
2139
+ if (this.defaults.async) return (async () => {
2140
+ let n = await i.apply(t, e);
2141
+ return n === !1 && (n = await a.apply(t, e)), n;
2142
+ })();
2143
+ let n = i.apply(t, e);
2144
+ return n === !1 && (n = a.apply(t, e)), n;
2145
+ };
2146
+ }
2147
+ n.hooks = t;
2148
+ }
2149
+ if (e.walkTokens) {
2150
+ let t = this.defaults.walkTokens, r = e.walkTokens;
2151
+ n.walkTokens = function(e) {
2152
+ let n = [];
2153
+ return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2154
+ };
2155
+ }
2156
+ this.defaults = {
2157
+ ...this.defaults,
2158
+ ...n
2159
+ };
2160
+ }), this;
2161
+ }
2162
+ setOptions(e) {
2163
+ return this.defaults = {
2164
+ ...this.defaults,
2165
+ ...e
2166
+ }, this;
2167
+ }
2168
+ lexer(e, t) {
2169
+ return q.lex(e, t ?? this.defaults);
2170
+ }
2171
+ parser(e, t) {
2172
+ return X.parse(e, t ?? this.defaults);
2173
+ }
2174
+ parseMarkdown(e) {
2175
+ return (t, n) => {
2176
+ let r = { ...n }, i = {
2177
+ ...this.defaults,
2178
+ ...r
2179
+ }, a = this.onError(!!i.silent, !!i.async);
2180
+ 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."));
2181
+ if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2182
+ if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2183
+ if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2184
+ 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;
2185
+ i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2186
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(a, i);
2187
+ return i.hooks ? await i.hooks.postprocess(o) : o;
2188
+ })().catch(a);
2189
+ try {
2190
+ i.hooks && (t = i.hooks.preprocess(t));
2191
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2192
+ i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2193
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(n, i);
2194
+ return i.hooks && (r = i.hooks.postprocess(r)), r;
2195
+ } catch (e) {
2196
+ return a(e);
2197
+ }
2198
+ };
2199
+ }
2200
+ onError(e, t) {
2201
+ return (n) => {
2202
+ if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2203
+ let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
2204
+ return t ? Promise.resolve(e) : e;
2205
+ }
2206
+ if (t) return Promise.reject(n);
2207
+ throw n;
2208
+ };
2209
+ }
2210
+ }();
2211
+ function Q(e, t) {
2212
+ return mn.parse(e, t);
2213
+ }
2214
+ Q.options = Q.setOptions = function(e) {
2215
+ return mn.setOptions(e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2216
+ }, Q.getDefaults = ct, Q.defaults = D, Q.use = function(...e) {
2217
+ return mn.use(...e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2218
+ }, Q.walkTokens = function(e, t) {
2219
+ return mn.walkTokens(e, t);
2220
+ }, Q.parseInline = mn.parseInline, Q.Parser = X, Q.parser = X.parse, Q.Renderer = J, Q.TextRenderer = Y, Q.Lexer = q, Q.lexer = q.lex, Q.Tokenizer = pn, Q.Hooks = Z, Q.parse = Q, Q.options, Q.setOptions, Q.use, Q.walkTokens, Q.parseInline, X.parse, q.lex;
2221
+ //#endregion
2222
+ //#region src/components/ai-chat/ai-chat.module.scss?inline
2223
+ var hn = ":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:rgba(var(--luzmo-primary-rgb), .08);--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 .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));--chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));flex-direction:column;display:flex}:host .assistant-message-body{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}: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:flex}:host .assistant-message-actions.assistant-message-actions--confirming{flex-direction:column;align-items:flex-start}: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;justify-content:center;align-items:center;padding:0;font-size:.875rem;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 luzmo-progress-steps{padding:0 .25rem}: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,1rem));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{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:1rem;--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:1rem;--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:1.5rem;--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-s,12px);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height)}", gn = ":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-strong,600);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color);--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))}", _n = class extends e {
2224
+ constructor(...e) {
2225
+ super(...e), this.title = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), this.subtitle = "", this.suggestions = [], this.disabled = !1;
2226
+ }
2227
+ static {
2228
+ this.styles = c(gn);
2229
+ }
2230
+ static {
2231
+ this.tagName = "luzmo-ai-chat-empty-state";
2232
+ }
2233
+ _handleSuggestionActivate(e) {
2234
+ if (this.disabled) return;
2235
+ let t = e.prompt ?? e.label;
2236
+ this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2237
+ detail: {
2238
+ label: e.label,
2239
+ prompt: t,
2240
+ selectedDatasets: e.selectedDatasets
2241
+ },
2242
+ bubbles: !0,
2243
+ composed: !0
2244
+ }));
2245
+ }
2246
+ render() {
2247
+ let e = this.suggestions.length > 0;
2248
+ return o`
2249
+ <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2250
+ <header class="header">
2251
+ <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2252
+ </header>
2253
+
2254
+ ${e ? o`
2255
+ <div class="actions">
2256
+ ${this.subtitle ? o`<p class="subtitle">${this.subtitle}</p>` : s}
2257
+ <div
2258
+ class="suggestions"
2259
+ role="group"
2260
+ aria-label=${n("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2261
+ >
2262
+ ${this.suggestions.map((e) => o`
2263
+ <luzmo-action-button
2264
+ variant="accent"
2265
+ size="s"
2266
+ ?disabled=${this.disabled}
2267
+ @click=${() => this._handleSuggestionActivate(e)}
2268
+ >
2269
+ ${e.label}
2270
+ </luzmo-action-button>
2271
+ `)}
2272
+ </div>
2273
+ </div>
2274
+ ` : s}
2275
+ </section>
2276
+ `;
2277
+ }
2278
+ };
2279
+ //#endregion
2280
+ //#region src/components/ai-chat/empty-state/index.ts
2281
+ t([l({ type: String })], _n.prototype, "title", void 0), t([l({ type: String })], _n.prototype, "subtitle", void 0), t([l({ type: Array })], _n.prototype, "suggestions", void 0), t([l({
2282
+ type: Boolean,
2283
+ reflect: !0
2284
+ })], _n.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", _n);
2285
+ //#endregion
2286
+ //#region src/components/ai-chat/ai-chat-request.ts
2287
+ function vn(e, t) {
2288
+ return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2289
+ }
2290
+ function yn(e) {
2291
+ return e.type === "placeholder" ? null : {
2292
+ ...e,
2293
+ version: e.version || "",
2294
+ title: e.title || e.options?.title,
2295
+ filters: e.filterGroups || [],
2296
+ aichartId: e.aichartId || ""
2297
+ };
2298
+ }
2299
+ function bn(e, t) {
2300
+ return [{
2301
+ type: "text",
2302
+ text: e
2303
+ }, ...t.map((e) => ({
2304
+ type: "dataset",
2305
+ id: e
2306
+ }))];
2307
+ }
2308
+ function xn(e, t, n) {
2309
+ return {
2310
+ agent: e,
2311
+ task: t,
2312
+ stream: n.stream ?? !0,
2313
+ response_mode: "mixed",
2314
+ ...n.conversationId ? { conversation_id: n.conversationId } : {},
2315
+ ...n.localeId ? { locale_id: n.localeId } : {}
2316
+ };
2317
+ }
2318
+ function Sn(e) {
2319
+ let t = bn(e.prompt, e.datasetIds), n = e.chart ? yn(e.chart) : null;
2320
+ return n && t.push({
2321
+ type: "item",
2322
+ value: n
2323
+ }), {
2324
+ ...xn("item", e.task ?? "generate", e),
2325
+ input: t
2326
+ };
2327
+ }
2328
+ function Cn(e) {
2329
+ let t = bn(e.prompt, e.datasetIds);
2330
+ return e.dashboard && t.push({
2331
+ type: "dashboard",
2332
+ value: e.dashboard,
2333
+ ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2334
+ }), {
2335
+ ...xn("dashboard", "generate", e),
2336
+ timezone_id: e.timezoneId ?? "UTC",
2337
+ input: t
2338
+ };
2339
+ }
2340
+ function wn(e) {
2341
+ return {
2342
+ ...xn("analyst", "generate", e),
2343
+ input: bn(e.prompt, e.datasetIds)
2344
+ };
2345
+ }
2346
+ function Tn(e, t) {
2347
+ switch (e) {
2348
+ case "dashboard": return Cn(t);
2349
+ case "analyst": return wn(t);
2350
+ default: return Sn(t);
2351
+ }
2352
+ }
2353
+ function En(e, t) {
2354
+ let { authKey: n, authToken: r, apiVersion: i = "0.1.0" } = t;
2355
+ return {
2356
+ key: n,
2357
+ token: r,
2358
+ action: "create",
2359
+ version: i,
2360
+ properties: Tn(e, t)
2361
+ };
2362
+ }
2363
+ function Dn(e, t, n, r = "0.1.0", i = null) {
2364
+ return {
2365
+ key: t,
2366
+ token: n,
2367
+ action: "delete",
2368
+ version: r,
2369
+ properties: {
2370
+ agent: "item",
2371
+ restore_to_message_id: e,
2372
+ ...i ? { conversation_id: i } : {}
2373
+ }
2374
+ };
2375
+ }
2376
+ //#endregion
2377
+ //#region src/components/ai-chat/stream/transport.ts
2378
+ async function On(e) {
2379
+ let t = await fetch(e.url, {
2380
+ method: "POST",
2381
+ headers: { "Content-Type": "application/json" },
2382
+ mode: "cors",
2383
+ body: JSON.stringify(e.body),
2384
+ signal: e.signal
2385
+ });
2386
+ if (!t.ok) {
2387
+ let e = await t.json().catch(() => null);
2388
+ throw Error(e?.message || `API request failed with status ${t.status}`);
2389
+ }
2390
+ if (!t.body) throw Error("Response body is not readable");
2391
+ return {
2392
+ body: t.body,
2393
+ conversationId: t.headers.get("x-conversation-id")
2394
+ };
2395
+ }
2396
+ function kn(e) {
2397
+ let t = e.trim();
2398
+ if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2399
+ let n = t;
2400
+ return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2401
+ }
2402
+ function An(e, t) {
2403
+ try {
2404
+ let n = kn(e);
2405
+ n && t(n);
2406
+ } catch {
2407
+ console.error("Failed to parse stream line");
2408
+ }
2409
+ }
2410
+ async function jn(e, t) {
2411
+ let n = e.getReader(), r = new TextDecoder(), i = "";
2412
+ try {
2413
+ for (;;) {
2414
+ let { done: e, value: a } = await n.read();
2415
+ if (e) break;
2416
+ i += r.decode(a, { stream: !0 });
2417
+ let o = i.split(/\r?\n/);
2418
+ i = o.pop() ?? "";
2419
+ for (let e of o) An(e, t);
2420
+ }
2421
+ i += r.decode();
2422
+ let e = i.trim();
2423
+ e && An(e, t);
2424
+ } finally {
2425
+ n.releaseLock();
2426
+ }
2427
+ }
2428
+ //#endregion
2429
+ //#region src/components/ai-chat/stream/progress.ts
2430
+ function Mn() {
2431
+ return {
2432
+ id: "root",
2433
+ step: "root",
2434
+ status: "pending",
2435
+ children: [{
2436
+ id: "client-init",
2437
+ step: "iqInit",
2438
+ status: "inProgress",
2439
+ description: n("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2440
+ }]
2441
+ };
2442
+ }
2443
+ function Nn(e) {
2444
+ let t = e.progress;
2445
+ return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2446
+ }
2447
+ //#endregion
2448
+ //#region src/components/ai-chat/stream/chunk-extractors.ts
2449
+ function Pn(e) {
2450
+ if (!e || typeof e != "object") return "";
2451
+ let t = e.assistant_message;
2452
+ if (!t || typeof t != "object") return "";
2453
+ if (typeof t.message == "string") return t.message;
2454
+ if (typeof t.text == "string") return t.text;
2455
+ if (typeof t.summary == "string") return t.summary;
2456
+ let n = t.content;
2457
+ return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2458
+ }
2459
+ function Fn(e) {
2460
+ 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 : "";
2461
+ }
2462
+ function In(e) {
2463
+ return Pn(e.result);
2464
+ }
2465
+ function Ln(e) {
2466
+ return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2467
+ }
2468
+ function Rn(e, t) {
2469
+ let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2470
+ n && t.callbacks.onConversationIdChange(n);
2471
+ }
2472
+ function zn(e) {
2473
+ for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2474
+ let e = t.value;
2475
+ if (e && typeof e == "object") return e;
2476
+ }
2477
+ return null;
2478
+ }
2479
+ function Bn(e) {
2480
+ let t = e.chart ?? e.generatedChart;
2481
+ if (t && typeof t == "object") return t;
2482
+ let n = e.aiMessageAssets ?? e.ai_message_assets;
2483
+ if (Array.isArray(n)) {
2484
+ let e = zn(n);
2485
+ if (e) return e;
2486
+ }
2487
+ let r = e.result;
2488
+ if (r && typeof r == "object") {
2489
+ let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2490
+ if (Array.isArray(t)) return zn(t);
2491
+ }
2492
+ return null;
2493
+ }
2494
+ function Vn(e) {
2495
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2496
+ let e = t.value;
2497
+ if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2498
+ }
2499
+ return null;
2500
+ }
2501
+ function Hn(e) {
2502
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2503
+ let e = t.name;
2504
+ if (e && typeof e == "object") return e;
2505
+ }
2506
+ }
2507
+ function Un(...e) {
2508
+ return e.find(Array.isArray);
2509
+ }
2510
+ function Wn(e) {
2511
+ if (e.views && Array.isArray(e.views)) return e;
2512
+ let t = e.aiMessageAssets ?? e.ai_message_assets;
2513
+ if (Array.isArray(t)) return Vn(t);
2514
+ let n = e.result;
2515
+ if (n && typeof n == "object") {
2516
+ let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2517
+ if (Array.isArray(t)) return Vn(t);
2518
+ }
2519
+ return null;
2520
+ }
2521
+ function Gn(e) {
2522
+ let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Un(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2523
+ return r ? Hn(r) : void 0;
2524
+ }
2525
+ //#endregion
2526
+ //#region src/components/ai-chat/stream/stream-processor.ts
2527
+ var Kn = new Set([
2528
+ "conversation-id",
2529
+ "conversation_id",
2530
+ "keepalive",
2531
+ "ping",
2532
+ "finish",
2533
+ "done"
2534
+ ]);
2535
+ function qn(e, t, n) {
2536
+ return {
2537
+ agent: n.agent,
2538
+ conversationId: t.callbacks.getConversationId(),
2539
+ ...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
2540
+ raw: e
2541
+ };
2542
+ }
2543
+ function Jn(e, t, n, r, i) {
2544
+ let a = {
2545
+ ...qn(n, e, t),
2546
+ recognized: !0,
2547
+ type: r,
2548
+ data: i
2549
+ };
2550
+ e.callbacks.onStep(a);
2551
+ }
2552
+ function Yn(e, t, n, r, i) {
2553
+ let a = {
2554
+ ...qn(n, e, t),
2555
+ recognized: !1,
2556
+ type: r,
2557
+ data: i
2558
+ };
2559
+ e.callbacks.onStep(a);
2560
+ }
2561
+ function Xn(e) {
2562
+ e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2563
+ }
2564
+ function Zn(e, t) {
2565
+ Xn(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2566
+ }
2567
+ function Qn(e) {
2568
+ if (!e) return null;
2569
+ let t = e.descriptionMetadata?.decision;
2570
+ if (t === "create" || t === "edit" || t === "question") return t;
2571
+ for (let t of e.children ?? []) {
2572
+ let e = Qn(t);
2573
+ if (e) return e;
2574
+ }
2575
+ return null;
2576
+ }
2577
+ function $n(e, t, n) {
2578
+ if (!Nn(e)) return !1;
2579
+ let r = e.progress;
2580
+ if (t.callbacks.onProgress(r), Jn(t, n, e, "progress", r), t.state.decision === null) {
2581
+ let i = Qn(r);
2582
+ i && (t.state.decision = i, Jn(t, n, e, "decision", { decision: i }));
2583
+ }
2584
+ return !0;
2585
+ }
2586
+ function er(e) {
2587
+ return !!e.error || e.type === "error" || typeof e.error_text == "string";
2588
+ }
2589
+ function tr(e) {
2590
+ return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : n("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
2591
+ }
2592
+ function nr(e, t, n) {
2593
+ if (!er(e)) return !1;
2594
+ let r = tr(e);
2595
+ return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), Cr(e, t, n, e.error ?? r), !0;
2596
+ }
2597
+ function rr(e) {
2598
+ return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2599
+ }
2600
+ function ir(e, t, n) {
2601
+ if (e.type !== "interrupt") return !1;
2602
+ let r = rr(e);
2603
+ return r && (t.state.interruptQuestion = r, Zn(t, r), Jn(t, n, e, "interrupt", { question: r })), Cr(e, t, n), !0;
2604
+ }
2605
+ function ar(e) {
2606
+ return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2607
+ }
2608
+ function or(e) {
2609
+ return typeof e.asset_type == "string" ? e.asset_type : "";
2610
+ }
2611
+ function sr(e) {
2612
+ return {
2613
+ assetType: or(e),
2614
+ snapshot: {}
2615
+ };
2616
+ }
2617
+ function cr(e, t) {
2618
+ return {
2619
+ ...e,
2620
+ ...t
2621
+ };
2622
+ }
2623
+ function lr(e) {
2624
+ let t = e.asset_delta ?? e.delta;
2625
+ return t && typeof t == "object" ? t : null;
2626
+ }
2627
+ function ur(e, t) {
2628
+ t.state.assets[ar(e)] = sr(e);
2629
+ }
2630
+ function dr(e, t) {
2631
+ let n = ar(e), r = t.state.assets[n] ?? sr(e), i = lr(e);
2632
+ i && (r.snapshot = cr(r.snapshot, i)), t.state.assets[n] = r;
2633
+ }
2634
+ function fr(e, t) {
2635
+ let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2636
+ return n && typeof n == "object" ? cr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2637
+ }
2638
+ function pr(e, t, n) {
2639
+ let r = ar(e), i = t.state.assets[r], a = i?.assetType || or(e), o = fr(e, i);
2640
+ delete t.state.assets[r], gr(a, o, e, t, n);
2641
+ }
2642
+ function mr(e, t, n) {
2643
+ switch (e.type) {
2644
+ case "asset_start": return ur(e, t), !0;
2645
+ case "asset_delta": return dr(e, t), !0;
2646
+ case "asset_end": return pr(e, t, n), !0;
2647
+ default: return !1;
2648
+ }
2649
+ }
2650
+ function hr(e, t, n, r) {
2651
+ n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), Jn(n, r, t, "chart", e);
2652
+ }
2653
+ function gr(e, t, n, r, i) {
2654
+ switch (e) {
2655
+ case "dashboard-title": {
2656
+ let e = t.name;
2657
+ e && typeof e == "object" && (r.state.dashboardName = e, Jn(r, i, n, "dashboard-title", { name: e }));
2658
+ return;
2659
+ }
2660
+ case "dashboard-layout":
2661
+ Jn(r, i, n, "dashboard-layout", t);
2662
+ return;
2663
+ case "dashboard-item":
2664
+ Jn(r, i, n, "dashboard-item", {
2665
+ slot: Number(t.slot),
2666
+ chart: t.chart ?? t
2667
+ });
2668
+ return;
2669
+ case "dashboard":
2670
+ r.state.dashboardSnapshot = t;
2671
+ return;
2672
+ default: _r(e, t, n, r, i);
2673
+ }
2674
+ }
2675
+ function _r(e, t, n, r, i) {
2676
+ if (i.chartAssetType && e === i.chartAssetType) {
2677
+ hr(t, n, r, i);
2678
+ return;
2679
+ }
2680
+ if (i.dashboardAssetType && e === i.dashboardAssetType) {
2681
+ r.state.dashboardSnapshot = t;
2682
+ return;
2683
+ }
2684
+ Yn(r, i, n, e || "asset", t);
2685
+ }
2686
+ function vr(e, t, n) {
2687
+ let r = !1;
2688
+ if (n.dashboardAssetType) {
2689
+ let n = Wn(e);
2690
+ if (n) {
2691
+ t.state.dashboardSnapshot = n;
2692
+ let i = Gn(e);
2693
+ i && (t.state.dashboardName = i), r = !0;
2694
+ }
2695
+ }
2696
+ if (n.chartAssetType && !t.state.chartSnapshot) {
2697
+ let i = Bn(e);
2698
+ i && (hr(i, e, t, n), r = !0);
2699
+ }
2700
+ return r;
2701
+ }
2702
+ function yr(e, t, n) {
2703
+ return {
2704
+ ...e,
2705
+ generatedChart: t,
2706
+ conversationId: n.callbacks.getConversationId()
2707
+ };
2708
+ }
2709
+ function br(e, t, n) {
2710
+ for (let r of Object.keys(t.state.assets)) {
2711
+ let i = t.state.assets[r];
2712
+ delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot) && gr(i.assetType, i.snapshot, e, t, n);
2713
+ }
2714
+ }
2715
+ function xr(e, t) {
2716
+ let n = In(e);
2717
+ !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
2718
+ }
2719
+ function Sr(e, t, n) {
2720
+ let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Wn(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? Bn(e) : null);
2721
+ return {
2722
+ agent: n.agent,
2723
+ conversationId: t.callbacks.getConversationId(),
2724
+ message: t.aiMessage,
2725
+ ...r ? { dashboard: r } : {},
2726
+ ...i ? { chart: yr(e, i, t) } : {},
2727
+ ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
2728
+ raw: e
2729
+ };
2730
+ }
2731
+ function Cr(e, t, n, r) {
2732
+ if (!t.state.completed) {
2733
+ if (t.state.completed = !0, br(e, t, n), Xn(t), r !== void 0) {
2734
+ t.callbacks.onComplete({
2735
+ agent: n.agent,
2736
+ conversationId: t.callbacks.getConversationId(),
2737
+ message: t.aiMessage,
2738
+ error: r,
2739
+ raw: e
2740
+ });
2741
+ return;
2742
+ }
2743
+ xr(e, t), t.callbacks.onComplete(Sr(e, t, n));
2744
+ }
2745
+ }
2746
+ function wr(e) {
2747
+ return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
2748
+ }
2749
+ function Tr(e, t, n) {
2750
+ let r = Fn(e);
2751
+ return r ? (t.state.accumulatedText += r, Zn(t, r), Jn(t, n, e, "text", {
2752
+ delta: r,
2753
+ text: t.state.accumulatedText
2754
+ }), !0) : !1;
2755
+ }
2756
+ function Er(e, t, n, r, i) {
2757
+ if (r || i) return;
2758
+ let a = wr(e);
2759
+ a && !Kn.has(a) && Yn(t, n, e, a, e);
2760
+ }
2761
+ function Dr(e, t, n) {
2762
+ if (Rn(e, t), $n(e, t, n) || nr(e, t, n) || ir(e, t, n) || mr(e, t, n)) return;
2763
+ let r = Tr(e, t, n), i = vr(e, t, n), a = r || i, o = Ln(e);
2764
+ Er(e, t, n, a, o), o && Cr(e, t, n);
2765
+ }
2766
+ //#endregion
2767
+ //#region src/components/ai-chat/stream/registry.ts
2768
+ function Or(e) {
2769
+ switch (e) {
2770
+ case "dashboard": return {
2771
+ agent: e,
2772
+ dashboardAssetType: "dashboard"
2773
+ };
2774
+ case "item": return {
2775
+ agent: e,
2776
+ chartAssetType: "item"
2777
+ };
2778
+ default: return { agent: e };
2779
+ }
2780
+ }
2781
+ function kr(e) {
2782
+ let t = Or(e);
2783
+ return (e, n) => Dr(e, n, t);
2784
+ }
2785
+ function Ar() {
2786
+ return {
2787
+ progressCollapsed: !1,
2788
+ accumulatedText: "",
2789
+ decision: null,
2790
+ assets: {},
2791
+ dashboardSnapshot: null,
2792
+ dashboardName: void 0,
2793
+ chartSnapshot: null,
2794
+ interruptQuestion: null,
2795
+ completed: !1
2796
+ };
2797
+ }
2798
+ //#endregion
2799
+ //#region src/components/ai-chat/session/ai-chat-session.ts
2800
+ function jr() {
2801
+ return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
2802
+ }
2803
+ var Mr = class {
2804
+ constructor(e, t = {}) {
2805
+ this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
2806
+ messages: [],
2807
+ selectedDatasets: [],
2808
+ isGenerating: !1,
2809
+ progress: null,
2810
+ progressCollapsed: !1,
2811
+ conversationId: null,
2812
+ inflightMessage: null
2813
+ }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
2814
+ apiUrl: "https://api.luzmo.com",
2815
+ apiVersion: "0.1.0",
2816
+ stream: !0,
2817
+ ...e
2818
+ }, this._hostCallbacks = t, this._state = {
2819
+ ...this._state,
2820
+ messages: e.messages ? [...e.messages] : [],
2821
+ selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
2822
+ conversationId: e.conversationId ?? null,
2823
+ isGenerating: e.isGenerating ?? !1,
2824
+ progress: e.progress ?? null,
2825
+ progressCollapsed: e.progressCollapsed ?? !1
2826
+ };
2827
+ }
2828
+ get state() {
2829
+ return this._state;
2830
+ }
2831
+ get isGenerating() {
2832
+ return this._state.isGenerating;
2833
+ }
2834
+ subscribe(e) {
2835
+ return this._subscribers.add(e), e(this._state), () => {
2836
+ this._subscribers.delete(e);
2837
+ };
2838
+ }
2839
+ setUiBridge(e) {
2840
+ this._uiBridgeCallbacks = e;
2841
+ }
2842
+ updateConfig(e) {
2843
+ this._config = {
2844
+ ...this._config,
2845
+ ...e
2846
+ };
2847
+ let t = {};
2848
+ if ("conversationId" in e) {
2849
+ let n = e.conversationId ?? null;
2850
+ n !== this._state.conversationId && (t.conversationId = n);
2851
+ }
2852
+ if ("selectedDatasets" in e && e.selectedDatasets) {
2853
+ let n = [...e.selectedDatasets];
2854
+ this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
2855
+ }
2856
+ if ("messages" in e && e.messages) {
2857
+ let n = [...e.messages];
2858
+ this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
2859
+ }
2860
+ "isGenerating" in e && e.isGenerating !== this._state.isGenerating && (t.isGenerating = e.isGenerating), "progress" in e && (t.progress = e.progress ?? null), "progressCollapsed" in e && e.progressCollapsed !== this._state.progressCollapsed && (t.progressCollapsed = e.progressCollapsed), Object.keys(t).length > 0 && this._patchState(t);
2861
+ }
2862
+ setSelectedDatasets(e) {
2863
+ this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
2864
+ }
2865
+ addDataset(e) {
2866
+ this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2867
+ }
2868
+ removeDataset(e) {
2869
+ let t = this._state.selectedDatasets.filter((t) => t.id !== e);
2870
+ t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2871
+ }
2872
+ isDatasetRequirementMet() {
2873
+ return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
2874
+ }
2875
+ getAiPromptUrl() {
2876
+ return vn(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
2877
+ }
2878
+ buildRequestBody(e, t) {
2879
+ return En(this._config.agent, {
2880
+ prompt: e,
2881
+ datasetIds: t,
2882
+ authKey: this._config.authKey,
2883
+ authToken: this._config.authToken,
2884
+ conversationId: this._state.conversationId,
2885
+ chart: this._config.chart ?? null,
2886
+ dashboard: this._config.dashboard ?? null,
2887
+ currentScreenMode: this._config.currentScreenMode,
2888
+ localeId: this._config.localeId,
2889
+ timezoneId: this._config.timezoneId,
2890
+ task: this._config.task,
2891
+ modelPreference: this._config.modelPreference,
2892
+ apiVersion: this._config.apiVersion,
2893
+ stream: this._config.stream
2894
+ });
2895
+ }
2896
+ buildPromptSubmittedDetail(e, t, n, r) {
2897
+ return {
2898
+ prompt: e,
2899
+ selectedDatasets: t,
2900
+ datasetIds: n,
2901
+ agent: this._config.agent,
2902
+ request: this.buildRequestBody(e, n),
2903
+ url: this.getAiPromptUrl(),
2904
+ ...r ? { signal: r } : {}
2905
+ };
2906
+ }
2907
+ async submit(e) {
2908
+ let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
2909
+ if (!this.isDatasetRequirementMet()) return;
2910
+ this._abortInflight();
2911
+ let n = {
2912
+ id: e.aiMessageId ?? jr(),
2913
+ type: "ai",
2914
+ message: ""
2915
+ }, r = [...this._state.messages];
2916
+ if (!e.skipUserMessage) {
2917
+ let t = {
2918
+ id: jr(),
2919
+ type: "user",
2920
+ message: e.prompt
2921
+ };
2922
+ r = [...r, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
2923
+ }
2924
+ r = [...r, n], this._inflightMessage = n, this._receivedProgress = !1;
2925
+ let i = new AbortController();
2926
+ this._abortController = i, this._patchState({
2927
+ messages: r,
2928
+ isGenerating: !0,
2929
+ progress: Mn(),
2930
+ progressCollapsed: !1,
2931
+ inflightMessage: n
2932
+ });
2933
+ let a = t, o = [...this._state.selectedDatasets];
2934
+ if (this._hasCallback("onPromptSubmitted")) {
2935
+ let t = this.buildPromptSubmittedDetail(e.prompt, o, a, i.signal);
2936
+ try {
2937
+ await this._invokeCallback("onPromptSubmitted", t);
2938
+ } catch (e) {
2939
+ e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, n), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
2940
+ }
2941
+ return;
2942
+ }
2943
+ let s = this.buildRequestBody(e.prompt, t), c = kr(this._config.agent), l = {
2944
+ aiMessage: n,
2945
+ callbacks: this._createStreamCallbacks(),
2946
+ state: Ar()
2947
+ }, u = this._config.fetchStreaming ?? On, d = !1;
2948
+ try {
2949
+ let { body: e, conversationId: t } = await u({
2950
+ url: this.getAiPromptUrl(),
2951
+ body: s,
2952
+ signal: i.signal
2953
+ });
2954
+ t && this._setConversationId(t), await jn(e, (e) => c(e, l)), d = !0;
2955
+ } catch (e) {
2956
+ e.name !== "AbortError" && (this._handleSubmitError(e, n), d = !0);
2957
+ } finally {
2958
+ this._abortController === i && (d ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
2959
+ }
2960
+ }
2961
+ async restore(e) {
2962
+ if (this._config.agent !== "item") return {};
2963
+ let t = Dn(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
2964
+ if (this._patchState({
2965
+ isGenerating: !0,
2966
+ progress: null,
2967
+ progressCollapsed: !1
2968
+ }), this._hasCallback("onRestoreRequested")) {
2969
+ let n = {
2970
+ apiMessageId: e.restoreToMessageId,
2971
+ messageIndex: e.messageIndex,
2972
+ request: t,
2973
+ url: this.getAiPromptUrl()
2974
+ };
2975
+ try {
2976
+ await this._invokeCallback("onRestoreRequested", n);
2977
+ } finally {
2978
+ this._patchState({ isGenerating: !1 });
2979
+ }
2980
+ return {};
2981
+ }
2982
+ try {
2983
+ let n = await fetch(this.getAiPromptUrl(), {
2984
+ method: "POST",
2985
+ headers: { "Content-Type": "application/json" },
2986
+ mode: "cors",
2987
+ body: JSON.stringify(t)
2988
+ });
2989
+ if (!n.ok) {
2990
+ let e = await n.json().catch(() => null);
2991
+ throw Error(e?.message || `API request failed with status ${n.status}`);
2992
+ }
2993
+ let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? Bn(r) : null), a = {
2994
+ ...typeof r?.message == "string" ? { message: r.message } : {},
2995
+ ...i ? { chart: {
2996
+ ...r,
2997
+ generatedChart: i
2998
+ } } : {}
2999
+ }, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
3000
+ if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
3001
+ ...o[e.messageIndex],
3002
+ message: a.message
3003
+ }), this._patchState({ messages: [...o] }), a.chart || a.message) {
3004
+ let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
3005
+ id: jr(),
3006
+ type: "ai",
3007
+ message: a.message ?? ""
3008
+ };
3009
+ this._emit("onComplete", {
3010
+ agent: this._config.agent,
3011
+ conversationId: this._state.conversationId,
3012
+ message: n,
3013
+ ...a.chart ? { chart: a.chart } : {},
3014
+ ...r ? { raw: r } : {}
3015
+ });
3016
+ }
3017
+ return a;
3018
+ } finally {
3019
+ this._patchState({ isGenerating: !1 });
3020
+ }
3021
+ }
3022
+ buildRestoreRequest(e) {
3023
+ return Dn(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3024
+ }
3025
+ abort(e = {}) {
3026
+ this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3027
+ isGenerating: !1,
3028
+ progress: null,
3029
+ progressCollapsed: !1
3030
+ }), e.notify && this._emit("onPromptStopped");
3031
+ }
3032
+ _abortInflight() {
3033
+ this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3034
+ }
3035
+ _createStreamCallbacks() {
3036
+ return {
3037
+ onConversationIdChange: (e) => this._setConversationId(e),
3038
+ onProgress: (e) => {
3039
+ this._receivedProgress = !0, this._patchState({ progress: e });
3040
+ },
3041
+ onProgressCollapsed: (e) => {
3042
+ this._patchState({ progressCollapsed: e });
3043
+ },
3044
+ onMessageUpdate: (e) => {
3045
+ this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3046
+ },
3047
+ getConversationId: () => this._state.conversationId,
3048
+ onStep: (e) => {
3049
+ this._emit("onStep", e);
3050
+ },
3051
+ onComplete: (e) => {
3052
+ this._emit("onComplete", e);
3053
+ }
3054
+ };
3055
+ }
3056
+ _setConversationId(e) {
3057
+ this._config = {
3058
+ ...this._config,
3059
+ conversationId: e
3060
+ }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3061
+ }
3062
+ _upsertMessage(e) {
3063
+ let t = this._state.messages.findIndex((t) => t.id === e.id);
3064
+ if (t === -1) {
3065
+ this._patchState({ messages: [...this._state.messages, { ...e }] });
3066
+ return;
3067
+ }
3068
+ let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3069
+ this._patchState({ messages: n });
3070
+ }
3071
+ _finalizeInflightMessage() {
3072
+ 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({
3073
+ progress: null,
3074
+ progressCollapsed: !1,
3075
+ inflightMessage: null
3076
+ }));
3077
+ }
3078
+ _removeInflightFromMessages() {
3079
+ this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3080
+ }
3081
+ _markInflightCancelled(e) {
3082
+ this._inflightMessage && (this._inflightMessage.message = e ?? n("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, this._upsertMessage(this._inflightMessage), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({ inflightMessage: null }));
3083
+ }
3084
+ _discardInflightMessage() {
3085
+ let e = !!(this._inflightMessage || this._state.inflightMessage);
3086
+ this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3087
+ }
3088
+ _handleSubmitError(e, t) {
3089
+ t.message = n("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, this._inflightMessage = t, this._upsertMessage(t), this._patchState({
3090
+ inflightMessage: { ...t },
3091
+ progress: null,
3092
+ progressCollapsed: !1
3093
+ }), this._emit("onComplete", {
3094
+ agent: this._config.agent,
3095
+ conversationId: this._state.conversationId,
3096
+ message: t,
3097
+ error: e
3098
+ });
3099
+ }
3100
+ _hasCallback(e) {
3101
+ return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3102
+ }
3103
+ _emit(e, ...t) {
3104
+ this._invokeCallback(e, ...t);
3105
+ }
3106
+ async _invokeCallback(e, ...t) {
3107
+ let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3108
+ typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3109
+ }
3110
+ _patchState(e) {
3111
+ this._state = {
3112
+ ...this._state,
3113
+ ...e
3114
+ }, this._emit("onStateChange", this._state);
3115
+ for (let e of this._subscribers) e(this._state);
3116
+ }
3117
+ _areSelectedDatasetsEqual(e, t) {
3118
+ return e.length === t.length ? e.every((e, n) => e.id === t[n]?.id) : !1;
3119
+ }
3120
+ _areChatMessagesEqual(e, t) {
3121
+ return e.length === t.length ? e.every((e, n) => {
3122
+ let r = t[n];
3123
+ 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 && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null) && JSON.stringify(e.actions ?? null) === JSON.stringify(r?.actions ?? null);
3124
+ }) : !1;
3125
+ }
3126
+ };
3127
+ function Nr(e, t) {
3128
+ return new Mr(e, t);
3129
+ }
3130
+ //#endregion
3131
+ //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3132
+ var Pr = class {
3133
+ constructor(e) {
3134
+ this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
3135
+ }
3136
+ get current() {
3137
+ return this._session;
3138
+ }
3139
+ get state() {
3140
+ if (this._session) return this._session.state;
3141
+ let e = this.options.getSeed();
3142
+ return {
3143
+ messages: e.messages,
3144
+ selectedDatasets: e.selectedDatasets,
3145
+ isGenerating: !1,
3146
+ progress: null,
3147
+ progressCollapsed: !1,
3148
+ conversationId: e.conversationId,
3149
+ inflightMessage: null
3150
+ };
3151
+ }
3152
+ get ownsCurrentSession() {
3153
+ return this._ownsSession;
3154
+ }
3155
+ setSession(e) {
3156
+ if (!e) {
3157
+ this._clearSession();
3158
+ return;
3159
+ }
3160
+ this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, e.updateConfig(this.options.getConfig()), this._wire(e);
3161
+ }
3162
+ syncProperties(e) {
3163
+ if (!e.has("chatSession")) {
3164
+ if (this._createSessionIfMissing(), this._session) {
3165
+ let t = this.options.getConfig();
3166
+ Object.keys(t).some((t) => e.has(t)) && this._session.updateConfig(t);
3167
+ }
3168
+ (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3169
+ }
3170
+ }
3171
+ requireSession() {
3172
+ return this._createSessionIfMissing(), this._session.updateConfig(this.options.getConfig()), this._session;
3173
+ }
3174
+ connect() {
3175
+ this._session && this._wire(this._session);
3176
+ }
3177
+ teardown() {
3178
+ this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3179
+ }
3180
+ _createSessionIfMissing() {
3181
+ if (this._session) return;
3182
+ let e = this.options.getSeed();
3183
+ this._session = Nr({
3184
+ ...this.options.getConfig(),
3185
+ messages: e.messages.length > 0 ? [...e.messages] : void 0,
3186
+ selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3187
+ }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3188
+ }
3189
+ _clearSession() {
3190
+ this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3191
+ }
3192
+ _seedFromPropsOnce() {
3193
+ if (!this._ownsSession || this._seededFromProps) return;
3194
+ let e = this.requireSession(), t = this.options.getSeed(), n = {};
3195
+ 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);
3196
+ }
3197
+ _wire(e) {
3198
+ this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3199
+ this.options.onRenderNeeded();
3200
+ });
3201
+ }
3202
+ _unwire() {
3203
+ this._unsubscribe?.(), this._unsubscribe = null;
3204
+ }
3205
+ }, $ = class t extends e {
3206
+ constructor(...e) {
3207
+ super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.flagOpendata = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = 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._lastProcessedInitialPrompt = null, this._session = new Pr({
3208
+ getConfig: () => this._buildSessionConfig(),
3209
+ getSeed: () => ({
3210
+ messages: this.messages,
3211
+ selectedDatasets: this.selectedDatasets,
3212
+ conversationId: this.conversationId
3213
+ }),
3214
+ createDomBridge: () => this._createDomBridgeCallbacks(),
3215
+ onRenderNeeded: () => {
3216
+ this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3217
+ }
3218
+ }), this._handleAssistantMessageActionsSlotChange = (e) => {
3219
+ let t = e.target.assignedElements({ flatten: !0 }).length > 0;
3220
+ this._setAssistantMessageActionsSlotHasContent(t);
3221
+ }, this._handleAssistantMessageActionConfirmKeydown = (e) => {
3222
+ e.key !== "Escape" || !this._pendingAssistantMessageAction || (e.preventDefault(), e.stopPropagation(), this._cancelAssistantMessageActionConfirm());
3223
+ };
3224
+ }
3225
+ static {
3226
+ this.styles = c(hn);
3227
+ }
3228
+ static {
3229
+ this.tagName = "luzmo-ai-chat";
3230
+ }
3231
+ static {
3232
+ this.assistantMessageActionsSlot = "assistant-message-actions";
3233
+ }
3234
+ get session() {
3235
+ return this._session.current;
3236
+ }
3237
+ _getRenderState() {
3238
+ return this._session.state;
3239
+ }
3240
+ _createDomBridgeCallbacks() {
3241
+ return {
3242
+ onMessageSent: (e, t) => {
3243
+ this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3244
+ detail: {
3245
+ message: e,
3246
+ selectedDatasets: t
3247
+ },
3248
+ bubbles: !0,
3249
+ composed: !0
3250
+ }));
3251
+ },
3252
+ onDatasetsChanged: (e) => {
3253
+ this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3254
+ detail: { selectedDatasets: e },
3255
+ bubbles: !0,
3256
+ composed: !0
3257
+ }));
3258
+ },
3259
+ onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3260
+ onStep: (e) => {
3261
+ this.dispatchEvent(new CustomEvent("luzmo-step", {
3262
+ detail: e,
3263
+ bubbles: !0,
3264
+ composed: !0
3265
+ }));
3266
+ },
3267
+ onComplete: (e) => {
3268
+ this.dispatchEvent(new CustomEvent("luzmo-complete", {
3269
+ detail: e,
3270
+ bubbles: !0,
3271
+ composed: !0
3272
+ }));
3273
+ },
3274
+ onPromptStopped: () => {
3275
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3276
+ bubbles: !0,
3277
+ composed: !0
3278
+ }));
3279
+ }
3280
+ };
3281
+ }
3282
+ _buildSessionConfig() {
3283
+ return {
3284
+ agent: this.agent,
3285
+ authKey: this.authKey,
3286
+ authToken: this.authToken,
3287
+ apiUrl: this.apiUrl,
3288
+ apiVersion: this.apiVersion,
3289
+ stream: this.stream,
3290
+ conversationId: this.conversationId,
3291
+ chart: this.chart,
3292
+ dashboard: this.dashboard,
3293
+ currentScreenMode: this.currentScreenMode,
3294
+ localeId: this.localeId,
3295
+ timezoneId: this.timezoneId,
3296
+ task: this.task,
3297
+ modelPreference: this.modelPreference,
3298
+ requireDataset: this.requireDataset
3299
+ };
3300
+ }
3301
+ _emitConversationIdChanged(e) {
3302
+ this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3303
+ detail: { conversationId: e },
3304
+ bubbles: !0,
3305
+ composed: !0
3306
+ }));
3307
+ }
3308
+ async _restoreViaSession(e, t) {
3309
+ await this._session.requireSession().restore({
3310
+ restoreToMessageId: e,
3311
+ messageIndex: t
3312
+ });
3313
+ }
3314
+ async _handleRestoreState(e, t) {
3315
+ if (e.apiMessageId && this.agent === "item") try {
3316
+ await this._restoreViaSession(e.apiMessageId, t);
3317
+ } catch (e) {
3318
+ console.error("AI restore error:", e);
3319
+ }
3320
+ }
3321
+ _handleDatasetSelected(e) {
3322
+ this._session.requireSession().addDataset(e.detail);
3323
+ }
3324
+ _handleDatasetRemoved(e) {
3325
+ this._session.requireSession().removeDataset(e.detail.id);
3326
+ }
3327
+ async _submitViaSession(e, t = {}) {
3328
+ let n = this._session.requireSession();
3329
+ if (n.isDatasetRequirementMet()) {
3330
+ this._textareaValue = "";
3331
+ try {
3332
+ await n.submit({
3333
+ prompt: e,
3334
+ ...t
3335
+ });
3336
+ } catch (e) {
3337
+ e.name !== "AbortError" && console.error("AI prompt session error:", e);
3338
+ }
3339
+ }
3340
+ }
3341
+ async _handlePromptSubmitted(e) {
3342
+ await this._submitViaSession(e.detail.prompt);
3343
+ }
3344
+ _handlePromptStopped() {
3345
+ let e = this._session.current;
3346
+ if (this._textareaValue = "", e) {
3347
+ e.abort({
3348
+ notify: !0,
3349
+ cancelledMessage: this.cancelledMessage ?? void 0
3350
+ });
3351
+ return;
3352
+ }
3353
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3354
+ bubbles: !0,
3355
+ composed: !0
3356
+ }));
3357
+ }
3358
+ async _handleEmptyStateSuggestionSelected(e) {
3359
+ let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3360
+ n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3361
+ }
3362
+ async _processInitialPrompt() {
3363
+ !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3364
+ }
3365
+ connectedCallback() {
3366
+ super.connectedCallback(), this._session.connect();
3367
+ }
3368
+ disconnectedCallback() {
3369
+ super.disconnectedCallback(), this._session.teardown();
3370
+ }
3371
+ _scrollToBottom() {
3372
+ let e = this.shadowRoot?.querySelector(".chat-messages-container");
3373
+ e && requestAnimationFrame(() => {
3374
+ requestAnimationFrame(() => {
3375
+ e.scrollTop = e.scrollHeight;
3376
+ });
3377
+ });
3378
+ }
3379
+ willUpdate(e) {
3380
+ super.willUpdate?.(e), this._syncPendingAssistantMessageAction();
3381
+ }
3382
+ updated(e) {
3383
+ super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), this.updateComplete.then(() => {
3384
+ this._syncAssistantMessageActionsVisibility(), this._focusPendingAssistantMessageActionConfirm();
3385
+ });
3386
+ }
3387
+ _syncSession(e) {
3388
+ if (e.has("chatSession")) {
3389
+ this._session.setSession(this.chatSession);
3390
+ return;
3391
+ }
3392
+ this._session.syncProperties(e);
3393
+ }
3394
+ _handleInitialPromptChange() {
3395
+ this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3396
+ }
3397
+ _renderMarkdown(e) {
3398
+ let t = String(Q.parse(e, { async: !1 }));
3399
+ return st.sanitize(t, {
3400
+ 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("."),
3401
+ ALLOWED_ATTR: [
3402
+ "href",
3403
+ "title",
3404
+ "target",
3405
+ "rel"
3406
+ ],
3407
+ ALLOW_DATA_ATTR: !1,
3408
+ FORBID_TAGS: [
3409
+ "script",
3410
+ "style",
3411
+ "iframe",
3412
+ "object",
3413
+ "embed",
3414
+ "link",
3415
+ "form",
3416
+ "input",
3417
+ "button"
3418
+ ],
3419
+ FORBID_ATTR: [
3420
+ "onerror",
3421
+ "onload",
3422
+ "onclick",
3423
+ "onmouseover",
3424
+ "onfocus",
3425
+ "onblur"
3426
+ ]
3427
+ });
3428
+ }
3429
+ _renderProgress() {
3430
+ let { progress: e, progressCollapsed: t } = this._getRenderState();
3431
+ return e?.children?.length ? o`
3432
+ <luzmo-progress-steps
3433
+ .progress=${e}
3434
+ ?collapsed=${t}
3435
+ size="s"
3436
+ ></luzmo-progress-steps>
3437
+ ` : s;
3438
+ }
3439
+ _isLastAiMessageWithProgress(e, t) {
3440
+ for (let n = t.length - 1; n >= 0; n--) if (t[n].type === "ai" && t[n].progress?.children?.length) return t[n].id === e.id;
3441
+ return !1;
3442
+ }
3443
+ _syncAssistantMessageActionsVisibility() {
3444
+ let e = ((this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`) ?? null)?.assignedElements({ flatten: !0 }).length ?? 0) > 0;
3445
+ this._setAssistantMessageActionsSlotHasContent(e);
3446
+ }
3447
+ _setAssistantMessageActionsSlotHasContent(e) {
3448
+ e !== this._assistantMessageActionsSlotHasContent && (this._assistantMessageActionsSlotHasContent = e);
3449
+ }
3450
+ _isLatestAssistantMessage(e, t) {
3451
+ return !!(t && e === t);
3452
+ }
3453
+ _hasBuiltInAssistantMessageActions(e) {
3454
+ return (e.actions?.length ?? 0) > 0;
3455
+ }
3456
+ _assistantMessageActionsFooterHasContent(e, t) {
3457
+ return this._hasBuiltInAssistantMessageActions(e) || t && this._assistantMessageActionsSlotHasContent;
3458
+ }
3459
+ _syncPendingAssistantMessageAction() {
3460
+ let e = this._pendingAssistantMessageAction;
3461
+ if (!e) return;
3462
+ let { messages: t } = this._getRenderState(), n = t.find((t) => t.id === e.messageId), r = n?.actions?.find((t) => t.id === e.actionId);
3463
+ (!n || !r?.confirm) && (this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1);
3464
+ }
3465
+ _getDefaultAssistantMessageActionConfirmMessage() {
3466
+ return n("Are you sure?", { desc: "Default assistant message action confirmation prompt" });
3467
+ }
3468
+ _isAssistantMessageActionConfirming(e) {
3469
+ let t = this._pendingAssistantMessageAction, n = e.id;
3470
+ return !!(t && n && t.messageId === n);
3471
+ }
3472
+ _getPendingAssistantMessageAction(e) {
3473
+ let t = this._pendingAssistantMessageAction, n = e.id;
3474
+ if (!(!t || !n || t.messageId !== n)) return e.actions?.find((e) => e.id === t.actionId);
3475
+ }
3476
+ _handleAssistantMessageAction(e, t) {
3477
+ let n = e.id;
3478
+ n && this.dispatchEvent(new CustomEvent("luzmo-assistant-message-action", {
3479
+ detail: {
3480
+ messageId: n,
3481
+ actionId: t.id,
3482
+ message: e
3483
+ },
3484
+ bubbles: !0,
3485
+ composed: !0
3486
+ }));
3487
+ }
3488
+ _handleAssistantMessageActionClick(e, t) {
3489
+ let n = e.id;
3490
+ if (n) {
3491
+ if (t.confirm) {
3492
+ this._pendingAssistantMessageAction = {
3493
+ messageId: n,
3494
+ actionId: t.id
3495
+ }, this._shouldFocusAssistantMessageActionConfirm = !0;
3496
+ return;
3497
+ }
3498
+ this._handleAssistantMessageAction(e, t);
3499
+ }
3500
+ }
3501
+ _cancelAssistantMessageActionConfirm() {
3502
+ this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1;
3503
+ }
3504
+ _confirmAssistantMessageAction(e, t) {
3505
+ this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._handleAssistantMessageAction(e, t);
3506
+ }
3507
+ _focusPendingAssistantMessageActionConfirm() {
3508
+ !this._shouldFocusAssistantMessageActionConfirm || !this._pendingAssistantMessageAction || (this._shouldFocusAssistantMessageActionConfirm = !1, (this.shadowRoot?.querySelector("luzmo-button.assistant-message-action-confirm-cancel"))?.focus?.());
3509
+ }
3510
+ _renderBuiltInAssistantMessageAction(e, t) {
3511
+ return o`
3512
+ <luzmo-button
3513
+ class="assistant-message-action"
3514
+ size="xs"
3515
+ variant="neutral"
3516
+ treatment="outline"
3517
+ ?disabled=${this.disabled || t.disabled || !e.id}
3518
+ @click=${() => this._handleAssistantMessageActionClick(e, t)}
3519
+ >
3520
+ ${t.icon ? o`<luzmo-icon slot="icon" .icon=${t.icon} size="xs"></luzmo-icon>` : s}
3521
+ ${t.label}
3522
+ </luzmo-button>
3523
+ `;
3524
+ }
3525
+ _renderAssistantMessageActionConfirm(e) {
3526
+ let t = this._getPendingAssistantMessageAction(e);
3527
+ if (!t) return s;
3528
+ let r = t.confirmMessage ?? this._getDefaultAssistantMessageActionConfirmMessage(), i = this.disabled || t.disabled || !e.id;
3529
+ return o`
3530
+ <span class="assistant-message-action-confirm-message" role="status" aria-live="polite">${r}</span>
3531
+ <div class="assistant-message-action-confirm-controls">
3532
+ <luzmo-button
3533
+ class="assistant-message-action-confirm-cancel"
3534
+ size="xs"
3535
+ variant="neutral"
3536
+ treatment="outline"
3537
+ quiet
3538
+ ?disabled=${this.disabled}
3539
+ @click=${this._cancelAssistantMessageActionConfirm}
3540
+ >
3541
+ ${n("Cancel", { desc: "Cancel assistant message action confirmation" })}
3542
+ </luzmo-button>
3543
+ <luzmo-button
3544
+ class="assistant-message-action-confirm-confirm"
3545
+ size="xs"
3546
+ variant=${t.confirmVariant ?? "negative"}
3547
+ ?disabled=${i}
3548
+ @click=${() => this._confirmAssistantMessageAction(e, t)}
3549
+ >
3550
+ ${t.label}
3551
+ </luzmo-button>
3552
+ </div>
3553
+ `;
3554
+ }
3555
+ _renderAssistantMessageActions(e, n) {
3556
+ let r = e.actions ?? [], i = r.length > 0, a = this._isLatestAssistantMessage(e, n), c = this._isAssistantMessageActionConfirming(e);
3557
+ return !i && !a ? s : o`
3558
+ <div
3559
+ class="assistant-message-actions ${this._assistantMessageActionsFooterHasContent(e, a) ? "assistant-message-actions--has-content" : ""} ${c ? "assistant-message-actions--confirming" : ""}"
3560
+ @keydown=${c ? this._handleAssistantMessageActionConfirmKeydown : s}
3561
+ >
3562
+ ${c ? this._renderAssistantMessageActionConfirm(e) : o`
3563
+ ${r.map((t) => this._renderBuiltInAssistantMessageAction(e, t))}
3564
+ ${a ? o`
3565
+ <slot
3566
+ name=${t.assistantMessageActionsSlot}
3567
+ @slotchange=${this._handleAssistantMessageActionsSlotChange}
3568
+ ></slot>
3569
+ ` : s}
3570
+ `}
3571
+ </div>
3572
+ `;
3573
+ }
3574
+ _renderRestoreMenu(e, t, a, c = !1) {
3575
+ if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== a)) return s;
3576
+ let l = `context-menu-trigger-${e.apiMessageId}`;
3577
+ return o`
3578
+ <div class="assistant-context-menu">
3579
+ <button
3580
+ id=${l}
3581
+ class="assistant-context-menu-trigger"
3582
+ type="button"
3583
+ aria-label=${n("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3584
+ aria-haspopup="menu"
3585
+ ?disabled=${c}
3586
+ >
3587
+ ${i(r)}
3588
+ </button>
3589
+ <luzmo-overlay
3590
+ trigger="${l}@click"
3591
+ placement="bottom-end"
3592
+ >
3593
+ <luzmo-popover>
3594
+ <button
3595
+ class="assistant-context-menu-item"
3596
+ type="button"
3597
+ ?disabled=${c}
3598
+ @click=${() => this._handleRestoreState(e, t)}
3599
+ >
3600
+ ${n("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3601
+ </button>
3602
+ </luzmo-popover>
3603
+ </luzmo-overlay>
3604
+ </div>
3605
+ `;
3606
+ }
3607
+ _renderMessages() {
3608
+ 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"), c = a?.id;
3609
+ return i.map((t) => {
3610
+ let l = !!t.progress?.children?.length, u = l && this._isLastAiMessageWithProgress(t, i), ee = l && (r || n || !u), te = l ? o`
3611
+ <luzmo-progress-steps
3612
+ .progress=${t.progress}
3613
+ ?condensed=${ee}
3614
+ collapsed
3615
+ no-animate
3616
+ size="s"
3617
+ ></luzmo-progress-steps>
3618
+ ` : s;
3619
+ if (t.type === "user") return o`
3620
+ <luzmo-chat-message
3621
+ avatar-placement="bottom"
3622
+ position="right"
3623
+ variant="primary"
3624
+ size="s"
3625
+ >
3626
+ ${t.message}
3627
+ </luzmo-chat-message>
3628
+ `;
3629
+ let ne = e.indexOf(t), re = t.isError ? "error" : t.isCancelled ? "cancelled" : "", ie = t.isCancelled ? t.message : o`<div class="markdown-content">${d(this._renderMarkdown(t.message))}</div>`;
3630
+ return o`
3631
+ ${te}
3632
+ <div class="assistant-message-wrapper">
3633
+ <div class="assistant-message-body">
3634
+ <luzmo-chat-message
3635
+ class=${re}
3636
+ role=${t.isError ? "alert" : s}
3637
+ avatar-placement="bottom"
3638
+ position="left"
3639
+ quiet
3640
+ size="s"
3641
+ >
3642
+ ${ie}
3643
+ </luzmo-chat-message>
3644
+
3645
+ ${this._renderRestoreMenu(t, ne, c, r)}
3646
+ </div>
3647
+
3648
+ ${this._renderAssistantMessageActions(t, a)}
3649
+ </div>
3650
+ `;
3651
+ });
3652
+ }
3653
+ _renderStreamingResponse() {
3654
+ let { inflightMessage: e } = this._getRenderState();
3655
+ return e?.message ? o`
3656
+ <luzmo-chat-message
3657
+ avatar-placement="bottom"
3658
+ position="left"
3659
+ quiet
3660
+ size="s"
3661
+ >
3662
+ <div class="markdown-content">${d(this._renderMarkdown(e.message))}</div>
3663
+ </luzmo-chat-message>
3664
+ ` : s;
3665
+ }
3666
+ _renderLoadingMessage() {
3667
+ let { isGenerating: e, progress: t, inflightMessage: r } = this._getRenderState();
3668
+ if (!e || t?.children?.length || r?.message) return s;
3669
+ let c = this.agent === "dashboard" ? !this.dashboard : this.chart?.type === "placeholder", l = this.agent === "dashboard" ? c ? n("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : n("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : c ? n("Creating item...", { desc: "Label for ai chat creating item message" }) : n("Updating item...", { desc: "Label for ai chat updating item message" });
3670
+ return o`
3671
+ <luzmo-chat-message
3672
+ avatar-placement="bottom"
3673
+ position="left"
3674
+ quiet
3675
+ size="s"
3676
+ >
3677
+ <div class="loading-message" role="status" aria-live="polite">
3678
+ <span class="icon-lg">${i(a, { className: "spin" })}</span>
3679
+ <span class="loading-message-text">${this.loadingMessage || l}</span>
3680
+ </div>
3681
+ </luzmo-chat-message>
3682
+ `;
3683
+ }
3684
+ _renderEmptyState() {
3685
+ if (this._getRenderState().messages.length > 0) return s;
3686
+ let e = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3687
+ return o`
3688
+ <luzmo-ai-chat-empty-state
3689
+ .title=${this.emptyStateTitle || e}
3690
+ .subtitle=${t ? this.emptyStateSubtitle : ""}
3691
+ .suggestions=${this.emptyStateSuggestions}
3692
+ ?disabled=${this.disabled || this._getRenderState().isGenerating}
3693
+ @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3694
+ ></luzmo-ai-chat-empty-state>
3695
+ `;
3696
+ }
3697
+ render() {
3698
+ let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3699
+ return o`
3700
+ <div class="chat-container" role="region" aria-label=${n("AI Chat", { desc: "Accessible label for AI chat region" })}>
3701
+ <div class="chat-messages-container" role="log" aria-live="polite">
3702
+ ${this._renderEmptyState()}
3703
+ ${this._renderMessages()}
3704
+ ${this._renderProgress()}
3705
+ ${this._renderStreamingResponse()}
3706
+ ${this._renderLoadingMessage()}
3707
+ </div>
3708
+
3709
+ <luzmo-ai-interaction-textarea
3710
+ role="group"
3711
+ aria-label=${n("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3712
+ .value=${this._textareaValue}
3713
+ .selectedDatasets=${e}
3714
+ .placeholder=${this.placeholder}
3715
+ ?disabled=${this.disabled}
3716
+ ?is-generating=${t}
3717
+ ?stoppable=${this.stoppable}
3718
+ ?hide-dataset-button=${this.hideDatasetButton}
3719
+ ?hide-dataset-icons=${this.hideDatasetIcons}
3720
+ ?disable-dataset-modification=${this.disableDatasetModification}
3721
+ ?hide-selected-datasets=${this.hideSelectedDatasets}
3722
+ ?disable-column-mentions=${this.disableColumnMentions}
3723
+ ?require-dataset=${this.requireDataset}
3724
+ auth-key=${this.authKey}
3725
+ auth-token=${this.authToken}
3726
+ api-url=${this.apiUrl}
3727
+ app-server=${this.appServer}
3728
+ ?flag-opendata=${this.flagOpendata}
3729
+ @prompt-submitted=${this._handlePromptSubmitted}
3730
+ @prompt-stopped=${this._handlePromptStopped}
3731
+ @dataset-selected=${this._handleDatasetSelected}
3732
+ @dataset-removed=${this._handleDatasetRemoved}
3733
+ ></luzmo-ai-interaction-textarea>
3734
+ </div>
3735
+ `;
3736
+ }
3737
+ };
3738
+ t([l({ type: Array })], $.prototype, "messages", void 0), t([l({
3739
+ type: Array,
3740
+ attribute: "selected-datasets"
3741
+ })], $.prototype, "selectedDatasets", void 0), t([l({ type: String })], $.prototype, "placeholder", void 0), t([l({
3742
+ type: Boolean,
3743
+ reflect: !0
3744
+ })], $.prototype, "disabled", void 0), t([l({
3745
+ type: Boolean,
3746
+ reflect: !0
3747
+ })], $.prototype, "stoppable", void 0), t([l({
3748
+ type: Boolean,
3749
+ attribute: "show-assistant-context-menu"
3750
+ })], $.prototype, "showAssistantContextMenu", void 0), t([l({
3751
+ type: String,
3752
+ attribute: "auth-key"
3753
+ })], $.prototype, "authKey", void 0), t([l({
3754
+ type: String,
3755
+ attribute: "auth-token"
3756
+ })], $.prototype, "authToken", void 0), t([l({
3757
+ type: String,
3758
+ attribute: "api-url"
3759
+ })], $.prototype, "apiUrl", void 0), t([l({
3760
+ type: String,
3761
+ attribute: "app-server"
3762
+ })], $.prototype, "appServer", void 0), t([l({
3763
+ type: Boolean,
3764
+ attribute: "flag-opendata"
3765
+ })], $.prototype, "flagOpendata", void 0), t([l({
3766
+ type: Boolean,
3767
+ attribute: "hide-dataset-button"
3768
+ })], $.prototype, "hideDatasetButton", void 0), t([l({
3769
+ type: Boolean,
3770
+ attribute: "hide-dataset-icons"
3771
+ })], $.prototype, "hideDatasetIcons", void 0), t([l({
3772
+ type: Boolean,
3773
+ attribute: "disable-dataset-modification"
3774
+ })], $.prototype, "disableDatasetModification", void 0), t([l({
3775
+ type: Boolean,
3776
+ attribute: "hide-selected-datasets"
3777
+ })], $.prototype, "hideSelectedDatasets", void 0), t([l({
3778
+ type: Boolean,
3779
+ attribute: "disable-column-mentions"
3780
+ })], $.prototype, "disableColumnMentions", void 0), t([l({
3781
+ type: Boolean,
3782
+ attribute: "require-dataset"
3783
+ })], $.prototype, "requireDataset", void 0), t([l({ type: String })], $.prototype, "agent", void 0), t([l({ type: String })], $.prototype, "task", void 0), t([l({
3784
+ type: String,
3785
+ attribute: "model-preference"
3786
+ })], $.prototype, "modelPreference", void 0), t([l({ attribute: !1 })], $.prototype, "chatSession", void 0), t([l({
3787
+ type: String,
3788
+ attribute: "conversation-id"
3789
+ })], $.prototype, "conversationId", void 0), t([l({
3790
+ type: Object,
3791
+ attribute: "chart"
3792
+ })], $.prototype, "chart", void 0), t([l({ type: Object })], $.prototype, "dashboard", void 0), t([l({
3793
+ type: String,
3794
+ attribute: "current-screen-mode"
3795
+ })], $.prototype, "currentScreenMode", void 0), t([l({
3796
+ type: String,
3797
+ attribute: "locale-id"
3798
+ })], $.prototype, "localeId", void 0), t([l({
3799
+ type: String,
3800
+ attribute: "timezone-id"
3801
+ })], $.prototype, "timezoneId", void 0), t([l({
3802
+ type: String,
3803
+ attribute: "api-version"
3804
+ })], $.prototype, "apiVersion", void 0), t([l({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), t([l({
3805
+ type: String,
3806
+ attribute: "loading-message"
3807
+ })], $.prototype, "loadingMessage", void 0), t([l({
3808
+ type: String,
3809
+ attribute: "cancelled-message"
3810
+ })], $.prototype, "cancelledMessage", void 0), t([l({
3811
+ type: String,
3812
+ attribute: "initial-prompt"
3813
+ })], $.prototype, "initialPrompt", void 0), t([l({
3814
+ type: String,
3815
+ attribute: "empty-state-title"
3816
+ })], $.prototype, "emptyStateTitle", void 0), t([l({
3817
+ type: String,
3818
+ attribute: "empty-state-subtitle"
3819
+ })], $.prototype, "emptyStateSubtitle", void 0), t([l({
3820
+ type: Array,
3821
+ attribute: !1
3822
+ })], $.prototype, "emptyStateSuggestions", void 0), t([u()], $.prototype, "_textareaValue", void 0), t([u()], $.prototype, "_assistantMessageActionsSlotHasContent", void 0), t([u()], $.prototype, "_pendingAssistantMessageAction", void 0);
3823
+ //#endregion
3824
+ //#region src/components/ai-chat/ai-chat-events.ts
3825
+ function Fr(e) {
3826
+ return e.recognized === !0;
3827
+ }
3828
+ //#endregion
3829
+ //#region src/components/ai-chat/index.ts
3830
+ customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
3831
+ //#endregion
3832
+ export { yn as C, Sn as S, _n as T, Dn as _, Nr as a, wn as b, Or as c, Wn as d, Mn as f, jn as g, kn as h, Mr as i, Dr as l, On as m, $ as n, Ar as o, Nn as p, Pr as r, kr as s, Fr as t, Bn as u, Tn as v, vn as w, Cn as x, En as y };