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

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 (941) hide show
  1. package/README.md +1 -1
  2. package/components/ai-chat/index.cjs +1 -1
  3. package/components/ai-chat/index.js +1 -1
  4. package/components/ai-chat-CXt4wCe0.js +3715 -0
  5. package/components/ai-chat-Dnf-C838.cjs +258 -0
  6. package/components/ai-interaction-textarea/index.cjs +1 -1
  7. package/components/ai-interaction-textarea/index.js +1 -1
  8. package/components/ai-interaction-textarea-B_-aZ9mc.cjs +68 -0
  9. package/components/ai-interaction-textarea-DSrZkuh9.js +299 -0
  10. package/components/area-chart-options.config-BjdRY1sr.js +146 -0
  11. package/components/area-chart-options.config-CJYI-zcZ.cjs +20 -0
  12. package/components/area-chart-positioning.config-PZ-MmeDb.cjs +20 -0
  13. package/components/area-chart-positioning.config-hLhrDJ3v.js +55 -0
  14. package/components/area-chart-slots.config-B56LJaky.cjs +20 -0
  15. package/components/area-chart-slots.config-BpvvqFy_.js +55 -0
  16. package/components/bar-chart-options.config-D2a-U6kG.cjs +20 -0
  17. package/components/bar-chart-options.config-DxNHV39Y.js +220 -0
  18. package/components/bar-chart-positioning.config-C6wWTn1o.js +59 -0
  19. package/components/bar-chart-positioning.config-DI8tOMbI.cjs +20 -0
  20. package/components/bar-chart-slots.config-CfIirCOX.js +50 -0
  21. package/components/bar-chart-slots.config-CkOVmYcA.cjs +20 -0
  22. package/components/base-BCmPH4SF.cjs +20 -0
  23. package/components/base-DYkpEuMf.js +249 -0
  24. package/components/base-store-D0jbv0bE.js +160 -0
  25. package/components/base-store-ab2wBsBE.cjs +20 -0
  26. package/components/box-plot-options.config-CXey4hvi.js +296 -0
  27. package/components/box-plot-options.config-Di28EvZb.cjs +20 -0
  28. package/components/box-plot-positioning.config-D_qhNWth.cjs +20 -0
  29. package/components/box-plot-positioning.config-XG-WcIlA.js +48 -0
  30. package/components/box-plot-slots.config-DL-tTTn9.cjs +20 -0
  31. package/components/box-plot-slots.config-DclNulnH.js +40 -0
  32. package/components/bubble-chart-options.config-CeaOv4eF.js +115 -0
  33. package/components/bubble-chart-options.config-CnpBrIo6.cjs +20 -0
  34. package/components/bubble-chart-positioning.config-CHYBh_Nb.cjs +20 -0
  35. package/components/bubble-chart-positioning.config-o_r-GWQG.js +55 -0
  36. package/components/bubble-chart-slots.config-D7vQta7G.js +47 -0
  37. package/components/bubble-chart-slots.config-smlOOwcK.cjs +20 -0
  38. package/components/bullet-chart-options.config-6nATAuC3.cjs +20 -0
  39. package/components/bullet-chart-options.config-CLn7sV4W.js +75 -0
  40. package/components/bullet-chart-positioning.config-BF8PflF6.cjs +20 -0
  41. package/components/bullet-chart-positioning.config-DE5oy4M6.js +56 -0
  42. package/components/bullet-chart-slots.config-BaTbWYvU.cjs +20 -0
  43. package/components/bullet-chart-slots.config-IX7zJWc7.js +46 -0
  44. package/components/choropleth-map-options.config-CmtZtBAC.cjs +20 -0
  45. package/components/choropleth-map-options.config-DzTlJSO3.js +348 -0
  46. package/components/choropleth-map-positioning.config-Cf8bEIns.js +55 -0
  47. package/components/choropleth-map-positioning.config-DT1WWljP.cjs +20 -0
  48. package/components/choropleth-map-slots.config-ClMcW8wV.cjs +20 -0
  49. package/components/choropleth-map-slots.config-y0y9rf6i.js +53 -0
  50. package/components/circle-pack-chart-options.config-BA_G1sQ8.cjs +20 -0
  51. package/components/circle-pack-chart-options.config-DoLPbnPq.js +54 -0
  52. package/components/circle-pack-chart-positioning.config-DDpnake6.cjs +20 -0
  53. package/components/circle-pack-chart-positioning.config-Dy-DZ_de.js +48 -0
  54. package/components/circle-pack-chart-slots.config-IH2KV7z1.cjs +20 -0
  55. package/components/circle-pack-chart-slots.config-X9WVAykN.js +38 -0
  56. package/components/circular-gauge-options.config-BPUFjqx8.js +188 -0
  57. package/components/circular-gauge-options.config-BtP-YDIr.cjs +20 -0
  58. package/components/circular-gauge-positioning.config-D2t_3T1J.cjs +20 -0
  59. package/components/circular-gauge-positioning.config-DljBe7e-.js +48 -0
  60. package/components/circular-gauge-slots.config-B6ajddW-.cjs +20 -0
  61. package/components/circular-gauge-slots.config-NIEmIAIG.js +39 -0
  62. package/components/color-CXw2IfjN.js +3812 -0
  63. package/components/color-range-utils-u4ziqRRA.js +63 -0
  64. package/components/column-chart-options.config-DQts3cE4.js +219 -0
  65. package/components/column-chart-options.config-eJ1Cexxe.cjs +20 -0
  66. package/components/column-chart-positioning.config-Bob00Qnq.js +55 -0
  67. package/components/column-chart-positioning.config-Uvvr5PxW.cjs +20 -0
  68. package/components/column-chart-slots.config-BY6y_rvE.cjs +20 -0
  69. package/components/column-chart-slots.config-CoFarLvo.js +50 -0
  70. package/components/combination-chart-options.config-C3kZ2fpK.cjs +20 -0
  71. package/components/combination-chart-options.config-CjSV6Ic4.js +87 -0
  72. package/components/combination-chart-positioning.config-BzbcDQ2O.cjs +20 -0
  73. package/components/combination-chart-positioning.config-DG2CM16I.js +48 -0
  74. package/components/combination-chart-slots.config-BGRHSwfr.js +43 -0
  75. package/components/combination-chart-slots.config-Ciza_y3a.cjs +20 -0
  76. package/components/conditional-number-options.config-CZFqw31c.js +205 -0
  77. package/components/conditional-number-options.config-CadHLi0m.cjs +20 -0
  78. package/components/conditional-number-positioning.config-CT8PqxDT.js +48 -0
  79. package/components/conditional-number-positioning.config-DpORiYgh.cjs +20 -0
  80. package/components/conditional-number-slots.config-CWX6OuUa.cjs +20 -0
  81. package/components/conditional-number-slots.config-r_C8T2HH.js +39 -0
  82. package/components/convert-data-field-to-slot-content-BQkSy_8B.cjs +20 -0
  83. package/components/convert-data-field-to-slot-content-C6IIqU7G.js +53 -0
  84. package/components/data-broker-BH5WDG0j.cjs +20 -0
  85. package/components/data-broker-CVDImE1j.js +1674 -0
  86. package/components/data-field/index.cjs +1 -1
  87. package/components/data-field/index.js +1 -1
  88. package/components/data-field-CxUItUcs.cjs +54 -0
  89. package/components/data-field-RzkD37hR.js +121 -0
  90. package/components/data-field-level/index.cjs +1 -1
  91. package/components/data-field-level/index.js +1 -1
  92. package/components/data-field-level-55bJkqFt.cjs +55 -0
  93. package/components/data-field-level-zbu4U2m5.js +246 -0
  94. package/components/data-field-panel/index.cjs +1 -1
  95. package/components/data-field-panel/index.js +1 -1
  96. package/components/data-field-panel-C3O77CIF.cjs +87 -0
  97. package/components/data-field-panel-Ob-hNZwz.js +385 -0
  98. package/components/data-fields-select/index.cjs +1 -1
  99. package/components/data-fields-select/index.js +1 -1
  100. package/components/data-fields-select-CYQy6Ow-.js +262 -0
  101. package/components/data-fields-select-D-nSjOep.cjs +41 -0
  102. package/components/dataset-icon/index.js +1 -1
  103. package/components/dataset-icon-BXEgg_8O.js +125 -0
  104. package/components/dataset-selector-list/index.cjs +1 -1
  105. package/components/dataset-selector-list/index.js +1 -1
  106. package/components/dataset-selector-list-BW5v_7_L.cjs +75 -0
  107. package/components/dataset-selector-list-DwfeaUGu.js +313 -0
  108. package/components/dataset-selector-row/index.cjs +1 -1
  109. package/components/dataset-selector-row/index.js +1 -1
  110. package/components/dataset-selector-row-BU7YhT7l.cjs +79 -0
  111. package/components/dataset-selector-row-CLbx0joD.js +273 -0
  112. package/components/date-comparison-filter-options.config--clPxHFt.cjs +20 -0
  113. package/components/date-comparison-filter-options.config-s16IGX_4.js +126 -0
  114. package/components/date-comparison-filter-slots.config-DQBKeCRX.js +33 -0
  115. package/components/date-comparison-filter-slots.config-KO9B0lfS.cjs +20 -0
  116. package/components/date-filter-options.config-BdNFe-Ds.cjs +20 -0
  117. package/components/date-filter-options.config-ChFEIjN3.js +118 -0
  118. package/components/date-filter-slots.config-BrQoD-EF.cjs +20 -0
  119. package/components/date-filter-slots.config-DREsncpE.js +37 -0
  120. package/components/de-BY1wWZE8.cjs +20 -0
  121. package/components/de-D-xQoqdB.js +473 -0
  122. package/components/decorate-CaYbmmmm.js +28 -0
  123. package/components/display-settings/index.cjs +1 -1
  124. package/components/display-settings/index.js +1 -1
  125. package/components/display-settings-COYLimuI.cjs +120 -0
  126. package/components/display-settings-ajA8j6kr.js +272 -0
  127. package/components/display-settings-binning/index.cjs +1 -1
  128. package/components/display-settings-binning/index.js +1 -1
  129. package/components/display-settings-binning-GKaol6nW.cjs +56 -0
  130. package/components/display-settings-binning-MHns2Ns6.js +110 -0
  131. package/components/display-settings-datetime/index.cjs +1 -1
  132. package/components/display-settings-datetime/index.js +1 -1
  133. package/components/display-settings-datetime-CLRXVpld.cjs +217 -0
  134. package/components/display-settings-datetime-D5eBAfWQ.js +413 -0
  135. package/components/display-settings-grand-totals/index.cjs +1 -1
  136. package/components/display-settings-grand-totals/index.js +1 -1
  137. package/components/display-settings-grand-totals-CpulhtNX.js +89 -0
  138. package/components/display-settings-grand-totals-DltI_Z-x.cjs +44 -0
  139. package/components/display-settings-numeric/index.cjs +1 -1
  140. package/components/display-settings-numeric/index.js +1 -1
  141. package/components/display-settings-numeric-CurqaTi5.cjs +190 -0
  142. package/components/display-settings-numeric-DnyXOV_x.js +479 -0
  143. package/components/display-settings-period-over-period/index.cjs +1 -1
  144. package/components/display-settings-period-over-period/index.js +1 -1
  145. package/components/display-settings-period-over-period-DP2grX4n.cjs +229 -0
  146. package/components/display-settings-period-over-period-Do4qG7yY.js +433 -0
  147. package/components/donut-chart-options.config-K-HkE7sL.cjs +20 -0
  148. package/components/donut-chart-options.config-WNOpb2n9.js +207 -0
  149. package/components/donut-chart-positioning.config-BLnTmwTZ.cjs +20 -0
  150. package/components/donut-chart-positioning.config-Bl96um6F.js +48 -0
  151. package/components/donut-chart-slots.config-DEQ3Cw6c.js +39 -0
  152. package/components/donut-chart-slots.config-RxPnpO6M.cjs +20 -0
  153. package/components/dropdown-filter-options.config-B-Vvy0Nq.cjs +20 -0
  154. package/components/dropdown-filter-options.config-DBNawOPR.js +153 -0
  155. package/components/dropdown-filter-slots.config-BBZChIHC.cjs +20 -0
  156. package/components/dropdown-filter-slots.config-DcStZGjV.js +38 -0
  157. package/components/en-B34alchz.cjs +20 -0
  158. package/components/en-GB-B3xz84vF.cjs +20 -0
  159. package/components/en-US-B34alchz.cjs +20 -0
  160. package/components/es-BIaD4kOL.cjs +20 -0
  161. package/components/es-CLnBAiLu.js +473 -0
  162. package/components/evolution-number-options.config-Bt1FZqqQ.cjs +20 -0
  163. package/components/evolution-number-options.config-CrIM2GTn.js +228 -0
  164. package/components/evolution-number-positioning.config-DSoC35zp.cjs +20 -0
  165. package/components/evolution-number-positioning.config-DXNPD29G.js +48 -0
  166. package/components/evolution-number-slots.config-Bq_JlxgK.js +37 -0
  167. package/components/evolution-number-slots.config-CYxdcD-x.cjs +20 -0
  168. package/components/filter-expression-picker/index.cjs +1 -1
  169. package/components/filter-expression-picker/index.js +1 -1
  170. package/components/filter-expression-picker-0eNf_L9I.cjs +38 -0
  171. package/components/filter-expression-picker-D_buTmzJ.js +425 -0
  172. package/components/filter-item/index.cjs +1 -1
  173. package/components/filter-item/index.js +1 -1
  174. package/components/filter-item-DGnRmeaB.cjs +58 -0
  175. package/components/filter-item-VzEHDr04.js +242 -0
  176. package/components/filter-parameter-picker/index.js +1 -1
  177. package/components/filter-value-picker/index.cjs +1 -1
  178. package/components/filter-value-picker/index.js +1 -1
  179. package/components/filter-value-picker-C1lDTmKM.cjs +60 -0
  180. package/components/filter-value-picker-CIblY-PW.js +151 -0
  181. package/components/filter-value-picker-datetime/index.cjs +1 -1
  182. package/components/filter-value-picker-datetime/index.js +1 -1
  183. package/components/filter-value-picker-datetime-DQpEf_tv.js +139 -0
  184. package/components/filter-value-picker-datetime-dCo1_pma.cjs +42 -0
  185. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  186. package/components/filter-value-picker-hierarchy/index.js +1 -1
  187. package/components/filter-value-picker-hierarchy-DaZlasgM.cjs +47 -0
  188. package/components/filter-value-picker-hierarchy-DzHUrpyk.js +232 -0
  189. package/components/filter-value-picker-numeric/index.cjs +1 -1
  190. package/components/filter-value-picker-numeric/index.js +1 -1
  191. package/components/filter-value-picker-numeric-BU975w8c.js +219 -0
  192. package/components/filter-value-picker-numeric-D-dUSGAP.cjs +48 -0
  193. package/components/filters/index.cjs +1 -1
  194. package/components/filters/index.js +1 -1
  195. package/components/filters-BgTnxSKg.js +400 -0
  196. package/components/filters-Cx1S1-vx.cjs +150 -0
  197. package/components/formatter-8m-wrIM-.cjs +20 -0
  198. package/components/formula/index.cjs +1 -1
  199. package/components/formula/index.js +1 -1
  200. package/components/formula-CeDEKB7D.js +138 -0
  201. package/components/formula-D7E8UieE.cjs +45 -0
  202. package/components/formula-codemirror-CFMYytMd.cjs +215 -0
  203. package/components/formula-codemirror-MygWCu2u.js +11973 -0
  204. package/components/formula-display-store-BYa910x_.js +1086 -0
  205. package/components/formula-display-store-DjjsQ5mW.cjs +20 -0
  206. package/components/formula-editor/index.cjs +1 -1
  207. package/components/formula-editor/index.js +3 -3
  208. package/components/formula-editor-4PoZ3BlC.cjs +218 -0
  209. package/components/formula-editor-DeYzzLDr.js +666 -0
  210. package/components/formula-field/index.cjs +1 -1
  211. package/components/formula-field/index.js +1 -1
  212. package/components/formula-field-DXdxspyY.js +40 -0
  213. package/components/formula-field-DkKXMIMg.cjs +20 -0
  214. package/components/formula-input-base-Bz_XVZcs.cjs +49 -0
  215. package/components/formula-input-base-Dok5ujvH.js +236 -0
  216. package/components/fr-CHG2Tcby.cjs +20 -0
  217. package/components/fr-DIwbOnwC.js +473 -0
  218. package/components/funnel-chart-options.config-BAIgb6x9.cjs +20 -0
  219. package/components/funnel-chart-options.config-k0X4rkj-.js +187 -0
  220. package/components/funnel-chart-positioning.config-BcsV1xp7.cjs +20 -0
  221. package/components/funnel-chart-positioning.config-CWSM8nTo.js +48 -0
  222. package/components/funnel-chart-slots.config-CSI5mdma.cjs +20 -0
  223. package/components/funnel-chart-slots.config-DKhaZf_r.js +43 -0
  224. package/components/get-css-variable-Bpma6ZOo.js +63 -0
  225. package/components/get-css-variable-rHTFFWYM.cjs +20 -0
  226. package/components/get-dataset-name-Dwuh7DWE.cjs +20 -0
  227. package/components/get-dataset-name-SfDNjsuR.js +27 -0
  228. package/components/groupings-BNrLlXIB.cjs +20 -0
  229. package/components/groupings-okwLJKoG.js +52 -0
  230. package/components/heat-map-options.config-Ct-93RVQ.cjs +20 -0
  231. package/components/heat-map-options.config-_xxAm6iG.js +224 -0
  232. package/components/heat-map-positioning.config-C0dkG5_9.cjs +20 -0
  233. package/components/heat-map-positioning.config-DQJP4mTG.js +48 -0
  234. package/components/heat-map-slots.config-BDfEGgq5.js +37 -0
  235. package/components/heat-map-slots.config-D0mwjImu.cjs +20 -0
  236. package/components/heat-table-options.config-7IS5wa9l.cjs +20 -0
  237. package/components/heat-table-options.config-DxRbWqJ8.js +372 -0
  238. package/components/heat-table-positioning.config-BzSpf7ed.cjs +20 -0
  239. package/components/heat-table-positioning.config-WUHNZPT-.js +55 -0
  240. package/components/heat-table-slots.config-CH6Q9203.cjs +20 -0
  241. package/components/heat-table-slots.config-CVh1TEJJ.js +49 -0
  242. package/components/hexbin-map-options.config-CUAv6zuD.cjs +20 -0
  243. package/components/hexbin-map-options.config-CmAmK-jM.js +276 -0
  244. package/components/hexbin-map-positioning.config-CJPhgdt2.js +48 -0
  245. package/components/hexbin-map-positioning.config-Cno9WIc9.cjs +20 -0
  246. package/components/hexbin-map-slots.config-BdkQVzI7.cjs +20 -0
  247. package/components/hexbin-map-slots.config-rxPZ4kwL.js +37 -0
  248. package/components/image-options.config-DJ2DEf7g.js +153 -0
  249. package/components/image-options.config-DXqA7sAa.cjs +20 -0
  250. package/components/image-slots.config-DprzKxj3.cjs +20 -0
  251. package/components/image-slots.config-bDNDmiWy.js +24 -0
  252. package/components/index.cjs +1 -1
  253. package/components/index.js +63 -62
  254. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +7 -0
  255. package/components/interactive-viz-item/index.cjs +20 -0
  256. package/components/interactive-viz-item/index.d.ts +10 -0
  257. package/components/interactive-viz-item/index.js +28 -0
  258. package/components/interactive-viz-item/interactive-viz-item.d.ts +96 -0
  259. package/components/interactive-viz-item/types.d.ts +117 -0
  260. package/components/interactive-viz-item-63pap_oz.cjs +247 -0
  261. package/components/interactive-viz-item-QVji6wbp.js +693 -0
  262. package/components/item-grid/index.cjs +1 -1
  263. package/components/item-grid/index.js +1 -1
  264. package/components/item-grid-CO_cqGqJ.js +4559 -0
  265. package/components/item-grid-CRAoMdCq.cjs +113 -0
  266. package/components/item-option/index.cjs +1 -1
  267. package/components/item-option/index.js +1 -1
  268. package/components/item-option-Bc6qXONK.js +969 -0
  269. package/components/item-option-action-button-group/index.cjs +1 -1
  270. package/components/item-option-action-button-group/index.js +1 -1
  271. package/components/item-option-action-button-group-VpgTKSIV.js +118 -0
  272. package/components/item-option-action-button-group-jPUDKP3M.cjs +53 -0
  273. package/components/item-option-base-Bk9L8Ie7.cjs +56 -0
  274. package/components/item-option-base-VV7gyznL.js +123 -0
  275. package/components/item-option-color-palette-picker/index.cjs +1 -1
  276. package/components/item-option-color-palette-picker/index.js +1 -1
  277. package/components/item-option-color-palette-picker-CQgG_NPQ.js +2041 -0
  278. package/components/item-option-color-palette-picker-kch0Ep_5.cjs +40 -0
  279. package/components/item-option-color-picker/index.cjs +1 -1
  280. package/components/item-option-color-picker/index.js +1 -1
  281. package/components/item-option-color-picker-BmQBTQzb.js +87 -0
  282. package/components/item-option-color-picker-DeDwpICb.cjs +34 -0
  283. package/components/item-option-color-range/index.cjs +1 -1
  284. package/components/item-option-color-range/index.js +1 -1
  285. package/components/item-option-color-range-Cj6sZ72F.cjs +98 -0
  286. package/components/item-option-color-range-D2kHXssY.js +220 -0
  287. package/components/item-option-iQM2pOGK.cjs +252 -0
  288. package/components/item-option-multi-language-field/index.cjs +1 -1
  289. package/components/item-option-multi-language-field/index.js +1 -1
  290. package/components/item-option-multi-language-field-Cc9ph205.cjs +33 -0
  291. package/components/item-option-multi-language-field-DbqcqhhN.js +82 -0
  292. package/components/item-option-number-field/index.cjs +1 -1
  293. package/components/item-option-number-field/index.js +1 -1
  294. package/components/item-option-number-field-B6GFKuLN.cjs +38 -0
  295. package/components/item-option-number-field-BbCVJeXZ.js +102 -0
  296. package/components/item-option-panel/index.cjs +1 -1
  297. package/components/item-option-panel/index.js +1 -1
  298. package/components/item-option-panel-6UFGCcnF.cjs +67 -0
  299. package/components/item-option-panel-CrNZ0xIF.js +183 -0
  300. package/components/item-option-picker/index.cjs +1 -1
  301. package/components/item-option-picker/index.js +1 -1
  302. package/components/item-option-picker-DJKTAG9w.cjs +37 -0
  303. package/components/item-option-picker-YquXTQNY.js +77 -0
  304. package/components/item-option-position-picker/index.cjs +1 -1
  305. package/components/item-option-position-picker/index.js +1 -1
  306. package/components/item-option-position-picker-Csc4Y6dN.cjs +32 -0
  307. package/components/item-option-position-picker-DKvsF-VQ.js +117 -0
  308. package/components/item-option-positions-number-field/index.cjs +1 -1
  309. package/components/item-option-positions-number-field/index.js +1 -1
  310. package/components/item-option-positions-number-field-Bxcbu_IR.js +164 -0
  311. package/components/item-option-positions-number-field-DBV6Yekk.cjs +49 -0
  312. package/components/item-option-radio-button-group/index.cjs +1 -1
  313. package/components/item-option-radio-button-group/index.js +1 -1
  314. package/components/item-option-radio-button-group-Bzh4RtSn.cjs +37 -0
  315. package/components/item-option-radio-button-group-Cw-xUSUS.js +74 -0
  316. package/components/item-option-slider/index.cjs +1 -1
  317. package/components/item-option-slider/index.js +1 -1
  318. package/components/item-option-slider-BwQnaxvO.js +81 -0
  319. package/components/item-option-slider-DUqo3Fw0.cjs +33 -0
  320. package/components/item-option-switch/index.cjs +1 -1
  321. package/components/item-option-switch/index.js +1 -1
  322. package/components/item-option-switch-DBsakQjy.cjs +30 -0
  323. package/components/item-option-switch-IixoilYJ.js +69 -0
  324. package/components/item-option-text-field/index.cjs +1 -1
  325. package/components/item-option-text-field/index.js +1 -1
  326. package/components/item-option-text-field-B4V_sKnM.cjs +33 -0
  327. package/components/item-option-text-field-CdWylobQ.js +80 -0
  328. package/components/item-options-configs.cjs +1 -1
  329. package/components/item-options-configs.js +45 -45
  330. package/components/item-slot-drop/index.cjs +1 -1
  331. package/components/item-slot-drop/index.js +1 -1
  332. package/components/item-slot-drop-BmvMi3dI.js +324 -0
  333. package/components/item-slot-drop-D8KI2kny.cjs +91 -0
  334. package/components/item-slot-drop-panel/index.cjs +1 -1
  335. package/components/item-slot-drop-panel/index.js +1 -1
  336. package/components/item-slot-drop-panel-Crw-ktDj.cjs +57 -0
  337. package/components/item-slot-drop-panel-D5vaJidp.js +355 -0
  338. package/components/item-slot-picker/index.cjs +1 -1
  339. package/components/item-slot-picker/index.js +1 -1
  340. package/components/item-slot-picker-BZV33YoP.js +474 -0
  341. package/components/item-slot-picker-BgQAviso.cjs +158 -0
  342. package/components/item-slot-picker-panel/index.cjs +1 -1
  343. package/components/item-slot-picker-panel/index.js +1 -1
  344. package/components/item-slot-picker-panel-C26kZ4zE.cjs +81 -0
  345. package/components/item-slot-picker-panel-DyhRlAKN.js +448 -0
  346. package/components/item-slots-configs.cjs +1 -1
  347. package/components/item-slots-configs.js +45 -45
  348. package/components/line-chart-options.config-CfHRdG6O.js +168 -0
  349. package/components/line-chart-options.config-DKQ1k4lg.cjs +20 -0
  350. package/components/line-chart-positioning.config-Cfcgse1N.js +55 -0
  351. package/components/line-chart-positioning.config-pSGQm1C1.cjs +20 -0
  352. package/components/line-chart-slots.config-Cjp4btvG.cjs +20 -0
  353. package/components/line-chart-slots.config-DKy4D4Yt.js +55 -0
  354. package/components/load-data-fields-for-datasets-BVGaku2J.cjs +20 -0
  355. package/components/load-data-fields-for-datasets-DeXLqWt4.js +42 -0
  356. package/components/localized-mixin-BYWQe1fg.js +45 -0
  357. package/components/localized-mixin-DrK3QZNa.cjs +20 -0
  358. package/components/marker-map-options.config-C_aGdRQQ.js +117 -0
  359. package/components/marker-map-options.config-DBPPcGN4.cjs +20 -0
  360. package/components/marker-map-positioning.config-B-HitobG.cjs +20 -0
  361. package/components/marker-map-positioning.config-DTCPGbnG.js +48 -0
  362. package/components/marker-map-slots.config-BKRRAGwB.js +37 -0
  363. package/components/marker-map-slots.config-BOQ8AwRv.cjs +20 -0
  364. package/components/nl-C_g1Le3t.js +473 -0
  365. package/components/nl-PxN5EqzT.cjs +20 -0
  366. package/components/ohlc-chart-options.config-Bd-vLN0I.js +65 -0
  367. package/components/ohlc-chart-options.config-D9h-VLdq.cjs +20 -0
  368. package/components/ohlc-chart-positioning.config-D0kJJkXw.js +78 -0
  369. package/components/ohlc-chart-positioning.config-NhpIR1T3.cjs +20 -0
  370. package/components/ohlc-chart-slots.config-CUBUexI-.cjs +20 -0
  371. package/components/ohlc-chart-slots.config-DC8NCD0o.js +68 -0
  372. package/components/parallel-coordinates-plot-options.config-BUo6XxfP.js +42 -0
  373. package/components/parallel-coordinates-plot-options.config-ovgY0A7j.cjs +20 -0
  374. package/components/parallel-coordinates-plot-positioning.config-DLF0U4lZ.cjs +20 -0
  375. package/components/parallel-coordinates-plot-positioning.config-Dzd0eaka.js +48 -0
  376. package/components/parallel-coordinates-plot-slots.config-BXZ-NmbH.cjs +20 -0
  377. package/components/parallel-coordinates-plot-slots.config-Dy-9mztD.js +46 -0
  378. package/components/pivot-table-options.config-BxKo1DCU.cjs +20 -0
  379. package/components/pivot-table-options.config-DrzB4qVX.js +245 -0
  380. package/components/pivot-table-positioning.config-BvUjUkG3.cjs +20 -0
  381. package/components/pivot-table-positioning.config-PKXfqjiN.js +55 -0
  382. package/components/pivot-table-slots.config-OQe8tS40.js +55 -0
  383. package/components/pivot-table-slots.config-VxbOGtmB.cjs +20 -0
  384. package/components/pragmatic-element-adapter-BFUFSRw6.js +1252 -0
  385. package/components/pragmatic-element-adapter-CKhTZWGj.cjs +24 -0
  386. package/components/pyramid-chart-options.config-Dux8839h.js +240 -0
  387. package/components/pyramid-chart-options.config-lioHQSoq.cjs +20 -0
  388. package/components/pyramid-chart-positioning.config-48iZhPdi.cjs +20 -0
  389. package/components/pyramid-chart-positioning.config-C8yiD0R3.js +55 -0
  390. package/components/pyramid-chart-slots.config-CN_Q2YsP.cjs +20 -0
  391. package/components/pyramid-chart-slots.config-DwlZaBAF.js +50 -0
  392. package/components/radar-chart-options.config-ColtKo6Z.js +130 -0
  393. package/components/radar-chart-options.config-DhnoFEzo.cjs +20 -0
  394. package/components/radar-chart-positioning.config-CpqhJjoz.cjs +20 -0
  395. package/components/radar-chart-positioning.config-L5Eu5W1I.js +55 -0
  396. package/components/radar-chart-slots.config-BISYnTom.cjs +20 -0
  397. package/components/radar-chart-slots.config-BuHg4Zeg.js +53 -0
  398. package/components/regular-table-options.config-Bk6CBPgj.cjs +20 -0
  399. package/components/regular-table-options.config-DopdB4eB.js +148 -0
  400. package/components/regular-table-slots.config--SVEN5Cu.js +35 -0
  401. package/components/regular-table-slots.config-BU6Ff96U.cjs +20 -0
  402. package/components/route-map-options.config-BCuJw5k3.js +326 -0
  403. package/components/route-map-options.config-CAi93e7I.cjs +20 -0
  404. package/components/route-map-positioning.config-DTwMkeiu.cjs +20 -0
  405. package/components/route-map-positioning.config-DVb_Jiws.js +66 -0
  406. package/components/route-map-slots.config-CmVIxDkx.js +59 -0
  407. package/components/route-map-slots.config-Dznp0DT3.cjs +20 -0
  408. package/components/sankey-diagram-options.config-BH3kpjFs.js +126 -0
  409. package/components/sankey-diagram-options.config-D7ZrZV0g.cjs +20 -0
  410. package/components/sankey-diagram-positioning.config-Dk0siSAo.js +66 -0
  411. package/components/sankey-diagram-positioning.config-_kyrBnJ4.cjs +20 -0
  412. package/components/sankey-diagram-slots.config-TKCUvHOD.cjs +20 -0
  413. package/components/sankey-diagram-slots.config-lbkF8DWJ.js +61 -0
  414. package/components/scatter-plot-options.config-DXqKb34r.cjs +20 -0
  415. package/components/scatter-plot-options.config-Dn6ILlJw.js +302 -0
  416. package/components/scatter-plot-positioning.config-440yA7x5.js +77 -0
  417. package/components/scatter-plot-positioning.config-DaYstFV8.cjs +20 -0
  418. package/components/scatter-plot-slots.config-CPsk9FUg.cjs +20 -0
  419. package/components/scatter-plot-slots.config-DEFWWj0_.js +74 -0
  420. package/components/search-filter-options.config-DWKVxBc5.js +103 -0
  421. package/components/search-filter-options.config-DojMfRR_.cjs +20 -0
  422. package/components/search-filter-slots.config-AhwsTdYC.cjs +20 -0
  423. package/components/search-filter-slots.config-vyPYIXE7.js +39 -0
  424. package/components/set-locale-DB1FMgtK.js +43 -0
  425. package/components/set-locale-DKCZkJVL.cjs +20 -0
  426. package/components/slicer-filter-options.config-BhLn4U1W.cjs +20 -0
  427. package/components/slicer-filter-options.config-C6HPrjIw.js +226 -0
  428. package/components/slicer-filter-positioning.config-B6wPo539.js +48 -0
  429. package/components/slicer-filter-positioning.config-DdfTuXdV.cjs +20 -0
  430. package/components/slicer-filter-slots.config-BZWCSkX4.js +44 -0
  431. package/components/slicer-filter-slots.config-zV15NWWS.cjs +20 -0
  432. package/components/slider-filter-options.config-B8am9mmE.cjs +20 -0
  433. package/components/slider-filter-options.config-CvqHWJIX.js +72 -0
  434. package/components/slider-filter-slots.config-BY9X2rlz.js +43 -0
  435. package/components/slider-filter-slots.config-D9Hra0zE.cjs +20 -0
  436. package/components/slot-menu/index.cjs +1 -1
  437. package/components/slot-menu/index.js +1 -1
  438. package/components/slot-menu-BBnibMJU.cjs +64 -0
  439. package/components/slot-menu-list/index.cjs +1 -1
  440. package/components/slot-menu-list/index.js +1 -1
  441. package/components/slot-menu-list-D193fsQX.cjs +38 -0
  442. package/components/slot-menu-list-gKDiWsHB.js +325 -0
  443. package/components/slot-menu-w7sla2N0.js +400 -0
  444. package/components/slots-config-DIBoffEb.js +77 -0
  445. package/components/slots-config-YdyClHLc.cjs +20 -0
  446. package/components/speedometer-chart-options.config-DEW_D9w1.cjs +20 -0
  447. package/components/speedometer-chart-options.config-wX3KzciD.js +246 -0
  448. package/components/speedometer-chart-positioning.config-BVYrl1_s.cjs +20 -0
  449. package/components/speedometer-chart-positioning.config-rI2Jxymu.js +48 -0
  450. package/components/speedometer-chart-slots.config-0Tv8EtKT.js +39 -0
  451. package/components/speedometer-chart-slots.config-1BqQZ2vP.cjs +20 -0
  452. package/components/spike-map-options.config-DpgsB_L-.js +413 -0
  453. package/components/spike-map-options.config-LPAyKMHe.cjs +20 -0
  454. package/components/spike-map-positioning.config-2XZLrk9D.cjs +20 -0
  455. package/components/spike-map-positioning.config-CiY2ju4c.js +55 -0
  456. package/components/spike-map-slots.config-B7OehIoc.cjs +20 -0
  457. package/components/spike-map-slots.config-C6e0NXiD.js +47 -0
  458. package/components/strip-plot-options.config-BzhxzU-s.js +53 -0
  459. package/components/strip-plot-options.config-vBd38UQs.cjs +20 -0
  460. package/components/strip-plot-positioning.config-CFQPdgei.js +48 -0
  461. package/components/strip-plot-positioning.config-CkC8JUwR.cjs +20 -0
  462. package/components/strip-plot-slots.config-BjwAuVoh.js +38 -0
  463. package/components/strip-plot-slots.config-CAU0z3q4.cjs +20 -0
  464. package/components/sunburst-chart-options.config-Ba_H54ip.js +160 -0
  465. package/components/sunburst-chart-options.config-CUFOuT2J.cjs +20 -0
  466. package/components/sunburst-chart-positioning.config-BHJf7n-T.js +48 -0
  467. package/components/sunburst-chart-positioning.config-DVt84HYB.cjs +20 -0
  468. package/components/sunburst-chart-slots.config-BCNUNkd9.cjs +20 -0
  469. package/components/sunburst-chart-slots.config-h114Cuzh.js +38 -0
  470. package/components/symbol-map-options.config-CR07hvK0.cjs +20 -0
  471. package/components/symbol-map-options.config-DeJyZILi.js +157 -0
  472. package/components/symbol-map-positioning.config-DQK1q4GP.cjs +20 -0
  473. package/components/symbol-map-positioning.config-tZp8vwwl.js +55 -0
  474. package/components/symbol-map-slots.config-BmvI5_VE.js +53 -0
  475. package/components/symbol-map-slots.config-Dz_tor5P.cjs +20 -0
  476. package/components/text-options.config-BXuZMKTG.js +67 -0
  477. package/components/text-options.config-JI2D64hs.cjs +20 -0
  478. package/components/text-slots.config-0A6csMfd.cjs +20 -0
  479. package/components/text-slots.config-18Chz73A.js +24 -0
  480. package/components/treemap-chart-options.config-Be-LBEGy.js +184 -0
  481. package/components/treemap-chart-options.config-p21eSXKG.cjs +20 -0
  482. package/components/treemap-chart-positioning.config-CEYAh7Uc.js +55 -0
  483. package/components/treemap-chart-positioning.config-DQfHJ-ZS.cjs +20 -0
  484. package/components/treemap-chart-slots.config-BJqqnUEF.cjs +20 -0
  485. package/components/treemap-chart-slots.config-e7ORieH-.js +47 -0
  486. package/components/utils/base.cjs +1 -1
  487. package/components/utils/base.js +2 -2
  488. package/components/utils/store.cjs +1 -1
  489. package/components/utils/store.js +2 -2
  490. package/components/utils-CJf8VNzX.cjs +20 -0
  491. package/components/utils-Ci1YA9yB.js +352 -0
  492. package/components/utils.cjs +1 -1
  493. package/components/utils.js +9 -9
  494. package/components/v4-BK7K-jy_.js +49 -0
  495. package/components/validate-CJkVJaL1.cjs +20 -0
  496. package/components/validate-J3P0rm_n.js +28 -0
  497. package/components/venn-diagram-options.config-D3bEFsYa.js +24 -0
  498. package/components/venn-diagram-options.config-EmRhf40r.cjs +20 -0
  499. package/components/venn-diagram-positioning.config-2rUFGTJh.js +55 -0
  500. package/components/venn-diagram-positioning.config-DQa6-GAn.cjs +20 -0
  501. package/components/venn-diagram-slots.config-Dm-IC6JS.js +47 -0
  502. package/components/venn-diagram-slots.config-MpkJTf5q.cjs +20 -0
  503. package/components/video-options.config-B5aOwGa4.js +127 -0
  504. package/components/video-options.config-Dh_lU4c1.cjs +20 -0
  505. package/components/video-slots.config-Bmh6mcUv.cjs +20 -0
  506. package/components/video-slots.config-D2MtpAGI.js +24 -0
  507. package/components/viz-item-menu/index.cjs +1 -1
  508. package/components/viz-item-menu/index.js +1 -1
  509. package/components/viz-item-menu-B4BJBNEq.js +170 -0
  510. package/components/viz-item-menu-DD8ndROu.cjs +55 -0
  511. package/components/wordcloud-chart-options.config-DntH4Hvg.js +90 -0
  512. package/components/wordcloud-chart-options.config-mx2CbmrI.cjs +20 -0
  513. package/components/wordcloud-chart-positioning.config-C3Zulr2Q.js +55 -0
  514. package/components/wordcloud-chart-positioning.config-DhoAsQP-.cjs +20 -0
  515. package/components/wordcloud-chart-slots.config-C303nwAz.cjs +20 -0
  516. package/components/wordcloud-chart-slots.config-CsFBBXDz.js +45 -0
  517. package/custom-elements.json +487 -0
  518. package/index.d.ts +1 -0
  519. package/package.json +7 -2
  520. package/react/README.md +1 -0
  521. package/react/components/interactive-viz-item/index.ts +1 -0
  522. package/react/components/interactive-viz-item/types.ts +122 -0
  523. package/react/components/interactive-viz-item.component.ts +33 -0
  524. package/react/esm/components/interactive-viz-item/index.d.ts +1 -0
  525. package/react/esm/components/interactive-viz-item/index.js +1 -0
  526. package/react/esm/components/interactive-viz-item/types.d.ts +117 -0
  527. package/react/esm/components/interactive-viz-item/types.js +16 -0
  528. package/react/esm/components/interactive-viz-item.component.d.ts +16 -0
  529. package/react/esm/components/interactive-viz-item.component.js +21 -0
  530. package/react/esm/index.d.ts +3 -2
  531. package/react/esm/index.js +4 -0
  532. package/react/index.ts +4 -0
  533. package/react/luzmo-stub.d.ts +8 -0
  534. package/react/utils/index.d.ts +1 -0
  535. package/react/utils/store/index.d.ts +5 -5
  536. package/react/utils/store/store-registry.d.ts +1 -1
  537. package/react/utils/timezone/datetime-timezone.d.ts +25 -0
  538. package/react/utils/timezone/tests/datetime-timezone.test.d.ts +1 -0
  539. package/utils/index.d.ts +1 -0
  540. package/utils/store/index.d.ts +5 -5
  541. package/utils/store/store-registry.d.ts +1 -1
  542. package/utils/timezone/datetime-timezone.d.ts +25 -0
  543. package/utils/timezone/tests/datetime-timezone.test.d.ts +1 -0
  544. package/components/ai-chat-BMDfKnEj.cjs +0 -258
  545. package/components/ai-chat-Cd26aDpX.js +0 -3718
  546. package/components/ai-interaction-textarea-CPfJqTB0.cjs +0 -68
  547. package/components/ai-interaction-textarea-DkBglh6Q.js +0 -299
  548. package/components/area-chart-options.config-4OY_kXkB.js +0 -146
  549. package/components/area-chart-options.config-Cf1VrUNv.cjs +0 -20
  550. package/components/area-chart-positioning.config-CAPrtEZW.js +0 -55
  551. package/components/area-chart-positioning.config-CfC43YUW.cjs +0 -20
  552. package/components/area-chart-slots.config--pd_dBTn.js +0 -55
  553. package/components/area-chart-slots.config-BOhwdLnr.cjs +0 -20
  554. package/components/bar-chart-options.config-BF7Q15FL.cjs +0 -20
  555. package/components/bar-chart-options.config-C3puwFpi.js +0 -220
  556. package/components/bar-chart-positioning.config-C1MLYyl9.js +0 -59
  557. package/components/bar-chart-positioning.config-vJOALpQP.cjs +0 -20
  558. package/components/bar-chart-slots.config-DMWjAd5a.cjs +0 -20
  559. package/components/bar-chart-slots.config-Dr7v4xxd.js +0 -50
  560. package/components/base-B_wdCOxV.js +0 -249
  561. package/components/base-kQ6cjcIZ.cjs +0 -20
  562. package/components/base-store-DHC2m2Os.cjs +0 -20
  563. package/components/base-store-DmDe0dTU.js +0 -160
  564. package/components/box-plot-options.config-B486nCds.js +0 -296
  565. package/components/box-plot-options.config-BkD5CYGz.cjs +0 -20
  566. package/components/box-plot-positioning.config-CA27sCpO.js +0 -48
  567. package/components/box-plot-positioning.config-DVNeh9kg.cjs +0 -20
  568. package/components/box-plot-slots.config-5B_pTjPJ.cjs +0 -20
  569. package/components/box-plot-slots.config-Bdb7pkky.js +0 -40
  570. package/components/bubble-chart-options.config-4f9FUNhc.cjs +0 -20
  571. package/components/bubble-chart-options.config-BymUqNR5.js +0 -115
  572. package/components/bubble-chart-positioning.config-Dg92VJnB.cjs +0 -20
  573. package/components/bubble-chart-positioning.config-OlbBZU4m.js +0 -55
  574. package/components/bubble-chart-slots.config-B4tsJDuz.js +0 -47
  575. package/components/bubble-chart-slots.config-VHKuntJk.cjs +0 -20
  576. package/components/bullet-chart-options.config-BtyRdRk2.js +0 -75
  577. package/components/bullet-chart-options.config-DDygYBiy.cjs +0 -20
  578. package/components/bullet-chart-positioning.config-BwqxpSSL.cjs +0 -20
  579. package/components/bullet-chart-positioning.config-Y18yvzoc.js +0 -56
  580. package/components/bullet-chart-slots.config-CZfTgKZ4.cjs +0 -20
  581. package/components/bullet-chart-slots.config-ccCSNJ5q.js +0 -46
  582. package/components/choropleth-map-options.config-5W6nNlL7.cjs +0 -20
  583. package/components/choropleth-map-options.config-CqCciAvW.js +0 -348
  584. package/components/choropleth-map-positioning.config-Dmzy3fMc.js +0 -55
  585. package/components/choropleth-map-positioning.config-y-bYMoxr.cjs +0 -20
  586. package/components/choropleth-map-slots.config-CZKWF1qV.cjs +0 -20
  587. package/components/choropleth-map-slots.config-X2YYrSXc.js +0 -53
  588. package/components/circle-pack-chart-options.config-CD8MWMTw.cjs +0 -20
  589. package/components/circle-pack-chart-options.config-D9C-ltHA.js +0 -54
  590. package/components/circle-pack-chart-positioning.config-YDdY2cc2.js +0 -48
  591. package/components/circle-pack-chart-positioning.config-wKIQDFe8.cjs +0 -20
  592. package/components/circle-pack-chart-slots.config-BIO1dZsK.js +0 -38
  593. package/components/circle-pack-chart-slots.config-GL7T5_o4.cjs +0 -20
  594. package/components/circular-gauge-options.config-D9gcbX57.cjs +0 -20
  595. package/components/circular-gauge-options.config-De6SlTLT.js +0 -188
  596. package/components/circular-gauge-positioning.config-C41euPS9.js +0 -48
  597. package/components/circular-gauge-positioning.config-CKNanoFX.cjs +0 -20
  598. package/components/circular-gauge-slots.config-DUHabt3G.cjs +0 -20
  599. package/components/circular-gauge-slots.config-Dv_7fAD_.js +0 -39
  600. package/components/color-BWnYpOu7.js +0 -3812
  601. package/components/color-range-utils-CwwtLDX_.js +0 -63
  602. package/components/column-chart-options.config-5Dbg3FmH.js +0 -219
  603. package/components/column-chart-options.config-CiIw23Yo.cjs +0 -20
  604. package/components/column-chart-positioning.config-BdyuErF8.js +0 -55
  605. package/components/column-chart-positioning.config-Enx15Dqh.cjs +0 -20
  606. package/components/column-chart-slots.config-CM5aytbj.cjs +0 -20
  607. package/components/column-chart-slots.config-eHvTwZLX.js +0 -50
  608. package/components/combination-chart-options.config-BzmLGCal.js +0 -87
  609. package/components/combination-chart-options.config-DaTYSfnr.cjs +0 -20
  610. package/components/combination-chart-positioning.config-BQRn0EfF.js +0 -48
  611. package/components/combination-chart-positioning.config-CqlKA__j.cjs +0 -20
  612. package/components/combination-chart-slots.config-BwUOXFCR.cjs +0 -20
  613. package/components/combination-chart-slots.config-CG40JjE3.js +0 -43
  614. package/components/conditional-number-options.config-BPzCxo2q.cjs +0 -20
  615. package/components/conditional-number-options.config-CVgV7s7f.js +0 -205
  616. package/components/conditional-number-positioning.config-BBivi4ps.js +0 -48
  617. package/components/conditional-number-positioning.config-CR45rPru.cjs +0 -20
  618. package/components/conditional-number-slots.config-B7maHIaG.cjs +0 -20
  619. package/components/conditional-number-slots.config-o22l-qLv.js +0 -39
  620. package/components/data-broker-Bdv5V8Yp.js +0 -1680
  621. package/components/data-broker-DWEXs6-2.cjs +0 -20
  622. package/components/data-field-CAGprHjS.cjs +0 -54
  623. package/components/data-field-CLfUWgK9.js +0 -121
  624. package/components/data-field-level-7qi9K__S.cjs +0 -55
  625. package/components/data-field-level-CfJ0dmxo.js +0 -247
  626. package/components/data-field-panel-DUc8y4WA.cjs +0 -87
  627. package/components/data-field-panel-N7mukLj6.js +0 -385
  628. package/components/data-fields-select-B1pwPYt6.js +0 -262
  629. package/components/data-fields-select-qCWuzckJ.cjs +0 -41
  630. package/components/dataset-icon-CWT5Ju8w.js +0 -125
  631. package/components/dataset-selector-list-BPBZ04Lf.cjs +0 -75
  632. package/components/dataset-selector-list-DmajZuNC.js +0 -313
  633. package/components/dataset-selector-row-SJzYIpO6.js +0 -273
  634. package/components/dataset-selector-row-qxfmcxpm.cjs +0 -79
  635. package/components/date-comparison-filter-options.config-4yHPEJSU.cjs +0 -20
  636. package/components/date-comparison-filter-options.config-BJg_WqL4.js +0 -126
  637. package/components/date-comparison-filter-slots.config-BIK5aZ6P.js +0 -33
  638. package/components/date-comparison-filter-slots.config-oABOLs3D.cjs +0 -20
  639. package/components/date-filter-options.config-AFAngO_i.cjs +0 -20
  640. package/components/date-filter-options.config-N6eGgPGL.js +0 -118
  641. package/components/date-filter-slots.config-CJJ4P0v6.js +0 -37
  642. package/components/date-filter-slots.config-Cuzz0RjE.cjs +0 -20
  643. package/components/de-BHQ-FfU0.js +0 -465
  644. package/components/de-DnADyZVQ.cjs +0 -20
  645. package/components/decorate-DyMgX_Uh.js +0 -28
  646. package/components/default-acceptable-data-field-types-DFOFWWnT.js +0 -53
  647. package/components/default-acceptable-data-field-types-fPsz64ka.cjs +0 -20
  648. package/components/display-settings-CkkjJjem.js +0 -272
  649. package/components/display-settings-DnzOjr-1.cjs +0 -120
  650. package/components/display-settings-binning-BohjN2qK.js +0 -110
  651. package/components/display-settings-binning-C7-gByrp.cjs +0 -56
  652. package/components/display-settings-datetime-7pUcku_h.js +0 -413
  653. package/components/display-settings-datetime-DL0Qcz8Y.cjs +0 -217
  654. package/components/display-settings-grand-totals-CV5guBhH.js +0 -89
  655. package/components/display-settings-grand-totals-DHQSZqMI.cjs +0 -44
  656. package/components/display-settings-numeric--5zk8_7K.cjs +0 -190
  657. package/components/display-settings-numeric-D2LjMepO.js +0 -479
  658. package/components/display-settings-period-over-period-BE22oHvV.cjs +0 -229
  659. package/components/display-settings-period-over-period-sqZU6Zj_.js +0 -433
  660. package/components/donut-chart-options.config-C66yOoed.js +0 -207
  661. package/components/donut-chart-options.config-D8Bvo6Cc.cjs +0 -20
  662. package/components/donut-chart-positioning.config-B9sm4yFV.cjs +0 -20
  663. package/components/donut-chart-positioning.config-DtaPAgXE.js +0 -48
  664. package/components/donut-chart-slots.config-2XbT9Uu8.js +0 -39
  665. package/components/donut-chart-slots.config-Bi08z-XB.cjs +0 -20
  666. package/components/dropdown-filter-options.config-BRzYD0KE.cjs +0 -20
  667. package/components/dropdown-filter-options.config-Cm_wK0mn.js +0 -153
  668. package/components/dropdown-filter-slots.config-CR-Ko6q_.cjs +0 -20
  669. package/components/dropdown-filter-slots.config-CnESCGuw.js +0 -38
  670. package/components/en-GB-uxY5qmIM.cjs +0 -20
  671. package/components/en-US-q_Ruzags.cjs +0 -20
  672. package/components/en-q_Ruzags.cjs +0 -20
  673. package/components/es-B4xWcOeJ.cjs +0 -20
  674. package/components/es-CkCov6l7.js +0 -465
  675. package/components/evolution-number-options.config-07Jd0oUL.js +0 -228
  676. package/components/evolution-number-options.config-CkqNYgWn.cjs +0 -20
  677. package/components/evolution-number-positioning.config-DVXhBZYj.cjs +0 -20
  678. package/components/evolution-number-positioning.config-v8_6kB1H.js +0 -48
  679. package/components/evolution-number-slots.config-BKdD3cKw.js +0 -37
  680. package/components/evolution-number-slots.config-CikuQYgm.cjs +0 -20
  681. package/components/filter-expression-picker-CF4Otpll.cjs +0 -38
  682. package/components/filter-expression-picker-DCrCAIhg.js +0 -425
  683. package/components/filter-item-CKg3oQlZ.cjs +0 -58
  684. package/components/filter-item-DtdK1jvx.js +0 -242
  685. package/components/filter-value-picker-B5fHoLAG.cjs +0 -60
  686. package/components/filter-value-picker-datetime-CFCV2jkK.js +0 -139
  687. package/components/filter-value-picker-datetime-D20WnWar.cjs +0 -42
  688. package/components/filter-value-picker-hierarchy-CSM0RPvX.cjs +0 -47
  689. package/components/filter-value-picker-hierarchy-DEbN7h5L.js +0 -232
  690. package/components/filter-value-picker-numeric-BYspQRSi.js +0 -219
  691. package/components/filter-value-picker-numeric-BtZaQvkr.cjs +0 -48
  692. package/components/filter-value-picker-tyoO5ISM.js +0 -151
  693. package/components/filters-C8fHs4_m.js +0 -400
  694. package/components/filters-sR8GxUGw.cjs +0 -150
  695. package/components/formatter-BeXmurVe.cjs +0 -20
  696. package/components/formula-BPHH_GKB.cjs +0 -45
  697. package/components/formula-DYdcMG-v.js +0 -138
  698. package/components/formula-codemirror-CFgPlkN8.cjs +0 -215
  699. package/components/formula-codemirror-CQonNhmd.js +0 -12018
  700. package/components/formula-display-store-BGzj13Cs.js +0 -1086
  701. package/components/formula-display-store-DFAvw21p.cjs +0 -20
  702. package/components/formula-editor-CtCvJkyS.cjs +0 -218
  703. package/components/formula-editor-KXxQlh2n.js +0 -666
  704. package/components/formula-field-OcD4TWAn.js +0 -40
  705. package/components/formula-field-aiqX7nRp.cjs +0 -20
  706. package/components/formula-input-base-CGe2ABn6.cjs +0 -49
  707. package/components/formula-input-base-CQPGmISj.js +0 -236
  708. package/components/fr-BOivrXqX.cjs +0 -20
  709. package/components/fr-BSFpJ50_.js +0 -465
  710. package/components/funnel-chart-options.config-BVmrhzna.cjs +0 -20
  711. package/components/funnel-chart-options.config-PV1Hlu91.js +0 -187
  712. package/components/funnel-chart-positioning.config-BT-YoTgv.js +0 -48
  713. package/components/funnel-chart-positioning.config-C5Z3JkuS.cjs +0 -20
  714. package/components/funnel-chart-slots.config-B8zC6Q6_.cjs +0 -20
  715. package/components/funnel-chart-slots.config-_9HUPvTb.js +0 -43
  716. package/components/get-css-variable-CBXsAxR6.cjs +0 -20
  717. package/components/get-css-variable-DYnldi15.js +0 -63
  718. package/components/get-dataset-name-BGCvfcdY.js +0 -27
  719. package/components/get-dataset-name-EkeeFzI3.cjs +0 -20
  720. package/components/groupings-CrE-yp0S.js +0 -52
  721. package/components/groupings-dIFi0bJY.cjs +0 -20
  722. package/components/heat-map-options.config-CQY6t9AL.js +0 -224
  723. package/components/heat-map-options.config-xPdOcXDk.cjs +0 -20
  724. package/components/heat-map-positioning.config-BpFis567.js +0 -48
  725. package/components/heat-map-positioning.config-HPftgmdz.cjs +0 -20
  726. package/components/heat-map-slots.config-B4AswVSo.js +0 -37
  727. package/components/heat-map-slots.config-Wp_oS8JQ.cjs +0 -20
  728. package/components/heat-table-options.config-DPbTFoRn.cjs +0 -20
  729. package/components/heat-table-options.config-IlVPk4Q4.js +0 -372
  730. package/components/heat-table-positioning.config-Canc3aEE.js +0 -55
  731. package/components/heat-table-positioning.config-wkrm8Fbk.cjs +0 -20
  732. package/components/heat-table-slots.config-BN7rtHZG.cjs +0 -20
  733. package/components/heat-table-slots.config-CB509zU4.js +0 -49
  734. package/components/hexbin-map-options.config-CSFSqpMU.cjs +0 -20
  735. package/components/hexbin-map-options.config-vzw6ovva.js +0 -276
  736. package/components/hexbin-map-positioning.config-CBv6Lij5.js +0 -48
  737. package/components/hexbin-map-positioning.config-D0hAchxV.cjs +0 -20
  738. package/components/hexbin-map-slots.config-Dyse0pui.js +0 -37
  739. package/components/hexbin-map-slots.config-mx5zUTrA.cjs +0 -20
  740. package/components/image-options.config-Cmrsd8Yu.js +0 -153
  741. package/components/image-options.config-DZ5q1D63.cjs +0 -20
  742. package/components/image-slots.config-CVj-DM07.js +0 -24
  743. package/components/image-slots.config-ODQBVz5H.cjs +0 -20
  744. package/components/item-grid-BXZXJV3g.cjs +0 -339
  745. package/components/item-grid-uWM-Unjx.js +0 -8814
  746. package/components/item-option-CEwjJc1p.cjs +0 -252
  747. package/components/item-option-action-button-group-BOxQFfBF.js +0 -118
  748. package/components/item-option-action-button-group-DXCVJqpt.cjs +0 -53
  749. package/components/item-option-base-DKieCS-Y.cjs +0 -56
  750. package/components/item-option-base-Dr5-WxZ9.js +0 -123
  751. package/components/item-option-color-palette-picker-7vSSpj5o.cjs +0 -40
  752. package/components/item-option-color-palette-picker-D_mABGWh.js +0 -2041
  753. package/components/item-option-color-picker-COLBYeRy.js +0 -87
  754. package/components/item-option-color-picker-DMyNeD2e.cjs +0 -34
  755. package/components/item-option-color-range-BFr0B6Vf.cjs +0 -98
  756. package/components/item-option-color-range-CueVlyT2.js +0 -220
  757. package/components/item-option-multi-language-field-CMuQwrwQ.js +0 -82
  758. package/components/item-option-multi-language-field-q7txF5xA.cjs +0 -33
  759. package/components/item-option-number-field-BODNSx66.js +0 -102
  760. package/components/item-option-number-field-DWeJWUxY.cjs +0 -38
  761. package/components/item-option-panel-CxOfVI0z.js +0 -183
  762. package/components/item-option-panel-D0dxyUfE.cjs +0 -67
  763. package/components/item-option-picker-BsP_0XyD.cjs +0 -37
  764. package/components/item-option-picker-CyX7qqrb.js +0 -77
  765. package/components/item-option-position-picker-CcmBYyqF.cjs +0 -32
  766. package/components/item-option-position-picker-LOg6P4Gl.js +0 -117
  767. package/components/item-option-positions-number-field-BCbWb1R6.js +0 -164
  768. package/components/item-option-positions-number-field-o3Qckgwd.cjs +0 -49
  769. package/components/item-option-radio-button-group-CDebmEn3.js +0 -74
  770. package/components/item-option-radio-button-group-CjLhWTEJ.cjs +0 -37
  771. package/components/item-option-slider-C9ZJZcdg.js +0 -81
  772. package/components/item-option-slider-CHbkJHLK.cjs +0 -33
  773. package/components/item-option-switch-BVMOOWya.js +0 -69
  774. package/components/item-option-switch-FRAZWozp.cjs +0 -30
  775. package/components/item-option-text-field-DkYqHfdJ.cjs +0 -33
  776. package/components/item-option-text-field-e6NLDlSq.js +0 -80
  777. package/components/item-option-uyAsPcfE.js +0 -919
  778. package/components/item-slot-drop-BUCjEfJf.cjs +0 -91
  779. package/components/item-slot-drop-CoReI68M.js +0 -324
  780. package/components/item-slot-drop-panel-CEI1q060.js +0 -355
  781. package/components/item-slot-drop-panel-DqekQtOr.cjs +0 -57
  782. package/components/item-slot-picker-CvbXFh6Z.cjs +0 -158
  783. package/components/item-slot-picker-dy5hVID5.js +0 -474
  784. package/components/item-slot-picker-panel-BUyp6Hbg.cjs +0 -81
  785. package/components/item-slot-picker-panel-CG0NyMDX.js +0 -448
  786. package/components/line-chart-options.config-1TpSJqeb.js +0 -168
  787. package/components/line-chart-options.config-BkK829A2.cjs +0 -20
  788. package/components/line-chart-positioning.config-61uNfPZs.js +0 -55
  789. package/components/line-chart-positioning.config-BNtGFWUK.cjs +0 -20
  790. package/components/line-chart-slots.config-CcCpwWzZ.js +0 -55
  791. package/components/line-chart-slots.config-vv66fcoE.cjs +0 -20
  792. package/components/load-data-fields-for-datasets-BNnr8x3m.js +0 -42
  793. package/components/load-data-fields-for-datasets-CW4Voiex.cjs +0 -20
  794. package/components/localized-mixin-CiBWThrZ.cjs +0 -20
  795. package/components/localized-mixin-EpweDrTk.js +0 -45
  796. package/components/marker-map-options.config-BfPFVxpD.cjs +0 -20
  797. package/components/marker-map-options.config-DTaax79J.js +0 -117
  798. package/components/marker-map-positioning.config-Bi5WCVgJ.js +0 -48
  799. package/components/marker-map-positioning.config-C2cL7uZJ.cjs +0 -20
  800. package/components/marker-map-slots.config-BOWmS_IZ.js +0 -37
  801. package/components/marker-map-slots.config-DigZk7lN.cjs +0 -20
  802. package/components/nl-DS4Y_g8B.cjs +0 -20
  803. package/components/nl-D_MleIlk.js +0 -465
  804. package/components/ohlc-chart-options.config-BsBVP-Io.cjs +0 -20
  805. package/components/ohlc-chart-options.config-Dfes8ROC.js +0 -65
  806. package/components/ohlc-chart-positioning.config-DFx99k9A.js +0 -78
  807. package/components/ohlc-chart-positioning.config-IAOfu4ue.cjs +0 -20
  808. package/components/ohlc-chart-slots.config-D3fzoQJH.cjs +0 -20
  809. package/components/ohlc-chart-slots.config-JRztPEXL.js +0 -68
  810. package/components/parallel-coordinates-plot-options.config--6iJkURT.cjs +0 -20
  811. package/components/parallel-coordinates-plot-options.config-NSk_HC0H.js +0 -42
  812. package/components/parallel-coordinates-plot-positioning.config-Bf0Leksw.cjs +0 -20
  813. package/components/parallel-coordinates-plot-positioning.config-C9TqUuGC.js +0 -48
  814. package/components/parallel-coordinates-plot-slots.config-pmbO5DnL.js +0 -46
  815. package/components/parallel-coordinates-plot-slots.config-s_tLqGA-.cjs +0 -20
  816. package/components/pivot-table-options.config-B3wYlzEq.js +0 -245
  817. package/components/pivot-table-options.config-CKGnnXa_.cjs +0 -20
  818. package/components/pivot-table-positioning.config-CPXqqtcR.js +0 -55
  819. package/components/pivot-table-positioning.config-D1R3VO88.cjs +0 -20
  820. package/components/pivot-table-slots.config-DaLfGOP9.js +0 -55
  821. package/components/pivot-table-slots.config-KlYXL90k.cjs +0 -20
  822. package/components/pragmatic-element-adapter-D0LRKx5U.js +0 -1253
  823. package/components/pragmatic-element-adapter-DdyH32ix.cjs +0 -24
  824. package/components/pyramid-chart-options.config-8QtjhcJC.cjs +0 -20
  825. package/components/pyramid-chart-options.config-DIyiyqGM.js +0 -240
  826. package/components/pyramid-chart-positioning.config-BfXdJS8g.cjs +0 -20
  827. package/components/pyramid-chart-positioning.config-JAUQpA0B.js +0 -55
  828. package/components/pyramid-chart-slots.config-CreUpxI2.cjs +0 -20
  829. package/components/pyramid-chart-slots.config-DtnUlw5y.js +0 -50
  830. package/components/radar-chart-options.config-DvW36_zk.cjs +0 -20
  831. package/components/radar-chart-options.config-UVOzUnVT.js +0 -130
  832. package/components/radar-chart-positioning.config-Bixdrod2.cjs +0 -20
  833. package/components/radar-chart-positioning.config-CdJSazt4.js +0 -55
  834. package/components/radar-chart-slots.config-B3oIp-8w.cjs +0 -20
  835. package/components/radar-chart-slots.config-CkLoeAV7.js +0 -53
  836. package/components/regular-table-options.config-B0WNqEjR.cjs +0 -20
  837. package/components/regular-table-options.config-CBvnxTdd.js +0 -148
  838. package/components/regular-table-slots.config-Cc6hL7iu.js +0 -35
  839. package/components/regular-table-slots.config-UwzWj6gg.cjs +0 -20
  840. package/components/route-map-options.config-CYNKz_Xm.cjs +0 -20
  841. package/components/route-map-options.config-DZrlGa5o.js +0 -326
  842. package/components/route-map-positioning.config-7aca5Iex.cjs +0 -20
  843. package/components/route-map-positioning.config-Bk_BndTS.js +0 -66
  844. package/components/route-map-slots.config-CQxB8gKC.js +0 -59
  845. package/components/route-map-slots.config-DfYT65BF.cjs +0 -20
  846. package/components/sankey-diagram-options.config-D49IZ1y3.cjs +0 -20
  847. package/components/sankey-diagram-options.config-s_QRVr1r.js +0 -126
  848. package/components/sankey-diagram-positioning.config-Bvus3RDi.cjs +0 -20
  849. package/components/sankey-diagram-positioning.config-DPgQELIu.js +0 -66
  850. package/components/sankey-diagram-slots.config-C9tIfWHU.js +0 -61
  851. package/components/sankey-diagram-slots.config-D-_u4w36.cjs +0 -20
  852. package/components/scatter-plot-options.config-BETVLevv.cjs +0 -20
  853. package/components/scatter-plot-options.config-DI4hlqi5.js +0 -302
  854. package/components/scatter-plot-positioning.config-D-ifHW9P.js +0 -77
  855. package/components/scatter-plot-positioning.config-DBDCDDad.cjs +0 -20
  856. package/components/scatter-plot-slots.config-CUURijrN.js +0 -74
  857. package/components/scatter-plot-slots.config-CrG6wQtV.cjs +0 -20
  858. package/components/search-filter-options.config-B-dGVPhS.cjs +0 -20
  859. package/components/search-filter-options.config-CPzfgUWV.js +0 -103
  860. package/components/search-filter-slots.config-DD119qkk.js +0 -39
  861. package/components/search-filter-slots.config-DP06ulJA.cjs +0 -20
  862. package/components/set-locale-DTFOOSog.cjs +0 -20
  863. package/components/set-locale-UK0ghkg9.js +0 -43
  864. package/components/slicer-filter-options.config-7OXpRWtw.cjs +0 -20
  865. package/components/slicer-filter-options.config-F2CZ8ckV.js +0 -226
  866. package/components/slicer-filter-positioning.config-0uGZ8EgN.js +0 -48
  867. package/components/slicer-filter-positioning.config-Bx2_7jxp.cjs +0 -20
  868. package/components/slicer-filter-slots.config-CHKpdJvF.cjs +0 -20
  869. package/components/slicer-filter-slots.config-D-BhCuA9.js +0 -44
  870. package/components/slider-filter-options.config-CRdbX1IJ.cjs +0 -20
  871. package/components/slider-filter-options.config-DO0HHK2l.js +0 -72
  872. package/components/slider-filter-slots.config-9R298H0t.cjs +0 -20
  873. package/components/slider-filter-slots.config-CGQG6JqK.js +0 -43
  874. package/components/slot-menu-Cw5HJ_bk.js +0 -404
  875. package/components/slot-menu-DkyDLDSd.cjs +0 -64
  876. package/components/slot-menu-list-BZllvntQ.cjs +0 -38
  877. package/components/slot-menu-list-CTJ-owp1.js +0 -326
  878. package/components/slots-config-BuHluMEl.js +0 -77
  879. package/components/slots-config-DVH0lz6t.cjs +0 -20
  880. package/components/speedometer-chart-options.config-BsIu28S3.cjs +0 -20
  881. package/components/speedometer-chart-options.config-jK_yQjy2.js +0 -246
  882. package/components/speedometer-chart-positioning.config-CNOKIw7e.cjs +0 -20
  883. package/components/speedometer-chart-positioning.config-FzFxMi0X.js +0 -48
  884. package/components/speedometer-chart-slots.config-CjkHAHNX.js +0 -39
  885. package/components/speedometer-chart-slots.config-S_hQm2MV.cjs +0 -20
  886. package/components/spike-map-options.config-aaiZyME6.cjs +0 -20
  887. package/components/spike-map-options.config-cj07bETE.js +0 -413
  888. package/components/spike-map-positioning.config-B4NYfmEw.js +0 -55
  889. package/components/spike-map-positioning.config-Bcdt8670.cjs +0 -20
  890. package/components/spike-map-slots.config-cKfaD6dQ.cjs +0 -20
  891. package/components/spike-map-slots.config-yMkdy-0w.js +0 -47
  892. package/components/strip-plot-options.config-DmAxeY2S.js +0 -53
  893. package/components/strip-plot-options.config-TB3rkoj2.cjs +0 -20
  894. package/components/strip-plot-positioning.config-BjcqWJoD.cjs +0 -20
  895. package/components/strip-plot-positioning.config-n9OIxpa_.js +0 -48
  896. package/components/strip-plot-slots.config-C07nIM5s.js +0 -38
  897. package/components/strip-plot-slots.config-DNYlrK_c.cjs +0 -20
  898. package/components/sunburst-chart-options.config-CLyQG-8x.js +0 -160
  899. package/components/sunburst-chart-options.config-Ckk_kY_s.cjs +0 -20
  900. package/components/sunburst-chart-positioning.config-BIpSCpSi.cjs +0 -20
  901. package/components/sunburst-chart-positioning.config-CcGOcwOK.js +0 -48
  902. package/components/sunburst-chart-slots.config-BU9ma0xm.js +0 -38
  903. package/components/sunburst-chart-slots.config-DkUUt5RF.cjs +0 -20
  904. package/components/symbol-map-options.config-56eoWz4w.cjs +0 -20
  905. package/components/symbol-map-options.config-I_gykFhh.js +0 -157
  906. package/components/symbol-map-positioning.config-DPv89eCY.cjs +0 -20
  907. package/components/symbol-map-positioning.config-H3n2ngaa.js +0 -55
  908. package/components/symbol-map-slots.config-CQJgV5bh.js +0 -53
  909. package/components/symbol-map-slots.config-DwNf547A.cjs +0 -20
  910. package/components/text-options.config-BwBCG2yo.cjs +0 -20
  911. package/components/text-options.config-DUMx63Ol.js +0 -67
  912. package/components/text-slots.config-CPghLc8b.cjs +0 -20
  913. package/components/text-slots.config-YmmXsb-0.js +0 -24
  914. package/components/treemap-chart-options.config-CAWPa5jK.js +0 -184
  915. package/components/treemap-chart-options.config-r6biULUj.cjs +0 -20
  916. package/components/treemap-chart-positioning.config-Dzp4TodY.js +0 -55
  917. package/components/treemap-chart-positioning.config-W2sl4gZ0.cjs +0 -20
  918. package/components/treemap-chart-slots.config-CS3ot6ZJ.cjs +0 -20
  919. package/components/treemap-chart-slots.config-QEVbKZyS.js +0 -47
  920. package/components/utils-3XO8ba12.cjs +0 -20
  921. package/components/utils-B6EE0gvH.js +0 -313
  922. package/components/v4-DIjJgmR0.js +0 -49
  923. package/components/venn-diagram-options.config-BamlR1qo.cjs +0 -20
  924. package/components/venn-diagram-options.config-KKD89q3q.js +0 -24
  925. package/components/venn-diagram-positioning.config-BLSj3JqA.js +0 -55
  926. package/components/venn-diagram-positioning.config-Bv3pFJIU.cjs +0 -20
  927. package/components/venn-diagram-slots.config-DYTmU8v2.cjs +0 -20
  928. package/components/venn-diagram-slots.config-DsIqVOI2.js +0 -47
  929. package/components/video-options.config-BhBpkaLJ.cjs +0 -20
  930. package/components/video-options.config-D2SEyNrP.js +0 -127
  931. package/components/video-slots.config-B680gLmP.js +0 -24
  932. package/components/video-slots.config-DMut7o7r.cjs +0 -20
  933. package/components/viz-item-menu-CiEJJddu.js +0 -170
  934. package/components/viz-item-menu-Dry8xpRA.cjs +0 -55
  935. package/components/wordcloud-chart-options.config-DLN2RAEK.js +0 -90
  936. package/components/wordcloud-chart-options.config-DgH4JgN2.cjs +0 -20
  937. package/components/wordcloud-chart-positioning.config-DVPWXJXb.js +0 -55
  938. package/components/wordcloud-chart-positioning.config-ZTO2VLdY.cjs +0 -20
  939. package/components/wordcloud-chart-slots.config-V29v2Fhr.cjs +0 -20
  940. package/components/wordcloud-chart-slots.config-mFvqkiQE.js +0 -45
  941. /package/components/{rolldown-runtime-mLOUI7ql.cjs → chunk-mLOUI7ql.cjs} +0 -0
