legalesign-document-viewer 0.3.5 → 0.3.7
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/index-BpMnxZQ4.js +1974 -0
- package/dist/cjs/index-BpMnxZQ4.js.map +1 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/ls-document-options_42.cjs.entry.js +36107 -0
- package/dist/cjs/ls-document-options_42.cjs.entry.js.map +1 -0
- package/dist/cjs/ls-document-viewer.cjs.js +27 -0
- package/dist/cjs/ls-document-viewer.cjs.js.map +1 -0
- package/dist/cjs/ls-field-properties-dropdown.cjs.entry.js +21 -0
- package/dist/cjs/ls-field-properties-dropdown.cjs.entry.js.map +1 -0
- package/dist/cjs/ls-field-properties-dropdown.entry.cjs.js.map +1 -0
- package/dist/cjs/ls-formfield.cjs.entry.js +64 -0
- package/dist/cjs/ls-formfield.cjs.entry.js.map +1 -0
- package/dist/cjs/ls-formfield.entry.cjs.js.map +1 -0
- package/dist/cjs/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.cjs.js.map +1 -0
- package/dist/cjs/ls-number-input_5.cjs.entry.js +204 -0
- package/dist/cjs/ls-number-input_5.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +60 -0
- package/dist/collection/components/interfaces/IToolboxField.js +1 -0
- package/dist/collection/components/interfaces/IToolboxField.js.map +1 -0
- package/dist/collection/components/ls-document-options/ls-document-options.css +386 -0
- package/dist/collection/components/ls-document-options/ls-document-options.js +163 -0
- package/dist/collection/components/ls-document-options/ls-document-options.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/adapter/LsDocumentAdapter.js +89 -0
- package/dist/collection/components/ls-document-viewer/adapter/LsDocumentAdapter.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/adapter/elementActions.js +72 -0
- package/dist/collection/components/ls-document-viewer/adapter/elementActions.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/adapter/groupActions.js +96 -0
- package/dist/collection/components/ls-document-viewer/adapter/groupActions.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/adapter/parameters.js +16 -0
- package/dist/collection/components/ls-document-viewer/adapter/parameters.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/adapter/roleActions.js +70 -0
- package/dist/collection/components/ls-document-viewer/adapter/roleActions.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/adapter/templateActions.js +95 -0
- package/dist/collection/components/ls-document-viewer/adapter/templateActions.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/defaultFieldIcons.js +20 -0
- package/dist/collection/components/ls-document-viewer/defaultFieldIcons.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/defaultFieldLabels.js +20 -0
- package/dist/collection/components/ls-document-viewer/defaultFieldLabels.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/defaultPalette.js +216 -0
- package/dist/collection/components/ls-document-viewer/defaultPalette.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/editorCalculator.js +134 -0
- package/dist/collection/components/ls-document-viewer/editorCalculator.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/editorUtils.js +197 -0
- package/dist/collection/components/ls-document-viewer/editorUtils.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/keyHandlers.js +76 -0
- package/dist/collection/components/ls-document-viewer/keyHandlers.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.css +608 -0
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +1235 -0
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/mouseHandlers.js +336 -0
- package/dist/collection/components/ls-document-viewer/mouseHandlers.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/validator.js +32 -0
- package/dist/collection/components/ls-document-viewer/validator.js.map +1 -0
- package/dist/collection/components/ls-editor-field/ls-editor-field.css +80 -0
- package/dist/collection/components/ls-editor-field/ls-editor-field.js +334 -0
- package/dist/collection/components/ls-editor-field/ls-editor-field.js.map +1 -0
- package/dist/collection/components/ls-editor-table/ls-editor-table.css +16 -0
- package/dist/collection/components/ls-editor-table/ls-editor-table.js +70 -0
- package/dist/collection/components/ls-editor-table/ls-editor-table.js.map +1 -0
- package/dist/collection/components/ls-feature-column/ls-feature-column.css +23 -0
- package/dist/collection/components/ls-feature-column/ls-feature-column.js +84 -0
- package/dist/collection/components/ls-feature-column/ls-feature-column.js.map +1 -0
- package/dist/collection/components/ls-field-alignment/ls-field-alignment.css +370 -0
- package/dist/collection/components/ls-field-alignment/ls-field-alignment.js +214 -0
- package/dist/collection/components/ls-field-alignment/ls-field-alignment.js.map +1 -0
- package/dist/collection/components/ls-field-content/ls-field-content.css +288 -0
- package/dist/collection/components/ls-field-content/ls-field-content.js +142 -0
- package/dist/collection/components/ls-field-content/ls-field-content.js.map +1 -0
- package/dist/collection/components/ls-field-dimensions/ls-field-dimensions.css +353 -0
- package/dist/collection/components/ls-field-dimensions/ls-field-dimensions.js +126 -0
- package/dist/collection/components/ls-field-dimensions/ls-field-dimensions.js.map +1 -0
- package/dist/collection/components/ls-field-distribute/ls-field-distribute.css +376 -0
- package/dist/collection/components/ls-field-distribute/ls-field-distribute.js +239 -0
- package/dist/collection/components/ls-field-distribute/ls-field-distribute.js.map +1 -0
- package/dist/collection/components/ls-field-footer/ls-field-footer.css +55 -0
- package/dist/collection/components/ls-field-footer/ls-field-footer.js +135 -0
- package/dist/collection/components/ls-field-footer/ls-field-footer.js.map +1 -0
- package/dist/collection/components/ls-field-format/ls-field-format.css +297 -0
- package/dist/collection/components/ls-field-format/ls-field-format.js +169 -0
- package/dist/collection/components/ls-field-format/ls-field-format.js.map +1 -0
- package/dist/collection/components/ls-field-placement/ls-field-placement.css +370 -0
- package/dist/collection/components/ls-field-placement/ls-field-placement.js +146 -0
- package/dist/collection/components/ls-field-placement/ls-field-placement.js.map +1 -0
- package/dist/collection/components/ls-field-properties/ls-field-properties.css +286 -0
- package/dist/collection/components/ls-field-properties/ls-field-properties.js +84 -0
- package/dist/collection/components/ls-field-properties/ls-field-properties.js.map +1 -0
- package/dist/collection/components/ls-field-properties-advanced/ls-field-properties-advanced.css +391 -0
- package/dist/collection/components/ls-field-properties-advanced/ls-field-properties-advanced.js +169 -0
- package/dist/collection/components/ls-field-properties-advanced/ls-field-properties-advanced.js.map +1 -0
- package/dist/collection/components/ls-field-properties-autosign/ls-field-properties-autosign.css +284 -0
- package/dist/collection/components/ls-field-properties-autosign/ls-field-properties-autosign.js +48 -0
- package/dist/collection/components/ls-field-properties-autosign/ls-field-properties-autosign.js.map +1 -0
- package/dist/collection/components/ls-field-properties-container/ls-field-properties-container.css +65 -0
- package/dist/collection/components/ls-field-properties-container/ls-field-properties-container.js +93 -0
- package/dist/collection/components/ls-field-properties-container/ls-field-properties-container.js.map +1 -0
- package/dist/collection/components/ls-field-properties-date/ls-field-properties-date.css +302 -0
- package/dist/collection/components/ls-field-properties-date/ls-field-properties-date.js +48 -0
- package/dist/collection/components/ls-field-properties-date/ls-field-properties-date.js.map +1 -0
- package/dist/collection/components/ls-field-properties-dropdown/ls-field-properties-dropdown.css +3 -0
- package/dist/collection/components/ls-field-properties-dropdown/ls-field-properties-dropdown.js +48 -0
- package/dist/collection/components/ls-field-properties-dropdown/ls-field-properties-dropdown.js.map +1 -0
- package/dist/collection/components/ls-field-properties-email/ls-field-properties-email.css +304 -0
- package/dist/collection/components/ls-field-properties-email/ls-field-properties-email.js +48 -0
- package/dist/collection/components/ls-field-properties-email/ls-field-properties-email.js.map +1 -0
- package/dist/collection/components/ls-field-properties-file/ls-field-properties-file.css +304 -0
- package/dist/collection/components/ls-field-properties-file/ls-field-properties-file.js +48 -0
- package/dist/collection/components/ls-field-properties-file/ls-field-properties-file.js.map +1 -0
- package/dist/collection/components/ls-field-properties-general/ls-field-properties-general.css +304 -0
- package/dist/collection/components/ls-field-properties-general/ls-field-properties-general.js +48 -0
- package/dist/collection/components/ls-field-properties-general/ls-field-properties-general.js.map +1 -0
- package/dist/collection/components/ls-field-properties-image/ls-field-properties-image.css +304 -0
- package/dist/collection/components/ls-field-properties-image/ls-field-properties-image.js +48 -0
- package/dist/collection/components/ls-field-properties-image/ls-field-properties-image.js.map +1 -0
- package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.css +459 -0
- package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js +149 -0
- package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js.map +1 -0
- package/dist/collection/components/ls-field-properties-number/ls-field-properties-number.css +304 -0
- package/dist/collection/components/ls-field-properties-number/ls-field-properties-number.js +48 -0
- package/dist/collection/components/ls-field-properties-number/ls-field-properties-number.js.map +1 -0
- package/dist/collection/components/ls-field-properties-signature/ls-field-properties-signature.css +304 -0
- package/dist/collection/components/ls-field-properties-signature/ls-field-properties-signature.js +48 -0
- package/dist/collection/components/ls-field-properties-signature/ls-field-properties-signature.js.map +1 -0
- package/dist/collection/components/ls-field-properties-text/ls-field-properties-text.css +301 -0
- package/dist/collection/components/ls-field-properties-text/ls-field-properties-text.js +48 -0
- package/dist/collection/components/ls-field-properties-text/ls-field-properties-text.js.map +1 -0
- package/dist/collection/components/ls-field-size/ls-field-size.css +376 -0
- package/dist/collection/components/ls-field-size/ls-field-size.js +111 -0
- package/dist/collection/components/ls-field-size/ls-field-size.js.map +1 -0
- package/dist/collection/components/ls-field-type-display/ls-field-type-display.css +35 -0
- package/dist/collection/components/ls-field-type-display/ls-field-type-display.js +75 -0
- package/dist/collection/components/ls-field-type-display/ls-field-type-display.js.map +1 -0
- package/dist/collection/components/ls-formfield/inputs/ls-number-input/ls-number-input.css +273 -0
- package/dist/collection/components/ls-formfield/inputs/ls-number-input/ls-number-input.js +336 -0
- package/dist/collection/components/ls-formfield/inputs/ls-number-input/ls-number-input.js.map +1 -0
- package/dist/collection/components/ls-formfield/inputs/ls-radio-input/ls-radio-input.css +69 -0
- package/dist/collection/components/ls-formfield/inputs/ls-radio-input/ls-radio-input.js +173 -0
- package/dist/collection/components/ls-formfield/inputs/ls-radio-input/ls-radio-input.js.map +1 -0
- package/dist/collection/components/ls-formfield/inputs/ls-select-input/ls-select-input.css +228 -0
- package/dist/collection/components/ls-formfield/inputs/ls-select-input/ls-select-input.js +288 -0
- package/dist/collection/components/ls-formfield/inputs/ls-select-input/ls-select-input.js.map +1 -0
- package/dist/collection/components/ls-formfield/inputs/ls-text-input/ls-text-input.css +218 -0
- package/dist/collection/components/ls-formfield/inputs/ls-text-input/ls-text-input.js +365 -0
- package/dist/collection/components/ls-formfield/inputs/ls-text-input/ls-text-input.js.map +1 -0
- package/dist/collection/components/ls-formfield/inputs/ls-textarea-input/ls-textarea-input.css +208 -0
- package/dist/collection/components/ls-formfield/inputs/ls-textarea-input/ls-textarea-input.js +326 -0
- package/dist/collection/components/ls-formfield/inputs/ls-textarea-input/ls-textarea-input.js.map +1 -0
- package/dist/collection/components/ls-formfield/ls-formfield.css +98 -0
- package/dist/collection/components/ls-formfield/ls-formfield.js +547 -0
- package/dist/collection/components/ls-formfield/ls-formfield.js.map +1 -0
- package/dist/collection/components/ls-helper-bar/ls-helper-bar.css +33 -0
- package/dist/{ls-document-viewer/ls-helper-bar.entry.js → collection/components/ls-helper-bar/ls-helper-bar.js} +48 -17
- package/dist/collection/components/ls-helper-bar/ls-helper-bar.js.map +1 -0
- package/dist/collection/components/ls-icon/icons.js +6639 -0
- package/dist/collection/components/ls-icon/icons.js.map +1 -0
- package/dist/collection/components/ls-icon/ls-icon.js +125 -0
- package/dist/collection/components/ls-icon/ls-icon.js.map +1 -0
- package/dist/collection/components/ls-input-wrapper/ls-input-wrapper.css +29 -0
- package/dist/collection/components/ls-input-wrapper/ls-input-wrapper.js +70 -0
- package/dist/collection/components/ls-input-wrapper/ls-input-wrapper.js.map +1 -0
- package/dist/collection/components/ls-keyboard-shortcuts/ls-keyboard-shortcuts.css +55 -0
- package/dist/collection/components/ls-keyboard-shortcuts/ls-keyboard-shortcuts.js +103 -0
- package/dist/collection/components/ls-keyboard-shortcuts/ls-keyboard-shortcuts.js.map +1 -0
- package/dist/collection/components/ls-page-loader/ls-page-loader.css +20 -0
- package/dist/{ls-document-viewer/ls-page-loader.entry.js → collection/components/ls-page-loader/ls-page-loader.js} +16 -15
- package/dist/collection/components/ls-page-loader/ls-page-loader.js.map +1 -0
- package/dist/collection/components/ls-participant-card/ls-participant-card.css +430 -0
- package/dist/collection/components/ls-participant-card/ls-participant-card.js +307 -0
- package/dist/collection/components/ls-participant-card/ls-participant-card.js.map +1 -0
- package/dist/collection/components/ls-participant-manager/ls-participant-manager.css +350 -0
- package/dist/collection/components/ls-participant-manager/ls-participant-manager.js +192 -0
- package/dist/collection/components/ls-participant-manager/ls-participant-manager.js.map +1 -0
- package/dist/collection/components/ls-participant-select/ls-participant-select.css +431 -0
- package/dist/collection/components/ls-participant-select/ls-participant-select.js +199 -0
- package/dist/collection/components/ls-participant-select/ls-participant-select.js.map +1 -0
- package/dist/collection/components/ls-props-section/ls-props-section.css +42 -0
- package/dist/collection/components/ls-props-section/ls-props-section.js +84 -0
- package/dist/collection/components/ls-props-section/ls-props-section.js.map +1 -0
- package/dist/collection/components/ls-statusbar/ls-statusbar.css +212 -0
- package/dist/collection/components/ls-statusbar/ls-statusbar.js +149 -0
- package/dist/collection/components/ls-statusbar/ls-statusbar.js.map +1 -0
- package/dist/collection/components/ls-toggle/ls-toggle.css +90 -0
- package/dist/collection/components/ls-toggle/ls-toggle.js +86 -0
- package/dist/collection/components/ls-toggle/ls-toggle.js.map +1 -0
- package/dist/collection/components/ls-toolbar/ls-toolbar.css +299 -0
- package/dist/collection/components/ls-toolbar/ls-toolbar.js +193 -0
- package/dist/collection/components/ls-toolbar/ls-toolbar.js.map +1 -0
- package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.css +318 -0
- package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.js +326 -0
- package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.js.map +1 -0
- package/dist/collection/components/ls-tooltip/ls-tooltip.css +55 -0
- package/dist/collection/components/ls-tooltip/ls-tooltip.js +206 -0
- package/dist/collection/components/ls-tooltip/ls-tooltip.js.map +1 -0
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.css +143 -0
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.js +103 -0
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.js.map +1 -0
- package/dist/collection/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/types/Icon.js +369 -0
- package/dist/collection/types/Icon.js.map +1 -0
- package/dist/collection/types/LSApiElement.js +2 -0
- package/dist/collection/types/LSApiElement.js.map +1 -0
- package/dist/collection/types/LSApiElementType.js +16 -0
- package/dist/collection/types/LSApiElementType.js.map +1 -0
- package/dist/collection/types/LSApiRole.js +2 -0
- package/dist/collection/types/LSApiRole.js.map +1 -0
- package/dist/collection/types/LSApiTemplate.js +2 -0
- package/dist/collection/types/LSApiTemplate.js.map +1 -0
- package/dist/collection/types/LSMutateEvent.js +2 -0
- package/dist/collection/types/LSMutateEvent.js.map +1 -0
- package/dist/collection/types/RoleColor.js +2 -0
- package/dist/collection/types/RoleColor.js.map +1 -0
- package/dist/collection/types/ValidationError.js +2 -0
- package/dist/collection/types/ValidationError.js.map +1 -0
- package/dist/collection/types/ValidationType.js +2 -0
- package/dist/collection/types/ValidationType.js.map +1 -0
- package/dist/collection/utils/tooltip.js +28 -0
- package/dist/collection/utils/tooltip.js.map +1 -0
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/index.js +10 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/ls-document-options.js +9 -0
- package/dist/components/ls-document-options.js.map +1 -0
- package/dist/{ls-document-viewer/ls-document-viewer.entry.js → components/ls-document-viewer.js} +348 -223
- package/dist/components/ls-document-viewer.js.map +1 -0
- package/dist/components/ls-editor-field.js +9 -0
- package/dist/components/ls-editor-field.js.map +1 -0
- package/dist/components/ls-editor-table.js +9 -0
- package/dist/components/ls-editor-table.js.map +1 -0
- package/dist/components/ls-feature-column.js +9 -0
- package/dist/components/ls-feature-column.js.map +1 -0
- package/dist/components/ls-field-alignment.js +9 -0
- package/dist/components/ls-field-alignment.js.map +1 -0
- package/dist/components/ls-field-content.js +9 -0
- package/dist/components/ls-field-content.js.map +1 -0
- package/dist/components/ls-field-dimensions.js +9 -0
- package/dist/components/ls-field-dimensions.js.map +1 -0
- package/dist/components/ls-field-distribute.js +9 -0
- package/dist/components/ls-field-distribute.js.map +1 -0
- package/dist/components/ls-field-footer.js +9 -0
- package/dist/components/ls-field-footer.js.map +1 -0
- package/dist/components/ls-field-format.js +9 -0
- package/dist/components/ls-field-format.js.map +1 -0
- package/dist/components/ls-field-placement.js +9 -0
- package/dist/components/ls-field-placement.js.map +1 -0
- package/dist/components/ls-field-properties-advanced.js +9 -0
- package/dist/components/ls-field-properties-advanced.js.map +1 -0
- package/dist/components/ls-field-properties-autosign.js +9 -0
- package/dist/components/ls-field-properties-autosign.js.map +1 -0
- package/dist/components/ls-field-properties-container.js +9 -0
- package/dist/components/ls-field-properties-container.js.map +1 -0
- package/dist/components/ls-field-properties-date.js +9 -0
- package/dist/components/ls-field-properties-date.js.map +1 -0
- package/dist/components/ls-field-properties-dropdown.js +118 -0
- package/dist/components/ls-field-properties-dropdown.js.map +1 -0
- package/dist/components/ls-field-properties-email.js +9 -0
- package/dist/components/ls-field-properties-email.js.map +1 -0
- package/dist/components/ls-field-properties-file.js +9 -0
- package/dist/components/ls-field-properties-file.js.map +1 -0
- package/dist/components/ls-field-properties-general.js +9 -0
- package/dist/components/ls-field-properties-general.js.map +1 -0
- package/dist/components/ls-field-properties-image.js +9 -0
- package/dist/components/ls-field-properties-image.js.map +1 -0
- package/dist/components/ls-field-properties-multiple.js +9 -0
- package/dist/components/ls-field-properties-multiple.js.map +1 -0
- package/dist/components/ls-field-properties-number.js +9 -0
- package/dist/components/ls-field-properties-number.js.map +1 -0
- package/dist/components/ls-field-properties-signature.js +9 -0
- package/dist/components/ls-field-properties-signature.js.map +1 -0
- package/dist/components/ls-field-properties-text.js +9 -0
- package/dist/components/ls-field-properties-text.js.map +1 -0
- package/dist/components/ls-field-properties.js +9 -0
- package/dist/components/ls-field-properties.js.map +1 -0
- package/dist/components/ls-field-size.js +9 -0
- package/dist/components/ls-field-size.js.map +1 -0
- package/dist/components/ls-field-type-display.js +9 -0
- package/dist/components/ls-field-type-display.js.map +1 -0
- package/dist/components/ls-formfield.js +143 -0
- package/dist/components/ls-formfield.js.map +1 -0
- package/dist/components/ls-helper-bar.js +9 -0
- package/dist/components/ls-helper-bar.js.map +1 -0
- package/dist/components/ls-icon.js +9 -0
- package/dist/components/ls-icon.js.map +1 -0
- package/dist/components/ls-input-wrapper.js +9 -0
- package/dist/components/ls-input-wrapper.js.map +1 -0
- package/dist/components/ls-keyboard-shortcuts.js +9 -0
- package/dist/components/ls-keyboard-shortcuts.js.map +1 -0
- package/dist/components/ls-number-input.js +9 -0
- package/dist/components/ls-number-input.js.map +1 -0
- package/dist/components/ls-page-loader.js +9 -0
- package/dist/components/ls-page-loader.js.map +1 -0
- package/dist/components/ls-participant-card.js +9 -0
- package/dist/components/ls-participant-card.js.map +1 -0
- package/dist/components/ls-participant-manager.js +9 -0
- package/dist/components/ls-participant-manager.js.map +1 -0
- package/dist/components/ls-participant-select.js +9 -0
- package/dist/components/ls-participant-select.js.map +1 -0
- package/dist/components/ls-props-section.js +9 -0
- package/dist/components/ls-props-section.js.map +1 -0
- package/dist/components/ls-radio-input.js +9 -0
- package/dist/components/ls-radio-input.js.map +1 -0
- package/dist/components/ls-select-input.js +9 -0
- package/dist/components/ls-select-input.js.map +1 -0
- package/dist/components/ls-statusbar.js +9 -0
- package/dist/components/ls-statusbar.js.map +1 -0
- package/dist/components/ls-text-input.js +9 -0
- package/dist/components/ls-text-input.js.map +1 -0
- package/dist/components/ls-textarea-input.js +9 -0
- package/dist/components/ls-textarea-input.js.map +1 -0
- package/dist/components/ls-toggle.js +9 -0
- package/dist/components/ls-toggle.js.map +1 -0
- package/dist/components/ls-toolbar.js +9 -0
- package/dist/components/ls-toolbar.js.map +1 -0
- package/dist/components/ls-toolbox-field.js +9 -0
- package/dist/components/ls-toolbox-field.js.map +1 -0
- package/dist/components/ls-tooltip.js +9 -0
- package/dist/components/ls-tooltip.js.map +1 -0
- package/dist/components/ls-validation-tag.js +9 -0
- package/dist/components/ls-validation-tag.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-format.entry.js → components/p-B-CwRcyM.js} +45 -13
- package/dist/components/p-B-CwRcyM.js.map +1 -0
- package/dist/{ls-document-viewer/ls-participant-manager.entry.js → components/p-BKpv-kC8.js} +58 -15
- package/dist/components/p-BKpv-kC8.js.map +1 -0
- package/dist/{ls-document-viewer/ls-toolbar.entry.js → components/p-BMoeVwvV.js} +57 -12
- package/dist/components/p-BMoeVwvV.js.map +1 -0
- package/dist/{ls-document-viewer/ls-textarea-input.entry.js → components/p-BhKW6QAV.js} +47 -10
- package/dist/components/p-BhKW6QAV.js.map +1 -0
- package/dist/components/p-BvHSBTD8.js +1744 -0
- package/dist/components/p-BvHSBTD8.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-content.entry.js → components/p-BxdoHLJe.js} +67 -13
- package/dist/components/p-BxdoHLJe.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-container.entry.js → components/p-ByytASxI.js} +29 -9
- package/dist/components/p-ByytASxI.js.map +1 -0
- package/dist/{ls-document-viewer/ls-participant-card.entry.js → components/p-C0DxZPf7.js} +69 -24
- package/dist/components/p-C0DxZPf7.js.map +1 -0
- package/dist/components/p-C26k_ME7.js +229 -0
- package/dist/components/p-C26k_ME7.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-alignment.entry.js → components/p-C3Yf2XxL.js} +43 -13
- package/dist/components/p-C3Yf2XxL.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-number.entry.js → components/p-CAkGTlBm.js} +105 -9
- package/dist/{ls-document-viewer/ls-field-properties-general.entry.esm.js.map → components/p-CAkGTlBm.js.map} +1 -1
- package/dist/{ls-document-viewer/ls-field-properties-file.entry.js → components/p-CBWx8ct9.js} +105 -9
- package/dist/components/p-CBWx8ct9.js.map +1 -0
- package/dist/{ls-document-viewer/ls-toolbox-field.entry.js → components/p-CEfaqMjm.js} +52 -13
- package/dist/components/p-CEfaqMjm.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-size.entry.js → components/p-CIaA9Qz9.js} +43 -13
- package/dist/components/p-CIaA9Qz9.js.map +1 -0
- package/dist/{ls-document-viewer/ls-select-input.entry.js → components/p-CPWE3RPb.js} +44 -10
- package/dist/components/p-CPWE3RPb.js.map +1 -0
- package/dist/{ls-document-viewer/ls-tooltip.entry.js → components/p-CZoubBus.js} +36 -11
- package/dist/components/p-CZoubBus.js.map +1 -0
- package/dist/{ls-document-viewer/tooltip-Cb8nDMs-.js → components/p-Cb8nDMs-.js} +2 -2
- package/dist/components/p-Cb8nDMs-.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-dimensions.entry.js → components/p-Ccn3ZZcu.js} +43 -13
- package/dist/components/p-Ccn3ZZcu.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-placement.entry.js → components/p-CesULiVv.js} +43 -13
- package/dist/components/p-CesULiVv.js.map +1 -0
- package/dist/{ls-document-viewer/clsx-ChV9xqsO.js → components/p-ChV9xqsO.js} +2 -2
- package/dist/components/p-ChV9xqsO.js.map +1 -0
- package/dist/components/p-ChsJHskx.js +45 -0
- package/dist/components/p-ChsJHskx.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-date.entry.js → components/p-CoSuNdfC.js} +105 -9
- package/dist/components/p-CoSuNdfC.js.map +1 -0
- package/dist/{ls-document-viewer/defaultFieldIcons-Cp3IxvzK.js → components/p-Cp3IxvzK.js} +2 -2
- package/dist/components/p-Cp3IxvzK.js.map +1 -0
- package/dist/components/p-Cvpba_Hj.js +66 -0
- package/dist/components/p-Cvpba_Hj.js.map +1 -0
- package/dist/{ls-document-viewer/defaultPalette-CwCWCxsI.js → components/p-CwCWCxsI.js} +2 -2
- package/dist/components/p-CwCWCxsI.js.map +1 -0
- package/dist/{ls-document-viewer/ls-number-input.entry.js → components/p-D0Dhti1c.js} +47 -10
- package/dist/components/p-D0Dhti1c.js.map +1 -0
- package/dist/{ls-document-viewer/ls-participant-select.entry.js → components/p-D1G_SpA3.js} +41 -12
- package/dist/components/p-D1G_SpA3.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-type-display.entry.js → components/p-D8-qPGsJ.js} +36 -11
- package/dist/components/p-D8-qPGsJ.js.map +1 -0
- package/dist/{ls-document-viewer/ls-radio-input.entry.js → components/p-D81uQuBt.js} +39 -10
- package/dist/components/p-D81uQuBt.js.map +1 -0
- package/dist/{ls-document-viewer/ls-statusbar.entry.js → components/p-DCgwsmkK.js} +65 -15
- package/dist/components/p-DCgwsmkK.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-distribute.entry.js → components/p-DFgVwcWo.js} +49 -14
- package/dist/components/p-DFgVwcWo.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-email.entry.js → components/p-DP1YK_3k.js} +105 -9
- package/dist/components/p-DP1YK_3k.js.map +1 -0
- package/dist/components/p-DPHDQvBy.js +58 -0
- package/dist/components/p-DPHDQvBy.js.map +1 -0
- package/dist/{ls-document-viewer/ls-feature-column.entry.js → components/p-DRlasxvX.js} +42 -12
- package/dist/components/p-DRlasxvX.js.map +1 -0
- package/dist/{ls-document-viewer/ls-keyboard-shortcuts.entry.js → components/p-DXhpjcQC.js} +30 -11
- package/dist/components/p-DXhpjcQC.js.map +1 -0
- package/dist/{ls-document-viewer/ls-toggle.entry.js → components/p-DYigxUng.js} +28 -10
- package/dist/components/p-DYigxUng.js.map +1 -0
- package/dist/{ls-document-viewer/ls-icon.entry.js → components/p-DdA-gazu.js} +29 -16
- package/dist/components/p-DdA-gazu.js.map +1 -0
- package/dist/{ls-document-viewer/editorUtils-BmgTspy1.js → components/p-DigkV_H3.js} +186 -53
- package/dist/components/p-DigkV_H3.js.map +1 -0
- package/dist/components/p-DmRC_Wu_.js +103 -0
- package/dist/components/p-DmRC_Wu_.js.map +1 -0
- package/dist/{ls-document-viewer/ls-props-section.entry.js → components/p-DmpTMpIK.js} +29 -9
- package/dist/components/p-DmpTMpIK.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-image.entry.js → components/p-Dn74AhFZ.js} +105 -9
- package/dist/components/p-Dn74AhFZ.js.map +1 -0
- package/dist/{ls-document-viewer/ls-validation-tag.entry.js → components/p-Dns9yEdO.js} +36 -10
- package/dist/components/p-Dns9yEdO.js.map +1 -0
- package/dist/{ls-document-viewer/ls-document-options.entry.js → components/p-DxIsh8n6.js} +54 -15
- package/dist/{ls-document-viewer/ls-document-options.entry.js.map → components/p-DxIsh8n6.js.map} +1 -1
- package/dist/{ls-document-viewer/ls-field-properties-text.entry.js → components/p-HL1D4YSy.js} +105 -9
- package/dist/components/p-HL1D4YSy.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-footer.entry.js → components/p-Jxy3zvjl.js} +36 -12
- package/dist/components/p-Jxy3zvjl.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-advanced.entry.js → components/p-Pb_M5CHe.js} +42 -11
- package/dist/components/p-Pb_M5CHe.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-signature.entry.js → components/p-WkfNRHiN.js} +105 -9
- package/dist/{ls-document-viewer/ls-field-properties-image.entry.js.map → components/p-WkfNRHiN.js.map} +1 -1
- package/dist/{ls-document-viewer/ls-field-properties-multiple.entry.js → components/p-_TQhquWF.js} +97 -13
- package/dist/{ls-document-viewer/ls-field-properties-multiple.entry.esm.js.map → components/p-_TQhquWF.js.map} +1 -1
- package/dist/{ls-document-viewer/ls-field-properties-general.entry.js → components/p-_fAfVUvN.js} +105 -9
- package/dist/components/p-_fAfVUvN.js.map +1 -0
- package/dist/{ls-document-viewer/ls-text-input.entry.js → components/p-ehKlmMJ5.js} +49 -11
- package/dist/components/p-ehKlmMJ5.js.map +1 -0
- package/dist/{ls-document-viewer/floating-ui.dom-DtWVTgos.js → components/p-gQGwMtz0.js} +8 -687
- package/dist/components/p-gQGwMtz0.js.map +1 -0
- package/dist/{ls-document-viewer/ls-field-properties-autosign.entry.js → components/p-sXbu_0hu.js} +63 -9
- package/dist/components/p-sXbu_0hu.js.map +1 -0
- package/dist/esm/index-BzcAlD18.js +1964 -0
- package/dist/esm/index-BzcAlD18.js.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/ls-document-options_42.entry.js +36064 -0
- package/dist/esm/ls-document-options_42.entry.js.map +1 -0
- package/dist/esm/ls-document-viewer.js +23 -0
- package/dist/esm/ls-document-viewer.js.map +1 -0
- package/dist/{ls-document-viewer → esm}/ls-field-properties-dropdown.entry.js +2 -2
- package/dist/esm/ls-field-properties-dropdown.entry.js.map +1 -0
- package/dist/{ls-document-viewer → esm}/ls-formfield.entry.js +3 -3
- package/dist/esm/ls-formfield.entry.js.map +1 -0
- package/dist/esm/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.js.map +1 -0
- package/dist/esm/ls-number-input_5.entry.js +198 -0
- package/dist/esm/ls-number-input_5.entry.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/ls-document-viewer/editorUtils-yhuXQze-.js.map +1 -0
- package/dist/ls-document-viewer/index.esm.js +1 -17
- package/dist/ls-document-viewer/ls-document-viewer.css +1 -259
- package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -49
- package/dist/ls-document-viewer/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.esm.js.map +1 -0
- package/dist/ls-document-viewer/p-3ff5b214.entry.js +2 -0
- package/dist/ls-document-viewer/p-3ff5b214.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-69931cd9.entry.js +4922 -0
- package/dist/ls-document-viewer/p-69931cd9.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-BzcAlD18.js +3 -0
- package/dist/ls-document-viewer/p-BzcAlD18.js.map +1 -0
- package/dist/ls-document-viewer/p-cfb2d2ff.entry.js +2 -0
- package/dist/ls-document-viewer/p-cfb2d2ff.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-d2eaa2ec.entry.js +2 -0
- package/dist/ls-document-viewer/p-d2eaa2ec.entry.js.map +1 -0
- package/dist/types/components/ls-document-viewer/adapter/LsDocumentAdapter.d.ts +1 -1
- package/dist/types/components/ls-document-viewer/editorUtils.d.ts +1 -1
- package/dist/types/types/LSApiTemplate.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ls-document-viewer/editorUtils-BmgTspy1.js.map +0 -1
- package/dist/ls-document-viewer/index-Dlkip55O.js +0 -4334
- package/dist/ls-document-viewer/ls-document-options.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-document-viewer.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-document-viewer.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-editor-field.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-editor-field.entry.js +0 -147
- package/dist/ls-document-viewer/ls-editor-field.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-editor-table.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-editor-table.entry.js +0 -40
- package/dist/ls-document-viewer/ls-editor-table.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-feature-column.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-feature-column.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-alignment.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-alignment.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-content.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-content.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-dimensions.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-dimensions.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-distribute.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-distribute.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-footer.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-footer.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-format.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-format.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-placement.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-placement.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-advanced.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-advanced.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-autosign.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-autosign.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-container.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-container.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-date.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-date.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-dropdown.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-email.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-email.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-file.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-file.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-general.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-image.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-multiple.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-number.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-number.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-signature.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-signature.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-text.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties-text.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-properties.entry.js +0 -55
- package/dist/ls-document-viewer/ls-field-properties.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-size.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-size.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-type-display.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-field-type-display.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-formfield.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-helper-bar.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-helper-bar.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-icon.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-icon.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-input-wrapper.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-input-wrapper.entry.js +0 -20
- package/dist/ls-document-viewer/ls-input-wrapper.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-keyboard-shortcuts.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-keyboard-shortcuts.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-number-input.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-number-input.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-page-loader.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-page-loader.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-participant-card.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-participant-card.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-participant-manager.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-participant-manager.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-participant-select.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-participant-select.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-props-section.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-props-section.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-radio-input.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-radio-input.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-select-input.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-select-input.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-statusbar.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-statusbar.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-text-input.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-text-input.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-textarea-input.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-textarea-input.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-toggle.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-toggle.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-toolbar.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-toolbar.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-toolbox-field.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-toolbox-field.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-tooltip.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-tooltip.entry.js.map +0 -1
- package/dist/ls-document-viewer/ls-validation-tag.entry.esm.js.map +0 -1
- package/dist/ls-document-viewer/ls-validation-tag.entry.js.map +0 -1
|
@@ -1,4334 +0,0 @@
|
|
|
1
|
-
const NAMESPACE = 'ls-document-viewer';
|
|
2
|
-
const BUILD = /* ls-document-viewer */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: false, cssAnnotations: true, devTools: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: true, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
|
-
const Env = /* ls-document-viewer */ {};
|
|
4
|
-
|
|
5
|
-
const globalScripts = () => {};
|
|
6
|
-
const globalStyles = ":root {\n /* Font Family */\n --font-family: 'IBM Plex Sans', sans-serif;\n\n /* Font Sizes & Line Heights */\n --text-xs: 0.75rem;\n --text-xs-line-height: 1rem;\n\n --text-sm: 0.875rem;\n --text-sm-line-height: 1.25rem;\n\n --text-base: 1rem;\n --text-base-line-height: 1.5rem;\n\n --text-lg: 1.125rem;\n --text-lg-line-height: 1.75rem;\n\n --text-xl: 1.25rem;\n --text-xl-line-height: 1.75rem;\n\n --text-2xl: 1.5rem;\n --text-2xl-line-height: 2rem;\n\n --text-3xl: 1.875rem;\n --text-3xl-line-height: 2.25rem;\n\n --text-4xl: 2.25rem;\n --text-4xl-line-height: 2.5rem;\n\n --text-5xl: 3rem;\n --text-5xl-line-height: 1;\n\n --text-6xl: 3.75rem;\n --text-6xl-line-height: 1;\n\n --text-7xl: 4.5rem;\n --text-7xl-line-height: 1;\n\n --text-9xl: 8rem;\n --text-9xl-line-height: 1;\n\n /* Font Weights */\n --font-weight-light: 300;\n --font-weight-normal: 400;\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --font-weight-black: 900;\n\n /* Border Radius */\n --radius-xs: 0.125rem;\n --radius-sm: 0.25rem;\n --radius-md: 0.375rem;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n\n /* Colors */\n --white: #ffffff;\n --black: #000000;\n\n --pink-10: #fff0f9;\n --pink-20: #ffe5f5;\n --pink-30: #fabee2;\n --pink-40: #f5a2d4;\n --pink-50: #fa78c6;\n --pink-60: #f056b2;\n --pink-70: #e043a2;\n --pink-80: #cc2d8c;\n --pink-90: #ad2376;\n --pink-100: #7a1451;\n\n --red-10: #fff0f0;\n --red-20: #ffe1e0;\n --red-30: #ffc9c7;\n --red-40: #ffa19e;\n --red-50: #ff706b;\n --red-60: #f64a44;\n --red-70: #dc2721;\n --red-80: #c1140e;\n --red-90: #990500;\n --red-100: #7a1714;\n\n --yellow-10: #fffcef;\n --yellow-20: #fff3c2;\n --yellow-30: #fcec9d;\n --yellow-40: #ffe561;\n --yellow-50: #fad232;\n --yellow-60: #f0b618;\n --yellow-70: #cc8904;\n --yellow-80: #9e5913;\n --yellow-90: #8a3f0e;\n --yellow-100: #70350d;\n\n --green-10: #effff9;\n --green-20: #c5fde8;\n --green-30: #9df5d4;\n --green-40: #72f0c2;\n --green-50: #57e5b1;\n --green-60: #46dbaa;\n --green-70: #33b88c;\n --green-80: #15946a;\n --green-90: #177559;\n --green-100: #125241;\n\n --teal-10: #effffc;\n --teal-20: #c5fcf1;\n --teal-30: #a5fae9;\n --teal-40: #76f5db;\n --teal-50: #54ebcd;\n --teal-60: #46dbbd;\n --teal-70: #33b8a2;\n --teal-80: #148f7e;\n --teal-90: #17756c;\n --teal-100: #15524c;\n\n --cyan-10: #efffff;\n --cyan-20: #c5fcfc;\n --cyan-30: #a0fafa;\n --cyan-40: #76f5f5;\n --cyan-50: #54ebeb;\n --cyan-60: #46dbdb;\n --cyan-70: #33b3b8;\n --cyan-80: #11868f;\n --cyan-90: #166a70;\n --cyan-100: #11474d;\n\n --lightblue-10: #effbff;\n --lightblue-20: #c7f1ff;\n --lightblue-30: #9de4fc;\n --lightblue-40: #79dbfc;\n --lightblue-50: #51d3ff;\n --lightblue-60: #48c5f0;\n --lightblue-70: #20a6d6;\n --lightblue-80: #0b80b2;\n --lightblue-90: #19648a;\n --lightblue-100: #0c3e57;\n\n --blue-10: #f0f6ff;\n --blue-20: #e0ecff;\n --blue-30: #bed4fa;\n --blue-40: #a2bdf5;\n --blue-50: #78a3fa;\n --blue-60: #5684f0;\n --blue-70: #4368e0;\n --blue-80: #2d4dcc;\n --blue-90: #233ead;\n --blue-100: #14287a;\n\n --purple-10: #f4f0ff;\n --purple-20: #eee5ff;\n --purple-30: #d6befa;\n --purple-40: #c6a2f5;\n --purple-50: #b078fa;\n --purple-60: #9956f0;\n --purple-70: #8743e0;\n --purple-80: #722dcc;\n --purple-90: #5f23ad;\n --purple-100: #40147a;\n\n --primary-10: #eff4ff;\n --primary-20: #c7ddff;\n --primary-30: #9dc3fc;\n --primary-40: #79adfc;\n --primary-50: #5185ff;\n --primary-60: #4456f6;\n --primary-70: #2134dc;\n --primary-80: #0e20c1;\n --primary-90: #000f99;\n --primary-100: #0c1457;\n\n --gray-10: #f7f8fa;\n --gray-20: #edeff2;\n --gray-30: #e0e2e5;\n --gray-40: #d8d9dc;\n --gray-50: #c8c9cc;\n --gray-60: #afb0b2;\n --gray-70: #939599;\n --gray-80: #6f7176;\n --gray-90: #5e6066;\n --gray-100: #45484d;\n --gray-110: #292c33;\n --gray-120: #151923;\n --gray-130: #0c1019;\n --gray-140: #05080d;\n\n --aubergine-10: #fcf0ff;\n --aubergine-20: #fae5ff;\n --aubergine-30: #eebefa;\n --aubergine-40: #e4a2f5;\n --aubergine-50: #e078fa;\n --aubergine-60: #d156f0;\n --aubergine-70: #c143e0;\n --aubergine-80: #ac2dcc;\n --aubergine-90: #9223ad;\n --aubergine-100: #66147a;\n\n --indigo-10: #f2f0ff;\n --indigo-20: #e9e5ff;\n --indigo-30: #c6befa;\n --indigo-40: #ada2f5;\n --indigo-50: #8978fa;\n --indigo-60: #6b56f0;\n --indigo-70: #5843e0;\n --indigo-80: #422dcc;\n --indigo-90: #3523ad;\n --indigo-100: #21147a;\n\n --lime-10: #fafff0;\n --lime-20: #f6ffe5;\n --lime-30: #e6fabe;\n --lime-40: #d9f5a2;\n --lime-50: #cffa78;\n --lime-60: #bdf056;\n --lime-70: #ace043;\n --lime-80: #97cc2d;\n --lime-90: #7fad23;\n --lime-100: #587a14;\n\n --trueGreen-10: #f0fff0;\n --trueGreen-20: #e5ffe5;\n --trueGreen-30: #befabe;\n --trueGreen-40: #a2f5a2;\n --trueGreen-50: #78fa78;\n --trueGreen-60: #56f056;\n --trueGreen-70: #43e043;\n --trueGreen-80: #2dcc2d;\n --trueGreen-90: #23ad23;\n --trueGreen-100: #147a14;\n\n --burnt-10: #fff6f0;\n --burnt-20: #fff0e5;\n --burnt-30: #fad6be;\n --burnt-40: #f5c3a2;\n --burnt-50: #faac78;\n --burnt-60: #f09456;\n --burnt-70: #e08243;\n --burnt-80: #cc6d2d;\n --burnt-90: #ad5a23;\n --burnt-100: #7a3d14;\n\n --shadow-base: 0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 3px rgba(0, 0, 0, 0.1);\n --shadow-lg: 0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05);\n --active: 0px 1px 3px rgba(0, 15, 153, 0.25), 0px 1px 2px rgba(0, 15, 153, 0.06), 0px 0px 0px 4px #9dc3fc;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-family);\n}\n\nhtml * {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n font-family: var(--font-family);\n font-size: var(--text-sm);\n text-align: left;\n}\n";
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
Stencil Client Platform v4.36.2 | MIT Licensed | https://stenciljs.com
|
|
10
|
-
*/
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __export = (target, all) => {
|
|
13
|
-
for (var name in all)
|
|
14
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
-
};
|
|
16
|
-
var Build = {
|
|
17
|
-
isDev: BUILD.isDev ? true : false,
|
|
18
|
-
isBrowser: true,
|
|
19
|
-
isServer: false,
|
|
20
|
-
isTesting: BUILD.isTesting ? true : false
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// src/utils/constants.ts
|
|
24
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
25
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
26
|
-
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
27
|
-
PrimitiveType2["Undefined"] = "undefined";
|
|
28
|
-
PrimitiveType2["Null"] = "null";
|
|
29
|
-
PrimitiveType2["String"] = "string";
|
|
30
|
-
PrimitiveType2["Number"] = "number";
|
|
31
|
-
PrimitiveType2["SpecialNumber"] = "number";
|
|
32
|
-
PrimitiveType2["Boolean"] = "boolean";
|
|
33
|
-
PrimitiveType2["BigInt"] = "bigint";
|
|
34
|
-
return PrimitiveType2;
|
|
35
|
-
})(PrimitiveType || {});
|
|
36
|
-
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
37
|
-
NonPrimitiveType2["Array"] = "array";
|
|
38
|
-
NonPrimitiveType2["Date"] = "date";
|
|
39
|
-
NonPrimitiveType2["Map"] = "map";
|
|
40
|
-
NonPrimitiveType2["Object"] = "object";
|
|
41
|
-
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
42
|
-
NonPrimitiveType2["Set"] = "set";
|
|
43
|
-
NonPrimitiveType2["Channel"] = "channel";
|
|
44
|
-
NonPrimitiveType2["Symbol"] = "symbol";
|
|
45
|
-
return NonPrimitiveType2;
|
|
46
|
-
})(NonPrimitiveType || {});
|
|
47
|
-
var TYPE_CONSTANT = "type";
|
|
48
|
-
var VALUE_CONSTANT = "value";
|
|
49
|
-
var SERIALIZED_PREFIX = "serialized:";
|
|
50
|
-
|
|
51
|
-
// src/utils/es2022-rewire-class-members.ts
|
|
52
|
-
var reWireGetterSetter = (instance, hostRef) => {
|
|
53
|
-
var _a;
|
|
54
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
55
|
-
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
56
|
-
members.map(([memberName, [memberFlags]]) => {
|
|
57
|
-
if ((BUILD.state || BUILD.prop) && (memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
58
|
-
const ogValue = instance[memberName];
|
|
59
|
-
const ogDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
|
|
60
|
-
Object.defineProperty(instance, memberName, {
|
|
61
|
-
get() {
|
|
62
|
-
return ogDescriptor.get.call(this);
|
|
63
|
-
},
|
|
64
|
-
set(newValue) {
|
|
65
|
-
ogDescriptor.set.call(this, newValue);
|
|
66
|
-
},
|
|
67
|
-
configurable: true,
|
|
68
|
-
enumerable: true
|
|
69
|
-
});
|
|
70
|
-
instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// src/client/client-host-ref.ts
|
|
76
|
-
var getHostRef = (ref) => {
|
|
77
|
-
if (ref.__stencil__getHostRef) {
|
|
78
|
-
return ref.__stencil__getHostRef();
|
|
79
|
-
}
|
|
80
|
-
return void 0;
|
|
81
|
-
};
|
|
82
|
-
var registerInstance = (lazyInstance, hostRef) => {
|
|
83
|
-
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
84
|
-
hostRef.$lazyInstance$ = lazyInstance;
|
|
85
|
-
if (BUILD.modernPropertyDecls && (BUILD.state || BUILD.prop)) {
|
|
86
|
-
reWireGetterSetter(lazyInstance, hostRef);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
var registerHost = (hostElement, cmpMeta) => {
|
|
90
|
-
const hostRef = {
|
|
91
|
-
$flags$: 0,
|
|
92
|
-
$hostElement$: hostElement,
|
|
93
|
-
$cmpMeta$: cmpMeta,
|
|
94
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
|
95
|
-
};
|
|
96
|
-
if (BUILD.isDev) {
|
|
97
|
-
hostRef.$renderCount$ = 0;
|
|
98
|
-
}
|
|
99
|
-
if (BUILD.method && BUILD.lazyLoad) {
|
|
100
|
-
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
101
|
-
}
|
|
102
|
-
if (BUILD.asyncLoading) {
|
|
103
|
-
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
104
|
-
hostElement["s-p"] = [];
|
|
105
|
-
hostElement["s-rc"] = [];
|
|
106
|
-
}
|
|
107
|
-
const ref = hostRef;
|
|
108
|
-
hostElement.__stencil__getHostRef = () => ref;
|
|
109
|
-
if (!BUILD.lazyLoad && BUILD.modernPropertyDecls && (BUILD.state || BUILD.prop)) {
|
|
110
|
-
reWireGetterSetter(hostElement, hostRef);
|
|
111
|
-
}
|
|
112
|
-
return ref;
|
|
113
|
-
};
|
|
114
|
-
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
115
|
-
var customError;
|
|
116
|
-
var consoleError = (e, el) => (customError || console.error)(e, el);
|
|
117
|
-
var STENCIL_DEV_MODE = BUILD.isTesting ? ["STENCIL:"] : [
|
|
118
|
-
"%cstencil",
|
|
119
|
-
"color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
|
|
120
|
-
];
|
|
121
|
-
var consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
|
|
122
|
-
var consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
|
|
123
|
-
var consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
|
|
124
|
-
var setErrorHandler = (handler) => customError = handler;
|
|
125
|
-
|
|
126
|
-
// src/client/client-load-module.ts
|
|
127
|
-
var cmpModules = /* @__PURE__ */ new Map();
|
|
128
|
-
var MODULE_IMPORT_PREFIX = "./";
|
|
129
|
-
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
130
|
-
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
131
|
-
const bundleId = cmpMeta.$lazyBundleId$;
|
|
132
|
-
if (BUILD.isDev && typeof bundleId !== "string") {
|
|
133
|
-
consoleDevError(
|
|
134
|
-
`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`
|
|
135
|
-
);
|
|
136
|
-
return void 0;
|
|
137
|
-
} else if (!bundleId) {
|
|
138
|
-
return void 0;
|
|
139
|
-
}
|
|
140
|
-
const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;
|
|
141
|
-
if (module) {
|
|
142
|
-
return module[exportName];
|
|
143
|
-
}
|
|
144
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
145
|
-
return import(
|
|
146
|
-
/* @vite-ignore */
|
|
147
|
-
/* webpackInclude: /\.entry\.js$/ */
|
|
148
|
-
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
149
|
-
/* webpackMode: "lazy" */
|
|
150
|
-
`./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? "?s-hmr=" + hmrVersionId : ""}`
|
|
151
|
-
).then(
|
|
152
|
-
(importedModule) => {
|
|
153
|
-
if (!BUILD.hotModuleReplacement) {
|
|
154
|
-
cmpModules.set(bundleId, importedModule);
|
|
155
|
-
}
|
|
156
|
-
return importedModule[exportName];
|
|
157
|
-
},
|
|
158
|
-
(e) => {
|
|
159
|
-
consoleError(e, hostRef.$hostElement$);
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
// src/client/client-style.ts
|
|
165
|
-
var styles = /* @__PURE__ */ new Map();
|
|
166
|
-
var modeResolutionChain = [];
|
|
167
|
-
var setScopedSSR = (_opts) => {
|
|
168
|
-
};
|
|
169
|
-
var needsScopedSSR = () => false;
|
|
170
|
-
|
|
171
|
-
// src/runtime/runtime-constants.ts
|
|
172
|
-
var CONTENT_REF_ID = "r";
|
|
173
|
-
var ORG_LOCATION_ID = "o";
|
|
174
|
-
var SLOT_NODE_ID = "s";
|
|
175
|
-
var TEXT_NODE_ID = "t";
|
|
176
|
-
var COMMENT_NODE_ID = "c";
|
|
177
|
-
var HYDRATE_ID = "s-id";
|
|
178
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
179
|
-
var HYDRATE_CHILD_ID = "c-id";
|
|
180
|
-
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
181
|
-
var STENCIL_DOC_DATA = "_stencilDocData";
|
|
182
|
-
var DEFAULT_DOC_DATA = {
|
|
183
|
-
hostIds: 0,
|
|
184
|
-
rootLevelIds: 0,
|
|
185
|
-
staticComponents: /* @__PURE__ */ new Set()
|
|
186
|
-
};
|
|
187
|
-
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
188
|
-
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
189
|
-
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
190
|
-
"formAssociatedCallback",
|
|
191
|
-
"formResetCallback",
|
|
192
|
-
"formDisabledCallback",
|
|
193
|
-
"formStateRestoreCallback"
|
|
194
|
-
];
|
|
195
|
-
var win = typeof window !== "undefined" ? window : {};
|
|
196
|
-
var H = win.HTMLElement || class {
|
|
197
|
-
};
|
|
198
|
-
var plt = {
|
|
199
|
-
$flags$: 0,
|
|
200
|
-
$resourcesUrl$: "",
|
|
201
|
-
jmp: (h2) => h2(),
|
|
202
|
-
raf: (h2) => requestAnimationFrame(h2),
|
|
203
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
204
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
205
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
206
|
-
};
|
|
207
|
-
var setPlatformHelpers = (helpers) => {
|
|
208
|
-
Object.assign(plt, helpers);
|
|
209
|
-
};
|
|
210
|
-
var supportsShadow = BUILD.shadowDom;
|
|
211
|
-
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
212
|
-
var _a;
|
|
213
|
-
let supportsListenerOptions2 = false;
|
|
214
|
-
try {
|
|
215
|
-
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
216
|
-
"e",
|
|
217
|
-
null,
|
|
218
|
-
Object.defineProperty({}, "passive", {
|
|
219
|
-
get() {
|
|
220
|
-
supportsListenerOptions2 = true;
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
);
|
|
224
|
-
} catch (e) {
|
|
225
|
-
}
|
|
226
|
-
return supportsListenerOptions2;
|
|
227
|
-
})();
|
|
228
|
-
var promiseResolve = (v) => Promise.resolve(v);
|
|
229
|
-
var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
|
|
230
|
-
try {
|
|
231
|
-
new CSSStyleSheet();
|
|
232
|
-
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
233
|
-
} catch (e) {
|
|
234
|
-
}
|
|
235
|
-
return false;
|
|
236
|
-
})() : false;
|
|
237
|
-
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
238
|
-
|
|
239
|
-
// src/client/client-task-queue.ts
|
|
240
|
-
var queueCongestion = 0;
|
|
241
|
-
var queuePending = false;
|
|
242
|
-
var queueDomReads = [];
|
|
243
|
-
var queueDomWrites = [];
|
|
244
|
-
var queueDomWritesLow = [];
|
|
245
|
-
var queueTask = (queue, write) => (cb) => {
|
|
246
|
-
queue.push(cb);
|
|
247
|
-
if (!queuePending) {
|
|
248
|
-
queuePending = true;
|
|
249
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
250
|
-
nextTick(flush);
|
|
251
|
-
} else {
|
|
252
|
-
plt.raf(flush);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
var consume = (queue) => {
|
|
257
|
-
for (let i2 = 0; i2 < queue.length; i2++) {
|
|
258
|
-
try {
|
|
259
|
-
queue[i2](performance.now());
|
|
260
|
-
} catch (e) {
|
|
261
|
-
consoleError(e);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
queue.length = 0;
|
|
265
|
-
};
|
|
266
|
-
var consumeTimeout = (queue, timeout) => {
|
|
267
|
-
let i2 = 0;
|
|
268
|
-
let ts = 0;
|
|
269
|
-
while (i2 < queue.length && (ts = performance.now()) < timeout) {
|
|
270
|
-
try {
|
|
271
|
-
queue[i2++](ts);
|
|
272
|
-
} catch (e) {
|
|
273
|
-
consoleError(e);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
if (i2 === queue.length) {
|
|
277
|
-
queue.length = 0;
|
|
278
|
-
} else if (i2 !== 0) {
|
|
279
|
-
queue.splice(0, i2);
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
var flush = () => {
|
|
283
|
-
if (BUILD.asyncQueue) {
|
|
284
|
-
queueCongestion++;
|
|
285
|
-
}
|
|
286
|
-
consume(queueDomReads);
|
|
287
|
-
if (BUILD.asyncQueue) {
|
|
288
|
-
const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1 / 10)) : Infinity;
|
|
289
|
-
consumeTimeout(queueDomWrites, timeout);
|
|
290
|
-
consumeTimeout(queueDomWritesLow, timeout);
|
|
291
|
-
if (queueDomWrites.length > 0) {
|
|
292
|
-
queueDomWritesLow.push(...queueDomWrites);
|
|
293
|
-
queueDomWrites.length = 0;
|
|
294
|
-
}
|
|
295
|
-
if (queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0) {
|
|
296
|
-
plt.raf(flush);
|
|
297
|
-
} else {
|
|
298
|
-
queueCongestion = 0;
|
|
299
|
-
}
|
|
300
|
-
} else {
|
|
301
|
-
consume(queueDomWrites);
|
|
302
|
-
if (queuePending = queueDomReads.length > 0) {
|
|
303
|
-
plt.raf(flush);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
var nextTick = (cb) => promiseResolve().then(cb);
|
|
308
|
-
var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
|
|
309
|
-
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
310
|
-
|
|
311
|
-
// src/runtime/asset-path.ts
|
|
312
|
-
var getAssetPath = (path) => {
|
|
313
|
-
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
314
|
-
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
315
|
-
};
|
|
316
|
-
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
317
|
-
|
|
318
|
-
// src/utils/helpers.ts
|
|
319
|
-
var isDef = (v) => v != null && v !== void 0;
|
|
320
|
-
var isComplexType = (o) => {
|
|
321
|
-
o = typeof o;
|
|
322
|
-
return o === "object" || o === "function";
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
326
|
-
function queryNonceMetaTagContent(doc) {
|
|
327
|
-
var _a, _b, _c;
|
|
328
|
-
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// src/utils/regular-expression.ts
|
|
332
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
333
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
// src/utils/remote-value.ts
|
|
337
|
-
var RemoteValue = class _RemoteValue {
|
|
338
|
-
/**
|
|
339
|
-
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
340
|
-
*
|
|
341
|
-
* @param serialized The serialized LocalValue object
|
|
342
|
-
* @returns The original JavaScript value/object
|
|
343
|
-
*/
|
|
344
|
-
static fromLocalValue(serialized) {
|
|
345
|
-
const type = serialized[TYPE_CONSTANT];
|
|
346
|
-
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
347
|
-
switch (type) {
|
|
348
|
-
case "string" /* String */:
|
|
349
|
-
return value;
|
|
350
|
-
case "boolean" /* Boolean */:
|
|
351
|
-
return value;
|
|
352
|
-
case "bigint" /* BigInt */:
|
|
353
|
-
return BigInt(value);
|
|
354
|
-
case "undefined" /* Undefined */:
|
|
355
|
-
return void 0;
|
|
356
|
-
case "null" /* Null */:
|
|
357
|
-
return null;
|
|
358
|
-
case "number" /* Number */:
|
|
359
|
-
if (value === "NaN") return NaN;
|
|
360
|
-
if (value === "-0") return -0;
|
|
361
|
-
if (value === "Infinity") return Infinity;
|
|
362
|
-
if (value === "-Infinity") return -Infinity;
|
|
363
|
-
return value;
|
|
364
|
-
case "array" /* Array */:
|
|
365
|
-
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
366
|
-
case "date" /* Date */:
|
|
367
|
-
return new Date(value);
|
|
368
|
-
case "map" /* Map */:
|
|
369
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
370
|
-
for (const [key, val] of value) {
|
|
371
|
-
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
372
|
-
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
373
|
-
map2.set(deserializedKey, deserializedValue);
|
|
374
|
-
}
|
|
375
|
-
return map2;
|
|
376
|
-
case "object" /* Object */:
|
|
377
|
-
const obj = {};
|
|
378
|
-
for (const [key, val] of value) {
|
|
379
|
-
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
380
|
-
}
|
|
381
|
-
return obj;
|
|
382
|
-
case "regexp" /* RegularExpression */:
|
|
383
|
-
const { pattern, flags } = value;
|
|
384
|
-
return new RegExp(pattern, flags);
|
|
385
|
-
case "set" /* Set */:
|
|
386
|
-
const set = /* @__PURE__ */ new Set();
|
|
387
|
-
for (const item of value) {
|
|
388
|
-
set.add(_RemoteValue.fromLocalValue(item));
|
|
389
|
-
}
|
|
390
|
-
return set;
|
|
391
|
-
case "symbol" /* Symbol */:
|
|
392
|
-
return Symbol(value);
|
|
393
|
-
default:
|
|
394
|
-
throw new Error(`Unsupported type: ${type}`);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Utility method to deserialize multiple LocalValues at once
|
|
399
|
-
*
|
|
400
|
-
* @param serializedValues Array of serialized LocalValue objects
|
|
401
|
-
* @returns Array of deserialized JavaScript values
|
|
402
|
-
*/
|
|
403
|
-
static fromLocalValueArray(serializedValues) {
|
|
404
|
-
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
408
|
-
*
|
|
409
|
-
* @param obj Object to verify
|
|
410
|
-
* @returns boolean indicating if the object has LocalValue structure
|
|
411
|
-
*/
|
|
412
|
-
static isLocalValueObject(obj) {
|
|
413
|
-
if (typeof obj !== "object" || obj === null) {
|
|
414
|
-
return false;
|
|
415
|
-
}
|
|
416
|
-
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
417
|
-
return false;
|
|
418
|
-
}
|
|
419
|
-
const type = obj[TYPE_CONSTANT];
|
|
420
|
-
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
421
|
-
if (!hasTypeProperty) {
|
|
422
|
-
return false;
|
|
423
|
-
}
|
|
424
|
-
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
425
|
-
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
426
|
-
}
|
|
427
|
-
return true;
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
// src/utils/result.ts
|
|
432
|
-
var result_exports = {};
|
|
433
|
-
__export(result_exports, {
|
|
434
|
-
err: () => err,
|
|
435
|
-
map: () => map,
|
|
436
|
-
ok: () => ok,
|
|
437
|
-
unwrap: () => unwrap,
|
|
438
|
-
unwrapErr: () => unwrapErr
|
|
439
|
-
});
|
|
440
|
-
var ok = (value) => ({
|
|
441
|
-
isOk: true,
|
|
442
|
-
isErr: false,
|
|
443
|
-
value
|
|
444
|
-
});
|
|
445
|
-
var err = (value) => ({
|
|
446
|
-
isOk: false,
|
|
447
|
-
isErr: true,
|
|
448
|
-
value
|
|
449
|
-
});
|
|
450
|
-
function map(result, fn) {
|
|
451
|
-
if (result.isOk) {
|
|
452
|
-
const val = fn(result.value);
|
|
453
|
-
if (val instanceof Promise) {
|
|
454
|
-
return val.then((newVal) => ok(newVal));
|
|
455
|
-
} else {
|
|
456
|
-
return ok(val);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
if (result.isErr) {
|
|
460
|
-
const value = result.value;
|
|
461
|
-
return err(value);
|
|
462
|
-
}
|
|
463
|
-
throw "should never get here";
|
|
464
|
-
}
|
|
465
|
-
var unwrap = (result) => {
|
|
466
|
-
if (result.isOk) {
|
|
467
|
-
return result.value;
|
|
468
|
-
} else {
|
|
469
|
-
throw result.value;
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
var unwrapErr = (result) => {
|
|
473
|
-
if (result.isErr) {
|
|
474
|
-
return result.value;
|
|
475
|
-
} else {
|
|
476
|
-
throw result.value;
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
// src/utils/serialize.ts
|
|
481
|
-
function deserializeProperty(value) {
|
|
482
|
-
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
483
|
-
return value;
|
|
484
|
-
}
|
|
485
|
-
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
// src/utils/style.ts
|
|
489
|
-
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
490
|
-
if (!styles2 || !supportsConstructableStylesheets) return void 0;
|
|
491
|
-
const sheet = new CSSStyleSheet();
|
|
492
|
-
sheet.replaceSync(styles2);
|
|
493
|
-
return sheet;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
// src/utils/shadow-root.ts
|
|
497
|
-
var globalStyleSheet;
|
|
498
|
-
function createShadowRoot(cmpMeta) {
|
|
499
|
-
var _a;
|
|
500
|
-
const shadowRoot = BUILD.shadowDelegatesFocus ? this.attachShadow({
|
|
501
|
-
mode: "open",
|
|
502
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
503
|
-
}) : this.attachShadow({ mode: "open" });
|
|
504
|
-
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
|
|
505
|
-
if (globalStyleSheet) {
|
|
506
|
-
if (supportsMutableAdoptedStyleSheets) {
|
|
507
|
-
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
508
|
-
} else {
|
|
509
|
-
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// src/utils/util.ts
|
|
515
|
-
var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
|
|
516
|
-
var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
|
|
517
|
-
var isTsFile = lowerPathParam(
|
|
518
|
-
(p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
|
|
519
|
-
);
|
|
520
|
-
var isTsxFile = lowerPathParam(
|
|
521
|
-
(p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
|
|
522
|
-
);
|
|
523
|
-
var isJsxFile = lowerPathParam(
|
|
524
|
-
(p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
|
|
525
|
-
);
|
|
526
|
-
var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
|
|
527
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
528
|
-
const childNodes = internalCall(elm, "childNodes");
|
|
529
|
-
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
530
|
-
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
531
|
-
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
532
|
-
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
533
|
-
slotNode.hidden = true;
|
|
534
|
-
} else {
|
|
535
|
-
slotNode.hidden = false;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
let i2 = 0;
|
|
541
|
-
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
542
|
-
const childNode = childNodes[i2];
|
|
543
|
-
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
544
|
-
updateFallbackSlotVisibility(childNode);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
var getSlottedChildNodes = (childNodes) => {
|
|
549
|
-
const result = [];
|
|
550
|
-
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
551
|
-
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
552
|
-
if (slottedNode && slottedNode.isConnected) {
|
|
553
|
-
result.push(slottedNode);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
return result;
|
|
557
|
-
};
|
|
558
|
-
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
559
|
-
let i2 = 0;
|
|
560
|
-
let slottedNodes = [];
|
|
561
|
-
let childNode;
|
|
562
|
-
for (; i2 < childNodes.length; i2++) {
|
|
563
|
-
childNode = childNodes[i2];
|
|
564
|
-
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
565
|
-
slottedNodes.push(childNode);
|
|
566
|
-
if (typeof slotName !== "undefined") return slottedNodes;
|
|
567
|
-
}
|
|
568
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
569
|
-
}
|
|
570
|
-
return slottedNodes;
|
|
571
|
-
}
|
|
572
|
-
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
573
|
-
const childNodes = [];
|
|
574
|
-
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
575
|
-
let node = slot;
|
|
576
|
-
while (node = node.nextSibling) {
|
|
577
|
-
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
578
|
-
}
|
|
579
|
-
return childNodes;
|
|
580
|
-
};
|
|
581
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
582
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
583
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
584
|
-
return true;
|
|
585
|
-
}
|
|
586
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
587
|
-
return true;
|
|
588
|
-
}
|
|
589
|
-
return false;
|
|
590
|
-
}
|
|
591
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
592
|
-
return true;
|
|
593
|
-
}
|
|
594
|
-
return slotName === "";
|
|
595
|
-
};
|
|
596
|
-
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
597
|
-
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
598
|
-
return;
|
|
599
|
-
}
|
|
600
|
-
const slottedNodeLocation = document.createTextNode("");
|
|
601
|
-
slottedNodeLocation["s-nr"] = newChild;
|
|
602
|
-
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
603
|
-
const parent = slotNode["s-cr"].parentNode;
|
|
604
|
-
const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
|
|
605
|
-
if (BUILD.hydrateClientSide && typeof position !== "undefined") {
|
|
606
|
-
slottedNodeLocation["s-oo"] = position;
|
|
607
|
-
const childNodes = internalCall(parent, "childNodes");
|
|
608
|
-
const slotRelocateNodes = [slottedNodeLocation];
|
|
609
|
-
childNodes.forEach((n) => {
|
|
610
|
-
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
611
|
-
});
|
|
612
|
-
slotRelocateNodes.sort((a, b) => {
|
|
613
|
-
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
614
|
-
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
615
|
-
return 0;
|
|
616
|
-
});
|
|
617
|
-
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
618
|
-
} else {
|
|
619
|
-
appendMethod.call(parent, slottedNodeLocation);
|
|
620
|
-
}
|
|
621
|
-
newChild["s-ol"] = slottedNodeLocation;
|
|
622
|
-
newChild["s-sh"] = slotNode["s-hn"];
|
|
623
|
-
};
|
|
624
|
-
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
625
|
-
function patchSlotNode(node) {
|
|
626
|
-
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
627
|
-
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
628
|
-
const toReturn = [];
|
|
629
|
-
const slotName = this["s-sn"];
|
|
630
|
-
if (opts == null ? void 0 : opts.flatten) {
|
|
631
|
-
console.error(`
|
|
632
|
-
Flattening is not supported for Stencil non-shadow slots.
|
|
633
|
-
You can use \`.childNodes\` to nested slot fallback content.
|
|
634
|
-
If you have a particular use case, please open an issue on the Stencil repo.
|
|
635
|
-
`);
|
|
636
|
-
}
|
|
637
|
-
const parent = this["s-cr"].parentElement;
|
|
638
|
-
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
639
|
-
slottedNodes.forEach((n) => {
|
|
640
|
-
if (slotName === getSlotName(n)) {
|
|
641
|
-
toReturn.push(n);
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
if (elementsOnly) {
|
|
645
|
-
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
646
|
-
}
|
|
647
|
-
return toReturn;
|
|
648
|
-
}).bind(node);
|
|
649
|
-
node.assignedElements = assignedFactory(true);
|
|
650
|
-
node.assignedNodes = assignedFactory(false);
|
|
651
|
-
}
|
|
652
|
-
function dispatchSlotChangeEvent(elm) {
|
|
653
|
-
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
654
|
-
}
|
|
655
|
-
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
656
|
-
var _a;
|
|
657
|
-
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
658
|
-
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
659
|
-
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
660
|
-
const childNodes = internalCall(parentHost, "childNodes");
|
|
661
|
-
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
662
|
-
return { slotNode, slotName };
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
// src/runtime/dom-extras.ts
|
|
666
|
-
var patchPseudoShadowDom = (hostElementPrototype) => {
|
|
667
|
-
patchCloneNode(hostElementPrototype);
|
|
668
|
-
patchSlotAppendChild(hostElementPrototype);
|
|
669
|
-
patchSlotAppend(hostElementPrototype);
|
|
670
|
-
patchSlotPrepend(hostElementPrototype);
|
|
671
|
-
patchSlotInsertAdjacentElement(hostElementPrototype);
|
|
672
|
-
patchSlotInsertAdjacentHTML(hostElementPrototype);
|
|
673
|
-
patchSlotInsertAdjacentText(hostElementPrototype);
|
|
674
|
-
patchInsertBefore(hostElementPrototype);
|
|
675
|
-
patchTextContent(hostElementPrototype);
|
|
676
|
-
patchChildSlotNodes(hostElementPrototype);
|
|
677
|
-
patchSlotRemoveChild(hostElementPrototype);
|
|
678
|
-
};
|
|
679
|
-
var patchCloneNode = (HostElementPrototype) => {
|
|
680
|
-
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
681
|
-
HostElementPrototype.cloneNode = function(deep) {
|
|
682
|
-
const srcNode = this;
|
|
683
|
-
const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
|
|
684
|
-
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
685
|
-
if (BUILD.slot && !isShadowDom && deep) {
|
|
686
|
-
let i2 = 0;
|
|
687
|
-
let slotted, nonStencilNode;
|
|
688
|
-
const stencilPrivates = [
|
|
689
|
-
"s-id",
|
|
690
|
-
"s-cr",
|
|
691
|
-
"s-lr",
|
|
692
|
-
"s-rc",
|
|
693
|
-
"s-sc",
|
|
694
|
-
"s-p",
|
|
695
|
-
"s-cn",
|
|
696
|
-
"s-sr",
|
|
697
|
-
"s-sn",
|
|
698
|
-
"s-hn",
|
|
699
|
-
"s-ol",
|
|
700
|
-
"s-nr",
|
|
701
|
-
"s-si",
|
|
702
|
-
"s-rf",
|
|
703
|
-
"s-scs"
|
|
704
|
-
];
|
|
705
|
-
const childNodes = this.__childNodes || this.childNodes;
|
|
706
|
-
for (; i2 < childNodes.length; i2++) {
|
|
707
|
-
slotted = childNodes[i2]["s-nr"];
|
|
708
|
-
nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
|
|
709
|
-
if (slotted) {
|
|
710
|
-
if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {
|
|
711
|
-
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
712
|
-
} else {
|
|
713
|
-
clonedNode.appendChild(slotted.cloneNode(true));
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
if (nonStencilNode) {
|
|
717
|
-
clonedNode.appendChild(childNodes[i2].cloneNode(true));
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
return clonedNode;
|
|
722
|
-
};
|
|
723
|
-
};
|
|
724
|
-
var patchSlotAppendChild = (HostElementPrototype) => {
|
|
725
|
-
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
726
|
-
HostElementPrototype.appendChild = function(newChild) {
|
|
727
|
-
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
728
|
-
if (slotNode) {
|
|
729
|
-
addSlotRelocateNode(newChild, slotNode);
|
|
730
|
-
const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
|
|
731
|
-
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
732
|
-
const parent = internalCall(appendAfter, "parentNode");
|
|
733
|
-
const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
|
|
734
|
-
dispatchSlotChangeEvent(slotNode);
|
|
735
|
-
updateFallbackSlotVisibility(this);
|
|
736
|
-
return insertedNode;
|
|
737
|
-
}
|
|
738
|
-
return this.__appendChild(newChild);
|
|
739
|
-
};
|
|
740
|
-
};
|
|
741
|
-
var patchSlotRemoveChild = (ElementPrototype) => {
|
|
742
|
-
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
743
|
-
ElementPrototype.removeChild = function(toRemove) {
|
|
744
|
-
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
745
|
-
const childNodes = this.__childNodes || this.childNodes;
|
|
746
|
-
const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
|
|
747
|
-
if (slotNode && toRemove.isConnected) {
|
|
748
|
-
toRemove.remove();
|
|
749
|
-
updateFallbackSlotVisibility(this);
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
return this.__removeChild(toRemove);
|
|
754
|
-
};
|
|
755
|
-
};
|
|
756
|
-
var patchSlotPrepend = (HostElementPrototype) => {
|
|
757
|
-
HostElementPrototype.__prepend = HostElementPrototype.prepend;
|
|
758
|
-
HostElementPrototype.prepend = function(...newChildren) {
|
|
759
|
-
newChildren.forEach((newChild) => {
|
|
760
|
-
if (typeof newChild === "string") {
|
|
761
|
-
newChild = this.ownerDocument.createTextNode(newChild);
|
|
762
|
-
}
|
|
763
|
-
const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
|
|
764
|
-
const childNodes = internalCall(this, "childNodes");
|
|
765
|
-
const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
|
|
766
|
-
if (slotNode) {
|
|
767
|
-
addSlotRelocateNode(newChild, slotNode, true);
|
|
768
|
-
const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
|
|
769
|
-
const appendAfter = slotChildNodes[0];
|
|
770
|
-
const parent = internalCall(appendAfter, "parentNode");
|
|
771
|
-
const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
|
|
772
|
-
dispatchSlotChangeEvent(slotNode);
|
|
773
|
-
return toReturn;
|
|
774
|
-
}
|
|
775
|
-
if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
|
|
776
|
-
newChild.hidden = true;
|
|
777
|
-
}
|
|
778
|
-
return HostElementPrototype.__prepend(newChild);
|
|
779
|
-
});
|
|
780
|
-
};
|
|
781
|
-
};
|
|
782
|
-
var patchSlotAppend = (HostElementPrototype) => {
|
|
783
|
-
HostElementPrototype.__append = HostElementPrototype.append;
|
|
784
|
-
HostElementPrototype.append = function(...newChildren) {
|
|
785
|
-
newChildren.forEach((newChild) => {
|
|
786
|
-
if (typeof newChild === "string") {
|
|
787
|
-
newChild = this.ownerDocument.createTextNode(newChild);
|
|
788
|
-
}
|
|
789
|
-
this.appendChild(newChild);
|
|
790
|
-
});
|
|
791
|
-
};
|
|
792
|
-
};
|
|
793
|
-
var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
|
|
794
|
-
const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
|
|
795
|
-
HostElementPrototype.insertAdjacentHTML = function(position, text) {
|
|
796
|
-
if (position !== "afterbegin" && position !== "beforeend") {
|
|
797
|
-
return originalInsertAdjacentHtml.call(this, position, text);
|
|
798
|
-
}
|
|
799
|
-
const container = this.ownerDocument.createElement("_");
|
|
800
|
-
let node;
|
|
801
|
-
container.innerHTML = text;
|
|
802
|
-
if (position === "afterbegin") {
|
|
803
|
-
while (node = container.firstChild) {
|
|
804
|
-
this.prepend(node);
|
|
805
|
-
}
|
|
806
|
-
} else if (position === "beforeend") {
|
|
807
|
-
while (node = container.firstChild) {
|
|
808
|
-
this.append(node);
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
};
|
|
812
|
-
};
|
|
813
|
-
var patchSlotInsertAdjacentText = (HostElementPrototype) => {
|
|
814
|
-
HostElementPrototype.insertAdjacentText = function(position, text) {
|
|
815
|
-
this.insertAdjacentHTML(position, text);
|
|
816
|
-
};
|
|
817
|
-
};
|
|
818
|
-
var patchInsertBefore = (HostElementPrototype) => {
|
|
819
|
-
const eleProto = HostElementPrototype;
|
|
820
|
-
if (eleProto.__insertBefore) return;
|
|
821
|
-
eleProto.__insertBefore = HostElementPrototype.insertBefore;
|
|
822
|
-
HostElementPrototype.insertBefore = function(newChild, currentChild) {
|
|
823
|
-
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
824
|
-
const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
825
|
-
if (slotNode) {
|
|
826
|
-
let found = false;
|
|
827
|
-
slottedNodes.forEach((childNode) => {
|
|
828
|
-
if (childNode === currentChild || currentChild === null) {
|
|
829
|
-
found = true;
|
|
830
|
-
if (currentChild === null || slotName !== currentChild["s-sn"]) {
|
|
831
|
-
this.appendChild(newChild);
|
|
832
|
-
return;
|
|
833
|
-
}
|
|
834
|
-
if (slotName === currentChild["s-sn"]) {
|
|
835
|
-
addSlotRelocateNode(newChild, slotNode);
|
|
836
|
-
const parent = internalCall(currentChild, "parentNode");
|
|
837
|
-
internalCall(parent, "insertBefore")(newChild, currentChild);
|
|
838
|
-
dispatchSlotChangeEvent(slotNode);
|
|
839
|
-
}
|
|
840
|
-
return;
|
|
841
|
-
}
|
|
842
|
-
});
|
|
843
|
-
if (found) return newChild;
|
|
844
|
-
}
|
|
845
|
-
const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
|
|
846
|
-
if (parentNode && !this.isSameNode(parentNode)) {
|
|
847
|
-
return this.appendChild(newChild);
|
|
848
|
-
}
|
|
849
|
-
return this.__insertBefore(newChild, currentChild);
|
|
850
|
-
};
|
|
851
|
-
};
|
|
852
|
-
var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
853
|
-
const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
|
|
854
|
-
HostElementPrototype.insertAdjacentElement = function(position, element) {
|
|
855
|
-
if (position !== "afterbegin" && position !== "beforeend") {
|
|
856
|
-
return originalInsertAdjacentElement.call(this, position, element);
|
|
857
|
-
}
|
|
858
|
-
if (position === "afterbegin") {
|
|
859
|
-
this.prepend(element);
|
|
860
|
-
return element;
|
|
861
|
-
} else if (position === "beforeend") {
|
|
862
|
-
this.append(element);
|
|
863
|
-
return element;
|
|
864
|
-
}
|
|
865
|
-
return element;
|
|
866
|
-
};
|
|
867
|
-
};
|
|
868
|
-
var patchTextContent = (hostElementPrototype) => {
|
|
869
|
-
patchHostOriginalAccessor("textContent", hostElementPrototype);
|
|
870
|
-
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
871
|
-
get: function() {
|
|
872
|
-
let text = "";
|
|
873
|
-
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
874
|
-
childNodes.forEach((node) => text += node.textContent || "");
|
|
875
|
-
return text;
|
|
876
|
-
},
|
|
877
|
-
set: function(value) {
|
|
878
|
-
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
879
|
-
childNodes.forEach((node) => {
|
|
880
|
-
if (node["s-ol"]) node["s-ol"].remove();
|
|
881
|
-
node.remove();
|
|
882
|
-
});
|
|
883
|
-
this.insertAdjacentHTML("beforeend", value);
|
|
884
|
-
}
|
|
885
|
-
});
|
|
886
|
-
};
|
|
887
|
-
var patchChildSlotNodes = (elm) => {
|
|
888
|
-
class FakeNodeList extends Array {
|
|
889
|
-
item(n) {
|
|
890
|
-
return this[n];
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
patchHostOriginalAccessor("children", elm);
|
|
894
|
-
Object.defineProperty(elm, "children", {
|
|
895
|
-
get() {
|
|
896
|
-
return this.childNodes.filter((n) => n.nodeType === 1);
|
|
897
|
-
}
|
|
898
|
-
});
|
|
899
|
-
Object.defineProperty(elm, "childElementCount", {
|
|
900
|
-
get() {
|
|
901
|
-
return this.children.length;
|
|
902
|
-
}
|
|
903
|
-
});
|
|
904
|
-
patchHostOriginalAccessor("firstChild", elm);
|
|
905
|
-
Object.defineProperty(elm, "firstChild", {
|
|
906
|
-
get() {
|
|
907
|
-
return this.childNodes[0];
|
|
908
|
-
}
|
|
909
|
-
});
|
|
910
|
-
patchHostOriginalAccessor("lastChild", elm);
|
|
911
|
-
Object.defineProperty(elm, "lastChild", {
|
|
912
|
-
get() {
|
|
913
|
-
return this.childNodes[this.childNodes.length - 1];
|
|
914
|
-
}
|
|
915
|
-
});
|
|
916
|
-
patchHostOriginalAccessor("childNodes", elm);
|
|
917
|
-
Object.defineProperty(elm, "childNodes", {
|
|
918
|
-
get() {
|
|
919
|
-
const result = new FakeNodeList();
|
|
920
|
-
result.push(...getSlottedChildNodes(this.__childNodes));
|
|
921
|
-
return result;
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
};
|
|
925
|
-
var patchSlottedNode = (node) => {
|
|
926
|
-
if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
|
|
927
|
-
patchNextSibling(node);
|
|
928
|
-
patchPreviousSibling(node);
|
|
929
|
-
patchParentNode(node);
|
|
930
|
-
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
931
|
-
patchNextElementSibling(node);
|
|
932
|
-
patchPreviousElementSibling(node);
|
|
933
|
-
}
|
|
934
|
-
};
|
|
935
|
-
var patchNextSibling = (node) => {
|
|
936
|
-
if (!node || node.__nextSibling) return;
|
|
937
|
-
patchHostOriginalAccessor("nextSibling", node);
|
|
938
|
-
Object.defineProperty(node, "nextSibling", {
|
|
939
|
-
get: function() {
|
|
940
|
-
var _a;
|
|
941
|
-
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
942
|
-
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
943
|
-
if (parentNodes && index > -1) {
|
|
944
|
-
return parentNodes[index + 1];
|
|
945
|
-
}
|
|
946
|
-
return this.__nextSibling;
|
|
947
|
-
}
|
|
948
|
-
});
|
|
949
|
-
};
|
|
950
|
-
var patchNextElementSibling = (element) => {
|
|
951
|
-
if (!element || element.__nextElementSibling) return;
|
|
952
|
-
patchHostOriginalAccessor("nextElementSibling", element);
|
|
953
|
-
Object.defineProperty(element, "nextElementSibling", {
|
|
954
|
-
get: function() {
|
|
955
|
-
var _a;
|
|
956
|
-
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
957
|
-
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
958
|
-
if (parentEles && index > -1) {
|
|
959
|
-
return parentEles[index + 1];
|
|
960
|
-
}
|
|
961
|
-
return this.__nextElementSibling;
|
|
962
|
-
}
|
|
963
|
-
});
|
|
964
|
-
};
|
|
965
|
-
var patchPreviousSibling = (node) => {
|
|
966
|
-
if (!node || node.__previousSibling) return;
|
|
967
|
-
patchHostOriginalAccessor("previousSibling", node);
|
|
968
|
-
Object.defineProperty(node, "previousSibling", {
|
|
969
|
-
get: function() {
|
|
970
|
-
var _a;
|
|
971
|
-
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
972
|
-
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
973
|
-
if (parentNodes && index > -1) {
|
|
974
|
-
return parentNodes[index - 1];
|
|
975
|
-
}
|
|
976
|
-
return this.__previousSibling;
|
|
977
|
-
}
|
|
978
|
-
});
|
|
979
|
-
};
|
|
980
|
-
var patchPreviousElementSibling = (element) => {
|
|
981
|
-
if (!element || element.__previousElementSibling) return;
|
|
982
|
-
patchHostOriginalAccessor("previousElementSibling", element);
|
|
983
|
-
Object.defineProperty(element, "previousElementSibling", {
|
|
984
|
-
get: function() {
|
|
985
|
-
var _a;
|
|
986
|
-
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
987
|
-
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
988
|
-
if (parentNodes && index > -1) {
|
|
989
|
-
return parentNodes[index - 1];
|
|
990
|
-
}
|
|
991
|
-
return this.__previousElementSibling;
|
|
992
|
-
}
|
|
993
|
-
});
|
|
994
|
-
};
|
|
995
|
-
var patchParentNode = (node) => {
|
|
996
|
-
if (!node || node.__parentNode) return;
|
|
997
|
-
patchHostOriginalAccessor("parentNode", node);
|
|
998
|
-
Object.defineProperty(node, "parentNode", {
|
|
999
|
-
get: function() {
|
|
1000
|
-
var _a;
|
|
1001
|
-
return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
|
|
1002
|
-
},
|
|
1003
|
-
set: function(value) {
|
|
1004
|
-
this.__parentNode = value;
|
|
1005
|
-
}
|
|
1006
|
-
});
|
|
1007
|
-
};
|
|
1008
|
-
var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
|
|
1009
|
-
var validNodesPatches = [
|
|
1010
|
-
"childNodes",
|
|
1011
|
-
"firstChild",
|
|
1012
|
-
"lastChild",
|
|
1013
|
-
"nextSibling",
|
|
1014
|
-
"previousSibling",
|
|
1015
|
-
"textContent",
|
|
1016
|
-
"parentNode"
|
|
1017
|
-
];
|
|
1018
|
-
function patchHostOriginalAccessor(accessorName, node) {
|
|
1019
|
-
if (!globalThis.Node || !globalThis.Element) {
|
|
1020
|
-
return;
|
|
1021
|
-
}
|
|
1022
|
-
let accessor;
|
|
1023
|
-
if (validElementPatches.includes(accessorName)) {
|
|
1024
|
-
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
1025
|
-
} else if (validNodesPatches.includes(accessorName)) {
|
|
1026
|
-
accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
|
|
1027
|
-
}
|
|
1028
|
-
if (!accessor) {
|
|
1029
|
-
accessor = Object.getOwnPropertyDescriptor(node, accessorName);
|
|
1030
|
-
}
|
|
1031
|
-
if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
|
|
1032
|
-
}
|
|
1033
|
-
function internalCall(node, method) {
|
|
1034
|
-
if ("__" + method in node) {
|
|
1035
|
-
const toReturn = node["__" + method];
|
|
1036
|
-
if (typeof toReturn !== "function") return toReturn;
|
|
1037
|
-
return toReturn.bind(node);
|
|
1038
|
-
} else {
|
|
1039
|
-
if (typeof node[method] !== "function") return node[method];
|
|
1040
|
-
return node[method].bind(node);
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
var i = 0;
|
|
1044
|
-
var createTime = (fnName, tagName = "") => {
|
|
1045
|
-
if (BUILD.profile && performance.mark) {
|
|
1046
|
-
const key = `st:${fnName}:${tagName}:${i++}`;
|
|
1047
|
-
performance.mark(key);
|
|
1048
|
-
return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
|
|
1049
|
-
} else {
|
|
1050
|
-
return () => {
|
|
1051
|
-
return;
|
|
1052
|
-
};
|
|
1053
|
-
}
|
|
1054
|
-
};
|
|
1055
|
-
var uniqueTime = (key, measureText) => {
|
|
1056
|
-
if (BUILD.profile && performance.mark) {
|
|
1057
|
-
if (performance.getEntriesByName(key, "mark").length === 0) {
|
|
1058
|
-
performance.mark(key);
|
|
1059
|
-
}
|
|
1060
|
-
return () => {
|
|
1061
|
-
if (performance.getEntriesByName(measureText, "measure").length === 0) {
|
|
1062
|
-
performance.measure(measureText, key);
|
|
1063
|
-
}
|
|
1064
|
-
};
|
|
1065
|
-
} else {
|
|
1066
|
-
return () => {
|
|
1067
|
-
return;
|
|
1068
|
-
};
|
|
1069
|
-
}
|
|
1070
|
-
};
|
|
1071
|
-
var inspect = (ref) => {
|
|
1072
|
-
const hostRef = getHostRef(ref);
|
|
1073
|
-
if (!hostRef) {
|
|
1074
|
-
return void 0;
|
|
1075
|
-
}
|
|
1076
|
-
const flags = hostRef.$flags$;
|
|
1077
|
-
const hostElement = hostRef.$hostElement$;
|
|
1078
|
-
return {
|
|
1079
|
-
renderCount: hostRef.$renderCount$,
|
|
1080
|
-
flags: {
|
|
1081
|
-
hasRendered: !!(flags & 2 /* hasRendered */),
|
|
1082
|
-
hasConnected: !!(flags & 1 /* hasConnected */),
|
|
1083
|
-
isWaitingForChildren: !!(flags & 4 /* isWaitingForChildren */),
|
|
1084
|
-
isConstructingInstance: !!(flags & 8 /* isConstructingInstance */),
|
|
1085
|
-
isQueuedForUpdate: !!(flags & 16 /* isQueuedForUpdate */),
|
|
1086
|
-
hasInitializedComponent: !!(flags & 32 /* hasInitializedComponent */),
|
|
1087
|
-
hasLoadedComponent: !!(flags & 64 /* hasLoadedComponent */),
|
|
1088
|
-
isWatchReady: !!(flags & 128 /* isWatchReady */),
|
|
1089
|
-
isListenReady: !!(flags & 256 /* isListenReady */),
|
|
1090
|
-
needsRerender: !!(flags & 512 /* needsRerender */)
|
|
1091
|
-
},
|
|
1092
|
-
instanceValues: hostRef.$instanceValues$,
|
|
1093
|
-
ancestorComponent: hostRef.$ancestorComponent$,
|
|
1094
|
-
hostElement,
|
|
1095
|
-
lazyInstance: hostRef.$lazyInstance$,
|
|
1096
|
-
vnode: hostRef.$vnode$,
|
|
1097
|
-
modeName: hostRef.$modeName$,
|
|
1098
|
-
onReadyPromise: hostRef.$onReadyPromise$,
|
|
1099
|
-
onReadyResolve: hostRef.$onReadyResolve$,
|
|
1100
|
-
onInstancePromise: hostRef.$onInstancePromise$,
|
|
1101
|
-
onInstanceResolve: hostRef.$onInstanceResolve$,
|
|
1102
|
-
onRenderResolve: hostRef.$onRenderResolve$,
|
|
1103
|
-
queuedListeners: hostRef.$queuedListeners$,
|
|
1104
|
-
rmListeners: hostRef.$rmListeners$,
|
|
1105
|
-
["s-id"]: hostElement["s-id"],
|
|
1106
|
-
["s-cr"]: hostElement["s-cr"],
|
|
1107
|
-
["s-lr"]: hostElement["s-lr"],
|
|
1108
|
-
["s-p"]: hostElement["s-p"],
|
|
1109
|
-
["s-rc"]: hostElement["s-rc"],
|
|
1110
|
-
["s-sc"]: hostElement["s-sc"]
|
|
1111
|
-
};
|
|
1112
|
-
};
|
|
1113
|
-
var installDevTools = () => {
|
|
1114
|
-
if (BUILD.devTools) {
|
|
1115
|
-
const stencil = win.stencil = win.stencil || {};
|
|
1116
|
-
const originalInspect = stencil.inspect;
|
|
1117
|
-
stencil.inspect = (ref) => {
|
|
1118
|
-
let result = inspect(ref);
|
|
1119
|
-
if (!result && typeof originalInspect === "function") {
|
|
1120
|
-
result = originalInspect(ref);
|
|
1121
|
-
}
|
|
1122
|
-
return result;
|
|
1123
|
-
};
|
|
1124
|
-
}
|
|
1125
|
-
};
|
|
1126
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1127
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1128
|
-
let style = styles.get(scopeId2);
|
|
1129
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
1130
|
-
style = style || new CSSStyleSheet();
|
|
1131
|
-
if (typeof style === "string") {
|
|
1132
|
-
style = cssText;
|
|
1133
|
-
} else {
|
|
1134
|
-
style.replaceSync(cssText);
|
|
1135
|
-
}
|
|
1136
|
-
} else {
|
|
1137
|
-
style = cssText;
|
|
1138
|
-
}
|
|
1139
|
-
styles.set(scopeId2, style);
|
|
1140
|
-
};
|
|
1141
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1142
|
-
var _a;
|
|
1143
|
-
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
1144
|
-
const style = styles.get(scopeId2);
|
|
1145
|
-
if (!BUILD.attachStyles || !win.document) {
|
|
1146
|
-
return scopeId2;
|
|
1147
|
-
}
|
|
1148
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1149
|
-
if (style) {
|
|
1150
|
-
if (typeof style === "string") {
|
|
1151
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1152
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1153
|
-
let styleElm;
|
|
1154
|
-
if (!appliedStyles) {
|
|
1155
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1156
|
-
}
|
|
1157
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
1158
|
-
if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1159
|
-
styleElm.innerHTML = style;
|
|
1160
|
-
} else {
|
|
1161
|
-
styleElm = win.document.createElement("style");
|
|
1162
|
-
styleElm.innerHTML = style;
|
|
1163
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1164
|
-
if (nonce != null) {
|
|
1165
|
-
styleElm.setAttribute("nonce", nonce);
|
|
1166
|
-
}
|
|
1167
|
-
if ((BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
|
|
1168
|
-
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
1169
|
-
}
|
|
1170
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1171
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
1172
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1173
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1174
|
-
styleContainerNode.insertBefore(
|
|
1175
|
-
styleElm,
|
|
1176
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1177
|
-
);
|
|
1178
|
-
} else if ("host" in styleContainerNode) {
|
|
1179
|
-
if (supportsConstructableStylesheets) {
|
|
1180
|
-
const stylesheet = new CSSStyleSheet();
|
|
1181
|
-
stylesheet.replaceSync(style);
|
|
1182
|
-
if (supportsMutableAdoptedStyleSheets) {
|
|
1183
|
-
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
1184
|
-
} else {
|
|
1185
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1186
|
-
}
|
|
1187
|
-
} else {
|
|
1188
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1189
|
-
if (existingStyleContainer) {
|
|
1190
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1191
|
-
} else {
|
|
1192
|
-
styleContainerNode.prepend(styleElm);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
} else {
|
|
1196
|
-
styleContainerNode.append(styleElm);
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1200
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1204
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1205
|
-
}
|
|
1206
|
-
if (appliedStyles) {
|
|
1207
|
-
appliedStyles.add(scopeId2);
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
} else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1211
|
-
if (supportsMutableAdoptedStyleSheets) {
|
|
1212
|
-
styleContainerNode.adoptedStyleSheets.push(style);
|
|
1213
|
-
} else {
|
|
1214
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
return scopeId2;
|
|
1219
|
-
};
|
|
1220
|
-
var attachStyles = (hostRef) => {
|
|
1221
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1222
|
-
const elm = hostRef.$hostElement$;
|
|
1223
|
-
const flags = cmpMeta.$flags$;
|
|
1224
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1225
|
-
const scopeId2 = addStyle(
|
|
1226
|
-
BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1227
|
-
cmpMeta,
|
|
1228
|
-
hostRef.$modeName$
|
|
1229
|
-
);
|
|
1230
|
-
if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
1231
|
-
elm["s-sc"] = scopeId2;
|
|
1232
|
-
elm.classList.add(scopeId2 + "-h");
|
|
1233
|
-
}
|
|
1234
|
-
endAttachStyles();
|
|
1235
|
-
};
|
|
1236
|
-
var getScopeId = (cmp, mode) => "sc-" + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
1237
|
-
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1238
|
-
var hydrateScopedToShadow = () => {
|
|
1239
|
-
if (!win.document) {
|
|
1240
|
-
return;
|
|
1241
|
-
}
|
|
1242
|
-
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1243
|
-
let i2 = 0;
|
|
1244
|
-
for (; i2 < styles2.length; i2++) {
|
|
1245
|
-
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1246
|
-
}
|
|
1247
|
-
};
|
|
1248
|
-
var h = (nodeName, vnodeData, ...children) => {
|
|
1249
|
-
let child = null;
|
|
1250
|
-
let key = null;
|
|
1251
|
-
let slotName = null;
|
|
1252
|
-
let simple = false;
|
|
1253
|
-
let lastSimple = false;
|
|
1254
|
-
const vNodeChildren = [];
|
|
1255
|
-
const walk = (c) => {
|
|
1256
|
-
for (let i2 = 0; i2 < c.length; i2++) {
|
|
1257
|
-
child = c[i2];
|
|
1258
|
-
if (Array.isArray(child)) {
|
|
1259
|
-
walk(child);
|
|
1260
|
-
} else if (child != null && typeof child !== "boolean") {
|
|
1261
|
-
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
1262
|
-
child = String(child);
|
|
1263
|
-
} else if (BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
1264
|
-
consoleDevError(`vNode passed as children has unexpected type.
|
|
1265
|
-
Make sure it's using the correct h() function.
|
|
1266
|
-
Empty objects can also be the cause, look for JSX comments that became objects.`);
|
|
1267
|
-
}
|
|
1268
|
-
if (simple && lastSimple) {
|
|
1269
|
-
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
1270
|
-
} else {
|
|
1271
|
-
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
1272
|
-
}
|
|
1273
|
-
lastSimple = simple;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
};
|
|
1277
|
-
walk(children);
|
|
1278
|
-
if (vnodeData) {
|
|
1279
|
-
if (BUILD.isDev && nodeName === "input") {
|
|
1280
|
-
validateInputProperties(vnodeData);
|
|
1281
|
-
}
|
|
1282
|
-
if (BUILD.vdomKey && vnodeData.key) {
|
|
1283
|
-
key = vnodeData.key;
|
|
1284
|
-
}
|
|
1285
|
-
if (BUILD.slotRelocation && vnodeData.name) {
|
|
1286
|
-
slotName = vnodeData.name;
|
|
1287
|
-
}
|
|
1288
|
-
if (BUILD.vdomClass) {
|
|
1289
|
-
const classData = vnodeData.className || vnodeData.class;
|
|
1290
|
-
if (classData) {
|
|
1291
|
-
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
if (BUILD.isDev && vNodeChildren.some(isHost)) {
|
|
1296
|
-
consoleDevError(`The <Host> must be the single root component. Make sure:
|
|
1297
|
-
- You are NOT using hostData() and <Host> in the same component.
|
|
1298
|
-
- <Host> is used once, and it's the single root component of the render() function.`);
|
|
1299
|
-
}
|
|
1300
|
-
if (BUILD.vdomFunctional && typeof nodeName === "function") {
|
|
1301
|
-
return nodeName(
|
|
1302
|
-
vnodeData === null ? {} : vnodeData,
|
|
1303
|
-
vNodeChildren,
|
|
1304
|
-
vdomFnUtils
|
|
1305
|
-
);
|
|
1306
|
-
}
|
|
1307
|
-
const vnode = newVNode(nodeName, null);
|
|
1308
|
-
vnode.$attrs$ = vnodeData;
|
|
1309
|
-
if (vNodeChildren.length > 0) {
|
|
1310
|
-
vnode.$children$ = vNodeChildren;
|
|
1311
|
-
}
|
|
1312
|
-
if (BUILD.vdomKey) {
|
|
1313
|
-
vnode.$key$ = key;
|
|
1314
|
-
}
|
|
1315
|
-
if (BUILD.slotRelocation) {
|
|
1316
|
-
vnode.$name$ = slotName;
|
|
1317
|
-
}
|
|
1318
|
-
return vnode;
|
|
1319
|
-
};
|
|
1320
|
-
var newVNode = (tag, text) => {
|
|
1321
|
-
const vnode = {
|
|
1322
|
-
$flags$: 0,
|
|
1323
|
-
$tag$: tag,
|
|
1324
|
-
$text$: text,
|
|
1325
|
-
$elm$: null,
|
|
1326
|
-
$children$: null
|
|
1327
|
-
};
|
|
1328
|
-
if (BUILD.vdomAttribute) {
|
|
1329
|
-
vnode.$attrs$ = null;
|
|
1330
|
-
}
|
|
1331
|
-
if (BUILD.vdomKey) {
|
|
1332
|
-
vnode.$key$ = null;
|
|
1333
|
-
}
|
|
1334
|
-
if (BUILD.slotRelocation) {
|
|
1335
|
-
vnode.$name$ = null;
|
|
1336
|
-
}
|
|
1337
|
-
return vnode;
|
|
1338
|
-
};
|
|
1339
|
-
var Host = {};
|
|
1340
|
-
var isHost = (node) => node && node.$tag$ === Host;
|
|
1341
|
-
var vdomFnUtils = {
|
|
1342
|
-
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
1343
|
-
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
1344
|
-
};
|
|
1345
|
-
var convertToPublic = (node) => ({
|
|
1346
|
-
vattrs: node.$attrs$,
|
|
1347
|
-
vchildren: node.$children$,
|
|
1348
|
-
vkey: node.$key$,
|
|
1349
|
-
vname: node.$name$,
|
|
1350
|
-
vtag: node.$tag$,
|
|
1351
|
-
vtext: node.$text$
|
|
1352
|
-
});
|
|
1353
|
-
var convertToPrivate = (node) => {
|
|
1354
|
-
if (typeof node.vtag === "function") {
|
|
1355
|
-
const vnodeData = { ...node.vattrs };
|
|
1356
|
-
if (node.vkey) {
|
|
1357
|
-
vnodeData.key = node.vkey;
|
|
1358
|
-
}
|
|
1359
|
-
if (node.vname) {
|
|
1360
|
-
vnodeData.name = node.vname;
|
|
1361
|
-
}
|
|
1362
|
-
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
1363
|
-
}
|
|
1364
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
|
1365
|
-
vnode.$attrs$ = node.vattrs;
|
|
1366
|
-
vnode.$children$ = node.vchildren;
|
|
1367
|
-
vnode.$key$ = node.vkey;
|
|
1368
|
-
vnode.$name$ = node.vname;
|
|
1369
|
-
return vnode;
|
|
1370
|
-
};
|
|
1371
|
-
var validateInputProperties = (inputElm) => {
|
|
1372
|
-
const props = Object.keys(inputElm);
|
|
1373
|
-
const value = props.indexOf("value");
|
|
1374
|
-
if (value === -1) {
|
|
1375
|
-
return;
|
|
1376
|
-
}
|
|
1377
|
-
const typeIndex = props.indexOf("type");
|
|
1378
|
-
const minIndex = props.indexOf("min");
|
|
1379
|
-
const maxIndex = props.indexOf("max");
|
|
1380
|
-
const stepIndex = props.indexOf("step");
|
|
1381
|
-
if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {
|
|
1382
|
-
consoleDevWarn(`The "value" prop of <input> should be set after "min", "max", "type" and "step"`);
|
|
1383
|
-
}
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
// src/runtime/client-hydrate.ts
|
|
1387
|
-
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1388
|
-
var _a, _b, _c;
|
|
1389
|
-
const endHydrate = createTime("hydrateClient", tagName);
|
|
1390
|
-
const shadowRoot = hostElm.shadowRoot;
|
|
1391
|
-
const childRenderNodes = [];
|
|
1392
|
-
const slotNodes = [];
|
|
1393
|
-
const slottedNodes = [];
|
|
1394
|
-
const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;
|
|
1395
|
-
const vnode = newVNode(tagName, null);
|
|
1396
|
-
vnode.$elm$ = hostElm;
|
|
1397
|
-
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
1398
|
-
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
1399
|
-
var _a2, _b2;
|
|
1400
|
-
if (!(memberFlags & 31 /* Prop */)) {
|
|
1401
|
-
return;
|
|
1402
|
-
}
|
|
1403
|
-
const attributeName = metaAttributeName || memberName;
|
|
1404
|
-
const attrVal = hostElm.getAttribute(attributeName);
|
|
1405
|
-
if (attrVal !== null) {
|
|
1406
|
-
const attrPropVal = parsePropertyValue(
|
|
1407
|
-
attrVal,
|
|
1408
|
-
memberFlags,
|
|
1409
|
-
BUILD.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
|
|
1410
|
-
);
|
|
1411
|
-
(_b2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b2.set(memberName, attrPropVal);
|
|
1412
|
-
}
|
|
1413
|
-
});
|
|
1414
|
-
let scopeId2;
|
|
1415
|
-
if (BUILD.scoped) {
|
|
1416
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1417
|
-
if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
|
|
1418
|
-
scopeId2 = hostElm["s-sc"];
|
|
1419
|
-
hostElm.classList.add(scopeId2 + "-h");
|
|
1420
|
-
} else if (hostElm["s-sc"]) {
|
|
1421
|
-
delete hostElm["s-sc"];
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
1425
|
-
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1426
|
-
}
|
|
1427
|
-
hostElm[HYDRATE_ID] = hostId;
|
|
1428
|
-
hostElm.removeAttribute(HYDRATE_ID);
|
|
1429
|
-
hostRef.$vnode$ = clientHydrate(
|
|
1430
|
-
vnode,
|
|
1431
|
-
childRenderNodes,
|
|
1432
|
-
slotNodes,
|
|
1433
|
-
shadowRootNodes,
|
|
1434
|
-
hostElm,
|
|
1435
|
-
hostElm,
|
|
1436
|
-
hostId,
|
|
1437
|
-
slottedNodes
|
|
1438
|
-
);
|
|
1439
|
-
let crIndex = 0;
|
|
1440
|
-
const crLength = childRenderNodes.length;
|
|
1441
|
-
let childRenderNode;
|
|
1442
|
-
for (crIndex; crIndex < crLength; crIndex++) {
|
|
1443
|
-
childRenderNode = childRenderNodes[crIndex];
|
|
1444
|
-
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
1445
|
-
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
1446
|
-
const node = childRenderNode.$elm$;
|
|
1447
|
-
if (!shadowRoot) {
|
|
1448
|
-
node["s-hn"] = tagName.toUpperCase();
|
|
1449
|
-
if (childRenderNode.$tag$ === "slot") {
|
|
1450
|
-
node["s-cr"] = hostElm["s-cr"];
|
|
1451
|
-
}
|
|
1452
|
-
} else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
|
|
1453
|
-
const cmpMeta = getHostRef(childRenderNode.$elm$);
|
|
1454
|
-
if (cmpMeta) {
|
|
1455
|
-
const scopeId3 = getScopeId(
|
|
1456
|
-
cmpMeta.$cmpMeta$,
|
|
1457
|
-
BUILD.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
|
|
1458
|
-
);
|
|
1459
|
-
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
1460
|
-
if (styleSheet) {
|
|
1461
|
-
hostElm.shadowRoot.append(styleSheet.cloneNode(true));
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
if (childRenderNode.$tag$ === "slot") {
|
|
1466
|
-
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
1467
|
-
if (childRenderNode.$children$) {
|
|
1468
|
-
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
1469
|
-
if (!childRenderNode.$elm$.childNodes.length) {
|
|
1470
|
-
childRenderNode.$children$.forEach((c) => {
|
|
1471
|
-
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
1472
|
-
});
|
|
1473
|
-
}
|
|
1474
|
-
} else {
|
|
1475
|
-
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1479
|
-
if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1480
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1481
|
-
}
|
|
1482
|
-
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
1483
|
-
if (!shadowRoot) {
|
|
1484
|
-
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
if (orgLocationNode && !orgLocationNode["s-id"]) {
|
|
1488
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
const hosts = [];
|
|
1492
|
-
const snLen = slottedNodes.length;
|
|
1493
|
-
let snIndex = 0;
|
|
1494
|
-
let slotGroup;
|
|
1495
|
-
let snGroupIdx;
|
|
1496
|
-
let snGroupLen;
|
|
1497
|
-
let slottedItem;
|
|
1498
|
-
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1499
|
-
slotGroup = slottedNodes[snIndex];
|
|
1500
|
-
if (!slotGroup || !slotGroup.length) continue;
|
|
1501
|
-
snGroupLen = slotGroup.length;
|
|
1502
|
-
snGroupIdx = 0;
|
|
1503
|
-
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1504
|
-
slottedItem = slotGroup[snGroupIdx];
|
|
1505
|
-
if (!hosts[slottedItem.hostId]) {
|
|
1506
|
-
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1507
|
-
}
|
|
1508
|
-
if (!hosts[slottedItem.hostId]) continue;
|
|
1509
|
-
const hostEle = hosts[slottedItem.hostId];
|
|
1510
|
-
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1511
|
-
hostEle.appendChild(slottedItem.node);
|
|
1512
|
-
}
|
|
1513
|
-
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1514
|
-
if (!slottedItem.slot["s-cr"]) {
|
|
1515
|
-
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1516
|
-
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1517
|
-
slottedItem.slot["s-cr"] = hostEle;
|
|
1518
|
-
} else {
|
|
1519
|
-
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1523
|
-
if (((_c = slottedItem.node.parentElement) == null ? void 0 : _c.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
1524
|
-
slottedItem.node.removeAttribute("slot");
|
|
1525
|
-
}
|
|
1526
|
-
if (BUILD.experimentalSlotFixes) {
|
|
1527
|
-
patchSlottedNode(slottedItem.node);
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
if (BUILD.scoped && scopeId2 && slotNodes.length) {
|
|
1533
|
-
slotNodes.forEach((slot) => {
|
|
1534
|
-
slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
|
|
1535
|
-
});
|
|
1536
|
-
}
|
|
1537
|
-
if (BUILD.shadowDom && shadowRoot) {
|
|
1538
|
-
let rnIdex = 0;
|
|
1539
|
-
const rnLen = shadowRootNodes.length;
|
|
1540
|
-
if (rnLen) {
|
|
1541
|
-
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1542
|
-
const node = shadowRootNodes[rnIdex];
|
|
1543
|
-
if (node) {
|
|
1544
|
-
shadowRoot.appendChild(node);
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1548
|
-
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
1549
|
-
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
1550
|
-
node.removeAttribute("hidden");
|
|
1551
|
-
} else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1552
|
-
node.parentNode.removeChild(node);
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
hostRef.$hostElement$ = hostElm;
|
|
1559
|
-
endHydrate();
|
|
1560
|
-
};
|
|
1561
|
-
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
1562
|
-
let childNodeType;
|
|
1563
|
-
let childIdSplt;
|
|
1564
|
-
let childVNode;
|
|
1565
|
-
let i2;
|
|
1566
|
-
const scopeId2 = hostElm["s-sc"];
|
|
1567
|
-
if (node.nodeType === 1 /* ElementNode */) {
|
|
1568
|
-
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
1569
|
-
if (childNodeType) {
|
|
1570
|
-
childIdSplt = childNodeType.split(".");
|
|
1571
|
-
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
1572
|
-
childVNode = createSimpleVNode({
|
|
1573
|
-
$flags$: 0,
|
|
1574
|
-
$hostId$: childIdSplt[0],
|
|
1575
|
-
$nodeId$: childIdSplt[1],
|
|
1576
|
-
$depth$: childIdSplt[2],
|
|
1577
|
-
$index$: childIdSplt[3],
|
|
1578
|
-
$tag$: node.tagName.toLowerCase(),
|
|
1579
|
-
$elm$: node,
|
|
1580
|
-
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
1581
|
-
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
1582
|
-
$attrs$: { class: node.className || "" }
|
|
1583
|
-
});
|
|
1584
|
-
childRenderNodes.push(childVNode);
|
|
1585
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1586
|
-
if (!parentVNode.$children$) {
|
|
1587
|
-
parentVNode.$children$ = [];
|
|
1588
|
-
}
|
|
1589
|
-
if (BUILD.scoped && scopeId2 && childIdSplt[0] === hostId) {
|
|
1590
|
-
node["s-si"] = scopeId2;
|
|
1591
|
-
childVNode.$attrs$.class += " " + scopeId2;
|
|
1592
|
-
}
|
|
1593
|
-
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1594
|
-
if (typeof slotName === "string") {
|
|
1595
|
-
if (childVNode.$tag$ === "slot-fb") {
|
|
1596
|
-
addSlot(
|
|
1597
|
-
slotName,
|
|
1598
|
-
childIdSplt[2],
|
|
1599
|
-
childVNode,
|
|
1600
|
-
node,
|
|
1601
|
-
parentVNode,
|
|
1602
|
-
childRenderNodes,
|
|
1603
|
-
slotNodes,
|
|
1604
|
-
shadowRootNodes,
|
|
1605
|
-
slottedNodes
|
|
1606
|
-
);
|
|
1607
|
-
if (BUILD.scoped && scopeId2) {
|
|
1608
|
-
node.classList.add(scopeId2);
|
|
1609
|
-
}
|
|
1610
|
-
}
|
|
1611
|
-
childVNode.$elm$["s-sn"] = slotName;
|
|
1612
|
-
childVNode.$elm$.removeAttribute("s-sn");
|
|
1613
|
-
}
|
|
1614
|
-
if (childVNode.$index$ !== void 0) {
|
|
1615
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1616
|
-
}
|
|
1617
|
-
parentVNode = childVNode;
|
|
1618
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1619
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
if (node.shadowRoot) {
|
|
1624
|
-
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
1625
|
-
clientHydrate(
|
|
1626
|
-
parentVNode,
|
|
1627
|
-
childRenderNodes,
|
|
1628
|
-
slotNodes,
|
|
1629
|
-
shadowRootNodes,
|
|
1630
|
-
hostElm,
|
|
1631
|
-
node.shadowRoot.childNodes[i2],
|
|
1632
|
-
hostId,
|
|
1633
|
-
slottedNodes
|
|
1634
|
-
);
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1638
|
-
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
1639
|
-
clientHydrate(
|
|
1640
|
-
parentVNode,
|
|
1641
|
-
childRenderNodes,
|
|
1642
|
-
slotNodes,
|
|
1643
|
-
shadowRootNodes,
|
|
1644
|
-
hostElm,
|
|
1645
|
-
nonShadowNodes[i2],
|
|
1646
|
-
hostId,
|
|
1647
|
-
slottedNodes
|
|
1648
|
-
);
|
|
1649
|
-
}
|
|
1650
|
-
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1651
|
-
childIdSplt = node.nodeValue.split(".");
|
|
1652
|
-
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
1653
|
-
childNodeType = childIdSplt[0];
|
|
1654
|
-
childVNode = createSimpleVNode({
|
|
1655
|
-
$hostId$: childIdSplt[1],
|
|
1656
|
-
$nodeId$: childIdSplt[2],
|
|
1657
|
-
$depth$: childIdSplt[3],
|
|
1658
|
-
$index$: childIdSplt[4] || "0",
|
|
1659
|
-
$elm$: node,
|
|
1660
|
-
$attrs$: null,
|
|
1661
|
-
$children$: null,
|
|
1662
|
-
$key$: null,
|
|
1663
|
-
$name$: null,
|
|
1664
|
-
$tag$: null,
|
|
1665
|
-
$text$: null
|
|
1666
|
-
});
|
|
1667
|
-
if (childNodeType === TEXT_NODE_ID) {
|
|
1668
|
-
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
1669
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
1670
|
-
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
1671
|
-
childRenderNodes.push(childVNode);
|
|
1672
|
-
node.remove();
|
|
1673
|
-
if (hostId === childVNode.$hostId$) {
|
|
1674
|
-
if (!parentVNode.$children$) {
|
|
1675
|
-
parentVNode.$children$ = [];
|
|
1676
|
-
}
|
|
1677
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1678
|
-
}
|
|
1679
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1680
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1684
|
-
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
1685
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1686
|
-
childRenderNodes.push(childVNode);
|
|
1687
|
-
node.remove();
|
|
1688
|
-
}
|
|
1689
|
-
} else if (childVNode.$hostId$ === hostId) {
|
|
1690
|
-
if (childNodeType === SLOT_NODE_ID) {
|
|
1691
|
-
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
1692
|
-
addSlot(
|
|
1693
|
-
slotName,
|
|
1694
|
-
childIdSplt[2],
|
|
1695
|
-
childVNode,
|
|
1696
|
-
node,
|
|
1697
|
-
parentVNode,
|
|
1698
|
-
childRenderNodes,
|
|
1699
|
-
slotNodes,
|
|
1700
|
-
shadowRootNodes,
|
|
1701
|
-
slottedNodes
|
|
1702
|
-
);
|
|
1703
|
-
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1704
|
-
if (BUILD.shadowDom && shadowRootNodes) {
|
|
1705
|
-
node.remove();
|
|
1706
|
-
} else if (BUILD.slotRelocation) {
|
|
1707
|
-
hostElm["s-cr"] = node;
|
|
1708
|
-
node["s-cn"] = true;
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1714
|
-
const vnode = newVNode(null, node.textContent);
|
|
1715
|
-
vnode.$elm$ = node;
|
|
1716
|
-
vnode.$index$ = "0";
|
|
1717
|
-
parentVNode.$children$ = [vnode];
|
|
1718
|
-
} else {
|
|
1719
|
-
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim() && !node["s-nr"]) {
|
|
1720
|
-
node.remove();
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
return parentVNode;
|
|
1724
|
-
};
|
|
1725
|
-
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1726
|
-
if (node.nodeType === 1 /* ElementNode */) {
|
|
1727
|
-
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1728
|
-
if (componentId) {
|
|
1729
|
-
orgLocNodes.set(componentId, node);
|
|
1730
|
-
}
|
|
1731
|
-
let i2 = 0;
|
|
1732
|
-
if (node.shadowRoot) {
|
|
1733
|
-
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1734
|
-
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1738
|
-
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1739
|
-
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1740
|
-
}
|
|
1741
|
-
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1742
|
-
const childIdSplt = node.nodeValue.split(".");
|
|
1743
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1744
|
-
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1745
|
-
node.nodeValue = "";
|
|
1746
|
-
node["s-en"] = childIdSplt[3];
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
};
|
|
1750
|
-
var createSimpleVNode = (vnode) => {
|
|
1751
|
-
const defaultVNode = {
|
|
1752
|
-
$flags$: 0,
|
|
1753
|
-
$hostId$: null,
|
|
1754
|
-
$nodeId$: null,
|
|
1755
|
-
$depth$: null,
|
|
1756
|
-
$index$: "0",
|
|
1757
|
-
$elm$: null,
|
|
1758
|
-
$attrs$: null,
|
|
1759
|
-
$children$: null,
|
|
1760
|
-
$key$: null,
|
|
1761
|
-
$name$: null,
|
|
1762
|
-
$tag$: null,
|
|
1763
|
-
$text$: null
|
|
1764
|
-
};
|
|
1765
|
-
return { ...defaultVNode, ...vnode };
|
|
1766
|
-
};
|
|
1767
|
-
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1768
|
-
node["s-sr"] = true;
|
|
1769
|
-
childVNode.$name$ = slotName || null;
|
|
1770
|
-
childVNode.$tag$ = "slot";
|
|
1771
|
-
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1772
|
-
if (BUILD.shadowDom && shadowRootNodes && win.document) {
|
|
1773
|
-
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1774
|
-
if (childVNode.$name$) {
|
|
1775
|
-
childVNode.$elm$.setAttribute("name", slotName);
|
|
1776
|
-
}
|
|
1777
|
-
if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1778
|
-
internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
|
|
1779
|
-
} else {
|
|
1780
|
-
internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
|
|
1781
|
-
}
|
|
1782
|
-
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1783
|
-
node.remove();
|
|
1784
|
-
if (childVNode.$depth$ === "0") {
|
|
1785
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1786
|
-
}
|
|
1787
|
-
} else {
|
|
1788
|
-
const slot = childVNode.$elm$;
|
|
1789
|
-
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1790
|
-
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1791
|
-
patchSlotNode(node);
|
|
1792
|
-
if (shouldMove) {
|
|
1793
|
-
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
childRenderNodes.push(childVNode);
|
|
1797
|
-
slotNodes.push(childVNode);
|
|
1798
|
-
if (!parentVNode.$children$) {
|
|
1799
|
-
parentVNode.$children$ = [];
|
|
1800
|
-
}
|
|
1801
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1802
|
-
}
|
|
1803
|
-
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1804
|
-
var _a, _b;
|
|
1805
|
-
let slottedNode = slotNode.nextSibling;
|
|
1806
|
-
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1807
|
-
if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
|
|
1808
|
-
do {
|
|
1809
|
-
if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
1810
|
-
slottedNode["s-sn"] = slotName;
|
|
1811
|
-
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1812
|
-
}
|
|
1813
|
-
slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
|
|
1814
|
-
} while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
|
|
1815
|
-
};
|
|
1816
|
-
var findCorrespondingNode = (node, type) => {
|
|
1817
|
-
let sibling = node;
|
|
1818
|
-
do {
|
|
1819
|
-
sibling = sibling.nextSibling;
|
|
1820
|
-
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1821
|
-
return sibling;
|
|
1822
|
-
};
|
|
1823
|
-
|
|
1824
|
-
// src/utils/shadow-css.ts
|
|
1825
|
-
/**
|
|
1826
|
-
* @license
|
|
1827
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
1828
|
-
*
|
|
1829
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1830
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1831
|
-
*
|
|
1832
|
-
* This file is a port of shadowCSS from `webcomponents.js` to TypeScript.
|
|
1833
|
-
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
|
1834
|
-
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
|
1835
|
-
*/
|
|
1836
|
-
var safeSelector = (selector) => {
|
|
1837
|
-
const placeholders = [];
|
|
1838
|
-
let index = 0;
|
|
1839
|
-
selector = selector.replace(/(\[\s*part~=\s*("[^"]*"|'[^']*')\s*\])/g, (_, keep) => {
|
|
1840
|
-
const replaceBy = `__part-${index}__`;
|
|
1841
|
-
placeholders.push(keep);
|
|
1842
|
-
index++;
|
|
1843
|
-
return replaceBy;
|
|
1844
|
-
});
|
|
1845
|
-
selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
|
|
1846
|
-
const replaceBy = `__ph-${index}__`;
|
|
1847
|
-
placeholders.push(keep);
|
|
1848
|
-
index++;
|
|
1849
|
-
return replaceBy;
|
|
1850
|
-
});
|
|
1851
|
-
const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
|
1852
|
-
const replaceBy = `__ph-${index}__`;
|
|
1853
|
-
placeholders.push(exp);
|
|
1854
|
-
index++;
|
|
1855
|
-
return pseudo + replaceBy;
|
|
1856
|
-
});
|
|
1857
|
-
const ss = {
|
|
1858
|
-
content,
|
|
1859
|
-
placeholders
|
|
1860
|
-
};
|
|
1861
|
-
return ss;
|
|
1862
|
-
};
|
|
1863
|
-
var restoreSafeSelector = (placeholders, content) => {
|
|
1864
|
-
content = content.replace(/__part-(\d+)__/g, (_, index) => placeholders[+index]);
|
|
1865
|
-
return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
|
|
1866
|
-
};
|
|
1867
|
-
var _polyfillHost = "-shadowcsshost";
|
|
1868
|
-
var _polyfillSlotted = "-shadowcssslotted";
|
|
1869
|
-
var _polyfillHostContext = "-shadowcsscontext";
|
|
1870
|
-
var _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
|
|
1871
|
-
var _cssColonHostRe = new RegExp("(" + _polyfillHost + _parenSuffix, "gim");
|
|
1872
|
-
var _cssColonHostContextRe = new RegExp("(" + _polyfillHostContext + _parenSuffix, "gim");
|
|
1873
|
-
var _cssColonSlottedRe = new RegExp("(" + _polyfillSlotted + _parenSuffix, "gim");
|
|
1874
|
-
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
1875
|
-
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
1876
|
-
var _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
|
|
1877
|
-
var _safePartRe = /__part-(\d+)__/g;
|
|
1878
|
-
var _selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$";
|
|
1879
|
-
var _polyfillHostRe = /-shadowcsshost/gim;
|
|
1880
|
-
var createSupportsRuleRe = (selector) => {
|
|
1881
|
-
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1882
|
-
return new RegExp(
|
|
1883
|
-
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
1884
|
-
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
1885
|
-
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
1886
|
-
"g"
|
|
1887
|
-
);
|
|
1888
|
-
};
|
|
1889
|
-
var _colonSlottedRe = createSupportsRuleRe("::slotted");
|
|
1890
|
-
var _colonHostRe = createSupportsRuleRe(":host");
|
|
1891
|
-
var _colonHostContextRe = createSupportsRuleRe(":host-context");
|
|
1892
|
-
var _commentRe = /\/\*\s*[\s\S]*?\*\//g;
|
|
1893
|
-
var stripComments = (input) => {
|
|
1894
|
-
return input.replace(_commentRe, "");
|
|
1895
|
-
};
|
|
1896
|
-
var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
|
|
1897
|
-
var extractCommentsWithHash = (input) => {
|
|
1898
|
-
return input.match(_commentWithHashRe) || [];
|
|
1899
|
-
};
|
|
1900
|
-
var _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
|
1901
|
-
var _curlyRe = /([{}])/g;
|
|
1902
|
-
var _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
|
|
1903
|
-
var OPEN_CURLY = "{";
|
|
1904
|
-
var CLOSE_CURLY = "}";
|
|
1905
|
-
var BLOCK_PLACEHOLDER = "%BLOCK%";
|
|
1906
|
-
var processRules = (input, ruleCallback) => {
|
|
1907
|
-
const inputWithEscapedBlocks = escapeBlocks(input);
|
|
1908
|
-
let nextBlockIndex = 0;
|
|
1909
|
-
return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
|
|
1910
|
-
const selector = m[2];
|
|
1911
|
-
let content = "";
|
|
1912
|
-
let suffix = m[4];
|
|
1913
|
-
let contentPrefix = "";
|
|
1914
|
-
if (suffix && suffix.startsWith("{" + BLOCK_PLACEHOLDER)) {
|
|
1915
|
-
content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
|
|
1916
|
-
suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
|
|
1917
|
-
contentPrefix = "{";
|
|
1918
|
-
}
|
|
1919
|
-
const cssRule = {
|
|
1920
|
-
selector,
|
|
1921
|
-
content
|
|
1922
|
-
};
|
|
1923
|
-
const rule = ruleCallback(cssRule);
|
|
1924
|
-
return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
|
|
1925
|
-
});
|
|
1926
|
-
};
|
|
1927
|
-
var escapeBlocks = (input) => {
|
|
1928
|
-
const inputParts = input.split(_curlyRe);
|
|
1929
|
-
const resultParts = [];
|
|
1930
|
-
const escapedBlocks = [];
|
|
1931
|
-
let bracketCount = 0;
|
|
1932
|
-
let currentBlockParts = [];
|
|
1933
|
-
for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
|
|
1934
|
-
const part = inputParts[partIndex];
|
|
1935
|
-
if (part === CLOSE_CURLY) {
|
|
1936
|
-
bracketCount--;
|
|
1937
|
-
}
|
|
1938
|
-
if (bracketCount > 0) {
|
|
1939
|
-
currentBlockParts.push(part);
|
|
1940
|
-
} else {
|
|
1941
|
-
if (currentBlockParts.length > 0) {
|
|
1942
|
-
escapedBlocks.push(currentBlockParts.join(""));
|
|
1943
|
-
resultParts.push(BLOCK_PLACEHOLDER);
|
|
1944
|
-
currentBlockParts = [];
|
|
1945
|
-
}
|
|
1946
|
-
resultParts.push(part);
|
|
1947
|
-
}
|
|
1948
|
-
if (part === OPEN_CURLY) {
|
|
1949
|
-
bracketCount++;
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
if (currentBlockParts.length > 0) {
|
|
1953
|
-
escapedBlocks.push(currentBlockParts.join(""));
|
|
1954
|
-
resultParts.push(BLOCK_PLACEHOLDER);
|
|
1955
|
-
}
|
|
1956
|
-
const strEscapedBlocks = {
|
|
1957
|
-
escapedString: resultParts.join(""),
|
|
1958
|
-
blocks: escapedBlocks
|
|
1959
|
-
};
|
|
1960
|
-
return strEscapedBlocks;
|
|
1961
|
-
};
|
|
1962
|
-
var insertPolyfillHostInCssText = (cssText) => {
|
|
1963
|
-
const supportsBlocks = [];
|
|
1964
|
-
cssText = cssText.replace(/@supports\s+selector\s*\(\s*([^)]*)\s*\)/g, (_, selectorContent) => {
|
|
1965
|
-
const placeholder = `__supports_${supportsBlocks.length}__`;
|
|
1966
|
-
supportsBlocks.push(selectorContent);
|
|
1967
|
-
return `@supports selector(${placeholder})`;
|
|
1968
|
-
});
|
|
1969
|
-
cssText = cssText.replace(_colonHostContextRe, `$1${_polyfillHostContext}`).replace(_colonHostRe, `$1${_polyfillHost}`).replace(_colonSlottedRe, `$1${_polyfillSlotted}`);
|
|
1970
|
-
supportsBlocks.forEach((originalSelector, index) => {
|
|
1971
|
-
cssText = cssText.replace(`__supports_${index}__`, originalSelector);
|
|
1972
|
-
});
|
|
1973
|
-
return cssText;
|
|
1974
|
-
};
|
|
1975
|
-
var convertColonRule = (cssText, regExp, partReplacer) => {
|
|
1976
|
-
return cssText.replace(regExp, (...m) => {
|
|
1977
|
-
if (m[2]) {
|
|
1978
|
-
const parts = m[2].split(",");
|
|
1979
|
-
const r = [];
|
|
1980
|
-
for (let i2 = 0; i2 < parts.length; i2++) {
|
|
1981
|
-
const p = parts[i2].trim();
|
|
1982
|
-
if (!p) break;
|
|
1983
|
-
r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
|
|
1984
|
-
}
|
|
1985
|
-
return r.join(",");
|
|
1986
|
-
} else {
|
|
1987
|
-
return _polyfillHostNoCombinator + m[3];
|
|
1988
|
-
}
|
|
1989
|
-
});
|
|
1990
|
-
};
|
|
1991
|
-
var colonHostPartReplacer = (host, part, suffix) => {
|
|
1992
|
-
return host + part.replace(_polyfillHost, "") + suffix;
|
|
1993
|
-
};
|
|
1994
|
-
var convertColonHost = (cssText) => {
|
|
1995
|
-
return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
|
|
1996
|
-
};
|
|
1997
|
-
var colonHostContextPartReplacer = (host, part, suffix) => {
|
|
1998
|
-
if (part.indexOf(_polyfillHost) > -1) {
|
|
1999
|
-
return colonHostPartReplacer(host, part, suffix);
|
|
2000
|
-
} else {
|
|
2001
|
-
return host + part + suffix + ", " + part + " " + host + suffix;
|
|
2002
|
-
}
|
|
2003
|
-
};
|
|
2004
|
-
var convertColonSlotted = (cssText, slotScopeId) => {
|
|
2005
|
-
const slotClass = "." + slotScopeId + " > ";
|
|
2006
|
-
const selectors = [];
|
|
2007
|
-
cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
|
|
2008
|
-
if (m[2]) {
|
|
2009
|
-
const compound = m[2].trim();
|
|
2010
|
-
const suffix = m[3];
|
|
2011
|
-
const slottedSelector = slotClass + compound + suffix;
|
|
2012
|
-
let prefixSelector = "";
|
|
2013
|
-
for (let i2 = m[4] - 1; i2 >= 0; i2--) {
|
|
2014
|
-
const char = m[5][i2];
|
|
2015
|
-
if (char === "}" || char === ",") {
|
|
2016
|
-
break;
|
|
2017
|
-
}
|
|
2018
|
-
prefixSelector = char + prefixSelector;
|
|
2019
|
-
}
|
|
2020
|
-
const orgSelector = (prefixSelector + slottedSelector).trim();
|
|
2021
|
-
const addedSelector = `${prefixSelector.trimEnd()}${slottedSelector.trim()}`.trim();
|
|
2022
|
-
if (orgSelector !== addedSelector) {
|
|
2023
|
-
const updatedSelector = `${addedSelector}, ${orgSelector}`;
|
|
2024
|
-
selectors.push({
|
|
2025
|
-
orgSelector,
|
|
2026
|
-
updatedSelector
|
|
2027
|
-
});
|
|
2028
|
-
}
|
|
2029
|
-
return slottedSelector;
|
|
2030
|
-
} else {
|
|
2031
|
-
return _polyfillHostNoCombinator + m[3];
|
|
2032
|
-
}
|
|
2033
|
-
});
|
|
2034
|
-
return {
|
|
2035
|
-
selectors,
|
|
2036
|
-
cssText
|
|
2037
|
-
};
|
|
2038
|
-
};
|
|
2039
|
-
var convertColonHostContext = (cssText) => {
|
|
2040
|
-
return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
|
|
2041
|
-
};
|
|
2042
|
-
var convertShadowDOMSelectors = (cssText) => {
|
|
2043
|
-
return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, " "), cssText);
|
|
2044
|
-
};
|
|
2045
|
-
var makeScopeMatcher = (scopeSelector2) => {
|
|
2046
|
-
const lre = /\[/g;
|
|
2047
|
-
const rre = /\]/g;
|
|
2048
|
-
scopeSelector2 = scopeSelector2.replace(lre, "\\[").replace(rre, "\\]");
|
|
2049
|
-
return new RegExp("^(" + scopeSelector2 + ")" + _selectorReSuffix, "m");
|
|
2050
|
-
};
|
|
2051
|
-
var selectorNeedsScoping = (selector, scopeSelector2) => {
|
|
2052
|
-
const re = makeScopeMatcher(scopeSelector2);
|
|
2053
|
-
return !re.test(selector);
|
|
2054
|
-
};
|
|
2055
|
-
var injectScopingSelector = (selector, scopingSelector) => {
|
|
2056
|
-
return selector.replace(_selectorPartsRe, (_, before = "", _colonGroup, colon = "", after = "") => {
|
|
2057
|
-
return before + scopingSelector + colon + after;
|
|
2058
|
-
});
|
|
2059
|
-
};
|
|
2060
|
-
var applySimpleSelectorScope = (selector, scopeSelector2, hostSelector) => {
|
|
2061
|
-
_polyfillHostRe.lastIndex = 0;
|
|
2062
|
-
if (_polyfillHostRe.test(selector)) {
|
|
2063
|
-
const replaceBy = `.${hostSelector}`;
|
|
2064
|
-
return selector.replace(_polyfillHostNoCombinatorRe, (_, selector2) => injectScopingSelector(selector2, replaceBy)).replace(_polyfillHostRe, replaceBy + " ");
|
|
2065
|
-
}
|
|
2066
|
-
return scopeSelector2 + " " + selector;
|
|
2067
|
-
};
|
|
2068
|
-
var applyStrictSelectorScope = (selector, scopeSelector2, hostSelector) => {
|
|
2069
|
-
const isRe = /\[is=([^\]]*)\]/g;
|
|
2070
|
-
scopeSelector2 = scopeSelector2.replace(isRe, (_, ...parts) => parts[0]);
|
|
2071
|
-
const className = "." + scopeSelector2;
|
|
2072
|
-
const _scopeSelectorPart = (p) => {
|
|
2073
|
-
let scopedP = p.trim();
|
|
2074
|
-
if (!scopedP) {
|
|
2075
|
-
return "";
|
|
2076
|
-
}
|
|
2077
|
-
if (p.indexOf(_polyfillHostNoCombinator) > -1) {
|
|
2078
|
-
scopedP = applySimpleSelectorScope(p, scopeSelector2, hostSelector);
|
|
2079
|
-
} else {
|
|
2080
|
-
const t = p.replace(_polyfillHostRe, "");
|
|
2081
|
-
if (t.length > 0) {
|
|
2082
|
-
scopedP = injectScopingSelector(t, className);
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
return scopedP;
|
|
2086
|
-
};
|
|
2087
|
-
const safeContent = safeSelector(selector);
|
|
2088
|
-
selector = safeContent.content;
|
|
2089
|
-
let scopedSelector = "";
|
|
2090
|
-
let startIndex = 0;
|
|
2091
|
-
let res;
|
|
2092
|
-
const sep = /( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g;
|
|
2093
|
-
const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
|
|
2094
|
-
let shouldScope = !hasHost;
|
|
2095
|
-
while ((res = sep.exec(selector)) !== null) {
|
|
2096
|
-
const separator = res[1];
|
|
2097
|
-
const part2 = selector.slice(startIndex, res.index).trim();
|
|
2098
|
-
shouldScope = shouldScope || part2.indexOf(_polyfillHostNoCombinator) > -1;
|
|
2099
|
-
const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
|
|
2100
|
-
scopedSelector += `${scopedPart} ${separator} `;
|
|
2101
|
-
startIndex = sep.lastIndex;
|
|
2102
|
-
}
|
|
2103
|
-
const part = selector.substring(startIndex);
|
|
2104
|
-
shouldScope = !part.match(_safePartRe) && (shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1);
|
|
2105
|
-
scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
|
|
2106
|
-
return restoreSafeSelector(safeContent.placeholders, scopedSelector);
|
|
2107
|
-
};
|
|
2108
|
-
var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
|
|
2109
|
-
return selector.split(",").map((shallowPart) => {
|
|
2110
|
-
if (slotSelector && shallowPart.indexOf("." + slotSelector) > -1) {
|
|
2111
|
-
return shallowPart.trim();
|
|
2112
|
-
}
|
|
2113
|
-
if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
|
|
2114
|
-
return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
|
|
2115
|
-
} else {
|
|
2116
|
-
return shallowPart.trim();
|
|
2117
|
-
}
|
|
2118
|
-
}).join(", ");
|
|
2119
|
-
};
|
|
2120
|
-
var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
2121
|
-
return processRules(cssText, (rule) => {
|
|
2122
|
-
let selector = rule.selector;
|
|
2123
|
-
let content = rule.content;
|
|
2124
|
-
if (rule.selector[0] !== "@") {
|
|
2125
|
-
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
|
2126
|
-
} else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
|
|
2127
|
-
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector);
|
|
2128
|
-
}
|
|
2129
|
-
const cssRule = {
|
|
2130
|
-
selector: selector.replace(/\s{2,}/g, " ").trim(),
|
|
2131
|
-
content
|
|
2132
|
-
};
|
|
2133
|
-
return cssRule;
|
|
2134
|
-
});
|
|
2135
|
-
};
|
|
2136
|
-
var scopeCssText = (cssText, scopeId2, hostScopeId, slotScopeId, commentOriginalSelector) => {
|
|
2137
|
-
cssText = insertPolyfillHostInCssText(cssText);
|
|
2138
|
-
cssText = convertColonHost(cssText);
|
|
2139
|
-
cssText = convertColonHostContext(cssText);
|
|
2140
|
-
const slotted = convertColonSlotted(cssText, slotScopeId);
|
|
2141
|
-
cssText = slotted.cssText;
|
|
2142
|
-
cssText = convertShadowDOMSelectors(cssText);
|
|
2143
|
-
if (scopeId2) {
|
|
2144
|
-
cssText = scopeSelectors(cssText, scopeId2, hostScopeId, slotScopeId, commentOriginalSelector);
|
|
2145
|
-
}
|
|
2146
|
-
cssText = replaceShadowCssHost(cssText, hostScopeId);
|
|
2147
|
-
cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ");
|
|
2148
|
-
return {
|
|
2149
|
-
cssText: cssText.trim(),
|
|
2150
|
-
// We need to replace the shadow CSS host string in each of these selectors since we created
|
|
2151
|
-
// them prior to the replacement happening in the components CSS text.
|
|
2152
|
-
slottedSelectors: slotted.selectors.map((ref) => ({
|
|
2153
|
-
orgSelector: replaceShadowCssHost(ref.orgSelector, hostScopeId),
|
|
2154
|
-
updatedSelector: replaceShadowCssHost(ref.updatedSelector, hostScopeId)
|
|
2155
|
-
}))
|
|
2156
|
-
};
|
|
2157
|
-
};
|
|
2158
|
-
var replaceShadowCssHost = (cssText, hostScopeId) => {
|
|
2159
|
-
return cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
|
|
2160
|
-
};
|
|
2161
|
-
var expandPartSelectors = (cssText) => {
|
|
2162
|
-
const partSelectorRe = /([^\s,{][^,{]*?)::part\(\s*([^)]+?)\s*\)((?:[:.][^,{]*)*)/g;
|
|
2163
|
-
return processRules(cssText, (rule) => {
|
|
2164
|
-
if (rule.selector[0] === "@") {
|
|
2165
|
-
return rule;
|
|
2166
|
-
}
|
|
2167
|
-
const selectors = rule.selector.split(",").map((sel) => {
|
|
2168
|
-
const out = [sel.trim()];
|
|
2169
|
-
let m;
|
|
2170
|
-
while ((m = partSelectorRe.exec(sel)) !== null) {
|
|
2171
|
-
const before = m[1].trimEnd();
|
|
2172
|
-
const partNames = m[2].trim().split(/\s+/);
|
|
2173
|
-
const after = m[3] || "";
|
|
2174
|
-
const partAttr = partNames.flatMap((p) => {
|
|
2175
|
-
if (!rule.selector.includes(`[part~="${p}"]`)) {
|
|
2176
|
-
return [`[part~="${p}"]`];
|
|
2177
|
-
}
|
|
2178
|
-
return [];
|
|
2179
|
-
}).join("");
|
|
2180
|
-
const expanded = `${before} ${partAttr}${after}`;
|
|
2181
|
-
if (!!partAttr && expanded !== sel.trim()) {
|
|
2182
|
-
out.push(expanded);
|
|
2183
|
-
}
|
|
2184
|
-
}
|
|
2185
|
-
return out.join(", ");
|
|
2186
|
-
});
|
|
2187
|
-
rule.selector = selectors.join(", ");
|
|
2188
|
-
return rule;
|
|
2189
|
-
});
|
|
2190
|
-
};
|
|
2191
|
-
var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
2192
|
-
const hostScopeId = scopeId2 + "-h";
|
|
2193
|
-
const slotScopeId = scopeId2 + "-s";
|
|
2194
|
-
const commentsWithHash = extractCommentsWithHash(cssText);
|
|
2195
|
-
cssText = stripComments(cssText);
|
|
2196
|
-
const orgSelectors = [];
|
|
2197
|
-
if (commentOriginalSelector) {
|
|
2198
|
-
const processCommentedSelector = (rule) => {
|
|
2199
|
-
const placeholder = `/*!@___${orgSelectors.length}___*/`;
|
|
2200
|
-
const comment = `/*!@${rule.selector}*/`;
|
|
2201
|
-
orgSelectors.push({ placeholder, comment });
|
|
2202
|
-
rule.selector = placeholder + rule.selector;
|
|
2203
|
-
return rule;
|
|
2204
|
-
};
|
|
2205
|
-
cssText = processRules(cssText, (rule) => {
|
|
2206
|
-
if (rule.selector[0] !== "@") {
|
|
2207
|
-
return processCommentedSelector(rule);
|
|
2208
|
-
} else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
|
|
2209
|
-
rule.content = processRules(rule.content, processCommentedSelector);
|
|
2210
|
-
return rule;
|
|
2211
|
-
}
|
|
2212
|
-
return rule;
|
|
2213
|
-
});
|
|
2214
|
-
}
|
|
2215
|
-
const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId, commentOriginalSelector);
|
|
2216
|
-
cssText = [scoped.cssText, ...commentsWithHash].join("\n");
|
|
2217
|
-
if (commentOriginalSelector) {
|
|
2218
|
-
orgSelectors.forEach(({ placeholder, comment }) => {
|
|
2219
|
-
cssText = cssText.replace(placeholder, comment);
|
|
2220
|
-
});
|
|
2221
|
-
}
|
|
2222
|
-
scoped.slottedSelectors.forEach((slottedSelector) => {
|
|
2223
|
-
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), "g");
|
|
2224
|
-
cssText = cssText.replace(regex, slottedSelector.updatedSelector);
|
|
2225
|
-
});
|
|
2226
|
-
cssText = expandPartSelectors(cssText);
|
|
2227
|
-
return cssText;
|
|
2228
|
-
};
|
|
2229
|
-
|
|
2230
|
-
// src/runtime/mode.ts
|
|
2231
|
-
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|
|
2232
|
-
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
2233
|
-
var getMode = (ref) => {
|
|
2234
|
-
var _a;
|
|
2235
|
-
return (_a = getHostRef(ref)) == null ? void 0 : _a.$modeName$;
|
|
2236
|
-
};
|
|
2237
|
-
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2238
|
-
if ((BUILD.hydrateClientSide || BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
2239
|
-
propValue = deserializeProperty(propValue);
|
|
2240
|
-
return propValue;
|
|
2241
|
-
}
|
|
2242
|
-
if (typeof propValue === "string" && (propType & 16 /* Unknown */ || propType & 8 /* Any */) && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
2243
|
-
try {
|
|
2244
|
-
return JSON.parse(propValue);
|
|
2245
|
-
} catch (e) {
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
2249
|
-
if (BUILD.propBoolean && propType & 4 /* Boolean */) {
|
|
2250
|
-
if (BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
|
|
2251
|
-
return propValue === "" || !!propValue;
|
|
2252
|
-
} else {
|
|
2253
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
if (BUILD.propNumber && propType & 2 /* Number */) {
|
|
2257
|
-
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
2258
|
-
}
|
|
2259
|
-
if (BUILD.propString && propType & 1 /* String */) {
|
|
2260
|
-
return String(propValue);
|
|
2261
|
-
}
|
|
2262
|
-
return propValue;
|
|
2263
|
-
}
|
|
2264
|
-
return propValue;
|
|
2265
|
-
};
|
|
2266
|
-
var getElement = (ref) => {
|
|
2267
|
-
var _a;
|
|
2268
|
-
return BUILD.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
|
|
2269
|
-
};
|
|
2270
|
-
|
|
2271
|
-
// src/runtime/event-emitter.ts
|
|
2272
|
-
var createEvent = (ref, name, flags) => {
|
|
2273
|
-
const elm = getElement(ref);
|
|
2274
|
-
return {
|
|
2275
|
-
emit: (detail) => {
|
|
2276
|
-
if (BUILD.isDev && !elm.isConnected) {
|
|
2277
|
-
consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
|
|
2278
|
-
}
|
|
2279
|
-
return emitEvent(elm, name, {
|
|
2280
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
2281
|
-
composed: !!(flags & 2 /* Composed */),
|
|
2282
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
2283
|
-
detail
|
|
2284
|
-
});
|
|
2285
|
-
}
|
|
2286
|
-
};
|
|
2287
|
-
};
|
|
2288
|
-
var emitEvent = (elm, name, opts) => {
|
|
2289
|
-
const ev = plt.ce(name, opts);
|
|
2290
|
-
elm.dispatchEvent(ev);
|
|
2291
|
-
return ev;
|
|
2292
|
-
};
|
|
2293
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
2294
|
-
if (oldValue === newValue) {
|
|
2295
|
-
return;
|
|
2296
|
-
}
|
|
2297
|
-
let isProp = isMemberInElement(elm, memberName);
|
|
2298
|
-
let ln = memberName.toLowerCase();
|
|
2299
|
-
if (BUILD.vdomClass && memberName === "class") {
|
|
2300
|
-
const classList = elm.classList;
|
|
2301
|
-
const oldClasses = parseClassList(oldValue);
|
|
2302
|
-
let newClasses = parseClassList(newValue);
|
|
2303
|
-
if (BUILD.hydrateClientSide && (elm["s-si"] || elm["s-sc"]) && initialRender) {
|
|
2304
|
-
const scopeId2 = elm["s-sc"] || elm["s-si"];
|
|
2305
|
-
newClasses.push(scopeId2);
|
|
2306
|
-
oldClasses.forEach((c) => {
|
|
2307
|
-
if (c.startsWith(scopeId2)) newClasses.push(c);
|
|
2308
|
-
});
|
|
2309
|
-
newClasses = [...new Set(newClasses)].filter((c) => c);
|
|
2310
|
-
classList.add(...newClasses);
|
|
2311
|
-
} else {
|
|
2312
|
-
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
2313
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
2314
|
-
}
|
|
2315
|
-
} else if (BUILD.vdomStyle && memberName === "style") {
|
|
2316
|
-
if (BUILD.updatable) {
|
|
2317
|
-
for (const prop in oldValue) {
|
|
2318
|
-
if (!newValue || newValue[prop] == null) {
|
|
2319
|
-
if (!BUILD.hydrateServerSide && prop.includes("-")) {
|
|
2320
|
-
elm.style.removeProperty(prop);
|
|
2321
|
-
} else {
|
|
2322
|
-
elm.style[prop] = "";
|
|
2323
|
-
}
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
for (const prop in newValue) {
|
|
2328
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
2329
|
-
if (!BUILD.hydrateServerSide && prop.includes("-")) {
|
|
2330
|
-
elm.style.setProperty(prop, newValue[prop]);
|
|
2331
|
-
} else {
|
|
2332
|
-
elm.style[prop] = newValue[prop];
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
}
|
|
2336
|
-
} else if (BUILD.vdomKey && memberName === "key") {
|
|
2337
|
-
} else if (BUILD.vdomRef && memberName === "ref") {
|
|
2338
|
-
if (newValue) {
|
|
2339
|
-
newValue(elm);
|
|
2340
|
-
}
|
|
2341
|
-
} else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2342
|
-
if (memberName[2] === "-") {
|
|
2343
|
-
memberName = memberName.slice(3);
|
|
2344
|
-
} else if (isMemberInElement(win, ln)) {
|
|
2345
|
-
memberName = ln.slice(2);
|
|
2346
|
-
} else {
|
|
2347
|
-
memberName = ln[2] + memberName.slice(3);
|
|
2348
|
-
}
|
|
2349
|
-
if (oldValue || newValue) {
|
|
2350
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
2351
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
2352
|
-
if (oldValue) {
|
|
2353
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
2354
|
-
}
|
|
2355
|
-
if (newValue) {
|
|
2356
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
2357
|
-
}
|
|
2358
|
-
}
|
|
2359
|
-
} else if (BUILD.vdomPropOrAttr) {
|
|
2360
|
-
const isComplex = isComplexType(newValue);
|
|
2361
|
-
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
2362
|
-
try {
|
|
2363
|
-
if (!elm.tagName.includes("-")) {
|
|
2364
|
-
const n = newValue == null ? "" : newValue;
|
|
2365
|
-
if (memberName === "list") {
|
|
2366
|
-
isProp = false;
|
|
2367
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
|
2368
|
-
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2369
|
-
elm[memberName] = n;
|
|
2370
|
-
} else {
|
|
2371
|
-
elm.setAttribute(memberName, n);
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
} else if (elm[memberName] !== newValue) {
|
|
2375
|
-
elm[memberName] = newValue;
|
|
2376
|
-
}
|
|
2377
|
-
} catch (e) {
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
let xlink = false;
|
|
2381
|
-
if (BUILD.vdomXlink) {
|
|
2382
|
-
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
2383
|
-
memberName = ln;
|
|
2384
|
-
xlink = true;
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
if (newValue == null || newValue === false) {
|
|
2388
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
2389
|
-
if (BUILD.vdomXlink && xlink) {
|
|
2390
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
2391
|
-
} else {
|
|
2392
|
-
elm.removeAttribute(memberName);
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
2396
|
-
newValue = newValue === true ? "" : newValue;
|
|
2397
|
-
if (BUILD.vdomXlink && xlink) {
|
|
2398
|
-
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
2399
|
-
} else {
|
|
2400
|
-
elm.setAttribute(memberName, newValue);
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
};
|
|
2405
|
-
var parseClassListRegex = /\s/;
|
|
2406
|
-
var parseClassList = (value) => {
|
|
2407
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
2408
|
-
value = value.baseVal;
|
|
2409
|
-
}
|
|
2410
|
-
if (!value || typeof value !== "string") {
|
|
2411
|
-
return [];
|
|
2412
|
-
}
|
|
2413
|
-
return value.split(parseClassListRegex);
|
|
2414
|
-
};
|
|
2415
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
2416
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
2417
|
-
|
|
2418
|
-
// src/runtime/vdom/update-element.ts
|
|
2419
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
2420
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
2421
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
2422
|
-
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
2423
|
-
if (BUILD.updatable) {
|
|
2424
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
2425
|
-
if (!(memberName in newVnodeAttrs)) {
|
|
2426
|
-
setAccessor(
|
|
2427
|
-
elm,
|
|
2428
|
-
memberName,
|
|
2429
|
-
oldVnodeAttrs[memberName],
|
|
2430
|
-
void 0,
|
|
2431
|
-
isSvgMode2,
|
|
2432
|
-
newVnode.$flags$,
|
|
2433
|
-
isInitialRender
|
|
2434
|
-
);
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
}
|
|
2438
|
-
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
2439
|
-
setAccessor(
|
|
2440
|
-
elm,
|
|
2441
|
-
memberName,
|
|
2442
|
-
oldVnodeAttrs[memberName],
|
|
2443
|
-
newVnodeAttrs[memberName],
|
|
2444
|
-
isSvgMode2,
|
|
2445
|
-
newVnode.$flags$,
|
|
2446
|
-
isInitialRender
|
|
2447
|
-
);
|
|
2448
|
-
}
|
|
2449
|
-
};
|
|
2450
|
-
function sortedAttrNames(attrNames) {
|
|
2451
|
-
return attrNames.includes("ref") ? (
|
|
2452
|
-
// we need to sort these to ensure that `'ref'` is the last attr
|
|
2453
|
-
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
2454
|
-
) : (
|
|
2455
|
-
// no need to sort, return the original array
|
|
2456
|
-
attrNames
|
|
2457
|
-
);
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
// src/runtime/vdom/vdom-render.ts
|
|
2461
|
-
var scopeId;
|
|
2462
|
-
var contentRef;
|
|
2463
|
-
var hostTagName;
|
|
2464
|
-
var useNativeShadowDom = false;
|
|
2465
|
-
var checkSlotFallbackVisibility = false;
|
|
2466
|
-
var checkSlotRelocate = false;
|
|
2467
|
-
var isSvgMode = false;
|
|
2468
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2469
|
-
var _a;
|
|
2470
|
-
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
2471
|
-
let i2 = 0;
|
|
2472
|
-
let elm;
|
|
2473
|
-
let childNode;
|
|
2474
|
-
let oldVNode;
|
|
2475
|
-
if (BUILD.slotRelocation && !useNativeShadowDom) {
|
|
2476
|
-
checkSlotRelocate = true;
|
|
2477
|
-
if (newVNode2.$tag$ === "slot") {
|
|
2478
|
-
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
2479
|
-
// slot element has fallback content
|
|
2480
|
-
// still create an element that "mocks" the slot element
|
|
2481
|
-
2 /* isSlotFallback */
|
|
2482
|
-
) : (
|
|
2483
|
-
// slot element does not have fallback content
|
|
2484
|
-
// create an html comment we'll use to always reference
|
|
2485
|
-
// where actual slot content should sit next to
|
|
2486
|
-
1 /* isSlotReference */
|
|
2487
|
-
);
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
if (BUILD.isDev && newVNode2.$elm$) {
|
|
2491
|
-
consoleDevError(
|
|
2492
|
-
`The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`
|
|
2493
|
-
);
|
|
2494
|
-
}
|
|
2495
|
-
if (BUILD.vdomText && newVNode2.$text$ !== null) {
|
|
2496
|
-
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2497
|
-
} else if (BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2498
|
-
elm = newVNode2.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : win.document.createTextNode("");
|
|
2499
|
-
if (BUILD.vdomAttribute) {
|
|
2500
|
-
updateElement(null, newVNode2, isSvgMode);
|
|
2501
|
-
}
|
|
2502
|
-
} else {
|
|
2503
|
-
if (BUILD.svg && !isSvgMode) {
|
|
2504
|
-
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2505
|
-
}
|
|
2506
|
-
if (!win.document) {
|
|
2507
|
-
throw new Error(
|
|
2508
|
-
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
2509
|
-
);
|
|
2510
|
-
}
|
|
2511
|
-
elm = newVNode2.$elm$ = BUILD.svg ? win.document.createElementNS(
|
|
2512
|
-
isSvgMode ? SVG_NS : HTML_NS,
|
|
2513
|
-
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2514
|
-
) : win.document.createElement(
|
|
2515
|
-
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2516
|
-
);
|
|
2517
|
-
if (BUILD.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
2518
|
-
isSvgMode = false;
|
|
2519
|
-
}
|
|
2520
|
-
if (BUILD.vdomAttribute) {
|
|
2521
|
-
updateElement(null, newVNode2, isSvgMode);
|
|
2522
|
-
}
|
|
2523
|
-
if ((BUILD.scoped || BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
2524
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
2525
|
-
}
|
|
2526
|
-
if (newVNode2.$children$) {
|
|
2527
|
-
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
2528
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
2529
|
-
if (childNode) {
|
|
2530
|
-
elm.appendChild(childNode);
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
if (BUILD.svg) {
|
|
2535
|
-
if (newVNode2.$tag$ === "svg") {
|
|
2536
|
-
isSvgMode = false;
|
|
2537
|
-
} else if (elm.tagName === "foreignObject") {
|
|
2538
|
-
isSvgMode = true;
|
|
2539
|
-
}
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
elm["s-hn"] = hostTagName;
|
|
2543
|
-
if (BUILD.slotRelocation) {
|
|
2544
|
-
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
2545
|
-
elm["s-sr"] = true;
|
|
2546
|
-
elm["s-cr"] = contentRef;
|
|
2547
|
-
elm["s-sn"] = newVNode2.$name$ || "";
|
|
2548
|
-
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
2549
|
-
patchSlotNode(elm);
|
|
2550
|
-
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2551
|
-
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2552
|
-
if (BUILD.experimentalSlotFixes) {
|
|
2553
|
-
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2554
|
-
} else {
|
|
2555
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
if (BUILD.scoped || BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) {
|
|
2559
|
-
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
2560
|
-
}
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
return elm;
|
|
2564
|
-
};
|
|
2565
|
-
var relocateToHostRoot = (parentElm) => {
|
|
2566
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2567
|
-
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
2568
|
-
if (host != null) {
|
|
2569
|
-
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
2570
|
-
(ref) => ref["s-cr"]
|
|
2571
|
-
);
|
|
2572
|
-
const childNodeArray = Array.from(
|
|
2573
|
-
parentElm.__childNodes || parentElm.childNodes
|
|
2574
|
-
);
|
|
2575
|
-
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
2576
|
-
if (childNode["s-sh"] != null) {
|
|
2577
|
-
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
2578
|
-
childNode["s-sh"] = void 0;
|
|
2579
|
-
checkSlotRelocate = true;
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2582
|
-
}
|
|
2583
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
2584
|
-
};
|
|
2585
|
-
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2586
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2587
|
-
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
2588
|
-
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
2589
|
-
let node = parentElm;
|
|
2590
|
-
while (node = node.nextSibling) {
|
|
2591
|
-
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
2592
|
-
oldSlotChildNodes.push(node);
|
|
2593
|
-
}
|
|
2594
|
-
}
|
|
2595
|
-
}
|
|
2596
|
-
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
2597
|
-
const childNode = oldSlotChildNodes[i2];
|
|
2598
|
-
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
2599
|
-
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
2600
|
-
childNode["s-ol"].remove();
|
|
2601
|
-
childNode["s-ol"] = void 0;
|
|
2602
|
-
childNode["s-sh"] = void 0;
|
|
2603
|
-
checkSlotRelocate = true;
|
|
2604
|
-
}
|
|
2605
|
-
if (recursive) {
|
|
2606
|
-
putBackInOriginalLocation(childNode, recursive);
|
|
2607
|
-
}
|
|
2608
|
-
}
|
|
2609
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
2610
|
-
};
|
|
2611
|
-
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
2612
|
-
let containerElm = BUILD.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
2613
|
-
let childNode;
|
|
2614
|
-
if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
2615
|
-
containerElm = containerElm.shadowRoot;
|
|
2616
|
-
}
|
|
2617
|
-
for (; startIdx <= endIdx; ++startIdx) {
|
|
2618
|
-
if (vnodes[startIdx]) {
|
|
2619
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
2620
|
-
if (childNode) {
|
|
2621
|
-
vnodes[startIdx].$elm$ = childNode;
|
|
2622
|
-
insertBefore(containerElm, childNode, BUILD.slotRelocation ? referenceNode(before) : before);
|
|
2623
|
-
}
|
|
2624
|
-
}
|
|
2625
|
-
}
|
|
2626
|
-
};
|
|
2627
|
-
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
2628
|
-
for (let index = startIdx; index <= endIdx; ++index) {
|
|
2629
|
-
const vnode = vnodes[index];
|
|
2630
|
-
if (vnode) {
|
|
2631
|
-
const elm = vnode.$elm$;
|
|
2632
|
-
nullifyVNodeRefs(vnode);
|
|
2633
|
-
if (elm) {
|
|
2634
|
-
if (BUILD.slotRelocation) {
|
|
2635
|
-
checkSlotFallbackVisibility = true;
|
|
2636
|
-
if (elm["s-ol"]) {
|
|
2637
|
-
elm["s-ol"].remove();
|
|
2638
|
-
} else {
|
|
2639
|
-
putBackInOriginalLocation(elm, true);
|
|
2640
|
-
}
|
|
2641
|
-
}
|
|
2642
|
-
elm.remove();
|
|
2643
|
-
}
|
|
2644
|
-
}
|
|
2645
|
-
}
|
|
2646
|
-
};
|
|
2647
|
-
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
|
2648
|
-
let oldStartIdx = 0;
|
|
2649
|
-
let newStartIdx = 0;
|
|
2650
|
-
let idxInOld = 0;
|
|
2651
|
-
let i2 = 0;
|
|
2652
|
-
let oldEndIdx = oldCh.length - 1;
|
|
2653
|
-
let oldStartVnode = oldCh[0];
|
|
2654
|
-
let oldEndVnode = oldCh[oldEndIdx];
|
|
2655
|
-
let newEndIdx = newCh.length - 1;
|
|
2656
|
-
let newStartVnode = newCh[0];
|
|
2657
|
-
let newEndVnode = newCh[newEndIdx];
|
|
2658
|
-
let node;
|
|
2659
|
-
let elmToMove;
|
|
2660
|
-
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
2661
|
-
if (oldStartVnode == null) {
|
|
2662
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
2663
|
-
} else if (oldEndVnode == null) {
|
|
2664
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
2665
|
-
} else if (newStartVnode == null) {
|
|
2666
|
-
newStartVnode = newCh[++newStartIdx];
|
|
2667
|
-
} else if (newEndVnode == null) {
|
|
2668
|
-
newEndVnode = newCh[--newEndIdx];
|
|
2669
|
-
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
2670
|
-
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
2671
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
2672
|
-
newStartVnode = newCh[++newStartIdx];
|
|
2673
|
-
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
2674
|
-
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
2675
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
2676
|
-
newEndVnode = newCh[--newEndIdx];
|
|
2677
|
-
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
2678
|
-
if (BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
2679
|
-
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
2680
|
-
}
|
|
2681
|
-
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
2682
|
-
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
2683
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
2684
|
-
newEndVnode = newCh[--newEndIdx];
|
|
2685
|
-
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
2686
|
-
if (BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
2687
|
-
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
2688
|
-
}
|
|
2689
|
-
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
2690
|
-
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
2691
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
2692
|
-
newStartVnode = newCh[++newStartIdx];
|
|
2693
|
-
} else {
|
|
2694
|
-
idxInOld = -1;
|
|
2695
|
-
if (BUILD.vdomKey) {
|
|
2696
|
-
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
2697
|
-
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
2698
|
-
idxInOld = i2;
|
|
2699
|
-
break;
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
}
|
|
2703
|
-
if (BUILD.vdomKey && idxInOld >= 0) {
|
|
2704
|
-
elmToMove = oldCh[idxInOld];
|
|
2705
|
-
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
2706
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
2707
|
-
} else {
|
|
2708
|
-
patch(elmToMove, newStartVnode, isInitialRender);
|
|
2709
|
-
oldCh[idxInOld] = void 0;
|
|
2710
|
-
node = elmToMove.$elm$;
|
|
2711
|
-
}
|
|
2712
|
-
newStartVnode = newCh[++newStartIdx];
|
|
2713
|
-
} else {
|
|
2714
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
2715
|
-
newStartVnode = newCh[++newStartIdx];
|
|
2716
|
-
}
|
|
2717
|
-
if (node) {
|
|
2718
|
-
if (BUILD.slotRelocation) {
|
|
2719
|
-
insertBefore(
|
|
2720
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
2721
|
-
node,
|
|
2722
|
-
referenceNode(oldStartVnode.$elm$)
|
|
2723
|
-
);
|
|
2724
|
-
} else {
|
|
2725
|
-
insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
|
-
}
|
|
2730
|
-
if (oldStartIdx > oldEndIdx) {
|
|
2731
|
-
addVnodes(
|
|
2732
|
-
parentElm,
|
|
2733
|
-
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
2734
|
-
newVNode2,
|
|
2735
|
-
newCh,
|
|
2736
|
-
newStartIdx,
|
|
2737
|
-
newEndIdx
|
|
2738
|
-
);
|
|
2739
|
-
} else if (BUILD.updatable && newStartIdx > newEndIdx) {
|
|
2740
|
-
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
2741
|
-
}
|
|
2742
|
-
};
|
|
2743
|
-
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
2744
|
-
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
2745
|
-
if (BUILD.slotRelocation && leftVNode.$tag$ === "slot") {
|
|
2746
|
-
return leftVNode.$name$ === rightVNode.$name$;
|
|
2747
|
-
}
|
|
2748
|
-
if (BUILD.vdomKey && !isInitialRender) {
|
|
2749
|
-
return leftVNode.$key$ === rightVNode.$key$;
|
|
2750
|
-
}
|
|
2751
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
2752
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
2753
|
-
}
|
|
2754
|
-
return true;
|
|
2755
|
-
}
|
|
2756
|
-
return false;
|
|
2757
|
-
};
|
|
2758
|
-
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
2759
|
-
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
2760
|
-
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
2761
|
-
const oldChildren = oldVNode.$children$;
|
|
2762
|
-
const newChildren = newVNode2.$children$;
|
|
2763
|
-
const tag = newVNode2.$tag$;
|
|
2764
|
-
const text = newVNode2.$text$;
|
|
2765
|
-
let defaultHolder;
|
|
2766
|
-
if (!BUILD.vdomText || text === null) {
|
|
2767
|
-
if (BUILD.svg) {
|
|
2768
|
-
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
2769
|
-
}
|
|
2770
|
-
if (BUILD.vdomAttribute || BUILD.reflect) {
|
|
2771
|
-
if (BUILD.slot && tag === "slot" && !useNativeShadowDom) {
|
|
2772
|
-
if (BUILD.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
|
|
2773
|
-
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
2774
|
-
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
2778
|
-
}
|
|
2779
|
-
if (BUILD.updatable && oldChildren !== null && newChildren !== null) {
|
|
2780
|
-
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
2781
|
-
} else if (newChildren !== null) {
|
|
2782
|
-
if (BUILD.updatable && BUILD.vdomText && oldVNode.$text$ !== null) {
|
|
2783
|
-
elm.textContent = "";
|
|
2784
|
-
}
|
|
2785
|
-
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
2786
|
-
} else if (
|
|
2787
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
2788
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
2789
|
-
) {
|
|
2790
|
-
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
2791
|
-
} else if (BUILD.hydrateClientSide && isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
|
|
2792
|
-
newVNode2.$children$ = oldChildren;
|
|
2793
|
-
}
|
|
2794
|
-
if (BUILD.svg && isSvgMode && tag === "svg") {
|
|
2795
|
-
isSvgMode = false;
|
|
2796
|
-
}
|
|
2797
|
-
} else if (BUILD.vdomText && BUILD.slotRelocation && (defaultHolder = elm["s-cr"])) {
|
|
2798
|
-
defaultHolder.parentNode.textContent = text;
|
|
2799
|
-
} else if (BUILD.vdomText && oldVNode.$text$ !== text) {
|
|
2800
|
-
elm.data = text;
|
|
2801
|
-
}
|
|
2802
|
-
};
|
|
2803
|
-
var relocateNodes = [];
|
|
2804
|
-
var markSlotContentForRelocation = (elm) => {
|
|
2805
|
-
let node;
|
|
2806
|
-
let hostContentNodes;
|
|
2807
|
-
let j;
|
|
2808
|
-
const children = elm.__childNodes || elm.childNodes;
|
|
2809
|
-
for (const childNode of children) {
|
|
2810
|
-
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
2811
|
-
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
2812
|
-
const slotName = childNode["s-sn"];
|
|
2813
|
-
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2814
|
-
node = hostContentNodes[j];
|
|
2815
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
2816
|
-
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2817
|
-
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2818
|
-
checkSlotFallbackVisibility = true;
|
|
2819
|
-
node["s-sn"] = node["s-sn"] || slotName;
|
|
2820
|
-
if (relocateNodeData) {
|
|
2821
|
-
relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
|
|
2822
|
-
relocateNodeData.$slotRefNode$ = childNode;
|
|
2823
|
-
} else {
|
|
2824
|
-
node["s-sh"] = childNode["s-hn"];
|
|
2825
|
-
relocateNodes.push({
|
|
2826
|
-
$slotRefNode$: childNode,
|
|
2827
|
-
$nodeToRelocate$: node
|
|
2828
|
-
});
|
|
2829
|
-
}
|
|
2830
|
-
if (node["s-sr"]) {
|
|
2831
|
-
relocateNodes.map((relocateNode) => {
|
|
2832
|
-
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
2833
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2834
|
-
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
2835
|
-
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
2836
|
-
}
|
|
2837
|
-
}
|
|
2838
|
-
});
|
|
2839
|
-
}
|
|
2840
|
-
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
2841
|
-
relocateNodes.push({
|
|
2842
|
-
$nodeToRelocate$: node
|
|
2843
|
-
});
|
|
2844
|
-
}
|
|
2845
|
-
}
|
|
2846
|
-
}
|
|
2847
|
-
}
|
|
2848
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
2849
|
-
markSlotContentForRelocation(childNode);
|
|
2850
|
-
}
|
|
2851
|
-
}
|
|
2852
|
-
};
|
|
2853
|
-
var nullifyVNodeRefs = (vNode) => {
|
|
2854
|
-
if (BUILD.vdomRef) {
|
|
2855
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
2856
|
-
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2857
|
-
}
|
|
2858
|
-
};
|
|
2859
|
-
var insertBefore = (parent, newNode, reference) => {
|
|
2860
|
-
if (BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
2861
|
-
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
2862
|
-
} else if (BUILD.experimentalSlotFixes && typeof newNode["s-sn"] === "string") {
|
|
2863
|
-
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
2864
|
-
patchParentNode(newNode);
|
|
2865
|
-
}
|
|
2866
|
-
parent.insertBefore(newNode, reference);
|
|
2867
|
-
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
2868
|
-
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
2869
|
-
return newNode;
|
|
2870
|
-
}
|
|
2871
|
-
if (BUILD.experimentalSlotFixes && parent.__insertBefore) {
|
|
2872
|
-
return parent.__insertBefore(newNode, reference);
|
|
2873
|
-
} else {
|
|
2874
|
-
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
2875
|
-
}
|
|
2876
|
-
};
|
|
2877
|
-
function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
2878
|
-
var _a, _b;
|
|
2879
|
-
let scopeId2;
|
|
2880
|
-
if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
|
|
2881
|
-
const scopeName = slotNode["s-sn"];
|
|
2882
|
-
const hostName = slotNode["s-hn"];
|
|
2883
|
-
(_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
|
|
2884
|
-
if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
|
|
2885
|
-
let child = (oldParent.__childNodes || oldParent.childNodes)[0];
|
|
2886
|
-
let found = false;
|
|
2887
|
-
while (child) {
|
|
2888
|
-
if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
|
|
2889
|
-
found = true;
|
|
2890
|
-
break;
|
|
2891
|
-
}
|
|
2892
|
-
child = child.nextSibling;
|
|
2893
|
-
}
|
|
2894
|
-
if (!found) oldParent.classList.remove(scopeId2 + "-s");
|
|
2895
|
-
}
|
|
2896
|
-
}
|
|
2897
|
-
}
|
|
2898
|
-
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
2899
|
-
var _a, _b, _c, _d, _e;
|
|
2900
|
-
const hostElm = hostRef.$hostElement$;
|
|
2901
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
2902
|
-
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2903
|
-
const isHostElement = isHost(renderFnResults);
|
|
2904
|
-
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
2905
|
-
hostTagName = hostElm.tagName;
|
|
2906
|
-
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
|
|
2907
|
-
throw new Error(`The <Host> must be the single root component.
|
|
2908
|
-
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
2909
|
-
|
|
2910
|
-
The render() function should look like this instead:
|
|
2911
|
-
|
|
2912
|
-
render() {
|
|
2913
|
-
// Do not return an array
|
|
2914
|
-
return (
|
|
2915
|
-
<Host>{content}</Host>
|
|
2916
|
-
);
|
|
2917
|
-
}
|
|
2918
|
-
`);
|
|
2919
|
-
}
|
|
2920
|
-
if (BUILD.reflect && cmpMeta.$attrsToReflect$) {
|
|
2921
|
-
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
2922
|
-
cmpMeta.$attrsToReflect$.map(
|
|
2923
|
-
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
2924
|
-
);
|
|
2925
|
-
}
|
|
2926
|
-
if (isInitialLoad && rootVnode.$attrs$) {
|
|
2927
|
-
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
2928
|
-
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
2929
|
-
rootVnode.$attrs$[key] = hostElm[key];
|
|
2930
|
-
}
|
|
2931
|
-
}
|
|
2932
|
-
}
|
|
2933
|
-
rootVnode.$tag$ = null;
|
|
2934
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
2935
|
-
hostRef.$vnode$ = rootVnode;
|
|
2936
|
-
rootVnode.$elm$ = oldVNode.$elm$ = BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
|
|
2937
|
-
if (BUILD.scoped || BUILD.shadowDom) {
|
|
2938
|
-
scopeId = hostElm["s-sc"];
|
|
2939
|
-
}
|
|
2940
|
-
useNativeShadowDom = supportsShadow && !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
2941
|
-
if (BUILD.slotRelocation) {
|
|
2942
|
-
contentRef = hostElm["s-cr"];
|
|
2943
|
-
checkSlotFallbackVisibility = false;
|
|
2944
|
-
}
|
|
2945
|
-
patch(oldVNode, rootVnode, isInitialLoad);
|
|
2946
|
-
if (BUILD.slotRelocation) {
|
|
2947
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2948
|
-
if (checkSlotRelocate) {
|
|
2949
|
-
markSlotContentForRelocation(rootVnode.$elm$);
|
|
2950
|
-
for (const relocateData of relocateNodes) {
|
|
2951
|
-
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
2952
|
-
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2953
|
-
const orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
2954
|
-
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2955
|
-
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
2956
|
-
}
|
|
2957
|
-
}
|
|
2958
|
-
for (const relocateData of relocateNodes) {
|
|
2959
|
-
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
2960
|
-
const slotRefNode = relocateData.$slotRefNode$;
|
|
2961
|
-
if (slotRefNode) {
|
|
2962
|
-
const parentNodeRef = slotRefNode.parentNode;
|
|
2963
|
-
let insertBeforeNode = slotRefNode.nextSibling;
|
|
2964
|
-
if (!BUILD.hydrateServerSide && (!BUILD.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
|
|
2965
|
-
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
2966
|
-
while (orgLocationNode) {
|
|
2967
|
-
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
2968
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
2969
|
-
refNode = refNode.nextSibling;
|
|
2970
|
-
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
2971
|
-
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
2972
|
-
}
|
|
2973
|
-
if (!refNode || !refNode["s-nr"]) {
|
|
2974
|
-
insertBeforeNode = refNode;
|
|
2975
|
-
break;
|
|
2976
|
-
}
|
|
2977
|
-
}
|
|
2978
|
-
orgLocationNode = orgLocationNode.previousSibling;
|
|
2979
|
-
}
|
|
2980
|
-
}
|
|
2981
|
-
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
2982
|
-
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2983
|
-
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
2984
|
-
if (nodeToRelocate !== insertBeforeNode) {
|
|
2985
|
-
if (!BUILD.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
2986
|
-
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
2987
|
-
}
|
|
2988
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
2989
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
2990
|
-
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
2991
|
-
}
|
|
2992
|
-
}
|
|
2993
|
-
}
|
|
2994
|
-
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
2995
|
-
} else {
|
|
2996
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
2997
|
-
if (isInitialLoad) {
|
|
2998
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
2999
|
-
}
|
|
3000
|
-
nodeToRelocate.hidden = true;
|
|
3001
|
-
}
|
|
3002
|
-
}
|
|
3003
|
-
}
|
|
3004
|
-
}
|
|
3005
|
-
if (checkSlotFallbackVisibility) {
|
|
3006
|
-
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
3007
|
-
}
|
|
3008
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
3009
|
-
relocateNodes.length = 0;
|
|
3010
|
-
}
|
|
3011
|
-
if (BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3012
|
-
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
3013
|
-
for (const childNode of children) {
|
|
3014
|
-
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
3015
|
-
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
3016
|
-
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
3017
|
-
}
|
|
3018
|
-
childNode.hidden = true;
|
|
3019
|
-
}
|
|
3020
|
-
}
|
|
3021
|
-
}
|
|
3022
|
-
contentRef = void 0;
|
|
3023
|
-
};
|
|
3024
|
-
var slotReferenceDebugNode = (slotVNode) => {
|
|
3025
|
-
var _a;
|
|
3026
|
-
return (_a = win.document) == null ? void 0 : _a.createComment(
|
|
3027
|
-
`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
|
|
3028
|
-
);
|
|
3029
|
-
};
|
|
3030
|
-
var originalLocationDebugNode = (nodeToRelocate) => {
|
|
3031
|
-
var _a;
|
|
3032
|
-
return (_a = win.document) == null ? void 0 : _a.createComment(
|
|
3033
|
-
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
3034
|
-
);
|
|
3035
|
-
};
|
|
3036
|
-
|
|
3037
|
-
// src/runtime/update-component.ts
|
|
3038
|
-
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
3039
|
-
if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
3040
|
-
const index = ancestorComponent["s-p"].push(
|
|
3041
|
-
new Promise(
|
|
3042
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
3043
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
3044
|
-
r();
|
|
3045
|
-
}
|
|
3046
|
-
)
|
|
3047
|
-
);
|
|
3048
|
-
}
|
|
3049
|
-
};
|
|
3050
|
-
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
3051
|
-
if (BUILD.taskQueue && BUILD.updatable) {
|
|
3052
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
3053
|
-
}
|
|
3054
|
-
if (BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
3055
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
3056
|
-
return;
|
|
3057
|
-
}
|
|
3058
|
-
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
3059
|
-
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
3060
|
-
if (isInitialLoad) {
|
|
3061
|
-
queueMicrotask(() => {
|
|
3062
|
-
dispatch();
|
|
3063
|
-
});
|
|
3064
|
-
return;
|
|
3065
|
-
}
|
|
3066
|
-
return BUILD.taskQueue ? writeTask(dispatch) : dispatch();
|
|
3067
|
-
};
|
|
3068
|
-
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
3069
|
-
const elm = hostRef.$hostElement$;
|
|
3070
|
-
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
3071
|
-
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3072
|
-
if (!instance) {
|
|
3073
|
-
throw new Error(
|
|
3074
|
-
`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
|
|
3075
|
-
);
|
|
3076
|
-
}
|
|
3077
|
-
let maybePromise;
|
|
3078
|
-
if (isInitialLoad) {
|
|
3079
|
-
if (BUILD.lazyLoad && BUILD.hostListener) {
|
|
3080
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
3081
|
-
if (hostRef.$queuedListeners$) {
|
|
3082
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
3083
|
-
hostRef.$queuedListeners$ = void 0;
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
emitLifecycleEvent(elm, "componentWillLoad");
|
|
3087
|
-
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
3088
|
-
} else {
|
|
3089
|
-
emitLifecycleEvent(elm, "componentWillUpdate");
|
|
3090
|
-
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
3091
|
-
}
|
|
3092
|
-
emitLifecycleEvent(elm, "componentWillRender");
|
|
3093
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
3094
|
-
endSchedule();
|
|
3095
|
-
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
3096
|
-
};
|
|
3097
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
|
|
3098
|
-
console.error(err2);
|
|
3099
|
-
fn();
|
|
3100
|
-
}) : fn();
|
|
3101
|
-
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
3102
|
-
var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
3103
|
-
var _a;
|
|
3104
|
-
const elm = hostRef.$hostElement$;
|
|
3105
|
-
const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
|
|
3106
|
-
const rc = elm["s-rc"];
|
|
3107
|
-
if (BUILD.style && isInitialLoad) {
|
|
3108
|
-
attachStyles(hostRef);
|
|
3109
|
-
}
|
|
3110
|
-
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
|
3111
|
-
if (BUILD.isDev) {
|
|
3112
|
-
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
3113
|
-
}
|
|
3114
|
-
if (BUILD.hydrateServerSide) {
|
|
3115
|
-
await callRender(hostRef, instance, elm, isInitialLoad);
|
|
3116
|
-
} else {
|
|
3117
|
-
callRender(hostRef, instance, elm, isInitialLoad);
|
|
3118
|
-
}
|
|
3119
|
-
if (BUILD.isDev) {
|
|
3120
|
-
hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
|
|
3121
|
-
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
3122
|
-
}
|
|
3123
|
-
if (BUILD.hydrateServerSide) {
|
|
3124
|
-
try {
|
|
3125
|
-
serverSideConnected(elm);
|
|
3126
|
-
if (isInitialLoad) {
|
|
3127
|
-
if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3128
|
-
elm["s-en"] = "";
|
|
3129
|
-
} else if (hostRef.$cmpMeta$.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3130
|
-
elm["s-en"] = "c";
|
|
3131
|
-
}
|
|
3132
|
-
}
|
|
3133
|
-
} catch (e) {
|
|
3134
|
-
consoleError(e, elm);
|
|
3135
|
-
}
|
|
3136
|
-
}
|
|
3137
|
-
if (BUILD.asyncLoading && rc) {
|
|
3138
|
-
rc.map((cb) => cb());
|
|
3139
|
-
elm["s-rc"] = void 0;
|
|
3140
|
-
}
|
|
3141
|
-
endRender();
|
|
3142
|
-
endUpdate();
|
|
3143
|
-
if (BUILD.asyncLoading) {
|
|
3144
|
-
const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
|
|
3145
|
-
const postUpdate = () => postUpdateComponent(hostRef);
|
|
3146
|
-
if (childrenPromises.length === 0) {
|
|
3147
|
-
postUpdate();
|
|
3148
|
-
} else {
|
|
3149
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
3150
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3151
|
-
childrenPromises.length = 0;
|
|
3152
|
-
}
|
|
3153
|
-
} else {
|
|
3154
|
-
postUpdateComponent(hostRef);
|
|
3155
|
-
}
|
|
3156
|
-
};
|
|
3157
|
-
var renderingRef = null;
|
|
3158
|
-
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
3159
|
-
const allRenderFn = BUILD.allRenderFn ? true : false;
|
|
3160
|
-
const lazyLoad = BUILD.lazyLoad ? true : false;
|
|
3161
|
-
const taskQueue = BUILD.taskQueue ? true : false;
|
|
3162
|
-
const updatable = BUILD.updatable ? true : false;
|
|
3163
|
-
try {
|
|
3164
|
-
renderingRef = instance;
|
|
3165
|
-
instance = allRenderFn ? instance.render() : instance.render && instance.render();
|
|
3166
|
-
if (updatable && taskQueue) {
|
|
3167
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
3168
|
-
}
|
|
3169
|
-
if (updatable || lazyLoad) {
|
|
3170
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
3171
|
-
}
|
|
3172
|
-
if (BUILD.hasRenderFn || BUILD.reflect) {
|
|
3173
|
-
if (BUILD.vdomRender || BUILD.reflect) {
|
|
3174
|
-
if (BUILD.hydrateServerSide) {
|
|
3175
|
-
return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
|
|
3176
|
-
} else {
|
|
3177
|
-
renderVdom(hostRef, instance, isInitialLoad);
|
|
3178
|
-
}
|
|
3179
|
-
} else {
|
|
3180
|
-
const shadowRoot = elm.shadowRoot;
|
|
3181
|
-
if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3182
|
-
shadowRoot.textContent = instance;
|
|
3183
|
-
} else {
|
|
3184
|
-
elm.textContent = instance;
|
|
3185
|
-
}
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
|
-
} catch (e) {
|
|
3189
|
-
consoleError(e, hostRef.$hostElement$);
|
|
3190
|
-
}
|
|
3191
|
-
renderingRef = null;
|
|
3192
|
-
return null;
|
|
3193
|
-
};
|
|
3194
|
-
var getRenderingRef = () => renderingRef;
|
|
3195
|
-
var postUpdateComponent = (hostRef) => {
|
|
3196
|
-
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
3197
|
-
const elm = hostRef.$hostElement$;
|
|
3198
|
-
const endPostUpdate = createTime("postUpdate", tagName);
|
|
3199
|
-
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3200
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3201
|
-
if (BUILD.isDev) {
|
|
3202
|
-
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
3203
|
-
}
|
|
3204
|
-
safeCall(instance, "componentDidRender", void 0, elm);
|
|
3205
|
-
if (BUILD.isDev) {
|
|
3206
|
-
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
3207
|
-
}
|
|
3208
|
-
emitLifecycleEvent(elm, "componentDidRender");
|
|
3209
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
3210
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
3211
|
-
if (BUILD.asyncLoading && BUILD.cssAnnotations) {
|
|
3212
|
-
addHydratedFlag(elm);
|
|
3213
|
-
}
|
|
3214
|
-
if (BUILD.isDev) {
|
|
3215
|
-
hostRef.$flags$ |= 2048 /* devOnDidLoad */;
|
|
3216
|
-
}
|
|
3217
|
-
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
3218
|
-
if (BUILD.isDev) {
|
|
3219
|
-
hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
|
|
3220
|
-
}
|
|
3221
|
-
emitLifecycleEvent(elm, "componentDidLoad");
|
|
3222
|
-
endPostUpdate();
|
|
3223
|
-
if (BUILD.asyncLoading) {
|
|
3224
|
-
hostRef.$onReadyResolve$(elm);
|
|
3225
|
-
if (!ancestorComponent) {
|
|
3226
|
-
appDidLoad(tagName);
|
|
3227
|
-
}
|
|
3228
|
-
}
|
|
3229
|
-
} else {
|
|
3230
|
-
if (BUILD.isDev) {
|
|
3231
|
-
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
3232
|
-
}
|
|
3233
|
-
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
3234
|
-
if (BUILD.isDev) {
|
|
3235
|
-
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
3236
|
-
}
|
|
3237
|
-
emitLifecycleEvent(elm, "componentDidUpdate");
|
|
3238
|
-
endPostUpdate();
|
|
3239
|
-
}
|
|
3240
|
-
if (BUILD.method && BUILD.lazyLoad) {
|
|
3241
|
-
hostRef.$onInstanceResolve$(elm);
|
|
3242
|
-
}
|
|
3243
|
-
if (BUILD.asyncLoading) {
|
|
3244
|
-
if (hostRef.$onRenderResolve$) {
|
|
3245
|
-
hostRef.$onRenderResolve$();
|
|
3246
|
-
hostRef.$onRenderResolve$ = void 0;
|
|
3247
|
-
}
|
|
3248
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
3249
|
-
nextTick(() => scheduleUpdate(hostRef, false));
|
|
3250
|
-
}
|
|
3251
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
3252
|
-
}
|
|
3253
|
-
};
|
|
3254
|
-
var forceUpdate = (ref) => {
|
|
3255
|
-
var _a;
|
|
3256
|
-
if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
|
|
3257
|
-
const hostRef = getHostRef(ref);
|
|
3258
|
-
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
|
3259
|
-
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
3260
|
-
scheduleUpdate(hostRef, false);
|
|
3261
|
-
}
|
|
3262
|
-
return isConnected;
|
|
3263
|
-
}
|
|
3264
|
-
return false;
|
|
3265
|
-
};
|
|
3266
|
-
var appDidLoad = (who) => {
|
|
3267
|
-
var _a;
|
|
3268
|
-
if (BUILD.asyncQueue) {
|
|
3269
|
-
plt.$flags$ |= 2 /* appLoaded */;
|
|
3270
|
-
}
|
|
3271
|
-
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
3272
|
-
if (BUILD.hydrateClientSide) {
|
|
3273
|
-
if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
|
|
3274
|
-
plt.$orgLocNodes$.clear();
|
|
3275
|
-
}
|
|
3276
|
-
}
|
|
3277
|
-
if (BUILD.profile && performance.measure) {
|
|
3278
|
-
performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
|
|
3279
|
-
}
|
|
3280
|
-
};
|
|
3281
|
-
var safeCall = (instance, method, arg, elm) => {
|
|
3282
|
-
if (instance && instance[method]) {
|
|
3283
|
-
try {
|
|
3284
|
-
return instance[method](arg);
|
|
3285
|
-
} catch (e) {
|
|
3286
|
-
consoleError(e, elm);
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
return void 0;
|
|
3290
|
-
};
|
|
3291
|
-
var emitLifecycleEvent = (elm, lifecycleName) => {
|
|
3292
|
-
if (BUILD.lifecycleDOMEvents) {
|
|
3293
|
-
emitEvent(elm, "stencil_" + lifecycleName, {
|
|
3294
|
-
bubbles: true,
|
|
3295
|
-
composed: true,
|
|
3296
|
-
detail: {
|
|
3297
|
-
namespace: NAMESPACE
|
|
3298
|
-
}
|
|
3299
|
-
});
|
|
3300
|
-
}
|
|
3301
|
-
};
|
|
3302
|
-
var addHydratedFlag = (elm) => {
|
|
3303
|
-
var _a, _b;
|
|
3304
|
-
return BUILD.hydratedClass ? elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") : BUILD.hydratedAttribute ? elm.setAttribute((_b = BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
|
|
3305
|
-
};
|
|
3306
|
-
var serverSideConnected = (elm) => {
|
|
3307
|
-
const children = elm.children;
|
|
3308
|
-
if (children != null) {
|
|
3309
|
-
for (let i2 = 0, ii = children.length; i2 < ii; i2++) {
|
|
3310
|
-
const childElm = children[i2];
|
|
3311
|
-
if (typeof childElm.connectedCallback === "function") {
|
|
3312
|
-
childElm.connectedCallback();
|
|
3313
|
-
}
|
|
3314
|
-
serverSideConnected(childElm);
|
|
3315
|
-
}
|
|
3316
|
-
}
|
|
3317
|
-
};
|
|
3318
|
-
|
|
3319
|
-
// src/runtime/set-value.ts
|
|
3320
|
-
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
3321
|
-
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
3322
|
-
const hostRef = getHostRef(ref);
|
|
3323
|
-
if (!hostRef) {
|
|
3324
|
-
return;
|
|
3325
|
-
}
|
|
3326
|
-
if (BUILD.lazyLoad && !hostRef) {
|
|
3327
|
-
throw new Error(
|
|
3328
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
3329
|
-
);
|
|
3330
|
-
}
|
|
3331
|
-
const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
|
|
3332
|
-
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
3333
|
-
const flags = hostRef.$flags$;
|
|
3334
|
-
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3335
|
-
newVal = parsePropertyValue(
|
|
3336
|
-
newVal,
|
|
3337
|
-
cmpMeta.$members$[propName][0],
|
|
3338
|
-
BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3339
|
-
);
|
|
3340
|
-
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
3341
|
-
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
3342
|
-
if ((!BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
3343
|
-
hostRef.$instanceValues$.set(propName, newVal);
|
|
3344
|
-
if (BUILD.isDev) {
|
|
3345
|
-
if (hostRef.$flags$ & 1024 /* devOnRender */) {
|
|
3346
|
-
consoleDevWarn(
|
|
3347
|
-
`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
|
|
3348
|
-
"\nElement",
|
|
3349
|
-
elm,
|
|
3350
|
-
"\nNew value",
|
|
3351
|
-
newVal,
|
|
3352
|
-
"\nOld value",
|
|
3353
|
-
oldVal
|
|
3354
|
-
);
|
|
3355
|
-
} else if (hostRef.$flags$ & 2048 /* devOnDidLoad */) {
|
|
3356
|
-
consoleDevWarn(
|
|
3357
|
-
`The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,
|
|
3358
|
-
"\nElement",
|
|
3359
|
-
elm,
|
|
3360
|
-
"\nNew value",
|
|
3361
|
-
newVal,
|
|
3362
|
-
"\nOld value",
|
|
3363
|
-
oldVal
|
|
3364
|
-
);
|
|
3365
|
-
}
|
|
3366
|
-
}
|
|
3367
|
-
if (!BUILD.lazyLoad || instance) {
|
|
3368
|
-
if (BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
3369
|
-
const watchMethods = cmpMeta.$watchers$[propName];
|
|
3370
|
-
if (watchMethods) {
|
|
3371
|
-
watchMethods.map((watchMethodName) => {
|
|
3372
|
-
try {
|
|
3373
|
-
instance[watchMethodName](newVal, oldVal, propName);
|
|
3374
|
-
} catch (e) {
|
|
3375
|
-
consoleError(e, elm);
|
|
3376
|
-
}
|
|
3377
|
-
});
|
|
3378
|
-
}
|
|
3379
|
-
}
|
|
3380
|
-
if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
3381
|
-
if (instance.componentShouldUpdate) {
|
|
3382
|
-
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
3383
|
-
return;
|
|
3384
|
-
}
|
|
3385
|
-
}
|
|
3386
|
-
scheduleUpdate(hostRef, false);
|
|
3387
|
-
}
|
|
3388
|
-
}
|
|
3389
|
-
}
|
|
3390
|
-
};
|
|
3391
|
-
|
|
3392
|
-
// src/runtime/proxy-component.ts
|
|
3393
|
-
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3394
|
-
var _a, _b;
|
|
3395
|
-
const prototype = Cstr.prototype;
|
|
3396
|
-
if (BUILD.isTesting) {
|
|
3397
|
-
if (prototype.__stencilAugmented) {
|
|
3398
|
-
return;
|
|
3399
|
-
}
|
|
3400
|
-
prototype.__stencilAugmented = true;
|
|
3401
|
-
}
|
|
3402
|
-
if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
3403
|
-
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
3404
|
-
const originalFormAssociatedCallback = prototype[cbName];
|
|
3405
|
-
Object.defineProperty(prototype, cbName, {
|
|
3406
|
-
value(...args) {
|
|
3407
|
-
var _a2;
|
|
3408
|
-
const hostRef = getHostRef(this);
|
|
3409
|
-
const instance = BUILD.lazyLoad ? hostRef == null ? void 0 : hostRef.$lazyInstance$ : this;
|
|
3410
|
-
if (!instance) {
|
|
3411
|
-
(_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
|
|
3412
|
-
const cb = asyncInstance[cbName];
|
|
3413
|
-
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
3414
|
-
});
|
|
3415
|
-
} else {
|
|
3416
|
-
const cb = BUILD.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
|
|
3417
|
-
typeof cb === "function" && cb.call(instance, ...args);
|
|
3418
|
-
}
|
|
3419
|
-
}
|
|
3420
|
-
});
|
|
3421
|
-
});
|
|
3422
|
-
}
|
|
3423
|
-
if (BUILD.member && cmpMeta.$members$ || BUILD.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
3424
|
-
if (BUILD.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3425
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
3426
|
-
}
|
|
3427
|
-
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3428
|
-
members.map(([memberName, [memberFlags]]) => {
|
|
3429
|
-
if ((BUILD.prop || BUILD.state) && (memberFlags & 31 /* Prop */ || (!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3430
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
3431
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3432
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3433
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
3434
|
-
Object.defineProperty(prototype, memberName, {
|
|
3435
|
-
get() {
|
|
3436
|
-
if (BUILD.lazyLoad) {
|
|
3437
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
3438
|
-
return getValue(this, memberName);
|
|
3439
|
-
}
|
|
3440
|
-
const ref = getHostRef(this);
|
|
3441
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
3442
|
-
if (!instance) return;
|
|
3443
|
-
return instance[memberName];
|
|
3444
|
-
}
|
|
3445
|
-
if (!BUILD.lazyLoad) {
|
|
3446
|
-
return origGetter ? origGetter.apply(this) : getValue(this, memberName);
|
|
3447
|
-
}
|
|
3448
|
-
},
|
|
3449
|
-
configurable: true,
|
|
3450
|
-
enumerable: true
|
|
3451
|
-
});
|
|
3452
|
-
}
|
|
3453
|
-
Object.defineProperty(prototype, memberName, {
|
|
3454
|
-
set(newValue) {
|
|
3455
|
-
const ref = getHostRef(this);
|
|
3456
|
-
if (!ref) {
|
|
3457
|
-
return;
|
|
3458
|
-
}
|
|
3459
|
-
if (BUILD.isDev) {
|
|
3460
|
-
if (
|
|
3461
|
-
// we are proxying the instance (not element)
|
|
3462
|
-
(flags & 1 /* isElementConstructor */) === 0 && // if the class has a setter, then the Element can update instance values, so ignore
|
|
3463
|
-
(cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0 && // the element is not constructing
|
|
3464
|
-
(ref && ref.$flags$ & 8 /* isConstructingInstance */) === 0 && // the member is a prop
|
|
3465
|
-
(memberFlags & 31 /* Prop */) !== 0 && // the member is not mutable
|
|
3466
|
-
(memberFlags & 1024 /* Mutable */) === 0
|
|
3467
|
-
) {
|
|
3468
|
-
consoleDevWarn(
|
|
3469
|
-
`@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.
|
|
3470
|
-
More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
3471
|
-
);
|
|
3472
|
-
}
|
|
3473
|
-
}
|
|
3474
|
-
if (origSetter) {
|
|
3475
|
-
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
3476
|
-
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
3477
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
3478
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3479
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
3480
|
-
}
|
|
3481
|
-
origSetter.apply(this, [
|
|
3482
|
-
parsePropertyValue(
|
|
3483
|
-
newValue,
|
|
3484
|
-
memberFlags,
|
|
3485
|
-
BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3486
|
-
)
|
|
3487
|
-
]);
|
|
3488
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
3489
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
3490
|
-
return;
|
|
3491
|
-
}
|
|
3492
|
-
if (!BUILD.lazyLoad) {
|
|
3493
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
3494
|
-
return;
|
|
3495
|
-
}
|
|
3496
|
-
if (BUILD.lazyLoad) {
|
|
3497
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
3498
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
3499
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
3500
|
-
ref.$onReadyPromise$.then(() => {
|
|
3501
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
3502
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
3503
|
-
}
|
|
3504
|
-
});
|
|
3505
|
-
}
|
|
3506
|
-
return;
|
|
3507
|
-
}
|
|
3508
|
-
const setterSetVal = () => {
|
|
3509
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
3510
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3511
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
3512
|
-
}
|
|
3513
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
3514
|
-
newValue,
|
|
3515
|
-
memberFlags,
|
|
3516
|
-
BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3517
|
-
);
|
|
3518
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3519
|
-
};
|
|
3520
|
-
if (ref.$lazyInstance$) {
|
|
3521
|
-
setterSetVal();
|
|
3522
|
-
} else {
|
|
3523
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
}
|
|
3527
|
-
});
|
|
3528
|
-
} else if (BUILD.lazyLoad && BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
3529
|
-
Object.defineProperty(prototype, memberName, {
|
|
3530
|
-
value(...args) {
|
|
3531
|
-
var _a2;
|
|
3532
|
-
const ref = getHostRef(this);
|
|
3533
|
-
return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
|
|
3534
|
-
var _a3;
|
|
3535
|
-
return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
|
|
3536
|
-
});
|
|
3537
|
-
}
|
|
3538
|
-
});
|
|
3539
|
-
}
|
|
3540
|
-
});
|
|
3541
|
-
if (BUILD.observeAttribute && (!BUILD.lazyLoad || flags & 1 /* isElementConstructor */)) {
|
|
3542
|
-
const attrNameToPropName = /* @__PURE__ */ new Map();
|
|
3543
|
-
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
|
3544
|
-
plt.jmp(() => {
|
|
3545
|
-
var _a2;
|
|
3546
|
-
const propName = attrNameToPropName.get(attrName);
|
|
3547
|
-
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
3548
|
-
newValue = this[propName];
|
|
3549
|
-
delete this[propName];
|
|
3550
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
3551
|
-
this[propName] == newValue) {
|
|
3552
|
-
return;
|
|
3553
|
-
} else if (propName == null) {
|
|
3554
|
-
const hostRef = getHostRef(this);
|
|
3555
|
-
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
3556
|
-
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
3557
|
-
const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
|
|
3558
|
-
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3559
|
-
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
3560
|
-
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
3561
|
-
if (instance[callbackName] != null) {
|
|
3562
|
-
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
3563
|
-
}
|
|
3564
|
-
});
|
|
3565
|
-
}
|
|
3566
|
-
return;
|
|
3567
|
-
}
|
|
3568
|
-
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3569
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
3570
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3571
|
-
this[propName] = newValue;
|
|
3572
|
-
}
|
|
3573
|
-
});
|
|
3574
|
-
};
|
|
3575
|
-
Cstr.observedAttributes = Array.from(
|
|
3576
|
-
/* @__PURE__ */ new Set([
|
|
3577
|
-
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
3578
|
-
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
|
3579
|
-
var _a2;
|
|
3580
|
-
const attrName = m[1] || propName;
|
|
3581
|
-
attrNameToPropName.set(attrName, propName);
|
|
3582
|
-
if (BUILD.reflect && m[0] & 512 /* ReflectAttr */) {
|
|
3583
|
-
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
3584
|
-
}
|
|
3585
|
-
return attrName;
|
|
3586
|
-
})
|
|
3587
|
-
])
|
|
3588
|
-
);
|
|
3589
|
-
}
|
|
3590
|
-
}
|
|
3591
|
-
return Cstr;
|
|
3592
|
-
};
|
|
3593
|
-
|
|
3594
|
-
// src/runtime/initialize-component.ts
|
|
3595
|
-
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
3596
|
-
let Cstr;
|
|
3597
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
3598
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
3599
|
-
const bundleId = cmpMeta.$lazyBundleId$;
|
|
3600
|
-
if (BUILD.lazyLoad && bundleId) {
|
|
3601
|
-
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
3602
|
-
if (CstrImport && "then" in CstrImport) {
|
|
3603
|
-
const endLoad = uniqueTime(
|
|
3604
|
-
`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
|
|
3605
|
-
`[Stencil] Load module for <${cmpMeta.$tagName$}>`
|
|
3606
|
-
);
|
|
3607
|
-
Cstr = await CstrImport;
|
|
3608
|
-
endLoad();
|
|
3609
|
-
} else {
|
|
3610
|
-
Cstr = CstrImport;
|
|
3611
|
-
}
|
|
3612
|
-
if (!Cstr) {
|
|
3613
|
-
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
3614
|
-
}
|
|
3615
|
-
if (BUILD.member && !Cstr.isProxied) {
|
|
3616
|
-
if (BUILD.watchCallback) {
|
|
3617
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
3618
|
-
}
|
|
3619
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
3620
|
-
Cstr.isProxied = true;
|
|
3621
|
-
}
|
|
3622
|
-
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3623
|
-
if (BUILD.member) {
|
|
3624
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3625
|
-
}
|
|
3626
|
-
try {
|
|
3627
|
-
new Cstr(hostRef);
|
|
3628
|
-
} catch (e) {
|
|
3629
|
-
consoleError(e, elm);
|
|
3630
|
-
}
|
|
3631
|
-
if (BUILD.member) {
|
|
3632
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
3633
|
-
}
|
|
3634
|
-
if (BUILD.watchCallback) {
|
|
3635
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
3636
|
-
}
|
|
3637
|
-
endNewInstance();
|
|
3638
|
-
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3639
|
-
} else {
|
|
3640
|
-
Cstr = elm.constructor;
|
|
3641
|
-
const cmpTag = elm.localName;
|
|
3642
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3643
|
-
}
|
|
3644
|
-
if (BUILD.style && Cstr && Cstr.style) {
|
|
3645
|
-
let style;
|
|
3646
|
-
if (typeof Cstr.style === "string") {
|
|
3647
|
-
style = Cstr.style;
|
|
3648
|
-
} else if (BUILD.mode && typeof Cstr.style !== "string") {
|
|
3649
|
-
hostRef.$modeName$ = computeMode(elm);
|
|
3650
|
-
if (hostRef.$modeName$) {
|
|
3651
|
-
style = Cstr.style[hostRef.$modeName$];
|
|
3652
|
-
}
|
|
3653
|
-
if (BUILD.hydrateServerSide && hostRef.$modeName$) {
|
|
3654
|
-
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
3655
|
-
}
|
|
3656
|
-
}
|
|
3657
|
-
const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
|
|
3658
|
-
if (!styles.has(scopeId2)) {
|
|
3659
|
-
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
3660
|
-
if (BUILD.hydrateServerSide && BUILD.shadowDom) {
|
|
3661
|
-
if (cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */) {
|
|
3662
|
-
style = scopeCss(style, scopeId2, true);
|
|
3663
|
-
} else if (needsScopedSSR()) {
|
|
3664
|
-
style = expandPartSelectors(style);
|
|
3665
|
-
}
|
|
3666
|
-
}
|
|
3667
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3668
|
-
endRegisterStyles();
|
|
3669
|
-
}
|
|
3670
|
-
}
|
|
3671
|
-
}
|
|
3672
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3673
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3674
|
-
if (BUILD.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3675
|
-
ancestorComponent["s-rc"].push(schedule);
|
|
3676
|
-
} else {
|
|
3677
|
-
schedule();
|
|
3678
|
-
}
|
|
3679
|
-
};
|
|
3680
|
-
var fireConnectedCallback = (instance, elm) => {
|
|
3681
|
-
if (BUILD.lazyLoad) {
|
|
3682
|
-
safeCall(instance, "connectedCallback", void 0, elm);
|
|
3683
|
-
}
|
|
3684
|
-
};
|
|
3685
|
-
|
|
3686
|
-
// src/runtime/connected-callback.ts
|
|
3687
|
-
var connectedCallback = (elm) => {
|
|
3688
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3689
|
-
const hostRef = getHostRef(elm);
|
|
3690
|
-
if (!hostRef) {
|
|
3691
|
-
return;
|
|
3692
|
-
}
|
|
3693
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
3694
|
-
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
3695
|
-
if (BUILD.hostListenerTargetParent) {
|
|
3696
|
-
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
|
|
3697
|
-
}
|
|
3698
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
3699
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
3700
|
-
let hostId;
|
|
3701
|
-
if (BUILD.hydrateClientSide) {
|
|
3702
|
-
hostId = elm.getAttribute(HYDRATE_ID);
|
|
3703
|
-
if (hostId) {
|
|
3704
|
-
if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3705
|
-
const scopeId2 = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
|
|
3706
|
-
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
3707
|
-
} else if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3708
|
-
const scopeId2 = getScopeId(cmpMeta, BUILD.mode ? elm.getAttribute("s-mode") : void 0);
|
|
3709
|
-
elm["s-sc"] = scopeId2;
|
|
3710
|
-
}
|
|
3711
|
-
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
3712
|
-
}
|
|
3713
|
-
}
|
|
3714
|
-
if (BUILD.slotRelocation && !hostId) {
|
|
3715
|
-
if (BUILD.hydrateServerSide || (BUILD.slot || BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
3716
|
-
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
3717
|
-
setContentReference(elm);
|
|
3718
|
-
}
|
|
3719
|
-
}
|
|
3720
|
-
if (BUILD.asyncLoading) {
|
|
3721
|
-
let ancestorComponent = elm;
|
|
3722
|
-
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
3723
|
-
if (BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
3724
|
-
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
3725
|
-
break;
|
|
3726
|
-
}
|
|
3727
|
-
}
|
|
3728
|
-
}
|
|
3729
|
-
if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {
|
|
3730
|
-
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3731
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
3732
|
-
const value = elm[memberName];
|
|
3733
|
-
delete elm[memberName];
|
|
3734
|
-
elm[memberName] = value;
|
|
3735
|
-
}
|
|
3736
|
-
});
|
|
3737
|
-
}
|
|
3738
|
-
if (BUILD.initializeNextTick) {
|
|
3739
|
-
nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
|
|
3740
|
-
} else {
|
|
3741
|
-
initializeComponent(elm, hostRef, cmpMeta);
|
|
3742
|
-
}
|
|
3743
|
-
} else {
|
|
3744
|
-
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);
|
|
3745
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3746
|
-
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3747
|
-
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3748
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
3749
|
-
}
|
|
3750
|
-
}
|
|
3751
|
-
endConnected();
|
|
3752
|
-
}
|
|
3753
|
-
};
|
|
3754
|
-
var setContentReference = (elm) => {
|
|
3755
|
-
if (!win.document) {
|
|
3756
|
-
return;
|
|
3757
|
-
}
|
|
3758
|
-
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
3759
|
-
BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
|
|
3760
|
-
);
|
|
3761
|
-
contentRefElm["s-cn"] = true;
|
|
3762
|
-
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
3763
|
-
};
|
|
3764
|
-
var disconnectInstance = (instance, elm) => {
|
|
3765
|
-
if (BUILD.lazyLoad) {
|
|
3766
|
-
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
3767
|
-
}
|
|
3768
|
-
};
|
|
3769
|
-
var disconnectedCallback = async (elm) => {
|
|
3770
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3771
|
-
const hostRef = getHostRef(elm);
|
|
3772
|
-
if (BUILD.hostListener) {
|
|
3773
|
-
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
3774
|
-
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
3775
|
-
hostRef.$rmListeners$ = void 0;
|
|
3776
|
-
}
|
|
3777
|
-
}
|
|
3778
|
-
if (!BUILD.lazyLoad) {
|
|
3779
|
-
disconnectInstance(elm);
|
|
3780
|
-
} else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3781
|
-
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
3782
|
-
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3783
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
3784
|
-
}
|
|
3785
|
-
}
|
|
3786
|
-
if (rootAppliedStyles.has(elm)) {
|
|
3787
|
-
rootAppliedStyles.delete(elm);
|
|
3788
|
-
}
|
|
3789
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
3790
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
3791
|
-
}
|
|
3792
|
-
};
|
|
3793
|
-
|
|
3794
|
-
// src/runtime/bootstrap-custom-element.ts
|
|
3795
|
-
var defineCustomElement = (Cstr, compactMeta) => {
|
|
3796
|
-
customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));
|
|
3797
|
-
};
|
|
3798
|
-
var proxyCustomElement = (Cstr, compactMeta) => {
|
|
3799
|
-
const cmpMeta = {
|
|
3800
|
-
$flags$: compactMeta[0],
|
|
3801
|
-
$tagName$: compactMeta[1]
|
|
3802
|
-
};
|
|
3803
|
-
if (BUILD.member) {
|
|
3804
|
-
cmpMeta.$members$ = compactMeta[2];
|
|
3805
|
-
}
|
|
3806
|
-
if (BUILD.hostListener) {
|
|
3807
|
-
cmpMeta.$listeners$ = compactMeta[3];
|
|
3808
|
-
}
|
|
3809
|
-
if (BUILD.watchCallback) {
|
|
3810
|
-
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
3811
|
-
}
|
|
3812
|
-
if (BUILD.reflect) {
|
|
3813
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
3814
|
-
}
|
|
3815
|
-
if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3816
|
-
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
3817
|
-
}
|
|
3818
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasRenderFn */) {
|
|
3819
|
-
if (BUILD.experimentalSlotFixes) {
|
|
3820
|
-
patchPseudoShadowDom(Cstr.prototype);
|
|
3821
|
-
} else {
|
|
3822
|
-
if (BUILD.slotChildNodesFix) {
|
|
3823
|
-
patchChildSlotNodes(Cstr.prototype);
|
|
3824
|
-
}
|
|
3825
|
-
if (BUILD.cloneNodeFix) {
|
|
3826
|
-
patchCloneNode(Cstr.prototype);
|
|
3827
|
-
}
|
|
3828
|
-
if (BUILD.appendChildSlotFix) {
|
|
3829
|
-
patchSlotAppendChild(Cstr.prototype);
|
|
3830
|
-
}
|
|
3831
|
-
if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3832
|
-
patchTextContent(Cstr.prototype);
|
|
3833
|
-
}
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
if (BUILD.hydrateClientSide && BUILD.shadowDom) {
|
|
3837
|
-
hydrateScopedToShadow();
|
|
3838
|
-
}
|
|
3839
|
-
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
3840
|
-
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
3841
|
-
Object.assign(Cstr.prototype, {
|
|
3842
|
-
__hasHostListenerAttached: false,
|
|
3843
|
-
__registerHost() {
|
|
3844
|
-
registerHost(this, cmpMeta);
|
|
3845
|
-
},
|
|
3846
|
-
connectedCallback() {
|
|
3847
|
-
if (!this.__hasHostListenerAttached) {
|
|
3848
|
-
const hostRef = getHostRef(this);
|
|
3849
|
-
if (!hostRef) {
|
|
3850
|
-
return;
|
|
3851
|
-
}
|
|
3852
|
-
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
3853
|
-
this.__hasHostListenerAttached = true;
|
|
3854
|
-
}
|
|
3855
|
-
connectedCallback(this);
|
|
3856
|
-
if (originalConnectedCallback) {
|
|
3857
|
-
originalConnectedCallback.call(this);
|
|
3858
|
-
}
|
|
3859
|
-
},
|
|
3860
|
-
disconnectedCallback() {
|
|
3861
|
-
disconnectedCallback(this);
|
|
3862
|
-
if (originalDisconnectedCallback) {
|
|
3863
|
-
originalDisconnectedCallback.call(this);
|
|
3864
|
-
}
|
|
3865
|
-
},
|
|
3866
|
-
__attachShadow() {
|
|
3867
|
-
if (supportsShadow) {
|
|
3868
|
-
if (!this.shadowRoot) {
|
|
3869
|
-
createShadowRoot.call(this, cmpMeta);
|
|
3870
|
-
} else {
|
|
3871
|
-
if (this.shadowRoot.mode !== "open") {
|
|
3872
|
-
throw new Error(
|
|
3873
|
-
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
|
|
3874
|
-
);
|
|
3875
|
-
}
|
|
3876
|
-
}
|
|
3877
|
-
} else {
|
|
3878
|
-
this.shadowRoot = this;
|
|
3879
|
-
}
|
|
3880
|
-
}
|
|
3881
|
-
});
|
|
3882
|
-
Cstr.is = cmpMeta.$tagName$;
|
|
3883
|
-
return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
|
|
3884
|
-
};
|
|
3885
|
-
var forceModeUpdate = (elm) => {
|
|
3886
|
-
if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
|
|
3887
|
-
const mode = computeMode(elm);
|
|
3888
|
-
const hostRef = getHostRef(elm);
|
|
3889
|
-
if (hostRef && hostRef.$modeName$ !== mode) {
|
|
3890
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
3891
|
-
const oldScopeId = elm["s-sc"];
|
|
3892
|
-
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
3893
|
-
const style = elm.constructor.style[mode];
|
|
3894
|
-
const flags = cmpMeta.$flags$;
|
|
3895
|
-
if (style) {
|
|
3896
|
-
if (!styles.has(scopeId2)) {
|
|
3897
|
-
registerStyle(scopeId2, style, !!(flags & 1 /* shadowDomEncapsulation */));
|
|
3898
|
-
}
|
|
3899
|
-
hostRef.$modeName$ = mode;
|
|
3900
|
-
elm.classList.remove(oldScopeId + "-h", oldScopeId + "-s");
|
|
3901
|
-
attachStyles(hostRef);
|
|
3902
|
-
forceUpdate(elm);
|
|
3903
|
-
}
|
|
3904
|
-
}
|
|
3905
|
-
}
|
|
3906
|
-
};
|
|
3907
|
-
|
|
3908
|
-
// src/runtime/hmr-component.ts
|
|
3909
|
-
var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
3910
|
-
const hostRef = getHostRef(hostElement);
|
|
3911
|
-
if (!hostRef) {
|
|
3912
|
-
return;
|
|
3913
|
-
}
|
|
3914
|
-
hostRef.$flags$ = 1 /* hasConnected */;
|
|
3915
|
-
initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
|
|
3916
|
-
};
|
|
3917
|
-
|
|
3918
|
-
// src/runtime/bootstrap-lazy.ts
|
|
3919
|
-
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
3920
|
-
var _a;
|
|
3921
|
-
if (BUILD.profile && performance.mark) {
|
|
3922
|
-
performance.mark("st:app:start");
|
|
3923
|
-
}
|
|
3924
|
-
installDevTools();
|
|
3925
|
-
if (!win.document) {
|
|
3926
|
-
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
3927
|
-
return;
|
|
3928
|
-
}
|
|
3929
|
-
const endBootstrap = createTime("bootstrapLazy");
|
|
3930
|
-
const cmpTags = [];
|
|
3931
|
-
const exclude = options.exclude || [];
|
|
3932
|
-
const customElements2 = win.customElements;
|
|
3933
|
-
const head = win.document.head;
|
|
3934
|
-
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
3935
|
-
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
3936
|
-
const deferredConnectedCallbacks = [];
|
|
3937
|
-
let appLoadFallback;
|
|
3938
|
-
let isBootstrapping = true;
|
|
3939
|
-
Object.assign(plt, options);
|
|
3940
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
3941
|
-
if (BUILD.asyncQueue) {
|
|
3942
|
-
if (options.syncQueue) {
|
|
3943
|
-
plt.$flags$ |= 4 /* queueSync */;
|
|
3944
|
-
}
|
|
3945
|
-
}
|
|
3946
|
-
if (BUILD.hydrateClientSide) {
|
|
3947
|
-
plt.$flags$ |= 2 /* appLoaded */;
|
|
3948
|
-
}
|
|
3949
|
-
if (BUILD.hydrateClientSide && BUILD.shadowDom) {
|
|
3950
|
-
hydrateScopedToShadow();
|
|
3951
|
-
}
|
|
3952
|
-
let hasSlotRelocation = false;
|
|
3953
|
-
lazyBundles.map((lazyBundle) => {
|
|
3954
|
-
lazyBundle[1].map((compactMeta) => {
|
|
3955
|
-
var _a2;
|
|
3956
|
-
const cmpMeta = {
|
|
3957
|
-
$flags$: compactMeta[0],
|
|
3958
|
-
$tagName$: compactMeta[1],
|
|
3959
|
-
$members$: compactMeta[2],
|
|
3960
|
-
$listeners$: compactMeta[3]
|
|
3961
|
-
};
|
|
3962
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
3963
|
-
hasSlotRelocation = true;
|
|
3964
|
-
}
|
|
3965
|
-
if (BUILD.member) {
|
|
3966
|
-
cmpMeta.$members$ = compactMeta[2];
|
|
3967
|
-
}
|
|
3968
|
-
if (BUILD.hostListener) {
|
|
3969
|
-
cmpMeta.$listeners$ = compactMeta[3];
|
|
3970
|
-
}
|
|
3971
|
-
if (BUILD.reflect) {
|
|
3972
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
3973
|
-
}
|
|
3974
|
-
if (BUILD.watchCallback) {
|
|
3975
|
-
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
3976
|
-
}
|
|
3977
|
-
if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3978
|
-
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
3979
|
-
}
|
|
3980
|
-
const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
|
|
3981
|
-
const HostElement = class extends HTMLElement {
|
|
3982
|
-
// StencilLazyHost
|
|
3983
|
-
constructor(self) {
|
|
3984
|
-
super(self);
|
|
3985
|
-
this.hasRegisteredEventListeners = false;
|
|
3986
|
-
self = this;
|
|
3987
|
-
registerHost(self, cmpMeta);
|
|
3988
|
-
if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3989
|
-
if (supportsShadow) {
|
|
3990
|
-
if (!self.shadowRoot) {
|
|
3991
|
-
createShadowRoot.call(self, cmpMeta);
|
|
3992
|
-
} else {
|
|
3993
|
-
if (self.shadowRoot.mode !== "open") {
|
|
3994
|
-
throw new Error(
|
|
3995
|
-
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
|
|
3996
|
-
);
|
|
3997
|
-
}
|
|
3998
|
-
}
|
|
3999
|
-
} else if (!BUILD.hydrateServerSide && !("shadowRoot" in self)) {
|
|
4000
|
-
self.shadowRoot = self;
|
|
4001
|
-
}
|
|
4002
|
-
}
|
|
4003
|
-
}
|
|
4004
|
-
connectedCallback() {
|
|
4005
|
-
const hostRef = getHostRef(this);
|
|
4006
|
-
if (!hostRef) {
|
|
4007
|
-
return;
|
|
4008
|
-
}
|
|
4009
|
-
if (!this.hasRegisteredEventListeners) {
|
|
4010
|
-
this.hasRegisteredEventListeners = true;
|
|
4011
|
-
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
4012
|
-
}
|
|
4013
|
-
if (appLoadFallback) {
|
|
4014
|
-
clearTimeout(appLoadFallback);
|
|
4015
|
-
appLoadFallback = null;
|
|
4016
|
-
}
|
|
4017
|
-
if (isBootstrapping) {
|
|
4018
|
-
deferredConnectedCallbacks.push(this);
|
|
4019
|
-
} else {
|
|
4020
|
-
plt.jmp(() => connectedCallback(this));
|
|
4021
|
-
}
|
|
4022
|
-
}
|
|
4023
|
-
disconnectedCallback() {
|
|
4024
|
-
plt.jmp(() => disconnectedCallback(this));
|
|
4025
|
-
plt.raf(() => {
|
|
4026
|
-
var _a3;
|
|
4027
|
-
const hostRef = getHostRef(this);
|
|
4028
|
-
if (!hostRef) {
|
|
4029
|
-
return;
|
|
4030
|
-
}
|
|
4031
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
4032
|
-
if (i2 > -1) {
|
|
4033
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
4034
|
-
}
|
|
4035
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
4036
|
-
delete hostRef.$vnode$.$elm$;
|
|
4037
|
-
}
|
|
4038
|
-
});
|
|
4039
|
-
}
|
|
4040
|
-
componentOnReady() {
|
|
4041
|
-
var _a3;
|
|
4042
|
-
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
4043
|
-
}
|
|
4044
|
-
};
|
|
4045
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasRenderFn */) {
|
|
4046
|
-
if (BUILD.experimentalSlotFixes) {
|
|
4047
|
-
patchPseudoShadowDom(HostElement.prototype);
|
|
4048
|
-
} else {
|
|
4049
|
-
if (BUILD.slotChildNodesFix) {
|
|
4050
|
-
patchChildSlotNodes(HostElement.prototype);
|
|
4051
|
-
}
|
|
4052
|
-
if (BUILD.cloneNodeFix) {
|
|
4053
|
-
patchCloneNode(HostElement.prototype);
|
|
4054
|
-
}
|
|
4055
|
-
if (BUILD.appendChildSlotFix) {
|
|
4056
|
-
patchSlotAppendChild(HostElement.prototype);
|
|
4057
|
-
}
|
|
4058
|
-
if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
4059
|
-
patchTextContent(HostElement.prototype);
|
|
4060
|
-
}
|
|
4061
|
-
}
|
|
4062
|
-
}
|
|
4063
|
-
if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
|
|
4064
|
-
HostElement.formAssociated = true;
|
|
4065
|
-
}
|
|
4066
|
-
if (BUILD.hotModuleReplacement) {
|
|
4067
|
-
HostElement.prototype["s-hmr"] = function(hmrVersionId) {
|
|
4068
|
-
hmrStart(this, cmpMeta, hmrVersionId);
|
|
4069
|
-
};
|
|
4070
|
-
}
|
|
4071
|
-
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
4072
|
-
if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
|
|
4073
|
-
cmpTags.push(tagName);
|
|
4074
|
-
customElements2.define(
|
|
4075
|
-
tagName,
|
|
4076
|
-
proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
|
|
4077
|
-
);
|
|
4078
|
-
}
|
|
4079
|
-
});
|
|
4080
|
-
});
|
|
4081
|
-
if (cmpTags.length > 0) {
|
|
4082
|
-
if (hasSlotRelocation) {
|
|
4083
|
-
dataStyles.textContent += SLOT_FB_CSS;
|
|
4084
|
-
}
|
|
4085
|
-
if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
|
|
4086
|
-
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
4087
|
-
}
|
|
4088
|
-
if (dataStyles.innerHTML.length) {
|
|
4089
|
-
dataStyles.setAttribute("data-styles", "");
|
|
4090
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
4091
|
-
if (nonce != null) {
|
|
4092
|
-
dataStyles.setAttribute("nonce", nonce);
|
|
4093
|
-
}
|
|
4094
|
-
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
4095
|
-
}
|
|
4096
|
-
}
|
|
4097
|
-
isBootstrapping = false;
|
|
4098
|
-
if (deferredConnectedCallbacks.length) {
|
|
4099
|
-
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
4100
|
-
} else {
|
|
4101
|
-
if (BUILD.profile) {
|
|
4102
|
-
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
|
|
4103
|
-
} else {
|
|
4104
|
-
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
|
|
4105
|
-
}
|
|
4106
|
-
}
|
|
4107
|
-
endBootstrap();
|
|
4108
|
-
};
|
|
4109
|
-
|
|
4110
|
-
// src/runtime/fragment.ts
|
|
4111
|
-
var Fragment = (_, children) => children;
|
|
4112
|
-
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
4113
|
-
if (BUILD.hostListener && listeners && win.document) {
|
|
4114
|
-
if (BUILD.hostListenerTargetParent) {
|
|
4115
|
-
if (attachParentListeners) {
|
|
4116
|
-
listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
|
|
4117
|
-
} else {
|
|
4118
|
-
listeners = listeners.filter(([flags]) => !(flags & 32 /* TargetParent */));
|
|
4119
|
-
}
|
|
4120
|
-
}
|
|
4121
|
-
listeners.map(([flags, name, method]) => {
|
|
4122
|
-
const target = BUILD.hostListenerTarget ? getHostListenerTarget(win.document, elm, flags) : elm;
|
|
4123
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
4124
|
-
const opts = hostListenerOpts(flags);
|
|
4125
|
-
plt.ael(target, name, handler, opts);
|
|
4126
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
4127
|
-
});
|
|
4128
|
-
}
|
|
4129
|
-
};
|
|
4130
|
-
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
4131
|
-
var _a;
|
|
4132
|
-
try {
|
|
4133
|
-
if (BUILD.lazyLoad) {
|
|
4134
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
4135
|
-
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
|
4136
|
-
} else {
|
|
4137
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
4138
|
-
}
|
|
4139
|
-
} else {
|
|
4140
|
-
hostRef.$hostElement$[methodName](ev);
|
|
4141
|
-
}
|
|
4142
|
-
} catch (e) {
|
|
4143
|
-
consoleError(e, hostRef.$hostElement$);
|
|
4144
|
-
}
|
|
4145
|
-
};
|
|
4146
|
-
var getHostListenerTarget = (doc, elm, flags) => {
|
|
4147
|
-
if (BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) {
|
|
4148
|
-
return doc;
|
|
4149
|
-
}
|
|
4150
|
-
if (BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) {
|
|
4151
|
-
return win;
|
|
4152
|
-
}
|
|
4153
|
-
if (BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) {
|
|
4154
|
-
return doc.body;
|
|
4155
|
-
}
|
|
4156
|
-
if (BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement) {
|
|
4157
|
-
return elm.parentElement;
|
|
4158
|
-
}
|
|
4159
|
-
return elm;
|
|
4160
|
-
};
|
|
4161
|
-
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
4162
|
-
passive: (flags & 1 /* Passive */) !== 0,
|
|
4163
|
-
capture: (flags & 2 /* Capture */) !== 0
|
|
4164
|
-
} : (flags & 2 /* Capture */) !== 0;
|
|
4165
|
-
|
|
4166
|
-
// src/runtime/nonce.ts
|
|
4167
|
-
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
4168
|
-
|
|
4169
|
-
// src/runtime/platform-options.ts
|
|
4170
|
-
var setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
4171
|
-
|
|
4172
|
-
// src/runtime/render.ts
|
|
4173
|
-
function render(vnode, container) {
|
|
4174
|
-
const cmpMeta = {
|
|
4175
|
-
$flags$: 0,
|
|
4176
|
-
$tagName$: container.tagName
|
|
4177
|
-
};
|
|
4178
|
-
const ref = {
|
|
4179
|
-
$flags$: 0,
|
|
4180
|
-
$cmpMeta$: cmpMeta,
|
|
4181
|
-
$hostElement$: container
|
|
4182
|
-
};
|
|
4183
|
-
renderVdom(ref, vnode);
|
|
4184
|
-
}
|
|
4185
|
-
|
|
4186
|
-
// src/runtime/vdom/vdom-annotations.ts
|
|
4187
|
-
var insertVdomAnnotations = (doc, staticComponents) => {
|
|
4188
|
-
if (doc != null) {
|
|
4189
|
-
const docData = STENCIL_DOC_DATA in doc ? doc[STENCIL_DOC_DATA] : { ...DEFAULT_DOC_DATA };
|
|
4190
|
-
docData.staticComponents = new Set(staticComponents);
|
|
4191
|
-
const orgLocationNodes = [];
|
|
4192
|
-
parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
|
|
4193
|
-
orgLocationNodes.forEach((orgLocationNode) => {
|
|
4194
|
-
var _a;
|
|
4195
|
-
if (orgLocationNode != null && orgLocationNode["s-nr"]) {
|
|
4196
|
-
const nodeRef = orgLocationNode["s-nr"];
|
|
4197
|
-
let hostId = nodeRef["s-host-id"];
|
|
4198
|
-
let nodeId = nodeRef["s-node-id"];
|
|
4199
|
-
let childId = `${hostId}.${nodeId}`;
|
|
4200
|
-
if (hostId == null) {
|
|
4201
|
-
hostId = 0;
|
|
4202
|
-
docData.rootLevelIds++;
|
|
4203
|
-
nodeId = docData.rootLevelIds;
|
|
4204
|
-
childId = `${hostId}.${nodeId}`;
|
|
4205
|
-
if (nodeRef.nodeType === 1 /* ElementNode */) {
|
|
4206
|
-
nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
4207
|
-
if (typeof nodeRef["s-sn"] === "string" && !nodeRef.getAttribute("slot")) {
|
|
4208
|
-
nodeRef.setAttribute("s-sn", nodeRef["s-sn"]);
|
|
4209
|
-
}
|
|
4210
|
-
} else if (nodeRef.nodeType === 3 /* TextNode */) {
|
|
4211
|
-
if (hostId === 0) {
|
|
4212
|
-
const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
|
|
4213
|
-
if (textContent === "") {
|
|
4214
|
-
orgLocationNode.remove();
|
|
4215
|
-
return;
|
|
4216
|
-
}
|
|
4217
|
-
}
|
|
4218
|
-
const commentBeforeTextNode = doc.createComment(childId);
|
|
4219
|
-
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
4220
|
-
insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
|
|
4221
|
-
} else if (nodeRef.nodeType === 8 /* CommentNode */) {
|
|
4222
|
-
const commentBeforeTextNode = doc.createComment(childId);
|
|
4223
|
-
commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
|
|
4224
|
-
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
4225
|
-
}
|
|
4226
|
-
}
|
|
4227
|
-
let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
|
|
4228
|
-
const orgLocationParentNode = orgLocationNode.parentElement;
|
|
4229
|
-
if (orgLocationParentNode) {
|
|
4230
|
-
if (orgLocationParentNode["s-en"] === "") {
|
|
4231
|
-
orgLocationNodeId += `.`;
|
|
4232
|
-
} else if (orgLocationParentNode["s-en"] === "c") {
|
|
4233
|
-
orgLocationNodeId += `.c`;
|
|
4234
|
-
}
|
|
4235
|
-
}
|
|
4236
|
-
orgLocationNode.nodeValue = orgLocationNodeId;
|
|
4237
|
-
}
|
|
4238
|
-
});
|
|
4239
|
-
}
|
|
4240
|
-
};
|
|
4241
|
-
var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
|
|
4242
|
-
var _a;
|
|
4243
|
-
if (node == null) {
|
|
4244
|
-
return;
|
|
4245
|
-
}
|
|
4246
|
-
if (node["s-nr"] != null) {
|
|
4247
|
-
orgLocationNodes.push(node);
|
|
4248
|
-
}
|
|
4249
|
-
if (node.nodeType === 1 /* ElementNode */) {
|
|
4250
|
-
const childNodes = [...Array.from(node.childNodes), ...Array.from(((_a = node.shadowRoot) == null ? void 0 : _a.childNodes) || [])];
|
|
4251
|
-
childNodes.forEach((childNode) => {
|
|
4252
|
-
const hostRef = getHostRef(childNode);
|
|
4253
|
-
if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
|
|
4254
|
-
const cmpData = {
|
|
4255
|
-
nodeIds: 0
|
|
4256
|
-
};
|
|
4257
|
-
insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
|
|
4258
|
-
}
|
|
4259
|
-
parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
|
|
4260
|
-
});
|
|
4261
|
-
}
|
|
4262
|
-
};
|
|
4263
|
-
var insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
|
|
4264
|
-
if (vnode != null) {
|
|
4265
|
-
const hostId = ++docData.hostIds;
|
|
4266
|
-
hostElm.setAttribute(HYDRATE_ID, hostId);
|
|
4267
|
-
if (hostElm["s-cr"] != null) {
|
|
4268
|
-
hostElm["s-cr"].nodeValue = `${CONTENT_REF_ID}.${hostId}`;
|
|
4269
|
-
}
|
|
4270
|
-
if (vnode.$children$ != null) {
|
|
4271
|
-
const depth = 0;
|
|
4272
|
-
vnode.$children$.forEach((vnodeChild, index) => {
|
|
4273
|
-
insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
|
|
4274
|
-
});
|
|
4275
|
-
}
|
|
4276
|
-
if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
|
|
4277
|
-
const parent = hostElm.parentElement;
|
|
4278
|
-
if (parent && parent.childNodes) {
|
|
4279
|
-
const parentChildNodes = Array.from(parent.childNodes);
|
|
4280
|
-
const comment = parentChildNodes.find(
|
|
4281
|
-
(node) => node.nodeType === 8 /* CommentNode */ && node["s-sr"]
|
|
4282
|
-
);
|
|
4283
|
-
if (comment) {
|
|
4284
|
-
const index = parentChildNodes.indexOf(hostElm) - 1;
|
|
4285
|
-
vnode.$elm$.setAttribute(
|
|
4286
|
-
HYDRATE_CHILD_ID,
|
|
4287
|
-
`${comment["s-host-id"]}.${comment["s-node-id"]}.0.${index}`
|
|
4288
|
-
);
|
|
4289
|
-
}
|
|
4290
|
-
}
|
|
4291
|
-
}
|
|
4292
|
-
}
|
|
4293
|
-
};
|
|
4294
|
-
var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
|
|
4295
|
-
const childElm = vnodeChild.$elm$;
|
|
4296
|
-
if (childElm == null) {
|
|
4297
|
-
return;
|
|
4298
|
-
}
|
|
4299
|
-
const nodeId = cmpData.nodeIds++;
|
|
4300
|
-
const childId = `${hostId}.${nodeId}.${depth}.${index}`;
|
|
4301
|
-
childElm["s-host-id"] = hostId;
|
|
4302
|
-
childElm["s-node-id"] = nodeId;
|
|
4303
|
-
if (childElm.nodeType === 1 /* ElementNode */) {
|
|
4304
|
-
childElm.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
4305
|
-
if (typeof childElm["s-sn"] === "string" && !childElm.getAttribute("slot")) {
|
|
4306
|
-
childElm.setAttribute("s-sn", childElm["s-sn"]);
|
|
4307
|
-
}
|
|
4308
|
-
} else if (childElm.nodeType === 3 /* TextNode */) {
|
|
4309
|
-
const parentNode = childElm.parentNode;
|
|
4310
|
-
const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
|
|
4311
|
-
if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
|
|
4312
|
-
const textNodeId = `${TEXT_NODE_ID}.${childId}`;
|
|
4313
|
-
const commentBeforeTextNode = doc.createComment(textNodeId);
|
|
4314
|
-
insertBefore(parentNode, commentBeforeTextNode, childElm);
|
|
4315
|
-
}
|
|
4316
|
-
} else if (childElm.nodeType === 8 /* CommentNode */) {
|
|
4317
|
-
if (childElm["s-sr"]) {
|
|
4318
|
-
const slotName = childElm["s-sn"] || "";
|
|
4319
|
-
const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;
|
|
4320
|
-
childElm.nodeValue = slotNodeId;
|
|
4321
|
-
}
|
|
4322
|
-
}
|
|
4323
|
-
if (vnodeChild.$children$ != null) {
|
|
4324
|
-
const childDepth = depth + 1;
|
|
4325
|
-
vnodeChild.$children$.forEach((vnode, index2) => {
|
|
4326
|
-
insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index2);
|
|
4327
|
-
});
|
|
4328
|
-
}
|
|
4329
|
-
};
|
|
4330
|
-
|
|
4331
|
-
export { BUILD as B, H, NAMESPACE as N, createEvent as a, bootstrapLazy as b, consoleDevInfo as c, getElement as d, Host as e, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s, win as w };
|
|
4332
|
-
//# sourceMappingURL=index-Dlkip55O.js.map
|
|
4333
|
-
|
|
4334
|
-
//# sourceMappingURL=index-Dlkip55O.js.map
|