@3t-transform/threeteeui 1.9.95 → 1.9.97
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tttx-action-dropdown_1_9_95.cjs.entry.js → tttx-action-dropdown_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-button-v2_1_9_95.cjs.entry.js → tttx-button-v2_1_9_97.cjs.entry.js} +4 -4
- package/dist/cjs/{tttx-button_1_9_95.cjs.entry.js → tttx-button_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-chart_1_9_95.cjs.entry.js → tttx-chart_1_9_97.cjs.entry.js} +19 -6
- package/dist/cjs/{tttx-checkbox-group-caption_1_9_95.cjs.entry.js → tttx-checkbox-group-caption_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-checkbox-group-heading_1_9_95.cjs.entry.js → tttx-checkbox-group-heading_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-checkbox-group_1_9_95.cjs.entry.js → tttx-checkbox-group_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-checkbox_1_9_95.cjs.entry.js → tttx-checkbox_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-comments_1_9_95.cjs.entry.js → tttx-comments_1_9_97.cjs.entry.js} +4 -4
- package/dist/cjs/{tttx-data-pattern_1_9_95.cjs.entry.js → tttx-data-pattern_1_9_97.cjs.entry.js} +5 -5
- package/dist/cjs/{tttx-datacard_1_9_95.cjs.entry.js → tttx-datacard_1_9_97.cjs.entry.js} +4 -4
- package/dist/cjs/tttx-date-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/{tttx-dialog-box_1_9_95.cjs.entry.js → tttx-dialog-box_1_9_97.cjs.entry.js} +3 -3
- package/dist/cjs/{tttx-dialog_1_9_95.cjs.entry.js → tttx-dialog_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-expander_1_9_95.cjs.entry.js → tttx-expander_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-filter_1_9_95_4.cjs.entry.js → tttx-filter_1_9_97_4.cjs.entry.js} +9 -9
- package/dist/cjs/{tttx-form_1_9_95.cjs.entry.js → tttx-form_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-graph_1_9_95.cjs.entry.js → tttx-graph_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-icon_1_9_95.cjs.entry.js → tttx-icon_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-keyvalue-block_1_9_95.cjs.entry.js → tttx-keyvalue-block_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-loading-spinner_1_9_95_3.cjs.entry.js → tttx-loading-spinner_1_9_97_3.cjs.entry.js} +7 -7
- package/dist/cjs/{tttx-multiselect-box_1_9_95.cjs.entry.js → tttx-multiselect-box_1_9_97.cjs.entry.js} +7 -7
- package/dist/cjs/{tttx-percentage-bar_1_9_95.cjs.entry.js → tttx-percentage-bar_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-qrcode_1_9_95.cjs.entry.js → tttx-qrcode_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-range-slider_1_9_95.cjs.entry.js → tttx-range-slider_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-select-box_1_9_95.cjs.entry.js → tttx-select-box_1_9_97.cjs.entry.js} +6 -6
- package/dist/cjs/{tttx-skeleton_loader_1_9_95.cjs.entry.js → tttx-skeleton_loader_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-table_1_9_95.cjs.entry.js → tttx-table_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-tabs_1_9_95.cjs.entry.js → tttx-tabs_1_9_97.cjs.entry.js} +4 -4
- package/dist/cjs/{tttx-tag-v2_1_9_95.cjs.entry.js → tttx-tag-v2_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-textarea_1_9_95.cjs.entry.js → tttx-textarea_1_9_97.cjs.entry.js} +2 -2
- package/dist/cjs/{tttx-toggle_1_9_95.cjs.entry.js → tttx-toggle_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-tooltip_1_9_95.cjs.entry.js → tttx-tooltip_1_9_97.cjs.entry.js} +1 -1
- package/dist/cjs/{tttx-tree-view_1_9_95.cjs.entry.js → tttx-tree-view_1_9_97.cjs.entry.js} +3 -3
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +2 -2
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +24 -24
- package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.css +1 -1
- package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.js +3 -3
- package/dist/collection/components/atoms/tttx-button-v2/tttx-button-v2.stories.js +15 -15
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.js +2 -2
- package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-datacard/tttx-datacard.js +4 -4
- package/dist/collection/components/atoms/tttx-datacard/tttx-datacard.stories.js +10 -10
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +1 -1
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +1 -1
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +6 -6
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +1 -1
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +1 -1
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +2 -2
- package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.js +1 -1
- package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.js +5 -5
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +1 -1
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-skeleton-loader/tttx-skeleton-loader.js +1 -1
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +2 -2
- package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +6 -6
- package/dist/collection/components/atoms/tttx-tag-v2/tttx-tag-v2.js +2 -2
- package/dist/collection/components/atoms/tttx-tag-v2/tttx-tag-v2.stories.js +2 -2
- package/dist/collection/components/atoms/tttx-toggle/tttx-toggle.js +1 -1
- package/dist/collection/components/atoms/tttx-toggle/tttx-toggle.stories.js +2 -2
- package/dist/collection/components/molecules/tttx-action-dropdown/tttx-action-dropdown.js +2 -2
- package/dist/collection/components/molecules/tttx-action-dropdown/tttx-action-dropdown.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-chart/tttx-chart.js +19 -6
- package/dist/collection/components/molecules/tttx-chart/tttx-chart.stories.js +5 -5
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.js +1 -1
- package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.js +1 -1
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.js +1 -1
- package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js +10 -10
- package/dist/collection/components/molecules/tttx-comments/tttx-comments.js +4 -4
- package/dist/collection/components/molecules/tttx-comments/tttx-comments.stories.js +4 -4
- package/dist/collection/components/molecules/tttx-date-range-picker/tttx-date-range-picker.js +1 -1
- package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.js +2 -2
- package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.stories.js +6 -6
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +3 -3
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +24 -24
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +2 -2
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +9 -9
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +3 -3
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +2 -2
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +2 -2
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +8 -8
- package/dist/collection/components/molecules/tttx-graph/tttx-graph.js +1 -1
- package/dist/collection/components/molecules/tttx-graph/tttx-graph.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +3 -3
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +47 -47
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +7 -7
- package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.js +37 -37
- package/dist/collection/components/molecules/tttx-range-slider/tttx-range-slider.js +1 -1
- package/dist/collection/components/molecules/tttx-range-slider/tttx-range-slider.stories.js +3 -3
- package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.js +6 -6
- package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.stories.js +22 -22
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +2 -2
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +4 -4
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-table/tttx-table.js +2 -2
- package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +25 -25
- package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.js +3 -3
- package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.stories.js +4 -4
- package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.js +3 -3
- package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.stories.js +1 -1
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +1 -1
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +37 -37
- package/dist/collection/components/molecules/tttx-tooltip/tttx-tooltip.js +1 -1
- package/dist/collection/components/molecules/tttx-tooltip/tttx-tootip.stories.js +3 -3
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +3 -3
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +1 -1
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +5 -5
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +5 -5
- package/dist/components/index.d.ts +38 -38
- package/dist/components/index.js +38 -38
- package/dist/components/tttx-action-dropdown_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-action-dropdown_1_9_95.js → tttx-action-dropdown_1_9_97.js} +7 -7
- package/dist/components/tttx-button-v2.js +7 -7
- package/dist/components/{tttx-checkbox_1_9_95.d.ts → tttx-button-v2_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-button-v2_1_9_95.js → tttx-button-v2_1_9_97.js} +2 -2
- package/dist/components/tttx-button.js +5 -5
- package/dist/components/{tttx-dialog_1_9_95.d.ts → tttx-button_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-button_1_9_95.js → tttx-button_1_9_97.js} +2 -2
- package/dist/components/{tttx-table_1_9_95.d.ts → tttx-chart_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-chart_1_9_95.js → tttx-chart_1_9_97.js} +26 -13
- package/dist/components/tttx-checkbox-group-caption_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group-caption_1_9_95.js → tttx-checkbox-group-caption_1_9_97.js} +5 -5
- package/dist/components/tttx-checkbox-group-heading_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group-heading_1_9_95.js → tttx-checkbox-group-heading_1_9_97.js} +5 -5
- package/dist/components/tttx-checkbox-group_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-checkbox-group_1_9_95.js → tttx-checkbox-group_1_9_97.js} +5 -5
- package/dist/components/{tttx-button-v2_1_9_95.d.ts → tttx-checkbox_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-checkbox_1_9_95.js → tttx-checkbox_1_9_97.js} +7 -7
- package/dist/components/tttx-comments_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-comments_1_9_95.js → tttx-comments_1_9_97.js} +9 -9
- package/dist/components/tttx-data-pattern_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-data-pattern_1_9_95.js → tttx-data-pattern_1_9_97.js} +16 -16
- package/dist/components/tttx-datacard_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-datacard_1_9_95.js → tttx-datacard_1_9_97.js} +10 -10
- package/dist/components/tttx-date-range-picker.js +3 -3
- package/dist/components/tttx-dialog-box_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-dialog-box_1_9_95.js → tttx-dialog-box_1_9_97.js} +9 -9
- package/dist/components/{tttx-filter_1_9_95.d.ts → tttx-dialog_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-dialog_1_9_95.js → tttx-dialog_1_9_97.js} +8 -8
- package/dist/components/tttx-expander_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-expander_1_9_95.js → tttx-expander_1_9_97.js} +7 -7
- package/dist/components/tttx-filter.js +6 -6
- package/dist/components/{tttx-qrcode_1_9_95.d.ts → tttx-filter_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-filter_1_9_95.js → tttx-filter_1_9_97.js} +2 -2
- package/dist/components/{tttx-form_1_9_95.d.ts → tttx-form_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-form_1_9_95.js → tttx-form_1_9_97.js} +11 -11
- package/dist/components/tttx-graph.js +3 -3
- package/dist/components/{tttx-graph_1_9_95.d.ts → tttx-graph_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-graph_1_9_95.js → tttx-graph_1_9_97.js} +2 -2
- package/dist/components/tttx-icon.js +3 -3
- package/dist/components/{tttx-list_1_9_95.d.ts → tttx-icon_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-icon_1_9_95.js → tttx-icon_1_9_97.js} +2 -2
- package/dist/components/tttx-keyvalue-block_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-keyvalue-block_1_9_95.js → tttx-keyvalue-block_1_9_97.js} +5 -5
- package/dist/components/tttx-list.js +6 -6
- package/dist/components/{tttx-tabs_1_9_95.d.ts → tttx-list_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-list_1_9_95.js → tttx-list_1_9_97.js} +2 -2
- package/dist/components/tttx-loading-spinner.js +4 -4
- package/dist/components/tttx-loading-spinner_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-loading-spinner_1_9_95.js → tttx-loading-spinner_1_9_97.js} +2 -2
- package/dist/components/tttx-multiselect-box_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-multiselect-box_1_9_95.js → tttx-multiselect-box_1_9_97.js} +16 -16
- package/dist/components/tttx-percentage-bar_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-percentage-bar_1_9_95.js → tttx-percentage-bar_1_9_97.js} +6 -6
- package/dist/components/{tttx-button_1_9_95.d.ts → tttx-qrcode_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-qrcode_1_9_95.js → tttx-qrcode_1_9_97.js} +5 -5
- package/dist/components/tttx-range-slider_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-range-slider_1_9_95.js → tttx-range-slider_1_9_97.js} +5 -5
- package/dist/components/tttx-select-box.js +12 -12
- package/dist/components/tttx-select-box_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-select-box_1_9_95.js → tttx-select-box_1_9_97.js} +2 -2
- package/dist/components/tttx-skeleton_loader_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-skeleton_loader_1_9_95.js → tttx-skeleton_loader_1_9_97.js} +5 -5
- package/dist/components/tttx-sorter.js +5 -5
- package/dist/components/tttx-sorter_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-sorter_1_9_95.js → tttx-sorter_1_9_97.js} +2 -2
- package/dist/components/tttx-standalone-input.js +6 -6
- package/dist/components/tttx-standalone-input_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-standalone-input_1_9_95.js → tttx-standalone-input_1_9_97.js} +2 -2
- package/dist/components/{tttx-chart_1_9_95.d.ts → tttx-table_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-table_1_9_95.js → tttx-table_1_9_97.js} +8 -8
- package/dist/components/{tttx-icon_1_9_95.d.ts → tttx-tabs_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-tabs_1_9_95.js → tttx-tabs_1_9_97.js} +9 -9
- package/dist/components/{tttx-tag-v2_1_9_95.d.ts → tttx-tag-v2_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-tag-v2_1_9_95.js → tttx-tag-v2_1_9_97.js} +7 -7
- package/dist/components/tttx-tag.js +5 -5
- package/dist/components/{tttx-tag_1_9_95.d.ts → tttx-tag_1_9_97.d.ts} +4 -4
- package/dist/components/{tttx-tag_1_9_95.js → tttx-tag_1_9_97.js} +2 -2
- package/dist/components/tttx-textarea_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-textarea_1_9_95.js → tttx-textarea_1_9_97.js} +6 -6
- package/dist/components/tttx-toggle_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-toggle_1_9_95.js → tttx-toggle_1_9_97.js} +5 -5
- package/dist/components/tttx-toolbar.js +3 -3
- package/dist/components/tttx-toolbar_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-toolbar_1_9_95.js → tttx-toolbar_1_9_97.js} +2 -2
- package/dist/components/tttx-tooltip_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-tooltip_1_9_95.js → tttx-tooltip_1_9_97.js} +5 -5
- package/dist/components/tttx-tree-view_1_9_97.d.ts +11 -0
- package/dist/components/{tttx-tree-view_1_9_95.js → tttx-tree-view_1_9_97.js} +9 -9
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tttx-action-dropdown_1_9_95.entry.js → tttx-action-dropdown_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-button-v2_1_9_95.entry.js → tttx-button-v2_1_9_97.entry.js} +4 -4
- package/dist/esm/{tttx-button_1_9_95.entry.js → tttx-button_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-chart_1_9_95.entry.js → tttx-chart_1_9_97.entry.js} +19 -6
- package/dist/esm/{tttx-checkbox-group-caption_1_9_95.entry.js → tttx-checkbox-group-caption_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-checkbox-group-heading_1_9_95.entry.js → tttx-checkbox-group-heading_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-checkbox-group_1_9_95.entry.js → tttx-checkbox-group_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-checkbox_1_9_95.entry.js → tttx-checkbox_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-comments_1_9_95.entry.js → tttx-comments_1_9_97.entry.js} +4 -4
- package/dist/esm/{tttx-data-pattern_1_9_95.entry.js → tttx-data-pattern_1_9_97.entry.js} +5 -5
- package/dist/esm/{tttx-datacard_1_9_95.entry.js → tttx-datacard_1_9_97.entry.js} +4 -4
- package/dist/esm/tttx-date-range-picker.entry.js +1 -1
- package/dist/esm/{tttx-dialog-box_1_9_95.entry.js → tttx-dialog-box_1_9_97.entry.js} +3 -3
- package/dist/esm/{tttx-dialog_1_9_95.entry.js → tttx-dialog_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-expander_1_9_95.entry.js → tttx-expander_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-filter_1_9_95_4.entry.js → tttx-filter_1_9_97_4.entry.js} +6 -6
- package/dist/esm/{tttx-form_1_9_95.entry.js → tttx-form_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-graph_1_9_95.entry.js → tttx-graph_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-icon_1_9_95.entry.js → tttx-icon_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-keyvalue-block_1_9_95.entry.js → tttx-keyvalue-block_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-loading-spinner_1_9_95_3.entry.js → tttx-loading-spinner_1_9_97_3.entry.js} +5 -5
- package/dist/esm/{tttx-multiselect-box_1_9_95.entry.js → tttx-multiselect-box_1_9_97.entry.js} +7 -7
- package/dist/esm/{tttx-percentage-bar_1_9_95.entry.js → tttx-percentage-bar_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-qrcode_1_9_95.entry.js → tttx-qrcode_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-range-slider_1_9_95.entry.js → tttx-range-slider_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-select-box_1_9_95.entry.js → tttx-select-box_1_9_97.entry.js} +6 -6
- package/dist/esm/{tttx-skeleton_loader_1_9_95.entry.js → tttx-skeleton_loader_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-table_1_9_95.entry.js → tttx-table_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-tabs_1_9_95.entry.js → tttx-tabs_1_9_97.entry.js} +4 -4
- package/dist/esm/{tttx-tag-v2_1_9_95.entry.js → tttx-tag-v2_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-textarea_1_9_95.entry.js → tttx-textarea_1_9_97.entry.js} +2 -2
- package/dist/esm/{tttx-toggle_1_9_95.entry.js → tttx-toggle_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-tooltip_1_9_95.entry.js → tttx-tooltip_1_9_97.entry.js} +1 -1
- package/dist/esm/{tttx-tree-view_1_9_95.entry.js → tttx-tree-view_1_9_97.entry.js} +3 -3
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-00a849cf.entry.js +1 -1
- package/dist/tttx/{p-0314665d.entry.js → p-00adf233.entry.js} +2 -2
- package/dist/tttx/p-1623f3cf.entry.js +1 -1
- package/dist/tttx/p-21707b8d.entry.js +1 -1
- package/dist/tttx/p-2251ab85.entry.js +1 -1
- package/dist/tttx/p-2d19c46c.entry.js +1 -1
- package/dist/tttx/p-358eaa44.entry.js +1 -1
- package/dist/tttx/p-362999b3.entry.js +1 -1
- package/dist/tttx/p-3ec67d75.entry.js +1 -1
- package/dist/tttx/p-41b69e01.entry.js +1 -1
- package/dist/tttx/p-41f0bf7f.entry.js +1 -1
- package/dist/tttx/p-44f0af69.entry.js +1 -1
- package/dist/tttx/p-4664d065.entry.js +1 -1
- package/dist/tttx/p-5d289334.entry.js +1 -1
- package/dist/tttx/p-6ec18b4a.entry.js +1 -1
- package/dist/tttx/p-7b5b0670.entry.js +1 -1
- package/dist/tttx/p-7d1712fe.entry.js +1 -1
- package/dist/tttx/p-82b4e575.entry.js +1 -1
- package/dist/tttx/p-8f3fd755.entry.js +1 -1
- package/dist/tttx/p-a1b8ecda.entry.js +1 -1
- package/dist/tttx/p-a43e2c5e.entry.js +1 -1
- package/dist/tttx/p-b161205b.entry.js +1 -1
- package/dist/tttx/p-b3f49d83.entry.js +1 -1
- package/dist/tttx/p-b8cc0cb2.entry.js +1 -1
- package/dist/tttx/p-b9003a76.entry.js +1 -1
- package/dist/tttx/p-bb59054f.entry.js +1 -1
- package/dist/tttx/p-c66bc14c.entry.js +1 -1
- package/dist/tttx/p-c8051143.entry.js +1 -1
- package/dist/tttx/p-c9b2a6a6.entry.js +1 -1
- package/dist/tttx/p-ca93f786.entry.js +1 -1
- package/dist/tttx/{p-931eb880.entry.js → p-d21b0507.entry.js} +1 -1
- package/dist/tttx/p-d4c4edbd.entry.js +1 -1
- package/dist/tttx/p-e7dd8dcf.entry.js +1 -1
- package/dist/tttx/p-f0c1380f.entry.js +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-select-box/tttx-select-box.d.ts +1 -1
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +2 -2
- package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +2 -2
- package/dist/types/components.d.ts +451 -451
- package/package.json +1 -1
- package/dist/components/tttx-action-dropdown_1_9_95.d.ts +0 -11
- package/dist/components/tttx-checkbox-group-caption_1_9_95.d.ts +0 -11
- package/dist/components/tttx-checkbox-group-heading_1_9_95.d.ts +0 -11
- package/dist/components/tttx-checkbox-group_1_9_95.d.ts +0 -11
- package/dist/components/tttx-comments_1_9_95.d.ts +0 -11
- package/dist/components/tttx-data-pattern_1_9_95.d.ts +0 -11
- package/dist/components/tttx-datacard_1_9_95.d.ts +0 -11
- package/dist/components/tttx-dialog-box_1_9_95.d.ts +0 -11
- package/dist/components/tttx-expander_1_9_95.d.ts +0 -11
- package/dist/components/tttx-keyvalue-block_1_9_95.d.ts +0 -11
- package/dist/components/tttx-loading-spinner_1_9_95.d.ts +0 -11
- package/dist/components/tttx-multiselect-box_1_9_95.d.ts +0 -11
- package/dist/components/tttx-percentage-bar_1_9_95.d.ts +0 -11
- package/dist/components/tttx-range-slider_1_9_95.d.ts +0 -11
- package/dist/components/tttx-select-box_1_9_95.d.ts +0 -11
- package/dist/components/tttx-skeleton_loader_1_9_95.d.ts +0 -11
- package/dist/components/tttx-sorter_1_9_95.d.ts +0 -11
- package/dist/components/tttx-standalone-input_1_9_95.d.ts +0 -11
- package/dist/components/tttx-textarea_1_9_95.d.ts +0 -11
- package/dist/components/tttx-toggle_1_9_95.d.ts +0 -11
- package/dist/components/tttx-toolbar_1_9_95.d.ts +0 -11
- package/dist/components/tttx-tooltip_1_9_95.d.ts +0 -11
- package/dist/components/tttx-tree-view_1_9_95.d.ts +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{r as t,c as e,h as n,g as r}from"./p-457a7731.js";import{a as i,C as a}from"./p-0bb158ce.js";const o=6048e5,s=6e4,c=36e5,u=Symbol.for("constructDateFrom");function d(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&u in t?t[u](e):t instanceof Date?new t.constructor(e):new Date(e)}function h(t,e){return d(e||t,t)}function l(t,e,n){const r=h(t,n?.in);return isNaN(e)?d(n?.in||t,NaN):e?(r.setDate(r.getDate()+e),r):r}function f(t,e,n){const r=h(t,n?.in);if(isNaN(e))return d(n?.in||t,NaN);if(!e)return r;const i=r.getDate(),a=d(n?.in||t,r.getTime());return a.setMonth(r.getMonth()+e+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function w(t,e,n){return d(n?.in||t,+h(t)+e)}let m={};function g(){return m}function p(t,e){const n=g(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=h(t,e?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function b(t,e){return p(t,{...e,weekStartsOn:1})}function x(t,e){const n=h(t,e?.in),r=n.getFullYear(),i=d(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=b(i),o=d(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=b(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function y(t){const e=h(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function v(t,...e){const n=d.bind(null,t||e.find((t=>"object"==typeof t)));return e.map(n)}function M(t,e){const n=h(t,e?.in);return n.setHours(0,0,0,0),n}function k(t,e,n){const[r,i]=v(n?.in,t,e),a=M(r),o=M(i),s=+a-y(a),c=+o-y(o);return Math.round((s-c)/864e5)}function T(t,e){const n=+h(t)-+h(e);return n<0?-1:n>0?1:n}function D(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+h(t)));var e}function S(t,e,n){const[r,i]=v(n?.in,t,e),a=E(r,i),o=Math.abs(k(r,i));r.setDate(r.getDate()-a*o);const s=a*(o-Number(E(r,i)===-a));return 0===s?0:s}function E(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function N(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return 0===n?0:n}}function q(t,e){return+h(t)-+h(e)}function P(t,e){const n=h(t,e?.in);return n.setHours(23,59,59,999),n}function C(t,e){const n=h(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function L(t,e,n){const[r,i,a]=v(n?.in,t,t,e),o=T(i,a),s=Math.abs(function(t,e){const[n,r]=v(undefined,t,e);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,a));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let c=T(i,a)===-o;(function(t,e){const n=h(t,e?.in);return+P(n,e)==+C(n,e)})(r)&&1===s&&1===T(r,a)&&(c=!1);const u=o*(s-+c);return 0===u?0:u}function Q(t,e){const n=h(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Y={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function I(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const B={date:I({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:I({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:I({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},O={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function R(t){return(e,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,i=n?.width?String(n.width):e;r=t.formattingValues[i]||t.formattingValues[e]}else{const e=t.defaultWidth,i=n?.width?String(n.width):t.defaultWidth;r=t.values[i]||t.values[e]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function j(t){return(e,n={})=>{const r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;const a=i[0],o=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(o)?function(t){for(let e=0;e<t.length;e++)if(t[e].test(a))return e}(o):function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].test(a))return e}(o);let c;return c=t.valueCallback?t.valueCallback(s):s,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:e.slice(a.length)}}}var W;const A={code:"en-US",formatDistance:(t,e,n)=>{let r;const i=Y[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:B,formatRelative:t=>O[t],localize:{ordinalNumber:t=>{const e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:R({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:R({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:R({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:R({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:R({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(W={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const n=t.match(W.matchPattern);if(!n)return null;const r=n[0],i=t.match(W.parsePattern);if(!i)return null;let a=W.valueCallback?W.valueCallback(i[0]):i[0];return a=e.valueCallback?e.valueCallback(a):a,{value:a,rest:t.slice(r.length)}}),era:j({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:j({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:j({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:j({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:j({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function G(t,e){const n=h(t,e?.in),r=+b(n)-+function(t,e){const n=x(t,e),r=d(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),b(r)}(n);return Math.round(r/o)+1}function X(t,e){const n=h(t,e?.in),r=n.getFullYear(),i=g(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=d(e?.in||t,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=p(o,e),c=d(e?.in||t,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=p(c,e);return+n>=+s?r+1:+n>=+u?r:r-1}function $(t,e){const n=h(t,e?.in),r=+p(n,e)-+function(t,e){const n=g(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=X(t,e),a=d(e?.in||t,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),p(a,e)}(n,e);return Math.round(r/o)+1}function z(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const F={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return z("yy"===e?r%100:r,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):z(n+1,2)},d:(t,e)=>z(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>z(t.getHours()%12||12,e.length),H:(t,e)=>z(t.getHours(),e.length),m:(t,e)=>z(t.getMinutes(),e.length),s:(t,e)=>z(t.getSeconds(),e.length),S(t,e){const n=e.length,r=t.getMilliseconds();return z(Math.trunc(r*Math.pow(10,n-3)),e.length)}},H={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear();return n.ordinalNumber(e>0?e:1-e,{unit:"year"})}return F.y(t,e)},Y:function(t,e,n,r){const i=X(t,r),a=i>0?i:1-i;return"YY"===e?z(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):z(a,e.length)},R:function(t,e){return z(x(t),e.length)},u:function(t,e){return z(t.getFullYear(),e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return z(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return z(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return F.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return z(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const i=$(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):z(i,e.length)},I:function(t,e,n){const r=G(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):z(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):F.d(t,e)},D:function(t,e,n){const r=function(t){const e=h(t,undefined);return k(e,Q(e))+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):z(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const i=t.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return z(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const i=t.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return z(a,e.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return z(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return F.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):F.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},k:function(t,e,n){let r=t.getHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):F.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):F.s(t,e)},S:function(t,e){return F.S(t,e)},X:function(t,e){const n=t.getTimezoneOffset();if(0===n)return"Z";switch(e){case"X":return Z(n);case"XXXX":case"XX":return K(n);default:return K(n,":")}},x:function(t,e){const n=t.getTimezoneOffset();switch(e){case"x":return Z(n);case"xxxx":case"xx":return K(n);default:return K(n,":")}},O:function(t,e){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+J(n,":");default:return"GMT"+K(n,":")}},z:function(t,e){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+J(n,":");default:return"GMT"+K(n,":")}},t:function(t,e){return z(Math.trunc(+t/1e3),e.length)},T:function(t,e){return z(+t,e.length)}};function J(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Math.trunc(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+e+z(a,2)}function Z(t,e){return t%60==0?(t>0?"-":"+")+z(Math.abs(t)/60,2):K(t,e)}function K(t,e=""){const n=t>0?"-":"+",r=Math.abs(t);return n+z(Math.trunc(r/60),2)+e+z(r%60,2)}const _=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},U=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},V={p:U,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return _(t,e);let a;switch(r){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;default:a=e.dateTime({width:"full"})}return a.replace("{{date}}",_(r,e)).replace("{{time}}",U(i,e))}},tt=/^D+$/,et=/^Y+$/,nt=["D","DD","YY","YYYY"];function rt(t){return tt.test(t)}function it(t){return et.test(t)}function at(t,e,n){const r=function(t,e,n){const r="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,n);if(console.warn(r),nt.includes(t))throw new RangeError(r)}const ot=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ct=/^'([^]*?)'?$/,ut=/''/g,dt=/[a-zA-Z]/;function ht(t){const e=t.match(ct);return e?e[1].replace(ut,"'"):t}class lt{subPriority=0;validate(t,e){return!0}}class ft extends lt{constructor(t,e,n,r,i){super(),this.value=t,this.validateValue=e,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,n){return this.setValue(t,e,this.value,n)}}class wt extends lt{priority=10;subPriority=-1;constructor(t,e){super(),this.context=t||(t=>d(e,t))}set(t,e){return e.timestampIsSet?t:d(t,function(t,e){const n=function(t){return"function"==typeof t&&t.prototype?.constructor===t}(e)?new e(0):d(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}(t,this.context))}}class mt{run(t,e,n,r){const i=this.parse(t,e,n,r);return i?{setter:new ft(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,e,n){return!0}}const gt=/^(1[0-2]|0?\d)/,pt=/^(3[0-1]|[0-2]?\d)/,bt=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,xt=/^(5[0-3]|[0-4]?\d)/,yt=/^(2[0-3]|[0-1]?\d)/,vt=/^(2[0-4]|[0-1]?\d)/,Mt=/^(1[0-1]|0?\d)/,kt=/^(1[0-2]|0?\d)/,Tt=/^[0-5]?\d/,Dt=/^[0-5]?\d/,St=/^\d/,Et=/^\d{1,2}/,Nt=/^\d{1,3}/,qt=/^\d{1,4}/,Pt=/^-?\d+/,Ct=/^-?\d/,Lt=/^-?\d{1,2}/,Qt=/^-?\d{1,3}/,Yt=/^-?\d{1,4}/,It=/^([+-])(\d{2})(\d{2})?|Z/,Bt=/^([+-])(\d{2})(\d{2})|Z/,Ot=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Rt=/^([+-])(\d{2}):(\d{2})|Z/,jt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Wt(t,e){return t?{value:e(t.value),rest:t.rest}:t}function At(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Gt(t,e){const n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};const r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*c+a*s+1e3*o),rest:e.slice(n[0].length)}}function Xt(t){return At(Pt,t)}function $t(t,e){switch(t){case 1:return At(St,e);case 2:return At(Et,e);case 3:return At(Nt,e);case 4:return At(qt,e);default:return At(new RegExp("^\\d{1,"+t+"}"),e)}}function zt(t,e){switch(t){case 1:return At(Ct,e);case 2:return At(Lt,e);case 3:return At(Qt,e);case 4:return At(Yt,e);default:return At(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Ft(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ht(t,e){const n=e>0,r=n?e:1-e;let i;if(r<=50)i=t||100;else{const e=r+50;i=t+100*Math.trunc(e/100)-(t>=e%100?100:0)}return n?i:1-i}function Jt(t){return t%400==0||t%4==0&&t%100!=0}const Zt=[31,28,31,30,31,30,31,31,30,31,30,31],Kt=[31,29,31,30,31,30,31,31,30,31,30,31];function _t(t,e,n){const r=g(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=h(t,n?.in),o=a.getDay(),s=7-i;return l(a,e<0||e>6?e-(o+s)%7:((e%7+7)%7+s)%7-(o+s)%7,n)}const Ut={G:new class extends mt{priority=140;parse(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}set(t,e,n){return e.era=n,t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]},y:new class extends mt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,n){const r=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return Wt($t(4,t),r);case"yo":return Wt(n.ordinalNumber(t,{unit:"year"}),r);default:return Wt($t(e.length,t),r)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n){const r=t.getFullYear();if(n.isTwoDigitYear){const e=Ht(n.year,r);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}return t.setFullYear("era"in e&&1!==e.era?1-n.year:n.year,0,1),t.setHours(0,0,0,0),t}},Y:new class extends mt{priority=130;parse(t,e,n){const r=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return Wt($t(4,t),r);case"Yo":return Wt(n.ordinalNumber(t,{unit:"year"}),r);default:return Wt($t(e.length,t),r)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n,r){const i=X(t,r);if(n.isTwoDigitYear){const e=Ht(n.year,i);return t.setFullYear(e,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),p(t,r)}return t.setFullYear("era"in e&&1!==e.era?1-n.year:n.year,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),p(t,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends mt{priority=130;parse(t,e){return zt("R"===e?4:e.length,t)}set(t,e,n){const r=d(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),b(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends mt{priority=130;parse(t,e){return zt("u"===e?4:e.length,t)}set(t,e,n){return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends mt{priority=120;parse(t,e,n){switch(e){case"Q":case"QQ":return $t(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends mt{priority=120;parse(t,e,n){switch(e){case"q":case"qq":return $t(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends mt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,n){const r=t=>t-1;switch(e){case"M":return Wt(At(gt,t),r);case"MM":return Wt($t(2,t),r);case"Mo":return Wt(n.ordinalNumber(t,{unit:"month"}),r);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}},L:new class extends mt{priority=110;parse(t,e,n){const r=t=>t-1;switch(e){case"L":return Wt(At(gt,t),r);case"LL":return Wt($t(2,t),r);case"Lo":return Wt(n.ordinalNumber(t,{unit:"month"}),r);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends mt{priority=100;parse(t,e,n){switch(e){case"w":return At(xt,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n,r){return p(function(t,e,n){const r=h(t,n?.in),i=$(r,n)-e;return r.setDate(r.getDate()-7*i),h(r,n?.in)}(t,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends mt{priority=100;parse(t,e,n){switch(e){case"I":return At(xt,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n){return b(function(t,e,n){const r=h(t,n?.in),i=G(r,n)-e;return r.setDate(r.getDate()-7*i),r}(t,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends mt{priority=90;subPriority=1;parse(t,e,n){switch(e){case"d":return At(pt,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return $t(e.length,t)}}validate(t,e){const n=Jt(t.getFullYear()),r=t.getMonth();return n?e>=1&&e<=Kt[r]:e>=1&&e<=Zt[r]}set(t,e,n){return t.setDate(n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends mt{priority=90;subpriority=1;parse(t,e,n){switch(e){case"D":case"DD":return At(bt,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return $t(e.length,t)}}validate(t,e){return Jt(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,n){return t.setMonth(0,n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends mt{priority=90;parse(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,r){return(t=_t(t,n,r)).setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends mt{priority=90;parse(t,e,n,r){const i=t=>{const e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Wt($t(e.length,t),i);case"eo":return Wt(n.ordinalNumber(t,{unit:"day"}),i);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,r){return(t=_t(t,n,r)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends mt{priority=90;parse(t,e,n,r){const i=t=>{const e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Wt($t(e.length,t),i);case"co":return Wt(n.ordinalNumber(t,{unit:"day"}),i);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,r){return(t=_t(t,n,r)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends mt{priority=90;parse(t,e,n){const r=t=>0===t?7:t;switch(e){case"i":case"ii":return $t(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return Wt(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return Wt(n.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Wt(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r);default:return Wt(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r)}}validate(t,e){return e>=1&&e<=7}set(t,e,n){return(t=function(t,e,n){const r=h(t,n?.in),i=function(t,e){const n=h(t,e?.in).getDay();return 0===n?7:n}(r,n);return l(r,e-i,n)}(t,n)).setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends mt{priority=80;parse(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Ft(n),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends mt{priority=80;parse(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Ft(n),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends mt{priority=80;parse(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Ft(n),0,0,0),t}incompatibleTokens=["a","b","t","T"]},h:new class extends mt{priority=70;parse(t,e,n){switch(e){case"h":return At(kt,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,n){const r=t.getHours()>=12;return t.setHours(r&&n<12?n+12:r||12!==n?n:0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]},H:new class extends mt{priority=70;parse(t,e,n){switch(e){case"H":return At(yt,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,n){return t.setHours(n,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends mt{priority=70;parse(t,e,n){switch(e){case"K":return At(Mt,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,n){const r=t.getHours()>=12;return t.setHours(r&&n<12?n+12:n,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]},k:new class extends mt{priority=70;parse(t,e,n){switch(e){case"k":return At(vt,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,n){return t.setHours(n<=24?n%24:n,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends mt{priority=60;parse(t,e,n){switch(e){case"m":return At(Tt,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setMinutes(n,0,0),t}incompatibleTokens=["t","T"]},s:new class extends mt{priority=50;parse(t,e,n){switch(e){case"s":return At(Dt,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setSeconds(n,0),t}incompatibleTokens=["t","T"]},S:new class extends mt{priority=30;parse(t,e){return Wt($t(e.length,t),(t=>Math.trunc(t*Math.pow(10,3-e.length))))}set(t,e,n){return t.setMilliseconds(n),t}incompatibleTokens=["t","T"]},X:new class extends mt{priority=10;parse(t,e){switch(e){case"X":return Gt(It,t);case"XX":return Gt(Bt,t);case"XXXX":return Gt(Ot,t);case"XXXXX":return Gt(jt,t);default:return Gt(Rt,t)}}set(t,e,n){return e.timestampIsSet?t:d(t,t.getTime()-y(t)-n)}incompatibleTokens=["t","T","x"]},x:new class extends mt{priority=10;parse(t,e){switch(e){case"x":return Gt(It,t);case"xx":return Gt(Bt,t);case"xxxx":return Gt(Ot,t);case"xxxxx":return Gt(jt,t);default:return Gt(Rt,t)}}set(t,e,n){return e.timestampIsSet?t:d(t,t.getTime()-y(t)-n)}incompatibleTokens=["t","T","X"]},t:new class extends mt{priority=40;parse(t){return Xt(t)}set(t,e,n){return[d(t,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends mt{priority=20;parse(t){return Xt(t)}set(t,e,n){return[d(t,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,te=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ee=/^'([^]*?)'?$/,ne=/''/g,re=/\S/,ie=/[a-zA-Z]/;const ae={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},oe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,se=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ce=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ue(t){return t?parseInt(t):1}function de(t){return t&&parseFloat(t.replace(",","."))||0}const he=[31,null,31,30,31,30,31,31,30,31,30,31];function le(t){return t%400==0||t%4==0&&t%100!=0}
|
|
1
|
+
import{r as t,c as e,h as n,g as r}from"./p-457a7731.js";import{a as i,C as a}from"./p-0bb158ce.js";const o=6048e5,s=6e4,c=36e5,u=Symbol.for("constructDateFrom");function d(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&u in t?t[u](e):t instanceof Date?new t.constructor(e):new Date(e)}function h(t,e){return d(e||t,t)}function l(t,e,n){const r=h(t,n?.in);return isNaN(e)?d(n?.in||t,NaN):e?(r.setDate(r.getDate()+e),r):r}function f(t,e,n){const r=h(t,n?.in);if(isNaN(e))return d(n?.in||t,NaN);if(!e)return r;const i=r.getDate(),a=d(n?.in||t,r.getTime());return a.setMonth(r.getMonth()+e+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function w(t,e,n){return d(n?.in||t,+h(t)+e)}let m={};function g(){return m}function p(t,e){const n=g(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=h(t,e?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function b(t,e){return p(t,{...e,weekStartsOn:1})}function x(t,e){const n=h(t,e?.in),r=n.getFullYear(),i=d(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=b(i),o=d(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=b(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function y(t){const e=h(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function v(t,...e){const n=d.bind(null,t||e.find((t=>"object"==typeof t)));return e.map(n)}function M(t,e){const n=h(t,e?.in);return n.setHours(0,0,0,0),n}function k(t,e,n){const[r,i]=v(n?.in,t,e),a=M(r),o=M(i),s=+a-y(a),c=+o-y(o);return Math.round((s-c)/864e5)}function T(t,e){const n=+h(t)-+h(e);return n<0?-1:n>0?1:n}function D(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+h(t)));var e}function S(t,e,n){const[r,i]=v(n?.in,t,e),a=E(r,i),o=Math.abs(k(r,i));r.setDate(r.getDate()-a*o);const s=a*(o-Number(E(r,i)===-a));return 0===s?0:s}function E(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function N(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return 0===n?0:n}}function q(t,e){return+h(t)-+h(e)}function C(t,e){const n=h(t,e?.in);return n.setHours(23,59,59,999),n}function P(t,e){const n=h(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function L(t,e,n){const[r,i,a]=v(n?.in,t,t,e),o=T(i,a),s=Math.abs(function(t,e){const[n,r]=v(undefined,t,e);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,a));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let c=T(i,a)===-o;(function(t,e){const n=h(t,e?.in);return+C(n,e)==+P(n,e)})(r)&&1===s&&1===T(r,a)&&(c=!1);const u=o*(s-+c);return 0===u?0:u}function Q(t,e){const n=h(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Y={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function I(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const O={date:I({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:I({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:I({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},W={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function B(t){return(e,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,i=n?.width?String(n.width):e;r=t.formattingValues[i]||t.formattingValues[e]}else{const e=t.defaultWidth,i=n?.width?String(n.width):t.defaultWidth;r=t.values[i]||t.values[e]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function R(t){return(e,n={})=>{const r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;const a=i[0],o=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(o)?function(t){for(let e=0;e<t.length;e++)if(t[e].test(a))return e}(o):function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].test(a))return e}(o);let c;return c=t.valueCallback?t.valueCallback(s):s,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:e.slice(a.length)}}}var j;const A={code:"en-US",formatDistance:(t,e,n)=>{let r;const i=Y[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:O,formatRelative:t=>W[t],localize:{ordinalNumber:t=>{const e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:B({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:B({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:B({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:B({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:B({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(j={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const n=t.match(j.matchPattern);if(!n)return null;const r=n[0],i=t.match(j.parsePattern);if(!i)return null;let a=j.valueCallback?j.valueCallback(i[0]):i[0];return a=e.valueCallback?e.valueCallback(a):a,{value:a,rest:t.slice(r.length)}}),era:R({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:R({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:R({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:R({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:R({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function G(t,e){const n=h(t,e?.in),r=+b(n)-+function(t,e){const n=x(t,e),r=d(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),b(r)}(n);return Math.round(r/o)+1}function X(t,e){const n=h(t,e?.in),r=n.getFullYear(),i=g(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=d(e?.in||t,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=p(o,e),c=d(e?.in||t,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=p(c,e);return+n>=+s?r+1:+n>=+u?r:r-1}function $(t,e){const n=h(t,e?.in),r=+p(n,e)-+function(t,e){const n=g(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=X(t,e),a=d(e?.in||t,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),p(a,e)}(n,e);return Math.round(r/o)+1}function z(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const F={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return z("yy"===e?r%100:r,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):z(n+1,2)},d:(t,e)=>z(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>z(t.getHours()%12||12,e.length),H:(t,e)=>z(t.getHours(),e.length),m:(t,e)=>z(t.getMinutes(),e.length),s:(t,e)=>z(t.getSeconds(),e.length),S(t,e){const n=e.length,r=t.getMilliseconds();return z(Math.trunc(r*Math.pow(10,n-3)),e.length)}},H={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear();return n.ordinalNumber(e>0?e:1-e,{unit:"year"})}return F.y(t,e)},Y:function(t,e,n,r){const i=X(t,r),a=i>0?i:1-i;return"YY"===e?z(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):z(a,e.length)},R:function(t,e){return z(x(t),e.length)},u:function(t,e){return z(t.getFullYear(),e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return z(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return z(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return F.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return z(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const i=$(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):z(i,e.length)},I:function(t,e,n){const r=G(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):z(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):F.d(t,e)},D:function(t,e,n){const r=function(t){const e=h(t,undefined);return k(e,Q(e))+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):z(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const i=t.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return z(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const i=t.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return z(a,e.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return z(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return F.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):F.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},k:function(t,e,n){let r=t.getHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):F.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):F.s(t,e)},S:function(t,e){return F.S(t,e)},X:function(t,e){const n=t.getTimezoneOffset();if(0===n)return"Z";switch(e){case"X":return Z(n);case"XXXX":case"XX":return K(n);default:return K(n,":")}},x:function(t,e){const n=t.getTimezoneOffset();switch(e){case"x":return Z(n);case"xxxx":case"xx":return K(n);default:return K(n,":")}},O:function(t,e){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+J(n,":");default:return"GMT"+K(n,":")}},z:function(t,e){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+J(n,":");default:return"GMT"+K(n,":")}},t:function(t,e){return z(Math.trunc(+t/1e3),e.length)},T:function(t,e){return z(+t,e.length)}};function J(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Math.trunc(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+e+z(a,2)}function Z(t,e){return t%60==0?(t>0?"-":"+")+z(Math.abs(t)/60,2):K(t,e)}function K(t,e=""){const n=t>0?"-":"+",r=Math.abs(t);return n+z(Math.trunc(r/60),2)+e+z(r%60,2)}const _=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},U=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},V={p:U,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return _(t,e);let a;switch(r){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;default:a=e.dateTime({width:"full"})}return a.replace("{{date}}",_(r,e)).replace("{{time}}",U(i,e))}},tt=/^D+$/,et=/^Y+$/,nt=["D","DD","YY","YYYY"];function rt(t){return tt.test(t)}function it(t){return et.test(t)}function at(t,e,n){const r=function(t,e,n){const r="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,n);if(console.warn(r),nt.includes(t))throw new RangeError(r)}const ot=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ct=/^'([^]*?)'?$/,ut=/''/g,dt=/[a-zA-Z]/;function ht(t){const e=t.match(ct);return e?e[1].replace(ut,"'"):t}class lt{subPriority=0;validate(t,e){return!0}}class ft extends lt{constructor(t,e,n,r,i){super(),this.value=t,this.validateValue=e,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,n){return this.setValue(t,e,this.value,n)}}class wt extends lt{priority=10;subPriority=-1;constructor(t,e){super(),this.context=t||(t=>d(e,t))}set(t,e){return e.timestampIsSet?t:d(t,function(t,e){const n=function(t){return"function"==typeof t&&t.prototype?.constructor===t}(e)?new e(0):d(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}(t,this.context))}}class mt{run(t,e,n,r){const i=this.parse(t,e,n,r);return i?{setter:new ft(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,e,n){return!0}}const gt=/^(1[0-2]|0?\d)/,pt=/^(3[0-1]|[0-2]?\d)/,bt=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,xt=/^(5[0-3]|[0-4]?\d)/,yt=/^(2[0-3]|[0-1]?\d)/,vt=/^(2[0-4]|[0-1]?\d)/,Mt=/^(1[0-1]|0?\d)/,kt=/^(1[0-2]|0?\d)/,Tt=/^[0-5]?\d/,Dt=/^[0-5]?\d/,St=/^\d/,Et=/^\d{1,2}/,Nt=/^\d{1,3}/,qt=/^\d{1,4}/,Ct=/^-?\d+/,Pt=/^-?\d/,Lt=/^-?\d{1,2}/,Qt=/^-?\d{1,3}/,Yt=/^-?\d{1,4}/,It=/^([+-])(\d{2})(\d{2})?|Z/,Ot=/^([+-])(\d{2})(\d{2})|Z/,Wt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Bt=/^([+-])(\d{2}):(\d{2})|Z/,Rt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function jt(t,e){return t?{value:e(t.value),rest:t.rest}:t}function At(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Gt(t,e){const n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};const r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*c+a*s+1e3*o),rest:e.slice(n[0].length)}}function Xt(t){return At(Ct,t)}function $t(t,e){switch(t){case 1:return At(St,e);case 2:return At(Et,e);case 3:return At(Nt,e);case 4:return At(qt,e);default:return At(new RegExp("^\\d{1,"+t+"}"),e)}}function zt(t,e){switch(t){case 1:return At(Pt,e);case 2:return At(Lt,e);case 3:return At(Qt,e);case 4:return At(Yt,e);default:return At(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Ft(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ht(t,e){const n=e>0,r=n?e:1-e;let i;if(r<=50)i=t||100;else{const e=r+50;i=t+100*Math.trunc(e/100)-(t>=e%100?100:0)}return n?i:1-i}function Jt(t){return t%400==0||t%4==0&&t%100!=0}const Zt=[31,28,31,30,31,30,31,31,30,31,30,31],Kt=[31,29,31,30,31,30,31,31,30,31,30,31];function _t(t,e,n){const r=g(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=h(t,n?.in),o=a.getDay(),s=7-i;return l(a,e<0||e>6?e-(o+s)%7:((e%7+7)%7+s)%7-(o+s)%7,n)}const Ut={G:new class extends mt{priority=140;parse(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}set(t,e,n){return e.era=n,t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]},y:new class extends mt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,n){const r=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return jt($t(4,t),r);case"yo":return jt(n.ordinalNumber(t,{unit:"year"}),r);default:return jt($t(e.length,t),r)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n){const r=t.getFullYear();if(n.isTwoDigitYear){const e=Ht(n.year,r);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}return t.setFullYear("era"in e&&1!==e.era?1-n.year:n.year,0,1),t.setHours(0,0,0,0),t}},Y:new class extends mt{priority=130;parse(t,e,n){const r=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return jt($t(4,t),r);case"Yo":return jt(n.ordinalNumber(t,{unit:"year"}),r);default:return jt($t(e.length,t),r)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n,r){const i=X(t,r);if(n.isTwoDigitYear){const e=Ht(n.year,i);return t.setFullYear(e,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),p(t,r)}return t.setFullYear("era"in e&&1!==e.era?1-n.year:n.year,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),p(t,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends mt{priority=130;parse(t,e){return zt("R"===e?4:e.length,t)}set(t,e,n){const r=d(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),b(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends mt{priority=130;parse(t,e){return zt("u"===e?4:e.length,t)}set(t,e,n){return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends mt{priority=120;parse(t,e,n){switch(e){case"Q":case"QQ":return $t(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends mt{priority=120;parse(t,e,n){switch(e){case"q":case"qq":return $t(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends mt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,n){const r=t=>t-1;switch(e){case"M":return jt(At(gt,t),r);case"MM":return jt($t(2,t),r);case"Mo":return jt(n.ordinalNumber(t,{unit:"month"}),r);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}},L:new class extends mt{priority=110;parse(t,e,n){const r=t=>t-1;switch(e){case"L":return jt(At(gt,t),r);case"LL":return jt($t(2,t),r);case"Lo":return jt(n.ordinalNumber(t,{unit:"month"}),r);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends mt{priority=100;parse(t,e,n){switch(e){case"w":return At(xt,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n,r){return p(function(t,e,n){const r=h(t,n?.in),i=$(r,n)-e;return r.setDate(r.getDate()-7*i),h(r,n?.in)}(t,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends mt{priority=100;parse(t,e,n){switch(e){case"I":return At(xt,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n){return b(function(t,e,n){const r=h(t,n?.in),i=G(r,n)-e;return r.setDate(r.getDate()-7*i),r}(t,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends mt{priority=90;subPriority=1;parse(t,e,n){switch(e){case"d":return At(pt,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return $t(e.length,t)}}validate(t,e){const n=Jt(t.getFullYear()),r=t.getMonth();return n?e>=1&&e<=Kt[r]:e>=1&&e<=Zt[r]}set(t,e,n){return t.setDate(n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends mt{priority=90;subpriority=1;parse(t,e,n){switch(e){case"D":case"DD":return At(bt,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return $t(e.length,t)}}validate(t,e){return Jt(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,n){return t.setMonth(0,n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends mt{priority=90;parse(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,r){return(t=_t(t,n,r)).setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends mt{priority=90;parse(t,e,n,r){const i=t=>{const e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return jt($t(e.length,t),i);case"eo":return jt(n.ordinalNumber(t,{unit:"day"}),i);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,r){return(t=_t(t,n,r)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends mt{priority=90;parse(t,e,n,r){const i=t=>{const e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return jt($t(e.length,t),i);case"co":return jt(n.ordinalNumber(t,{unit:"day"}),i);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,r){return(t=_t(t,n,r)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends mt{priority=90;parse(t,e,n){const r=t=>0===t?7:t;switch(e){case"i":case"ii":return $t(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return jt(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return jt(n.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return jt(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r);default:return jt(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r)}}validate(t,e){return e>=1&&e<=7}set(t,e,n){return(t=function(t,e,n){const r=h(t,n?.in),i=function(t,e){const n=h(t,e?.in).getDay();return 0===n?7:n}(r,n);return l(r,e-i,n)}(t,n)).setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends mt{priority=80;parse(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Ft(n),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends mt{priority=80;parse(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Ft(n),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends mt{priority=80;parse(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Ft(n),0,0,0),t}incompatibleTokens=["a","b","t","T"]},h:new class extends mt{priority=70;parse(t,e,n){switch(e){case"h":return At(kt,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,n){const r=t.getHours()>=12;return t.setHours(r&&n<12?n+12:r||12!==n?n:0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]},H:new class extends mt{priority=70;parse(t,e,n){switch(e){case"H":return At(yt,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,n){return t.setHours(n,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends mt{priority=70;parse(t,e,n){switch(e){case"K":return At(Mt,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,n){const r=t.getHours()>=12;return t.setHours(r&&n<12?n+12:n,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]},k:new class extends mt{priority=70;parse(t,e,n){switch(e){case"k":return At(vt,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return $t(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,n){return t.setHours(n<=24?n%24:n,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends mt{priority=60;parse(t,e,n){switch(e){case"m":return At(Tt,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setMinutes(n,0,0),t}incompatibleTokens=["t","T"]},s:new class extends mt{priority=50;parse(t,e,n){switch(e){case"s":return At(Dt,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return $t(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setSeconds(n,0),t}incompatibleTokens=["t","T"]},S:new class extends mt{priority=30;parse(t,e){return jt($t(e.length,t),(t=>Math.trunc(t*Math.pow(10,3-e.length))))}set(t,e,n){return t.setMilliseconds(n),t}incompatibleTokens=["t","T"]},X:new class extends mt{priority=10;parse(t,e){switch(e){case"X":return Gt(It,t);case"XX":return Gt(Ot,t);case"XXXX":return Gt(Wt,t);case"XXXXX":return Gt(Rt,t);default:return Gt(Bt,t)}}set(t,e,n){return e.timestampIsSet?t:d(t,t.getTime()-y(t)-n)}incompatibleTokens=["t","T","x"]},x:new class extends mt{priority=10;parse(t,e){switch(e){case"x":return Gt(It,t);case"xx":return Gt(Ot,t);case"xxxx":return Gt(Wt,t);case"xxxxx":return Gt(Rt,t);default:return Gt(Bt,t)}}set(t,e,n){return e.timestampIsSet?t:d(t,t.getTime()-y(t)-n)}incompatibleTokens=["t","T","X"]},t:new class extends mt{priority=40;parse(t){return Xt(t)}set(t,e,n){return[d(t,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends mt{priority=20;parse(t){return Xt(t)}set(t,e,n){return[d(t,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,te=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ee=/^'([^]*?)'?$/,ne=/''/g,re=/\S/,ie=/[a-zA-Z]/;const ae={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},oe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,se=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ce=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ue(t){return t?parseInt(t):1}function de(t){return t&&parseFloat(t.replace(",","."))||0}const he=[31,null,31,30,31,30,31,31,30,31,30,31];function le(t){return t%400==0||t%4==0&&t%100!=0}
|
|
2
2
|
/*!
|
|
3
3
|
* chartjs-adapter-date-fns v3.0.0
|
|
4
4
|
* https://www.chartjs.org
|
|
5
5
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
*/
|
|
8
|
-
const fe={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};i._date.override({_id:"date-fns",formats:function(){return fe},parse:function(t,e){if(null==t)return null;const n=typeof t;return"number"===n||t instanceof Date?t=h(t):"string"===n&&(t="string"==typeof e?function(t,e,n,r){const i=()=>d(r?.in||n,NaN),a=Object.assign({},g()),o=r?.locale??a.locale??A,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!e)return t?i():h(n,r?.in);const u={firstWeekContainsDate:s,weekStartsOn:c,locale:o},l=[new wt(r?.in,n)],f=e.match(te).map((t=>{const e=t[0];return e in V?(0,V[e])(t,o.formatLong):t})).join("").match(Vt),w=[];for(let n of f){!r?.useAdditionalWeekYearTokens&&it(n)&&at(n,e,t),!r?.useAdditionalDayOfYearTokens&&rt(n)&&at(n,e,t);const a=n[0],s=Ut[a];if(s){const{incompatibleTokens:e}=s;if(Array.isArray(e)){const t=w.find((t=>e.includes(t.token)||t.token===a));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&w.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);w.push({token:a,fullToken:n});const r=s.run(t,n,o.match,u);if(!r)return i();l.push(r.setter),t=r.rest}else{if(a.match(ie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if("''"===n?n="'":"'"===a&&(n=n.match(ee)[1].replace(ne,"'")),0!==t.indexOf(n))return i();t=t.slice(n.length)}}if(t.length>0&&re.test(t))return i();const m=l.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,n)=>n.indexOf(t)===e)).map((t=>l.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let p=h(n,r?.in);if(isNaN(+p))return i();const b={};for(const t of m){if(!t.validate(p,u))return i();const e=t.set(p,b,u);Array.isArray(e)?(p=e[0],Object.assign(b,e[1])):p=e}return p}(t,e,new Date,this.options):function(t,e){const n=()=>d(e?.in,NaN),r=e?.additionalDigits??2,i=function(t){const e={},n=t.split(ae.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],ae.timeZoneDelimiter.test(e.date)&&(e.date=t.split(ae.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const t=ae.timezone.exec(r);t?(e.time=r.replace(t[1],""),e.timezone=t[1]):e.time=r}return e}(t);let a;if(i.date){const t=function(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:t.slice((r[1]||r[2]).length)}}(i.date,r);a=function(t,e){if(null===e)return new Date(NaN);const n=t.match(oe);if(!n)return new Date(NaN);const r=!!n[4],i=ue(n[1]),a=ue(n[2])-1,o=ue(n[3]),s=ue(n[4]),c=ue(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,s,c)?function(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const i=7*(e-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(e,s,c):new Date(NaN);{const t=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(he[e]||(le(t)?29:28))}(e,a,o)&&function(t,e){return e>=1&&e<=(le(t)?366:365)}(e,i)?(t.setUTCFullYear(e,a,Math.max(i,o)),t):new Date(NaN)}}(t.restDateString,t.year)}if(!a||isNaN(+a))return n();const o=+a;let u,l=0;if(i.time&&(l=function(t){const e=t.match(se);if(!e)return NaN;const n=de(e[1]),r=de(e[2]),i=de(e[3]);return function(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(n,r,i)?n*c+r*s+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const t=new Date(o+l),n=h(0,e?.in);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}return u=function(t){if("Z"===t)return 0;const e=t.match(ce);if(!e)return 0;const n="+"===e[1]?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,i)?n*(r*c+i*s):NaN}(i.timezone),isNaN(u)?n():h(o+l+u,e?.in)}(t,this.options)),D(t)?t.getTime():null},format:function(t,e){return function(t,e,n){const r=g(),i=n?.locale??r.locale??A,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=h(t,n?.in);if(!D(s))throw new RangeError("Invalid time value");let c=e.match(st).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,V[e])(t,i.formatLong):t})).join("").match(ot).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:ht(t)};if(H[e])return{isToken:!0,value:t};if(e.match(dt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map((r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&it(a)||!n?.useAdditionalDayOfYearTokens&&rt(a))&&at(a,e,String(t)),(0,H[a[0]])(s,a,i.localize,u)})).join("")}(t,e,this.options)},add:function(t,e,n){switch(n){case"millisecond":return w(t,e);case"second":return function(t,e){return w(t,1e3*e,void 0)}(t,e);case"minute":return function(t,e){const n=h(t,undefined);return n.setTime(n.getTime()+e*s),n}(t,e);case"hour":return function(t,e){return w(t,e*c,void 0)}(t,e);case"day":return l(t,e);case"week":return function(t,e){return l(t,7*e,void 0)}(t,e);case"month":return f(t,e);case"quarter":return function(t,e){return f(t,3*e,void 0)}(t,e);case"year":return function(t,e){return f(t,12*e,void 0)}(t,e);default:return t}},diff:function(t,e,n){switch(n){case"millisecond":return q(t,e);case"second":return function(t,e){const n=q(t,e)/1e3;return N(undefined)(n)}(t,e);case"minute":return function(t,e){const n=q(t,e)/s;return N(undefined)(n)}(t,e);case"hour":return function(t,e,n){const[r,i]=v(n?.in,t,e),a=(+r-+i)/c;return N(n?.roundingMethod)(a)}(t,e);case"day":return S(t,e);case"week":return function(t,e,n){const r=S(t,e,n)/7;return N(n?.roundingMethod)(r)}(t,e);case"month":return L(t,e);case"quarter":return function(t,e,n){const r=L(t,e,n)/3;return N(n?.roundingMethod)(r)}(t,e);case"year":return function(t,e,n){const[r,i]=v(n?.in,t,e),a=T(r,i),o=Math.abs(function(t,e){const[n,r]=v(void 0,t,e);return n.getFullYear()-r.getFullYear()}(r,i));r.setFullYear(1584),i.setFullYear(1584);const s=a*(o-+(T(r,i)===-a));return 0===s?0:s}(t,e);default:return 0}},startOf:function(t,e,n){switch(e){case"second":return function(t){const e=h(t,undefined);return e.setMilliseconds(0),e}(t);case"minute":return function(t){const e=h(t,undefined);return e.setSeconds(0,0),e}(t);case"hour":return function(t){const e=h(t,undefined);return e.setMinutes(0,0,0),e}(t);case"day":return M(t);case"week":return p(t);case"isoWeek":return p(t,{weekStartsOn:+n});case"month":return function(t){const e=h(t,undefined);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){const e=h(t,undefined),n=e.getMonth();return e.setMonth(n-n%3,1),e.setHours(0,0,0,0),e}(t);case"year":return Q(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){const e=h(t,undefined);return e.setMilliseconds(999),e}(t);case"minute":return function(t){const e=h(t,undefined);return e.setSeconds(59,999),e}(t);case"hour":return function(t){const e=h(t,undefined);return e.setMinutes(59,59,999),e}(t);case"day":return P(t);case"week":return function(t,e){const n=g(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=h(t,e?.in),a=i.getDay(),o=6+(a<r?-7:0)-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}(t);case"month":return C(t);case"quarter":return function(t){const e=h(t,undefined),n=e.getMonth();return e.setMonth(n-n%3+3,0),e.setHours(23,59,59,999),e}(t);case"year":return function(t){const e=h(t,undefined),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}(t);default:return t}}});const we=class{constructor(n){t(this,n),this.exportCSV=e(this,"exportCSV",7),this.chartType=void 0,this.chartData=void 0,this.chartOptions=void 0,this.loading=!1,this.error=void 0,this.fallbackText="No data available",this.width="100%",this.height="auto",this.isYAxisPercentageValues=!1,this.showActiveSegmentLabel=!1,this.initialActiveIndex=0,this.activeSegmentChangeCallback=void 0,this.exportable=!1,this.chartInstance=void 0,this.showPngSvgExport=!1,this.selectedSegmentIndex=null,this.hoverSegmentIndex=null}handleUpdate(t){t&&t.datasets&&0!==t.datasets.length?"line"!==this.chartType?"doughnut-v2"!==this.chartType?this.renderChart():this.hasChartDataChanged()&&(this.renderChart(),this.previousChartData=this.deepClone(this.chartData)):setTimeout((()=>{this.renderChart()}),0):this.destroyChart()}componentDidLoad(){"doughnut-v2"===this.chartType&&(this.previousChartData=this.deepClone(this.chartData)),this.renderChart(),this.notifyActiveSegment()}hasChartDataChanged(){if(!this.previousChartData)return!0;try{return JSON.stringify(this.previousChartData)!==JSON.stringify(this.chartData)}catch(t){return!0}}deepClone(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}disconnectedCallback(){this.destroyChart()}renderChart(){var t,e,n;if(!this.canvasEl||!this.chartData||!this.chartType)return;this.destroyChart();const r=Object.assign(Object.assign({},this.chartData),{datasets:(null===(t=this.chartData.datasets)||void 0===t?void 0:t.map((t=>Object.assign({},t))))||[]}),i={type:this.getChartJsType(),data:r,options:this.getChartOptions(),plugins:[]};if("doughnut"===this.chartType||"semi-gauge"===this.chartType||"doughnut-v2"===this.chartType){const t=(null===(n=null===(e=r.datasets[0])||void 0===e?void 0:e.data)||void 0===n?void 0:n.map((t=>Number(t)||0)).reduce(((t,e)=>t+e),0))||0;i.plugins.push(this.getCenterTextPlugin(t.toLocaleString()))}"doughnut-v2"===this.chartType&&i.plugins.push(this.getLegendHoverPlugin()),this.chartInstance=new a(this.canvasEl,i),"doughnut-v2"===this.chartType&&(this.chartInstance.setDatasetVisibility(0,!0),this.updateChartColors())}destroyChart(){this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=void 0)}getChartJsType(){return"semi-gauge"===this.chartType||"doughnut-v2"===this.chartType?"doughnut":this.chartType}getBaseOptions(){return{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{usePointStyle:!0,pointStyle:"circle"}},tooltip:{callbacks:{label:t=>{const e=t.label||t.dataset.label||"",n=Number(t.raw);return`${e}: ${isNaN(n)?t.formattedValue:n.toFixed(2)}`}},backgroundColor:"#17272B"}}}}getLineChartConfig(){const t=new Date;return t.setDate(1),t.setHours(0,0,0,0),{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},elements:{point:{radius:0,hoverRadius:4}},plugins:{legend:{labels:{padding:20,generateLabels:t=>t.data.datasets.map(((e,n)=>({text:e.label||"",strokeStyle:e.borderColor,fillStyle:e.backgroundColor||"transparent",lineDash:e.borderDash||[],lineWidth:e.borderWidth||2,hidden:!t.isDatasetVisible(n),datasetIndex:n,pointStyle:"line"})))}},tooltip:{mode:"index",intersect:!1,backgroundColor:"#17272B",titleFont:{size:14,weight:"bold"},bodyFont:{size:12},callbacks:{title:t=>{var e,n;return t&&t.length?new Date(null!==(n=null===(e=t[0].parsed)||void 0===e?void 0:e.x)&&void 0!==n?n:t[0].label).toLocaleDateString(void 0,{day:"2-digit",month:"short",year:"numeric"}):""},label:t=>{const e=t.parsed&&void 0!==t.parsed.y?t.parsed.y:t.raw,n=Number(e),r=isNaN(n)?e:n.toFixed(2);return`${t.dataset.label}: ${r}${this.isYAxisPercentageValues?"%":""}`}}}},interaction:{mode:"index",intersect:!1},scales:{x:{type:"time",time:{unit:"month",displayFormats:{month:"MMM yyyy"},tooltipFormat:"dd MMM yyyy"},grid:{color:"#E5E5E5"},border:{dash:[4,4]},ticks:{autoSkip:!0,maxRotation:0}},y:{min:0,beginAtZero:!0,ticks:{callback:t=>{const e=Number(t),n=isNaN(e)?t:e.toFixed(2);return this.isYAxisPercentageValues?`${n}%`:n}},grid:{color:"#E5E5E5"},border:{dash:[4,4]}}}}}getDoughnutChartConfig(){return{plugins:{legend:{labels:{pointStyle:"circle",padding:16}}},cutout:"60%"}}getDoughnutV2ChartConfig(){return{plugins:{legend:{labels:{pointStyle:"circle",padding:16},onClick:(t,e)=>{t.stopPropagation();const n=e.index;this.selectedSegmentIndex!==n&&(this.selectedSegmentIndex=n,this.updateChartColors(),this.notifyActiveSegment())}},tooltip:{enabled:!1}},cutout:"60%",onHover:(t,e)=>{e&&e.length>0?(this.hoverSegmentIndex=e[0].index,this.updateChartColors()):(this.hoverSegmentIndex=null,this.updateChartColors())},onClick:(t,e)=>{if(e&&e.length>0){const t=e[0].index;this.selectedSegmentIndex!==t&&(this.selectedSegmentIndex=t,this.updateChartColors(),this.notifyActiveSegment())}}}}updateChartColors(){var t,e,n,r;if(!this.chartInstance||"doughnut-v2"!==this.chartType)return;const i=this.chartInstance.data.datasets[0],a=null===(e=null===(t=this.chartData)||void 0===t?void 0:t.datasets)||void 0===e?void 0:e[0];"doughnut-v2"===this.chartType&&!1===this.chartInstance.isDatasetVisible(0)&&this.chartInstance.setDatasetVisibility(0,!0);const o="#45C9B0",s="#A3A3A3",c="#E5E5E5",u=null==a?void 0:a.selectedColors,d=null==a?void 0:a.hoverColors,h=null==a?void 0:a.inactiveColors;let l=[];if(null!==this.selectedSegmentIndex)l=i.data.map(((t,e)=>e===this.hoverSegmentIndex?(null==d?void 0:d[e])||s:e===this.selectedSegmentIndex?(null==u?void 0:u[e])||o:(null==h?void 0:h[e])||c));else if(null!==this.hoverSegmentIndex){const t=null!==(n=this.initialActiveIndex)&&void 0!==n?n:0;l=i.data.map(((e,n)=>n===this.hoverSegmentIndex?(null==d?void 0:d[n])||s:n===t?(null==u?void 0:u[n])||o:(null==h?void 0:h[n])||c))}else{const t=null!==(r=this.initialActiveIndex)&&void 0!==r?r:0;l=i.data.map(((e,n)=>n===t?(null==u?void 0:u[n])||o:(null==h?void 0:h[n])||c))}i.backgroundColor=l,this.chartInstance.update("active")}lightenColor(t,e){if(!t||!t.startsWith("#"))return t;const n=parseInt(t.replace("#",""),16);return`#${(Math.min(255,(n>>16&255)+e)<<16|Math.min(255,(n>>8&255)+e)<<8|Math.min(255,(255&n)+e)).toString(16).padStart(6,"0")}`}getCenterTextPlugin(t){return{id:"centerText",afterDatasetsDraw:e=>{var n,r;const{ctx:i}=e;i.save();const a=e.getDatasetMeta(0).data[0].x;let o=e.getDatasetMeta(0).data[0].y;"semi-gauge"===this.chartType&&(o-=20);let s=t;if("doughnut-v2"===this.chartType){const t=null!==this.selectedSegmentIndex?this.selectedSegmentIndex:null!==(n=this.initialActiveIndex)&&void 0!==n?n:0,e=null===(r=this.chartData.datasets[0])||void 0===r?void 0:r.data[t];s=Number(e||0).toLocaleString()}i.font="bold 20px Roboto",i.fillStyle="#111",i.textAlign="center",i.textBaseline="middle",i.fillText(s,a,o)}}}getLegendHoverPlugin(){return{id:"legendHover",afterDraw:t=>{if(null===this.hoverSegmentIndex)return;const e=t.legend;if(!e||!e.legendItems)return;const n=t.ctx,r=e.legendItems[this.hoverSegmentIndex];if(!r)return;const i=e.legendHitBoxes;if(!i||!i[this.hoverSegmentIndex])return;const a=i[this.hoverSegmentIndex];n.save(),n.fillStyle="#F3F4F6",n.beginPath(),n.roundRect(a.left-8,a.top-8,a.width+16,a.height+16,4),n.fill();const o=a.left+8,s=a.top+a.height/2;n.fillStyle="#D1D5DB",n.beginPath(),n.arc(o,s,8,0,2*Math.PI),n.fill(),n.fillStyle="#9CA3AF",n.font="12px Roboto, sans-serif",n.textBaseline="middle",n.textAlign="left",n.fillText(r.text,a.left+16+4,s),n.restore()}}}getSemiGaugeChartConfig(){return{plugins:{legend:{labels:{pointStyle:"circle",padding:16}}},rotation:-90,circumference:180,cutout:"70%"}}merge(t,e){if("object"!=typeof t||"object"!=typeof e)return e;for(const n of Object.keys(e))t[n]=e[n]instanceof Object&&n in t?this.merge(Object.assign({},t[n]),e[n]):e[n];return t}getChartOptions(){const t=this.getBaseOptions();let e={};return"line"===this.chartType?e=this.getLineChartConfig():"doughnut"===this.chartType?e=this.getDoughnutChartConfig():"semi-gauge"===this.chartType?e=this.getSemiGaugeChartConfig():"doughnut-v2"===this.chartType&&(e=this.getDoughnutV2ChartConfig()),this.merge(this.merge(t,e),this.chartOptions||{})}exportChart(t){if(!this.chartInstance)return;const e=document.createElement("a");if(e.download=`chart-export.${t}`,"png"===t)e.href=this.chartInstance.toBase64Image("image/png");else{const t=(new XMLSerializer).serializeToString(this.canvasEl),n=new Blob([t],{type:"image/svg+xml"});e.href=URL.createObjectURL(n)}e.click()}getErrorContent(){return this.commonContent("warning","Something went wrong","We ran into an issue while trying to load this widget.","#DC0000",!0)}getNoDataContent(){return this.commonContent("ssid_chart","No data available","There is currently no data available to show performance trends.","#111")}commonContent(t,e,r,i,a=!1){return n("div",{class:"error-content"},n("tttx-icon_1_9_95",{icon:t,color:i,size:48}),n("span",{class:"error-heading"},e),n("span",{class:"error-message"},r),a&&n("div",{class:"error-actions"},n("tttx-button_1_9_95",{class:"support-btn",icon:"help",design:"primary",onClick:()=>this.renderChart()},"Contact support")))}notifyActiveSegment(){var t,e;if("doughnut-v2"!==this.chartType||!this.chartData)return;const n=null!==this.selectedSegmentIndex?this.selectedSegmentIndex:null!==(t=this.initialActiveIndex)&&void 0!==t?t:0,r=(null===(e=this.chartData.labels)||void 0===e?void 0:e[n])||"";this.activeSegmentChangeCallback&&this.activeSegmentChangeCallback(r)}render(){var t,e,r;return n("div",{class:"chart-wrapper",style:{width:this.width,height:this.height}},this.loading&&n("div",{class:"chart-loading"},n("tttx-loading-spinner_1_9_95",{size:"large",color:"#2b9ab7"})),this.error&&this.getErrorContent(),!this.loading&&!this.error&&(!this.chartData||!(null===(t=this.chartData.datasets)||void 0===t?void 0:t.length))&&this.getNoDataContent(),!this.loading&&!this.error&&(null===(r=null===(e=this.chartData)||void 0===e?void 0:e.datasets)||void 0===r?void 0:r.length)>0&&n("div",{class:"chart-canvas-container",style:{width:"100%",height:"100%"}},n("canvas",{ref:t=>this.canvasEl=t,"aria-label":"Chart canvas",role:"img",style:{width:"100%",height:"100%",cursor:"doughnut-v2"===this.chartType?"pointer":"default"}})),this.exportable&&!this.loading&&!this.error&&n("div",{class:"export-buttons"},this.showPngSvgExport&&n("tttx-button_1_9_95",{class:"export-png",design:"primary",onClick:()=>this.exportChart("png")},"Export PNG"),this.showPngSvgExport&&n("tttx-button_1_9_95",{class:"export-svg",design:"primary",onClick:()=>this.exportChart("svg")},"Export SVG"),n("tttx-button_1_9_95",{class:"export-csv",design:"primary",onClick:()=>this.exportCSV.emit({name:this.chartType})},"Export CSV")))}get el(){return r(this)}static get watchers(){return{chartData:["handleUpdate","notifyActiveSegment"],chartOptions:["handleUpdate"],selectedSegmentIndex:["notifyActiveSegment"],initialActiveIndex:["notifyActiveSegment"]}}};we.style=".chart-wrapper{position:relative;width:100%;height:100%;display:flex;flex-direction:column}.chart-canvas-container{flex:1;min-height:0;position:relative;width:100%}canvas{display:block;width:100% !important;height:100% !important}.export-buttons{display:flex;gap:0.5rem;justify-content:flex-end;padding-top:0.5rem;padding-bottom:0.5rem}.chart-loading{width:100%;height:100%;align-items:center;justify-content:center;display:flex}.error-content{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;align-self:stretch;background-color:#FAFAFA}.error-content .error-heading{color:var(--Text-Default-Default, #111);text-align:center;font-family:Roboto;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.error-content .error-message{color:var(--Text-Neutral-Default, #737373);text-align:center;font-family:Roboto;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.error-content .error-actions{display:flex;align-items:flex-start;gap:12px;margin-top:16px}";export{we as tttx_chart_1_9_95}
|
|
8
|
+
const fe={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};i._date.override({_id:"date-fns",formats:function(){return fe},parse:function(t,e){if(null==t)return null;const n=typeof t;return"number"===n||t instanceof Date?t=h(t):"string"===n&&(t="string"==typeof e?function(t,e,n,r){const i=()=>d(r?.in||n,NaN),a=Object.assign({},g()),o=r?.locale??a.locale??A,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!e)return t?i():h(n,r?.in);const u={firstWeekContainsDate:s,weekStartsOn:c,locale:o},l=[new wt(r?.in,n)],f=e.match(te).map((t=>{const e=t[0];return e in V?(0,V[e])(t,o.formatLong):t})).join("").match(Vt),w=[];for(let n of f){!r?.useAdditionalWeekYearTokens&&it(n)&&at(n,e,t),!r?.useAdditionalDayOfYearTokens&&rt(n)&&at(n,e,t);const a=n[0],s=Ut[a];if(s){const{incompatibleTokens:e}=s;if(Array.isArray(e)){const t=w.find((t=>e.includes(t.token)||t.token===a));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&w.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);w.push({token:a,fullToken:n});const r=s.run(t,n,o.match,u);if(!r)return i();l.push(r.setter),t=r.rest}else{if(a.match(ie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if("''"===n?n="'":"'"===a&&(n=n.match(ee)[1].replace(ne,"'")),0!==t.indexOf(n))return i();t=t.slice(n.length)}}if(t.length>0&&re.test(t))return i();const m=l.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,n)=>n.indexOf(t)===e)).map((t=>l.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let p=h(n,r?.in);if(isNaN(+p))return i();const b={};for(const t of m){if(!t.validate(p,u))return i();const e=t.set(p,b,u);Array.isArray(e)?(p=e[0],Object.assign(b,e[1])):p=e}return p}(t,e,new Date,this.options):function(t,e){const n=()=>d(e?.in,NaN),r=e?.additionalDigits??2,i=function(t){const e={},n=t.split(ae.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],ae.timeZoneDelimiter.test(e.date)&&(e.date=t.split(ae.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const t=ae.timezone.exec(r);t?(e.time=r.replace(t[1],""),e.timezone=t[1]):e.time=r}return e}(t);let a;if(i.date){const t=function(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:t.slice((r[1]||r[2]).length)}}(i.date,r);a=function(t,e){if(null===e)return new Date(NaN);const n=t.match(oe);if(!n)return new Date(NaN);const r=!!n[4],i=ue(n[1]),a=ue(n[2])-1,o=ue(n[3]),s=ue(n[4]),c=ue(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,s,c)?function(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const i=7*(e-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(e,s,c):new Date(NaN);{const t=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(he[e]||(le(t)?29:28))}(e,a,o)&&function(t,e){return e>=1&&e<=(le(t)?366:365)}(e,i)?(t.setUTCFullYear(e,a,Math.max(i,o)),t):new Date(NaN)}}(t.restDateString,t.year)}if(!a||isNaN(+a))return n();const o=+a;let u,l=0;if(i.time&&(l=function(t){const e=t.match(se);if(!e)return NaN;const n=de(e[1]),r=de(e[2]),i=de(e[3]);return function(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(n,r,i)?n*c+r*s+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const t=new Date(o+l),n=h(0,e?.in);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}return u=function(t){if("Z"===t)return 0;const e=t.match(ce);if(!e)return 0;const n="+"===e[1]?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,i)?n*(r*c+i*s):NaN}(i.timezone),isNaN(u)?n():h(o+l+u,e?.in)}(t,this.options)),D(t)?t.getTime():null},format:function(t,e){return function(t,e,n){const r=g(),i=n?.locale??r.locale??A,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=h(t,n?.in);if(!D(s))throw new RangeError("Invalid time value");let c=e.match(st).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,V[e])(t,i.formatLong):t})).join("").match(ot).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:ht(t)};if(H[e])return{isToken:!0,value:t};if(e.match(dt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map((r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&it(a)||!n?.useAdditionalDayOfYearTokens&&rt(a))&&at(a,e,String(t)),(0,H[a[0]])(s,a,i.localize,u)})).join("")}(t,e,this.options)},add:function(t,e,n){switch(n){case"millisecond":return w(t,e);case"second":return function(t,e){return w(t,1e3*e,void 0)}(t,e);case"minute":return function(t,e){const n=h(t,undefined);return n.setTime(n.getTime()+e*s),n}(t,e);case"hour":return function(t,e){return w(t,e*c,void 0)}(t,e);case"day":return l(t,e);case"week":return function(t,e){return l(t,7*e,void 0)}(t,e);case"month":return f(t,e);case"quarter":return function(t,e){return f(t,3*e,void 0)}(t,e);case"year":return function(t,e){return f(t,12*e,void 0)}(t,e);default:return t}},diff:function(t,e,n){switch(n){case"millisecond":return q(t,e);case"second":return function(t,e){const n=q(t,e)/1e3;return N(undefined)(n)}(t,e);case"minute":return function(t,e){const n=q(t,e)/s;return N(undefined)(n)}(t,e);case"hour":return function(t,e,n){const[r,i]=v(n?.in,t,e),a=(+r-+i)/c;return N(n?.roundingMethod)(a)}(t,e);case"day":return S(t,e);case"week":return function(t,e,n){const r=S(t,e,n)/7;return N(n?.roundingMethod)(r)}(t,e);case"month":return L(t,e);case"quarter":return function(t,e,n){const r=L(t,e,n)/3;return N(n?.roundingMethod)(r)}(t,e);case"year":return function(t,e,n){const[r,i]=v(n?.in,t,e),a=T(r,i),o=Math.abs(function(t,e){const[n,r]=v(void 0,t,e);return n.getFullYear()-r.getFullYear()}(r,i));r.setFullYear(1584),i.setFullYear(1584);const s=a*(o-+(T(r,i)===-a));return 0===s?0:s}(t,e);default:return 0}},startOf:function(t,e,n){switch(e){case"second":return function(t){const e=h(t,undefined);return e.setMilliseconds(0),e}(t);case"minute":return function(t){const e=h(t,undefined);return e.setSeconds(0,0),e}(t);case"hour":return function(t){const e=h(t,undefined);return e.setMinutes(0,0,0),e}(t);case"day":return M(t);case"week":return p(t);case"isoWeek":return p(t,{weekStartsOn:+n});case"month":return function(t){const e=h(t,undefined);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){const e=h(t,undefined),n=e.getMonth();return e.setMonth(n-n%3,1),e.setHours(0,0,0,0),e}(t);case"year":return Q(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){const e=h(t,undefined);return e.setMilliseconds(999),e}(t);case"minute":return function(t){const e=h(t,undefined);return e.setSeconds(59,999),e}(t);case"hour":return function(t){const e=h(t,undefined);return e.setMinutes(59,59,999),e}(t);case"day":return C(t);case"week":return function(t,e){const n=g(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=h(t,e?.in),a=i.getDay(),o=6+(a<r?-7:0)-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}(t);case"month":return P(t);case"quarter":return function(t){const e=h(t,undefined),n=e.getMonth();return e.setMonth(n-n%3+3,0),e.setHours(23,59,59,999),e}(t);case"year":return function(t){const e=h(t,undefined),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}(t);default:return t}}});const we=class{constructor(n){t(this,n),this.exportCSV=e(this,"exportCSV",7),this.chartType=void 0,this.chartData=void 0,this.chartOptions=void 0,this.loading=!1,this.error=void 0,this.fallbackText="No data available",this.width="100%",this.height="auto",this.isYAxisPercentageValues=!1,this.showActiveSegmentLabel=!1,this.initialActiveIndex=0,this.activeSegmentChangeCallback=void 0,this.exportable=!1,this.chartInstance=void 0,this.showPngSvgExport=!1,this.selectedSegmentIndex=null,this.hoverSegmentIndex=null}handleUpdate(t){t&&t.datasets&&0!==t.datasets.length?"line"!==this.chartType?"doughnut-v2"!==this.chartType?this.renderChart():this.hasChartDataChanged()&&(this.renderChart(),this.previousChartData=this.deepClone(this.chartData)):setTimeout((()=>{this.renderChart()}),0):this.destroyChart()}componentDidLoad(){"doughnut-v2"===this.chartType&&(this.previousChartData=this.deepClone(this.chartData)),this.renderChart(),this.notifyActiveSegment()}hasChartDataChanged(){if(!this.previousChartData)return!0;try{return JSON.stringify(this.previousChartData)!==JSON.stringify(this.chartData)}catch(t){return!0}}deepClone(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}disconnectedCallback(){this.destroyChart()}renderChart(){var t,e,n;if(!this.canvasEl||!this.chartData||!this.chartType)return;this.destroyChart();const r=Object.assign(Object.assign({},this.chartData),{datasets:(null===(t=this.chartData.datasets)||void 0===t?void 0:t.map((t=>Object.assign({},t))))||[]}),i={type:this.getChartJsType(),data:r,options:this.getChartOptions(),plugins:[]};if("doughnut"===this.chartType||"semi-gauge"===this.chartType||"doughnut-v2"===this.chartType){const t=(null===(n=null===(e=r.datasets[0])||void 0===e?void 0:e.data)||void 0===n?void 0:n.map((t=>Number(t)||0)).reduce(((t,e)=>t+e),0))||0;i.plugins.push(this.getCenterTextPlugin(t.toLocaleString()))}"doughnut-v2"===this.chartType&&i.plugins.push(this.getLegendHoverPlugin()),this.chartInstance=new a(this.canvasEl,i),"doughnut-v2"===this.chartType&&(this.chartInstance.setDatasetVisibility(0,!0),this.updateChartColors())}destroyChart(){this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=void 0)}getChartJsType(){return"semi-gauge"===this.chartType||"doughnut-v2"===this.chartType?"doughnut":this.chartType}getBaseOptions(){return{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{usePointStyle:!0,pointStyle:"circle"}},tooltip:{callbacks:{label:t=>{const e=t.label||t.dataset.label||"",n=Number(t.raw);return`${e}: ${isNaN(n)?t.formattedValue:n.toFixed(2)}`}},backgroundColor:"#17272B"}}}}getLineChartConfig(){const t=new Date;return t.setDate(1),t.setHours(0,0,0,0),{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},elements:{point:{radius:0,hoverRadius:4}},plugins:{legend:{labels:{padding:20,generateLabels:t=>t.data.datasets.map(((e,n)=>({text:e.label||"",strokeStyle:e.borderColor,fillStyle:e.backgroundColor||"transparent",lineDash:e.borderDash||[],lineWidth:e.borderWidth||2,hidden:!t.isDatasetVisible(n),datasetIndex:n,pointStyle:"line"})))}},tooltip:{mode:"index",intersect:!1,backgroundColor:"#17272B",titleFont:{size:14,weight:"bold"},bodyFont:{size:12},callbacks:{title:t=>{var e,n;return t&&t.length?new Date(null!==(n=null===(e=t[0].parsed)||void 0===e?void 0:e.x)&&void 0!==n?n:t[0].label).toLocaleDateString(void 0,{day:"2-digit",month:"short",year:"numeric"}):""},label:t=>{const e=t.parsed&&void 0!==t.parsed.y?t.parsed.y:t.raw,n=Number(e),r=isNaN(n)?e:n.toFixed(2);return`${t.dataset.label}: ${r}${this.isYAxisPercentageValues?"%":""}`},labelColor:t=>"Overall"!==t.dataset.label?{borderWidth:2}:{borderWidth:2,borderColor:t.dataset.borderColor,backgroundColor:t.dataset.borderColor}}}},interaction:{mode:"index",intersect:!1},scales:{x:{type:"time",time:{unit:"month",displayFormats:{month:"MMM yyyy"},tooltipFormat:"dd MMM yyyy"},grid:{color:"#E5E5E5"},border:{dash:[4,4]},ticks:{autoSkip:!0,maxRotation:0}},y:{min:0,max:100,beginAtZero:!0,ticks:{stepSize:20,callback:t=>{const e=Number(t),n=isNaN(e)?t:Number.isInteger(e)?e:e.toFixed(2);return this.isYAxisPercentageValues?`${n}%`:n}},grid:{color:"#E5E5E5"},border:{dash:[4,4]}}}}}getDoughnutChartConfig(){return{plugins:{legend:{labels:{pointStyle:"circle",padding:16}}},cutout:"60%"}}getDoughnutV2ChartConfig(){return{plugins:{legend:{labels:{pointStyle:"circle",padding:16},onClick:(t,e)=>{t.stopPropagation();const n=e.index;this.selectedSegmentIndex!==n&&(this.selectedSegmentIndex=n,this.updateChartColors(),this.notifyActiveSegment())}},tooltip:{enabled:!1}},cutout:"60%",onHover:(t,e)=>{e&&e.length>0?(this.hoverSegmentIndex=e[0].index,this.updateChartColors()):(this.hoverSegmentIndex=null,this.updateChartColors())},onClick:(t,e)=>{if(e&&e.length>0){const t=e[0].index;this.selectedSegmentIndex!==t&&(this.selectedSegmentIndex=t,this.updateChartColors(),this.notifyActiveSegment())}}}}updateChartColors(){var t,e,n,r;if(!this.chartInstance||"doughnut-v2"!==this.chartType)return;const i=this.chartInstance.data.datasets[0],a=null===(e=null===(t=this.chartData)||void 0===t?void 0:t.datasets)||void 0===e?void 0:e[0];"doughnut-v2"===this.chartType&&!1===this.chartInstance.isDatasetVisible(0)&&this.chartInstance.setDatasetVisibility(0,!0);const o="#45C9B0",s="#A3A3A3",c="#E5E5E5",u=null==a?void 0:a.selectedColors,d=null==a?void 0:a.hoverColors,h=null==a?void 0:a.inactiveColors;let l=[];if(null!==this.selectedSegmentIndex)l=i.data.map(((t,e)=>e===this.hoverSegmentIndex?(null==d?void 0:d[e])||s:e===this.selectedSegmentIndex?(null==u?void 0:u[e])||o:(null==h?void 0:h[e])||c));else if(null!==this.hoverSegmentIndex){const t=null!==(n=this.initialActiveIndex)&&void 0!==n?n:0;l=i.data.map(((e,n)=>n===this.hoverSegmentIndex?(null==d?void 0:d[n])||s:n===t?(null==u?void 0:u[n])||o:(null==h?void 0:h[n])||c))}else{const t=null!==(r=this.initialActiveIndex)&&void 0!==r?r:0;l=i.data.map(((e,n)=>n===t?(null==u?void 0:u[n])||o:(null==h?void 0:h[n])||c))}i.backgroundColor=l,this.chartInstance.update("active")}lightenColor(t,e){if(!t||!t.startsWith("#"))return t;const n=parseInt(t.replace("#",""),16);return`#${(Math.min(255,(n>>16&255)+e)<<16|Math.min(255,(n>>8&255)+e)<<8|Math.min(255,(255&n)+e)).toString(16).padStart(6,"0")}`}getCenterTextPlugin(t){return{id:"centerText",afterDatasetsDraw:e=>{var n,r;const{ctx:i}=e;i.save();const a=e.getDatasetMeta(0).data[0].x;let o=e.getDatasetMeta(0).data[0].y;"semi-gauge"===this.chartType&&(o-=20);let s=t;if("doughnut-v2"===this.chartType){const t=null!==this.selectedSegmentIndex?this.selectedSegmentIndex:null!==(n=this.initialActiveIndex)&&void 0!==n?n:0,e=null===(r=this.chartData.datasets[0])||void 0===r?void 0:r.data[t];s=Number(e||0).toLocaleString()}i.font="bold 20px Roboto",i.fillStyle="#111",i.textAlign="center",i.textBaseline="middle",i.fillText(s,a,o)}}}getLegendHoverPlugin(){return{id:"legendHover",afterDraw:t=>{if(null===this.hoverSegmentIndex)return;const e=t.legend;if(!e||!e.legendItems)return;const n=t.ctx,r=e.legendItems[this.hoverSegmentIndex];if(!r)return;const i=e.legendHitBoxes;if(!i||!i[this.hoverSegmentIndex])return;const a=i[this.hoverSegmentIndex];n.save(),n.fillStyle="#F3F4F6",n.beginPath(),n.roundRect(a.left-8,a.top-8,a.width+16,a.height+16,4),n.fill();const o=a.left+8,s=a.top+a.height/2;n.fillStyle="#D1D5DB",n.beginPath(),n.arc(o,s,8,0,2*Math.PI),n.fill(),n.fillStyle="#9CA3AF",n.font="12px Roboto, sans-serif",n.textBaseline="middle",n.textAlign="left",n.fillText(r.text,a.left+16+4,s),n.restore()}}}getSemiGaugeChartConfig(){return{plugins:{legend:{labels:{pointStyle:"circle",padding:16}}},rotation:-90,circumference:180,cutout:"70%"}}merge(t,e){if("object"!=typeof t||"object"!=typeof e)return e;for(const n of Object.keys(e))t[n]=e[n]instanceof Object&&n in t?this.merge(Object.assign({},t[n]),e[n]):e[n];return t}getChartOptions(){const t=this.getBaseOptions();let e={};return"line"===this.chartType?e=this.getLineChartConfig():"doughnut"===this.chartType?e=this.getDoughnutChartConfig():"semi-gauge"===this.chartType?e=this.getSemiGaugeChartConfig():"doughnut-v2"===this.chartType&&(e=this.getDoughnutV2ChartConfig()),this.merge(this.merge(t,e),this.chartOptions||{})}exportChart(t){if(!this.chartInstance)return;const e=document.createElement("a");if(e.download=`chart-export.${t}`,"png"===t)e.href=this.chartInstance.toBase64Image("image/png");else{const t=(new XMLSerializer).serializeToString(this.canvasEl),n=new Blob([t],{type:"image/svg+xml"});e.href=URL.createObjectURL(n)}e.click()}getErrorContent(){return this.commonContent("warning","Something went wrong","We ran into an issue while trying to load this widget.","#DC0000",!0)}getNoDataContent(){return this.commonContent("ssid_chart","No data available","There is currently no data available to show performance trends.","#111")}commonContent(t,e,r,i,a=!1){return n("div",{class:"error-content"},n("tttx-icon_1_9_97",{icon:t,color:i,size:48}),n("span",{class:"error-heading"},e),n("span",{class:"error-message"},r),a&&n("div",{class:"error-actions"},n("tttx-button_1_9_97",{class:"support-btn",icon:"help",design:"primary",onClick:()=>this.renderChart()},"Contact support")))}notifyActiveSegment(){var t,e;if("doughnut-v2"!==this.chartType||!this.chartData)return;const n=null!==this.selectedSegmentIndex?this.selectedSegmentIndex:null!==(t=this.initialActiveIndex)&&void 0!==t?t:0,r=(null===(e=this.chartData.labels)||void 0===e?void 0:e[n])||"";this.activeSegmentChangeCallback&&this.activeSegmentChangeCallback(r)}render(){var t,e,r;return n("div",{class:"chart-wrapper",style:{width:this.width,height:this.height}},this.loading&&n("div",{class:"chart-loading"},n("tttx-loading-spinner_1_9_97",{size:"large",color:"#2b9ab7"})),this.error&&this.getErrorContent(),!this.loading&&!this.error&&(!this.chartData||!(null===(t=this.chartData.datasets)||void 0===t?void 0:t.length))&&this.getNoDataContent(),!this.loading&&!this.error&&(null===(r=null===(e=this.chartData)||void 0===e?void 0:e.datasets)||void 0===r?void 0:r.length)>0&&n("div",{class:"chart-canvas-container",style:{width:"100%",height:"100%"}},n("canvas",{ref:t=>this.canvasEl=t,"aria-label":"Chart canvas",role:"img",style:{width:"100%",height:"100%",cursor:"doughnut-v2"===this.chartType?"pointer":"default"}})),this.exportable&&!this.loading&&!this.error&&n("div",{class:"export-buttons"},this.showPngSvgExport&&n("tttx-button_1_9_97",{class:"export-png",design:"primary",onClick:()=>this.exportChart("png")},"Export PNG"),this.showPngSvgExport&&n("tttx-button_1_9_97",{class:"export-svg",design:"primary",onClick:()=>this.exportChart("svg")},"Export SVG"),n("tttx-button_1_9_97",{class:"export-csv",design:"primary",onClick:()=>this.exportCSV.emit({name:this.chartType})},"Export CSV")))}get el(){return r(this)}static get watchers(){return{chartData:["handleUpdate","notifyActiveSegment"],chartOptions:["handleUpdate"],selectedSegmentIndex:["notifyActiveSegment"],initialActiveIndex:["notifyActiveSegment"]}}};we.style=".chart-wrapper{position:relative;width:100%;height:100%;display:flex;flex-direction:column}.chart-canvas-container{flex:1;min-height:0;position:relative;width:100%}canvas{display:block;width:100% !important;height:100% !important}.export-buttons{display:flex;gap:0.5rem;justify-content:flex-end;padding-top:0.5rem;padding-bottom:0.5rem}.chart-loading{width:100%;height:100%;align-items:center;justify-content:center;display:flex}.error-content{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;align-self:stretch;background-color:#FAFAFA}.error-content .error-heading{color:var(--Text-Default-Default, #111);text-align:center;font-family:Roboto;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.error-content .error-message{color:var(--Text-Neutral-Default, #737373);text-align:center;font-family:Roboto;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.error-content .error-actions{display:flex;align-items:flex-start;gap:12px;margin-top:16px}";export{we as tttx_chart_1_9_97}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e}from"./p-457a7731.js";const i=class{constructor(e){t(this,e),this.toggleSwitchEvent=o(this,"toggleSwitchEvent",3),this.initialstate=void 0,this._state=void 0}componentWillLoad(){this._state=!0===this.initialstate||"true"===this.initialstate}onChange(t){this.toggleSwitchEvent.emit({checked:t.target.checked})}render(){let t;return t=e("input",this._state?{type:"checkbox",checked:!0,onChange:this.onChange.bind(this)}:{type:"checkbox",onChange:this.onChange.bind(this)}),e("div",{id:"toggle-switch"},t,e("div",{id:"toggle-body"}))}};i.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:inline-block}#toggle-switch{width:50px;height:30px;border-radius:30px;position:relative;box-sizing:border-box}#toggle-switch input{cursor:pointer;width:50px;height:30px;padding:0;margin:0;top:0;left:0;border:none;outline:none;opacity:0;position:absolute}#toggle-switch #toggle-body{width:50px;height:30px;border-radius:28px;position:relative;top:0;left:0;pointer-events:none;background:#9e9e9e}#toggle-switch #toggle-body::after{font-family:"Material Symbols Rounded", sans-serif;content:"\\e5ca";position:absolute;width:26px;height:26px;left:2px;top:2px;border-radius:26px;background:white;transition:all 0.1s;font-size:22px;color:#FFFFFF;justify-content:center;display:inline-flex}#toggle-switch input:checked~#toggle-body::after{color:#a2bb31;left:22px}#toggle-switch input:checked~#toggle-body{background:#a2bb31}';export{i as
|
|
1
|
+
import{r as t,c as o,h as e}from"./p-457a7731.js";const i=class{constructor(e){t(this,e),this.toggleSwitchEvent=o(this,"toggleSwitchEvent",3),this.initialstate=void 0,this._state=void 0}componentWillLoad(){this._state=!0===this.initialstate||"true"===this.initialstate}onChange(t){this.toggleSwitchEvent.emit({checked:t.target.checked})}render(){let t;return t=e("input",this._state?{type:"checkbox",checked:!0,onChange:this.onChange.bind(this)}:{type:"checkbox",onChange:this.onChange.bind(this)}),e("div",{id:"toggle-switch"},t,e("div",{id:"toggle-body"}))}};i.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:inline-block}#toggle-switch{width:50px;height:30px;border-radius:30px;position:relative;box-sizing:border-box}#toggle-switch input{cursor:pointer;width:50px;height:30px;padding:0;margin:0;top:0;left:0;border:none;outline:none;opacity:0;position:absolute}#toggle-switch #toggle-body{width:50px;height:30px;border-radius:28px;position:relative;top:0;left:0;pointer-events:none;background:#9e9e9e}#toggle-switch #toggle-body::after{font-family:"Material Symbols Rounded", sans-serif;content:"\\e5ca";position:absolute;width:26px;height:26px;left:2px;top:2px;border-radius:26px;background:white;transition:all 0.1s;font-size:22px;color:#FFFFFF;justify-content:center;display:inline-flex}#toggle-switch input:checked~#toggle-body::after{color:#a2bb31;left:22px}#toggle-switch input:checked~#toggle-body{background:#a2bb31}';export{i as tttx_toggle_1_9_97}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as e}from"./p-457a7731.js";const o=class{constructor(i){t(this,i),this.cardTitle=void 0,this.leftData=void 0,this.rightData=void 0,this.rightSubtext=void 0,this.iconStyle=void 0,this.cardType=void 0,this.chartConfig=void 0,this._chartConfig=void 0,this.chartRender=void 0}chartConfigChanged(t){this._chartConfig=JSON.parse(t),this.chartRender=!0}componentDidLoad(){this.chartConfig&&(this._chartConfig=JSON.parse(this.chartConfig),this.chartRender=!0)}renderIcon(t){switch(t){case"up":return i("tttx-
|
|
1
|
+
import{r as t,h as i,H as e}from"./p-457a7731.js";const o=class{constructor(i){t(this,i),this.cardTitle=void 0,this.leftData=void 0,this.rightData=void 0,this.rightSubtext=void 0,this.iconStyle=void 0,this.cardType=void 0,this.chartConfig=void 0,this._chartConfig=void 0,this.chartRender=void 0}chartConfigChanged(t){this._chartConfig=JSON.parse(t),this.chartRender=!0}componentDidLoad(){this.chartConfig&&(this._chartConfig=JSON.parse(this.chartConfig),this.chartRender=!0)}renderIcon(t){switch(t){case"up":return i("tttx-icon_1_9_97",{size:24,icon:"arrow_circle_up",color:"green"});case"down":return i("tttx-icon_1_9_97",{size:24,icon:"arrow_circle_down",color:"darkred"});default:return null}}render(){return i(e,null,i("div",{class:"datacard"},this.cardTitle&&i("h2",{style:{position:"relative",top:"0",left:"0",height:"40px"}},this.cardTitle),this.chartRender&&"chart"===this.cardType&&i("tttx-graph_1_9_97",{style:{position:"relative",width:"100%",height:this.cardTitle?"calc(100% - 40px)":"100%"},class:"chart","chart-data":this._chartConfig.chartData,"chart-text":this._chartConfig.chartText,"chart-type":this._chartConfig.chartType}),i("div",{style:{position:"relative",width:"100%",height:this.cardTitle?"calc(100% - 40px)":"100%"}},i("div",{class:"lower"},i("div",{class:this.rightData&&"undefined"!==this.rightData?"left":"centered"},this.leftData),this.rightData&&"undefined"!==this.rightData&&i("div",{class:"right"},i("div",{class:"flex"},i("div",{class:"righticon"},this.renderIcon(this.iconStyle)),i("div",{class:"rightdata"},this.rightData)),i("div",{class:"subtext"},this.rightSubtext))))))}static get watchers(){return{chartConfig:["chartConfigChanged"]}}};o.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:block;width:100%;height:100%}.datacard{font-family:"Roboto", Arial, Verdana, Tahoma, sans-serif;box-sizing:border-box;width:100%;height:100%;background-color:white;border-radius:4px;padding:0px 16px 16px 16px;margin-right:16px;margin-bottom:16px}.chart{width:100%;height:100%}h2{box-sizing:border-box;margin:0;padding:16px;width:100%;font-size:18px;font-weight:500;line-height:21.09px;text-align:left;height:40px}.lower{width:100%;display:flex}.right{box-sizing:border-box;flex-grow:1;border-left:1px solid #D5D5D5;padding-left:24px;font-size:24px;font-weight:500;line-height:28.13px;text-align:left}.flex{display:flex;justify-content:flex-start}.righticon{margin-top:1px;margin-right:4px;height:24px}.left{box-sizing:border-box;flex-grow:1;font-size:40px;font-weight:500;line-height:46.88px;text-align:right;margin-right:20px;padding-left:40px}.centered{box-sizing:border-box;flex-grow:1;font-size:40px;font-weight:500;line-height:46.88px;text-align:center;margin:0;padding-left:20px}.subtext{font-size:14px;font-weight:400;line-height:16.41px;text-align:left;color:#757575}';export{o as tttx_datacard_1_9_97}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as a,H as o}from"./p-457a7731.js";const n=class{constructor(a){t(this,a),this.valueChanged=e(this,"valueChanged",7),this.focusChanged=e(this,"focusChanged",7),this.blurChanged=e(this,"blurChanged",7),this.invalidChanged=e(this,"invalidChanged",7),this.label=void 0,this.secondarylabel=void 0,this.showerrormsg=void 0,this.showerrorbubble=!0,this.errormsg=void 0,this.rows=void 0,this.textareaautofocus=void 0,this.inputkeyhint=void 0,this.inputindex=void 0,this.inputtitle=void 0,this.disabled=void 0,this.maxlength=void 0,this.name=void 0,this.placeholder=void 0,this.readonly=void 0,this.required=void 0,this.value=void 0}handleChange(t){const e=t.target;this.value=e.value,this.valueChanged.emit(e.value)}handleFocus(t){this.focusChanged.emit(t.target.value)}handleBlur(t){this.blurChanged.emit(t.target.value)}handleInvalid(t){t.preventDefault(),this.invalidChanged.emit(t.target.value)}render(){const t=[this.showerrormsg?"invalid":"",!this.label&&this.required?"no-label":""].join(" ");return a(o,null,a("label",null,this.label,this.required?"":a("span",{class:"optional"}," (optional)"),a("div",{class:"textarea-container"},a("textarea",{rows:this.rows,class:t,autofocus:this.textareaautofocus,enterkeyhint:this.inputkeyhint,tabindex:this.inputindex,title:this.inputtitle,disabled:this.disabled,maxlength:this.maxlength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,value:this.value,onBlur:this.handleBlur.bind(this),onFocus:this.handleFocus.bind(this),onInput:this.handleChange.bind(this),onInvalid:this.handleInvalid.bind(this)}),this.secondarylabel&&a("span",{class:"secondarylabel"},this.secondarylabel),this.showerrorbubble&&a("span",{class:["errorBubble",this.showerrormsg&&this.errormsg?"visible":""].join(" ")},a("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg))))}};n.style='.material-symbols-rounded.sc-tttx-
|
|
1
|
+
import{r as t,c as e,h as a,H as o}from"./p-457a7731.js";const n=class{constructor(a){t(this,a),this.valueChanged=e(this,"valueChanged",7),this.focusChanged=e(this,"focusChanged",7),this.blurChanged=e(this,"blurChanged",7),this.invalidChanged=e(this,"invalidChanged",7),this.label=void 0,this.secondarylabel=void 0,this.showerrormsg=void 0,this.showerrorbubble=!0,this.errormsg=void 0,this.rows=void 0,this.textareaautofocus=void 0,this.inputkeyhint=void 0,this.inputindex=void 0,this.inputtitle=void 0,this.disabled=void 0,this.maxlength=void 0,this.name=void 0,this.placeholder=void 0,this.readonly=void 0,this.required=void 0,this.value=void 0}handleChange(t){const e=t.target;this.value=e.value,this.valueChanged.emit(e.value)}handleFocus(t){this.focusChanged.emit(t.target.value)}handleBlur(t){this.blurChanged.emit(t.target.value)}handleInvalid(t){t.preventDefault(),this.invalidChanged.emit(t.target.value)}render(){const t=[this.showerrormsg?"invalid":"",!this.label&&this.required?"no-label":""].join(" ");return a(o,null,a("label",null,this.label,this.required?"":a("span",{class:"optional"}," (optional)"),a("div",{class:"textarea-container"},a("textarea",{rows:this.rows,class:t,autofocus:this.textareaautofocus,enterkeyhint:this.inputkeyhint,tabindex:this.inputindex,title:this.inputtitle,disabled:this.disabled,maxlength:this.maxlength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,value:this.value,onBlur:this.handleBlur.bind(this),onFocus:this.handleFocus.bind(this),onInput:this.handleChange.bind(this),onInvalid:this.handleInvalid.bind(this)}),this.secondarylabel&&a("span",{class:"secondarylabel"},this.secondarylabel),this.showerrorbubble&&a("span",{class:["errorBubble",this.showerrormsg&&this.errormsg?"visible":""].join(" ")},a("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg))))}};n.style='.material-symbols-rounded.sc-tttx-textarea_1_9_97{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.sc-tttx-textarea_1_9_97-h{display:block}label.sc-tttx-textarea_1_9_97{font-weight:500;font-size:16px;line-height:18.752px;color:#212121}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97{position:relative}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97 textarea.sc-tttx-textarea_1_9_97{font-family:"Roboto", serif;box-sizing:border-box;width:100%;padding:9px 16px;font-size:16px;line-height:18.752px;border:1px solid #d5d5d5;border-radius:4px;margin-top:8px;resize:none}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97 textarea.no-label.sc-tttx-textarea_1_9_97{margin-top:0}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97 textarea.sc-tttx-textarea_1_9_97~.errorBubble.sc-tttx-textarea_1_9_97{font-size:14px;line-height:16.408px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97 textarea.sc-tttx-textarea_1_9_97~.errorBubble.sc-tttx-textarea_1_9_97:not(.visible){display:none}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97 textarea.sc-tttx-textarea_1_9_97~.errorBubble.sc-tttx-textarea_1_9_97 span.sc-tttx-textarea_1_9_97{color:#dc0000;font-size:16px;margin-right:4px}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97 textarea.sc-tttx-textarea_1_9_97:focus{border-color:#1479c6}label.sc-tttx-textarea_1_9_97 .textarea-container.sc-tttx-textarea_1_9_97 textarea.sc-tttx-textarea_1_9_97:focus-visible{outline:none}label.sc-tttx-textarea_1_9_97 .secondarylabel.sc-tttx-textarea_1_9_97{color:#757575;font-size:14px;line-height:16.408px;font-weight:normal;display:flex;margin-top:4px}label.sc-tttx-textarea_1_9_97 .optional.sc-tttx-textarea_1_9_97{color:#757575;font-weight:normal}';export{n as tttx_textarea_1_9_97}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as s,H as i}from"./p-457a7731.js";const r=class{constructor(s){t(this,s),this.percentage=void 0,this.thresholds=void 0,this.color="#d5d5d5",this.min="1",this.labelid=void 0,this._percentage=void 0,this._ranges=void 0,this._min=void 0}componentWillRender(){let t;if(this._percentage="string"==typeof this.percentage?parseInt(this.percentage):this.percentage,this.thresholds){t="string"==typeof this.thresholds?JSON.parse(this.thresholds):this.thresholds,this._ranges=[{range:[0],color:t[0].color}];for(const[s,i]of t.entries())this._ranges[this._ranges.length-1].range.push(i.threshold),this._ranges[this._ranges.length-1].color=i.color,s<t.length-1&&this._ranges.push({range:[i.threshold],color:void 0})}this._min=parseInt(this.min)}getColour(){return this._ranges&&0!==this._ranges.length?this._ranges.find((t=>this._percentage>=t.range[0]&&this._percentage<=t.range[1])).color:this.color}getWidth(){return Math.min(Math.max(this._percentage,Math.min(this._min,100)),100)}render(){return s(i,null,s("div",{class:"progress"},s("div",{class:"bar",style:{"background-color":this.getColour(),width:`${this.getWidth()}%`},role:"progressbar","aria-valuemin":this._min,"aria-valuemax":"100","aria-valuenow":this._percentage,"aria-labelledby":this.labelid})))}};r.style=".sc-tttx-percentage-
|
|
1
|
+
import{r as t,h as s,H as i}from"./p-457a7731.js";const r=class{constructor(s){t(this,s),this.percentage=void 0,this.thresholds=void 0,this.color="#d5d5d5",this.min="1",this.labelid=void 0,this._percentage=void 0,this._ranges=void 0,this._min=void 0}componentWillRender(){let t;if(this._percentage="string"==typeof this.percentage?parseInt(this.percentage):this.percentage,this.thresholds){t="string"==typeof this.thresholds?JSON.parse(this.thresholds):this.thresholds,this._ranges=[{range:[0],color:t[0].color}];for(const[s,i]of t.entries())this._ranges[this._ranges.length-1].range.push(i.threshold),this._ranges[this._ranges.length-1].color=i.color,s<t.length-1&&this._ranges.push({range:[i.threshold],color:void 0})}this._min=parseInt(this.min)}getColour(){return this._ranges&&0!==this._ranges.length?this._ranges.find((t=>this._percentage>=t.range[0]&&this._percentage<=t.range[1])).color:this.color}getWidth(){return Math.min(Math.max(this._percentage,Math.min(this._min,100)),100)}render(){return s(i,null,s("div",{class:"progress"},s("div",{class:"bar",style:{"background-color":this.getColour(),width:`${this.getWidth()}%`},role:"progressbar","aria-valuemin":this._min,"aria-valuemax":"100","aria-valuenow":this._percentage,"aria-labelledby":this.labelid})))}};r.style=".sc-tttx-percentage-bar_1_9_97-h{display:block}.progress.sc-tttx-percentage-bar_1_9_97{width:100%;background-color:#dbdbdb}.progress.sc-tttx-percentage-bar_1_9_97 .bar.sc-tttx-percentage-bar_1_9_97{height:20px}";export{r as tttx_percentage_bar_1_9_97}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as n}from"./p-457a7731.js";const c=class{constructor(i){t(this,i),this.checkboxChangeEvent=e(this,"checkboxChangeEvent",3),this.checkboxId=void 0,this.label=void 0,this.inline=!1,this.indeterminate=!1,this.checked=void 0}watchIndeterminateChange(t){this.checkbox.indeterminate=t}onClick(){const{checked:t,indeterminate:e}=this;this.checkboxChangeEvent.emit({indeterminate:e,checked:t})}componentDidLoad(){this.checkbox.indeterminate=this.indeterminate}render(){const t=this.indeterminate?"indeterminate_check_box":this.checked?"check_box":"check_box_outline_blank";return i(n,null,i("label",{class:"tttx-checkbox "+(this.inline?"--inline":"")},i("input",{class:"tttx-checkbox__input",type:"checkbox",id:this.checkboxId,checked:this.checked,ref:t=>this.checkbox=t}),i("tttx-
|
|
1
|
+
import{r as t,c as e,h as i,H as n}from"./p-457a7731.js";const c=class{constructor(i){t(this,i),this.checkboxChangeEvent=e(this,"checkboxChangeEvent",3),this.checkboxId=void 0,this.label=void 0,this.inline=!1,this.indeterminate=!1,this.checked=void 0}watchIndeterminateChange(t){this.checkbox.indeterminate=t}onClick(){const{checked:t,indeterminate:e}=this;this.checkboxChangeEvent.emit({indeterminate:e,checked:t})}componentDidLoad(){this.checkbox.indeterminate=this.indeterminate}render(){const t=this.indeterminate?"indeterminate_check_box":this.checked?"check_box":"check_box_outline_blank";return i(n,null,i("label",{class:"tttx-checkbox "+(this.inline?"--inline":"")},i("input",{class:"tttx-checkbox__input",type:"checkbox",id:this.checkboxId,checked:this.checked,ref:t=>this.checkbox=t}),i("tttx-icon_1_9_97",{color:this.checked?"blue":"grey",icon:t,onClick:this.onClick.bind(this)}),i("span",{class:"tttx-checkbox__label"},this.label)))}static get watchers(){return{indeterminate:["watchIndeterminateChange"]}}};c.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.tttx-checkbox{padding:8px;display:flex;justify-content:flex-start;font-size:16px;align-items:center;font-weight:normal;line-height:18.752px}.tttx-checkbox tttx-icon{height:24px}.tttx-checkbox.--inline{display:inline-flex}.tttx-checkbox__input{display:none}.tttx-checkbox__label{margin-left:8px;padding-right:0;color:#212121;font-weight:normal}';export{c as tttx_checkbox_1_9_97}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,F as n,H as o}from"./p-457a7731.js";const a=class{constructor(i){t(this,i),this.commentAdded=e(this,"commentAdded",6),this.commentEdited=e(this,"commentEdited",6),this.requestCommentRemoval=e(this,"requestCommentRemoval",6),this.requestFileUpload=e(this,"requestFileUpload",6),this.requestFileDownload=e(this,"requestFileDownload",6),this.blurChanged=e(this,"commentFocusOut",7),this.isFileComment=t=>{var e;return(null===(e=t.metadata)||void 0===e?void 0:e.type)===l.FILE},this.isUnread=t=>t.createdByFullName!==this.currentuser&&(!t.userLastViewed||t.createdAt>t.userLastViewed),this.currentuser=void 0,this.comments=void 0,this.disableFile=!1,this.messageLimit=1e3,this.inputBoxHeight=90,this.placeholder="Enter Comment",this.saveButtonText="Add Comment",this.value=void 0,this.allowEditing=!1,this.readonly=!1,this._comments=void 0,this.showError=void 0,this._saveButtonText=void 0,this.editingComment=void 0}componentWillLoad(){this.onCommentsChange(),this._saveButtonText=this.saveButtonText}onCommentsChange(){this.comments&&(this._comments="string"==typeof this.comments?JSON.parse(this.comments):this.comments,this.editingComment&&this._comments.find((t=>t.id===this.editingComment.id)).isDeleted&&this.onFinishEdit(),this.scrollToBottom())}renderCommentBubble(){var t,e;const o=(null===(t=this._comments)||void 0===t?void 0:t.length)>0&&this.isUnread(this._comments[0]);let a=!1,l=null;return o&&(l=i("div",{class:"unread-comment-divider"},i("hr",{class:"unread-comment-divider-line"}),i("span",{class:"unread-comments-text"},"New Unread Comments"),i("hr",{class:"unread-comment-divider-line"}))),i(n,null,null===(e=this._comments)||void 0===e?void 0:e.map(((t,e)=>{var s;const c=t.createdByFullName===this.currentuser,d="commentBubble "+(c?"right":"left"),p=e===this._comments.length-1,h=0===e?{marginTop:"10px"}:{},m=!p&&this.isUnread(this._comments[e+1]),u=0===e;let b=null;return p||!m||a||o&&0===e||(b=i("div",{class:"unread-comment-divider"},i("hr",{class:"unread-comment-divider-line"}),i("span",{class:"unread-comments-text"},"New Unread Comments"),i("hr",{class:"unread-comment-divider-line"}))),a=a||m,[i("div",{class:d,style:h},u&&l,i("div",{class:"bubbleHeader"},i("div",{class:"bubble-header-inner"},i("span",{class:"commentName"},t.createdByFullName),this.isUnread(t)&&i("tttx-icon_1_9_95",{class:"unread-symbol",icon:"error",color:"blue",style:{height:"18px"},size:18})),(null===(s=t.metadata)||void 0===s?void 0:s.contextString)&&i("span",{class:"commentContext"},"(",t.metadata.contextString,")")),i("div",{class:"bubbleText "+(t.isDeleted?"deleted-comment":"")},this.renderCommentInner(t)),i("div",{class:"bubbleFooter"},!this.readonly&&this.allowEditing&&c&&!t.isDeleted&&!!t.id&&i("div",null,!this.isFileComment(t)&&i(n,null,i("span",{class:"clickable",onClick:this.onEdit.bind(this,t)},"Edit")," | "),i("span",{class:"clickable",onClick:this.onRemove.bind(this,t)},"Remove")),i("span",{class:"comment-date"},!!t.lastUpdatedAt&&!t.isDeleted&&`Edited ${new Date(t.lastUpdatedAt).toLocaleString(void 0,r)}`,!!t.lastUpdatedAt&&t.isDeleted&&`Removed ${new Date(t.lastUpdatedAt).toLocaleString(void 0,r)}`,!t.lastUpdatedAt&&`${new Date(t.createdAt).toLocaleString(void 0,r)}`)),!b&&!p&&i("hr",{class:"commentDivider"}),b)]})))}renderCommentInner(t){return t.isDeleted?this.isFileComment(t)?"File removed.":"Comment removed.":this.isFileComment(t)?this.renderFileLink(t.metadata):t.text}renderFileLink(t){return i("div",{class:"file-link-container"},i("tttx-icon_1_9_95",{icon:"attach_file",color:"black",style:{height:"20px"},size:20}),i("button",{class:"linkButton",type:"button",value:t.key,onClick:this.onFileDownloadRequest.bind(this)},t.filename))}onFormSubmit(t){t.preventDefault();const e=new FormData(t.currentTarget);let i;for(const t of e.entries())i=t[1];t.currentTarget.reset(),this.editingComment?this.editComment(i):this.createComment(i),this.scrollToBottom()}createComment(t){const e={id:void 0,text:t,createdAt:+new Date,createdByFullName:this.currentuser,createdById:void 0,isDeleted:!1};this._comments=[...this._comments,e],this.commentAdded.emit(e)}editComment(t){const e=this._comments.findIndex((t=>t.id===this.editingComment.id));this._comments[e]=Object.assign(Object.assign({},this._comments[e]),{text:t,lastUpdatedAt:+new Date,updatedByFullName:this.currentuser,updatedById:void 0}),this._comments=[...this._comments],this.commentEdited.emit(this._comments[e]),this.onFinishEdit()}scrollToBottom(){setTimeout((()=>this._scrollContainer.scrollTo({top:this._scrollContainer.scrollHeight})))}onFileUploadRequest(){this.requestFileUpload.emit()}onFileDownloadRequest(t){this.requestFileDownload.emit(t.currentTarget.value)}async addDummyComment(t,e){const i={id:void 0,text:t,createdAt:+new Date,createdByFullName:null!=e?e:this.currentuser,createdById:void 0,isDeleted:!1};this._comments=[...this._comments,i],this.scrollToBottom()}onCommentFieldChange(t){this.showError=t.target.value.length>=this.messageLimit}handleBlur(t){this.editingComment||this.blurChanged.emit(t.target.value)}onEdit(t){this.editingComment=t,this.textInput.value=this.editingComment.text,this._saveButtonText="Update comment",this.scrollToBottom()}onFinishEdit(){this.editingComment=void 0,this.textInput.value="",this._saveButtonText=this.saveButtonText}onRemove(t){t=Object.assign(Object.assign({},t),{lastUpdatedAt:+new Date,updatedByFullName:this.currentuser,updatedById:void 0}),this.requestCommentRemoval.emit(t)}render(){return i(o,null,i("article",{id:"comment-container"},(!Array.isArray(this._comments)||0===this._comments.length)&&i("div",{class:"no-comments"},i("tttx-icon_1_9_95",{class:"mt-s",icon:"chat_bubble_outline",color:"grey"}),i("span",null,"No comments have been added")),i("section",{id:"comment-bubbles-section"},i("div",{id:"scroll-container",ref:t=>this._scrollContainer=t},this.renderCommentBubble())),i("section",{id:"input-section"},!this.readonly&&i("form",{onSubmit:this.onFormSubmit.bind(this)},this.editingComment&&i("div",{class:"cancel-edit-container"},i("span",{class:"cancel-edit-button clickable",onClick:this.onFinishEdit.bind(this)},"x")),i("fieldset",null,i("textarea",{ref:t=>this.textInput=t,name:"commentText",required:!0,maxlength:`${this.messageLimit}`,placeholder:this.placeholder,onInput:t=>this.onCommentFieldChange(t),style:{"--textarea-max-height":`${this.inputBoxHeight}px`},class:"comment-textarea",value:this.value,onBlur:this.handleBlur.bind(this)})),this.showError&&i("span",{class:"errorBubble visible"},i("span",{class:"material-symbols-rounded"},"warning")," ",`${this.messageLimit} character limit is reached.`),i("fieldset",null,this.editingComment&&i("span",{class:"editing-sub-text"},"Editing comment"),!this.disableFile&&i("button",{id:"attach-file",class:"flex-right-align clickable",type:"button",value:"File",onClick:this.onFileUploadRequest.bind(this)},i("tttx-icon_1_9_95",{color:"black",icon:"attach_file"})),i("input",{class:(this.disableFile?"flex-right-align ":"")+"clickable",style:{width:"fit-content"},type:"submit",value:this._saveButtonText}))))))}static get watchers(){return{comments:["onCommentsChange"]}}};var l;!function(t){t[t.FILE=0]="FILE"}(l||(l={}));const r={hour12:!1,year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"};a.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}label{font-weight:500;font-size:16px;line-height:18.752px;color:#212121}label .optional{color:#757575;font-weight:normal}label .outer-container{position:relative}label .outer-container .left-icons,label .outer-container .right-icons{display:flex;position:absolute;height:24px;gap:8px}label .outer-container .left-icons tttx-icon,label .outer-container .right-icons tttx-icon{height:24px;width:24px}label .outer-container .left-icons{left:8px}label .outer-container .right-icons{right:8px}label .outer-container input,label .outer-container textarea{color:#212121;box-sizing:border-box;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px;padding:0;padding-left:16px;padding-right:16px;}label .outer-container input.has-input-icon,label .outer-container textarea.has-input-icon{padding-left:40px}label .outer-container input.has-input-icon.has-left-icon,label .outer-container textarea.has-input-icon.has-left-icon{padding-left:72px}label .outer-container input.has-left-icon,label .outer-container textarea.has-left-icon{padding-left:40px}label .outer-container input.has-right-icon,label .outer-container textarea.has-right-icon{padding-right:40px}label .outer-container input.invalid,label .outer-container textarea.invalid{border:1px solid #dc0000}label .outer-container input:not([type=submit]),label .outer-container textarea:not([type=submit]){font-family:"Roboto", serif;width:100%;height:36px;font-size:16px;line-height:18.752px}label .outer-container input[type=radio],label .outer-container textarea[type=radio]{width:20px;height:20px}label .outer-container input[type=date],label .outer-container textarea[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}label .outer-container input[readonly],label .outer-container textarea[readonly]{cursor:default;pointer-events:none;user-select:none;color:gray}label .outer-container input:focus,label .outer-container textarea:focus{border-color:#1479c6}label .outer-container input:focus-visible,label .outer-container textarea:focus-visible{outline:none}label .outer-container textarea{padding:8px;height:auto;min-height:100px;resize:vertical}label .outer-container textarea.resize-none{resize:none}label .outer-container.inputBlock{display:flex;align-items:center;line-height:21px}label .outer-container.inputBlock .left-icons,label .outer-container.inputBlock .right-icons{margin-top:4px}label .outer-container.inputBlock.readonly{pointer-events:none;user-select:none;color:gray}label .outer-container.inputBlock.radioBlock{display:block}label .outer-container.inputInline{display:flex;white-space:nowrap;align-items:center;margin:0}label .outer-container.inputInline input{margin-top:0}label .secondarylabel{color:#757575;font-size:14px;line-height:16.408px;font-weight:normal;display:flex;margin-top:4px}label .errorBubble{position:relative;font-size:14px;line-height:16.408px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}label .errorBubble:not(.visible){display:none}label .errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}*{font-family:"Roboto", sans-serif}#comment-container{display:flex;height:100%;flex-direction:column}#comment-bubbles-section{display:flex;height:100%;flex-direction:column;justify-content:end;margin-bottom:8px;padding-bottom:8px;overflow:hidden}#input-section,#input-section form{display:flex;flex-direction:column;padding:0px 1px}#scroll-container{display:flex;overflow-y:auto;max-height:100%;width:100%;align-items:end;flex-direction:column}.commentBubble{display:flex;flex-direction:column;margin-bottom:8px;width:100%}.commentBubble>.bubbleText{background:#f0f0f0;border-radius:4px;padding:8px 12px;margin-bottom:4px;margin-top:10px;font-size:11pt;white-space:wrap}.commentBubble>span{color:#757575;font-size:10pt;margin:2px 16px}.commentBubble.right>span{text-align:right}.commentBubble.left>span{text-align:left}input{border:1px solid #dddddd;border-radius:4px;padding:8px 16px;font-size:11pt}input[type=text]{flex-grow:1}input[type=submit]{text-transform:uppercase;background:white;font-size:10pt;margin-top:8px;width:132px;display:flex;align-self:end}input[type=submit]:hover,input[type=submit]:active{background:#dddddd}button#attach-file{text-transform:uppercase;background:white;font-size:10pt;margin-top:8px;align-self:end;border:1px solid #dddddd;border-radius:4px;width:34px;height:34px;display:flex;flex-direction:column;justify-content:center;margin-right:8px}button#attach-file:hover,button#attach-file:active{background:#dddddd}button#attach-file *{margin-top:3px}fieldset{border:none;padding:0;margin:0;display:flex;flex-direction:row;justify-content:end}button.linkButton{border:none;background:transparent;color:#3680bd;cursor:pointer;padding:0;margin-left:5px;font-size:11pt}.file-link-container{display:flex;align-items:center}.commentBubble .bubbleHeader{display:flex;justify-content:space-between}.commentName{color:black;font-size:10pt}.commentContext{color:gray;font-size:10pt}.commentBubble .bubbleFooter{display:flex;padding:0 10px;font-size:9pt;color:#757575}.comment-date{margin-left:auto}.editing-sub-text{margin-top:5px;font-size:9pt;color:#757575}.flex-right-align{margin-left:auto}.cancel-edit-container{position:relative;width:100%;display:flex;justify-content:end}.cancel-edit-button{color:whitesmoke;background-color:#aaaaaa;border-radius:10px;height:20px;width:20px;text-align:center;position:absolute;margin-top:11px;margin-right:18px}.clickable,.clickable>*{cursor:pointer}.deleted-comment{background:white !important;color:gray;border:1px solid lightgray}.commentDivider{border:none;border-top:1px solid #ccc;margin:10px 0}.errorBubble{position:relative;font-size:14px;line-height:16.408px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}.errorBubble:not(.visible){display:none}.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.comment-textarea{resize:vertical;height:var(--textarea-max-height, 90px);width:100%;padding:10px 35px 10px 12px;box-sizing:border-box;border:1px solid #ccc;border-radius:6px;font-size:14px;line-height:1.4;font-family:"Roboto", sans-serif}.no-comments{display:flex;flex-direction:row;align-items:center;justify-content:start;color:#757575;font-size:14px;gap:4px;font-family:"Roboto", sans-serif;margin-top:20px}.mt-s{margin-top:4px}.bubble-header-inner{display:flex}.unread-symbol{margin-left:5px}.unread-comment-divider{display:flex;margin:10px 0}.unread-comments-text{font-size:10pt;margin:0px 10px;white-space:nowrap;color:#757575}.unread-comment-divider-line{border:none;border-top:1px solid #ccc;width:100%}';export{a as tttx_comments_1_9_95}
|
|
1
|
+
import{r as t,c as e,h as i,F as n,H as o}from"./p-457a7731.js";const a=class{constructor(i){t(this,i),this.commentAdded=e(this,"commentAdded",6),this.commentEdited=e(this,"commentEdited",6),this.requestCommentRemoval=e(this,"requestCommentRemoval",6),this.requestFileUpload=e(this,"requestFileUpload",6),this.requestFileDownload=e(this,"requestFileDownload",6),this.blurChanged=e(this,"commentFocusOut",7),this.isFileComment=t=>{var e;return(null===(e=t.metadata)||void 0===e?void 0:e.type)===l.FILE},this.isUnread=t=>t.createdByFullName!==this.currentuser&&(!t.userLastViewed||t.createdAt>t.userLastViewed),this.currentuser=void 0,this.comments=void 0,this.disableFile=!1,this.messageLimit=1e3,this.inputBoxHeight=90,this.placeholder="Enter Comment",this.saveButtonText="Add Comment",this.value=void 0,this.allowEditing=!1,this.readonly=!1,this._comments=void 0,this.showError=void 0,this._saveButtonText=void 0,this.editingComment=void 0}componentWillLoad(){this.onCommentsChange(),this._saveButtonText=this.saveButtonText}onCommentsChange(){this.comments&&(this._comments="string"==typeof this.comments?JSON.parse(this.comments):this.comments,this.editingComment&&this._comments.find((t=>t.id===this.editingComment.id)).isDeleted&&this.onFinishEdit(),this.scrollToBottom())}renderCommentBubble(){var t,e;const o=(null===(t=this._comments)||void 0===t?void 0:t.length)>0&&this.isUnread(this._comments[0]);let a=!1,l=null;return o&&(l=i("div",{class:"unread-comment-divider"},i("hr",{class:"unread-comment-divider-line"}),i("span",{class:"unread-comments-text"},"New Unread Comments"),i("hr",{class:"unread-comment-divider-line"}))),i(n,null,null===(e=this._comments)||void 0===e?void 0:e.map(((t,e)=>{var s;const c=t.createdByFullName===this.currentuser,d="commentBubble "+(c?"right":"left"),p=e===this._comments.length-1,h=0===e?{marginTop:"10px"}:{},m=!p&&this.isUnread(this._comments[e+1]),u=0===e;let b=null;return p||!m||a||o&&0===e||(b=i("div",{class:"unread-comment-divider"},i("hr",{class:"unread-comment-divider-line"}),i("span",{class:"unread-comments-text"},"New Unread Comments"),i("hr",{class:"unread-comment-divider-line"}))),a=a||m,[i("div",{class:d,style:h},u&&l,i("div",{class:"bubbleHeader"},i("div",{class:"bubble-header-inner"},i("span",{class:"commentName"},t.createdByFullName),this.isUnread(t)&&i("tttx-icon_1_9_97",{class:"unread-symbol",icon:"error",color:"blue",style:{height:"18px"},size:18})),(null===(s=t.metadata)||void 0===s?void 0:s.contextString)&&i("span",{class:"commentContext"},"(",t.metadata.contextString,")")),i("div",{class:"bubbleText "+(t.isDeleted?"deleted-comment":"")},this.renderCommentInner(t)),i("div",{class:"bubbleFooter"},!this.readonly&&this.allowEditing&&c&&!t.isDeleted&&!!t.id&&i("div",null,!this.isFileComment(t)&&i(n,null,i("span",{class:"clickable",onClick:this.onEdit.bind(this,t)},"Edit")," | "),i("span",{class:"clickable",onClick:this.onRemove.bind(this,t)},"Remove")),i("span",{class:"comment-date"},!!t.lastUpdatedAt&&!t.isDeleted&&`Edited ${new Date(t.lastUpdatedAt).toLocaleString(void 0,r)}`,!!t.lastUpdatedAt&&t.isDeleted&&`Removed ${new Date(t.lastUpdatedAt).toLocaleString(void 0,r)}`,!t.lastUpdatedAt&&`${new Date(t.createdAt).toLocaleString(void 0,r)}`)),!b&&!p&&i("hr",{class:"commentDivider"}),b)]})))}renderCommentInner(t){return t.isDeleted?this.isFileComment(t)?"File removed.":"Comment removed.":this.isFileComment(t)?this.renderFileLink(t.metadata):t.text}renderFileLink(t){return i("div",{class:"file-link-container"},i("tttx-icon_1_9_97",{icon:"attach_file",color:"black",style:{height:"20px"},size:20}),i("button",{class:"linkButton",type:"button",value:t.key,onClick:this.onFileDownloadRequest.bind(this)},t.filename))}onFormSubmit(t){t.preventDefault();const e=new FormData(t.currentTarget);let i;for(const t of e.entries())i=t[1];t.currentTarget.reset(),this.editingComment?this.editComment(i):this.createComment(i),this.scrollToBottom()}createComment(t){const e={id:void 0,text:t,createdAt:+new Date,createdByFullName:this.currentuser,createdById:void 0,isDeleted:!1};this._comments=[...this._comments,e],this.commentAdded.emit(e)}editComment(t){const e=this._comments.findIndex((t=>t.id===this.editingComment.id));this._comments[e]=Object.assign(Object.assign({},this._comments[e]),{text:t,lastUpdatedAt:+new Date,updatedByFullName:this.currentuser,updatedById:void 0}),this._comments=[...this._comments],this.commentEdited.emit(this._comments[e]),this.onFinishEdit()}scrollToBottom(){setTimeout((()=>this._scrollContainer.scrollTo({top:this._scrollContainer.scrollHeight})))}onFileUploadRequest(){this.requestFileUpload.emit()}onFileDownloadRequest(t){this.requestFileDownload.emit(t.currentTarget.value)}async addDummyComment(t,e){const i={id:void 0,text:t,createdAt:+new Date,createdByFullName:null!=e?e:this.currentuser,createdById:void 0,isDeleted:!1};this._comments=[...this._comments,i],this.scrollToBottom()}onCommentFieldChange(t){this.showError=t.target.value.length>=this.messageLimit}handleBlur(t){this.editingComment||this.blurChanged.emit(t.target.value)}onEdit(t){this.editingComment=t,this.textInput.value=this.editingComment.text,this._saveButtonText="Update comment",this.scrollToBottom()}onFinishEdit(){this.editingComment=void 0,this.textInput.value="",this._saveButtonText=this.saveButtonText}onRemove(t){t=Object.assign(Object.assign({},t),{lastUpdatedAt:+new Date,updatedByFullName:this.currentuser,updatedById:void 0}),this.requestCommentRemoval.emit(t)}render(){return i(o,null,i("article",{id:"comment-container"},(!Array.isArray(this._comments)||0===this._comments.length)&&i("div",{class:"no-comments"},i("tttx-icon_1_9_97",{class:"mt-s",icon:"chat_bubble_outline",color:"grey"}),i("span",null,"No comments have been added")),i("section",{id:"comment-bubbles-section"},i("div",{id:"scroll-container",ref:t=>this._scrollContainer=t},this.renderCommentBubble())),i("section",{id:"input-section"},!this.readonly&&i("form",{onSubmit:this.onFormSubmit.bind(this)},this.editingComment&&i("div",{class:"cancel-edit-container"},i("span",{class:"cancel-edit-button clickable",onClick:this.onFinishEdit.bind(this)},"x")),i("fieldset",null,i("textarea",{ref:t=>this.textInput=t,name:"commentText",required:!0,maxlength:`${this.messageLimit}`,placeholder:this.placeholder,onInput:t=>this.onCommentFieldChange(t),style:{"--textarea-max-height":`${this.inputBoxHeight}px`},class:"comment-textarea",value:this.value,onBlur:this.handleBlur.bind(this)})),this.showError&&i("span",{class:"errorBubble visible"},i("span",{class:"material-symbols-rounded"},"warning")," ",`${this.messageLimit} character limit is reached.`),i("fieldset",null,this.editingComment&&i("span",{class:"editing-sub-text"},"Editing comment"),!this.disableFile&&i("button",{id:"attach-file",class:"flex-right-align clickable",type:"button",value:"File",onClick:this.onFileUploadRequest.bind(this)},i("tttx-icon_1_9_97",{color:"black",icon:"attach_file"})),i("input",{class:(this.disableFile?"flex-right-align ":"")+"clickable",style:{width:"fit-content"},type:"submit",value:this._saveButtonText}))))))}static get watchers(){return{comments:["onCommentsChange"]}}};var l;!function(t){t[t.FILE=0]="FILE"}(l||(l={}));const r={hour12:!1,year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"};a.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}label{font-weight:500;font-size:16px;line-height:18.752px;color:#212121}label .optional{color:#757575;font-weight:normal}label .outer-container{position:relative}label .outer-container .left-icons,label .outer-container .right-icons{display:flex;position:absolute;height:24px;gap:8px}label .outer-container .left-icons tttx-icon,label .outer-container .right-icons tttx-icon{height:24px;width:24px}label .outer-container .left-icons{left:8px}label .outer-container .right-icons{right:8px}label .outer-container input,label .outer-container textarea{color:#212121;box-sizing:border-box;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px;padding:0;padding-left:16px;padding-right:16px;}label .outer-container input.has-input-icon,label .outer-container textarea.has-input-icon{padding-left:40px}label .outer-container input.has-input-icon.has-left-icon,label .outer-container textarea.has-input-icon.has-left-icon{padding-left:72px}label .outer-container input.has-left-icon,label .outer-container textarea.has-left-icon{padding-left:40px}label .outer-container input.has-right-icon,label .outer-container textarea.has-right-icon{padding-right:40px}label .outer-container input.invalid,label .outer-container textarea.invalid{border:1px solid #dc0000}label .outer-container input:not([type=submit]),label .outer-container textarea:not([type=submit]){font-family:"Roboto", serif;width:100%;height:36px;font-size:16px;line-height:18.752px}label .outer-container input[type=radio],label .outer-container textarea[type=radio]{width:20px;height:20px}label .outer-container input[type=date],label .outer-container textarea[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}label .outer-container input[readonly],label .outer-container textarea[readonly]{cursor:default;pointer-events:none;user-select:none;color:gray}label .outer-container input:focus,label .outer-container textarea:focus{border-color:#1479c6}label .outer-container input:focus-visible,label .outer-container textarea:focus-visible{outline:none}label .outer-container textarea{padding:8px;height:auto;min-height:100px;resize:vertical}label .outer-container textarea.resize-none{resize:none}label .outer-container.inputBlock{display:flex;align-items:center;line-height:21px}label .outer-container.inputBlock .left-icons,label .outer-container.inputBlock .right-icons{margin-top:4px}label .outer-container.inputBlock.readonly{pointer-events:none;user-select:none;color:gray}label .outer-container.inputBlock.radioBlock{display:block}label .outer-container.inputInline{display:flex;white-space:nowrap;align-items:center;margin:0}label .outer-container.inputInline input{margin-top:0}label .secondarylabel{color:#757575;font-size:14px;line-height:16.408px;font-weight:normal;display:flex;margin-top:4px}label .errorBubble{position:relative;font-size:14px;line-height:16.408px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}label .errorBubble:not(.visible){display:none}label .errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}*{font-family:"Roboto", sans-serif}#comment-container{display:flex;height:100%;flex-direction:column}#comment-bubbles-section{display:flex;height:100%;flex-direction:column;justify-content:end;margin-bottom:8px;padding-bottom:8px;overflow:hidden}#input-section,#input-section form{display:flex;flex-direction:column;padding:0px 1px}#scroll-container{display:flex;overflow-y:auto;max-height:100%;width:100%;align-items:end;flex-direction:column}.commentBubble{display:flex;flex-direction:column;margin-bottom:8px;width:100%}.commentBubble>.bubbleText{background:#f0f0f0;border-radius:4px;padding:8px 12px;margin-bottom:4px;margin-top:10px;font-size:11pt;white-space:wrap}.commentBubble>span{color:#757575;font-size:10pt;margin:2px 16px}.commentBubble.right>span{text-align:right}.commentBubble.left>span{text-align:left}input{border:1px solid #dddddd;border-radius:4px;padding:8px 16px;font-size:11pt}input[type=text]{flex-grow:1}input[type=submit]{text-transform:uppercase;background:white;font-size:10pt;margin-top:8px;width:132px;display:flex;align-self:end}input[type=submit]:hover,input[type=submit]:active{background:#dddddd}button#attach-file{text-transform:uppercase;background:white;font-size:10pt;margin-top:8px;align-self:end;border:1px solid #dddddd;border-radius:4px;width:34px;height:34px;display:flex;flex-direction:column;justify-content:center;margin-right:8px}button#attach-file:hover,button#attach-file:active{background:#dddddd}button#attach-file *{margin-top:3px}fieldset{border:none;padding:0;margin:0;display:flex;flex-direction:row;justify-content:end}button.linkButton{border:none;background:transparent;color:#3680bd;cursor:pointer;padding:0;margin-left:5px;font-size:11pt}.file-link-container{display:flex;align-items:center}.commentBubble .bubbleHeader{display:flex;justify-content:space-between}.commentName{color:black;font-size:10pt}.commentContext{color:gray;font-size:10pt}.commentBubble .bubbleFooter{display:flex;padding:0 10px;font-size:9pt;color:#757575}.comment-date{margin-left:auto}.editing-sub-text{margin-top:5px;font-size:9pt;color:#757575}.flex-right-align{margin-left:auto}.cancel-edit-container{position:relative;width:100%;display:flex;justify-content:end}.cancel-edit-button{color:whitesmoke;background-color:#aaaaaa;border-radius:10px;height:20px;width:20px;text-align:center;position:absolute;margin-top:11px;margin-right:18px}.clickable,.clickable>*{cursor:pointer}.deleted-comment{background:white !important;color:gray;border:1px solid lightgray}.commentDivider{border:none;border-top:1px solid #ccc;margin:10px 0}.errorBubble{position:relative;font-size:14px;line-height:16.408px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}.errorBubble:not(.visible){display:none}.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.comment-textarea{resize:vertical;height:var(--textarea-max-height, 90px);width:100%;padding:10px 35px 10px 12px;box-sizing:border-box;border:1px solid #ccc;border-radius:6px;font-size:14px;line-height:1.4;font-family:"Roboto", sans-serif}.no-comments{display:flex;flex-direction:row;align-items:center;justify-content:start;color:#757575;font-size:14px;gap:4px;font-family:"Roboto", sans-serif;margin-top:20px}.mt-s{margin-top:4px}.bubble-header-inner{display:flex}.unread-symbol{margin-left:5px}.unread-comment-divider{display:flex;margin:10px 0}.unread-comments-text{font-size:10pt;margin:0px 10px;white-space:nowrap;color:#757575}.unread-comment-divider-line{border:none;border-top:1px solid #ccc;width:100%}';export{a as tttx_comments_1_9_97}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as a,H as n}from"./p-457a7731.js";const i=class{constructor(a){e(this,a),this.dateRangeChanged=t(this,"dateRangeChanged",7),this.handleOutsideClick=e=>{this.showCalendar&&this.inputRef&&!this.inputRef.contains(e.target)&&(this.showCalendar=!1)},this.toggleCalendar=()=>{this.showCalendar=!this.showCalendar},this.handleInputClick=e=>{e.stopPropagation(),this.toggleCalendar()},this.handleClear=e=>{e.stopPropagation(),this.resetRange()},this.initialValue=void 0,this.placeholderText="dd/mm/yyyy - dd/mm/yyyy",this.showCalendar=!1,this.startDate="",this.endDate="",this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.isSelecting=!0,this.hoverDate=""}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}componentWillLoad(){this.initializeRangeFromProp()}watchInitialValue(){this.initializeRangeFromProp()}initializeRangeFromProp(){let e="",t="";if("string"==typeof this.initialValue)try{const a=JSON.parse(this.initialValue);e=a.start,t=a.end}catch(e){console.error("Invalid JSON passed to initialValue")}else"object"==typeof this.initialValue&&null!==this.initialValue&&(e=this.initialValue.start,t=this.initialValue.end);e&&e.includes("/")&&(e=this.parseDDMMYYYYToISO(e)),t&&t.includes("/")&&(t=this.parseDDMMYYYYToISO(t)),e&&(this.startDate=e),t&&(this.endDate=t),(e||t)&&this.emitRangeChange(e,t)}resetRange(){this.startDate="",this.endDate="",this.isSelecting=!0,this.emitRangeChange("","")}emitRangeChange(e,t){const a=e?this.formatToDDMMYYYY(e):"",n=t?this.formatToDDMMYYYY(t):"";this.dateRangeChanged.emit({name:"customDateRange",value:{start:a,end:n}})}handleDateClick(e){const t=new Date(e);this.isSelecting?(this.startDate=e,this.endDate="",this.hoverDate="",this.emitRangeChange(this.startDate,""),this.isSelecting=!1):t>=new Date(this.startDate)?(this.endDate=e,this.emitRangeChange(this.startDate,this.endDate),this.showCalendar=!1,this.isSelecting=!0,this.hoverDate=""):(this.startDate=e,this.endDate="",this.hoverDate="",this.emitRangeChange(this.startDate,""))}changeMonth(e){"prev"===e?(this.currentMonth=0===this.currentMonth?11:this.currentMonth-1,this.currentYear=11===this.currentMonth?this.currentYear-1:this.currentYear):(this.currentMonth=11===this.currentMonth?0:this.currentMonth+1,this.currentYear=0===this.currentMonth?this.currentYear+1:this.currentYear)}formatToDDMMYYYY(e){const t=new Date(e);return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}parseDDMMYYYYToISO(e){const[t,a,n]=e.split("/");return new Date(`${n}-${a}-${t}`).toISOString().split("T")[0]}generateCalendarGrid(e,t){const a=new Date(e,t,1).getDay(),n=new Date(e,t+1,0).getDate(),i=[];for(let e=0;e<a;e++)i.push({date:null,isCurrentMonth:!1});for(let a=1;a<=n;a++){const n=new Date(e,t,a),r=n.getFullYear(),s=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");i.push({date:`${r}-${s}-${o}`,isCurrentMonth:!0})}for(;i.length<42;)i.push({date:null,isCurrentMonth:!1});return i}getMonthName(e){return new Date(2e3,e).toLocaleString("default",{month:"long"})}renderCalendar(e,t,n){const i=this.generateCalendarGrid(e,t);return a("div",{class:"calendar"},a("div",{class:"calendar-header"},a("button",{class:"nav-btn",onClick:e=>{e.stopPropagation(),this.changeMonth("prev")}},"<"),a("span",{class:"month-label"},this.getMonthName(t)," ",e),a("button",{class:"nav-btn",onClick:e=>{e.stopPropagation(),this.changeMonth("next")}},">")),a("div",{class:"calendar-grid"},["Su","Mo","Tu","We","Th","Fr","Sa"].map((e=>a("div",{class:"calendar-weekday",key:e},e))),i.map(((e,t)=>{var r;if(!e.isCurrentMonth||!e.date)return a("div",{class:"calendar-date empty",key:`empty-${t}`,onClick:e=>e.stopPropagation()});const s=e.date,o=s===this.startDate,d=s===this.endDate,l=this.startDate&&this.endDate&&new Date(s)>new Date(this.startDate)&&new Date(s)<new Date(this.endDate),h=this.startDate&&!this.endDate&&this.hoverDate&&new Date(s)>new Date(this.startDate)&&new Date(s)<=new Date(this.hoverDate),c=null===(r=i[t-1])||void 0===r?void 0:r.date,p=h&&(0===t||!c||this.startDate&&new Date(c)<new Date(this.startDate));return a("div",{class:{"calendar-date":!0,"range-start":o,"range-end":d,inrange:l,hoverrange:h,"range-hover-start":p,"range-hover-end":h&&s===this.hoverDate},onClick:e=>{e.stopPropagation(),n(s)},onMouseEnter:()=>{!this.isSelecting&&this.startDate&&(this.hoverDate=s)},onMouseLeave:()=>{this.hoverDate=""},key:s},new Date(s).getDate())}))))}render(){const e=this.startDate&&this.endDate?`${this.formatToDDMMYYYY(this.startDate)} – ${this.formatToDDMMYYYY(this.endDate)}`:this.startDate?`${this.formatToDDMMYYYY(this.startDate)} –`:this.placeholderText;return a(n,null,a("div",{class:"date-range-input",tabIndex:0,"aria-haspopup":"dialog","aria-expanded":this.showCalendar?"true":"false",ref:e=>this.inputRef=e,onClick:this.handleInputClick},a("span",{class:{"range-text":!0,"is-placeholder":!(this.startDate||this.endDate)}},e),(this.startDate||this.endDate)&&a("button",{class:"clear-btn","aria-label":"Clear",onClick:this.handleClear},"×"),a("span",{class:"calendar-icon","aria-hidden":"true"},a("tttx-
|
|
1
|
+
import{r as e,c as t,h as a,H as n}from"./p-457a7731.js";const i=class{constructor(a){e(this,a),this.dateRangeChanged=t(this,"dateRangeChanged",7),this.handleOutsideClick=e=>{this.showCalendar&&this.inputRef&&!this.inputRef.contains(e.target)&&(this.showCalendar=!1)},this.toggleCalendar=()=>{this.showCalendar=!this.showCalendar},this.handleInputClick=e=>{e.stopPropagation(),this.toggleCalendar()},this.handleClear=e=>{e.stopPropagation(),this.resetRange()},this.initialValue=void 0,this.placeholderText="dd/mm/yyyy - dd/mm/yyyy",this.showCalendar=!1,this.startDate="",this.endDate="",this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.isSelecting=!0,this.hoverDate=""}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}componentWillLoad(){this.initializeRangeFromProp()}watchInitialValue(){this.initializeRangeFromProp()}initializeRangeFromProp(){let e="",t="";if("string"==typeof this.initialValue)try{const a=JSON.parse(this.initialValue);e=a.start,t=a.end}catch(e){console.error("Invalid JSON passed to initialValue")}else"object"==typeof this.initialValue&&null!==this.initialValue&&(e=this.initialValue.start,t=this.initialValue.end);e&&e.includes("/")&&(e=this.parseDDMMYYYYToISO(e)),t&&t.includes("/")&&(t=this.parseDDMMYYYYToISO(t)),e&&(this.startDate=e),t&&(this.endDate=t),(e||t)&&this.emitRangeChange(e,t)}resetRange(){this.startDate="",this.endDate="",this.isSelecting=!0,this.emitRangeChange("","")}emitRangeChange(e,t){const a=e?this.formatToDDMMYYYY(e):"",n=t?this.formatToDDMMYYYY(t):"";this.dateRangeChanged.emit({name:"customDateRange",value:{start:a,end:n}})}handleDateClick(e){const t=new Date(e);this.isSelecting?(this.startDate=e,this.endDate="",this.hoverDate="",this.emitRangeChange(this.startDate,""),this.isSelecting=!1):t>=new Date(this.startDate)?(this.endDate=e,this.emitRangeChange(this.startDate,this.endDate),this.showCalendar=!1,this.isSelecting=!0,this.hoverDate=""):(this.startDate=e,this.endDate="",this.hoverDate="",this.emitRangeChange(this.startDate,""))}changeMonth(e){"prev"===e?(this.currentMonth=0===this.currentMonth?11:this.currentMonth-1,this.currentYear=11===this.currentMonth?this.currentYear-1:this.currentYear):(this.currentMonth=11===this.currentMonth?0:this.currentMonth+1,this.currentYear=0===this.currentMonth?this.currentYear+1:this.currentYear)}formatToDDMMYYYY(e){const t=new Date(e);return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}parseDDMMYYYYToISO(e){const[t,a,n]=e.split("/");return new Date(`${n}-${a}-${t}`).toISOString().split("T")[0]}generateCalendarGrid(e,t){const a=new Date(e,t,1).getDay(),n=new Date(e,t+1,0).getDate(),i=[];for(let e=0;e<a;e++)i.push({date:null,isCurrentMonth:!1});for(let a=1;a<=n;a++){const n=new Date(e,t,a),r=n.getFullYear(),s=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");i.push({date:`${r}-${s}-${o}`,isCurrentMonth:!0})}for(;i.length<42;)i.push({date:null,isCurrentMonth:!1});return i}getMonthName(e){return new Date(2e3,e).toLocaleString("default",{month:"long"})}renderCalendar(e,t,n){const i=this.generateCalendarGrid(e,t);return a("div",{class:"calendar"},a("div",{class:"calendar-header"},a("button",{class:"nav-btn",onClick:e=>{e.stopPropagation(),this.changeMonth("prev")}},"<"),a("span",{class:"month-label"},this.getMonthName(t)," ",e),a("button",{class:"nav-btn",onClick:e=>{e.stopPropagation(),this.changeMonth("next")}},">")),a("div",{class:"calendar-grid"},["Su","Mo","Tu","We","Th","Fr","Sa"].map((e=>a("div",{class:"calendar-weekday",key:e},e))),i.map(((e,t)=>{var r;if(!e.isCurrentMonth||!e.date)return a("div",{class:"calendar-date empty",key:`empty-${t}`,onClick:e=>e.stopPropagation()});const s=e.date,o=s===this.startDate,d=s===this.endDate,l=this.startDate&&this.endDate&&new Date(s)>new Date(this.startDate)&&new Date(s)<new Date(this.endDate),h=this.startDate&&!this.endDate&&this.hoverDate&&new Date(s)>new Date(this.startDate)&&new Date(s)<=new Date(this.hoverDate),c=null===(r=i[t-1])||void 0===r?void 0:r.date,p=h&&(0===t||!c||this.startDate&&new Date(c)<new Date(this.startDate));return a("div",{class:{"calendar-date":!0,"range-start":o,"range-end":d,inrange:l,hoverrange:h,"range-hover-start":p,"range-hover-end":h&&s===this.hoverDate},onClick:e=>{e.stopPropagation(),n(s)},onMouseEnter:()=>{!this.isSelecting&&this.startDate&&(this.hoverDate=s)},onMouseLeave:()=>{this.hoverDate=""},key:s},new Date(s).getDate())}))))}render(){const e=this.startDate&&this.endDate?`${this.formatToDDMMYYYY(this.startDate)} – ${this.formatToDDMMYYYY(this.endDate)}`:this.startDate?`${this.formatToDDMMYYYY(this.startDate)} –`:this.placeholderText;return a(n,null,a("div",{class:"date-range-input",tabIndex:0,"aria-haspopup":"dialog","aria-expanded":this.showCalendar?"true":"false",ref:e=>this.inputRef=e,onClick:this.handleInputClick},a("span",{class:{"range-text":!0,"is-placeholder":!(this.startDate||this.endDate)}},e),(this.startDate||this.endDate)&&a("button",{class:"clear-btn","aria-label":"Clear",onClick:this.handleClear},"×"),a("span",{class:"calendar-icon","aria-hidden":"true"},a("tttx-icon_1_9_97",{icon:"calendar_month"}))),this.showCalendar&&a("div",{class:"calendar-popup single"},this.renderCalendar(this.currentYear,this.currentMonth,this.handleDateClick.bind(this))))}static get watchers(){return{initialValue:["watchInitialValue"]}}};i.style=':host{display:block;position:relative;font-family:sans-serif}.date-range-input{display:inline-flex;align-items:center;justify-content:space-between;border:1px solid #ccc;padding:8px 4px;border-radius:4px;cursor:pointer;background:white;min-width:220px;width:100%;font-size:14px}.date-range-input .range-text{flex:1;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;font-size:15px;padding-left:5px}.date-range-input .range-text.is-placeholder{padding-left:10px;font-size:15px;font-weight:500;color:#212121}.date-range-input .clear-btn{background:none;border:none;font-size:16px;color:#888;margin-left:8px;cursor:pointer}.date-range-input .clear-btn:hover{color:#333}.date-range-input .calendar-icon{margin-left:8px;display:flex;align-items:center;margin-right:5px}.calendar-popup{position:absolute;z-index:1000;top:calc(100% + 4px);left:0;background:white;border:1px solid #ccc;padding:8px 4px;border-radius:4px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);width:auto;min-width:260px}.calendar-popup.single{display:flex;flex-direction:column}.calendar{display:flex;flex-direction:column;width:100%}.calendar .calendar-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:0.5em}.calendar .calendar-header .nav-btn{background:none;border:none;cursor:pointer;font-size:16px;padding:0 8px;color:#333}.calendar .calendar-header .nav-btn:hover{color:#1479c6}.calendar .calendar-header .month-label{font-weight:bold;font-size:14px;color:#333}.calendar .calendar-grid{display:grid;grid-template-columns:repeat(7, 1fr);gap:4px}.calendar .calendar-grid .calendar-weekday{font-weight:bold;text-align:center;font-size:12px;padding-bottom:4px;color:#666}.calendar .calendar-grid .calendar-date{text-align:center;padding:0.5em;border-radius:4px;font-size:14px;cursor:pointer;transition:background 0.2s ease;color:#333}.calendar .calendar-grid .calendar-date:hover{background-color:#f0f0f0}.calendar .calendar-grid .calendar-date.range-start,.calendar .calendar-grid .calendar-date.range-end,.calendar .calendar-grid .calendar-date.inrange{background-color:#1479c6;color:white;font-weight:bold}.calendar .calendar-grid .calendar-date.empty{background:transparent;cursor:default}.calendar .calendar-date.hoverrange{position:relative;z-index:1}.calendar .calendar-date.hoverrange::before{content:"";position:absolute;inset:0;border:1px dotted #bdbdbd;background-color:white;z-index:-1;pointer-events:none}.calendar .calendar-date.hoverrange.range-hover-start::before{border-top-left-radius:999px;border-bottom-left-radius:999px;left:0}.calendar .calendar-date.hoverrange.range-hover-end::before{border-top-right-radius:999px;border-bottom-right-radius:999px;right:0}.calendar .calendar-date.hoverrange:first-child{border-top-left-radius:50%;border-bottom-left-radius:50%}.calendar .calendar-date.hoverrange:last-child{border-top-right-radius:50%;border-bottom-right-radius:50%}';export{i as tttx_date_range_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-457a7731.js";import{C as i,D as s,L as o}from"./p-0bb158ce.js";const n={id:"gaugeLabel",beforeDatasetsDraw(t){const{ctx:e}=t;e.save();const i=t.getDatasetMeta(0).data[0].x,s=t.getDatasetMeta(0).data[0].y-12;e.font="bold 20px sans-serif",e.fillStyle="rgba(0, 0, 0, 1)",e.textAlign="center",e.textBaseline="middle",e.fillText(t.config.options.gaugeText||"",i,s)}};i.register(s,o,n);const a=class{constructor(e){t(this,e),this.chartConfig=void 0,this.chartType=void 0,this.chartData=void 0,this.chartText=void 0,this.formattedData=void 0}componentDidLoad(){if(this.formattedData=JSON.parse(this.chartData),!this.chartConfig)switch(this.chartType){case"gauge":this.chartConfig=this.getGaugeConfig(),i.register(n);break;case"line":console.log("line"),this.chartConfig=this.getLineConfig(),console.log(this.chartConfig)}new i(this.canvasElement,JSON.parse(this.chartConfig))}render(){return e("div",{class:"chart-container",style:{position:"relative",height:"100%",width:"100%"}},e("canvas",{ref:t=>this.canvasElement=t}))}getLineConfig(){return console.log(this.formattedData),JSON.stringify({type:"line",data:{datasets:[{fill:!1,borderColor:"#00187C",tension:.1,data:this.formattedData}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:{display:!1}},scales:{x:{type:"linear",position:"bottom"}}}})}getGaugeConfig(){this.formattedData.push(100-this.formattedData[0]);const t={type:"doughnut",data:{datasets:[{data:this.formattedData,backgroundColor:[this.getRAGColour(this.formattedData[0]),"#F0F0F0"],borderWidth:0,hoverBorderWidth:0}]},options:{maintainAspectRatio:!1,responsive:!0,rotation:270,circumference:180,cutout:"60%",gaugeText:this.chartText,plugins:{legend:{display:!1},tooltip:{enabled:!1},hover:{enabled:!1}}}};return JSON.stringify(t)}getRAGColour(t){return t<50?"#DC0000":t<100?"#F59500":100===t?"#A2BB31":"#F0F0F0"}};a.style=":host{display:block;width:100%;height:100%}.chart-container{display:flex;align-items:center;justify-content:center}.overlay-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);color:white;font-size:24px;font-weight:bold;text-shadow:2px 2px 4px rgba(0, 0, 0, 0.7);pointer-events:none;}";export{a as
|
|
1
|
+
import{r as t,h as e}from"./p-457a7731.js";import{C as i,D as s,L as o}from"./p-0bb158ce.js";const n={id:"gaugeLabel",beforeDatasetsDraw(t){const{ctx:e}=t;e.save();const i=t.getDatasetMeta(0).data[0].x,s=t.getDatasetMeta(0).data[0].y-12;e.font="bold 20px sans-serif",e.fillStyle="rgba(0, 0, 0, 1)",e.textAlign="center",e.textBaseline="middle",e.fillText(t.config.options.gaugeText||"",i,s)}};i.register(s,o,n);const a=class{constructor(e){t(this,e),this.chartConfig=void 0,this.chartType=void 0,this.chartData=void 0,this.chartText=void 0,this.formattedData=void 0}componentDidLoad(){if(this.formattedData=JSON.parse(this.chartData),!this.chartConfig)switch(this.chartType){case"gauge":this.chartConfig=this.getGaugeConfig(),i.register(n);break;case"line":console.log("line"),this.chartConfig=this.getLineConfig(),console.log(this.chartConfig)}new i(this.canvasElement,JSON.parse(this.chartConfig))}render(){return e("div",{class:"chart-container",style:{position:"relative",height:"100%",width:"100%"}},e("canvas",{ref:t=>this.canvasElement=t}))}getLineConfig(){return console.log(this.formattedData),JSON.stringify({type:"line",data:{datasets:[{fill:!1,borderColor:"#00187C",tension:.1,data:this.formattedData}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:{display:!1}},scales:{x:{type:"linear",position:"bottom"}}}})}getGaugeConfig(){this.formattedData.push(100-this.formattedData[0]);const t={type:"doughnut",data:{datasets:[{data:this.formattedData,backgroundColor:[this.getRAGColour(this.formattedData[0]),"#F0F0F0"],borderWidth:0,hoverBorderWidth:0}]},options:{maintainAspectRatio:!1,responsive:!0,rotation:270,circumference:180,cutout:"60%",gaugeText:this.chartText,plugins:{legend:{display:!1},tooltip:{enabled:!1},hover:{enabled:!1}}}};return JSON.stringify(t)}getRAGColour(t){return t<50?"#DC0000":t<100?"#F59500":100===t?"#A2BB31":"#F0F0F0"}};a.style=":host{display:block;width:100%;height:100%}.chart-container{display:flex;align-items:center;justify-content:center}.overlay-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);color:white;font-size:24px;font-weight:bold;text-shadow:2px 2px 4px rgba(0, 0, 0, 0.7);pointer-events:none;}";export{a as tttx_graph_1_9_97}
|