@@ -1,3718 +0,0 @@
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-B_wdCOxV.js";
21
- import { t } from "./decorate-DyMgX_Uh.js";
22
- import "./ai-interaction-textarea-DkBglh6Q.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/chat-message";
26
- import "@luzmo/lucero/overlay";
27
- import "@luzmo/lucero/popover";
28
- import "@luzmo/lucero/progress-steps";
29
- import { html as o, nothing as s, unsafeCSS as c } from "lit";
30
- import { property as l, state as u } from "lit/decorators.js";
31
- import { unsafeHTML as d } from "lit/directives/unsafe-html.js";
32
- import "@luzmo/lucero/action-button";
33
- //#region node_modules/dompurify/dist/purify.es.mjs
34
- function ee(e, t) {
35
- (t == null || t > e.length) && (t = e.length);
36
- for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
37
- return r;
38
- }
39
- function te(e) {
40
- if (Array.isArray(e)) return e;
41
- }
42
- function ne(e, t) {
43
- var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
44
- if (n != null) {
45
- var r, i, a, o, s = [], c = !0, l = !1;
46
- try {
47
- 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);
48
- } catch (e) {
49
- l = !0, i = e;
50
- } finally {
51
- try {
52
- if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
53
- } finally {
54
- if (l) throw i;
55
- }
56
- }
57
- return s;
58
- }
59
- }
60
- function re() {
61
- throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
- }
63
- function ie(e, t) {
64
- return te(e) || ne(e, t) || ae(e, t) || re();
65
- }
66
- function ae(e, t) {
67
- if (e) {
68
- if (typeof e == "string") return ee(e, t);
69
- var n = {}.toString.call(e).slice(8, -1);
70
- 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;
71
- }
72
- }
73
- 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;
74
- h ||= function(e) {
75
- return e;
76
- }, g ||= function(e) {
77
- return e;
78
- }, le ||= function(e, t) {
79
- var n = [...arguments].slice(2);
80
- return e.apply(t, n);
81
- }, ue ||= function(e) {
82
- return new e(...[...arguments].slice(1));
83
- };
84
- 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);
85
- function x(e) {
86
- return function(t) {
87
- t instanceof RegExp && (t.lastIndex = 0);
88
- var n = [...arguments].slice(1);
89
- return le(e, t, n);
90
- };
91
- }
92
- function Oe(e) {
93
- return function() {
94
- return ue(e, [...arguments]);
95
- };
96
- }
97
- function S(e, t) {
98
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e;
99
- if (se && se(e, null), !ge(t)) return e;
100
- let r = t.length;
101
- for (; r--;) {
102
- let i = t[r];
103
- if (typeof i == "string") {
104
- let e = n(i);
105
- e !== i && (f(t) || (t[r] = e), i = e);
106
- }
107
- e[i] = !0;
108
- }
109
- return e;
110
- }
111
- function ke(e) {
112
- for (let t = 0; t < e.length; t++) y(e, t) || (e[t] = null);
113
- return e;
114
- }
115
- function C(e) {
116
- let t = ce(null);
117
- for (let r of oe(e)) {
118
- var n = ie(r, 2);
119
- let i = n[0], a = n[1];
120
- y(e, i) && (ge(a) ? t[i] = ke(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = C(a) : t[i] = a);
121
- }
122
- return t;
123
- }
124
- function Ae(e) {
125
- switch (typeof e) {
126
- case "string": return e;
127
- case "number": return Ce(e);
128
- case "boolean": return we(e);
129
- case "bigint": return v ? v(e) : "0";
130
- case "symbol": return Te ? Te(e) : "Symbol()";
131
- case "undefined": return Ee(e);
132
- case "function":
133
- case "object": {
134
- if (e === null) return Ee(e);
135
- let t = e, n = w(t, "toString");
136
- if (typeof n == "function") {
137
- let e = n(t);
138
- return typeof e == "string" ? e : Ee(e);
139
- }
140
- return Ee(e);
141
- }
142
- default: return Ee(e);
143
- }
144
- }
145
- function w(e, t) {
146
- for (; e !== null;) {
147
- let n = m(e, t);
148
- if (n) {
149
- if (n.get) return x(n.get);
150
- if (typeof n.value == "function") return x(n.value);
151
- }
152
- e = p(e);
153
- }
154
- function n() {
155
- return null;
156
- }
157
- return n;
158
- }
159
- function je(e) {
160
- try {
161
- return b(e, ""), !0;
162
- } catch {
163
- return !1;
164
- }
165
- }
166
- 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([
167
- "feBlend",
168
- "feColorMatrix",
169
- "feComponentTransfer",
170
- "feComposite",
171
- "feConvolveMatrix",
172
- "feDiffuseLighting",
173
- "feDisplacementMap",
174
- "feDistantLight",
175
- "feDropShadow",
176
- "feFlood",
177
- "feFuncA",
178
- "feFuncB",
179
- "feFuncG",
180
- "feFuncR",
181
- "feGaussianBlur",
182
- "feImage",
183
- "feMerge",
184
- "feMergeNode",
185
- "feMorphology",
186
- "feOffset",
187
- "fePointLight",
188
- "feSpecularLighting",
189
- "feSpotLight",
190
- "feTile",
191
- "feTurbulence"
192
- ]), Fe = h([
193
- "animate",
194
- "color-profile",
195
- "cursor",
196
- "discard",
197
- "font-face",
198
- "font-face-format",
199
- "font-face-name",
200
- "font-face-src",
201
- "font-face-uri",
202
- "foreignobject",
203
- "hatch",
204
- "hatchpath",
205
- "mesh",
206
- "meshgradient",
207
- "meshpatch",
208
- "meshrow",
209
- "missing-glyph",
210
- "script",
211
- "set",
212
- "solidcolor",
213
- "unknown",
214
- "use"
215
- ]), 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([
216
- "maction",
217
- "maligngroup",
218
- "malignmark",
219
- "mlongdiv",
220
- "mscarries",
221
- "mscarry",
222
- "msgroup",
223
- "mstack",
224
- "msline",
225
- "msrow",
226
- "semantics",
227
- "annotation",
228
- "annotation-xml",
229
- "mprescripts",
230
- "none"
231
- ]), 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([
232
- "xlink:href",
233
- "xml:id",
234
- "xlink:title",
235
- "xml:space",
236
- "xmlns:xlink"
237
- ]), 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 = {
238
- element: 1,
239
- attribute: 2,
240
- text: 3,
241
- cdataSection: 4,
242
- entityReference: 5,
243
- entityNode: 6,
244
- processingInstruction: 7,
245
- comment: 8,
246
- document: 9,
247
- documentType: 10,
248
- documentFragment: 11,
249
- notation: 12
250
- }, rt = function() {
251
- return typeof window > "u" ? null : window;
252
- }, it = function(e, t) {
253
- if (typeof e != "object" || typeof e.createPolicy != "function") return null;
254
- let n = null, r = "data-tt-policy-suffix";
255
- t && t.hasAttribute(r) && (n = t.getAttribute(r));
256
- let i = "dompurify" + (n ? "#" + n : "");
257
- try {
258
- return e.createPolicy(i, {
259
- createHTML(e) {
260
- return e;
261
- },
262
- createScriptURL(e) {
263
- return e;
264
- }
265
- });
266
- } catch {
267
- return console.warn("TrustedTypes policy " + i + " could not be created."), null;
268
- }
269
- }, at = function() {
270
- return {
271
- afterSanitizeAttributes: [],
272
- afterSanitizeElements: [],
273
- afterSanitizeShadowDOM: [],
274
- beforeSanitizeAttributes: [],
275
- beforeSanitizeElements: [],
276
- beforeSanitizeShadowDOM: [],
277
- uponSanitizeAttribute: [],
278
- uponSanitizeElement: [],
279
- uponSanitizeShadowNode: []
280
- };
281
- }, E = function(e, t, n, r) {
282
- return y(e, t) && ge(e[t]) ? S(r.base ? C(r.base) : {}, e[t], r.transform) : n;
283
- };
284
- function ot() {
285
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rt(), t = (e) => ot(e);
286
- if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== T.document || !e.Element) return t.isSupported = !1, t;
287
- let n = e.document, r = n, i = r.currentScript;
288
- e.DocumentFragment;
289
- let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
290
- e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
291
- 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;
292
- if (typeof a == "function") {
293
- let e = n.createElement("template");
294
- e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
295
- }
296
- let m, _ = "", le, ue = !1, Ce = 0, we = function() {
297
- 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.");
298
- }, v = function(e) {
299
- we(), Ce++;
300
- try {
301
- return m.createHTML(e);
302
- } finally {
303
- Ce--;
304
- }
305
- }, Te = function(e) {
306
- we(), Ce++;
307
- try {
308
- return m.createScriptURL(e);
309
- } finally {
310
- Ce--;
311
- }
312
- }, Ee = function() {
313
- return ue ||= (le = it(u, i), !0), le;
314
- }, x = n, Oe = x.implementation, ke = x.createNodeIterator, st = x.createDocumentFragment, ct = x.getElementsByTagName, D = r.importNode, O = at();
315
- t.isSupported = typeof oe == "function" && typeof ie == "function" && Oe && Oe.createHTMLDocument !== void 0;
316
- let k = Ue, lt = We, A = Ge, ut = Ke, j = qe, dt = Ye, ft = Xe, pt = Qe, mt = Je, M = null, ht = S({}, [
317
- ...Me,
318
- ...Ne,
319
- ...Pe,
320
- ...Ie,
321
- ...Re
322
- ]), N = null, gt = S({}, [
323
- ...ze,
324
- ...Be,
325
- ...Ve,
326
- ...He
327
- ]), P = Object.seal(ce(null, {
328
- tagNameCheck: {
329
- writable: !0,
330
- configurable: !1,
331
- enumerable: !0,
332
- value: null
333
- },
334
- attributeNameCheck: {
335
- writable: !0,
336
- configurable: !1,
337
- enumerable: !0,
338
- value: null
339
- },
340
- allowCustomizedBuiltInElements: {
341
- writable: !0,
342
- configurable: !1,
343
- enumerable: !0,
344
- value: !1
345
- }
346
- })), _t = null, vt = null, F = Object.seal(ce(null, {
347
- tagCheck: {
348
- writable: !0,
349
- configurable: !1,
350
- enumerable: !0,
351
- value: null
352
- },
353
- attributeCheck: {
354
- writable: !0,
355
- configurable: !1,
356
- enumerable: !0,
357
- value: null
358
- }
359
- })), 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({}, [
360
- "audio",
361
- "video",
362
- "img",
363
- "source",
364
- "image",
365
- "track"
366
- ]), zt = null, Bt = S({}, [
367
- "alt",
368
- "class",
369
- "for",
370
- "id",
371
- "label",
372
- "name",
373
- "pattern",
374
- "placeholder",
375
- "role",
376
- "summary",
377
- "title",
378
- "value",
379
- "style",
380
- "xmlns"
381
- ]), 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({}, [
382
- Vt,
383
- Ht,
384
- B
385
- ], ve), qt = h([
386
- "mi",
387
- "mo",
388
- "mn",
389
- "ms",
390
- "mtext"
391
- ]), Jt = S({}, qt), Yt = h(["annotation-xml"]), Xt = S({}, Yt), Zt = S({}, [
392
- "title",
393
- "style",
394
- "font",
395
- "a",
396
- "script"
397
- ]), Qt = null, $t = ["application/xhtml+xml", "text/html"], V = null, H = null, en = n.createElement("form"), tn = function(e) {
398
- return e instanceof RegExp || e instanceof Function;
399
- }, nn = function() {
400
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
401
- if (H && H === e) return;
402
- (!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, {
403
- transform: V,
404
- base: Bt
405
- }), Lt = E(e, "ADD_DATA_URI_TAGS", Rt, {
406
- transform: V,
407
- base: Rt
408
- }), 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);
409
- let t = y(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? C(e.CUSTOM_ELEMENT_HANDLING) : ce(null);
410
- 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, [
411
- "html",
412
- "head",
413
- "body"
414
- ]), M.table && (S(M, ["tbody"]), delete _t.tbody), e.TRUSTED_TYPES_POLICY) {
415
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
416
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
417
- let t = m;
418
- m = e.TRUSTED_TYPES_POLICY;
419
- try {
420
- _ = v("");
421
- } catch (e) {
422
- throw m = t, e;
423
- }
424
- } else e.TRUSTED_TYPES_POLICY === null ? (m = void 0, _ = "") : (m === void 0 && (m = Ee()), m && typeof _ == "string" && (_ = v("")));
425
- h && h(e), H = e;
426
- }, rn = S({}, [
427
- ...Ne,
428
- ...Pe,
429
- ...Fe
430
- ]), an = S({}, [...Ie, ...Le]), on = function(e, t, n) {
431
- return t.namespaceURI === B ? e === "svg" : t.namespaceURI === Vt ? e === "svg" && (n === "annotation-xml" || Jt[n]) : !!rn[e];
432
- }, sn = function(e, t, n) {
433
- return t.namespaceURI === B ? e === "math" : t.namespaceURI === Ht ? e === "math" && Xt[n] : !!an[e];
434
- }, U = function(e, t, n) {
435
- return t.namespaceURI === Ht && !Xt[n] || t.namespaceURI === Vt && !Jt[n] ? !1 : !an[e] && (Zt[e] || !rn[e]);
436
- }, cn = function(e) {
437
- let t = ie(e);
438
- (!t || !t.tagName) && (t = {
439
- namespaceURI: Ut,
440
- tagName: "template"
441
- });
442
- let n = _e(e.tagName), r = _e(t.tagName);
443
- 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;
444
- }, W = function(e) {
445
- me(t.removed, { element: e });
446
- try {
447
- ie(e).removeChild(e);
448
- } catch {
449
- 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");
450
- }
451
- }, G = function(e) {
452
- let t = re(e);
453
- if (t) {
454
- let e = [];
455
- de(t, (t) => {
456
- me(e, t);
457
- }), de(e, (e) => {
458
- try {
459
- te(e);
460
- } catch {}
461
- });
462
- }
463
- let n = se(e);
464
- if (n) for (let t = n.length - 1; t >= 0; --t) {
465
- let r = n[t], i = r && r.name;
466
- if (typeof i == "string") try {
467
- e.removeAttribute(i);
468
- } catch {}
469
- }
470
- }, K = function(e, n) {
471
- try {
472
- me(t.removed, {
473
- attribute: n.getAttributeNode(e),
474
- from: n
475
- });
476
- } catch {
477
- me(t.removed, {
478
- attribute: null,
479
- from: n
480
- });
481
- }
482
- if (n.removeAttribute(e), e === "is") if (Ot || kt) try {
483
- W(n);
484
- } catch {}
485
- else try {
486
- n.setAttribute(e, "");
487
- } catch {}
488
- }, ln = function(e) {
489
- let t = se(e);
490
- if (t) for (let n = t.length - 1; n >= 0; --n) {
491
- let r = t[n], i = r && r.name;
492
- if (!(typeof i != "string" || N[V(i)])) try {
493
- e.removeAttribute(i);
494
- } catch {}
495
- }
496
- }, un = function(e) {
497
- let t = [e];
498
- for (; t.length > 0;) {
499
- let e = t.pop();
500
- (f ? f(e) : e.nodeType) === T.element && ln(e);
501
- let n = re(e);
502
- if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
503
- }
504
- }, dn = function(e) {
505
- let t = null, r = null;
506
- if (Dt) e = "<remove></remove>" + e;
507
- else {
508
- let t = ye(e, /^[\r\n\t ]+/);
509
- r = t && t[0];
510
- }
511
- Qt === "application/xhtml+xml" && Ut === B && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
512
- let i = m ? v(e) : e;
513
- if (Ut === B) try {
514
- t = new l().parseFromString(i, Qt);
515
- } catch {}
516
- if (!t || !t.documentElement) {
517
- t = Oe.createDocument(Ut, "template", null);
518
- try {
519
- t.documentElement.innerHTML = Wt ? _ : i;
520
- } catch {}
521
- }
522
- let a = t.body || t.documentElement;
523
- 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;
524
- }, fn = function(e) {
525
- 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);
526
- }, pn = function(e) {
527
- return e = be(e, k, " "), e = be(e, lt, " "), e = be(e, A, " "), e;
528
- }, q = function(e) {
529
- e.normalize();
530
- 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();
531
- for (; n;) n.data = pn(n.data), n = t.nextNode();
532
- let r = e.querySelectorAll?.call(e, "template");
533
- r && de(r, (e) => {
534
- Y(e.content) && q(e.content);
535
- });
536
- }, J = function(e) {
537
- let t = p ? p(e) : null;
538
- 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);
539
- }, Y = function(e) {
540
- if (!f || typeof e != "object" || !e) return !1;
541
- try {
542
- return f(e) === T.documentFragment;
543
- } catch {
544
- return !1;
545
- }
546
- }, X = function(e) {
547
- if (!f || typeof e != "object" || !e) return !1;
548
- try {
549
- return typeof f(e) == "number";
550
- } catch {
551
- return !1;
552
- }
553
- };
554
- function Z(e, n, r) {
555
- e.length !== 0 && de(e, (e) => {
556
- e.call(t, n, r, H);
557
- });
558
- }
559
- let mn = function(e, t) {
560
- 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));
561
- }, Q = function(e, t) {
562
- if (!_t[t] && vn(t) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, t) || P.tagNameCheck instanceof Function && P.tagNameCheck(t))) return !1;
563
- if (Nt && !z[t]) {
564
- let t = ie(e), n = re(e);
565
- if (n && t) {
566
- let r = n.length;
567
- for (let i = r - 1; i >= 0; --i) {
568
- let r = Pt ? n[i] : ee(n[i], !0);
569
- t.insertBefore(r, ne(e));
570
- }
571
- }
572
- }
573
- return W(e), !0;
574
- }, hn = function(e) {
575
- if (Z(O.beforeSanitizeElements, e, null), J(e)) return W(e), !0;
576
- let n = V(p ? p(e) : e.nodeName);
577
- if (Z(O.uponSanitizeElement, e, {
578
- tagName: n,
579
- allowedTags: M
580
- }), mn(e, n)) return W(e), !0;
581
- if (_t[n] || !(F.tagCheck instanceof Function && F.tagCheck(n)) && !M[n]) return Q(e, n);
582
- if ((f ? f(e) : e.nodeType) === T.element && !cn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && b(tt, e.innerHTML)) return W(e), !0;
583
- if (I && e.nodeType === T.text) {
584
- let n = pn(e.textContent);
585
- e.textContent !== n && (me(t.removed, { element: e.cloneNode() }), e.textContent = n);
586
- }
587
- return Z(O.afterSanitizeElements, e, null), !1;
588
- }, gn = function(e, t, r) {
589
- if (vt[t] || R && (t === "id" || t === "name") && (r in n || r in en)) return !1;
590
- let i = N[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
591
- if (!(bt && b(ut, t)) && !(yt && b(j, t))) {
592
- if (!i) {
593
- 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;
594
- } 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;
595
- }
596
- return !0;
597
- }, _n = S({}, [
598
- "annotation-xml",
599
- "color-profile",
600
- "font-face",
601
- "font-face-format",
602
- "font-face-name",
603
- "font-face-src",
604
- "font-face-uri",
605
- "missing-glyph"
606
- ]), vn = function(e) {
607
- return !_n[_e(e)] && b(pt, e);
608
- }, yn = function(e, t, n, r) {
609
- if (m && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
610
- case "TrustedHTML": return v(r);
611
- case "TrustedScriptURL": return Te(r);
612
- }
613
- return r;
614
- }, bn = function(e, n, r, i) {
615
- try {
616
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), J(e) ? W(e) : pe(t.removed);
617
- } catch {
618
- K(n, e);
619
- }
620
- }, xn = function(e) {
621
- Z(O.beforeSanitizeAttributes, e, null);
622
- let t = e.attributes;
623
- if (!t || J(e)) return;
624
- let n = {
625
- attrName: "",
626
- attrValue: "",
627
- keepAttr: !0,
628
- allowedAttributes: N,
629
- forceKeepAttr: void 0
630
- }, r = t.length, i = V(e.nodeName);
631
- for (; r--;) {
632
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = V(o), u = c, d = o === "value" ? u : Se(u);
633
- 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)) {
634
- K(o, e);
635
- continue;
636
- }
637
- if (l === "attributename" && ye(d, "href")) {
638
- K(o, e);
639
- continue;
640
- }
641
- if (!n.forceKeepAttr) {
642
- if (!n.keepAttr) {
643
- K(o, e);
644
- continue;
645
- }
646
- if (!St && b(nt, d)) {
647
- K(o, e);
648
- continue;
649
- }
650
- if (I && (d = pn(d)), !gn(i, l, d)) {
651
- K(o, e);
652
- continue;
653
- }
654
- d = yn(i, l, s, d), d !== u && bn(e, o, s, d);
655
- }
656
- }
657
- Z(O.afterSanitizeAttributes, e, null);
658
- }, Sn = function(e) {
659
- let t = null, n = fn(e);
660
- 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) {
661
- let e = ae(t);
662
- Y(e) && (Cn(e), Sn(e));
663
- }
664
- Z(O.afterSanitizeShadowDOM, e, null);
665
- }, Cn = function(e) {
666
- let t = [{
667
- node: e,
668
- shadow: null
669
- }];
670
- for (; t.length > 0;) {
671
- let e = t.pop();
672
- if (e.shadow) {
673
- Sn(e.shadow);
674
- continue;
675
- }
676
- let n = e.node, r = (f ? f(n) : n.nodeType) === T.element, i = re(n);
677
- if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
678
- node: i[e],
679
- shadow: null
680
- });
681
- if (r) {
682
- let e = p ? p(n) : null;
683
- if (typeof e == "string" && V(e) === "template") {
684
- let e = n.content;
685
- Y(e) && t.push({
686
- node: e,
687
- shadow: null
688
- });
689
- }
690
- }
691
- if (r) {
692
- let e = ae(n);
693
- Y(e) && t.push({
694
- node: null,
695
- shadow: e
696
- }, {
697
- node: e,
698
- shadow: null
699
- });
700
- }
701
- }
702
- };
703
- return t.sanitize = function(e) {
704
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
705
- if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !X(e) && (e = Ae(e), typeof e != "string")) throw De("dirty is not a string, aborting");
706
- if (!t.isSupported) return e;
707
- 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 = [];
708
- let c = Pt && typeof e != "string" && X(e);
709
- if (c) {
710
- let t = p ? p(e) : e.nodeName;
711
- if (typeof t == "string") {
712
- let e = V(t);
713
- if (!M[e] || _t[e]) throw De("root node is forbidden and cannot be sanitized in-place");
714
- }
715
- if (J(e)) throw De("root node is clobbered and cannot be sanitized in-place");
716
- try {
717
- Cn(e);
718
- } catch (t) {
719
- throw G(e), t;
720
- }
721
- } 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);
722
- else {
723
- if (!Ot && !I && !L && e.indexOf("<") === -1) return m && At ? v(e) : e;
724
- if (i = dn(e), !i) return Ot ? null : At ? _ : "";
725
- }
726
- i && Dt && W(i.firstChild);
727
- let l = fn(c ? e : i);
728
- try {
729
- for (; o = l.nextNode();) hn(o), xn(o), Y(o.content) && Sn(o.content);
730
- } catch (t) {
731
- throw c && G(e), t;
732
- }
733
- if (c) return de(t.removed, (e) => {
734
- e.element && un(e.element);
735
- }), I && q(e), e;
736
- if (Ot) {
737
- if (I && q(i), kt) for (s = st.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
738
- else s = i;
739
- return (N.shadowroot || N.shadowrootmode) && (s = D.call(r, s, !0)), s;
740
- }
741
- let u = L ? i.outerHTML : i.innerHTML;
742
- 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;
743
- }, t.setConfig = function() {
744
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
745
- nn(e), wt = !0, Tt = M, Et = N;
746
- }, t.clearConfig = function() {
747
- H = null, wt = !1, Tt = null, Et = null, m = le, _ = "";
748
- }, t.isValidAttribute = function(e, t, n) {
749
- H || nn({});
750
- let r = V(e), i = V(t);
751
- return gn(r, i, n);
752
- }, t.addHook = function(e, t) {
753
- typeof t == "function" && y(O, e) && me(O[e], t);
754
- }, t.removeHook = function(e, t) {
755
- if (y(O, e)) {
756
- if (t !== void 0) {
757
- let n = fe(O[e], t);
758
- return n === -1 ? void 0 : he(O[e], n, 1)[0];
759
- }
760
- return pe(O[e]);
761
- }
762
- }, t.removeHooks = function(e) {
763
- y(O, e) && (O[e] = []);
764
- }, t.removeAllHooks = function() {
765
- O = at();
766
- }, t;
767
- }
768
- var st = ot();
769
- //#endregion
770
- //#region node_modules/marked/lib/marked.esm.js
771
- function ct() {
772
- return {
773
- async: !1,
774
- breaks: !1,
775
- extensions: null,
776
- gfm: !0,
777
- hooks: null,
778
- pedantic: !1,
779
- renderer: null,
780
- silent: !1,
781
- tokenizer: null,
782
- walkTokens: null
783
- };
784
- }
785
- var D = ct();
786
- function O(e) {
787
- D = e;
788
- }
789
- var k = { exec: () => null };
790
- function lt(e) {
791
- let t = [];
792
- return (n) => {
793
- let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
794
- return i || (i = e(r), t[r] = i), i;
795
- };
796
- }
797
- function A(e, t = "") {
798
- let n = typeof e == "string" ? e : e.source, r = {
799
- replace: (e, t) => {
800
- let i = typeof t == "string" ? t : t.source;
801
- return i = i.replace(j.caret, "$1"), n = n.replace(e, i), r;
802
- },
803
- getRegex: () => new RegExp(n, t)
804
- };
805
- return r;
806
- }
807
- var ut = ((e = "") => {
808
- try {
809
- return !!RegExp("(?<=1)(?<!1)" + e);
810
- } catch {
811
- return !1;
812
- }
813
- })(), j = {
814
- codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
815
- outputLinkReplace: /\\([\[\]])/g,
816
- indentCodeCompensation: /^(\s+)(?:```)/,
817
- beginningSpace: /^\s+/,
818
- endingHash: /#$/,
819
- startingSpaceChar: /^ /,
820
- endingSpaceChar: / $/,
821
- nonSpaceChar: /[^ ]/,
822
- newLineCharGlobal: /\n/g,
823
- tabCharGlobal: /\t/g,
824
- multipleSpaceGlobal: /\s+/g,
825
- blankLine: /^[ \t]*$/,
826
- doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
827
- blockquoteStart: /^ {0,3}>/,
828
- blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
829
- blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
830
- listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
831
- listIsTask: /^\[[ xX]\] +\S/,
832
- listReplaceTask: /^\[[ xX]\] +/,
833
- listTaskCheckbox: /\[[ xX]\]/,
834
- anyLine: /\n.*\n/,
835
- hrefBrackets: /^<(.*)>$/,
836
- tableDelimiter: /[:|]/,
837
- tableAlignChars: /^\||\| *$/g,
838
- tableRowBlankLine: /\n[ \t]*$/,
839
- tableAlignRight: /^ *-+: *$/,
840
- tableAlignCenter: /^ *:-+: *$/,
841
- tableAlignLeft: /^ *:-+ *$/,
842
- startATag: /^<a /i,
843
- endATag: /^<\/a>/i,
844
- startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
845
- endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
846
- startAngleBracket: /^</,
847
- endAngleBracket: />$/,
848
- pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
849
- unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
850
- escapeTest: /[&<>"']/,
851
- escapeReplace: /[&<>"']/g,
852
- escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
853
- escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
854
- caret: /(^|[^\[])\^/g,
855
- percentDecode: /%25/g,
856
- findPipe: /\|/g,
857
- splitPipe: / \|/,
858
- slashPipe: /\\\|/g,
859
- carriageReturn: /\r\n|\r/g,
860
- spaceLine: /^ +$/gm,
861
- notSpaceStart: /^\S*/,
862
- endingNewline: /\n$/,
863
- listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
864
- nextBulletRegex: lt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
865
- hrRegex: lt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
866
- fencesBeginRegex: lt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
867
- headingBeginRegex: lt((e) => RegExp(`^ {0,${e}}#`)),
868
- htmlBeginRegex: lt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
869
- blockquoteBeginRegex: lt((e) => RegExp(`^ {0,${e}}>`))
870
- }, 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 = {
871
- blockquote: A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ct).getRegex(),
872
- code: ft,
873
- def: yt,
874
- fences: pt,
875
- heading: M,
876
- hr: mt,
877
- html: I,
878
- lheading: gt,
879
- list: bt,
880
- newline: dt,
881
- paragraph: Ct,
882
- table: k,
883
- text: vt
884
- }, 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 = {
885
- ...L,
886
- lheading: P,
887
- table: wt,
888
- 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()
889
- }, Et = {
890
- ...L,
891
- 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(),
892
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
893
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
894
- fences: k,
895
- lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
896
- 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()
897
- }, 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 = {
898
- _backpedal: k,
899
- anyPunctuation: Gt,
900
- autolink: Kt,
901
- blockSkip: It,
902
- br: kt,
903
- code: Ot,
904
- del: k,
905
- delLDelim: k,
906
- delRDelim: k,
907
- emStrongLDelim: Rt,
908
- emStrongRDelimAst: Vt,
909
- emStrongRDelimUnd: B,
910
- escape: Dt,
911
- link: Xt,
912
- nolink: Qt,
913
- punctuation: Nt,
914
- reflink: Zt,
915
- reflinkSearch: $t,
916
- tag: Jt,
917
- text: At,
918
- url: k
919
- }, en = {
920
- ...H,
921
- link: A(/^!?\[(label)\]\((.*?)\)/).replace("label", Yt).getRegex(),
922
- reflink: A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Yt).getRegex()
923
- }, tn = {
924
- ...H,
925
- emStrongRDelimAst: Ht,
926
- emStrongLDelim: zt,
927
- delLDelim: Ut,
928
- delRDelim: Wt,
929
- 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(),
930
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
931
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
932
- 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()
933
- }, nn = {
934
- ...tn,
935
- br: A(kt).replace("{2,}", "*").getRegex(),
936
- text: A(tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
937
- }, rn = {
938
- normal: L,
939
- gfm: Tt,
940
- pedantic: Et
941
- }, an = {
942
- normal: H,
943
- gfm: tn,
944
- breaks: nn,
945
- pedantic: en
946
- }, on = {
947
- "&": "&amp;",
948
- "<": "&lt;",
949
- ">": "&gt;",
950
- "\"": "&quot;",
951
- "'": "&#39;"
952
- }, sn = (e) => on[e];
953
- function U(e, t) {
954
- if (t) {
955
- if (j.escapeTest.test(e)) return e.replace(j.escapeReplace, sn);
956
- } else if (j.escapeTestNoEncode.test(e)) return e.replace(j.escapeReplaceNoEncode, sn);
957
- return e;
958
- }
959
- function cn(e) {
960
- try {
961
- e = encodeURI(e).replace(j.percentDecode, "%");
962
- } catch {
963
- return null;
964
- }
965
- return e;
966
- }
967
- function W(e, t) {
968
- let n = e.replace(j.findPipe, (e, t, n) => {
969
- let r = !1, i = t;
970
- for (; --i >= 0 && n[i] === "\\";) r = !r;
971
- return r ? "|" : " |";
972
- }).split(j.splitPipe), r = 0;
973
- if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
974
- else for (; n.length < t;) n.push("");
975
- for (; r < n.length; r++) n[r] = n[r].trim().replace(j.slashPipe, "|");
976
- return n;
977
- }
978
- function G(e, t, n) {
979
- let r = e.length;
980
- if (r === 0) return "";
981
- let i = 0;
982
- for (; i < r;) {
983
- let a = e.charAt(r - i - 1);
984
- if (a === t && !n) i++;
985
- else if (a !== t && n) i++;
986
- else break;
987
- }
988
- return e.slice(0, r - i);
989
- }
990
- function K(e) {
991
- let t = e.split("\n"), n = t.length - 1;
992
- for (; n >= 0 && j.blankLine.test(t[n]);) n--;
993
- return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
994
- }
995
- function ln(e, t) {
996
- if (e.indexOf(t[1]) === -1) return -1;
997
- let n = 0;
998
- for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
999
- else if (e[r] === t[0]) n++;
1000
- else if (e[r] === t[1] && (n--, n < 0)) return r;
1001
- return n > 0 ? -2 : -1;
1002
- }
1003
- function un(e, t = 0) {
1004
- let n = t, r = "";
1005
- for (let t of e) if (t === " ") {
1006
- let e = 4 - n % 4;
1007
- r += " ".repeat(e), n += e;
1008
- } else r += t, n++;
1009
- return r;
1010
- }
1011
- function dn(e, t, n, r, i) {
1012
- let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1013
- r.state.inLink = !0;
1014
- let c = {
1015
- type: e[0].charAt(0) === "!" ? "image" : "link",
1016
- raw: n,
1017
- href: a,
1018
- title: o,
1019
- text: s,
1020
- tokens: r.inlineTokens(s)
1021
- };
1022
- return r.state.inLink = !1, c;
1023
- }
1024
- function fn(e, t, n) {
1025
- let r = e.match(n.other.indentCodeCompensation);
1026
- if (r === null) return t;
1027
- let i = r[1];
1028
- return t.split("\n").map((e) => {
1029
- let t = e.match(n.other.beginningSpace);
1030
- if (t === null) return e;
1031
- let [r] = t;
1032
- return r.length >= i.length ? e.slice(i.length) : e;
1033
- }).join("\n");
1034
- }
1035
- var pn = class {
1036
- options;
1037
- rules;
1038
- lexer;
1039
- constructor(e) {
1040
- this.options = e || D;
1041
- }
1042
- space(e) {
1043
- let t = this.rules.block.newline.exec(e);
1044
- if (t && t[0].length > 0) return {
1045
- type: "space",
1046
- raw: t[0]
1047
- };
1048
- }
1049
- code(e) {
1050
- let t = this.rules.block.code.exec(e);
1051
- if (t) {
1052
- let e = this.options.pedantic ? t[0] : K(t[0]);
1053
- return {
1054
- type: "code",
1055
- raw: e,
1056
- codeBlockStyle: "indented",
1057
- text: e.replace(this.rules.other.codeRemoveIndent, "")
1058
- };
1059
- }
1060
- }
1061
- fences(e) {
1062
- let t = this.rules.block.fences.exec(e);
1063
- if (t) {
1064
- let e = t[0], n = fn(e, t[3] || "", this.rules);
1065
- return {
1066
- type: "code",
1067
- raw: e,
1068
- lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1069
- text: n
1070
- };
1071
- }
1072
- }
1073
- heading(e) {
1074
- let t = this.rules.block.heading.exec(e);
1075
- if (t) {
1076
- let e = t[2].trim();
1077
- if (this.rules.other.endingHash.test(e)) {
1078
- let t = G(e, "#");
1079
- (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1080
- }
1081
- return {
1082
- type: "heading",
1083
- raw: G(t[0], "\n"),
1084
- depth: t[1].length,
1085
- text: e,
1086
- tokens: this.lexer.inline(e)
1087
- };
1088
- }
1089
- }
1090
- hr(e) {
1091
- let t = this.rules.block.hr.exec(e);
1092
- if (t) return {
1093
- type: "hr",
1094
- raw: G(t[0], "\n")
1095
- };
1096
- }
1097
- blockquote(e) {
1098
- let t = this.rules.block.blockquote.exec(e);
1099
- if (t) {
1100
- let e = G(t[0], "\n").split("\n"), n = "", r = "", i = [];
1101
- for (; e.length > 0;) {
1102
- let t = !1, a = [], o;
1103
- for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1104
- else if (!t) a.push(e[o]);
1105
- else break;
1106
- e = e.slice(o);
1107
- let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1108
- n = n ? `${n}
1109
- ${s}` : s, r = r ? `${r}
1110
- ${c}` : c;
1111
- let l = this.lexer.state.top;
1112
- if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1113
- let u = i.at(-1);
1114
- if (u?.type === "code") break;
1115
- if (u?.type === "blockquote") {
1116
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1117
- 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;
1118
- break;
1119
- } else if (u?.type === "list") {
1120
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1121
- 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");
1122
- continue;
1123
- }
1124
- }
1125
- return {
1126
- type: "blockquote",
1127
- raw: n,
1128
- tokens: i,
1129
- text: r
1130
- };
1131
- }
1132
- }
1133
- list(e) {
1134
- let t = this.rules.block.list.exec(e);
1135
- if (t) {
1136
- let n = t[1].trim(), r = n.length > 1, i = {
1137
- type: "list",
1138
- raw: "",
1139
- ordered: r,
1140
- start: r ? +n.slice(0, -1) : "",
1141
- loose: !1,
1142
- items: []
1143
- };
1144
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1145
- let a = this.rules.other.listItemRegex(n), o = !1;
1146
- for (; e;) {
1147
- let n = !1, r = "", s = "";
1148
- if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1149
- r = t[0], e = e.substring(r.length);
1150
- let c = un(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1151
- 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) {
1152
- 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);
1153
- for (; e;) {
1154
- let te = e.split("\n", 1)[0], ne;
1155
- 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;
1156
- if (ne.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ne.slice(d);
1157
- else {
1158
- if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1159
- s += "\n" + l;
1160
- }
1161
- u = !l.trim(), r += te + "\n", e = e.substring(te.length + 1), c = ne.slice(d);
1162
- }
1163
- }
1164
- i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1165
- type: "list_item",
1166
- raw: r,
1167
- task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1168
- loose: !1,
1169
- text: s,
1170
- tokens: []
1171
- }), i.raw += r;
1172
- }
1173
- let s = i.items.at(-1);
1174
- if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1175
- else return;
1176
- i.raw = i.raw.trimEnd();
1177
- for (let e of i.items) {
1178
- this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1179
- let t = e.tokens[0];
1180
- if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1181
- 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, "");
1182
- for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1183
- this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1184
- break;
1185
- }
1186
- let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1187
- if (n) {
1188
- let t = {
1189
- type: "checkbox",
1190
- raw: n[0] + " ",
1191
- checked: n[0] !== "[ ]"
1192
- };
1193
- 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({
1194
- type: "paragraph",
1195
- raw: t.raw,
1196
- text: t.raw,
1197
- tokens: [t]
1198
- }) : e.tokens.unshift(t);
1199
- }
1200
- } else e.task &&= !1;
1201
- if (!i.loose) {
1202
- let t = e.tokens.filter((e) => e.type === "space");
1203
- i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1204
- }
1205
- }
1206
- if (i.loose) for (let e of i.items) {
1207
- e.loose = !0;
1208
- for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1209
- }
1210
- return i;
1211
- }
1212
- }
1213
- html(e) {
1214
- let t = this.rules.block.html.exec(e);
1215
- if (t) {
1216
- let e = K(t[0]);
1217
- return {
1218
- type: "html",
1219
- block: !0,
1220
- raw: e,
1221
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1222
- text: e
1223
- };
1224
- }
1225
- }
1226
- def(e) {
1227
- let t = this.rules.block.def.exec(e);
1228
- if (t) {
1229
- 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];
1230
- return {
1231
- type: "def",
1232
- tag: e,
1233
- raw: G(t[0], "\n"),
1234
- href: n,
1235
- title: r
1236
- };
1237
- }
1238
- }
1239
- table(e) {
1240
- let t = this.rules.block.table.exec(e);
1241
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1242
- 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 = {
1243
- type: "table",
1244
- raw: G(t[0], "\n"),
1245
- header: [],
1246
- align: [],
1247
- rows: []
1248
- };
1249
- if (n.length === r.length) {
1250
- 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);
1251
- for (let e = 0; e < n.length; e++) a.header.push({
1252
- text: n[e],
1253
- tokens: this.lexer.inline(n[e]),
1254
- header: !0,
1255
- align: a.align[e]
1256
- });
1257
- for (let e of i) a.rows.push(W(e, a.header.length).map((e, t) => ({
1258
- text: e,
1259
- tokens: this.lexer.inline(e),
1260
- header: !1,
1261
- align: a.align[t]
1262
- })));
1263
- return a;
1264
- }
1265
- }
1266
- lheading(e) {
1267
- let t = this.rules.block.lheading.exec(e);
1268
- if (t) {
1269
- let e = t[1].trim();
1270
- return {
1271
- type: "heading",
1272
- raw: G(t[0], "\n"),
1273
- depth: t[2].charAt(0) === "=" ? 1 : 2,
1274
- text: e,
1275
- tokens: this.lexer.inline(e)
1276
- };
1277
- }
1278
- }
1279
- paragraph(e) {
1280
- let t = this.rules.block.paragraph.exec(e);
1281
- if (t) {
1282
- let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1283
- return {
1284
- type: "paragraph",
1285
- raw: t[0],
1286
- text: e,
1287
- tokens: this.lexer.inline(e)
1288
- };
1289
- }
1290
- }
1291
- text(e) {
1292
- let t = this.rules.block.text.exec(e);
1293
- if (t) return {
1294
- type: "text",
1295
- raw: t[0],
1296
- text: t[0],
1297
- tokens: this.lexer.inline(t[0])
1298
- };
1299
- }
1300
- escape(e) {
1301
- let t = this.rules.inline.escape.exec(e);
1302
- if (t) return {
1303
- type: "escape",
1304
- raw: t[0],
1305
- text: t[1]
1306
- };
1307
- }
1308
- tag(e) {
1309
- let t = this.rules.inline.tag.exec(e);
1310
- 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), {
1311
- type: "html",
1312
- raw: t[0],
1313
- inLink: this.lexer.state.inLink,
1314
- inRawBlock: this.lexer.state.inRawBlock,
1315
- block: !1,
1316
- text: t[0]
1317
- };
1318
- }
1319
- link(e) {
1320
- let t = this.rules.inline.link.exec(e);
1321
- if (t) {
1322
- let e = t[2].trim();
1323
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1324
- if (!this.rules.other.endAngleBracket.test(e)) return;
1325
- let t = G(e.slice(0, -1), "\\");
1326
- if ((e.length - t.length) % 2 == 0) return;
1327
- } else {
1328
- let e = ln(t[2], "()");
1329
- if (e === -2) return;
1330
- if (e > -1) {
1331
- let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1332
- t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1333
- }
1334
- }
1335
- let n = t[2], r = "";
1336
- if (this.options.pedantic) {
1337
- let e = this.rules.other.pedanticHrefTitle.exec(n);
1338
- e && (n = e[1], r = e[3]);
1339
- } else r = t[3] ? t[3].slice(1, -1) : "";
1340
- 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, {
1341
- href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1342
- title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1343
- }, t[0], this.lexer, this.rules);
1344
- }
1345
- }
1346
- reflink(e, t) {
1347
- let n;
1348
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1349
- let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1350
- if (!e) {
1351
- let e = n[0].charAt(0);
1352
- return {
1353
- type: "text",
1354
- raw: e,
1355
- text: e
1356
- };
1357
- }
1358
- return dn(n, e, n[0], this.lexer, this.rules);
1359
- }
1360
- }
1361
- emStrong(e, t, n = "") {
1362
- let r = this.rules.inline.emStrongLDelim.exec(e);
1363
- 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))) {
1364
- let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1365
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1366
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1367
- if (a = [...i].length, r[3] || r[4]) {
1368
- o += a;
1369
- continue;
1370
- } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1371
- s += a;
1372
- continue;
1373
- }
1374
- if (o -= a, o > 0) continue;
1375
- a = Math.min(a, a + o + s);
1376
- let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1377
- if (Math.min(n, a) % 2) {
1378
- let e = c.slice(1, -1);
1379
- return {
1380
- type: "em",
1381
- raw: c,
1382
- text: e,
1383
- tokens: this.lexer.inlineTokens(e)
1384
- };
1385
- }
1386
- let l = c.slice(2, -2);
1387
- return {
1388
- type: "strong",
1389
- raw: c,
1390
- text: l,
1391
- tokens: this.lexer.inlineTokens(l)
1392
- };
1393
- }
1394
- }
1395
- }
1396
- codespan(e) {
1397
- let t = this.rules.inline.code.exec(e);
1398
- if (t) {
1399
- 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);
1400
- return n && r && (e = e.substring(1, e.length - 1)), {
1401
- type: "codespan",
1402
- raw: t[0],
1403
- text: e
1404
- };
1405
- }
1406
- }
1407
- br(e) {
1408
- let t = this.rules.inline.br.exec(e);
1409
- if (t) return {
1410
- type: "br",
1411
- raw: t[0]
1412
- };
1413
- }
1414
- del(e, t, n = "") {
1415
- let r = this.rules.inline.delLDelim.exec(e);
1416
- if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1417
- let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1418
- for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1419
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1420
- if (r[3] || r[4]) {
1421
- o += a;
1422
- continue;
1423
- }
1424
- if (o -= a, o > 0) continue;
1425
- a = Math.min(a, a + o);
1426
- let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1427
- return {
1428
- type: "del",
1429
- raw: s,
1430
- text: c,
1431
- tokens: this.lexer.inlineTokens(c)
1432
- };
1433
- }
1434
- }
1435
- }
1436
- autolink(e) {
1437
- let t = this.rules.inline.autolink.exec(e);
1438
- if (t) {
1439
- let e, n;
1440
- return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1441
- type: "link",
1442
- raw: t[0],
1443
- text: e,
1444
- href: n,
1445
- tokens: [{
1446
- type: "text",
1447
- raw: e,
1448
- text: e
1449
- }]
1450
- };
1451
- }
1452
- }
1453
- url(e) {
1454
- let t;
1455
- if (t = this.rules.inline.url.exec(e)) {
1456
- let e, n;
1457
- if (t[2] === "@") e = t[0], n = "mailto:" + e;
1458
- else {
1459
- let r;
1460
- do
1461
- r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1462
- while (r !== t[0]);
1463
- e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1464
- }
1465
- return {
1466
- type: "link",
1467
- raw: t[0],
1468
- text: e,
1469
- href: n,
1470
- tokens: [{
1471
- type: "text",
1472
- raw: e,
1473
- text: e
1474
- }]
1475
- };
1476
- }
1477
- }
1478
- inlineText(e) {
1479
- let t = this.rules.inline.text.exec(e);
1480
- if (t) {
1481
- let e = this.lexer.state.inRawBlock;
1482
- return {
1483
- type: "text",
1484
- raw: t[0],
1485
- text: t[0],
1486
- escaped: e
1487
- };
1488
- }
1489
- }
1490
- }, q = class e {
1491
- tokens;
1492
- options;
1493
- state;
1494
- inlineQueue;
1495
- tokenizer;
1496
- constructor(e) {
1497
- 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 = {
1498
- inLink: !1,
1499
- inRawBlock: !1,
1500
- top: !0
1501
- };
1502
- let t = {
1503
- other: j,
1504
- block: rn.normal,
1505
- inline: an.normal
1506
- };
1507
- 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;
1508
- }
1509
- static get rules() {
1510
- return {
1511
- block: rn,
1512
- inline: an
1513
- };
1514
- }
1515
- static lex(t, n) {
1516
- return new e(n).lex(t);
1517
- }
1518
- static lexInline(t, n) {
1519
- return new e(n).inlineTokens(t);
1520
- }
1521
- lex(e) {
1522
- e = e.replace(j.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1523
- for (let e = 0; e < this.inlineQueue.length; e++) {
1524
- let t = this.inlineQueue[e];
1525
- this.inlineTokens(t.src, t.tokens);
1526
- }
1527
- return this.inlineQueue = [], this.tokens;
1528
- }
1529
- blockTokens(e, t = [], n = !1) {
1530
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(j.tabCharGlobal, " ").replace(j.spaceLine, ""));
1531
- let r = Infinity;
1532
- for (; e;) {
1533
- if (e.length < r) r = e.length;
1534
- else {
1535
- this.infiniteLoopError(e.charCodeAt(0));
1536
- break;
1537
- }
1538
- let i;
1539
- 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;
1540
- if (i = this.tokenizer.space(e)) {
1541
- e = e.substring(i.raw.length);
1542
- let n = t.at(-1);
1543
- i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1544
- continue;
1545
- }
1546
- if (i = this.tokenizer.code(e)) {
1547
- e = e.substring(i.raw.length);
1548
- let n = t.at(-1);
1549
- 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);
1550
- continue;
1551
- }
1552
- if (i = this.tokenizer.fences(e)) {
1553
- e = e.substring(i.raw.length), t.push(i);
1554
- continue;
1555
- }
1556
- if (i = this.tokenizer.heading(e)) {
1557
- e = e.substring(i.raw.length), t.push(i);
1558
- continue;
1559
- }
1560
- if (i = this.tokenizer.hr(e)) {
1561
- e = e.substring(i.raw.length), t.push(i);
1562
- continue;
1563
- }
1564
- if (i = this.tokenizer.blockquote(e)) {
1565
- e = e.substring(i.raw.length), t.push(i);
1566
- continue;
1567
- }
1568
- if (i = this.tokenizer.list(e)) {
1569
- e = e.substring(i.raw.length), t.push(i);
1570
- continue;
1571
- }
1572
- if (i = this.tokenizer.html(e)) {
1573
- e = e.substring(i.raw.length), t.push(i);
1574
- continue;
1575
- }
1576
- if (i = this.tokenizer.def(e)) {
1577
- e = e.substring(i.raw.length);
1578
- let n = t.at(-1);
1579
- 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] = {
1580
- href: i.href,
1581
- title: i.title
1582
- }, t.push(i));
1583
- continue;
1584
- }
1585
- if (i = this.tokenizer.table(e)) {
1586
- e = e.substring(i.raw.length), t.push(i);
1587
- continue;
1588
- }
1589
- if (i = this.tokenizer.lheading(e)) {
1590
- e = e.substring(i.raw.length), t.push(i);
1591
- continue;
1592
- }
1593
- let a = e;
1594
- if (this.options.extensions?.startBlock) {
1595
- let t = Infinity, n = e.slice(1), r;
1596
- this.options.extensions.startBlock.forEach((e) => {
1597
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1598
- }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1599
- }
1600
- if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1601
- let r = t.at(-1);
1602
- 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);
1603
- continue;
1604
- }
1605
- if (i = this.tokenizer.text(e)) {
1606
- e = e.substring(i.raw.length);
1607
- let n = t.at(-1);
1608
- 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);
1609
- continue;
1610
- }
1611
- if (e) {
1612
- this.infiniteLoopError(e.charCodeAt(0));
1613
- break;
1614
- }
1615
- }
1616
- return this.state.top = !0, t;
1617
- }
1618
- inline(e, t = []) {
1619
- return this.inlineQueue.push({
1620
- src: e,
1621
- tokens: t
1622
- }), t;
1623
- }
1624
- inlineTokens(e, t = []) {
1625
- this.tokenizer.lexer = this;
1626
- let n = e, r = null;
1627
- if (this.tokens.links) {
1628
- let e = Object.keys(this.tokens.links);
1629
- 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));
1630
- }
1631
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1632
- let i;
1633
- 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);
1634
- n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1635
- let a = !1, o = "", s = Infinity;
1636
- for (; e;) {
1637
- if (e.length < s) s = e.length;
1638
- else {
1639
- this.infiniteLoopError(e.charCodeAt(0));
1640
- break;
1641
- }
1642
- a || (o = ""), a = !1;
1643
- let r;
1644
- 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;
1645
- if (r = this.tokenizer.escape(e)) {
1646
- e = e.substring(r.raw.length), t.push(r);
1647
- continue;
1648
- }
1649
- if (r = this.tokenizer.tag(e)) {
1650
- e = e.substring(r.raw.length), t.push(r);
1651
- continue;
1652
- }
1653
- if (r = this.tokenizer.link(e)) {
1654
- e = e.substring(r.raw.length), t.push(r);
1655
- continue;
1656
- }
1657
- if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1658
- e = e.substring(r.raw.length);
1659
- let n = t.at(-1);
1660
- r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1661
- continue;
1662
- }
1663
- if (r = this.tokenizer.emStrong(e, n, o)) {
1664
- e = e.substring(r.raw.length), t.push(r);
1665
- continue;
1666
- }
1667
- if (r = this.tokenizer.codespan(e)) {
1668
- e = e.substring(r.raw.length), t.push(r);
1669
- continue;
1670
- }
1671
- if (r = this.tokenizer.br(e)) {
1672
- e = e.substring(r.raw.length), t.push(r);
1673
- continue;
1674
- }
1675
- if (r = this.tokenizer.del(e, n, o)) {
1676
- e = e.substring(r.raw.length), t.push(r);
1677
- continue;
1678
- }
1679
- if (r = this.tokenizer.autolink(e)) {
1680
- e = e.substring(r.raw.length), t.push(r);
1681
- continue;
1682
- }
1683
- if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1684
- e = e.substring(r.raw.length), t.push(r);
1685
- continue;
1686
- }
1687
- let i = e;
1688
- if (this.options.extensions?.startInline) {
1689
- let t = Infinity, n = e.slice(1), r;
1690
- this.options.extensions.startInline.forEach((e) => {
1691
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1692
- }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1693
- }
1694
- if (r = this.tokenizer.inlineText(i)) {
1695
- e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1696
- let n = t.at(-1);
1697
- n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1698
- continue;
1699
- }
1700
- if (e) {
1701
- this.infiniteLoopError(e.charCodeAt(0));
1702
- break;
1703
- }
1704
- }
1705
- return t;
1706
- }
1707
- infiniteLoopError(e) {
1708
- let t = "Infinite loop on byte: " + e;
1709
- if (this.options.silent) console.error(t);
1710
- else throw Error(t);
1711
- }
1712
- }, J = class {
1713
- options;
1714
- parser;
1715
- constructor(e) {
1716
- this.options = e || D;
1717
- }
1718
- space(e) {
1719
- return "";
1720
- }
1721
- code({ text: e, lang: t, escaped: n }) {
1722
- let r = (t || "").match(j.notSpaceStart)?.[0], i = e.replace(j.endingNewline, "") + "\n";
1723
- 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";
1724
- }
1725
- blockquote({ tokens: e }) {
1726
- return `<blockquote>
1727
- ${this.parser.parse(e)}</blockquote>
1728
- `;
1729
- }
1730
- html({ text: e }) {
1731
- return e;
1732
- }
1733
- def(e) {
1734
- return "";
1735
- }
1736
- heading({ tokens: e, depth: t }) {
1737
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1738
- `;
1739
- }
1740
- hr(e) {
1741
- return "<hr>\n";
1742
- }
1743
- list(e) {
1744
- let t = e.ordered, n = e.start, r = "";
1745
- for (let t = 0; t < e.items.length; t++) {
1746
- let n = e.items[t];
1747
- r += this.listitem(n);
1748
- }
1749
- let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1750
- return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1751
- }
1752
- listitem(e) {
1753
- return `<li>${this.parser.parse(e.tokens)}</li>
1754
- `;
1755
- }
1756
- checkbox({ checked: e }) {
1757
- return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1758
- }
1759
- paragraph({ tokens: e }) {
1760
- return `<p>${this.parser.parseInline(e)}</p>
1761
- `;
1762
- }
1763
- table(e) {
1764
- let t = "", n = "";
1765
- for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1766
- t += this.tablerow({ text: n });
1767
- let r = "";
1768
- for (let t = 0; t < e.rows.length; t++) {
1769
- let i = e.rows[t];
1770
- n = "";
1771
- for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1772
- r += this.tablerow({ text: n });
1773
- }
1774
- return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1775
- }
1776
- tablerow({ text: e }) {
1777
- return `<tr>
1778
- ${e}</tr>
1779
- `;
1780
- }
1781
- tablecell(e) {
1782
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1783
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1784
- `;
1785
- }
1786
- strong({ tokens: e }) {
1787
- return `<strong>${this.parser.parseInline(e)}</strong>`;
1788
- }
1789
- em({ tokens: e }) {
1790
- return `<em>${this.parser.parseInline(e)}</em>`;
1791
- }
1792
- codespan({ text: e }) {
1793
- return `<code>${U(e, !0)}</code>`;
1794
- }
1795
- br(e) {
1796
- return "<br>";
1797
- }
1798
- del({ tokens: e }) {
1799
- return `<del>${this.parser.parseInline(e)}</del>`;
1800
- }
1801
- link({ href: e, title: t, tokens: n }) {
1802
- let r = this.parser.parseInline(n), i = cn(e);
1803
- if (i === null) return r;
1804
- e = i;
1805
- let a = "<a href=\"" + e + "\"";
1806
- return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
1807
- }
1808
- image({ href: e, title: t, text: n, tokens: r }) {
1809
- r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1810
- let i = cn(e);
1811
- if (i === null) return U(n);
1812
- e = i;
1813
- let a = `<img src="${e}" alt="${U(n)}"`;
1814
- return t && (a += ` title="${U(t)}"`), a += ">", a;
1815
- }
1816
- text(e) {
1817
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1818
- }
1819
- }, Y = class {
1820
- strong({ text: e }) {
1821
- return e;
1822
- }
1823
- em({ text: e }) {
1824
- return e;
1825
- }
1826
- codespan({ text: e }) {
1827
- return e;
1828
- }
1829
- del({ text: e }) {
1830
- return e;
1831
- }
1832
- html({ text: e }) {
1833
- return e;
1834
- }
1835
- text({ text: e }) {
1836
- return e;
1837
- }
1838
- link({ text: e }) {
1839
- return "" + e;
1840
- }
1841
- image({ text: e }) {
1842
- return "" + e;
1843
- }
1844
- br() {
1845
- return "";
1846
- }
1847
- checkbox({ raw: e }) {
1848
- return e;
1849
- }
1850
- }, X = class e {
1851
- options;
1852
- renderer;
1853
- textRenderer;
1854
- constructor(e) {
1855
- 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();
1856
- }
1857
- static parse(t, n) {
1858
- return new e(n).parse(t);
1859
- }
1860
- static parseInline(t, n) {
1861
- return new e(n).parseInline(t);
1862
- }
1863
- parse(e) {
1864
- this.renderer.parser = this;
1865
- let t = "";
1866
- for (let n = 0; n < e.length; n++) {
1867
- let r = e[n];
1868
- if (this.options.extensions?.renderers?.[r.type]) {
1869
- let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1870
- if (n !== !1 || ![
1871
- "space",
1872
- "hr",
1873
- "heading",
1874
- "code",
1875
- "table",
1876
- "blockquote",
1877
- "list",
1878
- "html",
1879
- "def",
1880
- "paragraph",
1881
- "text"
1882
- ].includes(e.type)) {
1883
- t += n || "";
1884
- continue;
1885
- }
1886
- }
1887
- let i = r;
1888
- switch (i.type) {
1889
- case "space":
1890
- t += this.renderer.space(i);
1891
- break;
1892
- case "hr":
1893
- t += this.renderer.hr(i);
1894
- break;
1895
- case "heading":
1896
- t += this.renderer.heading(i);
1897
- break;
1898
- case "code":
1899
- t += this.renderer.code(i);
1900
- break;
1901
- case "table":
1902
- t += this.renderer.table(i);
1903
- break;
1904
- case "blockquote":
1905
- t += this.renderer.blockquote(i);
1906
- break;
1907
- case "list":
1908
- t += this.renderer.list(i);
1909
- break;
1910
- case "checkbox":
1911
- t += this.renderer.checkbox(i);
1912
- break;
1913
- case "html":
1914
- t += this.renderer.html(i);
1915
- break;
1916
- case "def":
1917
- t += this.renderer.def(i);
1918
- break;
1919
- case "paragraph":
1920
- t += this.renderer.paragraph(i);
1921
- break;
1922
- case "text":
1923
- t += this.renderer.text(i);
1924
- break;
1925
- default: {
1926
- let e = "Token with \"" + i.type + "\" type was not found.";
1927
- if (this.options.silent) return console.error(e), "";
1928
- throw Error(e);
1929
- }
1930
- }
1931
- }
1932
- return t;
1933
- }
1934
- parseInline(e, t = this.renderer) {
1935
- this.renderer.parser = this;
1936
- let n = "";
1937
- for (let r = 0; r < e.length; r++) {
1938
- let i = e[r];
1939
- if (this.options.extensions?.renderers?.[i.type]) {
1940
- let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1941
- if (e !== !1 || ![
1942
- "escape",
1943
- "html",
1944
- "link",
1945
- "image",
1946
- "strong",
1947
- "em",
1948
- "codespan",
1949
- "br",
1950
- "del",
1951
- "text"
1952
- ].includes(i.type)) {
1953
- n += e || "";
1954
- continue;
1955
- }
1956
- }
1957
- let a = i;
1958
- switch (a.type) {
1959
- case "escape":
1960
- n += t.text(a);
1961
- break;
1962
- case "html":
1963
- n += t.html(a);
1964
- break;
1965
- case "link":
1966
- n += t.link(a);
1967
- break;
1968
- case "image":
1969
- n += t.image(a);
1970
- break;
1971
- case "checkbox":
1972
- n += t.checkbox(a);
1973
- break;
1974
- case "strong":
1975
- n += t.strong(a);
1976
- break;
1977
- case "em":
1978
- n += t.em(a);
1979
- break;
1980
- case "codespan":
1981
- n += t.codespan(a);
1982
- break;
1983
- case "br":
1984
- n += t.br(a);
1985
- break;
1986
- case "del":
1987
- n += t.del(a);
1988
- break;
1989
- case "text":
1990
- n += t.text(a);
1991
- break;
1992
- default: {
1993
- let e = "Token with \"" + a.type + "\" type was not found.";
1994
- if (this.options.silent) return console.error(e), "";
1995
- throw Error(e);
1996
- }
1997
- }
1998
- }
1999
- return n;
2000
- }
2001
- }, Z = class {
2002
- options;
2003
- block;
2004
- constructor(e) {
2005
- this.options = e || D;
2006
- }
2007
- static passThroughHooks = /* @__PURE__ */ new Set([
2008
- "preprocess",
2009
- "postprocess",
2010
- "processAllTokens",
2011
- "emStrongMask"
2012
- ]);
2013
- static passThroughHooksRespectAsync = /* @__PURE__ */ new Set([
2014
- "preprocess",
2015
- "postprocess",
2016
- "processAllTokens"
2017
- ]);
2018
- preprocess(e) {
2019
- return e;
2020
- }
2021
- postprocess(e) {
2022
- return e;
2023
- }
2024
- processAllTokens(e) {
2025
- return e;
2026
- }
2027
- emStrongMask(e) {
2028
- return e;
2029
- }
2030
- provideLexer(e = this.block) {
2031
- return e ? q.lex : q.lexInline;
2032
- }
2033
- provideParser(e = this.block) {
2034
- return e ? X.parse : X.parseInline;
2035
- }
2036
- }, mn = new class {
2037
- defaults = ct();
2038
- options = this.setOptions;
2039
- parse = this.parseMarkdown(!0);
2040
- parseInline = this.parseMarkdown(!1);
2041
- Parser = X;
2042
- Renderer = J;
2043
- TextRenderer = Y;
2044
- Lexer = q;
2045
- Tokenizer = pn;
2046
- Hooks = Z;
2047
- constructor(...e) {
2048
- this.use(...e);
2049
- }
2050
- walkTokens(e, t) {
2051
- let n = [];
2052
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2053
- case "table": {
2054
- let e = r;
2055
- for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2056
- for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2057
- break;
2058
- }
2059
- case "list": {
2060
- let e = r;
2061
- n = n.concat(this.walkTokens(e.items, t));
2062
- break;
2063
- }
2064
- default: {
2065
- let e = r;
2066
- this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2067
- let i = e[r].flat(Infinity);
2068
- n = n.concat(this.walkTokens(i, t));
2069
- }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2070
- }
2071
- }
2072
- return n;
2073
- }
2074
- use(...e) {
2075
- let t = this.defaults.extensions || {
2076
- renderers: {},
2077
- childTokens: {}
2078
- };
2079
- return e.forEach((e) => {
2080
- let n = { ...e };
2081
- if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2082
- if (!e.name) throw Error("extension name required");
2083
- if ("renderer" in e) {
2084
- let n = t.renderers[e.name];
2085
- n ? t.renderers[e.name] = function(...t) {
2086
- let r = e.renderer.apply(this, t);
2087
- return r === !1 && (r = n.apply(this, t)), r;
2088
- } : t.renderers[e.name] = e.renderer;
2089
- }
2090
- if ("tokenizer" in e) {
2091
- if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2092
- let n = t[e.level];
2093
- 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]));
2094
- }
2095
- "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2096
- }), n.extensions = t), e.renderer) {
2097
- let t = this.defaults.renderer || new J(this.defaults);
2098
- for (let n in e.renderer) {
2099
- if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2100
- if (["options", "parser"].includes(n)) continue;
2101
- let r = n, i = e.renderer[r], a = t[r];
2102
- t[r] = (...e) => {
2103
- let n = i.apply(t, e);
2104
- return n === !1 && (n = a.apply(t, e)), n || "";
2105
- };
2106
- }
2107
- n.renderer = t;
2108
- }
2109
- if (e.tokenizer) {
2110
- let t = this.defaults.tokenizer || new pn(this.defaults);
2111
- for (let n in e.tokenizer) {
2112
- if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2113
- if ([
2114
- "options",
2115
- "rules",
2116
- "lexer"
2117
- ].includes(n)) continue;
2118
- let r = n, i = e.tokenizer[r], a = t[r];
2119
- t[r] = (...e) => {
2120
- let n = i.apply(t, e);
2121
- return n === !1 && (n = a.apply(t, e)), n;
2122
- };
2123
- }
2124
- n.tokenizer = t;
2125
- }
2126
- if (e.hooks) {
2127
- let t = this.defaults.hooks || new Z();
2128
- for (let n in e.hooks) {
2129
- if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2130
- if (["options", "block"].includes(n)) continue;
2131
- let r = n, i = e.hooks[r], a = t[r];
2132
- Z.passThroughHooks.has(n) ? t[r] = (e) => {
2133
- if (this.defaults.async && Z.passThroughHooksRespectAsync.has(n)) return (async () => {
2134
- let n = await i.call(t, e);
2135
- return a.call(t, n);
2136
- })();
2137
- let r = i.call(t, e);
2138
- return a.call(t, r);
2139
- } : t[r] = (...e) => {
2140
- if (this.defaults.async) return (async () => {
2141
- let n = await i.apply(t, e);
2142
- return n === !1 && (n = await a.apply(t, e)), n;
2143
- })();
2144
- let n = i.apply(t, e);
2145
- return n === !1 && (n = a.apply(t, e)), n;
2146
- };
2147
- }
2148
- n.hooks = t;
2149
- }
2150
- if (e.walkTokens) {
2151
- let t = this.defaults.walkTokens, r = e.walkTokens;
2152
- n.walkTokens = function(e) {
2153
- let n = [];
2154
- return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2155
- };
2156
- }
2157
- this.defaults = {
2158
- ...this.defaults,
2159
- ...n
2160
- };
2161
- }), this;
2162
- }
2163
- setOptions(e) {
2164
- return this.defaults = {
2165
- ...this.defaults,
2166
- ...e
2167
- }, this;
2168
- }
2169
- lexer(e, t) {
2170
- return q.lex(e, t ?? this.defaults);
2171
- }
2172
- parser(e, t) {
2173
- return X.parse(e, t ?? this.defaults);
2174
- }
2175
- parseMarkdown(e) {
2176
- return (t, n) => {
2177
- let r = { ...n }, i = {
2178
- ...this.defaults,
2179
- ...r
2180
- }, a = this.onError(!!i.silent, !!i.async);
2181
- 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."));
2182
- if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2183
- if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2184
- if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2185
- 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;
2186
- i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2187
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(a, i);
2188
- return i.hooks ? await i.hooks.postprocess(o) : o;
2189
- })().catch(a);
2190
- try {
2191
- i.hooks && (t = i.hooks.preprocess(t));
2192
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2193
- i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2194
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(n, i);
2195
- return i.hooks && (r = i.hooks.postprocess(r)), r;
2196
- } catch (e) {
2197
- return a(e);
2198
- }
2199
- };
2200
- }
2201
- onError(e, t) {
2202
- return (n) => {
2203
- if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2204
- let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
2205
- return t ? Promise.resolve(e) : e;
2206
- }
2207
- if (t) return Promise.reject(n);
2208
- throw n;
2209
- };
2210
- }
2211
- }();
2212
- function Q(e, t) {
2213
- return mn.parse(e, t);
2214
- }
2215
- Q.options = Q.setOptions = function(e) {
2216
- return mn.setOptions(e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2217
- }, Q.getDefaults = ct, Q.defaults = D, Q.use = function(...e) {
2218
- return mn.use(...e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2219
- }, Q.walkTokens = function(e, t) {
2220
- return mn.walkTokens(e, t);
2221
- }, 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;
2222
- //#endregion
2223
- //#region src/components/ai-chat/empty-state/ai-chat-empty-state.module.scss?inline
2224
- var hn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(--luzmo-ai-chat-empty-state-padding-block,var(--ai-chat-empty-state-padding-block));padding-inline:var(--luzmo-ai-chat-empty-state-padding-inline,var(--ai-chat-empty-state-padding-inline));flex:1;justify-content:center;align-items:center;display:flex}.empty-state{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-header-actions-gap,var(--ai-chat-empty-state-header-actions-gap));width:100%;max-width:var(--luzmo-ai-chat-empty-state-max-width,var(--ai-chat-empty-state-max-width));text-align:center;flex-direction:column;display:flex}.header{flex-direction:column;align-items:center;width:100%;display:flex}.actions{align-items:center;gap:var(--luzmo-ai-chat-empty-state-actions-gap,var(--ai-chat-empty-state-actions-gap));flex-direction:column;width:100%;display:flex}.title{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-title-font-size,var(--ai-chat-empty-state-title-font-size));font-weight:var(--luzmo-ai-chat-empty-state-title-font-weight,var(--ai-chat-empty-state-title-font-weight));line-height:var(--luzmo-ai-chat-empty-state-title-line-height,var(--ai-chat-empty-state-title-line-height));color:var(--luzmo-ai-chat-empty-state-title-color,var(--ai-chat-empty-state-title-color));text-wrap:balance;margin:0}.subtitle{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-subtitle-font-size,var(--ai-chat-empty-state-subtitle-font-size));font-weight:var(--luzmo-ai-chat-empty-state-subtitle-font-weight,var(--ai-chat-empty-state-subtitle-font-weight));line-height:var(--luzmo-ai-chat-empty-state-subtitle-line-height,var(--ai-chat-empty-state-subtitle-line-height));color:var(--luzmo-ai-chat-empty-state-subtitle-color,var(--ai-chat-empty-state-subtitle-color));margin:0}.suggestions{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-suggestions-gap,var(--ai-chat-empty-state-suggestions-gap));flex-wrap:wrap;width:100%;display:flex}luzmo-action-button{max-width:100%}:host{--ai-chat-empty-state-header-actions-gap:1.5rem;--ai-chat-empty-state-actions-gap:var(--luzmo-spacing-4);--ai-chat-empty-state-suggestions-gap:var(--luzmo-spacing-3);--ai-chat-empty-state-max-width:22.5rem;--ai-chat-empty-state-padding-block:2rem;--ai-chat-empty-state-padding-inline:var(--luzmo-spacing-5);--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-l);--ai-chat-empty-state-title-font-weight:var(--luzmo-font-weight-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))}", gn = class extends e {
2225
- constructor(...e) {
2226
- 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;
2227
- }
2228
- static {
2229
- this.styles = c(hn);
2230
- }
2231
- static {
2232
- this.tagName = "luzmo-ai-chat-empty-state";
2233
- }
2234
- _handleSuggestionActivate(e) {
2235
- if (this.disabled) return;
2236
- let t = e.prompt ?? e.label;
2237
- this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2238
- detail: {
2239
- label: e.label,
2240
- prompt: t,
2241
- selectedDatasets: e.selectedDatasets
2242
- },
2243
- bubbles: !0,
2244
- composed: !0
2245
- }));
2246
- }
2247
- render() {
2248
- let e = this.suggestions.length > 0;
2249
- return o`
2250
- <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2251
- <header class="header">
2252
- <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2253
- </header>
2254
-
2255
- ${e ? o`
2256
- <div class="actions">
2257
- ${this.subtitle ? o`<p class="subtitle">${this.subtitle}</p>` : s}
2258
- <div
2259
- class="suggestions"
2260
- role="group"
2261
- aria-label=${n("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2262
- >
2263
- ${this.suggestions.map((e) => o`
2264
- <luzmo-action-button
2265
- variant="accent"
2266
- size="s"
2267
- ?disabled=${this.disabled}
2268
- @click=${() => this._handleSuggestionActivate(e)}
2269
- >
2270
- ${e.label}
2271
- </luzmo-action-button>
2272
- `)}
2273
- </div>
2274
- </div>
2275
- ` : s}
2276
- </section>
2277
- `;
2278
- }
2279
- };
2280
- //#endregion
2281
- //#region src/components/ai-chat/empty-state/index.ts
2282
- t([l({ type: String })], gn.prototype, "title", void 0), t([l({ type: String })], gn.prototype, "subtitle", void 0), t([l({ type: Array })], gn.prototype, "suggestions", void 0), t([l({
2283
- type: Boolean,
2284
- reflect: !0
2285
- })], gn.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", gn);
2286
- //#endregion
2287
- //#region src/components/ai-chat/ai-chat-request.ts
2288
- function _n(e, t) {
2289
- return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2290
- }
2291
- function vn(e) {
2292
- return e.type === "placeholder" ? null : {
2293
- ...e,
2294
- version: e.version || "",
2295
- title: e.title || e.options?.title,
2296
- filters: e.filterGroups || [],
2297
- aichartId: e.aichartId || ""
2298
- };
2299
- }
2300
- function yn(e, t) {
2301
- return [{
2302
- type: "text",
2303
- text: e
2304
- }, ...t.map((e) => ({
2305
- type: "dataset",
2306
- id: e
2307
- }))];
2308
- }
2309
- function bn(e, t, n) {
2310
- return {
2311
- agent: e,
2312
- task: t,
2313
- stream: n.stream ?? !0,
2314
- response_mode: "mixed",
2315
- ...n.conversationId ? { conversation_id: n.conversationId } : {},
2316
- ...n.localeId ? { locale_id: n.localeId } : {}
2317
- };
2318
- }
2319
- function xn(e) {
2320
- let t = yn(e.prompt, e.datasetIds), n = e.chart ? vn(e.chart) : null;
2321
- return n && t.push({
2322
- type: "item",
2323
- value: n
2324
- }), {
2325
- ...bn("item", e.task ?? "generate", e),
2326
- input: t
2327
- };
2328
- }
2329
- function Sn(e) {
2330
- let t = yn(e.prompt, e.datasetIds);
2331
- return e.dashboard && t.push({
2332
- type: "dashboard",
2333
- value: e.dashboard,
2334
- ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2335
- }), {
2336
- ...bn("dashboard", "generate", e),
2337
- timezone_id: e.timezoneId ?? "UTC",
2338
- input: t
2339
- };
2340
- }
2341
- function Cn(e) {
2342
- return {
2343
- ...bn("analyst", "generate", e),
2344
- input: yn(e.prompt, e.datasetIds)
2345
- };
2346
- }
2347
- function wn(e, t) {
2348
- switch (e) {
2349
- case "dashboard": return Sn(t);
2350
- case "analyst": return Cn(t);
2351
- default: return xn(t);
2352
- }
2353
- }
2354
- function Tn(e, t) {
2355
- let { authKey: n, authToken: r, apiVersion: i = "0.1.0" } = t;
2356
- return {
2357
- key: n,
2358
- token: r,
2359
- action: "create",
2360
- version: i,
2361
- properties: wn(e, t)
2362
- };
2363
- }
2364
- function En(e, t, n, r = "0.1.0", i = null) {
2365
- return {
2366
- key: t,
2367
- token: n,
2368
- action: "delete",
2369
- version: r,
2370
- properties: {
2371
- agent: "item",
2372
- restore_to_message_id: e,
2373
- ...i ? { conversation_id: i } : {}
2374
- }
2375
- };
2376
- }
2377
- //#endregion
2378
- //#region src/components/ai-chat/stream/transport.ts
2379
- async function Dn(e) {
2380
- let t = await fetch(e.url, {
2381
- method: "POST",
2382
- headers: { "Content-Type": "application/json" },
2383
- mode: "cors",
2384
- body: JSON.stringify(e.body),
2385
- signal: e.signal
2386
- });
2387
- if (!t.ok) {
2388
- let e = await t.json().catch(() => null);
2389
- throw Error(e?.message || `API request failed with status ${t.status}`);
2390
- }
2391
- if (!t.body) throw Error("Response body is not readable");
2392
- return {
2393
- body: t.body,
2394
- conversationId: t.headers.get("x-conversation-id")
2395
- };
2396
- }
2397
- function On(e) {
2398
- let t = e.trim();
2399
- if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2400
- let n = t;
2401
- return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2402
- }
2403
- function kn(e, t) {
2404
- try {
2405
- let n = On(e);
2406
- n && t(n);
2407
- } catch {
2408
- console.error("Failed to parse stream line");
2409
- }
2410
- }
2411
- async function An(e, t) {
2412
- let n = e.getReader(), r = new TextDecoder(), i = "";
2413
- try {
2414
- for (;;) {
2415
- let { done: e, value: a } = await n.read();
2416
- if (e) break;
2417
- i += r.decode(a, { stream: !0 });
2418
- let o = i.split(/\r?\n/);
2419
- i = o.pop() ?? "";
2420
- for (let e of o) kn(e, t);
2421
- }
2422
- i += r.decode();
2423
- let e = i.trim();
2424
- e && kn(e, t);
2425
- } finally {
2426
- n.releaseLock();
2427
- }
2428
- }
2429
- //#endregion
2430
- //#region src/components/ai-chat/stream/progress.ts
2431
- function jn() {
2432
- return {
2433
- id: "root",
2434
- step: "root",
2435
- status: "pending",
2436
- children: [{
2437
- id: "client-init",
2438
- step: "iqInit",
2439
- status: "inProgress",
2440
- description: n("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2441
- }]
2442
- };
2443
- }
2444
- function Mn(e) {
2445
- let t = e.progress;
2446
- return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2447
- }
2448
- //#endregion
2449
- //#region src/components/ai-chat/stream/chunk-extractors.ts
2450
- function Nn(e) {
2451
- if (!e || typeof e != "object") return "";
2452
- let t = e.assistant_message;
2453
- if (!t || typeof t != "object") return "";
2454
- if (typeof t.message == "string") return t.message;
2455
- if (typeof t.text == "string") return t.text;
2456
- if (typeof t.summary == "string") return t.summary;
2457
- let n = t.content;
2458
- return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2459
- }
2460
- function Pn(e) {
2461
- 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 : "";
2462
- }
2463
- function Fn(e) {
2464
- return Nn(e.result);
2465
- }
2466
- function In(e) {
2467
- return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2468
- }
2469
- function Ln(e, t) {
2470
- let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2471
- n && t.callbacks.onConversationIdChange(n);
2472
- }
2473
- function Rn(e) {
2474
- for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2475
- let e = t.value;
2476
- if (e && typeof e == "object") return e;
2477
- }
2478
- return null;
2479
- }
2480
- function zn(e) {
2481
- let t = e.chart ?? e.generatedChart;
2482
- if (t && typeof t == "object") return t;
2483
- let n = e.aiMessageAssets ?? e.ai_message_assets;
2484
- if (Array.isArray(n)) {
2485
- let e = Rn(n);
2486
- if (e) return e;
2487
- }
2488
- let r = e.result;
2489
- if (r && typeof r == "object") {
2490
- let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2491
- if (Array.isArray(t)) return Rn(t);
2492
- }
2493
- return null;
2494
- }
2495
- function Bn(e) {
2496
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2497
- let e = t.value;
2498
- if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2499
- }
2500
- return null;
2501
- }
2502
- function Vn(e) {
2503
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2504
- let e = t.name;
2505
- if (e && typeof e == "object") return e;
2506
- }
2507
- }
2508
- function Hn(...e) {
2509
- return e.find(Array.isArray);
2510
- }
2511
- function Un(e) {
2512
- if (e.views && Array.isArray(e.views)) return e;
2513
- let t = e.aiMessageAssets ?? e.ai_message_assets;
2514
- if (Array.isArray(t)) return Bn(t);
2515
- let n = e.result;
2516
- if (n && typeof n == "object") {
2517
- let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2518
- if (Array.isArray(t)) return Bn(t);
2519
- }
2520
- return null;
2521
- }
2522
- function Wn(e) {
2523
- let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Hn(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2524
- return r ? Vn(r) : void 0;
2525
- }
2526
- //#endregion
2527
- //#region src/components/ai-chat/stream/stream-processor.ts
2528
- var Gn = /* @__PURE__ */ new Set([
2529
- "conversation-id",
2530
- "conversation_id",
2531
- "keepalive",
2532
- "ping",
2533
- "finish",
2534
- "done"
2535
- ]);
2536
- function Kn(e, t, n) {
2537
- return {
2538
- agent: n.agent,
2539
- conversationId: t.callbacks.getConversationId(),
2540
- ...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
2541
- raw: e
2542
- };
2543
- }
2544
- function qn(e, t, n, r, i) {
2545
- let a = {
2546
- ...Kn(n, e, t),
2547
- recognized: !0,
2548
- type: r,
2549
- data: i
2550
- };
2551
- e.callbacks.onStep(a);
2552
- }
2553
- function Jn(e, t, n, r, i) {
2554
- let a = {
2555
- ...Kn(n, e, t),
2556
- recognized: !1,
2557
- type: r,
2558
- data: i
2559
- };
2560
- e.callbacks.onStep(a);
2561
- }
2562
- function Yn(e) {
2563
- e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2564
- }
2565
- function Xn(e, t) {
2566
- Yn(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2567
- }
2568
- function Zn(e) {
2569
- if (!e) return null;
2570
- let t = e.descriptionMetadata?.decision;
2571
- if (t === "create" || t === "edit" || t === "question") return t;
2572
- for (let t of e.children ?? []) {
2573
- let e = Zn(t);
2574
- if (e) return e;
2575
- }
2576
- return null;
2577
- }
2578
- function Qn(e, t, n) {
2579
- if (!Mn(e)) return !1;
2580
- let r = e.progress;
2581
- if (t.callbacks.onProgress(r), qn(t, n, e, "progress", r), t.state.decision === null) {
2582
- let i = Zn(r);
2583
- i && (t.state.decision = i, qn(t, n, e, "decision", { decision: i }));
2584
- }
2585
- return !0;
2586
- }
2587
- function $n(e) {
2588
- return !!e.error || e.type === "error" || typeof e.error_text == "string";
2589
- }
2590
- function er(e) {
2591
- 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" });
2592
- }
2593
- function tr(e, t, n) {
2594
- if (!$n(e)) return !1;
2595
- let r = er(e);
2596
- return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), Sr(e, t, n, e.error ?? r), !0;
2597
- }
2598
- function nr(e) {
2599
- return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2600
- }
2601
- function rr(e, t, n) {
2602
- if (e.type !== "interrupt") return !1;
2603
- let r = nr(e);
2604
- return r && (t.state.interruptQuestion = r, Xn(t, r), qn(t, n, e, "interrupt", { question: r })), Sr(e, t, n), !0;
2605
- }
2606
- function ir(e) {
2607
- return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2608
- }
2609
- function ar(e) {
2610
- return typeof e.asset_type == "string" ? e.asset_type : "";
2611
- }
2612
- function or(e) {
2613
- return {
2614
- assetType: ar(e),
2615
- snapshot: {}
2616
- };
2617
- }
2618
- function sr(e, t) {
2619
- return {
2620
- ...e,
2621
- ...t
2622
- };
2623
- }
2624
- function cr(e) {
2625
- let t = e.asset_delta ?? e.delta;
2626
- return t && typeof t == "object" ? t : null;
2627
- }
2628
- function lr(e, t) {
2629
- t.state.assets[ir(e)] = or(e);
2630
- }
2631
- function ur(e, t) {
2632
- let n = ir(e), r = t.state.assets[n] ?? or(e), i = cr(e);
2633
- i && (r.snapshot = sr(r.snapshot, i)), t.state.assets[n] = r;
2634
- }
2635
- function dr(e, t) {
2636
- let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2637
- return n && typeof n == "object" ? sr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2638
- }
2639
- function fr(e, t, n) {
2640
- let r = ir(e), i = t.state.assets[r], a = i?.assetType || ar(e), o = dr(e, i);
2641
- delete t.state.assets[r], hr(a, o, e, t, n);
2642
- }
2643
- function pr(e, t, n) {
2644
- switch (e.type) {
2645
- case "asset_start": return lr(e, t), !0;
2646
- case "asset_delta": return ur(e, t), !0;
2647
- case "asset_end": return fr(e, t, n), !0;
2648
- default: return !1;
2649
- }
2650
- }
2651
- function mr(e, t, n, r) {
2652
- n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), qn(n, r, t, "chart", e);
2653
- }
2654
- function hr(e, t, n, r, i) {
2655
- switch (e) {
2656
- case "dashboard-title": {
2657
- let e = t.name;
2658
- e && typeof e == "object" && (r.state.dashboardName = e, qn(r, i, n, "dashboard-title", { name: e }));
2659
- return;
2660
- }
2661
- case "dashboard-layout":
2662
- qn(r, i, n, "dashboard-layout", t);
2663
- return;
2664
- case "dashboard-item":
2665
- qn(r, i, n, "dashboard-item", {
2666
- slot: Number(t.slot),
2667
- chart: t.chart ?? t
2668
- });
2669
- return;
2670
- case "dashboard":
2671
- r.state.dashboardSnapshot = t;
2672
- return;
2673
- default: gr(e, t, n, r, i);
2674
- }
2675
- }
2676
- function gr(e, t, n, r, i) {
2677
- if (i.chartAssetType && e === i.chartAssetType) {
2678
- mr(t, n, r, i);
2679
- return;
2680
- }
2681
- if (i.dashboardAssetType && e === i.dashboardAssetType) {
2682
- r.state.dashboardSnapshot = t;
2683
- return;
2684
- }
2685
- Jn(r, i, n, e || "asset", t);
2686
- }
2687
- function _r(e, t, n) {
2688
- let r = !1;
2689
- if (n.dashboardAssetType) {
2690
- let n = Un(e);
2691
- if (n) {
2692
- t.state.dashboardSnapshot = n;
2693
- let i = Wn(e);
2694
- i && (t.state.dashboardName = i), r = !0;
2695
- }
2696
- }
2697
- if (n.chartAssetType && !t.state.chartSnapshot) {
2698
- let i = zn(e);
2699
- i && (mr(i, e, t, n), r = !0);
2700
- }
2701
- return r;
2702
- }
2703
- function vr(e, t, n) {
2704
- return {
2705
- ...e,
2706
- generatedChart: t,
2707
- conversationId: n.callbacks.getConversationId()
2708
- };
2709
- }
2710
- function yr(e, t, n) {
2711
- for (let r of Object.keys(t.state.assets)) {
2712
- let i = t.state.assets[r];
2713
- delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot) && hr(i.assetType, i.snapshot, e, t, n);
2714
- }
2715
- }
2716
- function br(e, t) {
2717
- let n = Fn(e);
2718
- !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
2719
- }
2720
- function xr(e, t, n) {
2721
- let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Un(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? zn(e) : null);
2722
- return {
2723
- agent: n.agent,
2724
- conversationId: t.callbacks.getConversationId(),
2725
- message: t.aiMessage,
2726
- ...r ? { dashboard: r } : {},
2727
- ...i ? { chart: vr(e, i, t) } : {},
2728
- ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
2729
- raw: e
2730
- };
2731
- }
2732
- function Sr(e, t, n, r) {
2733
- if (!t.state.completed) {
2734
- if (t.state.completed = !0, yr(e, t, n), Yn(t), r !== void 0) {
2735
- t.callbacks.onComplete({
2736
- agent: n.agent,
2737
- conversationId: t.callbacks.getConversationId(),
2738
- message: t.aiMessage,
2739
- error: r,
2740
- raw: e
2741
- });
2742
- return;
2743
- }
2744
- br(e, t), t.callbacks.onComplete(xr(e, t, n));
2745
- }
2746
- }
2747
- function Cr(e) {
2748
- return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
2749
- }
2750
- function wr(e, t, n) {
2751
- let r = Pn(e);
2752
- return r ? (t.state.accumulatedText += r, Xn(t, r), qn(t, n, e, "text", {
2753
- delta: r,
2754
- text: t.state.accumulatedText
2755
- }), !0) : !1;
2756
- }
2757
- function Tr(e, t, n, r, i) {
2758
- if (r || i) return;
2759
- let a = Cr(e);
2760
- a && !Gn.has(a) && Jn(t, n, e, a, e);
2761
- }
2762
- function Er(e, t, n) {
2763
- if (Ln(e, t), Qn(e, t, n) || tr(e, t, n) || rr(e, t, n) || pr(e, t, n)) return;
2764
- let r = wr(e, t, n), i = _r(e, t, n), a = r || i, o = In(e);
2765
- Tr(e, t, n, a, o), o && Sr(e, t, n);
2766
- }
2767
- //#endregion
2768
- //#region src/components/ai-chat/stream/registry.ts
2769
- function Dr(e) {
2770
- switch (e) {
2771
- case "dashboard": return {
2772
- agent: e,
2773
- dashboardAssetType: "dashboard"
2774
- };
2775
- case "item": return {
2776
- agent: e,
2777
- chartAssetType: "item"
2778
- };
2779
- default: return { agent: e };
2780
- }
2781
- }
2782
- function Or(e) {
2783
- let t = Dr(e);
2784
- return (e, n) => Er(e, n, t);
2785
- }
2786
- function kr() {
2787
- return {
2788
- progressCollapsed: !1,
2789
- accumulatedText: "",
2790
- decision: null,
2791
- assets: {},
2792
- dashboardSnapshot: null,
2793
- dashboardName: void 0,
2794
- chartSnapshot: null,
2795
- interruptQuestion: null,
2796
- completed: !1
2797
- };
2798
- }
2799
- //#endregion
2800
- //#region src/components/ai-chat/session/ai-chat-session.ts
2801
- function Ar() {
2802
- return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
2803
- }
2804
- var jr = class {
2805
- constructor(e, t = {}) {
2806
- this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
2807
- messages: [],
2808
- selectedDatasets: [],
2809
- isGenerating: !1,
2810
- progress: null,
2811
- progressCollapsed: !1,
2812
- conversationId: null,
2813
- inflightMessage: null
2814
- }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
2815
- apiUrl: "https://api.luzmo.com",
2816
- apiVersion: "0.1.0",
2817
- stream: !0,
2818
- ...e
2819
- }, this._hostCallbacks = t, this._state = {
2820
- ...this._state,
2821
- messages: e.messages ? [...e.messages] : [],
2822
- selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
2823
- conversationId: e.conversationId ?? null,
2824
- isGenerating: e.isGenerating ?? !1,
2825
- progress: e.progress ?? null,
2826
- progressCollapsed: e.progressCollapsed ?? !1
2827
- };
2828
- }
2829
- get state() {
2830
- return this._state;
2831
- }
2832
- get isGenerating() {
2833
- return this._state.isGenerating;
2834
- }
2835
- subscribe(e) {
2836
- return this._subscribers.add(e), e(this._state), () => {
2837
- this._subscribers.delete(e);
2838
- };
2839
- }
2840
- setUiBridge(e) {
2841
- this._uiBridgeCallbacks = e;
2842
- }
2843
- updateConfig(e) {
2844
- this._config = {
2845
- ...this._config,
2846
- ...e
2847
- };
2848
- let t = {};
2849
- if ("conversationId" in e) {
2850
- let n = e.conversationId ?? null;
2851
- n !== this._state.conversationId && (t.conversationId = n);
2852
- }
2853
- if ("selectedDatasets" in e && e.selectedDatasets) {
2854
- let n = [...e.selectedDatasets];
2855
- this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
2856
- }
2857
- if ("messages" in e && e.messages) {
2858
- let n = [...e.messages];
2859
- this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
2860
- }
2861
- "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);
2862
- }
2863
- setSelectedDatasets(e) {
2864
- this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
2865
- }
2866
- addDataset(e) {
2867
- this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2868
- }
2869
- removeDataset(e) {
2870
- let t = this._state.selectedDatasets.filter((t) => t.id !== e);
2871
- t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2872
- }
2873
- isDatasetRequirementMet() {
2874
- return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
2875
- }
2876
- getAiPromptUrl() {
2877
- return _n(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
2878
- }
2879
- buildRequestBody(e, t) {
2880
- return Tn(this._config.agent, {
2881
- prompt: e,
2882
- datasetIds: t,
2883
- authKey: this._config.authKey,
2884
- authToken: this._config.authToken,
2885
- conversationId: this._state.conversationId,
2886
- chart: this._config.chart ?? null,
2887
- dashboard: this._config.dashboard ?? null,
2888
- currentScreenMode: this._config.currentScreenMode,
2889
- localeId: this._config.localeId,
2890
- timezoneId: this._config.timezoneId,
2891
- task: this._config.task,
2892
- modelPreference: this._config.modelPreference,
2893
- apiVersion: this._config.apiVersion,
2894
- stream: this._config.stream
2895
- });
2896
- }
2897
- buildPromptSubmittedDetail(e, t, n, r) {
2898
- return {
2899
- prompt: e,
2900
- selectedDatasets: t,
2901
- datasetIds: n,
2902
- agent: this._config.agent,
2903
- request: this.buildRequestBody(e, n),
2904
- url: this.getAiPromptUrl(),
2905
- ...r ? { signal: r } : {}
2906
- };
2907
- }
2908
- async submit(e) {
2909
- let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
2910
- if (!this.isDatasetRequirementMet()) return;
2911
- this._abortInflight();
2912
- let n = {
2913
- id: e.aiMessageId ?? Ar(),
2914
- type: "ai",
2915
- message: ""
2916
- }, r = [...this._state.messages];
2917
- if (!e.skipUserMessage) {
2918
- let t = {
2919
- id: Ar(),
2920
- type: "user",
2921
- message: e.prompt
2922
- };
2923
- r = [...r, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
2924
- }
2925
- r = [...r, n], this._inflightMessage = n, this._receivedProgress = !1;
2926
- let i = new AbortController();
2927
- this._abortController = i, this._patchState({
2928
- messages: r,
2929
- isGenerating: !0,
2930
- progress: jn(),
2931
- progressCollapsed: !1,
2932
- inflightMessage: n
2933
- });
2934
- let a = t, o = [...this._state.selectedDatasets];
2935
- if (this._hasCallback("onPromptSubmitted")) {
2936
- let t = this.buildPromptSubmittedDetail(e.prompt, o, a, i.signal);
2937
- try {
2938
- await this._invokeCallback("onPromptSubmitted", t);
2939
- } catch (e) {
2940
- e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, n), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
2941
- }
2942
- return;
2943
- }
2944
- let s = this.buildRequestBody(e.prompt, t), c = Or(this._config.agent), l = {
2945
- aiMessage: n,
2946
- callbacks: this._createStreamCallbacks(),
2947
- state: kr()
2948
- }, u = this._config.fetchStreaming ?? Dn, d = !1;
2949
- try {
2950
- let { body: e, conversationId: t } = await u({
2951
- url: this.getAiPromptUrl(),
2952
- body: s,
2953
- signal: i.signal
2954
- });
2955
- t && this._setConversationId(t), await An(e, (e) => c(e, l)), d = !0;
2956
- } catch (e) {
2957
- e.name !== "AbortError" && (this._handleSubmitError(e, n), d = !0);
2958
- } finally {
2959
- this._abortController === i && (d ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
2960
- }
2961
- }
2962
- async restore(e) {
2963
- if (this._config.agent !== "item") return {};
2964
- let t = En(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
2965
- if (this._patchState({
2966
- isGenerating: !0,
2967
- progress: null,
2968
- progressCollapsed: !1
2969
- }), this._hasCallback("onRestoreRequested")) {
2970
- let n = {
2971
- apiMessageId: e.restoreToMessageId,
2972
- messageIndex: e.messageIndex,
2973
- request: t,
2974
- url: this.getAiPromptUrl()
2975
- };
2976
- try {
2977
- await this._invokeCallback("onRestoreRequested", n);
2978
- } finally {
2979
- this._patchState({ isGenerating: !1 });
2980
- }
2981
- return {};
2982
- }
2983
- try {
2984
- let n = await fetch(this.getAiPromptUrl(), {
2985
- method: "POST",
2986
- headers: { "Content-Type": "application/json" },
2987
- mode: "cors",
2988
- body: JSON.stringify(t)
2989
- });
2990
- if (!n.ok) {
2991
- let e = await n.json().catch(() => null);
2992
- throw Error(e?.message || `API request failed with status ${n.status}`);
2993
- }
2994
- let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? zn(r) : null), a = {
2995
- ...typeof r?.message == "string" ? { message: r.message } : {},
2996
- ...i ? { chart: {
2997
- ...r,
2998
- generatedChart: i
2999
- } } : {}
3000
- }, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
3001
- if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
3002
- ...o[e.messageIndex],
3003
- message: a.message
3004
- }), this._patchState({ messages: [...o] }), a.chart || a.message) {
3005
- let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
3006
- id: Ar(),
3007
- type: "ai",
3008
- message: a.message ?? ""
3009
- };
3010
- this._emit("onComplete", {
3011
- agent: this._config.agent,
3012
- conversationId: this._state.conversationId,
3013
- message: n,
3014
- ...a.chart ? { chart: a.chart } : {},
3015
- ...r ? { raw: r } : {}
3016
- });
3017
- }
3018
- return a;
3019
- } finally {
3020
- this._patchState({ isGenerating: !1 });
3021
- }
3022
- }
3023
- buildRestoreRequest(e) {
3024
- return En(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3025
- }
3026
- abort(e = {}) {
3027
- this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3028
- isGenerating: !1,
3029
- progress: null,
3030
- progressCollapsed: !1
3031
- }), e.notify && this._emit("onPromptStopped");
3032
- }
3033
- _abortInflight() {
3034
- this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3035
- }
3036
- _createStreamCallbacks() {
3037
- return {
3038
- onConversationIdChange: (e) => this._setConversationId(e),
3039
- onProgress: (e) => {
3040
- this._receivedProgress = !0, this._patchState({ progress: e });
3041
- },
3042
- onProgressCollapsed: (e) => {
3043
- this._patchState({ progressCollapsed: e });
3044
- },
3045
- onMessageUpdate: (e) => {
3046
- this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3047
- },
3048
- getConversationId: () => this._state.conversationId,
3049
- onStep: (e) => {
3050
- this._emit("onStep", e);
3051
- },
3052
- onComplete: (e) => {
3053
- this._emit("onComplete", e);
3054
- }
3055
- };
3056
- }
3057
- _setConversationId(e) {
3058
- this._config = {
3059
- ...this._config,
3060
- conversationId: e
3061
- }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3062
- }
3063
- _upsertMessage(e) {
3064
- let t = this._state.messages.findIndex((t) => t.id === e.id);
3065
- if (t === -1) {
3066
- this._patchState({ messages: [...this._state.messages, { ...e }] });
3067
- return;
3068
- }
3069
- let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3070
- this._patchState({ messages: n });
3071
- }
3072
- _finalizeInflightMessage() {
3073
- 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({
3074
- progress: null,
3075
- progressCollapsed: !1,
3076
- inflightMessage: null
3077
- }));
3078
- }
3079
- _removeInflightFromMessages() {
3080
- this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3081
- }
3082
- _markInflightCancelled(e) {
3083
- 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 }));
3084
- }
3085
- _discardInflightMessage() {
3086
- let e = !!(this._inflightMessage || this._state.inflightMessage);
3087
- this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3088
- }
3089
- _handleSubmitError(e, t) {
3090
- 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({
3091
- inflightMessage: { ...t },
3092
- progress: null,
3093
- progressCollapsed: !1
3094
- }), this._emit("onComplete", {
3095
- agent: this._config.agent,
3096
- conversationId: this._state.conversationId,
3097
- message: t,
3098
- error: e
3099
- });
3100
- }
3101
- _hasCallback(e) {
3102
- return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3103
- }
3104
- _emit(e, ...t) {
3105
- this._invokeCallback(e, ...t);
3106
- }
3107
- async _invokeCallback(e, ...t) {
3108
- let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3109
- typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3110
- }
3111
- _patchState(e) {
3112
- this._state = {
3113
- ...this._state,
3114
- ...e
3115
- }, this._emit("onStateChange", this._state);
3116
- for (let e of this._subscribers) e(this._state);
3117
- }
3118
- _areSelectedDatasetsEqual(e, t) {
3119
- return e.length === t.length && e.every((e, n) => e.id === t[n]?.id);
3120
- }
3121
- _areChatMessagesEqual(e, t) {
3122
- return e.length === t.length && e.every((e, n) => {
3123
- let r = t[n];
3124
- 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);
3125
- });
3126
- }
3127
- };
3128
- function Mr(e, t) {
3129
- return new jr(e, t);
3130
- }
3131
- //#endregion
3132
- //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3133
- var Nr = class {
3134
- constructor(e) {
3135
- this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
3136
- }
3137
- get current() {
3138
- return this._session;
3139
- }
3140
- get state() {
3141
- if (this._session) return this._session.state;
3142
- let e = this.options.getSeed();
3143
- return {
3144
- messages: e.messages,
3145
- selectedDatasets: e.selectedDatasets,
3146
- isGenerating: !1,
3147
- progress: null,
3148
- progressCollapsed: !1,
3149
- conversationId: e.conversationId,
3150
- inflightMessage: null
3151
- };
3152
- }
3153
- get ownsCurrentSession() {
3154
- return this._ownsSession;
3155
- }
3156
- setSession(e) {
3157
- if (!e) {
3158
- this._clearSession();
3159
- return;
3160
- }
3161
- this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, e.updateConfig(this.options.getConfig()), this._wire(e);
3162
- }
3163
- syncProperties(e) {
3164
- if (!e.has("chatSession")) {
3165
- if (this._createSessionIfMissing(), this._session) {
3166
- let t = this.options.getConfig();
3167
- Object.keys(t).some((t) => e.has(t)) && this._session.updateConfig(t);
3168
- }
3169
- (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3170
- }
3171
- }
3172
- requireSession() {
3173
- return this._createSessionIfMissing(), this._session.updateConfig(this.options.getConfig()), this._session;
3174
- }
3175
- connect() {
3176
- this._session && this._wire(this._session);
3177
- }
3178
- teardown() {
3179
- this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3180
- }
3181
- _createSessionIfMissing() {
3182
- if (this._session) return;
3183
- let e = this.options.getSeed();
3184
- this._session = Mr({
3185
- ...this.options.getConfig(),
3186
- messages: e.messages.length > 0 ? [...e.messages] : void 0,
3187
- selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3188
- }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3189
- }
3190
- _clearSession() {
3191
- this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3192
- }
3193
- _seedFromPropsOnce() {
3194
- if (!this._ownsSession || this._seededFromProps) return;
3195
- let e = this.requireSession(), t = this.options.getSeed(), n = {};
3196
- 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);
3197
- }
3198
- _wire(e) {
3199
- this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3200
- this.options.onRenderNeeded();
3201
- });
3202
- }
3203
- _unwire() {
3204
- this._unsubscribe?.(), this._unsubscribe = null;
3205
- }
3206
- }, Pr = ":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 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-2);--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)}", $ = class t extends e {
3207
- constructor(...e) {
3208
- 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._assistantMessageActionsHasContent = !1, this._lastProcessedInitialPrompt = null, this._session = new Nr({
3209
- getConfig: () => this._buildSessionConfig(),
3210
- getSeed: () => ({
3211
- messages: this.messages,
3212
- selectedDatasets: this.selectedDatasets,
3213
- conversationId: this.conversationId
3214
- }),
3215
- createDomBridge: () => this._createDomBridgeCallbacks(),
3216
- onRenderNeeded: () => {
3217
- this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3218
- }
3219
- }), this._handleAssistantMessageActionsSlotChange = (e) => {
3220
- let t = e.target;
3221
- this._setAssistantMessageActionsHasContent(t.assignedElements({ flatten: !0 }).length > 0);
3222
- };
3223
- }
3224
- static {
3225
- this.styles = c(Pr);
3226
- }
3227
- static {
3228
- this.tagName = "luzmo-ai-chat";
3229
- }
3230
- static {
3231
- this.assistantMessageActionsSlot = "assistant-message-actions";
3232
- }
3233
- get session() {
3234
- return this._session.current;
3235
- }
3236
- _getRenderState() {
3237
- return this._session.state;
3238
- }
3239
- _createDomBridgeCallbacks() {
3240
- return {
3241
- onMessageSent: (e, t) => {
3242
- this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3243
- detail: {
3244
- message: e,
3245
- selectedDatasets: t
3246
- },
3247
- bubbles: !0,
3248
- composed: !0
3249
- }));
3250
- },
3251
- onDatasetsChanged: (e) => {
3252
- this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3253
- detail: { selectedDatasets: e },
3254
- bubbles: !0,
3255
- composed: !0
3256
- }));
3257
- },
3258
- onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3259
- onStep: (e) => {
3260
- this.dispatchEvent(new CustomEvent("luzmo-step", {
3261
- detail: e,
3262
- bubbles: !0,
3263
- composed: !0
3264
- }));
3265
- },
3266
- onComplete: (e) => {
3267
- this.dispatchEvent(new CustomEvent("luzmo-complete", {
3268
- detail: e,
3269
- bubbles: !0,
3270
- composed: !0
3271
- }));
3272
- },
3273
- onPromptStopped: () => {
3274
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3275
- bubbles: !0,
3276
- composed: !0
3277
- }));
3278
- }
3279
- };
3280
- }
3281
- _buildSessionConfig() {
3282
- return {
3283
- agent: this.agent,
3284
- authKey: this.authKey,
3285
- authToken: this.authToken,
3286
- apiUrl: this.apiUrl,
3287
- apiVersion: this.apiVersion,
3288
- stream: this.stream,
3289
- conversationId: this.conversationId,
3290
- chart: this.chart,
3291
- dashboard: this.dashboard,
3292
- currentScreenMode: this.currentScreenMode,
3293
- localeId: this.localeId,
3294
- timezoneId: this.timezoneId,
3295
- task: this.task,
3296
- modelPreference: this.modelPreference,
3297
- requireDataset: this.requireDataset
3298
- };
3299
- }
3300
- _emitConversationIdChanged(e) {
3301
- this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3302
- detail: { conversationId: e },
3303
- bubbles: !0,
3304
- composed: !0
3305
- }));
3306
- }
3307
- async _restoreViaSession(e, t) {
3308
- await this._session.requireSession().restore({
3309
- restoreToMessageId: e,
3310
- messageIndex: t
3311
- });
3312
- }
3313
- async _handleRestoreState(e, t) {
3314
- if (e.apiMessageId && this.agent === "item") try {
3315
- await this._restoreViaSession(e.apiMessageId, t);
3316
- } catch (e) {
3317
- console.error("AI restore error:", e);
3318
- }
3319
- }
3320
- _handleDatasetSelected(e) {
3321
- this._session.requireSession().addDataset(e.detail);
3322
- }
3323
- _handleDatasetRemoved(e) {
3324
- this._session.requireSession().removeDataset(e.detail.id);
3325
- }
3326
- async _submitViaSession(e, t = {}) {
3327
- let n = this._session.requireSession();
3328
- if (n.isDatasetRequirementMet()) {
3329
- this._textareaValue = "";
3330
- try {
3331
- await n.submit({
3332
- prompt: e,
3333
- ...t
3334
- });
3335
- } catch (e) {
3336
- e.name !== "AbortError" && console.error("AI prompt session error:", e);
3337
- }
3338
- }
3339
- }
3340
- async _handlePromptSubmitted(e) {
3341
- await this._submitViaSession(e.detail.prompt);
3342
- }
3343
- _handlePromptStopped() {
3344
- let e = this._session.current;
3345
- if (this._textareaValue = "", e) {
3346
- e.abort({
3347
- notify: !0,
3348
- cancelledMessage: this.cancelledMessage ?? void 0
3349
- });
3350
- return;
3351
- }
3352
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3353
- bubbles: !0,
3354
- composed: !0
3355
- }));
3356
- }
3357
- async _handleEmptyStateSuggestionSelected(e) {
3358
- let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3359
- n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3360
- }
3361
- async _processInitialPrompt() {
3362
- !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3363
- }
3364
- connectedCallback() {
3365
- super.connectedCallback(), this._session.connect();
3366
- }
3367
- disconnectedCallback() {
3368
- super.disconnectedCallback(), this._session.teardown();
3369
- }
3370
- _scrollToBottom() {
3371
- let e = this.shadowRoot?.querySelector(".chat-messages-container");
3372
- e && requestAnimationFrame(() => {
3373
- requestAnimationFrame(() => {
3374
- e.scrollTop = e.scrollHeight;
3375
- });
3376
- });
3377
- }
3378
- updated(e) {
3379
- super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), this.updateComplete.then(() => this._syncAssistantMessageActionsVisibility());
3380
- }
3381
- _syncSession(e) {
3382
- if (e.has("chatSession")) {
3383
- this._session.setSession(this.chatSession);
3384
- return;
3385
- }
3386
- this._session.syncProperties(e);
3387
- }
3388
- _handleInitialPromptChange() {
3389
- this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3390
- }
3391
- _renderMarkdown(e) {
3392
- let t = String(Q.parse(e, { async: !1 }));
3393
- return st.sanitize(t, {
3394
- 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("."),
3395
- ALLOWED_ATTR: [
3396
- "href",
3397
- "title",
3398
- "target",
3399
- "rel"
3400
- ],
3401
- ALLOW_DATA_ATTR: !1,
3402
- FORBID_TAGS: [
3403
- "script",
3404
- "style",
3405
- "iframe",
3406
- "object",
3407
- "embed",
3408
- "link",
3409
- "form",
3410
- "input",
3411
- "button"
3412
- ],
3413
- FORBID_ATTR: [
3414
- "onerror",
3415
- "onload",
3416
- "onclick",
3417
- "onmouseover",
3418
- "onfocus",
3419
- "onblur"
3420
- ]
3421
- });
3422
- }
3423
- _renderProgress() {
3424
- let { progress: e, progressCollapsed: t } = this._getRenderState();
3425
- return e?.children?.length ? o`
3426
- <luzmo-progress-steps
3427
- .progress=${e}
3428
- ?collapsed=${t}
3429
- size="s"
3430
- ></luzmo-progress-steps>
3431
- ` : s;
3432
- }
3433
- _isLastAiMessageWithProgress(e, t) {
3434
- 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;
3435
- return !1;
3436
- }
3437
- _syncAssistantMessageActionsVisibility() {
3438
- let e = this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`);
3439
- if (!e) {
3440
- this._setAssistantMessageActionsHasContent(!1);
3441
- return;
3442
- }
3443
- this._setAssistantMessageActionsHasContent(e.assignedElements({ flatten: !0 }).length > 0);
3444
- }
3445
- _setAssistantMessageActionsHasContent(e) {
3446
- e !== this._assistantMessageActionsHasContent && (this._assistantMessageActionsHasContent = e);
3447
- }
3448
- _renderAssistantMessageActions(e, n) {
3449
- return !n || e.id !== n ? s : o`
3450
- <div
3451
- class="assistant-message-actions ${this._assistantMessageActionsHasContent ? "assistant-message-actions--has-content" : ""}"
3452
- >
3453
- <slot
3454
- name=${t.assistantMessageActionsSlot}
3455
- @slotchange=${this._handleAssistantMessageActionsSlotChange}
3456
- ></slot>
3457
- </div>
3458
- `;
3459
- }
3460
- _renderRestoreMenu(e, t, a, c = !1) {
3461
- if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== a)) return s;
3462
- let l = `context-menu-trigger-${e.apiMessageId}`;
3463
- return o`
3464
- <div class="assistant-context-menu">
3465
- <button
3466
- id=${l}
3467
- class="assistant-context-menu-trigger"
3468
- type="button"
3469
- aria-label=${n("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3470
- aria-haspopup="menu"
3471
- ?disabled=${c}
3472
- >
3473
- ${i(r)}
3474
- </button>
3475
- <luzmo-overlay
3476
- trigger="${l}@click"
3477
- placement="bottom-end"
3478
- >
3479
- <luzmo-popover>
3480
- <button
3481
- class="assistant-context-menu-item"
3482
- type="button"
3483
- ?disabled=${c}
3484
- @click=${() => this._handleRestoreState(e, t)}
3485
- >
3486
- ${n("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3487
- </button>
3488
- </luzmo-popover>
3489
- </luzmo-overlay>
3490
- </div>
3491
- `;
3492
- }
3493
- _renderMessages() {
3494
- let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = [...e].reverse().find((e) => e.type === "ai")?.id, a = e.filter((e) => !t || e.id !== t.id);
3495
- return a.map((t) => {
3496
- let c = !!t.progress?.children?.length, l = c && this._isLastAiMessageWithProgress(t, a), u = c && (r || n || !l), ee = c ? o`
3497
- <luzmo-progress-steps
3498
- .progress=${t.progress}
3499
- ?condensed=${u}
3500
- collapsed
3501
- no-animate
3502
- size="s"
3503
- ></luzmo-progress-steps>
3504
- ` : s;
3505
- if (t.type === "user") return o`
3506
- <luzmo-chat-message
3507
- avatar-placement="bottom"
3508
- position="right"
3509
- variant="primary"
3510
- size="s"
3511
- >
3512
- ${t.message}
3513
- </luzmo-chat-message>
3514
- `;
3515
- let te = e.indexOf(t), ne = t.isError ? "error" : t.isCancelled ? "cancelled" : "", re = t.isCancelled ? t.message : o`<div class="markdown-content">${d(this._renderMarkdown(t.message))}</div>`;
3516
- return o`
3517
- ${ee}
3518
- <div class="assistant-message-wrapper">
3519
- <div class="assistant-message-body">
3520
- <luzmo-chat-message
3521
- class=${ne}
3522
- role=${t.isError ? "alert" : s}
3523
- avatar-placement="bottom"
3524
- position="left"
3525
- quiet
3526
- size="s"
3527
- >
3528
- ${re}
3529
- </luzmo-chat-message>
3530
-
3531
- ${this._renderRestoreMenu(t, te, i, r)}
3532
- </div>
3533
-
3534
- ${this._renderAssistantMessageActions(t, i)}
3535
- </div>
3536
- `;
3537
- });
3538
- }
3539
- _renderStreamingResponse() {
3540
- let { inflightMessage: e } = this._getRenderState();
3541
- return e?.message ? o`
3542
- <luzmo-chat-message
3543
- avatar-placement="bottom"
3544
- position="left"
3545
- quiet
3546
- size="s"
3547
- >
3548
- <div class="markdown-content">${d(this._renderMarkdown(e.message))}</div>
3549
- </luzmo-chat-message>
3550
- ` : s;
3551
- }
3552
- _renderLoadingMessage() {
3553
- let { isGenerating: e, progress: t, inflightMessage: r } = this._getRenderState();
3554
- if (!e || t?.children?.length || r?.message) return s;
3555
- 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" });
3556
- return o`
3557
- <luzmo-chat-message
3558
- avatar-placement="bottom"
3559
- position="left"
3560
- quiet
3561
- size="s"
3562
- >
3563
- <div class="loading-message" role="status" aria-live="polite">
3564
- <span class="icon-lg">${i(a, { className: "spin" })}</span>
3565
- <span class="loading-message-text">${this.loadingMessage || l}</span>
3566
- </div>
3567
- </luzmo-chat-message>
3568
- `;
3569
- }
3570
- _renderEmptyState() {
3571
- if (this._getRenderState().messages.length > 0) return s;
3572
- let e = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3573
- return o`
3574
- <luzmo-ai-chat-empty-state
3575
- .title=${this.emptyStateTitle || e}
3576
- .subtitle=${t ? this.emptyStateSubtitle : ""}
3577
- .suggestions=${this.emptyStateSuggestions}
3578
- ?disabled=${this.disabled || this._getRenderState().isGenerating}
3579
- @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3580
- ></luzmo-ai-chat-empty-state>
3581
- `;
3582
- }
3583
- render() {
3584
- let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3585
- return o`
3586
- <div class="chat-container" role="region" aria-label=${n("AI Chat", { desc: "Accessible label for AI chat region" })}>
3587
- <div class="chat-messages-container" role="log" aria-live="polite">
3588
- ${this._renderEmptyState()}
3589
- ${this._renderMessages()}
3590
- ${this._renderProgress()}
3591
- ${this._renderStreamingResponse()}
3592
- ${this._renderLoadingMessage()}
3593
- </div>
3594
-
3595
- <luzmo-ai-interaction-textarea
3596
- role="group"
3597
- aria-label=${n("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3598
- .value=${this._textareaValue}
3599
- .selectedDatasets=${e}
3600
- .placeholder=${this.placeholder}
3601
- ?disabled=${this.disabled}
3602
- ?is-generating=${t}
3603
- ?stoppable=${this.stoppable}
3604
- ?hide-dataset-button=${this.hideDatasetButton}
3605
- ?hide-dataset-icons=${this.hideDatasetIcons}
3606
- ?disable-dataset-modification=${this.disableDatasetModification}
3607
- ?hide-selected-datasets=${this.hideSelectedDatasets}
3608
- ?disable-column-mentions=${this.disableColumnMentions}
3609
- ?require-dataset=${this.requireDataset}
3610
- auth-key=${this.authKey}
3611
- auth-token=${this.authToken}
3612
- api-url=${this.apiUrl}
3613
- app-server=${this.appServer}
3614
- ?flag-opendata=${this.flagOpendata}
3615
- @prompt-submitted=${this._handlePromptSubmitted}
3616
- @prompt-stopped=${this._handlePromptStopped}
3617
- @dataset-selected=${this._handleDatasetSelected}
3618
- @dataset-removed=${this._handleDatasetRemoved}
3619
- ></luzmo-ai-interaction-textarea>
3620
- </div>
3621
- `;
3622
- }
3623
- };
3624
- t([l({ type: Array })], $.prototype, "messages", void 0), t([l({
3625
- type: Array,
3626
- attribute: "selected-datasets"
3627
- })], $.prototype, "selectedDatasets", void 0), t([l({ type: String })], $.prototype, "placeholder", void 0), t([l({
3628
- type: Boolean,
3629
- reflect: !0
3630
- })], $.prototype, "disabled", void 0), t([l({
3631
- type: Boolean,
3632
- reflect: !0
3633
- })], $.prototype, "stoppable", void 0), t([l({
3634
- type: Boolean,
3635
- attribute: "show-assistant-context-menu"
3636
- })], $.prototype, "showAssistantContextMenu", void 0), t([l({
3637
- type: String,
3638
- attribute: "auth-key"
3639
- })], $.prototype, "authKey", void 0), t([l({
3640
- type: String,
3641
- attribute: "auth-token"
3642
- })], $.prototype, "authToken", void 0), t([l({
3643
- type: String,
3644
- attribute: "api-url"
3645
- })], $.prototype, "apiUrl", void 0), t([l({
3646
- type: String,
3647
- attribute: "app-server"
3648
- })], $.prototype, "appServer", void 0), t([l({
3649
- type: Boolean,
3650
- attribute: "flag-opendata"
3651
- })], $.prototype, "flagOpendata", void 0), t([l({
3652
- type: Boolean,
3653
- attribute: "hide-dataset-button"
3654
- })], $.prototype, "hideDatasetButton", void 0), t([l({
3655
- type: Boolean,
3656
- attribute: "hide-dataset-icons"
3657
- })], $.prototype, "hideDatasetIcons", void 0), t([l({
3658
- type: Boolean,
3659
- attribute: "disable-dataset-modification"
3660
- })], $.prototype, "disableDatasetModification", void 0), t([l({
3661
- type: Boolean,
3662
- attribute: "hide-selected-datasets"
3663
- })], $.prototype, "hideSelectedDatasets", void 0), t([l({
3664
- type: Boolean,
3665
- attribute: "disable-column-mentions"
3666
- })], $.prototype, "disableColumnMentions", void 0), t([l({
3667
- type: Boolean,
3668
- attribute: "require-dataset"
3669
- })], $.prototype, "requireDataset", void 0), t([l({ type: String })], $.prototype, "agent", void 0), t([l({ type: String })], $.prototype, "task", void 0), t([l({
3670
- type: String,
3671
- attribute: "model-preference"
3672
- })], $.prototype, "modelPreference", void 0), t([l({ attribute: !1 })], $.prototype, "chatSession", void 0), t([l({
3673
- type: String,
3674
- attribute: "conversation-id"
3675
- })], $.prototype, "conversationId", void 0), t([l({
3676
- type: Object,
3677
- attribute: "chart"
3678
- })], $.prototype, "chart", void 0), t([l({ type: Object })], $.prototype, "dashboard", void 0), t([l({
3679
- type: String,
3680
- attribute: "current-screen-mode"
3681
- })], $.prototype, "currentScreenMode", void 0), t([l({
3682
- type: String,
3683
- attribute: "locale-id"
3684
- })], $.prototype, "localeId", void 0), t([l({
3685
- type: String,
3686
- attribute: "timezone-id"
3687
- })], $.prototype, "timezoneId", void 0), t([l({
3688
- type: String,
3689
- attribute: "api-version"
3690
- })], $.prototype, "apiVersion", void 0), t([l({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), t([l({
3691
- type: String,
3692
- attribute: "loading-message"
3693
- })], $.prototype, "loadingMessage", void 0), t([l({
3694
- type: String,
3695
- attribute: "cancelled-message"
3696
- })], $.prototype, "cancelledMessage", void 0), t([l({
3697
- type: String,
3698
- attribute: "initial-prompt"
3699
- })], $.prototype, "initialPrompt", void 0), t([l({
3700
- type: String,
3701
- attribute: "empty-state-title"
3702
- })], $.prototype, "emptyStateTitle", void 0), t([l({
3703
- type: String,
3704
- attribute: "empty-state-subtitle"
3705
- })], $.prototype, "emptyStateSubtitle", void 0), t([l({
3706
- type: Array,
3707
- attribute: !1
3708
- })], $.prototype, "emptyStateSuggestions", void 0), t([u()], $.prototype, "_textareaValue", void 0), t([u()], $.prototype, "_assistantMessageActionsHasContent", void 0);
3709
- //#endregion
3710
- //#region src/components/ai-chat/ai-chat-events.ts
3711
- function Fr(e) {
3712
- return e.recognized === !0;
3713
- }
3714
- //#endregion
3715
- //#region src/components/ai-chat/index.ts
3716
- customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
3717
- //#endregion
3718
- export { vn as C, xn as S, gn as T, En as _, Mr as a, Cn as b, Dr as c, Un as d, jn as f, An as g, On as h, jr as i, Er as l, Dn as m, $ as n, kr as o, Mn as p, Nr as r, Or as s, Fr as t, zn as u, wn as v, _n as w, Sn as x, Tn as y };