@luzmo/analytics-components-kit 1.4.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (615) hide show
  1. package/README.md +12 -2
  2. package/angular/components/ai-chat-empty-state.ts +1 -1
  3. package/angular/components/ai-chat.ts +10 -3
  4. package/angular/components/display-settings-period-over-period.ts +25 -4
  5. package/angular/components/display-settings.ts +24 -3
  6. package/angular/components/item-slot-drop-panel.ts +7 -0
  7. package/angular/components/item-slot-drop.ts +7 -0
  8. package/angular/components/item-slot-picker-panel.ts +7 -0
  9. package/angular/components/item-slot-picker.ts +15 -1
  10. package/angular/components/slot-menu.ts +15 -1
  11. package/angular/esm/components/ai-chat-empty-state.d.ts +1 -1
  12. package/angular/esm/components/ai-chat.d.ts +6 -4
  13. package/angular/esm/components/ai-chat.js +10 -2
  14. package/angular/esm/components/display-settings-period-over-period.d.ts +12 -5
  15. package/angular/esm/components/display-settings-period-over-period.js +29 -5
  16. package/angular/esm/components/display-settings.d.ts +11 -4
  17. package/angular/esm/components/display-settings.js +28 -4
  18. package/angular/esm/components/item-slot-drop-panel.d.ts +4 -1
  19. package/angular/esm/components/item-slot-drop-panel.js +10 -2
  20. package/angular/esm/components/item-slot-drop.d.ts +4 -1
  21. package/angular/esm/components/item-slot-drop.js +10 -2
  22. package/angular/esm/components/item-slot-picker-panel.d.ts +4 -1
  23. package/angular/esm/components/item-slot-picker-panel.js +10 -2
  24. package/angular/esm/components/item-slot-picker.d.ts +7 -2
  25. package/angular/esm/components/item-slot-picker.js +18 -2
  26. package/angular/esm/components/slot-menu.d.ts +7 -2
  27. package/angular/esm/components/slot-menu.js +18 -2
  28. package/angular/package.json +2 -2
  29. package/angular/utils/filters/expressions.d.ts +2 -0
  30. package/angular/utils/slot-state/slot-store.d.ts +3 -8
  31. package/angular/utils/time/period-over-period-condition.const.d.ts +0 -1
  32. package/angular/utils/time/period-over-period-context.d.ts +75 -0
  33. package/angular/utils/time/tests/period-over-period-context.test.d.ts +1 -0
  34. package/components/add-to-dashboard/index.cjs +1 -1
  35. package/components/add-to-dashboard/index.js +1 -1
  36. package/components/{add-to-dashboard-Bu6S3qVz.js → add-to-dashboard-B5egTFre.js} +3 -3
  37. package/components/{add-to-dashboard-BtzTZdjN.cjs → add-to-dashboard-BC5SObl9.cjs} +1 -1
  38. package/components/advanced-options.i18n-CyfRP6Jc.js +43 -0
  39. package/components/advanced-options.i18n-DPTCLyPj.cjs +20 -0
  40. package/components/ai-chat/ai-chat-events.d.ts +6 -2
  41. package/components/ai-chat/ai-chat-request.d.ts +1 -1
  42. package/components/ai-chat/ai-chat.d.ts +9 -2
  43. package/components/ai-chat/ai-prompt-types.d.ts +19 -1
  44. package/components/ai-chat/helpers/interaction-assets.d.ts +9 -0
  45. package/components/ai-chat/helpers/question-template.d.ts +13 -0
  46. package/components/ai-chat/index.cjs +1 -1
  47. package/components/ai-chat/index.d.ts +2 -1
  48. package/components/ai-chat/index.js +3 -3
  49. package/components/ai-chat/session/ai-chat-session-types.d.ts +6 -1
  50. package/components/ai-chat/session/ai-chat-session.d.ts +14 -3
  51. package/components/{ai-chat-CL894viH.js → ai-chat-CZz60W04.js} +1152 -837
  52. package/components/ai-chat-CkN95EAz.cjs +414 -0
  53. package/components/ai-interaction-textarea/index.cjs +1 -1
  54. package/components/ai-interaction-textarea/index.js +1 -1
  55. package/components/{ai-interaction-textarea-BmvVVCmL.cjs → ai-interaction-textarea-NGtzhkEU.cjs} +1 -1
  56. package/components/{ai-interaction-textarea-CnQ2FBc7.js → ai-interaction-textarea-zpSYvzWC.js} +4 -4
  57. package/components/{area-chart-options.config-D99tvt_H.cjs → area-chart-options.config-DkaWRgGR.cjs} +1 -1
  58. package/components/{area-chart-options.config-Dnw8v2CA.js → area-chart-options.config-E5T5GaAt.js} +3 -3
  59. package/components/{area-chart-positioning.config-ygE3-JQW.js → area-chart-positioning.config-CF5TQdQM.js} +1 -1
  60. package/components/{area-chart-positioning.config-BwEs73dl.cjs → area-chart-positioning.config-D3v03RF2.cjs} +1 -1
  61. package/components/{bar-chart-options.config-DHO8grQN.js → bar-chart-options.config-BmuNCcVu.js} +3 -3
  62. package/components/{bar-chart-options.config-BQ-PbucR.cjs → bar-chart-options.config-DujzIJ03.cjs} +1 -1
  63. package/components/{bar-chart-positioning.config-CPdIIPp0.cjs → bar-chart-positioning.config-B2cBwfjg.cjs} +1 -1
  64. package/components/{bar-chart-positioning.config-GjqSe7CO.js → bar-chart-positioning.config-DD3FsbpL.js} +1 -1
  65. package/components/{base-rAte-QzM.js → base-BqwRKT4V.js} +1 -1
  66. package/components/{base-CGDNY_7v.cjs → base-D-bJhYbS.cjs} +1 -1
  67. package/components/{box-plot-options.config-BgiiwSrU.js → box-plot-options.config-BldiKc1W.js} +1 -1
  68. package/components/{box-plot-options.config-BcGisybi.cjs → box-plot-options.config-CTHQiE0y.cjs} +1 -1
  69. package/components/{box-plot-positioning.config-DDUgau2U.js → box-plot-positioning.config-D7dak0lQ.js} +1 -1
  70. package/components/{box-plot-positioning.config-mSIgw923.cjs → box-plot-positioning.config-DyDjp1GB.cjs} +1 -1
  71. package/components/{bubble-chart-options.config-DMk8Yjfk.cjs → bubble-chart-options.config-CIQV2-nD.cjs} +1 -1
  72. package/components/{bubble-chart-options.config-UM9w5tBs.js → bubble-chart-options.config-DfUueHwL.js} +1 -1
  73. package/components/{bubble-chart-positioning.config-CuOxvXYf.cjs → bubble-chart-positioning.config-CBVdzO-2.cjs} +1 -1
  74. package/components/{bubble-chart-positioning.config-C3UubNLh.js → bubble-chart-positioning.config-DjYnqcoE.js} +1 -1
  75. package/components/{bullet-chart-positioning.config-DB1Fmx1d.cjs → bullet-chart-positioning.config-B1tyFrKD.cjs} +1 -1
  76. package/components/{bullet-chart-positioning.config-BuFhsRMP.js → bullet-chart-positioning.config-C1Fy_8N4.js} +1 -1
  77. package/components/{choropleth-map-options.config-Blu0Z2tR.js → choropleth-map-options.config-BPwJyWoW.js} +1 -1
  78. package/components/{choropleth-map-options.config-DwFJ00CS.cjs → choropleth-map-options.config-mBZ3__hO.cjs} +1 -1
  79. package/components/{choropleth-map-positioning.config-6PsCyhsn.js → choropleth-map-positioning.config-BJ4TNZiP.js} +1 -1
  80. package/components/{choropleth-map-positioning.config-fc5IcNoB.cjs → choropleth-map-positioning.config-DaN1GsN7.cjs} +1 -1
  81. package/components/{circle-pack-chart-options.config-DQs-uitJ.js → circle-pack-chart-options.config-BbTBvJRt.js} +1 -1
  82. package/components/{circle-pack-chart-options.config-DMNMYWZX.cjs → circle-pack-chart-options.config-Cz9c2Oxt.cjs} +1 -1
  83. package/components/{circle-pack-chart-positioning.config-DvQfzJ_Z.cjs → circle-pack-chart-positioning.config-C0iRGjcn.cjs} +1 -1
  84. package/components/{circle-pack-chart-positioning.config-DRHNE10H.js → circle-pack-chart-positioning.config-sm_d4gNL.js} +1 -1
  85. package/components/{circular-gauge-positioning.config-CGOX-Vyn.js → circular-gauge-positioning.config-CP_Ihfyd.js} +1 -1
  86. package/components/{circular-gauge-positioning.config-OX1-mPls.cjs → circular-gauge-positioning.config-GgkU8ivx.cjs} +1 -1
  87. package/components/{column-chart-options.config-BYDJTVx6.js → column-chart-options.config-BoIqFqBu.js} +3 -3
  88. package/components/{column-chart-options.config-CyD8V7j4.cjs → column-chart-options.config-fsV6tk3-.cjs} +1 -1
  89. package/components/{column-chart-positioning.config-BVYa1A42.js → column-chart-positioning.config-B4OsEyKU.js} +1 -1
  90. package/components/{column-chart-positioning.config-NbQbSa8P.cjs → column-chart-positioning.config-oub804lP.cjs} +1 -1
  91. package/components/{combination-chart-options.config-Cg3ZEKMe.cjs → combination-chart-options.config-C_fwwZvd.cjs} +1 -1
  92. package/components/{combination-chart-options.config-B3zsSUFx.js → combination-chart-options.config-Oks0enDz.js} +3 -3
  93. package/components/{combination-chart-positioning.config-B7DtfzCV.cjs → combination-chart-positioning.config-BeEC_NMJ.cjs} +1 -1
  94. package/components/{combination-chart-positioning.config-yHAgveni.js → combination-chart-positioning.config-BxNKTTby.js} +1 -1
  95. package/components/{conditional-number-positioning.config-BZS99jTT.cjs → conditional-number-positioning.config-B7F96ylg.cjs} +1 -1
  96. package/components/{conditional-number-positioning.config-DhixJEpv.js → conditional-number-positioning.config-xMGIw6c7.js} +1 -1
  97. package/components/data-field/index.cjs +1 -1
  98. package/components/data-field/index.js +1 -1
  99. package/components/{data-field-BORlpZZk.cjs → data-field-BxIuPFX_.cjs} +1 -1
  100. package/components/{data-field-B9466d0w.js → data-field-D03w2T6D.js} +3 -3
  101. package/components/data-field-level/index.cjs +1 -1
  102. package/components/data-field-level/index.js +1 -1
  103. package/components/{data-field-level-DOEYwcvM.cjs → data-field-level-BdWZsIny.cjs} +1 -1
  104. package/components/{data-field-level-GrX6yhPV.js → data-field-level-C-C9RCNf.js} +1 -1
  105. package/components/data-field-panel/index.cjs +1 -1
  106. package/components/data-field-panel/index.js +1 -1
  107. package/components/{data-field-panel-BedJ9V2r.js → data-field-panel-DLe4FvTg.js} +3 -3
  108. package/components/{data-field-panel-DmMkAYAz.cjs → data-field-panel-kGncuIuq.cjs} +1 -1
  109. package/components/data-fields-select/index.cjs +1 -1
  110. package/components/data-fields-select/index.js +1 -1
  111. package/components/{data-fields-select-BOqmoE7n.cjs → data-fields-select-CSP6pX9J.cjs} +1 -1
  112. package/components/{data-fields-select-af1HZLWS.js → data-fields-select-DP80Miah.js} +1 -1
  113. package/components/dataset-selector-list/index.cjs +1 -1
  114. package/components/dataset-selector-list/index.js +1 -1
  115. package/components/{dataset-selector-list-BzI8n_dB.js → dataset-selector-list-D2UcUaOx.js} +1 -1
  116. package/components/{dataset-selector-list-CmZaj20L.cjs → dataset-selector-list-DGWiCqpf.cjs} +1 -1
  117. package/components/dataset-selector-row/index.cjs +1 -1
  118. package/components/dataset-selector-row/index.js +1 -1
  119. package/components/{dataset-selector-row-D_7iBmdm.js → dataset-selector-row-7WNwyR9L.js} +3 -3
  120. package/components/{dataset-selector-row-mOGioXLM.cjs → dataset-selector-row-Vfh7jDjW.cjs} +1 -1
  121. package/components/{de-AOtjGNGZ.js → de-BbXtB6N5.js} +19 -4
  122. package/components/de-BfHCg6-Y.cjs +20 -0
  123. package/components/display-settings/display-settings.d.ts +11 -3
  124. package/components/display-settings/index.cjs +1 -1
  125. package/components/display-settings/index.js +1 -1
  126. package/components/{display-settings-Qwp9oJo6.js → display-settings-Bqq9iJ3L.js} +86 -62
  127. package/components/display-settings-CG-qtz9m.cjs +146 -0
  128. package/components/display-settings-binning/index.cjs +1 -1
  129. package/components/display-settings-binning/index.js +1 -1
  130. package/components/{display-settings-binning-IPVCvx8a.js → display-settings-binning-C2Jlf18P.js} +2 -2
  131. package/components/{display-settings-binning-D5zhoC7D.cjs → display-settings-binning-Dx9zEbDo.cjs} +1 -1
  132. package/components/display-settings-datetime/index.cjs +1 -1
  133. package/components/display-settings-datetime/index.js +1 -1
  134. package/components/{display-settings-datetime-t70VEfHe.cjs → display-settings-datetime-B6LMQZOW.cjs} +1 -1
  135. package/components/{display-settings-datetime-DgBBSYfC.js → display-settings-datetime-B6okY4hC.js} +2 -2
  136. package/components/display-settings-grand-totals/index.cjs +1 -1
  137. package/components/display-settings-grand-totals/index.js +1 -1
  138. package/components/{display-settings-grand-totals-C_Fzk7oV.cjs → display-settings-grand-totals-D1Fi1qIx.cjs} +1 -1
  139. package/components/{display-settings-grand-totals-AFtKeeeG.js → display-settings-grand-totals-_v0iGpHZ.js} +2 -2
  140. package/components/display-settings-numeric/index.cjs +1 -1
  141. package/components/display-settings-numeric/index.js +1 -1
  142. package/components/{display-settings-numeric-BF8BA5MH.cjs → display-settings-numeric-DbcsMeEN.cjs} +1 -1
  143. package/components/{display-settings-numeric-DeuXT1UR.js → display-settings-numeric-G2avidxv.js} +2 -2
  144. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +20 -10
  145. package/components/display-settings-period-over-period/helpers/constants.d.ts +0 -23
  146. package/components/display-settings-period-over-period/index.cjs +1 -1
  147. package/components/display-settings-period-over-period/index.js +1 -1
  148. package/components/{display-settings-period-over-period-CzxnyVF7.js → display-settings-period-over-period-DjB6sYEF.js} +130 -169
  149. package/components/display-settings-period-over-period-ikA0oE0C.cjs +155 -0
  150. package/components/donut-chart-options.config-B47Y1jhM.cjs +20 -0
  151. package/components/{donut-chart-options.config-B2vxfMyh.js → donut-chart-options.config-C__JfD3B.js} +32 -45
  152. package/components/{donut-chart-options.de-AXRfsiXW.cjs → donut-chart-options.de-Bsze2Gb5.cjs} +1 -1
  153. package/components/{donut-chart-options.de-DgNmBJiQ.js → donut-chart-options.de-Cft1Ppg0.js} +1 -2
  154. package/components/{donut-chart-options.en-aZqu2oEV.cjs → donut-chart-options.en-D3F9v0nN.cjs} +1 -1
  155. package/components/{donut-chart-options.en-BXwxTVpB.js → donut-chart-options.en-DZbap5Oi.js} +1 -2
  156. package/components/{donut-chart-options.es-7WgxuaDe.cjs → donut-chart-options.es-Cm0HGP62.cjs} +1 -1
  157. package/components/{donut-chart-options.es-DW_q5HeE.js → donut-chart-options.es-gM85ij3W.js} +1 -2
  158. package/components/{donut-chart-options.fr-QU3pGELZ.js → donut-chart-options.fr-Tgs8r0XZ.js} +1 -2
  159. package/components/{donut-chart-options.fr-C0Z8xEyF.cjs → donut-chart-options.fr-VSZoCY5q.cjs} +1 -1
  160. package/components/{donut-chart-options.nl-aKVLbRJY.cjs → donut-chart-options.nl-BkwPxEkq.cjs} +1 -1
  161. package/components/{donut-chart-options.nl-D_cgYVAQ.js → donut-chart-options.nl-SfAF0ycW.js} +1 -2
  162. package/components/{donut-chart-positioning.config-Bu1jZwtJ.cjs → donut-chart-positioning.config-BxJLjvJI.cjs} +1 -1
  163. package/components/{donut-chart-positioning.config-C0jkFWni.js → donut-chart-positioning.config-Doti4TgR.js} +1 -1
  164. package/components/{es-CYhv03uu.js → es-DRdklNAj.js} +19 -4
  165. package/components/es-Djk6AXOA.cjs +20 -0
  166. package/components/{evolution-number-positioning.config-DD8HBFtv.js → evolution-number-positioning.config-DHgkhRjt.js} +1 -1
  167. package/components/{evolution-number-positioning.config-DbH1-ODd.cjs → evolution-number-positioning.config-DeJkgT2e.cjs} +1 -1
  168. package/components/expressions-B4TetNaL.js +314 -0
  169. package/components/expressions-_KjBCqb6.cjs +20 -0
  170. package/components/filter-expression-picker/index.cjs +1 -1
  171. package/components/filter-expression-picker/index.js +1 -1
  172. package/components/filter-expression-picker-BuXFbOXQ.js +146 -0
  173. package/components/filter-expression-picker-Cta3MMId.cjs +40 -0
  174. package/components/filter-item/index.cjs +1 -1
  175. package/components/filter-item/index.js +1 -1
  176. package/components/filter-item-DENHWF-1.cjs +111 -0
  177. package/components/{filter-item-QJ3sDlmG.js → filter-item-DXkoGth1.js} +170 -169
  178. package/components/filter-parameter-picker/index.cjs +1 -1
  179. package/components/filter-parameter-picker/index.js +1 -1
  180. package/components/{filter-parameter-picker-DjQVFIfg.cjs → filter-parameter-picker-CYb_At4A.cjs} +1 -1
  181. package/components/{filter-parameter-picker-C8qwIo_H.js → filter-parameter-picker-Dhdrwokt.js} +1 -1
  182. package/components/filter-value-picker/index.cjs +1 -1
  183. package/components/filter-value-picker/index.js +1 -1
  184. package/components/{filter-value-picker-DIYyMymr.js → filter-value-picker-Df2otXtB.js} +4 -4
  185. package/components/{filter-value-picker-CMNxLzj7.cjs → filter-value-picker-IBplK-ue.cjs} +1 -1
  186. package/components/filter-value-picker-datetime/index.cjs +1 -1
  187. package/components/filter-value-picker-datetime/index.js +1 -1
  188. package/components/{filter-value-picker-datetime-DKblyQrs.js → filter-value-picker-datetime-Cxj-X50F.js} +34 -28
  189. package/components/filter-value-picker-datetime-DmJ6vrr8.cjs +53 -0
  190. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  191. package/components/filter-value-picker-hierarchy/index.js +1 -1
  192. package/components/{filter-value-picker-hierarchy-CXPC_4MU.cjs → filter-value-picker-hierarchy-BAK4urti.cjs} +1 -1
  193. package/components/{filter-value-picker-hierarchy-IswtY6Qa.js → filter-value-picker-hierarchy-JUxA6aOK.js} +2 -2
  194. package/components/filter-value-picker-numeric/index.cjs +1 -1
  195. package/components/filter-value-picker-numeric/index.js +1 -1
  196. package/components/{filter-value-picker-numeric-C7_-Fpol.cjs → filter-value-picker-numeric-Bf7iFwmp.cjs} +1 -1
  197. package/components/{filter-value-picker-numeric-DlFnGZ2O.js → filter-value-picker-numeric-MEFZbKsF.js} +1 -1
  198. package/components/filters/index.cjs +1 -1
  199. package/components/filters/index.js +1 -1
  200. package/components/{filters-LDXhe1Bp.cjs → filters-BLd6si6W.cjs} +1 -1
  201. package/components/{filters-DEpmh9Nj.js → filters-CYSKF57z.js} +2 -2
  202. package/components/formula/index.cjs +1 -1
  203. package/components/formula/index.js +1 -1
  204. package/components/{formula-WqOlEQ5o.js → formula-DPYHw2sr.js} +2 -2
  205. package/components/{formula-codemirror-BTYlGSxE.cjs → formula-codemirror-CZpISqCT.cjs} +1 -1
  206. package/components/{formula-codemirror-bpEb3M2G.js → formula-codemirror-DrcDvAal.js} +4 -4
  207. package/components/{formula-display-store-QU-B6xp9.js → formula-display-store-fFSd4okF.js} +3 -3
  208. package/components/{formula-display-store-D7fzKNfW.cjs → formula-display-store-zZIC2bm-.cjs} +1 -1
  209. package/components/formula-editor/index.cjs +1 -1
  210. package/components/formula-editor/index.js +3 -3
  211. package/components/{formula-editor-BbyDf0vM.js → formula-editor-C9ECzSM6.js} +5 -5
  212. package/components/{formula-editor-D_NRhjUI.cjs → formula-editor-CDx-sZrG.cjs} +1 -1
  213. package/components/formula-field/index.cjs +1 -1
  214. package/components/formula-field/index.js +1 -1
  215. package/components/{formula-field-DSSpI8LB.cjs → formula-field-CV3FLzM2.cjs} +1 -1
  216. package/components/{formula-field-BT9K_W6Q.js → formula-field-DZLfK3cs.js} +1 -1
  217. package/components/{formula-input-base-CQc1OU9G.js → formula-input-base-CTuUw8IY.js} +1 -1
  218. package/components/{formula-input-base-BoWiH97v.cjs → formula-input-base-DN9aVHrY.cjs} +1 -1
  219. package/components/{formula-CXrr9wJZ.cjs → formula-x9mA6jDv.cjs} +1 -1
  220. package/components/{fr-DKAoGI_6.js → fr-C6af3ed2.js} +19 -4
  221. package/components/fr-cuXTTJ19.cjs +20 -0
  222. package/components/{funnel-chart-options.config-W83a8ukL.js → funnel-chart-options.config-AupTvjpk.js} +27 -84
  223. package/components/funnel-chart-options.config-DLRKgBpU.cjs +20 -0
  224. package/components/{funnel-chart-options.de-B2f_xxvV.cjs → funnel-chart-options.de-BXnQCtlb.cjs} +1 -1
  225. package/components/{funnel-chart-options.de-CLMiAr0m.js → funnel-chart-options.de-CRjaoeDf.js} +0 -1
  226. package/components/{funnel-chart-options.en-Pu8yU7Yz.js → funnel-chart-options.en-B0moabZE.js} +0 -1
  227. package/components/{funnel-chart-options.en-Cdvkged9.cjs → funnel-chart-options.en-BxEAM67L.cjs} +1 -1
  228. package/components/{funnel-chart-options.es-CrAp7hOK.cjs → funnel-chart-options.es-B88ZJAvI.cjs} +1 -1
  229. package/components/{funnel-chart-options.es-BPjGIJ7s.js → funnel-chart-options.es-DVVoRoYc.js} +0 -1
  230. package/components/{funnel-chart-options.fr-0RxiqeZg.cjs → funnel-chart-options.fr-B79JhoL2.cjs} +1 -1
  231. package/components/{funnel-chart-options.fr-CtWjGa4q.js → funnel-chart-options.fr-DvQC8k_c.js} +0 -1
  232. package/components/{funnel-chart-options.nl-r_wRg5qR.cjs → funnel-chart-options.nl-CnHVcvGk.cjs} +1 -1
  233. package/components/{funnel-chart-options.nl-2TPEy_CB.js → funnel-chart-options.nl-DJhjX1Pw.js} +0 -1
  234. package/components/{funnel-chart-positioning.config-Dx9E5eiW.cjs → funnel-chart-positioning.config-BZJ5g_XG.cjs} +1 -1
  235. package/components/{funnel-chart-positioning.config-Dbex7egf.js → funnel-chart-positioning.config-y6yFY7jd.js} +1 -1
  236. package/components/{get-dataset-name-C3Sc0hZ0.cjs → get-dataset-name-DddRDGDV.cjs} +1 -1
  237. package/components/{get-dataset-name-BArAzBu2.js → get-dataset-name-OPlPwcJU.js} +1 -1
  238. package/components/{groupings-DMWmtE5F.cjs → groupings-BnI5_4A1.cjs} +1 -1
  239. package/components/{groupings-DXJS4XIU.js → groupings-D_Ri_Z-t.js} +1 -1
  240. package/components/{guidelines-options.config-D-ZuReR_.cjs → guidelines-options.config-BgARZ-fs.cjs} +1 -1
  241. package/components/{guidelines-options.config-DVZrOa3v.js → guidelines-options.config-BqAYiMSF.js} +1 -1
  242. package/components/{heat-map-positioning.config-Bzg0DG60.cjs → heat-map-positioning.config-Cgg-qkcr.cjs} +1 -1
  243. package/components/{heat-map-positioning.config-D4T7PQzN.js → heat-map-positioning.config-DN75-r9r.js} +1 -1
  244. package/components/{heat-table-options.config-CMWWTeyo.js → heat-table-options.config-BL8x1qwt.js} +20 -7
  245. package/components/heat-table-options.config-iEHucwDf.cjs +20 -0
  246. package/components/{heat-table-positioning.config-Cj6LlLe3.cjs → heat-table-positioning.config-C2QPQURh.cjs} +1 -1
  247. package/components/{heat-table-positioning.config-DVQiJfC4.js → heat-table-positioning.config-CHxtZe-0.js} +1 -1
  248. package/components/{hexbin-map-positioning.config-csNrvMwp.js → hexbin-map-positioning.config-B1H1Z6Os.js} +1 -1
  249. package/components/{hexbin-map-positioning.config-ChoCCure.cjs → hexbin-map-positioning.config-BI-RVV35.cjs} +1 -1
  250. package/components/index.cjs +1 -1
  251. package/components/index.js +69 -69
  252. package/components/interactive-viz-item/index.cjs +1 -1
  253. package/components/interactive-viz-item/index.js +1 -1
  254. package/components/{interactive-viz-item-Cc3Ix95e.js → interactive-viz-item-CngeQ579.js} +2 -2
  255. package/components/{interactive-viz-item-SF12d97t.cjs → interactive-viz-item-qrC0vC2O.cjs} +1 -1
  256. package/components/interactivity-options.config-AKgaj2vC.js +131 -0
  257. package/components/interactivity-options.config-CkRDoCWd.cjs +20 -0
  258. package/components/interactivity-options.i18n-Cv5w1nSS.cjs +20 -0
  259. package/components/{interactivity-options.i18n-DY947PNz.js → interactivity-options.i18n-DmrqdhYW.js} +35 -5
  260. package/components/item-grid/index.cjs +1 -1
  261. package/components/item-grid/index.js +2 -2
  262. package/components/{item-grid-DveTRc7D.cjs → item-grid-C-v9kDvq.cjs} +1 -1
  263. package/components/{item-grid-DscQOFMu.js → item-grid-DzR5sfDM.js} +1 -1
  264. package/components/item-grid-item-actions-menu/index.cjs +1 -1
  265. package/components/item-grid-item-actions-menu/index.js +1 -1
  266. package/components/{item-grid-item-actions-menu-B1bKfagj.js → item-grid-item-actions-menu-DJJESWL6.js} +1 -1
  267. package/components/{item-grid-item-actions-menu-xRrT9dkY.cjs → item-grid-item-actions-menu-HIlcOhJA.cjs} +1 -1
  268. package/components/item-option/index.cjs +1 -1
  269. package/components/item-option/index.js +1 -1
  270. package/components/{item-option-DKLRnicU.js → item-option-B6h4E5qR.js} +49 -43
  271. package/components/item-option-action-button-group/index.cjs +1 -1
  272. package/components/item-option-action-button-group/index.js +1 -1
  273. package/components/{item-option-action-button-group-Cpd_CNn-.js → item-option-action-button-group-Bc3bJQUS.js} +1 -1
  274. package/components/{item-option-action-button-group-BMgUwveA.cjs → item-option-action-button-group-CQHpvC5O.cjs} +1 -1
  275. package/components/{item-option-base-BMy6dWbc.cjs → item-option-base-6msESUhx.cjs} +1 -1
  276. package/components/{item-option-base-BfHciede.js → item-option-base-XB_1V6QM.js} +1 -1
  277. package/components/item-option-color-palette-picker/index.cjs +1 -1
  278. package/components/item-option-color-palette-picker/index.js +1 -1
  279. package/components/{item-option-color-palette-picker-8KFuRU1D.js → item-option-color-palette-picker-BYjb4ygk.js} +1 -1
  280. package/components/{item-option-color-palette-picker-CnM1Gi6o.cjs → item-option-color-palette-picker-MhFJgurt.cjs} +1 -1
  281. package/components/item-option-color-picker/index.cjs +1 -1
  282. package/components/item-option-color-picker/index.js +1 -1
  283. package/components/{item-option-color-picker-CNW7GsCO.cjs → item-option-color-picker-CLLWV2M-.cjs} +1 -1
  284. package/components/{item-option-color-picker-DDvsY7hV.js → item-option-color-picker-Dq_NwAn1.js} +1 -1
  285. package/components/item-option-color-range/index.cjs +1 -1
  286. package/components/item-option-color-range/index.js +1 -1
  287. package/components/{item-option-color-range-BqSbuSZh.cjs → item-option-color-range-DlCi_o72.cjs} +1 -1
  288. package/components/{item-option-color-range-FQduqtz3.js → item-option-color-range-abi_vblh.js} +1 -1
  289. package/components/item-option-guidelines/index.cjs +1 -1
  290. package/components/item-option-guidelines/index.js +1 -1
  291. package/components/{item-option-guidelines-k5DwMONo.js → item-option-guidelines-8LmcJ04U.js} +3 -3
  292. package/components/{item-option-guidelines-z9BsGR-l.cjs → item-option-guidelines-Q2M8xSYS.cjs} +1 -1
  293. package/components/item-option-multi-language-field/index.cjs +1 -1
  294. package/components/item-option-multi-language-field/index.js +1 -1
  295. package/components/{item-option-multi-language-field-CqtBl3gM.js → item-option-multi-language-field-6FBm3Xr3.js} +1 -1
  296. package/components/{item-option-multi-language-field-DM2PENxV.cjs → item-option-multi-language-field-Dq3j7XYw.cjs} +1 -1
  297. package/components/item-option-number-field/index.cjs +1 -1
  298. package/components/item-option-number-field/index.js +1 -1
  299. package/components/{item-option-number-field-BgQRhFj3.js → item-option-number-field-CPgwUGTR.js} +1 -1
  300. package/components/{item-option-number-field-Cw2ofJL7.cjs → item-option-number-field-CZSVb9wv.cjs} +1 -1
  301. package/components/item-option-panel/index.cjs +1 -1
  302. package/components/item-option-panel/index.js +1 -1
  303. package/components/{item-option-panel-CU51qvgV.cjs → item-option-panel-B5ZKbaLl.cjs} +1 -1
  304. package/components/{item-option-panel-BLXWIbjX.js → item-option-panel-BZRyyc-9.js} +2 -2
  305. package/components/item-option-picker/index.cjs +1 -1
  306. package/components/item-option-picker/index.js +1 -1
  307. package/components/{item-option-picker-EJlc0bmj.cjs → item-option-picker-DMLk4Uq_.cjs} +1 -1
  308. package/components/{item-option-picker-DkAENDES.js → item-option-picker-mU6X3bbk.js} +1 -1
  309. package/components/item-option-position-picker/index.cjs +1 -1
  310. package/components/item-option-position-picker/index.js +1 -1
  311. package/components/{item-option-position-picker-DX7lLZKO.js → item-option-position-picker-B4AuC_73.js} +1 -1
  312. package/components/{item-option-position-picker-Ba7cBvlL.cjs → item-option-position-picker-BTH6KixE.cjs} +1 -1
  313. package/components/item-option-positions-number-field/index.cjs +1 -1
  314. package/components/item-option-positions-number-field/index.js +1 -1
  315. package/components/{item-option-positions-number-field-Bqfg0MJm.js → item-option-positions-number-field-BTFGhhrb.js} +1 -1
  316. package/components/{item-option-positions-number-field-BQ8gFOAn.cjs → item-option-positions-number-field-Dz0mpPSk.cjs} +1 -1
  317. package/components/item-option-radio-button-group/index.cjs +1 -1
  318. package/components/item-option-radio-button-group/index.js +1 -1
  319. package/components/{item-option-radio-button-group-Bk7VQlpx.js → item-option-radio-button-group-CmYFScry.js} +1 -1
  320. package/components/{item-option-radio-button-group-2hX-E2WV.cjs → item-option-radio-button-group-EBLjtMVd.cjs} +1 -1
  321. package/components/item-option-slider/index.cjs +1 -1
  322. package/components/item-option-slider/index.js +1 -1
  323. package/components/{item-option-slider-BKtJfL3D.js → item-option-slider-C7RfBary.js} +1 -1
  324. package/components/{item-option-slider-Kz2eFBql.cjs → item-option-slider-DRXTGW9W.cjs} +1 -1
  325. package/components/item-option-switch/index.cjs +1 -1
  326. package/components/item-option-switch/index.js +1 -1
  327. package/components/{item-option-switch-BUteU1mc.cjs → item-option-switch-D-FbXXRl.cjs} +1 -1
  328. package/components/{item-option-switch-cGWccE79.js → item-option-switch-D-MY6Uqv.js} +1 -1
  329. package/components/{item-option-DpLdospV.cjs → item-option-t_LsqjoR.cjs} +1 -1
  330. package/components/item-option-text-field/index.cjs +1 -1
  331. package/components/item-option-text-field/index.js +1 -1
  332. package/components/{item-option-text-field-Dy8pqVKJ.js → item-option-text-field-BR2V4ro2.js} +1 -1
  333. package/components/{item-option-text-field-BC9fR-yW.cjs → item-option-text-field-Cn-9lblu.cjs} +1 -1
  334. package/components/item-options-configs.cjs +1 -1
  335. package/components/item-options-configs.js +21 -21
  336. package/components/item-slot-drop/index.cjs +1 -1
  337. package/components/item-slot-drop/index.js +1 -1
  338. package/components/item-slot-drop/item-slot-drop.d.ts +2 -0
  339. package/components/item-slot-drop-7v-n-e1y.cjs +93 -0
  340. package/components/{item-slot-drop-CwZT8bTP.js → item-slot-drop-Db-tVAud.js} +69 -60
  341. package/components/item-slot-drop-panel/index.cjs +1 -1
  342. package/components/item-slot-drop-panel/index.js +1 -1
  343. package/components/item-slot-drop-panel/item-slot-drop-panel.d.ts +2 -0
  344. package/components/{item-slot-drop-panel-o5UdVrY_.js → item-slot-drop-panel-D-g4H1Rp.js} +117 -107
  345. package/components/item-slot-drop-panel-D2_1yWHs.cjs +58 -0
  346. package/components/item-slot-picker/index.cjs +1 -1
  347. package/components/item-slot-picker/index.js +1 -1
  348. package/components/item-slot-picker/item-slot-picker.d.ts +5 -0
  349. package/components/item-slot-picker-9afJORSK.cjs +160 -0
  350. package/components/{item-slot-picker-ilmmb0-8.js → item-slot-picker-BHtj0dRB.js} +109 -101
  351. package/components/item-slot-picker-panel/index.cjs +1 -1
  352. package/components/item-slot-picker-panel/index.js +1 -1
  353. package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +2 -0
  354. package/components/{item-slot-picker-panel-DprM9Rli.js → item-slot-picker-panel-CIxGfaz3.js} +73 -62
  355. package/components/item-slot-picker-panel-CeOtdtMc.cjs +86 -0
  356. package/components/{kpi-positioning.config-mQuxf1ke.js → kpi-positioning.config-DDTfIZ_h.js} +1 -1
  357. package/components/{kpi-positioning.config-DIYWUwID.cjs → kpi-positioning.config-t9SxIqga.cjs} +1 -1
  358. package/components/legend-options.i18n-0hyeyskh.js +78 -0
  359. package/components/legend-options.i18n-CUZeW5rR.cjs +20 -0
  360. package/components/{line-chart-options.config-Opoz2jPk.js → line-chart-options.config-BdhyECMS.js} +2 -2
  361. package/components/{line-chart-options.config-DOGbeJhy.cjs → line-chart-options.config-CVtYVap1.cjs} +1 -1
  362. package/components/{line-chart-positioning.config-DqjrWmxJ.js → line-chart-positioning.config-BZoKaJVO.js} +1 -1
  363. package/components/{line-chart-positioning.config-DK9PycZ_.cjs → line-chart-positioning.config-DfTMlBBL.cjs} +1 -1
  364. package/components/{localized-mixin-EoNvtTBG.cjs → localized-mixin-BQowFGQK.cjs} +1 -1
  365. package/components/{localized-mixin-FPDNaZhb.js → localized-mixin-BdXrQldH.js} +1 -1
  366. package/components/{marker-map-positioning.config-BB51kE8O.cjs → marker-map-positioning.config-BsPUa8Ui.cjs} +1 -1
  367. package/components/{marker-map-positioning.config-CA08hZcp.js → marker-map-positioning.config-BtuIUPHT.js} +1 -1
  368. package/components/nl-B4gqLp1F.cjs +20 -0
  369. package/components/{nl-DNWGcGqO.js → nl-Chzh7kM2.js} +19 -4
  370. package/components/{ohlc-chart-options.config-CvlHm6hy.cjs → ohlc-chart-options.config-BQJWhXv7.cjs} +1 -1
  371. package/components/{ohlc-chart-options.config-C-TCUtOt.js → ohlc-chart-options.config-MYqetK62.js} +3 -3
  372. package/components/{ohlc-chart-positioning.config-CDL2vGsl.cjs → ohlc-chart-positioning.config-D1X1U96F.cjs} +1 -1
  373. package/components/{ohlc-chart-positioning.config-BqFHD1oj.js → ohlc-chart-positioning.config-Ny3U8zgV.js} +1 -1
  374. package/components/{parallel-coordinates-plot-options.config-UHrCS9q5.cjs → parallel-coordinates-plot-options.config-B4v6BtAz.cjs} +1 -1
  375. package/components/{parallel-coordinates-plot-options.config-C3HTFBTl.js → parallel-coordinates-plot-options.config-CN4p7QDD.js} +1 -1
  376. package/components/{parallel-coordinates-plot-positioning.config-Cc-ooVxV.cjs → parallel-coordinates-plot-positioning.config-BI6JMiBT.cjs} +1 -1
  377. package/components/{parallel-coordinates-plot-positioning.config-D6IuAk_K.js → parallel-coordinates-plot-positioning.config-Curf1XoL.js} +1 -1
  378. package/components/{period-over-period-condition.const-C1NZ9Bkp.cjs → period-over-period-condition.const-BOI8gxO1.cjs} +1 -1
  379. package/components/{period-over-period-condition.const-AE_2h-9O.js → period-over-period-condition.const-C9cn5m-o.js} +1 -2
  380. package/components/period-over-period-context-CeZHXSs0.js +84 -0
  381. package/components/period-over-period-context-Cx4pRKBn.cjs +20 -0
  382. package/components/{pivot-table-options.config-5pYvqc35.cjs → pivot-table-options.config-1DApg-wg.cjs} +1 -1
  383. package/components/{pivot-table-options.config-BlrguysB.js → pivot-table-options.config-DhzyxHTP.js} +1 -1
  384. package/components/{pivot-table-positioning.config-DDwXH70O.js → pivot-table-positioning.config-BoN7P8bs.js} +1 -1
  385. package/components/{pivot-table-positioning.config-DvwKNjoD.cjs → pivot-table-positioning.config-BsyGrzvX.cjs} +1 -1
  386. package/components/{pyramid-chart-options.config-CAC6cMmt.cjs → pyramid-chart-options.config-CNOOucJE.cjs} +1 -1
  387. package/components/{pyramid-chart-options.config-0Qf1naIx.js → pyramid-chart-options.config-DVBuswjg.js} +1 -1
  388. package/components/{pyramid-chart-positioning.config-DWou2jnm.js → pyramid-chart-positioning.config-D9Z40IzT.js} +1 -1
  389. package/components/{pyramid-chart-positioning.config-10BYkgv8.cjs → pyramid-chart-positioning.config-DdjlJjFb.cjs} +1 -1
  390. package/components/{radar-chart-positioning.config-B0O8vn-B.js → radar-chart-positioning.config-C16aywvy.js} +1 -1
  391. package/components/{radar-chart-positioning.config-Dg41uYWY.cjs → radar-chart-positioning.config-DARMkDIv.cjs} +1 -1
  392. package/components/{route-map-positioning.config-C1iUodTh.js → route-map-positioning.config-BmuPL5DK.js} +1 -1
  393. package/components/{route-map-positioning.config-DlM6xJTP.cjs → route-map-positioning.config-CTtpis1h.cjs} +1 -1
  394. package/components/{sankey-diagram-options.config-Y6jRK3wk.js → sankey-diagram-options.config-B86iq8pI.js} +1 -1
  395. package/components/{sankey-diagram-options.config-B8aHKfFt.cjs → sankey-diagram-options.config-mIgABANw.cjs} +1 -1
  396. package/components/{sankey-diagram-positioning.config-5EXNleL5.js → sankey-diagram-positioning.config-BhvJe1IX.js} +1 -1
  397. package/components/{sankey-diagram-positioning.config-BSu02GJ1.cjs → sankey-diagram-positioning.config-aLwXoVGA.cjs} +1 -1
  398. package/components/{scatter-plot-options.config-DhOGahRc.cjs → scatter-plot-options.config-BZVF4r3f.cjs} +1 -1
  399. package/components/{scatter-plot-options.config-DvGofFzR.js → scatter-plot-options.config-ChqZzslY.js} +2 -2
  400. package/components/{scatter-plot-positioning.config-CuyJUmiV.cjs → scatter-plot-positioning.config-CYy1jfz5.cjs} +1 -1
  401. package/components/{scatter-plot-positioning.config-nDbkUUqa.js → scatter-plot-positioning.config-twVc5wWl.js} +1 -1
  402. package/components/{set-locale-m257lVi3.js → set-locale-BeAF7qn4.js} +4 -4
  403. package/components/{set-locale-BkMmLcm6.cjs → set-locale-DvJ1yA4S.cjs} +1 -1
  404. package/components/{slicer-filter-positioning.config-BT5aNPHe.js → slicer-filter-positioning.config-WofHaYJx.js} +1 -1
  405. package/components/{slicer-filter-positioning.config-D7ZLoaGu.cjs → slicer-filter-positioning.config-_frD2LDr.cjs} +1 -1
  406. package/components/slot-menu/index.cjs +1 -1
  407. package/components/slot-menu/index.js +1 -1
  408. package/components/slot-menu/slot-menu.d.ts +6 -0
  409. package/components/slot-menu-B-7MzAd6.cjs +71 -0
  410. package/components/{slot-menu-BB_nJWZx.js → slot-menu-DhGC4yoA.js} +88 -97
  411. package/components/slot-menu-list/index.cjs +1 -1
  412. package/components/slot-menu-list/index.js +1 -1
  413. package/components/{slot-menu-list-C2nLODML.cjs → slot-menu-list-CiJK2fNu.cjs} +1 -1
  414. package/components/{slot-menu-list-3QkrOWgG.js → slot-menu-list-SoDeiZE1.js} +1 -1
  415. package/components/sort-options.config-CiPFyoxx.cjs +20 -0
  416. package/components/sort-options.config-CiZo1AEh.js +104 -0
  417. package/components/{speedometer-chart-positioning.config-CO1MtdU3.js → speedometer-chart-positioning.config-BLXUOOc_.js} +1 -1
  418. package/components/{speedometer-chart-positioning.config-BtDD3TiP.cjs → speedometer-chart-positioning.config-CkTqU3qn.cjs} +1 -1
  419. package/components/{spike-map-positioning.config-BhKVutm1.cjs → spike-map-positioning.config-DmLlz8ZD.cjs} +1 -1
  420. package/components/{spike-map-positioning.config-CQkcCdHD.js → spike-map-positioning.config-pgedE0nh.js} +1 -1
  421. package/components/{strip-plot-positioning.config-DEyOR-yS.js → strip-plot-positioning.config-B4sVlI82.js} +1 -1
  422. package/components/{strip-plot-positioning.config-CEYgtT13.cjs → strip-plot-positioning.config-CtctjJwh.cjs} +1 -1
  423. package/components/sunburst-chart-options.config-DNkL0pN4.cjs +20 -0
  424. package/components/{sunburst-chart-options.config-DVETeZFc.js → sunburst-chart-options.config-Zg42LwmT.js} +26 -83
  425. package/components/{sunburst-chart-options.de-DO65RQI_.cjs → sunburst-chart-options.de-BIJ2Njvn.cjs} +1 -1
  426. package/components/{sunburst-chart-options.de-B0mIITIx.js → sunburst-chart-options.de-BaLziTTh.js} +2 -2
  427. package/components/{sunburst-chart-options.en-C3IkkUBW.cjs → sunburst-chart-options.en-C2P4VIQq.cjs} +1 -1
  428. package/components/{sunburst-chart-options.en-LoUPN34r.js → sunburst-chart-options.en-CxWuNug0.js} +2 -2
  429. package/components/{sunburst-chart-options.es-BV_4fN10.cjs → sunburst-chart-options.es-eGoOC0h2.cjs} +1 -1
  430. package/components/{sunburst-chart-options.es-DBje7CMN.js → sunburst-chart-options.es-nqpK13rB.js} +2 -2
  431. package/components/{sunburst-chart-options.fr-Cnbpsj6t.js → sunburst-chart-options.fr-Dtfoz1Z-.js} +2 -2
  432. package/components/{sunburst-chart-options.fr-DO7-oeNe.cjs → sunburst-chart-options.fr-wdaTbc-I.cjs} +1 -1
  433. package/components/{sunburst-chart-options.nl-DsecjcfE.cjs → sunburst-chart-options.nl-2U3YQ6aP.cjs} +1 -1
  434. package/components/{sunburst-chart-options.nl-CluctKYY.js → sunburst-chart-options.nl-BljrFLha.js} +2 -2
  435. package/components/{sunburst-chart-positioning.config-DP-ifsmn.js → sunburst-chart-positioning.config-BJpphNBF.js} +1 -1
  436. package/components/{sunburst-chart-positioning.config-DNtHXpHg.cjs → sunburst-chart-positioning.config-BaQsxbr9.cjs} +1 -1
  437. package/components/{symbol-map-positioning.config-CoLDPgYM.cjs → symbol-map-positioning.config-657GZ7GZ.cjs} +1 -1
  438. package/components/{symbol-map-positioning.config-Nj7pDOAu.js → symbol-map-positioning.config-DEMmnp7J.js} +1 -1
  439. package/components/theme-options.config-CnSIfTf6.js +47 -0
  440. package/components/theme-options.config-DZJos9OK.cjs +20 -0
  441. package/components/theme-options.i18n-7V690gi-.cjs +20 -0
  442. package/components/theme-options.i18n-DtQoYxRz.js +43 -0
  443. package/components/{treemap-chart-options.config-DLEY6YuI.cjs → treemap-chart-options.config-B-bY4pOq.cjs} +1 -1
  444. package/components/{treemap-chart-options.config-DsqsX9So.js → treemap-chart-options.config-BYbW8htL.js} +1 -1
  445. package/components/{treemap-chart-positioning.config-B_R_cmFs.js → treemap-chart-positioning.config-CLKsuS0b.js} +1 -1
  446. package/components/{treemap-chart-positioning.config-BVOqj2V1.cjs → treemap-chart-positioning.config-DnY0Gnz7.cjs} +1 -1
  447. package/components/utils/base.cjs +1 -1
  448. package/components/utils/base.js +2 -2
  449. package/components/{utils-DIKmx9O1.cjs → utils-BGtDiw5k.cjs} +1 -1
  450. package/components/{utils-DS6Pthr4.js → utils-ZVgZ4EFf.js} +1 -1
  451. package/components/utils.cjs +1 -1
  452. package/components/utils.js +8 -8
  453. package/components/{venn-diagram-positioning.config-DOsSkJYl.js → venn-diagram-positioning.config-BjiidwmG.js} +1 -1
  454. package/components/{venn-diagram-positioning.config-8JCVpYOt.cjs → venn-diagram-positioning.config-OBLHpLAK.cjs} +1 -1
  455. package/components/{wordcloud-chart-options.config-DiyF596X.cjs → wordcloud-chart-options.config-COTlsOrG.cjs} +1 -1
  456. package/components/{wordcloud-chart-options.config-UAl2hfU7.js → wordcloud-chart-options.config-vKHxHgLh.js} +1 -1
  457. package/components/{wordcloud-chart-positioning.config-DSVw_z7Y.js → wordcloud-chart-positioning.config-68AyKLI2.js} +1 -1
  458. package/components/{wordcloud-chart-positioning.config-D13iPEEg.cjs → wordcloud-chart-positioning.config-B_pohQK5.cjs} +1 -1
  459. package/custom-elements.json +494 -31
  460. package/package.json +3 -3
  461. package/react/components/ai-chat.component.ts +1 -1
  462. package/react/esm/components/ai-chat.component.d.ts +1 -1
  463. package/react/esm/components/ai-chat.component.js +1 -1
  464. package/react/package.json +2 -2
  465. package/standalone/add-to-dashboard.js +1 -1
  466. package/standalone/chunks/advanced-options.i18n-BDqAAkCh.js +2 -0
  467. package/standalone/chunks/{area-chart-options.config-BMvUma_d.js → area-chart-options.config-MSCX7GCC.js} +1 -1
  468. package/standalone/chunks/{bar-chart-options.config-BpHqXBFq.js → bar-chart-options.config-C-kawBg1.js} +1 -1
  469. package/standalone/chunks/{box-plot-options.config-DDWb_KmV.js → box-plot-options.config-EeKqXIKW.js} +1 -1
  470. package/standalone/chunks/{bubble-chart-options.config-BKPTymfC.js → bubble-chart-options.config-BEP0haal.js} +1 -1
  471. package/standalone/chunks/{chart-helpers-DZsidiCl.js → chart-helpers-CKlLA7d7.js} +1 -1
  472. package/standalone/chunks/{choropleth-map-options.config-CDMjKnJD.js → choropleth-map-options.config-C9iAp9Kx.js} +1 -1
  473. package/standalone/chunks/{circle-pack-chart-options.config-CjDkh4DG.js → circle-pack-chart-options.config-Ch67WcjC.js} +1 -1
  474. package/standalone/chunks/{color-range-utils-BVyHBRiq.js → color-range-utils-D2amn7jf.js} +1 -1
  475. package/standalone/chunks/{column-chart-options.config-YIe6cMV5.js → column-chart-options.config-kXBPyFRG.js} +1 -1
  476. package/standalone/chunks/{combination-chart-options.config-Bf7cNmpc.js → combination-chart-options.config-CvVDQmwB.js} +1 -1
  477. package/standalone/chunks/{data-broker-DpSrH3IP.js → data-broker-CUCszU0S.js} +1 -1
  478. package/standalone/chunks/de-CBvR-tEX.js +2 -0
  479. package/standalone/chunks/{display-settings-binning-DhHlclWH.js → display-settings-binning-5gaYqJVT.js} +1 -1
  480. package/standalone/chunks/display-settings-datetime-l8eZ7vwV.js +199 -0
  481. package/standalone/chunks/{display-settings-grand-totals-CUpigDcs.js → display-settings-grand-totals-B83suS2N.js} +1 -1
  482. package/standalone/chunks/{display-settings-numeric-BLWF54Jx.js → display-settings-numeric-BVSff_nN.js} +1 -1
  483. package/standalone/chunks/display-settings-period-over-period-By9WHn3a.js +137 -0
  484. package/standalone/chunks/donut-chart-options.config-re9dbce1.js +2 -0
  485. package/standalone/chunks/donut-chart-options.de-C1yjMc7p.js +2 -0
  486. package/standalone/chunks/donut-chart-options.en-CJSA_qMs.js +2 -0
  487. package/standalone/chunks/donut-chart-options.es-9wl-kU6W.js +2 -0
  488. package/standalone/chunks/donut-chart-options.fr-FewVJ9oP.js +2 -0
  489. package/standalone/chunks/donut-chart-options.nl-BA31OsN3.js +2 -0
  490. package/standalone/chunks/{embed-Bv1ps-EM.js → embed-BL4OOcIV.js} +1 -1
  491. package/standalone/chunks/en-COt1Na3D.js +2 -0
  492. package/standalone/chunks/en-GB-6byNwC81.js +2 -0
  493. package/standalone/chunks/en-US-COt1Na3D.js +2 -0
  494. package/standalone/chunks/es-CJnRT1YI.js +2 -0
  495. package/standalone/chunks/{filters-lhg_WVDK.js → filters-Dk7oDe_z.js} +18 -16
  496. package/standalone/chunks/{formula-codemirror-DZMzLE2I.js → formula-codemirror-BqV2Lr6d.js} +8 -8
  497. package/standalone/chunks/fr-DqE0NP1j.js +2 -0
  498. package/standalone/chunks/funnel-chart-options.config-CW0RAyLR.js +2 -0
  499. package/standalone/chunks/{funnel-chart-options.de-u5OrFyng.js → funnel-chart-options.de-D2UImO-s.js} +1 -1
  500. package/standalone/chunks/{funnel-chart-options.en-BEGSBn35.js → funnel-chart-options.en-BJr4frpT.js} +1 -1
  501. package/standalone/chunks/{funnel-chart-options.es-CxWkEgMs.js → funnel-chart-options.es-DkAYtLaS.js} +1 -1
  502. package/standalone/chunks/{funnel-chart-options.fr-DZmmgK2t.js → funnel-chart-options.fr-BD3VKHzw.js} +1 -1
  503. package/standalone/chunks/{funnel-chart-options.nl-C6BitaEJ.js → funnel-chart-options.nl-CubJLSq7.js} +1 -1
  504. package/standalone/chunks/{guidelines-options.config-CS29_J9M.js → guidelines-options.config-CrJ_haaO.js} +1 -1
  505. package/standalone/chunks/{heat-map-options.config-DDQMD38W.js → heat-map-options.config-_1TkgBVb.js} +1 -1
  506. package/standalone/chunks/heat-table-options.config-tgVKW_7X.js +2 -0
  507. package/standalone/chunks/interactivity-options.config-CG_ZbLS5.js +2 -0
  508. package/standalone/chunks/interactivity-options.i18n-V1RAn6Ue.js +2 -0
  509. package/standalone/chunks/{is-same-option-value-7kXNF4st.js → is-same-option-value-CfxEd5pG.js} +1 -1
  510. package/standalone/chunks/{item-option-action-button-group-Bl1HR1JK.js → item-option-action-button-group-C1ke6Jb3.js} +1 -1
  511. package/standalone/chunks/{item-option-base-DF24wTyv.js → item-option-base-DSAq8pgm.js} +1 -1
  512. package/standalone/chunks/{item-option-color-palette-picker-MkIIn56p.js → item-option-color-palette-picker-waW4sAIj.js} +1 -1
  513. package/standalone/chunks/{item-option-color-picker-CxosMo_p.js → item-option-color-picker-9e_3aSen.js} +1 -1
  514. package/standalone/chunks/{item-option-color-range-C7C70r4J.js → item-option-color-range-CWmg4Tdk.js} +1 -1
  515. package/standalone/chunks/{item-option-guidelines-iu8yWRzr.js → item-option-guidelines-CWaGOxXF.js} +1 -1
  516. package/standalone/chunks/{item-option-multi-language-field-foanqCdr.js → item-option-multi-language-field-BN9u0rGs.js} +1 -1
  517. package/standalone/chunks/{item-option-number-field-ByVD4oq0.js → item-option-number-field-D2gvKQN_.js} +1 -1
  518. package/standalone/chunks/{item-option-panel-Bya-K7HH.js → item-option-panel-Ts7D8J7X.js} +2 -2
  519. package/standalone/chunks/{item-option-picker-CqNNVIML.js → item-option-picker-BElgjysX.js} +1 -1
  520. package/standalone/chunks/{item-option-position-picker-BjCFVtDH.js → item-option-position-picker-B7FGJPTv.js} +1 -1
  521. package/standalone/chunks/{item-option-positions-number-field-BJJtXZL-.js → item-option-positions-number-field-CyCWqMby.js} +1 -1
  522. package/standalone/chunks/{item-option-radio-button-group-C5bxsD85.js → item-option-radio-button-group-DjMjG9W3.js} +1 -1
  523. package/standalone/chunks/{item-option-slider-DUXWz70B.js → item-option-slider-CJrobai6.js} +1 -1
  524. package/standalone/chunks/{item-option-switch-BHyJuOkP.js → item-option-switch-DTK0eRzd.js} +1 -1
  525. package/standalone/chunks/{item-option-text-field-rBZY9OX4.js → item-option-text-field-B4-wMWpQ.js} +1 -1
  526. package/standalone/chunks/item-slot-picker-panel-CqG-cZZW.js +438 -0
  527. package/standalone/chunks/legend-options.i18n-Dr6XmdZs.js +2 -0
  528. package/standalone/chunks/line-chart-options.config-VgcDr1j6.js +2 -0
  529. package/standalone/chunks/{load-data-fields-for-datasets-DS9O1oyy.js → load-data-fields-for-datasets-Df6IGwne.js} +1 -1
  530. package/standalone/chunks/{localize-DLl7tgQp.js → localize-DIWFho02.js} +1 -1
  531. package/standalone/chunks/{localized-decorator-DosMCCQo.js → localized-decorator-C2ufmkVS.js} +1 -1
  532. package/standalone/chunks/{localized-mixin-BWJj88bd.js → localized-mixin-CLvEZO1g.js} +1 -1
  533. package/standalone/chunks/{luzmo-icon-markup-ByaNI6dg.js → luzmo-icon-markup-C1Wzxt4b.js} +1 -1
  534. package/standalone/chunks/nl-DBD8_AIO.js +2 -0
  535. package/standalone/chunks/{ohlc-chart-options.config-kyYOgBtR.js → ohlc-chart-options.config-DoFcORQY.js} +1 -1
  536. package/standalone/chunks/{option-interaction-controller-BuwRr21c.js → option-interaction-controller-BfHSkomY.js} +1 -1
  537. package/standalone/chunks/{parallel-coordinates-plot-options.config-BcIYCRdF.js → parallel-coordinates-plot-options.config-JmTkwzbf.js} +1 -1
  538. package/standalone/chunks/{pivot-table-options.config-BZpId1ju.js → pivot-table-options.config-mk1a9meE.js} +1 -1
  539. package/standalone/chunks/{pyramid-chart-options.config-xYIVE_ib.js → pyramid-chart-options.config-DuCSp-ss.js} +1 -1
  540. package/standalone/chunks/{route-map-options.config-CGBkHnhM.js → route-map-options.config-B73cNABj.js} +1 -1
  541. package/standalone/chunks/{sankey-diagram-options.config-Curc2-If.js → sankey-diagram-options.config-BsFxRYGh.js} +1 -1
  542. package/standalone/chunks/scatter-plot-options.config-DiO2UduI.js +2 -0
  543. package/standalone/chunks/sort-options.config-fFAfPcSI.js +2 -0
  544. package/standalone/chunks/{spike-map-options.config-CSenlJ_F.js → spike-map-options.config-BpRwiS7U.js} +1 -1
  545. package/standalone/chunks/sunburst-chart-options.config-TCXdodS8.js +2 -0
  546. package/standalone/chunks/sunburst-chart-options.de-DabJH9rY.js +2 -0
  547. package/standalone/chunks/sunburst-chart-options.en-BNJlsmSV.js +2 -0
  548. package/standalone/chunks/sunburst-chart-options.es-xn2E_v17.js +2 -0
  549. package/standalone/chunks/sunburst-chart-options.fr-DQR4oaiY.js +2 -0
  550. package/standalone/chunks/sunburst-chart-options.nl-BZGlfl67.js +2 -0
  551. package/standalone/chunks/{task-BlhDPTQS.js → task-B6C9QMNJ.js} +1 -1
  552. package/standalone/chunks/theme-options.config-W0JNb9nG.js +2 -0
  553. package/standalone/chunks/theme-options.i18n-DtI0eOJ4.js +2 -0
  554. package/standalone/chunks/{treemap-chart-options.config-DxkumoYq.js → treemap-chart-options.config-CLpDBIB5.js} +1 -1
  555. package/standalone/chunks/{wordcloud-chart-options.config-b-ibtRWp.js → wordcloud-chart-options.config-Bjw10jRd.js} +1 -1
  556. package/standalone/interactive-viz-item.js +1 -1
  557. package/standalone/item-grid.js +1 -1
  558. package/standalone/manifest.json +92 -87
  559. package/types/ai-chat.types.d.ts +60 -0
  560. package/utils/filters/expressions.d.ts +2 -0
  561. package/utils/slot-state/slot-store.d.ts +3 -8
  562. package/utils/time/period-over-period-condition.const.d.ts +0 -1
  563. package/utils/time/period-over-period-context.d.ts +75 -0
  564. package/utils/time/tests/period-over-period-context.test.d.ts +1 -0
  565. package/components/ai-chat-BNcSadGI.cjs +0 -393
  566. package/components/de-KvAhLsm8.cjs +0 -20
  567. package/components/display-settings-DaZ3CiKB.cjs +0 -143
  568. package/components/display-settings-period-over-period-B8Ne3lq-.cjs +0 -227
  569. package/components/donut-chart-options.config-DX-spmaZ.cjs +0 -20
  570. package/components/es-DVISHTAz.cjs +0 -20
  571. package/components/filter-expression-picker-Cc3xfiGT.js +0 -432
  572. package/components/filter-expression-picker-DDSI9bYq.cjs +0 -40
  573. package/components/filter-item-DQNbp7Qn.cjs +0 -111
  574. package/components/filter-value-picker-datetime-BVDQ-og5.cjs +0 -51
  575. package/components/fr-BCxcMVQV.cjs +0 -20
  576. package/components/funnel-chart-options.config-CKp94nx7.cjs +0 -20
  577. package/components/heat-table-options.config-D21xtaIk.cjs +0 -20
  578. package/components/interactivity-options.config-Bzk2L-qh.cjs +0 -20
  579. package/components/interactivity-options.config-MuEP5vSt.js +0 -72
  580. package/components/interactivity-options.i18n-BsYv4Rh9.cjs +0 -20
  581. package/components/item-slot-drop-DLzi4Dik.cjs +0 -91
  582. package/components/item-slot-drop-panel-Oh8zdKJH.cjs +0 -57
  583. package/components/item-slot-picker-O9HKr3mv.cjs +0 -158
  584. package/components/item-slot-picker-panel-Cw3UCK03.cjs +0 -84
  585. package/components/nl-XotE1MQq.cjs +0 -20
  586. package/components/slot-menu-C8p0nkVS.cjs +0 -71
  587. package/components/sunburst-chart-options.config-CZdd6qx0.cjs +0 -20
  588. package/standalone/chunks/de-BkB0q1Eg.js +0 -2
  589. package/standalone/chunks/display-settings-datetime-C8xvOvi4.js +0 -199
  590. package/standalone/chunks/display-settings-period-over-period-COd4tvUw.js +0 -209
  591. package/standalone/chunks/donut-chart-options.config-DWpePR5V.js +0 -2
  592. package/standalone/chunks/donut-chart-options.de-IKGJRoDL.js +0 -2
  593. package/standalone/chunks/donut-chart-options.en-O2IK3YiS.js +0 -2
  594. package/standalone/chunks/donut-chart-options.es-gKAHuFAU.js +0 -2
  595. package/standalone/chunks/donut-chart-options.fr-Q-uMrtQG.js +0 -2
  596. package/standalone/chunks/donut-chart-options.nl-B6v6jK4l.js +0 -2
  597. package/standalone/chunks/en-DNsyAwgq.js +0 -2
  598. package/standalone/chunks/en-GB-Di3OzVdL.js +0 -2
  599. package/standalone/chunks/en-US-DNsyAwgq.js +0 -2
  600. package/standalone/chunks/es-Bo0jStZn.js +0 -2
  601. package/standalone/chunks/fr-Co_qVhhV.js +0 -2
  602. package/standalone/chunks/funnel-chart-options.config-S1yxc6IG.js +0 -2
  603. package/standalone/chunks/heat-table-options.config-B4K0Ygug.js +0 -2
  604. package/standalone/chunks/interactivity-options.config-09eXx6k6.js +0 -2
  605. package/standalone/chunks/interactivity-options.i18n-BLDCmZkC.js +0 -2
  606. package/standalone/chunks/item-slot-picker-panel-BM82vSXi.js +0 -431
  607. package/standalone/chunks/line-chart-options.config--_LXaPbB.js +0 -2
  608. package/standalone/chunks/nl-CQz2jrVx.js +0 -2
  609. package/standalone/chunks/scatter-plot-options.config-DG9Ki-mt.js +0 -2
  610. package/standalone/chunks/sunburst-chart-options.config-DOBSe3i5.js +0 -2
  611. package/standalone/chunks/sunburst-chart-options.de-D3iq4Q-m.js +0 -2
  612. package/standalone/chunks/sunburst-chart-options.en-BUJ_Pr9C.js +0 -2
  613. package/standalone/chunks/sunburst-chart-options.es-stKrKGz2.js +0 -2
  614. package/standalone/chunks/sunburst-chart-options.fr-RkBtlMNp.js +0 -2
  615. package/standalone/chunks/sunburst-chart-options.nl-BUeDNot_.js +0 -2
