@luzmo/analytics-components-kit 1.2.1 → 1.4.0

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 (159) hide show
  1. package/README.md +8 -3
  2. package/angular/components/add-to-dashboard.ts +20 -6
  3. package/angular/components/data-fields-select.ts +5 -0
  4. package/angular/components/interactive-viz-item.ts +89 -24
  5. package/angular/components/item-grid-item-actions-menu.ts +5 -0
  6. package/angular/components/item-grid.ts +7 -0
  7. package/angular/components/item-option-color-picker.ts +28 -28
  8. package/angular/components/item-option-guidelines.ts +22 -1
  9. package/angular/components/item-option-multi-language-field.ts +7 -7
  10. package/angular/components/item-option-number-field.ts +14 -14
  11. package/angular/components/item-option-positions-number-field.ts +14 -14
  12. package/angular/components/item-option-radio-button-group.ts +7 -7
  13. package/angular/components/item-option-text-field.ts +7 -7
  14. package/angular/components/item-slot-picker-panel.ts +1 -1
  15. package/angular/components/item-slot-picker.ts +7 -7
  16. package/angular/esm/components/add-to-dashboard.d.ts +8 -4
  17. package/angular/esm/components/add-to-dashboard.js +23 -7
  18. package/angular/esm/components/data-fields-select.d.ts +2 -0
  19. package/angular/esm/components/data-fields-select.js +4 -0
  20. package/angular/esm/components/interactive-viz-item.d.ts +32 -11
  21. package/angular/esm/components/interactive-viz-item.js +99 -28
  22. package/angular/esm/components/item-grid-item-actions-menu.d.ts +2 -0
  23. package/angular/esm/components/item-grid-item-actions-menu.js +4 -0
  24. package/angular/esm/components/item-grid.d.ts +3 -1
  25. package/angular/esm/components/item-grid.js +9 -1
  26. package/angular/esm/components/item-option-color-picker.d.ts +10 -10
  27. package/angular/esm/components/item-option-color-picker.js +34 -34
  28. package/angular/esm/components/item-option-guidelines.d.ts +8 -2
  29. package/angular/esm/components/item-option-guidelines.js +26 -2
  30. package/angular/esm/components/item-option-multi-language-field.d.ts +3 -3
  31. package/angular/esm/components/item-option-multi-language-field.js +10 -10
  32. package/angular/esm/components/item-option-number-field.d.ts +5 -5
  33. package/angular/esm/components/item-option-number-field.js +18 -18
  34. package/angular/esm/components/item-option-positions-number-field.d.ts +5 -5
  35. package/angular/esm/components/item-option-positions-number-field.js +18 -18
  36. package/angular/esm/components/item-option-radio-button-group.d.ts +3 -3
  37. package/angular/esm/components/item-option-radio-button-group.js +10 -10
  38. package/angular/esm/components/item-option-text-field.d.ts +3 -3
  39. package/angular/esm/components/item-option-text-field.js +10 -10
  40. package/angular/esm/components/item-slot-picker-panel.d.ts +1 -1
  41. package/angular/esm/components/item-slot-picker-panel.js +1 -1
  42. package/angular/esm/components/item-slot-picker.d.ts +3 -3
  43. package/angular/esm/components/item-slot-picker.js +9 -9
  44. package/angular/package.json +2 -2
  45. package/components/add-to-dashboard/dashboard-actions.d.ts +2 -1
  46. package/components/add-to-dashboard/index.cjs +1 -1
  47. package/components/add-to-dashboard/index.js +1 -1
  48. package/components/{add-to-dashboard-NwsCPIlg.cjs → add-to-dashboard-BtzTZdjN.cjs} +1 -1
  49. package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-Bu6S3qVz.js} +125 -120
  50. package/components/chart-helpers-BHxQbLBw.cjs +20 -0
  51. package/components/{chart-helpers-Dng_LGfq.js → chart-helpers-BKeMLhov.js} +53 -39
  52. package/components/filters/index.cjs +1 -1
  53. package/components/filters/index.js +1 -1
  54. package/components/{filters-CxIzuI5q.js → filters-DEpmh9Nj.js} +113 -102
  55. package/components/filters-LDXhe1Bp.cjs +187 -0
  56. package/components/index.cjs +1 -1
  57. package/components/index.js +6 -6
  58. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +2 -1
  59. package/components/interactive-viz-item/index.cjs +1 -1
  60. package/components/interactive-viz-item/index.d.ts +1 -1
  61. package/components/interactive-viz-item/index.js +3 -3
  62. package/components/interactive-viz-item/interactive-viz-item.d.ts +47 -1
  63. package/components/interactive-viz-item/types.d.ts +4 -0
  64. package/components/interactive-viz-item-Cc3Ix95e.js +630 -0
  65. package/components/interactive-viz-item-SF12d97t.cjs +269 -0
  66. package/components/item-grid/item-grid.d.ts +1 -0
  67. package/components/item-slot-picker-panel/index.cjs +1 -1
  68. package/components/item-slot-picker-panel/index.js +1 -1
  69. package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +19 -1
  70. package/components/item-slot-picker-panel-Cw3UCK03.cjs +84 -0
  71. package/components/{item-slot-picker-panel-fJqEmxeD.js → item-slot-picker-panel-DprM9Rli.js} +64 -33
  72. package/custom-elements.json +3051 -2531
  73. package/grid-core/item-grid-base.d.ts +5 -4
  74. package/package.json +2 -2
  75. package/react/package.json +2 -2
  76. package/standalone/add-to-dashboard.js +40 -40
  77. package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-DZsidiCl.js} +2 -2
  78. package/standalone/chunks/{choropleth-map-options.config-rUJsEJcm.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
  79. package/standalone/chunks/{color-range-utils-DxOtqAKB.js → color-range-utils-BVyHBRiq.js} +1 -1
  80. package/standalone/chunks/data-broker-DpSrH3IP.js +2 -0
  81. package/standalone/chunks/de-BkB0q1Eg.js +2 -0
  82. package/standalone/chunks/display-settings-binning-DhHlclWH.js +38 -0
  83. package/standalone/chunks/display-settings-datetime-C8xvOvi4.js +199 -0
  84. package/standalone/chunks/display-settings-grand-totals-CUpigDcs.js +26 -0
  85. package/standalone/chunks/display-settings-numeric-BLWF54Jx.js +172 -0
  86. package/standalone/chunks/display-settings-period-over-period-COd4tvUw.js +209 -0
  87. package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
  88. package/standalone/chunks/en-DNsyAwgq.js +2 -0
  89. package/standalone/chunks/en-GB-Di3OzVdL.js +2 -0
  90. package/standalone/chunks/en-US-DNsyAwgq.js +2 -0
  91. package/standalone/chunks/es-Bo0jStZn.js +2 -0
  92. package/standalone/chunks/{filters-DKgJcQGP.js → filters-lhg_WVDK.js} +108 -108
  93. package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-DZMzLE2I.js} +17 -17
  94. package/standalone/chunks/fr-Co_qVhhV.js +2 -0
  95. package/standalone/chunks/{heat-map-options.config-D93AeYFi.js → heat-map-options.config-DDQMD38W.js} +1 -1
  96. package/standalone/chunks/{heat-table-options.config-ZVML76FK.js → heat-table-options.config-B4K0Ygug.js} +1 -1
  97. package/standalone/chunks/{is-same-option-value-Di-A7Wmg.js → is-same-option-value-7kXNF4st.js} +1 -1
  98. package/standalone/chunks/item-option-action-button-group-Bl1HR1JK.js +35 -0
  99. package/standalone/chunks/item-option-base-DF24wTyv.js +38 -0
  100. package/standalone/chunks/item-option-color-palette-picker-MkIIn56p.js +22 -0
  101. package/standalone/chunks/item-option-color-picker-CxosMo_p.js +19 -0
  102. package/standalone/chunks/item-option-color-range-C7C70r4J.js +83 -0
  103. package/standalone/chunks/item-option-guidelines-iu8yWRzr.js +120 -0
  104. package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-foanqCdr.js} +1 -1
  105. package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-ByVD4oq0.js} +1 -1
  106. package/standalone/chunks/item-option-panel-Bya-K7HH.js +316 -0
  107. package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-CqNNVIML.js} +1 -1
  108. package/standalone/chunks/item-option-position-picker-BjCFVtDH.js +14 -0
  109. package/standalone/chunks/item-option-positions-number-field-BJJtXZL-.js +31 -0
  110. package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-C5bxsD85.js} +1 -1
  111. package/standalone/chunks/item-option-slider-DUXWz70B.js +18 -0
  112. package/standalone/chunks/item-option-switch-BHyJuOkP.js +12 -0
  113. package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-rBZY9OX4.js} +1 -1
  114. package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BM82vSXi.js} +101 -99
  115. package/standalone/chunks/load-data-fields-for-datasets-DS9O1oyy.js +25 -0
  116. package/standalone/chunks/localize-DLl7tgQp.js +2 -0
  117. package/standalone/chunks/localized-decorator-DosMCCQo.js +2 -0
  118. package/standalone/chunks/{version-BW4Ixl63.js → localized-mixin-BWJj88bd.js} +1 -1
  119. package/standalone/chunks/nl-CQz2jrVx.js +2 -0
  120. package/standalone/chunks/{option-interaction-controller-BslAXAHF.js → option-interaction-controller-BuwRr21c.js} +1 -1
  121. package/standalone/chunks/{route-map-options.config-Dwy0JSVq.js → route-map-options.config-CGBkHnhM.js} +1 -1
  122. package/standalone/chunks/{spike-map-options.config-DFmuNxym.js → spike-map-options.config-CSenlJ_F.js} +1 -1
  123. package/standalone/interactive-viz-item.js +88 -84
  124. package/standalone/item-grid.js +10 -10
  125. package/standalone/manifest.json +46 -46
  126. package/types.d.ts +1 -1
  127. package/components/chart-helpers-ufZ6VbXs.cjs +0 -20
  128. package/components/filters-BPbPFOu5.cjs +0 -187
  129. package/components/interactive-viz-item-CwRRaCZB.js +0 -583
  130. package/components/interactive-viz-item-CxdrGRKc.cjs +0 -265
  131. package/components/item-slot-picker-panel-BhhN54IM.cjs +0 -82
  132. package/standalone/chunks/data-broker-DXDyIrj_.js +0 -2
  133. package/standalone/chunks/de-mdZT2W1G.js +0 -2
  134. package/standalone/chunks/display-settings-binning-Byffw2Kl.js +0 -38
  135. package/standalone/chunks/display-settings-datetime-CD52d6Sv.js +0 -199
  136. package/standalone/chunks/display-settings-grand-totals-Cky99LX9.js +0 -26
  137. package/standalone/chunks/display-settings-numeric-C9ea7Tgc.js +0 -172
  138. package/standalone/chunks/display-settings-period-over-period-BLSGumkD.js +0 -209
  139. package/standalone/chunks/embed-CBu7iQRx.js +0 -231
  140. package/standalone/chunks/en-CSboh17P.js +0 -2
  141. package/standalone/chunks/en-GB-HoXKQBOY.js +0 -2
  142. package/standalone/chunks/en-US-CSboh17P.js +0 -2
  143. package/standalone/chunks/es-Di5D8JFd.js +0 -2
  144. package/standalone/chunks/fr-DZku7iB9.js +0 -2
  145. package/standalone/chunks/item-option-action-button-group-BEAwPHVw.js +0 -35
  146. package/standalone/chunks/item-option-base-CRUxNhJQ.js +0 -38
  147. package/standalone/chunks/item-option-color-palette-picker-CBz61iZb.js +0 -22
  148. package/standalone/chunks/item-option-color-picker-lLvBPnKA.js +0 -19
  149. package/standalone/chunks/item-option-color-range-BqeatOei.js +0 -83
  150. package/standalone/chunks/item-option-guidelines-Cop8rM8y.js +0 -120
  151. package/standalone/chunks/item-option-panel-CzSKFCVl.js +0 -316
  152. package/standalone/chunks/item-option-position-picker-Bkc4JvJX.js +0 -14
  153. package/standalone/chunks/item-option-positions-number-field-Dr_315TE.js +0 -31
  154. package/standalone/chunks/item-option-slider-K_bsNci8.js +0 -18
  155. package/standalone/chunks/item-option-switch-DeihDHhM.js +0 -12
  156. package/standalone/chunks/load-data-fields-for-datasets-ClctSj6y.js +0 -25
  157. package/standalone/chunks/localize-DXRmGRe-.js +0 -2
  158. package/standalone/chunks/localized-decorator-DJVBmJVH.js +0 -2
  159. package/standalone/chunks/nl-CViTevL3.js +0 -2
