@heartlandone/vega 2.103.0 → 2.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-85986306.js → app-globals-bc84b09b.js} +10 -10
- package/dist/cjs/{code-block-72de6c4d.js → code-block-7340d2b7.js} +1 -1
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-23d2b3d8.js → component-value-history-controller-slimmer.abstract-dd834f8d.js} +3 -3
- package/dist/cjs/{content-state-ff40bdc6.js → content-state-dde1253f.js} +2 -2
- package/dist/cjs/{date-required-rule-608e704b.js → date-required-rule-5e6777cf.js} +1 -1
- package/dist/cjs/{design-token-a101a8d0.js → design-token-b28d222d.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-b93cc564.js → element-appender-slimmer-a87bc0ce.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-124d54ea.js → form-field-controller-slimmer-fde2b355.js} +16 -2
- package/dist/cjs/{image-annotation-action-1ee41bc7.js → image-annotation-action-715bece3.js} +2 -2
- package/dist/cjs/{image-extension-6a92c524.js → image-extension-cc8f36a1.js} +5 -5
- package/dist/cjs/index.cjs.js +17 -17
- package/dist/cjs/{inject-keyboard-manager-32d7dd0e.js → inject-keyboard-manager-1a113d04.js} +1 -1
- package/dist/cjs/{internal-calendar-period-factory-c3198ea7.js → internal-calendar-period-factory-bf5e8294.js} +1 -1
- package/dist/cjs/{internal-translation-controller-0d67ca4d.js → internal-translation-controller-b5bbefc9.js} +4 -0
- package/dist/cjs/{keyboard-manager-332eec89.js → keyboard-manager-d0271450.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-a2872981.js → keyboard-manager-slimmer-5a4c0e4c.js} +1 -1
- package/dist/cjs/{legend-input-processor-ce9b38f8.js → legend-input-processor-bd36a794.js} +28 -0
- package/dist/cjs/{link-extension-1b4ed437.js → link-extension-953fb2a0.js} +3 -3
- package/dist/cjs/loader.cjs.js +12 -12
- package/dist/cjs/{month-view-generator-b6a2b8be.js → month-view-generator-b68bcf4b.js} +1 -1
- package/dist/cjs/{public-rules-2066613c.js → public-rules-8bfc6de7.js} +7 -7
- package/dist/cjs/{range-712fe703.js → range-4060b238.js} +1 -1
- package/dist/cjs/{responsive-format-facade-44d33457.js → responsive-format-facade-fed434ed.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-1aa75d22.js → rich-text-editor-required-rule-16e74e91.js} +1 -1
- package/dist/cjs/{split-cell-operation-afc82323.js → split-cell-operation-430e9f27.js} +3 -3
- package/dist/cjs/{state-border-formatter-49984fd6.js → state-border-formatter-b469de2f.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-bd563c01.js → string-format-strategy.abstract-b3174863.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-4faebac9.js → string-input-formatter-slimmer-ceb678e9.js} +1 -1
- package/dist/cjs/{string-mask-strategy-624c4398.js → string-mask-strategy-5f84e2f6.js} +2 -2
- package/dist/cjs/{style-formatter-151d89a3.js → style-formatter-e98caf3c.js} +2 -2
- package/dist/cjs/{time-required-rule-8cd8f9b9.js → time-required-rule-249cb6b6.js} +1 -1
- package/dist/cjs/{token-extension-72d0cb08.js → token-extension-f074902b.js} +8 -8
- package/dist/cjs/{translation-slimmer-1771d01f.js → translation-slimmer-b60d598e.js} +1 -1
- package/dist/cjs/{type-guard-cce6fe1f.js → type-guard-8eb40609.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-b13c2fc4.js → valid-credit-card-number-rule-f5d2b2c6.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
- package/dist/cjs/vega-app-footer.cjs.entry.js +20 -25
- package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
- package/dist/cjs/vega-bar-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-card.cjs.entry.js +5 -5
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-chip.cjs.entry.js +5 -5
- package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-dialog_2.cjs.entry.js +10 -5
- package/dist/cjs/vega-divider.cjs.entry.js +5 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-flex.cjs.entry.js +6 -6
- package/dist/cjs/vega-font.cjs.entry.js +5 -5
- package/dist/cjs/vega-form.cjs.entry.js +2 -2
- package/dist/cjs/vega-grid.cjs.entry.js +5 -5
- package/dist/cjs/vega-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-image-uploader.cjs.entry.js +21 -12
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-numeric.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
- package/dist/cjs/vega-input.cjs.entry.js +6 -6
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-line-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
- package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
- package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +63 -19
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
- package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
- package/dist/cjs/vega.cjs.js +12 -12
- package/dist/cjs/{y-axis-input-processor-d3a3839c.js → y-axis-input-processor-9ba96716.js} +1 -1
- package/dist/collection/components/vega-app-footer/vega-app-footer.js +38 -35
- package/dist/collection/components/vega-dialog/vega-dialog.js +7 -2
- package/dist/collection/components/vega-image-uploader/slimmers/controllers/vega-image-uploader-remove-controller.js +6 -3
- package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-actions-renderer.js +6 -3
- package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-uploading-content-renderer.js +4 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +45 -2
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +16 -0
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +3 -0
- package/dist/collection/constants/misc.js +2 -4
- package/dist/collection/helpers/slimmers/form/form-field-controller-slimmer.js +12 -1
- package/dist/collection/helpers/translation/locales/en.js +4 -0
- package/dist/collection/helpers/validator/form-field-controller.js +4 -1
- package/dist/collection/polyfill/d3/d3-shape-polyfill.js +28 -0
- package/dist/esm/{app-globals-8cdfc5c9.js → app-globals-8541b3dc.js} +10 -10
- package/dist/esm/{code-block-9360c331.js → code-block-c16c69a5.js} +1 -1
- package/dist/esm/{component-value-history-controller-slimmer.abstract-9ea58806.js → component-value-history-controller-slimmer.abstract-1cea9add.js} +3 -3
- package/dist/esm/{content-state-67a12e74.js → content-state-73664d93.js} +2 -2
- package/dist/esm/{date-required-rule-66b5bf02.js → date-required-rule-14131e09.js} +1 -1
- package/dist/esm/{design-token-acd1efeb.js → design-token-4b81bae7.js} +3 -3
- package/dist/esm/{element-appender-slimmer-7e5bc1e9.js → element-appender-slimmer-9094aa07.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-d653c494.js → form-field-controller-slimmer-6f0f083f.js} +16 -2
- package/dist/esm/{image-annotation-action-9525be48.js → image-annotation-action-86052c2e.js} +2 -2
- package/dist/esm/{image-extension-aea75132.js → image-extension-04843995.js} +5 -5
- package/dist/esm/index.js +17 -17
- package/dist/esm/{inject-keyboard-manager-f6522d2f.js → inject-keyboard-manager-1a950408.js} +1 -1
- package/dist/esm/{internal-calendar-period-factory-261df2f2.js → internal-calendar-period-factory-14c000cf.js} +1 -1
- package/dist/esm/{internal-translation-controller-3637e47e.js → internal-translation-controller-6eb30c39.js} +4 -0
- package/dist/esm/{keyboard-manager-53e8d8d0.js → keyboard-manager-e7add1f3.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-b3de042d.js → keyboard-manager-slimmer-ffe6588a.js} +1 -1
- package/dist/esm/{legend-input-processor-3b2de4b7.js → legend-input-processor-bd91524a.js} +28 -0
- package/dist/esm/{link-extension-57ba9520.js → link-extension-caabb7d8.js} +3 -3
- package/dist/esm/loader.js +12 -12
- package/dist/esm/{month-view-generator-15215a09.js → month-view-generator-0dad54d9.js} +1 -1
- package/dist/esm/{public-rules-c77a1550.js → public-rules-76247d91.js} +7 -7
- package/dist/esm/{range-3c74e1c8.js → range-c0aec697.js} +1 -1
- package/dist/esm/{responsive-format-facade-1b325d06.js → responsive-format-facade-1a9177b9.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-cfd32ba2.js → rich-text-editor-required-rule-65e18ef0.js} +1 -1
- package/dist/esm/{split-cell-operation-85a036f9.js → split-cell-operation-814641f5.js} +3 -3
- package/dist/esm/{state-border-formatter-ce3495b0.js → state-border-formatter-31f3145a.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-8ce04558.js → string-format-strategy.abstract-a8612297.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-0d60ba7d.js → string-input-formatter-slimmer-8f2aa95a.js} +1 -1
- package/dist/esm/{string-mask-strategy-cabc1d50.js → string-mask-strategy-e8bad1c6.js} +2 -2
- package/dist/esm/{style-formatter-00fe4f1c.js → style-formatter-42e87858.js} +2 -2
- package/dist/esm/{time-required-rule-57ceeae9.js → time-required-rule-fcab062e.js} +1 -1
- package/dist/esm/{token-extension-645a9520.js → token-extension-f001f08e.js} +8 -8
- package/dist/esm/{translation-slimmer-b69057eb.js → translation-slimmer-5fa762dc.js} +1 -1
- package/dist/esm/{type-guard-204094c6.js → type-guard-87bdc930.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-0874e19f.js → valid-credit-card-number-rule-5dc557f1.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +6 -6
- package/dist/esm/vega-app-footer.entry.js +20 -25
- package/dist/esm/vega-app-header-button.entry.js +5 -5
- package/dist/esm/vega-bar-chart.entry.js +2 -2
- package/dist/esm/vega-box.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +3 -3
- package/dist/esm/vega-calendar_5.entry.js +7 -7
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +2 -2
- package/dist/esm/vega-chip.entry.js +5 -5
- package/dist/esm/vega-code-block.entry.js +8 -8
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
- package/dist/esm/vega-color-swatch.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +8 -8
- package/dist/esm/vega-date-picker_2.entry.js +13 -13
- package/dist/esm/vega-dialog_2.entry.js +10 -5
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +7 -7
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-flag-icon.entry.js +5 -5
- package/dist/esm/vega-flex.entry.js +6 -6
- package/dist/esm/vega-font.entry.js +5 -5
- package/dist/esm/vega-form.entry.js +2 -2
- package/dist/esm/vega-grid.entry.js +5 -5
- package/dist/esm/vega-icon.entry.js +5 -5
- package/dist/esm/vega-image-uploader.entry.js +21 -12
- package/dist/esm/vega-input-credit-card.entry.js +6 -6
- package/dist/esm/vega-input-numeric.entry.js +5 -5
- package/dist/esm/vega-input-passcode.entry.js +5 -5
- package/dist/esm/vega-input-phone-number.entry.js +4 -4
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +5 -5
- package/dist/esm/vega-input.entry.js +6 -6
- package/dist/esm/vega-left-nav_5.entry.js +7 -7
- package/dist/esm/vega-line-chart.entry.js +2 -2
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-pie-chart.entry.js +1 -1
- package/dist/esm/vega-popover_2.entry.js +8 -8
- package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
- package/dist/esm/vega-radio_2.entry.js +5 -5
- package/dist/esm/vega-rich-text-bookmark-editor.entry.js +2 -2
- package/dist/esm/vega-rich-text-content.entry.js +6 -6
- package/dist/esm/vega-rich-text-editor_4.entry.js +63 -19
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +2 -2
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-stepper.entry.js +2 -2
- package/dist/esm/vega-tab-group_2.entry.js +6 -6
- package/dist/esm/vega-table_11.entry.js +4 -4
- package/dist/esm/vega-textarea.entry.js +2 -2
- package/dist/esm/vega-time-picker_2.entry.js +9 -9
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega-tooltip_2.entry.js +6 -6
- package/dist/esm/vega.js +12 -12
- package/dist/esm/{y-axis-input-processor-c6b2a914.js → y-axis-input-processor-dd574c2e.js} +1 -1
- package/dist/sri/vega-sri-manifest.json +339 -339
- package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +14 -12
- package/dist/types/components/vega-dialog/vega-dialog.d.ts +2 -0
- package/dist/types/components/vega-image-uploader/slimmers/controllers/vega-image-uploader-remove-controller.d.ts +1 -0
- package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-actions-renderer.d.ts +1 -0
- package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-uploading-content-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +3 -2
- package/dist/types/components.d.ts +26 -22
- package/dist/types/constants/misc.d.ts +0 -2
- package/dist/types/helpers/slimmers/form/form-field-controller-slimmer.d.ts +7 -0
- package/dist/types/helpers/translation/interface.d.ts +4 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-64eb05d3.entry.js → p-017f0314.entry.js} +1 -1
- package/dist/vega/{p-8de29082.entry.js → p-09c5aae6.entry.js} +1 -1
- package/dist/vega/p-0a8e82f1.js +1 -0
- package/dist/vega/{p-76f4fdba.entry.js → p-0c8f8d88.entry.js} +1 -1
- package/dist/vega/{p-2ff659a1.entry.js → p-0cd81963.entry.js} +1 -1
- package/dist/vega/{p-0169f71c.entry.js → p-0cda0b10.entry.js} +1 -1
- package/dist/vega/{p-4043508a.js → p-146abbc7.js} +1 -1
- package/dist/vega/{p-9a96fb05.entry.js → p-185a24ed.entry.js} +1 -1
- package/dist/vega/{p-dcfce26e.entry.js → p-1acaccd6.entry.js} +1 -1
- package/dist/vega/{p-9fcfd738.js → p-1c7dc9c6.js} +1 -1
- package/dist/vega/{p-ebe1dd2b.entry.js → p-1ccf0a96.entry.js} +1 -1
- package/dist/vega/{p-0b33753f.entry.js → p-1f0b99ac.entry.js} +1 -1
- package/dist/vega/{p-d5a75228.js → p-24b6f3ee.js} +1 -1
- package/dist/vega/p-25d8b416.js +1 -0
- package/dist/vega/{p-8e59606f.entry.js → p-27c0c41f.entry.js} +1 -1
- package/dist/vega/{p-3283fa2f.js → p-2a501c55.js} +1 -1
- package/dist/vega/p-2dbdd1bf.entry.js +1 -0
- package/dist/vega/p-2e847194.js +1 -0
- package/dist/vega/{p-f9d09b0c.js → p-3040c091.js} +1 -1
- package/dist/vega/{p-e6b0a292.entry.js → p-313ccf96.entry.js} +1 -1
- package/dist/vega/{p-17f6dc94.entry.js → p-3437ff39.entry.js} +1 -1
- package/dist/vega/p-347d664e.js +1 -0
- package/dist/vega/{p-322da1eb.entry.js → p-377a5330.entry.js} +1 -1
- package/dist/vega/{p-08bf08d2.js → p-37eb020f.js} +1 -1
- package/dist/vega/p-3831f00d.entry.js +1 -0
- package/dist/vega/{p-1f1f93bf.entry.js → p-3a153581.entry.js} +1 -1
- package/dist/vega/p-46d34326.js +1 -0
- package/dist/vega/p-4a2e040f.entry.js +1 -0
- package/dist/vega/{p-6e16bb3a.js → p-4ad6da8f.js} +1 -1
- package/dist/vega/{p-8ac0b1b2.entry.js → p-4b5591fb.entry.js} +1 -1
- package/dist/vega/{p-b3a1cd22.js → p-4cd198b9.js} +1 -1
- package/dist/vega/{p-ba67eb96.js → p-4f24f262.js} +1 -1
- package/dist/vega/{p-1b2e5898.js → p-53c1b195.js} +1 -1
- package/dist/vega/{p-cb68a43a.entry.js → p-54c21aa8.entry.js} +1 -1
- package/dist/vega/{p-cc9fc36a.entry.js → p-568d4da6.entry.js} +1 -1
- package/dist/vega/{p-7874055b.entry.js → p-593a4af3.entry.js} +1 -1
- package/dist/vega/{p-eb945d34.entry.js → p-5a60c1ed.entry.js} +1 -1
- package/dist/vega/{p-28acbe42.entry.js → p-5bdc1ff3.entry.js} +1 -1
- package/dist/vega/{p-92411f56.entry.js → p-5ccdfd46.entry.js} +1 -1
- package/dist/vega/{p-2171b571.entry.js → p-5cd6b840.entry.js} +1 -1
- package/dist/vega/{p-f981cf2c.js → p-5cfe82e7.js} +1 -1
- package/dist/vega/{p-e5fc6583.entry.js → p-5f04fb23.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-5f589bdb.entry.js +1 -0
- package/dist/vega/{p-df9585f6.js → p-68e70f75.js} +1 -1
- package/dist/vega/{p-608d3559.entry.js → p-6902bcaf.entry.js} +1 -1
- package/dist/vega/{p-3b911043.entry.js → p-6b2da3bc.entry.js} +1 -1
- package/dist/vega/{p-69eadbd8.entry.js → p-6c0d4f69.entry.js} +1 -1
- package/dist/vega/{p-7f9ad7bc.js → p-6c46ea86.js} +1 -1
- package/dist/vega/{p-6096ffc3.js → p-6d0947e2.js} +1 -1
- package/dist/vega/{p-36b795c6.entry.js → p-6ec65f72.entry.js} +1 -1
- package/dist/vega/{p-94d65dcf.entry.js → p-701ac71a.entry.js} +1 -1
- package/dist/vega/p-70a08fe5.js +1 -0
- package/dist/vega/{p-ba050d63.entry.js → p-776123f8.entry.js} +1 -1
- package/dist/vega/{p-261cf764.js → p-78a2802f.js} +1 -1
- package/dist/vega/{p-c7ec97d1.entry.js → p-7e262cb3.entry.js} +1 -1
- package/dist/vega/{p-fee080b9.entry.js → p-8a303571.entry.js} +1 -1
- package/dist/vega/{p-fdbdf12f.js → p-8e3c1c81.js} +1 -1
- package/dist/vega/{p-7d3d24f6.entry.js → p-8e59892d.entry.js} +1 -1
- package/dist/vega/{p-564110ba.entry.js → p-9960ffde.entry.js} +1 -1
- package/dist/vega/{p-e84c2589.js → p-9b571551.js} +1 -1
- package/dist/vega/{p-c08ac33f.entry.js → p-9e51b1a8.entry.js} +1 -1
- package/dist/vega/{p-1a4d1991.entry.js → p-a222639f.entry.js} +1 -1
- package/dist/vega/{p-6c4edee8.entry.js → p-a50b8c9f.entry.js} +1 -1
- package/dist/vega/{p-8c61db9d.entry.js → p-a54a2def.entry.js} +1 -1
- package/dist/vega/{p-e33a954f.js → p-a6346186.js} +1 -1
- package/dist/vega/{p-b63a90b3.entry.js → p-a6467be2.entry.js} +1 -1
- package/dist/vega/p-a7ed55d8.js +1 -0
- package/dist/vega/{p-3567dc55.entry.js → p-afa8a9af.entry.js} +1 -1
- package/dist/vega/{p-9153c2f5.entry.js → p-b015a970.entry.js} +1 -1
- package/dist/vega/p-b4e4b938.entry.js +1 -0
- package/dist/vega/{p-e2c8a470.entry.js → p-b63af0ae.entry.js} +1 -1
- package/dist/vega/{p-ade903b3.entry.js → p-ba971f6a.entry.js} +1 -1
- package/dist/vega/{p-dc83fa6b.entry.js → p-bc8bc41e.entry.js} +1 -1
- package/dist/vega/{p-ac98c189.entry.js → p-c07039d8.entry.js} +1 -1
- package/dist/vega/{p-3b4e2ba0.js → p-c0eddde0.js} +1 -1
- package/dist/vega/{p-abe5f7f0.entry.js → p-c26c979f.entry.js} +1 -1
- package/dist/vega/{p-1fb953f8.js → p-c576f76b.js} +1 -1
- package/dist/vega/{p-8193f4ef.entry.js → p-c6cfaa2f.entry.js} +1 -1
- package/dist/vega/{p-a60d75d9.js → p-c73cce9b.js} +1 -1
- package/dist/vega/{p-ca1fe571.entry.js → p-c75c14e4.entry.js} +1 -1
- package/dist/vega/{p-8197d172.entry.js → p-c8c2e940.entry.js} +1 -1
- package/dist/vega/{p-f818bb20.entry.js → p-c968f8cf.entry.js} +1 -1
- package/dist/vega/{p-2fc2299f.js → p-cef58d27.js} +1 -1
- package/dist/vega/{p-27e77ea1.entry.js → p-d1b8fb1d.entry.js} +1 -1
- package/dist/vega/p-d5ab92a5.entry.js +1 -0
- package/dist/vega/{p-d044d54f.entry.js → p-d9c2aa77.entry.js} +1 -1
- package/dist/vega/{p-1537b1e4.js → p-da94bcda.js} +1 -1
- package/dist/vega/{p-66bf209b.entry.js → p-dcf4f31f.entry.js} +1 -1
- package/dist/vega/{p-4503f5b9.entry.js → p-e11987d3.entry.js} +1 -1
- package/dist/vega/{p-a2dcde12.js → p-e1aa78db.js} +1 -1
- package/dist/vega/{p-8ea41806.js → p-e2168481.js} +1 -1
- package/dist/vega/{p-018bb83b.entry.js → p-e22a00ec.entry.js} +1 -1
- package/dist/vega/{p-4e4b50f3.entry.js → p-e67ef7a1.entry.js} +1 -1
- package/dist/vega/{p-4cdc064d.entry.js → p-ee2bd1e8.entry.js} +1 -1
- package/dist/vega/{p-45af801f.js → p-f2193656.js} +1 -1
- package/dist/vega/{p-a2c7a3bc.js → p-fc07ed1e.js} +1 -1
- package/dist/vega/{p-3e270b65.entry.js → p-fdb6f4f0.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-255fe20b.js +0 -1
- package/dist/vega/p-2acc600a.entry.js +0 -1
- package/dist/vega/p-37714a3a.js +0 -1
- package/dist/vega/p-38c551a9.entry.js +0 -1
- package/dist/vega/p-4151d4a8.js +0 -1
- package/dist/vega/p-48c2150b.entry.js +0 -1
- package/dist/vega/p-4b253f74.entry.js +0 -1
- package/dist/vega/p-7b9ed949.js +0 -1
- package/dist/vega/p-9a0e17b2.entry.js +0 -1
- package/dist/vega/p-a9fc4043.js +0 -1
- package/dist/vega/p-affb40e8.js +0 -1
- package/dist/vega/p-d3a9355c.entry.js +0 -1
- package/dist/vega/p-e668cf11.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,g as i,H as s}from"./p-6b2342e0.js";import{B as r,a as o,L as n,P as a,b as c,c as h}from"./p-
|
|
1
|
+
import{r as t,h as e,g as i,H as s}from"./p-6b2342e0.js";import{B as r,a as o,L as n,P as a,b as c,c as h}from"./p-46d34326.js";import{Y as l,X as d,a as p,b as u}from"./p-6d0947e2.js";import{I as m}from"./p-6e1ab235.js";import{V as w,I as b}from"./p-5c8e4e8f.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-b438e68b.js";import"./p-0c667d6a.js";class v extends r{addInteractionSupport(){}draw(){const{dataSource:t=[],xScale:e,yScale:i,colors:s,direction:r}=this.options.renderOptions,o=t.map((t=>t.x)),n=t.map((t=>t.y));o.forEach(((t,o)=>{var a,c;const h=n[o]||0;let l=0,d=0,p={x:0,y:0};"horizontal"!==r?(l=(null===(a=e.bandwidth)||void 0===a?void 0:a.call(e))||5,d=Math.abs(i(0)-i(h)),p={x:e(t),y:i(Math.max(0,h))}):(d=(null===(c=i.bandwidth)||void 0===c?void 0:c.call(i))||5,l=Math.abs(e(h)-e(0)),p={x:e(Math.min(h,0)),y:i(t)}),this.renderer.drawRect(p,l,d,this.getColorFromToken(this.getColorByIndex(0,s)))}))}}class f extends l{process(t,e){const{dataSource:i,yAxis:s}=t,{innerWidth:r,innerHeight:o}=e,{scale:n,ticks:a}=this.getScale(i,[0,r],4);return{start:{x:0,y:o},end:{x:r,y:o},tickSize:a,scale:n,labelFormatter:null==s?void 0:s.labelFormatter,width:r,height:o,direction:"horizontal"}}}class j extends d{process(t,e){const{dataSource:i,xAxis:s,container:r}=t,{innerWidth:o,innerHeight:n}=e;return{start:{x:0,y:0},end:{x:0,y:n},tickSize:4,scale:this.getScale(i,n,(null==s?void 0:s.type)||"value","VEGA-LINE-CHART"===r.tagName?1:.1,null==s?void 0:s.sorter),labelFormatter:null==s?void 0:s.labelFormatter,width:o,height:n,direction:"horizontal"}}}class x extends o{constructor(){super(...arguments),this.layoutInputProcessor=new n,this.xAxisInputProcessorChain=new a([this.layoutInputProcessor,new d]),this.horizontalXAxisInputProcessorChain=new a([this.layoutInputProcessor,new f]),this.yAxisInputProcessorChain=new a([this.layoutInputProcessor,new l]),this.horizontalYAxisInputProcessorChain=new a([this.layoutInputProcessor,new j]),this.legendInputProcessorChain=new a([this.layoutInputProcessor,new c])}createDrawerChain(t,e){const{colors:i,xAxis:s,dataSource:r,direction:o}=this.options,n=Object.assign(Object.assign({},this.options),{xAxis:Object.assign(Object.assign({},s),{type:"category"})}),a="horizontal"===o?this.horizontalXAxisInputProcessorChain.process(n):this.xAxisInputProcessorChain.process(n),c="horizontal"===o?this.horizontalYAxisInputProcessorChain.process(n):this.yAxisInputProcessorChain.process(n);return[new p(t,e,{renderOptions:a}),new u(t,e,{renderOptions:c}),new h(t,e,{renderOptions:this.legendInputProcessorChain.process(n)}),new v(t,e,{renderOptions:{dataSource:r,xScale:a.scale,yScale:c.scale,colors:i,direction:o}})]}}var O=function(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const S=class{constructor(e){t(this,e),this.globalSlimmers=new Map,this.vegaComponentUsageRuntimeMetricsSlimmer=new w,this.options={}}watchOptions(t){this.initChart(t)}componentWillLoad(){this.initChart(this.options)}render(){return e(s,null)}initChart(t){const{mode:e="svg",dataSource:i=[]}=t,s=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(i[s[r]]=t[s[r]])}return i}(t,["mode","dataSource"]),r=Object.assign(Object.assign({},s),{mode:e,container:this.host,dataSource:i});this.chart?this.chart.updateOptions(r):(this.chart=new x(r),this.chart.render())}get host(){return i(this)}static get watchers(){return{options:["watchOptions"]}}};O([b()],S.prototype,"globalSlimmers",void 0),O([m()],S.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),S.style=".vega-chart-legend-item{cursor:pointer}.vega-chart-line-path:hover{stroke-width:5}:host{display:block}";export{S as vega_bar_chart}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t}from"./p-6b2342e0.js";import{V as e}from"./p-44245a36.js";import{c as o,V as s}from"./p-6e1ab235.js";import{A as r,a1 as i,R as n,av as c,N as l,k as a}from"./p-
|
|
1
|
+
import{h as t}from"./p-6b2342e0.js";import{V as e}from"./p-44245a36.js";import{c as o,V as s}from"./p-6e1ab235.js";import{A as r,a1 as i,R as n,av as c,N as l,k as a}from"./p-3040c091.js";import{D as h}from"./p-36a57431.js";import{b as u,a as d,V as p,c as f}from"./p-a83cef5a.js";import{a as v}from"./p-d1f47512.js";import{e as m}from"./p-68e70f75.js";var b=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class C extends s{constructor({icon:e,tooltip:o,ariaLabel:s,autoFocusOnClick:r=!0}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var s;return t("vega-tooltip",{text:this.translationSlimmer.t(this.tooltip.text),placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,"data-aria-label":this.ariaLabel,ref:t=>{h.addUniqueObserverToNode(t,u,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled(),hidden:this.isHidden()},this.preventLostFocus()),null===(s=this.renderSlotContent)||void 0===s?void 0:s.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(!this.selectionController.getSelectedNodes().length&&this.autoFocusOnClick?this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})):this.onClick())},this.icon=e,this.tooltip=o,this.ariaLabel=null!=s?s:o.text,this.autoFocusOnClick=r}setIcon(t){this.icon=t}isHidden(){return!1}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}b([o()],C.prototype,"translationSlimmer",void 0),b([o()],C.prototype,"selectionController",void 0),b([o()],C.prototype,"focusController",void 0),b([o()],C.prototype,"disabled",void 0);class w extends C{constructor(t){super(t)}isHidden(){return this.sourceView}isDisabled(){return super.isDisabled()&&!this.sourceView}shouldDisabledToolbar(t,e){return t&&!r.canHandle(e,t)}}!function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);i>3&&n&&Object.defineProperty(e,o,n)}([o()],w.prototype,"sourceView",void 0);var j=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class x extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,v.registerCustomDarkModeColor(x.formatDarkModeColor())}static formatDarkModeColor(){return i.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",isScreenPosition:!0,role:"presentation",ref:t=>{this.popoverRef=t,h.addUniqueObserverToNode(t,d,this.handlePopoverShowChange.bind(this)),h.addUniqueObserverToNode(t,p,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:i.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{h.addUniqueObserverToNode(t,f,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof n)).forEach((e=>e.apply(new c(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return i.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=i[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||i[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(l.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(l.LINK)||this.shouldDisabledToolbar(t,c.typeName)}))}}e.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),j([o()],x.prototype,"host",void 0),j([o()],x.prototype,"isInDarkMode",void 0),j([o()],x.prototype,"selectionController",void 0),j([o()],x.prototype,"focusController",void 0);const g=/^((\w+:(\/{2,})?)|(\W))/i;function y(t,e){const o=(t||"").trim();if(!o)return o;const s=(e||"").trim();return!s||g.test(o)?o:`${s}${o}`}class O extends a{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new m(this.size,this.alt)}}O.typeName="ImageAnnotationAction";export{O as I,x as T,w as V,C as a,y as n}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as t,ah as e,ai as o,aj as n,N as r,U as i,l as s,f as a,M as l,j as d,s as c,A as h,c as u,r as v,ak as p,al as f,am as m}from"./p-f9d09b0c.js";import{e as k,a as b,b as g}from"./p-3b4e2ba0.js";import{g as w}from"./p-8b5d3a52.js";import{E as x,U as y}from"./p-df9585f6.js";import{D as A}from"./p-36a57431.js";import{d as B,b as D,c as E}from"./p-a83cef5a.js";import{V as R}from"./p-affb40e8.js";import{c as S}from"./p-8387896e.js";import{d as N}from"./p-1bc5b3bc.js";import{t as O}from"./p-b75ee3ba.js";import{V as j}from"./p-44245a36.js";import{i as K}from"./p-fdbdf12f.js";import{v as M}from"./p-4866e390.js";class _{constructor(){this.dropdownEl=null,this.itemsContainerEl=null,this.buttonEl=null}isHidden(t){return t.sourceEditMode}getExtensionContext(t){return k.getExtensionContext(t)}renderDropdown(t,e,o,n){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",isScreenPosition:!0,role:"presentation",ref:t=>{this.dropdownEl=t,A.addUniqueObserverToNode(t,B,(t=>{this.handleDropdownClick(t.detail,e)}))}},o),n)}renderDropdownListTemplate(t,e,o){return t("div",{slot:"items",onMouseDown:this.preventDefault,onKeyDown:t=>this.handleItemsKeyDown(t),ref:t=>{this.itemsContainerEl=t},class:"rte-dropdown-list"},[t("style",{nonce:M.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...e.map((e=>"children"in e?this.renderDropdownGroup(t,e,o):this.renderDropdownItem(t,e,o)))])}renderDropdownItem(t,e,o){return t("vega-dropdown-item",{key:e.key,itemKey:e.key,label:o.translation.t(e.label),prefixIcon:e.icon})}renderDropdownGroup(t,e,o){return t("vega-dropdown-group",{key:e.key,label:o.translation.t(e.label),divide:!1},e.children.map((e=>"children"in e?this.renderDropdownGroup(t,e,o):this.renderDropdownItem(t,e,o))))}renderButton(t,e,o){const{icon:n,label:r,showArrowIcon:i,tooltip:s,ariaLabel:a}=o,l=this.isDisabled(e),d=t("vega-rich-text-editor-toolbar-button",{disabled:l,icon:n,"data-aria-label":null!=a?a:r,hidden:this.isHidden(e),selected:this.isSelected(e),ref:t=>{this.buttonEl=t,A.addUniqueObserverToNode(t,D,(()=>this.handleButtonClick(e)))},onMouseDown:this.preventDefault,onKeyDown:t=>this.handleButtonKeyDown(t)},[this.renderButtonLabel(t,e,r),i?t("vega-icon",{size:"size-8",color:l?"text-disabled":"text-secondary",style:{marginLeft:"8px"},"aria-hidden":"true",icon:j.getIconKey("chevron-down")}):null].filter(K));return(null==s?void 0:s.text)?t("vega-tooltip",{text:e.translation.t(s.text),placement:["bottom","top"]},[d]):d}renderButtonLabel(t,e,o){return o?t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary","aria-hidden":"true"},e.translation.t(o)):null}isDisabled(t){return t.host.disabled}isSelected(t){return!1}preventDefault(t){t.preventDefault()}focusToolbarButton(){var t,e,o,n;const r=null!==(o=null===(e=null===(t=this.buttonEl)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("button"))&&void 0!==o?o:null;null===(n=null!=r?r:this.buttonEl)||void 0===n||n.focus()}getListItemByKey(t,e){for(const o of t)if("children"in o){const t=this.getListItemByKey(o.children,e);if(t)return t}else if(o.key===e)return o;return null}handleButtonKeyDown(t){this.dropdownEl&&("Enter"===t.code||"Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.dropdownEl.dispatchEvent(new MouseEvent("click",{bubbles:!0}))):"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(t.preventDefault(),t.stopPropagation(),this.dropdownEl.show().then((()=>{this.focusDropdownItem("ArrowDown"===t.code?"first":"last")}))))}handleItemsKeyDown(t){var e,o;if("Escape"===t.code)return t.preventDefault(),t.stopPropagation(),this.dropdownEl&&this.dropdownEl.hide(),void this.focusToolbarButton();if("ArrowDown"!==t.code&&"ArrowUp"!==t.code)return;t.preventDefault(),t.stopPropagation();const n=this.getDropdownItems();if(0===n.length)return;const r=n.findIndex((t=>{var e,o;return(null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))===(null===(o=t.shadowRoot)||void 0===o?void 0:o.activeElement)})),i="ArrowDown"===t.code?1:-1,s=-1===r?"ArrowDown"===t.code?0:n.length-1:r+i;for(let t=0;t<n.length;t++){const r=(s+t*i+n.length)%n.length;if(!n[r].disabled)return void(null===(o=null===(e=n[r].shadowRoot)||void 0===e?void 0:e.querySelector("li"))||void 0===o||o.focus())}}focusDropdownItem(t){var e,o;const n=this.getDropdownItems(),r="first"===t?n:[...n].reverse();for(const t of r)if(!t.disabled)return void(null===(o=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))||void 0===o||o.focus())}getDropdownItems(){return this.itemsContainerEl?Array.from(this.itemsContainerEl.querySelectorAll("vega-dropdown-item")):[]}}class C{}class I extends t{constructor(t,e,o,n){super(t,"",o,n),this.dtoName=I.dtoName,this.type="bookmark",this.name=e}static from(t,e){const o=new I(t.id,t.name,e);return t.annotations&&(o.annotationMap=this.generateTextAnnotationMap(t.annotations)),o}toJSON(){const t=super.toJSON().annotations;return Object.assign(Object.assign({id:this.id},t?{annotations:t}:{}),{type:this.type,text:"",name:this.name})}isContentEditable(){return!1}clone(t){return new I(this.id,this.name,t,super.cloneAnnotations())}isEmpty(){return!1}toHtml(){return`<a id="${e(this.name)}"></a>`}doAnnotationActionApply(t){t instanceof o||t instanceof n&&t.annotationType===r.BOLD||super.doAnnotationActionApply(t)}}I.typeName="RTEBookmarkNode",I.dtoName="RTEBookmarkNode";class T extends C{canIntercept(e,o){const{startContainerNode:n,startOffset:r}=e;if(!(n instanceof t))return!1;const i=o.children.indexOf(n);return n.parent===o&&i>0&&o.children[i-1]instanceof I&&(0===r||1===n.text.length&&r===n.text.length)}intercept(t,e,o){const n=e.startContainerNode;if(1===n.text.length&&1===e.startOffset)return n.apply(new i("")),void(e.previousNode=n);const r=o.children.indexOf(n);o.apply(new s(o.children[r-1])),e.nextNode=n}}class P extends a{handleAction(t,e){e.name=t.name}}class H extends l{constructor(t,e){super(),this.type=d.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class L extends a{handleAction(t,e){const{rteRange:o,name:n}=t;if(o&&o.startNode){const r=new I(w(),n,e);e.apply(new H(o,r)),t.actionHandleResult=!0}}}class $ extends l{constructor(t,e){super(),this.type="INSERT_BOOKMARK_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.name=e}}class U extends l{constructor(t){super(),this.type="UPDATE_BOOKMARK_NAME",this.name=t}}const V="M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z",z={icon:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="${V}"/></svg>`};function W(t){const e=[],o=new Set;return function t(n){if(!n||"object"!=typeof n||o.has(n))return;if(o.add(n),n instanceof I)return void e.push(n);const{children:r,nestList:i}=n;Array.isArray(r)&&r.forEach(t),Array.isArray(i)&&i.forEach(t)}(t),e}function q(t){return W(t).map((t=>t.name))}class G extends b{constructor(){super(...arguments),this.rangeHighlightHandlers=new WeakMap,this.openPopoverNode=null,this.handleBalloonShow=t=>{const e=this.getBookmarkAnchor(t);e&&(this.openPopoverNode=this.getBookmarkNodeByAnchor(e),e.classList.add(G.SELECTED_CLASS))},this.handleBalloonHide=t=>{const e=this.getBookmarkAnchor(t);e&&(this.getBookmarkNodeByAnchor(e)===this.openPopoverNode&&(this.openPopoverNode=null),e.classList.remove(G.SELECTED_CLASS))}}doRender(t,e,o){return o&&!1!==o.editable?this.renderEditableBookmark(t,e,o):this.renderReadonlyBookmark(t,e)}injectRTEScopeStyles(){return["a.rte-bookmark{display: inline-block; vertical-align: middle; line-height: 0; cursor: pointer; padding: 0; margin: 0; border-radius: 2px}","a.rte-bookmark.rte-bookmark-readonly{cursor: default}","a.rte-bookmark > vega-rich-text-bookmark-editor{position: absolute; width: 0; height: 0}","a.rte-bookmark .rte-bookmark__icon{display: inline-block; position: relative; top: -0.125em; vertical-align: middle; line-height: 0; height: 1em; width: 1em}","a.rte-bookmark svg{display: block; height: 100%; width: 100%}",`a.rte-bookmark.${G.SELECTED_CLASS}{color: rgba(var(--v-bg-action, 19,98,226,1))}`].join("\n")}teardownRangeHighlight(t){var e,o;const n=null!==(e=this.rangeHighlightHandlers.get(t))&&void 0!==e?e:null;n&&(null===(o=O())||void 0===o||o.removeEventListener("selectionchange",n),this.rangeHighlightHandlers.delete(t))}renderReadonlyBookmark(t,e){return t("a",{key:e.id,id:e.name,class:"rte-bookmark rte-bookmark-readonly",title:e.name},[this.renderIcon(t)])}renderEditableBookmark(t,e,o){const n=this.useRef(e);let r=null,i=null;return this.ensureRangeHighlight(o.host),t("a",{key:e.id,id:e.name,class:"rte-bookmark",contenteditable:"false",role:"button",tabIndex:0,"aria-label":`${R.t("Bookmark")}: ${e.name}`,title:e.name,onKeyDown:S(),onMouseDown:t=>t.preventDefault(),onClick:()=>{i&&(i.reservedNames=this.getReservedNames(e,o)),this.placeCaretAfterBookmark(e,o)},ref:t=>{t?(r=t,n(t)):null==i||i.hide()}},[this.renderIcon(t),t("vega-rich-text-bookmark-editor",{mode:"preview",name:e.name,ref:t=>{t&&(i=t,r&&t.target!==r&&(t.target=r),this.bindSelectedStateToBalloon(t),A.addUniqueObserverToNode(t,E,(t=>{this.handleChange(t,e,o)})))}})])}renderIcon(t){return t("span",{class:"rte-bookmark__icon"},[t("svg",{viewBox:"0 0 384 512","aria-hidden":"true",focusable:"false"},[t("path",{fill:"currentColor",d:V})])])}placeCaretAfterBookmark(t,e){var o;null===(o=e.host)||void 0===o||o.value.apply(new y(t,t.getRangeEndOffset(),!0))}bindSelectedStateToBalloon(t){t.removeEventListener("vegaPopoverShow",this.handleBalloonShow),t.removeEventListener("vegaPopoverHide",this.handleBalloonHide),t.addEventListener("vegaPopoverShow",this.handleBalloonShow),t.addEventListener("vegaPopoverHide",this.handleBalloonHide)}ensureRangeHighlight(t){const e=O();if(!t||!e||this.rangeHighlightHandlers.has(t))return;const o=N((()=>this.syncRangeHighlight(t)),30,this);this.rangeHighlightHandlers.set(t,o),e.addEventListener("selectionchange",o)}syncRangeHighlight(t){var e;const o=null===(e=this.getExtensionContext(t))||void 0===e?void 0:e.getSelection(),n=o&&o.rangeCount>0?o.getRangeAt(0):null;W(t.value).forEach((t=>{const e=c.getDOMByEntity(t);if(e){const o=!!n&&!n.collapsed&&n.intersectsNode(e);e.classList.toggle(G.SELECTED_CLASS,o||t===this.openPopoverNode)}}))}getBookmarkAnchor(t){var e;return null===(e=t.currentTarget)||void 0===e?void 0:e.closest("a.rte-bookmark")}getBookmarkNodeByAnchor(t){const e=c.getEntityByDOM(t);return e instanceof I?e:null}getReservedNames(t,e){var o;return W(null===(o=e.host)||void 0===o?void 0:o.value).filter((e=>e!==t)).map((t=>t.name))}handleChange(t,e,o){var n;const r=o.host;if(r)return"save"===t.detail.action?(e.apply(new U(t.detail.name)),void(null===(n=this.getExtensionContext(r))||void 0===n||n.flushValue(r.value))):void this.removeBookmark(e,r)}removeBookmark(t,e){var o,n,r,i;const a=null!==(n=null===(o=t.parent)||void 0===o?void 0:o.children)&&void 0!==n?n:[],l=a.indexOf(t),d=l>=0?a[l+1]:null,c=l>0?a[l-1]:null;null===(r=t.parent)||void 0===r||r.apply(new s(t)),null===(i=this.getExtensionContext(e))||void 0===i||i.flushValue(e.value),d?e.value.apply(new y(d,0,!0)):c&&e.value.apply(new y(c,c.getRangeEndOffset(),!0))}}G.typeName="RTEBookmarkNodeRenderer",G.SELECTED_CLASS="rte-bookmark-selected";class J extends _{constructor(){super(...arguments),this.editorRef=null,this.buttonWrapperRef=null,this.pendingRange=null}render(t,e){return t("vega-rich-text-bookmark-editor",{mode:"insert",name:"",ref:t=>{t&&(this.editorRef=t,this.syncPopoverTarget(),A.addUniqueObserverToNode(t,E,(t=>{this.handleEditorChange(t,e)})))}},[t("div",{ref:t=>{t&&(this.buttonWrapperRef=t,this.syncPopoverTarget())}},[this.renderButton(t,e,{icon:"rte-bookmark",tooltip:{text:R.t("Bookmark")}})])])}isDisabled(t){let e=super.isDisabled(t);const o=this.getExtensionContext(t.host);if(o){const{getSelectedNodes:t}=o,[n]=t();n&&(e||(e=!h.canHandle("INSERT_BOOKMARK_NODE",n.parent)))}return e}handleButtonClick(t){this.pendingRange=t.rteRange.clone(),this.editorRef&&(this.editorRef.reservedNames=q(t.host.value),this.editorRef.show())}handleDropdownClick(){}syncPopoverTarget(){this.editorRef&&this.buttonWrapperRef&&this.editorRef.target!==this.buttonWrapperRef&&(this.editorRef.target=this.buttonWrapperRef)}handleEditorChange(t,e){if("save"!==t.detail.action)return;const o=this.pendingRange,n=null==o?void 0:o.startNode;if(!(null==n?void 0:n.parent))return;const r=new $(o,t.detail.name);if(n.parent.apply(r),r.actionHandleResult){const t=this.getExtensionContext(e.host);null==t||t.flushValue(t.host.value)}this.pendingRange=null}}j.register({"rte-bookmark":z});const F=new class extends x{canHandle(t,e){return this.isBookmarkAnchor(t[e])?1:0}handle(t){const e=this.resolveBookmarkName(t[0]);return e?{id:w(),type:"bookmark",text:"",name:e}:null}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isBookmarkAnchor(t){return!!t&&"A"===t.nodeName&&!t.hasAttribute("href")&&this.isEmptyAnchor(t)&&!!this.resolveBookmarkName(t)}resolveBookmarkName(t){return(t.getAttribute("id")||t.getAttribute("name")||"").trim()}isEmptyAnchor(t){return 0===(t.textContent||"").trim().length&&0===t.children.length}};class Q extends g{constructor(){super(),this.bookmarkRenderer=new G,this.registerNode("bookmark",I),this.registerRenderer("bookmark",this.bookmarkRenderer),this.registerElementToNodeDTOClassStrategy(F)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer(Q.TOOLBAR_BUTTON_KEY,new J,t)}destroyExtension(){var t;const e=null===(t=this.extensionContext)||void 0===t?void 0:t.host;e&&this.bookmarkRenderer.teardownRangeHighlight(e)}}(()=>{const t=new L;g.registerActionHandleStrategy(u.typeName,"INSERT_BOOKMARK_NODE",t),g.registerActionHandleStrategy(v.typeName,"INSERT_BOOKMARK_NODE",t),g.registerActionHandleStrategy(I.typeName,"UPDATE_BOOKMARK_NAME",new P);const e=new T;g.registerActionHandlerInterceptor(u.typeName,d.DELETE_BLOCK_CONTENT,e),g.registerActionHandlerInterceptor(v.typeName,d.DELETE_BLOCK_CONTENT,e)})(),Q.TOOLBAR_BUTTON_KEY="bookmark";class X extends l{constructor(t,e){super(),this.type=d.REPLACE_SELECTED_TEXT,this.textToBeInsert="",this.textToBeInsert=t,this.currentRange=e}}const Y=new Set(["address","article","aside","blockquote","dd","details","dialog","div","dl","dt","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","li","main","nav","ol","p","pre","section","table","tbody","tfoot","thead","tr","ul"]),Z=new Set(["block","flex","grid","table","list-item","flow-root"]),tt=new Set(["pre","pre-wrap","break-spaces"]);function et(t,e,o=!1){let n="";return t.childNodes.forEach((t=>{var r,i,s;if(t.nodeType===Node.TEXT_NODE){const s=null!==(r=t.textContent)&&void 0!==r?r:"";if(e)return void(n+=s.replace(/ /g,f).replace(/\t/g,m));const a=t.parentElement,l=Array.from(null!==(i=null==a?void 0:a.children)&&void 0!==i?i:[]).some((t=>Y.has(t.tagName.toLowerCase())));if(!/\S/.test(s)&&l)return;return void(n+=s.replace(o?/[^\S\u00A0\n]*\n[^\S\u00A0\n]*/g:/[^\S\u00A0]*\n[^\S\u00A0]*/g,o?"\n":" "))}if(t.nodeType!==Node.ELEMENT_NODE)return;const a=t,l=a.tagName.toLowerCase();if("br"===l)return void(n+="\n");if("img"===l)return void(n+=null!==(s=a.getAttribute("alt"))&&void 0!==s?s:"");const d=function(t){var e,o,n;const r=t.tagName.toLowerCase();return"vega-code-block"===r?null!==(o=null!==(e=t.getAttribute("data-content"))&&void 0!==e?e:t.textContent)&&void 0!==o?o:"":"pre"!==r&&"code"!==r||!t.hasAttribute("data-language")?null:null!==(n=t.textContent)&&void 0!==n?n:""}(a);if(null!==d){const t=d.replace(/ /g,f).replace(/\t/g,m);return""===n||n.endsWith("\n")||(n+="\n"),n+=t,void(""!==t&&n.endsWith("\n")||(n+="\n"))}if(Y.has(l)||function(t){const e=t.style;return!!e&&Z.has(e.display)}(a)){const t=et(a,e||"pre"===l,o);if("li"===l&&""===t.trim()||"div"===l&&""===t&&null===a.querySelector("img"))return;return""===n||n.endsWith("\n")||(n+="\n"),n+=t,void(""!==t&&n.endsWith("\n")||(n+="\n"))}if("td"!==l&&"th"!==l)n+=et(a,e||"pre"===l,o||function(t){const e=t.style;return!!e&&tt.has(e.whiteSpace)}(a));else{const t=et(a,e,!0).replace(/\t+/g," ").replace(/^\n+|\n+$/g,"");n+=`${t}\n`}})),n}function ot(t,e={}){if(!t)return"";const o=(new DOMParser).parseFromString(t,"text/html");if(!o.body)return"";const n=p(et(o.body,!1)).map((t=>t.trim())).join("\n").replace(e.preserveBoundaryBlankLines?/\n$/:/^\n+|\n+$/g,"");return e.keepPreservedWhitespaceMarkers?n:n.split(f).join(" ").split(m).join("\t")}function nt(t){return/<table[\s/>]/i.test(t)}class rt extends g{constructor(t={}){super(),this.config=t}prepareBeforeLoad(t){rt.configStore.set(t,this.config)}destroyExtension(){var t;(null===(t=this.extensionContext)||void 0===t?void 0:t.host)&&rt.configStore.delete(this.extensionContext.host)}}rt.configStore=rt.createStateStore();export{C as A,H as I,X as R,Q as V,rt as a,_ as b,ot as c,z as d,q as e,nt as h}
|
|
1
|
+
import{R as t,ah as e,ai as o,aj as n,N as r,U as i,l as s,f as a,M as l,j as d,s as c,A as h,c as u,r as v,ak as p,al as m,am as f}from"./p-3040c091.js";import{e as k,a as b,b as g}from"./p-c0eddde0.js";import{g as w}from"./p-8b5d3a52.js";import{E as x,U as y}from"./p-68e70f75.js";import{D as A}from"./p-36a57431.js";import{d as B,b as D,c as E}from"./p-a83cef5a.js";import{V as R}from"./p-347d664e.js";import{c as S}from"./p-8387896e.js";import{d as N}from"./p-1bc5b3bc.js";import{t as O}from"./p-b75ee3ba.js";import{V as j}from"./p-44245a36.js";import{i as K}from"./p-8e3c1c81.js";import{v as M}from"./p-4866e390.js";class _{constructor(){this.dropdownEl=null,this.itemsContainerEl=null,this.buttonEl=null}isHidden(t){return t.sourceEditMode}getExtensionContext(t){return k.getExtensionContext(t)}renderDropdown(t,e,o,n){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",isScreenPosition:!0,role:"presentation",ref:t=>{this.dropdownEl=t,A.addUniqueObserverToNode(t,B,(t=>{this.handleDropdownClick(t.detail,e)}))}},o),n)}renderDropdownListTemplate(t,e,o){return t("div",{slot:"items",onMouseDown:this.preventDefault,onKeyDown:t=>this.handleItemsKeyDown(t),ref:t=>{this.itemsContainerEl=t},class:"rte-dropdown-list"},[t("style",{nonce:M.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...e.map((e=>"children"in e?this.renderDropdownGroup(t,e,o):this.renderDropdownItem(t,e,o)))])}renderDropdownItem(t,e,o){return t("vega-dropdown-item",{key:e.key,itemKey:e.key,label:o.translation.t(e.label),prefixIcon:e.icon})}renderDropdownGroup(t,e,o){return t("vega-dropdown-group",{key:e.key,label:o.translation.t(e.label),divide:!1},e.children.map((e=>"children"in e?this.renderDropdownGroup(t,e,o):this.renderDropdownItem(t,e,o))))}renderButton(t,e,o){const{icon:n,label:r,showArrowIcon:i,tooltip:s,ariaLabel:a}=o,l=this.isDisabled(e),d=t("vega-rich-text-editor-toolbar-button",{disabled:l,icon:n,"data-aria-label":null!=a?a:r,hidden:this.isHidden(e),selected:this.isSelected(e),ref:t=>{this.buttonEl=t,A.addUniqueObserverToNode(t,D,(()=>this.handleButtonClick(e)))},onMouseDown:this.preventDefault,onKeyDown:t=>this.handleButtonKeyDown(t)},[this.renderButtonLabel(t,e,r),i?t("vega-icon",{size:"size-8",color:l?"text-disabled":"text-secondary",style:{marginLeft:"8px"},"aria-hidden":"true",icon:j.getIconKey("chevron-down")}):null].filter(K));return(null==s?void 0:s.text)?t("vega-tooltip",{text:e.translation.t(s.text),placement:["bottom","top"]},[d]):d}renderButtonLabel(t,e,o){return o?t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary","aria-hidden":"true"},e.translation.t(o)):null}isDisabled(t){return t.host.disabled}isSelected(t){return!1}preventDefault(t){t.preventDefault()}focusToolbarButton(){var t,e,o,n;const r=null!==(o=null===(e=null===(t=this.buttonEl)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("button"))&&void 0!==o?o:null;null===(n=null!=r?r:this.buttonEl)||void 0===n||n.focus()}getListItemByKey(t,e){for(const o of t)if("children"in o){const t=this.getListItemByKey(o.children,e);if(t)return t}else if(o.key===e)return o;return null}handleButtonKeyDown(t){this.dropdownEl&&("Enter"===t.code||"Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.dropdownEl.dispatchEvent(new MouseEvent("click",{bubbles:!0}))):"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(t.preventDefault(),t.stopPropagation(),this.dropdownEl.show().then((()=>{this.focusDropdownItem("ArrowDown"===t.code?"first":"last")}))))}handleItemsKeyDown(t){var e,o;if("Escape"===t.code)return t.preventDefault(),t.stopPropagation(),this.dropdownEl&&this.dropdownEl.hide(),void this.focusToolbarButton();if("ArrowDown"!==t.code&&"ArrowUp"!==t.code)return;t.preventDefault(),t.stopPropagation();const n=this.getDropdownItems();if(0===n.length)return;const r=n.findIndex((t=>{var e,o;return(null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))===(null===(o=t.shadowRoot)||void 0===o?void 0:o.activeElement)})),i="ArrowDown"===t.code?1:-1,s=-1===r?"ArrowDown"===t.code?0:n.length-1:r+i;for(let t=0;t<n.length;t++){const r=(s+t*i+n.length)%n.length;if(!n[r].disabled)return void(null===(o=null===(e=n[r].shadowRoot)||void 0===e?void 0:e.querySelector("li"))||void 0===o||o.focus())}}focusDropdownItem(t){var e,o;const n=this.getDropdownItems(),r="first"===t?n:[...n].reverse();for(const t of r)if(!t.disabled)return void(null===(o=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))||void 0===o||o.focus())}getDropdownItems(){return this.itemsContainerEl?Array.from(this.itemsContainerEl.querySelectorAll("vega-dropdown-item")):[]}}class C{}class I extends t{constructor(t,e,o,n){super(t,"",o,n),this.dtoName=I.dtoName,this.type="bookmark",this.name=e}static from(t,e){const o=new I(t.id,t.name,e);return t.annotations&&(o.annotationMap=this.generateTextAnnotationMap(t.annotations)),o}toJSON(){const t=super.toJSON().annotations;return Object.assign(Object.assign({id:this.id},t?{annotations:t}:{}),{type:this.type,text:"",name:this.name})}isContentEditable(){return!1}clone(t){return new I(this.id,this.name,t,super.cloneAnnotations())}isEmpty(){return!1}toHtml(){return`<a id="${e(this.name)}"></a>`}doAnnotationActionApply(t){t instanceof o||t instanceof n&&t.annotationType===r.BOLD||super.doAnnotationActionApply(t)}}I.typeName="RTEBookmarkNode",I.dtoName="RTEBookmarkNode";class T extends C{canIntercept(e,o){const{startContainerNode:n,startOffset:r}=e;if(!(n instanceof t))return!1;const i=o.children.indexOf(n);return n.parent===o&&i>0&&o.children[i-1]instanceof I&&(0===r||1===n.text.length&&r===n.text.length)}intercept(t,e,o){const n=e.startContainerNode;if(1===n.text.length&&1===e.startOffset)return n.apply(new i("")),void(e.previousNode=n);const r=o.children.indexOf(n);o.apply(new s(o.children[r-1])),e.nextNode=n}}class P extends a{handleAction(t,e){e.name=t.name}}class H extends l{constructor(t,e){super(),this.type=d.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class L extends a{handleAction(t,e){const{rteRange:o,name:n}=t;if(o&&o.startNode){const r=new I(w(),n,e);e.apply(new H(o,r)),t.actionHandleResult=!0}}}class $ extends l{constructor(t,e){super(),this.type="INSERT_BOOKMARK_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.name=e}}class U extends l{constructor(t){super(),this.type="UPDATE_BOOKMARK_NAME",this.name=t}}const V="M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z",z={icon:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="${V}"/></svg>`};function W(t){const e=[],o=new Set;return function t(n){if(!n||"object"!=typeof n||o.has(n))return;if(o.add(n),n instanceof I)return void e.push(n);const{children:r,nestList:i}=n;Array.isArray(r)&&r.forEach(t),Array.isArray(i)&&i.forEach(t)}(t),e}function q(t){return W(t).map((t=>t.name))}class G extends b{constructor(){super(...arguments),this.rangeHighlightHandlers=new WeakMap,this.openPopoverNode=null,this.handleBalloonShow=t=>{const e=this.getBookmarkAnchor(t);e&&(this.openPopoverNode=this.getBookmarkNodeByAnchor(e),e.classList.add(G.SELECTED_CLASS))},this.handleBalloonHide=t=>{const e=this.getBookmarkAnchor(t);e&&(this.getBookmarkNodeByAnchor(e)===this.openPopoverNode&&(this.openPopoverNode=null),e.classList.remove(G.SELECTED_CLASS))}}doRender(t,e,o){return o&&!1!==o.editable?this.renderEditableBookmark(t,e,o):this.renderReadonlyBookmark(t,e)}injectRTEScopeStyles(){return["a.rte-bookmark{display: inline-block; vertical-align: middle; line-height: 0; cursor: pointer; padding: 0; margin: 0; border-radius: 2px}","a.rte-bookmark.rte-bookmark-readonly{cursor: default}","a.rte-bookmark > vega-rich-text-bookmark-editor{position: absolute; width: 0; height: 0}","a.rte-bookmark .rte-bookmark__icon{display: inline-block; position: relative; top: -0.125em; vertical-align: middle; line-height: 0; height: 1em; width: 1em}","a.rte-bookmark svg{display: block; height: 100%; width: 100%}",`a.rte-bookmark.${G.SELECTED_CLASS}{color: rgba(var(--v-bg-action, 19,98,226,1))}`].join("\n")}teardownRangeHighlight(t){var e,o;const n=null!==(e=this.rangeHighlightHandlers.get(t))&&void 0!==e?e:null;n&&(null===(o=O())||void 0===o||o.removeEventListener("selectionchange",n),this.rangeHighlightHandlers.delete(t))}renderReadonlyBookmark(t,e){return t("a",{key:e.id,id:e.name,class:"rte-bookmark rte-bookmark-readonly",title:e.name},[this.renderIcon(t)])}renderEditableBookmark(t,e,o){const n=this.useRef(e);let r=null,i=null;return this.ensureRangeHighlight(o.host),t("a",{key:e.id,id:e.name,class:"rte-bookmark",contenteditable:"false",role:"button",tabIndex:0,"aria-label":`${R.t("Bookmark")}: ${e.name}`,title:e.name,onKeyDown:S(),onMouseDown:t=>t.preventDefault(),onClick:()=>{i&&(i.reservedNames=this.getReservedNames(e,o)),this.placeCaretAfterBookmark(e,o)},ref:t=>{t?(r=t,n(t)):null==i||i.hide()}},[this.renderIcon(t),t("vega-rich-text-bookmark-editor",{mode:"preview",name:e.name,ref:t=>{t&&(i=t,r&&t.target!==r&&(t.target=r),this.bindSelectedStateToBalloon(t),A.addUniqueObserverToNode(t,E,(t=>{this.handleChange(t,e,o)})))}})])}renderIcon(t){return t("span",{class:"rte-bookmark__icon"},[t("svg",{viewBox:"0 0 384 512","aria-hidden":"true",focusable:"false"},[t("path",{fill:"currentColor",d:V})])])}placeCaretAfterBookmark(t,e){var o;null===(o=e.host)||void 0===o||o.value.apply(new y(t,t.getRangeEndOffset(),!0))}bindSelectedStateToBalloon(t){t.removeEventListener("vegaPopoverShow",this.handleBalloonShow),t.removeEventListener("vegaPopoverHide",this.handleBalloonHide),t.addEventListener("vegaPopoverShow",this.handleBalloonShow),t.addEventListener("vegaPopoverHide",this.handleBalloonHide)}ensureRangeHighlight(t){const e=O();if(!t||!e||this.rangeHighlightHandlers.has(t))return;const o=N((()=>this.syncRangeHighlight(t)),30,this);this.rangeHighlightHandlers.set(t,o),e.addEventListener("selectionchange",o)}syncRangeHighlight(t){var e;const o=null===(e=this.getExtensionContext(t))||void 0===e?void 0:e.getSelection(),n=o&&o.rangeCount>0?o.getRangeAt(0):null;W(t.value).forEach((t=>{const e=c.getDOMByEntity(t);if(e){const o=!!n&&!n.collapsed&&n.intersectsNode(e);e.classList.toggle(G.SELECTED_CLASS,o||t===this.openPopoverNode)}}))}getBookmarkAnchor(t){var e;return null===(e=t.currentTarget)||void 0===e?void 0:e.closest("a.rte-bookmark")}getBookmarkNodeByAnchor(t){const e=c.getEntityByDOM(t);return e instanceof I?e:null}getReservedNames(t,e){var o;return W(null===(o=e.host)||void 0===o?void 0:o.value).filter((e=>e!==t)).map((t=>t.name))}handleChange(t,e,o){var n;const r=o.host;if(r)return"save"===t.detail.action?(e.apply(new U(t.detail.name)),void(null===(n=this.getExtensionContext(r))||void 0===n||n.flushValue(r.value))):void this.removeBookmark(e,r)}removeBookmark(t,e){var o,n,r,i;const a=null!==(n=null===(o=t.parent)||void 0===o?void 0:o.children)&&void 0!==n?n:[],l=a.indexOf(t),d=l>=0?a[l+1]:null,c=l>0?a[l-1]:null;null===(r=t.parent)||void 0===r||r.apply(new s(t)),null===(i=this.getExtensionContext(e))||void 0===i||i.flushValue(e.value),d?e.value.apply(new y(d,0,!0)):c&&e.value.apply(new y(c,c.getRangeEndOffset(),!0))}}G.typeName="RTEBookmarkNodeRenderer",G.SELECTED_CLASS="rte-bookmark-selected";class J extends _{constructor(){super(...arguments),this.editorRef=null,this.buttonWrapperRef=null,this.pendingRange=null}render(t,e){return t("vega-rich-text-bookmark-editor",{mode:"insert",name:"",ref:t=>{t&&(this.editorRef=t,this.syncPopoverTarget(),A.addUniqueObserverToNode(t,E,(t=>{this.handleEditorChange(t,e)})))}},[t("div",{ref:t=>{t&&(this.buttonWrapperRef=t,this.syncPopoverTarget())}},[this.renderButton(t,e,{icon:"rte-bookmark",tooltip:{text:R.t("Bookmark")}})])])}isDisabled(t){let e=super.isDisabled(t);const o=this.getExtensionContext(t.host);if(o){const{getSelectedNodes:t}=o,[n]=t();n&&(e||(e=!h.canHandle("INSERT_BOOKMARK_NODE",n.parent)))}return e}handleButtonClick(t){this.pendingRange=t.rteRange.clone(),this.editorRef&&(this.editorRef.reservedNames=q(t.host.value),this.editorRef.show())}handleDropdownClick(){}syncPopoverTarget(){this.editorRef&&this.buttonWrapperRef&&this.editorRef.target!==this.buttonWrapperRef&&(this.editorRef.target=this.buttonWrapperRef)}handleEditorChange(t,e){if("save"!==t.detail.action)return;const o=this.pendingRange,n=null==o?void 0:o.startNode;if(!(null==n?void 0:n.parent))return;const r=new $(o,t.detail.name);if(n.parent.apply(r),r.actionHandleResult){const t=this.getExtensionContext(e.host);null==t||t.flushValue(t.host.value)}this.pendingRange=null}}j.register({"rte-bookmark":z});const F=new class extends x{canHandle(t,e){return this.isBookmarkAnchor(t[e])?1:0}handle(t){const e=this.resolveBookmarkName(t[0]);return e?{id:w(),type:"bookmark",text:"",name:e}:null}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isBookmarkAnchor(t){return!!t&&"A"===t.nodeName&&!t.hasAttribute("href")&&this.isEmptyAnchor(t)&&!!this.resolveBookmarkName(t)}resolveBookmarkName(t){return(t.getAttribute("id")||t.getAttribute("name")||"").trim()}isEmptyAnchor(t){return 0===(t.textContent||"").trim().length&&0===t.children.length}};class Q extends g{constructor(){super(),this.bookmarkRenderer=new G,this.registerNode("bookmark",I),this.registerRenderer("bookmark",this.bookmarkRenderer),this.registerElementToNodeDTOClassStrategy(F)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer(Q.TOOLBAR_BUTTON_KEY,new J,t)}destroyExtension(){var t;const e=null===(t=this.extensionContext)||void 0===t?void 0:t.host;e&&this.bookmarkRenderer.teardownRangeHighlight(e)}}(()=>{const t=new L;g.registerActionHandleStrategy(u.typeName,"INSERT_BOOKMARK_NODE",t),g.registerActionHandleStrategy(v.typeName,"INSERT_BOOKMARK_NODE",t),g.registerActionHandleStrategy(I.typeName,"UPDATE_BOOKMARK_NAME",new P);const e=new T;g.registerActionHandlerInterceptor(u.typeName,d.DELETE_BLOCK_CONTENT,e),g.registerActionHandlerInterceptor(v.typeName,d.DELETE_BLOCK_CONTENT,e)})(),Q.TOOLBAR_BUTTON_KEY="bookmark";class X extends l{constructor(t,e){super(),this.type=d.REPLACE_SELECTED_TEXT,this.textToBeInsert="",this.textToBeInsert=t,this.currentRange=e}}const Y=new Set(["address","article","aside","blockquote","dd","details","dialog","div","dl","dt","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","li","main","nav","ol","p","pre","section","table","tbody","tfoot","thead","tr","ul"]),Z=new Set(["block","flex","grid","table","list-item","flow-root"]),tt=new Set(["pre","pre-wrap","break-spaces"]);function et(t,e,o=!1){let n="";return t.childNodes.forEach((t=>{var r,i,s;if(t.nodeType===Node.TEXT_NODE){const s=null!==(r=t.textContent)&&void 0!==r?r:"";if(e)return void(n+=s.replace(/ /g,m).replace(/\t/g,f));const a=t.parentElement,l=Array.from(null!==(i=null==a?void 0:a.children)&&void 0!==i?i:[]).some((t=>Y.has(t.tagName.toLowerCase())));if(!/\S/.test(s)&&l)return;return void(n+=s.replace(o?/[^\S\u00A0\n]*\n[^\S\u00A0\n]*/g:/[^\S\u00A0]*\n[^\S\u00A0]*/g,o?"\n":" "))}if(t.nodeType!==Node.ELEMENT_NODE)return;const a=t,l=a.tagName.toLowerCase();if("br"===l)return void(n+="\n");if("img"===l)return void(n+=null!==(s=a.getAttribute("alt"))&&void 0!==s?s:"");const d=function(t){var e,o,n;const r=t.tagName.toLowerCase();return"vega-code-block"===r?null!==(o=null!==(e=t.getAttribute("data-content"))&&void 0!==e?e:t.textContent)&&void 0!==o?o:"":"pre"!==r&&"code"!==r||!t.hasAttribute("data-language")?null:null!==(n=t.textContent)&&void 0!==n?n:""}(a);if(null!==d){const t=d.replace(/ /g,m).replace(/\t/g,f);return""===n||n.endsWith("\n")||(n+="\n"),n+=t,void(""!==t&&n.endsWith("\n")||(n+="\n"))}if(Y.has(l)||function(t){const e=t.style;return!!e&&Z.has(e.display)}(a)){const t=et(a,e||"pre"===l,o);if("li"===l&&""===t.trim()||"div"===l&&""===t&&null===a.querySelector("img"))return;return""===n||n.endsWith("\n")||(n+="\n"),n+=t,void(""!==t&&n.endsWith("\n")||(n+="\n"))}if("td"!==l&&"th"!==l)n+=et(a,e||"pre"===l,o||function(t){const e=t.style;return!!e&&tt.has(e.whiteSpace)}(a));else{const t=et(a,e,!0).replace(/\t+/g," ").replace(/^\n+|\n+$/g,"");n+=`${t}\n`}})),n}function ot(t,e={}){if(!t)return"";const o=(new DOMParser).parseFromString(t,"text/html");if(!o.body)return"";const n=p(et(o.body,!1)).map((t=>t.trim())).join("\n").replace(e.preserveBoundaryBlankLines?/\n$/:/^\n+|\n+$/g,"");return e.keepPreservedWhitespaceMarkers?n:n.split(m).join(" ").split(f).join("\t")}function nt(t){return/<table[\s/>]/i.test(t)}class rt extends g{constructor(t={}){super(),this.config=t}prepareBeforeLoad(t){rt.configStore.set(t,this.config)}destroyExtension(){var t;(null===(t=this.extensionContext)||void 0===t?void 0:t.host)&&rt.configStore.delete(this.extensionContext.host)}}rt.configStore=rt.createStateStore();export{C as A,H as I,X as R,Q as V,rt as a,_ as b,ot as c,z as d,q as e,nt as h}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as n,g as s}from"./p-6b2342e0.js";import{I as o}from"./p-abd7aeaa.js";import{M as a,a as r}from"./p-f0ff4463.js";import{M as l,a as p}from"./p-cdbbdcc2.js";import{R as c}from"./p-8bc15ed0.js";import{s as h}from"./p-519a7d55.js";import{C as d}from"./p-75b58efe.js";import{c as u,V as f,M as g,I as v}from"./p-6e1ab235.js";import{s as m}from"./p-6bd5c49b.js";import{V as x,I as b}from"./p-5c8e4e8f.js";import{F as w}from"./p-a9fc4043.js";import{c as y}from"./p-3b6a6f08.js";import{b as C,E as j,d as k,c as I,M as R,N as S,O,P as z,Q as D}from"./p-a83cef5a.js";import{S as E}from"./p-261cf764.js";import{S as V}from"./p-e84c2589.js";import{i as M}from"./p-fdbdf12f.js";import{S as T}from"./p-1b2e5898.js";import{i as L}from"./p-d27ae9ff.js";import{d as F}from"./p-a841cf13.js";import{o as N,p as A,q as P,m as B}from"./p-53e3f259.js";import{D as $,d as _}from"./p-36a57431.js";import{P as U}from"./p-81dd00d0.js";import{S as W}from"./p-7d3419c7.js";import{V as K}from"./p-44245a36.js";import{c as q}from"./p-8387896e.js";import{C as H}from"./p-2d0d575f.js";import{g as G}from"./p-8b5d3a52.js";import{F as Q}from"./p-cb378636.js";import{C as X}from"./p-8187878e.js";import{V as Y}from"./p-6db1b9ac.js";import{A as J}from"./p-68744e7e.js";import{M as Z}from"./p-78a57a17.js";import"./p-262ec334.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-6a334573.js";import"./p-affb40e8.js";import"./p-cc569b54.js";import"./p-b75ee3ba.js";import"./p-71909102.js";import"./p-52b8f2d2.js";import"./p-29584bb5.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-361f8996.js";import"./p-49a2e141.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";const tt=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class et extends o{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=tt.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class it extends f{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);o>3&&a&&Object.defineProperty(e,i,a)}([u()],it.prototype,"disableCopyPaste",void 0);var nt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class st extends f{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16","aria-hidden":"true"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}nt([u()],st.prototype,"host",void 0),nt([u()],st.prototype,"prefixIcon",void 0);class ot extends V{constructor(t=!1){super(),this.overrideValue=t}format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),s=i.substring(0,e),o=(n.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-o)}}class at extends V{constructor(t,e=!1){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.overrideValue=e,this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(M(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class rt extends V{constructor(t,e=!1,i=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e,this.overrideValue=i}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(M(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class lt extends at{constructor(t,e=!1){super(t,e)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),s=t.substring(0,e),o=n.substring(0,e),a=(s.match(/,/g)||[]).length;return e+((o.match(/,/g)||[]).length-a)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",s=Number(e.split(".")[0]);return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s.toLocaleString("en-US")+n:e}}var pt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ct extends T{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRenderer.getInputRef(),this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}connectedCallback(){this.initSetupMaskConfigObserver()}disconnectedCallback(){this.removeSetupMaskConfigObserver()}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.setup()}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=E.getPhoneMaskStrategy(e.overrideValue);break;case"taxId":i=E.getTaxIdMaskStrategy(e.overrideValue);break;case"zipcode":i=E.getZipcodeMaskStrategy(e.overrideValue);break;case"thousand-comma":i=new ot(e.overrideValue);break;case"number":i=this.getNumberTypeMaskStrategy(e.options,e.overrideValue);break;case"custom":i=e.strategy?e.strategy():new E(e.options,e.overrideValue);break;case"custom-formatter":i=new rt(e.formatter,e.resetCaretPosition,e.overrideValue)}return"number"!==this.type||"input"!==t||e||(i=new at({},null==e?void 0:e.overrideValue)),i}getNumberTypeMaskStrategy(t,e=!1){return t&&t.thousandComma?new lt(t,e):new at(t,e)}isBlurModeMaskConfig(t){return"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return L(i,n,!0,((t,e)=>F(t,e)?0:-1))}initSetupMaskConfigObserver(){$.addUniqueObserverToNode(this.host,N,this.setup.bind(this))}removeSetupMaskConfigObserver(){$.removeUniqueObserverFromNode(this.host,N)}}pt([u()],ct.prototype,"maskConfig",void 0),pt([u()],ct.prototype,"disableCopyPaste",void 0),pt([u()],ct.prototype,"type",void 0),pt([u()],ct.prototype,"inputRenderer",void 0),pt([g("connectedCallback")],ct.prototype,"connectedCallback",null),pt([g("disconnectedCallback")],ct.prototype,"disconnectedCallback",null),pt([g("watchValue")],ct.prototype,"watchValue",null),pt([g("watchMaskChange")],ct.prototype,"watchMaskChange",null),pt([g("watchTypeChange")],ct.prototype,"watchTypeChange",null);const ht=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var dt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ut extends f{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}dt([u()],ut.prototype,"host",void 0),dt([u()],ut.prototype,"value",void 0),dt([u()],ut.prototype,"placeholder",void 0),dt([u()],ut.prototype,"isCompactInputWidth",void 0),dt([u()],ut.prototype,"suffixText",void 0),dt([g("componentDidLoad")],ut.prototype,"componentDidLoad",null),dt([g("watchValue")],ut.prototype,"watchValue",null),dt([g("watchSuffixText")],ut.prototype,"watchSuffixText",null);var ft=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class gt extends W{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}ft([u()],gt.prototype,"host",void 0),ft([u({writable:!0})],gt.prototype,"isCompactInputWidth",void 0);var vt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class mt extends f{render(){return t("vega-button-circle",{icon:K.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){$.addUniqueObserverToNode(t,C,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}K.register({eye:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>'},"eye-slash":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>'}}),vt([u()],mt.prototype,"host",void 0),vt([u({writable:!0})],mt.prototype,"isPasswordDisplay",void 0),vt([u()],mt.prototype,"type",void 0);var xt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class bt extends f{constructor(){super(...arguments),this.prefixTextId=G(),this.suffixTextId=G(),this.renderPrefixText=()=>this.prefixText&&t("div",{id:this.prefixTextId,class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{id:this.suffixTextId,class:"suffix-text"},this.suffixText),this.onClickClearIcon=()=>{H.notify(_.getSubject(this.host,A),"")},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onContainerClick=()=>{H.notify(_.getSubject(this.host,P),{})}}getInputContainerRef(){return this.inputContainerRef}getPrefixTextId(){return this.prefixText&&this.prefixTextId}getSuffixTextId(){return this.suffixText&&this.suffixTextId}render(){return t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:{"vega-input-container":!0,"with-value":!!this.value,[`vega-input-size-${this.size}`]:!0,"vega-input-disabled":this.disabled,"compact-input-width":this.isCompactInputWidth},onClick:this.onContainerClick,"aria-disabled":this.disabled?"true":void 0,onKeyDown:q()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.inputRenderer.render(),this.renderSuffixText(),"password"===this.type?this.passwordEyeRenderer.render():this.showClearIcon&&this.renderClearIcon())}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:this.disabled?-1:0,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:q(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}xt([u()],bt.prototype,"host",void 0),xt([u()],bt.prototype,"value",void 0),xt([u()],bt.prototype,"size",void 0),xt([u()],bt.prototype,"disabled",void 0),xt([u()],bt.prototype,"type",void 0),xt([u()],bt.prototype,"showClearIcon",void 0),xt([u()],bt.prototype,"prefixText",void 0),xt([u()],bt.prototype,"suffixText",void 0),xt([u()],bt.prototype,"isCompactInputWidth",void 0),xt([u()],bt.prototype,"prefixSlotRenderer",void 0),xt([u()],bt.prototype,"passwordEyeRenderer",void 0),xt([u()],bt.prototype,"inputRenderer",void 0);var wt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class yt extends f{constructor(){super(...arguments),this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.notifySetupMaskConfig())},this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.handleInputPaste=t=>{this.pasteEventEmitter.emit(t.clipboardData).defaultPrevented&&t.preventDefault()},this.onInputHandler=()=>{"change"!==this.valueUpdateTrigger&&this.notifyInputValueChange()},this.inputChangeHandler=()=>{"change"===this.valueUpdateTrigger&&this.notifyInputValueChange()}}connectedCallback(){this.initInputFocusObserver()}disconnectedCallback(){this.removeInputFocusObserver()}doFocus(){this.focusInput()}doBlur(){this.inputRef.blur()}getInputRef(){return this.inputRef}render(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:this.getInputType(),autoComplete:this.autocomplete,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,readOnly:this.readOnly,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,minLength:this.minLength,maxLength:this.maxLength,"aria-describedby":this.getAriaDescribedBy(),onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler,onPaste:t=>this.handleInputPaste(t)},this.copyPasteController.getCopyPasteProps())))}getAriaDescribedBy(){const t=[this.inputContainerRenderer.getPrefixTextId(),this.inputContainerRenderer.getSuffixTextId()].filter(Boolean);return t.length>0?t.join(" "):void 0}getInputType(){switch(this.type){case"number":return"text";case"password":return this.isPasswordDisplay?"text":"password";default:return this.type}}notifyInputValueChange(){this.inputRef.value!==this.value&&this.nativeInputChangeEventEmitter.emit(this.inputRef.value),H.notify(_.getSubject(this.host,A),this.inputRef.value)}notifySetupMaskConfig(){H.notify(_.getSubject(this.host,N),{})}initInputFocusObserver(){$.addUniqueObserverToNode(this.host,P,this.focusInput.bind(this))}removeInputFocusObserver(){$.removeUniqueObserverFromNode(this.host,P)}focusInput(){this.inputRef.focus()}}wt([u()],yt.prototype,"host",void 0),wt([u()],yt.prototype,"value",void 0),wt([u()],yt.prototype,"disabled",void 0),wt([u()],yt.prototype,"type",void 0),wt([u()],yt.prototype,"name",void 0),wt([u()],yt.prototype,"autocomplete",void 0),wt([u()],yt.prototype,"inputmode",void 0),wt([u()],yt.prototype,"enterkeyhint",void 0),wt([u()],yt.prototype,"readOnly",void 0),wt([u()],yt.prototype,"placeholder",void 0),wt([u()],yt.prototype,"minLength",void 0),wt([u()],yt.prototype,"maxLength",void 0),wt([u()],yt.prototype,"isPasswordDisplay",void 0),wt([u()],yt.prototype,"valueUpdateTrigger",void 0),wt([u()],yt.prototype,"focusEventEmitter",void 0),wt([u()],yt.prototype,"blurEventEmitter",void 0),wt([u()],yt.prototype,"pasteEventEmitter",void 0),wt([u()],yt.prototype,"copyPasteController",void 0),wt([u()],yt.prototype,"nativeInputChangeEventEmitter",void 0),wt([u()],yt.prototype,"inputContainerRenderer",void 0),wt([g("connectedCallback")],yt.prototype,"connectedCallback",null),wt([g("disconnectedCallback")],yt.prototype,"disconnectedCallback",null),wt([g("doFocus")],yt.prototype,"doFocus",null),wt([g("doBlur")],yt.prototype,"doBlur",null);var Ct=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class jt extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{H.notify(_.getSubject(this.host,P),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.renderInputContainer(),this.renderHintDom())}renderInputContainer(){return this.renderModeController.isSource()||this.renderModeController.isTemplate()?this.inputSuggestionsRenderer.render(this.inputContainerRenderer.render()):this.inputContainerRenderer.render()}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,optional:this.optional,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{$.addUniqueObserverToNode(t,j,this.handleLabelButtonClick),$.addUniqueObserverToNode(t,C,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}Ct([u()],jt.prototype,"host",void 0),Ct([u()],jt.prototype,"disabled",void 0),Ct([u()],jt.prototype,"required",void 0),Ct([u()],jt.prototype,"label",void 0),Ct([u()],jt.prototype,"hint",void 0),Ct([u()],jt.prototype,"labelSuffixButtonProps",void 0),Ct([u()],jt.prototype,"labelSuffixButtonConfig",void 0),Ct([u()],jt.prototype,"optional",void 0),Ct([u()],jt.prototype,"labelButtonClickEventEmitter",void 0),Ct([u()],jt.prototype,"inputContainerRenderer",void 0),Ct([u()],jt.prototype,"inputSuggestionsRenderer",void 0),Ct([u()],jt.prototype,"renderModeController",void 0);var kt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class It extends f{connectedCallback(){this.initValueUpdateObserver()}disconnectedCallback(){this.removeValueUpdateObserver()}watchValue(t){this.changeEventEmitter.emit(t);const e=this.inputRenderer.getInputRef();e.value!==this.value&&(e.value=this.value),H.notify(Q,{host:this.host,detail:this.value})}initValueUpdateObserver(){$.addUniqueObserverToNode(this.host,A,this.setValue.bind(this))}removeValueUpdateObserver(){$.removeUniqueObserverFromNode(this.host,A)}setValue(t){this.value=t}}kt([u()],It.prototype,"host",void 0),kt([u({writable:!0})],It.prototype,"value",void 0),kt([u()],It.prototype,"changeEventEmitter",void 0),kt([u()],It.prototype,"inputRenderer",void 0),kt([g("connectedCallback")],It.prototype,"connectedCallback",null),kt([g("disconnectedCallback")],It.prototype,"disconnectedCallback",null),kt([g("watchValue")],It.prototype,"watchValue",null);var Rt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class St extends f{constructor(){super(...arguments),this.templateItems=[],this.onDropdownItemClick=async t=>{const e=this.renderModeController.isTemplate()?this.templateItems:this.suggestionsDropdownSource,i=this.findItem(e,t.detail);if(i){const t=this.suggestionItemClickEventEmitter.emit(i);H.notify(_.getSubject(this.host,A),t.defaultPrevented?this.value:i.label)}}}appendHostItemsToDropdown(){this.renderModeController.isTemplate()&&this.itemsSlotRef&&this.dropdownRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(this.host.querySelector("[slot=items]")))}async showSuggestionsDropdown(t={}){this.suggestionsDropdownConfig=Object.assign(Object.assign(Object.assign({},Y),{placement:["top","bottom"]}),t),this.dropdownRef&&Object.assign(this.dropdownRef,this.suggestionsDropdownConfig),await this.showSuggestions()}async hideSuggestionsDropdown(){await this.dropdownRef.hide()}async watchValue(){await this.searchSuggestions()}async watchSuggestionsDropdownSource(){await this.searchSuggestions()}render(e){return t("vega-dropdown",Object.assign({},this.suggestionsDropdownConfig,{source:this.suggestionsDropdownSource,trigger:new X,matchTargetWidth:!0,searchable:!1,translocation:{X:0,Y:6},ref:t=>{this.dropdownRef=t,this.addDropdownObserver(t)},style:{display:"block"}}),e,this.renderItemsSlot())}renderItemsSlot(){return this.renderModeController.isTemplate()&&t("div",{slot:"items",ref:t=>{this.itemsSlotRef=t}})}addDropdownObserver(t){$.addUniqueObserverToNode(t,k,this.onDropdownItemClick.bind(this)),$.addUniqueObserverToNode(t,B,(t=>{this.templateItems=Array.from(t).map((t=>({key:t.itemKey,label:t.label})))}))}findItem(t,e){for(const i of t){if(i.children&&i.children.length>0){const t=this.findItem(i.children,e);if(t)return t}if(i.key.toString()===e)return i}return null}async showSuggestions(){this.dropdownRef&&(this.renderModeController.isSource()||this.renderModeController.isTemplate())&&await this.dropdownRef.show()}async searchSuggestions(){this.dropdownRef&&this.renderModeController.isSource()&&this.suggestionsDropdownSource.length>0&&await this.dropdownRef.search(this.value)}}Rt([u()],St.prototype,"host",void 0),Rt([u()],St.prototype,"value",void 0),Rt([u({writable:!0})],St.prototype,"suggestionsDropdownConfig",void 0),Rt([u()],St.prototype,"suggestionsDropdownSource",void 0),Rt([u()],St.prototype,"renderModeController",void 0),Rt([u()],St.prototype,"suggestionItemClickEventEmitter",void 0),Rt([g("componentDidLoad")],St.prototype,"appendHostItemsToDropdown",null),Rt([g("showSuggestionsDropdown")],St.prototype,"showSuggestionsDropdown",null),Rt([g("hideSuggestionsDropdown")],St.prototype,"hideSuggestionsDropdown",null),Rt([g("watchValue")],St.prototype,"watchValue",null),Rt([g("watchSuggestionsDropdownSource")],St.prototype,"watchSuggestionsDropdownSource",null);var Ot=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class zt extends f{constructor(){super(...arguments),this.hasItemsSlot=!1}connectedCallback(){this.setRenderMode()}isSource(){return Array.isArray(this.suggestionsDropdownSource)}isTemplate(){return this.hasItemsSlot}setRenderMode(){this.hasItemsSlot=!!this.host.querySelector("[slot=items]")}}Ot([u()],zt.prototype,"host",void 0),Ot([u()],zt.prototype,"suggestionsDropdownSource",void 0),Ot([g("connectedCallback")],zt.prototype,"connectedCallback",null);var Dt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Et extends Z{constructor(t){super({options:{attributes:!0,attributeFilter:[Et.OBSERVED_ATTRIBUTE]},callback:()=>{this.performMapping()}}),this.targetGetter=t}componentDidLoad(){this.performMapping(),super.componentDidLoad&&super.componentDidLoad()}componentDidRender(){this.performMapping()}performMapping(){const t=this.targetGetter?this.targetGetter():null;if(!t)return;const e=this.host.getAttribute(Et.OBSERVED_ATTRIBUTE);if(this.shouldRemoveTabIndex(e))return void t.removeAttribute("tabindex");const i=String(e);t.getAttribute("tabindex")!==i&&t.setAttribute("tabindex",i)}shouldRemoveTabIndex(t){if(null==t)return!0;const e=String(t).trim().toLowerCase();return""===e||"null"===e||"undefined"===e}}Et.OBSERVED_ATTRIBUTE="data-tabindex",Dt([g("componentDidLoad")],Et.prototype,"componentDidLoad",null),Dt([g("componentDidRender")],Et.prototype,"componentDidRender",null);var Vt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};const Mt=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaNativeInputChange=i(this,"vegaNativeInputChange",7),this.nativeInputChange=i(this,"nativeInputChange",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.vegaPaste=i(this,"vegaPaste",7),this.paste=i(this,"paste",7),this.vegaSuggestionItemClick=i(this,"vegaSuggestionItemClick",7),this.suggestionItemClick=i(this,"suggestionItemClick",7),this.globalSlimmers=new Map,this.ariaAttributesValueMapper=new J((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","label"],defaultValue:"No label defined"},"aria-hidden":{dependency:["data-aria-hidden"],defaultValue:null}}),this.dataTabIndexValueMapper=new Et((()=>this.host.shadowRoot.querySelector("input"))),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new a({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new l({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new p({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new et:null},{propertyName:"type",ruleFactory:t=>"email"===t?new et:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new U({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.renderModeController=new zt,this.copyPasteController=new it,this.compactWidthController=new ut,this.stateController=new gt,this.maskConfigController=new ct,this.valueController=new It,this.prefixSlotRenderer=new st,this.renderer=new jt,this.inputContainerRenderer=new bt,this.inputRenderer=new yt,this.inputSuggestionsRenderer=new St,this.changeEventEmitter=y(Mt,I),this.nativeInputChangeEventEmitter=y(Mt,R),this.focusEventEmitter=y(Mt,S),this.blurEventEmitter=y(Mt,O),this.labelButtonClickEventEmitter=y(Mt,j),this.suggestionItemClickEventEmitter=y(Mt,z),this.pasteEventEmitter=y(Mt,D),this.vegaComponentUsageRuntimeMetricsSlimmer=new x(ht),this.passwordEyeRenderer=new mt,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.readOnly=!1,this.email=!1,this.required=!1,this.optional=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1}watchValue(t){}watchTypeChange(t,e){}watchValidationRules(){}watchMaskChange(t,e){}watchSuffixText(){}watchSuggestionsDropdownSource(){}async doFocus(){}async doBlur(){}async showSuggestionsDropdown(t){}async hideSuggestionsDropdown(){}render(){return m(t("slot",null)),h(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.renderer.render()),this.host)}get host(){return s(this)}static get watchers(){return{value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"],suffixText:["watchSuffixText"],suggestionsDropdownSource:["watchSuggestionsDropdownSource"]}}};Vt([b()],Mt.prototype,"globalSlimmers",void 0),Vt([v()],Mt.prototype,"ariaAttributesValueMapper",void 0),Vt([v()],Mt.prototype,"dataTabIndexValueMapper",void 0),Vt([v()],Mt.prototype,"formFieldController",void 0),Vt([v()],Mt.prototype,"pageResizeObserverSlimmer",void 0),Vt([v()],Mt.prototype,"renderModeController",void 0),Vt([v()],Mt.prototype,"copyPasteController",void 0),Vt([v()],Mt.prototype,"compactWidthController",void 0),Vt([v()],Mt.prototype,"stateController",void 0),Vt([v()],Mt.prototype,"maskConfigController",void 0),Vt([v()],Mt.prototype,"valueController",void 0),Vt([v()],Mt.prototype,"prefixSlotRenderer",void 0),Vt([v()],Mt.prototype,"renderer",void 0),Vt([v()],Mt.prototype,"inputContainerRenderer",void 0),Vt([v()],Mt.prototype,"inputRenderer",void 0),Vt([v()],Mt.prototype,"inputSuggestionsRenderer",void 0),Vt([v()],Mt.prototype,"changeEventEmitter",void 0),Vt([v()],Mt.prototype,"nativeInputChangeEventEmitter",void 0),Vt([v()],Mt.prototype,"focusEventEmitter",void 0),Vt([v()],Mt.prototype,"blurEventEmitter",void 0),Vt([v()],Mt.prototype,"labelButtonClickEventEmitter",void 0),Vt([v()],Mt.prototype,"suggestionItemClickEventEmitter",void 0),Vt([v()],Mt.prototype,"pasteEventEmitter",void 0),Vt([v()],Mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Vt([v()],Mt.prototype,"passwordEyeRenderer",void 0),Vt([d()],Mt.prototype,"watchMaskChange",null),Mt.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-container.error .vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));font-feature-settings:"calt" 0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=password]::-ms-reveal{display:none}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-container .password-eye-button{width:16px;height:16px}.vega-input-container .password-eye-button::part(button){width:16px;height:16px;padding:0px}.vega-input-container .password-eye-button::part(button):hover{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}@supports (-webkit-touch-callout: none){:host([data-vega-form=pageSelectorMobile_goTo]) .vega-input-container input{box-sizing:border-box;padding-left:0px;padding-right:0px}}';export{Mt as vega_input}
|
|
1
|
+
import{h as t,r as e,c as i,H as n,g as s}from"./p-6b2342e0.js";import{I as o}from"./p-abd7aeaa.js";import{M as a,a as r}from"./p-f0ff4463.js";import{M as l,a as p}from"./p-cdbbdcc2.js";import{R as c}from"./p-8bc15ed0.js";import{s as h}from"./p-519a7d55.js";import{C as d}from"./p-75b58efe.js";import{c as u,V as f,M as g,I as v}from"./p-6e1ab235.js";import{s as m}from"./p-6bd5c49b.js";import{V as x,I as b}from"./p-5c8e4e8f.js";import{F as w}from"./p-70a08fe5.js";import{c as y}from"./p-3b6a6f08.js";import{b as C,E as j,d as k,c as I,M as R,N as S,O,P as z,Q as D}from"./p-a83cef5a.js";import{S as E}from"./p-78a2802f.js";import{S as V}from"./p-9b571551.js";import{i as M}from"./p-8e3c1c81.js";import{S as T}from"./p-53c1b195.js";import{i as L}from"./p-d27ae9ff.js";import{d as F}from"./p-a841cf13.js";import{o as N,p as A,q as P,m as B}from"./p-53e3f259.js";import{D as $,d as _}from"./p-36a57431.js";import{P as U}from"./p-81dd00d0.js";import{S as W}from"./p-7d3419c7.js";import{V as K}from"./p-44245a36.js";import{c as q}from"./p-8387896e.js";import{C as H}from"./p-2d0d575f.js";import{g as G}from"./p-8b5d3a52.js";import{F as Q}from"./p-cb378636.js";import{C as X}from"./p-8187878e.js";import{V as Y}from"./p-6db1b9ac.js";import{A as J}from"./p-68744e7e.js";import{M as Z}from"./p-78a57a17.js";import"./p-262ec334.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-6a334573.js";import"./p-347d664e.js";import"./p-cc569b54.js";import"./p-b75ee3ba.js";import"./p-71909102.js";import"./p-52b8f2d2.js";import"./p-29584bb5.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-361f8996.js";import"./p-49a2e141.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";const tt=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class et extends o{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=tt.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class it extends f{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);o>3&&a&&Object.defineProperty(e,i,a)}([u()],it.prototype,"disableCopyPaste",void 0);var nt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class st extends f{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16","aria-hidden":"true"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}nt([u()],st.prototype,"host",void 0),nt([u()],st.prototype,"prefixIcon",void 0);class ot extends V{constructor(t=!1){super(),this.overrideValue=t}format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),s=i.substring(0,e),o=(n.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-o)}}class at extends V{constructor(t,e=!1){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.overrideValue=e,this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(M(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class rt extends V{constructor(t,e=!1,i=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e,this.overrideValue=i}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(M(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class lt extends at{constructor(t,e=!1){super(t,e)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),s=t.substring(0,e),o=n.substring(0,e),a=(s.match(/,/g)||[]).length;return e+((o.match(/,/g)||[]).length-a)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",s=Number(e.split(".")[0]);return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s.toLocaleString("en-US")+n:e}}var pt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ct extends T{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRenderer.getInputRef(),this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}connectedCallback(){this.initSetupMaskConfigObserver()}disconnectedCallback(){this.removeSetupMaskConfigObserver()}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.setup()}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=E.getPhoneMaskStrategy(e.overrideValue);break;case"taxId":i=E.getTaxIdMaskStrategy(e.overrideValue);break;case"zipcode":i=E.getZipcodeMaskStrategy(e.overrideValue);break;case"thousand-comma":i=new ot(e.overrideValue);break;case"number":i=this.getNumberTypeMaskStrategy(e.options,e.overrideValue);break;case"custom":i=e.strategy?e.strategy():new E(e.options,e.overrideValue);break;case"custom-formatter":i=new rt(e.formatter,e.resetCaretPosition,e.overrideValue)}return"number"!==this.type||"input"!==t||e||(i=new at({},null==e?void 0:e.overrideValue)),i}getNumberTypeMaskStrategy(t,e=!1){return t&&t.thousandComma?new lt(t,e):new at(t,e)}isBlurModeMaskConfig(t){return"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return L(i,n,!0,((t,e)=>F(t,e)?0:-1))}initSetupMaskConfigObserver(){$.addUniqueObserverToNode(this.host,N,this.setup.bind(this))}removeSetupMaskConfigObserver(){$.removeUniqueObserverFromNode(this.host,N)}}pt([u()],ct.prototype,"maskConfig",void 0),pt([u()],ct.prototype,"disableCopyPaste",void 0),pt([u()],ct.prototype,"type",void 0),pt([u()],ct.prototype,"inputRenderer",void 0),pt([g("connectedCallback")],ct.prototype,"connectedCallback",null),pt([g("disconnectedCallback")],ct.prototype,"disconnectedCallback",null),pt([g("watchValue")],ct.prototype,"watchValue",null),pt([g("watchMaskChange")],ct.prototype,"watchMaskChange",null),pt([g("watchTypeChange")],ct.prototype,"watchTypeChange",null);const ht=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var dt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ut extends f{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}dt([u()],ut.prototype,"host",void 0),dt([u()],ut.prototype,"value",void 0),dt([u()],ut.prototype,"placeholder",void 0),dt([u()],ut.prototype,"isCompactInputWidth",void 0),dt([u()],ut.prototype,"suffixText",void 0),dt([g("componentDidLoad")],ut.prototype,"componentDidLoad",null),dt([g("watchValue")],ut.prototype,"watchValue",null),dt([g("watchSuffixText")],ut.prototype,"watchSuffixText",null);var ft=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class gt extends W{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}ft([u()],gt.prototype,"host",void 0),ft([u({writable:!0})],gt.prototype,"isCompactInputWidth",void 0);var vt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class mt extends f{render(){return t("vega-button-circle",{icon:K.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){$.addUniqueObserverToNode(t,C,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}K.register({eye:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>'},"eye-slash":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>'}}),vt([u()],mt.prototype,"host",void 0),vt([u({writable:!0})],mt.prototype,"isPasswordDisplay",void 0),vt([u()],mt.prototype,"type",void 0);var xt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class bt extends f{constructor(){super(...arguments),this.prefixTextId=G(),this.suffixTextId=G(),this.renderPrefixText=()=>this.prefixText&&t("div",{id:this.prefixTextId,class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{id:this.suffixTextId,class:"suffix-text"},this.suffixText),this.onClickClearIcon=()=>{H.notify(_.getSubject(this.host,A),"")},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onContainerClick=()=>{H.notify(_.getSubject(this.host,P),{})}}getInputContainerRef(){return this.inputContainerRef}getPrefixTextId(){return this.prefixText&&this.prefixTextId}getSuffixTextId(){return this.suffixText&&this.suffixTextId}render(){return t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:{"vega-input-container":!0,"with-value":!!this.value,[`vega-input-size-${this.size}`]:!0,"vega-input-disabled":this.disabled,"compact-input-width":this.isCompactInputWidth},onClick:this.onContainerClick,"aria-disabled":this.disabled?"true":void 0,onKeyDown:q()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.inputRenderer.render(),this.renderSuffixText(),"password"===this.type?this.passwordEyeRenderer.render():this.showClearIcon&&this.renderClearIcon())}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:this.disabled?-1:0,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:q(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}xt([u()],bt.prototype,"host",void 0),xt([u()],bt.prototype,"value",void 0),xt([u()],bt.prototype,"size",void 0),xt([u()],bt.prototype,"disabled",void 0),xt([u()],bt.prototype,"type",void 0),xt([u()],bt.prototype,"showClearIcon",void 0),xt([u()],bt.prototype,"prefixText",void 0),xt([u()],bt.prototype,"suffixText",void 0),xt([u()],bt.prototype,"isCompactInputWidth",void 0),xt([u()],bt.prototype,"prefixSlotRenderer",void 0),xt([u()],bt.prototype,"passwordEyeRenderer",void 0),xt([u()],bt.prototype,"inputRenderer",void 0);var wt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class yt extends f{constructor(){super(...arguments),this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.notifySetupMaskConfig())},this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.handleInputPaste=t=>{this.pasteEventEmitter.emit(t.clipboardData).defaultPrevented&&t.preventDefault()},this.onInputHandler=()=>{"change"!==this.valueUpdateTrigger&&this.notifyInputValueChange()},this.inputChangeHandler=()=>{"change"===this.valueUpdateTrigger&&this.notifyInputValueChange()}}connectedCallback(){this.initInputFocusObserver()}disconnectedCallback(){this.removeInputFocusObserver()}doFocus(){this.focusInput()}doBlur(){this.inputRef.blur()}getInputRef(){return this.inputRef}render(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:this.getInputType(),autoComplete:this.autocomplete,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,readOnly:this.readOnly,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,minLength:this.minLength,maxLength:this.maxLength,"aria-describedby":this.getAriaDescribedBy(),onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler,onPaste:t=>this.handleInputPaste(t)},this.copyPasteController.getCopyPasteProps())))}getAriaDescribedBy(){const t=[this.inputContainerRenderer.getPrefixTextId(),this.inputContainerRenderer.getSuffixTextId()].filter(Boolean);return t.length>0?t.join(" "):void 0}getInputType(){switch(this.type){case"number":return"text";case"password":return this.isPasswordDisplay?"text":"password";default:return this.type}}notifyInputValueChange(){this.inputRef.value!==this.value&&this.nativeInputChangeEventEmitter.emit(this.inputRef.value),H.notify(_.getSubject(this.host,A),this.inputRef.value)}notifySetupMaskConfig(){H.notify(_.getSubject(this.host,N),{})}initInputFocusObserver(){$.addUniqueObserverToNode(this.host,P,this.focusInput.bind(this))}removeInputFocusObserver(){$.removeUniqueObserverFromNode(this.host,P)}focusInput(){this.inputRef.focus()}}wt([u()],yt.prototype,"host",void 0),wt([u()],yt.prototype,"value",void 0),wt([u()],yt.prototype,"disabled",void 0),wt([u()],yt.prototype,"type",void 0),wt([u()],yt.prototype,"name",void 0),wt([u()],yt.prototype,"autocomplete",void 0),wt([u()],yt.prototype,"inputmode",void 0),wt([u()],yt.prototype,"enterkeyhint",void 0),wt([u()],yt.prototype,"readOnly",void 0),wt([u()],yt.prototype,"placeholder",void 0),wt([u()],yt.prototype,"minLength",void 0),wt([u()],yt.prototype,"maxLength",void 0),wt([u()],yt.prototype,"isPasswordDisplay",void 0),wt([u()],yt.prototype,"valueUpdateTrigger",void 0),wt([u()],yt.prototype,"focusEventEmitter",void 0),wt([u()],yt.prototype,"blurEventEmitter",void 0),wt([u()],yt.prototype,"pasteEventEmitter",void 0),wt([u()],yt.prototype,"copyPasteController",void 0),wt([u()],yt.prototype,"nativeInputChangeEventEmitter",void 0),wt([u()],yt.prototype,"inputContainerRenderer",void 0),wt([g("connectedCallback")],yt.prototype,"connectedCallback",null),wt([g("disconnectedCallback")],yt.prototype,"disconnectedCallback",null),wt([g("doFocus")],yt.prototype,"doFocus",null),wt([g("doBlur")],yt.prototype,"doBlur",null);var Ct=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class jt extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{H.notify(_.getSubject(this.host,P),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.renderInputContainer(),this.renderHintDom())}renderInputContainer(){return this.renderModeController.isSource()||this.renderModeController.isTemplate()?this.inputSuggestionsRenderer.render(this.inputContainerRenderer.render()):this.inputContainerRenderer.render()}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,optional:this.optional,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{$.addUniqueObserverToNode(t,j,this.handleLabelButtonClick),$.addUniqueObserverToNode(t,C,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}Ct([u()],jt.prototype,"host",void 0),Ct([u()],jt.prototype,"disabled",void 0),Ct([u()],jt.prototype,"required",void 0),Ct([u()],jt.prototype,"label",void 0),Ct([u()],jt.prototype,"hint",void 0),Ct([u()],jt.prototype,"labelSuffixButtonProps",void 0),Ct([u()],jt.prototype,"labelSuffixButtonConfig",void 0),Ct([u()],jt.prototype,"optional",void 0),Ct([u()],jt.prototype,"labelButtonClickEventEmitter",void 0),Ct([u()],jt.prototype,"inputContainerRenderer",void 0),Ct([u()],jt.prototype,"inputSuggestionsRenderer",void 0),Ct([u()],jt.prototype,"renderModeController",void 0);var kt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class It extends f{connectedCallback(){this.initValueUpdateObserver()}disconnectedCallback(){this.removeValueUpdateObserver()}watchValue(t){this.changeEventEmitter.emit(t);const e=this.inputRenderer.getInputRef();e.value!==this.value&&(e.value=this.value),H.notify(Q,{host:this.host,detail:this.value})}initValueUpdateObserver(){$.addUniqueObserverToNode(this.host,A,this.setValue.bind(this))}removeValueUpdateObserver(){$.removeUniqueObserverFromNode(this.host,A)}setValue(t){this.value=t}}kt([u()],It.prototype,"host",void 0),kt([u({writable:!0})],It.prototype,"value",void 0),kt([u()],It.prototype,"changeEventEmitter",void 0),kt([u()],It.prototype,"inputRenderer",void 0),kt([g("connectedCallback")],It.prototype,"connectedCallback",null),kt([g("disconnectedCallback")],It.prototype,"disconnectedCallback",null),kt([g("watchValue")],It.prototype,"watchValue",null);var Rt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class St extends f{constructor(){super(...arguments),this.templateItems=[],this.onDropdownItemClick=async t=>{const e=this.renderModeController.isTemplate()?this.templateItems:this.suggestionsDropdownSource,i=this.findItem(e,t.detail);if(i){const t=this.suggestionItemClickEventEmitter.emit(i);H.notify(_.getSubject(this.host,A),t.defaultPrevented?this.value:i.label)}}}appendHostItemsToDropdown(){this.renderModeController.isTemplate()&&this.itemsSlotRef&&this.dropdownRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(this.host.querySelector("[slot=items]")))}async showSuggestionsDropdown(t={}){this.suggestionsDropdownConfig=Object.assign(Object.assign(Object.assign({},Y),{placement:["top","bottom"]}),t),this.dropdownRef&&Object.assign(this.dropdownRef,this.suggestionsDropdownConfig),await this.showSuggestions()}async hideSuggestionsDropdown(){await this.dropdownRef.hide()}async watchValue(){await this.searchSuggestions()}async watchSuggestionsDropdownSource(){await this.searchSuggestions()}render(e){return t("vega-dropdown",Object.assign({},this.suggestionsDropdownConfig,{source:this.suggestionsDropdownSource,trigger:new X,matchTargetWidth:!0,searchable:!1,translocation:{X:0,Y:6},ref:t=>{this.dropdownRef=t,this.addDropdownObserver(t)},style:{display:"block"}}),e,this.renderItemsSlot())}renderItemsSlot(){return this.renderModeController.isTemplate()&&t("div",{slot:"items",ref:t=>{this.itemsSlotRef=t}})}addDropdownObserver(t){$.addUniqueObserverToNode(t,k,this.onDropdownItemClick.bind(this)),$.addUniqueObserverToNode(t,B,(t=>{this.templateItems=Array.from(t).map((t=>({key:t.itemKey,label:t.label})))}))}findItem(t,e){for(const i of t){if(i.children&&i.children.length>0){const t=this.findItem(i.children,e);if(t)return t}if(i.key.toString()===e)return i}return null}async showSuggestions(){this.dropdownRef&&(this.renderModeController.isSource()||this.renderModeController.isTemplate())&&await this.dropdownRef.show()}async searchSuggestions(){this.dropdownRef&&this.renderModeController.isSource()&&this.suggestionsDropdownSource.length>0&&await this.dropdownRef.search(this.value)}}Rt([u()],St.prototype,"host",void 0),Rt([u()],St.prototype,"value",void 0),Rt([u({writable:!0})],St.prototype,"suggestionsDropdownConfig",void 0),Rt([u()],St.prototype,"suggestionsDropdownSource",void 0),Rt([u()],St.prototype,"renderModeController",void 0),Rt([u()],St.prototype,"suggestionItemClickEventEmitter",void 0),Rt([g("componentDidLoad")],St.prototype,"appendHostItemsToDropdown",null),Rt([g("showSuggestionsDropdown")],St.prototype,"showSuggestionsDropdown",null),Rt([g("hideSuggestionsDropdown")],St.prototype,"hideSuggestionsDropdown",null),Rt([g("watchValue")],St.prototype,"watchValue",null),Rt([g("watchSuggestionsDropdownSource")],St.prototype,"watchSuggestionsDropdownSource",null);var Ot=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class zt extends f{constructor(){super(...arguments),this.hasItemsSlot=!1}connectedCallback(){this.setRenderMode()}isSource(){return Array.isArray(this.suggestionsDropdownSource)}isTemplate(){return this.hasItemsSlot}setRenderMode(){this.hasItemsSlot=!!this.host.querySelector("[slot=items]")}}Ot([u()],zt.prototype,"host",void 0),Ot([u()],zt.prototype,"suggestionsDropdownSource",void 0),Ot([g("connectedCallback")],zt.prototype,"connectedCallback",null);var Dt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Et extends Z{constructor(t){super({options:{attributes:!0,attributeFilter:[Et.OBSERVED_ATTRIBUTE]},callback:()=>{this.performMapping()}}),this.targetGetter=t}componentDidLoad(){this.performMapping(),super.componentDidLoad&&super.componentDidLoad()}componentDidRender(){this.performMapping()}performMapping(){const t=this.targetGetter?this.targetGetter():null;if(!t)return;const e=this.host.getAttribute(Et.OBSERVED_ATTRIBUTE);if(this.shouldRemoveTabIndex(e))return void t.removeAttribute("tabindex");const i=String(e);t.getAttribute("tabindex")!==i&&t.setAttribute("tabindex",i)}shouldRemoveTabIndex(t){if(null==t)return!0;const e=String(t).trim().toLowerCase();return""===e||"null"===e||"undefined"===e}}Et.OBSERVED_ATTRIBUTE="data-tabindex",Dt([g("componentDidLoad")],Et.prototype,"componentDidLoad",null),Dt([g("componentDidRender")],Et.prototype,"componentDidRender",null);var Vt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};const Mt=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaNativeInputChange=i(this,"vegaNativeInputChange",7),this.nativeInputChange=i(this,"nativeInputChange",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.vegaPaste=i(this,"vegaPaste",7),this.paste=i(this,"paste",7),this.vegaSuggestionItemClick=i(this,"vegaSuggestionItemClick",7),this.suggestionItemClick=i(this,"suggestionItemClick",7),this.globalSlimmers=new Map,this.ariaAttributesValueMapper=new J((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","label"],defaultValue:"No label defined"},"aria-hidden":{dependency:["data-aria-hidden"],defaultValue:null}}),this.dataTabIndexValueMapper=new Et((()=>this.host.shadowRoot.querySelector("input"))),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new a({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new l({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new p({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new et:null},{propertyName:"type",ruleFactory:t=>"email"===t?new et:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new U({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.renderModeController=new zt,this.copyPasteController=new it,this.compactWidthController=new ut,this.stateController=new gt,this.maskConfigController=new ct,this.valueController=new It,this.prefixSlotRenderer=new st,this.renderer=new jt,this.inputContainerRenderer=new bt,this.inputRenderer=new yt,this.inputSuggestionsRenderer=new St,this.changeEventEmitter=y(Mt,I),this.nativeInputChangeEventEmitter=y(Mt,R),this.focusEventEmitter=y(Mt,S),this.blurEventEmitter=y(Mt,O),this.labelButtonClickEventEmitter=y(Mt,j),this.suggestionItemClickEventEmitter=y(Mt,z),this.pasteEventEmitter=y(Mt,D),this.vegaComponentUsageRuntimeMetricsSlimmer=new x(ht),this.passwordEyeRenderer=new mt,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.readOnly=!1,this.email=!1,this.required=!1,this.optional=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1}watchValue(t){}watchTypeChange(t,e){}watchValidationRules(){}watchMaskChange(t,e){}watchSuffixText(){}watchSuggestionsDropdownSource(){}async doFocus(){}async doBlur(){}async showSuggestionsDropdown(t){}async hideSuggestionsDropdown(){}render(){return m(t("slot",null)),h(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.renderer.render()),this.host)}get host(){return s(this)}static get watchers(){return{value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"],suffixText:["watchSuffixText"],suggestionsDropdownSource:["watchSuggestionsDropdownSource"]}}};Vt([b()],Mt.prototype,"globalSlimmers",void 0),Vt([v()],Mt.prototype,"ariaAttributesValueMapper",void 0),Vt([v()],Mt.prototype,"dataTabIndexValueMapper",void 0),Vt([v()],Mt.prototype,"formFieldController",void 0),Vt([v()],Mt.prototype,"pageResizeObserverSlimmer",void 0),Vt([v()],Mt.prototype,"renderModeController",void 0),Vt([v()],Mt.prototype,"copyPasteController",void 0),Vt([v()],Mt.prototype,"compactWidthController",void 0),Vt([v()],Mt.prototype,"stateController",void 0),Vt([v()],Mt.prototype,"maskConfigController",void 0),Vt([v()],Mt.prototype,"valueController",void 0),Vt([v()],Mt.prototype,"prefixSlotRenderer",void 0),Vt([v()],Mt.prototype,"renderer",void 0),Vt([v()],Mt.prototype,"inputContainerRenderer",void 0),Vt([v()],Mt.prototype,"inputRenderer",void 0),Vt([v()],Mt.prototype,"inputSuggestionsRenderer",void 0),Vt([v()],Mt.prototype,"changeEventEmitter",void 0),Vt([v()],Mt.prototype,"nativeInputChangeEventEmitter",void 0),Vt([v()],Mt.prototype,"focusEventEmitter",void 0),Vt([v()],Mt.prototype,"blurEventEmitter",void 0),Vt([v()],Mt.prototype,"labelButtonClickEventEmitter",void 0),Vt([v()],Mt.prototype,"suggestionItemClickEventEmitter",void 0),Vt([v()],Mt.prototype,"pasteEventEmitter",void 0),Vt([v()],Mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Vt([v()],Mt.prototype,"passwordEyeRenderer",void 0),Vt([d()],Mt.prototype,"watchMaskChange",null),Mt.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-container.error .vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));font-feature-settings:"calt" 0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=password]::-ms-reveal{display:none}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-container .password-eye-button{width:16px;height:16px}.vega-input-container .password-eye-button::part(button){width:16px;height:16px;padding:0px}.vega-input-container .password-eye-button::part(button):hover{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}@supports (-webkit-touch-callout: none){:host([data-vega-form=pageSelectorMobile_goTo]) .vega-input-container input{box-sizing:border-box;padding-left:0px;padding-right:0px}}';export{Mt as vega_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as s,g as a}from"./p-6b2342e0.js";import{C as o}from"./p-2d0d575f.js";import{d as n,e as r,F as l,b as c,a as h,c as d}from"./p-cb378636.js";import{s as m}from"./p-519a7d55.js";import{c as f,M as u,V as v,I as p}from"./p-6e1ab235.js";import{m as b}from"./p-6bd5c49b.js";import{V as g,I as j}from"./p-5c8e4e8f.js";import{c as V}from"./p-3b6a6f08.js";import{C as F}from"./p-abad8ffd.js";import{I as w,J as y,K as C}from"./p-a83cef5a.js";import{c as R}from"./p-b1557bbe.js";import{S as O}from"./p-7d3419c7.js";import{i as S,g as k}from"./p-71909102.js";import{t as E}from"./p-b75ee3ba.js";import{g as M,j as I,h as P}from"./p-53e3f259.js";import{d as B}from"./p-36a57431.js";import{O as N}from"./p-331a62d5.js";import{f as A,c as x,e as D}from"./p-aa135628.js";import{i as $}from"./p-fdbdf12f.js";import{I as H}from"./p-48e3be6a.js";import{C as T}from"./p-6eedbc4f.js";import{d as W}from"./p-d27ae9ff.js";import"./p-6a334573.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-affb40e8.js";import"./p-262ec334.js";var G=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class J extends O{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}G([f()],J.prototype,"host",void 0),G([f({writable:!0})],J.prototype,"disableBlurValidation",void 0);var K=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class U extends v{setValidationStates(t){0!==t.length?t.forEach((t=>{const e=this.getHostByFieldName(t.fieldName);e&&this.updateFieldValidationState(e,{isValid:t.isValid,errorMessage:t.isValid?"":t.errorMessage})})):Array.from(this.host.querySelectorAll("[data-vega-form], [name]")).filter((t=>S(t))).forEach((t=>{this.updateFieldValidationState(t,{isValid:!0})}))}getHostByFieldName(t){const e=t.split(".");let i=this.host;for(const t of e){const e=i.querySelector(`[data-vega-form="${t}"], [name="${t}"]`);if(!S(e))return null;i=e}return i}updateFieldValidationState(t,{isValid:e,errorMessage:i}){t.isValid=e,o.notify(n,{host:t,message:e?"":i,isValid:e}),o.notify(r,{host:t,detail:e})}}K([f()],U.prototype,"host",void 0),K([u("setValidationStates")],U.prototype,"setValidationStates",null);var _=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class q extends v{getNativeFormRef(){return this.nativeFormRef}render(){return t("form",{action:this.action,method:this.method,name:this.name,ref:t=>{t&&(this.nativeFormRef=t)}},t("slot",null))}}_([f()],q.prototype,"method",void 0),_([f()],q.prototype,"action",void 0),_([f()],q.prototype,"name",void 0);var z=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class L extends v{connectedCallback(){this.registerFormSubmitChangeManager()}disconnectedCallback(){this.unregisterFormSubmitChangeManager()}async submitWithFormData(){if(!this.useNativeForm)return;const t=await this.host.getValue();for(const e in t)if("object"==typeof t[e]){const i=this.flattenObjectWithBrackets({[e]:t[e]});for(const t in i){const e=this.createHiddenInput(t,i[t]);this.nativeFormRenderer.getNativeFormRef().append(e)}}else{const i=this.createHiddenInput(e,t[e]);this.nativeFormRenderer.getNativeFormRef().append(i)}this.nativeFormRenderer.getNativeFormRef().requestSubmit()}createHiddenInput(t,e){const i=E().createElement("input");return i.type="hidden",i.name=t,i.value=$(e)?String(e):"",i}registerFormSubmitChangeManager(){var t;this.formSubmitEventObserver=new N(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this));const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.register(B.getSubject(e,M),this.formSubmitEventObserver)}unregisterFormSubmitChangeManager(){var t;const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.unregister(B.getSubject(e,M),this.formSubmitEventObserver)}canAcceptFormSubmitEvent(t){return this.vegaFormFieldController.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.host.valid()).isValid){const t=await this.host.getValue();this.submitEventEmitter.emit(t).defaultPrevented||await this.submitWithFormData()}}flattenObjectWithBrackets(t,e="",i={}){return Object.entries(t).forEach((([t,s])=>{const a=e?`${e}[${t}]`:t;Array.isArray(s)?s.forEach(((t,e)=>{const s=`${a}[${e}]`;"object"==typeof t&&null!==t?this.flattenObjectWithBrackets(t,s,i):i[s]=t})):$(s)&&"object"==typeof s?this.flattenObjectWithBrackets(s,a,i):i[a]=s})),i}}z([f()],L.prototype,"host",void 0),z([f()],L.prototype,"useNativeForm",void 0),z([f()],L.prototype,"nativeFormRenderer",void 0),z([f()],L.prototype,"submitEventEmitter",void 0),z([f()],L.prototype,"vegaFormFieldController",void 0),z([u("connectedCallback")],L.prototype,"connectedCallback",null),z([u("disconnectedCallback")],L.prototype,"disconnectedCallback",null);var Q=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class X extends v{constructor(){super(...arguments),this.childNotifyObserver=new T(r,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new T(l,(()=>{this.isTouched=!0})),this._invalidFieldPathMap=new H(new Map,(t=>{this._invalidFieldPathMap=t,this.updateIsValidFlag()})),this._pendingValidFieldPathMap=new H(new Map,(t=>{this._pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.updateInternalValidStatus=t=>{if(t.host!==this.host){const e=t.host,i=t.detail;S(e)&&this.shouldVisitElement(e,!1,!1)&&(i?this.invalidFieldPathMap.delete(e):this.invalidFieldPathMap.set(e,k(e)))}}}connectedCallback(){this.initFormFieldDisconnectedObserver(),this.registerFormFieldPendingValid()}disconnectedCallback(){o.notify(c,{host:this.host}),o.unregister(c,this.formFieldDisconnectedObserver),o.unregister(h,this.formFieldPendingValidObserver)}async getValue(t){const e={};return await this.navigateVegaFormChildren((async(i,s)=>{const a=this.getFormFieldName(i);e[a]=s?await i.getValue(t):this.getFormFieldValue(i)}),t),W(e)?Object.values(e):e}async setValue(t,e){t&&(await this.navigateVegaFormChildren((async(i,s)=>{const a=this.getFormFieldName(i);s?await i.setValue(t[a],e):(await i.componentOnReady(),void 0!==t[a]&&("function"==typeof i.setValue?await i.setValue(t[a]):i.value=t[a]))}),e),this.isTouched=!1)}async valid(t=!0){const e={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(i,s)=>{if("function"==typeof i.valid&&s){const s=await i.valid(t);s.isValid||(e.isValid=!1,e.invalidFields.push(...s.invalidFields),e.invalidFieldsErrorMessages=Object.assign(Object.assign({},e.invalidFieldsErrorMessages),s.invalidFieldsErrorMessages))}else{const{isValid:s,message:a}=await this.handleChildFormFieldElementValid(i,t);s||(e.isValid=!1,e.invalidFields.push(this.getFormFieldName(i)),e.invalidFieldsErrorMessages||(e.invalidFieldsErrorMessages={}),e.invalidFieldsErrorMessages[this.getFormFieldName(i)]=a)}})),e}get invalidFieldPathMap(){return this._invalidFieldPathMap}get pendingValidFieldPathMap(){return this._pendingValidFieldPathMap}setIsTouched(t){this.isTouched=t}getFormFieldName(t){return k(t)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||x(t,this.host)}async navigateVegaFormChildren(t,e,i=this.host){const s=[];Array.from(i.children).forEach((i=>{S(i)?this.shouldVisitElement(i,null==e?void 0:e.skipDisabled,null==e?void 0:e.skipInvisible)&&s.push(t(i,"VEGA-FORM"===i.tagName)):s.push(this.navigateVegaFormChildren(t,e,i))})),await Promise.all(s)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}registerFormFieldPendingValid(){this.formFieldPendingValidObserver=new N(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(h,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,k(t.host))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new N(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(c,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}shouldVisitElement(t,e,i){return this.getFormFieldName(t)&&(!e||!t.disabled)&&(!i||D(t))}getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}async handleChildFormFieldElementValid(t,e){const i=B.getSubject(t,I),{isValid:s,message:a}=await new Promise((s=>{const a=setTimeout((()=>{s({isValid:!0,message:""})}),2e3);o.notify(i,{host:t,message:e,promiseResolve:s,timerId:a})}));return{isValid:s,message:a}}}Q([f()],X.prototype,"host",void 0),Q([f({writable:!0})],X.prototype,"isValid",void 0),Q([f({writable:!0})],X.prototype,"isTouched",void 0),Q([p()],X.prototype,"childNotifyObserver",void 0),Q([p()],X.prototype,"childNodeValueChangeObserver",void 0),Q([u("connectedCallback")],X.prototype,"connectedCallback",null),Q([u("disconnectedCallback")],X.prototype,"disconnectedCallback",null),Q([u("getValue")],X.prototype,"getValue",null),Q([u("setValue")],X.prototype,"setValue",null),Q([u("valid")],X.prototype,"valid",null);var Y=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class Z extends v{connectedCallback(){this.registerFormResetChangeManager()}disconnectedCallback(){this.unregisterFormResetChangeManager()}async reset(t={},e){await this.vegaFormFieldController.navigateVegaFormChildren((async(i,s)=>{const a=this.vegaFormFieldController.getFormFieldName(i);s&&await i.reset(t[a]||{},e)}),e),o.notify(d,{host:this.host,defaultValueMap:t,option:e}),this.vegaFormFieldController.setIsTouched(!1)}registerFormResetChangeManager(){var t;const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;this.formResetEventObserver=new N(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(B.getSubject(e,P),this.formResetEventObserver)}unregisterFormResetChangeManager(){var t;const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.unregister(B.getSubject(e,P),this.formResetEventObserver)}canAcceptFormResetEvent(t){return this.vegaFormFieldController.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.host.reset(),this.resetEventEmitter.emit()}}Y([f()],Z.prototype,"host",void 0),Y([f()],Z.prototype,"vegaFormFieldController",void 0),Y([f()],Z.prototype,"resetEventEmitter",void 0),Y([u("connectedCallback")],Z.prototype,"connectedCallback",null),Y([u("disconnectedCallback")],Z.prototype,"disconnectedCallback",null),Y([u("reset")],Z.prototype,"reset",null);var tt=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const et=class{constructor(t){e(this,t),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers=new Map,this.submitEventEmitter=V(et,w),this.resetEventEmitter=V(et,y),this.validateEventEmitter=V(et,C),this.disableBlurValidationNotifySlimmer=R(et,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new J,this.childEventPrevent=new F([w,y],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new F([C],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new g,this.vegaFormFieldValidationStateController=new U,this.nativeFormRenderer=new q,this.vegaFormSubmitController=new L,this.vegaFormResetController=new Z,this.vegaFormFieldController=new X,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.useNativeForm=!1,this.method="get",this.name=""}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(r,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async valid(t=!0){return b(t)}async getValue(t){return b(t)}async setValue(t,e){}async reset(t={},e){}async setValidationStates(t){}render(){return m(t(s,null,this.useNativeForm?this.nativeFormRenderer.render():t("slot",null)),this.host)}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};tt([j()],et.prototype,"globalSlimmers",void 0),tt([p()],et.prototype,"submitEventEmitter",void 0),tt([p()],et.prototype,"resetEventEmitter",void 0),tt([p()],et.prototype,"validateEventEmitter",void 0),tt([p()],et.prototype,"disableBlurValidationNotifySlimmer",void 0),tt([p()],et.prototype,"stateController",void 0),tt([p()],et.prototype,"childEventPrevent",void 0),tt([p()],et.prototype,"childFormValidateEventPrevent",void 0),tt([p()],et.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),tt([p()],et.prototype,"vegaFormFieldValidationStateController",void 0),tt([p()],et.prototype,"nativeFormRenderer",void 0),tt([p()],et.prototype,"vegaFormSubmitController",void 0),tt([p()],et.prototype,"vegaFormResetController",void 0),tt([p()],et.prototype,"vegaFormFieldController",void 0),et.style=":host{display:block}";export{et as vega_form}
|
|
1
|
+
import{h as t,r as e,c as i,H as s,g as a}from"./p-6b2342e0.js";import{C as o}from"./p-2d0d575f.js";import{d as n,e as r,F as l,b as c,a as h,c as d}from"./p-cb378636.js";import{s as m}from"./p-519a7d55.js";import{c as u,M as f,V as v,I as p}from"./p-6e1ab235.js";import{m as b}from"./p-6bd5c49b.js";import{V as g,I as j}from"./p-5c8e4e8f.js";import{c as V}from"./p-3b6a6f08.js";import{C as F}from"./p-abad8ffd.js";import{I as w,J as y,K as C}from"./p-a83cef5a.js";import{c as R}from"./p-b1557bbe.js";import{S as O}from"./p-7d3419c7.js";import{i as S,g as k}from"./p-71909102.js";import{t as E}from"./p-b75ee3ba.js";import{g as M,j as I,h as P}from"./p-53e3f259.js";import{d as B}from"./p-36a57431.js";import{O as N}from"./p-331a62d5.js";import{f as A,c as x,e as D}from"./p-aa135628.js";import{i as $}from"./p-8e3c1c81.js";import{I as H}from"./p-48e3be6a.js";import{C as T}from"./p-6eedbc4f.js";import{d as W}from"./p-d27ae9ff.js";import"./p-6a334573.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-347d664e.js";import"./p-262ec334.js";var G=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class J extends O{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}G([u()],J.prototype,"host",void 0),G([u({writable:!0})],J.prototype,"disableBlurValidation",void 0);var K=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class U extends v{setValidationStates(t){0!==t.length?t.forEach((t=>{const e=this.getHostByFieldName(t.fieldName);e&&this.updateFieldValidationState(e,{isValid:t.isValid,errorMessage:t.isValid?"":t.errorMessage})})):Array.from(this.host.querySelectorAll("[data-vega-form], [name]")).filter((t=>S(t))).forEach((t=>{this.updateFieldValidationState(t,{isValid:!0})}))}getHostByFieldName(t){const e=t.split(".");let i=this.host;for(const t of e){const e=i.querySelector(`[data-vega-form="${t}"], [name="${t}"]`);if(!S(e))return null;i=e}return i}updateFieldValidationState(t,{isValid:e,errorMessage:i}){t.isValid=e,o.notify(n,{host:t,message:e?"":i,isValid:e}),o.notify(r,{host:t,detail:e})}}K([u()],U.prototype,"host",void 0),K([f("setValidationStates")],U.prototype,"setValidationStates",null);var _=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class q extends v{getNativeFormRef(){return this.nativeFormRef}render(){return t("form",{action:this.action,method:this.method,name:this.name,ref:t=>{t&&(this.nativeFormRef=t)}},t("slot",null))}}_([u()],q.prototype,"method",void 0),_([u()],q.prototype,"action",void 0),_([u()],q.prototype,"name",void 0);var z=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class L extends v{connectedCallback(){this.registerFormSubmitChangeManager()}disconnectedCallback(){this.unregisterFormSubmitChangeManager()}async submitWithFormData(){if(!this.useNativeForm)return;const t=await this.host.getValue();for(const e in t)if("object"==typeof t[e]){const i=this.flattenObjectWithBrackets({[e]:t[e]});for(const t in i){const e=this.createHiddenInput(t,i[t]);this.nativeFormRenderer.getNativeFormRef().append(e)}}else{const i=this.createHiddenInput(e,t[e]);this.nativeFormRenderer.getNativeFormRef().append(i)}this.nativeFormRenderer.getNativeFormRef().requestSubmit()}createHiddenInput(t,e){const i=E().createElement("input");return i.type="hidden",i.name=t,i.value=$(e)?String(e):"",i}registerFormSubmitChangeManager(){var t;this.formSubmitEventObserver=new N(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this));const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.register(B.getSubject(e,M),this.formSubmitEventObserver)}unregisterFormSubmitChangeManager(){var t;const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.unregister(B.getSubject(e,M),this.formSubmitEventObserver)}canAcceptFormSubmitEvent(t){return this.vegaFormFieldController.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.host.valid()).isValid){const t=await this.host.getValue();this.submitEventEmitter.emit(t).defaultPrevented||await this.submitWithFormData()}}flattenObjectWithBrackets(t,e="",i={}){return Object.entries(t).forEach((([t,s])=>{const a=e?`${e}[${t}]`:t;Array.isArray(s)?s.forEach(((t,e)=>{const s=`${a}[${e}]`;"object"==typeof t&&null!==t?this.flattenObjectWithBrackets(t,s,i):i[s]=t})):$(s)&&"object"==typeof s?this.flattenObjectWithBrackets(s,a,i):i[a]=s})),i}}z([u()],L.prototype,"host",void 0),z([u()],L.prototype,"useNativeForm",void 0),z([u()],L.prototype,"nativeFormRenderer",void 0),z([u()],L.prototype,"submitEventEmitter",void 0),z([u()],L.prototype,"vegaFormFieldController",void 0),z([f("connectedCallback")],L.prototype,"connectedCallback",null),z([f("disconnectedCallback")],L.prototype,"disconnectedCallback",null);var Q=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class X extends v{constructor(){super(...arguments),this.childNotifyObserver=new T(r,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new T(l,(()=>{this.isTouched=!0})),this._invalidFieldPathMap=new H(new Map,(t=>{this._invalidFieldPathMap=t,this.updateIsValidFlag()})),this._pendingValidFieldPathMap=new H(new Map,(t=>{this._pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.updateInternalValidStatus=t=>{if(t.host!==this.host){const e=t.host,i=t.detail;S(e)&&this.shouldVisitElement(e,!1,!1)&&(i?this.invalidFieldPathMap.delete(e):this.invalidFieldPathMap.set(e,k(e)))}}}connectedCallback(){this.initFormFieldDisconnectedObserver(),this.registerFormFieldPendingValid()}disconnectedCallback(){o.notify(c,{host:this.host}),o.unregister(c,this.formFieldDisconnectedObserver),o.unregister(h,this.formFieldPendingValidObserver)}async getValue(t){const e={};return await this.navigateVegaFormChildren((async(i,s)=>{const a=this.getFormFieldName(i);e[a]=s?await i.getValue(t):this.getFormFieldValue(i)}),t),W(e)?Object.values(e):e}async setValue(t,e){t&&(await this.navigateVegaFormChildren((async(i,s)=>{const a=this.getFormFieldName(i);s?await i.setValue(t[a],e):(await i.componentOnReady(),void 0!==t[a]&&("function"==typeof i.setValue?await i.setValue(t[a]):i.value=t[a]))}),e),this.isTouched=!1)}async valid(t=!0){const e={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(i,s)=>{if("function"==typeof i.valid&&s){const s=await i.valid(t);s.isValid||(e.isValid=!1,e.invalidFields.push(...s.invalidFields),e.invalidFieldsErrorMessages=Object.assign(Object.assign({},e.invalidFieldsErrorMessages),s.invalidFieldsErrorMessages))}else{const{isValid:s,message:a}=await this.handleChildFormFieldElementValid(i,t);s||(e.isValid=!1,e.invalidFields.push(this.getFormFieldName(i)),e.invalidFieldsErrorMessages||(e.invalidFieldsErrorMessages={}),e.invalidFieldsErrorMessages[this.getFormFieldName(i)]=a)}})),e}get invalidFieldPathMap(){return this._invalidFieldPathMap}get pendingValidFieldPathMap(){return this._pendingValidFieldPathMap}setIsTouched(t){this.isTouched=t}getFormFieldName(t){return k(t)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||x(t,this.host)}async navigateVegaFormChildren(t,e,i=this.host){const s=[];Array.from(i.children).forEach((i=>{S(i)?this.shouldVisitElement(i,null==e?void 0:e.skipDisabled,null==e?void 0:e.skipInvisible)&&s.push(t(i,"VEGA-FORM"===i.tagName)):s.push(this.navigateVegaFormChildren(t,e,i))})),await Promise.all(s)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}registerFormFieldPendingValid(){this.formFieldPendingValidObserver=new N(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(h,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,k(t.host))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new N(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(c,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}shouldVisitElement(t,e,i){return this.getFormFieldName(t)&&(!e||!t.disabled)&&(!i||D(t))}getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}async handleChildFormFieldElementValid(t,e){const i=B.getSubject(t,I),{isValid:s,message:a}=await new Promise((s=>{const a=setTimeout((()=>{s({isValid:!0,message:""})}),2e3);o.notify(i,{host:t,message:e,promiseResolve:s,timerId:a})}));return{isValid:s,message:a}}}Q([u()],X.prototype,"host",void 0),Q([u({writable:!0})],X.prototype,"isValid",void 0),Q([u({writable:!0})],X.prototype,"isTouched",void 0),Q([p()],X.prototype,"childNotifyObserver",void 0),Q([p()],X.prototype,"childNodeValueChangeObserver",void 0),Q([f("connectedCallback")],X.prototype,"connectedCallback",null),Q([f("disconnectedCallback")],X.prototype,"disconnectedCallback",null),Q([f("getValue")],X.prototype,"getValue",null),Q([f("setValue")],X.prototype,"setValue",null),Q([f("valid")],X.prototype,"valid",null);var Y=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class Z extends v{connectedCallback(){this.registerFormResetChangeManager()}disconnectedCallback(){this.unregisterFormResetChangeManager()}async reset(t={},e){await this.vegaFormFieldController.navigateVegaFormChildren((async(i,s)=>{const a=this.vegaFormFieldController.getFormFieldName(i);s&&await i.reset(t[a]||{},e)}),e),o.notify(d,{host:this.host,defaultValueMap:t,option:e}),this.vegaFormFieldController.setIsTouched(!1)}registerFormResetChangeManager(){var t;const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;this.formResetEventObserver=new N(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(B.getSubject(e,P),this.formResetEventObserver)}unregisterFormResetChangeManager(){var t;const e=null!==(t=A(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.unregister(B.getSubject(e,P),this.formResetEventObserver)}canAcceptFormResetEvent(t){return this.vegaFormFieldController.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.host.reset(),this.resetEventEmitter.emit()}}Y([u()],Z.prototype,"host",void 0),Y([u()],Z.prototype,"vegaFormFieldController",void 0),Y([u()],Z.prototype,"resetEventEmitter",void 0),Y([f("connectedCallback")],Z.prototype,"connectedCallback",null),Y([f("disconnectedCallback")],Z.prototype,"disconnectedCallback",null),Y([f("reset")],Z.prototype,"reset",null);var tt=function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const et=class{constructor(t){e(this,t),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers=new Map,this.submitEventEmitter=V(et,w),this.resetEventEmitter=V(et,y),this.validateEventEmitter=V(et,C),this.disableBlurValidationNotifySlimmer=R(et,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new J,this.childEventPrevent=new F([w,y],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new F([C],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new g,this.vegaFormFieldValidationStateController=new U,this.nativeFormRenderer=new q,this.vegaFormSubmitController=new L,this.vegaFormResetController=new Z,this.vegaFormFieldController=new X,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.useNativeForm=!1,this.method="get",this.name=""}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(r,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async valid(t=!0){return b(t)}async getValue(t){return b(t)}async setValue(t,e){}async reset(t={},e){}async setValidationStates(t){}render(){return m(t(s,null,this.useNativeForm?this.nativeFormRenderer.render():t("slot",null)),this.host)}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};tt([j()],et.prototype,"globalSlimmers",void 0),tt([p()],et.prototype,"submitEventEmitter",void 0),tt([p()],et.prototype,"resetEventEmitter",void 0),tt([p()],et.prototype,"validateEventEmitter",void 0),tt([p()],et.prototype,"disableBlurValidationNotifySlimmer",void 0),tt([p()],et.prototype,"stateController",void 0),tt([p()],et.prototype,"childEventPrevent",void 0),tt([p()],et.prototype,"childFormValidateEventPrevent",void 0),tt([p()],et.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),tt([p()],et.prototype,"vegaFormFieldValidationStateController",void 0),tt([p()],et.prototype,"nativeFormRenderer",void 0),tt([p()],et.prototype,"vegaFormSubmitController",void 0),tt([p()],et.prototype,"vegaFormResetController",void 0),tt([p()],et.prototype,"vegaFormFieldController",void 0),et.style=":host{display:block}";export{et as vega_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as h}from"./p-6b2342e0.js";import{F as r}from"./p-87a4d75f.js";import{V as a,M as l,A as o,D as c,i as p}from"./p-fdbdf12f.js";import{R as n}from"./p-8bc15ed0.js";import{V as d}from"./p-b3a1cd22.js";import{s as m}from"./p-519a7d55.js";import{I as v}from"./p-6e1ab235.js";import{V as f,I as u}from"./p-5c8e4e8f.js";import{F as g}from"./p-a9fc4043.js";import{F as _}from"./p-cb378636.js";import{C as A}from"./p-2d0d575f.js";import{c as E}from"./p-3b6a6f08.js";import{C as M}from"./p-abad8ffd.js";import{D as I}from"./p-36a57431.js";import{c as w,O as j,N as D}from"./p-a83cef5a.js";import{V as Z}from"./p-44245a36.js";import{S as C}from"./p-261cf764.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-affb40e8.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-53e3f259.js";import"./p-cc569b54.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-7d3419c7.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";import"./p-e84c2589.js";const R=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],b=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];class N extends C{calculateCaretPosition(t,i){if(!p(i))return null;if(this.getCreditCardMaskConfig(t)){if(t.length>this.getLengthLimit())return i-(t.length-this.getLengthLimit());const e=t.substring(0,i);return i+(this.format(e).length-e.length)}return i}format(t,i){const e=this.getCreditCardMaskConfig(t);if(e){this.setMaskConfig(e.options);const s=null==i?void 0:i.caretPosition;if(t.length>this.getLengthLimit()&&p(s)){const i=[...t],e=t.length-this.getLengthLimit();return i.splice(s-e,e),i.join("")}return this.replaceMaskWithMatchedInputSlots(t,this.getMatchedInputSlotValue(t))}return t}getCreditCardType(t){return R.filter((i=>i.pattern.test(t)))[0]}}class y extends N{constructor(){super({mask:"",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")})}getCreditCardMaskConfig(t){let i;const e=this.getCreditCardType(t);return e&&(i=e.maskConfig),i}}class V extends N{constructor(t){super({mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}),this.hideCardNumberOnBlur=t}getCreditCardMaskConfig(t){let i;return this.getCreditCardType(t)&&this.hideCardNumberOnBlur&&t.trim().includes(" ")&&(i=this.generateDynamicMask(t)),i}generateDynamicMask(t){const i={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},e=t.trim().split(" "),s=e.map(((t,i)=>(i===e.length-1?"9":"X").repeat(t.length))).join(" ");return i.options.mask=s,i}}var H=function(t,i,e,s){var h,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(h=t[l])&&(a=(r<3?h(a):r>3?h(i,e,a):h(i,e))||a);return r>3&&a&&Object.defineProperty(i,e,a),a};const T=class{constructor(s){t(this,s),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers=new Map,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new n:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=E(T,w),this.blurEventEmitter=E(T,j),this.focusEventEmitter=E(T,D),this.inputCreditCardEventPrevent=new M([w,D,j],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new f(b),this.required=!1,this.optional=!1,this.name="",this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:Z.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,optional:this.optional,name:this.name,showClearIcon:!1,ref:t=>{this.inputRef=t,I.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),I.addUniqueObserverToNode(t,j,(()=>{this.handleVegaBlur()})),I.addUniqueObserverToNode(t,D,(()=>{this.handleVegaFocus()}))},"data-aria-label":this.label||"Input credit card"})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),A.notify(_,{host:this.host,detail:t})}componentDidLoad(){r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return m(e(s,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return R.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){return[{type:"custom",trigger:"input",strategy:()=>new y},{type:"custom",trigger:"blur",strategy:()=>new V(this.hideCardNumberOnBlur)}]}get host(){return h(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};Z.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" fill=\'rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path fill="rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" fill=\'rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),H([u()],T.prototype,"globalSlimmers",void 0),H([v()],T.prototype,"formFieldController",void 0),H([v()],T.prototype,"changeEventEmitter",void 0),H([v()],T.prototype,"blurEventEmitter",void 0),H([v()],T.prototype,"focusEventEmitter",void 0),H([v()],T.prototype,"inputCreditCardEventPrevent",void 0),H([v()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{T as vega_input_credit_card}
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as h}from"./p-6b2342e0.js";import{F as r}from"./p-87a4d75f.js";import{V as a,M as l,A as o,D as c,i as p}from"./p-8e3c1c81.js";import{R as n}from"./p-8bc15ed0.js";import{V as d}from"./p-4cd198b9.js";import{s as m}from"./p-519a7d55.js";import{I as v}from"./p-6e1ab235.js";import{V as f,I as u}from"./p-5c8e4e8f.js";import{F as g}from"./p-70a08fe5.js";import{F as _}from"./p-cb378636.js";import{C as A}from"./p-2d0d575f.js";import{c as E}from"./p-3b6a6f08.js";import{C as M}from"./p-abad8ffd.js";import{D as I}from"./p-36a57431.js";import{c as w,O as j,N as D}from"./p-a83cef5a.js";import{V as Z}from"./p-44245a36.js";import{S as C}from"./p-78a2802f.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-347d664e.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-53e3f259.js";import"./p-cc569b54.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-7d3419c7.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";import"./p-9b571551.js";const R=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],b=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];class N extends C{calculateCaretPosition(t,i){if(!p(i))return null;if(this.getCreditCardMaskConfig(t)){if(t.length>this.getLengthLimit())return i-(t.length-this.getLengthLimit());const e=t.substring(0,i);return i+(this.format(e).length-e.length)}return i}format(t,i){const e=this.getCreditCardMaskConfig(t);if(e){this.setMaskConfig(e.options);const s=null==i?void 0:i.caretPosition;if(t.length>this.getLengthLimit()&&p(s)){const i=[...t],e=t.length-this.getLengthLimit();return i.splice(s-e,e),i.join("")}return this.replaceMaskWithMatchedInputSlots(t,this.getMatchedInputSlotValue(t))}return t}getCreditCardType(t){return R.filter((i=>i.pattern.test(t)))[0]}}class y extends N{constructor(){super({mask:"",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")})}getCreditCardMaskConfig(t){let i;const e=this.getCreditCardType(t);return e&&(i=e.maskConfig),i}}class V extends N{constructor(t){super({mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}),this.hideCardNumberOnBlur=t}getCreditCardMaskConfig(t){let i;return this.getCreditCardType(t)&&this.hideCardNumberOnBlur&&t.trim().includes(" ")&&(i=this.generateDynamicMask(t)),i}generateDynamicMask(t){const i={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},e=t.trim().split(" "),s=e.map(((t,i)=>(i===e.length-1?"9":"X").repeat(t.length))).join(" ");return i.options.mask=s,i}}var H=function(t,i,e,s){var h,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(h=t[l])&&(a=(r<3?h(a):r>3?h(i,e,a):h(i,e))||a);return r>3&&a&&Object.defineProperty(i,e,a),a};const T=class{constructor(s){t(this,s),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers=new Map,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new n:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=E(T,w),this.blurEventEmitter=E(T,j),this.focusEventEmitter=E(T,D),this.inputCreditCardEventPrevent=new M([w,D,j],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new f(b),this.required=!1,this.optional=!1,this.name="",this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:Z.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,optional:this.optional,name:this.name,showClearIcon:!1,ref:t=>{this.inputRef=t,I.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),I.addUniqueObserverToNode(t,j,(()=>{this.handleVegaBlur()})),I.addUniqueObserverToNode(t,D,(()=>{this.handleVegaFocus()}))},"data-aria-label":this.label||"Input credit card"})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),A.notify(_,{host:this.host,detail:t})}componentDidLoad(){r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return m(e(s,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return R.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){return[{type:"custom",trigger:"input",strategy:()=>new y},{type:"custom",trigger:"blur",strategy:()=>new V(this.hideCardNumberOnBlur)}]}get host(){return h(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};Z.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" fill=\'rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path fill="rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" fill=\'rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),H([u()],T.prototype,"globalSlimmers",void 0),H([v()],T.prototype,"formFieldController",void 0),H([v()],T.prototype,"changeEventEmitter",void 0),H([v()],T.prototype,"blurEventEmitter",void 0),H([v()],T.prototype,"focusEventEmitter",void 0),H([v()],T.prototype,"inputCreditCardEventPrevent",void 0),H([v()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{T as vega_input_credit_card}
|