@zonos/elements 1.3.286 → 1.3.288
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/README.md +9 -1
- package/dist/cjs/RemoveIcon-CuM1YmjP.js +5 -0
- package/dist/cjs/{cart-0cf8897b.js → cart-CV4buPlT.js} +17 -27
- package/dist/cjs/{collect-79131e52.js → collect-jzWKzrV7.js} +17 -113
- package/dist/cjs/debounce-5sZmmlCI.js +9 -0
- package/dist/cjs/debounce-Nu2lJW4A.js +405 -0
- package/dist/cjs/{formatStringWithLinks-c25b4018.js → formatStringWithLinks-vOVkAjlu.js} +1 -1
- package/dist/cjs/{getBorderRadius-97fd5e02.js → getBorderRadius-DGZiQu09.js} +1 -1
- package/dist/cjs/{getContrastColor-956dfaf7.js → getContrastColor-B2Kn8XHA.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-a8f04267.js → getMissingRequiredShippingFields-r5vYIqoX.js} +1 -1
- package/dist/cjs/{handleFetch-954f30e1.js → handleFetch-DQLhurnE.js} +4 -3
- package/dist/cjs/{hasInclusivePrice-d0cd2007.js → hasInclusivePrice-BZMQohG9.js} +1 -1
- package/dist/cjs/{helpers-5bdbb68c.js → helpers-ClOZ11A9.js} +0 -3
- package/dist/cjs/{index-b1f95d96.js → index-DAAr465v.js} +1252 -580
- package/dist/cjs/index.cjs.js +17 -21
- package/dist/cjs/{invoice-254ae23b.js → invoice-CHw-mJdS.js} +6 -6
- package/dist/cjs/{isContrastColor-30f84a91.js → isContrastColor-B9ldIdpa.js} +1 -1
- package/dist/cjs/isDarkColor-f-fD9c2l.js +1187 -0
- package/dist/cjs/loader.cjs.js +3 -5
- package/dist/cjs/{localization-fb2ece37.js → localization-CxXsmxs5.js} +4 -4
- package/dist/cjs/{paypal-8ca67278.js → paypal-BLuHeOJH.js} +10 -9
- package/dist/cjs/{placeTestOrder-12b63822.js → placeTestOrder-VK_CMeq0.js} +3 -3
- package/dist/cjs/{renderCheckoutCurrency-a1f71587.js → renderCheckoutCurrency-CC4CAy-a.js} +2 -2
- package/dist/cjs/{renderFallback-bc20ee20.js → renderFallback-Bme86uk8.js} +1 -1
- package/dist/cjs/{shouldRenderTaxIdInput-7d19556c.js → shouldRenderTaxIdInput-TxekHCp7.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-82985128.js → shouldShowLanguageSelect-Bj_jKWPK.js} +1 -1
- package/dist/cjs/{submitGtag-8a25f001.js → submitGtag-CcEL-w5D.js} +3 -3
- package/dist/cjs/throttle-BcxGntLr.js +87 -0
- package/dist/cjs/{updateCheckoutSessionAttributes-de7b1466.js → updateCheckoutSessionAttributes-Dltl5RBx.js} +3 -3
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +644 -692
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +13 -17
- package/dist/cjs/zonos-address_4.cjs.entry.js +50 -40
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +15 -16
- package/dist/cjs/zonos-badge.cjs.entry.js +7 -10
- package/dist/cjs/zonos-banner.cjs.entry.js +6 -9
- package/dist/cjs/zonos-button_3.cjs.entry.js +18 -21
- package/dist/cjs/zonos-card_5.cjs.entry.js +34 -35
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +85 -83
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +10 -14
- package/dist/cjs/zonos-checkout.cjs.entry.js +50 -34
- package/dist/cjs/zonos-collapse.cjs.entry.js +5 -8
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +18 -23
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +59 -55
- package/dist/cjs/zonos-collect.cjs.entry.js +20 -23
- package/dist/cjs/zonos-component.cjs.entry.js +3 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +13 -16
- package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -11
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +68 -57
- package/dist/cjs/zonos-elements.cjs.js +7 -7
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +22 -23
- package/dist/cjs/zonos-hello.cjs.entry.js +19 -17
- package/dist/cjs/zonos-input.cjs.entry.js +10 -11
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +17 -21
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +57 -52
- package/dist/cjs/zonos-invoice.cjs.entry.js +19 -22
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +11 -15
- package/dist/cjs/zonos-link.cjs.entry.js +3 -6
- package/dist/cjs/zonos-logo.cjs.entry.js +6 -9
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +15 -19
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +11 -14
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +15 -14
- package/dist/cjs/zonos-text.cjs.entry.js +8 -11
- package/dist/cjs/zonos-tooltip.cjs.entry.js +4 -7
- package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -9
- package/dist/cjs/zonosStore-BCNYr6Tk.js +3808 -0
- package/dist/collection/__tests__/jsxWithChildren.types.js +13 -0
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.js +13 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +4 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +17 -13
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +7 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +5 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +8 -8
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +5 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +18 -14
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +13 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +7 -7
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +8 -6
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +6 -5
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +4 -4
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +7 -7
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +7 -4
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +8 -6
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +6 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +4 -4
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +7 -7
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +8 -7
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -4
- package/dist/collection/components/common/zonos-button/zonos-button.js +29 -25
- package/dist/collection/components/common/zonos-card/zonos-card.js +9 -8
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -12
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +9 -6
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +15 -15
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +6 -5
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +22 -21
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +3 -2
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -7
- package/dist/collection/components/common/zonos-input/zonos-input.js +7 -7
- package/dist/collection/components/common/zonos-link/zonos-link.js +7 -7
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +4 -4
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -3
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +8 -7
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +15 -12
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +2 -2
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +3 -3
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +17 -17
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +23 -20
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +19 -19
- package/dist/collection/components/common/zonos-text/zonos-text.js +15 -11
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -3
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +3 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +7 -6
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +3 -3
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +16 -12
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +3 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -11
- package/dist/collection/components/main/zonos-controller.js +18 -10
- package/dist/collection/components/store/checkout/stripe.js +1 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -8
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +6 -4
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +13 -10
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +4 -4
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
- package/dist/collection/components/utils/checkout/isEuDapRemittance.js +1 -1
- package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +1 -1
- package/dist/collection/scripts/cart/_setupCartData.js +2 -2
- package/dist/collection/scripts/cart/_setupCartDataWithSettings.js +2 -2
- package/dist/collection/types/generated/graphql.internal.types.js +5 -0
- package/dist/esm/RemoveIcon-C2QMVeWW.js +3 -0
- package/dist/esm/{cart-d04742f5.js → cart-ekBk_gxV.js} +18 -28
- package/dist/esm/{collect-4c310a16.js → collect-33rMINDo.js} +17 -113
- package/dist/esm/debounce-D4ko2kvZ.js +403 -0
- package/dist/esm/debounce-DWPsxJsW.js +7 -0
- package/dist/esm/{formatStringWithLinks-0d48f183.js → formatStringWithLinks-BcMPqGl0.js} +1 -1
- package/dist/esm/{getBorderRadius-1f7be586.js → getBorderRadius-HwG64EKM.js} +1 -1
- package/dist/esm/{getContrastColor-4c0ae8c1.js → getContrastColor-CfCPlW9U.js} +2 -2
- package/dist/esm/{getMissingRequiredShippingFields-f0878e32.js → getMissingRequiredShippingFields-u1nhQzJ1.js} +1 -1
- package/dist/esm/{handleFetch-a844cac1.js → handleFetch-D5GYDF-O.js} +4 -3
- package/dist/esm/{hasInclusivePrice-d801be22.js → hasInclusivePrice-CAVXi310.js} +1 -1
- package/dist/esm/{helpers-2f6955b1.js → helpers-DJIdCwJ5.js} +0 -3
- package/dist/esm/{index-cfd394c8.js → index-_lt63o7c.js} +1253 -561
- package/dist/esm/index.js +20 -22
- package/dist/esm/{invoice-86487dac.js → invoice-BNDWuVsD.js} +6 -6
- package/dist/esm/{isContrastColor-9fa0d013.js → isContrastColor-CWLU13s9.js} +1 -1
- package/dist/esm/isDarkColor-YdrG78th.js +1184 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{localization-36a4dc22.js → localization-AOqYXGdP.js} +5 -5
- package/dist/esm/{paypal-997935ab.js → paypal-CW1D2XqZ.js} +10 -9
- package/dist/esm/{placeTestOrder-a53f2056.js → placeTestOrder-nhmsLLOA.js} +3 -3
- package/dist/esm/{renderCheckoutCurrency-e0e16eb7.js → renderCheckoutCurrency-BQANmZyM.js} +2 -2
- package/dist/esm/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
- package/dist/esm/{shouldRenderTaxIdInput-ef7b5860.js → shouldRenderTaxIdInput-CKyZ6Zni.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-328f50e2.js → shouldShowLanguageSelect-BQFCXouB.js} +1 -1
- package/dist/esm/{submitGtag-71c450b6.js → submitGtag-CCGQS060.js} +4 -4
- package/dist/esm/throttle-D5GyA3yr.js +85 -0
- package/dist/esm/{updateCheckoutSessionAttributes-23b222de.js → updateCheckoutSessionAttributes-eRSqdC74.js} +3 -3
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +644 -690
- package/dist/esm/zonos-address-display_2.entry.js +13 -15
- package/dist/esm/zonos-address_4.entry.js +50 -38
- package/dist/esm/zonos-airwallex-payment.entry.js +15 -14
- package/dist/esm/zonos-badge.entry.js +7 -8
- package/dist/esm/zonos-banner.entry.js +6 -7
- package/dist/esm/zonos-button_3.entry.js +18 -19
- package/dist/esm/zonos-card_5.entry.js +34 -33
- package/dist/esm/zonos-cart-items_12.entry.js +85 -81
- package/dist/esm/zonos-checkbox_2.entry.js +10 -12
- package/dist/esm/zonos-checkout.entry.js +50 -32
- package/dist/esm/zonos-collapse.entry.js +5 -6
- package/dist/esm/zonos-collect-cart-items_3.entry.js +18 -21
- package/dist/esm/zonos-collect-finish_6.entry.js +59 -53
- package/dist/esm/zonos-collect.entry.js +20 -21
- package/dist/esm/zonos-component.entry.js +3 -4
- package/dist/esm/zonos-controller.entry.js +13 -14
- package/dist/esm/zonos-country-flag.entry.js +8 -9
- package/dist/esm/zonos-country-select_4.entry.js +68 -55
- package/dist/esm/zonos-elements.js +6 -5
- package/dist/esm/zonos-hello-dialog.entry.js +22 -21
- package/dist/esm/zonos-hello.entry.js +19 -15
- package/dist/esm/zonos-input.entry.js +10 -9
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +17 -19
- package/dist/esm/zonos-invoice-finish_5.entry.js +57 -50
- package/dist/esm/zonos-invoice.entry.js +19 -20
- package/dist/esm/zonos-language-select_2.entry.js +11 -13
- package/dist/esm/zonos-link.entry.js +3 -4
- package/dist/esm/zonos-logo.entry.js +6 -7
- package/dist/esm/zonos-policy-consent_2.entry.js +15 -17
- package/dist/esm/zonos-shipping-rich-radio.entry.js +11 -12
- package/dist/esm/zonos-stripe-input.entry.js +15 -12
- package/dist/esm/zonos-text.entry.js +8 -9
- package/dist/esm/zonos-tooltip.entry.js +4 -5
- package/dist/esm/zonos-v-stack.entry.js +6 -7
- package/dist/esm/zonosStore-DrIOAz4M.js +3795 -0
- package/dist/esm-es5/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +5 -1
- package/dist/esm-es5/VarianceTest-BJmZPrZl.js +9 -0
- package/dist/esm-es5/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +4 -0
- package/dist/esm-es5/cart-ekBk_gxV.js +517 -0
- package/dist/esm-es5/classes-BJHSB96f.js +10 -0
- package/dist/esm-es5/cleanHtmlMarkdown-ByGDytaN.js +191 -0
- package/dist/esm-es5/collect-33rMINDo.js +241 -0
- package/dist/esm-es5/containsNonLatinChars-C04AWRC2.js +11 -0
- package/dist/esm-es5/createCustomEvent-XQfWgQLB.js +6 -0
- package/dist/esm-es5/debounce-D4ko2kvZ.js +153 -0
- package/dist/esm-es5/debounce-DWPsxJsW.js +1 -0
- package/dist/esm-es5/formatStringWithLinks-BcMPqGl0.js +8 -0
- package/dist/esm-es5/getBorderRadius-HwG64EKM.js +8 -0
- package/dist/esm-es5/getContrastColor-CfCPlW9U.js +14 -0
- package/dist/esm-es5/getGenericSettingsOverride-HeAZDwVW.js +4 -0
- package/dist/esm-es5/getMissingRequiredShippingFields-u1nhQzJ1.js +20 -0
- package/dist/esm-es5/handleFetch-D5GYDF-O.js +60 -0
- package/dist/esm-es5/hasInclusivePrice-CAVXi310.js +6 -0
- package/dist/esm-es5/helpers-DJIdCwJ5.js +23 -0
- package/dist/esm-es5/index-_lt63o7c.js +162 -0
- package/dist/esm-es5/index.js +227 -1
- package/dist/esm-es5/invoice-BNDWuVsD.js +13 -0
- package/dist/esm-es5/isColorVariable-DXXUq2Lv.js +11 -0
- package/dist/esm-es5/isContrastColor-CWLU13s9.js +5 -0
- package/dist/esm-es5/isDarkColor-YdrG78th.js +204 -0
- package/dist/esm-es5/isSameHostCheckoutLink-BxAHnL5J.js +16 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-AOqYXGdP.js +332 -0
- package/dist/esm-es5/paypal-CW1D2XqZ.js +192 -0
- package/dist/esm-es5/placeTestOrder-nhmsLLOA.js +1 -0
- package/dist/esm-es5/renderCheckoutCurrency-BQANmZyM.js +13 -0
- package/dist/esm-es5/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +17 -0
- package/dist/esm-es5/shouldShowLanguageSelect-BQFCXouB.js +7 -0
- package/dist/esm-es5/styles-BTIeCf3T.js +6 -0
- package/dist/esm-es5/submitGtag-CCGQS060.js +45 -0
- package/dist/esm-es5/throttle-D5GyA3yr.js +46 -0
- package/dist/esm-es5/updateCheckoutSessionAttributes-eRSqdC74.js +8 -0
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2966 -1
- package/dist/esm-es5/zonos-address-display_2.entry.js +46 -1
- package/dist/esm-es5/zonos-address_4.entry.js +179 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +49 -1
- package/dist/esm-es5/zonos-badge.entry.js +25 -1
- package/dist/esm-es5/zonos-banner.entry.js +7 -1
- package/dist/esm-es5/zonos-button_3.entry.js +116 -1
- package/dist/esm-es5/zonos-card_5.entry.js +33 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +666 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +21 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1043 -1
- package/dist/esm-es5/zonos-collapse.entry.js +15 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +13 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +157 -1
- package/dist/esm-es5/zonos-collect.entry.js +171 -1
- package/dist/esm-es5/zonos-component.entry.js +10 -1
- package/dist/esm-es5/zonos-controller.entry.js +198 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +6 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +152 -1
- package/dist/esm-es5/zonos-elements.js +4 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +63 -1
- package/dist/esm-es5/zonos-hello.entry.js +121 -1
- package/dist/esm-es5/zonos-input.entry.js +16 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +7 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +133 -1
- package/dist/esm-es5/zonos-invoice.entry.js +115 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +14 -1
- package/dist/esm-es5/zonos-link.entry.js +4 -1
- package/dist/esm-es5/zonos-logo.entry.js +7 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +31 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +5 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +27 -1
- package/dist/esm-es5/zonos-text.entry.js +24 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +7 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +5 -1
- package/dist/esm-es5/zonosStore-DrIOAz4M.js +1153 -0
- package/dist/scripts/index.d.ts +1171 -521
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/__tests__/jsxWithChildren.types.d.ts +14 -0
- package/dist/types/__tests__/vitest-globals.d.ts +1 -0
- package/dist/types/components/store/checkout/cart.d.ts +9 -9
- package/dist/types/components/utils/api/checkItemRestrictions.d.ts +2 -2
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +5 -5
- package/dist/types/components/utils/checkout/isShippableCountry.d.ts +5 -1
- package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +2 -2
- package/dist/types/components.d.ts +797 -147
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +127 -127
- package/dist/types/stencil-public-runtime.d.ts +205 -12
- package/dist/types/types/generated/graphql.frontend.types.d.ts +60 -60
- package/dist/types/types/generated/graphql.frontend.types.ts +55 -55
- package/dist/types/types/generated/graphql.internal.types.d.ts +1290 -1285
- package/dist/types/types/generated/graphql.internal.types.ts +1113 -1108
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-02ef0f99.system.entry.js +6 -0
- package/dist/zonos-elements/{p-1be53c82.entry.js → p-0466650f.entry.js} +1 -1
- package/dist/zonos-elements/p-04bfcd72.system.entry.js +152 -0
- package/dist/zonos-elements/p-04cc0dac.system.entry.js +198 -0
- package/dist/zonos-elements/p-058f07aa.system.entry.js +7 -0
- package/dist/zonos-elements/p-0f603278.system.entry.js +5 -0
- package/dist/zonos-elements/{p-bb09ee50.entry.js → p-128485dc.entry.js} +1 -1
- package/dist/zonos-elements/p-1568ab06.system.entry.js +117 -0
- package/dist/zonos-elements/p-2ba738ec.entry.js +1 -0
- package/dist/zonos-elements/{p-6afd5fab.entry.js → p-31ac495f.entry.js} +1 -1
- package/dist/zonos-elements/p-34d1545a.entry.js +1 -0
- package/dist/zonos-elements/p-39c8a898.entry.js +1 -0
- package/dist/zonos-elements/p-3ERbuo5a.js +1 -0
- package/dist/zonos-elements/p-450ed170.system.entry.js +46 -0
- package/dist/zonos-elements/p-4973f8d8.system.entry.js +180 -0
- package/dist/zonos-elements/p-49e7bb1e.system.entry.js +7 -0
- package/dist/zonos-elements/p-4a54f664.entry.js +1 -0
- package/dist/zonos-elements/p-4ab1c533.system.entry.js +4 -0
- package/dist/zonos-elements/p-5024df2d.system.entry.js +666 -0
- package/dist/zonos-elements/p-5562a955.system.entry.js +7 -0
- package/dist/zonos-elements/p-5836d426.system.entry.js +49 -0
- package/dist/zonos-elements/p-5a631080.system.entry.js +13 -0
- package/dist/zonos-elements/{p-2ce039e5.entry.js → p-5c08d36b.entry.js} +1 -1
- package/dist/zonos-elements/{p-aed4ffb2.entry.js → p-5d3079e8.entry.js} +1 -1
- package/dist/zonos-elements/p-64e7bc5b.entry.js +1 -0
- package/dist/zonos-elements/p-6b0afaa7.entry.js +1 -0
- package/dist/zonos-elements/p-6f742021.entry.js +1 -0
- package/dist/zonos-elements/p-7681798d.entry.js +1 -0
- package/dist/zonos-elements/p-7a5d2211.system.entry.js +115 -0
- package/dist/zonos-elements/{p-6de2f9c9.entry.js → p-7ae48e31.entry.js} +1 -1
- package/dist/zonos-elements/{p-f37150e8.entry.js → p-8328f44d.entry.js} +1 -1
- package/dist/zonos-elements/{p-171a7e1e.entry.js → p-844a743a.entry.js} +1 -1
- package/dist/zonos-elements/p-891b47d7.entry.js +1 -0
- package/dist/zonos-elements/p-89ddab88.entry.js +1 -0
- package/dist/zonos-elements/p-8cd3f1e2.entry.js +1 -0
- package/dist/zonos-elements/p-9818f823.entry.js +1 -0
- package/dist/zonos-elements/p-9b399685.system.entry.js +10 -0
- package/dist/zonos-elements/p-9b6482ef.entry.js +1 -0
- package/dist/zonos-elements/{p-2c44e013.entry.js → p-9ebe9a36.entry.js} +1 -1
- package/dist/zonos-elements/p-B2EZRfoq.system.js +193 -0
- package/dist/zonos-elements/p-B3GRrRtL.system.js +5 -0
- package/dist/zonos-elements/p-BANhKkF2.system.js +1 -0
- package/dist/zonos-elements/p-BDopxBpR.system.js +6 -0
- package/dist/zonos-elements/p-BJufDgh3.js +1 -0
- package/dist/zonos-elements/p-BLQFeIez.system.js +191 -0
- package/dist/zonos-elements/p-BNtWsPPP.system.js +7 -0
- package/dist/zonos-elements/p-BSgVcCxT.system.js +9 -0
- package/dist/zonos-elements/p-BXjdMMUy.js +1 -0
- package/dist/zonos-elements/p-BbgqQIHv.system.js +9 -0
- package/dist/zonos-elements/p-BgSx82zO.system.js +11 -0
- package/dist/zonos-elements/p-Bi-s0fp_.system.js +17 -0
- package/dist/zonos-elements/p-BtMauqj_.system.js +227 -0
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +5 -0
- package/dist/zonos-elements/p-C19J2XSh.js +1 -0
- package/dist/zonos-elements/p-C2QMVeWW.js +1 -0
- package/dist/zonos-elements/p-C2j7R11h.system.js +11 -0
- package/dist/zonos-elements/p-CEl4pzNq.js +1 -0
- package/dist/zonos-elements/p-CICjAi70.js +1 -0
- package/dist/zonos-elements/p-CIevpRv_.system.js +162 -0
- package/dist/zonos-elements/{p-344a6278.js → p-CJCoACvU.js} +2 -2
- package/dist/zonos-elements/p-CKBbIU4b.system.js +14 -0
- package/dist/zonos-elements/p-CKTIJ2Gr.js +1 -0
- package/dist/zonos-elements/p-CKhl__Kc.system.js +4 -0
- package/dist/zonos-elements/p-CPnR_T0a.system.js +1153 -0
- package/dist/zonos-elements/p-CQqNJo0D.system.js +13 -0
- package/dist/zonos-elements/p-CYdt69j5.system.js +241 -0
- package/dist/zonos-elements/p-CZl1nwqv.system.js +46 -0
- package/dist/zonos-elements/p-CaAod213.system.js +8 -0
- package/dist/zonos-elements/p-CaUXHglQ.system.js +153 -0
- package/dist/zonos-elements/{p-45bd8072.system.js → p-CeLaK0Ff.system.js} +1 -1
- package/dist/zonos-elements/p-CtEsvWI6.js +1 -0
- package/dist/zonos-elements/p-D-DawUYF.system.js +1 -0
- package/dist/zonos-elements/p-D0erXw7p.js +1 -0
- package/dist/zonos-elements/p-D31lQiWo.system.js +21 -0
- package/dist/zonos-elements/p-D5AtAlJx.system.js +13 -0
- package/dist/zonos-elements/p-DBOI98r5.system.js +7 -0
- package/dist/zonos-elements/{p-41dd1cb8.js → p-DE4a-QD5.js} +1 -1
- package/dist/zonos-elements/p-DGsEWFDU.system.js +8 -0
- package/dist/zonos-elements/{p-a4c7ee17.js → p-DHwpNxG9.js} +1 -1
- package/dist/zonos-elements/p-DIJaXkiE.system.js +332 -0
- package/dist/zonos-elements/{p-eef5b0cc.js → p-DJIdCwJ5.js} +1 -1
- package/dist/zonos-elements/p-DPW1yXt9.system.js +517 -0
- package/dist/zonos-elements/{p-6bdc5c96.js → p-DTgv0QpG.js} +1 -1
- package/dist/zonos-elements/p-DW-fW8yR.system.js +205 -0
- package/dist/zonos-elements/p-Dj-O6VfM.system.js +7 -0
- package/dist/zonos-elements/p-DjuFsKLG.js +1 -0
- package/dist/zonos-elements/p-DkpYo2Fs.js +1 -0
- package/dist/zonos-elements/p-DnjGkbEy.js +1 -0
- package/dist/zonos-elements/p-LypTHRUC.js +1 -0
- package/dist/zonos-elements/p-MfsSJh_D.system.js +8 -0
- package/dist/zonos-elements/p-YdrG78th.js +1 -0
- package/dist/zonos-elements/p-_lt63o7c.js +3 -0
- package/dist/zonos-elements/p-a38e62cc.entry.js +1 -0
- package/dist/zonos-elements/p-a6faab6a.entry.js +1 -0
- package/dist/zonos-elements/p-adfee3a3.entry.js +1 -0
- package/dist/zonos-elements/p-b14819ab.system.entry.js +14 -0
- package/dist/zonos-elements/{p-0c972ddf.entry.js → p-b68ca96f.entry.js} +1 -1
- package/dist/zonos-elements/p-b6deae2b.system.entry.js +5 -0
- package/dist/zonos-elements/p-bdba7d9e.system.entry.js +25 -0
- package/dist/zonos-elements/p-be64d823.system.entry.js +16 -0
- package/dist/zonos-elements/p-beeb9d36.system.entry.js +21 -0
- package/dist/zonos-elements/p-cadf6b63.system.entry.js +33 -0
- package/dist/zonos-elements/p-cc5306fe.system.entry.js +24 -0
- package/dist/zonos-elements/p-cc949df1.system.entry.js +7 -0
- package/dist/zonos-elements/p-cf5688f7.entry.js +1 -0
- package/dist/zonos-elements/p-d05Ku7gM.system.js +24 -0
- package/dist/zonos-elements/p-d33dfc78.system.entry.js +2966 -0
- package/dist/zonos-elements/{p-5d110c2b.entry.js → p-d4c4a00e.entry.js} +1 -1
- package/dist/zonos-elements/p-d55b9664.system.entry.js +157 -0
- package/dist/zonos-elements/p-daf9fa07.system.entry.js +133 -0
- package/dist/zonos-elements/p-dcdbc610.system.entry.js +27 -0
- package/dist/zonos-elements/p-e101d722.system.entry.js +63 -0
- package/dist/zonos-elements/{p-9639a8ed.entry.js → p-e284d329.entry.js} +1 -1
- package/dist/zonos-elements/{p-5227aa69.entry.js → p-e9320825.entry.js} +1 -1
- package/dist/zonos-elements/p-ea8790aa.entry.js +1 -0
- package/dist/zonos-elements/{p-6ee4e027.entry.js → p-eadaefdc.entry.js} +1 -1
- package/dist/zonos-elements/p-f27317d3.system.entry.js +31 -0
- package/dist/zonos-elements/p-f2cedbcd.system.entry.js +121 -0
- package/dist/zonos-elements/p-f57495dc.entry.js +1 -0
- package/dist/zonos-elements/p-f6ba59f6.system.entry.js +171 -0
- package/dist/zonos-elements/p-f6e0aeba.system.entry.js +1043 -0
- package/dist/zonos-elements/p-f8fd756a.system.entry.js +15 -0
- package/dist/zonos-elements/{p-7ada039e.entry.js → p-fe778437.entry.js} +1 -1
- package/dist/zonos-elements/{p-adfbf57b.js → p-i1iCWKdv.js} +1 -1
- package/dist/zonos-elements/p-lGLcGvEA.js +1 -0
- package/dist/zonos-elements/p-nOb4xPLF.system.js +17 -0
- package/dist/zonos-elements/p-nU86HJ5w.js +1 -0
- package/dist/zonos-elements/p-pfIceXbY.js +1 -0
- package/dist/zonos-elements/p-smUku7Ku.system.js +5 -0
- package/dist/zonos-elements/p-t_ClFAJR.js +1 -0
- package/dist/zonos-elements/p-uV7m6KrY.system.js +46 -0
- package/dist/zonos-elements/p-vN6p_rO1.system.js +11 -0
- package/dist/zonos-elements/p-zRjRcLMp.js +1 -0
- package/dist/zonos-elements/p-zVLAvre1.system.js +60 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/loader/index.d.ts +1 -1
- package/package.json +28 -32
- package/dist/cjs/RemoveIcon-081ac073.js +0 -5
- package/dist/cjs/debounce-7ca3c878.js +0 -357
- package/dist/cjs/isDarkColor-a6e6fd5e.js +0 -1202
- package/dist/cjs/throttle-366c204b.js +0 -76
- package/dist/cjs/zonosStore-0af0b937.js +0 -3030
- package/dist/esm/RemoveIcon-9dc5dd1a.js +0 -3
- package/dist/esm/debounce-84ade9c2.js +0 -355
- package/dist/esm/isDarkColor-939d8e9c.js +0 -1199
- package/dist/esm/throttle-c4c24e86.js +0 -74
- package/dist/esm/zonosStore-eca1e364.js +0 -3017
- package/dist/esm-es5/VarianceTest-572cecf5.js +0 -1
- package/dist/esm-es5/cart-d04742f5.js +0 -1
- package/dist/esm-es5/classes-0d95c529.js +0 -1
- package/dist/esm-es5/cleanHtmlMarkdown-87d195f6.js +0 -1
- package/dist/esm-es5/collect-4c310a16.js +0 -1
- package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +0 -1
- package/dist/esm-es5/createCustomEvent-58159025.js +0 -1
- package/dist/esm-es5/debounce-84ade9c2.js +0 -1
- package/dist/esm-es5/formatStringWithLinks-0d48f183.js +0 -1
- package/dist/esm-es5/getBorderRadius-1f7be586.js +0 -1
- package/dist/esm-es5/getContrastColor-4c0ae8c1.js +0 -1
- package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +0 -1
- package/dist/esm-es5/getMissingRequiredShippingFields-f0878e32.js +0 -1
- package/dist/esm-es5/handleFetch-a844cac1.js +0 -1
- package/dist/esm-es5/hasInclusivePrice-d801be22.js +0 -1
- package/dist/esm-es5/helpers-2f6955b1.js +0 -1
- package/dist/esm-es5/index-cfd394c8.js +0 -13
- package/dist/esm-es5/invoice-86487dac.js +0 -1
- package/dist/esm-es5/isColorVariable-0a94004f.js +0 -1
- package/dist/esm-es5/isContrastColor-9fa0d013.js +0 -1
- package/dist/esm-es5/isDarkColor-939d8e9c.js +0 -1
- package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +0 -1
- package/dist/esm-es5/localization-36a4dc22.js +0 -1
- package/dist/esm-es5/paypal-997935ab.js +0 -17
- package/dist/esm-es5/placeTestOrder-a53f2056.js +0 -1
- package/dist/esm-es5/renderCheckoutCurrency-e0e16eb7.js +0 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-ef7b5860.js +0 -1
- package/dist/esm-es5/shouldShowLanguageSelect-328f50e2.js +0 -1
- package/dist/esm-es5/styles-6fc2fad9.js +0 -1
- package/dist/esm-es5/submitGtag-71c450b6.js +0 -1
- package/dist/esm-es5/throttle-c4c24e86.js +0 -1
- package/dist/esm-es5/updateCheckoutSessionAttributes-23b222de.js +0 -1
- package/dist/esm-es5/zonosStore-eca1e364.js +0 -1
- package/dist/zonos-elements/p-01174496.system.js +0 -1
- package/dist/zonos-elements/p-06f798ee.system.js +0 -1
- package/dist/zonos-elements/p-083a11cd.system.entry.js +0 -1
- package/dist/zonos-elements/p-08e7107d.js +0 -1
- package/dist/zonos-elements/p-0b29169b.js +0 -1
- package/dist/zonos-elements/p-0c327a57.system.entry.js +0 -1
- package/dist/zonos-elements/p-0d2f81ce.system.js +0 -1
- package/dist/zonos-elements/p-0e199a6c.system.entry.js +0 -1
- package/dist/zonos-elements/p-0ff845ec.js +0 -1
- package/dist/zonos-elements/p-117953db.system.entry.js +0 -1
- package/dist/zonos-elements/p-14afffa8.system.js +0 -1
- package/dist/zonos-elements/p-1834f486.js +0 -1
- package/dist/zonos-elements/p-1aa93d1e.system.js +0 -1
- package/dist/zonos-elements/p-1ac0c631.system.js +0 -1
- package/dist/zonos-elements/p-1b8771bb.js +0 -1
- package/dist/zonos-elements/p-1cdd27ec.js +0 -1
- package/dist/zonos-elements/p-1cfb5c2a.system.entry.js +0 -1
- package/dist/zonos-elements/p-1f8648c8.system.entry.js +0 -1
- package/dist/zonos-elements/p-23e7c655.system.js +0 -1
- package/dist/zonos-elements/p-2670438c.system.js +0 -1
- package/dist/zonos-elements/p-27660512.js +0 -1
- package/dist/zonos-elements/p-277b77e3.js +0 -1
- package/dist/zonos-elements/p-278abdcf.entry.js +0 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +0 -1
- package/dist/zonos-elements/p-2b97f7ed.js +0 -1
- package/dist/zonos-elements/p-2bbe9d91.js +0 -1
- package/dist/zonos-elements/p-2c7a425d.entry.js +0 -1
- package/dist/zonos-elements/p-2cab1746.system.entry.js +0 -1
- package/dist/zonos-elements/p-3490b6d0.entry.js +0 -1
- package/dist/zonos-elements/p-398d9022.system.js +0 -1
- package/dist/zonos-elements/p-3a26e5e7.system.entry.js +0 -1
- package/dist/zonos-elements/p-40a4c8a2.system.js +0 -1
- package/dist/zonos-elements/p-40af92a1.system.entry.js +0 -1
- package/dist/zonos-elements/p-4160bbc2.system.js +0 -1
- package/dist/zonos-elements/p-41f1697a.system.entry.js +0 -1
- package/dist/zonos-elements/p-4671fde7.entry.js +0 -1
- package/dist/zonos-elements/p-490d7fec.system.entry.js +0 -1
- package/dist/zonos-elements/p-4941c096.system.entry.js +0 -1
- package/dist/zonos-elements/p-4b159ff3.system.js +0 -1
- package/dist/zonos-elements/p-502d6eeb.js +0 -1
- package/dist/zonos-elements/p-50d088f7.system.entry.js +0 -1
- package/dist/zonos-elements/p-51e4e61a.system.entry.js +0 -1
- package/dist/zonos-elements/p-551fa762.system.js +0 -1
- package/dist/zonos-elements/p-5b990c91.entry.js +0 -1
- package/dist/zonos-elements/p-60832726.system.js +0 -1
- package/dist/zonos-elements/p-67426156.system.js +0 -1
- package/dist/zonos-elements/p-6890e060.system.js +0 -1
- package/dist/zonos-elements/p-6eaf7c9e.system.entry.js +0 -1
- package/dist/zonos-elements/p-7176f582.entry.js +0 -1
- package/dist/zonos-elements/p-7261e245.system.js +0 -13
- package/dist/zonos-elements/p-7352abe9.js +0 -1
- package/dist/zonos-elements/p-74230da8.system.js +0 -1
- package/dist/zonos-elements/p-76834a0a.system.entry.js +0 -1
- package/dist/zonos-elements/p-77993ba1.entry.js +0 -1
- package/dist/zonos-elements/p-78f8e594.entry.js +0 -1
- package/dist/zonos-elements/p-7ac8846c.system.js +0 -1
- package/dist/zonos-elements/p-7b525c75.system.js +0 -1
- package/dist/zonos-elements/p-7f688485.system.entry.js +0 -1
- package/dist/zonos-elements/p-7fbbdb0f.system.js +0 -1
- package/dist/zonos-elements/p-8861d47e.js +0 -1
- package/dist/zonos-elements/p-8a0b8175.system.entry.js +0 -1
- package/dist/zonos-elements/p-8a6c4017.js +0 -1
- package/dist/zonos-elements/p-8be02f3a.system.js +0 -1
- package/dist/zonos-elements/p-8d14cb66.entry.js +0 -1
- package/dist/zonos-elements/p-8e6338b9.entry.js +0 -1
- package/dist/zonos-elements/p-916228fb.system.js +0 -1
- package/dist/zonos-elements/p-944c1fb3.entry.js +0 -1
- package/dist/zonos-elements/p-947e4402.system.entry.js +0 -1
- package/dist/zonos-elements/p-96ab529e.entry.js +0 -1
- package/dist/zonos-elements/p-998975a3.system.js +0 -18
- package/dist/zonos-elements/p-9ad640b2.system.entry.js +0 -1
- package/dist/zonos-elements/p-9ecb9afc.system.entry.js +0 -1
- package/dist/zonos-elements/p-a04e2750.system.entry.js +0 -1
- package/dist/zonos-elements/p-a1bd3a53.system.js +0 -1
- package/dist/zonos-elements/p-a553e132.js +0 -1
- package/dist/zonos-elements/p-acb7dee1.system.entry.js +0 -1
- package/dist/zonos-elements/p-af19722c.system.js +0 -1
- package/dist/zonos-elements/p-b4ae66cb.system.entry.js +0 -1
- package/dist/zonos-elements/p-bcaffb85.system.entry.js +0 -1
- package/dist/zonos-elements/p-be6cd28c.system.entry.js +0 -1
- package/dist/zonos-elements/p-bf37ccc7.system.js +0 -1
- package/dist/zonos-elements/p-c0af11fe.system.js +0 -1
- package/dist/zonos-elements/p-c112fa12.system.entry.js +0 -1
- package/dist/zonos-elements/p-c4321a1a.system.js +0 -1
- package/dist/zonos-elements/p-c5d1217f.system.js +0 -1
- package/dist/zonos-elements/p-c7329333.entry.js +0 -1
- package/dist/zonos-elements/p-c756a59d.system.js +0 -1
- package/dist/zonos-elements/p-c77b049c.entry.js +0 -1
- package/dist/zonos-elements/p-ca87ada5.system.entry.js +0 -1
- package/dist/zonos-elements/p-ce75b047.js +0 -2
- package/dist/zonos-elements/p-d1a51fac.js +0 -1
- package/dist/zonos-elements/p-d6a73125.system.entry.js +0 -1
- package/dist/zonos-elements/p-d75726e5.system.entry.js +0 -1
- package/dist/zonos-elements/p-d938f42f.system.js +0 -1
- package/dist/zonos-elements/p-dd866ca3.system.entry.js +0 -1
- package/dist/zonos-elements/p-dd8a7bf4.entry.js +0 -1
- package/dist/zonos-elements/p-de58684b.system.js +0 -1
- package/dist/zonos-elements/p-e160b75f.js +0 -1
- package/dist/zonos-elements/p-e1ef3984.system.entry.js +0 -1
- package/dist/zonos-elements/p-e27b8e18.entry.js +0 -1
- package/dist/zonos-elements/p-e4b07f7d.system.entry.js +0 -1
- package/dist/zonos-elements/p-e4dc24e1.system.js +0 -1
- package/dist/zonos-elements/p-e5865ad9.system.js +0 -1
- package/dist/zonos-elements/p-e7d7afda.entry.js +0 -1
- package/dist/zonos-elements/p-ebbda085.system.js +0 -1
- package/dist/zonos-elements/p-f4720b0a.js +0 -1
- package/dist/zonos-elements/p-f8356934.system.entry.js +0 -1
- package/dist/zonos-elements/p-f9346f1c.entry.js +0 -1
- package/dist/zonos-elements/p-fc5f6113.js +0 -1
- package/dist/zonos-elements/p-fe28dbe6.entry.js +0 -1
- package/loader/package.json +0 -11
- /package/dist/cjs/{CheckoutConfig-27c82f94.js → CheckoutConfig-B7JRM7yr.js} +0 -0
- /package/dist/cjs/{ShortAddressCode-bec338b0.js → ShortAddressCode-C5l520-F.js} +0 -0
- /package/dist/cjs/{TaxId-cd9d490e.js → TaxId-Q6aDqqWv.js} +0 -0
- /package/dist/cjs/{VarianceTest-bec00ea8.js → VarianceTest-C98whVgO.js} +0 -0
- /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
- /package/dist/cjs/{buildCartItemsByTempCart-edddbf4b.js → buildCartItemsByTempCart-ILzonEjb.js} +0 -0
- /package/dist/cjs/{classes-b7918f56.js → classes-D_DL168u.js} +0 -0
- /package/dist/cjs/{cleanHtmlMarkdown-57147de7.js → cleanHtmlMarkdown-DpT-nZLH.js} +0 -0
- /package/dist/cjs/{containsNonLatinChars-2be5129b.js → containsNonLatinChars-D_OggJN6.js} +0 -0
- /package/dist/cjs/{createCustomEvent-7b6fad95.js → createCustomEvent-Cs5zGImL.js} +0 -0
- /package/dist/cjs/{getGenericSettingsOverride-c0ca32b9.js → getGenericSettingsOverride-CL6l6wvX.js} +0 -0
- /package/dist/cjs/{getHasMoreSpaceOnRight-4c94667f.js → getHasMoreSpaceOnRight-Cl50u1mb.js} +0 -0
- /package/dist/cjs/{isCollectMobileTablet-884d4280.js → isCollectMobileTablet-Cx2nZ15_.js} +0 -0
- /package/dist/cjs/{isColorVariable-525dbfa7.js → isColorVariable-CKoJdu9G.js} +0 -0
- /package/dist/cjs/{isInvoiceMobileTablet-dde41e4e.js → isInvoiceMobileTablet-CCqFYV6m.js} +0 -0
- /package/dist/cjs/{isSameHostCheckoutLink-6148cabb.js → isSameHostCheckoutLink-DbmQ7Ha4.js} +0 -0
- /package/dist/cjs/{styles-d1e64fb9.js → styles-nowYls3K.js} +0 -0
- /package/dist/esm/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +0 -0
- /package/dist/esm/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
- /package/dist/esm/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
- /package/dist/esm/{VarianceTest-572cecf5.js → VarianceTest-BJmZPrZl.js} +0 -0
- /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
- /package/dist/esm/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +0 -0
- /package/dist/esm/{classes-0d95c529.js → classes-BJHSB96f.js} +0 -0
- /package/dist/esm/{cleanHtmlMarkdown-87d195f6.js → cleanHtmlMarkdown-ByGDytaN.js} +0 -0
- /package/dist/esm/{containsNonLatinChars-2d8810c3.js → containsNonLatinChars-C04AWRC2.js} +0 -0
- /package/dist/esm/{createCustomEvent-58159025.js → createCustomEvent-XQfWgQLB.js} +0 -0
- /package/dist/esm/{getGenericSettingsOverride-0bc3e118.js → getGenericSettingsOverride-HeAZDwVW.js} +0 -0
- /package/dist/esm/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
- /package/dist/esm/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
- /package/dist/esm/{isColorVariable-0a94004f.js → isColorVariable-DXXUq2Lv.js} +0 -0
- /package/dist/esm/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
- /package/dist/esm/{isSameHostCheckoutLink-c1b88ab7.js → isSameHostCheckoutLink-BxAHnL5J.js} +0 -0
- /package/dist/esm/{styles-6fc2fad9.js → styles-BTIeCf3T.js} +0 -0
- /package/dist/esm-es5/{RemoveIcon-9dc5dd1a.js → RemoveIcon-C2QMVeWW.js} +0 -0
- /package/dist/esm-es5/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
- /package/dist/esm-es5/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
- /package/dist/esm-es5/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
- /package/dist/esm-es5/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
- /package/dist/esm-es5/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
- /package/dist/esm-es5/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
- /package/dist/zonos-elements/{p-2770ba48.system.js → p-0D0aCMu6.system.js} +0 -0
- /package/dist/zonos-elements/{p-b4b7f705.js → p-BJHSB96f.js} +0 -0
- /package/dist/zonos-elements/{p-0a377722.js → p-BJmZPrZl.js} +0 -0
- /package/dist/zonos-elements/{p-96d77739.js → p-BTIeCf3T.js} +0 -0
- /package/dist/zonos-elements/{p-56ba5cbf.system.js → p-BbPAtVJG.system.js} +0 -0
- /package/dist/zonos-elements/{p-11206fe2.js → p-BxAHnL5J.js} +0 -0
- /package/dist/zonos-elements/{p-cc6ad18a.js → p-ByGDytaN.js} +0 -0
- /package/dist/zonos-elements/{p-83666056.js → p-BycjkdlE.js} +0 -0
- /package/dist/zonos-elements/{p-0c64dbbb.js → p-C04AWRC2.js} +0 -0
- /package/dist/zonos-elements/{p-655ec440.system.js → p-C29tlYn0.system.js} +0 -0
- /package/dist/zonos-elements/{p-2adbbce7.system.js → p-CLDnjFm5.system.js} +0 -0
- /package/dist/zonos-elements/{p-989cb22b.system.js → p-Cby4EkFu.system.js} +0 -0
- /package/dist/zonos-elements/{p-1f3549c6.js → p-Clej0Ffe.js} +0 -0
- /package/dist/zonos-elements/{p-bcf5cffb.js → p-Cye-evFK.js} +0 -0
- /package/dist/zonos-elements/{p-b2d81c98.js → p-D5SpFsQJ.js} +0 -0
- /package/dist/zonos-elements/{p-5883217a.js → p-DAscqB23.js} +0 -0
- /package/dist/zonos-elements/{p-579932a7.js → p-DGlnuxEX.js} +0 -0
- /package/dist/zonos-elements/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
- /package/dist/zonos-elements/{p-ae393255.js → p-DXXUq2Lv.js} +0 -0
- /package/dist/zonos-elements/{p-e7b0c156.js → p-HeAZDwVW.js} +0 -0
- /package/dist/zonos-elements/{p-595f5dd2.js → p-XQfWgQLB.js} +0 -0
- /package/dist/zonos-elements/{p-bc7bf53e.system.js → p-Z99tSPFR.system.js} +0 -0
- /package/dist/zonos-elements/{p-6f23a26a.system.js → p-_GDmY2H7.system.js} +0 -0
- /package/dist/zonos-elements/{p-1d42cd20.js → p-nJ6oI8-n.js} +0 -0
|
@@ -1,37 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function _interopNamespace(e) {
|
|
4
|
-
if (e && e.__esModule) return e;
|
|
5
|
-
var n = Object.create(null);
|
|
6
|
-
if (e) {
|
|
7
|
-
Object.keys(e).forEach(function (k) {
|
|
8
|
-
if (k !== 'default') {
|
|
9
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return e[k];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n['default'] = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
3
|
const NAMESPACE = 'zonos-elements';
|
|
24
|
-
const BUILD = /* zonos-elements */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false,
|
|
4
|
+
const BUILD = /* zonos-elements */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, deserializer: false, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propChangeCallback: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, serializer: false, shadowDelegatesFocus: true, shadowDom: true, shadowSlotAssignmentManual: false, 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: true };
|
|
25
5
|
const Env = /* zonos-elements */ {};
|
|
26
6
|
|
|
27
7
|
/*
|
|
28
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.44.2 | MIT Licensed | https://stenciljs.com
|
|
29
9
|
*/
|
|
30
|
-
|
|
31
|
-
var __export = (target, all) => {
|
|
32
|
-
for (var name in all)
|
|
33
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
34
|
-
};
|
|
10
|
+
|
|
35
11
|
var Build = {
|
|
36
12
|
isDev: BUILD.isDev ? true : false,
|
|
37
13
|
isBrowser: true,
|
|
@@ -42,6 +18,41 @@ var Build = {
|
|
|
42
18
|
// src/utils/constants.ts
|
|
43
19
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
44
20
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
21
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
22
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
23
|
+
PrimitiveType2["Null"] = "null";
|
|
24
|
+
PrimitiveType2["String"] = "string";
|
|
25
|
+
PrimitiveType2["Number"] = "number";
|
|
26
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
27
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
28
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
29
|
+
return PrimitiveType2;
|
|
30
|
+
})(PrimitiveType || {});
|
|
31
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
32
|
+
NonPrimitiveType2["Array"] = "array";
|
|
33
|
+
NonPrimitiveType2["Date"] = "date";
|
|
34
|
+
NonPrimitiveType2["Map"] = "map";
|
|
35
|
+
NonPrimitiveType2["Object"] = "object";
|
|
36
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
37
|
+
NonPrimitiveType2["Set"] = "set";
|
|
38
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
39
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
40
|
+
return NonPrimitiveType2;
|
|
41
|
+
})(NonPrimitiveType || {});
|
|
42
|
+
var TYPE_CONSTANT = "type";
|
|
43
|
+
var VALUE_CONSTANT = "value";
|
|
44
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
45
|
+
|
|
46
|
+
// src/utils/get-prop-descriptor.ts
|
|
47
|
+
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
48
|
+
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
49
|
+
while (obj && obj !== stopAt) {
|
|
50
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
51
|
+
if (desc && (!getOnly || desc.get)) return desc;
|
|
52
|
+
obj = Object.getPrototypeOf(obj);
|
|
53
|
+
}
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
45
56
|
|
|
46
57
|
// src/utils/es2022-rewire-class-members.ts
|
|
47
58
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
@@ -51,18 +62,24 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
51
62
|
members.map(([memberName, [memberFlags]]) => {
|
|
52
63
|
if ((BUILD.state || BUILD.prop) && (memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
53
64
|
const ogValue = instance[memberName];
|
|
54
|
-
const ogDescriptor =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
66
|
+
if (ogDescriptor) {
|
|
67
|
+
Object.defineProperty(instance, memberName, {
|
|
68
|
+
get() {
|
|
69
|
+
return ogDescriptor.get.call(this);
|
|
70
|
+
},
|
|
71
|
+
set(newValue) {
|
|
72
|
+
ogDescriptor.set.call(this, newValue);
|
|
73
|
+
},
|
|
74
|
+
configurable: true,
|
|
75
|
+
enumerable: true
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (hostRef.$instanceValues$.has(memberName)) {
|
|
79
|
+
instance[memberName] = hostRef.$instanceValues$.get(memberName);
|
|
80
|
+
} else if (ogValue !== void 0) {
|
|
81
|
+
instance[memberName] = ogValue;
|
|
82
|
+
}
|
|
66
83
|
}
|
|
67
84
|
});
|
|
68
85
|
};
|
|
@@ -75,9 +92,10 @@ var getHostRef = (ref) => {
|
|
|
75
92
|
return void 0;
|
|
76
93
|
};
|
|
77
94
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
95
|
+
if (!hostRef) return;
|
|
78
96
|
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
79
97
|
hostRef.$lazyInstance$ = lazyInstance;
|
|
80
|
-
if (
|
|
98
|
+
if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state || BUILD.prop)) {
|
|
81
99
|
reWireGetterSetter(lazyInstance, hostRef);
|
|
82
100
|
}
|
|
83
101
|
};
|
|
@@ -86,7 +104,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
86
104
|
$flags$: 0,
|
|
87
105
|
$hostElement$: hostElement,
|
|
88
106
|
$cmpMeta$: cmpMeta,
|
|
89
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
|
107
|
+
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
108
|
+
$serializerValues$: /* @__PURE__ */ new Map()
|
|
90
109
|
};
|
|
91
110
|
if (BUILD.isDev) {
|
|
92
111
|
hostRef.$renderCount$ = 0;
|
|
@@ -99,9 +118,12 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
99
118
|
hostElement["s-p"] = [];
|
|
100
119
|
hostElement["s-rc"] = [];
|
|
101
120
|
}
|
|
121
|
+
if (BUILD.lazyLoad) {
|
|
122
|
+
hostRef.$fetchedCbList$ = [];
|
|
123
|
+
}
|
|
102
124
|
const ref = hostRef;
|
|
103
125
|
hostElement.__stencil__getHostRef = () => ref;
|
|
104
|
-
if (!BUILD.lazyLoad &&
|
|
126
|
+
if (!BUILD.lazyLoad && cmpMeta.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state || BUILD.prop)) {
|
|
105
127
|
reWireGetterSetter(hostElement, hostRef);
|
|
106
128
|
}
|
|
107
129
|
return ref;
|
|
@@ -120,7 +142,9 @@ var setErrorHandler = (handler) => customError = handler;
|
|
|
120
142
|
|
|
121
143
|
// src/client/client-load-module.ts
|
|
122
144
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
145
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
123
146
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
147
|
+
var _a;
|
|
124
148
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
125
149
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
126
150
|
if (BUILD.isDev && typeof bundleId !== "string") {
|
|
@@ -135,21 +159,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
135
159
|
if (module) {
|
|
136
160
|
return module[exportName];
|
|
137
161
|
}
|
|
162
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
163
|
+
const cacheBustParams = [
|
|
164
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
165
|
+
BUILD.hotModuleReplacement && hmrVersionId ? `s-hmr=${hmrVersionId}` : ""
|
|
166
|
+
].filter(Boolean).join("&");
|
|
138
167
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
139
|
-
return
|
|
168
|
+
return import(
|
|
140
169
|
/* @vite-ignore */
|
|
141
170
|
/* webpackInclude: /\.entry\.js$/ */
|
|
142
171
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
143
172
|
/* webpackMode: "lazy" */
|
|
144
|
-
`./${bundleId}.entry.js${
|
|
145
|
-
)
|
|
173
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
174
|
+
).then(
|
|
146
175
|
(importedModule) => {
|
|
147
176
|
if (!BUILD.hotModuleReplacement) {
|
|
177
|
+
failedLoadAttempts.delete(bundleId);
|
|
148
178
|
cmpModules.set(bundleId, importedModule);
|
|
149
179
|
}
|
|
150
180
|
return importedModule[exportName];
|
|
151
181
|
},
|
|
152
182
|
(e) => {
|
|
183
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
153
184
|
consoleError(e, hostRef.$hostElement$);
|
|
154
185
|
}
|
|
155
186
|
);
|
|
@@ -158,6 +189,9 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
158
189
|
// src/client/client-style.ts
|
|
159
190
|
var styles = /* @__PURE__ */ new Map();
|
|
160
191
|
var modeResolutionChain = [];
|
|
192
|
+
var setScopedSSR = (_opts) => {
|
|
193
|
+
};
|
|
194
|
+
var needsScopedSSR = () => false;
|
|
161
195
|
|
|
162
196
|
// src/runtime/runtime-constants.ts
|
|
163
197
|
var CONTENT_REF_ID = "r";
|
|
@@ -177,6 +211,8 @@ var DEFAULT_DOC_DATA = {
|
|
|
177
211
|
};
|
|
178
212
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
179
213
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
214
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
215
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
180
216
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
181
217
|
"formAssociatedCallback",
|
|
182
218
|
"formResetCallback",
|
|
@@ -219,12 +255,16 @@ var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
|
219
255
|
var promiseResolve = (v) => Promise.resolve(v);
|
|
220
256
|
var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
|
|
221
257
|
try {
|
|
258
|
+
if (!win.document.adoptedStyleSheets) {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
222
261
|
new CSSStyleSheet();
|
|
223
262
|
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
224
263
|
} catch (e) {
|
|
225
264
|
}
|
|
226
265
|
return false;
|
|
227
266
|
})() : false;
|
|
267
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
228
268
|
|
|
229
269
|
// src/client/client-task-queue.ts
|
|
230
270
|
var queueCongestion = 0;
|
|
@@ -232,6 +272,10 @@ var queuePending = false;
|
|
|
232
272
|
var queueDomReads = [];
|
|
233
273
|
var queueDomWrites = [];
|
|
234
274
|
var queueDomWritesLow = [];
|
|
275
|
+
var scheduleFlush = () => {
|
|
276
|
+
var _a;
|
|
277
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
278
|
+
};
|
|
235
279
|
var queueTask = (queue, write) => (cb) => {
|
|
236
280
|
queue.push(cb);
|
|
237
281
|
if (!queuePending) {
|
|
@@ -239,7 +283,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
239
283
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
240
284
|
nextTick(flush);
|
|
241
285
|
} else {
|
|
242
|
-
|
|
286
|
+
scheduleFlush();
|
|
243
287
|
}
|
|
244
288
|
}
|
|
245
289
|
};
|
|
@@ -283,14 +327,14 @@ var flush = () => {
|
|
|
283
327
|
queueDomWrites.length = 0;
|
|
284
328
|
}
|
|
285
329
|
if (queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0) {
|
|
286
|
-
|
|
330
|
+
scheduleFlush();
|
|
287
331
|
} else {
|
|
288
332
|
queueCongestion = 0;
|
|
289
333
|
}
|
|
290
334
|
} else {
|
|
291
335
|
consume(queueDomWrites);
|
|
292
336
|
if (queuePending = queueDomReads.length > 0) {
|
|
293
|
-
|
|
337
|
+
scheduleFlush();
|
|
294
338
|
}
|
|
295
339
|
}
|
|
296
340
|
};
|
|
@@ -305,72 +349,35 @@ var getAssetPath = (path) => {
|
|
|
305
349
|
};
|
|
306
350
|
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
307
351
|
|
|
308
|
-
// src/utils/
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
o = typeof o;
|
|
312
|
-
return o === "object" || o === "function";
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
316
|
-
function queryNonceMetaTagContent(doc) {
|
|
317
|
-
var _a, _b, _c;
|
|
318
|
-
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;
|
|
352
|
+
// src/utils/style.ts
|
|
353
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
354
|
+
return void 0;
|
|
319
355
|
}
|
|
320
356
|
|
|
321
|
-
// src/utils/
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
unwrapErr: () => unwrapErr
|
|
334
|
-
});
|
|
335
|
-
var ok = (value) => ({
|
|
336
|
-
isOk: true,
|
|
337
|
-
isErr: false,
|
|
338
|
-
value
|
|
339
|
-
});
|
|
340
|
-
var err = (value) => ({
|
|
341
|
-
isOk: false,
|
|
342
|
-
isErr: true,
|
|
343
|
-
value
|
|
344
|
-
});
|
|
345
|
-
function map(result, fn) {
|
|
346
|
-
if (result.isOk) {
|
|
347
|
-
const val = fn(result.value);
|
|
348
|
-
if (val instanceof Promise) {
|
|
349
|
-
return val.then((newVal) => ok(newVal));
|
|
350
|
-
} else {
|
|
351
|
-
return ok(val);
|
|
357
|
+
// src/utils/shadow-root.ts
|
|
358
|
+
var globalStyleSheet;
|
|
359
|
+
function createShadowRoot(cmpMeta) {
|
|
360
|
+
var _a;
|
|
361
|
+
const opts = { mode: "open" };
|
|
362
|
+
if (BUILD.shadowDelegatesFocus) {
|
|
363
|
+
opts.delegatesFocus = !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */);
|
|
364
|
+
}
|
|
365
|
+
if (BUILD.shadowSlotAssignmentManual) {
|
|
366
|
+
const isManual = !!(cmpMeta.$flags$ & 1024 /* shadowSlotAssignmentManual */);
|
|
367
|
+
if (isManual) {
|
|
368
|
+
opts.slotAssignment = "manual";
|
|
352
369
|
}
|
|
353
370
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
371
|
+
const shadowRoot = this.attachShadow(opts);
|
|
372
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
|
373
|
+
if (globalStyleSheet) {
|
|
374
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
375
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
376
|
+
} else {
|
|
377
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
378
|
+
}
|
|
357
379
|
}
|
|
358
|
-
throw "should never get here";
|
|
359
380
|
}
|
|
360
|
-
var unwrap = (result) => {
|
|
361
|
-
if (result.isOk) {
|
|
362
|
-
return result.value;
|
|
363
|
-
} else {
|
|
364
|
-
throw result.value;
|
|
365
|
-
}
|
|
366
|
-
};
|
|
367
|
-
var unwrapErr = (result) => {
|
|
368
|
-
if (result.isErr) {
|
|
369
|
-
return result.value;
|
|
370
|
-
} else {
|
|
371
|
-
throw result.value;
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
381
|
var updateFallbackSlotVisibility = (elm) => {
|
|
375
382
|
const childNodes = internalCall(elm, "childNodes");
|
|
376
383
|
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
@@ -412,7 +419,7 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
412
419
|
slottedNodes.push(childNode);
|
|
413
420
|
if (typeof slotName !== "undefined") return slottedNodes;
|
|
414
421
|
}
|
|
415
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode
|
|
422
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
|
|
416
423
|
}
|
|
417
424
|
return slottedNodes;
|
|
418
425
|
}
|
|
@@ -476,7 +483,7 @@ function patchSlotNode(node) {
|
|
|
476
483
|
const slotName = this["s-sn"];
|
|
477
484
|
if (opts == null ? void 0 : opts.flatten) {
|
|
478
485
|
console.error(`
|
|
479
|
-
Flattening is not supported for Stencil non-shadow slots.
|
|
486
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
480
487
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
481
488
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
482
489
|
`);
|
|
@@ -524,7 +531,8 @@ var patchPseudoShadowDom = (hostElementPrototype) => {
|
|
|
524
531
|
patchSlotRemoveChild(hostElementPrototype);
|
|
525
532
|
};
|
|
526
533
|
var patchCloneNode = (HostElementPrototype) => {
|
|
527
|
-
|
|
534
|
+
if (HostElementPrototype.__cloneNode) return;
|
|
535
|
+
const orgCloneNode = HostElementPrototype.__cloneNode = HostElementPrototype.cloneNode;
|
|
528
536
|
HostElementPrototype.cloneNode = function(deep) {
|
|
529
537
|
const srcNode = this;
|
|
530
538
|
const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
|
|
@@ -569,6 +577,7 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
569
577
|
};
|
|
570
578
|
};
|
|
571
579
|
var patchSlotAppendChild = (HostElementPrototype) => {
|
|
580
|
+
if (HostElementPrototype.__appendChild) return;
|
|
572
581
|
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
573
582
|
HostElementPrototype.appendChild = function(newChild) {
|
|
574
583
|
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
@@ -586,6 +595,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
|
|
|
586
595
|
};
|
|
587
596
|
};
|
|
588
597
|
var patchSlotRemoveChild = (ElementPrototype) => {
|
|
598
|
+
if (ElementPrototype.__removeChild) return;
|
|
589
599
|
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
590
600
|
ElementPrototype.removeChild = function(toRemove) {
|
|
591
601
|
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
@@ -601,6 +611,7 @@ var patchSlotRemoveChild = (ElementPrototype) => {
|
|
|
601
611
|
};
|
|
602
612
|
};
|
|
603
613
|
var patchSlotPrepend = (HostElementPrototype) => {
|
|
614
|
+
if (HostElementPrototype.__prepend) return;
|
|
604
615
|
HostElementPrototype.__prepend = HostElementPrototype.prepend;
|
|
605
616
|
HostElementPrototype.prepend = function(...newChildren) {
|
|
606
617
|
newChildren.forEach((newChild) => {
|
|
@@ -627,6 +638,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
|
|
|
627
638
|
};
|
|
628
639
|
};
|
|
629
640
|
var patchSlotAppend = (HostElementPrototype) => {
|
|
641
|
+
if (HostElementPrototype.__append) return;
|
|
630
642
|
HostElementPrototype.__append = HostElementPrototype.append;
|
|
631
643
|
HostElementPrototype.append = function(...newChildren) {
|
|
632
644
|
newChildren.forEach((newChild) => {
|
|
@@ -638,6 +650,7 @@ var patchSlotAppend = (HostElementPrototype) => {
|
|
|
638
650
|
};
|
|
639
651
|
};
|
|
640
652
|
var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
|
|
653
|
+
if (HostElementPrototype.__insertAdjacentHTML) return;
|
|
641
654
|
const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
|
|
642
655
|
HostElementPrototype.insertAdjacentHTML = function(position, text) {
|
|
643
656
|
if (position !== "afterbegin" && position !== "beforeend") {
|
|
@@ -663,6 +676,7 @@ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
|
|
|
663
676
|
};
|
|
664
677
|
};
|
|
665
678
|
var patchInsertBefore = (HostElementPrototype) => {
|
|
679
|
+
if (HostElementPrototype.__insertBefore) return;
|
|
666
680
|
const eleProto = HostElementPrototype;
|
|
667
681
|
if (eleProto.__insertBefore) return;
|
|
668
682
|
eleProto.__insertBefore = HostElementPrototype.insertBefore;
|
|
@@ -697,6 +711,7 @@ var patchInsertBefore = (HostElementPrototype) => {
|
|
|
697
711
|
};
|
|
698
712
|
};
|
|
699
713
|
var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
714
|
+
if (HostElementPrototype.__insertAdjacentElement) return;
|
|
700
715
|
const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
|
|
701
716
|
HostElementPrototype.insertAdjacentElement = function(position, element) {
|
|
702
717
|
if (position !== "afterbegin" && position !== "beforeend") {
|
|
@@ -751,13 +766,13 @@ var patchChildSlotNodes = (elm) => {
|
|
|
751
766
|
patchHostOriginalAccessor("firstChild", elm);
|
|
752
767
|
Object.defineProperty(elm, "firstChild", {
|
|
753
768
|
get() {
|
|
754
|
-
return this.childNodes[0];
|
|
769
|
+
return this.childNodes[0] || null;
|
|
755
770
|
}
|
|
756
771
|
});
|
|
757
772
|
patchHostOriginalAccessor("lastChild", elm);
|
|
758
773
|
Object.defineProperty(elm, "lastChild", {
|
|
759
774
|
get() {
|
|
760
|
-
return this.childNodes[this.childNodes.length - 1];
|
|
775
|
+
return this.childNodes[this.childNodes.length - 1] || null;
|
|
761
776
|
}
|
|
762
777
|
});
|
|
763
778
|
patchHostOriginalAccessor("childNodes", elm);
|
|
@@ -788,7 +803,7 @@ var patchNextSibling = (node) => {
|
|
|
788
803
|
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
789
804
|
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
790
805
|
if (parentNodes && index > -1) {
|
|
791
|
-
return parentNodes[index + 1];
|
|
806
|
+
return parentNodes[index + 1] || null;
|
|
792
807
|
}
|
|
793
808
|
return this.__nextSibling;
|
|
794
809
|
}
|
|
@@ -803,7 +818,7 @@ var patchNextElementSibling = (element) => {
|
|
|
803
818
|
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
804
819
|
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
805
820
|
if (parentEles && index > -1) {
|
|
806
|
-
return parentEles[index + 1];
|
|
821
|
+
return parentEles[index + 1] || null;
|
|
807
822
|
}
|
|
808
823
|
return this.__nextElementSibling;
|
|
809
824
|
}
|
|
@@ -818,7 +833,7 @@ var patchPreviousSibling = (node) => {
|
|
|
818
833
|
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
819
834
|
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
820
835
|
if (parentNodes && index > -1) {
|
|
821
|
-
return parentNodes[index - 1];
|
|
836
|
+
return parentNodes[index - 1] || null;
|
|
822
837
|
}
|
|
823
838
|
return this.__previousSibling;
|
|
824
839
|
}
|
|
@@ -833,7 +848,7 @@ var patchPreviousElementSibling = (element) => {
|
|
|
833
848
|
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
834
849
|
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
835
850
|
if (parentNodes && index > -1) {
|
|
836
|
-
return parentNodes[index - 1];
|
|
851
|
+
return parentNodes[index - 1] || null;
|
|
837
852
|
}
|
|
838
853
|
return this.__previousElementSibling;
|
|
839
854
|
}
|
|
@@ -863,6 +878,9 @@ var validNodesPatches = [
|
|
|
863
878
|
"parentNode"
|
|
864
879
|
];
|
|
865
880
|
function patchHostOriginalAccessor(accessorName, node) {
|
|
881
|
+
if (!globalThis.Node || !globalThis.Element) {
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
866
884
|
let accessor;
|
|
867
885
|
if (validElementPatches.includes(accessorName)) {
|
|
868
886
|
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
@@ -934,11 +952,13 @@ var inspect = (ref) => {
|
|
|
934
952
|
needsRerender: !!(flags & 512 /* needsRerender */)
|
|
935
953
|
},
|
|
936
954
|
instanceValues: hostRef.$instanceValues$,
|
|
955
|
+
serializerValues: hostRef.$serializerValues$,
|
|
937
956
|
ancestorComponent: hostRef.$ancestorComponent$,
|
|
938
957
|
hostElement,
|
|
939
958
|
lazyInstance: hostRef.$lazyInstance$,
|
|
940
959
|
vnode: hostRef.$vnode$,
|
|
941
960
|
modeName: hostRef.$modeName$,
|
|
961
|
+
fetchedCbList: hostRef.$fetchedCbList$,
|
|
942
962
|
onReadyPromise: hostRef.$onReadyPromise$,
|
|
943
963
|
onReadyResolve: hostRef.$onReadyResolve$,
|
|
944
964
|
onInstancePromise: hostRef.$onInstancePromise$,
|
|
@@ -967,7 +987,172 @@ var installDevTools = () => {
|
|
|
967
987
|
};
|
|
968
988
|
}
|
|
969
989
|
};
|
|
990
|
+
|
|
991
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
992
|
+
function queryNonceMetaTagContent(doc) {
|
|
993
|
+
var _a, _b, _c;
|
|
994
|
+
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;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
// src/runtime/styles.ts
|
|
998
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
999
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1000
|
+
let style = styles.get(scopeId2);
|
|
1001
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
1002
|
+
style = style || new CSSStyleSheet();
|
|
1003
|
+
if (typeof style === "string") {
|
|
1004
|
+
style = cssText;
|
|
1005
|
+
} else {
|
|
1006
|
+
style.replaceSync(cssText);
|
|
1007
|
+
}
|
|
1008
|
+
} else {
|
|
1009
|
+
style = cssText;
|
|
1010
|
+
}
|
|
1011
|
+
styles.set(scopeId2, style);
|
|
1012
|
+
};
|
|
1013
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1014
|
+
var _a, _b, _c;
|
|
1015
|
+
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
1016
|
+
const style = styles.get(scopeId2);
|
|
1017
|
+
if (!BUILD.attachStyles || !win.document) {
|
|
1018
|
+
return scopeId2;
|
|
1019
|
+
}
|
|
1020
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1021
|
+
if (style) {
|
|
1022
|
+
if (typeof style === "string") {
|
|
1023
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1024
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1025
|
+
let styleElm;
|
|
1026
|
+
if (!appliedStyles) {
|
|
1027
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1028
|
+
}
|
|
1029
|
+
const existingStyleElm = (BUILD.hydrateClientSide || BUILD.hotModuleReplacement) && styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
1030
|
+
if (existingStyleElm) {
|
|
1031
|
+
existingStyleElm.textContent = style;
|
|
1032
|
+
} else if (!appliedStyles.has(scopeId2)) {
|
|
1033
|
+
styleElm = win.document.createElement("style");
|
|
1034
|
+
styleElm.textContent = style;
|
|
1035
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1036
|
+
if (nonce != null) {
|
|
1037
|
+
styleElm.setAttribute("nonce", nonce);
|
|
1038
|
+
}
|
|
1039
|
+
if ((BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */ || cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1040
|
+
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
1041
|
+
}
|
|
1042
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1043
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1044
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1045
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1046
|
+
styleContainerNode.insertBefore(
|
|
1047
|
+
styleElm,
|
|
1048
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1049
|
+
);
|
|
1050
|
+
} else if ("host" in styleContainerNode) {
|
|
1051
|
+
if (supportsConstructableStylesheets) {
|
|
1052
|
+
const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
|
|
1053
|
+
const stylesheet = new currentWindow.CSSStyleSheet();
|
|
1054
|
+
stylesheet.replaceSync(style);
|
|
1055
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
1056
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
1057
|
+
} else {
|
|
1058
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1059
|
+
}
|
|
1060
|
+
} else {
|
|
1061
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1062
|
+
if (existingStyleContainer && !BUILD.hotModuleReplacement) {
|
|
1063
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
1064
|
+
} else {
|
|
1065
|
+
styleContainerNode.prepend(styleElm);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
} else {
|
|
1069
|
+
styleContainerNode.append(styleElm);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1073
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1074
|
+
}
|
|
1075
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1076
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
1077
|
+
}
|
|
1078
|
+
if (appliedStyles) {
|
|
1079
|
+
appliedStyles.add(scopeId2);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
} else if (BUILD.constructableCSS) {
|
|
1083
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1084
|
+
if (!appliedStyles) {
|
|
1085
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1086
|
+
}
|
|
1087
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1088
|
+
const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
|
|
1089
|
+
let stylesheet;
|
|
1090
|
+
if (style.constructor === currentWindow.CSSStyleSheet) {
|
|
1091
|
+
stylesheet = style;
|
|
1092
|
+
} else {
|
|
1093
|
+
stylesheet = new currentWindow.CSSStyleSheet();
|
|
1094
|
+
for (let i2 = 0; i2 < style.cssRules.length; i2++) {
|
|
1095
|
+
stylesheet.insertRule(style.cssRules[i2].cssText, i2);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
1099
|
+
styleContainerNode.adoptedStyleSheets.push(stylesheet);
|
|
1100
|
+
} else {
|
|
1101
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
|
|
1102
|
+
}
|
|
1103
|
+
appliedStyles.add(scopeId2);
|
|
1104
|
+
if (BUILD.hydrateClientSide && "host" in styleContainerNode) {
|
|
1105
|
+
const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
1106
|
+
if (ssrStyleElm) {
|
|
1107
|
+
writeTask(() => ssrStyleElm.remove());
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
return scopeId2;
|
|
1114
|
+
};
|
|
1115
|
+
var attachStyles = (hostRef) => {
|
|
1116
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1117
|
+
const elm = hostRef.$hostElement$;
|
|
1118
|
+
const flags = cmpMeta.$flags$;
|
|
1119
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1120
|
+
const scopeId2 = addStyle(
|
|
1121
|
+
BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1122
|
+
cmpMeta,
|
|
1123
|
+
hostRef.$modeName$
|
|
1124
|
+
);
|
|
1125
|
+
if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
1126
|
+
elm["s-sc"] = scopeId2;
|
|
1127
|
+
elm.classList.add(scopeId2 + "-h");
|
|
1128
|
+
}
|
|
1129
|
+
endAttachStyles();
|
|
1130
|
+
};
|
|
1131
|
+
var getScopeId = (cmp, mode) => "sc-" + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
1132
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1133
|
+
var hydrateScopedToShadow = () => {
|
|
1134
|
+
if (!win.document) {
|
|
1135
|
+
return;
|
|
1136
|
+
}
|
|
1137
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1138
|
+
let i2 = 0;
|
|
1139
|
+
for (; i2 < styles2.length; i2++) {
|
|
1140
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1141
|
+
}
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1144
|
+
// src/utils/helpers.ts
|
|
1145
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
1146
|
+
var isComplexType = (o) => {
|
|
1147
|
+
o = typeof o;
|
|
1148
|
+
return o === "object" || o === "function";
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
// src/runtime/vdom/h.ts
|
|
970
1152
|
var h = (nodeName, vnodeData, ...children) => {
|
|
1153
|
+
if (typeof nodeName === "string") {
|
|
1154
|
+
nodeName = transformTag(nodeName);
|
|
1155
|
+
}
|
|
971
1156
|
let child = null;
|
|
972
1157
|
let key = null;
|
|
973
1158
|
let slotName = null;
|
|
@@ -982,10 +1167,15 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
982
1167
|
} else if (child != null && typeof child !== "boolean") {
|
|
983
1168
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
984
1169
|
child = String(child);
|
|
985
|
-
} else if (
|
|
986
|
-
|
|
1170
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
1171
|
+
if (BUILD.isDev) {
|
|
1172
|
+
consoleDevError(`vNode passed as children has unexpected type.
|
|
987
1173
|
Make sure it's using the correct h() function.
|
|
988
1174
|
Empty objects can also be the cause, look for JSX comments that became objects.`);
|
|
1175
|
+
} else {
|
|
1176
|
+
consoleError("Invalid vNode child");
|
|
1177
|
+
}
|
|
1178
|
+
continue;
|
|
989
1179
|
}
|
|
990
1180
|
if (simple && lastSimple) {
|
|
991
1181
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -1043,7 +1233,8 @@ var newVNode = (tag, text) => {
|
|
|
1043
1233
|
const vnode = {
|
|
1044
1234
|
$flags$: 0,
|
|
1045
1235
|
$tag$: tag,
|
|
1046
|
-
|
|
1236
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
1237
|
+
$text$: text != null ? text : null,
|
|
1047
1238
|
$elm$: null,
|
|
1048
1239
|
$children$: null
|
|
1049
1240
|
};
|
|
@@ -1107,6 +1298,7 @@ var validateInputProperties = (inputElm) => {
|
|
|
1107
1298
|
|
|
1108
1299
|
// src/runtime/client-hydrate.ts
|
|
1109
1300
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1301
|
+
var _a, _b, _c, _d;
|
|
1110
1302
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
1111
1303
|
const shadowRoot = hostElm.shadowRoot;
|
|
1112
1304
|
const childRenderNodes = [];
|
|
@@ -1149,10 +1341,22 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1149
1341
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
1150
1342
|
const node = childRenderNode.$elm$;
|
|
1151
1343
|
if (!shadowRoot) {
|
|
1152
|
-
node["s-hn"] = tagName.toUpperCase();
|
|
1344
|
+
node["s-hn"] = transformTag(tagName).toUpperCase();
|
|
1153
1345
|
if (childRenderNode.$tag$ === "slot") {
|
|
1154
1346
|
node["s-cr"] = hostElm["s-cr"];
|
|
1155
1347
|
}
|
|
1348
|
+
} else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
|
|
1349
|
+
const cmpMeta = getHostRef(childRenderNode.$elm$);
|
|
1350
|
+
if (cmpMeta) {
|
|
1351
|
+
const scopeId3 = getScopeId(
|
|
1352
|
+
cmpMeta.$cmpMeta$,
|
|
1353
|
+
BUILD.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
|
|
1354
|
+
);
|
|
1355
|
+
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
1356
|
+
if (styleSheet) {
|
|
1357
|
+
shadowRootNodes.unshift(styleSheet.cloneNode(true));
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1156
1360
|
}
|
|
1157
1361
|
if (childRenderNode.$tag$ === "slot") {
|
|
1158
1362
|
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
@@ -1168,7 +1372,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1168
1372
|
}
|
|
1169
1373
|
}
|
|
1170
1374
|
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1171
|
-
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1375
|
+
if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1172
1376
|
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1173
1377
|
}
|
|
1174
1378
|
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
@@ -1176,7 +1380,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1176
1380
|
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1177
1381
|
}
|
|
1178
1382
|
}
|
|
1179
|
-
|
|
1383
|
+
if (orgLocationNode && !orgLocationNode["s-id"]) {
|
|
1384
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1385
|
+
}
|
|
1180
1386
|
}
|
|
1181
1387
|
const hosts = [];
|
|
1182
1388
|
const snLen = slottedNodes.length;
|
|
@@ -1185,6 +1391,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1185
1391
|
let snGroupIdx;
|
|
1186
1392
|
let snGroupLen;
|
|
1187
1393
|
let slottedItem;
|
|
1394
|
+
let currentPos = 0;
|
|
1188
1395
|
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1189
1396
|
slotGroup = slottedNodes[snIndex];
|
|
1190
1397
|
if (!slotGroup || !slotGroup.length) continue;
|
|
@@ -1197,21 +1404,27 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1197
1404
|
}
|
|
1198
1405
|
if (!hosts[slottedItem.hostId]) continue;
|
|
1199
1406
|
const hostEle = hosts[slottedItem.hostId];
|
|
1407
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1408
|
+
hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
|
|
1409
|
+
}
|
|
1200
1410
|
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1201
|
-
slottedItem.slot["s-cr"]
|
|
1202
|
-
|
|
1203
|
-
slottedItem.slot["s-cr"]
|
|
1204
|
-
|
|
1205
|
-
|
|
1411
|
+
if (!slottedItem.slot["s-cr"]) {
|
|
1412
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1413
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1414
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
1415
|
+
} else {
|
|
1416
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
|
|
1420
|
+
if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
1421
|
+
slottedItem.node.removeAttribute("slot");
|
|
1206
1422
|
}
|
|
1207
|
-
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1208
1423
|
if (BUILD.experimentalSlotFixes) {
|
|
1209
1424
|
patchSlottedNode(slottedItem.node);
|
|
1210
1425
|
}
|
|
1211
1426
|
}
|
|
1212
|
-
|
|
1213
|
-
hostEle.appendChild(slottedItem.node);
|
|
1214
|
-
}
|
|
1427
|
+
currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
|
|
1215
1428
|
}
|
|
1216
1429
|
}
|
|
1217
1430
|
if (BUILD.scoped && scopeId2 && slotNodes.length) {
|
|
@@ -1224,20 +1437,22 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1224
1437
|
const rnLen = shadowRootNodes.length;
|
|
1225
1438
|
if (rnLen) {
|
|
1226
1439
|
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1227
|
-
|
|
1440
|
+
const node = shadowRootNodes[rnIdex];
|
|
1441
|
+
if (node) {
|
|
1442
|
+
shadowRoot.appendChild(node);
|
|
1443
|
+
}
|
|
1228
1444
|
}
|
|
1229
1445
|
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1230
|
-
if (typeof node["s-sn"] !== "string") {
|
|
1446
|
+
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
1231
1447
|
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
1232
1448
|
node.removeAttribute("hidden");
|
|
1233
|
-
} else if (node.nodeType === 8 /* CommentNode */
|
|
1449
|
+
} else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
|
|
1234
1450
|
node.parentNode.removeChild(node);
|
|
1235
1451
|
}
|
|
1236
1452
|
}
|
|
1237
1453
|
});
|
|
1238
1454
|
}
|
|
1239
1455
|
}
|
|
1240
|
-
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
1241
1456
|
hostRef.$hostElement$ = hostElm;
|
|
1242
1457
|
endHydrate();
|
|
1243
1458
|
};
|
|
@@ -1269,7 +1484,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
1269
1484
|
if (!parentVNode.$children$) {
|
|
1270
1485
|
parentVNode.$children$ = [];
|
|
1271
1486
|
}
|
|
1272
|
-
if (BUILD.scoped && scopeId2) {
|
|
1487
|
+
if (BUILD.scoped && scopeId2 && childIdSplt[0] === hostId) {
|
|
1273
1488
|
node["s-si"] = scopeId2;
|
|
1274
1489
|
childVNode.$attrs$.class += " " + scopeId2;
|
|
1275
1490
|
}
|
|
@@ -1398,10 +1613,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
1398
1613
|
vnode.$elm$ = node;
|
|
1399
1614
|
vnode.$index$ = "0";
|
|
1400
1615
|
parentVNode.$children$ = [vnode];
|
|
1401
|
-
} else {
|
|
1402
|
-
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1403
|
-
node.remove();
|
|
1404
|
-
}
|
|
1405
1616
|
}
|
|
1406
1617
|
return parentVNode;
|
|
1407
1618
|
};
|
|
@@ -1457,10 +1668,10 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1457
1668
|
if (childVNode.$name$) {
|
|
1458
1669
|
childVNode.$elm$.setAttribute("name", slotName);
|
|
1459
1670
|
}
|
|
1460
|
-
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1461
|
-
parentVNode.$elm
|
|
1671
|
+
if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1672
|
+
internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
|
|
1462
1673
|
} else {
|
|
1463
|
-
node
|
|
1674
|
+
internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
|
|
1464
1675
|
}
|
|
1465
1676
|
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1466
1677
|
node.remove();
|
|
@@ -1475,8 +1686,8 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1475
1686
|
if (shouldMove) {
|
|
1476
1687
|
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1477
1688
|
}
|
|
1478
|
-
childRenderNodes.push(childVNode);
|
|
1479
1689
|
}
|
|
1690
|
+
childRenderNodes.push(childVNode);
|
|
1480
1691
|
slotNodes.push(childVNode);
|
|
1481
1692
|
if (!parentVNode.$children$) {
|
|
1482
1693
|
parentVNode.$children$ = [];
|
|
@@ -1484,13 +1695,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1484
1695
|
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1485
1696
|
}
|
|
1486
1697
|
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1698
|
+
var _a, _b;
|
|
1487
1699
|
let slottedNode = slotNode.nextSibling;
|
|
1488
1700
|
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1701
|
+
if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
|
|
1702
|
+
do {
|
|
1703
|
+
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 */))) {
|
|
1704
|
+
slottedNode["s-sn"] = slotName;
|
|
1705
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1706
|
+
}
|
|
1707
|
+
slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
|
|
1708
|
+
} while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
|
|
1494
1709
|
};
|
|
1495
1710
|
var findCorrespondingNode = (node, type) => {
|
|
1496
1711
|
let sibling = node;
|
|
@@ -1500,6 +1715,11 @@ var findCorrespondingNode = (node, type) => {
|
|
|
1500
1715
|
return sibling;
|
|
1501
1716
|
};
|
|
1502
1717
|
|
|
1718
|
+
// src/utils/regular-expression.ts
|
|
1719
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
1720
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1721
|
+
};
|
|
1722
|
+
|
|
1503
1723
|
// src/utils/shadow-css.ts
|
|
1504
1724
|
/**
|
|
1505
1725
|
* @license
|
|
@@ -1515,6 +1735,12 @@ var findCorrespondingNode = (node, type) => {
|
|
|
1515
1735
|
var safeSelector = (selector) => {
|
|
1516
1736
|
const placeholders = [];
|
|
1517
1737
|
let index = 0;
|
|
1738
|
+
selector = selector.replace(/(\[\s*part~=\s*("[^"]*"|'[^']*')\s*\])/g, (_, keep) => {
|
|
1739
|
+
const replaceBy = `__part-${index}__`;
|
|
1740
|
+
placeholders.push(keep);
|
|
1741
|
+
index++;
|
|
1742
|
+
return replaceBy;
|
|
1743
|
+
});
|
|
1518
1744
|
selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
|
|
1519
1745
|
const replaceBy = `__ph-${index}__`;
|
|
1520
1746
|
placeholders.push(keep);
|
|
@@ -1534,6 +1760,7 @@ var safeSelector = (selector) => {
|
|
|
1534
1760
|
return ss;
|
|
1535
1761
|
};
|
|
1536
1762
|
var restoreSafeSelector = (placeholders, content) => {
|
|
1763
|
+
content = content.replace(/__part-(\d+)__/g, (_, index) => placeholders[+index]);
|
|
1537
1764
|
return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
|
|
1538
1765
|
};
|
|
1539
1766
|
var _polyfillHost = "-shadowcsshost";
|
|
@@ -1546,12 +1773,18 @@ var _cssColonSlottedRe = new RegExp("(" + _polyfillSlotted + _parenSuffix, "gim"
|
|
|
1546
1773
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
1547
1774
|
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
1548
1775
|
var _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
|
|
1776
|
+
var _safePartRe = /__part-(\d+)__/g;
|
|
1549
1777
|
var _selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$";
|
|
1550
1778
|
var _polyfillHostRe = /-shadowcsshost/gim;
|
|
1551
|
-
var createSupportsRuleRe = (selector) =>
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1779
|
+
var createSupportsRuleRe = (selector) => {
|
|
1780
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1781
|
+
return new RegExp(
|
|
1782
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
1783
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
1784
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
1785
|
+
"g"
|
|
1786
|
+
);
|
|
1787
|
+
};
|
|
1555
1788
|
var _commentRe = /\/\*\s*[\s\S]*?\*\//g;
|
|
1556
1789
|
var stripComments = (input) => {
|
|
1557
1790
|
return input.replace(_commentRe, "");
|
|
@@ -1623,7 +1856,19 @@ var escapeBlocks = (input) => {
|
|
|
1623
1856
|
return strEscapedBlocks;
|
|
1624
1857
|
};
|
|
1625
1858
|
var insertPolyfillHostInCssText = (cssText) => {
|
|
1859
|
+
const supportsBlocks = [];
|
|
1860
|
+
cssText = cssText.replace(/@supports\s+selector\s*\(\s*([^)]*)\s*\)/g, (_, selectorContent) => {
|
|
1861
|
+
const placeholder = `__supports_${supportsBlocks.length}__`;
|
|
1862
|
+
supportsBlocks.push(selectorContent);
|
|
1863
|
+
return `@supports selector(${placeholder})`;
|
|
1864
|
+
});
|
|
1865
|
+
const _colonSlottedRe = createSupportsRuleRe("::slotted");
|
|
1866
|
+
const _colonHostRe = createSupportsRuleRe(":host");
|
|
1867
|
+
const _colonHostContextRe = createSupportsRuleRe(":host-context");
|
|
1626
1868
|
cssText = cssText.replace(_colonHostContextRe, `$1${_polyfillHostContext}`).replace(_colonHostRe, `$1${_polyfillHost}`).replace(_colonSlottedRe, `$1${_polyfillSlotted}`);
|
|
1869
|
+
supportsBlocks.forEach((originalSelector, index) => {
|
|
1870
|
+
cssText = cssText.replace(`__supports_${index}__`, originalSelector);
|
|
1871
|
+
});
|
|
1627
1872
|
return cssText;
|
|
1628
1873
|
};
|
|
1629
1874
|
var convertColonRule = (cssText, regExp, partReplacer) => {
|
|
@@ -1743,7 +1988,7 @@ var applyStrictSelectorScope = (selector, scopeSelector2, hostSelector) => {
|
|
|
1743
1988
|
let scopedSelector = "";
|
|
1744
1989
|
let startIndex = 0;
|
|
1745
1990
|
let res;
|
|
1746
|
-
const sep = /( |>|\+|~(?!=))\s*/g;
|
|
1991
|
+
const sep = /( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g;
|
|
1747
1992
|
const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
|
|
1748
1993
|
let shouldScope = !hasHost;
|
|
1749
1994
|
while ((res = sep.exec(selector)) !== null) {
|
|
@@ -1755,7 +2000,7 @@ var applyStrictSelectorScope = (selector, scopeSelector2, hostSelector) => {
|
|
|
1755
2000
|
startIndex = sep.lastIndex;
|
|
1756
2001
|
}
|
|
1757
2002
|
const part = selector.substring(startIndex);
|
|
1758
|
-
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
|
2003
|
+
shouldScope = !part.match(_safePartRe) && (shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1);
|
|
1759
2004
|
scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
|
|
1760
2005
|
return restoreSafeSelector(safeContent.placeholders, scopedSelector);
|
|
1761
2006
|
};
|
|
@@ -1812,13 +2057,43 @@ var scopeCssText = (cssText, scopeId2, hostScopeId, slotScopeId, commentOriginal
|
|
|
1812
2057
|
var replaceShadowCssHost = (cssText, hostScopeId) => {
|
|
1813
2058
|
return cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
|
|
1814
2059
|
};
|
|
2060
|
+
var expandPartSelectors = (cssText) => {
|
|
2061
|
+
const partSelectorRe = /([^\s,{][^,{]*?)::part\(\s*([^)]+?)\s*\)((?:[:.][^,{]*)*)/g;
|
|
2062
|
+
return processRules(cssText, (rule) => {
|
|
2063
|
+
if (rule.selector[0] === "@") {
|
|
2064
|
+
return rule;
|
|
2065
|
+
}
|
|
2066
|
+
const selectors = rule.selector.split(",").map((sel) => {
|
|
2067
|
+
const out = [sel.trim()];
|
|
2068
|
+
let m;
|
|
2069
|
+
while ((m = partSelectorRe.exec(sel)) !== null) {
|
|
2070
|
+
const before = m[1].trimEnd();
|
|
2071
|
+
const partNames = m[2].trim().split(/\s+/);
|
|
2072
|
+
const after = m[3] || "";
|
|
2073
|
+
const partAttr = partNames.flatMap((p) => {
|
|
2074
|
+
if (!rule.selector.includes(`[part~="${p}"]`)) {
|
|
2075
|
+
return [`[part~="${p}"]`];
|
|
2076
|
+
}
|
|
2077
|
+
return [];
|
|
2078
|
+
}).join("");
|
|
2079
|
+
const expanded = `${before} ${partAttr}${after}`;
|
|
2080
|
+
if (!!partAttr && expanded !== sel.trim()) {
|
|
2081
|
+
out.push(expanded);
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
return out.join(", ");
|
|
2085
|
+
});
|
|
2086
|
+
rule.selector = selectors.join(", ");
|
|
2087
|
+
return rule;
|
|
2088
|
+
});
|
|
2089
|
+
};
|
|
1815
2090
|
var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
1816
2091
|
const hostScopeId = scopeId2 + "-h";
|
|
1817
2092
|
const slotScopeId = scopeId2 + "-s";
|
|
1818
2093
|
const commentsWithHash = extractCommentsWithHash(cssText);
|
|
1819
2094
|
cssText = stripComments(cssText);
|
|
1820
2095
|
const orgSelectors = [];
|
|
1821
|
-
|
|
2096
|
+
{
|
|
1822
2097
|
const processCommentedSelector = (rule) => {
|
|
1823
2098
|
const placeholder = `/*!@___${orgSelectors.length}___*/`;
|
|
1824
2099
|
const comment = `/*!@${rule.selector}*/`;
|
|
@@ -1838,29 +2113,179 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
1838
2113
|
}
|
|
1839
2114
|
const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId);
|
|
1840
2115
|
cssText = [scoped.cssText, ...commentsWithHash].join("\n");
|
|
1841
|
-
|
|
2116
|
+
{
|
|
1842
2117
|
orgSelectors.forEach(({ placeholder, comment }) => {
|
|
1843
2118
|
cssText = cssText.replace(placeholder, comment);
|
|
1844
2119
|
});
|
|
1845
2120
|
}
|
|
1846
2121
|
scoped.slottedSelectors.forEach((slottedSelector) => {
|
|
1847
|
-
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), "g");
|
|
2122
|
+
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector) + "(?=\\s*[,{]|$)", "g");
|
|
1848
2123
|
cssText = cssText.replace(regex, slottedSelector.updatedSelector);
|
|
1849
2124
|
});
|
|
2125
|
+
cssText = expandPartSelectors(cssText);
|
|
1850
2126
|
return cssText;
|
|
1851
2127
|
};
|
|
1852
2128
|
|
|
1853
2129
|
// src/runtime/mode.ts
|
|
1854
2130
|
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|
|
1855
2131
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
1856
|
-
var getMode = (ref) =>
|
|
1857
|
-
var
|
|
2132
|
+
var getMode = (ref) => {
|
|
2133
|
+
var _a;
|
|
2134
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$modeName$;
|
|
2135
|
+
};
|
|
2136
|
+
|
|
2137
|
+
// src/runtime/normalize-watchers.ts
|
|
2138
|
+
var normalizeWatchers = (raw) => {
|
|
2139
|
+
if (!raw) return void 0;
|
|
2140
|
+
const keys = Object.keys(raw);
|
|
2141
|
+
if (keys.length === 0) return void 0;
|
|
2142
|
+
let hasLegacy = false;
|
|
2143
|
+
for (const propName of keys) {
|
|
2144
|
+
if (hasLegacy) break;
|
|
2145
|
+
for (const h2 of raw[propName]) {
|
|
2146
|
+
if (typeof h2 === "string") {
|
|
2147
|
+
hasLegacy = true;
|
|
2148
|
+
break;
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
if (!hasLegacy) return raw;
|
|
2153
|
+
const out = {};
|
|
2154
|
+
for (const propName of keys) {
|
|
2155
|
+
out[propName] = raw[propName].map(
|
|
2156
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
2157
|
+
);
|
|
2158
|
+
}
|
|
2159
|
+
return out;
|
|
2160
|
+
};
|
|
2161
|
+
|
|
2162
|
+
// src/utils/remote-value.ts
|
|
2163
|
+
var RemoteValue = class _RemoteValue {
|
|
2164
|
+
/**
|
|
2165
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
2166
|
+
*
|
|
2167
|
+
* @param serialized The serialized LocalValue object
|
|
2168
|
+
* @returns The original JavaScript value/object
|
|
2169
|
+
*/
|
|
2170
|
+
static fromLocalValue(serialized) {
|
|
2171
|
+
const type = serialized[TYPE_CONSTANT];
|
|
2172
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
2173
|
+
switch (type) {
|
|
2174
|
+
case "string" /* String */:
|
|
2175
|
+
return value;
|
|
2176
|
+
case "boolean" /* Boolean */:
|
|
2177
|
+
return value;
|
|
2178
|
+
case "bigint" /* BigInt */:
|
|
2179
|
+
return BigInt(value);
|
|
2180
|
+
case "undefined" /* Undefined */:
|
|
2181
|
+
return void 0;
|
|
2182
|
+
case "null" /* Null */:
|
|
2183
|
+
return null;
|
|
2184
|
+
case "number" /* Number */:
|
|
2185
|
+
if (value === "NaN") return NaN;
|
|
2186
|
+
if (value === "-0") return -0;
|
|
2187
|
+
if (value === "Infinity") return Infinity;
|
|
2188
|
+
if (value === "-Infinity") return -Infinity;
|
|
2189
|
+
return value;
|
|
2190
|
+
case "array" /* Array */:
|
|
2191
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
2192
|
+
case "date" /* Date */:
|
|
2193
|
+
return new Date(value);
|
|
2194
|
+
case "map" /* Map */:
|
|
2195
|
+
const map = /* @__PURE__ */ new Map();
|
|
2196
|
+
for (const [key, val] of value) {
|
|
2197
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
2198
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
2199
|
+
map.set(deserializedKey, deserializedValue);
|
|
2200
|
+
}
|
|
2201
|
+
return map;
|
|
2202
|
+
case "object" /* Object */:
|
|
2203
|
+
const obj = {};
|
|
2204
|
+
for (const [key, val] of value) {
|
|
2205
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
2206
|
+
}
|
|
2207
|
+
return obj;
|
|
2208
|
+
case "regexp" /* RegularExpression */:
|
|
2209
|
+
const { pattern, flags } = value;
|
|
2210
|
+
return new RegExp(pattern, flags);
|
|
2211
|
+
case "set" /* Set */:
|
|
2212
|
+
const set = /* @__PURE__ */ new Set();
|
|
2213
|
+
for (const item of value) {
|
|
2214
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
2215
|
+
}
|
|
2216
|
+
return set;
|
|
2217
|
+
case "symbol" /* Symbol */:
|
|
2218
|
+
return Symbol(value);
|
|
2219
|
+
default:
|
|
2220
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
/**
|
|
2224
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
2225
|
+
*
|
|
2226
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
2227
|
+
* @returns Array of deserialized JavaScript values
|
|
2228
|
+
*/
|
|
2229
|
+
static fromLocalValueArray(serializedValues) {
|
|
2230
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
2231
|
+
}
|
|
2232
|
+
/**
|
|
2233
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
2234
|
+
*
|
|
2235
|
+
* @param obj Object to verify
|
|
2236
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
2237
|
+
*/
|
|
2238
|
+
static isLocalValueObject(obj) {
|
|
2239
|
+
if (typeof obj !== "object" || obj === null) {
|
|
2240
|
+
return false;
|
|
2241
|
+
}
|
|
2242
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
2243
|
+
return false;
|
|
2244
|
+
}
|
|
2245
|
+
const type = obj[TYPE_CONSTANT];
|
|
2246
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
2247
|
+
if (!hasTypeProperty) {
|
|
2248
|
+
return false;
|
|
2249
|
+
}
|
|
2250
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
2251
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
2252
|
+
}
|
|
2253
|
+
return true;
|
|
2254
|
+
}
|
|
2255
|
+
};
|
|
2256
|
+
|
|
2257
|
+
// src/utils/serialize.ts
|
|
2258
|
+
function decodeBase64Unicode(base64) {
|
|
2259
|
+
const binary = atob(base64);
|
|
2260
|
+
const bytes = new Uint8Array(binary.length);
|
|
2261
|
+
for (let i2 = 0; i2 < binary.length; i2++) {
|
|
2262
|
+
bytes[i2] = binary.charCodeAt(i2);
|
|
2263
|
+
}
|
|
2264
|
+
return new TextDecoder().decode(bytes);
|
|
2265
|
+
}
|
|
2266
|
+
function deserializeProperty(value) {
|
|
2267
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
2268
|
+
return value;
|
|
2269
|
+
}
|
|
2270
|
+
return RemoteValue.fromLocalValue(JSON.parse(decodeBase64Unicode(value.slice(SERIALIZED_PREFIX.length))));
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
// src/runtime/parse-property-value.ts
|
|
2274
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2275
|
+
if ((BUILD.hydrateClientSide || BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
2276
|
+
propValue = deserializeProperty(propValue);
|
|
2277
|
+
return propValue;
|
|
2278
|
+
}
|
|
1858
2279
|
if (propValue != null && !isComplexType(propValue)) {
|
|
1859
2280
|
if (BUILD.propBoolean && propType & 4 /* Boolean */) {
|
|
1860
|
-
|
|
2281
|
+
if (BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
|
|
2282
|
+
return propValue === "" || !!propValue;
|
|
2283
|
+
} else {
|
|
2284
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
2285
|
+
}
|
|
1861
2286
|
}
|
|
1862
2287
|
if (BUILD.propNumber && propType & 2 /* Number */) {
|
|
1863
|
-
return parseFloat(propValue);
|
|
2288
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
1864
2289
|
}
|
|
1865
2290
|
if (BUILD.propString && propType & 1 /* String */) {
|
|
1866
2291
|
return String(propValue);
|
|
@@ -1869,7 +2294,10 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
1869
2294
|
}
|
|
1870
2295
|
return propValue;
|
|
1871
2296
|
};
|
|
1872
|
-
var getElement = (ref) =>
|
|
2297
|
+
var getElement = (ref) => {
|
|
2298
|
+
var _a;
|
|
2299
|
+
return BUILD.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
|
|
2300
|
+
};
|
|
1873
2301
|
|
|
1874
2302
|
// src/runtime/event-emitter.ts
|
|
1875
2303
|
var createEvent = (ref, name, flags) => {
|
|
@@ -1893,120 +2321,6 @@ var emitEvent = (elm, name, opts) => {
|
|
|
1893
2321
|
elm.dispatchEvent(ev);
|
|
1894
2322
|
return ev;
|
|
1895
2323
|
};
|
|
1896
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1897
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1898
|
-
let style = styles.get(scopeId2);
|
|
1899
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
1900
|
-
style = style || new CSSStyleSheet();
|
|
1901
|
-
if (typeof style === "string") {
|
|
1902
|
-
style = cssText;
|
|
1903
|
-
} else {
|
|
1904
|
-
style.replaceSync(cssText);
|
|
1905
|
-
}
|
|
1906
|
-
} else {
|
|
1907
|
-
style = cssText;
|
|
1908
|
-
}
|
|
1909
|
-
styles.set(scopeId2, style);
|
|
1910
|
-
};
|
|
1911
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1912
|
-
var _a;
|
|
1913
|
-
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
1914
|
-
const style = styles.get(scopeId2);
|
|
1915
|
-
if (!BUILD.attachStyles || !win.document) {
|
|
1916
|
-
return scopeId2;
|
|
1917
|
-
}
|
|
1918
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1919
|
-
if (style) {
|
|
1920
|
-
if (typeof style === "string") {
|
|
1921
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1922
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1923
|
-
let styleElm;
|
|
1924
|
-
if (!appliedStyles) {
|
|
1925
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1926
|
-
}
|
|
1927
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
1928
|
-
if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1929
|
-
styleElm.innerHTML = style;
|
|
1930
|
-
} else {
|
|
1931
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
1932
|
-
styleElm.innerHTML = style;
|
|
1933
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1934
|
-
if (nonce != null) {
|
|
1935
|
-
styleElm.setAttribute("nonce", nonce);
|
|
1936
|
-
}
|
|
1937
|
-
if ((BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
|
|
1938
|
-
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
1939
|
-
}
|
|
1940
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1941
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
1942
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1943
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1944
|
-
styleContainerNode.insertBefore(
|
|
1945
|
-
styleElm,
|
|
1946
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1947
|
-
);
|
|
1948
|
-
} else if ("host" in styleContainerNode) {
|
|
1949
|
-
if (supportsConstructableStylesheets) {
|
|
1950
|
-
const stylesheet = new CSSStyleSheet();
|
|
1951
|
-
stylesheet.replaceSync(style);
|
|
1952
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1953
|
-
} else {
|
|
1954
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1955
|
-
if (existingStyleContainer) {
|
|
1956
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1957
|
-
} else {
|
|
1958
|
-
styleContainerNode.prepend(styleElm);
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
} else {
|
|
1962
|
-
styleContainerNode.append(styleElm);
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1966
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1970
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1971
|
-
}
|
|
1972
|
-
if (appliedStyles) {
|
|
1973
|
-
appliedStyles.add(scopeId2);
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
} else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1977
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1980
|
-
return scopeId2;
|
|
1981
|
-
};
|
|
1982
|
-
var attachStyles = (hostRef) => {
|
|
1983
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1984
|
-
const elm = hostRef.$hostElement$;
|
|
1985
|
-
const flags = cmpMeta.$flags$;
|
|
1986
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1987
|
-
const scopeId2 = addStyle(
|
|
1988
|
-
BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1989
|
-
cmpMeta,
|
|
1990
|
-
hostRef.$modeName$
|
|
1991
|
-
);
|
|
1992
|
-
if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
1993
|
-
elm["s-sc"] = scopeId2;
|
|
1994
|
-
elm.classList.add(scopeId2 + "-h");
|
|
1995
|
-
}
|
|
1996
|
-
endAttachStyles();
|
|
1997
|
-
};
|
|
1998
|
-
var getScopeId = (cmp, mode) => "sc-" + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
1999
|
-
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
2000
|
-
var hydrateScopedToShadow = () => {
|
|
2001
|
-
if (!win.document) {
|
|
2002
|
-
return;
|
|
2003
|
-
}
|
|
2004
|
-
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2005
|
-
let i2 = 0;
|
|
2006
|
-
for (; i2 < styles2.length; i2++) {
|
|
2007
|
-
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
2008
|
-
}
|
|
2009
|
-
};
|
|
2010
2324
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
2011
2325
|
if (oldValue === newValue) {
|
|
2012
2326
|
return;
|
|
@@ -2017,12 +2331,13 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2017
2331
|
const classList = elm.classList;
|
|
2018
2332
|
const oldClasses = parseClassList(oldValue);
|
|
2019
2333
|
let newClasses = parseClassList(newValue);
|
|
2020
|
-
if (BUILD.hydrateClientSide && elm["s-si"] && initialRender) {
|
|
2021
|
-
|
|
2334
|
+
if (BUILD.hydrateClientSide && (elm["s-si"] || elm["s-sc"]) && initialRender) {
|
|
2335
|
+
const scopeId2 = elm["s-sc"] || elm["s-si"];
|
|
2336
|
+
newClasses.push(scopeId2);
|
|
2022
2337
|
oldClasses.forEach((c) => {
|
|
2023
|
-
if (c.startsWith(
|
|
2338
|
+
if (c.startsWith(scopeId2)) newClasses.push(c);
|
|
2024
2339
|
});
|
|
2025
|
-
newClasses = [...new Set(newClasses)];
|
|
2340
|
+
newClasses = [...new Set(newClasses)].filter((c) => c);
|
|
2026
2341
|
classList.add(...newClasses);
|
|
2027
2342
|
} else {
|
|
2028
2343
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
@@ -2051,7 +2366,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2051
2366
|
}
|
|
2052
2367
|
} else if (BUILD.vdomKey && memberName === "key") ; else if (BUILD.vdomRef && memberName === "ref") {
|
|
2053
2368
|
if (newValue) {
|
|
2054
|
-
newValue
|
|
2369
|
+
queueRefAttachment(newValue, elm);
|
|
2055
2370
|
}
|
|
2056
2371
|
} else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2057
2372
|
if (memberName[2] === "-") {
|
|
@@ -2071,6 +2386,36 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2071
2386
|
plt.ael(elm, memberName, newValue, capture);
|
|
2072
2387
|
}
|
|
2073
2388
|
}
|
|
2389
|
+
} else if (BUILD.vdomPropOrAttr && memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
2390
|
+
const propName = memberName.slice(5);
|
|
2391
|
+
let attrName;
|
|
2392
|
+
if (BUILD.member) {
|
|
2393
|
+
const hostRef = getHostRef(elm);
|
|
2394
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
2395
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
2396
|
+
if (memberMeta && memberMeta[1]) {
|
|
2397
|
+
attrName = memberMeta[1];
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
if (!attrName) {
|
|
2402
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2403
|
+
}
|
|
2404
|
+
if (newValue == null || newValue === false) {
|
|
2405
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
2406
|
+
elm.removeAttribute(attrName);
|
|
2407
|
+
}
|
|
2408
|
+
} else {
|
|
2409
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
2410
|
+
}
|
|
2411
|
+
return;
|
|
2412
|
+
} else if (BUILD.vdomPropOrAttr && memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
2413
|
+
const propName = memberName.slice(5);
|
|
2414
|
+
try {
|
|
2415
|
+
elm[propName] = newValue;
|
|
2416
|
+
} catch (e) {
|
|
2417
|
+
}
|
|
2418
|
+
return;
|
|
2074
2419
|
} else if (BUILD.vdomPropOrAttr) {
|
|
2075
2420
|
const isComplex = isComplexType(newValue);
|
|
2076
2421
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
@@ -2079,7 +2424,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2079
2424
|
const n = newValue == null ? "" : newValue;
|
|
2080
2425
|
if (memberName === "list") {
|
|
2081
2426
|
isProp = false;
|
|
2082
|
-
} else if (oldValue == null || elm[memberName]
|
|
2427
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
2083
2428
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2084
2429
|
elm[memberName] = n;
|
|
2085
2430
|
} else {
|
|
@@ -2100,7 +2445,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2100
2445
|
}
|
|
2101
2446
|
}
|
|
2102
2447
|
if (newValue == null || newValue === false) {
|
|
2103
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
2448
|
+
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
2104
2449
|
if (BUILD.vdomXlink && xlink) {
|
|
2105
2450
|
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
2106
2451
|
} else {
|
|
@@ -2117,6 +2462,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2117
2462
|
}
|
|
2118
2463
|
}
|
|
2119
2464
|
};
|
|
2465
|
+
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
2466
|
+
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
2120
2467
|
var parseClassListRegex = /\s/;
|
|
2121
2468
|
var parseClassList = (value) => {
|
|
2122
2469
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
@@ -2180,6 +2527,8 @@ var useNativeShadowDom = false;
|
|
|
2180
2527
|
var checkSlotFallbackVisibility = false;
|
|
2181
2528
|
var checkSlotRelocate = false;
|
|
2182
2529
|
var isSvgMode = false;
|
|
2530
|
+
var refCallbacksToRemove = [];
|
|
2531
|
+
var refCallbacksToAttach = [];
|
|
2183
2532
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2184
2533
|
var _a;
|
|
2185
2534
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2207,7 +2556,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2207
2556
|
`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`
|
|
2208
2557
|
);
|
|
2209
2558
|
}
|
|
2210
|
-
if (BUILD.vdomText && newVNode2.$text$
|
|
2559
|
+
if (BUILD.vdomText && newVNode2.$text$ != null) {
|
|
2211
2560
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2212
2561
|
} else if (BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2213
2562
|
elm = newVNode2.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : win.document.createTextNode("");
|
|
@@ -2219,9 +2568,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2219
2568
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2220
2569
|
}
|
|
2221
2570
|
if (!win.document) {
|
|
2222
|
-
throw new Error(
|
|
2223
|
-
"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."
|
|
2224
|
-
);
|
|
2571
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
2225
2572
|
}
|
|
2226
2573
|
elm = newVNode2.$elm$ = BUILD.svg ? win.document.createElementNS(
|
|
2227
2574
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
@@ -2235,14 +2582,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2235
2582
|
if (BUILD.vdomAttribute) {
|
|
2236
2583
|
updateElement(null, newVNode2, isSvgMode);
|
|
2237
2584
|
}
|
|
2238
|
-
if (BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
2585
|
+
if ((BUILD.scoped || BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
2239
2586
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
2240
2587
|
}
|
|
2241
2588
|
if (newVNode2.$children$) {
|
|
2589
|
+
const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
|
|
2242
2590
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
2243
2591
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
2244
2592
|
if (childNode) {
|
|
2245
|
-
|
|
2593
|
+
appendTarget.appendChild(childNode);
|
|
2246
2594
|
}
|
|
2247
2595
|
}
|
|
2248
2596
|
}
|
|
@@ -2264,13 +2612,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2264
2612
|
patchSlotNode(elm);
|
|
2265
2613
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2266
2614
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2267
|
-
|
|
2268
|
-
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2269
|
-
} else {
|
|
2270
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2271
|
-
}
|
|
2615
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2272
2616
|
}
|
|
2273
|
-
if (BUILD.scoped) {
|
|
2617
|
+
if (BUILD.scoped || BUILD.hydrateServerSide && 128 /* shadowNeedsScopedCss */) {
|
|
2274
2618
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
2275
2619
|
}
|
|
2276
2620
|
}
|
|
@@ -2295,12 +2639,12 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
2295
2639
|
}
|
|
2296
2640
|
}
|
|
2297
2641
|
}
|
|
2298
|
-
plt.$flags$ &=
|
|
2642
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2299
2643
|
};
|
|
2300
2644
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2301
2645
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2302
2646
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
2303
|
-
if (parentElm["s-sr"]
|
|
2647
|
+
if (parentElm["s-sr"]) {
|
|
2304
2648
|
let node = parentElm;
|
|
2305
2649
|
while (node = node.nextSibling) {
|
|
2306
2650
|
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
@@ -2321,7 +2665,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
2321
2665
|
putBackInOriginalLocation(childNode, recursive);
|
|
2322
2666
|
}
|
|
2323
2667
|
}
|
|
2324
|
-
plt.$flags$ &=
|
|
2668
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2325
2669
|
};
|
|
2326
2670
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
2327
2671
|
let containerElm = BUILD.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
@@ -2329,6 +2673,9 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
2329
2673
|
if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
2330
2674
|
containerElm = containerElm.shadowRoot;
|
|
2331
2675
|
}
|
|
2676
|
+
if (parentVNode.$tag$ === "template") {
|
|
2677
|
+
containerElm = containerElm.content;
|
|
2678
|
+
}
|
|
2332
2679
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
2333
2680
|
if (vnodes[startIdx]) {
|
|
2334
2681
|
childNode = createElm(null, parentVNode, startIdx);
|
|
@@ -2372,6 +2719,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2372
2719
|
let newEndVnode = newCh[newEndIdx];
|
|
2373
2720
|
let node;
|
|
2374
2721
|
let elmToMove;
|
|
2722
|
+
const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
|
|
2375
2723
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
2376
2724
|
if (oldStartVnode == null) {
|
|
2377
2725
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
@@ -2394,7 +2742,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2394
2742
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
2395
2743
|
}
|
|
2396
2744
|
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
2397
|
-
insertBefore(
|
|
2745
|
+
insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
2398
2746
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
2399
2747
|
newEndVnode = newCh[--newEndIdx];
|
|
2400
2748
|
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
@@ -2402,7 +2750,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2402
2750
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
2403
2751
|
}
|
|
2404
2752
|
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
2405
|
-
insertBefore(
|
|
2753
|
+
insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
2406
2754
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
2407
2755
|
newStartVnode = newCh[++newStartIdx];
|
|
2408
2756
|
} else {
|
|
@@ -2478,13 +2826,13 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2478
2826
|
const tag = newVNode2.$tag$;
|
|
2479
2827
|
const text = newVNode2.$text$;
|
|
2480
2828
|
let defaultHolder;
|
|
2481
|
-
if (!BUILD.vdomText || text
|
|
2829
|
+
if (!BUILD.vdomText || text == null) {
|
|
2482
2830
|
if (BUILD.svg) {
|
|
2483
2831
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
2484
2832
|
}
|
|
2485
2833
|
if (BUILD.vdomAttribute || BUILD.reflect) {
|
|
2486
2834
|
if (BUILD.slot && tag === "slot" && !useNativeShadowDom) {
|
|
2487
|
-
if (
|
|
2835
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
2488
2836
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
2489
2837
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
2490
2838
|
}
|
|
@@ -2503,6 +2851,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2503
2851
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
2504
2852
|
) {
|
|
2505
2853
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
2854
|
+
} else if (BUILD.hydrateClientSide && isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
|
|
2855
|
+
newVNode2.$children$ = oldChildren;
|
|
2506
2856
|
}
|
|
2507
2857
|
if (BUILD.svg && isSvgMode && tag === "svg") {
|
|
2508
2858
|
isSvgMode = false;
|
|
@@ -2525,7 +2875,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2525
2875
|
const slotName = childNode["s-sn"];
|
|
2526
2876
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2527
2877
|
node = hostContentNodes[j];
|
|
2528
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] &&
|
|
2878
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
|
|
2879
|
+
// `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
|
|
2880
|
+
// would trivially "match" on every re-render and force pointless re-insertion.
|
|
2881
|
+
(!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
|
|
2529
2882
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2530
2883
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2531
2884
|
checkSlotFallbackVisibility = true;
|
|
@@ -2565,23 +2918,40 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2565
2918
|
};
|
|
2566
2919
|
var nullifyVNodeRefs = (vNode) => {
|
|
2567
2920
|
if (BUILD.vdomRef) {
|
|
2568
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
2921
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
2922
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
2923
|
+
}
|
|
2569
2924
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2570
2925
|
}
|
|
2571
2926
|
};
|
|
2572
|
-
var
|
|
2573
|
-
if (BUILD.
|
|
2574
|
-
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
|
|
2927
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
2928
|
+
if (BUILD.vdomRef) {
|
|
2929
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
2930
|
+
}
|
|
2931
|
+
};
|
|
2932
|
+
var flushQueuedRefCallbacks = () => {
|
|
2933
|
+
if (BUILD.vdomRef) {
|
|
2934
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
2935
|
+
refCallbacksToRemove.length = 0;
|
|
2936
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
2937
|
+
refCallbacksToAttach.length = 0;
|
|
2938
|
+
}
|
|
2939
|
+
};
|
|
2940
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
2941
|
+
if (BUILD.slotRelocation) {
|
|
2942
|
+
if (BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
2943
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
2944
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
2945
|
+
if (BUILD.experimentalSlotFixes && parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
2946
|
+
patchParentNode(newNode);
|
|
2947
|
+
}
|
|
2948
|
+
parent.insertBefore(newNode, reference);
|
|
2949
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
2950
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
2951
|
+
return newNode;
|
|
2578
2952
|
}
|
|
2579
|
-
parent.insertBefore(newNode, reference);
|
|
2580
|
-
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
2581
|
-
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
2582
|
-
return newNode;
|
|
2583
2953
|
}
|
|
2584
|
-
if (BUILD.
|
|
2954
|
+
if (BUILD.slotRelocation && (parent == null ? void 0 : parent.__insertBefore)) {
|
|
2585
2955
|
return parent.__insertBefore(newNode, reference);
|
|
2586
2956
|
} else {
|
|
2587
2957
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -2613,7 +2983,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2613
2983
|
const hostElm = hostRef.$hostElement$;
|
|
2614
2984
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2615
2985
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2616
|
-
const
|
|
2986
|
+
const isHostElement = isHost(renderFnResults);
|
|
2987
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
2617
2988
|
hostTagName = hostElm.tagName;
|
|
2618
2989
|
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
|
|
2619
2990
|
throw new Error(`The <Host> must be the single root component.
|
|
@@ -2631,9 +3002,13 @@ render() {
|
|
|
2631
3002
|
}
|
|
2632
3003
|
if (BUILD.reflect && cmpMeta.$attrsToReflect$) {
|
|
2633
3004
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
2634
|
-
cmpMeta.$attrsToReflect$.
|
|
2635
|
-
(
|
|
2636
|
-
|
|
3005
|
+
cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
|
|
3006
|
+
if (BUILD.serializer && hostRef.$serializerValues$.has(propName)) {
|
|
3007
|
+
rootVnode.$attrs$[attribute] = hostRef.$serializerValues$.get(propName);
|
|
3008
|
+
} else {
|
|
3009
|
+
rootVnode.$attrs$[attribute] = hostElm[propName];
|
|
3010
|
+
}
|
|
3011
|
+
});
|
|
2637
3012
|
}
|
|
2638
3013
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
2639
3014
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
@@ -2664,19 +3039,27 @@ render() {
|
|
|
2664
3039
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2665
3040
|
const orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
2666
3041
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2667
|
-
insertBefore(
|
|
3042
|
+
insertBefore(
|
|
3043
|
+
nodeToRelocate.parentNode,
|
|
3044
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
3045
|
+
nodeToRelocate,
|
|
3046
|
+
isInitialLoad
|
|
3047
|
+
);
|
|
2668
3048
|
}
|
|
2669
3049
|
}
|
|
2670
3050
|
for (const relocateData of relocateNodes) {
|
|
2671
3051
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
2672
3052
|
const slotRefNode = relocateData.$slotRefNode$;
|
|
3053
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && isInitialLoad) {
|
|
3054
|
+
nodeToRelocate["s-ih"] = (_a = nodeToRelocate.hidden) != null ? _a : false;
|
|
3055
|
+
}
|
|
2673
3056
|
if (slotRefNode) {
|
|
2674
3057
|
const parentNodeRef = slotRefNode.parentNode;
|
|
2675
3058
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
2676
|
-
if (!BUILD.hydrateServerSide &&
|
|
2677
|
-
let orgLocationNode = (
|
|
3059
|
+
if (!BUILD.hydrateServerSide && insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
3060
|
+
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
2678
3061
|
while (orgLocationNode) {
|
|
2679
|
-
let refNode = (
|
|
3062
|
+
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
2680
3063
|
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
2681
3064
|
refNode = refNode.nextSibling;
|
|
2682
3065
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
@@ -2694,44 +3077,55 @@ render() {
|
|
|
2694
3077
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2695
3078
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
2696
3079
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
2697
|
-
|
|
2698
|
-
|
|
3080
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
3081
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
3082
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
3083
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
3084
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
3085
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
3086
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
3087
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
3088
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
3089
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
3090
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
2699
3091
|
}
|
|
2700
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
2701
3092
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
2702
|
-
nodeToRelocate.hidden = (
|
|
3093
|
+
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
2703
3094
|
}
|
|
2704
3095
|
}
|
|
2705
3096
|
}
|
|
2706
3097
|
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
2707
|
-
} else {
|
|
2708
|
-
|
|
2709
|
-
if (isInitialLoad) {
|
|
2710
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
2711
|
-
}
|
|
2712
|
-
nodeToRelocate.hidden = true;
|
|
2713
|
-
}
|
|
3098
|
+
} else if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
3099
|
+
nodeToRelocate.hidden = true;
|
|
2714
3100
|
}
|
|
2715
3101
|
}
|
|
2716
3102
|
}
|
|
2717
3103
|
if (checkSlotFallbackVisibility) {
|
|
2718
3104
|
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
2719
3105
|
}
|
|
2720
|
-
plt.$flags$ &=
|
|
3106
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2721
3107
|
relocateNodes.length = 0;
|
|
2722
3108
|
}
|
|
2723
|
-
if (BUILD.
|
|
3109
|
+
if (BUILD.slotRelocation && !useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
2724
3110
|
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
2725
3111
|
for (const childNode of children) {
|
|
2726
3112
|
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
2727
3113
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
2728
3114
|
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
2729
3115
|
}
|
|
2730
|
-
childNode.
|
|
3116
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
3117
|
+
childNode.hidden = true;
|
|
3118
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
3119
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
3120
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
3121
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
3122
|
+
childNode.parentNode.removeChild(childNode);
|
|
3123
|
+
}
|
|
2731
3124
|
}
|
|
2732
3125
|
}
|
|
2733
3126
|
}
|
|
2734
3127
|
contentRef = void 0;
|
|
3128
|
+
flushQueuedRefCallbacks();
|
|
2735
3129
|
};
|
|
2736
3130
|
var slotReferenceDebugNode = (slotVNode) => {
|
|
2737
3131
|
var _a;
|
|
@@ -2760,7 +3154,7 @@ var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
2760
3154
|
}
|
|
2761
3155
|
};
|
|
2762
3156
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
2763
|
-
if (BUILD.
|
|
3157
|
+
if (BUILD.updatable) {
|
|
2764
3158
|
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
2765
3159
|
}
|
|
2766
3160
|
if (BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
@@ -2769,6 +3163,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
2769
3163
|
}
|
|
2770
3164
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
2771
3165
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
3166
|
+
if (isInitialLoad) {
|
|
3167
|
+
queueMicrotask(() => {
|
|
3168
|
+
dispatch();
|
|
3169
|
+
});
|
|
3170
|
+
return;
|
|
3171
|
+
}
|
|
2772
3172
|
return BUILD.taskQueue ? writeTask(dispatch) : dispatch();
|
|
2773
3173
|
};
|
|
2774
3174
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -2782,11 +3182,20 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2782
3182
|
}
|
|
2783
3183
|
let maybePromise;
|
|
2784
3184
|
if (isInitialLoad) {
|
|
2785
|
-
if (BUILD.lazyLoad
|
|
2786
|
-
hostRef.$
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
3185
|
+
if (BUILD.lazyLoad) {
|
|
3186
|
+
if (BUILD.slotRelocation && hostRef.$deferredConnectedCallback$) {
|
|
3187
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
3188
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
3189
|
+
}
|
|
3190
|
+
if (BUILD.hostListener) {
|
|
3191
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
3192
|
+
if (hostRef.$queuedListeners$) {
|
|
3193
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
3194
|
+
hostRef.$queuedListeners$ = void 0;
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
if (hostRef.$fetchedCbList$.length) {
|
|
3198
|
+
hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
|
|
2790
3199
|
}
|
|
2791
3200
|
}
|
|
2792
3201
|
emitLifecycleEvent(elm, "componentWillLoad");
|
|
@@ -2800,8 +3209,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2800
3209
|
endSchedule();
|
|
2801
3210
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
2802
3211
|
};
|
|
2803
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
2804
|
-
console.error(
|
|
3212
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
3213
|
+
console.error(err);
|
|
2805
3214
|
fn();
|
|
2806
3215
|
}) : fn();
|
|
2807
3216
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
@@ -2815,7 +3224,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
2815
3224
|
}
|
|
2816
3225
|
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
|
2817
3226
|
if (BUILD.isDev) {
|
|
2818
|
-
hostRef.$flags$ |=
|
|
3227
|
+
hostRef.$flags$ |= 2048 /* devOnRender */;
|
|
2819
3228
|
}
|
|
2820
3229
|
if (BUILD.hydrateServerSide) {
|
|
2821
3230
|
await callRender(hostRef, instance, elm, isInitialLoad);
|
|
@@ -2824,7 +3233,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
2824
3233
|
}
|
|
2825
3234
|
if (BUILD.isDev) {
|
|
2826
3235
|
hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
|
|
2827
|
-
hostRef.$flags$ &=
|
|
3236
|
+
hostRef.$flags$ &= -2049 /* devOnRender */;
|
|
2828
3237
|
}
|
|
2829
3238
|
if (BUILD.hydrateServerSide) {
|
|
2830
3239
|
try {
|
|
@@ -2852,7 +3261,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
2852
3261
|
if (childrenPromises.length === 0) {
|
|
2853
3262
|
postUpdate();
|
|
2854
3263
|
} else {
|
|
2855
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
3264
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
2856
3265
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
2857
3266
|
childrenPromises.length = 0;
|
|
2858
3267
|
}
|
|
@@ -2864,13 +3273,12 @@ var renderingRef = null;
|
|
|
2864
3273
|
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
2865
3274
|
const allRenderFn = BUILD.allRenderFn ? true : false;
|
|
2866
3275
|
const lazyLoad = BUILD.lazyLoad ? true : false;
|
|
2867
|
-
const taskQueue = BUILD.taskQueue ? true : false;
|
|
2868
3276
|
const updatable = BUILD.updatable ? true : false;
|
|
2869
3277
|
try {
|
|
2870
3278
|
renderingRef = instance;
|
|
2871
3279
|
instance = allRenderFn ? instance.render() : instance.render && instance.render();
|
|
2872
|
-
if (updatable
|
|
2873
|
-
hostRef.$flags$ &=
|
|
3280
|
+
if (updatable) {
|
|
3281
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
2874
3282
|
}
|
|
2875
3283
|
if (updatable || lazyLoad) {
|
|
2876
3284
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -2905,11 +3313,11 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2905
3313
|
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
2906
3314
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
2907
3315
|
if (BUILD.isDev) {
|
|
2908
|
-
hostRef.$flags$ |=
|
|
3316
|
+
hostRef.$flags$ |= 2048 /* devOnRender */;
|
|
2909
3317
|
}
|
|
2910
3318
|
safeCall(instance, "componentDidRender", void 0, elm);
|
|
2911
3319
|
if (BUILD.isDev) {
|
|
2912
|
-
hostRef.$flags$ &=
|
|
3320
|
+
hostRef.$flags$ &= -2049 /* devOnRender */;
|
|
2913
3321
|
}
|
|
2914
3322
|
emitLifecycleEvent(elm, "componentDidRender");
|
|
2915
3323
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
@@ -2918,11 +3326,11 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2918
3326
|
addHydratedFlag(elm);
|
|
2919
3327
|
}
|
|
2920
3328
|
if (BUILD.isDev) {
|
|
2921
|
-
hostRef.$flags$ |=
|
|
3329
|
+
hostRef.$flags$ |= 4096 /* devOnDidLoad */;
|
|
2922
3330
|
}
|
|
2923
3331
|
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
2924
3332
|
if (BUILD.isDev) {
|
|
2925
|
-
hostRef.$flags$ &=
|
|
3333
|
+
hostRef.$flags$ &= -4097 /* devOnDidLoad */;
|
|
2926
3334
|
}
|
|
2927
3335
|
emitLifecycleEvent(elm, "componentDidLoad");
|
|
2928
3336
|
endPostUpdate();
|
|
@@ -2934,11 +3342,11 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2934
3342
|
}
|
|
2935
3343
|
} else {
|
|
2936
3344
|
if (BUILD.isDev) {
|
|
2937
|
-
hostRef.$flags$ |=
|
|
3345
|
+
hostRef.$flags$ |= 2048 /* devOnRender */;
|
|
2938
3346
|
}
|
|
2939
3347
|
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
2940
3348
|
if (BUILD.isDev) {
|
|
2941
|
-
hostRef.$flags$ &=
|
|
3349
|
+
hostRef.$flags$ &= -2049 /* devOnRender */;
|
|
2942
3350
|
}
|
|
2943
3351
|
emitLifecycleEvent(elm, "componentDidUpdate");
|
|
2944
3352
|
endPostUpdate();
|
|
@@ -2954,13 +3362,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2954
3362
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
2955
3363
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
2956
3364
|
}
|
|
2957
|
-
hostRef.$flags$ &=
|
|
3365
|
+
hostRef.$flags$ &= -517;
|
|
2958
3366
|
}
|
|
2959
3367
|
};
|
|
2960
3368
|
var forceUpdate = (ref) => {
|
|
3369
|
+
var _a;
|
|
2961
3370
|
if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
|
|
2962
3371
|
const hostRef = getHostRef(ref);
|
|
2963
|
-
const isConnected = hostRef.$hostElement
|
|
3372
|
+
const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
|
|
2964
3373
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2965
3374
|
scheduleUpdate(hostRef, false);
|
|
2966
3375
|
}
|
|
@@ -2969,10 +3378,16 @@ var forceUpdate = (ref) => {
|
|
|
2969
3378
|
return false;
|
|
2970
3379
|
};
|
|
2971
3380
|
var appDidLoad = (who) => {
|
|
3381
|
+
var _a;
|
|
2972
3382
|
if (BUILD.asyncQueue) {
|
|
2973
3383
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2974
3384
|
}
|
|
2975
3385
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
3386
|
+
if (BUILD.hydrateClientSide) {
|
|
3387
|
+
if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
|
|
3388
|
+
plt.$orgLocNodes$.clear();
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
2976
3391
|
if (BUILD.profile && performance.measure) {
|
|
2977
3392
|
performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
|
|
2978
3393
|
}
|
|
@@ -3019,22 +3434,51 @@ var serverSideConnected = (elm) => {
|
|
|
3019
3434
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
3020
3435
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
3021
3436
|
const hostRef = getHostRef(ref);
|
|
3437
|
+
if (!hostRef) {
|
|
3438
|
+
return;
|
|
3439
|
+
}
|
|
3022
3440
|
if (BUILD.lazyLoad && !hostRef) {
|
|
3023
3441
|
throw new Error(
|
|
3024
3442
|
`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).`
|
|
3025
3443
|
);
|
|
3026
3444
|
}
|
|
3445
|
+
if (BUILD.serializer && hostRef.$serializerValues$.has(propName) && hostRef.$serializerValues$.get(propName) === newVal) {
|
|
3446
|
+
return;
|
|
3447
|
+
}
|
|
3027
3448
|
const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
|
|
3028
3449
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
3029
3450
|
const flags = hostRef.$flags$;
|
|
3030
3451
|
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3031
|
-
newVal = parsePropertyValue(
|
|
3452
|
+
newVal = parsePropertyValue(
|
|
3453
|
+
newVal,
|
|
3454
|
+
cmpMeta.$members$[propName][0],
|
|
3455
|
+
BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3456
|
+
);
|
|
3032
3457
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
3033
3458
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
3034
3459
|
if ((!BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
3035
3460
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
3461
|
+
if (BUILD.serializer && BUILD.reflect && cmpMeta.$attrsToReflect$) {
|
|
3462
|
+
if (cmpMeta.$serializers$ && cmpMeta.$serializers$[propName]) {
|
|
3463
|
+
const runSerializer = (inst) => {
|
|
3464
|
+
let attrVal = newVal;
|
|
3465
|
+
for (const serializer of cmpMeta.$serializers$[propName]) {
|
|
3466
|
+
const [[methodName]] = Object.entries(serializer);
|
|
3467
|
+
attrVal = inst[methodName](attrVal, propName);
|
|
3468
|
+
}
|
|
3469
|
+
hostRef.$serializerValues$.set(propName, attrVal);
|
|
3470
|
+
};
|
|
3471
|
+
if (instance) {
|
|
3472
|
+
runSerializer(instance);
|
|
3473
|
+
} else {
|
|
3474
|
+
hostRef.$fetchedCbList$.push(() => {
|
|
3475
|
+
runSerializer(hostRef.$lazyInstance$);
|
|
3476
|
+
});
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3036
3480
|
if (BUILD.isDev) {
|
|
3037
|
-
if (hostRef.$flags$ &
|
|
3481
|
+
if (hostRef.$flags$ & 2048 /* devOnRender */) {
|
|
3038
3482
|
consoleDevWarn(
|
|
3039
3483
|
`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
|
|
3040
3484
|
"\nElement",
|
|
@@ -3044,7 +3488,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3044
3488
|
"\nOld value",
|
|
3045
3489
|
oldVal
|
|
3046
3490
|
);
|
|
3047
|
-
} else if (hostRef.$flags$ &
|
|
3491
|
+
} else if (hostRef.$flags$ & 4096 /* devOnDidLoad */) {
|
|
3048
3492
|
consoleDevWarn(
|
|
3049
3493
|
`The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,
|
|
3050
3494
|
"\nElement",
|
|
@@ -3056,25 +3500,35 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3056
3500
|
);
|
|
3057
3501
|
}
|
|
3058
3502
|
}
|
|
3059
|
-
if (
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3503
|
+
if (BUILD.propChangeCallback && cmpMeta.$watchers$) {
|
|
3504
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
3505
|
+
if (watchMethods) {
|
|
3506
|
+
watchMethods.map((watcher) => {
|
|
3507
|
+
try {
|
|
3508
|
+
const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
|
|
3509
|
+
if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
|
|
3510
|
+
if (!instance) {
|
|
3511
|
+
hostRef.$fetchedCbList$.push(() => {
|
|
3512
|
+
hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
|
|
3513
|
+
});
|
|
3514
|
+
} else {
|
|
3515
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
3516
|
+
}
|
|
3068
3517
|
}
|
|
3069
|
-
})
|
|
3070
|
-
|
|
3071
|
-
}
|
|
3072
|
-
if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
3073
|
-
if (instance.componentShouldUpdate) {
|
|
3074
|
-
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
3075
|
-
return;
|
|
3518
|
+
} catch (e) {
|
|
3519
|
+
consoleError(e, elm);
|
|
3076
3520
|
}
|
|
3521
|
+
});
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
if (BUILD.updatable && flags & 2 /* hasRendered */) {
|
|
3525
|
+
if (instance.componentShouldUpdate) {
|
|
3526
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
3527
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3528
|
+
return;
|
|
3077
3529
|
}
|
|
3530
|
+
}
|
|
3531
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
3078
3532
|
scheduleUpdate(hostRef, false);
|
|
3079
3533
|
}
|
|
3080
3534
|
}
|
|
@@ -3082,6 +3536,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3082
3536
|
};
|
|
3083
3537
|
|
|
3084
3538
|
// src/runtime/proxy-component.ts
|
|
3539
|
+
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
3085
3540
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3086
3541
|
var _a, _b;
|
|
3087
3542
|
const prototype = Cstr.prototype;
|
|
@@ -3096,10 +3551,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3096
3551
|
const originalFormAssociatedCallback = prototype[cbName];
|
|
3097
3552
|
Object.defineProperty(prototype, cbName, {
|
|
3098
3553
|
value(...args) {
|
|
3554
|
+
var _a2;
|
|
3099
3555
|
const hostRef = getHostRef(this);
|
|
3100
|
-
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : this;
|
|
3556
|
+
const instance = BUILD.lazyLoad ? hostRef == null ? void 0 : hostRef.$lazyInstance$ : this;
|
|
3101
3557
|
if (!instance) {
|
|
3102
|
-
hostRef.$onReadyPromise
|
|
3558
|
+
(_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
|
|
3103
3559
|
const cb = asyncInstance[cbName];
|
|
3104
3560
|
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
3105
3561
|
});
|
|
@@ -3111,14 +3567,22 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3111
3567
|
});
|
|
3112
3568
|
});
|
|
3113
3569
|
}
|
|
3114
|
-
if (BUILD.member && cmpMeta.$members$ || BUILD.
|
|
3115
|
-
if (BUILD.
|
|
3116
|
-
cmpMeta.$watchers$
|
|
3570
|
+
if (BUILD.member && cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3571
|
+
if (BUILD.propChangeCallback) {
|
|
3572
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3573
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3574
|
+
}
|
|
3575
|
+
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3576
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
3577
|
+
}
|
|
3578
|
+
if (Cstr.serializers && !cmpMeta.$serializers$) {
|
|
3579
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3580
|
+
}
|
|
3117
3581
|
}
|
|
3118
3582
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3119
3583
|
members.map(([memberName, [memberFlags]]) => {
|
|
3120
3584
|
if ((BUILD.prop || BUILD.state) && (memberFlags & 31 /* Prop */ || (!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3121
|
-
const { get: origGetter, set: origSetter } =
|
|
3585
|
+
const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
|
|
3122
3586
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3123
3587
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3124
3588
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
@@ -3144,6 +3608,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3144
3608
|
Object.defineProperty(prototype, memberName, {
|
|
3145
3609
|
set(newValue) {
|
|
3146
3610
|
const ref = getHostRef(this);
|
|
3611
|
+
if (!ref) {
|
|
3612
|
+
return;
|
|
3613
|
+
}
|
|
3147
3614
|
if (BUILD.isDev) {
|
|
3148
3615
|
if (
|
|
3149
3616
|
// we are proxying the instance (not element)
|
|
@@ -3163,10 +3630,14 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3163
3630
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
3164
3631
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
3165
3632
|
newValue = ref.$instanceValues$.get(memberName);
|
|
3166
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3167
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
3168
3633
|
}
|
|
3169
|
-
origSetter.apply(this, [
|
|
3634
|
+
origSetter.apply(this, [
|
|
3635
|
+
parsePropertyValue(
|
|
3636
|
+
newValue,
|
|
3637
|
+
memberFlags,
|
|
3638
|
+
BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3639
|
+
)
|
|
3640
|
+
]);
|
|
3170
3641
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
3171
3642
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3172
3643
|
return;
|
|
@@ -3179,7 +3650,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3179
3650
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
3180
3651
|
setValue(this, memberName, newValue, cmpMeta);
|
|
3181
3652
|
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
3182
|
-
ref.$
|
|
3653
|
+
ref.$fetchedCbList$.push(() => {
|
|
3183
3654
|
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
3184
3655
|
ref.$lazyInstance$[memberName] = newValue;
|
|
3185
3656
|
}
|
|
@@ -3192,13 +3663,19 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3192
3663
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3193
3664
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3194
3665
|
}
|
|
3195
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
3666
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
3667
|
+
newValue,
|
|
3668
|
+
memberFlags,
|
|
3669
|
+
BUILD.formAssociated && !!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3670
|
+
);
|
|
3196
3671
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3197
3672
|
};
|
|
3198
3673
|
if (ref.$lazyInstance$) {
|
|
3199
3674
|
setterSetVal();
|
|
3200
3675
|
} else {
|
|
3201
|
-
ref.$
|
|
3676
|
+
ref.$fetchedCbList$.push(() => {
|
|
3677
|
+
setterSetVal();
|
|
3678
|
+
});
|
|
3202
3679
|
}
|
|
3203
3680
|
}
|
|
3204
3681
|
}
|
|
@@ -3222,30 +3699,68 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3222
3699
|
plt.jmp(() => {
|
|
3223
3700
|
var _a2;
|
|
3224
3701
|
const propName = attrNameToPropName.get(attrName);
|
|
3702
|
+
const hostRef = getHostRef(this);
|
|
3703
|
+
if (BUILD.serializer && hostRef.$serializerValues$.has(propName) && hostRef.$serializerValues$.get(propName) === newValue) {
|
|
3704
|
+
return;
|
|
3705
|
+
}
|
|
3225
3706
|
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
3226
3707
|
newValue = this[propName];
|
|
3227
3708
|
delete this[propName];
|
|
3709
|
+
}
|
|
3710
|
+
if (BUILD.deserializer && cmpMeta.$deserializers$ && cmpMeta.$deserializers$[propName]) {
|
|
3711
|
+
const setVal = (methodName, instance) => {
|
|
3712
|
+
const deserializeVal = instance == null ? void 0 : instance[methodName](newValue, propName);
|
|
3713
|
+
if (deserializeVal !== this[propName]) {
|
|
3714
|
+
this[propName] = deserializeVal;
|
|
3715
|
+
}
|
|
3716
|
+
};
|
|
3717
|
+
for (const deserializer of cmpMeta.$deserializers$[propName]) {
|
|
3718
|
+
const [[methodName]] = Object.entries(deserializer);
|
|
3719
|
+
if (BUILD.lazyLoad) {
|
|
3720
|
+
if (hostRef.$lazyInstance$) {
|
|
3721
|
+
setVal(methodName, hostRef.$lazyInstance$);
|
|
3722
|
+
} else {
|
|
3723
|
+
hostRef.$fetchedCbList$.push(() => {
|
|
3724
|
+
setVal(methodName, hostRef.$lazyInstance$);
|
|
3725
|
+
});
|
|
3726
|
+
}
|
|
3727
|
+
} else {
|
|
3728
|
+
setVal(methodName, this);
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
return;
|
|
3228
3732
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
3229
3733
|
this[propName] == newValue) {
|
|
3230
3734
|
return;
|
|
3231
3735
|
} else if (propName == null) {
|
|
3232
|
-
const hostRef = getHostRef(this);
|
|
3233
3736
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
3234
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) &&
|
|
3737
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
|
|
3235
3738
|
const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
|
|
3236
3739
|
const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
3237
3740
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
3238
|
-
entry == null ? void 0 : entry.forEach((
|
|
3239
|
-
|
|
3240
|
-
|
|
3741
|
+
entry == null ? void 0 : entry.forEach((watcher) => {
|
|
3742
|
+
const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
|
|
3743
|
+
if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
|
|
3744
|
+
instance[watchMethodName].call(instance, newValue, oldValue, attrName);
|
|
3241
3745
|
}
|
|
3242
3746
|
});
|
|
3243
3747
|
}
|
|
3244
3748
|
return;
|
|
3245
3749
|
}
|
|
3750
|
+
const propFlags = members.find(([m]) => m === propName);
|
|
3751
|
+
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
3752
|
+
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
3753
|
+
if (BUILD.reflect && propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
|
|
3754
|
+
// one is always external
|
|
3755
|
+
!isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
|
|
3756
|
+
return;
|
|
3757
|
+
}
|
|
3758
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
3759
|
+
if (isBooleanTarget) {
|
|
3760
|
+
newValue = newValue === null || newValue === "false" ? false : true;
|
|
3761
|
+
}
|
|
3246
3762
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3247
|
-
|
|
3248
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3763
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3249
3764
|
this[propName] = newValue;
|
|
3250
3765
|
}
|
|
3251
3766
|
});
|
|
@@ -3253,7 +3768,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3253
3768
|
Cstr.observedAttributes = Array.from(
|
|
3254
3769
|
/* @__PURE__ */ new Set([
|
|
3255
3770
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
3256
|
-
...members.filter(([_, m]) => m[0] &
|
|
3771
|
+
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
3257
3772
|
var _a2;
|
|
3258
3773
|
const attrName = m[1] || propName;
|
|
3259
3774
|
attrNameToPropName.set(attrName, propName);
|
|
@@ -3271,84 +3786,111 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
3271
3786
|
|
|
3272
3787
|
// src/runtime/initialize-component.ts
|
|
3273
3788
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
3789
|
+
var _a;
|
|
3274
3790
|
let Cstr;
|
|
3275
|
-
|
|
3276
|
-
hostRef.$flags$
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
const
|
|
3280
|
-
if (
|
|
3281
|
-
const
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
3292
|
-
}
|
|
3293
|
-
if (BUILD.member && !Cstr.isProxied) {
|
|
3294
|
-
if (BUILD.watchCallback) {
|
|
3295
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
3791
|
+
try {
|
|
3792
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
3793
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
3794
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
3795
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
3796
|
+
if (BUILD.lazyLoad && bundleId) {
|
|
3797
|
+
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
3798
|
+
if (CstrImport && "then" in CstrImport) {
|
|
3799
|
+
const endLoad = uniqueTime(
|
|
3800
|
+
`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
|
|
3801
|
+
`[Stencil] Load module for <${cmpMeta.$tagName$}>`
|
|
3802
|
+
);
|
|
3803
|
+
Cstr = await CstrImport;
|
|
3804
|
+
endLoad();
|
|
3805
|
+
} else {
|
|
3806
|
+
Cstr = CstrImport;
|
|
3296
3807
|
}
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
if (BUILD.style && Cstr && Cstr.style) {
|
|
3323
|
-
let style;
|
|
3324
|
-
if (typeof Cstr.style === "string") {
|
|
3325
|
-
style = Cstr.style;
|
|
3326
|
-
} else if (BUILD.mode && typeof Cstr.style !== "string") {
|
|
3327
|
-
hostRef.$modeName$ = computeMode(elm);
|
|
3328
|
-
if (hostRef.$modeName$) {
|
|
3329
|
-
style = Cstr.style[hostRef.$modeName$];
|
|
3808
|
+
if (!Cstr) {
|
|
3809
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
3810
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
3811
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
3812
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
3813
|
+
}
|
|
3814
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
3815
|
+
}
|
|
3816
|
+
if (BUILD.member && !Cstr.isProxied) {
|
|
3817
|
+
if (BUILD.propChangeCallback) {
|
|
3818
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3819
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3820
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
3821
|
+
}
|
|
3822
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
3823
|
+
Cstr.isProxied = true;
|
|
3824
|
+
}
|
|
3825
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3826
|
+
if (BUILD.member) {
|
|
3827
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3828
|
+
}
|
|
3829
|
+
try {
|
|
3830
|
+
new Cstr(hostRef);
|
|
3831
|
+
} catch (e) {
|
|
3832
|
+
consoleError(e, elm);
|
|
3330
3833
|
}
|
|
3331
|
-
if (BUILD.
|
|
3332
|
-
|
|
3834
|
+
if (BUILD.member) {
|
|
3835
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
3333
3836
|
}
|
|
3837
|
+
if (BUILD.propChangeCallback) {
|
|
3838
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
3839
|
+
}
|
|
3840
|
+
endNewInstance();
|
|
3841
|
+
const needsDeferredCallback = BUILD.slotRelocation && cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
3842
|
+
if (!needsDeferredCallback) {
|
|
3843
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3844
|
+
} else {
|
|
3845
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
3846
|
+
}
|
|
3847
|
+
} else {
|
|
3848
|
+
Cstr = elm.constructor;
|
|
3849
|
+
const cmpTag = elm.localName;
|
|
3850
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3334
3851
|
}
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3852
|
+
if (BUILD.style && Cstr && Cstr.style) {
|
|
3853
|
+
let style;
|
|
3854
|
+
if (typeof Cstr.style === "string") {
|
|
3855
|
+
style = Cstr.style;
|
|
3856
|
+
} else if (BUILD.mode && typeof Cstr.style !== "string") {
|
|
3857
|
+
hostRef.$modeName$ = computeMode(elm);
|
|
3858
|
+
if (hostRef.$modeName$) {
|
|
3859
|
+
style = Cstr.style[hostRef.$modeName$];
|
|
3860
|
+
}
|
|
3861
|
+
if (BUILD.hydrateServerSide && hostRef.$modeName$) {
|
|
3862
|
+
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
3863
|
+
}
|
|
3864
|
+
}
|
|
3865
|
+
const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
|
|
3866
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement && hmrVersionId) {
|
|
3867
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
3868
|
+
if (BUILD.hydrateServerSide && BUILD.shadowDom) {
|
|
3869
|
+
if (cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */) {
|
|
3870
|
+
style = scopeCss(style, scopeId2);
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3874
|
+
endRegisterStyles();
|
|
3340
3875
|
}
|
|
3341
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3342
|
-
endRegisterStyles();
|
|
3343
3876
|
}
|
|
3344
3877
|
}
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3878
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3879
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3880
|
+
if (BUILD.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3881
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3882
|
+
} else {
|
|
3883
|
+
schedule();
|
|
3884
|
+
}
|
|
3885
|
+
} catch (e) {
|
|
3886
|
+
consoleError(e, elm);
|
|
3887
|
+
if (BUILD.asyncLoading && hostRef.$onRenderResolve$) {
|
|
3888
|
+
hostRef.$onRenderResolve$();
|
|
3889
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
3890
|
+
}
|
|
3891
|
+
if (BUILD.asyncLoading && hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
3892
|
+
hostRef.$onReadyResolve$(elm);
|
|
3893
|
+
}
|
|
3352
3894
|
}
|
|
3353
3895
|
};
|
|
3354
3896
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -3361,6 +3903,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
|
3361
3903
|
var connectedCallback = (elm) => {
|
|
3362
3904
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3363
3905
|
const hostRef = getHostRef(elm);
|
|
3906
|
+
if (!hostRef) {
|
|
3907
|
+
return;
|
|
3908
|
+
}
|
|
3364
3909
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
3365
3910
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
3366
3911
|
if (BUILD.hostListenerTargetParent) {
|
|
@@ -3399,7 +3944,7 @@ var connectedCallback = (elm) => {
|
|
|
3399
3944
|
}
|
|
3400
3945
|
if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {
|
|
3401
3946
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3402
|
-
if (memberFlags & 31 /* Prop */ &&
|
|
3947
|
+
if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
|
|
3403
3948
|
const value = elm[memberName];
|
|
3404
3949
|
delete elm[memberName];
|
|
3405
3950
|
elm[memberName] = value;
|
|
@@ -3415,6 +3960,8 @@ var connectedCallback = (elm) => {
|
|
|
3415
3960
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);
|
|
3416
3961
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3417
3962
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3963
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
3964
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
3418
3965
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3419
3966
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
3420
3967
|
}
|
|
@@ -3441,7 +3988,7 @@ var disconnectedCallback = async (elm) => {
|
|
|
3441
3988
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
3442
3989
|
const hostRef = getHostRef(elm);
|
|
3443
3990
|
if (BUILD.hostListener) {
|
|
3444
|
-
if (hostRef.$rmListeners$) {
|
|
3991
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
3445
3992
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
3446
3993
|
hostRef.$rmListeners$ = void 0;
|
|
3447
3994
|
}
|
|
@@ -3464,104 +4011,118 @@ var disconnectedCallback = async (elm) => {
|
|
|
3464
4011
|
|
|
3465
4012
|
// src/runtime/bootstrap-custom-element.ts
|
|
3466
4013
|
var defineCustomElement = (Cstr, compactMeta) => {
|
|
3467
|
-
customElements.define(
|
|
4014
|
+
customElements.define(
|
|
4015
|
+
transformTag(compactMeta[1]),
|
|
4016
|
+
proxyCustomElement(Cstr, compactMeta)
|
|
4017
|
+
);
|
|
3468
4018
|
};
|
|
3469
4019
|
var proxyCustomElement = (Cstr, compactMeta) => {
|
|
4020
|
+
if (BUILD.profile && performance.mark && performance.getEntriesByName("st:app:start", "mark").length === 0) {
|
|
4021
|
+
performance.mark("st:app:start");
|
|
4022
|
+
}
|
|
3470
4023
|
const cmpMeta = {
|
|
3471
4024
|
$flags$: compactMeta[0],
|
|
3472
4025
|
$tagName$: compactMeta[1]
|
|
3473
4026
|
};
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
if (BUILD.hostListener) {
|
|
3478
|
-
cmpMeta.$listeners$ = compactMeta[3];
|
|
3479
|
-
}
|
|
3480
|
-
if (BUILD.watchCallback) {
|
|
3481
|
-
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
3482
|
-
}
|
|
3483
|
-
if (BUILD.reflect) {
|
|
3484
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
3485
|
-
}
|
|
3486
|
-
if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3487
|
-
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
3488
|
-
}
|
|
3489
|
-
if (BUILD.experimentalSlotFixes) {
|
|
3490
|
-
if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3491
|
-
patchPseudoShadowDom(Cstr.prototype);
|
|
4027
|
+
try {
|
|
4028
|
+
if (BUILD.member) {
|
|
4029
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
3492
4030
|
}
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
patchChildSlotNodes(Cstr.prototype);
|
|
4031
|
+
if (BUILD.hostListener) {
|
|
4032
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
3496
4033
|
}
|
|
3497
|
-
if (BUILD.
|
|
3498
|
-
|
|
4034
|
+
if (BUILD.propChangeCallback) {
|
|
4035
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.$watchers$);
|
|
4036
|
+
cmpMeta.$deserializers$ = Cstr.$deserializers$;
|
|
4037
|
+
cmpMeta.$serializers$ = Cstr.$serializers$;
|
|
3499
4038
|
}
|
|
3500
|
-
if (BUILD.
|
|
3501
|
-
|
|
4039
|
+
if (BUILD.reflect) {
|
|
4040
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
3502
4041
|
}
|
|
3503
|
-
if (BUILD.
|
|
3504
|
-
|
|
4042
|
+
if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
4043
|
+
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
3505
4044
|
}
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
}
|
|
3523
|
-
connectedCallback(this);
|
|
3524
|
-
if (originalConnectedCallback) {
|
|
3525
|
-
originalConnectedCallback.call(this);
|
|
3526
|
-
}
|
|
3527
|
-
},
|
|
3528
|
-
disconnectedCallback() {
|
|
3529
|
-
disconnectedCallback(this);
|
|
3530
|
-
if (originalDisconnectedCallback) {
|
|
3531
|
-
originalDisconnectedCallback.call(this);
|
|
4045
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasSlot */) {
|
|
4046
|
+
if (BUILD.experimentalSlotFixes) {
|
|
4047
|
+
patchPseudoShadowDom(Cstr.prototype);
|
|
4048
|
+
} else {
|
|
4049
|
+
if (BUILD.slotChildNodesFix) {
|
|
4050
|
+
patchChildSlotNodes(Cstr.prototype);
|
|
4051
|
+
}
|
|
4052
|
+
if (BUILD.cloneNodeFix) {
|
|
4053
|
+
patchCloneNode(Cstr.prototype);
|
|
4054
|
+
}
|
|
4055
|
+
if (BUILD.appendChildSlotFix) {
|
|
4056
|
+
patchSlotAppendChild(Cstr.prototype);
|
|
4057
|
+
}
|
|
4058
|
+
if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
4059
|
+
patchTextContent(Cstr.prototype);
|
|
4060
|
+
}
|
|
3532
4061
|
}
|
|
3533
|
-
}
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
4062
|
+
} else if (BUILD.cloneNodeFix) {
|
|
4063
|
+
patchCloneNode(Cstr.prototype);
|
|
4064
|
+
}
|
|
4065
|
+
if (BUILD.hydrateClientSide && BUILD.shadowDom) {
|
|
4066
|
+
hydrateScopedToShadow();
|
|
4067
|
+
}
|
|
4068
|
+
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
4069
|
+
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
4070
|
+
Object.assign(Cstr.prototype, {
|
|
4071
|
+
__hasHostListenerAttached: false,
|
|
4072
|
+
__registerHost() {
|
|
4073
|
+
registerHost(this, cmpMeta);
|
|
4074
|
+
},
|
|
4075
|
+
connectedCallback() {
|
|
4076
|
+
if (!this.__hasHostListenerAttached) {
|
|
4077
|
+
const hostRef = getHostRef(this);
|
|
4078
|
+
if (!hostRef) {
|
|
4079
|
+
return;
|
|
4080
|
+
}
|
|
4081
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
4082
|
+
this.__hasHostListenerAttached = true;
|
|
4083
|
+
}
|
|
4084
|
+
connectedCallback(this);
|
|
4085
|
+
if (originalConnectedCallback) {
|
|
4086
|
+
originalConnectedCallback.call(this);
|
|
4087
|
+
}
|
|
4088
|
+
},
|
|
4089
|
+
disconnectedCallback() {
|
|
4090
|
+
disconnectedCallback(this);
|
|
4091
|
+
if (originalDisconnectedCallback) {
|
|
4092
|
+
originalDisconnectedCallback.call(this);
|
|
4093
|
+
}
|
|
4094
|
+
},
|
|
4095
|
+
__attachShadow() {
|
|
4096
|
+
if (supportsShadow) {
|
|
4097
|
+
if (!this.shadowRoot) {
|
|
4098
|
+
createShadowRoot.call(this, cmpMeta);
|
|
3542
4099
|
} else {
|
|
3543
|
-
this.
|
|
4100
|
+
if (this.shadowRoot.mode !== "open") {
|
|
4101
|
+
throw new Error(
|
|
4102
|
+
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
|
|
4103
|
+
);
|
|
4104
|
+
}
|
|
3544
4105
|
}
|
|
3545
4106
|
} else {
|
|
3546
|
-
|
|
3547
|
-
throw new Error(
|
|
3548
|
-
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
|
|
3549
|
-
);
|
|
3550
|
-
}
|
|
4107
|
+
this.shadowRoot = this;
|
|
3551
4108
|
}
|
|
3552
|
-
} else {
|
|
3553
|
-
this.shadowRoot = this;
|
|
3554
4109
|
}
|
|
3555
|
-
}
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
4110
|
+
});
|
|
4111
|
+
Object.defineProperty(Cstr, "is", {
|
|
4112
|
+
value: cmpMeta.$tagName$,
|
|
4113
|
+
configurable: true
|
|
4114
|
+
});
|
|
4115
|
+
return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
|
|
4116
|
+
} catch (e) {
|
|
4117
|
+
consoleError(e);
|
|
4118
|
+
return Cstr;
|
|
4119
|
+
}
|
|
3559
4120
|
};
|
|
3560
4121
|
var forceModeUpdate = (elm) => {
|
|
3561
4122
|
if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
|
|
3562
4123
|
const mode = computeMode(elm);
|
|
3563
4124
|
const hostRef = getHostRef(elm);
|
|
3564
|
-
if (hostRef.$modeName$ !== mode) {
|
|
4125
|
+
if (hostRef && hostRef.$modeName$ !== mode) {
|
|
3565
4126
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
3566
4127
|
const oldScopeId = elm["s-sc"];
|
|
3567
4128
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
@@ -3583,6 +4144,9 @@ var forceModeUpdate = (elm) => {
|
|
|
3583
4144
|
// src/runtime/hmr-component.ts
|
|
3584
4145
|
var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
3585
4146
|
const hostRef = getHostRef(hostElement);
|
|
4147
|
+
if (!hostRef) {
|
|
4148
|
+
return;
|
|
4149
|
+
}
|
|
3586
4150
|
hostRef.$flags$ = 1 /* hasConnected */;
|
|
3587
4151
|
initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
|
|
3588
4152
|
};
|
|
@@ -3624,7 +4188,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3624
4188
|
let hasSlotRelocation = false;
|
|
3625
4189
|
lazyBundles.map((lazyBundle) => {
|
|
3626
4190
|
lazyBundle[1].map((compactMeta) => {
|
|
3627
|
-
var _a2;
|
|
4191
|
+
var _a2, _b;
|
|
3628
4192
|
const cmpMeta = {
|
|
3629
4193
|
$flags$: compactMeta[0],
|
|
3630
4194
|
$tagName$: compactMeta[1],
|
|
@@ -3643,31 +4207,28 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3643
4207
|
if (BUILD.reflect) {
|
|
3644
4208
|
cmpMeta.$attrsToReflect$ = [];
|
|
3645
4209
|
}
|
|
3646
|
-
if (BUILD.
|
|
3647
|
-
cmpMeta.$watchers$ = (
|
|
4210
|
+
if (BUILD.propChangeCallback) {
|
|
4211
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
4212
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
4213
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
3648
4214
|
}
|
|
3649
4215
|
if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3650
4216
|
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
3651
4217
|
}
|
|
3652
|
-
const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName
|
|
4218
|
+
const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : transformTag(cmpMeta.$tagName$);
|
|
3653
4219
|
const HostElement = class extends HTMLElement {
|
|
4220
|
+
["s-p"];
|
|
4221
|
+
["s-rc"];
|
|
4222
|
+
hasRegisteredEventListeners = false;
|
|
3654
4223
|
// StencilLazyHost
|
|
3655
4224
|
constructor(self) {
|
|
3656
4225
|
super(self);
|
|
3657
|
-
this.hasRegisteredEventListeners = false;
|
|
3658
4226
|
self = this;
|
|
3659
4227
|
registerHost(self, cmpMeta);
|
|
3660
4228
|
if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
3661
4229
|
if (supportsShadow) {
|
|
3662
4230
|
if (!self.shadowRoot) {
|
|
3663
|
-
|
|
3664
|
-
self.attachShadow({
|
|
3665
|
-
mode: "open",
|
|
3666
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
3667
|
-
});
|
|
3668
|
-
} else {
|
|
3669
|
-
self.attachShadow({ mode: "open" });
|
|
3670
|
-
}
|
|
4231
|
+
createShadowRoot.call(self, cmpMeta);
|
|
3671
4232
|
} else {
|
|
3672
4233
|
if (self.shadowRoot.mode !== "open") {
|
|
3673
4234
|
throw new Error(
|
|
@@ -3682,6 +4243,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3682
4243
|
}
|
|
3683
4244
|
connectedCallback() {
|
|
3684
4245
|
const hostRef = getHostRef(this);
|
|
4246
|
+
if (!hostRef) {
|
|
4247
|
+
return;
|
|
4248
|
+
}
|
|
3685
4249
|
if (!this.hasRegisteredEventListeners) {
|
|
3686
4250
|
this.hasRegisteredEventListeners = true;
|
|
3687
4251
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
@@ -3698,9 +4262,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3698
4262
|
}
|
|
3699
4263
|
disconnectedCallback() {
|
|
3700
4264
|
plt.jmp(() => disconnectedCallback(this));
|
|
3701
|
-
|
|
4265
|
+
nextTick(() => {
|
|
3702
4266
|
var _a3;
|
|
3703
4267
|
const hostRef = getHostRef(this);
|
|
4268
|
+
if (!hostRef) {
|
|
4269
|
+
return;
|
|
4270
|
+
}
|
|
3704
4271
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
3705
4272
|
if (i2 > -1) {
|
|
3706
4273
|
deferredConnectedCallbacks.splice(i2, 1);
|
|
@@ -3711,26 +4278,29 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3711
4278
|
});
|
|
3712
4279
|
}
|
|
3713
4280
|
componentOnReady() {
|
|
3714
|
-
|
|
4281
|
+
var _a3;
|
|
4282
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
3715
4283
|
}
|
|
3716
4284
|
};
|
|
3717
|
-
if (
|
|
3718
|
-
if (BUILD.
|
|
4285
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasSlot */) {
|
|
4286
|
+
if (BUILD.experimentalSlotFixes) {
|
|
3719
4287
|
patchPseudoShadowDom(HostElement.prototype);
|
|
4288
|
+
} else {
|
|
4289
|
+
if (BUILD.slotChildNodesFix) {
|
|
4290
|
+
patchChildSlotNodes(HostElement.prototype);
|
|
4291
|
+
}
|
|
4292
|
+
if (BUILD.cloneNodeFix) {
|
|
4293
|
+
patchCloneNode(HostElement.prototype);
|
|
4294
|
+
}
|
|
4295
|
+
if (BUILD.appendChildSlotFix) {
|
|
4296
|
+
patchSlotAppendChild(HostElement.prototype);
|
|
4297
|
+
}
|
|
4298
|
+
if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
4299
|
+
patchTextContent(HostElement.prototype);
|
|
4300
|
+
}
|
|
3720
4301
|
}
|
|
3721
|
-
} else {
|
|
3722
|
-
|
|
3723
|
-
patchChildSlotNodes(HostElement.prototype);
|
|
3724
|
-
}
|
|
3725
|
-
if (BUILD.cloneNodeFix) {
|
|
3726
|
-
patchCloneNode(HostElement.prototype);
|
|
3727
|
-
}
|
|
3728
|
-
if (BUILD.appendChildSlotFix) {
|
|
3729
|
-
patchSlotAppendChild(HostElement.prototype);
|
|
3730
|
-
}
|
|
3731
|
-
if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
3732
|
-
patchTextContent(HostElement.prototype);
|
|
3733
|
-
}
|
|
4302
|
+
} else if (BUILD.cloneNodeFix) {
|
|
4303
|
+
patchCloneNode(HostElement.prototype);
|
|
3734
4304
|
}
|
|
3735
4305
|
if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
|
|
3736
4306
|
HostElement.formAssociated = true;
|
|
@@ -3751,7 +4321,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3751
4321
|
});
|
|
3752
4322
|
});
|
|
3753
4323
|
if (cmpTags.length > 0) {
|
|
3754
|
-
if (hasSlotRelocation) {
|
|
4324
|
+
if (BUILD.slotRelocation && hasSlotRelocation) {
|
|
3755
4325
|
dataStyles.textContent += SLOT_FB_CSS;
|
|
3756
4326
|
}
|
|
3757
4327
|
if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
|
|
@@ -3834,6 +4404,12 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
3834
4404
|
passive: (flags & 1 /* Passive */) !== 0,
|
|
3835
4405
|
capture: (flags & 2 /* Capture */) !== 0
|
|
3836
4406
|
} : (flags & 2 /* Capture */) !== 0;
|
|
4407
|
+
var baseClass = BUILD.lazyLoad ? class {
|
|
4408
|
+
} : globalThis.HTMLElement || class {
|
|
4409
|
+
};
|
|
4410
|
+
function Mixin(...mixins) {
|
|
4411
|
+
return mixins.reduceRight((acc, mixin) => mixin(acc), baseClass);
|
|
4412
|
+
}
|
|
3837
4413
|
|
|
3838
4414
|
// src/runtime/nonce.ts
|
|
3839
4415
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
@@ -3841,6 +4417,90 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
|
3841
4417
|
// src/runtime/platform-options.ts
|
|
3842
4418
|
var setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
3843
4419
|
|
|
4420
|
+
// src/runtime/render.ts
|
|
4421
|
+
var hostRefCache = /* @__PURE__ */ new WeakMap();
|
|
4422
|
+
function render(vnode, container) {
|
|
4423
|
+
let ref = hostRefCache.get(container);
|
|
4424
|
+
if (!ref) {
|
|
4425
|
+
const cmpMeta = {
|
|
4426
|
+
$flags$: 0,
|
|
4427
|
+
$tagName$: container.tagName
|
|
4428
|
+
};
|
|
4429
|
+
ref = {
|
|
4430
|
+
$flags$: 0,
|
|
4431
|
+
$cmpMeta$: cmpMeta,
|
|
4432
|
+
$hostElement$: container
|
|
4433
|
+
};
|
|
4434
|
+
hostRefCache.set(container, ref);
|
|
4435
|
+
}
|
|
4436
|
+
renderVdom(ref, vnode);
|
|
4437
|
+
}
|
|
4438
|
+
|
|
4439
|
+
// src/runtime/tag-transform.ts
|
|
4440
|
+
var tagTransformer = void 0;
|
|
4441
|
+
function transformTag(tag) {
|
|
4442
|
+
if (!tagTransformer) return tag;
|
|
4443
|
+
return tagTransformer(tag);
|
|
4444
|
+
}
|
|
4445
|
+
function setTagTransformer(transformer) {
|
|
4446
|
+
if (tagTransformer) {
|
|
4447
|
+
console.warn(`
|
|
4448
|
+
A tagTransformer has already been set.
|
|
4449
|
+
Overwriting it may lead to error and unexpected results if your components have already been defined.
|
|
4450
|
+
`);
|
|
4451
|
+
}
|
|
4452
|
+
tagTransformer = transformer;
|
|
4453
|
+
}
|
|
4454
|
+
|
|
4455
|
+
// src/runtime/vdom/jsx-dev-runtime.ts
|
|
4456
|
+
function jsxDEV(type, props, key, _isStaticChildren, _source, _self) {
|
|
4457
|
+
const propsObj = props || {};
|
|
4458
|
+
const { children, ...rest } = propsObj;
|
|
4459
|
+
let vnodeData = rest;
|
|
4460
|
+
if (key !== void 0 && !("key" in rest)) {
|
|
4461
|
+
vnodeData = { ...rest, key };
|
|
4462
|
+
}
|
|
4463
|
+
if (vnodeData && Object.keys(vnodeData).length === 0) {
|
|
4464
|
+
vnodeData = null;
|
|
4465
|
+
}
|
|
4466
|
+
if (children !== void 0) {
|
|
4467
|
+
if (Array.isArray(children)) {
|
|
4468
|
+
return h(type, vnodeData, ...children);
|
|
4469
|
+
}
|
|
4470
|
+
if (typeof children === "object" && children !== null && "$flags$" in children) {
|
|
4471
|
+
return h(type, vnodeData, children);
|
|
4472
|
+
}
|
|
4473
|
+
return h(type, vnodeData, children);
|
|
4474
|
+
}
|
|
4475
|
+
return h(type, vnodeData);
|
|
4476
|
+
}
|
|
4477
|
+
|
|
4478
|
+
// src/runtime/vdom/jsx-runtime.ts
|
|
4479
|
+
function jsx(type, props, key) {
|
|
4480
|
+
const propsObj = props || {};
|
|
4481
|
+
const { children, ...rest } = propsObj;
|
|
4482
|
+
let vnodeData = rest;
|
|
4483
|
+
if (key !== void 0 && !("key" in rest)) {
|
|
4484
|
+
vnodeData = { ...rest, key };
|
|
4485
|
+
}
|
|
4486
|
+
if (vnodeData && Object.keys(vnodeData).length === 0) {
|
|
4487
|
+
vnodeData = null;
|
|
4488
|
+
}
|
|
4489
|
+
if (children !== void 0) {
|
|
4490
|
+
if (Array.isArray(children)) {
|
|
4491
|
+
return h(type, vnodeData, ...children);
|
|
4492
|
+
}
|
|
4493
|
+
if (typeof children === "object" && children !== null && "$flags$" in children) {
|
|
4494
|
+
return h(type, vnodeData, children);
|
|
4495
|
+
}
|
|
4496
|
+
return h(type, vnodeData, children);
|
|
4497
|
+
}
|
|
4498
|
+
return h(type, vnodeData);
|
|
4499
|
+
}
|
|
4500
|
+
function jsxs(type, props, key) {
|
|
4501
|
+
return jsx(type, props, key);
|
|
4502
|
+
}
|
|
4503
|
+
|
|
3844
4504
|
// src/runtime/vdom/vdom-annotations.ts
|
|
3845
4505
|
var insertVdomAnnotations = (doc, staticComponents) => {
|
|
3846
4506
|
if (doc != null) {
|
|
@@ -3986,7 +4646,7 @@ var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, inde
|
|
|
3986
4646
|
}
|
|
3987
4647
|
};
|
|
3988
4648
|
|
|
3989
|
-
|
|
4649
|
+
var StencilCore = /*#__PURE__*/Object.freeze({
|
|
3990
4650
|
__proto__: null,
|
|
3991
4651
|
BUILD: BUILD,
|
|
3992
4652
|
Build: Build,
|
|
@@ -3994,7 +4654,9 @@ const StencilCore = /*#__PURE__*/Object.freeze({
|
|
|
3994
4654
|
Fragment: Fragment,
|
|
3995
4655
|
H: H,
|
|
3996
4656
|
HTMLElement: H,
|
|
4657
|
+
HYDRATED_STYLE_ID: HYDRATED_STYLE_ID,
|
|
3997
4658
|
Host: Host,
|
|
4659
|
+
Mixin: Mixin,
|
|
3998
4660
|
NAMESPACE: NAMESPACE,
|
|
3999
4661
|
STENCIL_DEV_MODE: STENCIL_DEV_MODE,
|
|
4000
4662
|
addHostEventListeners: addHostEventListeners,
|
|
@@ -4019,9 +4681,14 @@ const StencilCore = /*#__PURE__*/Object.freeze({
|
|
|
4019
4681
|
h: h,
|
|
4020
4682
|
insertVdomAnnotations: insertVdomAnnotations,
|
|
4021
4683
|
isMemberInElement: isMemberInElement,
|
|
4684
|
+
jsx: jsx,
|
|
4685
|
+
jsxDEV: jsxDEV,
|
|
4686
|
+
jsxs: jsxs,
|
|
4022
4687
|
loadModule: loadModule,
|
|
4023
4688
|
modeResolutionChain: modeResolutionChain,
|
|
4689
|
+
needsScopedSSR: needsScopedSSR,
|
|
4024
4690
|
nextTick: nextTick,
|
|
4691
|
+
normalizeWatchers: normalizeWatchers,
|
|
4025
4692
|
parsePropertyValue: parsePropertyValue,
|
|
4026
4693
|
plt: plt,
|
|
4027
4694
|
postUpdateComponent: postUpdateComponent,
|
|
@@ -4031,6 +4698,7 @@ const StencilCore = /*#__PURE__*/Object.freeze({
|
|
|
4031
4698
|
readTask: readTask,
|
|
4032
4699
|
registerHost: registerHost,
|
|
4033
4700
|
registerInstance: registerInstance,
|
|
4701
|
+
render: render,
|
|
4034
4702
|
renderVdom: renderVdom,
|
|
4035
4703
|
setAssetPath: setAssetPath,
|
|
4036
4704
|
setErrorHandler: setErrorHandler,
|
|
@@ -4038,11 +4706,15 @@ const StencilCore = /*#__PURE__*/Object.freeze({
|
|
|
4038
4706
|
setNonce: setNonce,
|
|
4039
4707
|
setPlatformHelpers: setPlatformHelpers,
|
|
4040
4708
|
setPlatformOptions: setPlatformOptions,
|
|
4709
|
+
setScopedSSR: setScopedSSR,
|
|
4710
|
+
setTagTransformer: setTagTransformer,
|
|
4041
4711
|
setValue: setValue,
|
|
4042
4712
|
styles: styles,
|
|
4043
4713
|
supportsConstructableStylesheets: supportsConstructableStylesheets,
|
|
4044
4714
|
supportsListenerOptions: supportsListenerOptions,
|
|
4715
|
+
supportsMutableAdoptedStyleSheets: supportsMutableAdoptedStyleSheets,
|
|
4045
4716
|
supportsShadow: supportsShadow,
|
|
4717
|
+
transformTag: transformTag,
|
|
4046
4718
|
win: win,
|
|
4047
4719
|
writeTask: writeTask
|
|
4048
4720
|
});
|