@@ -1,265 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- require("./tokens-BWMfo_w4.cjs");const e=require("./base-CGDNY_7v.cjs"),t=require("./decorate-DCJt-2rt.cjs"),n=require("./localized-mixin-EoNvtTBG.cjs"),r=require("./is-same-option-value-Cf6BQcs7.cjs"),i=require("./chart-helpers-ufZ6VbXs.cjs"),a=require("./create-lazy-loader-DYPgQh0L.cjs");let o=require("@luzmo/icons");require("@luzmo/lucero/action-button"),require("@luzmo/lucero/icon"),require("@luzmo/lucero/overlay"),require("@luzmo/lucero/popover");let s=require("lit"),c=require("lit/decorators.js"),l=require("@lit/localize");require("@luzmo/embed"),require("@luzmo/lucero/action-group"),require("@luzmo/lucero/field-label"),require("@luzmo/lucero/number-field"),require("@luzmo/lucero/picker"),require("@luzmo/lucero/progress-circle"),require("@luzmo/lucero/tabs");var u=`:host{box-sizing:border-box;display:block;container-type:inline-size}.answer{width:100%;display:block}.chart-actions-bar{justify-content:space-between;align-items:flex-start;gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));padding-block:var(--luzmo-interactive-viz-item-actions-padding-block,var(--interactive-viz-item-actions-padding-block));flex-wrap:nowrap;margin-block-start:var(--luzmo-interactive-viz-item-actions-margin-block-start,var(--interactive-viz-item-actions-margin-block-start));display:flex}.chart-actions-primary{gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));flex-wrap:wrap;flex:1;align-items:center;min-width:0;display:flex}.ranking-content{gap:var(--luzmo-spacing-3);padding:var(--luzmo-spacing-3);flex-direction:column;display:flex}.ranking-row{gap:var(--luzmo-spacing-3);align-items:center;display:flex}.ranking-number{width:4rem}.icon-flipped{transform:scaleY(-1)}.chart-container{border-radius:var(--luzmo-interactive-viz-item-chart-border-radius,var(--interactive-viz-item-chart-border-radius));height:var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height));overflow:hidden}.chart-container luzmo-embed-viz-item{width:100%;height:100%;display:block}.feedback-row{padding-block:var(--luzmo-interactive-viz-item-feedback-padding-block,var(--interactive-viz-item-feedback-padding-block));justify-content:space-between;align-items:center;display:flex}.rating-btn-positive{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.rating-btn-negative{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.config-toggle{--luzmo-action-button-border-radius:32px;margin-inline-start:auto}.sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.config-panel{border:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));border-radius:var(--luzmo-interactive-viz-item-config-panel-border-radius,var(--interactive-viz-item-config-panel-border-radius));padding:var(--luzmo-interactive-viz-item-config-panel-padding,var(--interactive-viz-item-config-panel-padding));background:var(--luzmo-interactive-viz-item-config-panel-background,var(--interactive-viz-item-config-panel-background));margin-block-start:var(--luzmo-spacing-2)}.config-panel luzmo-tab-panel[selected]{padding-block-start:var(--luzmo-spacing-4);display:block}.config-panel luzmo-item-option-panel,.config-panel luzmo-item-slot-picker-panel,.config-panel luzmo-filters{width:100%;max-height:15rem;scrollbar-width:thin;scrollbar-color:var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color)) transparent;padding-inline-end:var(--luzmo-spacing-3);overflow-y:auto}.edit-grid{min-height:12.5rem;display:flex}.edit-column{gap:var(--luzmo-spacing-3);flex-direction:column;display:flex}.edit-column:first-child{flex-shrink:0;max-width:15rem}.edit-column-filters{border-inline-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));flex:1;min-width:18.75rem;padding-inline-start:var(--luzmo-spacing-5)}@container (width<=520px){.edit-grid{flex-direction:column}.edit-column,.edit-column:first-child{width:100%;min-width:0;max-width:100%}.edit-column-filters{border-inline-start:none;border-block-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));min-width:0;margin-block-start:var(--luzmo-spacing-3);padding-block-start:var(--luzmo-spacing-4);padding-inline-start:0}}@container (width<=768px){.chart-container{height:calc(var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height)) - var(--luzmo-interactive-viz-item-chart-narrow-offset,var(--interactive-viz-item-chart-narrow-offset)))}}:host{--interactive-viz-item-actions-gap:var(--luzmo-spacing-3);--interactive-viz-item-actions-padding-block:var(--luzmo-spacing-3);--interactive-viz-item-actions-margin-block-start:var(--luzmo-spacing-5);--interactive-viz-item-chart-height:20rem;--interactive-viz-item-chart-narrow-offset:2.5rem;--interactive-viz-item-chart-border-radius:var(--luzmo-border-radius);--interactive-viz-item-feedback-padding-block:var(--luzmo-spacing-4);--interactive-viz-item-config-panel-padding:var(--luzmo-spacing-5);--interactive-viz-item-config-panel-border-color:var(--luzmo-border-color);--interactive-viz-item-config-panel-border-radius:var(--luzmo-border-radius);--interactive-viz-item-config-panel-background:var(--luzmo-background-color);--interactive-viz-item-rating-positive-color:var(--luzmo-positive-color,#12855a);--interactive-viz-item-rating-negative-color:var(--luzmo-negative-color,#ca221c);--interactive-viz-item-rating-selected-background:var(--luzmo-background-color-focus,#0000000f)}:host([size=s]){--interactive-viz-item-chart-height:17.5rem}:host([size=l]){--interactive-viz-item-chart-height:22rem}:host([size=xl]){--interactive-viz-item-chart-height:24rem}`,d=a.t(()=>Promise.resolve().then(()=>require("./add-to-dashboard/index.cjs"))).load,f=[`luzmo-filters`,`luzmo-item-option-panel`,`luzmo-item-slot-picker-panel`],p=a.t(()=>Promise.all([Promise.resolve().then(()=>require("./filters/index.cjs")),Promise.resolve().then(()=>require("./item-option-panel/index.cjs")),Promise.resolve().then(()=>require("./item-slot-picker-panel/index.cjs"))])),m=p.load,h=()=>p.isLoaded()||f.every(e=>customElements.get(e)!==void 0),g=0,_={},v=(e,t)=>t!==null&&r.n(JSON.parse(JSON.stringify(e)),JSON.parse(JSON.stringify(t))),y=class extends n.t(e.n(e.i,{validSizes:Object.values(e.t)})){constructor(...e){super(...e),this.chart=null,this.feedback=null,this.messageId=``,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.contentLanguage=``,this.hideActions=!1,this.hideFeedback=!1,this.hideConfigPanel=!1,this.addToDashboard=!1,this.dashboardActions=null,this.controlled=!1,this.liveInteractions=!1,this._configPanelOpen=!1,this._configPanelPending=!1,this._configPanelLoadFailed=!1,this._rankingTriggerId=`interactive-viz-item-ranking-${++g}`,this._interactionGeneration=0,this._openInteractions=new Map,this._ownCharts=[],this._handleSlotsChanged=e=>{this.chart&&this._emitChart({...this.chart,slots:e.detail.slotsContents})},this._handleFiltersChanged=e=>{this.chart&&this._emitChart({...this.chart,filters:e.detail.filters})},this._handleOptionsChanged=e=>{if(!this.chart)return;let{options:t,interaction:n}=e.detail;if(!t)return;if(n){let e=this._openInteractions.get(n.id);if(!e||!this._isCurrentContext(e)){e?.generation===this._interactionGeneration&&this._invalidateInteractions();return}}let r=this.chart.options.theme??{};this._emitChart({...this.chart,options:{...t,theme:r}},n)},this._handleInteractionStart=e=>{if(!this.chart)return;let t={chart:this.chart,generation:this._interactionGeneration,auth:this._auth};this._openInteractions.set(e.detail.id,t),this._dispatchInteraction(e,t)},this._handleInteractionClosed=e=>{let t=this._openInteractions.get(e.detail.id);this._openInteractions.delete(e.detail.id),this._openInteractions.size===0&&(this._ownCharts=this._ownCharts.slice(-1)),t&&this._dispatchInteraction(e,t)}}static get styles(){return[(0,s.unsafeCSS)(u)]}get _effectiveContentLanguage(){return this.contentLanguage||this.language}_dispatch(e,t){let n=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(n)}get _chartActions(){return this.chart?i.n(i.o(this.chart)):[]}get _rating(){return this.feedback?.rating??0}get _canShowConfigPanel(){return!!this.chart&&!this.hideConfigPanel}async _toggleConfigPanel(){if(this._configPanelLoadFailed=!1,this._configPanelOpen)this.endInteraction(),this._configPanelOpen=!1;else if(!this._configPanelPending){if(!h()){this._configPanelPending=!0;try{await m()}catch(e){console.warn(`Failed to load the chart configuration panel:`,e),this._configPanelLoadFailed=!0;return}finally{this._configPanelPending=!1}}this.isConnected&&this._canShowConfigPanel&&(this._configPanelOpen=!0)}}endInteraction(){this.renderRoot?.querySelector(`luzmo-item-option-panel`)?.endInteraction?.()}willUpdate(e){super.willUpdate(e),this._openInteractions.size>0&&this._invalidatesInteractions(e)&&this._invalidateInteractions(),e.has(`addToDashboard`)&&this.addToDashboard&&d().catch(e=>console.warn(`Failed to load add to dashboard:`,e))}_emitOptions(e){!this.controlled&&this.chart&&(this.chart={...this.chart,options:e}),this._dispatch(`luzmo-chart-options-changed`,{options:e})}_invalidatesInteractions(e){return e.has(`authKey`)||e.has(`authToken`)||e.has(`apiUrl`)||e.has(`hideConfigPanel`)?!0:e.has(`chart`)&&[...this._openInteractions.values()].some(e=>!this._isCurrentChart(e))}_invalidateInteractions(){this._interactionGeneration++,this.endInteraction()}get _auth(){return[this.authKey,this.authToken,this.apiUrl]}_isCurrentChart(e){let t=this.chart;return t===e.chart||this._ownCharts.some(e=>e===t)||[...this._ownCharts].reverse().some(e=>v(e,t))||v(e.chart,t)}_isCurrentContext(e){return e.generation===this._interactionGeneration&&e.auth.every((e,t)=>e===this._auth[t])&&this._isCurrentChart(e)}_emitChart(e,t){this._ownCharts=this._openInteractions.size>0?[...this._ownCharts,e]:[e],this.controlled||(this.chart=e),this._dispatch(`luzmo-chart-changed`,t?{chart:e,interaction:t}:{chart:e})}_handleDropdownChange(e,t){if(!this.chart)return;t.stopPropagation();let n=t.detail,r=typeof n==`string`?n:n?.value??t.target?.value;if(!r)return;let a=i.t({...i.o(this.chart),options:this.chart.options},{type:`chartAction`,actionType:e.mutationType,key:r});this._emitOptions(a.options)}_currentRanking(e){return e.ranking??{active:!1,number:5,direction:i.c.Top}}_currentSort(e){return e.sort??{direction:i.u.Desc,by:i.l.Measure}}_emitRankAndSort(e,t){this.chart&&this._emitOptions({...this.chart.options,ranking:e,sort:t})}_renderOptionDropdown(e){let t=e.values??[],n=e.currentValue||t[0]?.key||``;return s.html`
21
- <luzmo-picker
22
- size=${this.size}
23
- variant="highlight"
24
- value=${n}
25
- @change=${t=>this._handleDropdownChange(e,t)}
26
- >
27
- ${t.map(e=>s.html`<luzmo-menu-item value=${e.key}>${e.label}</luzmo-menu-item>`)}
28
- </luzmo-picker>
29
- `}_renderRankingPicker(e){let t=this._currentRanking(e),n=this._currentSort(e);if(!t.active)return s.html`
30
- <luzmo-action-button
31
- size=${this.size}
32
- @click=${()=>this._emitRankAndSort({active:!0,number:5,direction:i.c.Top},n)}
33
- >
34
- <luzmo-icon slot="icon" size="xs" .icon=${o.luzmoAlignLeft}></luzmo-icon>
35
- ${(0,l.msg)(`Show top 5`,{desc:`Label to activate top-N ranking on a chart`})}
36
- </luzmo-action-button>
37
- `;let r=t.direction===i.c.Bottom?(0,l.msg)(`Bottom`,{desc:`Ranking direction: keep the lowest values`}):(0,l.msg)(`Top`,{desc:`Ranking direction: keep the highest values`});return s.html`
38
- <luzmo-action-button size=${this.size} id=${this._rankingTriggerId}>
39
- <luzmo-icon slot="icon" size="xs" .icon=${o.luzmoAlignLeft}></luzmo-icon>
40
- ${r} ${t.number||5}
41
- </luzmo-action-button>
42
-
43
- <luzmo-overlay type="auto" placement="bottom-start" trigger=${`${this._rankingTriggerId}@click`}>
44
- <luzmo-popover>
45
- <div class="ranking-content">
46
- <div class="ranking-row">
47
- <luzmo-action-group
48
- size=${this.size}
49
- compact
50
- selects="single"
51
- .selected=${[t.direction]}
52
- @change=${t=>this._handleDirectionChange(e,t)}
53
- >
54
- <luzmo-action-button value="top" emphasized
55
- >${(0,l.msg)(`Top`,{desc:`Ranking direction: keep the highest values`})}</luzmo-action-button
56
- >
57
- <luzmo-action-button value="bottom" emphasized
58
- >${(0,l.msg)(`Bottom`,{desc:`Ranking direction: keep the lowest values`})}</luzmo-action-button
59
- >
60
- </luzmo-action-group>
61
-
62
- <luzmo-number-field
63
- class="ranking-number"
64
- size=${this.size}
65
- hide-stepper
66
- min="1"
67
- max="100"
68
- step="1"
69
- .value=${t.number}
70
- @change=${t=>this._handleNumberChange(e,t)}
71
- @input=${t=>this._handleNumberChange(e,t)}
72
- ></luzmo-number-field>
73
- </div>
74
-
75
- <div class="ranking-row">
76
- <luzmo-action-group
77
- size=${this.size}
78
- compact
79
- selects="single"
80
- .selected=${[n.by]}
81
- @change=${t=>this._handleSortByChange(e,t)}
82
- >
83
- <luzmo-action-button value="measure" emphasized>123</luzmo-action-button>
84
- <luzmo-action-button value="category" emphasized>ABC</luzmo-action-button>
85
- </luzmo-action-group>
86
-
87
- <luzmo-action-group
88
- size=${this.size}
89
- compact
90
- selects="single"
91
- .selected=${[n.direction]}
92
- @change=${t=>this._handleSortDirectionChange(e,t)}
93
- >
94
- <luzmo-action-button
95
- value="desc"
96
- emphasized
97
- label=${(0,l.msg)(`Sort descending`,{desc:`Sort chart values in descending order`})}
98
- >
99
- <luzmo-icon slot="icon" size="xs" .icon=${o.luzmoAlignLeft}></luzmo-icon>
100
- </luzmo-action-button>
101
- <luzmo-action-button
102
- value="asc"
103
- emphasized
104
- label=${(0,l.msg)(`Sort ascending`,{desc:`Sort chart values in ascending order`})}
105
- >
106
- <luzmo-icon slot="icon" size="xs" class="icon-flipped" .icon=${o.luzmoAlignLeft}></luzmo-icon>
107
- </luzmo-action-button>
108
- </luzmo-action-group>
109
- </div>
110
- </div>
111
- </luzmo-popover>
112
- </luzmo-overlay>
113
- `}_handleDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort({...this._currentRanking(e),direction:n[0]},this._currentSort(e))}_handleNumberChange(e,t){t.stopPropagation();let n=t.target?.value,r=typeof n==`number`?n:Number.parseInt(String(n),10);!Number.isNaN(r)&&r>=1&&this._emitRankAndSort({...this._currentRanking(e),number:r},this._currentSort(e))}_handleSortByChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),by:n[0]})}_handleSortDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),direction:n[0]})}_renderAddToDashboard(){return this.addToDashboard?s.html`
114
- <luzmo-add-to-dashboard
115
- size=${this.size}
116
- language=${this.language}
117
- .chart=${this.chart}
118
- .dashboardActions=${this.dashboardActions}
119
- .authKey=${this.authKey}
120
- .authToken=${this.authToken}
121
- .apiUrl=${this.apiUrl}
122
- ></luzmo-add-to-dashboard>
123
- `:s.nothing}_renderActions(){return this.hideActions?s.html`
124
- <div class="chart-actions-bar">
125
- <div class="chart-actions-primary"></div>
126
- <slot name="chart-actions-extra"></slot>
127
- ${this._renderAddToDashboard()}
128
- </div>
129
- `:s.html`
130
- <div class="chart-actions-bar">
131
- <div class="chart-actions-primary">
132
- ${this._chartActions.map(e=>e.type===`optionDropdown`?this._renderOptionDropdown(e):this._renderRankingPicker(e))}
133
- </div>
134
- <slot name="chart-actions-extra"></slot>
135
- ${this._renderAddToDashboard()}
136
- </div>
137
- `}_renderChart(){if(!this.chart)return s.nothing;let e=i.o(this.chart);return s.html`
138
- <div class="chart-container" part="chart-container">
139
- <luzmo-embed-viz-item
140
- .type=${e.type}
141
- .options=${e.options}
142
- .slots=${e.slots}
143
- .filters=${e.filters??[]}
144
- .authKey=${this.authKey}
145
- .authToken=${this.authToken}
146
- .apiHost=${this.apiUrl}
147
- .appServer=${this.appServer}
148
- .language=${this._effectiveContentLanguage}
149
- .canFilter=${this.canFilter??!1}
150
- ></luzmo-embed-viz-item>
151
- </div>
152
- `}_renderFeedback(){let e=!this.hideFeedback&&!!this.messageId,t=this._canShowConfigPanel,n=(0,l.msg)(`Loading`,{desc:`Loading spinner label`});return!e&&!t?s.nothing:s.html`
153
- <div class="feedback-row">
154
- ${e?s.html`
155
- <luzmo-action-group quiet size=${this.size}>
156
- <luzmo-action-button
157
- class="rating-btn-positive"
158
- value="positive"
159
- quiet
160
- label=${(0,l.msg)(`Good response`,{desc:`Accessible label for the positive feedback button`})}
161
- ?selected=${this._rating===1}
162
- @click=${()=>this._toggleRating(!0)}
163
- >
164
- <luzmo-icon slot="icon" size="s" .icon=${o.luzmoThumbsUp}></luzmo-icon>
165
- </luzmo-action-button>
166
- <luzmo-action-button
167
- class="rating-btn-negative"
168
- value="negative"
169
- quiet
170
- label=${(0,l.msg)(`Bad response`,{desc:`Accessible label for the negative feedback button`})}
171
- ?selected=${this._rating===-1}
172
- @click=${()=>this._toggleRating(!1)}
173
- >
174
- <luzmo-icon slot="icon" size="s" .icon=${o.luzmoThumbsDown}></luzmo-icon>
175
- </luzmo-action-button>
176
- </luzmo-action-group>
177
- `:s.nothing}
178
- ${t?s.html`
179
- <luzmo-action-button
180
- class="config-toggle"
181
- size=${this.size}
182
- quiet
183
- ?selected=${this._configPanelOpen}
184
- aria-expanded=${this._configPanelOpen}
185
- aria-label=${this._configPanelPending?n:(0,l.msg)(`Configure chart`,{desc:`Accessible label for the chart config toggle`})}
186
- @click=${()=>this._toggleConfigPanel()}
187
- >
188
- ${this._configPanelPending?s.html`<luzmo-progress-circle slot="icon" size="s" indeterminate .label=${n}></luzmo-progress-circle>`:s.html`<luzmo-icon slot="icon" size="s" .icon=${o.luzmoInfoCircle}></luzmo-icon>`}
189
- </luzmo-action-button>
190
- <span class="sr-only" role="status" aria-live="polite">${this._configPanelPending?n:``}</span>
191
- <span class="sr-only" role="alert">${this._configPanelLoadFailed?(0,l.msg)(`Failed to load the chart configuration. Please try again.`,{desc:`Error message when the chart config panel fails to load`}):``}</span>
192
- `:s.nothing}
193
- </div>
194
- `}_toggleRating(e){let t=e?1:-1,n=this._rating===t?0:t;this._dispatch(`luzmo-feedback-changed`,{rating:n,comment:this.feedback?.comment})}_renderConfigPanel(){if(!this.chart||this.hideConfigPanel||!this._configPanelOpen)return s.nothing;let e=this.chart,t=i.r(e.slots??[]),n=i.i(t),r=e.options.theme??_;return s.html`
195
- <div class="config-panel" part="config-panel">
196
- <luzmo-tabs selected="data" size=${this.size}>
197
- <luzmo-tab value="data">${(0,l.msg)(`Data`,{desc:`Label for the data section`})}</luzmo-tab>
198
- <luzmo-tab value="options">${(0,l.msg)(`Options`,{desc:`Label for the options section`})}</luzmo-tab>
199
-
200
- <luzmo-tab-panel value="data">
201
- <div class="edit-grid">
202
- <div class="edit-column">
203
- <luzmo-item-slot-picker-panel
204
- size=${this.size}
205
- slot-menu-placement="bottom-end"
206
- .itemType=${e.type}
207
- .slotsContents=${t}
208
- .datasetIds=${n}
209
- .authKey=${this.authKey}
210
- .authToken=${this.authToken}
211
- .apiUrl=${this.apiUrl}
212
- .language=${this.language}
213
- .contentLanguage=${this._effectiveContentLanguage}
214
- @luzmo-slots-contents-changed=${this._handleSlotsChanged}
215
- ></luzmo-item-slot-picker-panel>
216
- </div>
217
- <div class="edit-column edit-column-filters">
218
- <luzmo-field-label size=${this.size}
219
- >${(0,l.msg)(`Filters`,{desc:`Label for the filters section`})}</luzmo-field-label
220
- >
221
- <luzmo-filters
222
- size=${this.size}
223
- .datasetIds=${n}
224
- .filters=${e.filters??[]}
225
- .authKey=${this.authKey}
226
- .authToken=${this.authToken}
227
- .apiUrl=${this.apiUrl}
228
- .language=${this.language}
229
- .contentLanguage=${this._effectiveContentLanguage}
230
- @luzmo-filters-changed=${this._handleFiltersChanged}
231
- ></luzmo-filters>
232
- </div>
233
- </div>
234
- </luzmo-tab-panel>
235
-
236
- <luzmo-tab-panel value="options">
237
- <luzmo-item-option-panel
238
- size=${this.size}
239
- .itemType=${e.type}
240
- .options=${e.options||{}}
241
- .slots=${t}
242
- .theme=${r}
243
- .authKey=${this.authKey}
244
- .authToken=${this.authToken}
245
- .apiUrl=${this.apiUrl}
246
- .language=${this.language}
247
- ?live-interactions=${this.liveInteractions}
248
- @luzmo-options-changed=${this._handleOptionsChanged}
249
- @luzmo-option-interaction-start=${this._handleInteractionStart}
250
- @luzmo-option-interaction-end=${this._handleInteractionClosed}
251
- @luzmo-option-interaction-cancel=${this._handleInteractionClosed}
252
- ></luzmo-item-option-panel>
253
- </luzmo-tab-panel>
254
- </luzmo-tabs>
255
- </div>
256
- `}_dispatchInteraction(e,{chart:t,generation:n}){e.stopPropagation(),this._dispatch(e.type,{...e.detail,chart:t,generation:n})}render(){return this.chart?s.html`
257
- <div class="answer" part="container">
258
- ${this._renderActions()} ${this._renderChart()} ${this._renderFeedback()} ${this._renderConfigPanel()}
259
- </div>
260
- `:s.html`
261
- <div
262
- class="answer"
263
- part="container"
264
- ></div>
265
- `}};t.t([(0,c.property)({type:Object})],y.prototype,`chart`,void 0),t.t([(0,c.property)({type:Object})],y.prototype,`feedback`,void 0),t.t([(0,c.property)({type:String,attribute:`message-id`})],y.prototype,`messageId`,void 0),t.t([(0,c.property)({type:String,attribute:`auth-key`})],y.prototype,`authKey`,void 0),t.t([(0,c.property)({type:String,attribute:`auth-token`})],y.prototype,`authToken`,void 0),t.t([(0,c.property)({type:String,attribute:`api-url`})],y.prototype,`apiUrl`,void 0),t.t([(0,c.property)({type:String,attribute:`app-server`})],y.prototype,`appServer`,void 0),t.t([(0,c.property)({type:String,attribute:`content-language`})],y.prototype,`contentLanguage`,void 0),t.t([(0,c.property)({type:Boolean,attribute:`hide-actions`,reflect:!0})],y.prototype,`hideActions`,void 0),t.t([(0,c.property)({type:Boolean,attribute:`hide-feedback`,reflect:!0})],y.prototype,`hideFeedback`,void 0),t.t([(0,c.property)({type:Boolean,attribute:`hide-config-panel`,reflect:!0})],y.prototype,`hideConfigPanel`,void 0),t.t([(0,c.property)({type:Boolean,attribute:`add-to-dashboard`,reflect:!0})],y.prototype,`addToDashboard`,void 0),t.t([(0,c.property)({attribute:!1})],y.prototype,`dashboardActions`,void 0),t.t([(0,c.property)({type:Boolean,reflect:!0})],y.prototype,`controlled`,void 0),t.t([(0,c.property)({attribute:`can-filter`,converter:{fromAttribute:e=>e===null?void 0:`all`}})],y.prototype,`canFilter`,void 0),t.t([(0,c.property)({type:Boolean,reflect:!0,attribute:`live-interactions`})],y.prototype,`liveInteractions`,void 0),t.t([(0,c.state)()],y.prototype,`_configPanelOpen`,void 0),t.t([(0,c.state)()],y.prototype,`_configPanelPending`,void 0),t.t([(0,c.state)()],y.prototype,`_configPanelLoadFailed`,void 0),customElements.get(`luzmo-interactive-viz-item`)||customElements.define(`luzmo-interactive-viz-item`,y),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return y}});
@@ -1,82 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- require("./tokens-BWMfo_w4.cjs");const e=require("./base-CGDNY_7v.cjs"),t=require("./decorate-DCJt-2rt.cjs"),n=require("./localized-mixin-EoNvtTBG.cjs"),r=require("./data-broker-DCghLjhq.cjs"),i=require("./type-check-BehV9ZL1.cjs"),a=require("./localize-D3i4Epy_.cjs"),o=require("./slots-config-B6AOo19R.cjs"),s=require("./slot-labels.config-DKnxOncr.cjs");require("./item-slot-picker-O9HKr3mv.cjs");let c=require("lit"),l=require("lit/decorators.js"),u=require("@lit/localize");require("@luzmo/lucero/select"),require("@luzmo/lucero/field-label");let d=require("lit/directives/if-defined.js"),f=require("@lit/task");var p=`: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%}`,m,h=50,g=(m=class extends n.t(e.n(e.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){constructor(...e){super(...e),this._loadSlotsConfig=new f.Task(this,{task:async([e])=>{if(e&&e!==this._itemTypeLoaded){this._itemTypeLoaded=e;let t=await o.t(e);return this._slotsConfig=t??[],this._slotsConfig}return this._slotsConfig},args:()=>[this.itemType,this.language]}),this._slotsConfig=[],this._datasetListItems=[],this._datasetListRetrieving=!1,this._datasetListPending=!1,this._datasetNamesFetchAttempted=!1,this._hasMoreDatasets=!0,this._fetchedDatasetsDataFields=[],this._failedDatasetIds=new Set,this._loadDataFieldsTask=new f.Task(this,{args:()=>[this._currentDatasetId,this.apiUrl,this.authKey,this.authToken,this.datasetsDataFields.length],task:async([e,t,n,a,o])=>{if(o>0||!e)return null;if(!i.s(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 s=this._fetchedDatasetsDataFields.find(t=>t.id===e);if(s&&s.columns&&s.columns.length>0)return s;try{let t=await r.n.fetchDatasetsWithColumnsAndFormulas([e]);if(t.length===0)return this._failedDatasetIds.add(e),null;let n=t[0],i=this._fetchedDatasetsDataFields.findIndex(t=>t.id===e);return i===-1?this._fetchedDatasetsDataFields=[...this._fetchedDatasetsDataFields,n]:this._fetchedDatasetsDataFields[i]=n,n}catch(t){return console.warn(`Failed to fetch dataset data fields:`,t),this._failedDatasetIds.add(e),null}}}),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}})))}}get _availableDatasets(){return this.datasetsDataFields.length>0?this.datasetsDataFields:this.datasetIds.length>0?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}}}):this._datasetListItems.length>0?this._datasetListItems.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=new Set;for(let t of this._currentSlotsContents)for(let n of t.content)n.datasetId&&e.add(n.datasetId);return[...e]}willUpdate(e){super.willUpdate(e),e.has(`slotsContents`)&&(this._currentSlotsContents=structuredClone(this.slotsContents??[]));let t=e.has(`selectedDatasetId`),n=e.has(`datasetsDataFields`),i=e.has(`datasetIds`),a=e.has(`datasetPicker`),o=e.has(`authKey`),s=e.has(`authToken`),c=e.has(`apiUrl`);(i||o||s||c)&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._datasetNamesFetchAttempted=!1,this._fetchedDatasetsDataFields=[],this._failedDatasetIds.clear(),r.n.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||i)&&this._updateCurrentDatasetId(),(i||o||s||c||a)&&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 r.n.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 r.n.fetchAllDatasets({offset:e,limit:h});this._datasetListItems=[...this._datasetListItems,...t.data],this._hasMoreDatasets=e+h<(t.pagination?.total??0),!this._currentDatasetId&&this._datasetListItems.length>0&&this._updateCurrentDatasetId()}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)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;if(this._datasetListItems.length===0&&this._shouldFetchDatasetList&&this.datasetIds.length===0&&this._hasMoreDatasets){t.pending=!0;try{await this._loadMoreDatasets(t)}finally{t.pending=!1}}}_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=[])}}if(this.constraintMode===`event-only`&&o.length>0){let n={triggerSlotName:e,proposedTriggerContents:t,originalSlotsContents:r,proposedSlotsContents:i,constraints:o};return this.dispatchEvent(new CustomEvent(`luzmo-slot-constraint-triggered`,{detail:n,bubbles:!0,composed:!0})),null}return i}_getTranslatedLabel(e){let t=(typeof e.label==`string`?e.label:e.label?a.t(e.label,this.language):void 0)??e.name;return s.t[t]?s.t[t]():t}_renderDatasetPicker(){if(!this.datasetPicker)return c.nothing;let e=this._availableDatasets,t=e.length>1,n=this.datasetIds.length>0,r=this._shouldFetchDatasetList;if(!t&&!n&&!r)return c.nothing;let i=this._datasetListPending||this.datasetIds.length>0&&this._datasetListItems.length===0&&this.datasetsDataFields.length===0&&!this._datasetNamesFetchAttempted,o=i?[]:e.map(e=>({value:e.id,label:a.t(e.name,this.contentLanguage)||e.id})),s=i?[]:this._currentDatasetId?[this._currentDatasetId]:[],l=i?(0,u.msg)(`Loading datasets...`):(0,u.msg)(`Select dataset...`);return c.html`
21
- <div class="dataset-picker" part="dataset-picker">
22
- <luzmo-field-label part="dataset-field-label" size=${this.size}>
23
- ${this.datasetPickerLabel??(0,u.msg)(`Dataset`)}
24
- </luzmo-field-label>
25
- <luzmo-select
26
- selects="single"
27
- variant="highlight"
28
- search=${(0,d.ifDefined)(this.datasetSearch)}
29
- placement=${this.placement}
30
- .size=${this.size}
31
- .options=${o}
32
- .value=${s}
33
- .label=${l}
34
- ?pending=${i}
35
- @change=${this._handleDatasetChange}
36
- @luzmo-opened=${this._handlePickerOpened}
37
- @luzmo-scrolled=${this._handlePickerScrolled}
38
- ></luzmo-select>
39
- </div>
40
- `}_renderSlot(e){let t=this._getSlotContents(e.name),n=this._createSlotChangeHandler(e.name),r=this._getTranslatedLabel(e);return c.html`
41
- <div class="slot-container" part="slot-container">
42
- <luzmo-field-label part="field-label" size=${this.size}>
43
- ${r}
44
- </luzmo-field-label>
45
- <luzmo-item-slot-picker
46
- part="item-slot-picker"
47
- item-type=${(0,d.ifDefined)(this.itemType)}
48
- slot-name=${e.name}
49
- language=${this.language}
50
- content-language=${this.contentLanguage}
51
- api-url=${(0,d.ifDefined)(this.apiUrl)}
52
- auth-key=${(0,d.ifDefined)(this.authKey)}
53
- auth-token=${(0,d.ifDefined)(this.authToken)}
54
- size=${this.size}
55
- selects=${this.selects}
56
- search=${(0,d.ifDefined)(this.dataFieldsSearch)}
57
- icons=${(0,d.ifDefined)(this.icons)}
58
- placement=${this.placement}
59
- slot-menu-placement=${this.slotMenuPlacement}
60
- slot-menu-mode=${this.slotMenuMode}
61
- ?grows=${this.grows}
62
- aria-required=${e.isRequired?`true`:c.nothing}
63
- .slotConfiguration=${e}
64
- .slotContents=${t}
65
- .datasetsDataFields=${this._currentDatasetsDataFields}
66
- @luzmo-slot-contents-changed=${n}
67
- ></luzmo-item-slot-picker>
68
- </div>
69
- `}_renderSlots(e){let t=e.map(e=>this._renderSlot(e));return c.html`
70
- <div class="slots-panel" part="slots-panel">
71
- ${t}
72
- </div>
73
- `}_renderContent(e){return c.html`
74
- <div class="container" part="container">
75
- ${this._renderDatasetPicker()}
76
- ${this._renderSlots(e)}
77
- </div>
78
- `}render(){return this.slotsConfiguration&&this.slotsConfiguration.length>0?this._renderContent(this.slotsConfiguration):this._loadSlotsConfig.render({pending:()=>c.html`
79
- <p role="status">Loading...</p>
80
- `,complete:e=>!e||e.length===0?c.html`<p>No slots configuration found for ${this.itemType}</p>`:this._renderContent(e),error:e=>c.html`
81
- <div role="alert">Could not load slots configuration for '${this.itemType}': ${e}.</div>
82
- `})}},m.styles=(0,c.unsafeCSS)(p),m);t.t([(0,l.state)()],g.prototype,`_datasetListItems`,void 0),t.t([(0,l.state)()],g.prototype,`_datasetListRetrieving`,void 0),t.t([(0,l.state)()],g.prototype,`_datasetListPending`,void 0),t.t([(0,l.state)()],g.prototype,`_currentDatasetId`,void 0),t.t([(0,l.state)()],g.prototype,`_fetchedDatasetsDataFields`,void 0),t.t([(0,l.property)({type:String,reflect:!0,attribute:`item-type`})],g.prototype,`itemType`,void 0),t.t([(0,l.property)({type:String,attribute:`content-language`,reflect:!0})],g.prototype,`contentLanguage`,void 0),t.t([(0,l.property)({type:Array})],g.prototype,`slotsConfiguration`,void 0),t.t([(0,l.property)({type:Array})],g.prototype,`slotsContents`,void 0),t.t([(0,l.property)({type:String,reflect:!0})],g.prototype,`selects`,void 0),t.t([(0,l.property)({type:String,reflect:!0,attribute:`data-fields-search`})],g.prototype,`dataFieldsSearch`,void 0),t.t([(0,l.property)({type:String,reflect:!0,attribute:`dataset-search`})],g.prototype,`datasetSearch`,void 0),t.t([(0,l.property)({type:String,reflect:!0})],g.prototype,`icons`,void 0),t.t([(0,l.property)({type:Array,reflect:!1})],g.prototype,`datasetsDataFields`,void 0),t.t([(0,l.property)({type:Array,attribute:`dataset-ids`})],g.prototype,`datasetIds`,void 0),t.t([(0,l.property)({type:String,attribute:`selected-dataset-id`,reflect:!0})],g.prototype,`selectedDatasetId`,void 0),t.t([(0,l.property)({type:Boolean,attribute:`dataset-picker`,reflect:!0})],g.prototype,`datasetPicker`,void 0),t.t([(0,l.property)({type:String,attribute:`dataset-picker-label`})],g.prototype,`datasetPickerLabel`,void 0),t.t([(0,l.property)({type:String,attribute:`api-url`})],g.prototype,`apiUrl`,void 0),t.t([(0,l.property)({type:String,attribute:`auth-key`})],g.prototype,`authKey`,void 0),t.t([(0,l.property)({type:String,attribute:`auth-token`})],g.prototype,`authToken`,void 0),t.t([(0,l.property)({type:String,reflect:!0})],g.prototype,`placement`,void 0),t.t([(0,l.property)({type:String,reflect:!0,attribute:`slot-menu-placement`})],g.prototype,`slotMenuPlacement`,void 0),t.t([(0,l.property)({type:String,reflect:!0,attribute:`slot-menu-mode`})],g.prototype,`slotMenuMode`,void 0),t.t([(0,l.property)({type:String,reflect:!0,attribute:`constraint-mode`})],g.prototype,`constraintMode`,void 0),t.t([(0,l.property)({type:Boolean,reflect:!0})],g.prototype,`grows`,void 0),t.t([(0,l.state)()],g.prototype,`_currentSlotsContents`,void 0),g=t.t([(0,u.localized)()],g),customElements.get(`luzmo-item-slot-picker-panel`)||customElements.define(`luzmo-item-slot-picker-panel`,g),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return g}});
@@ -1,2 +0,0 @@
1
-
2
- var e=class{constructor(){this.listeners=/* @__PURE__ */ new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},t=new class extends e{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},n={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#e=n;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function i(e){setTimeout(e,0)}var a=typeof window>`u`||`Deno`in globalThis;function o(){}function s(e,t){return typeof e==`function`?e(t):e}function c(e){return typeof e==`number`&&e>=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return typeof e==`function`?e(t):e}function d(e,t){return typeof e==`function`?e(t):e}function f(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==m(o,t.options))return!1}else if(!g(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function p(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(h(t.options.mutationKey)!==h(a))return!1}else if(!g(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function m(e,t){return(t?.queryKeyHashFn||h)(e)}function h(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function g(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>g(e[n],t[n])):!1}var _=Object.prototype.hasOwnProperty;function v(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=y(e)&&y(t);if(!r&&!(b(e)&&b(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:_.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=v(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!x(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!x(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function x(e){return Object.prototype.toString.call(e)===`[object Object]`}function ee(e){return new Promise(t=>{r.setTimeout(t,e)})}function S(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:v(e,t)}function te(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ne(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var C=/* @__PURE__ */ Symbol();function w(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===C?()=>Promise.reject(/* @__PURE__ */ Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function T(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var E=/* @__PURE__ */ (()=>{let e=()=>a;return{isServer(){return e()},setIsServer(t){e=t}}})();function re(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var D=i;function O(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=D,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var k=O(),A=new class extends e{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function j(e){return Math.min(1e3*2**e,3e4)}function M(e){return(e??`online`)!==`online`||A.isOnline()}var N=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function P(e){let n=!1,r=0,i,a=re(),o=()=>a.status!==`pending`,s=t=>{if(!o()){let n=new N(t);p(n),e.onCancel?.(n)}},c=()=>{n=!0},l=()=>{n=!1},u=()=>t.isFocused()&&(e.networkMode===`always`||A.isOnline())&&e.canRun(),d=()=>M(e.networkMode)&&e.canRun(),f=e=>{o()||(i?.(),a.resolve(e))},p=e=>{o()||(i?.(),a.reject(e))},m=()=>new Promise(t=>{i=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{i=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let t,i=r===0?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(f).catch(t=>{if(o())return;let i=e.retry??(E.isServer()?0:3),a=e.retryDelay??j,s=typeof a==`function`?a(r,t):a,c=i===!0||typeof i==`number`&&r<i||typeof i==`function`&&i(r,t);n||!c?p(t):(r++,e.onFail?.(r,t),ee(s).then(()=>u()?void 0:m()).then(()=>{n?p(t):h()}))})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(i?.(),a),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),a)}}var F=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),c(this.gcTime)&&(this.#e=r.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(E.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(r.clearTimeout(this.#e),this.#e=void 0)}};function I(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{T(e,()=>t.signal,()=>n=!0)},u=w(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?ne:te;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?R:L,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:L(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function L(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function R(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var z=class extends F{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=H(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=H(this.options);e.data!==void 0&&(this.setState(V(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=S(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(o).catch(o):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>d(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===C||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>u(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!l(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=w(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?I(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=P({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof N&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof N){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...B(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...V(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),k.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function B(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function V(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function H(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var U=class extends F{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||W(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=P({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(/* @__PURE__ */ Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),k.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function W(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var G=class extends e{constructor(e={}){super(),this.config=e,this.#e=/* @__PURE__ */ new Set,this.#t=/* @__PURE__ */ new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new U({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=K(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=K(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=K(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=K(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){k.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>p(t,e))}findAll(e={}){return this.getAll().filter(t=>p(e,t))}notify(e){k.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return k.batch(()=>Promise.all(e.map(e=>e.continue().catch(o))))}};function K(e){return e.options.scope?.id}var q=class extends e{constructor(e={}){super(),this.config=e,this.#e=/* @__PURE__ */ new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??m(r,t),a=this.get(i);return a||(a=new z({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){k.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>f(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>f(e,t)):t}notify(e){k.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){k.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){k.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},J=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new q,this.#t=e.mutationCache||new G,this.#n=e.defaultOptions||{},this.#r=/* @__PURE__ */ new Map,this.#i=/* @__PURE__ */ new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=A.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(u(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=s(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return k.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;k.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return k.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=k.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(o).catch(o)}invalidateQueries(e,t={}){return k.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=k.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(o)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(o)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(u(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(o).catch(o)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(o).catch(o)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return A.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(h(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{g(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(h(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{g(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=m(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===C&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function Y(e){return e==null}function X(e){return typeof e==`string`||e instanceof String}function ie(e){return!Number.isNaN(e)&&Number.isFinite(e)}function ae(e){return typeof e==`boolean`}function oe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function se(e){return typeof e==`object`&&!!e&&Object.keys(e).length===0}var ce=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Z(e){return typeof e==`string`&&ce.test(e)}function Q(e){let t=[],n=[];for(let r of e)Z(r)?t.push(r):n.push(r);return{valid:t,invalid:n}}var $=class e{constructor(e={}){this.availableDatasets=[],this.apiUrl=e.apiUrl||`https://api.luzmo.com`,this.apiVersion=e.apiVersion||`0.1.0`,this.authKey=e.authKey||``,this.authToken=e.authToken||``,this.queryClient=new J({defaultOptions:{queries:{staleTime:e.staleTime||3e5,gcTime:e.gcTime||6e5,retry:e.retry||3,retryDelay:e.retryDelay||(e=>Math.min(1e3*2**e,3e4))}}}),e.skipNetworkListeners||this.initNetworkListeners()}_normalizeUrl(e){try{let t=new URL(e);return t.origin+t.pathname.replace(/\/$/,``)}catch{return e}}configure(e={}){let t=e.apiUrl===void 0?void 0:this._normalizeUrl(e.apiUrl),n=this._normalizeUrl(this.apiUrl),r=e.authKey!==void 0&&e.authKey!==``&&e.authKey!==this.authKey||e.authToken!==void 0&&e.authToken!==``&&e.authToken!==this.authToken||t!==void 0&&t!==n;if(e.apiVersion&&(this.apiVersion=e.apiVersion),e.apiUrl!==void 0&&(this.apiUrl=e.apiUrl),e.authKey!==void 0&&(this.authKey=e.authKey),e.authToken!==void 0&&(this.authToken=e.authToken),r&&(this.queryClient.clear(),this.availableDatasets=[]),e.staleTime||e.gcTime||e.retry){let t={};e.staleTime&&(t.staleTime=e.staleTime),e.gcTime&&(t.gcTime=e.gcTime),e.retry&&(t.retry=e.retry),this.queryClient.setDefaultOptions({queries:{...this.queryClient.getDefaultOptions().queries,...t}})}}clearLocalCache(){this.queryClient.clear(),this.availableDatasets=[]}initNetworkListeners(){typeof window<`u`&&window.addEventListener(`online`,()=>{console.warn(`Network connection restored, refreshing data...`),this.refreshAll()})}getHeaders(e={}){return{"Content-Type":`application/json`,...e}}async fetchApi(e,t,n={}){let r=`${this.apiUrl}/${this.apiVersion}${e}`,i={method:n.method||`POST`,headers:this.getHeaders(n.headers),mode:`cors`,...n};t!==void 0&&(t.key=this.authKey,t.token=this.authToken,i.body=JSON.stringify(t));try{let t=await fetch(r,i);if(!t.ok){let n=await t.json().catch(()=>null);throw t.status===401||t.status===403?Error(`Authentication failed. Please check your API token.`):t.status===404?Error(`Resource not found: ${e}`):t.status===429?Error(`Rate limit exceeded. Please try again later.`):Error(n?.message||`API request failed with status ${t.status}`)}return await t.json()}catch(t){throw console.error(`API request to ${e} failed:`,t),t instanceof Error&&(t.endpoint=e,t.timestamp=(/* @__PURE__ */ new Date()).toISOString()),t}}async fetchAllDatasets(e={}){let t=e.offset||0,n=e.limit||50,r=[`datasets`,t,n];return await this.queryClient.fetchQuery({queryKey:r,queryFn:async()=>{let e={action:`get`,version:this.apiVersion,find:{where:{type:`dataset`},attributes:[`id`,`name`,`description`],limit:n,offset:t}},r=await this.fetchApi(`/securable`,e);return{data:r?.rows??[],pagination:{offset:t,limit:n,total:r?.count??0,pages:Math.ceil((r?.count??0)/n)}}}})}async searchDatasets(e,t){if(!e)return{data:[]};let n=[`datasets`,`search`,e,t];return await this.queryClient.fetchQuery({queryKey:n,queryFn:async()=>{let n={action:`get`,version:this.apiVersion,find:{where:{type:`dataset`}}};e?.length>0&&(n.find.search={match_types:[`name`],keyphrase:e}),t?.offset&&(n.find.offset=t?.offset),t?.limit&&(n.find.limit=t?.limit);let r=await this.fetchApi(`/securable`,n),i={data:r?.rows??[]};return t?.limit&&(i.pagination={offset:t?.offset??0,limit:t?.limit,total:r?.count??0,pages:Math.ceil((r?.count??0)/t?.limit)}),i}})}async fetchDatasetNames(e){if(!e||e.length===0)throw Error(`At least one dataset ID is required`);let{valid:t,invalid:n}=Q(e);if(n.length>0&&console.warn(`[DataBroker] Invalid dataset IDs provided (not valid UUIDs): ${n.join(`, `)}. These will be skipped.`),t.length===0)throw Error(`No valid dataset IDs provided. Dataset IDs must be valid UUIDs.`);let r=[`dataset-names`,t,this.authKey,this.authToken];return await this.queryClient.fetchQuery({queryKey:r,queryFn:async()=>{let e={action:`get`,version:this.apiVersion,find:{where:{type:`dataset`,id:{in:t}},attributes:[`name`,`id`,`description`]}};return(await this.fetchApi(`/securable`,e))?.rows??[]}})}async fetchDatasetsWithColumnsAndFormulas(e){if(!e||e.length===0)throw Error(`At least one dataset ID is required`);let{valid:t,invalid:n}=Q(e);if(n.length>0&&console.warn(`[DataBroker] Invalid dataset IDs provided (not valid UUIDs): ${n.join(`, `)}. These will be skipped.`),t.length===0)throw Error(`No valid dataset IDs provided. Dataset IDs must be valid UUIDs.`);let r=[`datasets`,t,this.authKey,this.authToken];return await this.queryClient.fetchQuery({queryKey:r,queryFn:async()=>{let e={action:`get`,version:this.apiVersion,find:{where:{type:`dataset`,id:{in:t}},attributes:[`name`,`id`,`description`],include:[{model:`Column`,attributes:[`id`,`name`,`description`,`type`,`subtype`,`format`,`hidden`,`lowestLevel`,`expression`,`duration_levels`,`duration_format`],separate:!0,order:[[`order`,`asc`]],include:[{model:`Column`,attributes:[`id`,`securable_id`,`hierarchy_enabled`,`currency_id`],as:`Joins`},{model:`HierarchyLevel`,attributes:[`id`,`level`,`name`],as:`HierarchyLevels`},{model:`Currency`,attributes:[`id`,`name`,`symbol`],as:`Currency`}]},{model:`Formula`,attributes:[`id`,`name`,`description`,`type`,`subtype`,`format`,`hidden`,`lowestLevel`,`expression`,`duration_levels`,`duration_format`],include:[{model:`Currency`,attributes:[`id`,`name`,`symbol`],as:`Currency`}]}]}};return(await this.fetchApi(`/securable`,e))?.rows??[]}})}async fetchData(e){if(!e)throw Error(`Query is required`);let t=[`data`,e];return await this.queryClient.fetchQuery({queryKey:t,queryFn:async()=>{let t={action:`get`,version:this.apiVersion,find:{queries:[e]}},n=await this.fetchApi(`/data`,t);return{data:n?.data||[],performance:n?.performance||{}}}})}getCachedData(e){let t=[`data`,e],n=this.queryClient.getQueryState(t),r=this.queryClient.getDefaultOptions().queries?.staleTime;if(n?.data&&!n.isInvalidated&&typeof r==`number`&&!(r!==1/0&&Date.now()-n.dataUpdatedAt>r))return n.data}async validate(e,t){if(!t?.expression)return{valid:!1};let n={action:`validate`,version:this.apiVersion,properties:t},r=await this.fetchApi(`/${e}`,n);return{valid:!!r?.valid,reason:r?.reason??r?.error,explanation:r?.explanation,type:r?.type}}async fetchTheme(e){if(!e)throw Error(`Theme ID is required`);let t=[`theme`,e];return await this.queryClient.fetchQuery({queryKey:t,queryFn:async()=>(await this.fetchApi(`/theme`,{action:`get`,version:this.apiVersion,find:{where:{id:e}}}))?.rows?.[0]})}refreshAll(){this.queryClient.refetchQueries()}invalidateDatasetData(e){e?(this.queryClient.invalidateQueries({queryKey:[`dataset`,e]}),this.queryClient.invalidateQueries({queryKey:[`columns`,e]})):this.queryClient.invalidateQueries({queryKey:[`datasets`]})}invalidateAll(){this.queryClient.clear()}static getInstance(t={}){return e.instance?Object.keys(t).length>0&&e.instance.configure(t):e.instance=new e(t),e.instance}async fetchDatasetsRecursive(e){if(!e||e.length===0)throw Error(`At least one dataset ID is required`);let{valid:t,invalid:n}=Q(e);if(n.length>0&&console.warn(`[DataBroker] Invalid dataset IDs provided (not valid UUIDs): ${n.join(`, `)}. These will be skipped.`),t.length===0)throw Error(`No valid dataset IDs provided. Dataset IDs must be valid UUIDs.`);let r=[...new Set(t)],i=/* @__PURE__ */ new Set,a=/* @__PURE__ */ new Map,o=e=>{e&&Z(e)&&!i.has(e)&&!r.includes(e)&&r.push(e)};for(;r.length>0;){let e=[];for(;r.length>0&&e.length<50;){let t=r.shift();i.has(t)||e.push(t)}if(e.length!==0)try{(await this.fetchDatasetsWithColumnsAndFormulas(e)).forEach(e=>{let t=this.postProcessDatasetMetadata(e);i.add(t.id),this.queryClient.setQueryData([`dataset`,t.id],t),(t.outgoingJoins??[]).map(e=>e.securable_id).filter(e=>!!e&&e!==t.id).forEach(e=>{o(e)}),a.set(t.id,t),this.availableDatasets.some(e=>e.id===t.id)||this.availableDatasets.push({id:t.id,name:t.name,columns:t.columns})})}catch(e){console.error(`Error fetching datasets recursively:`,e)}}return[...a.values()]}postProcessDatasetMetadata(e){let t=[],n=(e.columns??[]).map(e=>{let n=e.joins??(Array.isArray(e.joins)?e.joins:[]);Array.isArray(n)&&n.length>0&&t.push(...n);let{joins:r,...i}=e;return{...i,joins:n}});return{...e,columns:n,formulas:e.formulas??[],outgoingJoins:t,dateLoaded:/* @__PURE__ */ new Date}}getAvailableDatasets(){return this.availableDatasets}getLinkedDatasetsIds(e){let t=this.queryClient.getQueryData([`dataset`,e]);return t?(t.outgoingJoins??[]).map(e=>e.securable_id).filter(t=>!!t&&t!==e):[]}},le=$.getInstance();export{se as a,X as c,Y as i,Z as l,le as n,ie as o,ae as r,oe as s,$ as t,Q as u};
@@ -1,2 +0,0 @@
1
-
2
- import{a as e}from"./version-BW4Ixl63.js";import{html as t}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/lit.js";var n={"add-to-dashboard-cannot-create":`Mit diesen Zugangsdaten können keine Dashboards erstellt werden`,"add-to-dashboard-cannot-create-variant":`Mit diesen Zugangsdaten können keine Varianten erstellt werden`,"add-to-dashboard-close":`Schließen`,"add-to-dashboard-open":`Öffnen`,"close-action":`Schließen`,"filter-item-field-expression":e`${0}⁣ ${1}`,"filter-item-field-expression-value":e`${0}⁣ ${1}⁣ ${2}`,"filter-item-field-value":e`${0}⁣ ${1}`,"filter-parameter-type-datetime":`Datum/Zeit`,"filter-parameter-type-datetime-list":`Datum/Zeit[]`,"filter-parameter-type-hierarchy":`Hierarchie`,"filter-parameter-type-hierarchy-list":`Hierarchie[]`,"filter-parameter-type-numeric":`Numerisch`,"filter-parameter-type-numeric-list":`Numerisch[]`,"filter-range-tooltip":e`${0} und ${1}`,"filters-sentence-and":e`${0}⁣ ${1}⁣ ${2}`,"filters-sentence-or":e`${0}⁣ ${1}⁣ ${2}`,"filters-sentence-parentheses":e`(${0})`,"formula-datasets-list-title":`Daten`,"formula-function-label-coords":`Koordinaten`,hd267dd827599dcf9:t`Element wurde nach ${0} kopiert`,"item-option-guidelines-add":`Referenzlinie hinzufügen`,"item-option-guidelines-color":e`Farbe der Referenzlinie ${0}`,"item-option-guidelines-group":`Referenzlinien`,"item-option-guidelines-remove":e`Referenzlinie ${0} entfernen`,"item-option-guidelines-style-dashed":`Gestrichelt`,"item-option-guidelines-style-dotted":`Gepunktet`,"item-option-guidelines-style-label":`Stil`,"item-option-guidelines-style-solid":`Durchgezogen`,"item-option-guidelines-type":e`Typ der Referenzlinie ${0}`,"item-option-guidelines-type-average":`Durchschnitt`,"item-option-guidelines-type-average-close":`Durchschnittlicher Schlusskurs`,"item-option-guidelines-type-average-open":`Durchschnittlicher Eröffnungskurs`,"item-option-guidelines-type-median":`Median`,"item-option-guidelines-type-value":`Wert`,"item-option-guidelines-value":e`Wert der Referenzlinie ${0}`,"item-option-guidelines-width-label":`Stärke`,"item-option-guidelines-width-medium":`Mittel`,"item-option-guidelines-width-thick":`Dick`,"item-option-guidelines-width-thin":`Dünn`,"item-slot-picker-add":`Hinzufügen`,s009465b850287447:`Aggregiert innerhalb der aktuellen Gruppierung des Diagramms.`,s00decbd8fed4f501:`Maximum`,s0218a6cc95bc9386:`Bereichstyp`,s028474eff8e31453:`Kleiner als`,s039a88e04fc473cd:`Absoluter Wert`,s03f199e48820b08d:`Eulersche Zahl`,s0456d2ad905847d9:`letzte`,s053eb89714fe5c46:`Potenz`,s057ae6b694499f56:`Prüft, ob der erste Wert größer als der zweite Wert ist.`,s06d28bae5a331115:`Gibt wahr zurück, wenn mindestens eine Bedingung wahr ist.`,s06da33e39516b46f:`Differenz zwischen Datumsangaben`,s07146695ed927fca:`Extrahiert die Stunde aus einem Datetime-Wert in UTC.`,s071e55c416742716:`Wiederherstellungsmenü öffnen`,s078d4008a2a214b0:`Entfernt führende und nachgestellte Leerzeichen aus einer Zeichenfolge.`,s079a052719914d71:`Kategorie`,s07a43e5b2a8a7c58:e`${0} Sekunden`,s07d754eb51a3ee43:`Räumlich`,s088e3b07b5394bc3:`gleich`,s08b26579c9f919a1:`Logisches Oder`,s08fd2396ce8ea974:`Extrahiert den Tag des Jahres aus einem Datums- oder Datetime-Wert.`,s091d3407b5b2f824:`ODER`,s09243007b5b91006:`Wenn`,s09423f07b5d22712:`Pi`,s095140a7d22730b7:`Kategorien`,s099b18e1bd8a1154:`Stunden`,s09c2b609dff29061:`Kumulative Summe`,s0ae75c749c889c18:`Großer Bildschirm`,s0b5cefc4c510193d:`Farbbereich`,s0bb151c9319a6813:`X-Achse`,s0bbcfb2797060663:`Gibt wahr zurück, wenn beide Bedingungen wahr sind.`,s0bca0c91195d8d6d:`enth`,s0d5513a64f3a46c5:`Datenfeld hinzufügen...`,s0d5c4bb195a222f8:`Menge`,s0e6fcbb074f690d0:`Datenfeld hinzufügen`,s103d3df3b3fa6442:`Berechnet den Durchschnitt der Werte.`,s10420672e643d2c7:`Aufsteigend sortieren`,s10d1e89ece01e6c7:`Schlechte Antwort`,s1111ebf7ea62fdd0:`Extrahiert die ISO-8601-Kalenderwoche (1-53) aus einem Datums- oder Datetime-Wert.`,s1125d159f7e64df5:`Anzeigen`,s11326fd2590f4e5e:`Standard`,s11502b46543c39e8:`Tag des Monats`,s11576cdb7730ddcc:`Gibt die mathematische Konstante Pi zurück.`,s122f7f3f1a22ea50:`nicht gleich`,s125a86b2f45bbb25:e`${0} Elemente`,s125fbff5d8958763:e`${0} (Variante ${1})`,s13f5793e33ebda4f:`zwischen`,s146475c4daa430ed:`Dezimalstellen`,s14adc1b878842c4f:`Funktionskategorie`,s1525a3512765bd52:`Zeiteinheit`,s1645aae5d87a87ae:`Elementnamen werden geladen`,s16a4e0f26328f69d:`Logisches Und`,s16d507740d87045d:`Ad-hoc-Formel`,s173bffc4bc8fdb40:`Quartalsnummer`,s178b06f4d02cfd40:`fehlt nicht`,s17d0bcf0e62af81b:`Formel-Editor wird geladen`,s1822bffc2ecbbc97:`Spalte wird geladen`,s184501a399a815dc:`Quartale`,s18498398aeb37b07:`Woche beginnt am`,s187528426100c44e:`Keine Daten`,s1bcab4b7e4a45f84:e`${0} Tage`,s1c4b5bbb758f3bce:`Tag des Jahres (UTC)`,s1cdb6b07fe827486:`Wochennummer`,s1d8604eae2ed4f70:`Gibt den größten Wert zurück.`,s1e13a3cc7c6f80c8:`Arkustangens`,s1e593719b55d60c0:`MTD`,s1e7745005c37315c:`Relativer Versatz`,s1ed6293b06ad5886:`Gibt den Sinus eines Winkels im Bogenmaß zurück.`,s1f0916624a87d415:`Tag im Jahr`,s1f7698c061c208c9:`Eröffnung`,s1f9ad180f44ebfed:`Extrahiert die Minute aus einem Datetime-Wert.`,s2153d9eae4dcb251:`Tablet`,s21686b2b94deec80:`Gibt das arithmetische Mittel aller Werte in einer numerischen Spalte zurück. Der Wert wird über den gesamten Datensatz berechnet und ändert sich beim Filtern nicht.`,s2318e95167ae475f:`Keine Dashboards gefunden`,s235c998e582f148b:`Extrahiert die ISO-8601-Kalenderwoche (1-53) aus einem Datums- oder Datetime-Wert in UTC.`,s23a368c93d7e6a90:`Schieberegler-Metrik`,s23c421a5960773e0:`Top 5 anzeigen`,s24366bc5774f0d03:`Tag des Jahres`,s2454d1f117573457:`Genauigkeit`,s247d110f13a3a288:`Tag in der Woche`,s24f3a319b88552c1:`Tief`,s25e13c6d08776558:`Synchronisation umschalten`,s26273c258ddde0e1:`Auswählen...`,s268ecd1cef45a9a8:`Sind Sie sicher?`,s2695506122ffd614:`Sekunde in der Minute`,s2718cebf7de190e1:`ist zwischen`,s2798d16f4e04857e:`Minute in der Stunde`,s28aa195f43c4318f:`Teilt eine Zeichenfolge anhand eines Trennzeichens in Teile auf. Das erste Argument ist der zu teilende Text, das zweite das Trennzeichen und das dritte die Position des zurückzugebenden Teils (beginnend bei 1).`,s2931f5506dbf5352:`Smartphone`,s2979b8c3da9caad6:`Arkussinus`,s2980eedca318d25d:`Gruppiert`,s29e9a2758d0ffdc3:`Dimension`,s2a391b3d81594d0f:`Gleich`,s2a491fbfcd87f3b3:`Multiplikation`,s2b7239b5cae535c3:`Extrahiert den Tag des Monats aus einem Datums- oder Datetime-Wert.`,s2ba5f4d8f3bd7c57:`Reihenfolge`,s2c1836a2a5065f4d:`Gibt den Arkussinus einer Zahl zurück.`,s2c4f6b473cf22fbf:`Modulo`,s2c8189544e3ea679:`Erneut versuchen`,s2ceb11be2290bb1b:`Abbrechen`,s2d4d8b099a73e46a:`Ebenen`,s2dc1bbbe252415c7:`Rundet eine Zahl auf eine angegebene Anzahl von Dezimalstellen.`,s2dcbfb305c43f0d4:`Option konnte nicht geladen werden`,s2e47760dd1d017c9:e`${0} Quartal`,s2ea38ce3da088075:`Perioden`,s2f56fa0428bad0c9:`Elementaktionen`,s2f64461723d3df5d:`Ändern`,s2f919a2f7a033efc:`Extrahiert den Wochentag (1-7, wobei 1 Montag ist) aus einem Datums- oder Datetime-Wert in UTC.`,s2fa05f91c1baa29b:e`${0} entfernen`,s2fb2a49481123d6a:`Wochen`,s2fedf26ef08343d4:`ist gleich`,s303f51ebddb596d4:`Slot-Menü`,s319898f3495ff5ba:`Stunde (UTC)`,s31f1afc1bfe1cb3a:`Mehr erfahren`,s33301138366e5381:`Rundet eine Zahl auf die nächste ganze Zahl auf.`,s33aff2834375cc26:`Addiert alle Werte.`,s33f27edd976b2f5e:`Wird geprüft…`,s344ea8f4939cdc98:`Farbe`,s347ebd71e00fb5b4:`Subtrahiert den zweiten Wert vom ersten Wert.`,s34e46e4e30ae57bd:`Absteigend sortieren`,s354ae458a550da1f:`Ziel`,s360896d6e6234cc4:`Element wird aktualisiert...`,s36352b65eb67e7ee:`Noch keine Varianten`,s36c3a657740756ff:`Rechts kürzen`,s3723fa982dc948a8:`Gibt den Kosinus eines Winkels im Bogenmaß zurück.`,s377ac272aa3b8068:`Gibt die Position einer Teilzeichenfolge in einer Zeichenfolge zurück.`,s38ae79a1c10bdb7f:`Hyperbolischer Sinus`,s3924c3d773a80312:`letzte verfügbar`,s394212f423a47bf9:`Wert konvertieren`,s39817c5a1737a373:`Gibt den Arkuskosinus einer Zahl zurück.`,s39fb2b49682b8c4b:`Zählt die Anzahl der nicht leeren Werte.`,s3b3ea038c5d3bb06:`Division`,s3c6455b19fb1c3e4:`Absoluter Wechsel`,s3ca5e1e377396e68:`Gibt den natürlichen Logarithmus einer Zahl zurück.`,s3ceacffc8fe8d13f:e`${0} Jahre`,s3d4a4b3002d13785:`Jahr der ISO-Woche (UTC)`,s3d4b0e9d53cf2672:`Dashboards suchen`,s3dcf7b255596a2c3:`Standardabweichung`,s41f303448d636dfd:`Dashboard-Raster`,s427be344bc32537d:`Gibt die Quadratwurzel einer Zahl zurück.`,s430f8483cbea0e4b:e`${0} Minute`,s43f1ffa8263b3f7b:`Runden`,s4406e2a8264d6a3e:`Route`,s441accd1cd3484c9:`Minute`,s44503fed5f4c6031:`Extrahiert den Wochentag (1-7, wobei 1 Montag ist) aus einem Datums- oder Datetime-Wert.`,s463b8c4e92751ba5:`Optionen`,s46511d857f6f5e11:`Hyperbolischer Kosinus`,s467b030b9a34b3c8:`Durchschnitt`,s46a9060ed7649fb4:`Dividiert den ersten numerischen Wert durch den zweiten numerischen Wert.`,s475db7e53638454a:`Gibt den hyperbolischen Tangens einer Zahl zurück.`,s48e186fb300e5464:`Zeit`,s495360fad288b2a4:`Sekunde (UTC)`,s496a1e26dce422f8:`Gibt die eulersche Zahl e zurück.`,s496c60f73bdf5725:`Aggregation`,s49d3019369929330:`Gibt die Stichproben-Standardabweichung über alle Werte in einer numerischen Spalte zurück. Der Wert wird über den gesamten Datensatz berechnet und ändert sich beim Filtern nicht.`,s4b30fad1c34464e1:`größer oder gleich`,s4b58c01e2578f5e4:`Legende`,s4bc7a46e7b0c01ef:`Gibt den ersten Nicht-Null-Wert aus den angegebenen Argumenten zurück.`,s4ce8a8483500a4ce:`Das Dashboard wurde nicht gefunden.`,s4d1fe77d90575785:`Datum und Uhrzeit`,s4d7765546aa4f455:`Entfernt nachgestellte Leerzeichen aus einer Zeichenfolge.`,s4dd9dd0ef75d9598:`Spalten hinzufügen oder suchen`,s4e585eeea351a038:`enthält`,s4efbcab48a433013:`Lang`,s4f27f6b48a68b5c2:`Sperren`,s4f8a5da7750d1588:`Gibt den Tangens eines Winkels im Bogenmaß zurück.`,s506186dc37c24a0e:`Formel wird geprüft`,s50d9e1b0c1636e99:`Geografie`,s510df80ecd8f51a7:`Gute Antwort`,s517acbf1f96324f9:`Gewicht`,s519d0aa80bbafd42:`Woche bis heute`,s5224b9208b08cd30:`Extrahiert einen Teil einer Zeichenfolge. Das erste Argument ist der Text, das zweite die Startposition (das erste Zeichen ist 1; eine negative Position zählt vom Ende her) und das dritte die Länge.`,s541c944915996780:`Addiert zwei numerische Werte.`,s54877b3f807f6e06:`Prüft, ob beide Werte gleich sind.`,s558a7e3ce83cb164:`Negiert eine boolesche Bedingung.`,s5590dbf7e425789d:`Label`,s55e343865792fc47:`Datenfelder des Datensatzes können nicht abgerufen werden`,s55f71f5d3158ed9f:`KI-Prompt-Eingabe`,s5608e6e8c2170d84:`Neuer Parameter…`,s5690f0e39a862e0b:`Berechnung löschen`,s572efb51e9cfc967:`Dashboard wird aktualisiert...`,s5758683fdb7446a9:`Filterdatum`,s576d8c40acfa9a54:`Gibt den hyperbolischen Kosinus einer Zahl zurück.`,s579d6beb02efb9a5:`Aggregiert über den gesamten Datensatz und ignoriert die Gruppierung des Diagramms.`,s57ace73e7c6e719f:`ist nicht in`,s58857c390f08335c:`Extrahiert die Sekunde aus einem Datetime-Wert in UTC.`,s58b4b3ecd4eb6238:`Zeichenfolge`,s58bee799432dbc69:`Addition`,s58ec693e33483873:`kleiner als`,s5a1b300572f81f73:`Desktop`,s5a801360c0e7cc6e:`Kreise`,s5b5005aae2ab472d:e`${0} entfernt`,s5be6bc0a925a85f1:`Gibt einen Wert zurück, wenn eine Bedingung wahr ist, und einen anderen Wert, wenn sie falsch ist.`,s5d73a3b3b68e6cba:`Benutzerdefiniert`,s5d929ff1619ac0c9:`Suchen`,s5e2654fb8587f442:`Duplizieren`,s5e8250fb85d64c23:`Schluss`,s5f29630f7fdb50b0:`Datensätze`,s5f43af3669b1e098:`Quelle`,s602805b1eb3106c6:`Y-Achse`,s6031881827829901:`24h`,s60b34c3c17dc35bd:`Jahre`,s6361bdb1b0dc327b:`Anzahl der Perioden`,s63d894b1ddb06289:`Beschreibung`,s64cf39cd55309346:`Kleinbuchstaben`,s64ef2a6c2dd1d3d1:`Bearbeiten`,s65486fa6ebaf3b2a:`Füllen Sie alle leeren Argumente aus.`,s656dfdc68a98502e:`Funktionen`,s6580790b036f0c6f:`aktiv`,s66722bc2ea775e05:`Deaktiviert`,s6683e715b4cc61e0:e`${0} Wochen`,s669b18c6d2d9c95b:`Keine`,s66dcbbc0355c2759:`Sonntag`,s67a28499b3caab0c:`Monat (UTC)`,s680f01021b5e339d:`Woche`,s695f2b47ca303436:e`${0} Jahr`,s69a9123fdc3c03f8:`Kleiner als oder gleich`,s6ab73c998850c5ab:`Ausdruck`,s6b0bffd88024372f:`Stunde`,s6b28afa2144a0cea:`Wandelt eine Zeichenfolge in Großbuchstaben um.`,s6bcb74ae139e528d:`Bildschirmmodi`,s6bdd437aa8c2a009:e`${0} weitere ausgewählte Datensätze anzeigen`,s6d02dc19e21eb49c:`Oberste`,s6d2c233e1a4f6a2c:`Datensatz hinzufügen`,s6d8207aee4786374:`Mittelwert`,s6de3d6e9660857a1:`Beispiel`,s6dfd49b30943c586:`Gibt den hyperbolischen Sinus einer Zahl zurück.`,s708bbac083d05109:`beginnt nicht mit`,s709a09b6edea9d90:`Datum/Zeit`,s70a773eb3133e5fa:`Monat bis heute`,s716a6024e3fe999c:`Zeigen`,s71a5c9f4b68ef4d4:`Anzahl`,s736157452e7fc7af:`Etwas ist schiefgelaufen. Bitte versuche es erneut.`,s7385537b8498510e:e`${0} Quartale`,s74303ffcfb1f68e6:`Quadratwurzel`,s7468e87263dfff7e:`Kennung`,s74dcd519e6563a26:`WTD`,s750a2c8ca7ec9e95:`Slot-Inhalt`,s7632fc9aa12bf382:`Monate`,s7649e65819d8abc7:`Diagramm konfigurieren`,s7751dacf34111c3c:`Elementoptionen`,s780ab9f06af63fd4:`Aktuelles Datum und Uhrzeit`,s782f286a79cca35d:`Relativ`,s78789724e789221c:`Größe`,s78bc8724e7c2d3b8:`Sinus`,s78c18075d35b088c:`Verfügbare Parameter`,s7954072388ad1dc4:`Vergleich`,s7a6878d41ffac284:`letzte abgeschl`,s7c95876637f6a9d7:`Filter`,s7cb5d294ed7634e3:`Datensatz`,s7cd83983d844fac8:`Extrahiert die Minute aus einem Datetime-Wert in UTC.`,s7d21b9b1ef84ec90:`Gibt die Differenz zwischen zwei Datums- oder Datetime-Werten in der ausgewählten Einheit zurück. Das erste Argument ist die Einheit ('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter' oder 'year'); die Differenz wird vom zweiten Datum zum dritten Datum berechnet.`,s7d7c7f843b13e167:e`'${0}' ist keine gültige Spalte, Funktion oder kein gültiger Wert.`,s7dacc1388e15a544:`Positionswerte`,s7e357543a7b769f4:`Versatz-Datums-Spalte`,s81a08125e4bd1b33:`Bedingt`,s846876f9b712e843:`ist nicht gleich`,s850f14c3e45ab426:`Parameter entfernen`,s8569fc3ba6761d29:`Antwort abgebrochen.`,s85c1c1fb529b7269:`Kürzen`,s862f5319f0256b94:`QTD`,s8665d029b5cb8b24:`Gesamtsummen`,s898a5d3aef872ea2:`Filterbedingung umschalten, derzeit `,s898eb5552843fe54:`Zustand wiederherstellen`,s8a03680664069fad:`Extrahiert das Quartal aus einem Datumswert in UTC.`,s8a1d7a873b78d41e:`Extrahiert den Monat aus einem Datums- oder Datetime-Wert.`,s8a56a8c8bd19c9c7:`fehlt`,s8a95c598e5cc7abd:`Feste Breite`,s8b1883cb3a3a94e2:`Mehr erfahren (öffnet in neuem Tab)`,s8ba2b22eee9bb57e:`Filter hinzufügen`,s8bb429cb2ed6e65b:`Gibt den Rest der Division des ersten Werts durch den zweiten Wert zurück.`,s8bd1517975b86680:`Dashboard wird erstellt...`,s8ce15f16e0d3a7a9:`Einige Elementnamen konnten nicht abgerufen werden`,s8d0259032729869d:`Sekunde`,s8d77a3cb03eea446:`Daten werden geladen...`,s8de2a5b227e80c95:`(x) Perioden oder länger her`,s8e66fedc4338fbc7:`Nach „Immer gruppieren nach“ verschieben`,s8fc32fa2d814c088:`Prüft, ob der erste Wert größer als oder gleich dem zweiten Wert ist.`,s90398d0f22360c50:`Gibt den absoluten Wert einer Zahl zurück.`,s9094c0cde8fb5058:`Keine Ergebnisse gefunden`,s927497135cdabe78:`Ohne Titel`,s92ab9b834d8fd1fc:`Untergruppe`,s92c8c8ca61f1e379:`Datensatz auswählen...`,s92dbc5a5a4a1d76c:`Ist leer`,s943bfb2ed5ca76e0:`Jahr der ISO-Woche`,s94c08bd5d339f44d:e`${0} Stunde`,s95ef9d52bd4d9973:`Hyperbolischer Tangens`,s965c503c3e42fdfe:`Aktiviert`,s9689e928323dc124:`letzte abgeschlossene (Periode)`,s979ed488f8afa660:`Noch keine Spalten ausgewählt`,s981f232bd33ec927:`Rate`,s9854300ef4a37d18:`endet nicht mit`,s986f3825f32ab7b2:`Links kürzen`,s987abe19fac8d108:`Summe`,s98b1cb8fb62909ec:`Gruppe`,s98c337186f2d57c6:`Bin-Breite`,s98db41a3eb532203:`Jahr bis heute`,s991d216e6efc157c:`Keine Ergebnisse`,s993f1f0c740b7af9:`Bewegen Sie den Mauszeiger über eine Funktion oder Aggregation, um ihre Beschreibung anzuzeigen.`,s996319f23f6cf0b5:`endet mit`,s99cd654f308718a3:`Verkettet zwei Zeichenfolgen.`,s9a7c8520b5e957dc:`Logarithmus`,s9aab84d92c682c2b:`Daten bearbeiten`,s9b2a2e47b83b8b89:`Filterparameter`,s9b735551f188c724:`Spalten suchen...`,s9b9009d4a5004fb8:`Binning`,s9b9d6ce29d05a298:`kleiner oder gleich`,s9bdf96efd336b522:`Ungleich`,s9c074cd6b873a11d:`Zählt die Anzahl der Zeilen.`,s9cbd1e1cb03c5209:`Formelausdruck`,s9dddd160567f347a:`Prüft, ob zwei Werte unterschiedlich sind.`,s9deeefd89ca8a81d:`Hoch`,s9e40e59654c8ad67:`Spalte`,s9eacba092932f5ee:`Filterbedingung`,s9fd0e802a9910d49:`Ersetzt Vorkommen einer Teilzeichenfolge durch eine andere Teilzeichenfolge.`,sa020fbb0637d6f0b:`Dauer addieren/subtrahieren`,sa22e91cafec90817:`Prüft, ob der erste Wert kleiner als oder gleich dem zweiten Wert ist.`,sa26d7a273074cbf9:`Keine Daten verfügbar`,sa2801a1abc816722:`Aggregationen`,sa345fd77e1d4843c:`Filter werden geladen`,sa3712c95628b8c72:`Aggregiert über eine benutzerdefinierte Gruppierung aus einbezogenen und ausgeschlossenen Spalten.`,sa3adfcca86d48eb3:`Zufallszahl`,sa3c9339de23c1752:`Format`,sa4d736704efdd08c:`Erhebt eine Zahl in eine angegebene Potenz.`,sa58e84810017ba6c:`Unbenanntes Dashboard`,sa60bbe2c7d1439a0:`Kreisförmig`,sa696721931eda01a:`Filterwert`,sa6a92648588602bf:`Antwort`,sa6ab5184d6315895:`Von`,sa6ea4d401084d793:`Parametername`,sa6f2645578b2d2bc:`Jahr`,sa708584d6f291311:`Keine Spalten gefunden`,sa725945ab6bf8f5d:`Teilzeichenfolge suchen`,sa76455c5550f9072:`Nach „Nie gruppieren nach“ verschieben`,sa7effa06c0f6784c:`größer als`,sa8b55cab62e439b5:`Spalte entfernen`,sa8beb6b1182241ac:`Filter`,sa91d4991fca9514e:`mehr als her`,saa8b48fefe67c4e3:`Dataset- und Spalten-IDs anzeigen`,saaf4b132e79fc23a:`Text ersetzen`,sab4faba2ca0fa686:`Verketten`,sac0a2bf43e48f599:`1 weiteren ausgewählten Datensatz anzeigen`,sac0a6d5fcd1137a4:`Woche (UTC)`,sac76bf3771430ba8:`Gibt e hoch der angegebenen Potenz zurück.`,sac8256732f2ee1e5:`Daten`,sac8b59943205b14f:`nächste volle (Periode)`,sac94bb71f7737997:`Median`,sacae74732f544fca:`Tage`,sacbb1ccb24f8f136:e`${0} und ${1}`,sacfd70562764058b:`Großbuchstaben`,saddc7a2dbf00d731:`Abrunden`,sae9c3c733664239a:`Gruppierungsbereich der Aggregation`,saf21b9a927cf58cc:`Ein Parameter mit diesem Namen ist bereits vorhanden.`,saf2a19f4eaf00f68:`oder länger her`,saf63d34c8601dd41:e`${0}`,saf8cea241a5abd64:`Extrahiert das Jahr aus einem Datumswert in UTC.`,safb50c5216475471:e`+ ${0} weitere`,sb06a3310a509f99a:`Farbstopp entfernen`,sb0e97584dc715a5c:`Vollständig`,sb0f3327210fe18fc:`Spalten`,sb1f654608a3eea75:`Wochentag`,sb3b793ff5cc1bc39:`nächste (x) Perioden`,sb3d4f79d9d8b71e5:`Senden`,sb47daaf9e1c4a905:`Monat`,sb522b611f2737246:`Gibt das aktuelle Datum und die aktuelle Uhrzeit zurück.`,sb569204089b4cac3:`KI-Chat`,sb5803460fed8e45e:`Beschreibung anzeigen`,sb59d68ed12d46377:`Laden`,sb5ac2df22bc0f27d:`Logisches Nicht`,sb5b295e3a7500b9c:`Dauerstufen`,sb644ed6a7eb739ac:`Größer als`,sb6513caf69971fb5:`Kurz`,sb67e0e7c0869f982:`Differenz`,sb70671db5700ff60:`endet nicht mit`,sb718e03376f84294:`Logisch`,sb8289037c37950fe:`Funktionen werden geladen`,sb82e2142e160c9e3:`Wochentag (UTC)`,sb85774dc5d18ff0f:`Bestätigen`,sb85c82927a41bb82:`Tangens`,sb93e5af29aca2e3d:`fehlt`,sb93f886d60b95765:`Fügt einem Datums- oder Datetime-Wert eine Dauer hinzu (oder zieht sie davon ab). Das erste Argument ist die Einheit ('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter' oder 'year'), das zweite die Anzahl der hinzuzufügenden Einheiten (negativ zum Abziehen) und das dritte das Ausgangsdatum bzw. die Ausgangs-Datetime.`,sb9f1339b3a61604a:`Ebenen`,sbaf87689cccc53eb:`1 Element`,sbbb97b1c63507dc0:`Zahl`,sbc7d0358df3d42f1:`Gibt eine Zufallszahl zwischen 0 und 1 zurück.`,sbede5f82a01da07f:`Aggregationsfunktion`,sbeebe911264bed23:`letzte (x) verfügbare Perioden`,sbf5bf17d9a50d591:`Element konnte nicht kopiert werden`,sbfd689f810e84a16:`Extrahiert das Quartal aus einem Datumswert.`,sc056cc14a35b3e61:`Filter entfernen`,sc16e00a7a8b2fde2:`Zurück`,sc184a4c8e41a3520:`Geben Sie für jede Aggregation einen Wert an.`,sc1bf67624fa6d498:`% Änderung`,sc22c38e2ff74e2f0:`Aufgeteilter Teil`,sc2e0d19ed54560c8:`Exponential`,sc38938275665c143:`Erstellt einen Geografiewert aus Breitengrad, Längengrad und Raumbezug.`,sc4842e5b8b90466a:`Sekunden`,sc50a305aa25ccf5c:`Zählt die Anzahl der eindeutigen Werte.`,sc525f4a3348435b8:`Dashboards konnten nicht geladen werden`,sc576bd8af97772e3:`Parameter verwenden`,sc592307ea80f16b9:`Unbekannt`,sc5e35ae3ed59afa2:`Kosinus`,sc647b5f32767011d:`Wandelt eine Zeichenfolge in Kleinbuchstaben um.`,sc66b38169f832f79:`Zu Dashboard hinzufügen`,sc6e49f3d37e54030:`Stunde im Tag`,sc6f5a4fc0583d734:`ist in`,sc70ad8207db856a8:`Koordinaten`,sc72895d56c4cdcb4:`Zeichenfolgenlänge`,sc78ac75cec3bc641:`Extrahiert das ISO-Wochenjahr aus einem Datums- oder Datetime-Wert in UTC.`,sc86e72c4fdd4e0ec:`Zählen unterschiedlich`,sc8a98cb006054d7b:`Filterausdruck`,sc8d21540b3d89a69:`Farbstopp hinzufügen`,sc8f855b93b29d6e4:`Einschließen / ausschließen`,sc919093c0ed095d1:`Extrahiert die Sekunde aus einem Datetime-Wert.`,sc980855a000b76ea:`Unterste`,sca4e3645a2e656e0:`Minute (UTC)`,scace072bef961918:`Zeilen`,scb7bab1a17663a6c:`YTD`,scb870bd06692114f:`Nie gruppieren nach`,scbaef981909d487e:`Entwicklung`,scc12e58c6ea9c6c5:`Konvertierung`,scc2f862c1d285c7d:`Denkt nach`,scc3056d8686094c8:`Datensatz oder Agent hinzufügen`,scec91d838431f76c:`Spalten werden geladen`,scf2bb2b0de9cdb8a:`Millisekunde`,scf9d4b3481d2d769:`Teilzeichenfolge entnehmen`,scfb1e98368eb0a45:`Natürlicher Logarithmus`,sd05671183b4fe913:`Daten konnten nicht abgerufen werden`,sd138b42dc3911a0f:`Extrahiert den Tag des Jahres aus einem Datums- oder Datetime-Wert in UTC.`,sd1f07cfd81510f34:`Neue Variante`,sd237be440de38cc7:`Quartal`,sd28141a332dc31fa:`Tag im Monat`,sd2d5d28a8d42f372:`Quartal (UTC)`,sd3099ed7844b7eb2:`Wochentag`,sd3abbb1dbbe0552f:`Varianten konnten nicht geladen werden`,sd3ec39c275aec063:`Nenner`,sd434e9c69417f3a0:`Diese Antwort bewerten`,sd59e6017006a66d3:e`${0} Woche`,sd5b1040899eb149d:`nächste voll`,sd66a74fff07a11fb:`{count} elemente ausgewählt`,sd6c5c734d7cfa9ec:`Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück.`,sd794b878b98cd77c:e`${0} Millisekunde`,sd7b3b24cd10acbb6:e`Rasterelement ${0}`,sd7ebafacf602c9bd:`Brief`,sd89a9a92d5da0fd0:`Rundet eine Zahl auf die nächste ganze Zahl ab.`,sd8b18575e1f4be43:`Gibt den Arkustangens einer Zahl zurück.`,sd8ecf227c7c49331:`Mathematisch`,sdae4e03dc4e96d45:`{count} ausgewählt`,sdb73788b3c975f16:`Automatisch`,sdb798be27601ed06:`Parametertyp:`,sdbce9d3fdf676217:e`${0} Monat`,sdc673e73b5c13aea:`Löschen`,sdd6c63f37eb62928:e`${0} Minuten`,sdd89a3395abab8ea:`Extrahiert das ISO-Wochenjahr aus einem Datums- oder Datetime-Wert.`,sde325421dfb4048e:`Filter mit OR können im reinen AND-Modus nicht bearbeitet werden.`,sde8c84234a516e7d:e`${0} Millisekunden`,sdebe99a43259a451:`Zeilen zählen`,sdfbe1b87d8712bc7:`Womit kann ich dir helfen?`,sdfeb2151b9e78d4d:`enthält nicht`,se01bc9eea39688ad:`Monat im Jahr`,se063ce6562716192:`Aggregationen werden geladen`,se0955919920ee87d:`Tag`,se1126afc2d66422f:`Entfernt führende Leerzeichen aus einer Zeichenfolge.`,se211e3d21bbf3bff:`Maß`,se25d956db80a4d78:`Arkuskosinus`,se2b7530e30fa607d:`Periodenvergleich`,se2d6ee866b592a9f:`mehr als (x) Perioden her`,se3a1aa0525f22ee4:`Kennzahlen`,se415bbea6c976fb1:`Gruppieren nach`,se53005c74eea3a45:`Extrahiert den Monat aus einem Datums- oder Datetime-Wert in UTC.`,se5316cbaa025f028:`nächste`,se592b9bec3ffc953:`Konvertiert das erste Argument in den durch das zweite Argument angegebenen Typ. Mögliche Typen sind 'hierarchy', 'numeric', 'datetime' und 'boolean'.`,se63e1798c5b1ab4d:`Tag des Monats (UTC)`,se715be190539325a:`vor`,se77797889cac2fec:e`${0} Monate`,se8d0f19a0eac8103:`Extrahiert die Stunde aus einem Datetime-Wert.`,se8ddc90a9d7c709d:`Ebene`,se960538baf78f63b:e`${0} Sekunde`,se9e535bb9591039e:`Ausdruck auswählen`,se9ff6e9a514d8cf9:`Montag`,sea3f1934bd770b70:`Gibt den Logarithmus einer Zahl für eine bestimmte Basis zurück.`,sea4f08110bb8f15d:`Entfernen`,seb3937089958c541:`Größer als oder gleich`,seb4eae68d45315b7:`Minimum`,seb9c440de1ce6044:`beginnt mit`,seba8eb8fefd4afe9:`Gibt den kleinsten Wert zurück.`,sec2f608650e36ac5:`letzte abgeschlossene Periode`,secf42ec1c7c47be2:`fehlt nicht`,sed1e9f2d0f29e036:`Kein Gewicht`,sed522484748a787d:`Element wird erstellt...`,see0ec27fb03d880e:`Minuten`,seeccc1a89151be8a:`Extrahiert den Tag des Monats aus einem Datums- oder Datetime-Wert in UTC.`,sef186952c82f8ce9:`Extrahiert das Jahr aus einem Datumswert.`,sef49aec68fd1dc66:`Name`,sefc8e08d71b8530f:`Agenten`,sf095cc47a4ff9c3d:`Formel`,sf2c23d06cc64e8dd:`Neues Dashboard`,sf2d322b3ea1ff824:`Aufrunden`,sf4423f120eba0c11:`Prüft, ob der erste Wert kleiner als der zweite Wert ist.`,sf4a3a5898b69b81f:e`${0} Tag`,sf518b78d9734f57b:`beginnt nicht mit`,sf53ceb4945e8f1fb:`Leeres Argument. Geben Sie einen Wert ein oder ziehen Sie eine Spalte, Funktion oder Aggregation hierher.`,sf6cda8263b3170af:`Verwenden Sie den Zeitraum bis heute für unvollständige Zeiträume`,sf6dd5d79bf159456:`Prompt-Vorschläge`,sf70eaf9ab4c93082:`nicht enth`,sf95145f204b001ac:`Immer gruppieren nach`,sf9aee319a006c9b4:`Hinzufügen`,sf9c10516a62a23db:`Anzeigen als`,sfa069719a050be66:`UND`,sfa2d0aa30ee5aa58:`letzte (x) Perioden`,sfa44b98afaa0e7c6:`Spalten suchen`,sfad9ed343e97551c:`Vergangener Wert`,sfb1d53c7660dcfc5:e`${0}, und ${1} weitere`,sfb9e6d0c6baa99f5:`Passt dem Datumsbereich, der in der Tabelle oder im Diagramm sichtbar ist`,sfbac36245480ddbc:`Trennzeichen`,sfbac39f6e9672a74:`Zurück zum Gruppierungsbereich`,sfd21da55eb7a055a:e`${0} Stunden`,sfd3c65c07f87b869:`Wird zum Dashboard hinzugefügt`,sfda1c9d0be35cec8:`Quartal bis heute`,sfe9b4269fb997134:`Multipliziert zwei numerische Werte.`,sff5bb7742c2896c8:`Zielwert`,sffa721bb6aa3128d:`Suchen...`,sffb8751d8069b701:`Jahr (UTC)`,sffce88436a4390cf:`Die Diagrammkonfiguration konnte nicht geladen werden. Bitte versuche es erneut.`,"slot-label-name":`Name`,"slot-label-time":`Zeit`,scefc24b75c5d407c:`Only PNG, JPEG, WebP, and GIF images can be attached.`,s2ae727973bb033a3:`Failed to attach image`,sf55c258a1346a96b:`Image is too large. Maximum size is 15 MB.`,s62ce113b16e1d6cb:e`You can attach up to ${0} images.`,se03f6e40172e7803:`Voice recording failed`,sccc63af4eff93de2:`Failed to transcribe audio`,sb071e9aa21ff04fe:`Add attachments`,sc099a0c95839fcd4:`Attached image`};export{n as templates};
@@ -1,38 +0,0 @@
1
-
2
- import{i as e,n as t,r as n}from"./version-BW4Ixl63.js";import{t as r}from"./localized-decorator-DJVBmJVH.js";import{n as i,t as a}from"./luzmoCheckbox-BksyONqE.js";import{d as o,f as s,p as c}from"./chart-helpers-DsIGsaDc.js";import{html as l,property as u,query as d,state as f,unsafeCSS as p}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/number-field.js";var m=`:host .settings-container{gap:var(--luzmo-display-settings-vertical-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}:host .settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-binning-gap,var(--display-settings-binning-gap));display:flex}:host,:host([size=s]){--display-settings-binning-gap:var(--luzmo-spacing-3)}:host([size=l]){--display-settings-binning-gap:var(--luzmo-spacing-4)}:host([size=xl]){--display-settings-binning-gap:var(--luzmo-spacing-5)}`,h=class extends t(s(c,{validSizes:Object.values(o)})){constructor(...e){super(...e),this.slotContent={},this._enabled=!1,this._binWidth=10}static get styles(){return[p(m)]}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._enabled=this.slotContent?.bins?.enabled??!1,this._binWidth=this.slotContent?.bins?.number??10)}toggleBinning(){this._enabled=!this._enabled,this.sendEvent()}setBinning(){this._binWidth=this.binWidthElement.value,this.sendEvent()}sendEvent(){let e={enabled:!!this._enabled,number:this._binWidth??10};this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:{...this.slotContent,bins:e}}}))}renderBinWidth(){return l`<div class="setting">
3
- <luzmo-field-label .size=${this.size} for="bin-width"
4
- >${e(`Bin width`,{desc:`The width of each bin in the histogram`})}</luzmo-field-label
5
- >
6
- <luzmo-number-field
7
- id="bin-width"
8
- min="0"
9
- .value=${this._binWidth}
10
- .size=${this.size}
11
- @change=${this.setBinning}
12
- ></luzmo-number-field>
13
- </div>`}render(){return l`<div class="settings-container">
14
- <div class="settings-row">
15
- <div class="setting">
16
- <luzmo-field-label .size=${this.size} for="binning"
17
- >${e(`Binning`,{desc:`Grouping numeric data into intervals or "bins" for analysis and visualization`})}</luzmo-field-label
18
- >
19
- <luzmo-action-button
20
- id="binning"
21
- toggles
22
- emphasized
23
- .size=${this.size}
24
- ?selected=${this._enabled}
25
- class=${this._enabled?`active`:`inactive`}
26
- @click=${this.toggleBinning}
27
- >
28
- <luzmo-icon
29
- slot="icon"
30
- .size=${this.size}
31
- .icon=${this._enabled?i:a}
32
- ></luzmo-icon>
33
- ${this._enabled?e(`Enabled`,{desc:`Option set to enabled`}):e(`Disabled`,{desc:`Option set to disabled`})}
34
- </luzmo-action-button>
35
- </div>
36
- ${this._enabled?this.renderBinWidth():``}
37
- </div>
38
- </div>`}};n([u()],h.prototype,`slotContent`,void 0),n([f()],h.prototype,`_enabled`,void 0),n([d(`#bin-width`)],h.prototype,`binWidthElement`,void 0),h=n([r()],h),customElements.get(`luzmo-display-settings-binning`)||customElements.define(`luzmo-display-settings-binning`,h);