PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 3.0.0-beta2
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v3.0.0-beta2
4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.11.1 1.11.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.15.1 2.16.0 2.16.1 2.16.2 2.16.3 2.17.0 2.17.1 2.17.2 2.18.0 2.19.0 2.19.2 2.19.3 2.19.4 2.2.0 2.2.1 2.20.0 2.20.1 2.20.2 2.20.3 2.20.4 2.20.5 2.20.6 2.21.0 2.22.0 2.22.1 2.23.0 2.24.0 2.25.0 2.25.1 2.25.2 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.29.1 2.29.2 2.29.3 2.29.4 2.3.0 2.3.1 2.30.0 2.31.0 2.31.1 2.31.2 2.31.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.40.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.9.0 3.0.0 3.0.0-RC1 3.0.0-RC2 3.0.0-beta1 3.0.0-beta2 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.10.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.14.0 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 3.16.8 3.17.0 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.18.0 3.19.0 3.19.1 3.19.2 3.2.0 3.2.1 3.2.2 3.20.0 3.20.1 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 trunk 4.1.0 0.2.19.1 4.1.1 1.0.0 4.2.0 1.0.1 1.0.2
surecart / dist / components / cjs / sc-alert_13.cjs.entry.js
surecart / dist / components / cjs Last commit date
MockProcessor-48b83649.js 1 year ago MockProcessor-48b83649.js.map 1 year ago add-query-args-49dcb630.js 1 year ago add-query-args-49dcb630.js.map 1 year ago address-4c70d641.js 1 year ago address-4c70d641.js.map 1 year ago animation-registry-f7f1a08b.js 1 year ago animation-registry-f7f1a08b.js.map 1 year ago app-globals-9f96f14c.js 1 year ago app-globals-9f96f14c.js.map 1 year ago consumer-9f4ee0e3.js 1 year ago consumer-9f4ee0e3.js.map 1 year ago countries-367b507a.js 1 year ago countries-367b507a.js.map 1 year ago currency-71fce0f0.js 1 year ago currency-71fce0f0.js.map 1 year ago error-b46e23c3.js 1 year ago error-b46e23c3.js.map 1 year ago fetch-6192c074.js 1 year ago fetch-6192c074.js.map 1 year ago form-data-0da9940f.js 1 year ago form-data-0da9940f.js.map 1 year ago functions-b63256c8.js 1 year ago functions-b63256c8.js.map 1 year ago getters-305b8266.js 1 year ago getters-305b8266.js.map 1 year ago getters-36e9dc10.js 1 year ago getters-36e9dc10.js.map 1 year ago getters-3f9f8286.js 1 year ago getters-3f9f8286.js.map 1 year ago getters-810d572b.js 1 year ago getters-810d572b.js.map 1 year ago getters-f6bbfe30.js 1 year ago getters-f6bbfe30.js.map 1 year ago google-03835677.js 1 year ago google-03835677.js.map 1 year ago google-59d23803.js 1 year ago google-59d23803.js.map 1 year ago index-252211ea.js 1 year ago index-252211ea.js.map 1 year ago index-6c7d178b.js 1 year ago index-6c7d178b.js.map 1 year ago index-8acc3c89.js 1 year ago index-8acc3c89.js.map 1 year ago index-adacfa36.js 1 year ago index-adacfa36.js.map 1 year ago index-bcdafe6e.js 1 year ago index-bcdafe6e.js.map 1 year ago index-fb76df07.js 2 years ago index-fb76df07.js.map 2 years ago index.cjs.js 1 year ago index.cjs.js.map 2 years ago inline-aa15f113.js 1 year ago inline-aa15f113.js.map 1 year ago lazy-2b509fa7.js 1 year ago lazy-2b509fa7.js.map 1 year ago library-b4e9d7e3.js 1 year ago library-b4e9d7e3.js.map 1 year ago loader.cjs.js 1 year ago loader.cjs.js.map 1 year ago media-43b85f3d.js 1 year ago media-43b85f3d.js.map 1 year ago mutations-11c8f9a8.js 1 year ago mutations-11c8f9a8.js.map 1 year ago mutations-14b05e96.js 1 year ago mutations-14b05e96.js.map 1 year ago mutations-35e01219.js 1 year ago mutations-35e01219.js.map 1 year ago mutations-76f337c0.js 1 year ago mutations-76f337c0.js.map 1 year ago mutations-a920eef8.js 1 year ago mutations-a920eef8.js.map 1 year ago page-align-5a2ab493.js 1 year ago page-align-5a2ab493.js.map 1 year ago price-653ec1cb.js 1 year ago price-653ec1cb.js.map 1 year ago pure-bd6f0a6e.js 1 year ago pure-bd6f0a6e.js.map 1 year ago quantity-bff7f892.js 1 year ago quantity-bff7f892.js.map 1 year ago remove-query-args-b57e8cd3.js 1 year ago remove-query-args-b57e8cd3.js.map 1 year ago sc-address_3.cjs.entry.js 1 year ago sc-address_3.cjs.entry.js.map 1 year ago sc-alert_13.cjs.entry.js 1 year ago sc-alert_13.cjs.entry.js.map 1 year ago sc-avatar.cjs.entry.js 1 year ago sc-avatar.cjs.entry.js.map 1 year ago sc-badge-notice.cjs.entry.js 1 year ago sc-badge-notice.cjs.entry.js.map 1 year ago sc-breadcrumb.cjs.entry.js 1 year ago sc-breadcrumb.cjs.entry.js.map 1 year ago sc-breadcrumbs.cjs.entry.js 1 year ago sc-breadcrumbs.cjs.entry.js.map 1 year ago sc-button-group.cjs.entry.js 1 year ago sc-button-group.cjs.entry.js.map 1 year ago sc-cancel-dialog_2.cjs.entry.js 1 year ago sc-cancel-dialog_2.cjs.entry.js.map 1 year ago sc-cancel-discount_4.cjs.entry.js 1 year ago sc-cancel-discount_4.cjs.entry.js.map 1 year ago sc-card.cjs.entry.js 1 year ago sc-card.cjs.entry.js.map 1 year ago sc-cart-button.cjs.entry.js 1 year ago sc-cart-button.cjs.entry.js.map 1 year ago sc-cart-form-submit.cjs.entry.js 1 year ago sc-cart-form-submit.cjs.entry.js.map 1 year ago sc-cart-form.cjs.entry.js 1 year ago sc-cart-form.cjs.entry.js.map 1 year ago sc-cart-header.cjs.entry.js 1 year ago sc-cart-header.cjs.entry.js.map 1 year ago sc-cart-icon.cjs.entry.js 1 year ago sc-cart-icon.cjs.entry.js.map 1 year ago sc-cart-loader.cjs.entry.js 1 year ago sc-cart-loader.cjs.entry.js.map 1 year ago sc-cart-session-provider_3.cjs.entry.js 1 year ago sc-cart-session-provider_3.cjs.entry.js.map 1 year ago sc-cart-submit.cjs.entry.js 1 year ago sc-cart-submit.cjs.entry.js.map 1 year ago sc-cart.cjs.entry.js 1 year ago sc-cart.cjs.entry.js.map 1 year ago sc-cc-logo_2.cjs.entry.js 1 year ago sc-cc-logo_2.cjs.entry.js.map 1 year ago sc-charges-list.cjs.entry.js 1 year ago sc-charges-list.cjs.entry.js.map 1 year ago sc-checkout-form-errors.cjs.entry.js 1 year ago sc-checkout-form-errors.cjs.entry.js.map 1 year ago sc-checkout-mollie-payment_2.cjs.entry.js 1 year ago sc-checkout-mollie-payment_2.cjs.entry.js.map 1 year ago sc-checkout-product-price-variant-selector.cjs.entry.js 1 year ago sc-checkout-product-price-variant-selector.cjs.entry.js.map 1 year ago sc-checkout-stock-alert_8.cjs.entry.js 1 year ago sc-checkout-stock-alert_8.cjs.entry.js.map 1 year ago sc-checkout.cjs.entry.js 1 year ago sc-checkout.cjs.entry.js.map 1 year ago sc-choice-container.cjs.entry.js 1 year ago sc-choice-container.cjs.entry.js.map 1 year ago sc-choice.cjs.entry.js 1 year ago sc-choice.cjs.entry.js.map 1 year ago sc-choices.cjs.entry.js 1 year ago sc-choices.cjs.entry.js.map 1 year ago sc-column_2.cjs.entry.js 1 year ago sc-column_2.cjs.entry.js.map 1 year ago sc-compact-address_11.cjs.entry.js 1 year ago sc-compact-address_11.cjs.entry.js.map 1 year ago sc-conditional-form.cjs.entry.js 1 year ago sc-conditional-form.cjs.entry.js.map 1 year ago sc-consumer.cjs.entry.js 1 year ago sc-consumer.cjs.entry.js.map 1 year ago sc-coupon-form.cjs.entry.js 1 year ago sc-coupon-form.cjs.entry.js.map 1 year ago sc-custom-order-price-input.cjs.entry.js 1 year ago sc-custom-order-price-input.cjs.entry.js.map 1 year ago sc-customer-details.cjs.entry.js 1 year ago sc-customer-details.cjs.entry.js.map 1 year ago sc-customer-edit.cjs.entry.js 1 year ago sc-customer-edit.cjs.entry.js.map 1 year ago sc-customer-email.cjs.entry.js 1 year ago sc-customer-email.cjs.entry.js.map 1 year ago sc-customer-firstname.cjs.entry.js 1 year ago sc-customer-firstname.cjs.entry.js.map 1 year ago sc-customer-lastname.cjs.entry.js 1 year ago sc-customer-lastname.cjs.entry.js.map 1 year ago sc-customer-name.cjs.entry.js 1 year ago sc-customer-name.cjs.entry.js.map 1 year ago sc-customer-phone.cjs.entry.js 1 year ago sc-customer-phone.cjs.entry.js.map 1 year ago sc-dashboard-customer-details.cjs.entry.js 1 year ago sc-dashboard-customer-details.cjs.entry.js.map 1 year ago sc-dashboard-downloads-list.cjs.entry.js 1 year ago sc-dashboard-downloads-list.cjs.entry.js.map 1 year ago sc-divider.cjs.entry.js 1 year ago sc-divider.cjs.entry.js.map 1 year ago sc-donation-choices.cjs.entry.js 1 year ago sc-donation-choices.cjs.entry.js.map 1 year ago sc-downloads-list.cjs.entry.js 1 year ago sc-downloads-list.cjs.entry.js.map 1 year ago sc-dropdown_3.cjs.entry.js 1 year ago sc-dropdown_3.cjs.entry.js.map 1 year ago sc-empty.cjs.entry.js 1 year ago sc-empty.cjs.entry.js.map 1 year ago sc-express-payment.cjs.entry.js 1 year ago sc-express-payment.cjs.entry.js.map 1 year ago sc-feature-demo-banner.cjs.entry.js 1 year ago sc-feature-demo-banner.cjs.entry.js.map 1 year ago sc-form-control_2.cjs.entry.js 1 year ago sc-form-control_2.cjs.entry.js.map 1 year ago sc-form-row.cjs.entry.js 1 year ago sc-form-row.cjs.entry.js.map 1 year ago sc-form.cjs.entry.js 1 year ago sc-form.cjs.entry.js.map 1 year ago sc-format-bytes.cjs.entry.js 1 year ago sc-format-bytes.cjs.entry.js.map 1 year ago sc-format-interval.cjs.entry.js 1 year ago sc-format-interval.cjs.entry.js.map 1 year ago sc-fulfillment-shipping-status-badge.cjs.entry.js 1 year ago sc-fulfillment-shipping-status-badge.cjs.entry.js.map 1 year ago sc-fulfillments.cjs.entry.js 1 year ago sc-fulfillments.cjs.entry.js.map 1 year ago sc-heading_2.cjs.entry.js 1 year ago sc-heading_2.cjs.entry.js.map 1 year ago sc-image-slider.cjs.entry.js 1 year ago sc-image-slider.cjs.entry.js.map 1 year ago sc-invoices-list.cjs.entry.js 1 year ago sc-invoices-list.cjs.entry.js.map 1 year ago sc-license.cjs.entry.js 1 year ago sc-license.cjs.entry.js.map 1 year ago sc-licenses-list.cjs.entry.js 1 year ago sc-licenses-list.cjs.entry.js.map 1 year ago sc-line-item-bump.cjs.entry.js 1 year ago sc-line-item-bump.cjs.entry.js.map 1 year ago sc-line-item-total.cjs.entry.js 1 year ago sc-line-item-total.cjs.entry.js.map 1 year ago sc-line-item.cjs.entry.js 1 year ago sc-line-item.cjs.entry.js.map 1 year ago sc-line-items-provider.cjs.entry.js 1 year ago sc-line-items-provider.cjs.entry.js.map 1 year ago sc-line-items.cjs.entry.js 1 year ago sc-line-items.cjs.entry.js.map 1 year ago sc-login-form.cjs.entry.js 1 year ago sc-login-form.cjs.entry.js.map 1 year ago sc-manual-payment-method_3.cjs.entry.js 1 year ago sc-manual-payment-method_3.cjs.entry.js.map 1 year ago sc-menu-divider.cjs.entry.js 1 year ago sc-menu-divider.cjs.entry.js.map 1 year ago sc-menu-label_2.cjs.entry.js 1 year ago sc-menu-label_2.cjs.entry.js.map 1 year ago sc-mollie-add-method.cjs.entry.js 1 year ago sc-mollie-add-method.cjs.entry.js.map 1 year ago sc-order-confirmation-customer.cjs.entry.js 1 year ago sc-order-confirmation-customer.cjs.entry.js.map 1 year ago sc-order-confirmation-details.cjs.entry.js 1 year ago sc-order-confirmation-details.cjs.entry.js.map 1 year ago sc-order-confirmation-line-items_2.cjs.entry.js 1 year ago sc-order-confirmation-line-items_2.cjs.entry.js.map 1 year ago sc-order-confirmation.cjs.entry.js 1 year ago sc-order-confirmation.cjs.entry.js.map 1 year ago sc-order-coupon-form.cjs.entry.js 1 year ago sc-order-coupon-form.cjs.entry.js.map 1 year ago sc-order-detail.cjs.entry.js 1 year ago sc-order-detail.cjs.entry.js.map 1 year ago sc-order-fulfillment-badge.cjs.entry.js 1 year ago sc-order-fulfillment-badge.cjs.entry.js.map 1 year ago sc-order-manual-instructions.cjs.entry.js 1 year ago sc-order-manual-instructions.cjs.entry.js.map 1 year ago sc-order-password.cjs.entry.js 1 year ago sc-order-password.cjs.entry.js.map 1 year ago sc-order-return-badge.cjs.entry.js 1 year ago sc-order-return-badge.cjs.entry.js.map 1 year ago sc-order-shipment-badge.cjs.entry.js 1 year ago sc-order-shipment-badge.cjs.entry.js.map 1 year ago sc-order-status-badge.cjs.entry.js 1 year ago sc-order-status-badge.cjs.entry.js.map 1 year ago sc-order-submit.cjs.entry.js 1 year ago sc-order-submit.cjs.entry.js.map 1 year ago sc-order-summary.cjs.entry.js 1 year ago sc-order-summary.cjs.entry.js.map 1 year ago sc-order.cjs.entry.js 1 year ago sc-order.cjs.entry.js.map 1 year ago sc-orders-list.cjs.entry.js 1 year ago sc-orders-list.cjs.entry.js.map 1 year ago sc-pagination.cjs.entry.js 1 year ago sc-pagination.cjs.entry.js.map 1 year ago sc-password-nag.cjs.entry.js 1 year ago sc-password-nag.cjs.entry.js.map 1 year ago sc-password.cjs.entry.js 1 year ago sc-password.cjs.entry.js.map 1 year ago sc-payment-method-choice_2.cjs.entry.js 1 year ago sc-payment-method-choice_2.cjs.entry.js.map 1 year ago sc-payment-method-details.cjs.entry.js 1 year ago sc-payment-method-details.cjs.entry.js.map 1 year ago sc-payment-methods-list.cjs.entry.js 1 year ago sc-payment-methods-list.cjs.entry.js.map 1 year ago sc-payment.cjs.entry.js 1 year ago sc-payment.cjs.entry.js.map 1 year ago sc-paypal-add-method.cjs.entry.js 1 year ago sc-paypal-add-method.cjs.entry.js.map 1 year ago sc-paypal-buttons_2.cjs.entry.js 1 year ago sc-paypal-buttons_2.cjs.entry.js.map 1 year ago sc-paystack-add-method.cjs.entry.js 1 year ago sc-paystack-add-method.cjs.entry.js.map 1 year ago sc-phone-input.cjs.entry.js 1 year ago sc-phone-input.cjs.entry.js.map 1 year ago sc-pill-option.cjs.entry.js 1 year ago sc-pill-option.cjs.entry.js.map 1 year ago sc-premium-tag.cjs.entry.js 1 year ago sc-premium-tag.cjs.entry.js.map 1 year ago sc-price-choice-container.cjs.entry.js 1 year ago sc-price-choice-container.cjs.entry.js.map 1 year ago sc-price-choice.cjs.entry.js 1 year ago sc-price-choice.cjs.entry.js.map 1 year ago sc-price-choices.cjs.entry.js 1 year ago sc-price-choices.cjs.entry.js.map 1 year ago sc-price-input.cjs.entry.js 1 year ago sc-price-input.cjs.entry.js.map 1 year ago sc-price-range.cjs.entry.js 1 year ago sc-price-range.cjs.entry.js.map 1 year ago sc-price.cjs.entry.js 1 year ago sc-price.cjs.entry.js.map 1 year ago sc-product-buy-button.cjs.entry.js 1 year ago sc-product-buy-button.cjs.entry.js.map 1 year ago sc-product-donation-amount-choice.cjs.entry.js 1 year ago sc-product-donation-amount-choice.cjs.entry.js.map 1 year ago sc-product-donation-choices.cjs.entry.js 1 year ago sc-product-donation-choices.cjs.entry.js.map 1 year ago sc-product-donation-custom-amount.cjs.entry.js 1 year ago sc-product-donation-custom-amount.cjs.entry.js.map 1 year ago sc-product-item-image_3.cjs.entry.js 1 year ago sc-product-item-image_3.cjs.entry.js.map 1 year ago sc-product-item-list.cjs.entry.js 1 year ago sc-product-item-list.cjs.entry.js.map 1 year ago sc-product-item.cjs.entry.js 1 year ago sc-product-item.cjs.entry.js.map 1 year ago sc-product-line-item_2.cjs.entry.js 1 year ago sc-product-line-item_2.cjs.entry.js.map 1 year ago sc-product-pills-variant-option.cjs.entry.js 1 year ago sc-product-pills-variant-option.cjs.entry.js.map 1 year ago sc-product-price-choices.cjs.entry.js 1 year ago sc-product-price-choices.cjs.entry.js.map 1 year ago sc-product-price-modal.cjs.entry.js 1 year ago sc-product-price-modal.cjs.entry.js.map 1 year ago sc-product-price.cjs.entry.js 1 year ago sc-product-price.cjs.entry.js.map 1 year ago sc-product-quantity.cjs.entry.js 1 year ago sc-product-quantity.cjs.entry.js.map 1 year ago sc-product-selected-price.cjs.entry.js 1 year ago sc-product-selected-price.cjs.entry.js.map 1 year ago sc-product-text.cjs.entry.js 1 year ago sc-product-text.cjs.entry.js.map 1 year ago sc-provider.cjs.entry.js 1 year ago sc-provider.cjs.entry.js.map 1 year ago sc-provisional-banner.cjs.entry.js 1 year ago sc-provisional-banner.cjs.entry.js.map 1 year ago sc-purchase-downloads-list.cjs.entry.js 1 year ago sc-purchase-downloads-list.cjs.entry.js.map 1 year ago sc-recurring-price-choice-container.cjs.entry.js 1 year ago sc-recurring-price-choice-container.cjs.entry.js.map 1 year ago sc-rich-text.cjs.entry.js 1 year ago sc-rich-text.cjs.entry.js.map 1 year ago sc-spacing.cjs.entry.js 1 year ago sc-spacing.cjs.entry.js.map 1 year ago sc-stacked-list_2.cjs.entry.js 1 year ago sc-stacked-list_2.cjs.entry.js.map 1 year ago sc-stripe-add-method.cjs.entry.js 1 year ago sc-stripe-add-method.cjs.entry.js.map 1 year ago sc-stripe-element.cjs.entry.js 1 year ago sc-stripe-element.cjs.entry.js.map 1 year ago sc-stripe-payment-element.cjs.entry.js 1 year ago sc-stripe-payment-element.cjs.entry.js.map 1 year ago sc-stripe-payment-request.cjs.entry.js 1 year ago sc-stripe-payment-request.cjs.entry.js.map 1 year ago sc-subscription-ad-hoc-confirm.cjs.entry.js 1 year ago sc-subscription-ad-hoc-confirm.cjs.entry.js.map 1 year ago sc-subscription-details_2.cjs.entry.js 1 year ago sc-subscription-details_2.cjs.entry.js.map 1 year ago sc-subscription-payment-method.cjs.entry.js 1 year ago sc-subscription-payment-method.cjs.entry.js.map 1 year ago sc-subscription-payment.cjs.entry.js 1 year ago sc-subscription-payment.cjs.entry.js.map 1 year ago sc-subscription-switch.cjs.entry.js 1 year ago sc-subscription-switch.cjs.entry.js.map 1 year ago sc-subscription-variation-confirm.cjs.entry.js 1 year ago sc-subscription-variation-confirm.cjs.entry.js.map 1 year ago sc-subscription.cjs.entry.js 1 year ago sc-subscription.cjs.entry.js.map 1 year ago sc-subscriptions-list.cjs.entry.js 1 year ago sc-subscriptions-list.cjs.entry.js.map 1 year ago sc-summary.cjs.entry.js 1 year ago sc-summary.cjs.entry.js.map 1 year ago sc-switch.cjs.entry.js 1 year ago sc-switch.cjs.entry.js.map 1 year ago sc-tab-group.cjs.entry.js 1 year ago sc-tab-group.cjs.entry.js.map 1 year ago sc-tab-panel.cjs.entry.js 1 year ago sc-tab-panel.cjs.entry.js.map 1 year ago sc-tab.cjs.entry.js 1 year ago sc-tab.cjs.entry.js.map 1 year ago sc-table-head.cjs.entry.js 1 year ago sc-table-head.cjs.entry.js.map 1 year ago sc-table_3.cjs.entry.js 1 year ago sc-table_3.cjs.entry.js.map 1 year ago sc-tag.cjs.entry.js 1 year ago sc-tag.cjs.entry.js.map 1 year ago sc-toggle.cjs.entry.js 1 year ago sc-toggle.cjs.entry.js.map 1 year ago sc-toggles.cjs.entry.js 1 year ago sc-toggles.cjs.entry.js.map 1 year ago sc-total.cjs.entry.js 1 year ago sc-total.cjs.entry.js.map 1 year ago sc-upcoming-invoice.cjs.entry.js 1 year ago sc-upcoming-invoice.cjs.entry.js.map 1 year ago sc-upgrade-required.cjs.entry.js 1 year ago sc-upgrade-required.cjs.entry.js.map 1 year ago sc-upsell-countdown-timer.cjs.entry.js 1 year ago sc-upsell-countdown-timer.cjs.entry.js.map 1 year ago sc-upsell-no-thanks-button.cjs.entry.js 1 year ago sc-upsell-no-thanks-button.cjs.entry.js.map 1 year ago sc-upsell-submit-button.cjs.entry.js 1 year ago sc-upsell-submit-button.cjs.entry.js.map 1 year ago sc-upsell-totals.cjs.entry.js 1 year ago sc-upsell-totals.cjs.entry.js.map 1 year ago sc-upsell.cjs.entry.js 1 year ago sc-upsell.cjs.entry.js.map 1 year ago sc-visually-hidden.cjs.entry.js 1 year ago sc-visually-hidden.cjs.entry.js.map 1 year ago sc-wordpress-password-edit.cjs.entry.js 1 year ago sc-wordpress-password-edit.cjs.entry.js.map 1 year ago sc-wordpress-user-edit.cjs.entry.js 1 year ago sc-wordpress-user-edit.cjs.entry.js.map 1 year ago sc-wordpress-user.cjs.entry.js 1 year ago sc-wordpress-user.cjs.entry.js.map 1 year ago store-34d62f12.js 1 year ago store-34d62f12.js.map 1 year ago store-7e035943.js 1 year ago store-7e035943.js.map 1 year ago store-d24717c6.js 1 year ago store-d24717c6.js.map 1 year ago surecart.cjs.js 1 year ago surecart.cjs.js.map 1 year ago tax-736ff458.js 1 year ago tax-736ff458.js.map 1 year ago universe-0cf1168a.js 1 year ago universe-0cf1168a.js.map 1 year ago util-b877b2bd.js 1 year ago util-b877b2bd.js.map 1 year ago utils-ee1bb9d3.js 1 year ago utils-ee1bb9d3.js.map 1 year ago watchers-2ad3abd1.js 1 year ago watchers-2ad3abd1.js.map 1 year ago watchers-758e6979.js 1 year ago watchers-758e6979.js.map 1 year ago watchers-cb566474.js 1 year ago watchers-cb566474.js.map 1 year ago watchers-dc559477.js 1 year ago watchers-dc559477.js.map 1 year ago watchers-fb1bab08.js 1 year ago watchers-fb1bab08.js.map 1 year ago
sc-alert_13.cjs.entry.js
819 lines
1 'use strict';
2
3 Object.defineProperty(exports, '__esModule', { value: true });
4
5 const index = require('./index-8acc3c89.js');
6 const pageAlign = require('./page-align-5a2ab493.js');
7 const animationRegistry = require('./animation-registry-f7f1a08b.js');
8 const currency = require('./currency-71fce0f0.js');
9 const library = require('./library-b4e9d7e3.js');
10 const fetch$1 = require('./fetch-6192c074.js');
11 const addQueryArgs = require('./add-query-args-49dcb630.js');
12 require('./remove-query-args-b57e8cd3.js');
13
14 const scAlertCss = ":host{display:block}[hidden]{display:none !important}::slotted(*:not(:first-child)){margin-top:0.5rem;margin-bottom:0}::slotted(ul){line-height:1.4em;list-style-type:disc;margin:0;padding:0;padding-left:20px}.alert{font-family:var(--sc-input-font-family);font-weight:var(--sc-font-weight-normal);font-size:var(--sc-button-font-size-medium);line-height:var(--sc-line-height-dense);border-radius:var(--sc-alert-border-radius, var(--sc-border-radius-medium));padding:var(--sc-spacing-large);display:flex;align-items:flex-start;border:var(--sc-alert-border, var(--sc-input-border));border-top:solid var(--sc-alert-border-width, 3px);color:var(--sc-alert-color, var(--sc-input-label-color));background:var(--sc-alert-background-color, var(--sc-color-white));box-shadow:var(--sc-shadow-small)}.alert__text{flex:1}.alert.alert--primary{border-top-color:var(--sc-alert-primary-border-color, var(--sc-color-primary-500))}.alert.alert--primary a{color:var(--sc-color-primary-900)}.alert.alert--primary .alert__title{color:var(--sc-alert-title-color, var(--sc-color-gray-800))}.alert.alert--primary .alert__icon{color:var(--sc-alert-primary-icon-color, var(--sc-color-primary-500))}.alert.alert--info{border-top-color:var(--sc-alert-info-border-color, var(--sc-color-info-500))}.alert.alert--info a{color:var(--sc-color-info-900)}.alert.alert--info .alert__title{color:var(--sc-alert-title-color, var(--sc-color-gray-800))}.alert.alert--info .alert__icon{color:var(--sc-alert-info-icon-color, var(--sc-color-info-500))}.alert.alert--danger{border-top-color:var(--sc-alert-danger-border-color, var(--sc-color-danger-500))}.alert.alert--danger a{color:var(--sc-color-danger-900)}.alert.alert--danger .alert__title{color:var(--sc-alert-title-color, var(--sc-color-gray-800))}.alert.alert--danger .alert__icon{color:var(--sc-alert-danger-icon-color, var(--sc-color-danger-500))}.alert.alert--warning{border-top-color:var(--sc-alert-warning-border-color, var(--sc-color-warning-500))}.alert.alert--warning a{color:var(--sc-color-warning-900)}.alert.alert--warning .alert__title{color:var(--sc-alert-title-color, var(--sc-color-gray-800))}.alert.alert--warning .alert__icon{color:var(--sc-alert-warning-icon-color, var(--sc-color-warning-500))}.alert.alert--success{border-top-color:var(--sc-alert-success-border-color, var(--sc-color-success-500))}.alert.alert--success a{color:var(--sc-color-success-900)}.alert.alert--success .alert__title{color:var(--sc-alert-title-color, var(--sc-color-gray-800))}.alert.alert--success .alert__icon{color:var(--sc-alert-success-icon-color, var(--sc-color-success-500))}.alert__icon{flex:1;flex:0 0 auto;display:flex;align-items:center;font-size:var(--sc-font-size-large);padding-inline-end:var(--sc-spacing-medium)}.alert__title{font-weight:var(--sc-font-weight-semibold)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.alert__close{transition:background-color var(--sc-transition-fast) ease;display:inline-flex;border-radius:var(--sc-border-radius-small);padding:var(--sc-spacing-x-small);margin-left:auto;cursor:pointer}.alert__close svg{width:1em;height:1em}.alert--is-rtl{text-align:right}.alert--is-rtl.alert-close{margin-right:auto;margin-left:unset}.alert--is-rtl ::slotted(ul){margin:0;padding:0;padding-right:20px}";
15 const ScAlertStyle0 = scAlertCss;
16
17 const ScAlert = class {
18 constructor(hostRef) {
19 index.registerInstance(this, hostRef);
20 this.scHide = index.createEvent(this, "scHide", 7);
21 this.scShow = index.createEvent(this, "scShow", 7);
22 this.open = false;
23 this.title = undefined;
24 this.closable = false;
25 this.type = 'primary';
26 this.duration = Infinity;
27 this.scrollOnOpen = undefined;
28 this.scrollMargin = '0px';
29 this.noIcon = undefined;
30 this.autoHideTimeout = undefined;
31 }
32 /** Shows the alert. */
33 async show() {
34 if (this.open) {
35 return;
36 }
37 this.open = true;
38 }
39 /** Hides the alert */
40 async hide() {
41 if (!this.open) {
42 return;
43 }
44 this.open = false;
45 }
46 restartAutoHide() {
47 clearTimeout(this.autoHideTimeout);
48 if (this.open && this.duration < Infinity) {
49 this.autoHideTimeout = setTimeout(() => this.hide(), this.duration);
50 }
51 }
52 handleMouseMove() {
53 this.restartAutoHide();
54 }
55 handleCloseClick() {
56 this.hide();
57 }
58 /** Emit event when showing or hiding changes */
59 handleOpenChange() {
60 this.open ? this.scShow.emit() : this.scHide.emit();
61 if (this.open && this.scrollOnOpen) {
62 this.el.scrollIntoView({ behavior: 'smooth' });
63 }
64 }
65 componentDidLoad() {
66 this.handleOpenChange();
67 }
68 iconName() {
69 switch (this.type) {
70 case 'danger':
71 return 'alert-circle';
72 case 'success':
73 return 'check-circle';
74 case 'warning':
75 return 'alert-triangle';
76 default:
77 return 'info';
78 }
79 }
80 icon() {
81 return index.h("sc-icon", { name: this.iconName() });
82 }
83 render() {
84 return (index.h(index.Host, { key: '09f038b869c46bb2a469d707488252f854190590', style: { 'scroll-margin-top': this.scrollMargin } }, index.h("div", { key: '88a711dfdc7b39aa0e4238dc47251c453f0ba02b', class: {
85 'alert': true,
86 'alert--primary': this.type === 'primary',
87 'alert--success': this.type === 'success',
88 'alert--info': this.type === 'info',
89 'alert--warning': this.type === 'warning',
90 'alert--danger': this.type === 'danger',
91 'alert--is-rtl': pageAlign.isRtl()
92 }, part: "base", role: "alert", "aria-live": "assertive", "aria-atomic": "true", "aria-hidden": this.open ? 'false' : 'true', hidden: this.open ? false : true, onMouseMove: () => this.handleMouseMove() }, index.h("div", { key: 'c21265104fee4edcd348738b77b46bb70a485f5d', class: "alert__icon", part: "icon" }, index.h("slot", { key: '3d62bb971e893c65526c7adce67a09508b2ed377', name: "icon" }, this.icon())), index.h("div", { key: 'a5cbb772ac33e726ee88fd7e329b3f524975a8d3', class: "alert__text", part: "text" }, index.h("div", { key: 'c737729ab271b6dc6f615378d05b9992f46e3529', class: "alert__title", part: "title" }, index.h("slot", { key: 'd941d1ddb86031f5d5162ce0c5528899911bb418', name: "title" }, this.title)), index.h("div", { key: 'af69867824717107976a3435fe1c53c27a07b7d8', class: "alert__message", part: "message" }, index.h("slot", { key: 'a26ad3def26671c72aff76c0cdec1d6cf8c82080' }))), this.closable && (index.h("span", { key: '5dd48cb13843ad29e028771b18f00a28883b38ca', part: "close", class: "alert__close", onClick: () => this.handleCloseClick() }, index.h("span", { key: '7a11566917da7243f87ebe41fb5ae43c6b2614d8', class: "sr-only" }, "Dismiss"), index.h("svg", { key: '958f27bd6907865e4725fe3645f5e63c479cd3ab', class: "h-5 w-5", "x-description": "Heroicon name: solid/x", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, index.h("path", { key: '8098bc65a08397682f66032aa85e6460277e924f', "fill-rule": "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", "clip-rule": "evenodd" })))))));
93 }
94 get el() { return index.getElement(this); }
95 static get watchers() { return {
96 "open": ["handleOpenChange"]
97 }; }
98 };
99 ScAlert.style = ScAlertStyle0;
100
101 const scBlockUiCss = ":host{display:block;position:var(--sc-block-ui-position, absolute);top:-5px;left:-5px;right:-5px;bottom:-5px;overflow:hidden;display:flex;align-items:center;justify-content:center}:host>*{z-index:1}:host:after{content:\"\";position:var(--sc-block-ui-position, absolute);top:0;left:0;right:0;bottom:0;cursor:wait;background:var(--sc-block-ui-background-color, var(--sc-color-white));opacity:var(--sc-block-ui-opacity, 0.15)}:host.transparent:after{background:transparent}.overlay__content{font-size:var(--sc-font-size-large);font-weight:var(--sc-font-weight-semibold);display:grid;gap:0.5em;text-align:center}";
102 const ScBlockUiStyle0 = scBlockUiCss;
103
104 const ScBlockUi = class {
105 constructor(hostRef) {
106 index.registerInstance(this, hostRef);
107 this.zIndex = 1;
108 this.transparent = undefined;
109 this.spinner = undefined;
110 }
111 render() {
112 return (index.h("div", { key: '9681c9104c4d01ee05c0151c9574f0a33b88b0e7', part: "base", class: { overlay: true, transparent: this.transparent }, style: { 'z-index': this.zIndex.toString() } }, index.h("div", { key: '7232fa02fb8767911454188287a19cbfc0d82af5', class: "overlay__content", part: "content" }, index.h("slot", { key: '2aab74d4d58c9a7b4401576ec4ebf5ab6bdd3740', name: "spinner" }, !this.transparent && this.spinner && index.h("sc-spinner", { key: 'a47feab5434e70c0e93ed35d390d8ac99826a5a7' })), index.h("slot", { key: 'd0d84b1d1fb5295c0fbab68a202e338b40dfac3d' }))));
113 }
114 };
115 ScBlockUi.style = ScBlockUiStyle0;
116
117 const scButtonCss = ":host{display:inline-block;width:auto;cursor:pointer;--primary-color:var(--sc-color-primary-text);--primary-background:var(--sc-color-primary-500)}:host([full]){display:block}::slotted(*){pointer-events:none}.button{box-sizing:border-box;z-index:10;display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--sc-input-border-width);font-family:var(--sc-input-font-family);font-weight:var(--sc-font-weight-semibold);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--sc-input-transition, var(--sc-transition-medium)) background-color, var(--sc-input-transition, var(--sc-transition-medium)) color, var(--sc-input-transition, var(--sc-transition-medium)) border, var(--sc-input-transition, var(--sc-transition-medium)) box-shadow, var(--sc-input-transition, var(--sc-transition-medium)) opacity;cursor:inherit}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.button.button--disabled{cursor:not-allowed}.button.button--disabled *{pointer-events:none}.button.button--disabled .button__label,.button.button--disabled .button__suffix,.button.button--disabled .button__prefix{opacity:0.5}.button ::slotted(.sc--icon){pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button__label{display:flex;align-items:center}.button__label ::slotted(sc-icon){vertical-align:-2px}.button:not(.button--text):not(.button--link){box-shadow:var(--sc-shadow-small)}.button.button--standard.button--default{background-color:var(--sc-button-default-background-color, var(--sc-color-white));border-color:var(--sc-button-default-border-color, var(--sc-color-gray-300));color:var(--sc-button-default-color, var(--sc-color-gray-600))}.button.button--standard.button--default:hover:not(.button--disabled){background-color:var(--sc-button-default-hover-background-color, var(--sc-color-white));border-color:var(--sc-button-default-focus-border-color, var(--primary-background));color:var(--primary-background)}.button.button--standard.button--default:focus:not(.button--disabled){background-color:var(--sc-button-default-focus-background-color, var(--sc-color-white));border-color:var(--sc-button-default-focus-border-color, var(--sc-color-white));color:var(--primary-background);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.button.button--standard.button--default:active:not(.button--disabled){background-color:var(--sc-button-default-active-background-color, var(--sc-color-white));border-color:var(--sc-button-default-active-border-color, var(--sc-color-white));color:var(--primary-background)}.button.button--standard.button--primary{background-color:var(--primary-background);border-color:var(--primary-background);color:var(--primary-color)}.button.button--standard.button--primary:hover:not(.button--disabled){opacity:0.8}.button.button--standard.button--primary:focus:not(.button--disabled){opacity:0.8;color:var(--primary-color);border-color:var(--sc-color-white);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-primary)}.button.button--standard.button--primary:active:not(.button--disabled){background-color:var(--primary-background);border-color:var(--sc-color-white);color:var(--primary-color)}.button.button--standard.button--success{background-color:var(--sc-color-success-500);border-color:var(--sc-color-success-500);color:var(--sc-color-success-text)}.button.button--standard.button--success:hover:not(.button--disabled){background-color:var(--sc-color-success-400);border-color:var(--sc-color-success-400);color:var(--sc-color-success-text)}.button.button--standard.button--success:focus:not(.button--disabled){background-color:var(--sc-color-success-400);border-color:var(--sc-color-success-400);color:var(--sc-color-success-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-success)}.button.button--standard.button--success:active:not(.button--disabled){background-color:var(--sc-color-success-500);border-color:var(--sc-color-success-500);color:var(--sc-color-success-text)}.button.button--standard.button--info{background-color:var(--sc-color-info-500);border-color:var(--sc-color-info-500);color:var(--sc-color-info-text)}.button.button--standard.button--info:hover:not(.button--disabled){background-color:var(--sc-color-info-400);border-color:var(--sc-color-info-400);color:var(--sc-color-info-text)}.button.button--standard.button--info:focus:not(.button--disabled){background-color:var(--sc-color-info-400);border-color:var(--sc-color-info-400);color:var(--sc-color-info-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-info)}.button.button--standard.button--info:active:not(.button--disabled){background-color:var(--sc-color-info-500);border-color:var(--sc-color-info-500);color:var(--sc-color-info-text)}.button.button--standard.button--warning{background-color:var(--sc-color-warning-500);border-color:var(--sc-color-warning-500);color:var(--sc-color-warning-text)}.button.button--standard.button--warning:hover:not(.button--disabled){background-color:var(--sc-color-warning-400);border-color:var(--sc-color-warning-400);color:var(--sc-color-warning-text)}.button.button--standard.button--warning:focus:not(.button--disabled){background-color:var(--sc-color-warning-400);border-color:var(--sc-color-warning-400);color:var(--sc-color-warning-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-warning)}.button.button--standard.button--warning:active:not(.button--disabled){background-color:var(--sc-color-warning-500);border-color:var(--sc-color-warning-500);color:var(--sc-color-warning-text)}.button.button--standard.button--danger{background-color:var(--sc-color-danger-500);border-color:var(--sc-color-danger-500);color:var(--sc-color-danger-text)}.button.button--standard.button--danger:hover:not(.button--disabled){background-color:var(--sc-color-danger-400);border-color:var(--sc-color-danger-400);color:var(--sc-color-danger-text)}.button.button--standard.button--danger:focus:not(.button--disabled){background-color:var(--sc-color-danger-400);border-color:var(--sc-color-danger-400);color:var(--sc-color-danger-text);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-focus-ring-color-danger)}.button.button--standard.button--danger:active:not(.button--disabled){background-color:var(--sc-color-danger-500);border-color:var(--sc-color-danger-500);color:var(--sc-color-danger-text)}.button--outline{background:none;border:solid 1px}.button--outline.button--default{border-color:var(--sc-color-gray-300);color:var(--sc-color-gray-700)}.button--outline.button--default:hover:not(.button--disabled){border-color:var(--primary-background);background-color:var(--primary-background);color:var(--sc-color-white)}.button--outline.button--default:focus:not(.button--disabled){border-color:var(--primary-background);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--primary-background)/var(--sc-focus-ring-alpha)}.button--outline.button--default:active:not(.button--disabled){opacity:0.8;color:var(--sc-color-white)}.button--outline.button--primary{border-color:var(--primary-background);color:var(--primary-background)}.button--outline.button--primary:hover:not(.button--disabled){background-color:var(--primary-background);opacity:0.8;color:var(--sc-color-white)}.button--outline.button--primary:focus:not(.button--disabled){border-color:var(--primary-background);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--primary-background)/var(--sc-focus-ring-alpha)}.button--outline.button--primary:active:not(.button--disabled){border-color:var(--primary-background);background-color:var(--primary-background);opacity:0.9;color:var(--sc-color-white)}.button--outline.button--success{border-color:var(--sc-color-success-500);color:var(--sc-color-success-500)}.button--outline.button--success:hover:not(.button--disabled){background-color:var(--sc-color-success-500);color:var(--sc-color-white)}.button--outline.button--success:focus:not(.button--disabled){border-color:var(--sc-color-success-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-success-500)/var(--sc-focus-ring-alpha)}.button--outline.button--success:active:not(.button--disabled){border-color:var(--sc-color-success-700);background-color:var(--sc-color-success-700);color:var(--sc-color-white)}.button--outline.button--info{border-color:var(--sc-color-gray-500);color:var(--sc-color-gray-500)}.button--outline.button--info:hover:not(.button--disabled){background-color:var(--sc-color-gray-500);color:var(--sc-color-white)}.button--outline.button--info:focus:not(.button--disabled){border-color:var(--sc-color-gray-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-gray-500)/var(--sc-focus-ring-alpha)}.button--outline.button--info:active:not(.button--disabled){border-color:var(--sc-color-gray-700);background-color:var(--sc-color-gray-700);color:var(--sc-color-white)}.button--outline.button--warning{border-color:var(--sc-color-warning-500);color:var(--sc-color-warning-500)}.button--outline.button--warning:hover:not(.button--disabled){background-color:var(--sc-color-warning-500);color:var(--sc-color-white)}.button--outline.button--warning:focus:not(.button--disabled){border-color:var(--sc-color-warning-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-warning-500)/var(--sc-focus-ring-alpha)}.button--outline.button--warning:active:not(.button--disabled){border-color:var(--sc-color-warning-700);background-color:var(--sc-color-warning-700);color:var(--sc-color-white)}.button--outline.button--danger{border-color:var(--sc-color-danger-500);color:var(--sc-color-danger-500)}.button--outline.button--danger:hover:not(.button--disabled){background-color:var(--sc-color-danger-500);color:var(--sc-color-white)}.button--outline.button--danger:focus:not(.button--disabled){border-color:var(--sc-color-danger-500);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-color-danger-500)/var(--sc-focus-ring-alpha)}.button--outline.button--danger:active:not(.button--disabled){border-color:var(--sc-color-danger-700);background-color:var(--sc-color-danger-700);color:var(--sc-color-white)}.button--text{background-color:transparent;border-color:transparent;color:inherit}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sc-color-gray-600)}.button--text:focus:not(.button--disabled){background-color:transparent;border-color:transparent;box-shadow:0}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;box-shadow:0}.button--text.button--caret.button--has-label{padding-right:var(--sc-spacing-xx-small)}.button--text.button--caret.button--has-label .button__label{padding:0 var(--sc-spacing-xx-small) !important}.button--link{background-color:transparent;border-color:transparent;box-shadow:none;color:var(--sc-button-link-color, var(--primary-background));transition:opacity var(--sc-input-transition, var(--sc-transition-medium)) ease;text-decoration:var(--sc-button-link-text-decoration, none)}.button--link.button--has-label.button--small .button__label,.button--link.button--has-label.button--medium .button__label,.button--link.button--has-label.button--large .button__label{padding:0}.button--link:hover:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.75}.button--link:focus:not(.button--disabled){background-color:transparent;border-color:transparent}.button--link:active:not(.button--disabled){background-color:transparent;border-color:transparent}.button--link.button--has-prefix:not(.button--text).button--small,.button--link.button--has-prefix:not(.button--text).button--medium,.button--link.button--has-prefix:not(.button--text).button--large{padding-left:0}.button--link.button--has-prefix:not(.button--text).button--small .button__label,.button--link.button--has-prefix:not(.button--text).button--medium .button__label,.button--link.button--has-prefix:not(.button--text).button--large .button__label{padding-left:var(--sc-spacing-xx-small)}.button--link.button--has-suffix:not(.button--text).button--small,.button--link.button--has-suffix:not(.button--text).button--medium,.button--link.button--has-suffix:not(.button--text).button--large{padding-right:0}.button--link.button--has-suffix:not(.button--text).button--small .button__label,.button--link.button--has-suffix:not(.button--text).button--medium .button__label,.button--link.button--has-suffix:not(.button--text).button--large .button__label{padding-right:var(--sc-spacing-xx-small)}.button--small{font-size:var(--sc-button-font-size-small);height:var(--sc-input-height-small);line-height:calc(var(--sc-input-height-small) - var(--sc-input-border-width) * 2);border-radius:var(--button-border-radius, var(--sc-input-border-radius-small))}.button--medium{font-size:var(--sc-button-font-size-medium);height:var(--sc-input-height-medium);line-height:calc(var(--sc-input-height-medium) - var(--sc-input-border-width) * 2);border-radius:var(--button-border-radius, var(--sc-input-border-radius-medium))}.button--large{font-size:var(--sc-button-font-size-large);height:var(--sc-input-height-large);line-height:calc(var(--sc-input-height-large) - var(--sc-input-border-width) * 2);border-radius:var(--button-border-radius, var(--sc-input-border-radius-large))}.button--full{display:block}.button--pill.button--small{border-radius:var(--sc-input-height-small)}.button--pill.button--medium{border-radius:var(--sc-input-height-medium)}.button--pill.button--large{border-radius:var(--sc-input-height-large)}.button--circle{padding-left:0;padding-right:0}.button--circle.button--small{width:var(--sc-input-height-small);border-radius:50%}.button--circle.button--medium{width:var(--sc-input-height-medium);border-radius:50%}.button--circle.button--large{width:var(--sc-input-height-large);border-radius:50%}.button--circle .button__prefix,.button--circle .button__suffix,.button--circle .button__caret{display:none}.button--caret .button__suffix{display:none}.button--caret .button__caret{display:flex;align-items:center}.button--caret .button__caret svg{width:1em;height:1em}.button--busy{position:relative;cursor:wait}.button--busy .button__prefix,.button--busy .button__label,.button--busy .button__suffix,.button--busy .button__caret{visibility:hidden}.button--busy *{pointer-events:none}.button--loading{position:relative;cursor:wait}.button--loading .button__prefix,.button--loading .button__label,.button--loading .button__suffix,.button--loading .button__caret{visibility:hidden}sc-spinner::part(base){--indicator-color:currentColor;--spinner-size:12px;position:absolute;top:calc(50% - var(--spinner-size) + var(--spinner-size) / 4);left:calc(50% - var(--spinner-size) + var(--spinner-size) / 4)}.button ::slotted(sc-badge){position:absolute;top:0;right:0;transform:translateY(-50%) translateX(50%);pointer-events:none}.button--has-label.button--small .button__label{padding:0 var(--sc-spacing-small)}.button--has-label.button--medium .button__label{padding:0 var(--sc-spacing-medium)}.button--has-label.button--large .button__label{padding:0 var(--sc-spacing-large)}.button--has-prefix:not(.button--text).button--small{padding-left:var(--sc-spacing-x-small)}.button--has-prefix:not(.button--text).button--small .button__label{padding-left:var(--sc-spacing-x-small)}.button--has-prefix:not(.button--text).button--medium{padding-left:var(--sc-spacing-small)}.button--has-prefix:not(.button--text).button--medium .button__label{padding-left:var(--sc-spacing-small)}.button--has-prefix:not(.button--text).button--large{padding-left:var(--sc-spacing-small)}.button--has-prefix:not(.button--text).button--large .button__label{padding-left:var(--sc-spacing-small)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--sc-spacing-x-small)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--sc-spacing-x-small)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--sc-spacing-small)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--sc-spacing-small)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--sc-spacing-small)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--sc-spacing-small)}:host(.sc-button-group__button--first) .button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.sc-button-group__button--inner) .button{border-radius:0}:host(.sc-button-group__button--last) .button{border-top-left-radius:0;border-bottom-left-radius:0}:host(.sc-button-group__button:not(.sc-button-group__button--first)){margin-left:calc(-1 * var(--sc-input-border-width))}:host(.sc-button-group__button:not(.sc-button-group__button--focus,.sc-button-group__button--first,[type=default]):not(:hover,:active,:focus)) .button:after{content:\"\";position:absolute;top:0;left:0;bottom:0;border-left:solid 1px rgba(255, 255, 255, 0.2666666667);mix-blend-mode:lighten}:host(.sc-button-group__button--hover){z-index:1}:host(.sc-button-group__button--focus){z-index:2}@keyframes busy-animation{0%{background-position:200px 0}}.button--is-rtl.button--has-prefix.button--small,.button--is-rtl.button--has-prefix.button--medium,.button--is-rtl.button--has-prefix.button--large{padding-left:0}.button--is-rtl.button--has-prefix.button--small .button__label,.button--is-rtl.button--has-prefix.button--medium .button__label,.button--is-rtl.button--has-prefix.button--large .button__label{padding-left:0;padding-right:var(--sc-spacing-xx-small)}.button--is-rtl.button--has-suffix.button--small,.button--is-rtl.button--has-suffix.button--medium,.button--is-rtl.button--has-suffix.button--large{padding-right:0}.button--is-rtl.button--has-suffix.button--small .button__label,.button--is-rtl.button--has-suffix.button--medium .button__label,.button--is-rtl.button--has-suffix.button--large .button__label{padding-right:0;padding-left:var(--sc-spacing-xx-small)}";
118 const ScButtonStyle0 = scButtonCss;
119
120 const ScButton = class {
121 constructor(hostRef) {
122 index.registerInstance(this, hostRef);
123 this.scBlur = index.createEvent(this, "scBlur", 7);
124 this.scFocus = index.createEvent(this, "scFocus", 7);
125 this.hasFocus = false;
126 this.hasLabel = false;
127 this.hasPrefix = false;
128 this.hasSuffix = false;
129 this.type = 'default';
130 this.size = 'medium';
131 this.caret = false;
132 this.full = false;
133 this.disabled = false;
134 this.loading = false;
135 this.outline = false;
136 this.busy = false;
137 this.pill = false;
138 this.circle = false;
139 this.submit = false;
140 this.name = undefined;
141 this.value = undefined;
142 this.href = undefined;
143 this.target = undefined;
144 this.download = undefined;
145 this.autofocus = undefined;
146 }
147 componentWillLoad() {
148 this.handleSlotChange();
149 }
150 /** Simulates a click on the button. */
151 click() {
152 this.button.click();
153 }
154 /** Sets focus on the button. */
155 focus(options) {
156 this.button.focus(options);
157 }
158 /** Removes focus from the button. */
159 blur() {
160 this.button.blur();
161 }
162 handleSlotChange() {
163 this.hasLabel = !!this.button.children;
164 this.hasPrefix = !!this.button.querySelector('[slot="prefix"]');
165 this.hasSuffix = !!this.button.querySelector('[slot="suffix"]');
166 }
167 handleBlur() {
168 this.hasFocus = false;
169 this.scBlur.emit();
170 }
171 handleFocus() {
172 this.hasFocus = true;
173 this.scFocus.emit();
174 }
175 handleClick(event) {
176 if (this.disabled || this.loading || this.busy) {
177 event.preventDefault();
178 event.stopPropagation();
179 }
180 if (this.submit) {
181 this.submitForm();
182 }
183 }
184 submitForm() {
185 var _a, _b;
186 const form = ((_b = (_a = this.button.closest('sc-form')) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('form')) || this.button.closest('form');
187 // Calling form.submit() seems to bypass the submit event and constraint validation. Instead, we can inject a
188 // native submit button into the form, click it, then remove it to simulate a standard form submission.
189 const button = document.createElement('button');
190 if (form) {
191 button.type = 'submit';
192 button.style.position = 'absolute';
193 button.style.width = '0';
194 button.style.height = '0';
195 button.style.clip = 'rect(0 0 0 0)';
196 button.style.clipPath = 'inset(50%)';
197 button.style.overflow = 'hidden';
198 button.style.whiteSpace = 'nowrap';
199 form.append(button);
200 button.click();
201 button.remove();
202 }
203 }
204 render() {
205 const Tag = this.href ? 'a' : 'button';
206 const interior = (index.h(index.Fragment, { key: 'f24e2a28bcd34f5dc690696251990215748f3b90' }, index.h("span", { key: '3e40c4bd145c10b04baeb7367a34197214a34040', part: "prefix", class: "button__prefix" }, index.h("slot", { key: 'e43d867289b8089f9506dc01bbceaf0c0c6578e7', onSlotchange: () => this.handleSlotChange(), name: "prefix" })), index.h("span", { key: '2fd1716e139d428c0357b30c1257fb142a4c5539', part: "label", class: "button__label" }, index.h("slot", { key: 'fe59ee1a2300225bd4d4b46b104c6604814a1cfb', onSlotchange: () => this.handleSlotChange() })), index.h("span", { key: '52914e300a151d2453e9edcee91f2984426b5460', part: "suffix", class: "button__suffix" }, index.h("slot", { key: 'a3d7be32fdcd5ca13ae78ed5d1a43be01cda91a2', onSlotchange: () => this.handleSlotChange(), name: "suffix" })), this.caret ? (index.h("span", { part: "caret", class: "button__caret" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polyline", { points: "6 9 12 15 18 9" })))) : (''), this.loading || this.busy ? index.h("sc-spinner", { exportparts: "base:spinner" }) : ''));
207 return (index.h(Tag, { key: 'd3ac910cccb0996e75392170ca3f3d5f97aec797', part: "base", class: {
208 'button': true,
209 [`button--${this.type}`]: !!this.type,
210 [`button--${this.size}`]: true,
211 'button--caret': this.caret,
212 'button--circle': this.circle,
213 'button--disabled': this.disabled,
214 'button--focused': this.hasFocus,
215 'button--loading': this.loading,
216 'button--busy': this.busy,
217 'button--pill': this.pill,
218 'button--standard': !this.outline,
219 'button--outline': this.outline,
220 'button--has-label': this.hasLabel,
221 'button--has-prefix': this.hasPrefix,
222 'button--has-suffix': this.hasSuffix,
223 'button--is-rtl': pageAlign.isRtl(),
224 }, href: this.href, target: this.target, download: this.download, autoFocus: this.autofocus, rel: this.target ? 'noreferrer noopener' : undefined, role: "button", "aria-disabled": this.disabled ? 'true' : 'false', "aria-busy": this.busy || this.loading ? 'true' : 'false', tabindex: this.disabled ? '-1' : '0', disabled: this.disabled || this.busy, type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, onBlur: () => this.handleBlur(), onFocus: () => this.handleFocus(), onClick: e => this.handleClick(e) }, interior));
225 }
226 get button() { return index.getElement(this); }
227 };
228 ScButton.style = ScButtonStyle0;
229
230 const scDashboardModuleCss = ":host{display:block;position:relative}.dashboard-module{display:grid;gap:var(--sc-dashboard-module-spacing, 1em)}.heading{font-family:var(--sc-font-sans);display:flex;flex-wrap:wrap;gap:1em;align-items:center;justify-content:space-between}.heading__text{display:grid;flex:1;gap:calc(var(--sc-dashboard-module-spacing, 1em) / 2)}@media screen and (min-width: 720px){.heading{gap:2em}}.heading__title{font-size:var(--sc-dashbaord-module-heading-size, var(--sc-font-size-x-large));font-weight:var(--sc-dashbaord-module-heading-weight, var(--sc-font-weight-bold));line-height:var(--sc-dashbaord-module-heading-line-height, var(--sc-line-height-dense));white-space:nowrap}.heading__description{font-size:var(--sc-font-size-normal);line-height:var(--sc-line-height-dense);opacity:0.85}";
231 const ScDashboardModuleStyle0 = scDashboardModuleCss;
232
233 const ScDashboardModule = class {
234 constructor(hostRef) {
235 index.registerInstance(this, hostRef);
236 this.heading = undefined;
237 this.error = undefined;
238 this.loading = undefined;
239 }
240 render() {
241 return (index.h("div", { key: '3de0cde0fe04ee3424defbce8cfa68025c79e3e0', class: "dashboard-module", part: "base" }, !!this.error && (index.h("sc-alert", { key: 'bc897abbb84b511f7e23b07f9a869319f18f62b2', exportparts: "base:error__base, icon:error__icon, text:error__text, title:error__title, message:error__message", open: !!this.error, type: "danger" }, index.h("span", { key: '1b0bc02a679ae34033f457714f7ce2588729d0c6', slot: "title" }, wp.i18n.__('Error', 'surecart')), this.error)), index.h("div", { key: 'af6d73e44be70a61fea4e1381c1f4b5254956135', class: "heading", part: "heading" }, index.h("div", { key: '9e29217cbb7333ba5df3d3525dd685c0768874be', class: "heading__text", part: "heading-text" }, index.h("div", { key: '7c76e45b97ec123f2bf8ded60867630e6fe6c2a5', class: "heading__title", part: "heading-title" }, index.h("slot", { key: 'f0679df2c2654bade5c39dd72237c02a4d244801', name: "heading", "aria-label": this.heading }, this.heading)), index.h("div", { key: '336a6d29e685ccee3f4a4fbab04f4360c1f14077', class: "heading__description", part: "heading-description" }, index.h("slot", { key: 'bae0d71b143c65fda0e81b16926260ead5496939', name: "description" }))), index.h("slot", { key: '9aefc55963fc5b0daadb91dc4960b7327b375589', name: "end" })), index.h("slot", { key: '898f1e47a2afc0eff3762f50a1ce407a7a392dc7' })));
242 }
243 };
244 ScDashboardModule.style = ScDashboardModuleStyle0;
245
246 const locks = new Set();
247 //
248 // Prevents body scrolling. Keeps track of which elements requested a lock so multiple levels of locking are possible
249 // without premature unlocking.
250 //
251 function lockBodyScrolling(lockingEl) {
252 locks.add(lockingEl);
253 document.body.classList.add('sc-scroll-lock');
254 }
255 //
256 // Unlocks body scrolling. Scrolling will only be unlocked once all elements that requested a lock call this method.
257 //
258 function unlockBodyScrolling(lockingEl) {
259 locks.delete(lockingEl);
260 if (locks.size === 0) {
261 document.body.classList.remove('sc-scroll-lock');
262 }
263 }
264
265 const scDialogCss = ":host{--width:31rem;--header-spacing:var(--sc-spacing-large);--body-spacing:var(--sc-spacing-large);--footer-spacing:var(--sc-spacing-large);display:contents}[hidden]{display:none !important}.dialog{display:flex;align-items:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--sc-z-index-dialog);box-sizing:border-box;text-align:left}.dialog__panel{display:flex;flex-direction:column;z-index:2;width:var(--width);max-width:100vw;max-height:100vh;background-color:var(--sc-panel-background-color);border-radius:var(--sc-border-radius-medium);box-shadow:var(--sc-shadow-x-large);position:relative}.dialog__panel:focus{outline:none}@media screen and (max-width: 420px){.dialog__panel{max-height:80vh}}.dialog--open .dialog__panel{display:flex;opacity:1;transform:none}.dialog__header{flex:0 0 auto;display:flex;border-bottom:1px solid var(--sc-color-gray-300)}.dialog__title{flex:1 1 auto;font:inherit;font-size:var(--sc-font-size-large);line-height:var(--sc-line-height-dense);padding:var(--header-spacing);margin:0}.dialog__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--sc-font-size-x-large);padding:0 calc(var(--header-spacing) / 2);z-index:2}.dialog__body{flex:1 1 auto;padding:var(--body-spacing);overflow:var(--dialog-body-overflow, auto);-webkit-overflow-scrolling:touch}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--footer-spacing)}.dialog__footer ::slotted(sl-button:not(:first-of-type)){margin-left:var(--sc-spacing-x-small)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog__overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--sc-overlay-background-color)}";
266 const ScDialogStyle0 = scDialogCss;
267
268 const ScDialog = class {
269 constructor(hostRef) {
270 index.registerInstance(this, hostRef);
271 this.scRequestClose = index.createEvent(this, "scRequestClose", 7);
272 this.scShow = index.createEvent(this, "scShow", 7);
273 this.scAfterShow = index.createEvent(this, "scAfterShow", 7);
274 this.scHide = index.createEvent(this, "scHide", 7);
275 this.scAfterHide = index.createEvent(this, "scAfterHide", 7);
276 this.scInitialFocus = index.createEvent(this, "scInitialFocus", 7);
277 this.open = false;
278 this.label = '';
279 this.noHeader = false;
280 this.hasFooter = false;
281 }
282 /** Shows the dialog. */
283 async show() {
284 if (this.open) {
285 return undefined;
286 }
287 this.open = true;
288 }
289 /** Hides the dialog */
290 async hide() {
291 if (!this.open) {
292 return undefined;
293 }
294 this.open = false;
295 }
296 requestClose(source) {
297 const slRequestClose = this.scRequestClose.emit(source);
298 if (slRequestClose.defaultPrevented) {
299 const animation = animationRegistry.getAnimation(this.el, 'dialog.denyClose');
300 animationRegistry.animateTo(this.panel, animation.keyframes, animation.options);
301 return;
302 }
303 this.hide();
304 }
305 handleKeyDown(event) {
306 if (event.key === 'Escape') {
307 event.stopPropagation();
308 this.requestClose('keyboard');
309 }
310 }
311 async handleOpenChange() {
312 if (this.open) {
313 // Show
314 this.scShow.emit();
315 lockBodyScrolling(this.el);
316 // When the dialog is shown, Safari will attempt to set focus on whatever element has autofocus. This can cause
317 // the dialogs's animation to jitter (if it starts offscreen), so we'll temporarily remove the attribute, call
318 // `focus({ preventScroll: true })` ourselves, and add the attribute back afterwards.
319 //
320 // Related: https://github.com/shoelace-style/shoelace/issues/693
321 //
322 const autoFocusTarget = this.el.querySelector('[autofocus]');
323 if (autoFocusTarget) {
324 autoFocusTarget.removeAttribute('autofocus');
325 }
326 await Promise.all([animationRegistry.stopAnimations(this.dialog), animationRegistry.stopAnimations(this.overlay)]);
327 this.dialog.hidden = false;
328 // Set initial focus
329 requestAnimationFrame(() => {
330 const slInitialFocus = this.scInitialFocus.emit();
331 if (!slInitialFocus.defaultPrevented) {
332 // Set focus to the autofocus target and restore the attribute
333 if (autoFocusTarget) {
334 autoFocusTarget.focus({ preventScroll: true });
335 }
336 else {
337 this.panel.focus({ preventScroll: true });
338 }
339 }
340 // Restore the autofocus attribute
341 if (autoFocusTarget) {
342 autoFocusTarget.setAttribute('autofocus', '');
343 }
344 });
345 const panelAnimation = animationRegistry.getAnimation(this.el, 'dialog.show');
346 const overlayAnimation = animationRegistry.getAnimation(this.el, 'dialog.overlay.show');
347 await Promise.all([animationRegistry.animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options), animationRegistry.animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)]);
348 this.scAfterShow.emit();
349 }
350 else {
351 // Hide
352 this.scHide.emit();
353 await Promise.all([animationRegistry.stopAnimations(this.dialog), animationRegistry.stopAnimations(this.overlay)]);
354 const panelAnimation = animationRegistry.getAnimation(this.el, 'dialog.hide');
355 const overlayAnimation = animationRegistry.getAnimation(this.el, 'dialog.overlay.hide');
356 await Promise.all([animationRegistry.animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options), animationRegistry.animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)]);
357 this.dialog.hidden = true;
358 unlockBodyScrolling(this.el);
359 // Restore focus to the original trigger
360 const trigger = this.originalTrigger;
361 if (typeof (trigger === null || trigger === void 0 ? void 0 : trigger.focus) === 'function') {
362 setTimeout(() => trigger.focus());
363 }
364 this.scAfterHide.emit();
365 }
366 }
367 componentDidLoad() {
368 this.hasFooter = !!this.el.querySelector('[slot="footer"]');
369 this.dialog.hidden = !this.open;
370 if (this.open) {
371 lockBodyScrolling(this.el);
372 }
373 }
374 disconnectedCallback() {
375 unlockBodyScrolling(this.el);
376 }
377 render() {
378 return (index.h("div", { key: 'bf1c3df909db24b2f0b03f29142eec5aa4e39420', part: "base", ref: el => (this.dialog = el), class: {
379 'dialog': true,
380 'dialog--open': this.open,
381 'dialog--has-footer': this.hasFooter,
382 }, onKeyDown: e => this.handleKeyDown(e) }, index.h("div", { key: 'ae54847913977bf52a5e252afd10fe5ad8695d41', part: "overlay", class: "dialog__overlay", onClick: e => {
383 e.preventDefault();
384 e.stopImmediatePropagation();
385 this.requestClose('overlay');
386 }, ref: el => (this.overlay = el), tabindex: "-1" }), index.h("div", { key: '10454310bc9761ad49069ca723e81e2ef7320018', part: "panel", class: "dialog__panel", role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? 'false' : 'true', "aria-label": this.noHeader || this.label, "aria-labelledby": !this.noHeader || 'title', ref: el => (this.panel = el), tabindex: "0" }, !this.noHeader && (index.h("header", { key: 'b0d7e31944394b067c44c2a400b08fb391d072d0', part: "header", class: "dialog__header" }, index.h("h2", { key: 'b4e9f1d7f6d720d6b9553ec62adc415a84d50ce0', part: "title", class: "dialog__title", id: "title" }, index.h("slot", { key: '5d747d98d228a81c53833e77714dfa5ce342b126', name: "label" }, " ", this.label.length > 0 ? this.label : String.fromCharCode(65279), " ")), index.h("sc-button", { key: '49040b90d1b12a682cbdce414b1b569a461611dc', class: "dialog__close", type: "text", circle: true, part: "close-button", exportparts: "base:close-button__base", onClick: e => {
387 e.preventDefault();
388 e.stopImmediatePropagation();
389 this.requestClose('close-button');
390 } }, index.h("sc-icon", { key: '17961c645c9f85a29ad1c666d5213325c09eebd6', name: "x", label: wp.i18n.__('Close', 'surecart') })))), index.h("div", { key: 'd95e32e3802cc9e9aeac56684226c6dc6d6381bc', part: "body", class: "dialog__body" }, index.h("slot", { key: '6effdd4289157ea1b1664e7eab5af571088d8f38' })), index.h("footer", { key: 'ffadaae7b1cb69f46ec5276a8e9682123674546f', part: "footer", class: "dialog__footer" }, index.h("slot", { key: '3eb44e52095e42a41f03a603577750998ed3e7c8', name: "footer" })))));
391 }
392 get el() { return index.getElement(this); }
393 static get watchers() { return {
394 "open": ["handleOpenChange"]
395 }; }
396 };
397 animationRegistry.setDefaultAnimation('dialog.show', {
398 keyframes: [
399 { opacity: 0, transform: 'scale(0.8)' },
400 { opacity: 1, transform: 'scale(1)' },
401 ],
402 options: { duration: 150, easing: 'ease' },
403 });
404 animationRegistry.setDefaultAnimation('dialog.hide', {
405 keyframes: [
406 { opacity: 1, transform: 'scale(1)' },
407 { opacity: 0, transform: 'scale(0.8)' },
408 ],
409 options: { duration: 150, easing: 'ease' },
410 });
411 animationRegistry.setDefaultAnimation('dialog.denyClose', {
412 keyframes: [{ transform: 'scale(1)' }, { transform: 'scale(1.02)' }, { transform: 'scale(1)' }],
413 options: { duration: 150 },
414 });
415 animationRegistry.setDefaultAnimation('dialog.overlay.show', {
416 keyframes: [{ opacity: 0 }, { opacity: 1 }],
417 options: { duration: 150 },
418 });
419 animationRegistry.setDefaultAnimation('dialog.overlay.hide', {
420 keyframes: [{ opacity: 1 }, { opacity: 0 }],
421 options: { duration: 150 },
422 });
423 ScDialog.style = ScDialogStyle0;
424
425 const scFlexCss = ":host{display:block;--spacing:var(--sc-spacing-small)}.flex{display:flex;gap:var(--sc-flex-column-gap, var(--spacing));justify-content:var(--sc-flex-space-between, space-between)}.justify-flex-start{justify-content:flex-start}.justify-flex-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-space-between{justify-content:space-between}.justify-space-around{justify-content:space-around}.justify-space-evenly{justify-content:space-evenly}.wrap-wrap{flex-wrap:wrap}.wrap-no-wrap{flex-wrap:no-wrap}.align-flex-start{align-items:flex-start}.align-flex-end{align-items:flex-end}.align-center{align-items:center}.align-baseline{align-items:baseline}.align-stretch{align-items:stretch}.direction-row{flex-direction:row}.direction-row-reverse{flex-direction:row-reverse}.direction-column{flex-direction:column}.direction-column-reverse{flex-direction:column-reverse}@media (max-width: 480px){.stack-mobile{flex-direction:column}}@media (max-width: 768px){.stack-tablet{flex-direction:column}}@media (max-width: 1180px){.stack-desktop{flex-direction:column}}";
426 const ScFlexStyle0 = scFlexCss;
427
428 const ScFlex = class {
429 constructor(hostRef) {
430 index.registerInstance(this, hostRef);
431 this.alignItems = undefined;
432 this.justifyContent = undefined;
433 this.flexDirection = undefined;
434 this.columnGap = undefined;
435 this.flexWrap = undefined;
436 this.stack = undefined;
437 }
438 render() {
439 return (index.h("div", { key: 'fe79ec5e2b745f72291050f684e1e8755f824b41', part: "base", class: {
440 flex: true,
441 ...(this.justifyContent ? { [`justify-${this.justifyContent}`]: true } : {}),
442 ...(this.alignItems ? { [`align-${this.alignItems}`]: true } : {}),
443 ...(this.flexDirection ? { [`direction-${this.flexDirection}`]: true } : {}),
444 ...(this.columnGap ? { [`column-gap-${this.columnGap}`]: true } : {}),
445 ...(this.flexWrap ? { [`wrap-${this.flexWrap}`]: true } : {}),
446 ...(this.stack ? { [`stack-${this.stack}`]: true } : {}),
447 } }, index.h("slot", { key: '9772fa51d4c6e255454cc9feae4850805e21d30c' })));
448 }
449 };
450 ScFlex.style = ScFlexStyle0;
451
452 const ScFormatDate = class {
453 constructor(hostRef) {
454 index.registerInstance(this, hostRef);
455 this.locale = undefined;
456 this.date = new Date();
457 this.weekday = undefined;
458 this.era = undefined;
459 this.year = undefined;
460 this.month = undefined;
461 this.day = undefined;
462 this.hour = undefined;
463 this.minute = undefined;
464 this.second = undefined;
465 this.timeZoneName = undefined;
466 this.timeZone = undefined;
467 this.hourFormat = 'auto';
468 this.type = 'date';
469 }
470 render() {
471 const dateString = this.type === 'timestamp' ? parseInt(this.date.toString()) * 1000 : this.date;
472 const date = new Date(dateString);
473 const hour12 = this.hourFormat === 'auto' ? undefined : this.hourFormat === '12';
474 // Check for an invalid date
475 if (isNaN(date.getMilliseconds())) {
476 return;
477 }
478 return new Intl.DateTimeFormat(this.locale, {
479 weekday: this.weekday,
480 era: this.era,
481 year: this.year,
482 month: this.month,
483 day: this.day,
484 hour: this.hour,
485 minute: this.minute,
486 second: this.second,
487 timeZoneName: this.timeZoneName,
488 timeZone: this.timeZone,
489 hour12: hour12,
490 }).format(date);
491 }
492 };
493
494 const UNIT_TYPES = {
495 kg: 'kilogram',
496 lb: 'pound',
497 g: 'gram',
498 oz: 'ounce',
499 };
500 const ScFormatNumber = class {
501 constructor(hostRef) {
502 index.registerInstance(this, hostRef);
503 this.value = 0;
504 this.locale = undefined;
505 this.type = 'decimal';
506 this.noGrouping = false;
507 this.currency = 'USD';
508 this.currencyDisplay = 'symbol';
509 this.minimumIntegerDigits = undefined;
510 this.minimumFractionDigits = null;
511 this.maximumFractionDigits = undefined;
512 this.minimumSignificantDigits = undefined;
513 this.maximumSignificantDigits = undefined;
514 this.noConvert = undefined;
515 this.unit = 'lb';
516 }
517 render() {
518 if (isNaN(this.value)) {
519 return '';
520 }
521 const lang = navigator.language || (navigator === null || navigator === void 0 ? void 0 : navigator.browserLanguage) || (navigator.languages || ['en'])[0];
522 // maybe convert zero decimal currencies.
523 const value = this.noConvert || this.type !== 'currency' ? this.value : currency.maybeConvertAmount(this.value, this.currency.toUpperCase());
524 // decide how many decimal places to use.
525 const minimumFractionDigits = value % 1 == 0 ? 0 : 2;
526 return new Intl.NumberFormat(this.locale || lang, {
527 style: this.type,
528 currency: this.currency.toUpperCase(),
529 currencyDisplay: this.currencyDisplay,
530 useGrouping: !this.noGrouping,
531 minimumIntegerDigits: this.minimumIntegerDigits,
532 minimumFractionDigits: this.minimumFractionDigits !== null ? this.minimumFractionDigits : minimumFractionDigits,
533 maximumFractionDigits: this.maximumFractionDigits,
534 minimumSignificantDigits: this.minimumSignificantDigits,
535 maximumSignificantDigits: this.maximumSignificantDigits,
536 unit: UNIT_TYPES[this.unit],
537 }).format(value);
538 }
539 };
540
541 const iconFiles = new Map();
542 const requestIcon = (url) => {
543 if (iconFiles.has(url)) {
544 return iconFiles.get(url);
545 }
546 else {
547 const request = fetch(url).then(async (response) => {
548 if (response.ok) {
549 const div = document.createElement('div');
550 div.innerHTML = await response.text();
551 const svg = div.firstElementChild;
552 return {
553 ok: response.ok,
554 status: response.status,
555 svg: svg && svg.tagName.toLowerCase() === 'svg' ? svg.outerHTML : '',
556 };
557 }
558 else {
559 return {
560 ok: response.ok,
561 status: response.status,
562 svg: null,
563 };
564 }
565 });
566 iconFiles.set(url, request);
567 return request;
568 }
569 };
570
571 const scIconCss = ":host{--width:1em;--height:1em;display:inline-block;width:var(--width);height:var(--height);contain:strict;box-sizing:content-box !important}.icon,svg{display:block;height:100%;width:100%;stroke-width:var(--sc-icon-stroke-width, 2px)}";
572 const ScIconStyle0 = scIconCss;
573
574 /**
575 * The icon's label used for accessibility.
576 */
577 const LABEL_MAPPINGS = {
578 'chevron-down': wp.i18n.__('Open', 'surecart'),
579 'chevron-up': wp.i18n.__('Close', 'surecart'),
580 'chevron-right': wp.i18n.__('Next', 'surecart'),
581 'chevron-left': wp.i18n.__('Previous', 'surecart'),
582 'arrow-right': wp.i18n.__('Next', 'surecart'),
583 'arrow-left': wp.i18n.__('Previous', 'surecart'),
584 'arrow-down': wp.i18n.__('Down', 'surecart'),
585 'arrow-up': wp.i18n.__('Up', 'surecart'),
586 'alert-circle': wp.i18n.__('Alert', 'surecart'),
587 };
588 const parser = new DOMParser();
589 const ScIcon = class {
590 constructor(hostRef) {
591 index.registerInstance(this, hostRef);
592 this.scLoad = index.createEvent(this, "scLoad", 7);
593 this.svg = '';
594 this.name = undefined;
595 this.src = undefined;
596 this.label = undefined;
597 this.library = 'default';
598 }
599 /** @internal Fetches the icon and redraws it. Used to handle library registrations. */
600 redraw() {
601 this.setIcon();
602 }
603 componentWillLoad() {
604 this.setIcon();
605 }
606 getLabel() {
607 let label = '';
608 if (this.label) {
609 label = (LABEL_MAPPINGS === null || LABEL_MAPPINGS === void 0 ? void 0 : LABEL_MAPPINGS[this.label]) || this.label;
610 }
611 else if (this.name) {
612 label = ((LABEL_MAPPINGS === null || LABEL_MAPPINGS === void 0 ? void 0 : LABEL_MAPPINGS[this.name]) || this.name).replace(/-/g, ' ');
613 }
614 else if (this.src) {
615 label = this.src.replace(/.*\//, '').replace(/-/g, ' ').replace(/\.svg/i, '');
616 }
617 return label;
618 }
619 async setIcon() {
620 const library$1 = library.getIconLibrary(this.library);
621 const url = this.getUrl();
622 if (url) {
623 try {
624 const file = await requestIcon(url);
625 if (url !== this.getUrl()) {
626 // If the url has changed while fetching the icon, ignore this request
627 return;
628 }
629 else if (file.ok) {
630 const doc = parser.parseFromString(file.svg, 'text/html');
631 const svgEl = doc.body.querySelector('svg');
632 if (svgEl) {
633 if (library$1 && library$1.mutator) {
634 library$1.mutator(svgEl);
635 }
636 this.svg = svgEl.outerHTML;
637 this.scLoad.emit();
638 }
639 else {
640 this.svg = '';
641 console.error({ status: file === null || file === void 0 ? void 0 : file.status });
642 }
643 }
644 else {
645 this.svg = '';
646 console.error({ status: file === null || file === void 0 ? void 0 : file.status });
647 }
648 }
649 catch {
650 console.error({ status: -1 });
651 }
652 }
653 else if (this.svg) {
654 // If we can't resolve a URL and an icon was previously set, remove it
655 this.svg = '';
656 }
657 }
658 getUrl() {
659 const library$1 = library.getIconLibrary(this.library);
660 if (this.name && library$1) {
661 return library$1.resolver(this.name);
662 }
663 else {
664 return this.src;
665 }
666 }
667 render() {
668 return index.h("div", { key: 'deedb35b3e492ab36508a8a896e3089f2e11626b', part: "base", class: "icon", role: "img", "aria-label": this.getLabel(), innerHTML: this.svg });
669 }
670 static get assetsDirs() { return ["icon-assets"]; }
671 static get watchers() { return {
672 "name": ["setIcon"],
673 "src": ["setIcon"],
674 "library": ["setIcon"]
675 }; }
676 };
677 ScIcon.style = ScIconStyle0;
678
679 const scSkeletonCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{--border-radius:var(--sc-border-radius-pill);--color:var(--sc-skeleton-color, var(--sc-color-gray-300));--sheen-color:var(--sc-skeleton-sheen-color, var(--sc-color-gray-400));display:block;position:relative}.skeleton{display:flex;width:100%;height:100%;min-height:1rem}.skeleton__indicator{flex:1 1 auto;background:var(--color);border-radius:var(--border-radius)}.skeleton--sheen .skeleton__indicator{background:linear-gradient(270deg, var(--sheen-color), var(--color), var(--color), var(--sheen-color));background-size:400% 100%;background-size:400% 100%;animation:sheen 3s ease-in-out infinite}.skeleton--pulse .skeleton__indicator{animation:pulse 2s ease-in-out 0.5s infinite}@keyframes sheen{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}";
680 const ScSkeletonStyle0 = scSkeletonCss;
681
682 const ScSkeleton = class {
683 constructor(hostRef) {
684 index.registerInstance(this, hostRef);
685 this.effect = 'sheen';
686 }
687 render() {
688 return (index.h("div", { key: 'c6a1b8aec59860a3a72fce1b2e77cc4da682932b', part: "base", class: {
689 'skeleton': true,
690 'skeleton--pulse': this.effect === 'pulse',
691 'skeleton--sheen': this.effect === 'sheen',
692 }, "aria-busy": "true", "aria-live": "polite" }, index.h("div", { key: 'e40de9d99b53f149ce5c341ef2b3244be168584b', part: "indicator", class: "skeleton__indicator" })));
693 }
694 };
695 ScSkeleton.style = ScSkeletonStyle0;
696
697 const scSpinnerCss = ":host{--track-color:#0d131e20;--indicator-color:var(--sc-color-primary-500);--stroke-width:2px;--spinner-size:1em;display:inline-block}.spinner{display:inline-block;width:var(--spinner-size);height:var(--spinner-size);border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
698 const ScSpinnerStyle0 = scSpinnerCss;
699
700 const ScSpinner = class {
701 constructor(hostRef) {
702 index.registerInstance(this, hostRef);
703 }
704 render() {
705 return index.h("span", { key: '91d0bfe44be09c74ae7b57a74c80940a80004949', part: "base", class: "spinner", "aria-busy": "true", "aria-live": "polite" });
706 }
707 };
708 ScSpinner.style = ScSpinnerStyle0;
709
710 const ScSubscriptionReactivate = class {
711 constructor(hostRef) {
712 index.registerInstance(this, hostRef);
713 this.scRequestClose = index.createEvent(this, "scRequestClose", 7);
714 this.scRefresh = index.createEvent(this, "scRefresh", 7);
715 this.open = undefined;
716 this.subscription = undefined;
717 this.busy = undefined;
718 this.error = undefined;
719 this.upcomingPeriod = undefined;
720 this.loading = false;
721 }
722 openChanged() {
723 if (this.open) {
724 this.fetchUpcoming();
725 }
726 }
727 async fetchUpcoming() {
728 var _a;
729 this.loading = true;
730 try {
731 this.upcomingPeriod = await fetch$1.apiFetch({
732 method: 'PATCH',
733 path: addQueryArgs.addQueryArgs(`surecart/v1/subscriptions/${(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.id}/upcoming_period`, {
734 skip_product_group_validation: true,
735 expand: ['period.checkout'],
736 }),
737 data: {
738 purge_pending_update: false,
739 },
740 });
741 }
742 catch (e) {
743 this.error = (e === null || e === void 0 ? void 0 : e.message) || wp.i18n.__('Something went wrong', 'surecart');
744 }
745 finally {
746 this.loading = false;
747 }
748 }
749 async reactivateSubscription() {
750 var _a;
751 try {
752 this.error = '';
753 this.busy = true;
754 await fetch$1.apiFetch({
755 path: `surecart/v1/subscriptions/${(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.id}/restore`,
756 method: 'PATCH',
757 });
758 this.scRefresh.emit();
759 this.scRequestClose.emit('close-button');
760 }
761 catch (e) {
762 this.error = (e === null || e === void 0 ? void 0 : e.message) || wp.i18n.__('Something went wrong', 'surecart');
763 }
764 finally {
765 this.busy = false;
766 }
767 }
768 renderLoading() {
769 return (index.h("sc-flex", { flexDirection: "column", style: { gap: '1em' } }, index.h("sc-skeleton", { style: { width: '20%', display: 'inline-block' } }), index.h("sc-skeleton", { style: { width: '60%', display: 'inline-block' } }), index.h("sc-skeleton", { style: { width: '40%', display: 'inline-block' } })));
770 }
771 render() {
772 var _a, _b, _c, _d;
773 return (index.h("sc-dialog", { key: '78928fb1f9c14597eadcdbaa32e183d18d40fbdb', noHeader: true, open: this.open, style: { '--width': '600px', '--body-spacing': 'var(--sc-spacing-xxx-large)' } }, index.h("sc-dashboard-module", { key: '06568dfb4a28e5670555be81b1e7fdfb03153196', loading: this.loading, heading: wp.i18n.__('Resubscribe', 'surecart'), class: "subscription-reactivate", error: this.error, style: { '--sc-dashboard-module-spacing': '1em' } }, this.loading ? (this.renderLoading()) : (index.h(index.Fragment, null, index.h("div", { slot: "description" }, index.h("sc-alert", { open: true, type: "warning", title: wp.i18n.__('Confirm Charge', 'surecart') }, wp.i18n.__('You will be charged', 'surecart'), ' ', index.h("sc-format-number", { type: "currency", value: (_b = (_a = this.upcomingPeriod) === null || _a === void 0 ? void 0 : _a.checkout) === null || _b === void 0 ? void 0 : _b.amount_due, currency: (_c = this.subscription) === null || _c === void 0 ? void 0 : _c.currency }), ' ', wp.i18n.__('immediately for your subscription.', 'surecart')), index.h("sc-text", { style: {
774 '--font-size': 'var(--sc-font-size-medium)',
775 '--color': 'var(--sc-input-label-color)',
776 '--line-height': 'var(--sc-line-height-dense)',
777 'margin-top': 'var(--sc-spacing-medium)',
778 } }, wp.i18n.__('Your subscription will be reactivated and will renew automatically on', 'surecart'), ' ', index.h("strong", null, index.h("sc-format-date", { type: "timestamp", date: (_d = this.upcomingPeriod) === null || _d === void 0 ? void 0 : _d.end_at, month: "long", day: "numeric", year: "numeric" })))), index.h("sc-flex", { justifyContent: "flex-start" }, index.h("sc-button", { type: "primary", loading: this.busy, disabled: this.busy, onClick: () => this.reactivateSubscription() }, wp.i18n.__('Yes, Reactivate', 'surecart')), index.h("sc-button", { disabled: this.busy, style: { color: 'var(--sc-color-gray-500)' }, type: "text", onClick: () => this.scRequestClose.emit() }, wp.i18n.__('No, Keep Inactive', 'surecart'))))), this.busy && index.h("sc-block-ui", { key: 'f2441bfdcf892b9a54b23fa2c17c6edec8d52de8' }))));
779 }
780 static get watchers() { return {
781 "open": ["openChanged"]
782 }; }
783 };
784
785 const scTextCss = ":host{display:block;--font-size:var(--font-size, var(--sc-font-size-medium));--font-weight:var(--font-size, var(--sc-font-weight-normal));--line-height:var(--font-size, var(--sc-line-height-medium));--text-align:left;--color:var(--color, inherit)}.text{margin:0;font-size:var(--font-size);font-weight:var(--font-weight);line-height:var(--line-height);text-align:var(--text-align);color:var(--sc-stacked-list-row-text-color, var(--color))}.text.is-truncated{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--is-rtl .text{text-align:right}";
786 const ScTextStyle0 = scTextCss;
787
788 const ScText = class {
789 constructor(hostRef) {
790 index.registerInstance(this, hostRef);
791 this.tag = 'p';
792 this.truncate = false;
793 }
794 render() {
795 const CustomTag = this.tag;
796 return (index.h(CustomTag, { key: 'fed3d8e0241b6f16b58b91b8c49bcc632777bcf3', class: {
797 'text': true,
798 'is-truncated': this.truncate,
799 'text--is-rtl': pageAlign.isRtl()
800 } }, index.h("slot", { key: '767109b735776fbc449dc0025a9c24c4e0fba385' })));
801 }
802 };
803 ScText.style = ScTextStyle0;
804
805 exports.sc_alert = ScAlert;
806 exports.sc_block_ui = ScBlockUi;
807 exports.sc_button = ScButton;
808 exports.sc_dashboard_module = ScDashboardModule;
809 exports.sc_dialog = ScDialog;
810 exports.sc_flex = ScFlex;
811 exports.sc_format_date = ScFormatDate;
812 exports.sc_format_number = ScFormatNumber;
813 exports.sc_icon = ScIcon;
814 exports.sc_skeleton = ScSkeleton;
815 exports.sc_spinner = ScSpinner;
816 exports.sc_subscription_reactivate = ScSubscriptionReactivate;
817 exports.sc_text = ScText;
818
819 //# sourceMappingURL=sc-alert_13.cjs.entry.js.map