@luzmo/analytics-components-kit 1.0.9-beta.11 → 1.0.9-beta.12
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.
- package/components/add-to-dashboard/index.cjs +1 -1
- package/components/add-to-dashboard/index.js +1 -1
- package/components/{add-to-dashboard-nYUaDghN.cjs → add-to-dashboard-D11b-HS7.cjs} +1 -1
- package/components/{add-to-dashboard-BY70QBzE.js → add-to-dashboard-KLYGiqKE.js} +4 -4
- package/components/ai-chat/ai-chat-events.d.ts +5 -1
- package/components/ai-chat/ai-chat.d.ts +36 -1
- package/components/ai-chat/helpers/assistant-message-feedback.d.ts +26 -0
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.d.ts +1 -1
- package/components/ai-chat/index.js +2 -2
- package/components/ai-chat/session/ai-chat-session.d.ts +8 -1
- package/components/ai-chat/stream/chunk-extractors.d.ts +8 -0
- package/components/ai-chat/stream/index.d.ts +1 -1
- package/components/ai-chat/stream/types.d.ts +6 -0
- package/components/ai-chat-C0XZ_pvG.cjs +393 -0
- package/components/{ai-chat-DmDtBF47.js → ai-chat-CYrWJ8Wa.js} +873 -734
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +1 -1
- package/components/{ai-interaction-textarea-6ECwAdeT.js → ai-interaction-textarea-CT698Pph.js} +5 -5
- package/components/{ai-interaction-textarea-CRyyTj_B.cjs → ai-interaction-textarea-Da1ErRHy.cjs} +1 -1
- package/components/{area-chart-positioning.config-CoCdjr2E.cjs → area-chart-positioning.config-DWLy-uS1.cjs} +1 -1
- package/components/{area-chart-positioning.config-o-uJPEr5.js → area-chart-positioning.config-Dpi4gakJ.js} +1 -1
- package/components/{bar-chart-positioning.config-fsB82756.cjs → bar-chart-positioning.config-B3U1-22D.cjs} +1 -1
- package/components/{bar-chart-positioning.config-CZgrS6lc.js → bar-chart-positioning.config-DDv8hNyi.js} +1 -1
- package/components/{base-BmvsQ-s1.cjs → base-BdkFbMZR.cjs} +1 -1
- package/components/{base-CrpOMVeU.js → base-Cvcpdy0h.js} +1 -1
- package/components/{box-plot-positioning.config-CDq460FI.js → box-plot-positioning.config-1BuF6Gjj.js} +1 -1
- package/components/{box-plot-positioning.config-BMfGGDfe.cjs → box-plot-positioning.config-lfqDTCdY.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-C9MmTtTX.cjs → bubble-chart-positioning.config-DVBuVeSs.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-DWfz4tud.js → bubble-chart-positioning.config-V8KfvCkY.js} +1 -1
- package/components/{bullet-chart-positioning.config-BwHPM5ui.cjs → bullet-chart-positioning.config-CtlmKdzp.cjs} +1 -1
- package/components/{bullet-chart-positioning.config-DmSlVIjL.js → bullet-chart-positioning.config-IrK6KYbE.js} +1 -1
- package/components/{choropleth-map-positioning.config-cjBzi_Db.js → choropleth-map-positioning.config-BSb0ig5Y.js} +1 -1
- package/components/{choropleth-map-positioning.config-C0m6zzD3.cjs → choropleth-map-positioning.config-ahRkoZNv.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-BAFFQSHe.cjs → circle-pack-chart-positioning.config-CS1dbWgR.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-CY2rLb57.js → circle-pack-chart-positioning.config-DfQztqxL.js} +1 -1
- package/components/{circular-gauge-positioning.config-6pZUNxYa.js → circular-gauge-positioning.config-1HH3Rw2L.js} +1 -1
- package/components/{circular-gauge-positioning.config-BfWAjAY2.cjs → circular-gauge-positioning.config-BeLsxbow.cjs} +1 -1
- package/components/{column-chart-positioning.config-xgRuA_l5.cjs → column-chart-positioning.config-CLZuZiVa.cjs} +1 -1
- package/components/{column-chart-positioning.config-hrAvNd7T.js → column-chart-positioning.config-DVeVPtzS.js} +1 -1
- package/components/{combination-chart-positioning.config-BI8HroaG.js → combination-chart-positioning.config-BPXqur2s.js} +1 -1
- package/components/{combination-chart-positioning.config-D0TU4hge.cjs → combination-chart-positioning.config-DKNRMoZN.cjs} +1 -1
- package/components/{conditional-number-positioning.config-CWaDhMLA.js → conditional-number-positioning.config-BWJAnFTq.js} +1 -1
- package/components/{conditional-number-positioning.config-B_yISWne.cjs → conditional-number-positioning.config-HXcO-Ej5.cjs} +1 -1
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.js +1 -1
- package/components/{data-field-D4YFqg1H.js → data-field-BMeV_pUL.js} +3 -3
- package/components/{data-field-Hi-ITTzx.cjs → data-field-C204ZKd3.cjs} +1 -1
- package/components/data-field-level/index.cjs +1 -1
- package/components/data-field-level/index.js +1 -1
- package/components/{data-field-level-BWQPtFP5.cjs → data-field-level-Cv4Vgi_o.cjs} +1 -1
- package/components/{data-field-level-CB5GtdU5.js → data-field-level-Dpta9m5I.js} +2 -2
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.js +1 -1
- package/components/{data-field-panel-64HoViNT.js → data-field-panel-Beg-fx10.js} +3 -3
- package/components/{data-field-panel-DzKwmQi_.cjs → data-field-panel-D71J7_IE.cjs} +1 -1
- package/components/data-fields-select/data-fields-select.d.ts +2 -0
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +1 -1
- package/components/{data-fields-select-BOwoWq0j.js → data-fields-select-BKoQMwZd.js} +4 -1
- package/components/{data-fields-select-DXv6PQHG.cjs → data-fields-select-CBTGcYRL.cjs} +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +1 -1
- package/components/{dataset-selector-list-_AL1-GWw.cjs → dataset-selector-list-D9ZmjTyU.cjs} +1 -1
- package/components/{dataset-selector-list-DFC2bvn0.js → dataset-selector-list-DFMfknD5.js} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +1 -1
- package/components/{dataset-selector-row-By2ko-Rd.cjs → dataset-selector-row-Bq_yYpb9.cjs} +1 -1
- package/components/{dataset-selector-row-DC6mrVyF.js → dataset-selector-row-DFPwXde5.js} +5 -5
- package/components/{de-Yl3kqB03.js → de-DPhR2zPG.js} +4 -0
- package/components/de-DUAXVtRS.cjs +20 -0
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/display-settings-BkbdgMvh.cjs +143 -0
- package/components/{display-settings-BsCKV9ae.js → display-settings-MnSyqIog.js} +17 -16
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +1 -1
- package/components/{display-settings-binning-CkrbhPVB.js → display-settings-binning-BQYxWvFI.js} +3 -3
- package/components/{display-settings-binning-BdtxayZT.cjs → display-settings-binning-DqcCzBrG.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +1 -1
- package/components/{display-settings-datetime-CpFyrcGk.cjs → display-settings-datetime-9WraOyqr.cjs} +1 -1
- package/components/{display-settings-datetime-mVh5Tjrx.js → display-settings-datetime-D5UwdwAI.js} +3 -3
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +1 -1
- package/components/{display-settings-grand-totals-D7unOEKl.js → display-settings-grand-totals-DYSVU-9G.js} +3 -3
- package/components/{display-settings-grand-totals-CwOGoE06.cjs → display-settings-grand-totals-w2Zbxwt4.cjs} +1 -1
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +1 -1
- package/components/{display-settings-numeric-DhiXPU3f.cjs → display-settings-numeric-DGyMDswg.cjs} +1 -1
- package/components/{display-settings-numeric-DDZyFNFF.js → display-settings-numeric-YOsAAqyJ.js} +4 -4
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +1 -1
- package/components/{display-settings-period-over-period-Hd172SzT.js → display-settings-period-over-period-CYwQ6KQI.js} +3 -3
- package/components/{display-settings-period-over-period-BNFjbgP0.cjs → display-settings-period-over-period-zme6yEAi.cjs} +1 -1
- package/components/{donut-chart-positioning.config-B2CrxOig.js → donut-chart-positioning.config-ovPyzL2x.js} +1 -1
- package/components/{donut-chart-positioning.config-DQb53kWI.cjs → donut-chart-positioning.config-xwoqdu-c.cjs} +1 -1
- package/components/{es-Ctf1SIsp.js → es-C9faREu_.js} +4 -0
- package/components/es-DKP3YRmv.cjs +20 -0
- package/components/{evolution-number-positioning.config-BdH8pv6_.js → evolution-number-positioning.config-B-H5aEXI.js} +1 -1
- package/components/{evolution-number-positioning.config-BzBsGcD4.cjs → evolution-number-positioning.config-CfcajD4B.cjs} +1 -1
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/{filter-expression-picker-Bn_jAdQX.cjs → filter-expression-picker-BBZ7KHqG.cjs} +1 -1
- package/components/{filter-expression-picker-Cjr8xWxy.js → filter-expression-picker-kLhzHUEW.js} +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +1 -1
- package/components/{filter-item-D6y8eCmG.js → filter-item-Dgh9nHGz.js} +6 -6
- package/components/{filter-item-CHJDVOju.cjs → filter-item-DnYGrUzZ.cjs} +1 -1
- package/components/filter-parameter-picker/index.cjs +1 -1
- package/components/filter-parameter-picker/index.js +1 -1
- package/components/{filter-parameter-picker-C955tF0T.js → filter-parameter-picker-DhTMuymq.js} +3 -3
- package/components/{filter-parameter-picker-jyrh3POQ.cjs → filter-parameter-picker-UwSmMkoB.cjs} +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/{filter-value-picker-DmWiNLZH.cjs → filter-value-picker-CPuUfjLo.cjs} +1 -1
- package/components/{filter-value-picker-B8nA8hTV.js → filter-value-picker-Ch4k6xIK.js} +4 -4
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +1 -1
- package/components/{filter-value-picker-datetime-U4XWKSFx.cjs → filter-value-picker-datetime-BHtjVhx1.cjs} +1 -1
- package/components/{filter-value-picker-datetime-BAhXn1BS.js → filter-value-picker-datetime-hTOIBHMi.js} +1 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +1 -1
- package/components/{filter-value-picker-hierarchy-CUPz5Ggs.js → filter-value-picker-hierarchy-Bu1OiV4T.js} +2 -2
- package/components/{filter-value-picker-hierarchy-1ya1_rS3.cjs → filter-value-picker-hierarchy-CTZQfWEJ.cjs} +1 -1
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +1 -1
- package/components/{filter-value-picker-numeric-DrHdHj31.cjs → filter-value-picker-numeric-BOY9I-y3.cjs} +1 -1
- package/components/{filter-value-picker-numeric-D8mLaxzj.js → filter-value-picker-numeric-tstYPaES.js} +1 -1
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/filters-B_43Qb_P.cjs +199 -0
- package/components/{filters-Byy8HE19.js → filters-ESeCEQPQ.js} +4 -4
- package/components/formula/index.cjs +1 -1
- package/components/formula/index.js +1 -1
- package/components/{formula-D_ipR6d1.js → formula--lmxX7EE.js} +2 -2
- package/components/{formula-C6dPJyKm.cjs → formula-CC33nJ0T.cjs} +1 -1
- package/components/{formula-codemirror-CdlIly66.js → formula-codemirror-CD2ejhzw.js} +6 -6
- package/components/{formula-codemirror-C1UFMf6i.cjs → formula-codemirror-za5kEnKc.cjs} +1 -1
- package/components/{formula-display-store-B0ifmvCi.cjs → formula-display-store-B1qQtQbU.cjs} +1 -1
- package/components/{formula-display-store-CfObcBCd.js → formula-display-store-dxzteJ_B.js} +3 -3
- package/components/formula-editor/index.cjs +1 -1
- package/components/formula-editor/index.js +3 -3
- package/components/{formula-editor-B9ikCsLK.cjs → formula-editor-BDckEUnh.cjs} +1 -1
- package/components/{formula-editor-DJ-0AVCl.js → formula-editor-DNduncPi.js} +6 -6
- package/components/formula-field/index.cjs +1 -1
- package/components/formula-field/index.js +1 -1
- package/components/{formula-field-CNqn6Xbh.cjs → formula-field-Cs7SaL-J.cjs} +1 -1
- package/components/{formula-field-Bq-RYt0H.js → formula-field-dSYKahSQ.js} +1 -1
- package/components/{formula-input-base-Dple-9bo.js → formula-input-base-CzMOxMBx.js} +1 -1
- package/components/{formula-input-base-KSmmN1uI.cjs → formula-input-base-DCI3s_eW.cjs} +1 -1
- package/components/fr-BNVUrX6D.cjs +20 -0
- package/components/{fr-zWhjQv4B.js → fr-Dfp7e-Vj.js} +4 -0
- package/components/{funnel-chart-positioning.config-DleNZIG-.cjs → funnel-chart-positioning.config-2mR2EyN4.cjs} +1 -1
- package/components/{funnel-chart-positioning.config-DgRle8n1.js → funnel-chart-positioning.config-Bth5tggl.js} +1 -1
- package/components/{get-dataset-name-trrlomzY.js → get-dataset-name-CSvAYeJM.js} +1 -1
- package/components/{get-dataset-name-3UfKdy0m.cjs → get-dataset-name-DhYRY3e-.cjs} +1 -1
- package/components/{groupings-B55Oba6e.js → groupings-14w1cCc3.js} +1 -1
- package/components/{groupings-DEpTt8DV.cjs → groupings-DxuknvWu.cjs} +1 -1
- package/components/{heat-map-positioning.config-BTabq_f9.js → heat-map-positioning.config-B4bGYbFk.js} +1 -1
- package/components/{heat-map-positioning.config-DCB3Eagz.cjs → heat-map-positioning.config-CwcQrF53.cjs} +1 -1
- package/components/{heat-table-positioning.config-pK8Wn1dw.js → heat-table-positioning.config-BXCOZwaN.js} +1 -1
- package/components/{heat-table-positioning.config-Dnu133l4.cjs → heat-table-positioning.config-D8UNVnTk.cjs} +1 -1
- package/components/{hexbin-map-positioning.config-DjYp-lX8.js → hexbin-map-positioning.config-B-WZWfLq.js} +1 -1
- package/components/{hexbin-map-positioning.config-IqRt8f29.cjs → hexbin-map-positioning.config-Dn-bgQZ8.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +55 -55
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.js +1 -1
- package/components/{interactive-viz-item-D6lWVMHb.js → interactive-viz-item-CMxReAvq.js} +3 -3
- package/components/{interactive-viz-item-CM-LoEa5.cjs → interactive-viz-item-CQz2XYj8.cjs} +1 -1
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +2 -2
- package/components/{item-grid-CbXKsQm4.js → item-grid-BYqUrmJa.js} +2 -2
- package/components/{item-grid-DTishUCb.cjs → item-grid-DKpxUsMo.cjs} +1 -1
- package/components/item-grid-item-actions-menu/index.cjs +1 -1
- package/components/item-grid-item-actions-menu/index.js +1 -1
- package/components/{item-grid-item-actions-menu-B7ylgTwO.js → item-grid-item-actions-menu-D3WeDgxI.js} +2 -2
- package/components/item-grid-item-actions-menu-Dhv9sTNi.cjs +52 -0
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +1 -1
- package/components/{item-option-BTSV33ft.cjs → item-option-BWGwUzLt.cjs} +1 -1
- package/components/{item-option-BUju6ZE1.js → item-option-DYXzQ13_.js} +1 -1
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +1 -1
- package/components/{item-option-action-button-group-DnTBh3R4.js → item-option-action-button-group-B3PD2K1l.js} +2 -2
- package/components/{item-option-action-button-group-CuDeyDRi.cjs → item-option-action-button-group-Bc26loDM.cjs} +1 -1
- package/components/{item-option-base-C6RQH9M8.cjs → item-option-base-B6axTng-.cjs} +1 -1
- package/components/{item-option-base-BIDIiNfI.js → item-option-base-BJdtApx5.js} +2 -2
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +1 -1
- package/components/{item-option-color-palette-picker-DbsqP2zA.js → item-option-color-palette-picker-BxIWdQLy.js} +1 -1
- package/components/{item-option-color-palette-picker-DsG-wxGB.cjs → item-option-color-palette-picker-C1t_nY1O.cjs} +1 -1
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/{item-option-color-picker-BUN5YK-t.cjs → item-option-color-picker-1BzUBXz-.cjs} +1 -1
- package/components/{item-option-color-picker-CKGUj3cW.js → item-option-color-picker-9DEx5w-z.js} +1 -1
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/{item-option-color-range-BN81ePAI.cjs → item-option-color-range-B_gmxlEl.cjs} +1 -1
- package/components/{item-option-color-range-dMehrwqA.js → item-option-color-range-DBtnzfJa.js} +2 -2
- package/components/item-option-guidelines/index.cjs +1 -1
- package/components/item-option-guidelines/index.js +1 -1
- package/components/{item-option-guidelines-Bn1HSCgL.js → item-option-guidelines-DhuU5VZu.js} +4 -4
- package/components/item-option-guidelines-Dv4EoY3s.cjs +135 -0
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +1 -1
- package/components/{item-option-multi-language-field-BFgbOzMM.js → item-option-multi-language-field-BoXUM6-u.js} +1 -1
- package/components/{item-option-multi-language-field-Du609wC_.cjs → item-option-multi-language-field-C_eP2I2u.cjs} +1 -1
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +1 -1
- package/components/{item-option-number-field-CDcf6_4D.js → item-option-number-field-BrEXkjWl.js} +1 -1
- package/components/{item-option-number-field-CVAtj0UX.cjs → item-option-number-field-kXpCE4FI.cjs} +1 -1
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/{item-option-panel-0iHLl9-q.cjs → item-option-panel-CB338Rgo.cjs} +1 -1
- package/components/{item-option-panel-DUlIB6qj.js → item-option-panel-CUoozNxD.js} +2 -2
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +1 -1
- package/components/{item-option-picker-Dkc3nd3x.cjs → item-option-picker-BvT4ITzX.cjs} +1 -1
- package/components/{item-option-picker-ClKAGpgs.js → item-option-picker-fKn763j4.js} +1 -1
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +1 -1
- package/components/{item-option-position-picker-O8PpyiRv.js → item-option-position-picker-D7smHuW7.js} +1 -1
- package/components/{item-option-position-picker-qCKh0Mfs.cjs → item-option-position-picker-D96vKNTF.cjs} +1 -1
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +1 -1
- package/components/{item-option-positions-number-field-CBx4uQ39.js → item-option-positions-number-field-BPEATH4R.js} +1 -1
- package/components/{item-option-positions-number-field-Dfe4ufnF.cjs → item-option-positions-number-field-C4IOForB.cjs} +1 -1
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +1 -1
- package/components/{item-option-radio-button-group-B5OVbLRg.cjs → item-option-radio-button-group-Bb-Rc5nv.cjs} +1 -1
- package/components/{item-option-radio-button-group-J_ZusHOP.js → item-option-radio-button-group-DQ0knjcY.js} +2 -2
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/{item-option-slider-V9z4qqyE.js → item-option-slider-BuA7tdbc.js} +1 -1
- package/components/{item-option-slider-BDAEs7Fk.cjs → item-option-slider-CLqtmYAE.cjs} +1 -1
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +1 -1
- package/components/{item-option-switch-BA4ifIHK.js → item-option-switch-CvzS-KN9.js} +1 -1
- package/components/{item-option-switch-Bzy2VRLg.cjs → item-option-switch-DtRz_zTM.cjs} +1 -1
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +1 -1
- package/components/{item-option-text-field-Cf0khC48.js → item-option-text-field-CW3R8voC.js} +1 -1
- package/components/{item-option-text-field-C-sTkUre.cjs → item-option-text-field-D1NFqoms.cjs} +1 -1
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.js +1 -1
- package/components/{item-slot-drop-DrJRtG7b.cjs → item-slot-drop-B7JmgKMJ.cjs} +1 -1
- package/components/{item-slot-drop-D2VDgqYS.js → item-slot-drop-DaTJ-Gym.js} +6 -6
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +1 -1
- package/components/{item-slot-drop-panel-CCCOwtYM.js → item-slot-drop-panel-0wUkaWiM.js} +39 -39
- package/components/{item-slot-drop-panel-CFerKcdH.cjs → item-slot-drop-panel-CdCEWBGb.cjs} +1 -1
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +1 -1
- package/components/item-slot-picker/item-slot-picker.d.ts +8 -2
- package/components/{item-slot-picker-BdfYcBKT.js → item-slot-picker-BiHy7QX1.js} +142 -121
- package/components/{item-slot-picker-aqePvZ9B.cjs → item-slot-picker-BvrK1U4h.cjs} +42 -47
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +1 -1
- package/components/{item-slot-picker-panel-DC3i7XZP.js → item-slot-picker-panel-BmlCimZ9.js} +5 -5
- package/components/{item-slot-picker-panel-dU6NywBo.cjs → item-slot-picker-panel-CeT847QM.cjs} +2 -2
- package/components/{line-chart-positioning.config-DX5mLAP7.cjs → line-chart-positioning.config-DaDYXk9Z.cjs} +1 -1
- package/components/{line-chart-positioning.config-BW19v66B.js → line-chart-positioning.config-Imvzv3EC.js} +1 -1
- package/components/{localized-mixin-CYMFnS-n.js → localized-mixin-BLUbrY_Z.js} +1 -1
- package/components/{localized-mixin-Bt25Frg1.cjs → localized-mixin-DceE4W-d.cjs} +1 -1
- package/components/{marker-map-positioning.config-C0V5LZG-.cjs → marker-map-positioning.config-BGDRklk5.cjs} +1 -1
- package/components/{marker-map-positioning.config-BJGwlWKz.js → marker-map-positioning.config-DouILqTQ.js} +1 -1
- package/components/nl-BFAURMxk.cjs +20 -0
- package/components/{nl-TUFktGm6.js → nl-Cs2_7YBI.js} +4 -0
- package/components/{ohlc-chart-positioning.config-CFvbZzCR.js → ohlc-chart-positioning.config-Bcpj8NAt.js} +1 -1
- package/components/{ohlc-chart-positioning.config-Bu1_IBVK.cjs → ohlc-chart-positioning.config-CHJbhqWA.cjs} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-Bc3qCyxq.js → parallel-coordinates-plot-positioning.config-BRPawZLg.js} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-EJz1XA1k.cjs → parallel-coordinates-plot-positioning.config-CnyUP9E-.cjs} +1 -1
- package/components/{pivot-table-positioning.config-Bay8gxV-.js → pivot-table-positioning.config-8rROPmIw.js} +1 -1
- package/components/{pivot-table-positioning.config-CMzGb-BR.cjs → pivot-table-positioning.config-BvD825Uc.cjs} +1 -1
- package/components/{pyramid-chart-positioning.config-BUSeYxYH.js → pyramid-chart-positioning.config-CqL_Z0Ok.js} +1 -1
- package/components/{pyramid-chart-positioning.config-CrU2vKM-.cjs → pyramid-chart-positioning.config-DKd65Pdf.cjs} +1 -1
- package/components/{radar-chart-positioning.config-DOLpdn-d.js → radar-chart-positioning.config-CpYbMIeY.js} +1 -1
- package/components/{radar-chart-positioning.config-BEzqTXyr.cjs → radar-chart-positioning.config-oPyZCdrF.cjs} +1 -1
- package/components/{route-map-positioning.config-BgjizdWh.cjs → route-map-positioning.config-BCOVbseo.cjs} +1 -1
- package/components/{route-map-positioning.config-Brg6_eCi.js → route-map-positioning.config-DPspLTzr.js} +1 -1
- package/components/{sankey-diagram-positioning.config-DJlWiNYL.js → sankey-diagram-positioning.config-BVNDJhvU.js} +1 -1
- package/components/{sankey-diagram-positioning.config-vccTz1pG.cjs → sankey-diagram-positioning.config-Da0e_DAS.cjs} +1 -1
- package/components/{scatter-plot-positioning.config-BKqPHMrS.js → scatter-plot-positioning.config-DMZuAjXU.js} +1 -1
- package/components/{scatter-plot-positioning.config-D7uFFBVZ.cjs → scatter-plot-positioning.config-vR2_9XYh.cjs} +1 -1
- package/components/{set-locale-s-1X7Jce.js → set-locale-B9greCq4.js} +4 -4
- package/components/{set-locale-Bgz1WNGE.cjs → set-locale-BkbSlaQk.cjs} +1 -1
- package/components/{slicer-filter-positioning.config-D1kR4xly.cjs → slicer-filter-positioning.config-Byf9Q8gT.cjs} +1 -1
- package/components/{slicer-filter-positioning.config-Gl9jhO_G.js → slicer-filter-positioning.config-CzzuCQDP.js} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +1 -1
- package/components/{slot-menu-Dw53Y-iu.js → slot-menu-BAtOYWxs.js} +3 -3
- package/components/{slot-menu-CAhxaK5-.cjs → slot-menu-C_iIcdDw.cjs} +1 -1
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +1 -1
- package/components/{slot-menu-list-5NsRo9XD.js → slot-menu-list-DoRLtT2d.js} +1 -1
- package/components/{slot-menu-list-CUsmYkiV.cjs → slot-menu-list-K4_pghrC.cjs} +1 -1
- package/components/{speedometer-chart-positioning.config-fa90zZdb.cjs → speedometer-chart-positioning.config-DfnWIx7U.cjs} +1 -1
- package/components/{speedometer-chart-positioning.config-VBLrLNmO.js → speedometer-chart-positioning.config-DsCodDVP.js} +1 -1
- package/components/{spike-map-positioning.config-DrxdeFsj.cjs → spike-map-positioning.config-DPbVWLF7.cjs} +1 -1
- package/components/{spike-map-positioning.config-oYjk3n9a.js → spike-map-positioning.config-sSSQuxIm.js} +1 -1
- package/components/{strip-plot-positioning.config-lMn33cM4.js → strip-plot-positioning.config-C01KV7Er.js} +1 -1
- package/components/{strip-plot-positioning.config-Bx_fqmEj.cjs → strip-plot-positioning.config-Czz4B-U5.cjs} +1 -1
- package/components/{sunburst-chart-positioning.config-C-We-zZF.js → sunburst-chart-positioning.config-C4u-zAIV.js} +1 -1
- package/components/{sunburst-chart-positioning.config-D-GRWmyF.cjs → sunburst-chart-positioning.config-g8eXAhP4.cjs} +1 -1
- package/components/{symbol-map-positioning.config-B0sLlLzK.cjs → symbol-map-positioning.config-Be2wvwUD.cjs} +1 -1
- package/components/{symbol-map-positioning.config-_TJSfpVj.js → symbol-map-positioning.config-CRZwvQS5.js} +1 -1
- package/components/{treemap-chart-positioning.config-CO05Gv7X.cjs → treemap-chart-positioning.config-CvMw2lMe.cjs} +1 -1
- package/components/{treemap-chart-positioning.config-DAdvoS2I.js → treemap-chart-positioning.config-Dq1nuvca.js} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/{utils-CGJh0jrq.cjs → utils-Bkykodi1.cjs} +1 -1
- package/components/{utils-Dk4dM9xv.js → utils-C3-82TMs.js} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +2 -2
- package/components/{venn-diagram-positioning.config-DKXWVaUI.cjs → venn-diagram-positioning.config-CJbmXy8r.cjs} +1 -1
- package/components/{venn-diagram-positioning.config-DUwmPQ1A.js → venn-diagram-positioning.config-DoYvs8k_.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-CgbB_SI0.cjs → wordcloud-chart-positioning.config-BYz4mqOF.cjs} +1 -1
- package/components/{wordcloud-chart-positioning.config-qK5_CF7v.js → wordcloud-chart-positioning.config-C5gc4v7C.js} +1 -1
- package/custom-elements.json +180 -5
- package/package.json +1 -1
- package/react/components/ai-chat.component.ts +5 -2
- package/react/esm/components/ai-chat.component.d.ts +3 -1
- package/react/esm/components/ai-chat.component.js +3 -1
- package/react/luzmo-stub.d.ts +1 -0
- package/react/package.json +2 -2
- package/standalone/chunks/{add-to-dashboard-BrWieRxp.js → add-to-dashboard-BitIAbse.js} +1 -1
- package/standalone/chunks/{base-CLcNr-fQ.js → base-DetXzglI.js} +1 -1
- package/standalone/chunks/de-DasXCtPF.js +2 -0
- package/standalone/chunks/{display-settings-binning-B_lKObyP.js → display-settings-binning-D7udCQZB.js} +1 -1
- package/standalone/chunks/{display-settings-datetime-CTmJyEOX.js → display-settings-datetime-DoDqA4cJ.js} +1 -1
- package/standalone/chunks/{display-settings-grand-totals-IjcbBoyZ.js → display-settings-grand-totals-LZT2gYJu.js} +1 -1
- package/standalone/chunks/{display-settings-numeric-D9hvRtfN.js → display-settings-numeric-7Vq_f1D0.js} +1 -1
- package/standalone/chunks/{display-settings-period-over-period-Dnstsyqe.js → display-settings-period-over-period-CBjYIyKC.js} +1 -1
- package/standalone/chunks/es-cQV58zLc.js +2 -0
- package/standalone/chunks/{filters-CBmZhipt.js → filters-CF1JZIC1.js} +1 -1
- package/standalone/chunks/{formula-codemirror-D2F6Aj2h.js → formula-codemirror-DSKNnuLg.js} +1 -1
- package/standalone/chunks/fr-DzRE2NaZ.js +2 -0
- package/standalone/chunks/{item-option-action-button-group-BZyiRTfe.js → item-option-action-button-group-CM3q7mFJ.js} +1 -1
- package/standalone/chunks/{item-option-base-Bk5qxdcQ.js → item-option-base-BoBGd2zN.js} +1 -1
- package/standalone/chunks/{item-option-color-palette-picker-O8kT0i8p.js → item-option-color-palette-picker-BTGLKRU6.js} +1 -1
- package/standalone/chunks/{item-option-color-picker-CUTCc_yN.js → item-option-color-picker-WIaAaoWa.js} +1 -1
- package/standalone/chunks/{item-option-color-range-DsKPvjLj.js → item-option-color-range-DP8KXyD7.js} +1 -1
- package/standalone/chunks/{item-option-guidelines-CZyvhgtN.js → item-option-guidelines-CvvRU02d.js} +1 -1
- package/standalone/chunks/{item-option-multi-language-field-DlC-cCD7.js → item-option-multi-language-field-DOc_5pUa.js} +1 -1
- package/standalone/chunks/{item-option-number-field-BW9VpN9_.js → item-option-number-field-fj7jIBZ4.js} +1 -1
- package/standalone/chunks/{item-option-panel-BXA3sIYG.js → item-option-panel-C1GmQ9SW.js} +2 -2
- package/standalone/chunks/{item-option-picker-B2KmO7a6.js → item-option-picker-D0d0BXk7.js} +1 -1
- package/standalone/chunks/{item-option-position-picker-C9C9SKDD.js → item-option-position-picker-BpYLyMS7.js} +1 -1
- package/standalone/chunks/{item-option-positions-number-field-C2ahVlxe.js → item-option-positions-number-field-p6ghB0uD.js} +1 -1
- package/standalone/chunks/{item-option-radio-button-group-2q3doUXH.js → item-option-radio-button-group-DinqecBS.js} +1 -1
- package/standalone/chunks/{item-option-slider-C7TT3CqL.js → item-option-slider--YXct33p.js} +1 -1
- package/standalone/chunks/{item-option-switch-CZR2_Bs9.js → item-option-switch-BRuMJhT2.js} +1 -1
- package/standalone/chunks/{item-option-text-field-DBUOD_fv.js → item-option-text-field-Cvu0fi5x.js} +1 -1
- package/standalone/chunks/{item-slot-picker-panel-CTePASjI.js → item-slot-picker-panel-4ATGR7nP.js} +58 -62
- package/standalone/chunks/{load-data-fields-for-datasets-CPf_Q7p4.js → load-data-fields-for-datasets-DWys6Xqn.js} +1 -1
- package/standalone/chunks/{load-formula-codemirror-CA7NW4Zq.js → load-formula-codemirror-BP6dGYyV.js} +1 -1
- package/standalone/chunks/{localized-mixin-DN2aV3CC.js → localized-mixin-D3GVo182.js} +1 -1
- package/standalone/chunks/nl-Bzvdbvjs.js +2 -0
- package/standalone/interactive-viz-item.js +1 -1
- package/standalone/item-grid.js +1 -1
- package/standalone/manifest.json +33 -33
- package/types/ai-chat.types.d.ts +39 -2
- package/components/ai-chat-DfuJOWao.cjs +0 -338
- package/components/de-CjQMTFtl.cjs +0 -20
- package/components/display-settings-B2V_F_CU.cjs +0 -142
- package/components/es-DmmTP7D0.cjs +0 -20
- package/components/filters-C8xz8DV-.cjs +0 -199
- package/components/fr-DKDPLLAZ.cjs +0 -20
- package/components/item-grid-item-actions-menu-C3BUxZJc.cjs +0 -52
- package/components/item-option-guidelines-CmPaMdqb.cjs +0 -135
- package/components/nl-BrjaaktE.cjs +0 -20
- package/standalone/chunks/de-BtQ1ecN1.js +0 -2
- package/standalone/chunks/es-CAWreooi.js +0 -2
- package/standalone/chunks/fr-BG0nQk8g.js +0 -2
- package/standalone/chunks/nl-BXPduS2Q.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import{n as e,t}from"./localized-mixin-
|
|
2
|
+
import{n as e,t}from"./localized-mixin-D3GVo182.js";import{n}from"./lit-localize-CIGP-NUw.js";import{t as r}from"./localized-decorator-Buib6Rq1.js";import{n as i,t as a}from"./luzmoCheckbox-BksyONqE.js";import{n as o,r as s,t as c}from"./base-DetXzglI.js";import{t as l}from"./task-CNp3cEJA.js";import{r as u,t as d}from"./formatter-B7zz6UOp.js";import{i as f,r as p,t as m}from"./periods.const-Cie50jR4.js";import{html as h,property as g,query as _,unsafeCSS as v}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/progress-circle.js";var y={"~":()=>n(`Auto`,{desc:`Automatic setting of the option`}),"/":()=>`/`,"-":()=>`-`,".":()=>`.`},b=`:host{font-family:var(--luzmo-display-settings-datetime-font-family,var(--luzmo-font-family))}: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-datetime-gap,var(--display-settings-datetime-gap));display:flex}:host{--display-settings-datetime-example-font-size:var(--luzmo-font-size-s);--display-settings-datetime-example-color:var(--luzmo-font-color);--display-settings-datetime-example-label-font-weight:bold;--display-settings-datetime-example-label-color:var(--luzmo-primary);--display-settings-datetime-example-language-color:var(--luzmo-primary);--display-settings-datetime-gap:var(--luzmo-spacing-3);--display-settings-datetime-example-height:var(--luzmo-component-height)}:host([size=s]){--display-settings-datetime-gap:var(--luzmo-spacing-3);--display-settings-datetime-example-height:var(--luzmo-component-height-s);--display-settings-datetime-example-font-size:var(--luzmo-font-size-s)}:host([size=l]){--display-settings-datetime-gap:var(--luzmo-spacing-4);--display-settings-datetime-example-height:var(--luzmo-component-height-l);--display-settings-datetime-example-font-size:var(--luzmo-font-size)}:host([size=xl]){--display-settings-datetime-gap:var(--luzmo-spacing-5);--display-settings-datetime-example-height:var(--luzmo-component-height-xl);--display-settings-datetime-example-font-size:var(--luzmo-font-size-l)}`,x=class extends t(o(s,{validSizes:Object.values(c)})){constructor(...e){super(...e),this._loadLocaleFormatsConfig=new l(this,{task:async([e])=>{if(e&&e!==this._contentLanguageLoaded){let t=Object.assign({"../../utils/formatter/formats/cs.ts":()=>import(`./cs-DLnr3a23.js`),"../../utils/formatter/formats/da.ts":()=>import(`./da-BJgbo0uE.js`),"../../utils/formatter/formats/de.ts":()=>import(`./de-DPgYMyja.js`),"../../utils/formatter/formats/en-GB.ts":()=>import(`./en-GB-DnwmFNwC.js`),"../../utils/formatter/formats/en-US.ts":()=>import(`./en-US-BD2RCLuw.js`),"../../utils/formatter/formats/en.ts":()=>import(`./en-BD2RCLuw.js`),"../../utils/formatter/formats/es.ts":()=>import(`./es-Dp1UuDDz.js`),"../../utils/formatter/formats/fi.ts":()=>import(`./fi-CLQ6vC7V.js`),"../../utils/formatter/formats/fr.ts":()=>import(`./fr-D8xrUEX4.js`),"../../utils/formatter/formats/he.ts":()=>import(`./he-DHPb0VBo.js`),"../../utils/formatter/formats/hu.ts":()=>import(`./hu-BpaYooip.js`),"../../utils/formatter/formats/it.ts":()=>import(`./it-DWTvD2Xn.js`),"../../utils/formatter/formats/ja.ts":()=>import(`./ja-CtDlXHD1.js`),"../../utils/formatter/formats/ko.ts":()=>import(`./ko-CekuHU50.js`),"../../utils/formatter/formats/mk.ts":()=>import(`./mk-Dq3YK4jD.js`),"../../utils/formatter/formats/nl.ts":()=>import(`./nl-7csxtU-I.js`),"../../utils/formatter/formats/no.ts":()=>import(`./no-DJNRx8au.js`),"../../utils/formatter/formats/pl.ts":()=>import(`./pl-zDnuk9Gd.js`),"../../utils/formatter/formats/pt.ts":()=>import(`./pt-BEVAH5AJ.js`),"../../utils/formatter/formats/ru.ts":()=>import(`./ru-Ceji1Fqk.js`),"../../utils/formatter/formats/sv.ts":()=>import(`./sv-CgssnOqA.js`),"../../utils/formatter/formats/tr.ts":()=>import(`./tr-i3G2sFi4.js`),"../../utils/formatter/formats/zh-CN.ts":()=>import(`./zh-CN-NVnv57dz.js`),"../../utils/formatter/formats/zh-TW.ts":()=>import(`./zh-TW-NVnv57dz.js`)});if(t[`../../utils/formatter/formats/${e}.ts`]){let n=await t[`../../utils/formatter/formats/${e}.ts`]();this._localeFormats=n?.default??{}}return this._contentLanguageLoaded=e,this._localeFormats}},args:()=>[this.contentLanguage]}),this.contentLanguage=`en`,this.size=`m`,this.slotContent={},this._dateLevel=5,this._displayAs=`default`,this._weekStart=`monday`,this._weekDayAndMonthInYearFormat=`long`,this._dateFormat=`auto`,this._dateSeparator=`~`,this._sendEvent=()=>{this._calculateSlotContent(),this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:this._currentSlotContent}}))}}static get styles(){return[v(b)]}_parseSlotContent(){this._dateLevel=this.slotContent?.level??this.slotContent?.lowestLevel??5,this._displayAs=this.slotContent?.datetimeDisplayMode??`default`,this._displayAs===`weekday_number`&&(this._displayAs=`day_in_week`,this._weekDayAndMonthInYearFormat=`number`),this._displayAs===`weekday_name`&&(this._displayAs=`day_in_week`),this._displayAs===`month_number`&&(this._displayAs=`month_in_year`,this._weekDayAndMonthInYearFormat=`number`),this._displayAs===`month_name`&&(this._displayAs=`month_in_year`),this._parseSavedFormat()}_parseSavedFormat(){let e=this.slotContent?.format??`%d-%m-%Y`,t=e.match(/[./-]/);if(this._dateSeparator=e.includes(`~`)?`~`:t?.[0]??`~`,e.includes(`%amd`))this._dateFormat=`auto`;else{let t=e.indexOf(`%d`),n=e.indexOf(`%m`);t!==-1&&n!==-1&&(this._dateFormat=t<n?`ddmm`:`mmdd`)}this._24hFormat=e.includes(`%H`),this._monthName=/%B|%b/.test(e),this._weekDay=/%a|%A/.test(e),this._monthName&&(this._monthNameFormat=e.includes(`%b`)?`short`:`long`),this._weekDay&&(this._weekDayAndMonthInYearFormat=e.includes(`%a`)?`short`:`long`);let n=this._dateLevel===5&&this.slotContent?.weekDayNameFormat||this._dateLevel===3&&this.slotContent?.monthNameFormat;n&&(this._weekDayAndMonthInYearFormat=n)}_calculateFormat(){let e,t=this._localeFormats?.smartDateFormats??u;this._monthName?(e=t.filter(e=>e.monthType===`name`&&e.longText===(this._monthNameFormat===`long`)&&e.weekday===this._weekDay),e.length>0?this._format=e[0].key:(this._weekDayAndMonthInYearFormat=`short`,this._weekDay=!0,this._format=`%a %e %B %Y`)):(e=this._dateLevel&&this._dateLevel===4?t.filter(e=>e.monthType===`number`&&e.mmdd===(this._weekFormat===`mmdd`||this._weekFormat!==`ddmm`&&null)&&e.separator===this._dateSeparator):t.filter(e=>e.monthType===`number`&&e.mmdd===(this._dateFormat===`mmdd`||this._dateFormat!==`ddmm`&&null)&&e.separator===this._dateSeparator),this._dateFormat===`auto`&&this._dateLevel&&this._dateLevel!==4?this._format=`%amd`+this._dateSeparator+`%Y`:e.length>0?this._format=e[0].key:(this._dateFormat=`ddmm`,this._dateSeparator=`/`,this._format=`%d/%m/%Y`)),this._dateLevel&&this._dateLevel>5&&(this._format+=this._24hFormat?` %H:%M:%S.%L`:` %I:%M:%S.%L %p`)}_setWeekStartsOn(){this._weekStart=this._weekStartElement.value,this._sendEvent(),this.requestUpdate()}_setDisplayAs(){this._displayAs=this._displayAsElement.value,this._sendEvent(),this.requestUpdate()}_setWeekdayAndMonthInYearFormat(){this._weekDayAndMonthInYearFormat=this._weekDayAndMonthInYearFormatElement.selected?.[0]??`long`,this._sendEvent(),this.requestUpdate()}_setMonthNameFormat(){this._monthNameFormat=this._monthNameFormatElement.selected?.[0],this._sendEvent(),this.requestUpdate()}_setMonthName(){this._monthName=this._monthNameElement.selected,this._sendEvent(),this.requestUpdate()}_setWeekFormat(){this._weekFormat=this._weekFormatElement.selected?.[0],this._sendEvent(),this.requestUpdate()}_setDateFormat(){this._dateFormat=this._dateFormatElement.value,this._sendEvent(),this.requestUpdate()}_setDateSeparator(){this._dateSeparator=this._dateSeparatorElement.value,this._sendEvent(),this.requestUpdate()}_set24hFormat(){this._24hFormat=this._format24hElement.selected,this._sendEvent(),this.requestUpdate()}_setWeekday(){this._weekDay=this._weekDayElement.selected,this._sendEvent(),this.requestUpdate()}_calculateSlotContent(){this._currentSlotContent={...this.slotContent},this._calculateFormat(),this._currentSlotContent.format=this._format,this._displayAs==="default"?delete this._currentSlotContent.datetimeDisplayMode:(this._currentSlotContent.datetimeDisplayMode=this._displayAs,this._displayAs===`week_in_year`?this._currentSlotContent.datetimeDisplayMode=this._weekDayAndMonthInYearFormat===`number`?`week_number`:`week_name`:this._displayAs===`month_in_year`?this._currentSlotContent.datetimeDisplayMode=this._weekDayAndMonthInYearFormat===`number`?`month_number`:`month_name`:this._displayAs===`day_in_week`&&(this._currentSlotContent.datetimeDisplayMode=this._weekDayAndMonthInYearFormat===`number`?`weekday_number`:`weekday_name`,this._currentSlotContent.weekStart=this._weekStart),this._weekDayAndMonthInYearFormat&&(this._dateLevel===3?this._currentSlotContent.monthNameFormat=this._weekDayAndMonthInYearFormat:this._dateLevel===5&&(this._currentSlotContent.weekDayNameFormat=this._weekDayAndMonthInYearFormat)))}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._parseSlotContent(),this._calculateSlotContent())}_renderDisplaySettings(){let e=m?.[`level${this._dateLevel??0}`]?.map(e=>h`<luzmo-menu-item value=${e.key}>
|
|
3
3
|
${e.i18n()}
|
|
4
4
|
</luzmo-menu-item>`);return h`<div class="setting">
|
|
5
5
|
<luzmo-field-label .size=${this.size} for="display-as"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import{n as e,t}from"./localized-mixin-
|
|
2
|
+
import{n as e,t}from"./localized-mixin-D3GVo182.js";import{n}from"./lit-localize-CIGP-NUw.js";import{t as r}from"./localized-decorator-Buib6Rq1.js";import{n as i,t as a}from"./luzmoCheckbox-BksyONqE.js";import{n as o,r as s,t as c}from"./base-DetXzglI.js";import{html as l,ifDefined as u,property as d,state as f,unsafeCSS as p}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/icon.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-grand-totals-gap,var(--display-settings-grand-totals-gap));display:flex}:host,:host([size=s]){--display-settings-grand-totals-gap:var(--luzmo-spacing-3)}:host([size=l]){--display-settings-grand-totals-gap:var(--luzmo-spacing-4)}:host([size=xl]){--display-settings-grand-totals-gap:var(--luzmo-spacing-5)}`,h=class extends t(o(s,{validSizes:Object.values(c)})){constructor(...e){super(...e),this.slotContent={}}static get styles(){return[p(m)]}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._enabled=this.slotContent?.grandTotals?.enabled??!1)}toggleGrandTotals(){this._enabled=!this._enabled,this.sendEvent()}sendEvent(){let e={enabled:!!this._enabled};this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:{...this.slotContent,grandTotals:e}}}))}render(){return l`<div class="settings-container">
|
|
3
3
|
<div class="settings-row">
|
|
4
4
|
<div class="setting">
|
|
5
5
|
<luzmo-field-label .size=${this.size} for="grand-totals"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import{n as e,t}from"./localized-mixin-DN2aV3CC.js";import{n}from"./lit-localize-CIGP-NUw.js";import{t as r}from"./localized-decorator-Buib6Rq1.js";import{t as i}from"./luzmoAngleDown-PNrItYzK.js";import{a,t as o}from"./calculate-data-field-icon-CrEVAfzJ.js";import{t as s}from"./luzmo-icon-markup-27PRW8QM.js";import{n as c,r as l,t as u}from"./base-CLcNr-fQ.js";import{t as d}from"./localize-BXHWaHdZ.js";import{t as f}from"./decompose-numeric-format-BXLQ97e2.js";import{html as p,nothing as m,property as h,query as g,state as _,unsafeCSS as v}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/number-field.js";import{removeSlottableRequest as y}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/tooltip.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/menu.js";var b=`: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-numeric-gap,var(--display-settings-numeric-gap));display:flex}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start,var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{white-space:nowrap;text-overflow:ellipsis;text-transform:uppercase;max-width:100%;color:var(--luzmo-font-color);white-space:nowrap;cursor:default;margin:.5rem 1rem;font-weight:600;overflow:hidden}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{width:auto;font-size:.75em;line-height:1;position:absolute;bottom:45%;left:60%}.data-icon-type{text-align:center;width:1.5rem;display:inline-block;position:relative}:host{--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-2)}:host([size=s]){--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-1)}:host([size=l]){--display-settings-numeric-gap:var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-3)}:host([size=xl]){--display-settings-numeric-gap:var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-4)}`,x={sum:()=>n(`Sum`,{desc:`Aggregation label`}),cumulativesum:()=>n(`Cumulative sum`,{desc:`Aggregation label`}),average:()=>n(`Average`,{desc:`Aggregation label`}),median:()=>n(`Median`,{desc:`Aggregation label`}),count:()=>n(`Count rows`,{desc:`Aggregation label`}),distinctcount:()=>n(`Count distinct`,{desc:`Aggregation label`}),min:()=>n(`Minimum`,{desc:`Aggregation label`}),max:()=>n(`Maximum`,{desc:`Aggregation label`}),stddev:()=>n(`Standard deviation`,{desc:`Aggregation label`}),rate:()=>n(`Rate`,{desc:`Aggregation label`})},S={general:`123`,percentage:`%`,scientific:`SI`},C={time:()=>n(`Time`,{desc:`Time format option`}),short:()=>n(`Short`,{desc:`Short format option`}),long:()=>n(`Long`,{desc:`Long format option`})},w={Auto:{auto:!0,label:()=>n(`Auto`,{desc:`Automatic setting of the option`})},"1,000.00":{auto:!1,label:()=>`1,000.00`,thousandSeparator:`,`,decimalSeparator:`.`,hiddenFor:`scientific`},"1.000,00":{auto:!1,label:()=>`1.000,00`,thousandSeparator:`.`,decimalSeparator:`,`,hiddenFor:`scientific`},"1000.00":{auto:!1,label:()=>`1000.00`,decimalSeparator:`.`},"1000,00":{auto:!1,label:()=>`1000,00`,decimalSeparator:`,`}},T={levels:[{level:1,label:`years`},{level:2,label:`quarters`},{level:3,label:`months`},{level:4,label:`weeks`},{level:5,label:`days`},{level:6,label:`hours`},{level:7,label:`minutes`},{level:8,label:`seconds`},{level:9,label:`milliseconds`}]},E=class extends t(c(l,{validSizes:Object.values(u)})){constructor(...e){super(...e),this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._handleSlottableRequest=e=>{this._renderDurationLevelMenu=e.data!==y},this._sendEvent=()=>{let e={...this.slotContent,format:this._format,aggregationFunc:this._aggregationFunc};this._aggregationWeightColumn?e.aggregationWeight={...this._aggregationWeightColumn}:delete e.aggregationWeight,this._displayMode===`duration`?(e.duration=e.duration??{},e.duration.format=this._durationFormat,e.duration.levels=this._durationLevels):delete e.duration,this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:e}}))}}static get styles(){return[v(b)]}_parseSavedNumericFormatSettings(){if(this._displayMode=this.slotContent?.subtype===`duration`?`duration`:`numeric`,this._durationFormat=this.slotContent?.duration?.format??`short`,this._durationLevels=this.slotContent?.duration?.levels??[1],this._displayMode===`duration`)this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=this.slotContent?.format??`.0f`;let e=f(this._format??`.0f`);this._isAuto=e.typeFormat?.includes(`a`)??!1,[`%`,`a%`,`y`,`ay`].includes(e.typeFormat)?this._displayAs=`percentage`:[`s`,`as`,`w`,`aw`].includes(e.typeFormat)?this._displayAs=`scientific`:this._displayAs=`general`,this._precision=e.precision?Number.parseInt(e.precision.replace(`.`,``),10):+(this._displayAs===`scientific`),this._commaDecimals=[`z`,`az`,`y`,`ay`,`w`,`aw`].includes(e.typeFormat),this._thousandSeparator=e.comma===`,`,this._isAuto?this._numericFormatGroup=`Auto`:this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1.000,00`:!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1,000.00`:this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup=`1000,00`:!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup=`1000.00`)}}_setNumericDisplayAs(){this._displayAs=this._displayAsElement?.selected?.[0]??`general`,this._displayAs===`scientific`&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(e){let t=w[e?.detail??`Auto`];this._thousandSeparator=[`,`,`.`].includes(t?.thousandSeparator??``),this._commaDecimals=t?.decimalSeparator===`,`,this._isAuto=t?.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){Number.isNaN(this._precisionElement.value)&&(this._precisionElement.value=+(this._displayAs===`scientific`)),this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){let e=`f`,t=this.slotContent.subtype===`duration`?this._durationLevels&&this._durationLevels?.length===1?`numeric`:`duration`:`numeric`;if(this._maxDurationLevel=Math.min(...this._durationLevels),t===`duration`)(![`time`,`short`,`long`].includes(this._durationFormat??``)||this._maxDurationLevel<6&&this._durationFormat===`time`)&&(this._durationFormat=`short`);else{let t=this._displayAs??`general`;t===`general`&&this._commaDecimals?e=`z`:t===`percentage`&&this._commaDecimals?e=`y`:t===`scientific`&&this._commaDecimals?e=`w`:t===`percentage`?e=`%`:t===`scientific`&&(e=`s`),this._format=(this._thousandSeparator||this._isAuto?`,`:``)+`.`+this._precision+(this._isAuto?`a`:``)+e}}_setAggregationFunc(){let e=this._aggregationElement.value,t=this._aggregationFunc,n=this.slotContent.format;if(e!==(t===`weightedaverage`?`average`:t)){if(this._aggregationFunc=e===`average`&&this._aggregationWeightColumn?.column?`weightedaverage`:e,t===`rate`){let e=f(n),t=[`%`,`y`,`a%`,`ay`].includes(e.typeFormat);this.slotContent.subtype===`currency`&&t&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc===`rate`||t===`rate`)&&this.requestUpdate()}}_setAggregationWeight(){let e=this._aggregationWeightElement.value,t=this._aggregationFunc;if(e===`none`)this._aggregationWeightColumn=void 0,this._aggregationFunc===`weightedaverage`&&(this._aggregationFunc=`average`);else{let t,n;for(let r of this.measureColumns??[]){let i=r.columns?.find(t=>t.id===e);if(i){t=i,n=r.datasetId;break}}t&&(this._aggregationWeightColumn={column:t.id,set:n,columnSubType:t.subtype}),this._aggregationFunc===`average`&&(this._aggregationFunc=`weightedaverage`)}this._sendEvent(),this.requestUpdate(),(t===`weightedaverage`&&this._aggregationFunc===`average`||t===`average`&&this._aggregationFunc===`weightedaverage`)&&this.requestUpdate()}_setDurationLevels(){let e=this._durationLevels,t=this._durationLevelsElement.value.split(`,`).filter(e=>e!==``).map(e=>Number.parseInt(e,10));this._durationLevels=(t?.length??0)>=1?t:e,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){this._durationFormat=this._durationFormatElement?.selected?.[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat===`time`){let e=this._durationLevels.sort().at(-1);if([7,8,9].includes(e)){for(let t of{lev7:[6],lev8:[6,7],lev9:[6,7,8]}[`lev`+e])this._durationLevels.includes(t)||this._durationLevels.push(t);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=this.slotContent?.aggregationFunc??(this.slotContent?.type===`numeric`?`sum`:`count`),this._aggregationWeightColumn=this.slotContent?.aggregationWeight,this._isFormula=this.slotContent?.formula||this.slotContent?.formulaId)}_renderDurationLevelsSettings(){let e=T.levels.map(e=>{let t=!1;return this._durationFormat===`time`&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(t=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(t=!0),p`<luzmo-menu-item
|
|
2
|
+
import{n as e,t}from"./localized-mixin-D3GVo182.js";import{n}from"./lit-localize-CIGP-NUw.js";import{t as r}from"./localized-decorator-Buib6Rq1.js";import{t as i}from"./luzmoAngleDown-PNrItYzK.js";import{a,t as o}from"./calculate-data-field-icon-CrEVAfzJ.js";import{t as s}from"./luzmo-icon-markup-27PRW8QM.js";import{n as c,r as l,t as u}from"./base-DetXzglI.js";import{t as d}from"./localize-BXHWaHdZ.js";import{t as f}from"./decompose-numeric-format-BXLQ97e2.js";import{html as p,nothing as m,property as h,query as g,state as _,unsafeCSS as v}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/number-field.js";import{removeSlottableRequest as y}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/tooltip.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/menu.js";var b=`: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-numeric-gap,var(--display-settings-numeric-gap));display:flex}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start,var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{white-space:nowrap;text-overflow:ellipsis;text-transform:uppercase;max-width:100%;color:var(--luzmo-font-color);white-space:nowrap;cursor:default;margin:.5rem 1rem;font-weight:600;overflow:hidden}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{width:auto;font-size:.75em;line-height:1;position:absolute;bottom:45%;left:60%}.data-icon-type{text-align:center;width:1.5rem;display:inline-block;position:relative}:host{--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-2)}:host([size=s]){--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-1)}:host([size=l]){--display-settings-numeric-gap:var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-3)}:host([size=xl]){--display-settings-numeric-gap:var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-4)}`,x={sum:()=>n(`Sum`,{desc:`Aggregation label`}),cumulativesum:()=>n(`Cumulative sum`,{desc:`Aggregation label`}),average:()=>n(`Average`,{desc:`Aggregation label`}),median:()=>n(`Median`,{desc:`Aggregation label`}),count:()=>n(`Count rows`,{desc:`Aggregation label`}),distinctcount:()=>n(`Count distinct`,{desc:`Aggregation label`}),min:()=>n(`Minimum`,{desc:`Aggregation label`}),max:()=>n(`Maximum`,{desc:`Aggregation label`}),stddev:()=>n(`Standard deviation`,{desc:`Aggregation label`}),rate:()=>n(`Rate`,{desc:`Aggregation label`})},S={general:`123`,percentage:`%`,scientific:`SI`},C={time:()=>n(`Time`,{desc:`Time format option`}),short:()=>n(`Short`,{desc:`Short format option`}),long:()=>n(`Long`,{desc:`Long format option`})},w={Auto:{auto:!0,label:()=>n(`Auto`,{desc:`Automatic setting of the option`})},"1,000.00":{auto:!1,label:()=>`1,000.00`,thousandSeparator:`,`,decimalSeparator:`.`,hiddenFor:`scientific`},"1.000,00":{auto:!1,label:()=>`1.000,00`,thousandSeparator:`.`,decimalSeparator:`,`,hiddenFor:`scientific`},"1000.00":{auto:!1,label:()=>`1000.00`,decimalSeparator:`.`},"1000,00":{auto:!1,label:()=>`1000,00`,decimalSeparator:`,`}},T={levels:[{level:1,label:`years`},{level:2,label:`quarters`},{level:3,label:`months`},{level:4,label:`weeks`},{level:5,label:`days`},{level:6,label:`hours`},{level:7,label:`minutes`},{level:8,label:`seconds`},{level:9,label:`milliseconds`}]},E=class extends t(c(l,{validSizes:Object.values(u)})){constructor(...e){super(...e),this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._handleSlottableRequest=e=>{this._renderDurationLevelMenu=e.data!==y},this._sendEvent=()=>{let e={...this.slotContent,format:this._format,aggregationFunc:this._aggregationFunc};this._aggregationWeightColumn?e.aggregationWeight={...this._aggregationWeightColumn}:delete e.aggregationWeight,this._displayMode===`duration`?(e.duration=e.duration??{},e.duration.format=this._durationFormat,e.duration.levels=this._durationLevels):delete e.duration,this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:e}}))}}static get styles(){return[v(b)]}_parseSavedNumericFormatSettings(){if(this._displayMode=this.slotContent?.subtype===`duration`?`duration`:`numeric`,this._durationFormat=this.slotContent?.duration?.format??`short`,this._durationLevels=this.slotContent?.duration?.levels??[1],this._displayMode===`duration`)this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=this.slotContent?.format??`.0f`;let e=f(this._format??`.0f`);this._isAuto=e.typeFormat?.includes(`a`)??!1,[`%`,`a%`,`y`,`ay`].includes(e.typeFormat)?this._displayAs=`percentage`:[`s`,`as`,`w`,`aw`].includes(e.typeFormat)?this._displayAs=`scientific`:this._displayAs=`general`,this._precision=e.precision?Number.parseInt(e.precision.replace(`.`,``),10):+(this._displayAs===`scientific`),this._commaDecimals=[`z`,`az`,`y`,`ay`,`w`,`aw`].includes(e.typeFormat),this._thousandSeparator=e.comma===`,`,this._isAuto?this._numericFormatGroup=`Auto`:this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1.000,00`:!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1,000.00`:this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup=`1000,00`:!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup=`1000.00`)}}_setNumericDisplayAs(){this._displayAs=this._displayAsElement?.selected?.[0]??`general`,this._displayAs===`scientific`&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(e){let t=w[e?.detail??`Auto`];this._thousandSeparator=[`,`,`.`].includes(t?.thousandSeparator??``),this._commaDecimals=t?.decimalSeparator===`,`,this._isAuto=t?.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){Number.isNaN(this._precisionElement.value)&&(this._precisionElement.value=+(this._displayAs===`scientific`)),this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){let e=`f`,t=this.slotContent.subtype===`duration`?this._durationLevels&&this._durationLevels?.length===1?`numeric`:`duration`:`numeric`;if(this._maxDurationLevel=Math.min(...this._durationLevels),t===`duration`)(![`time`,`short`,`long`].includes(this._durationFormat??``)||this._maxDurationLevel<6&&this._durationFormat===`time`)&&(this._durationFormat=`short`);else{let t=this._displayAs??`general`;t===`general`&&this._commaDecimals?e=`z`:t===`percentage`&&this._commaDecimals?e=`y`:t===`scientific`&&this._commaDecimals?e=`w`:t===`percentage`?e=`%`:t===`scientific`&&(e=`s`),this._format=(this._thousandSeparator||this._isAuto?`,`:``)+`.`+this._precision+(this._isAuto?`a`:``)+e}}_setAggregationFunc(){let e=this._aggregationElement.value,t=this._aggregationFunc,n=this.slotContent.format;if(e!==(t===`weightedaverage`?`average`:t)){if(this._aggregationFunc=e===`average`&&this._aggregationWeightColumn?.column?`weightedaverage`:e,t===`rate`){let e=f(n),t=[`%`,`y`,`a%`,`ay`].includes(e.typeFormat);this.slotContent.subtype===`currency`&&t&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc===`rate`||t===`rate`)&&this.requestUpdate()}}_setAggregationWeight(){let e=this._aggregationWeightElement.value,t=this._aggregationFunc;if(e===`none`)this._aggregationWeightColumn=void 0,this._aggregationFunc===`weightedaverage`&&(this._aggregationFunc=`average`);else{let t,n;for(let r of this.measureColumns??[]){let i=r.columns?.find(t=>t.id===e);if(i){t=i,n=r.datasetId;break}}t&&(this._aggregationWeightColumn={column:t.id,set:n,columnSubType:t.subtype}),this._aggregationFunc===`average`&&(this._aggregationFunc=`weightedaverage`)}this._sendEvent(),this.requestUpdate(),(t===`weightedaverage`&&this._aggregationFunc===`average`||t===`average`&&this._aggregationFunc===`weightedaverage`)&&this.requestUpdate()}_setDurationLevels(){let e=this._durationLevels,t=this._durationLevelsElement.value.split(`,`).filter(e=>e!==``).map(e=>Number.parseInt(e,10));this._durationLevels=(t?.length??0)>=1?t:e,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){this._durationFormat=this._durationFormatElement?.selected?.[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat===`time`){let e=this._durationLevels.sort().at(-1);if([7,8,9].includes(e)){for(let t of{lev7:[6],lev8:[6,7],lev9:[6,7,8]}[`lev`+e])this._durationLevels.includes(t)||this._durationLevels.push(t);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=this.slotContent?.aggregationFunc??(this.slotContent?.type===`numeric`?`sum`:`count`),this._aggregationWeightColumn=this.slotContent?.aggregationWeight,this._isFormula=this.slotContent?.formula||this.slotContent?.formulaId)}_renderDurationLevelsSettings(){let e=T.levels.map(e=>{let t=!1;return this._durationFormat===`time`&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(t=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(t=!0),p`<luzmo-menu-item
|
|
3
3
|
value=${e.level}
|
|
4
4
|
?selected=${this._durationLevels.includes(e.level)}
|
|
5
5
|
?disabled=${t}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import{n as e,t}from"./localized-mixin-
|
|
2
|
+
import{n as e,t}from"./localized-mixin-D3GVo182.js";import{n}from"./lit-localize-CIGP-NUw.js";import{t as r}from"./localized-decorator-Buib6Rq1.js";import{n as i,r as a,t as o}from"./base-DetXzglI.js";import{t as s}from"./localize-BXHWaHdZ.js";import{t as c}from"./decompose-numeric-format-BXLQ97e2.js";import{t as l}from"./period-over-period-condition.const-AC_onvUf.js";import{html as u,property as d,query as f,state as p,unsafeCSS as m}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/checkbox.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/menu.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/accordion.js";var h={none:()=>n(`None`),past:()=>n(`Past value`,{desc:`Period option`}),absoluteChange:()=>n(`Absolute change`,{desc:`Period option`}),percentageChange:()=>n(`% change`,{desc:`Period option`})},g=[{key:`periods`,i18n:()=>n(`Periods`,{desc:`Period option`})},{key:`years`,i18n:()=>n(`Years`,{desc:`Period option`})},{key:`quarters`,i18n:()=>n(`Quarters`,{desc:`Period option`})},{key:`months`,i18n:()=>n(`Months`,{desc:`Period option`})},{key:`weeks`,i18n:()=>n(`Weeks`,{desc:`Period option`})},{key:`days`,i18n:()=>n(`Days`,{desc:`Period option`})},{key:`hours`,i18n:()=>n(`Hours`,{desc:`Period option`})},{key:`minutes`,i18n:()=>n(`Minutes`,{desc:`Period option`})},{key:`seconds`,i18n:()=>n(`Seconds`,{desc:`Period option`})}],_=function(e){return e.Relative=`relative`,e.UserDefined=`user-defined`,e}({}),v=[{key:`relative`,i18n:()=>n(`Relative`,{desc:`Range type option`})},{key:`user-defined`,i18n:()=>n(`User-defined`,{desc:`Range type option`})}],y=`:host{font-family:var(--luzmo-display-settings-period-over-period-font-family,var(--luzmo-font-family));font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size));color:var(--luzmo-display-settings-period-over-period-color,var(--luzmo-font-color))}:host .settings-container{flex-direction:column;gap:0;display:flex}:host .settings-container:first-of-type{margin-right:var(--luzmo-spacing-4)}:host .settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-period-over-period-gap,var(--display-settings-period-over-period-gap));display:flex}:host .wrap{flex-wrap:wrap}:host .setting.period-number-setting{align-items:center;display:flex}:host .dynamic-settings-container{max-width:var(--luzmo-display-setting-period-over-period-dynamic-max-width,var(--display-setting-period-over-period-dynamic-max-width))}:host luzmo-accordion{--luzmo-accordion-item-content-area-top-to-content:0;--luzmo-accordion-item-content-padding-left:var(--luzmo-spacing-1);--luzmo-accordion-item-header-bottom-margin:0;--luzmo-accordion-item-content-area-bottom-to-content:var(--luzmo-spacing-2);--accordion-item-header-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size));--accordion-item-content-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}:host .label-container{align-items:center;gap:var(--luzmo-spacing-2);display:flex}:host .academy-link{color:var(--luzmo-link-color);font-size:var(--luzmo-font-size-s);margin-left:var(--luzmo-spacing-2);text-decoration:none}:host .academy-link:hover{color:var(--luzmo-link-color-hover)}:host(:focus){--luzmo-menu-item-label-icon-color-focus:var(--luzmo-menu-item-label-icon-color-focus,var(--luzmo-font-color))}luzmo-menu-item{--luzmo-menu-item-tooltip-font-size:var(--luzmo-display-settings-tooltip-font-size)}luzmo-checkbox{--checkbox-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}luzmo-picker{--picker-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}luzmo-number-field{--text-field-placeholder-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size));--stepper-button-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}:host{--display-settings-period-over-period-gap:var(--luzmo-spacing-3);--display-settings-period-over-period-font-size:var(--luzmo-font-size);--display-setting-period-over-period-dynamic-max-width:22rem}:host([size=xs]){--display-settings-period-over-period-gap:var(--luzmo-spacing-2);--display-settings-period-over-period-font-size:var(--luzmo-font-size-xs);--display-setting-period-over-period-dynamic-max-width:17rem}:host([size=s]){--display-settings-period-over-period-gap:var(--luzmo-spacing-3);--display-settings-period-over-period-font-size:var(--luzmo-font-size-s);--display-setting-period-over-period-dynamic-max-width:19rem}:host([size=l]){--display-settings-period-over-period-gap:var(--luzmo-spacing-4);--display-settings-period-over-period-font-size:var(--luzmo-font-size-l);--display-setting-period-over-period-dynamic-max-width:26rem}:host([size=xl]){--display-settings-period-over-period-gap:var(--luzmo-spacing-5);--display-settings-period-over-period-font-size:var(--luzmo-font-size-xl);--display-setting-period-over-period-dynamic-max-width:30rem}`,b=class extends t(i(a,{validSizes:Object.values(o)})){constructor(...e){super(...e),this.slotContent={},this.allowPeriodsWithoutDatetimeColumn=!1,this.hidePastValue=!1,this.linkedDatasetDatetimeColumns=[],this.needsOffsetDatetimeColumn=()=>this.periodOverPeriodUiType===l.NoDatetimeColumnButComparisonFilters||this.periodOverPeriodUiType===l.NoDatetimeColumnAndNoComparisonFilters}static get styles(){return[m(y)]}willUpdate(e){if(super.willUpdate(e),e.has(`slotContent`)){this._periodComparison=this.slotContent?.periodOverPeriod?.type,this._numberPeriods=this.slotContent?.periodOverPeriod?.quantity;let e=this.slotContent?.periodOverPeriod?.level;this._periodLevel=typeof e==`number`&&e>=0&&e<g.length?g[e].key:this.slotContent?.periodOverPeriod?.level||`periods`,this._incompletePeriods=this.slotContent?.periodOverPeriod?.periodToDate,this._offsetDateColumn=this.slotContent?.periodOverPeriod?.offsetDateColumn,this._minLevel=this.slotContent?.periodOverPeriod?.minLevel??this.slotContent?.periodOverPeriod?.offsetDateColumn?.lowestLevel??this.slotContent?.lowestLevel??(this.slotContent?.subtype===`date`?5:9),this._rangeType=this.slotContent?.periodOverPeriod?.rangeType}this._periodComparison=this._periodComparison??`none`,this._numberPeriods=this._numberPeriods??1,this._periodLevel=this._periodLevel??`periods`,this._incompletePeriods=this._incompletePeriods??!1,this._minLevel=this._minLevel??9,this._rangeType=this._rangeType??_.Relative,this._offsetDateColumn=this._offsetDateColumn||void 0}setPeriodComparison(){let e={...this.slotContent};this.setInitialOffsetDateColumn(e),this._periodComparison=this._periodComparisonElement.value;let t=c(this.slotContent?.format),n=[`%`,`y`,`a%`,`ay`].includes(t.typeFormat),r=t.typeFormat.includes(`a`),i=r?`a`:``,a=t.comma===`,`||r?`,`:``,o=t.precision?Number.parseInt(t.precision.replace(`.`,``),10):0,s=[`z`,`az`,`y`,`ay`,`w`,`aw`].includes(t.typeFormat);this._periodComparison===`percentageChange`&&n&&(e.format=`${a}.${o}${i}${s?`z`:`f`}`),this.sendEvent(e)}setNumberOfPeriods(){this._numberPeriods=Number.parseInt(this._numberPeriodsElement.value,10);let e={...this.slotContent};this.sendEvent(e)}setPeriodLevel(){this._periodLevel=this._periodLevelElement.value;let e={...this.slotContent};this.sendEvent(e)}setOffsetDateColumn(){this._offsetDateColumn=this.linkedDatasetDatetimeColumns.find(e=>e.id===this._offsetDateColumnElement.value);let e={...this.slotContent};this.sendEvent(e)}setIncompletePeriods(){this._incompletePeriods=this._incompletePeriodsElement.checked;let e={...this.slotContent};this.sendEvent(e)}setRangeType(e){this._rangeType=e;let t={...this.slotContent};this.setInitialOffsetDateColumn(t),this.sendEvent(t)}sendEvent(e){let t={...e},n=g.findIndex(e=>e.key===this._periodLevel);t.periodOverPeriod={...e.periodOverPeriod,type:this._periodComparison,level:Math.max(n,0),quantity:this._numberPeriods,periodToDate:this._incompletePeriods,minLevel:this._minLevel,rangeType:this._rangeType,offsetDateColumn:this._offsetDateColumn},this._periodComparison===`none`&&delete t.periodOverPeriod,this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:t}}))}incompletePeriodsSetting(){return u`
|
|
3
3
|
<div class="settings-row">
|
|
4
4
|
<div class="setting">
|
|
5
5
|
<luzmo-checkbox
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{r as e}from"./lit-localize-CIGP-NUw.js";import{html as t}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";var n={"add-to-dashboard-cannot-create":`Estas credenciales no permiten crear paneles`,"add-to-dashboard-cannot-create-variant":`Estas credenciales no permiten crear variantes`,"add-to-dashboard-close":`Cerrar`,"add-to-dashboard-open":`Abrir`,"close-action":`Cerrar`,"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":`Fecha/hora`,"filter-parameter-type-datetime-list":`Fecha/hora[]`,"filter-parameter-type-hierarchy":`Jerarquía`,"filter-parameter-type-hierarchy-list":`Jerarquía[]`,"filter-parameter-type-numeric":`Numérico`,"filter-parameter-type-numeric-list":`Numérico[]`,"filter-range-tooltip":e`${0} y ${1}`,"filters-sentence-and":e`${0} ${1} ${2}`,"filters-sentence-or":e`${0} ${1} ${2}`,"filters-sentence-parentheses":e`(${0})`,"formula-datasets-list-title":`Datos`,"formula-function-label-coords":`Coordenadas`,hd267dd827599dcf9:t`Elemento copiado a ${0}`,"item-option-guidelines-add":`Añadir una línea de referencia`,"item-option-guidelines-color":e`Color de la línea de referencia ${0}`,"item-option-guidelines-group":`Líneas de referencia`,"item-option-guidelines-remove":e`Quitar la línea de referencia ${0}`,"item-option-guidelines-style-dashed":`Discontinuo`,"item-option-guidelines-style-dotted":`Punteado`,"item-option-guidelines-style-label":`Estilo`,"item-option-guidelines-style-solid":`Continuo`,"item-option-guidelines-type":e`Tipo de la línea de referencia ${0}`,"item-option-guidelines-type-average":`Promedio`,"item-option-guidelines-type-average-close":`Promedio de cierre`,"item-option-guidelines-type-average-open":`Promedio de apertura`,"item-option-guidelines-type-median":`Mediana`,"item-option-guidelines-type-value":`Valor`,"item-option-guidelines-value":e`Valor de la línea de referencia ${0}`,"item-option-guidelines-width-label":`Grosor`,"item-option-guidelines-width-medium":`Medio`,"item-option-guidelines-width-thick":`Grueso`,"item-option-guidelines-width-thin":`Fino`,"item-slot-picker-add":`Añadir`,s009465b850287447:`Agrega dentro de la agrupación actual del gráfico.`,s00decbd8fed4f501:`Máximo`,s0218a6cc95bc9386:`Tipo de rango`,s028474eff8e31453:`Menor que`,s039a88e04fc473cd:`Valor absoluto`,s03f199e48820b08d:`Número de Euler`,s0456d2ad905847d9:`último`,s053eb89714fe5c46:`Potencia`,s057ae6b694499f56:`Comprueba si el primer valor es mayor que el segundo valor.`,s06d28bae5a331115:`Devuelve verdadero cuando al menos una condición es verdadera.`,s06da33e39516b46f:`Diferencia entre fechas`,s07146695ed927fca:`Extrae la hora de un valor de fecha y hora en UTC.`,s071e55c416742716:`Abrir menú de restauración`,s078d4008a2a214b0:`Elimina los espacios iniciales y finales de una cadena.`,s079a052719914d71:`Categoría`,s07a43e5b2a8a7c58:e`${0} Segundos`,s07d754eb51a3ee43:`Espacial`,s088e3b07b5394bc3:`ig`,s08b26579c9f919a1:`O lógico`,s08fd2396ce8ea974:`Extrae el día del año de un valor de fecha o fecha y hora.`,s091d3407b5b2f824:`O`,s09243007b5b91006:`Si`,s09423f07b5d22712:`Pi`,s095140a7d22730b7:`Categorías`,s099b18e1bd8a1154:`Horas`,s09c2b609dff29061:`Suma acumulativa`,s0ae75c749c889c18:`Pantalla grande`,s0b5cefc4c510193d:`Rango de colores`,s0bb151c9319a6813:`Eje X`,s0bbcfb2797060663:`Devuelve verdadero cuando ambas condiciones son verdaderas.`,s0bca0c91195d8d6d:`cont`,s0d5513a64f3a46c5:`Añadir un campo de datos...`,s0d5c4bb195a222f8:`Cantidad`,s0e6fcbb074f690d0:`Añadir campo de datos`,s103d3df3b3fa6442:`Calcula el promedio de los valores.`,s10420672e643d2c7:`Ordenar ascendente`,s10d1e89ece01e6c7:`Respuesta mala`,s1111ebf7ea62fdd0:`Extrae el número de semana ISO 8601 (1-53) de un valor de fecha o fecha y hora.`,s1125d159f7e64df5:`Mostrar`,s11326fd2590f4e5e:`Por defecto`,s11502b46543c39e8:`Día del mes`,s11576cdb7730ddcc:`Devuelve la constante matemática pi.`,s122f7f3f1a22ea50:`no ig`,s125a86b2f45bbb25:e`${0} elementos`,s125fbff5d8958763:e`${0} (variante ${1})`,s13f5793e33ebda4f:`entre`,s146475c4daa430ed:`Decimales`,s14adc1b878842c4f:`Categoría de función`,s1525a3512765bd52:`Unidad de tiempo`,s1645aae5d87a87ae:`Cargando nombres de elementos`,s16a4e0f26328f69d:`Y lógico`,s16d507740d87045d:`Fórmula ad hoc`,s173bffc4bc8fdb40:`Número de trimestre`,s178b06f4d02cfd40:`no falta`,s17d0bcf0e62af81b:`Cargando el editor de fórmulas`,s1822bffc2ecbbc97:`Cargando columna`,s184501a399a815dc:`Trimestres`,s18498398aeb37b07:`La semana comienza el`,s187528426100c44e:`Sin datos`,s1bcab4b7e4a45f84:e`${0} Días`,s1c4b5bbb758f3bce:`Día del año (UTC)`,s1cdb6b07fe827486:`Número de semana`,s1d8604eae2ed4f70:`Devuelve el valor más grande.`,s1e13a3cc7c6f80c8:`Arcotangente`,s1e593719b55d60c0:`MTD`,s1e7745005c37315c:`Desplazamiento relativo`,s1ed6293b06ad5886:`Devuelve el seno de un ángulo en radianes.`,s1f0916624a87d415:`Día del año`,s1f7698c061c208c9:`Apertura`,s1f9ad180f44ebfed:`Extrae el minuto de un valor de fecha y hora.`,s2153d9eae4dcb251:`Tableta`,s21686b2b94deec80:`Devuelve la media aritmética de todos los valores de una columna numérica. El valor se calcula sobre todo el conjunto de datos y no cambia al filtrar.`,s2318e95167ae475f:`No se encontraron paneles`,s235c998e582f148b:`Extrae el número de semana ISO 8601 (1-53) de un valor de fecha o fecha y hora en UTC.`,s23a368c93d7e6a90:`Métrica del control deslizante`,s23c421a5960773e0:`Mostrar los 5 principales`,s24366bc5774f0d03:`Día del año`,s2454d1f117573457:`Precisión`,s247d110f13a3a288:`Día de la semana`,s24f3a319b88552c1:`Mínimo`,s25e13c6d08776558:`Activar/desactivar sincronización`,s26273c258ddde0e1:`Seleccionar...`,s268ecd1cef45a9a8:`¿Está seguro?`,s2695506122ffd614:`Segundo en el minuto`,s2718cebf7de190e1:`está entre`,s2798d16f4e04857e:`Minuto en la hora`,s28aa195f43c4318f:`Divide una cadena en partes mediante un delimitador. El primer argumento es el texto que se divide, el segundo el delimitador y el tercero la posición de la parte que se devuelve (empezando por 1).`,s2931f5506dbf5352:`Teléfono inteligente`,s2979b8c3da9caad6:`Arcoseno`,s2980eedca318d25d:`Agrupado`,s29e9a2758d0ffdc3:`Dimensión`,s2a391b3d81594d0f:`Igual`,s2a491fbfcd87f3b3:`Multiplicación`,s2b7239b5cae535c3:`Extrae el día del mes de un valor de fecha o fecha y hora.`,s2ba5f4d8f3bd7c57:`Orden`,s2c1836a2a5065f4d:`Devuelve el arcoseno de un número.`,s2c4f6b473cf22fbf:`Módulo`,s2c8189544e3ea679:`Reintentar`,s2ceb11be2290bb1b:`Cancelar`,s2d4d8b099a73e46a:`niveles`,s2dc1bbbe252415c7:`Redondea un número a un número especificado de decimales.`,s2dcbfb305c43f0d4:`Error al cargar la opción`,s2e47760dd1d017c9:e`${0} Trimestre`,s2ea38ce3da088075:`Períodos`,s2f56fa0428bad0c9:`Acciones del elemento`,s2f64461723d3df5d:`Cambiar`,s2f919a2f7a033efc:`Extrae el día de la semana (1-7, donde 1 es lunes) de un valor de fecha o fecha y hora en UTC.`,s2fa05f91c1baa29b:e`Eliminar ${0}`,s2fb2a49481123d6a:`Semanas`,s2fedf26ef08343d4:`es igual a`,s303f51ebddb596d4:`Menú del slot`,s319898f3495ff5ba:`Hora (UTC)`,s31f1afc1bfe1cb3a:`Saber más`,s33301138366e5381:`Redondea un número hacia arriba al entero más cercano.`,s33aff2834375cc26:`Suma todos los valores.`,s33f27edd976b2f5e:`Validando…`,s344ea8f4939cdc98:`Color`,s347ebd71e00fb5b4:`Resta el segundo valor del primer valor.`,s34e46e4e30ae57bd:`Ordenar descendente`,s354ae458a550da1f:`Destino`,s360896d6e6234cc4:`Actualizando elemento...`,s36352b65eb67e7ee:`Aún no hay variantes`,s36c3a657740756ff:`Recortar a la derecha`,s3723fa982dc948a8:`Devuelve el coseno de un ángulo en radianes.`,s377ac272aa3b8068:`Devuelve la posición de una subcadena en una cadena.`,s38ae79a1c10bdb7f:`Seno hiperbólico`,s3924c3d773a80312:`último disp`,s394212f423a47bf9:`Convertir valor`,s39817c5a1737a373:`Devuelve el arcocoseno de un número.`,s39fb2b49682b8c4b:`Cuenta el número de valores no vacíos.`,s3b3ea038c5d3bb06:`División`,s3c6455b19fb1c3e4:`Cambio absoluto`,s3ca5e1e377396e68:`Devuelve el logaritmo natural de un número.`,s3ceacffc8fe8d13f:e`${0} Años`,s3d4a4b3002d13785:`Año de la semana ISO (UTC)`,s3d4b0e9d53cf2672:`Buscar paneles`,s3dcf7b255596a2c3:`Desviación estándar`,s41f303448d636dfd:`Cuadrícula del panel`,s427be344bc32537d:`Devuelve la raíz cuadrada de un número.`,s430f8483cbea0e4b:e`${0} Minuto`,s43f1ffa8263b3f7b:`Redondear`,s4406e2a8264d6a3e:`Ruta`,s441accd1cd3484c9:`Minuto`,s44503fed5f4c6031:`Extrae el día de la semana (1-7, donde 1 es lunes) de un valor de fecha o fecha y hora.`,s463b8c4e92751ba5:`Opciones`,s46511d857f6f5e11:`Coseno hiperbólico`,s467b030b9a34b3c8:`Promedio`,s46a9060ed7649fb4:`Divide el primer valor numérico entre el segundo valor numérico.`,s475db7e53638454a:`Devuelve la tangente hiperbólica de un número.`,s48e186fb300e5464:`Tiempo`,s495360fad288b2a4:`Segundo (UTC)`,s496a1e26dce422f8:`Devuelve la constante de Euler e.`,s496c60f73bdf5725:`Agregación`,s49d3019369929330:`Devuelve la desviación estándar muestral sobre todos los valores de una columna numérica. El valor se calcula sobre todo el conjunto de datos y no cambia al filtrar.`,s4b30fad1c34464e1:`mayor o igual que`,s4b58c01e2578f5e4:`Leyenda`,s4bc7a46e7b0c01ef:`Devuelve el primer valor no nulo de los argumentos proporcionados.`,s4d1fe77d90575785:`Fecha y hora`,s4d7765546aa4f455:`Elimina los espacios finales de una cadena.`,s4dd9dd0ef75d9598:`Añadir o buscar columnas`,s4e585eeea351a038:`contiene`,s4efbcab48a433013:`Largo`,s4f27f6b48a68b5c2:`Bloquear`,s4f8a5da7750d1588:`Devuelve la tangente de un ángulo en radianes.`,s506186dc37c24a0e:`Validando fórmula`,s50d9e1b0c1636e99:`Geografía`,s510df80ecd8f51a7:`Respuesta buena`,s517acbf1f96324f9:`Peso`,s519d0aa80bbafd42:`semana hasta la fecha`,s5224b9208b08cd30:`Extrae parte de una cadena. El primer argumento es el texto, el segundo la posición inicial (el primer carácter es 1; una posición negativa cuenta desde el final) y el tercero la longitud.`,s541c944915996780:`Suma dos valores numéricos.`,s54877b3f807f6e06:`Comprueba si ambos valores son iguales.`,s558a7e3ce83cb164:`Niega una condición booleana.`,s5590dbf7e425789d:`Etiqueta`,s55e343865792fc47:`No se pueden recuperar los campos de datos del conjunto de datos`,s55f71f5d3158ed9f:`Entrada de prompt de IA`,s5608e6e8c2170d84:`Nuevo parámetro…`,s5690f0e39a862e0b:`Borrar cálculo`,s572efb51e9cfc967:`Actualizando panel...`,s5758683fdb7446a9:`Fecha de filtro`,s576d8c40acfa9a54:`Devuelve el coseno hiperbólico de un número.`,s579d6beb02efb9a5:`Agrega en todo el conjunto de datos, ignorando la agrupación del gráfico.`,s57ace73e7c6e719f:`no está en`,s58857c390f08335c:`Extrae el segundo de un valor de fecha y hora en UTC.`,s58b4b3ecd4eb6238:`Cadena`,s58bee799432dbc69:`Suma`,s58ec693e33483873:`menor que`,s5a1b300572f81f73:`Escritorio`,s5a801360c0e7cc6e:`Círculos`,s5b5005aae2ab472d:e`Eliminado: ${0}`,s5be6bc0a925a85f1:`Devuelve un valor cuando una condición es verdadera y otro valor cuando es falsa.`,s5d73a3b3b68e6cba:`Definido por el usuario`,s5d929ff1619ac0c9:`Buscar`,s5e2654fb8587f442:`Clonar`,s5e8250fb85d64c23:`Cierre`,s5f29630f7fdb50b0:`Conjuntos de datos`,s5f43af3669b1e098:`Origen`,s602805b1eb3106c6:`Eje Y`,s6031881827829901:`24h`,s60b34c3c17dc35bd:`Años`,s6361bdb1b0dc327b:`Número de períodos`,s63d894b1ddb06289:`Descripción`,s64cf39cd55309346:`Minúsculas`,s64ef2a6c2dd1d3d1:`Editar`,s65486fa6ebaf3b2a:`Completa todos los argumentos vacíos.`,s656dfdc68a98502e:`Funciones`,s6580790b036f0c6f:`activo`,s66722bc2ea775e05:`Desactivado`,s6683e715b4cc61e0:e`${0} Semanas`,s669b18c6d2d9c95b:`Ninguno`,s66dcbbc0355c2759:`Domingo`,s67a28499b3caab0c:`Mes (UTC)`,s680f01021b5e339d:`Semana`,s695f2b47ca303436:e`${0} Año`,s69a9123fdc3c03f8:`Menor o igual`,s6ab73c998850c5ab:`Expresión`,s6b0bffd88024372f:`Hora`,s6b28afa2144a0cea:`Convierte una cadena a mayúsculas.`,s6bcb74ae139e528d:`Modos de pantalla`,s6bdd437aa8c2a009:e`Mostrar ${0} conjuntos de datos seleccionados más`,s6d02dc19e21eb49c:`Superior`,s6d2c233e1a4f6a2c:`Añadir conjunto de datos`,s6d8207aee4786374:`Media`,s6de3d6e9660857a1:`Ejemplo`,s6dfd49b30943c586:`Devuelve el seno hiperbólico de un número.`,s708bbac083d05109:`no empieza con`,s709a09b6edea9d90:`Fecha/hora`,s70a773eb3133e5fa:`mes hasta la fecha`,s716a6024e3fe999c:`Mostrar`,s71a5c9f4b68ef4d4:`Recuento`,s736157452e7fc7af:`Algo salió mal. Por favor, inténtalo de nuevo.`,s7385537b8498510e:e`${0} Trimestres`,s74303ffcfb1f68e6:`Raíz cuadrada`,s7468e87263dfff7e:`Identificador`,s74dcd519e6563a26:`WTD`,s750a2c8ca7ec9e95:`Contenido del slot`,s7632fc9aa12bf382:`Meses`,s7649e65819d8abc7:`Configurar gráfico`,s7751dacf34111c3c:`Opciones del elemento`,s780ab9f06af63fd4:`Fecha y hora actuales`,s782f286a79cca35d:`Relativo`,s78789724e789221c:`Tamaño`,s78bc8724e7c2d3b8:`Seno`,s78c18075d35b088c:`Parámetros disponibles`,s7954072388ad1dc4:`Comparación`,s7a6878d41ffac284:`último completado`,s7c95876637f6a9d7:`Filtro`,s7cb5d294ed7634e3:`Conjunto de datos`,s7cd83983d844fac8:`Extrae el minuto de un valor de fecha y hora en UTC.`,s7d21b9b1ef84ec90:`Devuelve la diferencia entre dos fechas o fechas y horas en la unidad seleccionada. El primer argumento es la unidad ('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter' o 'year'); la diferencia se calcula desde la segunda fecha hacia la tercera fecha.`,s7d7c7f843b13e167:e`'${0}' no es una columna, función o valor válido.`,s7dacc1388e15a544:`Valores de posición`,s7e357543a7b769f4:`Columna de fecha de desplazamiento`,s81a08125e4bd1b33:`Condicional`,s846876f9b712e843:`no es igual a`,s850f14c3e45ab426:`Quitar parámetro`,s8569fc3ba6761d29:`Respuesta cancelada.`,s85c1c1fb529b7269:`Recortar`,s862f5319f0256b94:`QTD`,s8665d029b5cb8b24:`Totales generales`,s898a5d3aef872ea2:`Cambiar condición de filtro, actualmente `,s898eb5552843fe54:`Restaurar estado`,s8a03680664069fad:`Extrae el trimestre de un valor de fecha en UTC.`,s8a1d7a873b78d41e:`Extrae el mes de un valor de fecha o fecha y hora.`,s8a56a8c8bd19c9c7:`falta`,s8a95c598e5cc7abd:`Ancho fijo`,s8b1883cb3a3a94e2:`Más información (abre en nueva pestaña)`,s8ba2b22eee9bb57e:`Añadir filtro`,s8bb429cb2ed6e65b:`Devuelve el resto de dividir el primer valor entre el segundo valor.`,s8bd1517975b86680:`Creando panel...`,s8ce15f16e0d3a7a9:`No se pudieron recuperar algunos nombres de elementos`,s8d0259032729869d:`Segundo`,s8d77a3cb03eea446:`Cargando datos...`,s8de2a5b227e80c95:`(x) períodos o más atrás`,s8e66fedc4338fbc7:`Mover a “Agrupar siempre por”`,s8fc32fa2d814c088:`Comprueba si el primer valor es mayor o igual que el segundo valor.`,s90398d0f22360c50:`Devuelve el valor absoluto de un número.`,s9094c0cde8fb5058:`No se encontraron resultados`,s927497135cdabe78:`Sin título`,s92ab9b834d8fd1fc:`Subgrupo`,s92c8c8ca61f1e379:`Seleccionar conjunto de datos...`,s92dbc5a5a4a1d76c:`Está vacío`,s943bfb2ed5ca76e0:`Año de la semana ISO`,s94c08bd5d339f44d:e`${0} Hora`,s95ef9d52bd4d9973:`Tangente hiperbólica`,s965c503c3e42fdfe:`Activado`,s9689e928323dc124:`último (período) completado`,s979ed488f8afa660:`Aún no hay columnas seleccionadas`,s981f232bd33ec927:`Tasa`,s9854300ef4a37d18:`no termina en`,s986f3825f32ab7b2:`Recortar a la izquierda`,s987abe19fac8d108:`Suma`,s98b1cb8fb62909ec:`Grupo`,s98c337186f2d57c6:`Ancho del bin`,s98db41a3eb532203:`año hasta la fecha`,s991d216e6efc157c:`Sin resultados`,s993f1f0c740b7af9:`Pasa el cursor sobre una función o agregación para ver su descripción.`,s996319f23f6cf0b5:`termina en`,s99cd654f308718a3:`Concatena dos cadenas.`,s9a7c8520b5e957dc:`Logaritmo`,s9aab84d92c682c2b:`Editar datos`,s9b2a2e47b83b8b89:`Parámetros de filtro`,s9b735551f188c724:`Buscar columnas...`,s9b9009d4a5004fb8:`Agrupamiento`,s9b9d6ce29d05a298:`menor o igual que`,s9bdf96efd336b522:`Distinto de`,s9c074cd6b873a11d:`Cuenta el número de filas.`,s9cbd1e1cb03c5209:`Expresión de fórmula`,s9dddd160567f347a:`Comprueba si dos valores son diferentes.`,s9deeefd89ca8a81d:`Máximo`,s9e40e59654c8ad67:`Columna`,s9eacba092932f5ee:`Condición de filtro`,s9fd0e802a9910d49:`Reemplaza las apariciones de una subcadena por otra subcadena.`,sa020fbb0637d6f0b:`Sumar/restar duración`,sa22e91cafec90817:`Comprueba si el primer valor es menor o igual que el segundo valor.`,sa26d7a273074cbf9:`No hay datos disponibles`,sa2801a1abc816722:`Agregaciones`,sa345fd77e1d4843c:`Cargando filtros`,sa3712c95628b8c72:`Agrega sobre una agrupación personalizada creada a partir de columnas incluidas y excluidas.`,sa3adfcca86d48eb3:`Número aleatorio`,sa3c9339de23c1752:`Formato`,sa4d736704efdd08c:`Eleva un número a una potencia dada.`,sa58e84810017ba6c:`Panel sin título`,sa60bbe2c7d1439a0:`Circular`,sa696721931eda01a:`Valor de filtro`,sa6a92648588602bf:`Respuesta`,sa6ab5184d6315895:`De`,sa6ea4d401084d793:`Nombre del parámetro`,sa6f2645578b2d2bc:`Año`,sa708584d6f291311:`No se encontraron columnas`,sa725945ab6bf8f5d:`Buscar subcadena`,sa76455c5550f9072:`Mover a “No agrupar nunca por”`,sa7effa06c0f6784c:`mayor que`,sa8b55cab62e439b5:`Eliminar columna`,sa8beb6b1182241ac:`Filtros`,sa91d4991fca9514e:`más de atrás`,saa8b48fefe67c4e3:`Mostrar IDs de conjunto de datos y columna`,saaf4b132e79fc23a:`Reemplazar texto`,sab4faba2ca0fa686:`Concatenar`,sac0a2bf43e48f599:`Mostrar 1 conjunto de datos seleccionado más`,sac0a6d5fcd1137a4:`Semana (UTC)`,sac76bf3771430ba8:`Devuelve e elevado a la potencia especificada.`,sac8256732f2ee1e5:`Datos`,sac8b59943205b14f:`próximo (período) completo`,sac94bb71f7737997:`Mediana`,sacae74732f544fca:`Días`,sacbb1ccb24f8f136:e`${0} y ${1}`,sacfd70562764058b:`Mayúsculas`,saddc7a2dbf00d731:`Redondear hacia abajo`,sae9c3c733664239a:`Ámbito de agrupación de la agregación`,saf21b9a927cf58cc:`Ya existe un parámetro con este nombre.`,saf2a19f4eaf00f68:`o más atrás`,saf63d34c8601dd41:e`${0}`,saf8cea241a5abd64:`Extrae el año de un valor de fecha en UTC.`,safb50c5216475471:e`+ ${0} más`,sb06a3310a509f99a:`Eliminar parada de color`,sb0e97584dc715a5c:`Completo`,sb0f3327210fe18fc:`Columnas`,sb1f654608a3eea75:`Día de la semana`,sb3b793ff5cc1bc39:`próximos (x) períodos`,sb3d4f79d9d8b71e5:`Enviar`,sb47daaf9e1c4a905:`Mes`,sb522b611f2737246:`Devuelve la fecha y hora actuales.`,sb569204089b4cac3:`Chat de IA`,sb5803460fed8e45e:`Mostrar descripción`,sb59d68ed12d46377:`Cargando`,sb5ac2df22bc0f27d:`No lógico`,sb5b295e3a7500b9c:`Niveles de duración`,sb644ed6a7eb739ac:`Mayor que`,sb6513caf69971fb5:`Corto`,sb67e0e7c0869f982:`Diferencia`,sb70671db5700ff60:`no termina en`,sb718e03376f84294:`Lógico`,sb8289037c37950fe:`Cargando funciones`,sb82e2142e160c9e3:`Día de la semana (UTC)`,sb85774dc5d18ff0f:`Confirmar`,sb85c82927a41bb82:`Tangente`,sb93e5af29aca2e3d:`falta`,sb93f886d60b95765:`Añade una duración a (o la resta de) un valor de fecha o fecha y hora. El primer argumento es la unidad ('millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter' o 'year'), el segundo el número de unidades que se añaden (negativo para restar) y el tercero la fecha o fecha y hora de partida.`,sb9f1339b3a61604a:`Niveles`,sbaf87689cccc53eb:`1 elemento`,sbbb97b1c63507dc0:`Número`,sbc7d0358df3d42f1:`Devuelve un número aleatorio entre 0 y 1.`,sbede5f82a01da07f:`Función de agregación`,sbeebe911264bed23:`últimos (x) períodos disponibles`,sbf5bf17d9a50d591:`Error al copiar el elemento`,sbfd689f810e84a16:`Extrae el trimestre de un valor de fecha.`,sc056cc14a35b3e61:`Eliminar filtro`,sc16e00a7a8b2fde2:`Regresar`,sc184a4c8e41a3520:`Proporciona un valor para cada agregación.`,sc1bf67624fa6d498:`% de cambio`,sc22c38e2ff74e2f0:`Parte dividida`,sc2e0d19ed54560c8:`Exponencial`,sc38938275665c143:`Crea un valor geográfico a partir de la latitud, la longitud y la referencia espacial.`,sc4842e5b8b90466a:`Segundos`,sc50a305aa25ccf5c:`Cuenta el número de valores distintos.`,sc525f4a3348435b8:`No se pudieron cargar los paneles`,sc576bd8af97772e3:`Usar parámetro`,sc592307ea80f16b9:`Desconocido`,sc5e35ae3ed59afa2:`Coseno`,sc647b5f32767011d:`Convierte una cadena a minúsculas.`,sc66b38169f832f79:`Añadir al panel`,sc6e49f3d37e54030:`Hora en el día`,sc6f5a4fc0583d734:`está en`,sc70ad8207db856a8:`Coordenadas`,sc72895d56c4cdcb4:`Longitud de cadena`,sc78ac75cec3bc641:`Extrae el año de numeración de semanas ISO de un valor de fecha o fecha y hora en UTC.`,sc86e72c4fdd4e0ec:`Contar distinto`,sc8a98cb006054d7b:`Expresión de filtro`,sc8d21540b3d89a69:`Añadir parada de color`,sc8f855b93b29d6e4:`Incluir / excluir`,sc919093c0ed095d1:`Extrae el segundo de un valor de fecha y hora.`,sc980855a000b76ea:`Inferior`,sca4e3645a2e656e0:`Minuto (UTC)`,scace072bef961918:`Filas`,scb7bab1a17663a6c:`YTD`,scb870bd06692114f:`No agrupar nunca por`,scbaef981909d487e:`Evolución`,scc12e58c6ea9c6c5:`Conversión`,scc2f862c1d285c7d:`Pensando`,scc3056d8686094c8:`Añadir conjunto de datos o agente`,scec91d838431f76c:`Cargando columnas`,scf2bb2b0de9cdb8a:`Milisegundo`,scf9d4b3481d2d769:`Tomar subcadena`,scfb1e98368eb0a45:`Logaritmo natural`,sd05671183b4fe913:`No se pudieron recuperar los datos`,sd138b42dc3911a0f:`Extrae el día del año de un valor de fecha o fecha y hora en UTC.`,sd1f07cfd81510f34:`Nueva variante`,sd237be440de38cc7:`Trimestre`,sd28141a332dc31fa:`Día del mes`,sd2d5d28a8d42f372:`Trimestre (UTC)`,sd3099ed7844b7eb2:`Día de la semana`,sd3abbb1dbbe0552f:`No se pudieron cargar las variantes`,sd3ec39c275aec063:`Denominador`,sd434e9c69417f3a0:`Valorar esta respuesta`,sd59e6017006a66d3:e`${0} Semana`,sd5b1040899eb149d:`siguiente completo`,sd66a74fff07a11fb:`{count} elementos seleccionados`,sd6c5c734d7cfa9ec:`Devuelve el número de caracteres de una cadena.`,sd794b878b98cd77c:e`${0} Milisegundo`,sd7b3b24cd10acbb6:e`Elemento de cuadrícula ${0}`,sd7ebafacf602c9bd:`Letra`,sd89a9a92d5da0fd0:`Redondea un número hacia abajo al entero más cercano.`,sd8b18575e1f4be43:`Devuelve el arcotangente de un número.`,sd8ecf227c7c49331:`Matemático`,sdae4e03dc4e96d45:`{count} seleccionados`,sdb73788b3c975f16:`Automático`,sdb798be27601ed06:`Tipo de parámetro:`,sdbce9d3fdf676217:e`${0} Mes`,sdc673e73b5c13aea:`Eliminar`,sdd6c63f37eb62928:e`${0} Minutos`,sdd89a3395abab8ea:`Extrae el año de numeración de semanas ISO de un valor de fecha o fecha y hora.`,sde8c84234a516e7d:e`${0} Milisegundos`,sdebe99a43259a451:`Contar filas`,sdfbe1b87d8712bc7:`¿En qué puedo ayudarte?`,sdfeb2151b9e78d4d:`no contiene`,se01bc9eea39688ad:`Mes del año`,se063ce6562716192:`Cargando agregaciones`,se0955919920ee87d:`Día`,se1126afc2d66422f:`Elimina los espacios iniciales de una cadena.`,se211e3d21bbf3bff:`Medida`,se25d956db80a4d78:`Arcocoseno`,se2b7530e30fa607d:`Comparación de períodos`,se2d6ee866b592a9f:`más de (x) períodos atrás`,se3a1aa0525f22ee4:`Medidas`,se415bbea6c976fb1:`Agrupar por`,se53005c74eea3a45:`Extrae el mes de un valor de fecha o fecha y hora en UTC.`,se5316cbaa025f028:`siguiente`,se592b9bec3ffc953:`Convierte el primer argumento al tipo indicado por el segundo argumento. Los tipos posibles son 'hierarchy', 'numeric', 'datetime' y 'boolean'.`,se63e1798c5b1ab4d:`Día del mes (UTC)`,se715be190539325a:`hace`,se77797889cac2fec:e`${0} Meses`,se8d0f19a0eac8103:`Extrae la hora de un valor de fecha y hora.`,se8ddc90a9d7c709d:`nivel`,se960538baf78f63b:e`${0} Segundo`,se9e535bb9591039e:`Seleccionar una expresión`,se9ff6e9a514d8cf9:`Lunes`,sea3f1934bd770b70:`Devuelve el logaritmo de un número para una base específica.`,sea4f08110bb8f15d:`Eliminar`,seb3937089958c541:`Mayor o igual`,seb4eae68d45315b7:`Mínimo`,seb9c440de1ce6044:`empieza con`,seba8eb8fefd4afe9:`Devuelve el valor más pequeño.`,sec2f608650e36ac5:`último período completado`,secf42ec1c7c47be2:`no falta`,sed1e9f2d0f29e036:`Sin peso`,sed522484748a787d:`Creando elemento...`,see0ec27fb03d880e:`Minutos`,seeccc1a89151be8a:`Extrae el día del mes de un valor de fecha o fecha y hora en UTC.`,sef186952c82f8ce9:`Extrae el año de un valor de fecha.`,sef49aec68fd1dc66:`Nombre`,sefc8e08d71b8530f:`Agentes`,sf095cc47a4ff9c3d:`Fórmula`,sf2c23d06cc64e8dd:`Nuevo panel`,sf2d322b3ea1ff824:`Redondear hacia arriba`,sf4423f120eba0c11:`Comprueba si el primer valor es menor que el segundo valor.`,sf4a3a5898b69b81f:e`${0} Día`,sf518b78d9734f57b:`no empieza con`,sf53ceb4945e8f1fb:`Argumento vacío. Escribe un valor o arrastra una columna, función o agregación.`,sf6cda8263b3170af:`Usar período hasta la fecha para períodos incompletos`,sf6dd5d79bf159456:`Sugerencias de prompt`,sf70eaf9ab4c93082:`no cont`,sf95145f204b001ac:`Agrupar siempre por`,sf9aee319a006c9b4:`Añadir`,sf9c10516a62a23db:`Mostrar como`,sfa069719a050be66:`Y`,sfa2d0aa30ee5aa58:`últimos (x) períodos`,sfa44b98afaa0e7c6:`Buscar columnas`,sfad9ed343e97551c:`Valor pasado`,sfb1d53c7660dcfc5:e`${0}, y ${1} más`,sfb9e6d0c6baa99f5:`Coincide con el rango de fechas visible en el gráfico o tabla`,sfbac36245480ddbc:`Separador`,sfbac39f6e9672a74:`Volver al ámbito de agrupación`,sfd21da55eb7a055a:e`${0} Horas`,sfd3c65c07f87b869:`Añadiendo al panel`,sfda1c9d0be35cec8:`trimestre hasta la fecha`,sfe9b4269fb997134:`Multiplica dos valores numéricos.`,sff5bb7742c2896c8:`Objetivo`,sffa721bb6aa3128d:`Buscar...`,sffb8751d8069b701:`Año (UTC)`,sffce88436a4390cf:`No se pudo cargar la configuración del gráfico. Por favor, inténtalo de nuevo.`,"slot-label-name":`Nombre`,"slot-label-time":`Tiempo`,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,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import{n as e,t}from"./localized-mixin-DN2aV3CC.js";import{n,r}from"./lit-localize-CIGP-NUw.js";import{t as i}from"./localized-decorator-Buib6Rq1.js";import{t as a}from"./luzmoTrashOutline-DXZpJx7f.js";import{n as o,r as s,t as c}from"./calculate-data-field-icon-CrEVAfzJ.js";import{t as l}from"./luzmoPlus-Dyrrz0v8.js";import{t as u}from"./luzmo-icon-markup-27PRW8QM.js";import{t as d}from"./v4-CI0qP0ur.js";import{n as f}from"./data-broker-Dgg5mQze.js";import{c as ee}from"./type-check-CC6bgirK.js";import{t as p}from"./localize-BXHWaHdZ.js";import{n as m}from"./periods.const-Cie50jR4.js";import"./load-data-fields-for-datasets-CPf_Q7p4.js";import{html as h,ifDefined as te,nothing as g,property as _,query as ne,repeat as re,state as v,unsafeCSS as y}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/progress-circle.js";import{ElementSizes as b,LuzmoElement as x,SizedMixin as S}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/utils.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/tooltip.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/divider.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/menu.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/badge.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/select.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/options.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/tags.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/text-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/date-time-picker.js";var C=[``,``,``],ie=``;function w(e,t){let n=RegExp(`(${C.join(`|`)})`,`u`),r=[];for(let i of e.replaceAll(ie,``).split(n)){let e=C.indexOf(i);e===-1?i&&r.push(i):r.push(t[e])}return r}var T=()=>[{id:`? = ?`,key:`? = ?`,expression:`? = ?`,name:n(`equals`,{desc:`Filter expression for equals comparison`}),description:n(`equals`,{desc:`Filter expression for equals comparison`}),tiny:n(`eq`,{desc:`Short form of equals comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? != ?`,key:`? != ?`,expression:`? != ?`,name:n(`not equals`,{desc:`Filter expression for not equals comparison`}),description:n(`not equals`,{desc:`Filter expression for not equals comparison`}),tiny:n(`not eq`,{desc:`Short form of not equals comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? in ?`,key:`? in ?`,expression:`? in ?`,name:n(`is in`,{desc:`Filter expression for in comparison`}),description:n(`is in`,{desc:`Filter expression for in comparison`}),tiny:n(`is in`,{desc:`Filter expression for in comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? not in ?`,key:`? not in ?`,expression:`? not in ?`,name:n(`is not in`,{desc:`Filter expression for not in comparison`}),description:n(`is not in`,{desc:`Filter expression for not in comparison`}),tiny:n(`is not in`,{desc:`Filter expression for not in comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? like ?`,key:`? like ?`,expression:`? like ?`,name:n(`contains`,{desc:`Filter expression for contains comparison`}),description:n(`contains`,{desc:`Filter expression for contains comparison`}),tiny:n(`cont`,{desc:`Short form of contains comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? not like ?`,key:`? not like ?`,expression:`? not like ?`,name:n(`does not contain`,{desc:`Filter expression for does not contain comparison`}),description:n(`does not contain`,{desc:`Filter expression for does not contain comparison`}),tiny:n(`not cont`,{desc:`Short form of does not contain comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? starts with ?`,key:`? starts with ?`,expression:`? starts with ?`,name:n(`starts with`,{desc:`Filter expression for starts with comparison`}),description:n(`starts with`,{desc:`Filter expression for starts with comparison`}),tiny:n(`starts with`,{desc:`Filter expression for starts with comparison`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? not starts with ?`,key:`? not starts with ?`,expression:`? not starts with ?`,name:n(`does not start with`,{desc:`Filter expression for does not start with comparison`}),description:n(`does not start with`,{desc:`Filter expression for does not start with comparison`}),tiny:n(`not starts with`,{desc:`Short form of does not start with comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? ends with ?`,key:`? ends with ?`,expression:`? ends with ?`,name:n(`ends with`,{desc:`Filter expression for ends with comparison`}),description:n(`ends with`,{desc:`Filter expression for ends with comparison`}),tiny:n(`ends with`,{desc:`Filter expression for ends with comparison`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? not ends with ?`,key:`? not ends with ?`,expression:`? not ends with ?`,name:n(`does not end with`,{desc:`Filter expression for does not end with comparison`}),description:n(`does not end with`,{desc:`Filter expression for does not end with comparison`}),tiny:n(`not ends with`,{desc:`Short form of does not end with comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? < ?`,key:`? < ?`,expression:`? < ?`,name:n(`less than`,{desc:`Filter expression for less than comparison`}),description:n(`less than`,{desc:`Filter expression for less than comparison`}),tiny:`<`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? <= ?`,key:`? <= ?`,expression:`? <= ?`,name:n(`less than or equal`,{desc:`Filter expression for less than or equal comparison`}),description:n(`less than or equal`,{desc:`Filter expression for less than or equal comparison`}),tiny:`<=`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? > ?`,key:`? > ?`,expression:`? > ?`,name:n(`greater than`,{desc:`Filter expression for greater than comparison`}),description:n(`greater than`,{desc:`Filter expression for greater than comparison`}),tiny:`>`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? >= ?`,key:`? >= ?`,expression:`? >= ?`,name:n(`greater than or equal`,{desc:`Filter expression for greater than or equal comparison`}),description:n(`greater than or equal`,{desc:`Filter expression for greater than or equal comparison`}),tiny:`>=`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? between ?`,key:`? between ?`,expression:`? between ?`,name:n(`is between`,{desc:`Filter expression for between comparison`}),description:n(`is between`,{desc:`Filter expression for between comparison`}),tiny:n(`between`,{desc:`Short form of between comparison in filter expression`}),type:[],subtype:[`ip_address`]},{id:`last_now`,key:`last_now`,expression:`last_now`,name:n(`last (x) periods`,{desc:`Filter expression for last (x) periods`}),description:n(`last (x) periods`,{desc:`Filter expression for last (x) periods`}),tiny:n(`last`,{desc:`Short form of last (x) periods in filter expression`}),type:[`datetime`]},{id:`last_available`,key:`last_available`,expression:`last_available`,name:n(`last (x) available periods`,{desc:`Filter expression for last (x) available periods`}),description:n(`last (x) available periods`,{desc:`Filter expression for last (x) available periods`}),tiny:n(`last available`,{desc:`Short form of last (x) available periods in filter expression`}),type:[`datetime`]},{id:`last_completed`,key:`last_completed`,expression:`last_completed`,name:n(`last completed period`,{desc:`Filter expression for last completed period`}),description:n(`last completed (period)`,{desc:`Filter expression for last completed period`}),tiny:n(`last completed`,{desc:`Short form of last completed period in filter expression`}),type:[`datetime`]},{id:`next_now`,key:`next_now`,expression:`next_now`,name:n(`next (x) periods`,{desc:`Filter expression for next (x) periods`}),description:n(`next (x) periods`,{desc:`Filter expression for next (x) periods`}),tiny:n(`next`,{desc:`Short form of next (x) periods in filter expression`}),type:[`datetime`]},{id:`more_than_ago`,key:`more_than_ago`,expression:`more_than_ago`,name:n(`more than (x) periods ago`,{desc:`Filter expression for more than (x) periods ago`}),description:n(`more than (x) periods ago`,{desc:`Filter expression for more than (x) periods ago`}),tiny:n(`more than ago`,{desc:`Short form of more than (x) periods ago in filter expression`}),type:[`datetime`]},{id:`or_more_ago`,key:`or_more_ago`,expression:`or_more_ago`,name:n(`(x) periods or more ago`,{desc:`Filter expression for (x) periods or more ago`}),description:n(`(x) periods or more ago`,{desc:`Filter expression for (x) periods or more ago`}),tiny:n(`or more ago`,{desc:`Short form of (x) periods or more ago in filter expression`}),type:[`datetime`]},{id:`next_full`,key:`next_full`,expression:`next_full`,name:n(`next full (period)`,{desc:`Filter expression for next full period`}),description:n(`next full (period)`,{desc:`Filter expression for next full period`}),tiny:n(`next full`,{desc:`Short form of next full period in filter expression`}),type:[`datetime`]},{id:`WTD`,key:`to_date`,expression:`to_date`,unit:4,name:n(`week to date`,{desc:`Filter expression for week to date`}),description:n(`week to date`,{desc:`Filter expression for week to date`}),tiny:n(`WTD`,{desc:`Short form of week to date in filter expression`}),type:[`datetime`]},{id:`MTD`,key:`to_date`,expression:`to_date`,unit:3,name:n(`month to date`,{desc:`Filter expression for month to date`}),description:n(`month to date`,{desc:`Filter expression for month to date`}),tiny:n(`MTD`,{desc:`Short form of month to date in filter expression`}),type:[`datetime`]},{id:`QTD`,key:`to_date`,expression:`to_date`,unit:2,name:n(`quarter to date`,{desc:`Filter expression for quarter to date`}),description:n(`quarter to date`,{desc:`Filter expression for quarter to date`}),tiny:n(`QTD`,{desc:`Short form of quarter to date in filter expression`}),type:[`datetime`]},{id:`YTD`,key:`to_date`,expression:`to_date`,unit:1,name:n(`year to date`,{desc:`Filter expression for year to date`}),description:n(`year to date`,{desc:`Filter expression for year to date`}),tiny:n(`YTD`,{desc:`Short form of year to date in filter expression`}),type:[`datetime`]},{id:`? is null`,key:`? is null`,expression:`? is null`,name:n(`is missing`,{desc:`Filter expression for is missing`}),description:n(`is missing`,{desc:`Filter expression for is missing`}),tiny:n(`missing`,{desc:`Short form of is missing in filter expression`}),type:[`numeric`,`datetime`,`hierarchy`,`spatial`],subtype:[`ip_address`]},{id:`? is not null`,key:`? is not null`,expression:`? is not null`,name:n(`is not missing`,{desc:`Filter expression for is not missing`}),description:n(`is not missing`,{desc:`Filter expression for is not missing`}),tiny:n(`not missing`,{desc:`Short form of is not missing in filter expression`}),type:[`numeric`,`datetime`,`hierarchy`,`spatial`],subtype:[`ip_address`]}],ae=(e,t,n)=>{let r=new Set([`? in ?`,`? not in ?`]);return!e&&!t?T():T().filter(i=>(e&&i.type.includes(e)||t&&i.subtype?.includes(t))&&!(n&&r.has(i.key)))},oe=new Set([`last_now`,`last_available`,`next_now`,`more_than_ago`,`or_more_ago`]),se=new Set([`last_completed`,`next_full`]),ce=new Set([`? is null`,`? is not null`,`to_date`]),le=new Set([`? = ?`,`? != ?`,`? < ?`,`? <= ?`,`? > ?`,`? >= ?`]),ue=3,de=32;function E(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function D(e){return E(e)?typeof e.columnId==`string`||typeof e.column_id==`string`||typeof e.formulaId==`string`||typeof e.formula_id==`string`||typeof e.formula==`string`||(typeof e.datasetId==`string`||typeof e.dataset_id==`string`)&&(e.columnExpression!==void 0||e.expression!==void 0):!1}function fe(e){return e.length<=de?{display:e,truncated:!1}:{display:`${e.slice(0,de-1)}…`,truncated:!0}}function pe(e,t,n){try{return new Intl.ListFormat(e||void 0,{style:`long`,type:n}).format(t)}catch{return t.join(`, `)}}function O(e,t,n){let r=Te(e,t,n),{display:i,truncated:a}=fe(r);return{label:i,full:r,truncated:a}}function me(e){return e===1?n(`1 item`,{desc:`One selected hierarchy value whose name is still loading`}):n(r`${e} items`,{desc:`Selected hierarchy values whose names are still loading`})}function he(){return n(`Some item names could not be retrieved`,{desc:`Tooltip when a hierarchy filter value is still an id after name lookup`})}function ge(e,t){return!!(t?.type===`hierarchy`&&t.datasetId&&t.fieldId&&!(E(e)&&e.name!==void 0)&&M(e))}function _e(e,t,n){let r=n?.datasetId,i=n?.fieldId;return!r||!i?[]:e.flatMap(e=>{if(!ge(e,n))return[];let a=M(e);return a?t.hierarchyLabels?.get(j(r,i,a))?[]:[a]:[]})}function ve(e,t,n){return n.hierarchyLabelsLoading&&t.length>0?{valueText:me(t.length),valuePending:!0}:n.hierarchyLabels&&!n.hierarchyLabelsLoading&&t.length>0&&!e.valueTooltip?{...e,valueTooltip:he()}:e}function ye(e,t,i){let a=e.map(e=>O(e,t,i)),o=a.map(e=>e.full),s=pe(t.contentLanguage,o,`conjunction`);if(e.length===1){let[e]=a;return{valueText:e.label,valueTooltip:e.truncated?e.full:void 0}}let c=Math.min(ue,a.length),l=a.length-c,u=a.slice(0,c).map(e=>e.label),d=a.some(e=>e.truncated),f;return f=l>0?n(r`${pe(t.contentLanguage,u,`unit`)}, and ${l} more`,{desc:`Filter values after the first few shown in a read-only sentence, e.g. "Dresses, Shoes, Shorts, and 1 more"`}):pe(t.contentLanguage,a.map(e=>e.label),`conjunction`),{valueText:f,valueTooltip:l>0||d?s:void 0}}function k(e,t,n){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`){let t=String(e);return t.length>0?t:n}if(e&&typeof e==`object`){let n=p(e,t);if(n)return n}return n}function be(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function A(e,t){let n=be(e,[`datasetId`,`dataset_id`]),r=be(e,[`columnId`,`column_id`]),i=be(e,[`formulaId`,`formula_id`]),a=typeof e.formula==`string`?e.formula:void 0,o=t.datasets.find(e=>e.id===n),s=o?k(o.name,t.contentLanguage,``):``;if(i){let e=o?.formulas?.find(e=>e.id===i),r=k(e?.name,t.contentLanguage,i);return{label:r,tooltip:s?`${s} · ${r}`:r,type:e?.type,subtype:e?.subtype,formula:!0,datasetId:n,fieldId:i}}if(a)return{label:a,tooltip:s?`${s} · ${a}`:a,formula:!0,datasetId:n};let c=!r&&typeof e.expression==`string`?e.expression:void 0;if(c)return{label:c,tooltip:s?`${s} · ${c}`:c,formula:!0,datasetId:n};let l=r?o?.columns?.find(e=>e.id===r):void 0,u=r??(typeof e.columnExpression==`string`?e.columnExpression:``),d=k(l?.name,t.contentLanguage,u);return{label:d,tooltip:s?`${s} · ${d}`:d,type:l?.type,subtype:l?.subtype,formula:!1,datasetId:n,fieldId:r}}function xe(e){let t=m.find(t=>t.level===e);return t?t.i18n():``}function Se(e,t){switch(t){case 1:return e===1?n(r`${e} Year`,{desc:`Singular relative filter quantity in years`}):n(r`${e} Years`,{desc:`Plural relative filter quantity in years`});case 2:return e===1?n(r`${e} Quarter`,{desc:`Singular relative filter quantity in quarters`}):n(r`${e} Quarters`,{desc:`Plural relative filter quantity in quarters`});case 3:return e===1?n(r`${e} Month`,{desc:`Singular relative filter quantity in months`}):n(r`${e} Months`,{desc:`Plural relative filter quantity in months`});case 4:return e===1?n(r`${e} Week`,{desc:`Singular relative filter quantity in weeks`}):n(r`${e} Weeks`,{desc:`Plural relative filter quantity in weeks`});case 5:return e===1?n(r`${e} Day`,{desc:`Singular relative filter quantity in days`}):n(r`${e} Days`,{desc:`Plural relative filter quantity in days`});case 6:return e===1?n(r`${e} Hour`,{desc:`Singular relative filter quantity in hours`}):n(r`${e} Hours`,{desc:`Plural relative filter quantity in hours`});case 7:return e===1?n(r`${e} Minute`,{desc:`Singular relative filter quantity in minutes`}):n(r`${e} Minutes`,{desc:`Plural relative filter quantity in minutes`});case 8:return e===1?n(r`${e} Second`,{desc:`Singular relative filter quantity in seconds`}):n(r`${e} Seconds`,{desc:`Plural relative filter quantity in seconds`});case 9:return e===1?n(r`${e} Millisecond`,{desc:`Singular relative filter quantity in milliseconds`}):n(r`${e} Milliseconds`,{desc:`Plural relative filter quantity in milliseconds`});default:return n(r`${e}`,{desc:`Relative filter quantity`})}}function Ce(e,t){let n=new Date(e);if(Number.isNaN(n.getTime()))return e;try{return new Intl.DateTimeFormat(t.contentLanguage||void 0,{dateStyle:`medium`,timeStyle:`short`,...t.timeZone?{timeZone:t.timeZone}:{}}).format(n)}catch{return e}}function we(e){return/^\d{4}-\d{2}-\d{2}(?:T|$)/.test(e)}function j(e,t,n){return`${e}:${t}:${n}`}function M(e){if(typeof e==`string`||typeof e==`number`)return String(e);if(E(e)&&(typeof e.id==`string`||typeof e.id==`number`))return String(e.id)}function Te(e,t,n){if(n?.type===`hierarchy`&&n.datasetId&&n.fieldId&&!(E(e)&&e.name!==void 0)){let r=M(e),i=r===void 0?void 0:t.hierarchyLabels?.get(j(n.datasetId,n.fieldId,r));if(i)return i}if(typeof e==`number`&&Number.isFinite(e))return new Intl.NumberFormat(t.contentLanguage||void 0).format(e);if(typeof e==`string`)return we(e)?Ce(e,t):e;if(typeof e==`boolean`)return String(e);if(E(e)){if(typeof e.parameter==`string`)return e.parameter;if(e.name!==void 0){let n=k(e.name,t.contentLanguage,``);if(n)return n}if(typeof e.id==`string`||typeof e.id==`number`)return String(e.id)}return``}function Ee(e,t){let n=T().filter(t=>t.expression===e),r=E(t)&&typeof t.unit==`number`?t.unit:void 0;return(e===`to_date`&&r!==void 0?n.find(e=>e.unit===r)??n[0]:n[0])?.tiny??e}function De(e,t,i,a){if(ce.has(e)||t==null)return{valueText:``};if(E(t)&&typeof t.parameter==`string`){let e=t.parameter;if(!D(t))return{valueText:e}}if(le.has(e)&&D(t))return{valueText:``,valueField:A(t,i)};if(e===`? between ?`&&Array.isArray(t)&&t.length===2){let e=O(t[0],i,a),o=O(t[1],i,a);return ve({valueText:n(r`${e.label} and ${o.label}`,{desc:`Inclusive range shown between two filter values`}),valueTooltip:e.truncated||o.truncated?n(r`${e.full} and ${o.full}`,{id:`filter-range-tooltip`,desc:`Full inclusive range shown in a tooltip`}):void 0},_e(t,i,a),i)}if(oe.has(e)&&E(t))return{valueText:Se(typeof t.quantity==`number`?t.quantity:1,t.unit)};if(se.has(e)&&E(t))return{valueText:xe(t.unit)};if(Array.isArray(t))return t.length===0?{valueText:``}:ve(ye(t,i,a),_e(t,i,a),i);let o=O(t,i,a);return ve({valueText:o.label,valueTooltip:o.truncated?o.full:void 0},_e([t],i,a),i)}function Oe(e,t){let n=e.parameters?.[0];if(!E(n)||!D(n))return null;let r=A(n,t),i=typeof e.expression==`string`?e.expression:``,a=e.parameters?.[1];return{field:r,expression:i?Ee(i,a):``,...De(i,a,t,r)}}function ke(e){return`condition`in e&&`filters`in e}function Ae(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(Ae);if(E(e)){if(typeof e.parameter==`string`||e.name!==void 0||D(e))return[];let t=M(e);return t?[t]:[]}let t=M(e);return t?[t]:[]}function je(e,t){let n=new Map,r=e=>{if(ke(e)){e.filters.forEach(r);return}let i=e.parameters?.[0];if(!E(i)||!D(i))return;let a=A(i,t);if(a.type!==`hierarchy`||!a.datasetId||!a.fieldId)return;let o=[...new Set(Ae(e.parameters?.[1]))];if(o.length===0)return;let s=`${a.datasetId}:${a.fieldId}`,c=n.get(s);if(c){c.ids=[...new Set([...c.ids,...o])];return}n.set(s,{datasetId:a.datasetId,...a.formula?{formulaId:a.fieldId}:{columnId:a.fieldId},ids:o})};return r(e),[...n.values()]}async function Me(e,t){let n=new Map;return await Promise.all(e.map(async e=>{let r={dataset_id:e.datasetId,column_id:e.columnId,formula_id:e.formulaId},i=await f.fetchData({dimensions:[r],where:[{expression:`? in ?`,parameters:[r,e.ids]}],limit:{by:e.ids.length,offset:0}}),a=e.columnId??e.formulaId??``;for(let r of i.data??[]){let i=r[0],o=i&&typeof i==`object`&&`id`in i?String(i.id):String(i),s=i&&typeof i==`object`&&`name`in i?p(i.name,t):``;s&&n.set(j(e.datasetId,a,o),s)}})),n}var Ne=20,N=class extends Error{constructor(e){super(e),this.name=`FilterUnrepresentableError`}},Pe=new Set([`and`,`or`]),Fe=[`datasetId`,`dataset_id`,`columnId`,`column_id`,`formulaId`,`formula_id`,`formula`,`columnExpression`,`value`,`ignoredItemIds`];function P(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function F(e){return!P(e)||e.condition!==void 0&&(typeof e.condition!=`string`||!Pe.has(e.condition.toLowerCase()))?!1:`filters`in e||`subGroups`in e}function Ie(e){return P(e)&&`expression`in e&&!(`condition`in e)}function Le(e){return Fe.some(t=>t in e)}function Re(e,t=!1){let n=[e.columnId!==void 0||e.column_id!==void 0,e.formulaId!==void 0||e.formula_id!==void 0,e.formula!==void 0].filter(Boolean).length;return n===1?!0:n>1?!1:e.columnExpression!==void 0||t&&e.expression!==void 0}function ze(e){return!Ie(e)||typeof e.expression!=`string`||e.expression.length===0||`parameters`in e||typeof e.datasetId!=`string`&&typeof e.dataset_id!=`string`?!1:Re(e)}function Be(e){return!Ie(e)||!Array.isArray(e.parameters)?!1:!Le(e)}function Ve(e){if(!(`parameters`in e))return;let t=Fe.find(t=>t in e);if(t!==void 0)throw new N(`Filter leaf mixes "parameters" with the clean inline key "${t}".`)}function He(e){throw typeof e.expression!=`string`||e.expression.length===0?new N(`Clean filter leaf is missing a non-empty "expression".`):typeof e.datasetId!=`string`&&typeof e.dataset_id!=`string`?new N(`Clean filter leaf "${e.expression}" is missing a "datasetId".`):new N(`Clean filter leaf "${e.expression}" must name exactly one of "columnId", "formulaId", "formula", or "columnExpression".`)}function Ue(e){return e===`where`||e===`having`}function I(e){if(e>20)throw new N(`Filter nesting exceeds the maximum depth of 20.`)}function We(e){if(e==null)return`empty`;if(!Array.isArray(e))return`unknown`;if(e.length===0)return`empty`;let t=!1,n=!1,r=!1,i=(e,a)=>{if(a>20){r=!0;return}if(F(e)){Ue(e.clause)&&(n=!0);let t=[...Array.isArray(e.filters)?e.filters:[],...Array.isArray(e.subGroups)?e.subGroups:[]];for(let e of t)i(e,a+1);return}if(Ie(e)){`parameters`in e&&Le(e)?r=!0:ze(e)?n=!0:Be(e)?t=!0:r=!0;return}r=!0};for(let t of e)i(t,1);return r?`unknown`:n&&t?`mixed`:n?`clean`:t?`canonical`:`empty`}var Ge=new Set([`? is null`,`? is not null`]),Ke=new Set([`? = ?`,`? != ?`,`? < ?`,`? <= ?`,`? > ?`,`? >= ?`]),qe=new Set([`? in ?`,`? not in ?`,`? between ?`]),Je={"array[numeric]":`numeric[]`,"array[hierarchy]":`hierarchy[]`,"array[datetime]":`datetime[]`},Ye=new Set([`level`,`lowestLevel`,`unnest`,`discretization`,`aggregation`,`index`,`include_nonoccurring`,`simplification`]);function L(e,t){return e!==`lowestLevel`&&!(t===null&&Ye.has(e))}function R(e){return structuredClone(e)}function Xe(e){let t=e.datasetId??e.dataset_id;if(typeof t!=`string`||t.length===0)throw new N(`Filter reference is missing a "datasetId".`);return t}function Ze(e){return P(e)?typeof e.columnId==`string`||typeof e.column_id==`string`||typeof e.formulaId==`string`||typeof e.formula_id==`string`||typeof e.formula==`string`||(typeof e.datasetId==`string`||typeof e.dataset_id==`string`)&&(e.columnExpression!==void 0||e.expression!==void 0):!1}function Qe(e){let t={type:e.type};return e.bins!==void 0&&(t.bins=e.bins),Array.isArray(e.over)&&(t.over=e.over.map(e=>at(e))),t}function $e(e){let t={type:e.type},n=e.datasetId??e.dataset_id,r=e.columnId??e.column_id;return n!==void 0&&(t.datasetId=n),r!==void 0&&(t.columnId=r),e.level!==void 0&&L(`level`,e.level)&&(t.level=e.level),P(e.discretization)&&(t.discretization=Qe(e.discretization)),e.unnest!==void 0&&L(`unnest`,e.unnest)&&(t.unnest=e.unnest),t}function et(e){let t={type:e.type};return e.bins!==void 0&&(t.bins=e.bins),Array.isArray(e.over)&&(t.over=e.over.map(e=>P(e)?it(e):e)),t}function tt(e){let t={type:e.type},n=e.datasetId??e.dataset_id,r=e.columnId??e.column_id;return n!==void 0&&(t.datasetId=n),r!==void 0&&(t.columnId=r),e.level!==void 0&&(t.level=e.level),P(e.discretization)&&(t.discretization=et(e.discretization)),e.unnest!==void 0&&(t.unnest=e.unnest),t}function nt(e,t){e.level!==void 0&&(t.level=R(e.level)),P(e.discretization)&&(t.discretization=et(e.discretization)),P(e.aggregation)&&(t.aggregation=tt(e.aggregation)),e.unnest!==void 0&&(t.unnest=R(e.unnest))}function rt(e,t){let n=e.columnId??e.column_id;if(n!==void 0)return{kind:`columnId`,value:n};let r=e.formulaId??e.formula_id;if(r!==void 0)return{kind:`formulaId`,value:r};if(e.formula!==void 0)return{kind:`formula`,value:e.formula};let i=e.columnExpression??(t?e.expression:void 0);if(i!==void 0)return{kind:`expression`,value:i}}function it(e,t=!0){let n={datasetId:Xe(e)},r=rt(e,t);return r!==void 0&&(r.kind===`expression`?n.expression=r.value:n[r.kind]=r.value),nt(e,n),n}function at(e){if(!P(e))throw new N(`Cannot emit a clean filter reference.`);let t={datasetId:Xe(e)};e.level!==void 0&&L(`level`,e.level)&&(t.level=e.level),P(e.discretization)&&(t.discretization=Qe(e.discretization)),P(e.aggregation)&&(t.aggregation=$e(e.aggregation)),e.unnest!==void 0&&L(`unnest`,e.unnest)&&(t.unnest=e.unnest);let n=rt(e,!0);if(n===void 0)throw new N(`Cannot emit a clean filter reference: no column, formula, or expression.`);return n.kind===`expression`?t.columnExpression=n.value:t[n.kind]=n.value,t}function ot(e){if(!P(e)||typeof e.parameter!=`string`||typeof e.type!=`string`)return e;let t=Je[e.type];return t===void 0?e:{...e,type:t}}function st(e,t){return P(t)&&typeof t.parameter==`string`?!0:Array.isArray(t)?e!==`? between ?`||t.length===2:!1}function ct(e,t){let n=e.expression,r=[it(e,!1)];if(!Ge.has(n)&&e.value!==void 0){let t=Ke.has(n)&&Ze(e.value);r.push(t?it(e.value):R(e.value))}let i={};typeof e.id==`string`&&(i.id=e.id),`ignoredItemIds`in e&&(i.ignore=R(e.ignoredItemIds)),t!==void 0&&(i.type=t);let a={expression:n,parameters:r};return Object.keys(i).length>0&&(a.properties=i),a}function lt(e){let{expression:t}=e;if(typeof t!=`string`||t.length===0)return null;let n=Array.isArray(e.parameters)?e.parameters:[];if(!P(n[0]))throw new N(`Cannot emit a clean filter reference for "${t}".`);let r={...at(n[0]),expression:t};if(!Ge.has(t)){let e=n[1];if(e===void 0)throw new N(`Filter "${t}" is missing its value operand.`);if(r.value=Ze(e)&&Ke.has(t)?at(e):ot(R(e)),qe.has(t)&&!st(t,r.value))throw new N(`Cannot emit an invalid clean filter value for "${t}".`)}let{properties:i}=e;return i?.id!==void 0&&(r.id=i.id),i!==void 0&&`ignore`in i&&(r.ignoredItemIds=R(i.ignore)),r}function ut(e){return F(e)}function dt(e){return Array.isArray(e.filters)?e.filters:[]}function ft(e,t){return e.properties?.type===`having`||e.properties?.type===`where`?e.properties.type:t??`where`}function z(e,t,n=1,r=new Set){I(n);let i=e.clause??t;for(let t of dt(e))ut(t)?z(t,i,n+1,r):typeof t.expression==`string`&&t.expression.length>0&&r.add(ft(t,i));return r}function pt(e,t,n=1){I(n);let r=e.clause??t;if(e.condition===`or`&&z(e,r,n).size>1)throw new N(`An "or" group mixes "where" and "having" filters, which clean output cannot represent.`);for(let t of dt(e))ut(t)&&pt(t,r,n+1)}function mt(e,t,n,r=1){I(r);let i=e.clause??n,a=[];for(let n of dt(e)){if(ut(n)){let e=mt(n,t,i,r+1);e.filters.length>0&&a.push(e);continue}if(ft(n,i)!==t)continue;let e=lt(n);e&&a.push(e)}let o={condition:e.condition===`or`?`or`:`and`,filters:a};return e.id!==void 0&&z(e,i,r).size<=1&&(o.id=e.id),o}function ht(e){let t=e.clause;pt(e,t);let n=z(e,t);return n.size===0&&n.add(t??`where`),[`where`,`having`].filter(e=>n.has(e)).map(n=>({...mt(e,n,t),clause:n})).filter(e=>e.filters.length>0)}var gt=[`origin`,`datasetId`,`vizId`,`itemId`,`isDrilldown`,`type`];function B(e){return typeof e==`string`&&e.toLowerCase()===`or`?`or`:`and`}function _t(e){return F(e)}function vt(e){if(!Array.isArray(e)||e.length===0)return[];let t=P(e[0])?e[0]:void 0,n=e.length>1?e[1]:void 0;return e.length>1?[t,n]:[t]}function yt(e){if(typeof e.expression!=`string`||e.expression.length===0)return null;let t={expression:e.expression,parameters:vt(e.parameters)};return e.properties!==void 0&&Object.keys(e.properties).length>0&&(t.properties=structuredClone(e.properties)),t}function bt(e,t){let n=e,r=t;for(let e of gt)n[e]!==void 0&&(r[e]=n[e])}function xt(e){if(!e||!e.filters)return{condition:`and`,filters:[],subGroups:[]};let t=[],n=[];for(let r of e.filters)if(_t(r))n.push(xt(r));else{let e=yt(r);e&&t.push(e)}let r={condition:B(e.condition),filters:t,subGroups:n};return e.id!==void 0&&(r.id=e.id),bt(e,r),r}function St(e,t){return e?t?.format===`clean`?ht(e):[xt(e)]:[]}function Ct(e,t){let n={expression:typeof e.expression==`string`?e.expression:void 0,parameters:Array.isArray(e.parameters)?[...e.parameters]:[]},r=P(e.properties)?structuredClone(e.properties):{};return t!==void 0&&r.type===void 0&&(r.type=t),Object.keys(r).length>0&&(n.properties=r),n}function wt(e,t,n){if(F(e))return Tt(e,t,n);if(!P(e))return;let r=e.expression;if(Ve(e),ze(e))return ct(e,t);if(Le(e)&&He(e),Be(e))return Ct(e,t);throw new N(`Filter leaf "${String(r)}" matches neither a complete clean nor a complete canonical encoding.`)}function Tt(e,t,n){I(n);let r=Ue(e.clause)?e.clause:void 0,i=r??t,a=[];for(let t of Array.isArray(e.filters)?e.filters:[]){let e=wt(t,i,n+1);e!==void 0&&a.push(e)}for(let t of Array.isArray(e.subGroups)?e.subGroups:[])F(t)&&a.push(Tt(t,i,n+1));let o={condition:B(e.condition),filters:a};return typeof e.id==`string`&&(o.id=e.id),r!==void 0&&(o.clause=r),bt(e,o),o}function Et(e){return!e||e.length===0?[]:e.filter(e=>F(e)).map(e=>Tt(e,void 0,1))}var Dt=`:host{font-family:var(--luzmo-font-family)}luzmo-select{width:100%}:host{--var:blue}`,V=class extends t(S(x,{validSizes:Object.values(b)})){constructor(...e){super(...e),this.hasLabel=!1,this.allowEmpty=!1,this.placeholder=``,this.disabled=!1,this.readonly=!1,this.quiet=!1,this.invalid=!1,this.isFormula=!1,this._expressionConfigurations=T()}static get styles(){return[y(Dt)]}_sendChangeEvent(){if(this.disabled||this.readonly)return;let e={expression:this.filter?.expression};this.filter?.parameters?.[1]?.unit&&(e.unit=this.filter?.parameters?.[1]?.unit),this.dispatchEvent(new CustomEvent(`luzmo-expression-selected`,{bubbles:!0,composed:!0,cancelable:!0,detail:e}))}setExpression(e){this._richExpression=e?.detail?.value?.[0];let t=this._expressionConfigurations.find(e=>e.id===this._richExpression),n=structuredClone(this.filter);n.expression=t?.expression,t?.unit&&(this._unit=t.unit,n?.parameters[0]&&(n.parameters[1]={unit:this._unit})),this.filter=n,this._sendChangeEvent()}willUpdate(e){super.willUpdate(e);let t=e.has(`filter`),n=e.has(`type`),r=e.has(`subtype`),i=e.has(`isFormula`),a=ae(this.type,this.subtype,this.isFormula),o=[`YTD`,`QTD`,`MTD`,`WTD`];if(this.filter?.expression===`to_date`){let e=this.filter?.parameters[1]?.unit??1;this._unit=e,this._richExpression=o[e-1]??`YTD`}else this._richExpression=this.filter?.expression;(n||r||i||t)&&this.filter&&!this.disabled&&!this.readonly&&!a?.find(e=>e.expression===this.filter?.expression)?(this.invalid=!0,console.warn(`Warning: ${this.filter?.expression} is not valid given the type: ${this.type} and subtype: ${this.subtype}`)):this.invalid=!1,!this.filter?.expression&&!this.allowEmpty&&(this._richExpression=a?.[0]?.id,this.filter={...this.filter,expression:this._richExpression},this._sendChangeEvent())}render(){let e=ae(this.type,this.subtype,this.isFormula)?.map(e=>({value:e.id,label:e.description,shortLabel:e.tiny})),t=this.disabled||!this.filter?.expression&&!this.allowEmpty,r=h`<luzmo-field-label
|
|
2
|
+
import{n as e,t}from"./localized-mixin-D3GVo182.js";import{n,r}from"./lit-localize-CIGP-NUw.js";import{t as i}from"./localized-decorator-Buib6Rq1.js";import{t as a}from"./luzmoTrashOutline-DXZpJx7f.js";import{n as o,r as s,t as c}from"./calculate-data-field-icon-CrEVAfzJ.js";import{t as l}from"./luzmoPlus-Dyrrz0v8.js";import{t as u}from"./luzmo-icon-markup-27PRW8QM.js";import{t as d}from"./v4-CI0qP0ur.js";import{n as f}from"./data-broker-Dgg5mQze.js";import{c as ee}from"./type-check-CC6bgirK.js";import{t as p}from"./localize-BXHWaHdZ.js";import{n as m}from"./periods.const-Cie50jR4.js";import"./load-data-fields-for-datasets-DWys6Xqn.js";import{html as h,ifDefined as te,nothing as g,property as _,query as ne,repeat as re,state as v,unsafeCSS as y}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/progress-circle.js";import{ElementSizes as b,LuzmoElement as x,SizedMixin as S}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/utils.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/tooltip.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/divider.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/menu.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/badge.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/select.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/options.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/tags.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/text-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/date-time-picker.js";var C=[``,``,``],ie=``;function w(e,t){let n=RegExp(`(${C.join(`|`)})`,`u`),r=[];for(let i of e.replaceAll(ie,``).split(n)){let e=C.indexOf(i);e===-1?i&&r.push(i):r.push(t[e])}return r}var T=()=>[{id:`? = ?`,key:`? = ?`,expression:`? = ?`,name:n(`equals`,{desc:`Filter expression for equals comparison`}),description:n(`equals`,{desc:`Filter expression for equals comparison`}),tiny:n(`eq`,{desc:`Short form of equals comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? != ?`,key:`? != ?`,expression:`? != ?`,name:n(`not equals`,{desc:`Filter expression for not equals comparison`}),description:n(`not equals`,{desc:`Filter expression for not equals comparison`}),tiny:n(`not eq`,{desc:`Short form of not equals comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? in ?`,key:`? in ?`,expression:`? in ?`,name:n(`is in`,{desc:`Filter expression for in comparison`}),description:n(`is in`,{desc:`Filter expression for in comparison`}),tiny:n(`is in`,{desc:`Filter expression for in comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? not in ?`,key:`? not in ?`,expression:`? not in ?`,name:n(`is not in`,{desc:`Filter expression for not in comparison`}),description:n(`is not in`,{desc:`Filter expression for not in comparison`}),tiny:n(`is not in`,{desc:`Filter expression for not in comparison`}),type:[`numeric`,`hierarchy`],subtype:[`ip_address`]},{id:`? like ?`,key:`? like ?`,expression:`? like ?`,name:n(`contains`,{desc:`Filter expression for contains comparison`}),description:n(`contains`,{desc:`Filter expression for contains comparison`}),tiny:n(`cont`,{desc:`Short form of contains comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? not like ?`,key:`? not like ?`,expression:`? not like ?`,name:n(`does not contain`,{desc:`Filter expression for does not contain comparison`}),description:n(`does not contain`,{desc:`Filter expression for does not contain comparison`}),tiny:n(`not cont`,{desc:`Short form of does not contain comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? starts with ?`,key:`? starts with ?`,expression:`? starts with ?`,name:n(`starts with`,{desc:`Filter expression for starts with comparison`}),description:n(`starts with`,{desc:`Filter expression for starts with comparison`}),tiny:n(`starts with`,{desc:`Filter expression for starts with comparison`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? not starts with ?`,key:`? not starts with ?`,expression:`? not starts with ?`,name:n(`does not start with`,{desc:`Filter expression for does not start with comparison`}),description:n(`does not start with`,{desc:`Filter expression for does not start with comparison`}),tiny:n(`not starts with`,{desc:`Short form of does not start with comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? ends with ?`,key:`? ends with ?`,expression:`? ends with ?`,name:n(`ends with`,{desc:`Filter expression for ends with comparison`}),description:n(`ends with`,{desc:`Filter expression for ends with comparison`}),tiny:n(`ends with`,{desc:`Filter expression for ends with comparison`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? not ends with ?`,key:`? not ends with ?`,expression:`? not ends with ?`,name:n(`does not end with`,{desc:`Filter expression for does not end with comparison`}),description:n(`does not end with`,{desc:`Filter expression for does not end with comparison`}),tiny:n(`not ends with`,{desc:`Short form of does not end with comparison in filter expression`}),type:[`hierarchy`],subtype:[`ip_address`]},{id:`? < ?`,key:`? < ?`,expression:`? < ?`,name:n(`less than`,{desc:`Filter expression for less than comparison`}),description:n(`less than`,{desc:`Filter expression for less than comparison`}),tiny:`<`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? <= ?`,key:`? <= ?`,expression:`? <= ?`,name:n(`less than or equal`,{desc:`Filter expression for less than or equal comparison`}),description:n(`less than or equal`,{desc:`Filter expression for less than or equal comparison`}),tiny:`<=`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? > ?`,key:`? > ?`,expression:`? > ?`,name:n(`greater than`,{desc:`Filter expression for greater than comparison`}),description:n(`greater than`,{desc:`Filter expression for greater than comparison`}),tiny:`>`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? >= ?`,key:`? >= ?`,expression:`? >= ?`,name:n(`greater than or equal`,{desc:`Filter expression for greater than or equal comparison`}),description:n(`greater than or equal`,{desc:`Filter expression for greater than or equal comparison`}),tiny:`>=`,type:[`numeric`,`datetime`],subtype:[`ip_address`]},{id:`? between ?`,key:`? between ?`,expression:`? between ?`,name:n(`is between`,{desc:`Filter expression for between comparison`}),description:n(`is between`,{desc:`Filter expression for between comparison`}),tiny:n(`between`,{desc:`Short form of between comparison in filter expression`}),type:[],subtype:[`ip_address`]},{id:`last_now`,key:`last_now`,expression:`last_now`,name:n(`last (x) periods`,{desc:`Filter expression for last (x) periods`}),description:n(`last (x) periods`,{desc:`Filter expression for last (x) periods`}),tiny:n(`last`,{desc:`Short form of last (x) periods in filter expression`}),type:[`datetime`]},{id:`last_available`,key:`last_available`,expression:`last_available`,name:n(`last (x) available periods`,{desc:`Filter expression for last (x) available periods`}),description:n(`last (x) available periods`,{desc:`Filter expression for last (x) available periods`}),tiny:n(`last available`,{desc:`Short form of last (x) available periods in filter expression`}),type:[`datetime`]},{id:`last_completed`,key:`last_completed`,expression:`last_completed`,name:n(`last completed period`,{desc:`Filter expression for last completed period`}),description:n(`last completed (period)`,{desc:`Filter expression for last completed period`}),tiny:n(`last completed`,{desc:`Short form of last completed period in filter expression`}),type:[`datetime`]},{id:`next_now`,key:`next_now`,expression:`next_now`,name:n(`next (x) periods`,{desc:`Filter expression for next (x) periods`}),description:n(`next (x) periods`,{desc:`Filter expression for next (x) periods`}),tiny:n(`next`,{desc:`Short form of next (x) periods in filter expression`}),type:[`datetime`]},{id:`more_than_ago`,key:`more_than_ago`,expression:`more_than_ago`,name:n(`more than (x) periods ago`,{desc:`Filter expression for more than (x) periods ago`}),description:n(`more than (x) periods ago`,{desc:`Filter expression for more than (x) periods ago`}),tiny:n(`more than ago`,{desc:`Short form of more than (x) periods ago in filter expression`}),type:[`datetime`]},{id:`or_more_ago`,key:`or_more_ago`,expression:`or_more_ago`,name:n(`(x) periods or more ago`,{desc:`Filter expression for (x) periods or more ago`}),description:n(`(x) periods or more ago`,{desc:`Filter expression for (x) periods or more ago`}),tiny:n(`or more ago`,{desc:`Short form of (x) periods or more ago in filter expression`}),type:[`datetime`]},{id:`next_full`,key:`next_full`,expression:`next_full`,name:n(`next full (period)`,{desc:`Filter expression for next full period`}),description:n(`next full (period)`,{desc:`Filter expression for next full period`}),tiny:n(`next full`,{desc:`Short form of next full period in filter expression`}),type:[`datetime`]},{id:`WTD`,key:`to_date`,expression:`to_date`,unit:4,name:n(`week to date`,{desc:`Filter expression for week to date`}),description:n(`week to date`,{desc:`Filter expression for week to date`}),tiny:n(`WTD`,{desc:`Short form of week to date in filter expression`}),type:[`datetime`]},{id:`MTD`,key:`to_date`,expression:`to_date`,unit:3,name:n(`month to date`,{desc:`Filter expression for month to date`}),description:n(`month to date`,{desc:`Filter expression for month to date`}),tiny:n(`MTD`,{desc:`Short form of month to date in filter expression`}),type:[`datetime`]},{id:`QTD`,key:`to_date`,expression:`to_date`,unit:2,name:n(`quarter to date`,{desc:`Filter expression for quarter to date`}),description:n(`quarter to date`,{desc:`Filter expression for quarter to date`}),tiny:n(`QTD`,{desc:`Short form of quarter to date in filter expression`}),type:[`datetime`]},{id:`YTD`,key:`to_date`,expression:`to_date`,unit:1,name:n(`year to date`,{desc:`Filter expression for year to date`}),description:n(`year to date`,{desc:`Filter expression for year to date`}),tiny:n(`YTD`,{desc:`Short form of year to date in filter expression`}),type:[`datetime`]},{id:`? is null`,key:`? is null`,expression:`? is null`,name:n(`is missing`,{desc:`Filter expression for is missing`}),description:n(`is missing`,{desc:`Filter expression for is missing`}),tiny:n(`missing`,{desc:`Short form of is missing in filter expression`}),type:[`numeric`,`datetime`,`hierarchy`,`spatial`],subtype:[`ip_address`]},{id:`? is not null`,key:`? is not null`,expression:`? is not null`,name:n(`is not missing`,{desc:`Filter expression for is not missing`}),description:n(`is not missing`,{desc:`Filter expression for is not missing`}),tiny:n(`not missing`,{desc:`Short form of is not missing in filter expression`}),type:[`numeric`,`datetime`,`hierarchy`,`spatial`],subtype:[`ip_address`]}],ae=(e,t,n)=>{let r=new Set([`? in ?`,`? not in ?`]);return!e&&!t?T():T().filter(i=>(e&&i.type.includes(e)||t&&i.subtype?.includes(t))&&!(n&&r.has(i.key)))},oe=new Set([`last_now`,`last_available`,`next_now`,`more_than_ago`,`or_more_ago`]),se=new Set([`last_completed`,`next_full`]),ce=new Set([`? is null`,`? is not null`,`to_date`]),le=new Set([`? = ?`,`? != ?`,`? < ?`,`? <= ?`,`? > ?`,`? >= ?`]),ue=3,de=32;function E(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function D(e){return E(e)?typeof e.columnId==`string`||typeof e.column_id==`string`||typeof e.formulaId==`string`||typeof e.formula_id==`string`||typeof e.formula==`string`||(typeof e.datasetId==`string`||typeof e.dataset_id==`string`)&&(e.columnExpression!==void 0||e.expression!==void 0):!1}function fe(e){return e.length<=de?{display:e,truncated:!1}:{display:`${e.slice(0,de-1)}…`,truncated:!0}}function pe(e,t,n){try{return new Intl.ListFormat(e||void 0,{style:`long`,type:n}).format(t)}catch{return t.join(`, `)}}function O(e,t,n){let r=Te(e,t,n),{display:i,truncated:a}=fe(r);return{label:i,full:r,truncated:a}}function me(e){return e===1?n(`1 item`,{desc:`One selected hierarchy value whose name is still loading`}):n(r`${e} items`,{desc:`Selected hierarchy values whose names are still loading`})}function he(){return n(`Some item names could not be retrieved`,{desc:`Tooltip when a hierarchy filter value is still an id after name lookup`})}function ge(e,t){return!!(t?.type===`hierarchy`&&t.datasetId&&t.fieldId&&!(E(e)&&e.name!==void 0)&&M(e))}function _e(e,t,n){let r=n?.datasetId,i=n?.fieldId;return!r||!i?[]:e.flatMap(e=>{if(!ge(e,n))return[];let a=M(e);return a?t.hierarchyLabels?.get(j(r,i,a))?[]:[a]:[]})}function ve(e,t,n){return n.hierarchyLabelsLoading&&t.length>0?{valueText:me(t.length),valuePending:!0}:n.hierarchyLabels&&!n.hierarchyLabelsLoading&&t.length>0&&!e.valueTooltip?{...e,valueTooltip:he()}:e}function ye(e,t,i){let a=e.map(e=>O(e,t,i)),o=a.map(e=>e.full),s=pe(t.contentLanguage,o,`conjunction`);if(e.length===1){let[e]=a;return{valueText:e.label,valueTooltip:e.truncated?e.full:void 0}}let c=Math.min(ue,a.length),l=a.length-c,u=a.slice(0,c).map(e=>e.label),d=a.some(e=>e.truncated),f;return f=l>0?n(r`${pe(t.contentLanguage,u,`unit`)}, and ${l} more`,{desc:`Filter values after the first few shown in a read-only sentence, e.g. "Dresses, Shoes, Shorts, and 1 more"`}):pe(t.contentLanguage,a.map(e=>e.label),`conjunction`),{valueText:f,valueTooltip:l>0||d?s:void 0}}function k(e,t,n){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`){let t=String(e);return t.length>0?t:n}if(e&&typeof e==`object`){let n=p(e,t);if(n)return n}return n}function be(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function A(e,t){let n=be(e,[`datasetId`,`dataset_id`]),r=be(e,[`columnId`,`column_id`]),i=be(e,[`formulaId`,`formula_id`]),a=typeof e.formula==`string`?e.formula:void 0,o=t.datasets.find(e=>e.id===n),s=o?k(o.name,t.contentLanguage,``):``;if(i){let e=o?.formulas?.find(e=>e.id===i),r=k(e?.name,t.contentLanguage,i);return{label:r,tooltip:s?`${s} · ${r}`:r,type:e?.type,subtype:e?.subtype,formula:!0,datasetId:n,fieldId:i}}if(a)return{label:a,tooltip:s?`${s} · ${a}`:a,formula:!0,datasetId:n};let c=!r&&typeof e.expression==`string`?e.expression:void 0;if(c)return{label:c,tooltip:s?`${s} · ${c}`:c,formula:!0,datasetId:n};let l=r?o?.columns?.find(e=>e.id===r):void 0,u=r??(typeof e.columnExpression==`string`?e.columnExpression:``),d=k(l?.name,t.contentLanguage,u);return{label:d,tooltip:s?`${s} · ${d}`:d,type:l?.type,subtype:l?.subtype,formula:!1,datasetId:n,fieldId:r}}function xe(e){let t=m.find(t=>t.level===e);return t?t.i18n():``}function Se(e,t){switch(t){case 1:return e===1?n(r`${e} Year`,{desc:`Singular relative filter quantity in years`}):n(r`${e} Years`,{desc:`Plural relative filter quantity in years`});case 2:return e===1?n(r`${e} Quarter`,{desc:`Singular relative filter quantity in quarters`}):n(r`${e} Quarters`,{desc:`Plural relative filter quantity in quarters`});case 3:return e===1?n(r`${e} Month`,{desc:`Singular relative filter quantity in months`}):n(r`${e} Months`,{desc:`Plural relative filter quantity in months`});case 4:return e===1?n(r`${e} Week`,{desc:`Singular relative filter quantity in weeks`}):n(r`${e} Weeks`,{desc:`Plural relative filter quantity in weeks`});case 5:return e===1?n(r`${e} Day`,{desc:`Singular relative filter quantity in days`}):n(r`${e} Days`,{desc:`Plural relative filter quantity in days`});case 6:return e===1?n(r`${e} Hour`,{desc:`Singular relative filter quantity in hours`}):n(r`${e} Hours`,{desc:`Plural relative filter quantity in hours`});case 7:return e===1?n(r`${e} Minute`,{desc:`Singular relative filter quantity in minutes`}):n(r`${e} Minutes`,{desc:`Plural relative filter quantity in minutes`});case 8:return e===1?n(r`${e} Second`,{desc:`Singular relative filter quantity in seconds`}):n(r`${e} Seconds`,{desc:`Plural relative filter quantity in seconds`});case 9:return e===1?n(r`${e} Millisecond`,{desc:`Singular relative filter quantity in milliseconds`}):n(r`${e} Milliseconds`,{desc:`Plural relative filter quantity in milliseconds`});default:return n(r`${e}`,{desc:`Relative filter quantity`})}}function Ce(e,t){let n=new Date(e);if(Number.isNaN(n.getTime()))return e;try{return new Intl.DateTimeFormat(t.contentLanguage||void 0,{dateStyle:`medium`,timeStyle:`short`,...t.timeZone?{timeZone:t.timeZone}:{}}).format(n)}catch{return e}}function we(e){return/^\d{4}-\d{2}-\d{2}(?:T|$)/.test(e)}function j(e,t,n){return`${e}:${t}:${n}`}function M(e){if(typeof e==`string`||typeof e==`number`)return String(e);if(E(e)&&(typeof e.id==`string`||typeof e.id==`number`))return String(e.id)}function Te(e,t,n){if(n?.type===`hierarchy`&&n.datasetId&&n.fieldId&&!(E(e)&&e.name!==void 0)){let r=M(e),i=r===void 0?void 0:t.hierarchyLabels?.get(j(n.datasetId,n.fieldId,r));if(i)return i}if(typeof e==`number`&&Number.isFinite(e))return new Intl.NumberFormat(t.contentLanguage||void 0).format(e);if(typeof e==`string`)return we(e)?Ce(e,t):e;if(typeof e==`boolean`)return String(e);if(E(e)){if(typeof e.parameter==`string`)return e.parameter;if(e.name!==void 0){let n=k(e.name,t.contentLanguage,``);if(n)return n}if(typeof e.id==`string`||typeof e.id==`number`)return String(e.id)}return``}function Ee(e,t){let n=T().filter(t=>t.expression===e),r=E(t)&&typeof t.unit==`number`?t.unit:void 0;return(e===`to_date`&&r!==void 0?n.find(e=>e.unit===r)??n[0]:n[0])?.tiny??e}function De(e,t,i,a){if(ce.has(e)||t==null)return{valueText:``};if(E(t)&&typeof t.parameter==`string`){let e=t.parameter;if(!D(t))return{valueText:e}}if(le.has(e)&&D(t))return{valueText:``,valueField:A(t,i)};if(e===`? between ?`&&Array.isArray(t)&&t.length===2){let e=O(t[0],i,a),o=O(t[1],i,a);return ve({valueText:n(r`${e.label} and ${o.label}`,{desc:`Inclusive range shown between two filter values`}),valueTooltip:e.truncated||o.truncated?n(r`${e.full} and ${o.full}`,{id:`filter-range-tooltip`,desc:`Full inclusive range shown in a tooltip`}):void 0},_e(t,i,a),i)}if(oe.has(e)&&E(t))return{valueText:Se(typeof t.quantity==`number`?t.quantity:1,t.unit)};if(se.has(e)&&E(t))return{valueText:xe(t.unit)};if(Array.isArray(t))return t.length===0?{valueText:``}:ve(ye(t,i,a),_e(t,i,a),i);let o=O(t,i,a);return ve({valueText:o.label,valueTooltip:o.truncated?o.full:void 0},_e([t],i,a),i)}function Oe(e,t){let n=e.parameters?.[0];if(!E(n)||!D(n))return null;let r=A(n,t),i=typeof e.expression==`string`?e.expression:``,a=e.parameters?.[1];return{field:r,expression:i?Ee(i,a):``,...De(i,a,t,r)}}function ke(e){return`condition`in e&&`filters`in e}function Ae(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(Ae);if(E(e)){if(typeof e.parameter==`string`||e.name!==void 0||D(e))return[];let t=M(e);return t?[t]:[]}let t=M(e);return t?[t]:[]}function je(e,t){let n=new Map,r=e=>{if(ke(e)){e.filters.forEach(r);return}let i=e.parameters?.[0];if(!E(i)||!D(i))return;let a=A(i,t);if(a.type!==`hierarchy`||!a.datasetId||!a.fieldId)return;let o=[...new Set(Ae(e.parameters?.[1]))];if(o.length===0)return;let s=`${a.datasetId}:${a.fieldId}`,c=n.get(s);if(c){c.ids=[...new Set([...c.ids,...o])];return}n.set(s,{datasetId:a.datasetId,...a.formula?{formulaId:a.fieldId}:{columnId:a.fieldId},ids:o})};return r(e),[...n.values()]}async function Me(e,t){let n=new Map;return await Promise.all(e.map(async e=>{let r={dataset_id:e.datasetId,column_id:e.columnId,formula_id:e.formulaId},i=await f.fetchData({dimensions:[r],where:[{expression:`? in ?`,parameters:[r,e.ids]}],limit:{by:e.ids.length,offset:0}}),a=e.columnId??e.formulaId??``;for(let r of i.data??[]){let i=r[0],o=i&&typeof i==`object`&&`id`in i?String(i.id):String(i),s=i&&typeof i==`object`&&`name`in i?p(i.name,t):``;s&&n.set(j(e.datasetId,a,o),s)}})),n}var Ne=20,N=class extends Error{constructor(e){super(e),this.name=`FilterUnrepresentableError`}},Pe=new Set([`and`,`or`]),Fe=[`datasetId`,`dataset_id`,`columnId`,`column_id`,`formulaId`,`formula_id`,`formula`,`columnExpression`,`value`,`ignoredItemIds`];function P(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function F(e){return!P(e)||e.condition!==void 0&&(typeof e.condition!=`string`||!Pe.has(e.condition.toLowerCase()))?!1:`filters`in e||`subGroups`in e}function Ie(e){return P(e)&&`expression`in e&&!(`condition`in e)}function Le(e){return Fe.some(t=>t in e)}function Re(e,t=!1){let n=[e.columnId!==void 0||e.column_id!==void 0,e.formulaId!==void 0||e.formula_id!==void 0,e.formula!==void 0].filter(Boolean).length;return n===1?!0:n>1?!1:e.columnExpression!==void 0||t&&e.expression!==void 0}function ze(e){return!Ie(e)||typeof e.expression!=`string`||e.expression.length===0||`parameters`in e||typeof e.datasetId!=`string`&&typeof e.dataset_id!=`string`?!1:Re(e)}function Be(e){return!Ie(e)||!Array.isArray(e.parameters)?!1:!Le(e)}function Ve(e){if(!(`parameters`in e))return;let t=Fe.find(t=>t in e);if(t!==void 0)throw new N(`Filter leaf mixes "parameters" with the clean inline key "${t}".`)}function He(e){throw typeof e.expression!=`string`||e.expression.length===0?new N(`Clean filter leaf is missing a non-empty "expression".`):typeof e.datasetId!=`string`&&typeof e.dataset_id!=`string`?new N(`Clean filter leaf "${e.expression}" is missing a "datasetId".`):new N(`Clean filter leaf "${e.expression}" must name exactly one of "columnId", "formulaId", "formula", or "columnExpression".`)}function Ue(e){return e===`where`||e===`having`}function I(e){if(e>20)throw new N(`Filter nesting exceeds the maximum depth of 20.`)}function We(e){if(e==null)return`empty`;if(!Array.isArray(e))return`unknown`;if(e.length===0)return`empty`;let t=!1,n=!1,r=!1,i=(e,a)=>{if(a>20){r=!0;return}if(F(e)){Ue(e.clause)&&(n=!0);let t=[...Array.isArray(e.filters)?e.filters:[],...Array.isArray(e.subGroups)?e.subGroups:[]];for(let e of t)i(e,a+1);return}if(Ie(e)){`parameters`in e&&Le(e)?r=!0:ze(e)?n=!0:Be(e)?t=!0:r=!0;return}r=!0};for(let t of e)i(t,1);return r?`unknown`:n&&t?`mixed`:n?`clean`:t?`canonical`:`empty`}var Ge=new Set([`? is null`,`? is not null`]),Ke=new Set([`? = ?`,`? != ?`,`? < ?`,`? <= ?`,`? > ?`,`? >= ?`]),qe=new Set([`? in ?`,`? not in ?`,`? between ?`]),Je={"array[numeric]":`numeric[]`,"array[hierarchy]":`hierarchy[]`,"array[datetime]":`datetime[]`},Ye=new Set([`level`,`lowestLevel`,`unnest`,`discretization`,`aggregation`,`index`,`include_nonoccurring`,`simplification`]);function L(e,t){return e!==`lowestLevel`&&!(t===null&&Ye.has(e))}function R(e){return structuredClone(e)}function Xe(e){let t=e.datasetId??e.dataset_id;if(typeof t!=`string`||t.length===0)throw new N(`Filter reference is missing a "datasetId".`);return t}function Ze(e){return P(e)?typeof e.columnId==`string`||typeof e.column_id==`string`||typeof e.formulaId==`string`||typeof e.formula_id==`string`||typeof e.formula==`string`||(typeof e.datasetId==`string`||typeof e.dataset_id==`string`)&&(e.columnExpression!==void 0||e.expression!==void 0):!1}function Qe(e){let t={type:e.type};return e.bins!==void 0&&(t.bins=e.bins),Array.isArray(e.over)&&(t.over=e.over.map(e=>at(e))),t}function $e(e){let t={type:e.type},n=e.datasetId??e.dataset_id,r=e.columnId??e.column_id;return n!==void 0&&(t.datasetId=n),r!==void 0&&(t.columnId=r),e.level!==void 0&&L(`level`,e.level)&&(t.level=e.level),P(e.discretization)&&(t.discretization=Qe(e.discretization)),e.unnest!==void 0&&L(`unnest`,e.unnest)&&(t.unnest=e.unnest),t}function et(e){let t={type:e.type};return e.bins!==void 0&&(t.bins=e.bins),Array.isArray(e.over)&&(t.over=e.over.map(e=>P(e)?it(e):e)),t}function tt(e){let t={type:e.type},n=e.datasetId??e.dataset_id,r=e.columnId??e.column_id;return n!==void 0&&(t.datasetId=n),r!==void 0&&(t.columnId=r),e.level!==void 0&&(t.level=e.level),P(e.discretization)&&(t.discretization=et(e.discretization)),e.unnest!==void 0&&(t.unnest=e.unnest),t}function nt(e,t){e.level!==void 0&&(t.level=R(e.level)),P(e.discretization)&&(t.discretization=et(e.discretization)),P(e.aggregation)&&(t.aggregation=tt(e.aggregation)),e.unnest!==void 0&&(t.unnest=R(e.unnest))}function rt(e,t){let n=e.columnId??e.column_id;if(n!==void 0)return{kind:`columnId`,value:n};let r=e.formulaId??e.formula_id;if(r!==void 0)return{kind:`formulaId`,value:r};if(e.formula!==void 0)return{kind:`formula`,value:e.formula};let i=e.columnExpression??(t?e.expression:void 0);if(i!==void 0)return{kind:`expression`,value:i}}function it(e,t=!0){let n={datasetId:Xe(e)},r=rt(e,t);return r!==void 0&&(r.kind===`expression`?n.expression=r.value:n[r.kind]=r.value),nt(e,n),n}function at(e){if(!P(e))throw new N(`Cannot emit a clean filter reference.`);let t={datasetId:Xe(e)};e.level!==void 0&&L(`level`,e.level)&&(t.level=e.level),P(e.discretization)&&(t.discretization=Qe(e.discretization)),P(e.aggregation)&&(t.aggregation=$e(e.aggregation)),e.unnest!==void 0&&L(`unnest`,e.unnest)&&(t.unnest=e.unnest);let n=rt(e,!0);if(n===void 0)throw new N(`Cannot emit a clean filter reference: no column, formula, or expression.`);return n.kind===`expression`?t.columnExpression=n.value:t[n.kind]=n.value,t}function ot(e){if(!P(e)||typeof e.parameter!=`string`||typeof e.type!=`string`)return e;let t=Je[e.type];return t===void 0?e:{...e,type:t}}function st(e,t){return P(t)&&typeof t.parameter==`string`?!0:Array.isArray(t)?e!==`? between ?`||t.length===2:!1}function ct(e,t){let n=e.expression,r=[it(e,!1)];if(!Ge.has(n)&&e.value!==void 0){let t=Ke.has(n)&&Ze(e.value);r.push(t?it(e.value):R(e.value))}let i={};typeof e.id==`string`&&(i.id=e.id),`ignoredItemIds`in e&&(i.ignore=R(e.ignoredItemIds)),t!==void 0&&(i.type=t);let a={expression:n,parameters:r};return Object.keys(i).length>0&&(a.properties=i),a}function lt(e){let{expression:t}=e;if(typeof t!=`string`||t.length===0)return null;let n=Array.isArray(e.parameters)?e.parameters:[];if(!P(n[0]))throw new N(`Cannot emit a clean filter reference for "${t}".`);let r={...at(n[0]),expression:t};if(!Ge.has(t)){let e=n[1];if(e===void 0)throw new N(`Filter "${t}" is missing its value operand.`);if(r.value=Ze(e)&&Ke.has(t)?at(e):ot(R(e)),qe.has(t)&&!st(t,r.value))throw new N(`Cannot emit an invalid clean filter value for "${t}".`)}let{properties:i}=e;return i?.id!==void 0&&(r.id=i.id),i!==void 0&&`ignore`in i&&(r.ignoredItemIds=R(i.ignore)),r}function ut(e){return F(e)}function dt(e){return Array.isArray(e.filters)?e.filters:[]}function ft(e,t){return e.properties?.type===`having`||e.properties?.type===`where`?e.properties.type:t??`where`}function z(e,t,n=1,r=new Set){I(n);let i=e.clause??t;for(let t of dt(e))ut(t)?z(t,i,n+1,r):typeof t.expression==`string`&&t.expression.length>0&&r.add(ft(t,i));return r}function pt(e,t,n=1){I(n);let r=e.clause??t;if(e.condition===`or`&&z(e,r,n).size>1)throw new N(`An "or" group mixes "where" and "having" filters, which clean output cannot represent.`);for(let t of dt(e))ut(t)&&pt(t,r,n+1)}function mt(e,t,n,r=1){I(r);let i=e.clause??n,a=[];for(let n of dt(e)){if(ut(n)){let e=mt(n,t,i,r+1);e.filters.length>0&&a.push(e);continue}if(ft(n,i)!==t)continue;let e=lt(n);e&&a.push(e)}let o={condition:e.condition===`or`?`or`:`and`,filters:a};return e.id!==void 0&&z(e,i,r).size<=1&&(o.id=e.id),o}function ht(e){let t=e.clause;pt(e,t);let n=z(e,t);return n.size===0&&n.add(t??`where`),[`where`,`having`].filter(e=>n.has(e)).map(n=>({...mt(e,n,t),clause:n})).filter(e=>e.filters.length>0)}var gt=[`origin`,`datasetId`,`vizId`,`itemId`,`isDrilldown`,`type`];function B(e){return typeof e==`string`&&e.toLowerCase()===`or`?`or`:`and`}function _t(e){return F(e)}function vt(e){if(!Array.isArray(e)||e.length===0)return[];let t=P(e[0])?e[0]:void 0,n=e.length>1?e[1]:void 0;return e.length>1?[t,n]:[t]}function yt(e){if(typeof e.expression!=`string`||e.expression.length===0)return null;let t={expression:e.expression,parameters:vt(e.parameters)};return e.properties!==void 0&&Object.keys(e.properties).length>0&&(t.properties=structuredClone(e.properties)),t}function bt(e,t){let n=e,r=t;for(let e of gt)n[e]!==void 0&&(r[e]=n[e])}function xt(e){if(!e||!e.filters)return{condition:`and`,filters:[],subGroups:[]};let t=[],n=[];for(let r of e.filters)if(_t(r))n.push(xt(r));else{let e=yt(r);e&&t.push(e)}let r={condition:B(e.condition),filters:t,subGroups:n};return e.id!==void 0&&(r.id=e.id),bt(e,r),r}function St(e,t){return e?t?.format===`clean`?ht(e):[xt(e)]:[]}function Ct(e,t){let n={expression:typeof e.expression==`string`?e.expression:void 0,parameters:Array.isArray(e.parameters)?[...e.parameters]:[]},r=P(e.properties)?structuredClone(e.properties):{};return t!==void 0&&r.type===void 0&&(r.type=t),Object.keys(r).length>0&&(n.properties=r),n}function wt(e,t,n){if(F(e))return Tt(e,t,n);if(!P(e))return;let r=e.expression;if(Ve(e),ze(e))return ct(e,t);if(Le(e)&&He(e),Be(e))return Ct(e,t);throw new N(`Filter leaf "${String(r)}" matches neither a complete clean nor a complete canonical encoding.`)}function Tt(e,t,n){I(n);let r=Ue(e.clause)?e.clause:void 0,i=r??t,a=[];for(let t of Array.isArray(e.filters)?e.filters:[]){let e=wt(t,i,n+1);e!==void 0&&a.push(e)}for(let t of Array.isArray(e.subGroups)?e.subGroups:[])F(t)&&a.push(Tt(t,i,n+1));let o={condition:B(e.condition),filters:a};return typeof e.id==`string`&&(o.id=e.id),r!==void 0&&(o.clause=r),bt(e,o),o}function Et(e){return!e||e.length===0?[]:e.filter(e=>F(e)).map(e=>Tt(e,void 0,1))}var Dt=`:host{font-family:var(--luzmo-font-family)}luzmo-select{width:100%}:host{--var:blue}`,V=class extends t(S(x,{validSizes:Object.values(b)})){constructor(...e){super(...e),this.hasLabel=!1,this.allowEmpty=!1,this.placeholder=``,this.disabled=!1,this.readonly=!1,this.quiet=!1,this.invalid=!1,this.isFormula=!1,this._expressionConfigurations=T()}static get styles(){return[y(Dt)]}_sendChangeEvent(){if(this.disabled||this.readonly)return;let e={expression:this.filter?.expression};this.filter?.parameters?.[1]?.unit&&(e.unit=this.filter?.parameters?.[1]?.unit),this.dispatchEvent(new CustomEvent(`luzmo-expression-selected`,{bubbles:!0,composed:!0,cancelable:!0,detail:e}))}setExpression(e){this._richExpression=e?.detail?.value?.[0];let t=this._expressionConfigurations.find(e=>e.id===this._richExpression),n=structuredClone(this.filter);n.expression=t?.expression,t?.unit&&(this._unit=t.unit,n?.parameters[0]&&(n.parameters[1]={unit:this._unit})),this.filter=n,this._sendChangeEvent()}willUpdate(e){super.willUpdate(e);let t=e.has(`filter`),n=e.has(`type`),r=e.has(`subtype`),i=e.has(`isFormula`),a=ae(this.type,this.subtype,this.isFormula),o=[`YTD`,`QTD`,`MTD`,`WTD`];if(this.filter?.expression===`to_date`){let e=this.filter?.parameters[1]?.unit??1;this._unit=e,this._richExpression=o[e-1]??`YTD`}else this._richExpression=this.filter?.expression;(n||r||i||t)&&this.filter&&!this.disabled&&!this.readonly&&!a?.find(e=>e.expression===this.filter?.expression)?(this.invalid=!0,console.warn(`Warning: ${this.filter?.expression} is not valid given the type: ${this.type} and subtype: ${this.subtype}`)):this.invalid=!1,!this.filter?.expression&&!this.allowEmpty&&(this._richExpression=a?.[0]?.id,this.filter={...this.filter,expression:this._richExpression},this._sendChangeEvent())}render(){let e=ae(this.type,this.subtype,this.isFormula)?.map(e=>({value:e.id,label:e.description,shortLabel:e.tiny})),t=this.disabled||!this.filter?.expression&&!this.allowEmpty,r=h`<luzmo-field-label
|
|
3
3
|
for="expression"
|
|
4
4
|
size=${this.size}
|
|
5
5
|
>${this.label??n(`Select an expression`,{desc:`Label for expression picker`})}</luzmo-field-label
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import{a as e,f as t,g as n,i as r,m as i,n as a,o,p as s,r as c,s as l,t as u,x as d}from"./load-formula-codemirror-
|
|
2
|
+
import{a as e,f as t,g as n,i as r,m as i,n as a,o,p as s,r as c,s as l,t as u,x as d}from"./load-formula-codemirror-BP6dGYyV.js";import{n as f,t as p}from"./localized-mixin-D3GVo182.js";import{n as m}from"./lit-localize-CIGP-NUw.js";import{t as h}from"./localized-decorator-Buib6Rq1.js";import{t as g}from"./luzmoAngleDown-PNrItYzK.js";import{t as _}from"./luzmoAngleLeft-ebJO7ROy.js";import{t as v}from"./calculate-data-field-icon-CrEVAfzJ.js";import{t as y}from"./luzmo-icon-markup-27PRW8QM.js";import{r as ee}from"./base-DetXzglI.js";import{t as b}from"./localize-BXHWaHdZ.js";import{html as x,nothing as S,property as C,query as te,state as ne,unsafeCSS as re}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/progress-circle.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/tooltip.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.5.1/standalone/select.js";var ie={icon:[32,32,`m 24.70005,9.3 -9,-9 a 1,1 0 0 0 -1.4,0 l -9,9 c -1,1 0.5,2.3 1.4,1.4 l 7.3,-7.3 V 31 c 0,1.3 2,1.3 2,0 V 3.4 l 7.3,7.3 c 1,1 2.3,-0.5 1.4,-1.4 z`],name:`arrow-up`},ae={icon:[32,32,`m 24.70005,22.7 -9,9 a 1,1 0 0 1 -1.4,0 l -9,-9 c -1,-1 0.5,-2.3 1.4,-1.4 l 7.3,7.3 V 1 c 0,-1.3 2,-1.3 2,0 v 27.6 l 7.3,-7.3 c 1,-1 2.3,0.5 1.4,1.4 z`],name:`arrow-down`},oe={icon:[32,32,`m6 6 16 16M5.3 6.7l9.3 9.3-9.3 9.3c-1 1 .5 2.3 1.4 1.4l9.3-9.3 9.3 9.3c1 1 2.3-.5 1.4-1.4L17.4 16l9.3-9.3c1-1-.5-2.3-1.4-1.4L16 14.6 6.7 5.3c-.9-1-2.3.5-1.4 1.4Z`],name:`close-16`},se=[],ce=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?ce:se).push(n+=e[t])})();function le(e){if(e<768)return!1;for(let t=0,n=se.length;;){let r=t+n>>1;if(e<se[r])n=r;else if(e>=ce[r])t=r+1;else return!0;if(t==n)return!1}}function ue(e){return e>=127462&&e<=127487}var de=8205;function fe(e,t,n=!0,r=!0){return(n?pe:me)(e,t,r)}function pe(e,t,n){if(t==e.length)return t;t&&ge(e.charCodeAt(t))&&_e(e.charCodeAt(t-1))&&t--;let r=he(e,t);for(t+=ve(r);t<e.length;){let i=he(e,t);if(r==de||i==de||n&&le(i))t+=ve(i),r=i;else if(ue(i)){let n=0,r=t-2;for(;r>=0&&ue(he(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function me(e,t,n){for(;t>1;){let r=pe(e,t-2,n);if(r<t)return r;t--}return 0}function he(e,t){let n=e.charCodeAt(t);if(!_e(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ge(r)?(n-55296<<10)+(r-56320)+65536:n}function ge(e){return e>=56320&&e<57344}function _e(e){return e>=55296&&e<56320}function ve(e){return e<65536?1:2}var w=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Oe(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),be.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Oe(this,e,t);let n=[];return this.decompose(e,t,n,0),be.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new we(this),i=new we(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new we(this,e)}iterRange(e,t=this.length){return new Te(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Ee(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new ye(t):be.from(ye.split(t,[]))}},ye=class e extends w{constructor(e,t=xe(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new De(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(Ce(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=Se(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=Oe(this,t,n);let i=Se(this.text,Se(r.text,Ce(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):be.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
3
3
|
`){[e,t]=Oe(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},be=class e extends w{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=Oe(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
4
4
|
`){[e,t]=Oe(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new ye(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof ye&&c&&(n=u[u.length-1])instanceof ye&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new ye(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};w.empty=new ye([``],0);function xe(e){let t=-1;for(let n of e)t+=n.length+1;return t}function Se(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function Ce(e,t,n){return Se(e,[``],t,n)}var we=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof ye?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof ye?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
5
5
|
`,this;e--}else if(r instanceof ye){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof ye?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Te=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new we(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},Ee=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(w.prototype[Symbol.iterator]=function(){return this.iter()},we.prototype[Symbol.iterator]=Te.prototype[Symbol.iterator]=Ee.prototype[Symbol.iterator]=function(){return this});var De=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Oe(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function T(e,t,n=!0,r=!0){return fe(e,t,n,r)}function ke(e){return e>=56320&&e<57344}function Ae(e){return e>=55296&&e<56320}function je(e,t){let n=e.charCodeAt(t);if(!Ae(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ke(r)?(n-55296<<10)+(r-56320)+65536:n}function Me(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function Ne(e){return e<65536?1:2}var Pe=/\r\n?|\n/,Fe=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(Fe||={}),Ie=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){ze(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:Ve(this,e)}mapDesc(e,t=!1){return e.empty?this:Be(this,e,t)}mapPos(e,t=-1,n=Fe.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=Fe.Simple&&c>=e&&(n==Fe.TrackDel&&r<e&&c>e||n==Fe.TrackBefore&&r<e||n==Fe.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},Le=class e extends Ie{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return ze(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return Be(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(w.empty);r.push(a?t.slice(i,i+a):w.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:Ve(this,e,!0)}map(e,t=!1){return e.empty?this:Be(this,e,t,!0)}iterChanges(e,t=!1){ze(this,e,t)}get desc(){return Ie.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new He(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);E(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;E(n,e,t),t>0&&Re(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);E(n,e,-1),E(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:Ie.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&E(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?w.of(l.split(r||Pe)):l:w.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&E(i,e-o,-1),E(i,s-e,d),Re(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(w.empty);r[e]=w.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function E(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function Re(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(w.empty);e.push(n)}}function ze(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=w.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function Be(e,t,n,r=!1){let i=[],a=r?[]:null,o=new He(e),s=new He(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);E(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(E(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(E(i,0,o.ins),a&&Re(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;E(i,t,e<o.i?o.ins:0),a&&e<o.i&&Re(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?Le.createSet(i,a):Ie.create(i);else throw Error(`Mismatched change set lengths`)}function Ve(e,t,n=!1){let r=[],i=n?[]:null,a=new He(e),o=new He(t);for(let e=!1;;)if(a.done&&o.done)return i?Le.createSet(r,i):Ie.create(r);else if(a.ins==0)E(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)E(r,0,o.ins,e),i&&Re(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;E(r,t,n,e),i&&n&&Re(i,r,o.text)}else o.ins==-1?(E(r,a.off?0:a.len,t,e),i&&Re(i,r,a.textBit(t))):(E(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&Re(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var He=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?w.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?w.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Ue=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return D.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return D.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return D.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},D=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>Ue.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return Ue.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?Ue.create(t,e,a|32,n):Ue.create(e,t,a,n)}static undirectionalRange(e,t){return Ue.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function We(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var Ge=0,O=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=Ge++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:Ke),!!t.static,t.enables)}of(e){return new qe([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new qe(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new qe(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function Ke(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var qe=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Ge++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||Ye(e,c)){let r=t(e);if(a?!Je(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=ct(o,c);if(this.dependencies.every(t=>t instanceof O?o.facet(t)===e.facet(t):t instanceof Qe?o.field(t,!1)==e.field(t,!1):!0)||(a?Je(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function Je(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Ye(e,t){let n=!1;for(let r of t)st(e,r)&1&&(n=!0);return n}function Xe(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=ct(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)st(e,t);return e.values[o]=s(e),1},update(e,n){if(!Ye(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=Ye(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&Ke(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var Ze=O.define({static:!0}),Qe=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(Ge++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(Ze).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(Ze),i=n.facet(Ze),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,Ze.of({field:this,create:e})]}get extension(){return this}},$e={lowest:4,low:3,default:2,high:1,highest:0};function et(e){return t=>new nt(t,e)}var tt={highest:et($e.highest),high:et($e.high),default:et($e.default),low:et($e.low),lowest:et($e.lowest)},nt=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},rt=class e{of(e){return new it(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},it=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},at=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of ot(t,n,o))e instanceof Qe?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0))if(s[n.id]=c.length<<1|1,Ke(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>Xe(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function ot(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof it&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof it){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof nt)a(e.inner,e.prec);else if(e instanceof Qe)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof qe)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,$e.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,$e.default),r.reduce((e,t)=>e.concat(t))}function st(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function ct(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var lt=O.define(),ut=O.define({combine:e=>e.some(e=>e),static:!0}),dt=O.define({combine:e=>e.length?e[0]:void 0,static:!0}),ft=O.define(),pt=O.define(),mt=O.define(),ht=O.define({combine:e=>e.length?e[0]:!1}),gt=class{constructor(e,t){this.type=e,this.value=t}static define(){return new _t}},_t=class{of(e){return new gt(this,e)}},vt=class{constructor(e){this.map=e}of(e){return new k(this,e)}},k=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new vt(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};k.reconfigure=k.define(),k.appendConfig=k.define();var A=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&We(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};A.time=gt.define(),A.userEvent=gt.define(),A.addToHistory=gt.define(),A.remote=gt.define();function yt(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function bt(e,t,n){let r,i,a;return n?(r=t.changes,i=Le.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:k.mapEffects(e.effects,r).concat(k.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function xt(e,t,n){let r=t.selection,i=Et(t.annotations);return t.userEvent&&(i=i.concat(A.userEvent.of(t.userEvent))),{changes:t.changes instanceof Le?t.changes:Le.of(t.changes||[],n,e.facet(dt)),selection:r&&(r instanceof D?r:D.single(r.anchor,r.head)),effects:Et(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function St(e,t,n){let r=xt(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=bt(r,xt(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=A.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return wt(n?Ct(i):i)}function Ct(e){let t=e.startState,n=!0;for(let r of t.facet(ft)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:yt(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=Le.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=A.create(t,r,e.selection&&e.selection.map(i),k.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(pt);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof A?i:Array.isArray(i)&&i.length==1&&i[0]instanceof A?i[0]:St(t,Et(i),!1)}return e}function wt(e){let t=e.startState,n=t.facet(mt),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=bt(r,xt(t,a,e.changes.newLength),!0))}return r==e?e:A.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Tt=[];function Et(e){return e==null?Tt:Array.isArray(e)?e:[e]}var Dt=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(Dt||={}),Ot=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,kt;try{kt=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function At(e){if(kt)return kt.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||Ot.test(n)))return!0}return!1}function jt(e){return t=>{if(!/\S/.test(t))return Dt.Space;if(At(t))return Dt.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Dt.Word;return Dt.Other}}var j=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)st(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return st(this,n),ct(this,n)}update(...e){return St(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(rt.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(k.reconfigure)?(n=null,r=e.value):e.is(k.appendConfig)&&(n=null,r=Et(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=at.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(ut)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:D.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=Et(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=k.mapEffects(a,c).concat(k.mapEffects(Et(o.effects),l))}return{changes:r,selection:D.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof Le?t:Le.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return w.of(t.split(this.facet(e.lineSeparator)||Pe))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(st(this,t),ct(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Qe&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:D.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=at.resolve(t.extensions||[],new Map),r=t.doc instanceof w?t.doc:w.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||Pe)),i=t.selection?t.selection instanceof D?t.selection:D.single(t.selection.anchor,t.selection.head):D.single(0);return We(i,r.length),n.staticFacet(ut)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|