@@ -0,0 +1,438 @@
1
+
2
+ import{n as e,r as t,t as n}from"./localized-mixin-CLvEZO1g.js";import{t as r}from"./localized-decorator-C2ufmkVS.js";import{n as i,t as a}from"./luzmoCog-C4v4vc5N.js";import{t as o}from"./luzmoTrashOutline-DXZpJx7f.js";import{c as s,l as c,n as l,t as u}from"./load-data-fields-for-datasets-Df6IGwne.js";import{t as d}from"./luzmoPlus-Dyrrz0v8.js";import{t as f}from"./luzmo-icon-markup-C1Wzxt4b.js";import{S as p,_ as m,b as h,h as g,p as _,v,x as y}from"./chart-helpers-CKlLA7d7.js";import{n as b}from"./data-broker-CUCszU0S.js";import{t as x}from"./localize-DIWFho02.js";import{t as S}from"./create-lazy-loader-DC0rJePE.js";import{t as C}from"./task-B6C9QMNJ.js";import{AsyncDirective as w,directive as ee,guard as T,html as E,ifDefined as D,nothing as O,property as k,query as te,queryAll as ne,state as A,unsafeCSS as j}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/divider.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/progress-circle.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/tooltip.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/select.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/text-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.7.1/standalone/multi-language-field.js";var re=Object.defineProperty,ie=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),ae=(e,t)=>{let n={};for(var r in e)re(n,r,{get:e[r],enumerable:!0});return t||re(n,Symbol.toStringTag,{value:`Module`}),n},oe={icon:[24,24,`m6 6 16 16M3.3 4.7l7.3 7.3-7.3 7.3c-1 1 .5 2.3 1.4 1.4l7.3-7.3 7.3 7.3c1 1 2.3-.5 1.4-1.4L13.4 12l7.3-7.3c1-1-.5-2.3-1.4-1.4L12 10.6 4.7 3.3c-.9-1-2.3.5-1.4 1.4Z`],name:`close-12`},se={icon:[32,32,`M16 0a16 16 0 1 0 0 32 16 16 0 0 0 0-32Zm0 2a14 14 0 0 1 14 14 14 14 0 0 1-14 14A14 14 0 0 1 2 16 14 14 0 0 1 16 2Zm0 5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3ZM15 15v9c0 1.3 2 1.3 2 0v-9c0-1.3-2-1.3-2 0z`],name:`info-circle-outline`},ce={icon:[32,32,`M12 3v9H3c-1.3 0-1.3 2 0 2h10q1 0 1-1V3c0-1.3-2-1.3-2 0m6 0v10q0 1 1 1h10c1.3 0 1.3-2 0-2h-9V3c0-1.3-2-1.3-2 0M3 18c-1.3 0-1.3 2 0 2h9v9c0 1.3 2 1.3 2 0V19q0-1-1-1zm16 0a1 1 0 0 0-1 1v10c0 1.3 2 1.3 2 0v-9h9c1.3 0 1.3-2 0-2z`],name:`scope-grouped`},le={icon:[32,32,`M1 0a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1 1 1 0 0 0 1-1V2h7a1 1 0 0 0 1-1 1 1 0 0 0-1-1H8Zm22 0a1 1 0 0 0-1 1 1 1 0 0 0 1 1h7v7a1 1 0 0 0 1 1 1 1 0 0 0 1-1V1a1 1 0 0 0-1-1ZM.98 22a1 1 0 0 0-1 1v1L0 31a1 1 0 0 0 1 1l8-.02a1 1 0 0 0 1-1 1 1 0 0 0-1-1L2 30l-.01-6v-1a1 1 0 0 0-1-1Zm30 0a1 1 0 0 0-1 1l.02 7-6 .02h-1a1 1 0 0 0-1 1 1 1 0 0 0 1 1h1l7-.02a1 1 0 0 0 1-1l-.02-8a1 1 0 0 0-1-1z`],name:`scope-full`},ue={icon:[32,32,`M15 2v2A12 12 0 0 0 4 15H2c-1.3 0-1.3 2 0 2h2a12 12 0 0 0 11 11v2c0 1.3 2 1.3 2 0v-2a12 12 0 0 0 11-11h2c1.3 0 1.3-2 0-2h-2A12 12 0 0 0 17 4V2c0-1.3-2-1.3-2 0m0 4v2c0 1.3 2 1.3 2 0V6a10 10 0 0 1 9 9h-2c-1.3 0-1.3 2 0 2h2a10 10 0 0 1-9 9v-2c0-1.3-2-1.3-2 0v2a10 10 0 0 1-9-9h2c1.3 0 1.3-2 0-2H6a10 10 0 0 1 9-9m1 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4`],name:`scope-fixed`},de={"area-chart":()=>import(`./area-chart-slots.config-Bxvau_Ii.js`),"bar-chart":()=>import(`./bar-chart-slots.config-BWQoKCYJ.js`),"box-plot":()=>import(`./box-plot-slots.config-4hmeA6nr.js`),"bubble-chart":()=>import(`./bubble-chart-slots.config-CqTUMwvW.js`),"bullet-chart":()=>import(`./bullet-chart-slots.config-BiFMJsgN.js`),"choropleth-map":()=>import(`./choropleth-map-slots.config-CRF7J3QP.js`),"circle-pack-chart":()=>import(`./circle-pack-chart-slots.config-Deq7IUoK.js`),"circular-gauge":()=>import(`./circular-gauge-slots.config-C7yUFfFJ.js`),"column-chart":()=>import(`./column-chart-slots.config-ZBLvqhEb.js`),"combination-chart":()=>import(`./combination-chart-slots.config-BNVJfRB2.js`),"conditional-number":()=>import(`./conditional-number-slots.config-B4kqODqw.js`),"date-comparison-filter":()=>import(`./date-comparison-filter-slots.config-GxZF3vb3.js`),"date-filter":()=>import(`./date-filter-slots.config-DHaOkULx.js`),"donut-chart":()=>import(`./donut-chart-slots.config-7pDpzNBG.js`),"dropdown-filter":()=>import(`./dropdown-filter-slots.config-DkqLjilE.js`),"evolution-number":()=>import(`./evolution-number-slots.config-IqPfnCrw.js`),"funnel-chart":()=>import(`./funnel-chart-slots.config-DfeuNGEL.js`),"heat-map":()=>import(`./heat-map-slots.config-BVBzVjJJ.js`),"heat-table":()=>import(`./heat-table-slots.config-CcOl-PCp.js`),"hexbin-map":()=>import(`./hexbin-map-slots.config-D6qVm4nj.js`),image:()=>import(`./image-slots.config-CdWEUY0l.js`),kpi:()=>import(`./kpi-slots.config-DAjLHdEj.js`),"line-chart":()=>import(`./line-chart-slots.config-CavGuJXK.js`),"marker-map":()=>import(`./marker-map-slots.config-CtzpU-rK.js`),"ohlc-chart":()=>import(`./ohlc-chart-slots.config-xYpPbmg2.js`),"parallel-coordinates-plot":()=>import(`./parallel-coordinates-plot-slots.config-DvJljfr8.js`),"pivot-table":()=>import(`./pivot-table-slots.config-DZOE04Ea.js`),"pyramid-chart":()=>import(`./pyramid-chart-slots.config-DKBFy-TL.js`),"radar-chart":()=>import(`./radar-chart-slots.config-CHauNDhi.js`),"regular-table":()=>import(`./regular-table-slots.config-BqEJgzhG.js`),"route-map":()=>import(`./route-map-slots.config-B5G4JVnI.js`),"sankey-diagram":()=>import(`./sankey-diagram-slots.config-jyKqjUsV.js`),"scatter-plot":()=>import(`./scatter-plot-slots.config-CF2Ii2Ez.js`),"search-filter":()=>import(`./search-filter-slots.config-BcTF-DAh.js`),"slicer-filter":()=>import(`./slicer-filter-slots.config-DL3Q0Zbm.js`),"slider-filter":()=>import(`./slider-filter-slots.config-52Bs7zu3.js`),"speedometer-chart":()=>import(`./speedometer-chart-slots.config-Cfsna_2O.js`),"spike-map":()=>import(`./spike-map-slots.config-FfXNX2O3.js`),"strip-plot":()=>import(`./strip-plot-slots.config-DQrrby2Y.js`),"sunburst-chart":()=>import(`./sunburst-chart-slots.config-DqW1e0nf.js`),"symbol-map":()=>import(`./symbol-map-slots.config-B_UtYexb.js`),text:()=>import(`./text-slots.config-D33nu0FP.js`),"treemap-chart":()=>import(`./treemap-chart-slots.config-CaearczZ.js`),"venn-diagram":()=>import(`./venn-diagram-slots.config-GnP5AAAL.js`),video:()=>import(`./video-slots.config-ufoVcXKL.js`),"wordcloud-chart":()=>import(`./wordcloud-chart-slots.config-g7QwS2dG.js`)},fe=e=>`${e.replaceAll(/-([a-z])/g,(e,t)=>t.toUpperCase())}SlotsConfig`,pe=async e=>{try{let t=de[e];return t?(await t())[fe(e)]??null:null}catch{return null}},me=e=>e?pe(e):Promise.resolve(null);function he(e,t=!1){let{type:n,level:r,quantity:i,periodToDate:a,rangeType:o,offsetDateColumn:s}=e;return{type:n,level:r,quantity:i,periodToDate:a,...o===void 0?{}:{rangeType:o},...!t&&s?{offsetDateColumn:{id:s.id,datasetId:s.datasetId,lowestLevel:s.lowestLevel}}:{}}}function ge(e,t,n){if(n?.type===`datetime`)return typeof n.level==`number`?n.level:void 0;let r=t.filter(t=>t.type===`datetime`&&e!=null&&t.set===e.datasetId&&t.column===e.id).map(e=>e.level).filter(e=>typeof e==`number`);return r.length>0?Math.min(...r):e?.lowestLevel}var _e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function ve(e){return typeof e==`string`&&_e.test(e)}function ye(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function be(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xe(e){return e=be(Math.abs(e)),e?e[1]:NaN}function Se(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Ce(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var we=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Te(e){if(!(t=we.exec(e)))throw Error(`invalid format: `+e);var t;return new Ee({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Te.prototype=Ee.prototype;function Ee(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Ee.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function De(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var Oe;function ke(e,t){var n=be(e,t);if(!n)return Oe=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Oe=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+be(e,Math.max(0,t+a-1))[0]}function Ae(e,t){var n=be(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var je={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:ye,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ae(e*100,t),r:Ae,s:ke,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Me(e){return e}var Ne=Array.prototype.map,Pe=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Fe(e){var t=e.grouping===void 0||e.thousands===void 0?Me:Se(Ne.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Me:Ce(Ne.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Te(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):je[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=je[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=De(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Oe!==void 0?Pe[8+Oe/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var ee=n.length+e.length+r.length,T=ee<h?Array(h-ee+1).join(u):``;switch(g&&m&&(e=t(T+e,T.length?h-r.length:1/0),T=``),d){case`<`:e=n+e+r+T;break;case`=`:e=n+T+e+r;break;case`^`:e=T.slice(0,ee=T.length>>1)+n+e+r+T.slice(ee);break;default:e=T+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(xe(t)/3)))*3,r=10**-n,i=l((e=Te(e),e.type=`f`,e),{suffix:Pe[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Ie=/* @__PURE__ */ new Date,Le=/* @__PURE__ */ new Date;function M(e,t,n,r){function i(t){return e(t=arguments.length===0?/* @__PURE__ */ new Date:/* @__PURE__ */ new Date(+t)),t}return i.floor=t=>(e(t=/* @__PURE__ */ new Date(+t)),t),i.ceil=n=>(e(n=/* @__PURE__ */ new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=/* @__PURE__ */ new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=/* @__PURE__ */ new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>M(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Ie.setTime(+t),Le.setTime(+r),e(Ie),e(Le),Math.floor(n(Ie,Le))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Re=1e3,N=Re*60,ze=N*60,Be=ze*24,Ve=Be*7,He=M(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Re)},(e,t)=>(t-e)/Re,e=>e.getUTCSeconds());He.range;var Ue=M(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Re)},(e,t)=>{e.setTime(+e+t*N)},(e,t)=>(t-e)/N,e=>e.getMinutes());Ue.range,M(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*N)},(e,t)=>(t-e)/N,e=>e.getUTCMinutes()).range;var We=M(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Re-e.getMinutes()*N)},(e,t)=>{e.setTime(+e+t*ze)},(e,t)=>(t-e)/ze,e=>e.getHours());We.range,M(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ze)},(e,t)=>(t-e)/ze,e=>e.getUTCHours()).range;var Ge=M(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*N)/Be,e=>e.getDate()-1);Ge.range;var Ke=M(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Be,e=>e.getUTCDate()-1);Ke.range,M(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Be,e=>Math.floor(e/Be)).range;function qe(e){return M(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*N)/Ve)}var Je=qe(0),Ye=qe(1),Xe=qe(2),Ze=qe(3),Qe=qe(4),$e=qe(5),et=qe(6);Je.range,Ye.range,Xe.range,Ze.range,Qe.range,$e.range,et.range;function P(e){return M(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ve)}var tt=P(0),nt=P(1),rt=P(2),it=P(3),at=P(4),ot=P(5),st=P(6);tt.range,nt.range,rt.range,it.range,at.range,ot.range,st.range;var ct=M(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ct.range,M(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()).range;var F=M(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());F.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:M(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),F.range;var I=M(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());I.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:M(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),I.range;function lt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ut(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function dt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ft(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=_t(i),u=vt(i),d=_t(a),f=vt(a),p=_t(o),m=vt(o),h=_t(s),g=vt(s),_=_t(c),v=vt(c),y={a:A,A:j,b:re,B:ie,c:null,d:zt,e:zt,f:Wt,g:tn,G:rn,H:Bt,I:Vt,j:Ht,L:Ut,m:Gt,M:Kt,p:ae,q:oe,Q:Dn,s:On,S:qt,u:Jt,U:Yt,V:Zt,w:Qt,W:$t,x:null,X:null,y:en,Y:nn,Z:an,"%":En},b={a:se,A:ce,b:le,B:ue,c:null,d:on,e:on,f:dn,g:Sn,G:wn,H:sn,I:cn,j:ln,L:un,m:fn,M:pn,p:de,q:fe,Q:Dn,s:On,S:mn,u:hn,U:gn,V:vn,w:yn,W:bn,x:null,X:null,y:xn,Y:Cn,Z:Tn,"%":En},x={a:T,A:E,b:D,B:O,c:k,d:kt,e:kt,f:Ft,g:Tt,G:wt,H:jt,I:jt,j:At,L:Pt,m:Ot,M:Mt,p:ee,q:Dt,Q:Lt,s:Rt,S:Nt,u:bt,U:xt,V:St,w:yt,W:Ct,x:te,X:ne,y:Tt,Y:wt,Z:Et,"%":It};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=/* @__PURE__ */ new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=pt[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=dt(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=ut(dt(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?nt.ceil(a):nt(a),a=Ke.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=lt(dt(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Ye.ceil(a):Ye(a),a=Ge.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?ut(dt(r.y,0,1)).getUTCDay():lt(dt(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,ut(r)):lt(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in pt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function ee(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function T(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,n,r){return w(e,t,n,r)}function te(e,t,r){return w(e,n,t,r)}function ne(e,t,n){return w(e,r,t,n)}function A(e){return o[e.getDay()]}function j(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function ce(e){return a[e.getUTCDay()]}function le(e){return c[e.getUTCMonth()]}function ue(e){return s[e.getUTCMonth()]}function de(e){return i[+(e.getUTCHours()>=12)]}function fe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var pt={"-":``,_:` `,0:`0`},L=/^\s*\d+/,mt=/^%/,ht=/[\\^$*+?|[\]().{}]/g;function R(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function gt(e){return e.replace(ht,`\\$&`)}function _t(e){return RegExp(`^(?:`+e.map(gt).join(`|`)+`)`,`i`)}function vt(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function yt(e,t,n){var r=L.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function bt(e,t,n){var r=L.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function xt(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function St(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ct(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function wt(e,t,n){var r=L.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Tt(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Et(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Dt(e,t,n){var r=L.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ot(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function kt(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function At(e,t,n){var r=L.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Mt(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Nt(e,t,n){var r=L.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Pt(e,t,n){var r=L.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ft(e,t,n){var r=L.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function It(e,t,n){var r=mt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Lt(e,t,n){var r=L.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=L.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function zt(e,t){return R(e.getDate(),t,2)}function Bt(e,t){return R(e.getHours(),t,2)}function Vt(e,t){return R(e.getHours()%12||12,t,2)}function Ht(e,t){return R(1+Ge.count(F(e),e),t,3)}function Ut(e,t){return R(e.getMilliseconds(),t,3)}function Wt(e,t){return Ut(e,t)+`000`}function Gt(e,t){return R(e.getMonth()+1,t,2)}function Kt(e,t){return R(e.getMinutes(),t,2)}function qt(e,t){return R(e.getSeconds(),t,2)}function Jt(e){var t=e.getDay();return t===0?7:t}function Yt(e,t){return R(Je.count(F(e)-1,e),t,2)}function Xt(e){var t=e.getDay();return t>=4||t===0?Qe(e):Qe.ceil(e)}function Zt(e,t){return e=Xt(e),R(Qe.count(F(e),e)+(F(e).getDay()===4),t,2)}function Qt(e){return e.getDay()}function $t(e,t){return R(Ye.count(F(e)-1,e),t,2)}function en(e,t){return R(e.getFullYear()%100,t,2)}function tn(e,t){return e=Xt(e),R(e.getFullYear()%100,t,2)}function nn(e,t){return R(e.getFullYear()%1e4,t,4)}function rn(e,t){var n=e.getDay();return e=n>=4||n===0?Qe(e):Qe.ceil(e),R(e.getFullYear()%1e4,t,4)}function an(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+R(t/60|0,`0`,2)+R(t%60,`0`,2)}function on(e,t){return R(e.getUTCDate(),t,2)}function sn(e,t){return R(e.getUTCHours(),t,2)}function cn(e,t){return R(e.getUTCHours()%12||12,t,2)}function ln(e,t){return R(1+Ke.count(I(e),e),t,3)}function un(e,t){return R(e.getUTCMilliseconds(),t,3)}function dn(e,t){return un(e,t)+`000`}function fn(e,t){return R(e.getUTCMonth()+1,t,2)}function pn(e,t){return R(e.getUTCMinutes(),t,2)}function mn(e,t){return R(e.getUTCSeconds(),t,2)}function hn(e){var t=e.getUTCDay();return t===0?7:t}function gn(e,t){return R(tt.count(I(e)-1,e),t,2)}function _n(e){var t=e.getUTCDay();return t>=4||t===0?at(e):at.ceil(e)}function vn(e,t){return e=_n(e),R(at.count(I(e),e)+(I(e).getUTCDay()===4),t,2)}function yn(e){return e.getUTCDay()}function bn(e,t){return R(nt.count(I(e)-1,e),t,2)}function xn(e,t){return R(e.getUTCFullYear()%100,t,2)}function Sn(e,t){return e=_n(e),R(e.getUTCFullYear()%100,t,2)}function Cn(e,t){return R(e.getUTCFullYear()%1e4,t,4)}function wn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?at(e):at.ceil(e),R(e.getUTCFullYear()%1e4,t,4)}function Tn(){return`+0000`}function En(){return`%`}function Dn(e){return+e}function On(e){return Math.floor(e/1e3)}var kn,z;An({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function An(e){return kn=ft(e),z=kn.format,kn.parse,kn.utcFormat,kn.utcParse,kn}var jn=[[1,4,12,52,365,8760,525600,31536e3,31536e6],[1/4,1,3,13,91,2184,131040,7862400,78624e5],[1/12,1/3,1,4,30,720,43200,2592e3,2592e6],[1/52,1/13,1/4,1,7,168,10080,604800,6048e5],[1/365,1/91,1/30,1/7,1,24,1440,86400,864e5],[1/8760,1/2184,1/720,1/168,1/24,1,60,3600,36e5],[1/525600,1/131040,1/43200,1/10080,1/1440,1/60,1,60,6e4],[1/31536e3,1/7862400,1/2592e3,1/604800,1/86400,1/3600,1/60,1,1e3],[1/31536e6,1/78624e5,1/2592e6,1/6048e5,1/864e5,1/36e5,1/6e4,1/1e3,1]];function Mn(e,t,n){if(_(e))return;if(!t||!n||t===n)return e;let r=jn[t-1][n-1];if(r)return e*r}function Nn(e,t,n,r){if(_(e)||!t.lowestLevel||n.length===0)return``;let i=[],a=0,o=Math.round(e*jn[t.lowestLevel-1][8]);for(let[,t]of n.entries())if(e){o-=a;let e=jn[t-1][8],n=Math.floor(o/e);a=n*e,i.push({level:t,value:n})}else i.push({level:t,value:0});let s=``;for(let[e,n]of i.entries())if(t.duration.format===`time`){let t=n.value;[6,7,8].includes(n.level)&&n.value<10?t=`0`+n.value.toString():n.level===9&&n.value<10?t=`00`+n.value.toString():n.level===9&&n.value<100&&(t=`0`+n.value.toString()),s+=(e===0?``:n.level===9?`.`:`:`)+t}else if(t.duration.format===`long`){let t=r.durationLongSuffix;s+=n.value+` `+t[n.level]+(e===i.length-1?``:` `)}else{let t=r.durationShortSuffix;s+=n.value+``+t[n.level]+(e===i.length-1?``:` `)}return s}function Pn(e){let t=/(?:([^{])?([<>=^]))?([+\- ()])?([$#])?(0)?(\d+)?([,_])?(\.-?\d+)?([a-z%]{1,2})?/i.exec(e)??[];return{fill:t[1]||` `,align:t[2]||`>`,sign:t[3]||`-`,symbol:t[4]||``,zfill:t[5],width:+t[6],comma:t[7],precision:t[8],typeFormat:t[9]}}var Fn={decimal:`.`,thousands:`,`,grouping:[3],currency:[`$`,``],dateTime:`%a %b %e %X %Y`,date:`%m/%d/%Y`,dateSeparator:`/`,time:`%H:%M:%S`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],levels:[`All`,`Year`,`Quarter`,`Month`,`Week`,`Date`,`Hour`,`Minute`,`Second`,`Millisecond`],shortLevels:[`All`,`Yr`,`Qtr`,`Mth`,`Wk`,`Date`,`Hr`,`Min`,`Sec`,`Msec`],durationLongSuffix:[``,`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],durationShortSuffix:[``,`y`,`q`,`mo`,`w`,`d`,`h`,`m`,`s`,`ms`],multi:[`.%L`,`:%S`,`%I:%M`,`%I %p`,`%a %d`,`W%G`,`%b %d`,`%B`,`%Y`]},In=`%d-%m-%Y`,Ln=[{key:`%a %e %b %Y`,lev1:`%Y`,lev2:`Q%q-%Y`,lev3:`%b %Y`,lev4:`Wk %V-%G`,lev5:`%a %e %b %Y`,monthType:`name`,longText:!1,weekday:!0},{key:`%e %b %Y`,lev1:`%Y`,lev2:`Q%q-%Y`,lev3:`%b %Y`,lev4:`Wk %V-%G`,lev5:`%e %b %Y`,monthType:`name`,longText:!1,weekday:!1},{key:`%a %e %B %Y`,lev1:`%Y`,lev2:`Q%q-%Y`,lev3:`%B %Y`,lev4:`Week %V, %G`,lev5:`%a %e %B %Y`,monthType:`name`,longText:!0,weekday:!0},{key:`%e %B %Y`,lev1:`%Y`,lev2:`Q%q-%Y`,lev3:`%B %Y`,lev4:`Week %V, %G`,lev5:`%e %B %Y`,monthType:`name`,longText:!0,weekday:!1},{key:`%d/%m/%Y`,lev1:`%Y`,lev2:`Q%q/%Y`,lev3:`%m/%Y`,lev4:`W%V/%G`,lev5:`%d/%m/%Y`,monthType:`number`,mmdd:!1,separator:`/`},{key:`%d-%m-%Y`,lev1:`%Y`,lev2:`Q%q-%Y`,lev3:`%m-%Y`,lev4:`W%V-%G`,lev5:`%d-%m-%Y`,monthType:`number`,mmdd:!1,separator:`-`},{key:`%d.%m.%Y`,lev1:`%Y`,lev2:`Q%q.%Y`,lev3:`%m.%Y`,lev4:`W%V.%G`,lev5:`%d.%m.%Y`,monthType:`number`,mmdd:!1,separator:`.`},{key:`%d~%m~%Y`,lev1:`%Y`,lev2:`Q%q~%Y`,lev3:`%m~%Y`,lev4:`W%V~%G`,lev5:`%d~%m~%Y`,monthType:`number`,mmdd:!1,separator:`~`},{key:`%m/%d/%Y`,lev1:`%Y`,lev2:`Q%q/%Y`,lev3:`%m/%Y`,lev4:`%G/W%V`,lev5:`%m/%d/%Y`,monthType:`number`,mmdd:!0,separator:`/`},{key:`%m-%d-%Y`,lev1:`%Y`,lev2:`Q%q-%Y`,lev3:`%m-%Y`,lev4:`%G-W%V`,lev5:`%m-%d-%Y`,monthType:`number`,mmdd:!0,separator:`-`},{key:`%m.%d.%Y`,lev1:`%Y`,lev2:`Q%q.%Y`,lev3:`%m.%Y`,lev4:`%G.W%V`,lev5:`%m.%d.%Y`,monthType:`number`,mmdd:!0,separator:`.`},{key:`%m~%d~%Y`,lev1:`%Y`,lev2:`Q%q~%Y`,lev3:`%m~%Y`,lev4:`%G~W%V`,lev5:`%m~%d~%Y`,monthType:`number`,mmdd:!0,separator:`~`},{key:`%amd/%Y`,lev1:`%Y`,lev2:`Q%q/%Y`,lev3:`%m/%Y`,lev4:`%G/W%V`,lev5:`%amd/%Y`,monthType:`number`,mmdd:null,separator:`/`},{key:`%amd-%Y`,lev1:`%Y`,lev2:`Q%q-%Y`,lev3:`%m-%Y`,lev4:`%G-W%V`,lev5:`%amd-%Y`,monthType:`number`,mmdd:null,separator:`-`},{key:`%amd.%Y`,lev1:`%Y`,lev2:`Q%q.%Y`,lev3:`%m.%Y`,lev4:`%G.W%V`,lev5:`%amd.%Y`,monthType:`number`,mmdd:null,separator:`.`},{key:`%amd~%Y`,lev1:`%Y`,lev2:`Q%q~%Y`,lev3:`%m~%Y`,lev4:`%G~W%V`,lev5:`%amd~%Y`,monthType:`number`,mmdd:null,separator:`~`}],Rn=[{key:`%H:%M:%S.%L`,lev6:`%H:00`,lev7:`%H:%M`,lev8:`%H:%M:%S`,lev9:`%H:%M:%S.%L`,ampm:!1},{key:`%I:%M:%S.%L %p`,lev6:`%I:00 %p`,lev7:`%I:%M %p`,lev8:`%I:%M:%S %p`,lev9:`%I:%M:%S.%L %p`,ampm:!0}],zn=(e,t,n)=>t===`letter`?e.shortNames?.length>0&&e.shortNames[n]?.length>0?e.shortNames[n]?.charAt(0):`N/A`:t===`short`?e.shortNames?.length>0&&e.shortNames[n]?e.shortNames[n]:`N/A`:e.longNames?.length>0&&e.longNames[n]?e.longNames[n]:`N/A`;function Bn(e,t){t||={};let n=t.localFormats||Fn,r,i,a,o=[],s=[],c=`datetime`,l;t&&t.multi&&(c=`datetime`),e&&e.format||(c=`hierarchy`),e&&e.type&&(c=e.type),l=e&&e.format?e.format:c===`numeric`?`,.0f`:c===`datetime`?In:``;let u=Pn(l);switch(u.precision&&u.typeFormat&&(c=`numeric`),c){case`numeric`:if(e.subtype===`duration`&&e.duration&&e.duration.levels&&e.duration.levels.length>1&&!t.hideDuration)r=t=>_(t)?``:Nn(t,e,e.duration.levels,n);else{let a={...n},o=u.typeFormat,s=!1;switch(o.length===2&&o.startsWith(`a`)&&(s=!0,o=o.slice(1,2),l=l.replace(/a/,``)),s?(a.decimal=n.decimal,a.thousands=n.thousands):[`z`,`y`,`w`].includes(o)?(a.decimal=`,`,a.thousands=`.`):(a.decimal=`.`,a.thousands=`,`),o){case`z`:l=l.replace(`z`,`f`);break;case`y`:l=l.replace(`y`,`%`);break;case`w`:l=l.replace(`w`,`s`)}if(e?.subtype===`currency`&&e.currency){let t=a.currency.findIndex(e=>e.length>0),n=a.currency[t].startsWith(`\xA0`),r=a.currency[t].endsWith(`\xA0`),i=`${n?`\xA0`:``}${e.currency}${r?`\xA0`:``}`;a.currency[t]=i}let c=Fe(a);o!==`%`&&e?.subtype===`currency`&&e.currency&&a.currency&&!t?.hideCurrency&&![`count`,`distinctcount`].includes(e.aggregationFunc)&&(e.aggregationFunc!==`rate`||e.aggregationWeight?.columnSubType!==`currency`)&&e.periodOverPeriod?.type!==`percentageChange`&&(l=`$`+l),i=t?.trimZero&&[`y`,`%`].includes(o)&&a.decimal===`,`?e=>c.format(l)(e).replace(/(,\d*?)0+%$/,`$1%`).replace(/,%$/,`%`):t?.trimZero&&[`y`,`%`].includes(o)&&a.decimal===`.`?e=>c.format(l)(e).replace(/(\.\d*?)0+%$/,`$1%`).replace(/\.%$/,`%`):t?.trimZero&&[`z`,`f`].includes(o)&&a.decimal===`,`?e=>c.format(l)(e).replace(/(,\d*?)0+$/,`$1`).replace(/,$/,``):t?.trimZero&&[`z`,`f`].includes(o)&&a.decimal===`.`?e=>c.format(l)(e).replace(/(\.\d*?)0+$/,`$1`).replace(/\.$/,``):e?.subtype===`currency`&&e.currency&&a.currency&&o===`s`?e=>c.format(l)(e).replace(/G/,`B`):_(u.precision)?c.format(`,.0f`):c.format(l),r=r=>{if(_(r))return``;if(e.subtype===`duration`&&e.duration&&!t.hideDuration){let t=e.duration.levels?e.duration.levels[0]:e.lowestLevel;return t!==e.lowestLevel&&(r=Mn(r,e.lowestLevel,t)),i(r)+n?.durationShortSuffix?.[t]}return i(r)}}break;case`datetime`:if(o=n?.smartDateFormats??Ln,s=n?.smartTimeFormats??Rn,_(e.datetimeDisplayMode)||e.datetimeDisplayMode==="default"){if(t?.level){let e=t.level,r=o.find(e=>l.includes(e.key)),i=s.find(e=>l.includes(e.key)),a=r?r[`lev`+Math.min(e,5)]:o[0][`lev`+Math.min(e,5)],c=e>5?i?i[`lev`+e]:s[0][`lev`+e]:``;l=e>5?a+`, `+c:a;let u=l.includes(`%amd`)&&t.level>=5,d=r?t.level>=2&&r.separator===`~`:!1;l=u?d?l.replaceAll(/%amd[.~/-]%Y/g,n.date.slice(0,8)):l.replaceAll(/%amd[.~/-]%Y/g,n.date.slice(0,8).replaceAll(/[.~/-]/g,r.separator)):d?l.replaceAll(/[~]/g,n.dateSeparator):l}if(t?.multi){let e=z(n.multi[0]),t=z(n.multi[1]),r=z(n.multi[2]),i=z(n.multi[3]),o=z(n.multi[4]),s=z(n.multi[6]),c=z(n.multi[7]),l=z(n.multi[8]);a=n=>{let a;return a=He(n)<n?e:Ue(n)<n?t:We(n)<n?r:Ge(n)<n?i:ct(n)<n?Je(n)<n?o:s:F(n)<n?c:l,a(n)}}else a=ft(n).format(l)}else{let t={quarter_number:{min:1,max:4},month_name:{min:1,max:12},month_number:{min:1,max:12},week_number:{min:1,max:53},day_in_month:{min:1,max:31},day_in_year:{min:1,max:366},weekday_name:{min:0,max:7},weekday_number:{min:0,max:7},hour_in_day:{min:0,max:23},minute_in_hour:{min:0,max:59},second_in_minute:{min:0,max:59}};a=[`quarter_number`,`month_number`,`week_number`,`day_in_month`,`day_in_year`,`weekday_number`,`hour_in_day`,`minute_in_hour`,`second_in_minute`].includes(e.datetimeDisplayMode)?n=>g(n)&&n>=t[e.datetimeDisplayMode].min&&n<=t[e.datetimeDisplayMode].max?n:`N/A`:e.datetimeDisplayMode===`month_name`?r=>{let i=[...n.shortMonths],a=[...n.months];return g(r)&&r>=t[e.datetimeDisplayMode].min&&r<=t[e.datetimeDisplayMode].max?zn({shortNames:i,longNames:a},e.monthNameFormat,r-1):`N/A`}:e.datetimeDisplayMode===`weekday_name`?r=>{let i=[...n.shortDays],a=[...n.days];return e.weekStart===`monday`&&(i.push(i.shift()??``),a.push(a.shift()??``)),g(r)&&r>=t[e.datetimeDisplayMode].min&&r<=t[e.datetimeDisplayMode].max?zn({shortNames:i,longNames:a},e.weekDayNameFormat,r-1):`N/A`}:ft(n).format(l)}r=e=>{if(_(e))return``;let t=a(e);return m(t)?t.trim():t};break;case`hierarchy`:r=e=>x(e,t?t.locale:void 0);break;default:r=e=>e}return r}var Vn={HasDatetimeColumnAndNoComparisonFilters:`hasDatetimeColumnAndNoComparisonFilters`,NoDatetimeColumnAndNoComparisonFilters:`noDatetimeColumnAndNoComparisonFilters`,NoDatetimeColumnButComparisonFilters:`noDatetimeColumnButComparisonFilters`,HasDatetimeColumnAndComparisonFilters:`hasDatetimeColumnAndComparisonFilters`},Hn=/* @__PURE__ */ new Set([`area-chart`,`bar-chart`,`combination-chart`,`column-chart`,`line-chart`,`pivot-table`,`kpi`]);function Un(e,t){let n=t===`bar-chart`?`y-axis`:`x-axis`;return e.find(e=>t?e.name===n:[`x-axis`,`y-axis`].includes(e.name))?.content??[]}function Wn(e,t){let n=t===`pivot-table`?e.filter(e=>[`row`,`column`].includes(e.name)).flatMap(e=>e.content??[]).map(e=>({...e,set:e.set??e.datasetId,column:e.column??e.columnId})):[],r=Un(e,t);return{dimensions:n,category:t!==`pivot-table`&&t!==`kpi`&&r.length===1&&r[0].type===`datetime`?r[0]:void 0}}function Gn({slots:e,itemType:t,hasConnectedComparisonFilter:n=!1,hasRelatedDatetimeColumns:r=!1}){if(t&&!Hn.has(t)||t!==`pivot-table`&&t!==`kpi`&&Un(e,t).some(e=>e.type?.startsWith(`array[`)||e.level===4||e.datetimeDisplayMode&&e.datetimeDisplayMode!=="default"))return null;let{category:i}=Wn(e,t);return!i&&!n&&!r?null:i?n?Vn.HasDatetimeColumnAndComparisonFilters:Vn.HasDatetimeColumnAndNoComparisonFilters:n?Vn.NoDatetimeColumnButComparisonFilters:Vn.NoDatetimeColumnAndNoComparisonFilters}function Kn(e,t,n){let{dimensions:r,category:i}=Wn(t,n);return ge(e?.offsetDateColumn,r,i)}function qn(e,t,n){if(!e.periodOverPeriod)return e;let{category:r}=Wn(t,n);return{...e,periodOverPeriod:he(e.periodOverPeriod,!!r)}}var Jn=/* @__PURE__ */ new Set([`x-axis`,`y-axis`,`category`,`name`,`row`,`levels`]),Yn=/* @__PURE__ */ new Set([`legend`,`color`,`column`]),Xn=/* @__PURE__ */ new Set([`measure`,`comparison-measure`]),Zn={dimension:`mainGroupBy`,time:`mainGroupBy`,identifier:`mainGroupBy`,evolution:`mainGroupBy`,source:`mainGroupBy`,destination:`secondaryGroupBy`,open:`measure`,high:`measure`,low:`measure`,close:`measure`,target:`measure`,slidermetric:`measure`,geo:`other`,coordinates:`other`};function Qn(e){return e.type===`numeric`||e.type===`array[numeric]`?`numeric`:`dimension`}function $n(e){return Zn[e.slotName]||(Xn.has(e.slotName)?`measure`:Yn.has(e.slotName)?`secondaryGroupBy`:Jn.has(e.slotName)?`mainGroupBy`:e.slotType===`numeric`?`measure`:e.slotType===`categorical`?`mainGroupBy`:e.slotType===`mixed`?e.contentKind===`numeric`?`measure`:`mainGroupBy`:`other`)}function er(e){if(Array.isArray(e))return e}function tr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function nr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rr(e,t){if(e){if(typeof e==`string`)return nr(e,t);var n={}.toString.call(e).slice(8,-1);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)?nr(e,t):void 0}}function ir(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ar(e,t){return er(e)||tr(e,t)||rr(e,t)||ir()}var or=/* @__PURE__ */ ie((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bind=void 0;function t(e,t){var n=t.type,r=t.listener,i=t.options;return e.addEventListener(n,r,i),function(){e.removeEventListener(n,r,i)}}e.bind=t})),sr=/* @__PURE__ */ ie(((e,t,n)=>{var r=n&&n.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.bindAll=void 0;var i=or();function a(e){if(e!==void 0)return typeof e==`boolean`?{capture:e}:e}function o(e,t){return t==null?e:r(r({},e),{options:r(r({},a(t)),a(e.options))})}function s(e,t,n){var r=t.map(function(t){var r=o(t,n);return(0,i.bind)(e,r)});return function(){r.forEach(function(e){return e()})}}e.bindAll=s})),cr=/* @__PURE__ */ ie((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bindAll=e.bind=void 0;var t=or();Object.defineProperty(e,"bind",{enumerable:!0,get:function(){return t.bind}});var n=sr();Object.defineProperty(e,"bindAll",{enumerable:!0,get:function(){return n.bindAll}})}));function lr(e){"@babel/helpers - typeof";return lr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},lr(e)}function ur(e,t){if(lr(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(lr(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dr(e){var t=ur(e,`string`);return lr(t)==`symbol`?t:t+``}function fr(e,t,n){return(t=dr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pr=cr(),mr=2147483647,hr=`data-pdnd-honey-pot`;function gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gr(Object(n),!0).forEach(function(t){fr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var vr=2,yr=vr/2;function br(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function xr(e){return{x:e.x-yr,y:e.y-yr}}function Sr(e){return{x:Math.max(e.x,0),y:Math.max(e.y,0)}}function Cr(e){return{x:Math.min(e.x,window.innerWidth-vr),y:Math.min(e.y,window.innerHeight-vr)}}function wr(e){var t=e.client,n=Cr(Sr(xr(br(t))));return DOMRect.fromRect({x:n.x,y:n.y,width:vr,height:vr})}function Tr(e){var t=e.clientRect;return{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`}}function Er(e){var t=e.client,n=e.clientRect;return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}function Dr(e){var t=e.initial,n=document.createElement(`div`);n.setAttribute(hr,`true`);var r=wr({client:t});Object.assign(n.style,_r(_r({backgroundColor:`transparent`,position:`fixed`,padding:0,margin:0,boxSizing:`border-box`},Tr({clientRect:r})),{},{pointerEvents:`auto`,zIndex:mr})),document.body.appendChild(n);var i=(0,pr.bind)(window,{type:`pointermove`,listener:function(e){r=wr({client:{x:e.clientX,y:e.clientY}}),Object.assign(n.style,Tr({clientRect:r}))},options:{capture:!0}});return function(e){var t=e.current;if(i(),Er({client:t,clientRect:r})){n.remove();return}function a(){o(),n.remove()}var o=(0,pr.bindAll)(window,[{type:`pointerdown`,listener:a},{type:`pointermove`,listener:a},{type:`focusin`,listener:a},{type:`focusout`,listener:a},{type:`dragstart`,listener:a},{type:`dragenter`,listener:a},{type:`dragover`,listener:a}],{capture:!0})}}function Or(){var e=null;function t(){return e=null,(0,pr.bind)(window,{type:`pointermove`,listener:function(t){e={x:t.clientX,y:t.clientY}},options:{capture:!0}})}function n(){var t=null;return function(n){var r=n.eventName,i=n.payload;if(r===`onDragStart`){var a=i.location.initial.input;t=Dr({initial:e??{x:a.clientX,y:a.clientY}})}if(r===`onDrop`){var o,s=i.location.current.input;(o=t)==null||o({current:{x:s.clientX,y:s.clientY}}),t=null,e=null}}}return{bindEvents:t,getOnPostDispatch:n}}function kr(e){if(Array.isArray(e))return nr(e)}function Ar(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function jr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mr(e){return kr(e)||Ar(e)||rr(e)||jr()}function Nr(e){return e instanceof Element&&e.hasAttribute(`data-pdnd-honey-pot`)}function Pr(e){var t=ar(document.elementsFromPoint(e.x,e.y),2),n=t[0],r=t[1];return n?Nr(n)?r??null:n:null}function Fr(e){var t=null;return function(){if(!t){var n=[...arguments];t={result:e.apply(this,n)}}return t.result}}var Ir=Fr(function(){return navigator.userAgent.includes(`Firefox`)}),Lr=Fr(function(){var e=navigator.userAgent;return e.includes(`AppleWebKit`)&&!e.includes(`Chrome`)}),Rr={isLeavingWindow:Symbol(`leaving`),isEnteringWindow:Symbol(`entering`)};function zr(e){var t=e.dragLeave;return Lr()?t.hasOwnProperty(Rr.isLeavingWindow):!1}(function(){if(typeof window>`u`||!Lr())return;function e(){return{enterCount:0,isOverWindow:!1}}var t=e();function n(){t=e()}(0,pr.bindAll)(window,[{type:`dragstart`,listener:function(){t.enterCount=0,t.isOverWindow=!0}},{type:`drop`,listener:n},{type:`dragend`,listener:n},{type:`dragenter`,listener:function(e){!t.isOverWindow&&t.enterCount===0&&(e[Rr.isEnteringWindow]=!0),t.isOverWindow=!0,t.enterCount++}},{type:`dragleave`,listener:function(e){t.enterCount--,t.isOverWindow&&t.enterCount===0&&(e[Rr.isLeavingWindow]=!0,t.isOverWindow=!1)}}],{capture:!0})})();function Br(e){return`nodeName`in e}function Vr(e){return Br(e)&&e.ownerDocument!==document}function Hr(e){var t=e.dragLeave,n=t.type,r=t.relatedTarget;return n===`dragleave`?Lr()?zr({dragLeave:t}):r==null?!0:Ir()?Vr(r):r instanceof HTMLIFrameElement:!1}function Ur(e){var t=e.onDragEnd;return[{type:`pointermove`,listener:function(){var e=0;return function(){e<20?e++:t()}}()},{type:`pointerdown`,listener:t}]}function Wr(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var Gr=function(e){var t=[],n=null,r=function(){t=[...arguments],!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&=(cancelAnimationFrame(n),null)},r}(function(e){return e()}),Kr=function(){var e=null;function t(t){e={frameId:requestAnimationFrame(function(){e=null,t()}),fn:t}}function n(){e&&=(cancelAnimationFrame(e.frameId),e.fn(),null)}return{schedule:t,flush:n}}();function qr(e){var t=e.source,n=e.initial,r=e.dispatchEvent,i={dropTargets:[]};function a(e){r(e),i={dropTargets:e.payload.location.current.dropTargets}}return{start:function(e){var r=e.nativeSetDragImage,o={current:n,previous:i,initial:n};a({eventName:`onGenerateDragPreview`,payload:{source:t,location:o,nativeSetDragImage:r}}),Kr.schedule(function(){a({eventName:`onDragStart`,payload:{source:t,location:o}})})},dragUpdate:function(e){var r=e.current;Kr.flush(),Gr.cancel(),a({eventName:`onDropTargetChange`,payload:{source:t,location:{initial:n,previous:i,current:r}}})},drag:function(e){var r=e.current;Gr(function(){Kr.flush(),a({eventName:`onDrag`,payload:{source:t,location:{initial:n,previous:i,current:r}}})})},drop:function(e){var r=e.current,o=e.updatedSourcePayload;Kr.flush(),Gr.cancel(),a({eventName:`onDrop`,payload:{source:o??t,location:{current:r,previous:i,initial:n}}})}}}var Jr={isActive:!1};function Yr(){return!Jr.isActive}function Xr(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function Zr(e){var t=e.current,n=e.next;if(t.length!==n.length)return!0;for(var r=0;r<t.length;r++)if(t[r].element!==n[r].element)return!0;return!1}function Qr(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=e.dispatchEvent;if(!Yr())return;var a=ei({event:t,dragType:n,getDropTargetsOver:r});Jr.isActive=!0;var o={current:a};$r({event:t,current:a.dropTargets});var s=qr({source:n.payload,dispatchEvent:i,initial:a});function c(e){var t=Zr({current:o.current.dropTargets,next:e.dropTargets});o.current=e,t&&s.dragUpdate({current:o.current})}function l(e){var t=Wr(e),i=r({target:Nr(e.target)?Pr({x:t.clientX,y:t.clientY}):e.target,event:e,input:t,source:n.payload,current:o.current.dropTargets});i.length&&(e.cancelable&&e.preventDefault(),$r({event:e,current:i})),c({dropTargets:i,input:t})}function u(){o.current.dropTargets.length&&c({dropTargets:[],input:o.current.input}),s.drop({current:o.current,updatedSourcePayload:null}),d()}function d(){Jr.isActive=!1,f()}var f=(0,pr.bindAll)(window,[{type:`dragover`,listener:function(e){l(e),s.drag({current:o.current})}},{type:`dragenter`,listener:l},{type:`dragleave`,listener:function(e){Hr({dragLeave:e})&&(c({input:o.current.input,dropTargets:[]}),n.startedFrom===`external`&&u())}},{type:`drop`,listener:function(e){o.current={dropTargets:o.current.dropTargets,input:Wr(e)},o.current.dropTargets.length?(e.cancelable&&e.preventDefault(),$r({event:e,current:o.current.dropTargets}),s.drop({current:o.current,updatedSourcePayload:n.type===`external`?n.getDropPayload(e):null}),d()):u()}},{type:`dragend`,listener:function(e){o.current={dropTargets:o.current.dropTargets,input:Wr(e)},u()}}].concat(Mr(Ur({onDragEnd:u}))),{capture:!0});s.start({nativeSetDragImage:Xr(t)})}function $r(e){var t=e.event,n=e.current[0]?.dropEffect;n!=null&&t.dataTransfer&&(t.dataTransfer.dropEffect=n)}function ei(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=Wr(t);return n.startedFrom===`external`?{input:i,dropTargets:[]}:{input:i,dropTargets:r({input:i,source:n.payload,target:t.target,event:t,current:[]})}}var ti={canStart:Yr,start:Qr},ni=/* @__PURE__ */ new Map;function ri(e){var t=e.typeKey,n=e.mount,r=ni.get(t);if(r)return r.usageCount++,r;var i={typeKey:t,unmount:n(),usageCount:1};return ni.set(t,i),i}function ii(e){var t=ri(e);return function(){t.usageCount--,!(t.usageCount>0)&&(t.unmount(),ni.delete(e.typeKey))}}function ai(){var e=[...arguments];return function(){e.forEach(function(e){return e()})}}function oi(e,t){var n=t.attribute,r=t.value;return e.setAttribute(n,r),function(){return e.removeAttribute(n)}}function si(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?si(Object(n),!0).forEach(function(t){fr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):si(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ci(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=li(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function li(e,t){if(e){if(typeof e==`string`)return ui(e,t);var n={}.toString.call(e).slice(8,-1);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)?ui(e,t):void 0}}function ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function di(e){return e.slice(0).reverse()}function fi(e){var t=e.typeKey,n=e.defaultDropEffect,r=/* @__PURE__ */ new WeakMap,i=`data-drop-target-for-${t}`,a=`[${i}]`;function o(e){return r.set(e.element,e),function(){return r.delete(e.element)}}function s(e){return ai(oi(e.element,{attribute:i,value:`true`}),o(e))}function c(e){var t=e.source,i=e.target,o=e.input,s=e.event,l=e.result,u=l===void 0?[]:l;if(s===void 0)return u;let d=s.composedPath();if(i=d.find(e=>e instanceof Element&&e.hasAttribute(`data-drop-target-for-element`)),i??=d[0],!(i instanceof Element))return i instanceof Node?c({source:t,target:i.parentElement,input:o,result:u}):u;var f=i.closest(a);if(f==null)return u;var p=r.get(f);if(p==null)return u;var m={input:o,source:t,element:p.element};if(p.canDrop&&!p.canDrop(m))return c({source:t,target:p.element.parentElement,input:o,result:u});var h=p.getData?.call(p,m)??{},g=p.getDropEffect?.call(p,m)??n,_={data:h,element:p.element,dropEffect:g,isActiveDueToStickiness:!1};return c({source:t,target:p.element.parentElement,input:o,result:[].concat(Mr(u),[_])})}function l(e){var t=e.eventName,n=e.payload,i=ci(n.location.current.dropTargets),a;try{for(i.s();!(a=i.n()).done;){var o,s=a.value,c=r.get(s.element),l=B(B({},n),{},{self:s});c==null||(o=c[t])==null||o.call(c,l)}}catch(e){i.e(e)}finally{i.f()}}var u={onGenerateDragPreview:l,onDrag:l,onDragStart:l,onDrop:l,onDropTargetChange:function(e){var t=e.payload,n=new Set(t.location.current.dropTargets.map(function(e){return e.element})),i=/* @__PURE__ */ new Set,a=ci(t.location.previous.dropTargets),o;try{for(a.s();!(o=a.n()).done;){var s,c=o.value;i.add(c.element);var l=r.get(c.element),u=n.has(c.element),d=B(B({},t),{},{self:c});if(l==null||(s=l.onDropTargetChange)==null||s.call(l,d),!u){var f;l==null||(f=l.onDragLeave)==null||f.call(l,d)}}}catch(e){a.e(e)}finally{a.f()}var p=ci(t.location.current.dropTargets),m;try{for(p.s();!(m=p.n()).done;){var h,g,_=m.value;if(!i.has(_.element)){var v=B(B({},t),{},{self:_}),y=r.get(_.element);y==null||(h=y.onDropTargetChange)==null||h.call(y,v),y==null||(g=y.onDragEnter)==null||g.call(y,v)}}}catch(e){p.e(e)}finally{p.f()}}};function d(e){u[e.eventName](e)}function f(e){var t=e.source,n=e.target,i=e.input,a=e.event,o=e.current,s=c({source:t,target:n,event:a,input:i});if(s.length>=o.length)return s;for(var l=di(o),u=di(s),d=[],f=0;f<l.length;f++){var p,m=l[f],h=u[f];if(h!=null)d.push(h);else{var g=d[f-1],_=l[f-1];if(g?.element!==_?.element)break;var v=r.get(m.element);if(!v)break;var y={input:i,source:t,element:v.element};if(v.canDrop&&!v.canDrop(y)||!((p=v.getIsSticky)!=null&&p.call(v,y)))break;d.push(B(B({},m),{},{isActiveDueToStickiness:!0}))}}return di(d)}return{dropTargetForConsumers:s,getIsOver:f,dispatchEvent:d}}function pi(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=mi(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function mi(e,t){if(e){if(typeof e==`string`)return hi(e,t);var n={}.toString.call(e).slice(8,-1);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)?hi(e,t):void 0}}function hi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gi(Object(n),!0).forEach(function(t){fr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vi(){var e=/* @__PURE__ */ new Set,t=null;function n(e){t&&(!e.canMonitor||e.canMonitor(t.canMonitorArgs))&&t.active.add(e)}function r(r){var i=_i({},r);return e.add(i),n(i),function(){e.delete(i),t&&t.active.delete(i)}}function i(r){var i=r.eventName,a=r.payload;if(i===`onGenerateDragPreview`){t={canMonitorArgs:{initial:a.location.initial,source:a.source},active:/* @__PURE__ */ new Set};var o=pi(e),s;try{for(o.s();!(s=o.n()).done;){var c=s.value;n(c)}}catch(e){o.e(e)}finally{o.f()}}if(t){for(var l=Array.from(t.active),u=0,d=l;u<d.length;u++){var f=d[u];if(t.active.has(f)){var p;(p=f[i])==null||p.call(f,a)}}i===`onDrop`&&(t.active.clear(),t=null)}}return{dispatchEvent:i,monitorForConsumers:r}}function yi(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,i=e.onPostDispatch,a=e.defaultDropEffect,o=vi(),s=fi({typeKey:t,defaultDropEffect:a});function c(e){r?.(e),s.dispatchEvent(e),o.dispatchEvent(e),i?.(e)}function l(e){var t=e.event,n=e.dragType;ti.start({event:t,dragType:n,getDropTargetsOver:s.getIsOver,dispatchEvent:c})}function u(){function e(){return n({canStart:ti.canStart,start:l})}return ii({typeKey:t,mount:e})}return{registerUsage:u,dropTarget:s.dropTargetForConsumers,monitor:o.monitorForConsumers}}var bi=Fr(function(){return navigator.userAgent.toLocaleLowerCase().includes(`android`)}),xi=`pdnd:android-fallback`,Si=`text/plain`,Ci=`application/vnd.pdnd`,wi=/* @__PURE__ */ new WeakMap;function Ti(e){return wi.set(e.element,e),function(){wi.delete(e.element)}}var Ei=Or(),Di=yi({typeKey:`element`,defaultDropEffect:`move`,mount:function(e){return ai(Ei.bindEvents(),(0,pr.bind)(document,{type:`dragstart`,listener:function(t){if(!e.canStart(t)||t.defaultPrevented||!t.dataTransfer)return;let n=t.composedPath().find(e=>e instanceof HTMLElement&&wi.has(e));if(!n)return null;let r=wi.get(n);if(!r)return null;var i=Wr(t),a={element:r.element,dragHandle:r.dragHandle??null,input:i};if(r.canDrag&&!r.canDrag(a))return t.preventDefault(),null;if(r.dragHandle){let e=(n.shadowRoot||document).elementFromPoint(i.clientX,i.clientY);if(!r.dragHandle.contains(e))return t.preventDefault(),null}var o=r.getInitialDataForExternal?.call(r,a)??null;if(o)for(var s=0,c=Object.entries(o);s<c.length;s++){var l=ar(c[s],2),u=l[0],d=l[1];t.dataTransfer.setData(u,d??``)}bi()&&!t.dataTransfer.types.includes(`text/plain`)&&!t.dataTransfer.types.includes(`text/uri-list`)&&t.dataTransfer.setData(Si,xi),t.dataTransfer.setData(Ci,``);var f={type:`element`,payload:{element:r.element,dragHandle:r.dragHandle??null,data:r.getInitialData?.call(r,a)??{}},startedFrom:`internal`};e.start({event:t,dragType:f})}}))},dispatchEventToSource:function(e){var t,n,r=e.eventName,i=e.payload;(t=wi.get(i.source.element))==null||(n=t[r])==null||n.call(t,i)},onPostDispatch:Ei.getOnPostDispatch()}),Oi=Di.dropTarget,ki=Di.monitor;function Ai(e){return ai(Di.registerUsage(),Ti(e),oi(e.element,{attribute:`draggable`,value:`true`}))}var ji=/* @__PURE__ */ ae({draggable:()=>Ai,dropTargetForElements:()=>Oi,monitorForElements:()=>ki}),Mi=Symbol.for(`@luzmo/analytics-components-kit/drag/element-adapter`),Ni=globalThis,Pi=Ni[Mi];Pi===void 0&&(Pi=ji,Ni[Mi]=ji);var{draggable:Fi,dropTargetForElements:Ii,monitorForElements:Li}=Pi;function Ri(e,t,n){return{icon:l({type:e?.type??`hierarchy`,subtype:e?.subtype,lowestLevel:e?.lowestLevel},`s`),label:e?x(e.name,t):n}}var V=String.raw`[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}`,zi=RegExp(`##EMPTYARG-(${V})##|{(${V}:${V})}|##AGGR-(${V})##`,`gm`),Bi=RegExp(`##EMPTYARG-(${V})##|{(${V}:${V})}`,`gm`),Vi=/((GROUPFULL|GROUPINEX)\()?(AVG|COUNT|COUNTD|COUNTR|MAX|MIN|SUM)\(/m,Hi=RegExp(`##AGGR-(${V})##`,`m`),Ui=/\[(.*?)\]/gm,Wi=RegExp(`{(${V}:${V})}`,`gm`),Gi=[`AVG`,`COUNT`,`COUNTD`,`COUNTR`,`MAX`,`MIN`,`SUM`];function Ki(){return{AVG:{arity:1,label:()=>t(`Average`,{desc:`Aggregation label`}),description:()=>t(`Calculates the average of the values.`,{desc:`Formula aggregation description for AVG`}),example:()=>`AVG(⟨numeric⟩ Order Value)`,exampleHasIcons:!0},COUNT:{arity:1,label:()=>t(`Count`,{desc:`Aggregation label`}),description:()=>t(`Counts the number of non-empty values.`,{desc:`Formula aggregation description for COUNT`}),example:()=>`COUNT(⟨numeric⟩ Order Number)`,exampleHasIcons:!0},COUNTD:{arity:1,label:()=>t(`Count distinct`,{desc:`Aggregation label`}),description:()=>t(`Counts the number of distinct values.`,{desc:`Formula aggregation description for COUNTD`}),example:()=>`COUNTD(⟨numeric⟩ Customer ID)`,exampleHasIcons:!0},COUNTR:{arity:0,label:()=>t(`Count rows`,{desc:`Aggregation label`}),description:()=>t(`Counts the number of rows.`,{desc:`Formula aggregation description for COUNTR`}),example:()=>`COUNTR()`},MAX:{arity:1,label:()=>t(`Maximum`,{desc:`Aggregation label`}),description:()=>t(`Returns the largest value.`,{desc:`Formula aggregation description for MAX`}),example:()=>`MAX(⟨numeric⟩ Order Value)`,exampleHasIcons:!0},MIN:{arity:1,label:()=>t(`Minimum`,{desc:`Aggregation label`}),description:()=>t(`Returns the smallest value.`,{desc:`Formula aggregation description for MIN`}),example:()=>`MIN(⟨numeric⟩ Order Value)`,exampleHasIcons:!0},SUM:{arity:1,label:()=>t(`Sum`,{desc:`Aggregation label`}),description:()=>t(`Adds up all the values.`,{desc:`Formula aggregation description for SUM`}),example:()=>`SUM(⟨numeric⟩ Quantity Sold)`,exampleHasIcons:!0}}}var H=/* @__PURE__ */ function(e){return e.GROUP=``,e.GROUPFULL=`GROUPFULL`,e.GROUPINEX=`GROUPINEX`,e}({}),qi=[H.GROUP,H.GROUPFULL,H.GROUPINEX];function Ji(){return{[H.GROUP]:{label:()=>t(`Grouped`,{desc:`Formula aggregation grouping label for grouped scope`}),description:()=>t(`Aggregates within the current grouping of the chart.`,{desc:`Formula aggregation grouping description for grouped scope`}),icon:ce,color:`var(--luzmo-formula-grouping-color-grouped, #625df6)`},[H.GROUPFULL]:{label:()=>t(`Full`,{desc:`Formula aggregation grouping label for full scope`}),description:()=>t(`Aggregates across the entire dataset, ignoring the chart grouping.`,{desc:`Formula aggregation grouping description for full scope`}),icon:le,color:`var(--luzmo-formula-grouping-color-full, #0ca789)`},[H.GROUPINEX]:{label:()=>t(`Include / exclude`,{desc:`Formula aggregation grouping label for include/exclude scope`}),description:()=>t(`Aggregates over a custom grouping built from included and excluded columns.`,{desc:`Formula aggregation grouping description for include/exclude scope`}),icon:ue,color:`var(--luzmo-formula-grouping-color-include-exclude, #f00f65)`}}}var Yi=S(()=>import(`./formula-codemirror-BqV2Lr6d.js`));async function Xi(){await Yi.load()}function Zi(){return Yi.isLoaded()}var Qi={Category:()=>t(`Category`,{desc:`Category slot label`}),Measure:()=>t(`Measure`,{desc:`Measure slot label`}),Measures:()=>t(`Measures`,{desc:`Measures slot label`}),Legend:()=>t(`Legend`,{desc:`Legend slot label`}),"Group by":()=>t(`Group by`,{desc:`Group by slot label`}),"Y-Axis":()=>t(`Y-Axis`,{desc:`Y-Axis slot label`}),"X-Axis":()=>t(`X-Axis`,{desc:`X-Axis slot label`}),Dimension:()=>t(`Dimension`,{desc:`Dimension slot label`}),Datetime:()=>t(`Datetime`,{desc:`Datetime slot label`}),"Slider metric":()=>t(`Slider metric`,{desc:`Slider metric slot label`}),Bins:()=>t(`Bins`,{desc:`Bins slot label`}),Circles:()=>t(`Circles`,{desc:`Circles slot label`}),Close:()=>t(`Close`,{desc:`Close slot label`}),Color:()=>t(`Color`,{desc:`Color slot label`}),Columns:()=>t(`Columns`,{desc:`Columns slot label`}),Coordinates:()=>t(`Coordinates`,{desc:`Coordinates slot label`}),Destination:()=>t(`Destination`,{desc:`Destination slot label`}),Evolution:()=>t(`Evolution`,{desc:`Evolution slot label`}),Geography:()=>t(`Geography`,{desc:`Geography slot label`}),High:()=>t(`High`,{desc:`High slot label`}),Identifier:()=>t(`Identifier`,{desc:`Identifier slot label`}),Levels:()=>t(`Levels`,{desc:`Levels slot label`}),Low:()=>t(`Low`,{desc:`Low slot label`}),Name:()=>t(`Name`,{id:`slot-label-name`,desc:`Name slot label`}),Open:()=>t(`Open`,{desc:`Open slot label`}),Order:()=>t(`Order`,{desc:`Order slot label`}),Route:()=>t(`Route`,{desc:`Route slot label`}),Rows:()=>t(`Rows`,{desc:`Rows slot label`}),Size:()=>t(`Size`,{desc:`Size slot label`}),Source:()=>t(`Source`,{desc:`Source slot label`}),Target:()=>t(`Target`,{desc:`Target slot label`}),Time:()=>t(`Time`,{id:`slot-label-time`,desc:`Time slot label`})},$i=class extends Event{constructor(e,t,n,r){super(`context-request`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=n,this.subscribe=r??!1}};function ea(e){return e}var ta=class{constructor(e,t,n,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,t.context!==void 0){let e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=n,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&=(this.unsubscribe(),void 0)}dispatchRequest(){this.host.dispatchEvent(new $i(this.context,this.host,this.t,this.subscribe))}},na=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){let n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=/* @__PURE__ */ new Map,this.updateObservers=()=>{for(let[e,{disposer:t}]of this.subscriptions)e(this.o,t)},e!==void 0&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});let{disposer:r}=this.subscriptions.get(e);e(this.value,r)}clearCallbacks(){this.subscriptions.clear()}},ra=class extends Event{constructor(e,t){super(`context-provider`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},ia=class extends na{constructor(e,t,n){super(t.context===void 0?n:t.initialValue),this.onContextRequest=e=>{if(e.context!==this.context)return;let t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context||(e.contextTarget??e.composedPath()[0])===this.host)return;let t=/* @__PURE__ */ new Set;for(let[e,{consumerHost:n}]of this.subscriptions)t.has(e)||(t.add(e),n.dispatchEvent(new $i(this.context,n,e,!0)));e.stopPropagation()},this.host=e,this.context=t.context===void 0?t:t.context,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(`context-request`,this.onContextRequest),this.host.addEventListener(`context-provider`,this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new ra(this.context,this.host))}};function aa({context:e,subscribe:t}){return(n,r)=>{typeof r==`object`?r.addInitializer((function(){new ta(this,{context:e,callback:e=>{n.set.call(this,e)},subscribe:t})})):n.constructor.addInitializer((n=>{new ta(n,{context:e,callback:e=>{n[r]=e},subscribe:t})}))}}var oa=[`datetime`,`hierarchy`,`numeric`,`spatial`,`array[datetime]`,`array[numeric]`,`array[hierarchy]`,`array[spatial]`],sa=ea(Symbol(`slot-store-context`)),ca=Object.defineProperty,la=(e,t,n)=>t in e?ca(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ua=(e,t,n)=>(la(e,typeof t==`symbol`?t:t+``,n),n),da=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},fa=(e,t)=>{if(Object(t)!==t)throw TypeError(`Cannot use the "in" operator on this value`);return e.has(t)},pa=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},ma=(e,t,n)=>(da(e,t,`access private method`),n);function ha(e,t){return Object.is(e,t)}var U=null,ga=!1,_a=1,va=/* @__PURE__ */ Symbol(`SIGNAL`);function ya(e){let t=U;return U=e,t}function ba(){return U}function xa(){return ga}var Sa={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ca(e){if(ga)throw Error(typeof ngDevMode<`u`&&ngDevMode?`Assertion error: signal read during notification phase`:``);if(U===null)return;U.consumerOnSignalRead(e);let t=U.nextProducerIndex++;if(Fa(U),t<U.producerNode.length&&U.producerNode[t]!==e&&Pa(U)){let e=U.producerNode[t];Na(e,U.producerIndexOfThis[t])}U.producerNode[t]!==e&&(U.producerNode[t]=e,U.producerIndexOfThis[t]=Pa(U)?Ma(e,U,t):0),U.producerLastReadVersion[t]=e.version}function wa(){_a++}function Ta(e){(e.dirty||e.lastCleanEpoch!==_a)&&(!e.producerMustRecompute(e)&&!ja(e)?(e.dirty=!1,e.lastCleanEpoch=_a):(e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=_a))}function Ea(e){if(e.liveConsumerNode===void 0)return;let t=ga;ga=!0;try{for(let t of e.liveConsumerNode)t.dirty||Oa(t)}finally{ga=t}}function Da(){return U?.consumerAllowSignalWrites!==!1}function Oa(e){var t;e.dirty=!0,Ea(e),(t=e.consumerMarkedDirty)==null||t.call(e.wrapper??e)}function ka(e){return e&&(e.nextProducerIndex=0),ya(e)}function Aa(e,t){if(ya(t),e&&e.producerNode!==void 0&&e.producerIndexOfThis!==void 0&&e.producerLastReadVersion!==void 0){if(Pa(e))for(let t=e.nextProducerIndex;t<e.producerNode.length;t++)Na(e.producerNode[t],e.producerIndexOfThis[t]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function ja(e){Fa(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(Ta(n),r!==n.version))return!0}return!1}function Ma(e,t,n){var r;if(Ia(e),Fa(e),e.liveConsumerNode.length===0){(r=e.watched)==null||r.call(e.wrapper);for(let t=0;t<e.producerNode.length;t++)e.producerIndexOfThis[t]=Ma(e.producerNode[t],e,t)}return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function Na(e,t){var n;if(Ia(e),Fa(e),typeof ngDevMode<`u`&&ngDevMode&&t>=e.liveConsumerNode.length)throw Error(`Assertion error: active consumer index ${t} is out of bounds of ${e.liveConsumerNode.length} consumers)`);if(e.liveConsumerNode.length===1){(n=e.unwatched)==null||n.call(e.wrapper);for(let t=0;t<e.producerNode.length;t++)Na(e.producerNode[t],e.producerIndexOfThis[t])}let r=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[r],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[r],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let n=e.liveConsumerIndexOfThis[t],r=e.liveConsumerNode[t];Fa(r),r.producerIndexOfThis[n]=t}}function Pa(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function Fa(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function Ia(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function La(e){if(Ta(e),Ca(e),e.value===Va)throw e.error;return e.value}function Ra(e){let t=Object.create(Ha);t.computation=e;let n=()=>La(t);return n[va]=t,n}var za=/* @__PURE__ */ Symbol(`UNSET`),Ba=/* @__PURE__ */ Symbol(`COMPUTING`),Va=/* @__PURE__ */ Symbol(`ERRORED`),Ha={...Sa,value:za,dirty:!0,error:null,equal:ha,producerMustRecompute(e){return e.value===za||e.value===Ba},producerRecomputeValue(e){if(e.value===Ba)throw Error(`Detected cycle in computations.`);let t=e.value;e.value=Ba;let n=ka(e),r,i=!1;try{r=e.computation.call(e.wrapper),i=t!==za&&t!==Va&&e.equal.call(e.wrapper,t,r)}catch(t){r=Va,e.error=t}finally{Aa(e,n)}i?e.value=t:(e.value=r,e.version++)}};function Ua(){throw Error()}var Wa=Ua;function Ga(){Wa()}function Ka(e){let t=Object.create(Ya);t.value=e;let n=()=>(Ca(t),t.value);return n[va]=t,n}function qa(){return Ca(this),this.value}function Ja(e,t){Da()||Ga(),e.equal.call(e.wrapper,e.value,t)||(e.value=t,Xa(e))}var Ya={...Sa,equal:ha,value:void 0};function Xa(e){e.version++,wa(),Ea(e)}var W=Symbol(`node`),G;(e=>{var t,n,r,i;class a{constructor(r,i={}){pa(this,n),ua(this,t);let a=Ka(r)[va];if(this[W]=a,a.wrapper=this,i){let t=i.equals;t&&(a.equal=t),a.watched=i[e.subtle.watched],a.unwatched=i[e.subtle.unwatched]}}get(){if(!(0,e.isState)(this))throw TypeError(`Wrong receiver type for Signal.State.prototype.get`);return qa.call(this[W])}set(t){if(!(0,e.isState)(this))throw TypeError(`Wrong receiver type for Signal.State.prototype.set`);if(xa())throw Error(`Writes to signals not permitted during Watcher callback`);let n=this[W];Ja(n,t)}}t=W,n=/* @__PURE__ */ new WeakSet,e.isState=e=>typeof e==`object`&&fa(n,e),e.State=a;class o{constructor(t,n){pa(this,i),ua(this,r);let a=Ra(t)[va];if(a.consumerAllowSignalWrites=!0,this[W]=a,a.wrapper=this,n){let t=n.equals;t&&(a.equal=t),a.watched=n[e.subtle.watched],a.unwatched=n[e.subtle.unwatched]}}get(){if(!(0,e.isComputed)(this))throw TypeError(`Wrong receiver type for Signal.Computed.prototype.get`);return La(this[W])}}r=W,i=/* @__PURE__ */ new WeakSet,e.isComputed=e=>typeof e==`object`&&fa(i,e),e.Computed=o,(t=>{var n,r,i,a;function o(e){let t,n=null;try{n=ya(null),t=e()}finally{ya(n)}return t}t.untrack=o;function s(t){if(!(0,e.isComputed)(t)&&!(0,e.isWatcher)(t))throw TypeError(`Called introspectSources without a Computed or Watcher argument`);return t[W].producerNode?.map(e=>e.wrapper)??[]}t.introspectSources=s;function c(t){if(!(0,e.isComputed)(t)&&!(0,e.isState)(t))throw TypeError(`Called introspectSinks without a Signal argument`);return t[W].liveConsumerNode?.map(e=>e.wrapper)??[]}t.introspectSinks=c;function l(t){if(!(0,e.isComputed)(t)&&!(0,e.isState)(t))throw TypeError(`Called hasSinks without a Signal argument`);let n=t[W].liveConsumerNode;return n?n.length>0:!1}t.hasSinks=l;function u(t){if(!(0,e.isComputed)(t)&&!(0,e.isWatcher)(t))throw TypeError(`Called hasSources without a Computed or Watcher argument`);let n=t[W].producerNode;return n?n.length>0:!1}t.hasSources=u;class d{constructor(e){pa(this,r),pa(this,i),ua(this,n);let t=Object.create(Sa);t.wrapper=this,t.consumerMarkedDirty=e,t.consumerIsAlwaysLive=!0,t.consumerAllowSignalWrites=!1,t.producerNode=[],this[W]=t}watch(...t){if(!(0,e.isWatcher)(this))throw TypeError(`Called unwatch without Watcher receiver`);ma(this,i,a).call(this,t);let n=this[W];n.dirty=!1;let r=ya(n);for(let e of t)Ca(e[W]);ya(r)}unwatch(...t){if(!(0,e.isWatcher)(this))throw TypeError(`Called unwatch without Watcher receiver`);ma(this,i,a).call(this,t);let n=this[W];Fa(n);for(let e=n.producerNode.length-1;e>=0;e--)if(t.includes(n.producerNode[e].wrapper)){Na(n.producerNode[e],n.producerIndexOfThis[e]);let t=n.producerNode.length-1;if(n.producerNode[e]=n.producerNode[t],n.producerIndexOfThis[e]=n.producerIndexOfThis[t],n.producerNode.length--,n.producerIndexOfThis.length--,n.nextProducerIndex--,e<n.producerNode.length){let t=n.producerIndexOfThis[e],r=n.producerNode[e];Ia(r),r.liveConsumerIndexOfThis[t]=e}}}getPending(){if(!(0,e.isWatcher)(this))throw TypeError(`Called getPending without Watcher receiver`);return this[W].producerNode.filter(e=>e.dirty).map(e=>e.wrapper)}}n=W,r=/* @__PURE__ */ new WeakSet,i=/* @__PURE__ */ new WeakSet,a=function(t){for(let n of t)if(!(0,e.isComputed)(n)&&!(0,e.isState)(n))throw TypeError(`Called watch/unwatch without a Computed or State argument`)},e.isWatcher=e=>fa(r,e),t.Watcher=d;function f(){return ba()?.wrapper}t.currentComputed=f,t.watched=Symbol(`watched`),t.unwatched=Symbol(`unwatched`)})(e.subtle||={})})(G||={});var Za=Symbol(`SignalWatcherBrand`),Qa=new FinalizationRegistry((({watcher:e,signal:t})=>{e.unwatch(t)})),$a=/* @__PURE__ */ new WeakMap;function eo(e){return!0===e[Za]?(console.warn(`SignalWatcher should not be applied to the same class more than once.`),e):class extends e{constructor(){super(...arguments),this._$St=new G.State(0),this._$Si=!1,this._$So=!0,this._$Sh=/* @__PURE__ */ new Set}_$Sl(){if(this._$Su!==void 0)return;this._$Sv=new G.Computed((()=>{this._$St.get(),super.performUpdate()}));let e=this._$Su=new G.subtle.Watcher((function(){let e=$a.get(this);e!==void 0&&(!1===e._$Si&&e.requestUpdate(),this.watch())}));$a.set(e,this),Qa.register(this,{watcher:e,signal:this._$Sv}),e.watch(this._$Sv)}_$Sp(){this._$Su!==void 0&&(this._$Su.unwatch(this._$Sv),this._$Sv=void 0,this._$Su=void 0)}performUpdate(){this.isUpdatePending&&(this._$Sl(),this._$Si=!0,this._$St.set(this._$St.get()+1),this._$Si=!1,this._$Sv.get())}update(e){try{this._$So?(this._$So=!1,super.update(e)):this._$Sh.forEach((e=>e.commit()))}finally{this.isUpdatePending=!1,this._$Sh.clear()}}requestUpdate(e,t,n){this._$So=!0,super.requestUpdate(e,t,n)}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask((()=>{!1===this.isConnected&&this._$Sp()}))}_(e){this._$Sh.add(e);let t=this._$So;this.requestUpdate(),this._$So=t}m(e){this._$Sh.delete(e)}}}ee(class extends w{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new G.Computed((()=>this._$Sj?.get()));let e=this._$Su=new G.subtle.Watcher((()=>{var t;(t=this._$SO)==null||t._(this),e.watch()}));e.watch(this._$SW)}_$Sp(){var e;this._$Su!==void 0&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,(e=this._$SO)==null||e.m(this))}commit(){this.setValue(G.subtle.untrack((()=>this._$SW?.get())))}render(e){return G.subtle.untrack((()=>e.get()))}update(e,[t]){return this._$SO??=e.options?.host,t!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=t,this._$Sl(),G.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}}),G.State,G.Computed;var K=(e,t)=>new G.State(e,t),to=(e,t)=>new G.Computed(e,t),no=class{constructor(){this.slotContents=K([]),this.slotsContents=K([]),this.periodOverPeriodUiType=K(null),this.periodOverPeriodAllowsPeriodsWithoutDatetimeColumn=K(!1),this.periodOverPeriodHidesPastValue=K(!1),this.linkedDataset=K([]),this.hasConnectedComparisonFilter=K(!1),this.itemType=K(void 0),this._popPeriodsWithoutDatetimeColumnItemTypes=[`kpi`],this._popWithoutPastValueItemTypes=[`kpi`],this.activeSlotContents=to(()=>this.slotContents.get()[this.activeIndex.get()]),this.activeIndex=K(0)}setPeriodOverPeriodCondition(e,t){this.periodOverPeriodAllowsPeriodsWithoutDatetimeColumn.set(this._popPeriodsWithoutDatetimeColumnItemTypes.includes(e)),this.periodOverPeriodHidesPastValue.set(this._popWithoutPastValueItemTypes.includes(e)),this.itemType.set(e),this.periodOverPeriodUiType.set(this.getUiConditionToApply())}getUiConditionToApply(){return Gn({slots:this.slotsContents.get(),itemType:this.itemType.get(),hasConnectedComparisonFilter:this.hasConnectedComparisonFilter.get(),hasRelatedDatetimeColumns:this.linkedDataset.get().some(({columns:e})=>e?.some(e=>e.type===`datetime`))})}setContents(e,t){if(this.slotContents.set(e),this.activeIndex.get()>=e.length&&this.activeIndex.set(e.length>0?e.length-1:0),t){let n=structuredClone(this.slotsContents.get())??[],r=n.find(e=>e.name===t);r&&(r.content=e),this.setFullContents(n)}}setFullContents(e){this.slotsContents.set(e)}updateActive(e){e>=0&&e<this.slotContents.get().length&&this.activeIndex.set(e)}updateContent(e,t=this.activeIndex.get()){if(t<0||t>=this.slotContents.get().length)return;let n=[...this.slotContents.get()];n[t]=structuredClone(e),this.slotContents.set(n)}removeContent(e){if(e<0||e>=this.slotContents.get().length)return;let t=this.slotContents.get().filter((t,n)=>n!==e);this.slotContents.set(t),this.activeIndex.get()>=t.length&&this.activeIndex.set(t.length>0?t.length-1:0)}},ro=e=>typeof e==`string`&&e.trim().length>0,io=e=>!(!e||!ro(e.formula)||e.formulaId||v(e.formula)),ao=e=>!(!e||!ro(e.expression)||e.columnId||e.column||e.formulaId||e.formula),oo=e=>ao(e)?e?.expression:io(e)?e?.formula:void 0,so=e=>e?.columnId??e?.formulaId??e?.column??e?.formula??e?.expression,q=(e,t)=>ao(e)?!0:!e||!io(e)?!1:$n({slotName:String(t.name??``),slotType:t.type,contentKind:Qn(e)})===`measure`,co=e=>{let n=io(e);return E`<span class="calculation-label">
7
+ <span class="calculation-label-icon" aria-hidden="true">${f(n?s:c)}</span>
8
+ <span>${n?t(`Formula`,{desc:`Label for the formula type`}):t(`Expression`,{desc:`Label for the expression type`})}</span>
9
+ </span>`},lo=(e,t)=>{let n={type:e.type,datasetId:e.datasetId,set:e.datasetId};`columnId`in e&&!_(e.columnId)&&e.columnId!==``?(n.columnId=e.columnId,n.column=e.columnId):`formulaId`in e&&!_(e.formulaId)&&e.formulaId!==``?(n.formulaId=e.formulaId,n.formula=e.formulaId):`formula`in e&&typeof e.formula==`string`&&e.formula!==``&&(n.formula=e.formula);let r=e.type===`datetime`||e.type===`array[datetime]`,i={...e.name??{en:`Untitled`}},a=e.level;if(r&&(a=a??e.lowestLevel??9,t)){let e=Fn.shortLevels?.filter(e=>e!==`All`)??[],t=e[Math.max(0,Math.min(e.length-1,(a??1)-1))];if(t){let e=`(${t})`,n=Object.keys(i);for(let t of n)i[t]=`${i[t]} ${e}`}}return n.label=i,_(e.subtype)||(n.subtype=e.subtype),`lowestLevel`in e&&!_(e.lowestLevel)&&(n.lowestLevel=e.lowestLevel),_(e.format)||(n.format=e.format),_(a)||(n.level=a),_(e.lowestLevel)||(n.lowestLevel=e.lowestLevel),e.type===`numeric`&&e.subtype===`currency`&&e.currency?.symbol&&(n.currency=e.currency.symbol),Array.isArray(e.duration_levels)&&e.duration_format&&(n.duration={levels:e.duration_levels,format:e.duration_format}),n};function uo(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}function fo(e){return`##AGGR-${e}##`}function po(e,t){let{aggregationFunction:n,content:r,grouping:i,includedColumns:a,excludedColumns:o}=e??{},s=`${n}(${t[n]?.arity>0?r:``})`;switch(i){case H.GROUPFULL:return`GROUPFULL(${s})`;case H.GROUPINEX:return`GROUPINEX(${s}, [${a?.map(e=>`{${e}}`).join(`, `)||``}], [${o?.map(e=>`{${e}}`).join(`, `)||``}])`;default:return s}}function mo(e){let t=e.split(``),n=null;for(let e=0;e<t.length;e++){let r=t[e];n?r===n?n=null:t[e]=` `:(r===`'`||r===`"`)&&(n=r)}return t.join(``)}function ho(e,t=0){let n=0,r=-1,i=null;for(let a=t,o=e.length;a<o;a++){let t=e[a];if(i)t===i&&(i=null);else if(t===`'`||t===`"`)i=t;else if(t===`(`)n++;else if(t===`)`){if(n===0){r=a;break}n--}}return r}function go(e){let t=e.match(Ui),n=t?.[0],r=t?.[1];return{includedColumns:n?.match(Wi)?.map(e=>e.slice(1,-1))??[],excludedColumns:r?.match(Wi)?.map(e=>e.slice(1,-1))??[]}}function _o(e=`light`){return!e||e===`light`?[`#0E89E0`,`#F45000`,`#15BF49`,`#685AC2`,`#636363`]:[`#BDDCF9`,`#FFCFA1`,`#C1F3B7`,`#D7D7EF`,`#D7D7EF`]}function vo(e){let t=_o(`light`),n=e.length>1;return e.map((e,r)=>{let i=[];return`dataFields`in e&&Array.isArray(e.dataFields)&&e.dataFields.length>0?i=e.dataFields.filter(e=>!!e.columnId):`columns`in e&&Array.isArray(e.columns)&&(i=e.columns.map(t=>{let n=`columnId`in t&&typeof t.columnId==`string`?t.columnId:`id`in t&&typeof t.id==`string`?t.id:void 0;if(n)return{...t,columnId:n,datasetId:e.id}}).filter(e=>!!e)),{id:e.id,name:e.name,description:`description`in e?e.description:void 0,color:n?t[r%t.length]:void 0,columns:i}})}var J=class extends n(y(p,{validSizes:[`s`,`m`,`l`,`xl`]})){constructor(){super(),this.expression=``,this.datasetsDataFields=[],this.datasetIds=[],this.apiUrl=`https://api.luzmo.com`,this.showAggregations=!0,this.contentLanguage=`en`,this.multiStageAggregation=!0,this.nestedAggregation=!0,this._datasets=[],this._codeMirrorLoaded=Zi(),this._rootContent=``,this._lastEmittedExpression=null,this._applyingExternalExpression=!1,this._handleWidgetsChanged=()=>{this._recomputeExpression()},this._store=this._createStore()}connectedCallback(){super.connectedCallback(),this._store.addEventListener(`widgets-changed`,this._handleWidgetsChanged)}disconnectedCallback(){super.disconnectedCallback(),this._store.removeEventListener(`widgets-changed`,this._handleWidgetsChanged),this._emitTimer&&clearTimeout(this._emitTimer)}firstUpdated(e){super.firstUpdated(e),this._pushRootContent()}updated(e){super.updated(e),e.has(`_codeMirrorLoaded`)&&this._codeMirrorLoaded&&this._pushRootContent()}_pushRootContent(){this._rootContent&&this._codeMirrorElement?.setContent(this._rootContent)}get _codeMirrorElement(){return this.renderRoot?.querySelector(`luzmo-formula-codemirror`)}async _ensureCodeMirrorLoaded(){this._codeMirrorLoaded||=(await Xi(),!0)}willUpdate(e){super.willUpdate(e),this._shouldLoadInput()&&this._ensureCodeMirrorLoaded(),(e.has(`multiStageAggregation`)||e.has(`nestedAggregation`)||e.has(`contentLanguage`)||e.has(`size`))&&(this._store.multiStageAggregation=this.multiStageAggregation,this._store.nestedAggregation=this.nestedAggregation,this._store.contentLanguage=this.contentLanguage,this._store.size=this.size),(e.has(`datasetsDataFields`)||e.has(`datasetIds`)||e.has(`apiUrl`)||e.has(`authKey`)||e.has(`authToken`))&&this._loadDatasets(),e.has(`showAggregations`)&&this._rebuildAutoCompletion(),e.has(`expression`)&&this._applyExternalExpression()}async _loadDatasets(){if(this.datasetsDataFields.length===0&&this.datasetIds.length===0)this._datasets=[],this._store.datasets=[],this._store.refreshDecorations(),this._setLoading(!1),this._rebuildAutoCompletion();else if(this.datasetsDataFields.length>0)this._datasets=vo(this.datasetsDataFields),this._store.datasets=this._datasets,this._store.refreshDecorations(),this._setLoading(!1),this._rebuildAutoCompletion();else if(this.datasetIds.length>0){this._setLoading(!0);try{let e=await u(this.datasetIds,{dataBrokerConfig:{apiUrl:this.apiUrl,authKey:this.authKey,authToken:this.authToken}});this._datasets=vo(e),this._store.datasets=this._datasets,this._store.refreshDecorations(),this._rebuildAutoCompletion()}catch(e){console.warn(`[${this.localName}] Failed to load datasets:`,e),this.dispatchEvent(new CustomEvent(`luzmo-datasets-error`,{bubbles:!0,composed:!0,detail:{error:e}}))}finally{this._setLoading(!1)}}}_rebuildAutoCompletion(){}_syncExpressionToStore(){return this.expression===this._lastEmittedExpression?null:(this._store.clearWidgets(),this._rootContent=this.multiStageAggregation?this._store.transformToAggregationWidgetSyntax(this.expression):this.expression,this._rootContent)}_applyExternalExpression(){this._applyingExternalExpression=!0;try{this._syncExpressionToStore()}finally{this._applyingExternalExpression=!1}}_recomputeExpression(){if(this._applyingExternalExpression||!this._canEmitExpression())return;let e=this.multiStageAggregation?this._store.transformToAggregationFunctionSyntax(this._rootContent):this._rootContent;this._emitTimer&&clearTimeout(this._emitTimer),this._emitTimer=setTimeout(()=>this._onExpressionComputed(e),this._emitDebounceMs)}_emitExpressionChanged(e){this._lastEmittedExpression=e,this.dispatchEvent(new CustomEvent(`luzmo-expression-changed`,{bubbles:!0,composed:!0,detail:{expression:e}}))}_shouldLoadInput(){return!0}_canEmitExpression(){return!0}get _emitDebounceMs(){return 300}_onExpressionComputed(e){e!==this._lastEmittedExpression&&this._emitExpressionChanged(e)}_setLoading(e){}};e([k({type:String})],J.prototype,`expression`,void 0),e([k({attribute:!1})],J.prototype,`datasetsDataFields`,void 0),e([k({type:Array,attribute:`dataset-ids`})],J.prototype,`datasetIds`,void 0),e([k({type:String,attribute:`api-url`})],J.prototype,`apiUrl`,void 0),e([k({type:String,attribute:`auth-key`})],J.prototype,`authKey`,void 0),e([k({type:String,attribute:`auth-token`})],J.prototype,`authToken`,void 0),e([k({type:Boolean,attribute:`show-aggregations`,reflect:!0})],J.prototype,`showAggregations`,void 0),e([k({type:String,attribute:`content-language`,reflect:!0})],J.prototype,`contentLanguage`,void 0),e([k({type:Boolean,attribute:`multi-stage-aggregation`})],J.prototype,`multiStageAggregation`,void 0),e([k({type:Boolean,attribute:`nested-aggregation`})],J.prototype,`nestedAggregation`,void 0),e([A()],J.prototype,`_datasets`,void 0),e([A()],J.prototype,`_codeMirrorLoaded`,void 0);function yo(){let e=2026;return{"+":{type:`infix`,arity:2,label:()=>t(`Addition`,{desc:`Formula function label for addition`}),description:()=>t(`Adds two numeric values.`,{desc:`Formula function description for addition operator`}),example:()=>`42.0 + ⟨numeric⟩ Average burrito price`,exampleHasIcons:!0},"-":{type:`infix`,arity:2,label:()=>t(`Difference`,{desc:`Formula function label for subtraction`}),description:()=>t(`Subtracts the second value from the first value.`,{desc:`Formula function description for subtraction operator`}),example:()=>`⟨numeric⟩ Burrito weight - 42`,exampleHasIcons:!0},"*":{type:`infix`,arity:2,label:()=>t(`Multiplication`,{desc:`Formula function label for multiplication`}),description:()=>t(`Multiplies two numeric values.`,{desc:`Formula function description for multiplication operator`}),example:()=>`⟨numeric⟩ Number of burritos * 2`,exampleHasIcons:!0},"/":{type:`infix`,arity:2,label:()=>t(`Division`,{desc:`Formula function label for division`}),description:()=>t(`Divides the first numeric value by the second numeric value.`,{desc:`Formula function description for division operator`}),example:()=>`⟨numeric⟩ Number of burritos / 2`,exampleHasIcons:!0},"%":{type:`infix`,arity:2,label:()=>t(`Modulo`,{desc:`Formula function label for modulo`}),description:()=>t(`Returns the remainder after dividing the first value by the second value.`,{desc:`Formula function description for modulo operator`}),example:()=>`5 % 2`},">":{type:`infix`,arity:2,label:()=>t(`Greater than`,{desc:`Formula function label for greater than comparison`}),description:()=>t(`Checks whether the first value is greater than the second value.`,{desc:`Formula function description for greater than operator`}),example:()=>`⟨numeric⟩ Burrito weight > 50`,exampleHasIcons:!0},"<":{type:`infix`,arity:2,label:()=>t(`Less than`,{desc:`Formula function label for less than comparison`}),description:()=>t(`Checks whether the first value is less than the second value.`,{desc:`Formula function description for less than operator`}),example:()=>`⟨numeric⟩ Burrito weight < 50`,exampleHasIcons:!0},">=":{type:`infix`,arity:2,label:()=>t(`Greater than or equal`,{desc:`Formula function label for greater than or equal comparison`}),description:()=>t(`Checks whether the first value is greater than or equal to the second value.`,{desc:`Formula function description for greater than or equal operator`}),example:()=>`⟨numeric⟩ Burrito weight >= 50`,exampleHasIcons:!0},"<=":{type:`infix`,arity:2,label:()=>t(`Less than or equal`,{desc:`Formula function label for less than or equal comparison`}),description:()=>t(`Checks whether the first value is less than or equal to the second value.`,{desc:`Formula function description for less than or equal operator`}),example:()=>`⟨numeric⟩ Burrito weight <= 50`,exampleHasIcons:!0},"=":{type:`infix`,arity:2,label:()=>t(`Equal`,{desc:`Formula function label for equality comparison`}),description:()=>t(`Checks whether both values are equal.`,{desc:`Formula function description for equality operator`}),example:()=>`⟨hierarchy⟩ Burrito type = 'Savoury'`,exampleHasIcons:!0},"<>":{type:`infix`,arity:2,label:()=>t(`Not equal`,{desc:`Formula function label for inequality comparison`}),description:()=>t(`Checks whether two values are different.`,{desc:`Formula function description for inequality operator`}),example:()=>`⟨hierarchy⟩ Burrito type <> 'Sweet'`,exampleHasIcons:!0},ABS:{type:`prefix`,arity:1,label:()=>t(`Absolute value`,{desc:`Formula function label for ABS`}),description:()=>t(`Returns the absolute value of a number.`,{desc:`Formula function description for ABS`}),example:()=>`ABS(-5.0)`},CEIL:{type:`prefix`,arity:1,label:()=>t(`Round up`,{desc:`Formula function label for CEIL`}),description:()=>t(`Rounds a number up to the nearest integer.`,{desc:`Formula function description for CEIL`}),example:()=>`CEIL(11.3)`},E:{type:`prefix`,arity:0,label:()=>t(`Euler's number`,{desc:`Formula function label for E`}),description:()=>t(`Returns Euler's constant e.`,{desc:`Formula function description for E`}),example:()=>`E()`},EXP:{type:`prefix`,arity:1,label:()=>t(`Exponential`,{desc:`Formula function label for EXP`}),description:()=>t(`Returns e raised to the specified power.`,{desc:`Formula function description for EXP`}),example:()=>`EXP(11.3)`},FLOOR:{type:`prefix`,arity:1,label:()=>t(`Round down`,{desc:`Formula function label for FLOOR`}),description:()=>t(`Rounds a number down to the nearest integer.`,{desc:`Formula function description for FLOOR`}),example:()=>`FLOOR(11.7)`},LN:{type:`prefix`,arity:1,label:()=>t(`Natural logarithm`,{desc:`Formula function label for LN`}),description:()=>t(`Returns the natural logarithm of a number.`,{desc:`Formula function description for LN`}),example:()=>`LN(11.7)`},LOG:{type:`prefix`,arity:2,label:()=>t(`Logarithm`,{desc:`Formula function label for LOG`}),description:()=>t(`Returns the logarithm of a number for a specific base.`,{desc:`Formula function description for LOG`}),example:()=>`LOG(3.6, 10)`},PI:{type:`prefix`,arity:0,label:()=>t(`Pi`,{desc:`Formula function label for PI`}),description:()=>t(`Returns the mathematical constant pi.`,{desc:`Formula function description for PI`}),example:()=>`PI()`},POW:{type:`prefix`,arity:2,label:()=>t(`Power`,{desc:`Formula function label for POW`}),description:()=>t(`Raises a number to a given power.`,{desc:`Formula function description for POW`}),example:()=>`POW(2.35, 2)`},RAND:{type:`prefix`,arity:0,label:()=>t(`Random number`,{desc:`Formula function label for RAND`}),description:()=>t(`Returns a random number between 0 and 1.`,{desc:`Formula function description for RAND`}),example:()=>`RAND()`},ROUND:{type:`prefix`,arity:2,label:()=>t(`Round`,{desc:`Formula function label for ROUND`}),description:()=>t(`Rounds a number to a specified number of decimal places.`,{desc:`Formula function description for ROUND`}),example:()=>`ROUND(4.567, 1)`},SQRT:{type:`prefix`,arity:1,label:()=>t(`Square root`,{desc:`Formula function label for SQRT`}),description:()=>t(`Returns the square root of a number.`,{desc:`Formula function description for SQRT`}),example:()=>`SQRT(4)`},CAST:{type:`prefix`,arity:2,label:()=>t(`Convert value`,{desc:`Formula function label for CAST`}),description:()=>t(`Converts the first argument to the type given by the second argument. Possible types are 'hierarchy', 'numeric', 'datetime' and 'boolean'.`,{desc:`Formula function description for CAST`}),example:()=>`CAST(⟨numeric⟩ Burrito weight, hierarchy)`,exampleHasIcons:!0},IF:{type:`prefix`,arity:3,label:()=>t(`If`,{desc:`Formula function label for IF`}),description:()=>t(`Returns one value when a condition is true and another value when false.`,{desc:`Formula function description for IF`}),example:()=>`IF(⟨numeric⟩ Burrito weight < 200,'Small','Large')`,exampleHasIcons:!0},COALESCE:{type:`prefix`,arity:2,label:()=>t(`Is empty`,{desc:`Formula function label for COALESCE`}),description:()=>t(`Returns the first non-null value from the provided arguments.`,{desc:`Formula function description for COALESCE`}),example:()=>`COALESCE(⟨hierarchy⟩ Burrito type, 'Unknown type')`,exampleHasIcons:!0},AND:{type:`infix`,arity:2,label:()=>t(`Logical and`,{desc:`Formula function label for AND`}),description:()=>t(`Returns true when both conditions are true.`,{desc:`Formula function description for AND`}),example:()=>`Burrito weight > 50 AND Burrito weight < 75`},OR:{type:`infix`,arity:2,label:()=>t(`Logical or`,{desc:`Formula function label for OR`}),description:()=>t(`Returns true when at least one condition is true.`,{desc:`Formula function description for OR`}),example:()=>`Burrito price > 10.1 OR Burrito weight >= 50`},NOT:{type:`prefix_op`,arity:1,label:()=>t(`Logical not`,{desc:`Formula function label for NOT`}),description:()=>t(`Negates a boolean condition.`,{desc:`Formula function description for NOT`}),example:()=>`NOT (Burrito type = 'Salty')`},SIN:{type:`prefix`,arity:1,label:()=>t(`Sine`,{desc:`Formula function label for SIN`}),description:()=>t(`Returns the sine of an angle in radians.`,{desc:`Formula function description for SIN`}),example:()=>`SIN(3.14)`},COS:{type:`prefix`,arity:1,label:()=>t(`Cosine`,{desc:`Formula function label for COS`}),description:()=>t(`Returns the cosine of an angle in radians.`,{desc:`Formula function description for COS`}),example:()=>`COS(3.14)`},TAN:{type:`prefix`,arity:1,label:()=>t(`Tangent`,{desc:`Formula function label for TAN`}),description:()=>t(`Returns the tangent of an angle in radians.`,{desc:`Formula function description for TAN`}),example:()=>`TAN(3.14)`},ASIN:{type:`prefix`,arity:1,label:()=>t(`Arcsine`,{desc:`Formula function label for ASIN`}),description:()=>t(`Returns the arcsine of a number.`,{desc:`Formula function description for ASIN`}),example:()=>`ASIN(3.14)`},ACOS:{type:`prefix`,arity:1,label:()=>t(`Arccosine`,{desc:`Formula function label for ACOS`}),description:()=>t(`Returns the arccosine of a number.`,{desc:`Formula function description for ACOS`}),example:()=>`ACOS(3.14)`},ATAN:{type:`prefix`,arity:1,label:()=>t(`Arctangent`,{desc:`Formula function label for ATAN`}),description:()=>t(`Returns the arctangent of a number.`,{desc:`Formula function description for ATAN`}),example:()=>`ATAN(3.14)`},SINH:{type:`prefix`,arity:1,label:()=>t(`Hyperbolic sine`,{desc:`Formula function label for SINH`}),description:()=>t(`Returns the hyperbolic sine of a number.`,{desc:`Formula function description for SINH`}),example:()=>`SINH(3.14)`},COSH:{type:`prefix`,arity:1,label:()=>t(`Hyperbolic cosine`,{desc:`Formula function label for COSH`}),description:()=>t(`Returns the hyperbolic cosine of a number.`,{desc:`Formula function description for COSH`}),example:()=>`COSH(3.14)`},TANH:{type:`prefix`,arity:1,label:()=>t(`Hyperbolic tangent`,{desc:`Formula function label for TANH`}),description:()=>t(`Returns the hyperbolic tangent of a number.`,{desc:`Formula function description for TANH`}),example:()=>`TANH(3.14)`},MEAN:{type:`prefix`,arity:1,label:()=>t(`Mean`,{desc:`Formula function label for MEAN`}),description:()=>t(`Returns the arithmetic mean of all values in a numeric column. The value is calculated over the entire dataset and does not change when filtering.`,{desc:`Formula function description for MEAN`}),example:()=>`MEAN(⟨numeric⟩ Burrito weight)`,exampleHasIcons:!0},STDDEV:{type:`prefix`,arity:1,label:()=>t(`Standard deviation`,{desc:`Aggregation label`}),description:()=>t(`Returns the sample standard deviation over all values in a numeric column. The value is calculated over the entire dataset and does not change when filtering.`,{desc:`Formula function description for STDDEV`}),example:()=>`STDDEV(⟨numeric⟩ Burrito weight)`,exampleHasIcons:!0},"||":{type:`infix`,arity:2,label:()=>t(`Concatenate`,{desc:`Formula function label for concatenate operator`}),description:()=>t(`Concatenates two strings.`,{desc:`Formula function description for concatenate operator`}),example:()=>`'Tasty' || ' burrito'`},LENGTH:{type:`prefix`,arity:1,label:()=>t(`String length`,{desc:`Formula function label for LENGTH`}),description:()=>t(`Returns the number of characters in a string.`,{desc:`Formula function description for LENGTH`}),example:()=>`LENGTH('Burrito')`},LOWER:{type:`prefix`,arity:1,label:()=>t(`Lowercase`,{desc:`Formula function label for LOWER`}),description:()=>t(`Converts a string to lowercase.`,{desc:`Formula function description for LOWER`}),example:()=>`LOWER('BURRITO')`},UPPER:{type:`prefix`,arity:1,label:()=>t(`Uppercase`,{desc:`Formula function label for UPPER`}),description:()=>t(`Converts a string to uppercase.`,{desc:`Formula function description for UPPER`}),example:()=>`UPPER('burrito')`},LTRIM:{type:`prefix`,arity:1,label:()=>t(`Trim left`,{desc:`Formula function label for LTRIM`}),description:()=>t(`Removes leading spaces from a string.`,{desc:`Formula function description for LTRIM`}),example:()=>`LTRIM(' Burrito')`},RTRIM:{type:`prefix`,arity:1,label:()=>t(`Trim right`,{desc:`Formula function label for RTRIM`}),description:()=>t(`Removes trailing spaces from a string.`,{desc:`Formula function description for RTRIM`}),example:()=>`RTRIM('Burrito ')`},TRIM:{type:`prefix`,arity:1,label:()=>t(`Trim`,{desc:`Formula function label for TRIM`}),description:()=>t(`Removes leading and trailing spaces from a string.`,{desc:`Formula function description for TRIM`}),example:()=>`TRIM('Burrito ')`},REPLACE:{type:`prefix`,arity:3,label:()=>t(`Replace text`,{desc:`Formula function label for REPLACE`}),description:()=>t(`Replaces occurrences of a substring with another substring.`,{desc:`Formula function description for REPLACE`}),example:()=>`REPLACE('Sweet burrito','Sweet', 'Savoury')`},STRPOS:{type:`prefix`,arity:2,label:()=>t(`Find substring`,{desc:`Formula function label for STRPOS`}),description:()=>t(`Returns the position of a substring in a string.`,{desc:`Formula function description for STRPOS`}),example:()=>`STRPOS('Sweet burrito','burrito')`},SUBSTR:{type:`prefix`,arity:3,label:()=>t(`Take substring`,{desc:`Formula function label for SUBSTR`}),description:()=>t(`Extracts part of a string. The first argument is the text, the second the starting position (the first character is 1; a negative position counts from the end), and the third the length.`,{desc:`Formula function description for SUBSTR`}),example:()=>`SUBSTR('Sweet burrito',7,3)`},SPLIT_PART:{type:`prefix`,arity:3,label:()=>t(`Split part`,{desc:`Formula function label for SPLIT_PART`}),description:()=>t(`Splits a string into parts using a delimiter. The first argument is the text to split, the second the delimiter, and the third the position of the part to return (starting from 1).`,{desc:`Formula function description for SPLIT_PART`}),example:()=>`SPLIT_PART('Sweet burrito', ' ', 2)`},NOW:{type:`prefix`,arity:0,label:()=>t(`Current date and time`,{desc:`Formula function label for NOW`}),description:()=>t(`Returns the current date and time.`,{desc:`Formula function description for NOW`}),example:()=>`NOW()`},YEAR:{type:`prefix`,arity:1,label:()=>t(`Year`,{desc:`Time unit`}),description:()=>t(`Extracts the year from a date value.`,{desc:`Formula function description for YEAR`}),example:()=>`YEAR('${e}-02-17')`},YEAR_UTC:{type:`prefix`,arity:1,label:()=>t(`Year (UTC)`,{desc:`Formula function label for YEAR_UTC`}),description:()=>t(`Extracts the year from a date value in UTC.`,{desc:`Formula function description for YEAR_UTC`}),example:()=>`YEAR_UTC('${e}-02-17')`},QUARTER:{type:`prefix`,arity:1,label:()=>t(`Quarter`,{desc:`Time unit`}),description:()=>t(`Extracts the quarter from a date value.`,{desc:`Formula function description for QUARTER`}),example:()=>`QUARTER('${e}-02-17')`},QUARTER_UTC:{type:`prefix`,arity:1,label:()=>t(`Quarter (UTC)`,{desc:`Formula function label for QUARTER_UTC`}),description:()=>t(`Extracts the quarter from a date value in UTC.`,{desc:`Formula function description for QUARTER_UTC`}),example:()=>`QUARTER_UTC('${e}-02-17')`},MONTH:{type:`prefix`,arity:1,label:()=>t(`Month`,{desc:`Time unit`}),description:()=>t(`Extracts the month from a date or datetime value.`,{desc:`Formula function description for MONTH`}),example:()=>`MONTH('${e}-02-17 15:36:59')`},MONTH_UTC:{type:`prefix`,arity:1,label:()=>t(`Month (UTC)`,{desc:`Formula function label for MONTH_UTC`}),description:()=>t(`Extracts the month from a date or datetime value in UTC.`,{desc:`Formula function description for MONTH_UTC`}),example:()=>`MONTH_UTC('${e}-02-17 15:36:59')`},WEEK:{type:`prefix`,arity:1,label:()=>t(`Week`,{desc:`Time unit`}),description:()=>t(`Extracts the ISO 8601 week number (1-53) from a date or datetime value.`,{desc:`Formula function description for WEEK`}),example:()=>`WEEK('${e}-02-17 15:36:59')`},WEEK_UTC:{type:`prefix`,arity:1,label:()=>t(`Week (UTC)`,{desc:`Formula function label for WEEK_UTC`}),description:()=>t(`Extracts the ISO 8601 week number (1-53) from a date or datetime value in UTC.`,{desc:`Formula function description for WEEK_UTC`}),example:()=>`WEEK_UTC('${e}-02-17 15:36:59')`},DAY:{type:`prefix`,arity:1,label:()=>t(`Day of month`,{desc:`Formula function label for DAY`}),description:()=>t(`Extracts the day of month from a date or datetime value.`,{desc:`Formula function description for DAY`}),example:()=>`DAY('${e}-02-17 15:36:59')`},DAY_UTC:{type:`prefix`,arity:1,label:()=>t(`Day of month (UTC)`,{desc:`Formula function label for DAY_UTC`}),description:()=>t(`Extracts the day of month from a date or datetime value in UTC.`,{desc:`Formula function description for DAY_UTC`}),example:()=>`DAY_UTC('${e}-02-17 15:36:59')`},DAY_OF_WEEK:{type:`prefix`,arity:1,label:()=>t(`Day of week`,{desc:`Formula function label for DAY_OF_WEEK`}),description:()=>t(`Extracts the day of week (1-7, where 1 is Monday) from a date or datetime value.`,{desc:`Formula function description for DAY_OF_WEEK`}),example:()=>`DAY_OF_WEEK('${e}-02-17 15:36:59')`},DAY_OF_WEEK_UTC:{type:`prefix`,arity:1,label:()=>t(`Day of week (UTC)`,{desc:`Formula function label for DAY_OF_WEEK_UTC`}),description:()=>t(`Extracts the day of week (1-7, where 1 is Monday) from a date or datetime value in UTC.`,{desc:`Formula function description for DAY_OF_WEEK_UTC`}),example:()=>`DAY_OF_WEEK_UTC('${e}-02-17 15:36:59')`},DAY_OF_YEAR:{type:`prefix`,arity:1,label:()=>t(`Day of year`,{desc:`Formula function label for DAY_OF_YEAR`}),description:()=>t(`Extracts the day of year from a date or datetime value.`,{desc:`Formula function description for DAY_OF_YEAR`}),example:()=>`DAY_OF_YEAR('${e}-02-17 15:36:59')`},DAY_OF_YEAR_UTC:{type:`prefix`,arity:1,label:()=>t(`Day of year (UTC)`,{desc:`Formula function label for DAY_OF_YEAR_UTC`}),description:()=>t(`Extracts the day of year from a date or datetime value in UTC.`,{desc:`Formula function description for DAY_OF_YEAR_UTC`}),example:()=>`DAY_OF_YEAR_UTC('${e}-02-17 15:36:59')`},YEAR_OF_WEEK:{type:`prefix`,arity:1,label:()=>t(`Year of ISO week`,{desc:`Formula function label for YEAR_OF_WEEK`}),description:()=>t(`Extracts the ISO week-numbering year from a date or datetime value.`,{desc:`Formula function description for YEAR_OF_WEEK`}),example:()=>`YEAR_OF_WEEK('${e}-02-17 15:36:59')`},YEAR_OF_WEEK_UTC:{type:`prefix`,arity:1,label:()=>t(`Year of ISO week (UTC)`,{desc:`Formula function label for YEAR_OF_WEEK_UTC`}),description:()=>t(`Extracts the ISO week-numbering year from a date or datetime value in UTC.`,{desc:`Formula function description for YEAR_OF_WEEK_UTC`}),example:()=>`YEAR_OF_WEEK_UTC('${e}-02-17 15:36:59')`},HOUR:{type:`prefix`,arity:1,label:()=>t(`Hour`,{desc:`Time unit`}),description:()=>t(`Extracts the hour from a datetime value.`,{desc:`Formula function description for HOUR`}),example:()=>`HOUR('${e}-02-17 15:36:59')`},HOUR_UTC:{type:`prefix`,arity:1,label:()=>t(`Hour (UTC)`,{desc:`Formula function label for HOUR_UTC`}),description:()=>t(`Extracts the hour from a datetime value in UTC.`,{desc:`Formula function description for HOUR_UTC`}),example:()=>`HOUR_UTC('${e}-02-17 15:36:59')`},MINUTE:{type:`prefix`,arity:1,label:()=>t(`Minute`,{desc:`Time unit`}),description:()=>t(`Extracts the minute from a datetime value.`,{desc:`Formula function description for MINUTE`}),example:()=>`MINUTE('${e}-02-17 15:36:59')`},MINUTE_UTC:{type:`prefix`,arity:1,label:()=>t(`Minute (UTC)`,{desc:`Formula function label for MINUTE_UTC`}),description:()=>t(`Extracts the minute from a datetime value in UTC.`,{desc:`Formula function description for MINUTE_UTC`}),example:()=>`MINUTE_UTC('${e}-02-17 15:36:59')`},SECOND:{type:`prefix`,arity:1,label:()=>t(`Second`,{desc:`Time unit`}),description:()=>t(`Extracts the second from a datetime value.`,{desc:`Formula function description for SECOND`}),example:()=>`SECOND('${e}-02-17 15:36:59')`},SECOND_UTC:{type:`prefix`,arity:1,label:()=>t(`Second (UTC)`,{desc:`Formula function label for SECOND_UTC`}),description:()=>t(`Extracts the second from a datetime value in UTC.`,{desc:`Formula function description for SECOND_UTC`}),example:()=>`SECOND_UTC('${e}-02-17 15:36:59')`},DATE_ADD:{type:`prefix`,arity:3,label:()=>t(`Add/subtract duration`,{desc:`Formula function label for DATE_ADD`}),description:()=>t(`Adds a duration to (or subtracts it from) a date or datetime value. The first argument is the unit ('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter' or 'year'), the second the number of units to add (negative to subtract), and the third the date or datetime to start from.`,{desc:`Formula function description for DATE_ADD`}),example:()=>`DATE_ADD('hour', 2, ⟨datetime⟩ Arrival time)`,exampleHasIcons:!0},DATE_DIFF:{type:`prefix`,arity:3,label:()=>t(`Difference between dates`,{desc:`Formula function label for DATE_DIFF`}),description:()=>t(`Returns the difference between two dates or datetimes in the selected unit. The first argument is the unit ('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter' or 'year'); the difference is calculated from the second date towards the third date.`,{desc:`Formula function description for DATE_DIFF`}),example:()=>`DATE_DIFF('day', ⟨datetime⟩ Arrival date, '${e}-02-17 15:36:59')`,exampleHasIcons:!0},COORDS:{type:`prefix`,arity:3,label:()=>t(`Coordinates`,{id:`formula-function-label-coords`,desc:`Formula function label for COORDS`}),description:()=>t(`Builds a geography value from latitude, longitude, and spatial reference.`,{desc:`Formula function description for COORDS`}),example:()=>`COORDS(⟨numeric⟩ Latitude, ⟨numeric⟩ Longitude, 'wgs84')`,exampleHasIcons:!0}}}var bo=class extends EventTarget{constructor(...e){super(...e),this.functionDataMap=yo(),this.aggregationFunctionDataMap=Ki(),this.multiStageAggregation=!0,this.nestedAggregation=!0,this.readonly=!1,this.contentLanguage=`en`,this.size=`m`,this.datasets=[],this.loading=!1,this.lastFocusedAggregationWidgetId=null,this.lastFocusedEmptyArgumentId=null,this.pendingFocusAggregationWidgetId=null,this._aggregationWidgets=[]}get aggregationWidgets(){return this._aggregationWidgets}addWidgets(e){e&&e.length!==0&&(this._aggregationWidgets=[...this._aggregationWidgets,...e],this._notifyWidgetsChanged())}removeWidgets(e){this._aggregationWidgets=this._aggregationWidgets.filter(({widgetId:t})=>!e.includes(t)),this._notifyWidgetsChanged()}updateWidget(e){this._aggregationWidgets=this._aggregationWidgets.map(t=>t.widgetId===e.widgetId?e:t),this._notifyWidgetsChanged()}getWidget(e){return this._aggregationWidgets.find(t=>t.widgetId===e)}clearWidgets(){this._aggregationWidgets.length!==0&&(this._aggregationWidgets=[],this._notifyWidgetsChanged())}_notifyWidgetsChanged(){this.dispatchEvent(new CustomEvent(`widgets-changed`))}setReadonly(e){this.readonly!==e&&(this.readonly=e,this.dispatchEvent(new CustomEvent(`widgets-changed`)))}setLoading(e){this.loading!==e&&(this.loading=e,this.refreshDecorations())}refreshDecorations(){this.dispatchEvent(new CustomEvent(`refresh-decorations`))}_markAggregationForFocus(e){let t=e[0];t&&(this.aggregationFunctionDataMap[t.aggregationFunction]?.arity??0)>0&&(this.pendingFocusAggregationWidgetId=t.widgetId)}transformToAggregationWidgetSyntax(e){let t=mo(e).match(Vi);if(!t)return e;let n=!!t[1],r=t.index??0,i=ho(e,r+(n?t[1].length:t[0].length)-1+1),a=ho(e,r+t[0].length);if(i===-1)return e;let o=e.slice(r+t[0].length,a),s=this.transformToAggregationWidgetSyntax(o),c={widgetId:uo(),grouping:t[2]??H.GROUP,aggregationFunction:t[3],content:s};if(c.grouping===H.GROUPINEX){let{includedColumns:t,excludedColumns:n}=go(e.slice(a+1,i));c.includedColumns=t,c.excludedColumns=n}let l=fo(c.widgetId),u=`${e.slice(0,r)}${l}${e.slice(i+1)}`;return this.addWidgets([c]),this.transformToAggregationWidgetSyntax(u)}transformToAggregationFunctionSyntax(e){let t=e.match(Hi);if(!t)return e;let n=t.index??0,r=n+t[0].length-1,i=t[1],a=this.getWidget(i),o=a?this.transformToAggregationFunctionSyntax(po(a,this.aggregationFunctionDataMap)):``,s=`${e.slice(0,n)}${o}${e.slice(r+1)}`;return this.transformToAggregationFunctionSyntax(s)}},xo=`:host{box-sizing:border-box;font-family:var(--luzmo-font-family);color:var(--luzmo-font-color);display:inline-block}.formula-text{font-size:var(--luzmo-formula-font-size,var(--luzmo-font-size));white-space:pre-wrap;word-break:break-word;line-height:1.5}.formula-text-column{white-space:nowrap}.formula-text-column-icon{margin-inline-end:var(--luzmo-spacing-1)}.formula-pills{align-items:center;gap:var(--luzmo-spacing-1) 0;font-size:var(--luzmo-formula-font-size,var(--luzmo-font-size));flex-wrap:wrap;line-height:1.5;display:inline-flex}.formula-operator{white-space:pre-wrap}.column-pill-wrapper{vertical-align:middle;padding-inline-end:var(--luzmo-formula-column-pill-trailing-space,var(--luzmo-spacing-1));display:inline-flex}.column-pill{justify-content:center;align-items:center;gap:var(--luzmo-spacing-2);box-sizing:border-box;max-width:16rem;min-height:var(--luzmo-formula-control-height,1.375rem);padding:0 var(--luzmo-formula-column-pill-padding-inline,calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1)));border-radius:var(--luzmo-border-radius-s);background-color:var(--luzmo-formula-column-pill-background,var(--luzmo-background-color-highlight));color:var(--luzmo-font-color);white-space:nowrap;font-size:.85em;line-height:1.2;display:inline-flex}.column-pill-icon{flex:none;display:inline-flex}.column-pill-label{text-overflow:ellipsis;overflow:hidden}.column-pill-loading{--luzmo-progress-circle-size:1em;align-items:center;display:inline-flex}.agg-pill{padding-block:var(--luzmo-spacing-1);border-radius:var(--luzmo-border-radius);background-color:var(--agg-accent,var(--luzmo-primary));color:var(--luzmo-primary-inverse-color);font-size:var(--luzmo-formula-font-size,var(--luzmo-font-size));vertical-align:middle;padding-inline:0;display:inline-flex}.agg-pill-row{align-items:center;gap:var(--luzmo-spacing-1);min-height:var(--luzmo-formula-control-height,1.375rem);display:inline-flex}.agg-fn{text-transform:uppercase;padding-inline-start:var(--luzmo-spacing-3);padding-inline-end:var(--luzmo-spacing-3);font-size:.85em}.agg-value{min-height:var(--luzmo-formula-control-height,1.375rem);padding:0 var(--luzmo-spacing-2);border-radius:var(--luzmo-border-radius-s);background-color:var(--luzmo-background-color);color:var(--luzmo-font-color);--luzmo-formula-column-pill-background:transparent;--luzmo-formula-column-pill-padding-inline:0px;align-items:center;line-height:1;display:inline-flex}.agg-grouping{align-items:center;gap:var(--luzmo-spacing-1);padding-inline:var(--luzmo-spacing-2) var(--luzmo-spacing-3);font-size:var(--luzmo-formula-grouping-icon-size,var(--luzmo-icon-size-m));display:inline-flex}.agg-grouping--no-value{padding-inline-start:0}.agg-grouping-count{border-radius:var(--luzmo-border-radius-full,999rem);background:var(--luzmo-primary-inverse-color);min-width:1.25em;color:var(--agg-accent,var(--luzmo-primary));font-size:.6875rem;font-weight:var(--luzmo-font-weight-bold);justify-content:center;align-items:center;padding:0 .25em;line-height:1.4;display:inline-flex}:host{--luzmo-formula-font-size:var(--luzmo-font-size);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-m);--luzmo-formula-control-height:calc(var(--luzmo-component-height) - 2 * var(--luzmo-spacing-1))}:host([size=s]){--luzmo-formula-font-size:var(--luzmo-font-size-s);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-s);--luzmo-formula-control-height:calc(var(--luzmo-component-height-s) - 2 * var(--luzmo-spacing-1))}:host([size=l]){--luzmo-formula-font-size:var(--luzmo-font-size-l);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-l);--luzmo-formula-control-height:calc(var(--luzmo-component-height-l) - 2 * var(--luzmo-spacing-1))}:host([size=xl]){--luzmo-formula-font-size:var(--luzmo-font-size-xl);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-xl);--luzmo-formula-control-height:calc(var(--luzmo-component-height-xl) - 2 * var(--luzmo-spacing-1))}`,So=class extends J{constructor(...e){super(...e),this.display=`rich`,this._groupingDataMap=Ji()}static{this.styles=j(xo)}_createStore(){return new bo}_shouldLoadInput(){return!1}_canEmitExpression(){return!1}_applyExternalExpression(){this.display===`text`?this._rootContent=``:(this._store.clearWidgets(),this._rootContent=this._store.transformToAggregationWidgetSyntax(this.expression??``))}willUpdate(e){super.willUpdate(e),e.has(`display`)&&!e.has(`expression`)&&this._applyExternalExpression()}render(){return this.display===`text`?this._renderTextFormula():this._renderPillFormula()}_renderPillFormula(){return E`<span class="formula-pills" part="formula">${this._renderPillNodes(this._rootContent)}</span>`}_renderPillNodes(e){let t=[],n=new RegExp(zi.source,`gm`),r=0,i;for(;(i=n.exec(e))!==null;){i.index>r&&t.push(this._renderOperatorText(e.slice(r,i.index)));let a=i[2],o=i[3];a?t.push(this._renderColumnPill(a)):o&&t.push(this._renderAggregationPill(o)),r=n.lastIndex}return r<e.length&&t.push(this._renderOperatorText(e.slice(r))),t}_renderOperatorText(e){return E`<span class="formula-operator">${e}</span>`}_renderColumnPill(e){let[n,r]=e.split(`:`),i=this._datasets.find(e=>e.id===n)?.columns.find(e=>e.columnId===r);if(this._store.loading&&!i){let e=t(`Loading column`,{desc:`Accessible label for a column pill whose label is still loading`});return E`<span class="column-pill-wrapper"
10
+ ><span class="column-pill" title=${e}
11
+ ><span class="column-pill-loading">
12
+ <luzmo-progress-circle indeterminate size="s" .label=${e}></luzmo-progress-circle></span
13
+ ></span
14
+ ></span>`}let{icon:a,label:o}=Ri(i,this.contentLanguage,r);return E`<span class="column-pill-wrapper"
15
+ ><span class="column-pill" title=${o}
16
+ ><span class="column-pill-icon">${f(a)}</span
17
+ ><span class="column-pill-label">${o}</span></span
18
+ ></span>`}_renderAggregationPill(e){let t=this._store.getWidget(e);if(!t)return E`${O}`;let n=this._groupingDataMap[t.grouping],r=n?.color??``,i=this._store.aggregationFunctionDataMap[t.aggregationFunction]?.arity??0,a=n?.label()??``,o=t.grouping===H.GROUPINEX?(t.includedColumns?.length??0)+(t.excludedColumns?.length??0):0;return E`<span class="agg-pill" style=${r?`--agg-accent: ${r}`:``}>
19
+ <span class="agg-pill-row">
20
+ <span class="agg-fn">${t.aggregationFunction}</span>
21
+ ${i>0?E`<span class="agg-value">${this._renderPillNodes(t.content)}</span>`:O}
22
+ <span
23
+ class="agg-grouping${i>0?``:` agg-grouping--no-value`}"
24
+ title=${a}
25
+ aria-label=${a}
26
+ >
27
+ ${n?.icon?f(n.icon):O}
28
+ ${o>0?E`<span class="agg-grouping-count">${o}</span>`:O}
29
+ </span>
30
+ </span>
31
+ </span>`}_renderTextFormula(){let e=this.expression??``,t=[],n=new RegExp(Wi.source,`g`),r=0,i;for(;(i=n.exec(e))!==null;){i.index>r&&t.push(e.slice(r,i.index));let[a,o]=i[1].split(`:`);t.push(this._renderColumnReference(a,o)),r=n.lastIndex}return r<e.length&&t.push(e.slice(r)),E`<span class="formula-text" part="formula-text">${t}</span>`}_renderColumnReference(e,t){let n=this._datasets.find(t=>t.id===e),r=n?.columns.find(e=>e.columnId===t),i=r?x(r.name,this.contentLanguage):t,a=n?x(n.name,this.contentLanguage):``,o=a?`${a} · ${i}`:i,s=l({type:r?.type??`hierarchy`},`s`);return E`<span class="formula-text-column" part="formula-text-column" title=${o}>
32
+ <span class="formula-text-column-icon">${f(s)}</span>
33
+ <span class="formula-text-column-name">${i}</span>
34
+ </span>`}};e([k({type:String,reflect:!0})],So.prototype,`display`,void 0),So=e([r()],So),customElements.get(`luzmo-formula`)||customElements.define(`luzmo-formula`,So);var Co=`:host{font-family:var(--luzmo-display-settings-font-family,var(--luzmo-font-family));font-size:var(--luzmo-display-settings-font-size,var(--display-settings-font-size));color:var(--luzmo-display-settings-font-color,var(--luzmo-font-color))}.settings-container{gap:var(--luzmo-display-settings-vertical-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}.settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-gap,var(--display-settings-gap));display:flex}.label-container{align-items:center;gap:var(--luzmo-display-settings-gap,var(--display-settings-gap));min-width:0;display:flex}.label-container.stacked{flex-direction:column;flex:1;align-items:stretch;gap:0}.label-container.stacked luzmo-multi-language-field{width:100%}.calculation-preview luzmo-formula{max-block-size:6em;max-inline-size:var(--luzmo-display-settings-calculation-max-width,var(--display-settings-calculation-max-width));overflow-wrap:anywhere;align-items:flex-start;min-width:0;display:inline-flex;overflow-y:auto}.calculation-preview luzmo-formula::-webkit-scrollbar{width:var(--luzmo-scrollbar-size)}.calculation-preview luzmo-formula::-webkit-scrollbar-track{background:var(--luzmo-scrollbar-track-background);border-radius:var(--luzmo-scrollbar-track-border-radius)}.calculation-preview luzmo-formula::-webkit-scrollbar-thumb{background:var(--luzmo-scrollbar-thumb-background);border-radius:var(--luzmo-scrollbar-thumb-border-radius)}.calculation-preview luzmo-formula::-webkit-scrollbar-thumb:hover{background:var(--luzmo-scrollbar-thumb-hover-background)}.calculation-preview luzmo-formula{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-scrollbar-thumb-background) var(--luzmo-scrollbar-track-background)}luzmo-divider{margin:var(--luzmo-display-settings-ids-container-vertical-margin,var(--display-settings-ids-container-vertical-margin)) 0}luzmo-tooltip{--tooltip-font-size:var(--luzmo-display-settings-tooltip-font-size,var(--tooltip-font-size))}.setting{flex:1;align-items:flex-end;min-width:0;display:flex}.label-action-container{justify-content:space-between;align-items:center;gap:var(--luzmo-display-settings-info-to-remove-icon-gap,var(--display-settings-info-to-remove-icon-gap));display:flex}.label-action-container luzmo-action-button{margin-inline-start:var(--luzmo-spacing-2)}.ids-container{gap:var(--luzmo-display-settings-ids-container-gap,var(--luzmo-spacing-2));border-radius:50%;flex-direction:column;display:flex}.id-label{text-transform:var(--luzmo-display-settings-id-label-text-transform,var(--display-settings-id-label-text-transform));font-weight:var(--luzmo-display-settings-id-label-font-weight,var(--display-settings-id-label-font-weight));font-size:var(--luzmo-display-settings-id-label-font-size,var(--display-settings-id-label-font-size));color:var(--luzmo-display-settings-id-label-color,var(--display-settings-id-label-color))}.id-value{-webkit-user-select:text;user-select:text;cursor:text}.example-container{line-height:var(--luzmo-display-settings-example-height,var(--display-settings-example-height));font-size:var(--luzmo-display-settings-example-font-size,var(--display-settings-example-font-size));color:var(--luzmo-display-settings-example-color,var(--display-settings-example-color))}.example-container .example-label{font-weight:var(--luzmo-display-settings-example-label-font-weight,var(--display-settings-example-label-font-weight));color:var(--luzmo-display-settings-example-label-color,var(--display-settings-example-label-color))}.example-container .example-language{text-transform:uppercase;color:var(--luzmo-display-settings-example-language-color,var(--display-settings-example-language-color))}.example-container{gap:var(--luzmo-display-settings-example-container-gap,var(--luzmo-spacing-2))}:host{--display-settings-font-family:var(--luzmo-font-family);--display-settings-id-label-text-transform:none;--display-settings-id-label-font-weight:bold;--display-settings-id-label-color:var(--luzmo-primary);--display-settings-font-size:var(--luzmo-font-size);--display-settings-id-label-font-size:var(--luzmo-font-size);--display-settings-gap:var(--luzmo-spacing-3);--display-settings-ids-container-vertical-margin:var(--luzmo-spacing-4);--display-settings-info-to-remove-icon-gap:var(--luzmo-spacing-1);--display-settings-calculation-max-width:20rem}:host([size=s]){--display-settings-id-label-font-size:var(--luzmo-font-size-s);--display-settings-font-size:var(--luzmo-font-size-s);--display-settings-gap:var(--luzmo-spacing-3);--display-settings-ids-container-vertical-margin:var(--luzmo-spacing-3);--display-settings-info-to-remove-icon-gap:var(--luzmo-spacing-1);--display-settings-calculation-max-width:16rem}:host([size=l]){--display-settings-id-label-font-size:var(--luzmo-font-size);--display-settings-font-size:var(--luzmo-font-size-l);--display-settings-gap:var(--luzmo-spacing-4);--display-settings-ids-container-vertical-margin:var(--luzmo-spacing-5);--display-settings-info-to-remove-icon-gap:var(--luzmo-spacing-1);--display-settings-calculation-max-width:24rem}:host([size=xl]){--display-settings-id-label-font-size:var(--luzmo-font-size-l);--display-settings-font-size:var(--luzmo-font-size-xl);--display-settings-gap:var(--luzmo-spacing-5);--display-settings-ids-container-vertical-margin:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--display-settings-info-to-remove-icon-gap:var(--luzmo-spacing-1);--display-settings-calculation-max-width:28rem}:host{--display-settings-example-font-size:var(--luzmo-font-size);--display-settings-example-color:var(--luzmo-font-color);--display-settings-example-label-font-weight:bold;--display-settings-example-label-color:var(--luzmo-primary);--display-settings-example-language-color:var(--luzmo-primary);--display-settings-example-height:var(--luzmo-component-height)}:host([size=s]){--display-settings-example-height:var(--luzmo-component-height-s);--display-settings-example-font-size:var(--luzmo-font-size-s)}:host([size=l]){--display-settings-example-height:var(--luzmo-component-height-l);--display-settings-example-font-size:var(--luzmo-font-size)}:host([size=xl]){--display-settings-example-height:var(--luzmo-component-height-xl);--display-settings-example-font-size:var(--luzmo-font-size-l)}`,Y=class extends eo(y(p,{validSizes:Object.values(h)})){constructor(...e){super(...e),this._loadDisplaySettings=new C(this,{task:async([e,t,n,r,i,a])=>{let o=[];a&&o.push(`grandTotals`),n&&o.push(`periodOverPeriod`),(e===`numeric`||e===`mixed`&&this._currentSlotContent?.type===`numeric`)&&o.push(`numeric`),e!==`numeric`&&this._currentSlotContent?.type===`datetime`&&o.push(`datetime`),![`numeric`,`mixed`].includes(e??``)&&this._currentSlotContent?.type===`numeric`&&!r&&o.push(`binning`),n&&!this._settingsTypeLoaded.periodOverPeriod&&(await import(`./display-settings-period-over-period-By9WHn3a.js`),this._settingsTypeLoaded.periodOverPeriod=!0),o.length>0&&!t&&(o.includes(`numeric`)&&!this._settingsTypeLoaded.numeric?(await import(`./display-settings-numeric-BVSff_nN.js`),this._settingsTypeLoaded.numeric=!0):o.includes(`datetime`)&&!this._settingsTypeLoaded.datetime&&i?(await import(`./display-settings-datetime-l8eZ7vwV.js`),this._settingsTypeLoaded.datetime=!0):o.includes(`binning`)&&!this._settingsTypeLoaded.binning?(await import(`./display-settings-binning-5gaYqJVT.js`),this._settingsTypeLoaded.binning=!0):o.includes(`grandTotals`)&&!this._settingsTypeLoaded.grandTotals&&(await import(`./display-settings-grand-totals-B83suS2N.js`),this._settingsTypeLoaded.grandTotals=!0))},args:()=>[this.slotType,this.hideDisplaySettings,this._comparisonUiType,this.isBinningDisabled,this.areDatetimeOptionsEnabled,this.areGrandTotalsEnabled,this.slotContent]}),this.slotsContents=[],this.hasConnectedComparisonFilter=!1,this.language=`en`,this.contentLanguage=`en`,this.slotType=`numeric`,this.slotName=`measure`,this.slotContent={},this.datasetsDataFields=[],this.apiUrl=`https://api.luzmo.com`,this.authKey=``,this.authToken=``,this._showIds=!1,this.measureColumns=[],this._settingsTypeLoaded={binning:!1,datetime:!1,numeric:!1,grandTotals:!1,periodOverPeriod:!1,hierarchy:!0},this._currentSlotContent={}}static get styles(){return[j(Co)]}_datasetDatetimeColumns(){return(this._store?.linkedDataset.get()??this.datasetsDataFields).flatMap(e=>(e.columns??(`dataFields`in e?e.dataFields:[])??[]).filter(e=>e.type===`datetime`).map(t=>({...t,id:`columnId`in t?t.columnId:t.id,datasetId:e.id})))}get _comparisonUiType(){if(this._store)return this._store.periodOverPeriodUiType.get();if(this.periodOverPeriodUiType!==void 0)return this.periodOverPeriodUiType;let e=this.itemType===`kpi`?`comparison-measure`:`measure`,t=this._currentSlotContent;return this.slotName!==e||![`numeric`,`mixed`].includes(this.slotType??``)||t.type&&t.type!==`numeric`&&!t.type.startsWith(`array[`)||t.subtype===`duration`&&t.type?.startsWith(`array[`)?null:Gn({slots:this.slotsContents,itemType:this.itemType,hasConnectedComparisonFilter:this.hasConnectedComparisonFilter,hasRelatedDatetimeColumns:this._datasetDatetimeColumns().length>0})}willUpdate(e){let t=this._store?.activeSlotContents.get(),n=this._store?.periodOverPeriodUiType.get();if(this._store&&this.periodOverPeriodUiType!==n&&(this.periodOverPeriodUiType=n),this._store)t!==this._lastStoreContent&&(this._lastStoreContent=t,this._currentSlotContent=t?structuredClone(t):{});else if(e.has(`slotContent`)||Object.keys(this._currentSlotContent).length===0){let e=this.slotContent;e&&(this._currentSlotContent=structuredClone(e))}}get datasetId(){return this._currentSlotContent.datasetId??this._currentSlotContent.set}get formulaOrColumnId(){return this._currentSlotContent.formulaId??this._currentSlotContent.expression??this._currentSlotContent.formula??this._currentSlotContent.columnId??this._currentSlotContent.column}resetInfoVisibility(e){this._showIds&&this._toggleIds(e)}_onSlotContentChange(e){e.stopPropagation(),e.preventDefault(),this._currentSlotContent=structuredClone(e.detail.slotContent),this._sendEvent(),this.requestUpdate()}_onLabelChange(){this._currentSlotContent=structuredClone(this._currentSlotContent),this._currentSlotContent.label=this._multiLanguageFieldElement.value||{},this._sendEvent(),this.requestUpdate()}_sendEvent(){this._currentSlotContent=qn(this._currentSlotContent,this._store?.slotsContents.get()??this.slotsContents,this._store?.itemType.get()??this.itemType),this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:{...this._currentSlotContent}}})),this._store&&(this._store.updateContent({...this._currentSlotContent}),this._lastStoreContent=this._store.activeSlotContents.get())}_removeEvent(){this.dispatchEvent(new CustomEvent(`luzmo-remove-slot-content`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:this._currentSlotContent}}))}_toggleIds(e=!0){this._showIds=!this._showIds,e&&this.dispatchEvent(new CustomEvent(`luzmo-info-visibility-changed`,{detail:{isVisible:this._showIds,slotContent:{...this._currentSlotContent}}}))}_renderExampleRow(){let e=this.slotType===`numeric`||this.slotType===`mixed`&&this._currentSlotContent.type===`numeric`,n=this.slotType!==`datetime`&&this._currentSlotContent.type===`datetime`&&this.areDatetimeOptionsEnabled;if(!(e||n))return O;let r=!this._currentSlotContent.datetimeDisplayMode||this._currentSlotContent.datetimeDisplayMode==="default",i=e?1234.56:r?/* @__PURE__ */ new Date:1,a=Bn({...this._currentSlotContent,type:e?`numeric`:`datetime`},{locale:this.contentLanguage,level:this._currentSlotContent.level})(i);return E`<div class="settings-row example-container">
35
+ <span class="example-label"
36
+ >${t(`Example`,{desc:`Label for example`})}:</span
37
+ >
38
+ <span class="example">${a}</span>
39
+ </div>`}_renderDisplaySettings(){let e={name:this.slotName,type:this.slotType},n=q(this._currentSlotContent,e)?oo(this._currentSlotContent):void 0,r=io(this._currentSlotContent)?t(`Formula`,{desc:`Label for the formula type`}):t(`Expression`,{desc:`Label for the expression type`}),i=this._currentSlotContent.datasetId??this._currentSlotContent.set;return E`<div class="settings-container">
40
+ <div class="settings-row">
41
+ <div class="setting">
42
+ <div class="label-container stacked">
43
+ <luzmo-field-label .size=${this.size} for="slot-label">
44
+ ${t(`Label`,{desc:`Label for the slot label setting`})}
45
+ </luzmo-field-label>
46
+ <luzmo-multi-language-field
47
+ id="slot-label"
48
+ label=${t(`Label`,{desc:`Label for the slot label setting`})}
49
+ .language=${this.contentLanguage}
50
+ .value=${this._currentSlotContent.label??{}}
51
+ .size=${this.size}
52
+ debounce="200"
53
+ @change=${this._onLabelChange}
54
+ ></luzmo-multi-language-field>
55
+ </div>
56
+ <div class="label-action-container">
57
+ <luzmo-action-button quiet .size=${this.size} .label=${t(`Show dataset and column IDs`,{desc:`Show IDs button label`})} aria-expanded=${this._showIds} ?selected=${this._showIds} @click=${this._toggleIds}>
58
+ ${f(se)}
59
+ <luzmo-tooltip self-managed placement="top" size=${this.size}>
60
+ ${t(`Show dataset and column IDs`,{desc:`Show IDs button label`})}
61
+ </luzmo-tooltip>
62
+ </luzmo-action-button>
63
+ ${this.showRemoveButton?E`<luzmo-action-button quiet .size=${this.size} .label=${t(`Remove`,{desc:`Remove button label`})} @click=${this._removeEvent}>
64
+ ${f(o)}
65
+ <luzmo-tooltip
66
+ self-managed
67
+ placement="top"
68
+ size=${this.size}
69
+ >
70
+ ${t(`Remove`,{desc:`Remove button label`})}
71
+ </luzmo-tooltip>
72
+ </luzmo-action-button>`:``}
73
+ </div>
74
+ </div>
75
+ </div>
76
+ ${n?E`<div class="settings-row">
77
+ <div class="setting">
78
+ <div class="label-container stacked calculation-preview">
79
+ <luzmo-field-label .size=${this.size}>${r}</luzmo-field-label>
80
+ <luzmo-formula
81
+ display="text"
82
+ .expression=${n}
83
+ .datasetsDataFields=${this.datasetsDataFields}
84
+ .datasetIds=${i?[i]:[]}
85
+ .apiUrl=${this.apiUrl}
86
+ .authKey=${this.authKey}
87
+ .authToken=${this.authToken}
88
+ .contentLanguage=${this.contentLanguage}
89
+ .size=${this.size}
90
+ ></luzmo-formula>
91
+ </div>
92
+ </div>
93
+ </div>`:``}
94
+ ${this.areGrandTotalsEnabled?E`<luzmo-display-settings-grand-totals
95
+ .language=${this.language}
96
+ .slotContent=${this._currentSlotContent}
97
+ .size=${this.size}
98
+ @luzmo-slot-content-changed=${this._onSlotContentChange}
99
+ ></luzmo-display-settings-grand-totals>`:``}
100
+ ${this.slotType===`numeric`||this.slotType===`mixed`&&this._currentSlotContent.type===`numeric`?E`<luzmo-display-settings-numeric
101
+ .language=${this.language}
102
+ .slotContent=${this._currentSlotContent}
103
+ .size=${this.size}
104
+ .measureColumns=${this.measureColumns}
105
+ .isAggregationDisabled=${this.isAggregationDisabled}
106
+ .isCumulativeSumEnabled=${this.isCumulativeSumEnabled}
107
+ @luzmo-slot-content-changed=${this._onSlotContentChange}
108
+ ></luzmo-display-settings-numeric>`:``}
109
+ ${this.slotType!==`numeric`&&this._currentSlotContent.type===`datetime`&&this.areDatetimeOptionsEnabled?E`<luzmo-display-settings-datetime
110
+ .language=${this.language}
111
+ .contentLanguage=${this.contentLanguage}
112
+ .slotContent=${this._currentSlotContent}
113
+ .size=${this.size}
114
+ @luzmo-slot-content-changed=${this._onSlotContentChange}
115
+ ></luzmo-display-settings-datetime>`:``}
116
+ ${![`numeric`,`mixed`].includes(this.slotType??``)&&this._currentSlotContent.type===`numeric`&&!this.isBinningDisabled?E`<luzmo-display-settings-binning
117
+ .language=${this.language}
118
+ .slotContent=${this._currentSlotContent}
119
+ .size=${this.size}
120
+ @luzmo-slot-content-changed=${this._onSlotContentChange}
121
+ ></luzmo-display-settings-binning>`:``}
122
+ ${this._comparisonUiType?E`<luzmo-display-settings-period-over-period
123
+ .language=${this.language}
124
+ .slotContent=${this._currentSlotContent}
125
+ .size=${this.size}
126
+ .periodOverPeriodUiType=${this._comparisonUiType}
127
+ .hasConnectedComparisonFilter=${this._store?.hasConnectedComparisonFilter.get()??this.hasConnectedComparisonFilter}
128
+ .slotsContents=${this._store?.slotsContents.get()??this.slotsContents}
129
+ .itemType=${this._store?.itemType.get()??this.itemType}
130
+ .allowPeriodsWithoutDatetimeColumn=${this._store?.periodOverPeriodAllowsPeriodsWithoutDatetimeColumn.get()}
131
+ .hidePastValue=${this._store?.periodOverPeriodHidesPastValue.get()}
132
+ .linkedDatasetDatetimeColumns=${this._datasetDatetimeColumns()}
133
+ @luzmo-slot-content-changed=${this._onSlotContentChange}
134
+ ></luzmo-display-settings-period-over-period>`:``}
135
+ ${this._renderExampleRow()}
136
+ </div>
137
+ ${this._showIds?E` <luzmo-divider></luzmo-divider>
138
+ <div class="ids-container">
139
+ <div>
140
+ <span class="id-label"
141
+ >${this._currentSlotContent.formula||this._currentSlotContent.formulaId||this._currentSlotContent.expression?t(`Formula`,{desc:`Label for the formula type`}):t(`Column`,{desc:`Label for column type`})}:
142
+ </span>
143
+ <span class="id-value">
144
+ ${this.formulaOrColumnId}
145
+ </span>
146
+ </div>
147
+ <div>
148
+ <span class="id-label"
149
+ >${t(`Dataset`)}:
150
+ </span>
151
+ <span class="id-value">
152
+ ${this.datasetId}
153
+ </span>
154
+ </div>
155
+ <div></div>
156
+ </div>`:``}`}render(){return this._loadDisplaySettings.render({pending:()=>E`<luzmo-progress-circle
157
+ indeterminate
158
+ .label=${t(`Loading`,{desc:`Loading spinner label`})}
159
+ .size=${this.size}
160
+ ></luzmo-progress-circle>`,complete:()=>this._renderDisplaySettings(),error:()=>this._renderDisplaySettings()})}disconnectedCallback(){super.disconnectedCallback?.(),this._loadDisplaySettings.abort?.()}};e([k({attribute:!1})],Y.prototype,`slotsContents`,void 0),e([k({type:String,attribute:`item-type`,reflect:!0})],Y.prototype,`itemType`,void 0),e([k({type:Boolean,attribute:`has-connected-comparison-filter`,reflect:!0})],Y.prototype,`hasConnectedComparisonFilter`,void 0),e([k({type:String})],Y.prototype,`language`,void 0),e([k({type:String,attribute:`content-language`})],Y.prototype,`contentLanguage`,void 0),e([k({type:Boolean,attribute:`hide-display-settings`})],Y.prototype,`hideDisplaySettings`,void 0),e([k({type:Boolean})],Y.prototype,`isBinningDisabled`,void 0),e([k({type:Boolean})],Y.prototype,`areDatetimeOptionsEnabled`,void 0),e([k({type:Boolean})],Y.prototype,`areGrandTotalsEnabled`,void 0),e([k({type:Boolean})],Y.prototype,`isAggregationDisabled`,void 0),e([k({type:Boolean})],Y.prototype,`isCumulativeSumEnabled`,void 0),e([k({type:String})],Y.prototype,`periodOverPeriodUiType`,void 0),e([k({type:Boolean,attribute:`show-remove-button`})],Y.prototype,`showRemoveButton`,void 0),e([k({type:String,attribute:`slot-type`})],Y.prototype,`slotType`,void 0),e([k({type:String,attribute:`slot-name`})],Y.prototype,`slotName`,void 0),e([k({type:Object,attribute:!1})],Y.prototype,`slotContent`,void 0),e([k({attribute:!1})],Y.prototype,`datasetsDataFields`,void 0),e([k({type:String,attribute:`api-url`,reflect:!0})],Y.prototype,`apiUrl`,void 0),e([k({type:String,attribute:`auth-key`,reflect:!0})],Y.prototype,`authKey`,void 0),e([k({type:String,attribute:`auth-token`,reflect:!0})],Y.prototype,`authToken`,void 0),e([A()],Y.prototype,`_showIds`,void 0),e([k({type:Array,reflect:!1})],Y.prototype,`measureColumns`,void 0),e([te(`luzmo-multi-language-field`)],Y.prototype,`_multiLanguageFieldElement`,void 0),e([aa({context:sa,subscribe:!0})],Y.prototype,`_store`,void 0),customElements.get(`luzmo-display-settings`)||customElements.define(`luzmo-display-settings`,Y);function wo({element:e,handle:t,boundary:n=document.documentElement,onDragStart:r,onDragEnd:i}){if(!e||!t)throw Error(`makeDraggable: element and handle are required`);let a=e.ownerDocument??document,o=-1,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=t=>{if(t.pointerId!==o)return;let r=t.clientX-s,i=t.clientY-c,a=(n??document.documentElement).getBoundingClientRect(),h=l+r,g=u+i;h=Math.min(Math.max(h,a.left),a.right-d),g=Math.min(Math.max(g,a.top),a.bottom-f);let _=h-l,v=g-u,y=p+_,b=m+v;e.style.transform=`translate3d(${y}px, ${b}px, 0)`},g=e=>{e.pointerId===o&&(a.removeEventListener(`pointermove`,h),a.removeEventListener(`pointerup`,g),o=-1,i?.())},_=n=>{if(n.button!==0)return;o=n.pointerId;let i=e.getBoundingClientRect();l=i.left,u=i.top,d=i.width,f=i.height,s=n.clientX,c=n.clientY;try{let t=a.defaultView?.getComputedStyle(e);if(t){let e=new DOMMatrixReadOnly(t.transform);p=e.m41,m=e.m42}}catch{p=0,m=0}t.setPointerCapture(o),a.addEventListener(`pointermove`,h),a.addEventListener(`pointerup`,g),r?.()};return t.addEventListener(`pointerdown`,_),()=>{t.removeEventListener(`pointerdown`,_),a.removeEventListener(`pointermove`,h),a.removeEventListener(`pointerup`,g)}}var To={none:0,small:100,medium:350,large:700},Eo=.5;To.none,To.small*Eo,To.medium*Eo,To.large*Eo;function Do(e){e.animate([{backgroundColor:`var(--ds-background-selected, #E9F2FF)`},{}],{duration:To.large,easing:`cubic-bezier(0.25, 0.1, 0.25, 1.0)`,iterations:1})}function Oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Oo(Object(n),!0).forEach(function(t){fr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ao={top:function(e,t){return Math.abs(t.y-e.top)},right:function(e,t){return Math.abs(e.right-t.x)},bottom:function(e,t){return Math.abs(e.bottom-t.y)},left:function(e,t){return Math.abs(t.x-e.left)}},jo=Symbol(`closestEdge`);function Mo(e,t){var n=t.element,r=t.input,i=t.allowedEdges,a={x:r.clientX,y:r.clientY},o=n.getBoundingClientRect(),s=i.map(function(e){return{edge:e,value:Ao[e](o,a)}}).sort(function(e,t){return e.value-t.value})[0]?.edge??null;return ko(ko({},e),{},fr({},jo,s))}function No(e){return e[jo]??null}function Po(){return{x:0,y:0}}function Fo(e){var t=e.render,n=e.nativeSetDragImage,r=e.getOffset,i=r===void 0?Po:r,a=document.createElement(`div`);Object.assign(a.style,{position:`fixed`,top:0,left:0,zIndex:mr,pointerEvents:`none`}),document.body.append(a);var o=t({container:a});queueMicrotask(function(){var e=i({container:a});if(Lr()){var t=a.getBoundingClientRect();if(t.width===0)return;a.style.left=`-${t.width-1e-4}px`}n?.(a,e.x,e.y)});function s(){c(),o?.(),document.body.removeChild(a)}var c=ki({onDragStart:s,onDrop:s})}var Io=(e,t)=>{let n=getComputedStyle(e).getPropertyValue(t);for(;!n&&e.parentElement;)e=e.parentElement,n=getComputedStyle(e).getPropertyValue(t);return n.trim()},Lo=`:host{font-family:var(--luzmo-slot-menu-list-font-family,var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-list-font-size,var(--slot-menu-list-font-size));color:var(--luzmo-slot-menu-list-font-color,var(--luzmo-font-color))}ul{margin:0;padding:0;list-style:none}:host{max-height:var(--luzmo-slot-menu-list-max-height,var(--slot-menu-list-max-height));margin:0;padding:0;list-style:none;overflow-y:auto}:host::-webkit-scrollbar{width:var(--luzmo-slot-menu-list-scrollbar-width,var(--slot-menu-list-scrollbar-width))}:host::-webkit-scrollbar-track{background:var(--luzmo-slot-menu-list-scrollbar-track-background,var(--slot-menu-list-scrollbar-track-background));border-radius:var(--luzmo-slot-menu-list-scrollbar-track-border-radius,var(--slot-menu-list-scrollbar-track-border-radius))}:host::-webkit-scrollbar-thumb{background:var(--luzmo-slot-menu-list-scrollbar-thumb-background,var(--slot-menu-list-scrollbar-thumb-background));border-radius:var(--luzmo-slot-menu-list-scrollbar-thumb-border-radius,var(--slot-menu-list-scrollbar-thumb-border-radius))}:host::-webkit-scrollbar-thumb:hover{background:var(--luzmo-slot-menu-list-scrollbar-thumb-hover-background,var(--slot-menu-list-scrollbar-thumb-hover-background))}:host{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-slot-menu-list-scrollbar-thumb-background,var(--slot-menu-list-scrollbar-thumb-background)) var(--luzmo-slot-menu-list-scrollbar-track-background,var(--slot-menu-list-scrollbar-track-background));border-right:var(--luzmo-slot-menu-list-border-right-width,var(--luzmo-border-width)) solid var(--luzmo-slot-menu-list-border-right-color,var(--luzmo-border-color))}:host li{cursor:pointer;position:relative}:host li:hover{background-color:var(--luzmo-slot-menu-list-background-color-hover,var(--slot-menu-list-background-color-hover))}:host li{border-bottom:var(--luzmo-slot-menu-list-border-bottom-width,var(--slot-menu-list-border-bottom-width)) solid var(--luzmo-slot-menu-list-border-bottom-color,var(--slot-menu-list-border-bottom-color))}:host .active{background-color:var(--luzmo-slot-menu-list-active-background-color,var(--slot-menu-list-active-background-color));color:var(--luzmo-slot-menu-list-active-color,var(--slot-menu-list-active-color))}:host .active:hover{background-color:var(--luzmo-slot-menu-list-active-background-color-hover,var(--slot-menu-list-active-background-color-hover))}:host .active .draggable-slot-content:focus-visible{background-color:var(--luzmo-slot-menu-list-active-background-color-hover,var(--slot-menu-list-active-background-color-hover));outline:none}:host .active .draggable-slot-content-remove:focus-visible{outline-color:var(--luzmo-slot-menu-list-active-color,var(--slot-menu-list-active-color));background-color:var(--luzmo-slot-menu-list-active-background-color-hover,var(--slot-menu-list-active-background-color-hover))}.calculation-label{align-items:center;gap:var(--luzmo-spacing-3);display:inline-flex}.calculation-label-icon{flex:none;display:inline-flex}.drop-indicator{height:var(--luzmo-slot-menu-list-drop-indicator-height,var(--slot-menu-list-drop-indicator-height));background-color:var(--luzmo-slot-menu-list-drop-indicator-color,var(--slot-menu-list-drop-indicator-color));position:absolute;left:0;right:0}.drop-indicator:before{content:"";border:var(--luzmo-slot-menu-list-drop-indicator-height,var(--slot-menu-list-drop-indicator-height)) solid var(--luzmo-slot-menu-list-drop-indicator-color,var(--slot-menu-list-drop-indicator-color));background:var(--luzmo-slot-menu-list-drop-indicator-background,var(--luzmo-background-color));width:100%;left:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size,var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height,var(--slot-menu-list-drop-indicator-height))));top:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size,var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height,var(--slot-menu-list-drop-indicator-height))));height:var(--luzmo-slot-menu-list-drop-indicator-circle-size,var(--slot-menu-list-drop-indicator-circle-size));width:var(--luzmo-slot-menu-list-drop-indicator-circle-size,var(--slot-menu-list-drop-indicator-circle-size));border-radius:50%;display:block;position:absolute}.drop-indicator[data-edge=top]{top:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height,var(--slot-menu-list-drop-indicator-height)))}.drop-indicator[data-edge=bottom]{bottom:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height,var(--slot-menu-list-drop-indicator-height)))}.draggable-slot-content{justify-content:space-between;gap:var(--luzmo-slot-menu-label-to-icon-gap,var(--slot-menu-label-to-icon-gap));touch-action:none;cursor:pointer;align-items:center;display:flex}.draggable-slot-content:focus-visible{background-color:color-mix(in srgb, var(--luzmo-primary) 20%, transparent);outline:none}.draggable-slot-content .draggable-slot-content-label{padding-block:var(--luzmo-slot-menu-list-item-vertical-padding,var(--slot-menu-list-item-vertical-padding));text-overflow:ellipsis;white-space:nowrap;font:inherit;color:inherit;cursor:inherit;text-align:start;background:0 0;border:none;flex:auto;padding-inline-start:var(--luzmo-slot-menu-list-item-horizontal-padding,var(--slot-menu-list-item-horizontal-padding));overflow:hidden}.draggable-slot-content .draggable-slot-content-remove{padding:var(--luzmo-spacing-1);font:inherit;color:inherit;cursor:inherit;border-radius:var(--luzmo-border-radius);background:0 0;border:none;flex:none;justify-content:center;align-items:center;margin-inline-end:var(--luzmo-slot-menu-list-item-horizontal-padding,var(--slot-menu-list-item-horizontal-padding));display:flex}.draggable-slot-content .draggable-slot-content-remove:focus-visible{outline:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color);outline-offset:1px}:host{--slot-menu-list-active-background-color:var(--luzmo-primary);--slot-menu-list-active-background-color-hover:var(--luzmo-primary-hover);--slot-menu-list-active-color:var(--luzmo-primary-inverse-color);--slot-menu-list-background-color-hover:var(--luzmo-background-color-hover);--slot-menu-list-drop-indicator-color:var(--luzmo-font-color-down);--slot-menu-list-drop-indicator-height:2px;--slot-menu-list-drop-indicator-circle-size:4px;--slot-menu-list-border-bottom-width:0px;--slot-menu-list-border-bottom-color:transparent;--slot-menu-list-max-height:calc(var(--luzmo-component-height) * 4);--slot-menu-list-scrollbar-width:var(--luzmo-scrollbar-size);--slot-menu-list-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--slot-menu-list-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--slot-menu-list-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--slot-menu-list-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--slot-menu-list-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--slot-menu-display-settings-min-width:19rem;--slot-menu-min-height:calc(var(--luzmo-component-height) * 2);--slot-menu-font-size:var(--luzmo-font-size);--slot-menu-list-item-horizontal-padding:var(--luzmo-spacing-4);--slot-menu-list-item-vertical-padding:var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap:var(--luzmo-spacing-3)}:host([size=s]){--slot-menu-display-settings-min-width:16rem;--slot-menu-min-height:calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size:var(--luzmo-font-size-s);--slot-menu-list-item-horizontal-padding:var(--luzmo-spacing-3);--slot-menu-list-item-vertical-padding:var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap:var(--luzmo-spacing-2)}:host([size=l]){--slot-menu-display-settings-min-width:23rem;--slot-menu-min-height:calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size:var(--luzmo-font-size-l);--slot-menu-list-item-horizontal-padding:var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding:var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap:var(--luzmo-spacing-4)}:host([size=xl]){--slot-menu-display-settings-min-width:26rem;--slot-menu-min-height:calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size:var(--luzmo-font-size-xl);--slot-menu-list-item-horizontal-padding:var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding:var(--luzmo-spacing-4);--slot-menu-label-to-icon-gap:var(--luzmo-spacing-5)}`,X=class extends y(p,{validSizes:Object.values(h)}){constructor(...e){super(...e),this.language=`en`,this.contentLanguage=`en`,this.slotContents=[],this.slotName=`measure`,this.slotType=`numeric`,this.activeIndex=0,this._sendChangeEvent=()=>{this.dispatchEvent(new CustomEvent(`luzmo-slot-list-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:structuredClone(this.slotContents),activeIndex:this.activeIndex}}))},this._cleanupFns=[],this._attachAll=()=>{[...this._draggableSlotContentElements].forEach(e=>{let t=this._sendChangeEvent.bind(this),n=this,r=Fi({element:e,onGenerateDragPreview({nativeSetDragImage:t}){Fo({nativeSetDragImage:t,render({container:t}){let n=document.createElement(`div`);n.classList.add(`drag-preview`);let r={};[[`borderColor`,`--luzmo-slot-menu-list-border-color`,`--luzmo-border-color`],[`backgroundColor`,`--luzmo-slot-menu-list-background-color`,`--luzmo-background-color`],[`color`,`--luzmo-slot-menu-list-font-color`,`--slot-menu-list-font-color`],[`fontSize`,`--luzmo-slot-menu-list-font-size`,`--slot-menu-list-font-size`],[`horizontalPadding`,`--luzmo-slot-menu-list-item-horizontal-padding`,`--slot-menu-list-item-horizontal-padding`],[`verticalPadding`,`--luzmo-slot-menu-list-item-vertical-padding`,`--slot-menu-list-item-vertical-padding`],[`borderRadius`,`--luzmo-slot-menu-list-border-radius`,`--luzmo-border-radius`],[`fontFamily`,`--luzmo-slot-menu-list-font-family`,`--luzmo-font-family`]].forEach(([t,n,i])=>{let a=Io(e,n)||Io(e,i);r[t]=a}),n.textContent=e.querySelector(`[data-task-content]`)?.textContent||e.dataset.taskLabel||e.textContent,Object.assign(n.style,{border:`1px solid ${r.borderColor}`,backgroundColor:r.backgroundColor,borderRadius:r.borderRadius,fontFamily:r.fontFamily,fontSize:r.fontSize,color:r.color,paddingInline:`${r.horizontalPadding}`,paddingBlock:`${r.verticalPadding}`}),t.append(n)}})},getInitialData(){let t=e.parentElement,n=0;return t&&(n=[...t.parentElement?.children??[]].indexOf(t)),{index:n}},onDragStart(){e.style.opacity=`0.5`},onDrop(){e.style.opacity=`1`}});this._cleanupFns.push(r);let i=Ii({element:e,canDrop({source:t}){return t.element!==e&&t?.element?.classList.contains(`draggable-slot-content`)},getData(t){return Mo({},{element:e,input:t.input,allowedEdges:[`top`,`bottom`]})},getIsSticky(){return!0},onDragEnter({self:t}){let n=No(t.data);if(!n)return;let r=document.createElement(`div`);r.classList.add(`drop-indicator`),r.dataset.edge=n,e.after(r)},onDrag({self:t}){let n=No(t.data);if(!n){e.nextElementSibling?.remove();return}if(e.nextElementSibling?.getAttribute(`data-edge`)===n)return;e.nextElementSibling?.remove();let r=document.createElement(`div`);r.classList.add(`drop-indicator`),r.dataset.edge=n,e.after(r)},onDragLeave(){e.nextElementSibling?.remove()},onDrop({self:r,source:i}){e.nextElementSibling?.remove();let a=No(r.data),o=r.element.parentElement;if(typeof i.data.index==`number`&&o){let e=[...o.parentElement?.children??[]].indexOf(o);a===`bottom`&&i.data.index>=e&&e<(o?.parentElement?.children?.length??0)-1?e+=1:a===`top`&&e>i.data.index&&--e;let t=n.activeIndex,r=i.data.index,s=e,c=n.slotContents[r];n.slotContents.splice(r,1),n.slotContents.splice(s,0,c),r===t?n.activeIndex=s:r<t&&s>=t?n.activeIndex=t-1:r>t&&s<=t&&(n.activeIndex=t+1)}a&&(Do(i.element),n.requestUpdate(),t())}});this._cleanupFns.push(i)})},this._detachAll=()=>{this._cleanupFns.forEach(e=>e()),this._cleanupFns=[]}}static get styles(){return[j(Lo)]}willUpdate(){this._detachAll()}updated(){this._attachAll()}disconnectedCallback(){super.disconnectedCallback(),this._detachAll()}setActiveIndex(e){this.activeIndex=e,this._sendChangeEvent()}removeSlotContent(e){this.slotContents=this.slotContents.filter((t,n)=>n!==e),this.activeIndex=this.slotContents.length===0?0:Math.min(this.activeIndex,this.slotContents.length-1),this._sendChangeEvent()}_moveItem(e,t){let n=this.slotContents[e],r=[...this.slotContents];r.splice(e,1),r.splice(t,0,n),this.slotContents=r,this.activeIndex===e?this.activeIndex=t:e<this.activeIndex&&t>=this.activeIndex?--this.activeIndex:e>this.activeIndex&&t<=this.activeIndex&&(this.activeIndex+=1),this._sendChangeEvent(),this.updateComplete.then(()=>this._draggableSlotContentElements[t]?.focus())}_handleContentKeydown(e,t){switch(t.key){case` `:case`Enter`:t.preventDefault(),this.setActiveIndex(e);break;case`ArrowUp`:t.preventDefault(),t.altKey&&e>0?this._moveItem(e,e-1):!t.altKey&&e>0&&this._draggableSlotContentElements[e-1]?.focus();break;case`ArrowDown`:t.preventDefault(),t.altKey&&e<this.slotContents.length-1?this._moveItem(e,e+1):!t.altKey&&e<this.slotContents.length-1&&this._draggableSlotContentElements[e+1]?.focus()}}_handleTrashClick(e,t){t.stopPropagation(),this.removeSlotContent(e)}_handleTrashKeydown(e){(e.key===` `||e.key===`Enter`)&&e.stopPropagation()}render(){let e={name:this.slotName,type:this.slotType},n=this.slotContents.map((n,r)=>{let i=x(n.label??{},this.contentLanguage)??t(`Untitled`,{desc:`Fallback label for a slot content without a name`}),a=q(n,e)?oo(n):void 0,s=r===this.activeIndex;return E`<li class=${s?`active`:``}>
161
+ <div class="draggable-slot-content"
162
+ data-task-label=${a??i}
163
+ tabindex="0"
164
+ role="option"
165
+ aria-selected=${s?`true`:`false`}
166
+ @click=${this.setActiveIndex.bind(this,r)}
167
+ @keydown=${this._handleContentKeydown.bind(this,r)}
168
+ >
169
+ <span class="draggable-slot-content-label" data-task-content>
170
+ ${a?co(n):i}
171
+ </span>
172
+ <button
173
+ class="draggable-slot-content-remove"
174
+ aria-label=${t(`Remove`,{desc:`Remove button label`})}
175
+ @click=${this._handleTrashClick.bind(this,r)}
176
+ @keydown=${this._handleTrashKeydown}
177
+ >
178
+ ${f(o)}
179
+ </button>
180
+ </div>
181
+ </li>`});return E`<ul role="listbox" aria-label=${t(`Slot contents`,{desc:`Accessible label for slot menu content list`})}>${n}</ul>`}};e([k({type:String,reflect:!0})],X.prototype,`language`,void 0),e([k({type:String,attribute:`content-language`,reflect:!0})],X.prototype,`contentLanguage`,void 0),e([ne(`.draggable-slot-content`)],X.prototype,`_draggableSlotContentElements`,void 0),e([k({type:Array})],X.prototype,`slotContents`,void 0),e([k({type:String,attribute:`slot-name`,reflect:!0})],X.prototype,`slotName`,void 0),e([k({type:String,attribute:`slot-type`,reflect:!0})],X.prototype,`slotType`,void 0),e([k({type:Number})],X.prototype,`activeIndex`,void 0),customElements.get(`luzmo-slot-menu-list`)||customElements.define(`luzmo-slot-menu-list`,X);var Ro=`:host{font-family:var(--luzmo-slot-menu-font-family,var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-font-size,var(--slot-menu-font-size));color:var(--luzmo-slot-menu-font-color,var(--luzmo-font-color));width:fit-content;display:block}luzmo-slot-menu-list{min-width:var(--luzmo-slot-menu-list-min-width,var(--slot-menu-list-min-width));max-width:var(--luzmo-slot-menu-list-max-width,var(--slot-menu-list-max-width));background-color:var(--luzmo-slot-menu-list-background-color,var(--slot-menu-list-background-color));border-bottom-left-radius:var(--luzmo-slot-menu-list-border-radius,var(--slot-menu-list-border-radius))}.slot-contents-container{border:var(--luzmo-slot-menu-border-width,var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color,var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius,var(--luzmo-border-radius));background:var(--luzmo-slot-menu-background-color,var(--luzmo-background-color));--slot-menu-popup-filter:drop-shadow(var(--luzmo-slot-menu-popup-shadow-horizontal,var(--slot-menu-popup-shadow-horizontal)) var(--luzmo-slot-menu-popup-shadow-vertical,var(--slot-menu-popup-shadow-vertical)) var(--luzmo-slot-menu-popup-shadow-blur,var(--slot-menu-popup-shadow-blur)) var(--luzmo-slot-menu-popup-shadow-color,var(--slot-menu-popup-shadow-color)));filter:var(--luzmo-slot-menu-popup-filter,var(--slot-menu-popup-filter));border-top-left-radius:0;position:relative}.slot-contents-container .inner-container{align-items:stretch;display:flex}.slot-contents-container .inner-container luzmo-display-settings{min-width:var(--luzmo-slot-menu-display-settings-min-width,var(--slot-menu-display-settings-min-width));padding:var(--luzmo-slot-menu-display-settings-vertical-padding,var(--slot-menu-display-settings-vertical-padding)) var(--luzmo-slot-menu-display-settings-horizontal-padding,var(--slot-menu-display-settings-horizontal-padding))}.slot-contents-container:has(>.close) .inner-container luzmo-display-settings{padding-block-start:var(--luzmo-slot-menu-close-button-clearance,var(--slot-menu-close-button-clearance))}:host([variant=popup]) .slot-contents-container{border-top-left-radius:var(--luzmo-slot-menu-border-radius,var(--luzmo-border-radius));overflow:hidden}.slot-menu-top-menu{border-radius:var(--luzmo-slot-menu-border-radius,var(--luzmo-border-radius));z-index:1;width:fit-content;margin-bottom:calc(-1 * var(--luzmo-slot-menu-border-width,var(--luzmo-border-width)));border-bottom-right-radius:0;border-bottom-left-radius:0;align-items:center;display:flex;position:relative;overflow:hidden}.drag-handle{background-color:var(--luzmo-slot-menu-drag-handle-background-color,var(--luzmo-background-color-highlight));cursor:move;border:var(--luzmo-slot-menu-drag-handle-border-width,var(--slot-menu-drag-handle-border-width)) solid var(--luzmo-slot-menu-border-color,var(--luzmo-background-color-highlight));width:fit-content;font-size:var(--luzmo-slot-menu-drag-handle-size,var(--slot-menu-drag-handle-size));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding,var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding,var(--slot-menu-drag-handle-horizontal-padding));border-bottom:none}.drag-handle:hover{background-color:var(--luzmo-slot-menu-drag-handle-background-color-hover,var(--luzmo-background-color-highlight-hover))}.drag-handle:focus-visible{box-shadow:0 0 0 var(--luzmo-indicator-width) var(--luzmo-indicator-color)}.slot-content-action{max-width:var(--luzmo-slot-menu-top-menu-label-max-width,var(--slot-menu-top-menu-label-max-width));gap:var(--luzmo-slot-menu-label-to-icon-gap,var(--slot-menu-label-to-icon-gap));background-color:var(--luzmo-slot-menu-content-label-background-color,var(--luzmo-primary));color:var(--luzmo-slot-menu-content-label-color,var(--luzmo-primary-inverse-color));border:var(--luzmo-slot-menu-border-width,var(--luzmo-border-width)) solid var(--luzmo-slot-menu-content-label-border-color,var(--luzmo-primary));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding,var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding,var(--slot-menu-drag-handle-horizontal-padding));border-bottom:none;flex:0 auto;display:flex}.slot-content-action:hover{background-color:var(--luzmo-slot-menu-content-label-background-color-hover,var(--luzmo-primary-hover))}.slot-content-action:focus{background-color:var(--luzmo-slot-menu-content-label-background-color-focus,var(--luzmo-primary-focus))}.slot-content-action .slot-content-label{white-space:nowrap;text-overflow:ellipsis;flex:auto;overflow:hidden}.slot-content-action .slot-content-remove{cursor:pointer;border-radius:var(--luzmo-slot-menu-border-radius,var(--luzmo-border-radius));font:inherit;color:inherit;background:0 0;border:none;flex:none;padding:0}.slot-content-action .slot-content-remove:focus-visible{background-color:var(--luzmo-slot-menu-content-label-background-color-focus,var(--luzmo-primary-focus));box-shadow:0 0 0 var(--luzmo-indicator-width) var(--luzmo-slot-menu-content-label-color,var(--luzmo-primary-inverse-color));outline:none}.calculation-label{align-items:center;gap:var(--luzmo-spacing-3);display:inline-flex}.calculation-label-icon{flex:none;display:inline-flex}.close{font:inherit;color:inherit;right:var(--luzmo-slot-menu-close-icon-right,var(--slot-menu-close-icon-right));cursor:pointer;top:calc(-2 * var(--luzmo-slot-menu-border-width,var(--luzmo-border-width)));background:0 0;background-color:var(--luzmo-slot-menu-close-button-background-color,var(--luzmo-background-color-highlight));font-size:var(--luzmo-slot-menu-close-button-size,var(--slot-menu-close-button-size));border:none;border:var(--luzmo-slot-menu-border-width,var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color,var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius,var(--luzmo-border-radius));padding:0;padding:var(--luzmo-slot-menu-close-button-vertical-padding,var(--slot-menu-close-button-vertical-padding)) var(--luzmo-slot-menu-close-button-horizontal-padding,var(--slot-menu-close-button-horizontal-padding));border-top-left-radius:0;border-top-right-radius:0;position:absolute}.close:hover{background-color:var(--luzmo-slot-menu-close-button-background-color-hover,var(--luzmo-background-color-highlight-hover))}.close:focus-visible{border-color:var(--luzmo-indicator-color);outline:none}:host{--slot-menu-display-settings-min-width:19rem;--slot-menu-min-height:calc(var(--luzmo-component-height) * 2);--slot-menu-font-size:var(--luzmo-font-size);--slot-menu-display-settings-horizontal-padding:var(--luzmo-spacing-5);--slot-menu-display-settings-vertical-padding:var(--luzmo-spacing-4);--slot-menu-top-menu-label-max-width:12rem;--slot-menu-list-min-width:8rem;--slot-menu-list-max-width:12rem;--slot-menu-label-to-icon-gap:var(--luzmo-spacing-3);--slot-menu-drag-handle-size:var(--luzmo-font-size);--slot-menu-drag-handle-vertical-padding:var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding:var(--luzmo-spacing-3);--slot-menu-drag-handle-border-width:var(--luzmo-border-width);--slot-menu-close-button-size:var(--luzmo-font-size-s);--slot-menu-close-button-vertical-padding:var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--slot-menu-close-button-clearance:calc(var(--luzmo-slot-menu-close-button-size,var(--slot-menu-close-button-size)) + 2 * var(--luzmo-slot-menu-close-button-vertical-padding,var(--slot-menu-close-button-vertical-padding)) + 2 * var(--luzmo-slot-menu-border-width,var(--luzmo-border-width)) + var(--luzmo-spacing-2));--slot-menu-popup-shadow-horizontal:0;--slot-menu-popup-shadow-vertical:1px;--slot-menu-popup-shadow-blur:4px;--slot-menu-popup-shadow-color:var(--luzmo-border-color);--slot-menu-popup-box-shadow:var(--slot-menu-popup-shadow-horizontal) var(--slot-menu-popup-shadow-vertical) var(--slot-menu-popup-shadow-blur) var(--slot-menu-popup-shadow-color);--slot-menu-close-icon-right:1rem;--slot-menu-list-border-radius:var(--luzmo-border-radius)}:host([size=s]){--slot-menu-display-settings-min-width:16rem;--slot-menu-min-height:calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size:var(--luzmo-font-size-s);--slot-menu-display-settings-horizontal-padding:var(--luzmo-spacing-4);--slot-menu-display-settings-vertical-padding:var(--luzmo-spacing-3);--slot-menu-top-menu-label-max-width:10rem;--slot-menu-list-min-width:6rem;--slot-menu-list-max-width:10rem;--slot-menu-label-to-icon-gap:var(--luzmo-spacing-2);--slot-menu-drag-handle-size:var(--luzmo-font-size-s);--slot-menu-drag-handle-vertical-padding:var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding:var(--luzmo-spacing-3);--slot-menu-close-button-size:var(--luzmo-font-size-xs);--slot-menu-close-button-vertical-padding:var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1))}:host([size=l]){--slot-menu-display-settings-min-width:23rem;--slot-menu-min-height:calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size:var(--luzmo-font-size-l);--slot-menu-display-settings-horizontal-padding:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--slot-menu-display-settings-vertical-padding:var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width:14rem;--slot-menu-list-min-width:9rem;--slot-menu-list-max-width:14rem;--slot-menu-label-to-icon-gap:var(--luzmo-spacing-4);--slot-menu-drag-handle-size:var(--luzmo-font-size-l);--slot-menu-drag-handle-vertical-padding:var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding:var(--luzmo-spacing-3);--slot-menu-close-button-size:var(--luzmo-font-size);--slot-menu-close-button-vertical-padding:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--slot-menu-close-button-horizontal-padding:var(--luzmo-spacing-3)}:host([size=xl]){--slot-menu-display-settings-min-width:26rem;--slot-menu-min-height:calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size:var(--luzmo-font-size-xl);--slot-menu-display-settings-horizontal-padding:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--slot-menu-display-settings-vertical-padding:var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width:16rem;--slot-menu-list-min-width:10rem;--slot-menu-list-max-width:16rem;--slot-menu-label-to-icon-gap:var(--luzmo-spacing-5);--slot-menu-drag-handle-size:var(--luzmo-font-size-xl);--slot-menu-drag-handle-vertical-padding:var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding:var(--luzmo-spacing-4);--slot-menu-close-button-size:var(--luzmo-font-size-l);--slot-menu-close-button-vertical-padding:var(--luzmo-spacing-3);--slot-menu-close-button-horizontal-padding:var(--luzmo-spacing-3)}`,Z=class extends eo(y(p,{validSizes:Object.values(h)})){constructor(...e){super(...e),this.hasConnectedComparisonFilter=!1,this.language=`en`,this.contentLanguage=`en`,this.slotType=`numeric`,this.variant=`draggable`,this._periodOverPeriodUiType=null,this.measureColumns=[],this.apiUrl=`https://api.luzmo.com`,this.authKey=``,this.authToken=``,this.datasetsDataFields=[],this._slotContents=[],this._activeIndex=this.slotIndex??0,this._linkedDatasetsIds=[]}static get styles(){return[j(Ro)]}get _store(){return this._consumedStore?this._consumedStore:(this._ownStore||(this._ownStore=new no,new ia(this,{context:sa,initialValue:this._ownStore})),this._ownStore)}get _currentSlotContent(){return this._slotContents[this.slotIndex??this._activeIndex]??{}}get _showRemoveButton(){return!this.noRemove&&this.variant===`popup`&&(typeof this.slotIndex==`number`||this._slotContents?.length===1)}get _currentLabel(){return x(this._currentSlotContent.label,this.contentLanguage)??`Untitled`}_renderCurrentLabel(){let e={name:this.slotName,type:this.slotType};return q(this._currentSlotContent,e)?co(this._currentSlotContent):this._currentLabel}connectedCallback(){let e={};this.apiUrl&&(e.apiUrl=this.apiUrl),this.authKey&&this.authToken&&(e.authKey=this.authKey,e.authToken=this.authToken),b.configure(e),super.connectedCallback(),this._attachDragHandle()}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDrag&&=(this._cleanupDrag(),void 0),this._panelResizeObserver?.disconnect(),this._panelResizeObserver=void 0}_syncListMaxHeight(){let e=this.displaySettingsElement,t=this.slotMenuListElement;if(!e||!t)return;let n=e.offsetHeight;n>0&&t.style.setProperty(`--luzmo-slot-menu-list-max-height`,`${n}px`)}_observePanelResize(){let e=this.displaySettingsElement;e&&(this._panelResizeObserver||=new ResizeObserver(()=>this._syncListMaxHeight()),this._panelResizeObserver.disconnect(),this._panelResizeObserver.observe(e),this._syncListMaxHeight())}_attachDragHandle(){if(this._cleanupDrag||this.variant!==`draggable`||this.noDrag)return;let e=this.renderRoot.querySelector(`.drag-handle`);if(!e)return;let t=this.dragBoundary?document.querySelector(this.dragBoundary):document.documentElement;this._cleanupDrag=wo({element:this,handle:e,boundary:t})}_sendChangeEvent(){let e=this._store.slotContents.get();this.dispatchEvent(new CustomEvent(`luzmo-slot-contents-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:structuredClone(e.map(e=>qn(e,this._store.slotsContents.get(),this.itemType))),linkedDatasetsIds:[...this._linkedDatasetsIds]}}))}resetInfoVisibility(){this.displaySettingsElement?.resetInfoVisibility&&this.displaySettingsElement.resetInfoVisibility(!1)}_sendCloseEvent(){this.dispatchEvent(new CustomEvent(`luzmo-close`,{bubbles:!0,composed:!0,cancelable:!0}))}isArrayColumnType(e){return e.startsWith(`array[`)}async willUpdate(e){let t=this._store;e.has(`slotsContents`)&&this.slotsContents&&t.setFullContents(this.slotsContents),t.hasConnectedComparisonFilter.set(this.hasConnectedComparisonFilter),t.slotsContents.get(),t.activeIndex.get(),this._updateComparisonContext();let n=t.slotContents.get(),r=e.has(`slotContents`);Array.isArray(this.slotContents)&&(n.length===0||r)&&t.setContents(structuredClone(this.slotContents),this.slotName);let i=t.slotContents.get();if(i!==this._slotContents||e.has(`slotIndex`)||e.has(`_activeIndex`)){this._slotContents=i;let{set:e,column:n}=this._currentSlotContent;if(e&&ve(e)&&e!==this._lastFetchedDatasetId){if(this._lastFetchedDatasetId=e,await b.fetchDatasetsRecursive([e]),!this.isConnected)return;this._linkedDatasetsIds=b.getLinkedDatasetsIds(e)}let r=b.getAvailableDatasets();this.measureColumns=r.map(e=>({datasetId:e.id,datasetName:e.name,columns:e.columns?.filter(e=>e.type===`numeric`&&e.id!==n)})),typeof this.slotIndex!=`number`&&t.activeIndex.get()!==this._activeIndex&&t.updateActive(this._activeIndex),t.linkedDataset.set(r.filter(t=>t.id===e))}this._updateComparisonContext()}_updateComparisonContext(){let e=this._store,t=this.itemType===`kpi`?`comparison-measure`:`measure`;if(this.slotName!==t)return;e.setPeriodOverPeriodCondition(this.itemType,this._currentSlotContent);let n=this._currentSlotContent.subtype===`duration`&&this.isArrayColumnType(this._currentSlotContent.type);this._periodOverPeriodUiType=n?null:e.periodOverPeriodUiType.get()}updated(){this.displaySettingsElement&&(this.displaySettingsElement.hasConnectedComparisonFilter=this.hasConnectedComparisonFilter,this.displaySettingsElement.itemType=this.itemType,this.displaySettingsElement.slotsContents=this._store.slotsContents.get(),this.displaySettingsElement.periodOverPeriodUiType=this._periodOverPeriodUiType,this.displaySettingsElement.measureColumns=this.measureColumns,this.displaySettingsElement.showRemoveButton=this._showRemoveButton),this._observePanelResize()}_handleSlotListChange(e){let t=this._store,n=structuredClone(e.detail.slotContents),r=e.detail.activeIndex;r!==this._activeIndex&&(this._activeIndex=r,t.updateActive(r)),t.setContents(n,this.slotName),this._slotContents=t.slotContents.get();let i=this._slotContents[this._activeIndex],a=i?.column??i?.columnId,o=i?.set??i?.datasetId,s=i?.formulaId??(v(i?.formula)?i.formula:void 0);(a||s)&&o&&(this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-active`,{bubbles:!0,composed:!0,detail:{datasetId:o}})),setTimeout(()=>{this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-highlight`,{bubbles:!0,composed:!0,detail:{datasetId:o,level:i?.level??0,...a&&{columnId:a},...s&&{formulaId:s}}}))})),this._slotContents.length<=1&&this.requestUpdate(),this._sendChangeEvent()}_handleSlotContentChange(e){let t=this._store,n=this.slotIndex??this._activeIndex;t.updateContent(structuredClone(e.detail.slotContent),n),this._slotContents=t.slotContents.get(),this.slotMenuListElement&&(this.slotMenuListElement.slotContents=this._slotContents),this._sendChangeEvent()}removeSlotContent(e){let t=this._store;t.removeContent(e),this._slotContents=t.slotContents.get(),this._slotContents.length===0&&this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-inactive`,{bubbles:!0,composed:!0})),this._sendChangeEvent(),this.close(),this.requestUpdate()}close(){this._sendCloseEvent(),this.resetInfoVisibility()}_removeActiveSlotContent(){this.removeSlotContent(this.slotIndex??this._activeIndex)}_handleInfoVisibilityChanged(e){this.dispatchEvent(new CustomEvent(`luzmo-info-visibility-changed`,{detail:e.detail}))}render(){let e=`${this.slotType}-${this._currentSlotContent?.type??``}`;return E`<div class="slot-menu-top-menu" role="region" aria-label=${t(`Slot menu`,{desc:`Accessible label for slot menu region`})}>
182
+ ${this.variant===`draggable`?E`<div class="drag-handle">${f(i)}</div>`:``}
183
+ ${this._slotContents&&this._slotContents.length===1&&this.variant!==`popup`?E` <div class="slot-content-action">
184
+ <div class="slot-content-label">${this._renderCurrentLabel()}</div>
185
+ <button
186
+ class="slot-content-remove"
187
+ aria-label=${t(`Remove`,{desc:`Remove button label`})}
188
+ @click=${this.removeSlotContent.bind(this,0)}
189
+ >
190
+ ${f(o)}
191
+ </button>
192
+ </div>`:``}
193
+ </div>
194
+ <div
195
+ class="slot-contents-container ${this._slotContents?.length>1?`multiple`:``}"
196
+ >
197
+ ${this.variant===`popup`?``:E`<button class="close" aria-label=${t(`Close`,{id:`close-action`,desc:`Close button label`})} @click=${this.close}>
198
+ ${f(oe)}
199
+ </button>`}
200
+ <div class="inner-container">
201
+ ${this._slotContents?.length>1&&typeof this.slotIndex!=`number`?E`<luzmo-slot-menu-list
202
+ .slotContents=${this._slotContents}
203
+ .contentLanguage=${this.contentLanguage}
204
+ .slotName=${this.slotName}
205
+ .slotType=${this.slotType}
206
+ .activeIndex=${this.slotIndex??this._activeIndex}
207
+ @luzmo-slot-list-changed=${this._handleSlotListChange}
208
+ ></luzmo-slot-menu-list>`:``}
209
+ ${T([this.variant,this.language,this.contentLanguage,this._periodOverPeriodUiType,this._activeIndex,this.size,e,this.slotName,this.datasetsDataFields,this.apiUrl,this.authKey,this.authToken],()=>E`<luzmo-display-settings
210
+ .size=${this.size}
211
+ .language=${this.language}
212
+ .contentLanguage=${this.contentLanguage}
213
+ .slotName=${this.slotName}
214
+ .slotType=${this.slotType}
215
+ .measureColumns=${this.measureColumns}
216
+ .showRemoveButton=${this._showRemoveButton}
217
+ .slotContent=${this._currentSlotContent}
218
+ .datasetsDataFields=${this.datasetsDataFields}
219
+ api-url=${D(this.apiUrl)}
220
+ auth-key=${D(this.authKey)}
221
+ auth-token=${D(this.authToken)}
222
+ .areGrandTotalsEnabled=${this.areGrandTotalsEnabled}
223
+ .areDatetimeOptionsEnabled=${this.areDatetimeOptionsEnabled}
224
+ .isBinningDisabled=${this.isBinningDisabled}
225
+ .isAggregationDisabled=${this.isAggregationDisabled}
226
+ .isCumulativeSumEnabled=${this.isCumulativeSumEnabled}
227
+ @luzmo-slot-content-changed=${this._handleSlotContentChange}
228
+ @luzmo-remove-slot-content=${this._removeActiveSlotContent}
229
+ @luzmo-info-visibility-changed=${this._handleInfoVisibilityChanged}
230
+ ></luzmo-display-settings>`)}
231
+ </div>
232
+ </div>`}firstUpdated(){this._attachDragHandle(),this._observePanelResize()}resetPosition(){this.style.transform=``}};e([k({attribute:!1})],Z.prototype,`slotsContents`,void 0),e([k({type:Boolean,attribute:`has-connected-comparison-filter`,reflect:!0})],Z.prototype,`hasConnectedComparisonFilter`,void 0),e([k({type:String,reflect:!0})],Z.prototype,`language`,void 0),e([k({type:String,attribute:`content-language`,reflect:!0})],Z.prototype,`contentLanguage`,void 0),e([k({type:String,attribute:`slot-type`,reflect:!0})],Z.prototype,`slotType`,void 0),e([k({type:String,attribute:`slot-name`,reflect:!0})],Z.prototype,`slotName`,void 0),e([k({type:String,attribute:`item-type`,reflect:!0})],Z.prototype,`itemType`,void 0),e([k({type:Boolean,attribute:`no-drag`,reflect:!0})],Z.prototype,`noDrag`,void 0),e([k({type:Boolean,attribute:`no-close`,reflect:!0})],Z.prototype,`noClose`,void 0),e([k({type:String,reflect:!0})],Z.prototype,`variant`,void 0),e([k({type:Boolean,attribute:`no-top-menu-label`,reflect:!0})],Z.prototype,`noTopMenuLabel`,void 0),e([k({type:Boolean,attribute:`no-remove`,reflect:!0})],Z.prototype,`noRemove`,void 0),e([aa({context:sa,subscribe:!0})],Z.prototype,`_consumedStore`,void 0),e([k({type:String,attribute:`drag-boundary`,reflect:!1})],Z.prototype,`dragBoundary`,void 0),e([k({type:Boolean})],Z.prototype,`areGrandTotalsEnabled`,void 0),e([k({type:Boolean})],Z.prototype,`areDatetimeOptionsEnabled`,void 0),e([k({type:Boolean})],Z.prototype,`isBinningDisabled`,void 0),e([k({type:Boolean})],Z.prototype,`isAggregationDisabled`,void 0),e([k({type:Boolean})],Z.prototype,`isCumulativeSumEnabled`,void 0),e([k({type:Array,reflect:!1,attribute:`slot-contents`})],Z.prototype,`slotContents`,void 0),e([A()],Z.prototype,`_periodOverPeriodUiType`,void 0),e([A()],Z.prototype,`measureColumns`,void 0),e([k({type:Number,reflect:!1,attribute:`slot-index`})],Z.prototype,`slotIndex`,void 0),e([te(`luzmo-display-settings`)],Z.prototype,`displaySettingsElement`,void 0),e([te(`luzmo-slot-menu-list`)],Z.prototype,`slotMenuListElement`,void 0),e([k({type:String,attribute:`api-url`,reflect:!0})],Z.prototype,`apiUrl`,void 0),e([k({type:String,attribute:`auth-key`,reflect:!0})],Z.prototype,`authKey`,void 0),e([k({type:String,attribute:`auth-token`,reflect:!0})],Z.prototype,`authToken`,void 0),e([k({attribute:!1})],Z.prototype,`datasetsDataFields`,void 0),e([A()],Z.prototype,`_slotContents`,void 0),customElements.get(`luzmo-slot-menu`)||customElements.define(`luzmo-slot-menu`,Z);var zo=`:host{--luzmo-select-inline-size:100%;font-family:var(--luzmo-item-slot-picker-font-family,var(--luzmo-font-family))}.container{gap:var(--luzmo-item-slot-picker-gap,var(--item-slot-picker-gap,var(--luzmo-spacing-3)));flex-direction:column;width:fit-content;display:flex}.select-container{flex-direction:column;display:flex}.select-container .select-controls{align-items:center;gap:var(--luzmo-item-slot-picker-controls-gap,var(--item-slot-picker-controls-gap));flex-direction:row;flex:auto;display:flex}luzmo-data-fields-select{flex-grow:var(--luzmo-item-slot-picker-data-fields-select-flex-grow,var(--item-slot-picker-data-fields-select-flex-grow))}.calculation-control{align-items:center;gap:var(--luzmo-item-slot-picker-controls-gap,var(--item-slot-picker-controls-gap));flex:auto;min-width:0;display:flex}.calculation-label{align-items:center;gap:var(--luzmo-spacing-3);flex:auto;min-width:0;display:inline-flex}.calculation-label-icon{flex:none;display:inline-flex}.calculations-list{gap:var(--luzmo-item-slot-picker-gap,var(--item-slot-picker-gap,var(--luzmo-spacing-3)));flex-direction:column;flex:auto;min-width:0;display:flex}:host([grows]){--item-slot-picker-data-fields-select-flex-grow:1}:host([grows]) .container{width:100%}:host([grows]) .select-container{flex:auto}.inline-slot-menu{margin-block-start:var(--luzmo-item-slot-picker-inline-slot-menu-gap,var(--item-slot-picker-inline-slot-menu-gap))}.inline-slot-menu[hidden]{display:none}.inline-slot-menu luzmo-slot-menu{--luzmo-slot-menu-popup-filter:none;--luzmo-slot-menu-display-settings-min-width:0;--luzmo-slot-menu-background-color:var(--luzmo-item-slot-picker-inline-slot-menu-background-color,var(--item-slot-picker-inline-slot-menu-background-color));width:100%}.extra-data-field-button-container{justify-content:flex-start;align-items:center;display:flex}.item-slot-picker-label{font-size:var(--luzmo-item-slot-picker-label-font-size,var(--item-slot-picker-label-font-size));margin-right:var(--luzmo-item-slot-picker-text-to-controls,var(--item-slot-picker-text-to-controls));text-overflow:ellipsis;white-space:nowrap;flex-grow:1;overflow:hidden}.controls{align-items:center;gap:var(--luzmo-item-slot-picker-controls-gap,var(--item-slot-picker-controls-gap));background-color:var(--luzmo-item-slot-picker-controls-background-color,var(--item-slot-picker-controls-background-color));height:100%;color:var(--luzmo-item-slot-picker-controls-color,var(--item-slot-picker-controls-color));margin-right:var(--luzmo-item-slot-picker-controls-to-edge,var(--item-slot-picker-controls-to-edge));padding:0 var(--luzmo-item-slot-picker-controls-horizontal-padding,var(--item-slot-picker-controls-horizontal-padding));margin-inline-start:var(--luzmo-item-slot-picker-select-to-controls,var(--item-slot-picker-select-to-controls));display:flex}.controls div{cursor:pointer;height:100%;padding:0 var(--luzmo-item-slot-picker-controls-control-horizontal-padding,var(--item-slot-picker-controls-control-horizontal-padding));align-items:center;display:flex}luzmo-slot-menu[placement=bottom],luzmo-slot-menu[placement=top],luzmo-slot-menu[placement=bottom-start],luzmo-slot-menu[placement=top-start],luzmo-slot-menu[placement=bottom-end],luzmo-slot-menu[placement=top-end]{margin:var(--luzmo-item-slot-picker-overlay-vertical-gap,var(--item-slot-picker-overlay-vertical-gap)) 0}luzmo-slot-menu[placement=left],luzmo-slot-menu[placement=right],luzmo-slot-menu[placement=left-start],luzmo-slot-menu[placement=right-start],luzmo-slot-menu[placement=left-end],luzmo-slot-menu[placement=right-end]{margin:0 var(--luzmo-item-slot-picker-overlay-horizontal-gap,var(--item-slot-picker-overlay-horizontal-gap))}:host{--item-slot-picker-border-width:var(--luzmo-border-width);--item-slot-picker-border-style:dashed;--item-slot-picker-border-color:var(--luzmo-border-color);--item-slot-picker-accept-drag-controls-background-color:transparent;--item-slot-picker-font-color:var(--luzmo-font-color);--item-slot-picker-controls-background-color:transparent;--item-slot-picker-text-to-controls:var(--luzmo-spacing-3);--item-slot-picker-controls-to-edge:0;--item-slot-picker-select-to-controls:var(--luzmo-spacing-2);--item-slot-picker-controls-gap:0;--item-slot-picker-controls-horizontal-padding:0;--item-slot-picker-controls-control-horizontal-padding:var(--luzmo-spacing-3);--item-slot-picker-label-font-size:var(--luzmo-font-size);--item-slot-picker-inline-slot-menu-gap:var(--luzmo-spacing-2);--item-slot-picker-inline-slot-menu-background-color:var(--luzmo-background-color);--item-slot-picker-horizontal-padding:var(--luzmo-spacing-4);--item-slot-picker-overlay-horizontal-gap:var(--luzmo-spacing-4);--item-slot-picker-overlay-vertical-gap:var(--luzmo-spacing-4)}:host([size=s]){--item-slot-picker-horizontal-padding:var(--luzmo-spacing-4);--item-slot-picker-overlay-horizontal-gap:var(--luzmo-spacing-4);--item-slot-picker-overlay-vertical-gap:var(--luzmo-spacing-4)}:host([size=l]),:host([size=xl]){--item-slot-picker-horizontal-padding:var(--luzmo-spacing-5);--item-slot-picker-overlay-horizontal-gap:var(--luzmo-spacing-5);--item-slot-picker-overlay-vertical-gap:var(--luzmo-spacing-5)}:host{box-sizing:border-box}`,Bo=e=>{if(`columnId`in e&&e.columnId)return e.columnId;if(`formulaId`in e&&e.formulaId)return e.formulaId;if(`formula`in e&&e.formula)return e.formula},Vo=e=>so(e),Ho=`::level::`,Uo=(e,t)=>`${e}${Ho}${t}`,Q=class extends n(y(p,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){static{this.styles=j(zo)}_isAdHocFormula(e){return`formula`in e&&typeof e.formula==`string`}constructor(){super(),this._loadSlotsConfig=new C(this,{task:async([e])=>{if(!e)return this._slotsConfig;if(e!==this._itemTypeLoaded){this._itemTypeLoaded=e;let t=await me(e);return this._slotsConfig=t??[],this._slotsConfig}return this._slotsConfig},args:()=>[this.itemType,this.language]}),this._slotsConfig=[],this.slotsContents=[],this.hasConnectedComparisonFilter=!1,this.slotConfiguration={},this.slotContents=[],this.contentLanguage=`en`,this.disabled=!1,this.grows=!1,this.menu=`default`,this.hasLabel=!1,this.selects=`multiple`,this.search=`auto`,this.icons=`menu-only`,this.datasetsDataFields=[],this.placement=`bottom-start`,this.slotMenuPlacement=`bottom-end`,this.slotMenuMode=`overlay`,this.hideClear=!1,this._hasExtraEmptySelects=!1,this._currentSlotContents=[],this._store=new no,this._changedSlotContents=(e,t=[])=>{e=e.map(e=>qn(e,this.slotsContents,this.itemType));let n=new CustomEvent(`luzmo-slot-contents-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:e,linkedDatasetsIds:t}});return this.dispatchEvent(n),n},new ia(this,{context:sa,initialValue:this._store})}willUpdate(e){super.willUpdate(e),e.has(`slotContents`)&&(this._currentSlotContents=structuredClone(this.slotContents??[]),this._store?.setContents(this._currentSlotContents??[],this.slotName),this._expandedIndex!==void 0&&this._expandedIndex>=this._currentSlotContents.length&&(this._expandedIndex=void 0)),(e.has(`slotMenuMode`)||e.has(`selects`)||e.has(`disabled`)&&this.disabled)&&(this._expandedIndex=void 0)}_onSlotMenuChanges(e){e.preventDefault(),e.stopPropagation(),(this.slotContents?.length??0)===(e.detail.slotContents?.length??0)?(this._currentSlotContents=structuredClone(e.detail.slotContents??[]),this.slotContents=structuredClone(e.detail.slotContents??[]),this._store?.setContents(this._currentSlotContents??[],this.slotName),this._changedSlotContents(this._currentSlotContents,e.detail.linkedDatasetsIds??[])):(this.slotContents=e.detail.slotContents??[],this._store?.setContents(this.slotContents??[],this.slotName),this._changedSlotContents(this.slotContents,e.detail.linkedDatasetsIds??[]))}_setSlotContentAtIndex(e,t){let n=e.detail?.dataFields??[],r=n.length===0;t>=this._currentSlotContents.length&&this._removeEmptySelect();for(let e=this._currentSlotContents.length;e<=t;e++)this._currentSlotContents[e]||this._currentSlotContents.push({});if(n.length>0){let e=n[0],r=Bo(e),i=this._currentSlotContents[t],a=Vo(i),o=i?.level,s=e.level;if(r&&(r!==a||o!==s)){let n=typeof e.level==`number`;this._currentSlotContents[t]=lo(e,n)}}else r&&(this._shiftExpandedIndexAfterRemoval(t),this._currentSlotContents.splice(t,1));this.slotContents=structuredClone(this._currentSlotContents.filter(e=>!!Vo(e))),this._changedSlotContents(this.slotContents)}_setSlotContents(e){let t=e.detail.dataFields??[],n=this._currentSlotContents.filter(e=>q(e,this.slotConfiguration));this.slotConfiguration?.canAcceptMultipleDataFields&&t.length>1||(t=t.slice(0,1));let r=this._getFilteredDatasetsDataFields(),i=t.map(e=>{let t=lo(e,typeof e.level==`number`),n=this._getSelectValueForSlotContent(t,r);if(n)return{selectionValue:n,slotContent:t}}).filter(e=>!!e),a=new Set(i.map(e=>e.selectionValue));this._currentSlotContents=this._currentSlotContents?.filter(e=>!q(e,this.slotConfiguration)).filter(e=>{let t=this._getSelectValueForSlotContent(e,r);return t?a.has(t):!1})??[],i.forEach(({selectionValue:e,slotContent:t})=>{let n=this._currentSlotContents.findIndex(t=>this._getSelectValueForSlotContent(t,r)===e);n===-1?this._currentSlotContents.push(t):this._currentSlotContents[n]=t}),this._currentSlotContents=[...n,...this._currentSlotContents],this.slotContents=structuredClone(this._currentSlotContents),this._changedSlotContents(this._currentSlotContents)}_renderFieldLabel(){return E`<luzmo-field-label for="data-fields" size=${this.size}
233
+ >${this.label??t(`Select...`)}
234
+ </luzmo-field-label>`}_removeEmptySelect(){this._hasExtraEmptySelects=!1}_getAcceptableDataFields(){let e=[],t=this.slotConfiguration?.acceptableDataFieldTypes?.length?this.slotConfiguration.acceptableDataFieldTypes:oa;return this.datasetsDataFields.forEach(n=>{(n.columns?.filter(e=>t.includes(e.type??``))??[]).forEach(t=>{e.push({datasetId:n.id,type:t.type,name:t.name,columnId:t.id,description:t.description,subtype:t.subtype,format:t.format,lowestLevel:t.lowestLevel,duration_levels:t.duration_levels,duration_format:t.duration_format,expression:t.expression,hierarchyLevels:t.hierarchyLevels,currency:t.currency})}),this.slotConfiguration?.canAcceptFormula&&(n.formulas??[]).forEach(t=>{t.type&&(this._isAdHocFormula(t)?e.push({datasetId:n.id,type:t.type,name:t.label??{en:`Ad-hoc formula`},formula:t.formula,subtype:t.subtype??void 0,format:t.format}):e.push({datasetId:n.id,type:t.type,name:t.name,formulaId:t.id,description:t.description,subtype:t.subtype,format:t.format,lowestLevel:t.lowestLevel,duration_levels:t.duration_levels,duration_format:t.duration_format,expression:t.expression,currency:t.currency}))})}),e}_getFirstAvailableDataField(){let e=this._getAcceptableDataFields(),t=new Set(this._currentSlotContents.map(e=>e.columnId??e.formulaId??e.column??e.formula));return e.find(e=>{let n=Bo(e);return n?!t.has(n):!1})}_hasAvailableDataFields(){return!!this._getFirstAvailableDataField()}_addDataField(){let e=this._getFirstAvailableDataField();if(e){let t=lo(e,!1);this._currentSlotContents.push(t),this.slotContents=structuredClone(this._currentSlotContents),this._changedSlotContents(this.slotContents)}else this._hasExtraEmptySelects=!0}_renderExtraDataFieldButton(){return this._hasAvailableDataFields()?E`<div class="extra-data-field-button-container">
235
+ <luzmo-button
236
+ variant="neutral"
237
+ treatment="fill"
238
+ .size=${this._oneSizeSmaller}
239
+ .label=${t(`Add data field`,{desc:`Aria label for add data field button`})}
240
+ @click=${this._addDataField}
241
+ ?disabled=${this._hasExtraEmptySelects||this.disabled}
242
+ >
243
+ <luzmo-icon slot="icon" .icon=${d} .size=${this._oneSizeSmaller}></luzmo-icon>
244
+ ${t(`Add`,{id:`item-slot-picker-add`,desc:`Add data field button label`})}
245
+ </luzmo-button>
246
+ </div>`:E`
247
+
248
+ `}get _oneSizeSmaller(){return{s:`xs`,m:`s`,l:`m`,xl:`l`}[this.size]??`s`}_renderControls(e,n,r=0){if(this.hideConfiguration&&this.hideClear)return``;let i=this._hasInlineSlotMenu,s=i&&this._expandedIndex===r;return E`<div class="controls">
249
+ ${this.hideConfiguration?``:E`<luzmo-action-button
250
+ .size=${this.size}
251
+ quiet
252
+ id=${e}
253
+ .label=${t(`Edit`,{desc:`Edit action label`})}
254
+ .selected=${s}
255
+ ?emphasized=${s}
256
+ aria-expanded=${D(i?String(s):void 0)}
257
+ aria-controls=${D(i?this._inlineSlotMenuId(r):void 0)}
258
+ ?disabled=${this.disabled}
259
+ @click=${()=>this._handleEditClick(r)}
260
+ >
261
+ ${f(a)}
262
+ <luzmo-tooltip self-managed placement="top" size=${this.size}>
263
+ ${t(`Edit`,{desc:`Edit action label`})}
264
+ </luzmo-tooltip>
265
+ </luzmo-action-button>`}
266
+ ${this.hideClear?``:E`<luzmo-action-button
267
+ class="delete-button"
268
+ .size=${this.size}
269
+ quiet
270
+ .label=${t(`Delete`,{desc:`Delete action label`})}
271
+ ?disabled=${this.disabled}
272
+ @click=${n}
273
+ >
274
+ ${f(o)}
275
+ <luzmo-tooltip self-managed placement="top" size=${this.size}>
276
+ ${t(`Delete`,{desc:`Delete action label`})}
277
+ </luzmo-tooltip>
278
+ </luzmo-action-button>`}
279
+ </div>`}_renderSingleSelect(){let e=this._renderFieldLabel(),t=this._currentSlotContents.length>0;if(!t&&!this._hasExtraEmptySelects)return E`<div class="select-container">
280
+ ${this.hasLabel?e:``} ${this._renderSelectMenu(0)}
281
+ </div>`;let n=this._currentSlotContents.map((t,n)=>E` <div class="select-container">
282
+ ${this.hasLabel&&n===0?e:``}
283
+ <div class="select-controls">
284
+ ${this._renderSelectMenu(n)}
285
+ ${this.slotContents?.length>0?this._renderControls(`trigger-${n}`,()=>this._removeSlotContentAt(n),n):``}
286
+ ${this.slotContents?.length>0&&!this._hasInlineSlotMenu?this._renderOverlaySlotMenu(`trigger-${n}`,n):``}
287
+ </div>
288
+ ${this.slotContents?.length>0&&this._hasInlineSlotMenu?this._renderInlineSlotMenu(n):``}
289
+ </div>`);return this._hasExtraEmptySelects&&n.push(E`<div class="select-container">
290
+ ${this._renderSelectMenu(this._currentSlotContents.length)}
291
+ </div>`),t&&this.slotConfiguration?.canAcceptMultipleDataFields&&n.push(this._renderExtraDataFieldButton()),n}_renderMultipleSelect(){let e=this._renderFieldLabel();return E`<div class="select-container">
292
+ ${this.hasLabel?e:``}
293
+
294
+ <div class="select-controls">
295
+ ${this._renderMultipleSelectionControl()}
296
+ ${this.slotContents?.length>0?this._renderControls(`trigger`,()=>this._removeAllSlotContents()):``}
297
+ ${this.slotContents?.length>0?this._renderOverlaySlotMenu(`trigger`):``}
298
+ </div>
299
+ </div>`}_renderSlotMenu(e){return E`<luzmo-slot-menu
300
+ ?no-remove=${!this.hideClear}
301
+ language=${this.language}
302
+ content-language=${this.contentLanguage}
303
+ slot-type=${this.slotConfiguration?.type}
304
+ slot-name=${D(this.slotName)}
305
+ item-type=${D(this.itemType)}
306
+ .hasConnectedComparisonFilter=${this.hasConnectedComparisonFilter}
307
+ .slotsContents=${this.slotsContents}
308
+ api-url=${D(this.apiUrl)}
309
+ auth-key=${D(this.authKey)}
310
+ auth-token=${D(this.authToken)}
311
+ .datasetsDataFields=${this.datasetsDataFields}
312
+ .areGrandTotalsEnabled=${this.slotConfiguration?.options?.areGrandTotalsEnabled}
313
+ .areDatetimeOptionsEnabled=${this.slotConfiguration?.options?.areDatetimeOptionsEnabled}
314
+ .isBinningDisabled=${this.slotConfiguration?.options?.isBinningDisabled}
315
+ .isAggregationDisabled=${this.slotConfiguration?.options?.isAggregationDisabled}
316
+ .isCumulativeSumEnabled=${this.slotConfiguration?.options?.isCumulativeSumEnabled}
317
+ .slotIndex=${e}
318
+ variant="popup"
319
+ .size=${this.size}
320
+ @luzmo-slot-contents-changed=${this._onSlotMenuChanges}
321
+ ></luzmo-slot-menu>`}_renderOverlaySlotMenu(e,t){return E`<luzmo-overlay trigger=${`${e}@click`} .placement=${this.slotMenuPlacement}>
322
+ ${this._renderSlotMenu(t)}
323
+ </luzmo-overlay>`}_renderInlineSlotMenu(e){return E`<div
324
+ class="inline-slot-menu"
325
+ id=${this._inlineSlotMenuId(e)}
326
+ ?hidden=${this._expandedIndex!==e}
327
+ @luzmo-close=${this._handleInlineSlotMenuClose}
328
+ @keydown=${this._handleInlineSlotMenuKeydown}
329
+ >
330
+ ${this._renderSlotMenu(e)}
331
+ </div>`}get _hasInlineSlotMenu(){return this.slotMenuMode===`inline`&&this.selects===`single`}_inlineSlotMenuId(e){return`inline-slot-menu-${e}`}_handleEditClick(e){this.selects===`single`&&this._store.updateActive(e),this._hasInlineSlotMenu&&(this._expandedIndex=this._expandedIndex===e?void 0:e)}_handleInlineSlotMenuClose(e){e.stopPropagation(),this._expandedIndex=void 0}_handleInlineSlotMenuKeydown(e){if(e.key!==`Escape`||e.defaultPrevented||this._expandedIndex===void 0)return;let t=e.composedPath();if(t.slice(0,t.indexOf(e.currentTarget)).some(e=>e.open===!0))return;e.preventDefault(),e.stopPropagation();let n=this._expandedIndex;this._expandedIndex=void 0,this._focusEditButton(n)}async _focusEditButton(e){await this.updateComplete;let t=this.shadowRoot?.getElementById(`trigger-${e}`);await t?.updateComplete,t?.focus()}_renderMultipleSelectionControl(){let e=this._currentSlotContents.map((e,t)=>({content:e,index:t})).filter(({content:e})=>q(e,this.slotConfiguration));return e.length===0?this._renderSelectMenu():E`<div class="calculations-list">
332
+ ${e.map(({content:e,index:t})=>this._renderCalculation(e,t,this._currentSlotContents.length>1))}
333
+ </div>
334
+ ${e.length<this._currentSlotContents.length?this._renderSelectMenu(void 0,!0):``}`}_getSelectValueForSlotContent(e,t){let n=Vo(e);if(!n)return;let r=e.columnId,i=e.level;if(!r||typeof i!=`number`||Number.isNaN(i))return n;let a;for(let e of t)if(a=e.columns?.find(e=>e.id===r),a)break;return a&&(Array.isArray(a.hierarchyLevels)&&a.hierarchyLevels.length>2&&a.hierarchy_enabled===!0&&i>=1||(a.type===`datetime`||a.type===`array[datetime]`)&&typeof a.lowestLevel==`number`)?Uo(r,i):n}_getFilteredDatasetsDataFields(){let e=this.slotConfiguration?.acceptableDataFieldTypes?.length?this.slotConfiguration.acceptableDataFieldTypes:oa;return this.datasetsDataFields.map(t=>({...t,columns:t.columns?.filter(t=>e.includes(t.type??``))??[],formulas:this.slotConfiguration?.canAcceptFormula?t.formulas??[]:[]}))}_removeSlotContentAt(e){let t=this.matches(`:focus-within`);this._shiftExpandedIndexAfterRemoval(e),this._currentSlotContents.splice(e,1),this.slotContents=structuredClone(this._currentSlotContents),this._store?.setContents(this.slotContents,this.slotName),this._changedSlotContents(this.slotContents),t&&this._focusRowAfterRemoval(e)}_shiftExpandedIndexAfterRemoval(e){this._expandedIndex===void 0||this._expandedIndex<e||(this._expandedIndex=this._expandedIndex===e?void 0:this._expandedIndex-1,this._expandedIndex!==void 0&&this._store.updateActive(this._expandedIndex))}_removeAllSlotContents(){let e=this.matches(`:focus-within`);this._currentSlotContents=[],this.slotContents=[],this._store?.setContents(this.slotContents,this.slotName),this._changedSlotContents(this.slotContents),e&&this._focusRowAfterRemoval(0)}async _focusRowAfterRemoval(e){await this.updateComplete;let t=[...this.shadowRoot?.querySelectorAll(`.container > .select-container`)??[]],n=t[Math.min(e,t.length-1)]?.querySelector(`luzmo-data-fields-select, luzmo-action-button`);await n?.updateComplete,n?.focus()}_renderCalculation(e,n,r=!1){return E`<div class="calculation-control">
335
+ ${co(e)}
336
+ ${this.hideClear||!r?``:E`<luzmo-action-button
337
+ quiet
338
+ .size=${this.size}
339
+ .label=${t(`Clear calculation`,{desc:`Clear an ad-hoc slot calculation and return to column selection`})}
340
+ ?disabled=${this.disabled}
341
+ @click=${()=>this._removeSlotContentAt(n)}
342
+ >
343
+ ${f(oe)}
344
+ </luzmo-action-button>`}
345
+ </div>`}_renderSelectMenu(e,n=!1){let r=e??0,i=this._currentSlotContents[r];if(!n&&i&&(e!==void 0||this._currentSlotContents.length===1)&&q(i,this.slotConfiguration))return this._renderCalculation(i,r);let a=[],o=this._getFilteredDatasetsDataFields();if(e!==void 0&&e>=this._currentSlotContents.length)a=[];else if(a=this._currentSlotContents.filter(e=>!n||!q(e,this.slotConfiguration)).map(e=>this._getSelectValueForSlotContent(e,o)).filter(e=>typeof e==`string`&&e.length>0),this.selects===`single`&&a?.length>0){let t=a[e??0];a=t?[t]:[]}return E`<luzmo-data-fields-select
346
+ .language=${this.language}
347
+ .contentLanguage=${this.contentLanguage}
348
+ .size=${this.size}
349
+ .icons=${this.icons}
350
+ .placeholder=${this.placeholder??t(`Add a data field...`,{desc:`Placeholder for an empty data field select`})}
351
+ .placement=${this.placement}
352
+ .search=${this.search}
353
+ ?disabled=${this.disabled}
354
+ allow-empty
355
+ .datasetsDataFields=${o}
356
+ .value=${a}
357
+ .selects=${this.selects===`multiple`&&this.slotConfiguration?.canAcceptMultipleDataFields?`multiple`:`single`}
358
+ data-index=${e??0}
359
+ @luzmo-data-fields-selected=${this._handleSelectChange}
360
+ >
361
+ </luzmo-data-fields-select>`}_handleSelectChange(e){if(this.selects===`single`){let t=e.currentTarget?.dataset?.index,n=t?Number.parseInt(t,10):0;this._setSlotContentAtIndex(e,Number.isNaN(n)?0:n)}else this._setSlotContents(e)}_itemSlotPickerMarkup(){return E`
362
+ <div class="container">
363
+ ${this.selects===`multiple`?this._renderMultipleSelect():this._renderSingleSelect()}
364
+ </div>
365
+ `}render(){return this._loadSlotsConfig.render({pending:()=>E`
366
+ <p>Loading...</p>
367
+ `,complete:e=>{if(this.slotName&&this.itemType&&e){let t=e.find(e=>e.name===this.slotName);t&&(this.slotConfiguration=t)}return this._itemSlotPickerMarkup()},error:e=>E`
368
+ <div>
369
+ Could not load item-slot-picker: '${this.slotName}' of chart
370
+ '${this.itemType}': ${e}.
371
+ </div>
372
+ `})}};e([k({attribute:!1})],Q.prototype,`slotsContents`,void 0),e([k({type:Boolean,attribute:`has-connected-comparison-filter`,reflect:!0})],Q.prototype,`hasConnectedComparisonFilter`,void 0),e([k({type:String,attribute:`api-url`,reflect:!0})],Q.prototype,`apiUrl`,void 0),e([k({type:String,attribute:`auth-key`,reflect:!0})],Q.prototype,`authKey`,void 0),e([k({type:String,attribute:`auth-token`,reflect:!0})],Q.prototype,`authToken`,void 0),e([k({type:String,reflect:!0,attribute:`item-type`})],Q.prototype,`itemType`,void 0),e([k({type:String,reflect:!0,attribute:`slot-name`})],Q.prototype,`slotName`,void 0),e([k({type:Object})],Q.prototype,`slotConfiguration`,void 0),e([k({type:Array})],Q.prototype,`slotContents`,void 0),e([k({type:String,attribute:`content-language`,reflect:!0})],Q.prototype,`contentLanguage`,void 0),e([k({type:Boolean,attribute:`disabled`,reflect:!0})],Q.prototype,`disabled`,void 0),e([k({type:Boolean,attribute:`grows`,reflect:!0})],Q.prototype,`grows`,void 0),e([k({type:String,reflect:!0})],Q.prototype,`menu`,void 0),e([k({type:Boolean,attribute:`has-label`,reflect:!0})],Q.prototype,`hasLabel`,void 0),e([k({type:String,reflect:!0})],Q.prototype,`label`,void 0),e([k({type:String,reflect:!0})],Q.prototype,`selects`,void 0),e([k({type:String,reflect:!0})],Q.prototype,`search`,void 0),e([k({type:String,reflect:!0})],Q.prototype,`icons`,void 0),e([k({type:String,attribute:`placeholder`,reflect:!0})],Q.prototype,`placeholder`,void 0),e([k({type:Array,reflect:!1})],Q.prototype,`datasetsDataFields`,void 0),e([k({type:String,reflect:!0})],Q.prototype,`placement`,void 0),e([k({type:String,reflect:!0,attribute:`slot-menu-placement`})],Q.prototype,`slotMenuPlacement`,void 0),e([k({type:String,reflect:!0,attribute:`slot-menu-mode`})],Q.prototype,`slotMenuMode`,void 0),e([k({type:Boolean,reflect:!0,attribute:`hide-configuration`})],Q.prototype,`hideConfiguration`,void 0),e([k({type:Boolean,reflect:!0,attribute:`hide-clear`})],Q.prototype,`hideClear`,void 0),e([A()],Q.prototype,`_hasExtraEmptySelects`,void 0),e([A()],Q.prototype,`_expandedIndex`,void 0),Q=e([r()],Q),customElements.get(`luzmo-item-slot-picker`)||customElements.define(`luzmo-item-slot-picker`,Q);var Wo=`:host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzmo-font-size));font-family:var(--luzmo-font-family,sans-serif);color:var(--luzmo-font-color,inherit);display:block}:host([size=s]){font-size:var(--luzmo-item-slot-picker-panel-font-size-s,var(--luzmo-font-size-s))}:host([size=l]){font-size:var(--luzmo-item-slot-picker-panel-font-size-l,var(--luzmo-font-size-l))}:host([size=xl]){font-size:var(--luzmo-item-slot-picker-panel-font-size-xl,var(--luzmo-font-size-xl))}.container{flex-direction:column;align-items:flex-start;display:flex}.dataset-picker{align-self:stretch;align-items:flex-start;gap:var(--luzmo-item-slot-picker-panel-dataset-picker-gap,var(--luzmo-spacing-2));border-bottom-style:solid;border-bottom-width:var(--luzmo-item-slot-picker-panel-dataset-picker-border-width,1px);border-bottom-color:var(--luzmo-item-slot-picker-panel-dataset-picker-border-color,var(--luzmo-border-color));flex-direction:column;flex-shrink:0;margin-block-end:var(--luzmo-item-slot-picker-panel-dataset-picker-margin-block-end,var(--luzmo-spacing-4));padding-block-end:var(--luzmo-item-slot-picker-panel-dataset-picker-padding-block-end,var(--luzmo-spacing-4));display:flex}.slots-panel{gap:var(--luzmo-item-slot-picker-panel-gap,var(--luzmo-spacing-5));flex-direction:column;display:flex}.slot-container{gap:var(--luzmo-item-slot-picker-panel-slot-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}luzmo-field-label{margin:0}luzmo-item-slot-picker{display:block}:host([grows]) .container{align-items:stretch;width:100%}:host([grows]) .dataset-picker{align-items:stretch}:host([grows]) .dataset-picker luzmo-select{width:100%}`,Go=50,Ko=400,$=class extends n(y(p,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){constructor(...e){super(...e),this._loadSlotsConfig=new C(this,{task:async([e])=>{if(e&&e!==this._itemTypeLoaded){this._itemTypeLoaded=e;let t=await me(e);return this._slotsConfig=t??[],this._slotsConfig}return this._slotsConfig},args:()=>[this.itemType,this.language]}),this._slotsConfig=[],this._datasetListItems=[],this._datasetSearchItems=[],this._datasetSearchValue=``,this._datasetSearchRequestId=0,this._datasetSearchDebounceTimer=null,this._datasetListRetrieving=!1,this._datasetListPending=!1,this._datasetNamesFetchAttempted=!1,this._hasMoreDatasets=!0,this._fetchedDatasetsDataFields=[],this._failedDatasetIds=/* @__PURE__ */ new Set,this._loadDataFieldsTask=new C(this,{args:()=>[this._currentDatasetId,this.apiUrl,this.authKey,this.authToken,this.datasetsDataFields.length],task:async([e,t,n,r,i])=>{if(i>0||!e)return null;if(!v(e))return console.warn(`[LuzmoItemSlotPickerPanel] Invalid dataset ID provided (not a valid UUID): ${e}`),this._failedDatasetIds.add(e),null;if(this._failedDatasetIds.has(e))return null;let a=this._fetchedDatasetsDataFields.find(t=>t.id===e);if(a&&a.columns&&a.columns.length>0)return a;try{let t=await b.fetchDatasetsWithColumnsAndFormulas([e]);if(t.length===0)return this._failedDatasetIds.add(e),null;let n=t[0],r=this._fetchedDatasetsDataFields.findIndex(t=>t.id===e);return r===-1?this._fetchedDatasetsDataFields=[...this._fetchedDatasetsDataFields,n]:this._fetchedDatasetsDataFields[r]=n,n}catch(t){return console.warn(`Failed to fetch dataset data fields:`,t),this._failedDatasetIds.add(e),null}}}),this.hasConnectedComparisonFilter=!1,this.contentLanguage=`en`,this.slotsContents=[],this.selects=`multiple`,this.dataFieldsSearch=`auto`,this.datasetSearch=`auto`,this.icons=`menu-only`,this.datasetsDataFields=[],this.datasetIds=[],this.datasetPicker=!1,this.apiUrl=`https://api.luzmo.com`,this.placement=`bottom-start`,this.slotMenuPlacement=`bottom-end`,this.slotMenuMode=`overlay`,this.constraintMode=`auto`,this.grows=!1,this._currentSlotsContents=[],this._createSlotChangeHandler=e=>t=>{t.preventDefault(),t.stopPropagation();let n=t.detail.slotContents??[],r=this._applySlotConstraints(e,n);r!==null&&(this._currentSlotsContents=r,this.slotsContents=structuredClone(r),this.dispatchEvent(new CustomEvent(`luzmo-slots-contents-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotsContents:r}})))}}static{this.styles=j(Wo)}get _availableDatasets(){if(this.datasetsDataFields.length>0)return this.datasetsDataFields;if(this.datasetIds.length>0)return this.datasetIds.map(e=>{let t=this._datasetListItems.find(t=>t.id===e);return t?{id:t.id,name:t.name,description:t.description}:{id:e,name:{en:e}}});let e=[...this._datasetListItems,...this._datasetSearchItems.filter(e=>!this._datasetListItems.some(t=>t.id===e.id))];return e.length>0?e.map(e=>({id:e.id,name:e.name,description:e.description})):[]}get _currentDatasetsDataFields(){if(this.datasetsDataFields.length>0){if(!this._currentDatasetId)return this.datasetsDataFields;let e=this.datasetsDataFields.find(e=>e.id===this._currentDatasetId);return e?[e]:this.datasetsDataFields}let e=this._loadDataFieldsTask.value;if(e)return[{id:e.id,name:e.name,description:e.description,columns:e.columns??[],formulas:e.formulas??[]}];if(this._fetchedDatasetsDataFields.length>0&&this._currentDatasetId){let e=this._fetchedDatasetsDataFields.find(e=>e.id===this._currentDatasetId);if(e)return[{id:e.id,name:e.name,description:e.description,columns:e.columns??[],formulas:e.formulas??[]}]}return[]}get _shouldFetchDatasetList(){return this.datasetPicker&&this.datasetsDataFields.length===0}_areDatasetsLinked(e,t){return e===t}_getUsedDatasetIds(){let e=/* @__PURE__ */ new Set;for(let t of this._currentSlotsContents)for(let n of t.content)n.datasetId&&e.add(n.datasetId);return[...e]}disconnectedCallback(){super.disconnectedCallback(),this._clearDatasetSearchTimer()}willUpdate(e){super.willUpdate(e),e.has(`slotsContents`)&&(this._currentSlotsContents=structuredClone(this.slotsContents??[]));let t=e.has(`selectedDatasetId`),n=e.has(`datasetsDataFields`),r=e.has(`datasetIds`),i=e.has(`datasetPicker`),a=e.has(`authKey`),o=e.has(`authToken`),s=e.has(`apiUrl`);(r||a||o||s)&&(this._datasetListItems=[],this._datasetSearchItems=[],this._datasetSearchValue=``,this._datasetSearchRequestId++,this._clearDatasetSearchTimer(),this._hasMoreDatasets=!0,this._datasetNamesFetchAttempted=!1,this._fetchedDatasetsDataFields=[],this._failedDatasetIds.clear(),b.configure({apiUrl:this.apiUrl,authKey:this.authKey??``,authToken:this.authToken??``})),n&&this.datasetsDataFields.length>0&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._fetchedDatasetsDataFields=[],this._failedDatasetIds.clear()),(t||n||r)&&this._updateCurrentDatasetId(),(r||a||o||s||i)&&this.datasetIds.length>0&&this.datasetPicker&&this.datasetsDataFields.length===0&&this._datasetListItems.length===0&&this._fetchDatasetNamesForPicker()}_updateCurrentDatasetId(){let e=this._availableDatasets;this._currentDatasetId=this.selectedDatasetId&&e.some(e=>e.id===this.selectedDatasetId)||this.selectedDatasetId&&this.datasetIds.includes(this.selectedDatasetId)?this.selectedDatasetId:e.length>0?e[0].id:void 0}async _fetchDatasetNamesForPicker(){if(this.datasetIds.length!==0){this._datasetListPending=!0;try{let e=await b.fetchDatasetNames(this.datasetIds);this._datasetListItems=e}catch(e){console.warn(`Failed to fetch dataset names:`,e)}finally{this._datasetListPending=!1,this._datasetNamesFetchAttempted=!0}}}async _loadMoreDatasets(e){if(!this._datasetListRetrieving&&this._hasMoreDatasets){this._datasetListRetrieving=!0,e&&(e.retrieving=!0);try{let e=this._datasetListItems.length,t=await b.fetchAllDatasets({offset:e,limit:Go});if(this._datasetListItems=[...this._datasetListItems,...t.data],this._hasMoreDatasets=e+Go<(t.pagination?.total??0),!this._currentDatasetId){let e=this.selectedDatasetId??this._getUsedDatasetIds()[0];e&&this._datasetListItems.some(t=>t.id===e)&&(this._currentDatasetId=e)}}catch(e){console.warn(`Failed to load dataset list:`,e),this._hasMoreDatasets=!1}finally{this._datasetListRetrieving=!1,e&&(e.retrieving=!1)}}}_handlePickerScrolled(e){if(this.datasetIds.length>0||this._datasetSearchValue)return;let t=e.target,{last:n}=e.detail;n>=this._datasetListItems.length-10&&this._hasMoreDatasets&&this._loadMoreDatasets(t)}async _handlePickerOpened(e){let t=e.target;this._datasetListItems.length===0&&this._shouldFetchDatasetList&&this.datasetIds.length===0&&this._hasMoreDatasets&&await this._loadMoreDatasets(t)}_handleDatasetSearch(e){if(!this._shouldFetchDatasetList||this.datasetIds.length>0)return;let t=e.target,n=(e.detail?.string??``).trim();if(n===this._datasetSearchValue)return;this._datasetSearchValue=n,this._clearDatasetSearchTimer();let r=++this._datasetSearchRequestId;n?(t.retrieving=!0,this._datasetSearchDebounceTimer=window.setTimeout(async()=>{this._datasetSearchDebounceTimer=null;try{let e=await b.searchDatasets(n,{limit:Go});r===this._datasetSearchRequestId&&(this._keepOnlySelectedSearchItem(),this._datasetSearchItems=[...this._datasetSearchItems,...e.data.filter(e=>!this._datasetSearchItems.some(t=>t.id===e.id))])}catch(e){console.warn(`Failed to search datasets:`,e)}finally{r===this._datasetSearchRequestId&&(t.retrieving=!1)}},Ko)):(this._keepOnlySelectedSearchItem(),t.retrieving=!1)}_handleDatasetPickerClosed(e){this._clearDatasetSearchTimer(),this._datasetSearchRequestId++,this._datasetSearchValue=``,e.target.retrieving=!1,this._keepOnlySelectedSearchItem()}_keepOnlySelectedSearchItem(){this._datasetSearchItems=this._datasetSearchItems.filter(e=>e.id===this._currentDatasetId)}_clearDatasetSearchTimer(){this._datasetSearchDebounceTimer!==null&&(clearTimeout(this._datasetSearchDebounceTimer),this._datasetSearchDebounceTimer=null)}_handleDatasetChange(e){let t=e.detail?.value?.[0];if(!t||t===this._currentDatasetId)return;let n=this._getUsedDatasetIds(),r=this._currentSlotsContents.some(e=>e.content.length>0),i=n.every(e=>this._areDatasetsLinked(e,t));if(r&&!i){if(this.constraintMode===`event-only`){this.dispatchEvent(new CustomEvent(`luzmo-dataset-constraint-triggered`,{bubbles:!0,composed:!0,detail:{previousDatasetId:this._currentDatasetId,newDatasetId:t,currentSlotsContents:structuredClone(this._currentSlotsContents),wouldClearSlots:!0}}));return}this._currentSlotsContents=[],this.slotsContents=[],this.dispatchEvent(new CustomEvent(`luzmo-slots-contents-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotsContents:[]}}))}this._currentDatasetId=t,this.dispatchEvent(new CustomEvent(`luzmo-dataset-changed`,{bubbles:!0,composed:!0,detail:{datasetId:t}}))}_getSlotContents(e){return this._currentSlotsContents?.find(t=>t.name===e)?.content??[]}_applySlotConstraints(e,t){let n=this.slotsConfiguration??this._slotsConfig,r=structuredClone(this._currentSlotsContents),i=structuredClone(this._currentSlotsContents),a=i.findIndex(t=>t.name===e);a===-1?i.push({name:e,content:t}):i[a].content=t;let o=[];for(let r of n){if(r.keepOnlyFirstWhenOtherSlotFilled?.includes(e)&&t.length>0){let t=i.findIndex(e=>e.name===r.name);t!==-1&&i[t].content.length>1&&(o.push({type:`keepOnlyFirstWhenOtherSlotFilled`,affectedSlotName:r.name,triggeredBySlotName:e}),i[t].content=[i[t].content[0]])}if(r.clearWhenOtherSlotHasMultipleItems?.includes(e)&&t.length>1){let t=i.findIndex(e=>e.name===r.name);t!==-1&&i[t].content.length>0&&(o.push({type:`clearWhenOtherSlotHasMultipleItems`,affectedSlotName:r.name,triggeredBySlotName:e}),i[t].content=[])}}let s=i.map(e=>({...e,content:e.content.map(e=>qn(e,i,this.itemType))}));if(this.constraintMode===`event-only`&&o.length>0){let n={triggerSlotName:e,proposedTriggerContents:t.map(e=>qn(e,i,this.itemType)),originalSlotsContents:r,proposedSlotsContents:s,constraints:o};return this.dispatchEvent(new CustomEvent(`luzmo-slot-constraint-triggered`,{detail:n,bubbles:!0,composed:!0})),null}return s}_getTranslatedLabel(e){let t=(typeof e.label==`string`?e.label:e.label?x(e.label,this.language):void 0)??e.name;return Qi[t]?Qi[t]():t}_renderDatasetPicker(){if(!this.datasetPicker)return O;let e=this._availableDatasets,n=e.length>1,r=this.datasetIds.length>0,i=this._shouldFetchDatasetList;if(!n&&!r&&!i)return O;let a=this._datasetListPending||this.datasetIds.length>0&&this._datasetListItems.length===0&&this.datasetsDataFields.length===0&&!this._datasetNamesFetchAttempted,o=a?[]:e.map(e=>({value:e.id,label:x(e.name,this.contentLanguage)||e.id})),s=a?[]:this._currentDatasetId?[this._currentDatasetId]:[],c=t(a?`Loading datasets...`:`Select dataset...`);return E`
373
+ <div class="dataset-picker" part="dataset-picker">
374
+ <luzmo-field-label part="dataset-field-label" size=${this.size}>
375
+ ${this.datasetPickerLabel??t(`Dataset`)}
376
+ </luzmo-field-label>
377
+ <luzmo-select
378
+ selects="single"
379
+ variant="highlight"
380
+ search=${D(this.datasetSearch)}
381
+ placement=${this.placement}
382
+ .size=${this.size}
383
+ .options=${o}
384
+ .value=${s}
385
+ .label=${c}
386
+ ?pending=${a}
387
+ @change=${this._handleDatasetChange}
388
+ @luzmo-opened=${this._handlePickerOpened}
389
+ @luzmo-scrolled=${this._handlePickerScrolled}
390
+ @luzmo-search=${this._handleDatasetSearch}
391
+ @luzmo-closed=${this._handleDatasetPickerClosed}
392
+ ></luzmo-select>
393
+ </div>
394
+ `}_renderSlot(e){let t=this._getSlotContents(e.name),n=this._createSlotChangeHandler(e.name),r=this._getTranslatedLabel(e);return E`
395
+ <div class="slot-container" part="slot-container">
396
+ <luzmo-field-label part="field-label" size=${this.size}>
397
+ ${r}
398
+ </luzmo-field-label>
399
+ <luzmo-item-slot-picker
400
+ part="item-slot-picker"
401
+ item-type=${D(this.itemType)}
402
+ .hasConnectedComparisonFilter=${this.hasConnectedComparisonFilter}
403
+ slot-name=${e.name}
404
+ language=${this.language}
405
+ content-language=${this.contentLanguage}
406
+ api-url=${D(this.apiUrl)}
407
+ auth-key=${D(this.authKey)}
408
+ auth-token=${D(this.authToken)}
409
+ size=${this.size}
410
+ selects=${this.selects}
411
+ search=${D(this.dataFieldsSearch)}
412
+ icons=${D(this.icons)}
413
+ placement=${this.placement}
414
+ slot-menu-placement=${this.slotMenuPlacement}
415
+ slot-menu-mode=${this.slotMenuMode}
416
+ ?grows=${this.grows}
417
+ aria-required=${e.isRequired?`true`:O}
418
+ .slotConfiguration=${e}
419
+ .slotContents=${t}
420
+ .slotsContents=${this._currentSlotsContents}
421
+ .datasetsDataFields=${this._currentDatasetsDataFields}
422
+ @luzmo-slot-contents-changed=${n}
423
+ ></luzmo-item-slot-picker>
424
+ </div>
425
+ `}_renderSlots(e){let t=e.map(e=>this._renderSlot(e));return E`
426
+ <div class="slots-panel" part="slots-panel">
427
+ ${t}
428
+ </div>
429
+ `}_renderContent(e){return E`
430
+ <div class="container" part="container">
431
+ ${this._renderDatasetPicker()}
432
+ ${this._renderSlots(e)}
433
+ </div>
434
+ `}render(){return this.slotsConfiguration&&this.slotsConfiguration.length>0?this._renderContent(this.slotsConfiguration):this._loadSlotsConfig.render({pending:()=>E`
435
+ <p role="status">Loading...</p>
436
+ `,complete:e=>!e||e.length===0?E`<p>No slots configuration found for ${this.itemType}</p>`:this._renderContent(e),error:e=>E`
437
+ <div role="alert">Could not load slots configuration for '${this.itemType}': ${e}.</div>
438
+ `})}};e([A()],$.prototype,`_datasetListItems`,void 0),e([A()],$.prototype,`_datasetSearchItems`,void 0),e([A()],$.prototype,`_datasetListRetrieving`,void 0),e([A()],$.prototype,`_datasetListPending`,void 0),e([A()],$.prototype,`_currentDatasetId`,void 0),e([A()],$.prototype,`_fetchedDatasetsDataFields`,void 0),e([k({type:Boolean,attribute:`has-connected-comparison-filter`,reflect:!0})],$.prototype,`hasConnectedComparisonFilter`,void 0),e([k({type:String,reflect:!0,attribute:`item-type`})],$.prototype,`itemType`,void 0),e([k({type:String,attribute:`content-language`,reflect:!0})],$.prototype,`contentLanguage`,void 0),e([k({type:Array})],$.prototype,`slotsConfiguration`,void 0),e([k({type:Array})],$.prototype,`slotsContents`,void 0),e([k({type:String,reflect:!0})],$.prototype,`selects`,void 0),e([k({type:String,reflect:!0,attribute:`data-fields-search`})],$.prototype,`dataFieldsSearch`,void 0),e([k({type:String,reflect:!0,attribute:`dataset-search`})],$.prototype,`datasetSearch`,void 0),e([k({type:String,reflect:!0})],$.prototype,`icons`,void 0),e([k({type:Array,reflect:!1})],$.prototype,`datasetsDataFields`,void 0),e([k({type:Array,attribute:`dataset-ids`})],$.prototype,`datasetIds`,void 0),e([k({type:String,attribute:`selected-dataset-id`,reflect:!0})],$.prototype,`selectedDatasetId`,void 0),e([k({type:Boolean,attribute:`dataset-picker`,reflect:!0})],$.prototype,`datasetPicker`,void 0),e([k({type:String,attribute:`dataset-picker-label`})],$.prototype,`datasetPickerLabel`,void 0),e([k({type:String,attribute:`api-url`})],$.prototype,`apiUrl`,void 0),e([k({type:String,attribute:`auth-key`})],$.prototype,`authKey`,void 0),e([k({type:String,attribute:`auth-token`})],$.prototype,`authToken`,void 0),e([k({type:String,reflect:!0})],$.prototype,`placement`,void 0),e([k({type:String,reflect:!0,attribute:`slot-menu-placement`})],$.prototype,`slotMenuPlacement`,void 0),e([k({type:String,reflect:!0,attribute:`slot-menu-mode`})],$.prototype,`slotMenuMode`,void 0),e([k({type:String,reflect:!0,attribute:`constraint-mode`})],$.prototype,`constraintMode`,void 0),e([k({type:Boolean,reflect:!0})],$.prototype,`grows`,void 0),e([A()],$.prototype,`_currentSlotsContents`,void 0),$=e([r()],$);var qo=/* @__PURE__ */ ae({LuzmoItemSlotPickerPanel:()=>$});customElements.get(`luzmo-item-slot-picker-panel`)||customElements.define(`luzmo-item-slot-picker-panel`,$);export{ae as C,$ as LuzmoItemSlotPickerPanel,ue as S,Bn as _,Ji as a,Fn as b,Ki as c,Ri as d,Ii as f,Vn as g,Gn as h,qi as i,Bi as l,Kn as m,Xi as n,H as o,qn as p,Zi as r,Gi as s,qo as t,zi as u,In as v,Pn as x,Ln as y};