@salla.sa/twilight-components 2.14.543 → 2.14.545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-uhJt4caG.js → filepond-B5aWlI3l.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dy-GRHf0.js → filepond-plugin-file-poster-BYq39KHd.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BWIBGLW-.js → filepond-plugin-file-validate-size-Bi3TAsJv.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DEVtMF0l.js → filepond-plugin-file-validate-type-Ck6S5TuZ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DSDoJaLw.js → filepond-plugin-image-edit-DbsdnH5j.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BdZit5hj.js → filepond-plugin-image-exif-orientation-x7TfJR-2.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Z3_zQyYR.js → filepond-plugin-image-preview-CrU7vIRk.js} +1 -1
- package/dist/cjs/helpers-DHdDjm5V.js +340 -0
- package/dist/cjs/{index-Bw3b6O6G.js → index-DGpOR-TH.js} +14 -14
- package/dist/cjs/{intlTelInput-CXe3TkdL.js → intlTelInput-DKAXRecW.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-CO8cFZH7.js → mail-C9D8MHae.js} +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +156 -401
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/{salla-comment-form_9.cjs.entry.js → salla-comment-form_8.cjs.entry.js} +3 -259
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +21 -5
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +14 -73
- package/dist/cjs/salla-rating-modal.cjs.entry.js +7 -22
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +4 -4
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-GTx-kpDm.js → vanilla-picker-DQDSSf6Q.js} +1 -1
- package/dist/collection/collection-manifest.json +12 -14
- package/dist/collection/components/salla-bullet-delivery/helpers.js +3 -0
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +82 -16
- package/dist/collection/components/salla-comments/interfaces.js +0 -12
- package/dist/collection/components/salla-comments/salla-comment-item.js +1 -1
- package/dist/collection/components/salla-comments/salla-comments.js +5 -38
- package/dist/collection/components/salla-delivery-promise/delivery-promise-api.js +1 -1
- package/dist/collection/components/salla-delivery-promise/delivery-promise-intent.js +9 -0
- package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +10 -3
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +16 -119
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +10 -69
- package/dist/components/helpers.js +319 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bullet-delivery.js +82 -327
- package/dist/components/salla-comment-item2.js +1 -1
- package/dist/components/salla-comments.js +1 -40
- package/dist/components/salla-delivery-promise.js +20 -4
- package/dist/components/salla-rating-modal-v22.js +12 -73
- package/dist/components/salla-rating-modal.js +591 -1
- package/dist/esm/{filepond-plugin-file-poster-BTU_WzVu.js → filepond-plugin-file-poster-CkWxCmZT.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-c_09APqP.js → filepond-plugin-file-validate-size-DlWS-oUK.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Dz2Lgh8V.js → filepond-plugin-file-validate-type-mdpFM1TG.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DK7eXs2p.js → filepond-plugin-image-edit-BqPLKgZU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DYBURwn_.js → filepond-plugin-image-exif-orientation-CMqFjPu7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-4WNiH-ie.js → filepond-plugin-image-preview-DjCwk-CI.js} +1 -1
- package/dist/esm/{filepond-BcXR53L3.js → filepond-wd7_MQSV.js} +1 -1
- package/dist/esm/helpers-BDChq2t4.js +319 -0
- package/dist/esm/{index-BW1au-Nh.js → index-CHZfg_a9.js} +14 -14
- package/dist/esm/{intlTelInput-DvPcVtVG.js → intlTelInput-B5Q8rrU9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DmgxDvXL.js → mail-DzAIgzdz.js} +2 -2
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +10 -10
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_2.entry.js +83 -328
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/{salla-comment-form_9.entry.js → salla-comment-form_8.entry.js} +4 -259
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +21 -5
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +3 -3
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_2.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +3 -3
- package/dist/esm/salla-rating-modal-v2.entry.js +14 -73
- package/dist/esm/salla-rating-modal.entry.js +7 -22
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +4 -4
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CDk_knNu.js → vanilla-picker-uNDULydX.js} +1 -1
- package/dist/twilight/{p-df202b1d.entry.js → p-0495bfac.entry.js} +1 -1
- package/dist/twilight/{p-13dbbbdc.entry.js → p-0573a498.entry.js} +1 -1
- package/dist/twilight/{p-b89d8c3c.entry.js → p-06d9e1c5.entry.js} +1 -1
- package/dist/twilight/{p-b1dfc455.entry.js → p-0749cc55.entry.js} +1 -1
- package/dist/twilight/p-0ae39262.entry.js +4 -0
- package/dist/twilight/{p-de83979a.entry.js → p-12836275.entry.js} +1 -1
- package/dist/twilight/p-12f61ae1.entry.js +4 -0
- package/dist/twilight/{p-69f4a089.entry.js → p-1419a93d.entry.js} +1 -1
- package/dist/twilight/{p-baa06c65.entry.js → p-17d49c87.entry.js} +1 -1
- package/dist/twilight/{p-1282e22a.entry.js → p-1ea25389.entry.js} +1 -1
- package/dist/twilight/{p-80c11fae.entry.js → p-2305edcc.entry.js} +1 -1
- package/dist/twilight/{p-10534171.entry.js → p-235d7596.entry.js} +1 -1
- package/dist/twilight/{p-50c0b6fa.entry.js → p-25d9f1b2.entry.js} +1 -1
- package/dist/twilight/{p-16ccbce5.entry.js → p-25f51a7e.entry.js} +1 -1
- package/dist/twilight/{p-3c28560f.entry.js → p-279a1661.entry.js} +1 -1
- package/dist/twilight/{p-ac794ed6.entry.js → p-28248b6b.entry.js} +1 -1
- package/dist/twilight/{p-7afd066a.entry.js → p-2d01a4f5.entry.js} +1 -1
- package/dist/twilight/{p-66c7b9e4.entry.js → p-2d62c947.entry.js} +1 -1
- package/dist/twilight/{p-489d084c.entry.js → p-2db5e829.entry.js} +1 -1
- package/dist/twilight/{p-362792d6.entry.js → p-2de58591.entry.js} +1 -1
- package/dist/twilight/{p-16296dce.entry.js → p-32e3daa3.entry.js} +1 -1
- package/dist/twilight/{p-beb2110d.entry.js → p-345532e5.entry.js} +1 -1
- package/dist/twilight/{p-280e67f0.entry.js → p-346366ba.entry.js} +1 -1
- package/dist/twilight/{p-46399dc8.entry.js → p-35557962.entry.js} +1 -1
- package/dist/twilight/{p-d54acab0.entry.js → p-3672d4f7.entry.js} +1 -1
- package/dist/twilight/{p-315890b5.entry.js → p-37163aef.entry.js} +1 -1
- package/dist/twilight/{p-e184cd72.entry.js → p-391a2ec6.entry.js} +1 -1
- package/dist/twilight/{p-b2b818a5.entry.js → p-3a8be7df.entry.js} +1 -1
- package/dist/twilight/{p-ceb40475.entry.js → p-3f5bc617.entry.js} +1 -1
- package/dist/twilight/{p-cf4efddb.entry.js → p-419499d6.entry.js} +1 -1
- package/dist/twilight/{p-d018fc49.entry.js → p-4ac9a3b6.entry.js} +1 -1
- package/dist/twilight/{p-aa9fb9f5.entry.js → p-5074de7d.entry.js} +1 -1
- package/dist/twilight/{p-65a86613.entry.js → p-51a062cd.entry.js} +1 -1
- package/dist/twilight/p-54e2d320.entry.js +1024 -0
- package/dist/twilight/{p-84679cc1.entry.js → p-5933ba05.entry.js} +1 -1
- package/dist/twilight/{p-4b14e0f8.entry.js → p-5d9a85b0.entry.js} +1 -1
- package/dist/twilight/{p-d7a68f6c.entry.js → p-5ded000f.entry.js} +1 -1
- package/dist/twilight/{p-a3fdec51.entry.js → p-63b01300.entry.js} +1 -1
- package/dist/twilight/{p-677bcf4c.entry.js → p-64efbb2c.entry.js} +1 -1
- package/dist/twilight/{p-feb80402.entry.js → p-67b91397.entry.js} +1 -1
- package/dist/twilight/{p-9b1403fc.entry.js → p-69119c00.entry.js} +1 -1
- package/dist/twilight/{p-6e78ee63.entry.js → p-6c18cc72.entry.js} +1 -1
- package/dist/twilight/{p-1ba8fb02.entry.js → p-6d961d73.entry.js} +1 -1
- package/dist/twilight/{p-64f0c216.entry.js → p-6ff53523.entry.js} +1 -1
- package/dist/twilight/{p-75065cbf.entry.js → p-72ee7071.entry.js} +1 -1
- package/dist/twilight/{p-6d6618f8.entry.js → p-72f54055.entry.js} +1 -1
- package/dist/twilight/{p-3b9dcb0f.entry.js → p-74529abb.entry.js} +1 -1
- package/dist/twilight/{p-664d428e.entry.js → p-766a3291.entry.js} +1 -1
- package/dist/twilight/{p-d3692caf.entry.js → p-788fd019.entry.js} +1 -1
- package/dist/twilight/{p-a15b4245.entry.js → p-82fe9f82.entry.js} +1 -1
- package/dist/twilight/{p-f45f5f91.entry.js → p-832f3a98.entry.js} +1 -1
- package/dist/twilight/{p-89fe5237.entry.js → p-84380d4a.entry.js} +1 -1
- package/dist/twilight/{p-311a905b.entry.js → p-8780a467.entry.js} +1 -1
- package/dist/twilight/{p-7adefcd6.entry.js → p-87e10a68.entry.js} +1 -1
- package/dist/twilight/{p-3cfd4fcd.entry.js → p-88f50d7e.entry.js} +1 -1
- package/dist/twilight/{p-f0a04676.entry.js → p-8fc6e860.entry.js} +1 -1
- package/dist/twilight/{p-cc3a9188.entry.js → p-90e5c3ab.entry.js} +1 -1
- package/dist/twilight/{p-641cc01d.entry.js → p-93aa1b67.entry.js} +1 -1
- package/dist/twilight/{p-a4436d17.entry.js → p-93dabb47.entry.js} +1 -1
- package/dist/twilight/{p-07c013f9.entry.js → p-98108ebe.entry.js} +1 -1
- package/dist/twilight/{p-72960bb3.entry.js → p-989f2adb.entry.js} +1 -1
- package/dist/twilight/{p-4be8900d.entry.js → p-9d224252.entry.js} +1 -1
- package/dist/twilight/p-BDChq2t4.js +4 -0
- package/dist/twilight/{p-D9Y6HNvi.js → p-BPkSO6gd.js} +1 -1
- package/dist/twilight/{p-BUMDIRU5.js → p-BWvO3cE-.js} +1 -1
- package/dist/twilight/{p-BW1au-Nh.js → p-CHZfg_a9.js} +1 -1
- package/dist/twilight/{p-AncUY1nn.js → p-CdgES2Of.js} +1 -1
- package/dist/twilight/{p-DPMPVhgw.js → p-D9VjvNQq.js} +2 -2
- package/dist/twilight/{p-C6nX89oY.js → p-DO7S0QBX.js} +1 -1
- package/dist/twilight/{p-UDPL8zGN.js → p-DtV7npW9.js} +1 -1
- package/dist/twilight/{p-DmgxDvXL.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-UIEwOe70.js → p-PCp-0mbL.js} +1 -1
- package/dist/twilight/{p-BjS2Vb6h.js → p-ZinKLSYw.js} +1 -1
- package/dist/twilight/{p-1c82117c.entry.js → p-a0561bd1.entry.js} +1 -1
- package/dist/twilight/{p-1187210a.entry.js → p-a785b49f.entry.js} +1 -1
- package/dist/twilight/{p-13bf1c47.entry.js → p-aa4daadf.entry.js} +1 -1
- package/dist/twilight/p-ab41d26c.entry.js +4 -0
- package/dist/twilight/{p-87cc2e08.entry.js → p-afb03ee5.entry.js} +1 -1
- package/dist/twilight/{p-caa8d5ae.entry.js → p-b279e0bb.entry.js} +1 -1
- package/dist/twilight/{p-bcee5564.entry.js → p-b33392c6.entry.js} +1 -1
- package/dist/twilight/{p-e1eb70d2.entry.js → p-b38c4e39.entry.js} +1 -1
- package/dist/twilight/{p-26f8a482.entry.js → p-bead6e6f.entry.js} +1 -1
- package/dist/twilight/{p-8643930a.entry.js → p-c26043ff.entry.js} +1 -1
- package/dist/twilight/{p-a7a10dbf.entry.js → p-c287e498.entry.js} +1 -1
- package/dist/twilight/{p-87af932a.entry.js → p-c2fe2dbe.entry.js} +1 -1
- package/dist/twilight/{p-6d3a4c41.entry.js → p-c603722c.entry.js} +1 -1
- package/dist/twilight/{p-edebecb3.entry.js → p-c816b198.entry.js} +1 -1
- package/dist/twilight/{p-f3f9d1fb.entry.js → p-c81bce54.entry.js} +1 -1
- package/dist/twilight/{p-40555637.entry.js → p-c9146d50.entry.js} +1 -1
- package/dist/twilight/{p-5335f307.entry.js → p-c92edd6f.entry.js} +1 -1
- package/dist/twilight/{p-821aa95a.entry.js → p-c948a8a8.entry.js} +1 -1
- package/dist/twilight/{p-93c006fc.entry.js → p-d0d3609c.entry.js} +1 -1
- package/dist/twilight/{p-a38dc391.entry.js → p-d9b0fa64.entry.js} +1 -1
- package/dist/twilight/{p-534e7760.entry.js → p-dd823fde.entry.js} +1 -1
- package/dist/twilight/p-e36f62a9.entry.js +4 -0
- package/dist/twilight/{p-beaab93e.entry.js → p-e5a3b689.entry.js} +1 -1
- package/dist/twilight/{p-c7e980aa.entry.js → p-ec281904.entry.js} +1 -1
- package/dist/twilight/{p-68d6fa66.entry.js → p-f07bbbc7.entry.js} +1 -1
- package/dist/twilight/{p-3ad55c42.entry.js → p-f168109d.entry.js} +1 -1
- package/dist/twilight/{p-e8153a9a.entry.js → p-f1d8729d.entry.js} +1 -1
- package/dist/twilight/{p-2a8f1ed4.entry.js → p-f1dfe18b.entry.js} +1 -1
- package/dist/twilight/{p-c23f7b95.entry.js → p-fb1ad954.entry.js} +1 -1
- package/dist/twilight/{p-c214700a.entry.js → p-ffdf5f92.entry.js} +1 -1
- package/dist/twilight/{p-CMWS1gyZ.js → p-ryHWESoh.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/helpers.d.ts +1 -0
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +14 -4
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +2 -0
- package/dist/types/components/salla-comments/interfaces.d.ts +0 -15
- package/dist/types/components/salla-comments/salla-comments.d.ts +2 -5
- package/dist/types/components/salla-delivery-promise/delivery-promise-intent.d.ts +0 -4
- package/dist/types/components/salla-delivery-promise/interfaces.d.ts +2 -1
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +3 -16
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +2 -10
- package/dist/types/components.d.ts +12 -45
- package/package.json +5 -5
- package/dist/collection/components/salla-verified-review/salla-verified-review.css +0 -162
- package/dist/collection/components/salla-verified-review/salla-verified-review.js +0 -264
- package/dist/components/salla-rating-modal2.js +0 -613
- package/dist/components/salla-verified-review.d.ts +0 -11
- package/dist/components/salla-verified-review.js +0 -325
- package/dist/twilight/p-03d77f90.entry.js +0 -4
- package/dist/twilight/p-4f052df8.entry.js +0 -4
- package/dist/twilight/p-a9674965.entry.js +0 -4
- package/dist/twilight/p-cbe760ce.entry.js +0 -4
- package/dist/twilight/p-e29f28eb.entry.js +0 -1019
- package/dist/types/components/salla-verified-review/salla-verified-review.d.ts +0 -51
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as e}from"./p-
|
|
4
|
+
import{d as e}from"./p-CHZfg_a9.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}var n,i,E={exports:{}},r=n?E.exports:(n=1,E.exports=(i=function(e){var t=e.addFilter,n=e.utils,i=n.Type,E=n.isString,r=n.replaceInString,T=n.guesstimateMimeType,u=n.getExtensionFromFilename,_=n.getFilenameFromURL,o=function(e,t){return e.some((function(e){return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n}))},a=function(e,t,n){if(0===t.length)return!0;var i=function(e){var t="";if(E(e)){var n=_(e),i=u(n);i&&(t=T(i))}else t=e.type;return t}(e);return n?new Promise((function(E,r){n(e,i).then((function(e){o(t,e)?E():r()})).catch(r)})):o(t,i)};return t("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{accept:"acceptedFileTypes"})})),t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;return!n("GET_ALLOW_FILE_TYPE_VALIDATION")||a(e,n("GET_ACCEPTED_FILE_TYPES"))})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,i){if(n("GET_ALLOW_FILE_TYPE_VALIDATION")){var E=n("GET_ACCEPTED_FILE_TYPES"),T=n("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),u=a(e,E,T),_=function(){var e,t=E.map((e=n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"),function(t){return null!==e[t]&&(e[t]||t)})).filter((function(e){return!1!==e})),T=t.filter((function(e,n){return t.indexOf(e)===n}));i({status:{main:n("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:r(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:T.join(", "),allButLastType:T.slice(0,-1).join(", "),lastType:T[T.length-1]})}})};if("boolean"==typeof u)return u?t(e):_();u.then((function(){t(e)})).catch(_)}else t(e)}))})),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:i})),i)),T=t({__proto__:null,default:e(r)},[r]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginFileValidateType 1.2.9
|
|
7
7
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
var c='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>mail</title>\n<path d="M28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-12.685l10.54 4.865c0.888 0.409 1.84 0.613 2.793 0.613s1.907-0.204 2.793-0.615l10.54-4.864zM29.333 9.711l-11.657 5.38c-1.065 0.492-2.288 0.492-3.353 0l-11.656-5.38v-3.044c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';export{c as
|
|
4
|
+
var c='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>mail</title>\n<path d="M28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-12.685l10.54 4.865c0.888 0.409 1.84 0.613 2.793 0.613s1.907-0.204 2.793-0.615l10.54-4.864zM29.333 9.711l-11.657 5.38c-1.065 0.492-2.288 0.492-3.353 0l-11.656-5.38v-3.044c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';export{c as e}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as t}from"./p-BW1au-Nh.js";function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(s){if("default"!==s&&!(s in t)){var e=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,e.get?e:{enumerable:!0,get:function(){return i[s]}})}}))})),Object.freeze(t)}var s,e,n={exports:{}},o=(s||(s=1,e=()=>(()=>{var t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,n={};((i,s)=>{for(var e in s)t(i,e,{get:s[e],enumerable:!0})})(n,{Iti:()=>nt,default:()=>lt});var o=[];for(const t of[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]])o.push({name:"",iso2:t[0],dialCode:t[1],priority:t[2]||0,areaCodes:t[3]||null,nodeById:{},nationalPrefix:t[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var l,r=new Set(o.map((t=>t.iso2))),h=t=>r.has(t),a=o,u="iti__hide",c="iti__v-hide",d="iti__arrow--up",p="iti__globe",f="iti__flag",m="iti__loading",y="iti__country",b="iti__highlight",w="ArrowUp",g="ArrowDown",C="Enter",_="Escape",v={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},I={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},k="auto",$=new Set(["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"]),N="aria-expanded",L="aria-label",x="aria-selected",D="aria-activedescendant",A="aria-haspopup",P="aria-controls",S="aria-hidden",O="aria-autocomplete",T="aria-modal",E={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",searchEmptyState:"No results found",searchSummaryAria:t=>0===t?"No results found":1===t?"1 result found":`${t} results found`},M=t=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia(t).matches,F=()=>M("(max-width: 500px)"),j={allowDropdown:!0,allowedNumberTypes:["MOBILE","FIXED_LINE"],allowNumberExtensions:!1,allowPhonewords:!1,autoPlaceholder:I.POLITE,containerClass:"",countryNameLocale:"en",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",searchInputClass:"",separateDialCode:!1,showFlags:!0,strictMode:!1,useFullscreenPopup:(()=>{if("undefined"!=typeof navigator&&"undefined"!=typeof window){const t=M("(max-height: 600px)"),i=M("(pointer: coarse)");return F()||i&&t}return!1})()},U=t=>JSON.stringify(t),B=t=>Boolean(t)&&"object"==typeof t&&!Array.isArray(t),z=new Set(Object.values(I)),R=t=>{console.warn(`[intl-tel-input] ${t}`)},H=(t,i,s)=>{R(`Option '${t}' must be ${i}; got ${U(s)}. Ignoring.`)},V=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),W=(t,i)=>{const s="an array of ISO2 country code strings";if(!Array.isArray(i))return H(t,s,i),!1;const e=[];for(const n of i){if("string"!=typeof n)return H(t,s,i),!1;const o=n.toLowerCase();h(o)?e.push(n):R(`Invalid country code in '${t}': '${n}'. Skipping.`)}return e},q=t=>t.replace(/\D/g,""),K=(t="")=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),G=t=>Object.keys(t).filter((i=>Boolean(t[i]))).join(" "),X=(t,i,s)=>{const e=document.createElement(t);return i&&Object.entries(i).forEach((([t,i])=>e.setAttribute(t,i))),s&&s.appendChild(e),e},Y=class t{constructor(t,i,s){this.#t=null,this.#i=null,this.#s=null,this.#e=null,this.highlightedItem=null,t.dataset.intlTelInputId=s.toString(),this.telInput=t,this.#n=i,this.#o=s,this.hadInitialPlaceholder=Boolean(t.getAttribute("placeholder")),this.#l=!!this.telInput.closest("[dir=rtl]"),this.#n.separateDialCode&&(this.#r=this.telInput.style.paddingLeft)}#n;#o;#l;#r;#h;#t;#i;#a;#u;#c;#d;#p;#f;#s;#e;static validateInput(t){const i=t?.tagName;if(!Boolean(t)||"object"!=typeof t||"INPUT"!==i||"function"!=typeof t.setAttribute){const i=Object.prototype.toString.call(t);throw new TypeError(`The first argument must be an HTMLInputElement, not ${i}`)}}generateMarkup(t){this.#h=t,this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","tel"),this.telInput.hasAttribute("inputmode")||this.telInput.setAttribute("inputmode","tel");const i=this.#m();this.#y(i),i.appendChild(this.telInput),this.#b(),this.#w(i)}#m(){const{allowDropdown:t,showFlags:i,containerClass:s,useFullscreenPopup:e}=this.#n,n=G({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":i,"iti--inline-dropdown":!e,[s]:Boolean(s)}),o=X("div",{class:n});return this.#l&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}#y(t){const{allowDropdown:i,separateDialCode:s,showFlags:e}=this.#n;if(i||e||s){this.countryContainer=X("div",{class:`iti__country-container ${c}`},t),i?(this.selectedCountry=X("button",{type:"button",class:"iti__selected-country",[N]:"false",[L]:this.#n.i18n.noCountrySelected,[A]:"dialog",[P]:`iti-${this.#o}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=X("div",{class:"iti__selected-country"},this.countryContainer);const e=X("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=X("div",{class:f},e),i&&(this.#u=X("div",{class:"iti__arrow",[S]:"true"},e)),s&&(this.#a=X("div",{class:"iti__selected-dial-code"},this.selectedCountry)),i&&this.#g()}}#C(){const{fixDropdownWidth:t}=this.#n;if(t&&!this.#c.style.width){const t=this.telInput.offsetWidth;t>0&&(this.#c.style.width=`${t}px`)}}#g(){const{fixDropdownWidth:t,useFullscreenPopup:i,countrySearch:s,i18n:e,dropdownContainer:n,containerClass:o}=this.#n;if(this.#c=X("div",{id:`iti-${this.#o}__dropdown-content`,class:`iti__dropdown-content ${u} ${t?"":"iti--flexible-dropdown-width"}`,role:"dialog",[T]:"true"}),this.#l&&this.#c.setAttribute("dir","rtl"),s&&this.#_(),this.countryList=X("ul",{class:"iti__country-list",id:`iti-${this.#o}__country-listbox`,role:"listbox",[L]:e.countryListAriaLabel},this.#c),this.#v(),s&&this.#I(),i||(this.#C(),this.#i=this.#k(),s&&(this.#c.style.height=`${this.#i}px`)),n){const t=G({iti:!0,"iti--container":!0,"iti--fullscreen-popup":i,"iti--inline-dropdown":!i,[o]:Boolean(o)});this.#s=X("div",{class:t}),this.#s.appendChild(this.#c)}else this.countryContainer.appendChild(this.#c)}#_(){const{i18n:t,searchInputClass:i}=this.#n,s=X("div",{class:"iti__search-input-wrapper"},this.#c);this.#d=X("span",{class:"iti__search-icon",[S]:"true"},s),this.#d.innerHTML=`\n <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${S}="true">\n <circle cx="11" cy="11" r="7" />\n <line x1="21" y1="21" x2="16.65" y2="16.65" />\n </svg>`,this.searchInput=X("input",{id:`iti-${this.#o}__search-input`,type:"search",class:`iti__search-input ${i}`,placeholder:t.searchPlaceholder,role:"combobox",[N]:"true",[L]:t.searchPlaceholder,[P]:`iti-${this.#o}__country-listbox`,[O]:"list",autocomplete:"off"},s),this.searchClearButton=X("button",{type:"button",class:`iti__search-clear ${u}`,[L]:t.clearSearchAriaLabel,tabindex:"-1"},s),this.searchClearButton.innerHTML=(()=>{const t=`iti-${this.#o}-clear-mask`;return`\n <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${S}="true" focusable="false">\n <mask id="${t}" maskUnits="userSpaceOnUse">\n <rect width="16" height="16" fill="white" />\n <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />\n </mask>\n <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />\n </svg>`})(),this.#f=X("span",{class:"iti__a11y-text"},this.#c),this.#p=X("div",{class:`iti__no-results ${u}`,[S]:"true"},this.#c),this.#p.textContent=t.searchEmptyState}#b(){this.countryContainer&&(this.#$(),this.countryContainer.classList.remove(c))}#w(t){const{hiddenInput:i}=this.#n;if(i){const s=i(this.telInput.getAttribute("name")||"");if(s.phone){const i=this.telInput.form?.querySelector(`input[name="${s.phone}"]`);i?this.hiddenInput=i:(this.hiddenInput=X("input",{type:"hidden",name:s.phone}),t.appendChild(this.hiddenInput))}if(s.country){const i=this.telInput.form?.querySelector(`input[name="${s.country}"]`);i?this.hiddenInputCountry=i:(this.hiddenInputCountry=X("input",{type:"hidden",name:s.country}),t.appendChild(this.hiddenInputCountry))}}}#v(){const t=document.createDocumentFragment();for(let i=0;i<this.#h.length;i++){const s=this.#h[i],e=G({[y]:!0}),n=X("li",{id:`iti-${this.#o}__item-${s.iso2}`,class:e,tabindex:"-1",role:"option",[x]:"false"});n.dataset.dialCode=s.dialCode,n.dataset.countryCode=s.iso2,s.nodeById[this.#o]=n,this.#n.showFlags&&X("div",{class:`${f} iti__${s.iso2}`},n);const o=X("span",{class:"iti__country-name"},n);o.textContent=`${s.name} `;const l=X("span",{class:"iti__dial-code"},o);this.#l&&l.setAttribute("dir","ltr"),l.textContent=`(+${s.dialCode})`,t.appendChild(n)}this.countryList.appendChild(t)}#$(){if(this.selectedCountry){const t=this.#n.separateDialCode?78:42,i=this.selectedCountry.offsetWidth||this.#N()||t;this.telInput.style.paddingLeft=`${i+6}px`}}static#L(){let t;try{t=window.top.document.body}catch(i){t=document.body}return t}#N(){if(this.telInput.parentNode){const i=t.#L(),s=this.telInput.parentNode.cloneNode(!1);s.style.visibility="hidden",i.appendChild(s);const e=this.countryContainer.cloneNode();s.appendChild(e);const n=this.selectedCountry.cloneNode(!0);e.appendChild(n);const o=n.offsetWidth;return i.removeChild(s),o}return 0}#k(){const i=t.#L();this.#c.classList.remove(u);const s=X("div",{class:"iti iti--inline-dropdown"});s.appendChild(this.#c),s.style.visibility="hidden",i.appendChild(s);const e=this.#c.offsetHeight;return i.removeChild(s),s.style.visibility="",this.#c.classList.add(u),e>0?e:200}#I(){const{i18n:t}=this.#n;this.#f.textContent=t.searchSummaryAria(this.countryList.childElementCount)}filterCountriesByQuery(t){let i;i=""===t?this.#h:((t,i)=>{const s=K(i),e=[],n=[],o=[],l=[],r=[],h=[];for(const i of t)i.iso2===s?e.push(i):i.normalisedName.startsWith(s)?n.push(i):i.normalisedName.includes(s)?o.push(i):s===i.dialCode||s===i.dialCodePlus?l.push(i):i.dialCodePlus.includes(s)?r.push(i):i.initials.includes(s)&&h.push(i);const a=(t,i)=>t.priority-i.priority;return[...e,...n,...o,...l.sort(a),...r.sort(a),...h]})(this.#h,t),this.#x(i)}#D(){const t=this.searchInput.value.trim();this.filterCountriesByQuery(t),this.searchInput.value?this.searchClearButton.classList.remove(u):this.searchClearButton.classList.add(u)}handleSearchChange(){this.#t&&clearTimeout(this.#t),this.#t=setTimeout((()=>{this.#D(),this.#t=null}),100)}handleSearchClear(){this.searchInput.value="",this.searchInput.focus(),this.#D()}scrollCountryListToItem(t){const i=this.countryList,s=i.getBoundingClientRect(),e=t.getBoundingClientRect(),n=e.top-s.top+i.scrollTop;e.top<s.top?i.scrollTop=n:e.bottom>s.bottom&&(i.scrollTop=n-s.height+e.height)}highlightListItem(t,i){const s=this.highlightedItem;if(s&&s.classList.remove(b),this.highlightedItem=t,this.highlightedItem){if(this.highlightedItem.classList.add(b),this.#n.countrySearch){const t=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(D,t)}i&&this.highlightedItem.focus()}}handleUpDownKey(t){let i=t===w?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;!i&&this.countryList.childElementCount>1&&(i=t===w?this.countryList.lastElementChild:this.countryList.firstElementChild),i&&(this.scrollCountryListToItem(i),this.highlightListItem(i,!1))}#A(t){if(this.#e&&this.#e.dataset.countryCode!==t&&(this.#e.setAttribute(x,"false"),this.#e.querySelector(".iti__country-check")?.remove(),this.#e=null),t&&!this.#e){const i=this.countryList.querySelector(`[data-country-code="${t}"]`);i&&(i.setAttribute(x,"true"),X("span",{class:"iti__country-check",[S]:"true"},i).innerHTML=`\n <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${S}="true">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>\n </svg>`,this.#e=i)}}#x(t){this.countryList.replaceChildren();let i=!0;for(const s of t){const t=s.nodeById[this.#o];t&&(this.countryList.appendChild(t),i&&(this.highlightListItem(t,!1),i=!1))}i?(this.highlightListItem(null,!1),this.#p&&this.#p.classList.remove(u)):this.#p&&this.#p.classList.add(u),this.countryList.scrollTop=0,this.#I()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.#n.separateDialCode&&(this.telInput.style.paddingLeft=this.#r);const t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.searchInput=null,this.searchClearButton=null,this.countryList=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null,this.#a=null,this.#u=null,this.#c=null,this.#d=null,this.#p=null,this.#f=null,this.#s=null,this.#e=null;for(const t of this.#h)delete t.nodeById[this.#o];this.#h=null}openDropdown(){const{countrySearch:t,dropdownAlwaysOpen:i,dropdownContainer:s}=this.#n;if(this.#C(),s)this.#P();else{const t=this.#S(),i=this.telInput.offsetHeight+3;t?this.#c.style.top=`${i}px`:this.#c.style.bottom=`${i}px`}if(this.#c.classList.remove(u),this.selectedCountry.setAttribute(N,"true"),t){const t=this.countryList.firstElementChild;t&&(this.highlightListItem(t,!1),this.countryList.scrollTop=0),i||this.searchInput.focus()}this.#u.classList.add(d)}closeDropdown(){const{countrySearch:t,dropdownContainer:i}=this.#n;this.#c.classList.add(u),this.selectedCountry.setAttribute(N,"false"),t&&(this.searchInput.removeAttribute(D),this.highlightedItem&&(this.highlightedItem.classList.remove(b),this.highlightedItem=null)),this.#u.classList.remove(d),i?(this.#s.remove(),this.#s.style.top="",this.#s.style.bottom="",this.#s.style.paddingLeft="",this.#s.style.paddingRight=""):(this.#c.style.top="",this.#c.style.bottom="")}#S(){if(this.#n.dropdownAlwaysOpen)return!0;const t=this.telInput.getBoundingClientRect(),i=window.innerHeight-t.bottom;return i>=this.#i||i>=t.top}#P(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;if(i){if(window.innerWidth>=500){const t=this.telInput.getBoundingClientRect();this.#s.style.paddingLeft=`${t.left}px`,this.#s.style.paddingRight=window.innerWidth-t.right+"px"}}else{const t=this.telInput.getBoundingClientRect();this.#s.style.left=`${t.left}px`,this.#S()?this.#s.style.top=`${t.bottom+3}px`:(this.#s.style.top="unset",this.#s.style.bottom=window.innerHeight-t.top+3+"px")}t.appendChild(this.#s)}isDropdownClosed(){return this.#c.classList.contains(u)}setCountry(t){const{allowDropdown:i,showFlags:s,separateDialCode:e,i18n:n}=this.#n,{name:o,dialCode:l,iso2:r=""}=t;if(i&&this.#A(r),this.selectedCountry){const t=r&&s?`${f} iti__${r}`:`${f} ${p}`;let i,e,h;r?(e=o,i=n.selectedCountryAriaLabel.replace("${countryName}",o).replace("${dialCode}",`+${l}`),h=s?"":'\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'):(e=n.noCountrySelected,i=n.noCountrySelected,h='\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'),this.selectedCountryInner.className=t,this.selectedCountry.setAttribute("title",e),this.selectedCountry.setAttribute(L,i),this.selectedCountryInner.innerHTML=h}e&&(this.#a.textContent=l?`+${l}`:"",this.#$())}},J=new Set(["800","808","870","881","882","883","888","979"]),Q=t=>{const i=q(t).slice(0,3);return t.startsWith("+")&&J.has(i)},Z=(t,i,s,e)=>{let n=t;if(s&&i){const t=`+${e.dialCode}`;n=n.substring(" "===n[t.length]||"-"===n[t.length]?t.length+1:t.length)}return n},tt=new Set(["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"]),it=t=>{const i=q(t);if(i.startsWith("1")&&i.length>=4){const t=i.substring(1,4);return tt.has(t)}return!1},st=class{#O;constructor(t){t&&this.#T(t)}#T(t){/[\u0660-\u0669]/.test(t)?this.#O="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.#O="persian":this.#O="ascii"}denormalise(t){if(!this.#O||"ascii"===this.#O)return t;const i="arabic-indic"===this.#O?1632:1776;return t.replace(/[0-9]/g,(t=>String.fromCharCode(i+Number(t))))}normalise(t){if(!t)return"";if(this.#T(t),"ascii"===this.#O)return t;const i="arabic-indic"===this.#O?1632:1776,s="arabic-indic"===this.#O?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(s,(t=>String.fromCharCode(t.charCodeAt(0)-i+48)))}isAscii(){return!this.#O||"ascii"===this.#O}},et=0,nt=class t{#E;#n;#M;#h;#F;#j;#U;#B;#z;#R;#H;#V;#W;#q;#K;#G;#X;#Y;constructor(t,i={}){this.id=et++,Y.validateInput(t);const s=(t=>{if(void 0===t)return{};if(!B(t)){const i=`The second argument must be an options object; got ${U(t)}. Using defaults.`;return R(i),{}}const i={};for(const[e,n]of Object.entries(t))if(V(j,e))switch(e){case"allowDropdown":case"allowNumberExtensions":case"allowPhonewords":case"countrySearch":case"dropdownAlwaysOpen":case"fixDropdownWidth":case"formatAsYouType":case"formatOnDisplay":case"nationalMode":case"showFlags":case"separateDialCode":case"strictMode":case"useFullscreenPopup":if("boolean"!=typeof n){H(e,"a boolean",n);break}i[e]=n;break;case"autoPlaceholder":if("string"!=typeof n||!z.has(n)){const t=Array.from(z).join(", ");H("autoPlaceholder",`one of ${t}`,n);break}i[e]=n;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if("string"!=typeof n){H(e,"a string",n);break}i[e]=n;break;case"countryOrder":if(null===n)i[e]=n;else{const t=W(e,n);!1!==t&&(i[e]=t)}break;case"customPlaceholder":case"geoIpLookup":case"hiddenInput":case"loadUtils":if(null!==n&&"function"!=typeof n){H(e,"a function or null",n);break}i[e]=n;break;case"dropdownContainer":if(null!==n&&(!(s=n)||"object"!=typeof s||1!==s.nodeType||"string"!=typeof s.tagName||"function"!=typeof s.appendChild)){H("dropdownContainer","an HTMLElement or null",n);break}i[e]=n;break;case"excludeCountries":case"onlyCountries":{const t=W(e,n);!1!==t&&(i[e]=t);break}case"i18n":if(n&&!B(n)){H("i18n","an object",n);break}i[e]=n;break;case"initialCountry":{if("string"!=typeof n){H("initialCountry","a string",n);break}const t=n.toLowerCase();if(t&&t!==k&&!h(t)){H("initialCountry","a valid ISO2 country code or 'auto'",n);break}i[e]=n;break}case"placeholderNumberType":if("string"!=typeof n||!$.has(n)){const t=Array.from($).join(", ");H("placeholderNumberType",`one of ${t}`,n);break}i[e]=n;break;case"allowedNumberTypes":if(null!==n){if(!Array.isArray(n)){H("allowedNumberTypes","an array of number types or null",n);break}let t=!0;for(const i of n)if("string"!=typeof i||!$.has(i)){const s=Array.from($).join(", ");H("allowedNumberTypes",`an array of valid number types (${s})`,i),t=!1;break}t&&(i[e]=n)}else i[e]=null}else R(`Unknown option '${e}'. Ignoring.`);var s;return i})(i);var e;this.#n={...j,...s},(e=this.#n).initialCountry&&(e.initialCountry=e.initialCountry.toLowerCase()),e.onlyCountries?.length&&(e.onlyCountries=e.onlyCountries.map((t=>t.toLowerCase()))),e.excludeCountries?.length&&(e.excludeCountries=e.excludeCountries.map((t=>t.toLowerCase()))),e.countryOrder&&(e.countryOrder=e.countryOrder.map((t=>t.toLowerCase()))),(t=>{t.dropdownAlwaysOpen&&(t.useFullscreenPopup=!1,t.allowDropdown=!0),t.useFullscreenPopup?t.fixDropdownWidth=!1:F()&&(t.fixDropdownWidth=!0),1===t.onlyCountries.length&&(t.initialCountry=t.onlyCountries[0]),t.separateDialCode&&(t.nationalMode=!1),!t.allowDropdown||t.showFlags||t.separateDialCode||(t.nationalMode=!1),t.useFullscreenPopup&&!t.dropdownContainer&&(t.dropdownContainer=document.body),t.i18n={...E,...t.i18n}})(this.#n),this.#E=new Y(t,this.#n,this.id),this.#M="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),this.#q=new st(t.value),this.promise=this.#J(this.#n),this.#h=(t=>{const{onlyCountries:i,excludeCountries:s}=t;return i?.length?a.filter((t=>i.includes(t.iso2))):s?.length?a.filter((t=>!s.includes(t.iso2))):a})(this.#n);const{dialCodes:n,dialCodeMaxLen:o,dialCodeToIso2Map:l}=(t=>{const i=new Set;let s=0;const e={},n=(t,i)=>{if(!t||!i)return;i.length>s&&(s=i.length),e.hasOwnProperty(i)||(e[i]=[]);const n=e[i];n.includes(t)||n.push(t)},o=[...t].sort(((t,i)=>t.priority-i.priority));for(const t of o){i.has(t.dialCode)||i.add(t.dialCode);for(let i=1;i<t.dialCode.length;i++){const s=t.dialCode.substring(0,i);n(t.iso2,s)}if(n(t.iso2,t.dialCode),t.areaCodes){const i=e[t.dialCode][0];for(const s of t.areaCodes){for(let e=1;e<s.length;e++){const o=s.substring(0,e),l=t.dialCode+o;n(i,l),n(t.iso2,l)}n(t.iso2,t.dialCode+s)}}}return{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:e}})(this.#h);this.#U=n,this.#F=o,this.#j=l,this.#B=new Map(this.#h.map((t=>[t.iso2,t]))),this.#Q()}#Z(){const t=this.#E.telInput.value.trim();return this.#q.normalise(t)}#tt(t){this.#E.telInput.value=this.#q.denormalise(t)}#J(t){const{initialCountry:i,geoIpLookup:s,loadUtils:e}=t,n=i===k&&Boolean(s),o=Boolean(e)&&!ot.utils;let l,r;return n?l=new Promise(((t,i)=>{this.#K=t,this.#G=i})):(l=Promise.resolve(void 0),this.#K=()=>{},this.#G=()=>{}),o?r=new Promise(((t,i)=>{this.#X=t,this.#Y=i})):(r=Promise.resolve(void 0),this.#X=()=>{},this.#Y=()=>{}),Promise.all([l,r]).then((()=>{}))}#Q(){this.#z=null,this.#V=new AbortController,this.#it(),this.#E.generateMarkup(this.#h),this.#st(),this.#et(),this.#nt(),this.#n.dropdownAlwaysOpen&&this.#ot()}#it(){((t,i)=>{const{countryNameLocale:s,i18n:e}=i;let n;try{n="undefined"!=typeof Intl&&"function"==typeof Intl.DisplayNames?new Intl.DisplayNames(s,{type:"region"}):null}catch(t){console.error(t),n=null}for(const i of t)i.name=e[i.iso2]||n?.of(i.iso2.toUpperCase())||""})(this.#h,this.#n),((t,i)=>{const{countryOrder:s}=i;t.sort(((t,i)=>{if(s){const e=s.indexOf(t.iso2),n=s.indexOf(i.iso2),o=e>-1,l=n>-1;if(o||l)return o&&l?e-n:o?-1:1}return t.name.localeCompare(i.name)}))})(this.#h,this.#n),(t=>{for(const i of t)i.normalisedName=K(i.name),i.initials=i.normalisedName.split(/[^a-z]/).map((t=>t[0])).join(""),i.dialCodePlus=`+${i.dialCode}`})(this.#h)}#st(t=!1){const i=this.#E.telInput.getAttribute("value"),s=this.#q.normalise(i),e=this.#Z(),n=!s||!s.startsWith("+")||e&&e.startsWith("+")?e:s,o=this.#lt(n),l=it(n),{initialCountry:r,geoIpLookup:a}=this.#n,u=r===k&&a&&!t,c=h(r);o?l?c?this.#rt(r):u||this.#rt("us"):this.#ht(n):c?this.#rt(r):u||this.#rt(""),n&&this.#at(n)}#et(){this.#ut(),this.#n.allowDropdown&&this.#ct(),(this.#E.hiddenInput||this.#E.hiddenInputCountry)&&this.#E.telInput.form&&this.#dt()}#dt(){this.#E.telInput.form?.addEventListener("submit",(()=>{this.#E.hiddenInput&&(this.#E.hiddenInput.value=this.getNumber()),this.#E.hiddenInputCountry&&(this.#E.hiddenInputCountry.value=this.#z?.iso2||"")}),{signal:this.#V.signal})}#ct(){const t=this.#V.signal,i=this.#E.telInput.closest("label");i&&i.addEventListener("click",(t=>{this.#E.isDropdownClosed()?this.#E.telInput.focus():t.preventDefault()}),{signal:t}),this.#E.selectedCountry.addEventListener("click",(()=>{!this.#E.isDropdownClosed()||this.#E.telInput.disabled||this.#E.telInput.readOnly||this.#ot()}),{signal:t}),this.#E.countryContainer.addEventListener("keydown",(t=>{const i=[w,g," ",C];this.#E.isDropdownClosed()&&i.includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.#ot()),"Tab"===t.key&&this.#pt()}),{signal:t})}#nt(){const{loadUtils:t,initialCountry:i,geoIpLookup:s}=this.#n;if(t&&!ot.utils){const i=()=>{ot.attachUtils(t)?.catch((()=>{}))};ot.documentReady()?i():window.addEventListener("load",i,{signal:this.#V.signal})}else this.#X();i===k&&s&&(this.#z?.iso2?this.#K():this.#ft())}#ft(){ot.autoCountry?this.#mt():(this.#E.selectedCountryInner.classList.add(m),ot.startedLoadingAutoCountry||(ot.startedLoadingAutoCountry=!0,"function"!=typeof this.#n.geoIpLookup)||this.#n.geoIpLookup(((i="")=>{this.#E.selectedCountryInner.classList.remove(m);const s=i.toLowerCase();h(s)?(ot.autoCountry=s,setTimeout((()=>t.forEachInstance("handleAutoCountry")))):t.forEachInstance("handleAutoCountryFailure")}),(()=>{this.#E.selectedCountryInner.classList.remove(m),t.forEachInstance("handleAutoCountryFailure")})))}#yt(){this.#ot(),this.#E.searchInput.value="+",this.#E.filterCountriesByQuery("")}#ut(){this.#bt(),this.#wt(),this.#gt()}#bt(){const{strictMode:t,formatAsYouType:i,separateDialCode:s,allowDropdown:e,countrySearch:n}=this.#n;let o=!1;v.ALPHA_UNICODE.test(this.#Z())&&(o=!0),this.#E.telInput.addEventListener("input",(l=>{const r=this.#Z();if(this.#M&&"+"===l?.data&&s&&e&&n){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t-1),s=r.substring(t);return this.#tt(i+s),void this.#yt()}this.#ht(r)&&this.#Ct(),l?.data&&v.NON_PLUS_NUMERIC.test(l.data)||"insertFromPaste"===l?.inputType&&r&&!t?o=!0:v.NON_PLUS_NUMERIC.test(r)||(o=!1);const h=l?.detail&&l.detail.isSetNumber,a=this.#q.isAscii();if(i&&!o&&!h&&a){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t).replace(v.NON_PLUS_NUMERIC_GLOBAL,"").length,e="deleteContentForward"===l?.inputType,n=((t,i,s,e,n)=>{const o=s?s.formatNumberAsYouType(t,e.iso2):t,{dialCode:l}=e;return n&&"+"!==i.charAt(0)&&o.includes(`+${l}`)?(o.split(`+${l}`)[1]||"").trim():o})(this.#_t(),r,ot.utils,this.#z??{},s),o=((t,i,s,e)=>{if(0===s&&!e)return 0;let n=0;for(let s=0;s<i.length;s++){if(/[+0-9]/.test(i[s])&&n++,n===t&&!e)return s+1;if(e&&n===t+1)return s}return i.length})(i,n,t,e);this.#tt(n),this.#E.telInput.setSelectionRange(o,o)}if(s&&r.startsWith("+")&&this.#z?.dialCode){const t=Z(r,!0,s,this.#z??{});this.#tt(t)}}),{signal:this.#V.signal})}#wt(){const{strictMode:t,separateDialCode:i,allowDropdown:s,countrySearch:e}=this.#n;(t||i)&&this.#E.telInput.addEventListener("keydown",(n=>{if(n.key&&1===n.key.length&&!n.altKey&&!n.ctrlKey&&!n.metaKey){if(i&&s&&e&&"+"===n.key)return n.preventDefault(),void this.#yt();if(t){const t=this.#Z(),s=!t.startsWith("+")&&0===this.#E.telInput.selectionStart&&"+"===n.key,e=this.#q.normalise(n.key),o=/^[0-9]$/.test(e),l=i?o:s||o,r=this.#E.telInput,h=r.selectionEnd,a=t.slice(0,r.selectionStart),u=t.slice(h),c=this.#_t(a+n.key+u);let d=!1;ot.utils&&this.#R&&(d=ot.utils.getCoreNumber(c,this.#z?.iso2).length>this.#R);const p=this.#vt(c);l&&(!d||null!==p||s)||n.preventDefault()}}}),{signal:this.#V.signal})}#gt(){this.#n.strictMode&&this.#E.telInput.addEventListener("paste",(t=>{t.preventDefault();const i=this.#E.telInput,s=i.selectionStart,e=i.selectionEnd,n=this.#Z(),o=n.slice(0,s),l=n.slice(e),r=this.#z?.iso2,h=t.clipboardData.getData("text"),a=this.#q.normalise(h),u=0===s&&e>0,c=!n.startsWith("+")||u,d=a.replace(v.NON_PLUS_NUMERIC_GLOBAL,""),p=d.startsWith("+"),f=d.replace(/\+/g,""),m=p&&c?`+${f}`:f;let y=o+m+l;if(y.length>5){let t=ot.utils.getCoreNumber(y,r);for(;0===t.length&&y.length>0;)y=y.slice(0,-1),t=ot.utils.getCoreNumber(y,r);if(!t)return;if(this.#R&&t.length>this.#R){if(i.selectionEnd!==n.length)return;{const i=t.length-this.#R;y=y.slice(0,y.length-i)}}}this.#tt(y);const b=s+m.length;i.setSelectionRange(b,b),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))}),{signal:this.#V.signal})}#It(t){const i=Number(this.#E.telInput.getAttribute("maxlength"));return i&&t.length>i?t.substring(0,i):t}#kt(t,i={}){const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});this.#E.telInput.dispatchEvent(s)}#ot(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;this.#W=new AbortController,this.#E.openDropdown(),!i&&t&&window.addEventListener("scroll",(()=>this.#pt()),{signal:this.#W.signal}),this.#$t(),this.#kt("open:countrydropdown")}#$t(){const t=this.#W.signal;this.#Nt(t),this.#Lt(t),this.#n.dropdownAlwaysOpen||this.#xt(t),this.#Dt(t),this.#n.countrySearch&&this.#At(t)}#Nt(t){this.#E.countryList.addEventListener("mouseover",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#E.highlightListItem(i,!1)}),{signal:t})}#Lt(t){this.#E.countryList.addEventListener("click",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#Pt(i)}),{signal:t})}#xt(t){const i=t=>{t.target.closest(`#iti-${this.id}__dropdown-content`)||this.#pt()};setTimeout((()=>{document.documentElement.addEventListener("click",i,{signal:t})}),0)}#Dt(t){let i="",s=null;document.addEventListener("keydown",(t=>{[w,g,C,_].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key===w||t.key===g?this.#E.handleUpDownKey(t.key):t.key!==C||t.isComposing?t.key===_&&(this.#pt(),this.#E.selectedCountry.focus()):this.#St()),!this.#n.countrySearch&&v.HIDDEN_SEARCH_CHAR.test(t.key)&&(t.stopPropagation(),s&&clearTimeout(s),i+=t.key.toLowerCase(),this.#Ot(i),s=setTimeout((()=>{i=""}),1e3))}),{signal:t})}#At(t){this.#E.searchInput.addEventListener("input",(()=>this.#E.handleSearchChange()),{signal:t}),this.#E.searchClearButton.addEventListener("click",(()=>this.#E.handleSearchClear()),{signal:t})}#Ot(t){const i=((t,i)=>{const s=K(i);for(const i of t)if(i.normalisedName.startsWith(s))return i;return null})(this.#h,t);if(i){const t=i.nodeById[this.id];this.#E.highlightListItem(t,!1),this.#E.scrollCountryListToItem(t)}}#St(){this.#E.highlightedItem&&this.#Pt(this.#E.highlightedItem)}#at(t){const{formatOnDisplay:i,nationalMode:s,separateDialCode:e}=this.#n;let n=t;if(i&&ot.utils&&this.#z){const i=Q(t),o=s&&!i||!n.startsWith("+")&&!e,{NATIONAL:l,INTERNATIONAL:r}=ot.utils.numberFormat,h=o?l:r;n=ot.utils.formatNumber(n,this.#z?.iso2,h)}n=this.#Tt(n),this.#tt(n)}#ht(t){const i=this.#vt(t);return null!==i&&this.#rt(i)}#Et(t){const i=this.#z?.dialCode,s=this.#z?.nationalPrefix;return t.startsWith("+")||!i?t:`+${i}${s&&t.startsWith(s)&&!this.#n.separateDialCode?t.substring(1):t}`}#vt(t){const i=t.indexOf("+");let s=i?t.substring(i):t;const e=this.#z?.iso2,n=this.#z?.dialCode;s=this.#Et(s);const o=this.#lt(s,!0),l=q(s);if(o){const t=q(o),i=this.#j[t];if(1===i.length)return i[0]===e?null:i[0];if(!e&&this.#H&&i.includes(this.#H))return this.#H;if("1"===n&&it(l))return null;const s=this.#z?.areaCodes,r=this.#z?.priority;if(s){const t=s.map((t=>`${n}${t}`));for(const i of t)if(l.startsWith(i))return null}const h=s&&!(0===r)&&l.length>t.length;if((!e||!i.includes(e)||h)&&e!==i[0])return i[0]}else{if(s.startsWith("+")&&l.length){const t=this.#z?.dialCode||"";return t&&t.startsWith(l)?null:""}if((!s||"+"===s)&&!e&&this.#H)return this.#H}return null}#rt(t){const i=this.#z?.iso2||"";return this.#z=t?this.#B.get(t):null,this.#z?.iso2&&(this.#H=this.#z.iso2),this.#E.setCountry(this.#z??{}),this.#Mt(),this.#Ft(),i!==t}#Ft(){const{strictMode:t,placeholderNumberType:i,allowedNumberTypes:s}=this.#n,e=this.#z?.iso2;if(t&&ot.utils)if(e){let t=ot.utils.getExampleNumber(e,!1,ot.utils.numberType[i],!0),n=t;for(;ot.utils.isPossibleNumber(t,e,s);)n=t,t+="0";const o=ot.utils.getCoreNumber(n,e);this.#R=o.length,"by"===e&&(this.#R=o.length+1)}else this.#R=null}#Mt(){const{autoPlaceholder:t,placeholderNumberType:i,nationalMode:s,customPlaceholder:e}=this.#n,n=t===I.AGGRESSIVE||!this.#E.hadInitialPlaceholder&&t===I.POLITE;if(ot.utils&&n){const t=ot.utils.numberType[i];let n=this.#z?.iso2?ot.utils.getExampleNumber(this.#z.iso2,s,t):"";n=this.#Tt(n),"function"==typeof e&&(n=e(n,this.#z??{})),this.#E.telInput.setAttribute("placeholder",n)}}#Pt(t){const i=this.#rt(t.dataset.countryCode);if(this.#pt(),this.#jt(t.dataset.dialCode),this.#n.formatOnDisplay){const t=this.#Z();this.#at(t)}this.#E.telInput.focus(),i&&this.#Ct()}#pt(t){this.#E.isDropdownClosed()||this.#n.dropdownAlwaysOpen&&!t||(this.#E.closeDropdown(),this.#W.abort(),this.#W=null,this.#kt("close:countrydropdown"))}#jt(t){const i=this.#Z(),s=`+${t}`;let e;if(i.startsWith("+")){const t=this.#lt(i);e=t?i.replace(t,s):s,this.#tt(e)}}#lt(t,i){let s="";if(t.startsWith("+")){let e="",n=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(/[0-9]/.test(l)){if(e+=l,!Boolean(this.#j[e]))break;if(this.#U.has(e)){if(s=t.substring(0,o+1),n=!0,!i)break}else i&&n&&(s=t.substring(0,o+1));if(e.length===this.#F)break}}}return s}#_t(t){const i=t?this.#q.normalise(t):this.#Z(),s=this.#z?.dialCode;let e;const n=q(i);return e=this.#n.separateDialCode&&!i.startsWith("+")&&s&&n?`+${s}`:"",e+i}#Tt(t){const i=Boolean(this.#lt(t)),s=Z(t,i,this.#n.separateDialCode,this.#z??{});return this.#It(s)}#Ut(){const t=this.#z;if(!t)return{};const{iso2:i,dialCode:s,name:e}=t;return{iso2:i,dialCode:s,name:e}}#Ct(){const t=this.#Ut();this.#kt("countrychange",t)}#mt(){this.#E.telInput?this.#n.initialCountry===k&&ot.autoCountry&&(this.#H=ot.autoCountry,this.#z?.iso2||this.#E.selectedCountryInner.classList.contains(p)||this.setCountry(this.#H),this.#K()):this.#K?.()}#Bt(){this.#E.telInput?(this.#st(!0),this.#G()):this.#G?.()}#zt(){if(this.#E.telInput){if(ot.utils){const t=this.#Z();t&&this.#at(t),this.#z?.iso2&&(this.#Mt(),this.#Ft())}this.#X()}else this.#X?.()}#Rt(t){this.#E,this.#Y(t)}destroy(){this.#E.telInput&&(this.#n.allowDropdown&&this.#pt(!0),this.#V.abort(),this.#V=null,this.#E.destroy(),delete ot.instances[this.id])}isActive(){return!!this.#E?.telInput}getExtension(){return ot.utils&&this.#E.telInput?ot.utils.getExtension(this.#_t(),this.#z?.iso2):""}getNumber(t){if(ot.utils&&this.#E.telInput){const i=this.#z?.iso2,s=this.#_t(),e=ot.utils.formatNumber(s,i,t);return this.#q.denormalise(e)}return""}getNumberType(){return ot.utils&&this.#E.telInput?ot.utils.getNumberType(this.#_t(),this.#z?.iso2):-99}getSelectedCountryData(){return this.#Ut()}getValidationError(){if(ot.utils&&this.#E.telInput){const t=this.#z?.iso2;return ot.utils.getValidationError(this.#_t(),t)}return-99}isValidNumber(){const t=this.#z?.dialCode,i=this.#z?.iso2;if(ot.utils&&this.#E.telInput){const s=this.#_t(),e=ot.utils.getCoreNumber(s,i);if(e){if("44"===t&&"7"===e[0]&&10!==e.length)return!1;if(!v.ALPHA_UNICODE.test(s)&&t){const i=s.startsWith("+")?s.slice(1+t.length):s,n=q(i).length;if(e.length>n)return!1}}}return this.#Ht(!1)}isValidNumberPrecise(){return this.#Ht(!0)}#Vt(t){return ot.utils?ot.utils.isPossibleNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}#Ht(t){if(!ot.utils||!this.#E.telInput)return null;const{allowNumberExtensions:i,allowPhonewords:s}=this.#n,e=this.#_t();if(!this.#z?.iso2&&!Q(e))return!1;if(!(i=>t?this.#Wt(i):this.#Vt(i))(e))return!1;if(e.search(v.ALPHA_UNICODE)>-1){const t=this.#z?.iso2;return Boolean(ot.utils.getExtension(e,t))?i:s}return!0}#Wt(t){return ot.utils?ot.utils.isValidNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}setCountry(t){if(!this.#E.telInput)return;const i=t?.toLowerCase();if(!h(i))throw new Error(`Invalid country code: '${i}'`);const s=this.#z?.iso2;if(t&&i!==s||!t&&s){if(this.#rt(i),this.#jt(this.#z?.dialCode||""),this.#n.formatOnDisplay){const t=this.#Z();this.#at(t)}this.#Ct()}}setNumber(t){if(!this.#E.telInput)return;const i=this.#q.normalise(t),s=this.#ht(i);this.#at(i),s&&this.#Ct(),this.#kt("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.#E.telInput&&(this.#n.placeholderNumberType=t,this.#Mt())}setDisabled(t){this.#E.telInput&&(this.#E.telInput.disabled=t,this.#E.selectedCountry&&(t?this.#E.selectedCountry.setAttribute("disabled","true"):this.#E.selectedCountry.removeAttribute("disabled")))}static forEachInstance(i,...s){const e=Object.values(ot.instances),n=s[0];e.forEach((s=>{if(s instanceof t)switch(i){case"handleUtils":s.#zt();break;case"handleUtilsFailure":s.#Rt(n);break;case"handleAutoCountry":s.#mt();break;case"handleAutoCountryFailure":s.#Bt()}}))}},ot=Object.assign(((t,i)=>{const s=new nt(t,i);return ot.instances[s.id]=s,t.iti=s,s}),{defaults:j,documentReady:()=>"complete"===document.readyState,getCountryData:()=>a,getInstance:t=>{const i=t.dataset.intlTelInputId;return i?ot.instances[i]:null},instances:{},attachUtils:t=>{if(!ot.utils&&!ot.startedLoadingUtilsScript){let i;if("function"!=typeof t)return Promise.reject(new TypeError("The argument passed to attachUtils must be a function that returns a promise for the utilities module, not "+typeof t));try{i=Promise.resolve(t())}catch(t){return Promise.reject(t)}return ot.startedLoadingUtilsScript=!0,i.then((t=>{const i=t?.default;if(!i||"object"!=typeof i)throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return ot.utils=i,nt.forEachInstance("handleUtils"),!0})).catch((t=>{throw nt.forEachInstance("handleUtilsFailure",t),t}))}return null},startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"26.9.2"}),lt=ot;return l=n,((n,o,l,r)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let l of s(o))e.call(n,l)||undefined===l||t(n,l,{get:()=>o[l],enumerable:!(r=i(o,l))||r.enumerable});return n})(t({},"__esModule",{value:!0}),l)})().default,n.exports?n.exports=e():window.intlTelInput=e()),n.exports),l=i({__proto__:null,default:t(o)},[o]);export{l as i}
|
|
4
|
+
import{d as t}from"./p-CHZfg_a9.js";function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(s){if("default"!==s&&!(s in t)){var e=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,e.get?e:{enumerable:!0,get:function(){return i[s]}})}}))})),Object.freeze(t)}var s,e,n={exports:{}},o=(s||(s=1,e=()=>(()=>{var t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,n={};((i,s)=>{for(var e in s)t(i,e,{get:s[e],enumerable:!0})})(n,{Iti:()=>nt,default:()=>lt});var o=[];for(const t of[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]])o.push({name:"",iso2:t[0],dialCode:t[1],priority:t[2]||0,areaCodes:t[3]||null,nodeById:{},nationalPrefix:t[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var l,r=new Set(o.map((t=>t.iso2))),h=t=>r.has(t),a=o,u="iti__hide",c="iti__v-hide",d="iti__arrow--up",p="iti__globe",f="iti__flag",m="iti__loading",y="iti__country",b="iti__highlight",w="ArrowUp",g="ArrowDown",C="Enter",_="Escape",v={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},I={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},k="auto",$=new Set(["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"]),N="aria-expanded",L="aria-label",x="aria-selected",D="aria-activedescendant",A="aria-haspopup",P="aria-controls",S="aria-hidden",O="aria-autocomplete",T="aria-modal",E={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",searchEmptyState:"No results found",searchSummaryAria:t=>0===t?"No results found":1===t?"1 result found":`${t} results found`},M=t=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia(t).matches,F=()=>M("(max-width: 500px)"),j={allowDropdown:!0,allowedNumberTypes:["MOBILE","FIXED_LINE"],allowNumberExtensions:!1,allowPhonewords:!1,autoPlaceholder:I.POLITE,containerClass:"",countryNameLocale:"en",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",searchInputClass:"",separateDialCode:!1,showFlags:!0,strictMode:!1,useFullscreenPopup:(()=>{if("undefined"!=typeof navigator&&"undefined"!=typeof window){const t=M("(max-height: 600px)"),i=M("(pointer: coarse)");return F()||i&&t}return!1})()},U=t=>JSON.stringify(t),B=t=>Boolean(t)&&"object"==typeof t&&!Array.isArray(t),z=new Set(Object.values(I)),R=t=>{console.warn(`[intl-tel-input] ${t}`)},H=(t,i,s)=>{R(`Option '${t}' must be ${i}; got ${U(s)}. Ignoring.`)},V=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),W=(t,i)=>{const s="an array of ISO2 country code strings";if(!Array.isArray(i))return H(t,s,i),!1;const e=[];for(const n of i){if("string"!=typeof n)return H(t,s,i),!1;const o=n.toLowerCase();h(o)?e.push(n):R(`Invalid country code in '${t}': '${n}'. Skipping.`)}return e},q=t=>t.replace(/\D/g,""),K=(t="")=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),G=t=>Object.keys(t).filter((i=>Boolean(t[i]))).join(" "),X=(t,i,s)=>{const e=document.createElement(t);return i&&Object.entries(i).forEach((([t,i])=>e.setAttribute(t,i))),s&&s.appendChild(e),e},Y=class t{constructor(t,i,s){this.#t=null,this.#i=null,this.#s=null,this.#e=null,this.highlightedItem=null,t.dataset.intlTelInputId=s.toString(),this.telInput=t,this.#n=i,this.#o=s,this.hadInitialPlaceholder=Boolean(t.getAttribute("placeholder")),this.#l=!!this.telInput.closest("[dir=rtl]"),this.#n.separateDialCode&&(this.#r=this.telInput.style.paddingLeft)}#n;#o;#l;#r;#h;#t;#i;#a;#u;#c;#d;#p;#f;#s;#e;static validateInput(t){const i=t?.tagName;if(!Boolean(t)||"object"!=typeof t||"INPUT"!==i||"function"!=typeof t.setAttribute){const i=Object.prototype.toString.call(t);throw new TypeError(`The first argument must be an HTMLInputElement, not ${i}`)}}generateMarkup(t){this.#h=t,this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","tel"),this.telInput.hasAttribute("inputmode")||this.telInput.setAttribute("inputmode","tel");const i=this.#m();this.#y(i),i.appendChild(this.telInput),this.#b(),this.#w(i)}#m(){const{allowDropdown:t,showFlags:i,containerClass:s,useFullscreenPopup:e}=this.#n,n=G({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":i,"iti--inline-dropdown":!e,[s]:Boolean(s)}),o=X("div",{class:n});return this.#l&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}#y(t){const{allowDropdown:i,separateDialCode:s,showFlags:e}=this.#n;if(i||e||s){this.countryContainer=X("div",{class:`iti__country-container ${c}`},t),i?(this.selectedCountry=X("button",{type:"button",class:"iti__selected-country",[N]:"false",[L]:this.#n.i18n.noCountrySelected,[A]:"dialog",[P]:`iti-${this.#o}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=X("div",{class:"iti__selected-country"},this.countryContainer);const e=X("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=X("div",{class:f},e),i&&(this.#u=X("div",{class:"iti__arrow",[S]:"true"},e)),s&&(this.#a=X("div",{class:"iti__selected-dial-code"},this.selectedCountry)),i&&this.#g()}}#C(){const{fixDropdownWidth:t}=this.#n;if(t&&!this.#c.style.width){const t=this.telInput.offsetWidth;t>0&&(this.#c.style.width=`${t}px`)}}#g(){const{fixDropdownWidth:t,useFullscreenPopup:i,countrySearch:s,i18n:e,dropdownContainer:n,containerClass:o}=this.#n;if(this.#c=X("div",{id:`iti-${this.#o}__dropdown-content`,class:`iti__dropdown-content ${u} ${t?"":"iti--flexible-dropdown-width"}`,role:"dialog",[T]:"true"}),this.#l&&this.#c.setAttribute("dir","rtl"),s&&this.#_(),this.countryList=X("ul",{class:"iti__country-list",id:`iti-${this.#o}__country-listbox`,role:"listbox",[L]:e.countryListAriaLabel},this.#c),this.#v(),s&&this.#I(),i||(this.#C(),this.#i=this.#k(),s&&(this.#c.style.height=`${this.#i}px`)),n){const t=G({iti:!0,"iti--container":!0,"iti--fullscreen-popup":i,"iti--inline-dropdown":!i,[o]:Boolean(o)});this.#s=X("div",{class:t}),this.#s.appendChild(this.#c)}else this.countryContainer.appendChild(this.#c)}#_(){const{i18n:t,searchInputClass:i}=this.#n,s=X("div",{class:"iti__search-input-wrapper"},this.#c);this.#d=X("span",{class:"iti__search-icon",[S]:"true"},s),this.#d.innerHTML=`\n <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${S}="true">\n <circle cx="11" cy="11" r="7" />\n <line x1="21" y1="21" x2="16.65" y2="16.65" />\n </svg>`,this.searchInput=X("input",{id:`iti-${this.#o}__search-input`,type:"search",class:`iti__search-input ${i}`,placeholder:t.searchPlaceholder,role:"combobox",[N]:"true",[L]:t.searchPlaceholder,[P]:`iti-${this.#o}__country-listbox`,[O]:"list",autocomplete:"off"},s),this.searchClearButton=X("button",{type:"button",class:`iti__search-clear ${u}`,[L]:t.clearSearchAriaLabel,tabindex:"-1"},s),this.searchClearButton.innerHTML=(()=>{const t=`iti-${this.#o}-clear-mask`;return`\n <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${S}="true" focusable="false">\n <mask id="${t}" maskUnits="userSpaceOnUse">\n <rect width="16" height="16" fill="white" />\n <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />\n </mask>\n <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />\n </svg>`})(),this.#f=X("span",{class:"iti__a11y-text"},this.#c),this.#p=X("div",{class:`iti__no-results ${u}`,[S]:"true"},this.#c),this.#p.textContent=t.searchEmptyState}#b(){this.countryContainer&&(this.#$(),this.countryContainer.classList.remove(c))}#w(t){const{hiddenInput:i}=this.#n;if(i){const s=i(this.telInput.getAttribute("name")||"");if(s.phone){const i=this.telInput.form?.querySelector(`input[name="${s.phone}"]`);i?this.hiddenInput=i:(this.hiddenInput=X("input",{type:"hidden",name:s.phone}),t.appendChild(this.hiddenInput))}if(s.country){const i=this.telInput.form?.querySelector(`input[name="${s.country}"]`);i?this.hiddenInputCountry=i:(this.hiddenInputCountry=X("input",{type:"hidden",name:s.country}),t.appendChild(this.hiddenInputCountry))}}}#v(){const t=document.createDocumentFragment();for(let i=0;i<this.#h.length;i++){const s=this.#h[i],e=G({[y]:!0}),n=X("li",{id:`iti-${this.#o}__item-${s.iso2}`,class:e,tabindex:"-1",role:"option",[x]:"false"});n.dataset.dialCode=s.dialCode,n.dataset.countryCode=s.iso2,s.nodeById[this.#o]=n,this.#n.showFlags&&X("div",{class:`${f} iti__${s.iso2}`},n);const o=X("span",{class:"iti__country-name"},n);o.textContent=`${s.name} `;const l=X("span",{class:"iti__dial-code"},o);this.#l&&l.setAttribute("dir","ltr"),l.textContent=`(+${s.dialCode})`,t.appendChild(n)}this.countryList.appendChild(t)}#$(){if(this.selectedCountry){const t=this.#n.separateDialCode?78:42,i=this.selectedCountry.offsetWidth||this.#N()||t;this.telInput.style.paddingLeft=`${i+6}px`}}static#L(){let t;try{t=window.top.document.body}catch(i){t=document.body}return t}#N(){if(this.telInput.parentNode){const i=t.#L(),s=this.telInput.parentNode.cloneNode(!1);s.style.visibility="hidden",i.appendChild(s);const e=this.countryContainer.cloneNode();s.appendChild(e);const n=this.selectedCountry.cloneNode(!0);e.appendChild(n);const o=n.offsetWidth;return i.removeChild(s),o}return 0}#k(){const i=t.#L();this.#c.classList.remove(u);const s=X("div",{class:"iti iti--inline-dropdown"});s.appendChild(this.#c),s.style.visibility="hidden",i.appendChild(s);const e=this.#c.offsetHeight;return i.removeChild(s),s.style.visibility="",this.#c.classList.add(u),e>0?e:200}#I(){const{i18n:t}=this.#n;this.#f.textContent=t.searchSummaryAria(this.countryList.childElementCount)}filterCountriesByQuery(t){let i;i=""===t?this.#h:((t,i)=>{const s=K(i),e=[],n=[],o=[],l=[],r=[],h=[];for(const i of t)i.iso2===s?e.push(i):i.normalisedName.startsWith(s)?n.push(i):i.normalisedName.includes(s)?o.push(i):s===i.dialCode||s===i.dialCodePlus?l.push(i):i.dialCodePlus.includes(s)?r.push(i):i.initials.includes(s)&&h.push(i);const a=(t,i)=>t.priority-i.priority;return[...e,...n,...o,...l.sort(a),...r.sort(a),...h]})(this.#h,t),this.#x(i)}#D(){const t=this.searchInput.value.trim();this.filterCountriesByQuery(t),this.searchInput.value?this.searchClearButton.classList.remove(u):this.searchClearButton.classList.add(u)}handleSearchChange(){this.#t&&clearTimeout(this.#t),this.#t=setTimeout((()=>{this.#D(),this.#t=null}),100)}handleSearchClear(){this.searchInput.value="",this.searchInput.focus(),this.#D()}scrollCountryListToItem(t){const i=this.countryList,s=i.getBoundingClientRect(),e=t.getBoundingClientRect(),n=e.top-s.top+i.scrollTop;e.top<s.top?i.scrollTop=n:e.bottom>s.bottom&&(i.scrollTop=n-s.height+e.height)}highlightListItem(t,i){const s=this.highlightedItem;if(s&&s.classList.remove(b),this.highlightedItem=t,this.highlightedItem){if(this.highlightedItem.classList.add(b),this.#n.countrySearch){const t=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(D,t)}i&&this.highlightedItem.focus()}}handleUpDownKey(t){let i=t===w?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;!i&&this.countryList.childElementCount>1&&(i=t===w?this.countryList.lastElementChild:this.countryList.firstElementChild),i&&(this.scrollCountryListToItem(i),this.highlightListItem(i,!1))}#A(t){if(this.#e&&this.#e.dataset.countryCode!==t&&(this.#e.setAttribute(x,"false"),this.#e.querySelector(".iti__country-check")?.remove(),this.#e=null),t&&!this.#e){const i=this.countryList.querySelector(`[data-country-code="${t}"]`);i&&(i.setAttribute(x,"true"),X("span",{class:"iti__country-check",[S]:"true"},i).innerHTML=`\n <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${S}="true">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>\n </svg>`,this.#e=i)}}#x(t){this.countryList.replaceChildren();let i=!0;for(const s of t){const t=s.nodeById[this.#o];t&&(this.countryList.appendChild(t),i&&(this.highlightListItem(t,!1),i=!1))}i?(this.highlightListItem(null,!1),this.#p&&this.#p.classList.remove(u)):this.#p&&this.#p.classList.add(u),this.countryList.scrollTop=0,this.#I()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.#n.separateDialCode&&(this.telInput.style.paddingLeft=this.#r);const t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.searchInput=null,this.searchClearButton=null,this.countryList=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null,this.#a=null,this.#u=null,this.#c=null,this.#d=null,this.#p=null,this.#f=null,this.#s=null,this.#e=null;for(const t of this.#h)delete t.nodeById[this.#o];this.#h=null}openDropdown(){const{countrySearch:t,dropdownAlwaysOpen:i,dropdownContainer:s}=this.#n;if(this.#C(),s)this.#P();else{const t=this.#S(),i=this.telInput.offsetHeight+3;t?this.#c.style.top=`${i}px`:this.#c.style.bottom=`${i}px`}if(this.#c.classList.remove(u),this.selectedCountry.setAttribute(N,"true"),t){const t=this.countryList.firstElementChild;t&&(this.highlightListItem(t,!1),this.countryList.scrollTop=0),i||this.searchInput.focus()}this.#u.classList.add(d)}closeDropdown(){const{countrySearch:t,dropdownContainer:i}=this.#n;this.#c.classList.add(u),this.selectedCountry.setAttribute(N,"false"),t&&(this.searchInput.removeAttribute(D),this.highlightedItem&&(this.highlightedItem.classList.remove(b),this.highlightedItem=null)),this.#u.classList.remove(d),i?(this.#s.remove(),this.#s.style.top="",this.#s.style.bottom="",this.#s.style.paddingLeft="",this.#s.style.paddingRight=""):(this.#c.style.top="",this.#c.style.bottom="")}#S(){if(this.#n.dropdownAlwaysOpen)return!0;const t=this.telInput.getBoundingClientRect(),i=window.innerHeight-t.bottom;return i>=this.#i||i>=t.top}#P(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;if(i){if(window.innerWidth>=500){const t=this.telInput.getBoundingClientRect();this.#s.style.paddingLeft=`${t.left}px`,this.#s.style.paddingRight=window.innerWidth-t.right+"px"}}else{const t=this.telInput.getBoundingClientRect();this.#s.style.left=`${t.left}px`,this.#S()?this.#s.style.top=`${t.bottom+3}px`:(this.#s.style.top="unset",this.#s.style.bottom=window.innerHeight-t.top+3+"px")}t.appendChild(this.#s)}isDropdownClosed(){return this.#c.classList.contains(u)}setCountry(t){const{allowDropdown:i,showFlags:s,separateDialCode:e,i18n:n}=this.#n,{name:o,dialCode:l,iso2:r=""}=t;if(i&&this.#A(r),this.selectedCountry){const t=r&&s?`${f} iti__${r}`:`${f} ${p}`;let i,e,h;r?(e=o,i=n.selectedCountryAriaLabel.replace("${countryName}",o).replace("${dialCode}",`+${l}`),h=s?"":'\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'):(e=n.noCountrySelected,i=n.noCountrySelected,h='\n <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">\n <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>\n <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>\n </svg>'),this.selectedCountryInner.className=t,this.selectedCountry.setAttribute("title",e),this.selectedCountry.setAttribute(L,i),this.selectedCountryInner.innerHTML=h}e&&(this.#a.textContent=l?`+${l}`:"",this.#$())}},Z=new Set(["800","808","870","881","882","883","888","979"]),J=t=>{const i=q(t).slice(0,3);return t.startsWith("+")&&Z.has(i)},Q=(t,i,s,e)=>{let n=t;if(s&&i){const t=`+${e.dialCode}`;n=n.substring(" "===n[t.length]||"-"===n[t.length]?t.length+1:t.length)}return n},tt=new Set(["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"]),it=t=>{const i=q(t);if(i.startsWith("1")&&i.length>=4){const t=i.substring(1,4);return tt.has(t)}return!1},st=class{#O;constructor(t){t&&this.#T(t)}#T(t){/[\u0660-\u0669]/.test(t)?this.#O="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.#O="persian":this.#O="ascii"}denormalise(t){if(!this.#O||"ascii"===this.#O)return t;const i="arabic-indic"===this.#O?1632:1776;return t.replace(/[0-9]/g,(t=>String.fromCharCode(i+Number(t))))}normalise(t){if(!t)return"";if(this.#T(t),"ascii"===this.#O)return t;const i="arabic-indic"===this.#O?1632:1776,s="arabic-indic"===this.#O?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(s,(t=>String.fromCharCode(t.charCodeAt(0)-i+48)))}isAscii(){return!this.#O||"ascii"===this.#O}},et=0,nt=class t{#E;#n;#M;#h;#F;#j;#U;#B;#z;#R;#H;#V;#W;#q;#K;#G;#X;#Y;constructor(t,i={}){this.id=et++,Y.validateInput(t);const s=(t=>{if(void 0===t)return{};if(!B(t)){const i=`The second argument must be an options object; got ${U(t)}. Using defaults.`;return R(i),{}}const i={};for(const[e,n]of Object.entries(t))if(V(j,e))switch(e){case"allowDropdown":case"allowNumberExtensions":case"allowPhonewords":case"countrySearch":case"dropdownAlwaysOpen":case"fixDropdownWidth":case"formatAsYouType":case"formatOnDisplay":case"nationalMode":case"showFlags":case"separateDialCode":case"strictMode":case"useFullscreenPopup":if("boolean"!=typeof n){H(e,"a boolean",n);break}i[e]=n;break;case"autoPlaceholder":if("string"!=typeof n||!z.has(n)){const t=Array.from(z).join(", ");H("autoPlaceholder",`one of ${t}`,n);break}i[e]=n;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if("string"!=typeof n){H(e,"a string",n);break}i[e]=n;break;case"countryOrder":if(null===n)i[e]=n;else{const t=W(e,n);!1!==t&&(i[e]=t)}break;case"customPlaceholder":case"geoIpLookup":case"hiddenInput":case"loadUtils":if(null!==n&&"function"!=typeof n){H(e,"a function or null",n);break}i[e]=n;break;case"dropdownContainer":if(null!==n&&(!(s=n)||"object"!=typeof s||1!==s.nodeType||"string"!=typeof s.tagName||"function"!=typeof s.appendChild)){H("dropdownContainer","an HTMLElement or null",n);break}i[e]=n;break;case"excludeCountries":case"onlyCountries":{const t=W(e,n);!1!==t&&(i[e]=t);break}case"i18n":if(n&&!B(n)){H("i18n","an object",n);break}i[e]=n;break;case"initialCountry":{if("string"!=typeof n){H("initialCountry","a string",n);break}const t=n.toLowerCase();if(t&&t!==k&&!h(t)){H("initialCountry","a valid ISO2 country code or 'auto'",n);break}i[e]=n;break}case"placeholderNumberType":if("string"!=typeof n||!$.has(n)){const t=Array.from($).join(", ");H("placeholderNumberType",`one of ${t}`,n);break}i[e]=n;break;case"allowedNumberTypes":if(null!==n){if(!Array.isArray(n)){H("allowedNumberTypes","an array of number types or null",n);break}let t=!0;for(const i of n)if("string"!=typeof i||!$.has(i)){const s=Array.from($).join(", ");H("allowedNumberTypes",`an array of valid number types (${s})`,i),t=!1;break}t&&(i[e]=n)}else i[e]=null}else R(`Unknown option '${e}'. Ignoring.`);var s;return i})(i);var e;this.#n={...j,...s},(e=this.#n).initialCountry&&(e.initialCountry=e.initialCountry.toLowerCase()),e.onlyCountries?.length&&(e.onlyCountries=e.onlyCountries.map((t=>t.toLowerCase()))),e.excludeCountries?.length&&(e.excludeCountries=e.excludeCountries.map((t=>t.toLowerCase()))),e.countryOrder&&(e.countryOrder=e.countryOrder.map((t=>t.toLowerCase()))),(t=>{t.dropdownAlwaysOpen&&(t.useFullscreenPopup=!1,t.allowDropdown=!0),t.useFullscreenPopup?t.fixDropdownWidth=!1:F()&&(t.fixDropdownWidth=!0),1===t.onlyCountries.length&&(t.initialCountry=t.onlyCountries[0]),t.separateDialCode&&(t.nationalMode=!1),!t.allowDropdown||t.showFlags||t.separateDialCode||(t.nationalMode=!1),t.useFullscreenPopup&&!t.dropdownContainer&&(t.dropdownContainer=document.body),t.i18n={...E,...t.i18n}})(this.#n),this.#E=new Y(t,this.#n,this.id),this.#M="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),this.#q=new st(t.value),this.promise=this.#Z(this.#n),this.#h=(t=>{const{onlyCountries:i,excludeCountries:s}=t;return i?.length?a.filter((t=>i.includes(t.iso2))):s?.length?a.filter((t=>!s.includes(t.iso2))):a})(this.#n);const{dialCodes:n,dialCodeMaxLen:o,dialCodeToIso2Map:l}=(t=>{const i=new Set;let s=0;const e={},n=(t,i)=>{if(!t||!i)return;i.length>s&&(s=i.length),e.hasOwnProperty(i)||(e[i]=[]);const n=e[i];n.includes(t)||n.push(t)},o=[...t].sort(((t,i)=>t.priority-i.priority));for(const t of o){i.has(t.dialCode)||i.add(t.dialCode);for(let i=1;i<t.dialCode.length;i++){const s=t.dialCode.substring(0,i);n(t.iso2,s)}if(n(t.iso2,t.dialCode),t.areaCodes){const i=e[t.dialCode][0];for(const s of t.areaCodes){for(let e=1;e<s.length;e++){const o=s.substring(0,e),l=t.dialCode+o;n(i,l),n(t.iso2,l)}n(t.iso2,t.dialCode+s)}}}return{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:e}})(this.#h);this.#U=n,this.#F=o,this.#j=l,this.#B=new Map(this.#h.map((t=>[t.iso2,t]))),this.#J()}#Q(){const t=this.#E.telInput.value.trim();return this.#q.normalise(t)}#tt(t){this.#E.telInput.value=this.#q.denormalise(t)}#Z(t){const{initialCountry:i,geoIpLookup:s,loadUtils:e}=t,n=i===k&&Boolean(s),o=Boolean(e)&&!ot.utils;let l,r;return n?l=new Promise(((t,i)=>{this.#K=t,this.#G=i})):(l=Promise.resolve(void 0),this.#K=()=>{},this.#G=()=>{}),o?r=new Promise(((t,i)=>{this.#X=t,this.#Y=i})):(r=Promise.resolve(void 0),this.#X=()=>{},this.#Y=()=>{}),Promise.all([l,r]).then((()=>{}))}#J(){this.#z=null,this.#V=new AbortController,this.#it(),this.#E.generateMarkup(this.#h),this.#st(),this.#et(),this.#nt(),this.#n.dropdownAlwaysOpen&&this.#ot()}#it(){((t,i)=>{const{countryNameLocale:s,i18n:e}=i;let n;try{n="undefined"!=typeof Intl&&"function"==typeof Intl.DisplayNames?new Intl.DisplayNames(s,{type:"region"}):null}catch(t){console.error(t),n=null}for(const i of t)i.name=e[i.iso2]||n?.of(i.iso2.toUpperCase())||""})(this.#h,this.#n),((t,i)=>{const{countryOrder:s}=i;t.sort(((t,i)=>{if(s){const e=s.indexOf(t.iso2),n=s.indexOf(i.iso2),o=e>-1,l=n>-1;if(o||l)return o&&l?e-n:o?-1:1}return t.name.localeCompare(i.name)}))})(this.#h,this.#n),(t=>{for(const i of t)i.normalisedName=K(i.name),i.initials=i.normalisedName.split(/[^a-z]/).map((t=>t[0])).join(""),i.dialCodePlus=`+${i.dialCode}`})(this.#h)}#st(t=!1){const i=this.#E.telInput.getAttribute("value"),s=this.#q.normalise(i),e=this.#Q(),n=!s||!s.startsWith("+")||e&&e.startsWith("+")?e:s,o=this.#lt(n),l=it(n),{initialCountry:r,geoIpLookup:a}=this.#n,u=r===k&&a&&!t,c=h(r);o?l?c?this.#rt(r):u||this.#rt("us"):this.#ht(n):c?this.#rt(r):u||this.#rt(""),n&&this.#at(n)}#et(){this.#ut(),this.#n.allowDropdown&&this.#ct(),(this.#E.hiddenInput||this.#E.hiddenInputCountry)&&this.#E.telInput.form&&this.#dt()}#dt(){this.#E.telInput.form?.addEventListener("submit",(()=>{this.#E.hiddenInput&&(this.#E.hiddenInput.value=this.getNumber()),this.#E.hiddenInputCountry&&(this.#E.hiddenInputCountry.value=this.#z?.iso2||"")}),{signal:this.#V.signal})}#ct(){const t=this.#V.signal,i=this.#E.telInput.closest("label");i&&i.addEventListener("click",(t=>{this.#E.isDropdownClosed()?this.#E.telInput.focus():t.preventDefault()}),{signal:t}),this.#E.selectedCountry.addEventListener("click",(()=>{!this.#E.isDropdownClosed()||this.#E.telInput.disabled||this.#E.telInput.readOnly||this.#ot()}),{signal:t}),this.#E.countryContainer.addEventListener("keydown",(t=>{const i=[w,g," ",C];this.#E.isDropdownClosed()&&i.includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.#ot()),"Tab"===t.key&&this.#pt()}),{signal:t})}#nt(){const{loadUtils:t,initialCountry:i,geoIpLookup:s}=this.#n;if(t&&!ot.utils){const i=()=>{ot.attachUtils(t)?.catch((()=>{}))};ot.documentReady()?i():window.addEventListener("load",i,{signal:this.#V.signal})}else this.#X();i===k&&s&&(this.#z?.iso2?this.#K():this.#ft())}#ft(){ot.autoCountry?this.#mt():(this.#E.selectedCountryInner.classList.add(m),ot.startedLoadingAutoCountry||(ot.startedLoadingAutoCountry=!0,"function"!=typeof this.#n.geoIpLookup)||this.#n.geoIpLookup(((i="")=>{this.#E.selectedCountryInner.classList.remove(m);const s=i.toLowerCase();h(s)?(ot.autoCountry=s,setTimeout((()=>t.forEachInstance("handleAutoCountry")))):t.forEachInstance("handleAutoCountryFailure")}),(()=>{this.#E.selectedCountryInner.classList.remove(m),t.forEachInstance("handleAutoCountryFailure")})))}#yt(){this.#ot(),this.#E.searchInput.value="+",this.#E.filterCountriesByQuery("")}#ut(){this.#bt(),this.#wt(),this.#gt()}#bt(){const{strictMode:t,formatAsYouType:i,separateDialCode:s,allowDropdown:e,countrySearch:n}=this.#n;let o=!1;v.ALPHA_UNICODE.test(this.#Q())&&(o=!0),this.#E.telInput.addEventListener("input",(l=>{const r=this.#Q();if(this.#M&&"+"===l?.data&&s&&e&&n){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t-1),s=r.substring(t);return this.#tt(i+s),void this.#yt()}this.#ht(r)&&this.#Ct(),l?.data&&v.NON_PLUS_NUMERIC.test(l.data)||"insertFromPaste"===l?.inputType&&r&&!t?o=!0:v.NON_PLUS_NUMERIC.test(r)||(o=!1);const h=l?.detail&&l.detail.isSetNumber,a=this.#q.isAscii();if(i&&!o&&!h&&a){const t=this.#E.telInput.selectionStart||0,i=r.substring(0,t).replace(v.NON_PLUS_NUMERIC_GLOBAL,"").length,e="deleteContentForward"===l?.inputType,n=((t,i,s,e,n)=>{const o=s?s.formatNumberAsYouType(t,e.iso2):t,{dialCode:l}=e;return n&&"+"!==i.charAt(0)&&o.includes(`+${l}`)?(o.split(`+${l}`)[1]||"").trim():o})(this.#_t(),r,ot.utils,this.#z??{},s),o=((t,i,s,e)=>{if(0===s&&!e)return 0;let n=0;for(let s=0;s<i.length;s++){if(/[+0-9]/.test(i[s])&&n++,n===t&&!e)return s+1;if(e&&n===t+1)return s}return i.length})(i,n,t,e);this.#tt(n),this.#E.telInput.setSelectionRange(o,o)}if(s&&r.startsWith("+")&&this.#z?.dialCode){const t=Q(r,!0,s,this.#z??{});this.#tt(t)}}),{signal:this.#V.signal})}#wt(){const{strictMode:t,separateDialCode:i,allowDropdown:s,countrySearch:e}=this.#n;(t||i)&&this.#E.telInput.addEventListener("keydown",(n=>{if(n.key&&1===n.key.length&&!n.altKey&&!n.ctrlKey&&!n.metaKey){if(i&&s&&e&&"+"===n.key)return n.preventDefault(),void this.#yt();if(t){const t=this.#Q(),s=!t.startsWith("+")&&0===this.#E.telInput.selectionStart&&"+"===n.key,e=this.#q.normalise(n.key),o=/^[0-9]$/.test(e),l=i?o:s||o,r=this.#E.telInput,h=r.selectionEnd,a=t.slice(0,r.selectionStart),u=t.slice(h),c=this.#_t(a+n.key+u);let d=!1;ot.utils&&this.#R&&(d=ot.utils.getCoreNumber(c,this.#z?.iso2).length>this.#R);const p=this.#vt(c);l&&(!d||null!==p||s)||n.preventDefault()}}}),{signal:this.#V.signal})}#gt(){this.#n.strictMode&&this.#E.telInput.addEventListener("paste",(t=>{t.preventDefault();const i=this.#E.telInput,s=i.selectionStart,e=i.selectionEnd,n=this.#Q(),o=n.slice(0,s),l=n.slice(e),r=this.#z?.iso2,h=t.clipboardData.getData("text"),a=this.#q.normalise(h),u=0===s&&e>0,c=!n.startsWith("+")||u,d=a.replace(v.NON_PLUS_NUMERIC_GLOBAL,""),p=d.startsWith("+"),f=d.replace(/\+/g,""),m=p&&c?`+${f}`:f;let y=o+m+l;if(y.length>5){let t=ot.utils.getCoreNumber(y,r);for(;0===t.length&&y.length>0;)y=y.slice(0,-1),t=ot.utils.getCoreNumber(y,r);if(!t)return;if(this.#R&&t.length>this.#R){if(i.selectionEnd!==n.length)return;{const i=t.length-this.#R;y=y.slice(0,y.length-i)}}}this.#tt(y);const b=s+m.length;i.setSelectionRange(b,b),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))}),{signal:this.#V.signal})}#It(t){const i=Number(this.#E.telInput.getAttribute("maxlength"));return i&&t.length>i?t.substring(0,i):t}#kt(t,i={}){const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});this.#E.telInput.dispatchEvent(s)}#ot(){const{dropdownContainer:t,useFullscreenPopup:i}=this.#n;this.#W=new AbortController,this.#E.openDropdown(),!i&&t&&window.addEventListener("scroll",(()=>this.#pt()),{signal:this.#W.signal}),this.#$t(),this.#kt("open:countrydropdown")}#$t(){const t=this.#W.signal;this.#Nt(t),this.#Lt(t),this.#n.dropdownAlwaysOpen||this.#xt(t),this.#Dt(t),this.#n.countrySearch&&this.#At(t)}#Nt(t){this.#E.countryList.addEventListener("mouseover",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#E.highlightListItem(i,!1)}),{signal:t})}#Lt(t){this.#E.countryList.addEventListener("click",(t=>{const i=t.target?.closest(`.${y}`);i&&this.#Pt(i)}),{signal:t})}#xt(t){const i=t=>{t.target.closest(`#iti-${this.id}__dropdown-content`)||this.#pt()};setTimeout((()=>{document.documentElement.addEventListener("click",i,{signal:t})}),0)}#Dt(t){let i="",s=null;document.addEventListener("keydown",(t=>{[w,g,C,_].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key===w||t.key===g?this.#E.handleUpDownKey(t.key):t.key!==C||t.isComposing?t.key===_&&(this.#pt(),this.#E.selectedCountry.focus()):this.#St()),!this.#n.countrySearch&&v.HIDDEN_SEARCH_CHAR.test(t.key)&&(t.stopPropagation(),s&&clearTimeout(s),i+=t.key.toLowerCase(),this.#Ot(i),s=setTimeout((()=>{i=""}),1e3))}),{signal:t})}#At(t){this.#E.searchInput.addEventListener("input",(()=>this.#E.handleSearchChange()),{signal:t}),this.#E.searchClearButton.addEventListener("click",(()=>this.#E.handleSearchClear()),{signal:t})}#Ot(t){const i=((t,i)=>{const s=K(i);for(const i of t)if(i.normalisedName.startsWith(s))return i;return null})(this.#h,t);if(i){const t=i.nodeById[this.id];this.#E.highlightListItem(t,!1),this.#E.scrollCountryListToItem(t)}}#St(){this.#E.highlightedItem&&this.#Pt(this.#E.highlightedItem)}#at(t){const{formatOnDisplay:i,nationalMode:s,separateDialCode:e}=this.#n;let n=t;if(i&&ot.utils&&this.#z){const i=J(t),o=s&&!i||!n.startsWith("+")&&!e,{NATIONAL:l,INTERNATIONAL:r}=ot.utils.numberFormat,h=o?l:r;n=ot.utils.formatNumber(n,this.#z?.iso2,h)}n=this.#Tt(n),this.#tt(n)}#ht(t){const i=this.#vt(t);return null!==i&&this.#rt(i)}#Et(t){const i=this.#z?.dialCode,s=this.#z?.nationalPrefix;return t.startsWith("+")||!i?t:`+${i}${s&&t.startsWith(s)&&!this.#n.separateDialCode?t.substring(1):t}`}#vt(t){const i=t.indexOf("+");let s=i?t.substring(i):t;const e=this.#z?.iso2,n=this.#z?.dialCode;s=this.#Et(s);const o=this.#lt(s,!0),l=q(s);if(o){const t=q(o),i=this.#j[t];if(1===i.length)return i[0]===e?null:i[0];if(!e&&this.#H&&i.includes(this.#H))return this.#H;if("1"===n&&it(l))return null;const s=this.#z?.areaCodes,r=this.#z?.priority;if(s){const t=s.map((t=>`${n}${t}`));for(const i of t)if(l.startsWith(i))return null}const h=s&&!(0===r)&&l.length>t.length;if((!e||!i.includes(e)||h)&&e!==i[0])return i[0]}else{if(s.startsWith("+")&&l.length){const t=this.#z?.dialCode||"";return t&&t.startsWith(l)?null:""}if((!s||"+"===s)&&!e&&this.#H)return this.#H}return null}#rt(t){const i=this.#z?.iso2||"";return this.#z=t?this.#B.get(t):null,this.#z?.iso2&&(this.#H=this.#z.iso2),this.#E.setCountry(this.#z??{}),this.#Mt(),this.#Ft(),i!==t}#Ft(){const{strictMode:t,placeholderNumberType:i,allowedNumberTypes:s}=this.#n,e=this.#z?.iso2;if(t&&ot.utils)if(e){let t=ot.utils.getExampleNumber(e,!1,ot.utils.numberType[i],!0),n=t;for(;ot.utils.isPossibleNumber(t,e,s);)n=t,t+="0";const o=ot.utils.getCoreNumber(n,e);this.#R=o.length,"by"===e&&(this.#R=o.length+1)}else this.#R=null}#Mt(){const{autoPlaceholder:t,placeholderNumberType:i,nationalMode:s,customPlaceholder:e}=this.#n,n=t===I.AGGRESSIVE||!this.#E.hadInitialPlaceholder&&t===I.POLITE;if(ot.utils&&n){const t=ot.utils.numberType[i];let n=this.#z?.iso2?ot.utils.getExampleNumber(this.#z.iso2,s,t):"";n=this.#Tt(n),"function"==typeof e&&(n=e(n,this.#z??{})),this.#E.telInput.setAttribute("placeholder",n)}}#Pt(t){const i=this.#rt(t.dataset.countryCode);if(this.#pt(),this.#jt(t.dataset.dialCode),this.#n.formatOnDisplay){const t=this.#Q();this.#at(t)}this.#E.telInput.focus(),i&&this.#Ct()}#pt(t){this.#E.isDropdownClosed()||this.#n.dropdownAlwaysOpen&&!t||(this.#E.closeDropdown(),this.#W.abort(),this.#W=null,this.#kt("close:countrydropdown"))}#jt(t){const i=this.#Q(),s=`+${t}`;let e;if(i.startsWith("+")){const t=this.#lt(i);e=t?i.replace(t,s):s,this.#tt(e)}}#lt(t,i){let s="";if(t.startsWith("+")){let e="",n=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(/[0-9]/.test(l)){if(e+=l,!Boolean(this.#j[e]))break;if(this.#U.has(e)){if(s=t.substring(0,o+1),n=!0,!i)break}else i&&n&&(s=t.substring(0,o+1));if(e.length===this.#F)break}}}return s}#_t(t){const i=t?this.#q.normalise(t):this.#Q(),s=this.#z?.dialCode;let e;const n=q(i);return e=this.#n.separateDialCode&&!i.startsWith("+")&&s&&n?`+${s}`:"",e+i}#Tt(t){const i=Boolean(this.#lt(t)),s=Q(t,i,this.#n.separateDialCode,this.#z??{});return this.#It(s)}#Ut(){const t=this.#z;if(!t)return{};const{iso2:i,dialCode:s,name:e}=t;return{iso2:i,dialCode:s,name:e}}#Ct(){const t=this.#Ut();this.#kt("countrychange",t)}#mt(){this.#E.telInput?this.#n.initialCountry===k&&ot.autoCountry&&(this.#H=ot.autoCountry,this.#z?.iso2||this.#E.selectedCountryInner.classList.contains(p)||this.setCountry(this.#H),this.#K()):this.#K?.()}#Bt(){this.#E.telInput?(this.#st(!0),this.#G()):this.#G?.()}#zt(){if(this.#E.telInput){if(ot.utils){const t=this.#Q();t&&this.#at(t),this.#z?.iso2&&(this.#Mt(),this.#Ft())}this.#X()}else this.#X?.()}#Rt(t){this.#E,this.#Y(t)}destroy(){this.#E.telInput&&(this.#n.allowDropdown&&this.#pt(!0),this.#V.abort(),this.#V=null,this.#E.destroy(),delete ot.instances[this.id])}isActive(){return!!this.#E?.telInput}getExtension(){return ot.utils&&this.#E.telInput?ot.utils.getExtension(this.#_t(),this.#z?.iso2):""}getNumber(t){if(ot.utils&&this.#E.telInput){const i=this.#z?.iso2,s=this.#_t(),e=ot.utils.formatNumber(s,i,t);return this.#q.denormalise(e)}return""}getNumberType(){return ot.utils&&this.#E.telInput?ot.utils.getNumberType(this.#_t(),this.#z?.iso2):-99}getSelectedCountryData(){return this.#Ut()}getValidationError(){if(ot.utils&&this.#E.telInput){const t=this.#z?.iso2;return ot.utils.getValidationError(this.#_t(),t)}return-99}isValidNumber(){const t=this.#z?.dialCode,i=this.#z?.iso2;if(ot.utils&&this.#E.telInput){const s=this.#_t(),e=ot.utils.getCoreNumber(s,i);if(e){if("44"===t&&"7"===e[0]&&10!==e.length)return!1;if(!v.ALPHA_UNICODE.test(s)&&t){const i=s.startsWith("+")?s.slice(1+t.length):s,n=q(i).length;if(e.length>n)return!1}}}return this.#Ht(!1)}isValidNumberPrecise(){return this.#Ht(!0)}#Vt(t){return ot.utils?ot.utils.isPossibleNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}#Ht(t){if(!ot.utils||!this.#E.telInput)return null;const{allowNumberExtensions:i,allowPhonewords:s}=this.#n,e=this.#_t();if(!this.#z?.iso2&&!J(e))return!1;if(!(i=>t?this.#Wt(i):this.#Vt(i))(e))return!1;if(e.search(v.ALPHA_UNICODE)>-1){const t=this.#z?.iso2;return Boolean(ot.utils.getExtension(e,t))?i:s}return!0}#Wt(t){return ot.utils?ot.utils.isValidNumber(t,this.#z?.iso2,this.#n.allowedNumberTypes):null}setCountry(t){if(!this.#E.telInput)return;const i=t?.toLowerCase();if(!h(i))throw new Error(`Invalid country code: '${i}'`);const s=this.#z?.iso2;if(t&&i!==s||!t&&s){if(this.#rt(i),this.#jt(this.#z?.dialCode||""),this.#n.formatOnDisplay){const t=this.#Q();this.#at(t)}this.#Ct()}}setNumber(t){if(!this.#E.telInput)return;const i=this.#q.normalise(t),s=this.#ht(i);this.#at(i),s&&this.#Ct(),this.#kt("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.#E.telInput&&(this.#n.placeholderNumberType=t,this.#Mt())}setDisabled(t){this.#E.telInput&&(this.#E.telInput.disabled=t,this.#E.selectedCountry&&(t?this.#E.selectedCountry.setAttribute("disabled","true"):this.#E.selectedCountry.removeAttribute("disabled")))}static forEachInstance(i,...s){const e=Object.values(ot.instances),n=s[0];e.forEach((s=>{if(s instanceof t)switch(i){case"handleUtils":s.#zt();break;case"handleUtilsFailure":s.#Rt(n);break;case"handleAutoCountry":s.#mt();break;case"handleAutoCountryFailure":s.#Bt()}}))}},ot=Object.assign(((t,i)=>{const s=new nt(t,i);return ot.instances[s.id]=s,t.iti=s,s}),{defaults:j,documentReady:()=>"complete"===document.readyState,getCountryData:()=>a,getInstance:t=>{const i=t.dataset.intlTelInputId;return i?ot.instances[i]:null},instances:{},attachUtils:t=>{if(!ot.utils&&!ot.startedLoadingUtilsScript){let i;if("function"!=typeof t)return Promise.reject(new TypeError("The argument passed to attachUtils must be a function that returns a promise for the utilities module, not "+typeof t));try{i=Promise.resolve(t())}catch(t){return Promise.reject(t)}return ot.startedLoadingUtilsScript=!0,i.then((t=>{const i=t?.default;if(!i||"object"!=typeof i)throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return ot.utils=i,nt.forEachInstance("handleUtils"),!0})).catch((t=>{throw nt.forEachInstance("handleUtilsFailure",t),t}))}return null},startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"26.9.2"}),lt=ot;return l=n,((n,o,l,r)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let l of s(o))e.call(n,l)||undefined===l||t(n,l,{get:()=>o[l],enumerable:!(r=i(o,l))||r.enumerable});return n})(t({},"__esModule",{value:!0}),l)})().default,n.exports?n.exports=e():window.intlTelInput=e()),n.exports),l=i({__proto__:null,default:t(o)},[o]);export{l as i}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as e}from"./p-BW1au-Nh.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var r,i={exports:{}},n=(r||(r=1,i.exports=function(){var e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],i=!0,n=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(i=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){n=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(n)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var r=this;r.length<e;)r=t+r;return r};var i={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var o=function(){function o(t,i,n,a){e(this,o);var c=this;if(void 0===t);else if(Array.isArray(t))this.rgba=t;else if(void 0===n){var s=t&&""+t;s&&function(e){if(e.startsWith("hsl")){var t=e.match(/([\-\d\.e]+)/g).map(Number),i=r(t,4),n=i[0],a=i[1],s=i[2],p=i[3];void 0===p&&(p=1),c.hsla=[n/=360,a/=100,s/=100,p]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),f=r(u,4),l=f[3];void 0===l&&(l=1),c.rgba=[f[0],f[1],f[2],l]}else c.rgba=e.startsWith("#")?o.hexToRgb(e):o.nameToRgb(e)||o.hexToRgb(e)}(s.toLowerCase())}else this.rgba=[t,i,n,void 0===a?1:a]}return t(o,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map((function(e,t){return n(e,3===t?3:0)}));return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],r=["","%","%",""],i=(e?this.hsla:this.hsla.slice(0,3)).map((function(e,i){return n(e*t[i],3===i?3:1)+r[i]}));return e?"hsla("+i+")":"hsl("+i+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=o.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=o.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)})).map((function(e){return e.padStart(2,"0")})).join("")},set:function(e){this.rgba=o.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var r=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(e){return parseInt(e,16)}));return r[3]=r[3]/255,r}},{key:"nameToRgb",value:function(e){var t=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=i[t];return void 0===r?r:o.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=r(e,4),i=t[0],n=t[1],o=t[2],a=t[3];i/=255,n/=255,o/=255;var c=Math.max(i,n,o),s=Math.min(i,n,o),p=void 0,u=void 0,f=(c+s)/2;if(c===s)p=u=0;else{var l=c-s;switch(u=f>.5?l/(2-c-s):l/(c+s),c){case i:p=(n-o)/l+(n<o?6:0);break;case n:p=(o-i)/l+2;break;case o:p=(i-n)/l+4}p/=6}return[p,u,f,a]}},{key:"hslToRgb",value:function(e){var t=r(e,4),i=t[0],n=t[1],o=t[2],a=t[3],c=void 0,s=void 0,p=void 0;if(0===n)c=s=p=o;else{var u=function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},f=o<.5?o*(1+n):o+n-o*n,l=2*o-f;c=u(l,f,i+1/3),s=u(l,f,i),p=u(l,f,i-1/3)}var h=[255*c,255*s,255*p].map(Math.round);return h[3]=a,h}}]),o}(),a=function(){function r(){e(this,r),this._events=[]}return t(r,[{key:"add",value:function(e,t,r){e.addEventListener(t,r,!1),this._events.push({target:e,type:t,handler:r})}},{key:"remove",value:function(e,t,i){this._events=this._events.filter((function(n){var o=!0;return e&&e!==n.target&&(o=!1),t&&t!==n.type&&(o=!1),i&&i!==n.handler&&(o=!1),o&&r._doRemove(n.target,n.type,n.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return r._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(e,t,r){e.removeEventListener(t,r,!1)}}]),r}();function c(e,t,r){var i=!1;function n(e,t,r){return Math.max(t,Math.min(e,r))}function o(e,o,a){if(a&&(i=!0),i){e.preventDefault();var c=t.getBoundingClientRect(),s=c.width,p=c.height,u=o.clientY,f=n(o.clientX-c.left,0,s),l=n(u-c.top,0,p);r(f/s,l/p)}}function a(e,t){1===(void 0===e.buttons?e.which:e.buttons)?o(e,e,t):i=!1}function c(e,t){1===e.touches.length?o(e,e.touches[0],t):i=!1}e.add(t,"mousedown",(function(e){a(e,!0)})),e.add(t,"touchstart",(function(e){c(e,!0)})),e.add(window,"mousemove",a),e.add(t,"touchmove",c),e.add(window,"mouseup",(function(){i=!1})),e.add(t,"touchend",(function(){i=!1})),e.add(t,"touchcancel",(function(){i=!1}))}var s="keydown",p="mousedown",u="focusin";function f(e,t){return(t||document).querySelector(e)}function l(e,t,r,i){e.add(t,s,(function(e){r.indexOf(e.key)>=0&&i(e)}))}var h=function(){function r(t){e(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new a,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return t(r,[{key:"setOptions",value:function(e){var t=this;if(e){var r=this.settings;if(e instanceof HTMLElement)r.parent=e;else{r.parent&&e.parent&&r.parent!==e.parent&&(this._events.remove(r.parent),this._popupInited=!1),function(e,t){for(var r in e)t[r]=e[r]}(e,r),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var i=e.color||e.colour;i&&this._setColor(i)}var n=r.parent;if(n&&r.popup&&!this._popupInited){var o=function(e){return t.openHandler(e)};this._events.add(n,"click",o),l(this._events,n,[" ","Spacebar","Enter"],o),this._popupInited=!0}else e.parent&&!r.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===s?this._domEdit:this.domElement;setTimeout((function(){return t.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,r=!1;e?t===p||t===u?e.timeStamp>(this.__containedEvent||0)+100&&(r=!0):(function(e){e.preventDefault(),e.stopPropagation()}(e),r=!0):r=!0,r&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==p&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var r=void 0;try{r=new o(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,r,i=(t=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',(r=document.createElement("div")).innerHTML=t,r.firstElementChild);return this.domElement=i,this._domH=f(".picker_hue",i),this._domSL=f(".picker_sl",i),this._domA=f(".picker_alpha",i),this._domEdit=f(".picker_editor input",i),this._domSample=f(".picker_sample",i),this._domOkay=f(".picker_done button",i),this._domCancel=f(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,t=this,r=this.domElement,i=this._events;function n(e,t,r){i.add(e,t,r)}n(r,"click",(function(e){return e.preventDefault()})),c(i,this._domH,(function(e){return t._setHSLA(e)})),c(i,this._domSL,(function(e,r){return t._setHSLA(null,e,1-r)})),this.settings.alpha&&c(i,this._domA,(function(e,r){return t._setHSLA(null,null,null,1-r)}));var o=this._domEdit;n(o,"input",(function(){t._setColor(this.value,{fromEditor:!0,failSilently:!0})})),n(o,"focus",(function(){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var t=function(t){return e.closeHandler(t)};n(window,p,t),n(window,u,t),l(i,r,["Esc","Escape"],t);var o=function(t){e.__containedEvent=t.timeStamp};n(r,p,o),n(r,u,o),n(e._domCancel,"click",t)}));var a=function(t){e._ifPopup((function(){return e.closeHandler(t)})),e.onDone&&e.onDone(e.colour)};n(this._domOkay,"click",a),l(i,r,["Enter"],a)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup((function(r){"static"===getComputedStyle(e).position&&(e.style.position="relative");var i=!0===r?"popup_right":"popup_"+r;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(e){e===i?t.classList.add(e):t.classList.remove(e)})),t.classList.add(i)}))}},{key:"_setHSLA",value:function(e,t,r,i,n){n=n||{};var o=this.colour,a=o.hsla;[e,t,r,i].forEach((function(e,t){(e||0===e)&&(a[t]=e)})),o.hsla=a,this._updateUI(n),this.onChange&&!n.silent&&this.onChange(o)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,r=t.hsla,i="hsl("+360*r[0]+", 100%, 50%)",n=t.hslString,o=t.hslaString,a=this._domH,c=this._domSL,s=this._domA,p=f(".picker_selector",a),u=f(".picker_selector",c),l=f(".picker_selector",s);g(0,p,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,g(0,u,r[1]),v(0,u,1-r[2]),c.style.color=n,v(0,l,1-r[3]);var h=n,d=h.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[h,d]+"), linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!e.fromEditor){var b=this.settings.alpha,k=void 0;switch(this.settings.editorFormat){case"rgb":k=t.printRGB(b);break;case"hsl":k=t.printHSL(b);break;default:k=t.printHex(b)}this._domEdit.value=k}this._domSample.style.color=o}function g(e,t,r){t.style.left=100*r+"%"}function v(e,t,r){t.style.top=100*r+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var r=e?"":"none",i=t.style.display!==r;return i&&(t.style.display=r),i}}]),r}(),d=document.createElement("style");return d.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(d),h.StyleElement=d,h}()),i.exports),o=t({__proto__:null,default:e(n)},[n]);
|
|
4
|
+
import{d as e}from"./p-CHZfg_a9.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var r,i={exports:{}},n=(r||(r=1,i.exports=function(){var e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],i=!0,n=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(i=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){n=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(n)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var r=this;r.length<e;)r=t+r;return r};var i={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var o=function(){function o(t,i,n,a){e(this,o);var c=this;if(void 0===t);else if(Array.isArray(t))this.rgba=t;else if(void 0===n){var s=t&&""+t;s&&function(e){if(e.startsWith("hsl")){var t=e.match(/([\-\d\.e]+)/g).map(Number),i=r(t,4),n=i[0],a=i[1],s=i[2],p=i[3];void 0===p&&(p=1),c.hsla=[n/=360,a/=100,s/=100,p]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),f=r(u,4),l=f[3];void 0===l&&(l=1),c.rgba=[f[0],f[1],f[2],l]}else c.rgba=e.startsWith("#")?o.hexToRgb(e):o.nameToRgb(e)||o.hexToRgb(e)}(s.toLowerCase())}else this.rgba=[t,i,n,void 0===a?1:a]}return t(o,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map((function(e,t){return n(e,3===t?3:0)}));return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],r=["","%","%",""],i=(e?this.hsla:this.hsla.slice(0,3)).map((function(e,i){return n(e*t[i],3===i?3:1)+r[i]}));return e?"hsla("+i+")":"hsl("+i+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=o.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=o.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)})).map((function(e){return e.padStart(2,"0")})).join("")},set:function(e){this.rgba=o.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var r=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(e){return parseInt(e,16)}));return r[3]=r[3]/255,r}},{key:"nameToRgb",value:function(e){var t=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=i[t];return void 0===r?r:o.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=r(e,4),i=t[0],n=t[1],o=t[2],a=t[3];i/=255,n/=255,o/=255;var c=Math.max(i,n,o),s=Math.min(i,n,o),p=void 0,u=void 0,f=(c+s)/2;if(c===s)p=u=0;else{var l=c-s;switch(u=f>.5?l/(2-c-s):l/(c+s),c){case i:p=(n-o)/l+(n<o?6:0);break;case n:p=(o-i)/l+2;break;case o:p=(i-n)/l+4}p/=6}return[p,u,f,a]}},{key:"hslToRgb",value:function(e){var t=r(e,4),i=t[0],n=t[1],o=t[2],a=t[3],c=void 0,s=void 0,p=void 0;if(0===n)c=s=p=o;else{var u=function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},f=o<.5?o*(1+n):o+n-o*n,l=2*o-f;c=u(l,f,i+1/3),s=u(l,f,i),p=u(l,f,i-1/3)}var h=[255*c,255*s,255*p].map(Math.round);return h[3]=a,h}}]),o}(),a=function(){function r(){e(this,r),this._events=[]}return t(r,[{key:"add",value:function(e,t,r){e.addEventListener(t,r,!1),this._events.push({target:e,type:t,handler:r})}},{key:"remove",value:function(e,t,i){this._events=this._events.filter((function(n){var o=!0;return e&&e!==n.target&&(o=!1),t&&t!==n.type&&(o=!1),i&&i!==n.handler&&(o=!1),o&&r._doRemove(n.target,n.type,n.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return r._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(e,t,r){e.removeEventListener(t,r,!1)}}]),r}();function c(e,t,r){var i=!1;function n(e,t,r){return Math.max(t,Math.min(e,r))}function o(e,o,a){if(a&&(i=!0),i){e.preventDefault();var c=t.getBoundingClientRect(),s=c.width,p=c.height,u=o.clientY,f=n(o.clientX-c.left,0,s),l=n(u-c.top,0,p);r(f/s,l/p)}}function a(e,t){1===(void 0===e.buttons?e.which:e.buttons)?o(e,e,t):i=!1}function c(e,t){1===e.touches.length?o(e,e.touches[0],t):i=!1}e.add(t,"mousedown",(function(e){a(e,!0)})),e.add(t,"touchstart",(function(e){c(e,!0)})),e.add(window,"mousemove",a),e.add(t,"touchmove",c),e.add(window,"mouseup",(function(){i=!1})),e.add(t,"touchend",(function(){i=!1})),e.add(t,"touchcancel",(function(){i=!1}))}var s="keydown",p="mousedown",u="focusin";function f(e,t){return(t||document).querySelector(e)}function l(e,t,r,i){e.add(t,s,(function(e){r.indexOf(e.key)>=0&&i(e)}))}var h=function(){function r(t){e(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new a,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return t(r,[{key:"setOptions",value:function(e){var t=this;if(e){var r=this.settings;if(e instanceof HTMLElement)r.parent=e;else{r.parent&&e.parent&&r.parent!==e.parent&&(this._events.remove(r.parent),this._popupInited=!1),function(e,t){for(var r in e)t[r]=e[r]}(e,r),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var i=e.color||e.colour;i&&this._setColor(i)}var n=r.parent;if(n&&r.popup&&!this._popupInited){var o=function(e){return t.openHandler(e)};this._events.add(n,"click",o),l(this._events,n,[" ","Spacebar","Enter"],o),this._popupInited=!0}else e.parent&&!r.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===s?this._domEdit:this.domElement;setTimeout((function(){return t.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,r=!1;e?t===p||t===u?e.timeStamp>(this.__containedEvent||0)+100&&(r=!0):(function(e){e.preventDefault(),e.stopPropagation()}(e),r=!0):r=!0,r&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==p&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var r=void 0;try{r=new o(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,r,i=(t=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',(r=document.createElement("div")).innerHTML=t,r.firstElementChild);return this.domElement=i,this._domH=f(".picker_hue",i),this._domSL=f(".picker_sl",i),this._domA=f(".picker_alpha",i),this._domEdit=f(".picker_editor input",i),this._domSample=f(".picker_sample",i),this._domOkay=f(".picker_done button",i),this._domCancel=f(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,t=this,r=this.domElement,i=this._events;function n(e,t,r){i.add(e,t,r)}n(r,"click",(function(e){return e.preventDefault()})),c(i,this._domH,(function(e){return t._setHSLA(e)})),c(i,this._domSL,(function(e,r){return t._setHSLA(null,e,1-r)})),this.settings.alpha&&c(i,this._domA,(function(e,r){return t._setHSLA(null,null,null,1-r)}));var o=this._domEdit;n(o,"input",(function(){t._setColor(this.value,{fromEditor:!0,failSilently:!0})})),n(o,"focus",(function(){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var t=function(t){return e.closeHandler(t)};n(window,p,t),n(window,u,t),l(i,r,["Esc","Escape"],t);var o=function(t){e.__containedEvent=t.timeStamp};n(r,p,o),n(r,u,o),n(e._domCancel,"click",t)}));var a=function(t){e._ifPopup((function(){return e.closeHandler(t)})),e.onDone&&e.onDone(e.colour)};n(this._domOkay,"click",a),l(i,r,["Enter"],a)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup((function(r){"static"===getComputedStyle(e).position&&(e.style.position="relative");var i=!0===r?"popup_right":"popup_"+r;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(e){e===i?t.classList.add(e):t.classList.remove(e)})),t.classList.add(i)}))}},{key:"_setHSLA",value:function(e,t,r,i,n){n=n||{};var o=this.colour,a=o.hsla;[e,t,r,i].forEach((function(e,t){(e||0===e)&&(a[t]=e)})),o.hsla=a,this._updateUI(n),this.onChange&&!n.silent&&this.onChange(o)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,r=t.hsla,i="hsl("+360*r[0]+", 100%, 50%)",n=t.hslString,o=t.hslaString,a=this._domH,c=this._domSL,s=this._domA,p=f(".picker_selector",a),u=f(".picker_selector",c),l=f(".picker_selector",s);g(0,p,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,g(0,u,r[1]),v(0,u,1-r[2]),c.style.color=n,v(0,l,1-r[3]);var h=n,d=h.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[h,d]+"), linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!e.fromEditor){var b=this.settings.alpha,k=void 0;switch(this.settings.editorFormat){case"rgb":k=t.printRGB(b);break;case"hsl":k=t.printHSL(b);break;default:k=t.printHex(b)}this._domEdit.value=k}this._domSample.style.color=o}function g(e,t,r){t.style.left=100*r+"%"}function v(e,t,r){t.style.top=100*r+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var r=e?"":"none",i=t.style.display!==r;return i&&(t.style.display=r),i}}]),r}(),d=document.createElement("style");return d.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(d),h.StyleElement=d,h}()),i.exports),o=t({__proto__:null,default:e(n)},[n]);
|
|
5
5
|
/*!
|
|
6
6
|
* vanilla-picker v2.12.3
|
|
7
7
|
* https://vanilla-picker.js.org
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,H as r}from"./p-
|
|
4
|
+
import{r as t,h as e,H as r}from"./p-CHZfg_a9.js";const i=class{constructor(e){t(this,e),this.parsedSections=[]}parseProducts(t){let e=[];if("string"==typeof t)try{const r=JSON.parse(t);e=this.extractSections(r)}catch(r){console.error("Invalid JSON passed to bundleSections prop:",t),e=[]}else t&&(e=this.extractSections(t));this.parsedSections=e}extractSections(t){return t.bundle&&t.bundle.sections&&Array.isArray(t.bundle.sections)?t.bundle.sections:Array.isArray(t)?t:t.sections&&Array.isArray(t.sections)?t.sections:(console.warn("No valid sections found in data:",t),[])}isCartPage(){return salla.url.is_page("cart")}renderCartPage(){return e("salla-multiple-bundle-product-cart",{sections:this.parsedSections})}renderDetailsPage(){return e("salla-multiple-bundle-product-details",{sections:this.parsedSections})}componentWillLoad(){this.parseProducts(this.bundleSections)}render(){return e(r,{key:"db7efe81ce29dd1bc45cc5f1dbd45b6b03e31de8",class:"s-multiple-bundle-product-wrapper"},this.isCartPage()?this.renderCartPage():this.renderDetailsPage())}static get watchers(){return{bundleSections:["parseProducts"]}}};i.style="/*!twlt*/:host{display:block}.visible{visibility:visible}.hidden{display:none}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.s-multiple-bundle-product-wrapper{margin-bottom:1.25rem;display:block}.s-multiple-bundle-product-wrapper-sections{display:flex;flex-direction:column;gap:1rem}.s-multiple-bundle-product-wrapper-slider .swiper{display:block !important}.s-multiple-bundle-product-wrapper-slider .swiper-pagination{position:static}.s-multiple-bundle-product-wrapper-slider .swiper-pagination .swiper-pagination-bullet{height:8px;width:8px}.s-multiple-bundle-product-slide-one-third{height:auto;width:100% !important}@media (min-width: 640px){.s-multiple-bundle-product-slide-one-third{width:100% !important}}@media (min-width: 768px){.s-multiple-bundle-product-slide-one-third{width:50% !important}}@media (min-width: 1024px){.s-multiple-bundle-product-slide-one-third{width:35.7% !important}}.s-multiple-bundle-product-slide-one-third-disabled{pointer-events:none;cursor:not-allowed}.s-multiple-bundle-product-slide-one-third-disabled .s-multiple-bundle-product-image-wrapper{opacity:0.5}.s-multiple-bundle-product-slide-one-third-disabled .s-multiple-bundle-product-button{--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-card{position:relative;display:flex;height:100%;width:100%;flex-direction:column;overflow:hidden;border-radius:0.5rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-multiple-bundle-product-checkbox{position:absolute;top:0.25rem;right:0.5rem;height:1rem;width:1rem;border-radius:var(--s-radius, 0.25rem);--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));accent-color:#16a34a}.s-multiple-bundle-product-image-wrapper{display:flex;height:200px;justify-content:center}.s-multiple-bundle-product-image{width:100%;object-fit:cover}.s-multiple-bundle-product-content-wrapper{padding:0.5rem;line-height:1rem}.s-multiple-bundle-product-content{display:flex;align-items:flex-start;justify-content:space-between;gap:0.5rem}.s-multiple-bundle-product-details{display:flex;flex-direction:column}.s-multiple-bundle-product-title-wrapper{flex:1 1 0%}.s-multiple-bundle-product-title{font-size:9px;font-weight:500;line-height:1rem;--tw-text-opacity:1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-price-wrapper{display:flex;align-items:center;gap:0.25rem}.s-multiple-bundle-product-price{font-size:9px;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-price-discount{margin-left:0.5rem;font-size:8px;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-multiple-bundle-product-button{display:flex;align-items:center;gap:0.25rem;border-radius:0.5rem;border-width:0px;text-align:start;font-size:10px;font-weight:700;--tw-text-opacity:1;color:rgb(22 163 74 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-multiple-bundle-product-button:hover{--tw-text-opacity:1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-button-icon{font-size:10px;font-weight:700}.s-multiple-bundle-product-button-icon svg{height:1rem;width:1rem;fill:#16a34a}.s-multiple-bundle-product-button-disabled-icon{pointer-events:none;opacity:0.5}.s-multiple-bundle-product-badge{display:flex;flex-shrink:0;align-items:center;gap:0.25rem;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;font-size:7px;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-options-modal-footer{display:flex;justify-content:flex-end}.s-multiple-bundle-product-options-modal-slider{margin-top:1.25rem;display:flex;gap:1.25rem}.s-multiple-bundle-product-options-modal-slider .s-slider-container .swiper-slide{display:flex;align-items:center;justify-content:center}.s-multiple-bundle-product-options-modal-slider .s-slider-thumbs{margin-top:0px !important}.s-multiple-bundle-product-options-modal-slider .s-slider-thumbs-container{position:static;margin:0px !important;width:40px !important;transform:none !important;padding-left:0px !important;padding-right:0px !important;padding-top:0.5rem !important;padding-bottom:0.5rem !important}.s-multiple-bundle-product-options-modal-slider .s-slider-thumbs-container .swiper-slide{margin-top:0px !important;display:flex !important;height:40px !important;width:100%;align-items:center;justify-content:center;padding:0.25rem}.s-multiple-bundle-product-cart-header-wrapper{width:100%}.s-multiple-bundle-product-cart-header{display:flex;align-items:center;gap:1rem}.s-multiple-bundle-product-cart-header-no-options{justify-content:space-between}.s-multiple-bundle-product-cart-header-content{display:flex;align-items:center;gap:1rem}.s-multiple-bundle-product-cart-header-remove-button{display:flex;align-items:center;gap:0.25rem}.s-multiple-bundle-product-cart-body-remove-button{display:flex;align-items:center;justify-content:flex-end;gap:0.25rem}.s-multiple-bundle-product-cart-header-image-wrapper{position:relative;flex-shrink:0;overflow:hidden}.s-multiple-bundle-product-cart-header-image{height:4rem;width:4rem;flex:none;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));object-fit:cover;object-position:center}.s-multiple-bundle-product-cart-header-content-details>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.25rem * var(--tw-space-y-reverse))}.s-multiple-bundle-product-cart-header-content-details-title{font-size:1rem;font-weight:500;line-height:1.5rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-cart-header-content-details-price{display:flex;align-items:center;gap:0.25rem}.s-multiple-bundle-product-cart-header-content-details-price-regular{font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-cart-header-content-details-price-sale{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-multiple-bundle-product-cart-header-content-details-quantity{display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-multiple-bundle-product-cart-header-content-details-title-link{font-size:1rem;line-height:1.5rem;font-weight:500}.s-multiple-bundle-product-options-modal-slider-thumb{height:100%;width:100%;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));object-fit:cover}";export{i as salla_multiple_bundle_product}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r,h as t,a as e}from"./p-BW1au-Nh.js";import{S as a}from"./p-BscTeWDc.js";import{H as i}from"./p-DOBDDG4K.js";import"./p-CgtvEd63.js";const s=class{constructor(t){r(this,t),this.inputValue="",this.translationLoaded=!1,this.loading=!1,this.typing=!1,this.debounce=setTimeout((()=>""),1e3),this.placeholder=!1,this.inline=!1,this.oval=!1,this.height=60,this.maxWords=5,this.showAction=!1,this.productSlot=this.host.querySelector('[slot="product"]')?.innerHTML||this.getDefaultProductSlot(),salla.event.on("search::open",(()=>this.open())),salla.lang.onLoaded((()=>{this.translationLoaded=!0})),salla.event.on("modalClosed",(()=>this.onModalClose()))}async open(){this.inline||await this.modal.open().then((()=>setTimeout((()=>this.searchInput.focus()),300)))}onModalClose(){this.searchInput.value="",this.results=void 0,this.afterSearching(),this.container.classList.remove("s-search-no-results")}handleKeyDown(r){"Enter"===r.key&&this.search_term?.length&&(window.location.href=salla.url.get("search?q="+encodeURI(this.search_term)))}getDefaultProductSlot(){return'<div class="s-search-product-image-container"> <img class="s-search-product-image" src="{image}" alt="{name}"/></div><div class="s-search-product-details"> <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div></div>'}debounceSearch(r){this.typing=!0,clearTimeout(this.debounce),this.debounce=setTimeout((()=>{this.typing=!1,this.search_term=r.target.value}),700)}limitWordsAndSearch(r){const t=r.target.value.trim().split(/\s+/);if(t.length>this.maxWords){const r=t.slice(0,this.maxWords).join(" ");this.searchInput.value=r}this.debounceSearch(r)}getQueryParam(r){return new URLSearchParams(window.location.search).get(r)}handleActionClick(){if(this.search_term&&this.search_term.length>2)return this.search(this.search_term)}handleSearch(r){this.inputValue=r,r.length>2?this.search(r):(this.results=void 0,this.afterSearching())}search(r){this.noResults.style.display="none",this.loading=!0,salla.product.fetch({source:"search",source_value:r}).then((t=>{this.results=t,salla.event.emit("Products Searched",r)})).catch((r=>"Query is same as previous one!"!==r?this.results=void 0:null)).finally((()=>this.afterSearching(!1)))}afterSearching(r=!0){this.noResults.style.display=r||this.results?.data.length>0?"none":"block",i.toggleElementClassIf(this.container,"s-search-container-open","s-search-no-results",(()=>this.results?.data.length)),this.loading=!1,salla.product.api.previousQuery="",this.inputValue.length<3&&this.container.classList.remove("s-search-no-results")}render(){const r=t("div",{key:"ca8dec5eb90cd0893a1a3364df34ba0ee4d60891",class:{"s-search-container":!0,"s-search-inline":this.inline},ref:r=>this.container=r},t("div",{key:"212f8180ecca220a8b89231311dec6cdf3ef0b06",class:"s-search-input-wrapper"},t("span",{key:"51fb0f9a2e342afd35eb82b57f55471aa9e1519f",class:"s-search-icon-wrap"},t("span",{key:"e75117068c51c6d200e8e20fa0f00ca02ed0c61d",class:"s-search-icon",innerHTML:this.loading?'<i class="s-search-spinner-loader"/>':a})),t("input",{key:"442b1704b75a33e8c9e02da8200151a1d8e8db72",type:"search",enterkeyhint:"search",autocomplete:"off",class:"s-search-input",placeholder:salla.lang.get("blocks.header.search_placeholder"),onInput:r=>this.limitWordsAndSearch(r),onKeyDown:r=>this.handleKeyDown(r),ref:r=>this.searchInput=r,style:{height:this.height+"px",borderRadius:this.oval?this.height/2+"px":""}}),this.showAction?t("salla-button",{loading:this.loading,class:{"s-search-action":!0,"s-search-action-oval":this.oval},onClick:()=>this.handleActionClick()},!this.loading&&t("span",{innerHTML:a})):null),t("div",{key:"f3b40ce4ec24678f6d8421f3da8ac9e1bd631c3a",class:"s-search-results"},this.results?.data.map((r=>t("a",{href:r.url+"?from=search-bar",class:{"s-search-product":!0,"s-search-product-not-available":!r.is_available},innerHTML:this.productSlot.replace(/\{name\}/g,r.name).replace(/\{price\}/g,r.price?salla.money(r.price):"").replace(/\{regular_price\}/g,r.is_on_sale&&r.regular_price?salla.money(r.regular_price):"").replace(/\{image\}/g,r.image.url)}))),t("p",{key:"fdbb21061c599a59c6d828eec80e8d591a708cca",ref:r=>this.noResults=r,class:"s-search-no-results-placeholder"},salla.lang.get("common.elements.no_options")))),e=t("salla-modal",{key:"ca90aea3fb92d1ba7d8270c26e2ecd82d5018784",position:"top",class:"s-search-modal",ref:r=>this.modal=r},r),i=t("div",{key:"73333ce51cabadc4963a9fe9d1372bb7d63925c8",class:"s-search-placeholder-wrapper s-search-inline"},t("div",{key:"77a66e9bba504557160c8c50d91f1216cc68f253",class:"s-search-input-wrapper"},t("span",{key:"18fb5ce6e3e72874e76dd1ef2c6db8718a68f778",class:"s-search-icon-wrap"},t("span",{key:"63b9e9af1c51647df734cc4d5cf7a825b922ce38",class:"s-search-icon",innerHTML:a})),t("button",{key:"b70169ed2d80ec2ad6b09952ad104824610212df",type:"button",class:"s-search-input s-search-placeholder-trigger",onClick:()=>this.open(),style:{height:this.height+"px",borderRadius:this.oval?this.height/2+"px":""}},salla.lang.get("blocks.header.search_placeholder"))),e);return this.placeholder?i:this.inline?t("div",{class:"s-search-modal"},r):e}componentDidLoad(){this.afterSearching(),this.searchInput.value=this.getQueryParam("q")}get host(){return e(this)}static get watchers(){return{search_term:["handleSearch"]}}};s.style='/*!twlt*/.s-search-placeholder-wrapper{position:relative;display:inline-block}.s-search-input-wrapper{position:relative}.s-search-placeholder-trigger{cursor:pointer;appearance:none;text-align:start}.block{display:block}.inline{display:inline}.border{border-width:1px}.s-search-container{position:relative;z-index:99;max-height:14rem;border-radius:0.375rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-search-oval{border-radius:20px}.s-search-inline{min-width:220px}.s-search-container-open{max-height:24rem;border-radius:0px !important}.s-search-container-open .s-search-input{border-top-left-radius:0.375rem !important;border-top-right-radius:0.375rem !important;border-bottom-right-radius:0px !important;border-bottom-left-radius:0px !important;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-search-no-results .s-search-input{border-bottom-right-radius:0px;border-bottom-left-radius:0px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-search-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-top:0px;padding-bottom:0.125rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-input:focus{--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-ring-color:transparent}.s-search-input:where([dir="ltr"],[dir="ltr"] *){padding-left:2.5rem}.s-search-input:where([dir="rtl"],[dir="rtl"] *){padding-right:2.5rem}.s-search-icon-wrap{position:absolute;top:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));line-height:1;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-icon-wrap:where([dir="ltr"],[dir="ltr"] *){left:1rem}.s-search-icon-wrap:where([dir="rtl"],[dir="rtl"] *){right:1rem}.s-search-icon svg{height:1rem;width:1rem;fill:#9ca3af}.s-search-spinner-loader{display:block;height:1rem;width:1rem}@keyframes spin{to{transform:rotate(360deg)}}.s-search-spinner-loader{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));border-right-color:var(--color-primary)}.s-search-results{position:absolute;margin:auto;max-height:24rem;width:100%;max-width:100%;overflow-y:auto;border-bottom-right-radius:0.375rem;border-bottom-left-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow:0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-search-no-results{border-bottom-right-radius:0px !important;border-bottom-left-radius:0px !important}.s-search-no-results-placeholder{padding:1rem;text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product{display:flex;height:100%;justify-content:space-around;overflow:hidden;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));background-color:transparent;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product:last-child{border-bottom-width:0px}.s-search-product:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 480px){.s-search-product{padding-left:1.25rem;padding-right:1.25rem}}.s-search-product-image-container{position:relative;height:3.5rem;width:5rem;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-image{position:relative;height:100%;width:100%;object-fit:cover;font-size:0px}.s-search-product-image::before{position:absolute;top:0px;left:0px;height:100%;width:100%;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:\'\';content:var(--tw-content)}.s-search-product-details{flex:1 1 0%;padding-top:0.25rem}.s-search-product-details:where([dir="ltr"],[dir="ltr"] *){padding-left:1rem}@media (min-width: 480px){.s-search-product-details:where([dir="ltr"],[dir="ltr"] *){padding-left:1.25rem}}.s-search-product-details:where([dir="rtl"],[dir="rtl"] *){padding-right:1rem}@media (min-width: 480px){.s-search-product-details:where([dir="rtl"],[dir="rtl"] *){padding-right:1.25rem}}.s-search-product-title{margin-bottom:0.375rem;display:flex;flex-direction:column;align-items:baseline;justify-content:flex-start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-price{display:flex;width:100%;align-items:center;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary)}.s-search-product-regular-price{padding-left:0.75rem;padding-right:0.75rem;font-weight:500;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-not-available{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-search-action{position:absolute;height:100%}.s-search-action:where([dir="ltr"],[dir="ltr"] *){right:0px}.s-search-action:where([dir="rtl"],[dir="rtl"] *){left:0px;border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-action-oval:where([dir="ltr"],[dir="ltr"] *){border-top-right-radius:9999px;border-bottom-right-radius:9999px}.s-search-action-oval:where([dir="rtl"],[dir="rtl"] *){border-top-left-radius:9999px;border-bottom-left-radius:9999px}.s-search-input-wrapper{position:relative;display:flex;flex-grow:1;align-items:center}.s-search-modal .s-modal-wrapper{align-items:flex-start;padding:0}.s-search-modal .s-modal-spacer{display:inline}.s-search-modal .s-modal-body{padding:0;width:700px;max-width:90%;margin-top:3.2rem;border-radius:0.5rem;background:transparent;overflow:visible;position:relative !important}.s-search-modal .s-modal-close{top:50%;transform:translateY(-50%)}';export{s as salla_search}
|
|
4
|
+
import{r,h as t,a as e}from"./p-CHZfg_a9.js";import{S as a}from"./p-BscTeWDc.js";import{H as i}from"./p-DOBDDG4K.js";import"./p-CgtvEd63.js";const s=class{constructor(t){r(this,t),this.inputValue="",this.translationLoaded=!1,this.loading=!1,this.typing=!1,this.debounce=setTimeout((()=>""),1e3),this.placeholder=!1,this.inline=!1,this.oval=!1,this.height=60,this.maxWords=5,this.showAction=!1,this.productSlot=this.host.querySelector('[slot="product"]')?.innerHTML||this.getDefaultProductSlot(),salla.event.on("search::open",(()=>this.open())),salla.lang.onLoaded((()=>{this.translationLoaded=!0})),salla.event.on("modalClosed",(()=>this.onModalClose()))}async open(){this.inline||await this.modal.open().then((()=>setTimeout((()=>this.searchInput.focus()),300)))}onModalClose(){this.searchInput.value="",this.results=void 0,this.afterSearching(),this.container.classList.remove("s-search-no-results")}handleKeyDown(r){"Enter"===r.key&&this.search_term?.length&&(window.location.href=salla.url.get("search?q="+encodeURI(this.search_term)))}getDefaultProductSlot(){return'<div class="s-search-product-image-container"> <img class="s-search-product-image" src="{image}" alt="{name}"/></div><div class="s-search-product-details"> <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div></div>'}debounceSearch(r){this.typing=!0,clearTimeout(this.debounce),this.debounce=setTimeout((()=>{this.typing=!1,this.search_term=r.target.value}),700)}limitWordsAndSearch(r){const t=r.target.value.trim().split(/\s+/);if(t.length>this.maxWords){const r=t.slice(0,this.maxWords).join(" ");this.searchInput.value=r}this.debounceSearch(r)}getQueryParam(r){return new URLSearchParams(window.location.search).get(r)}handleActionClick(){if(this.search_term&&this.search_term.length>2)return this.search(this.search_term)}handleSearch(r){this.inputValue=r,r.length>2?this.search(r):(this.results=void 0,this.afterSearching())}search(r){this.noResults.style.display="none",this.loading=!0,salla.product.fetch({source:"search",source_value:r}).then((t=>{this.results=t,salla.event.emit("Products Searched",r)})).catch((r=>"Query is same as previous one!"!==r?this.results=void 0:null)).finally((()=>this.afterSearching(!1)))}afterSearching(r=!0){this.noResults.style.display=r||this.results?.data.length>0?"none":"block",i.toggleElementClassIf(this.container,"s-search-container-open","s-search-no-results",(()=>this.results?.data.length)),this.loading=!1,salla.product.api.previousQuery="",this.inputValue.length<3&&this.container.classList.remove("s-search-no-results")}render(){const r=t("div",{key:"ca8dec5eb90cd0893a1a3364df34ba0ee4d60891",class:{"s-search-container":!0,"s-search-inline":this.inline},ref:r=>this.container=r},t("div",{key:"212f8180ecca220a8b89231311dec6cdf3ef0b06",class:"s-search-input-wrapper"},t("span",{key:"51fb0f9a2e342afd35eb82b57f55471aa9e1519f",class:"s-search-icon-wrap"},t("span",{key:"e75117068c51c6d200e8e20fa0f00ca02ed0c61d",class:"s-search-icon",innerHTML:this.loading?'<i class="s-search-spinner-loader"/>':a})),t("input",{key:"442b1704b75a33e8c9e02da8200151a1d8e8db72",type:"search",enterkeyhint:"search",autocomplete:"off",class:"s-search-input",placeholder:salla.lang.get("blocks.header.search_placeholder"),onInput:r=>this.limitWordsAndSearch(r),onKeyDown:r=>this.handleKeyDown(r),ref:r=>this.searchInput=r,style:{height:this.height+"px",borderRadius:this.oval?this.height/2+"px":""}}),this.showAction?t("salla-button",{loading:this.loading,class:{"s-search-action":!0,"s-search-action-oval":this.oval},onClick:()=>this.handleActionClick()},!this.loading&&t("span",{innerHTML:a})):null),t("div",{key:"f3b40ce4ec24678f6d8421f3da8ac9e1bd631c3a",class:"s-search-results"},this.results?.data.map((r=>t("a",{href:r.url+"?from=search-bar",class:{"s-search-product":!0,"s-search-product-not-available":!r.is_available},innerHTML:this.productSlot.replace(/\{name\}/g,r.name).replace(/\{price\}/g,r.price?salla.money(r.price):"").replace(/\{regular_price\}/g,r.is_on_sale&&r.regular_price?salla.money(r.regular_price):"").replace(/\{image\}/g,r.image.url)}))),t("p",{key:"fdbb21061c599a59c6d828eec80e8d591a708cca",ref:r=>this.noResults=r,class:"s-search-no-results-placeholder"},salla.lang.get("common.elements.no_options")))),e=t("salla-modal",{key:"ca90aea3fb92d1ba7d8270c26e2ecd82d5018784",position:"top",class:"s-search-modal",ref:r=>this.modal=r},r),i=t("div",{key:"73333ce51cabadc4963a9fe9d1372bb7d63925c8",class:"s-search-placeholder-wrapper s-search-inline"},t("div",{key:"77a66e9bba504557160c8c50d91f1216cc68f253",class:"s-search-input-wrapper"},t("span",{key:"18fb5ce6e3e72874e76dd1ef2c6db8718a68f778",class:"s-search-icon-wrap"},t("span",{key:"63b9e9af1c51647df734cc4d5cf7a825b922ce38",class:"s-search-icon",innerHTML:a})),t("button",{key:"b70169ed2d80ec2ad6b09952ad104824610212df",type:"button",class:"s-search-input s-search-placeholder-trigger",onClick:()=>this.open(),style:{height:this.height+"px",borderRadius:this.oval?this.height/2+"px":""}},salla.lang.get("blocks.header.search_placeholder"))),e);return this.placeholder?i:this.inline?t("div",{class:"s-search-modal"},r):e}componentDidLoad(){this.afterSearching(),this.searchInput.value=this.getQueryParam("q")}get host(){return e(this)}static get watchers(){return{search_term:["handleSearch"]}}};s.style='/*!twlt*/.s-search-placeholder-wrapper{position:relative;display:inline-block}.s-search-input-wrapper{position:relative}.s-search-placeholder-trigger{cursor:pointer;appearance:none;text-align:start}.block{display:block}.inline{display:inline}.border{border-width:1px}.s-search-container{position:relative;z-index:99;max-height:14rem;border-radius:0.375rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-search-oval{border-radius:20px}.s-search-inline{min-width:220px}.s-search-container-open{max-height:24rem;border-radius:0px !important}.s-search-container-open .s-search-input{border-top-left-radius:0.375rem !important;border-top-right-radius:0.375rem !important;border-bottom-right-radius:0px !important;border-bottom-left-radius:0px !important;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-search-no-results .s-search-input{border-bottom-right-radius:0px;border-bottom-left-radius:0px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-search-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-top:0px;padding-bottom:0.125rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-input:focus{--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-ring-color:transparent}.s-search-input:where([dir="ltr"],[dir="ltr"] *){padding-left:2.5rem}.s-search-input:where([dir="rtl"],[dir="rtl"] *){padding-right:2.5rem}.s-search-icon-wrap{position:absolute;top:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));line-height:1;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-icon-wrap:where([dir="ltr"],[dir="ltr"] *){left:1rem}.s-search-icon-wrap:where([dir="rtl"],[dir="rtl"] *){right:1rem}.s-search-icon svg{height:1rem;width:1rem;fill:#9ca3af}.s-search-spinner-loader{display:block;height:1rem;width:1rem}@keyframes spin{to{transform:rotate(360deg)}}.s-search-spinner-loader{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));border-right-color:var(--color-primary)}.s-search-results{position:absolute;margin:auto;max-height:24rem;width:100%;max-width:100%;overflow-y:auto;border-bottom-right-radius:0.375rem;border-bottom-left-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow:0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-search-no-results{border-bottom-right-radius:0px !important;border-bottom-left-radius:0px !important}.s-search-no-results-placeholder{padding:1rem;text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product{display:flex;height:100%;justify-content:space-around;overflow:hidden;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));background-color:transparent;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product:last-child{border-bottom-width:0px}.s-search-product:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 480px){.s-search-product{padding-left:1.25rem;padding-right:1.25rem}}.s-search-product-image-container{position:relative;height:3.5rem;width:5rem;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-image{position:relative;height:100%;width:100%;object-fit:cover;font-size:0px}.s-search-product-image::before{position:absolute;top:0px;left:0px;height:100%;width:100%;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:\'\';content:var(--tw-content)}.s-search-product-details{flex:1 1 0%;padding-top:0.25rem}.s-search-product-details:where([dir="ltr"],[dir="ltr"] *){padding-left:1rem}@media (min-width: 480px){.s-search-product-details:where([dir="ltr"],[dir="ltr"] *){padding-left:1.25rem}}.s-search-product-details:where([dir="rtl"],[dir="rtl"] *){padding-right:1rem}@media (min-width: 480px){.s-search-product-details:where([dir="rtl"],[dir="rtl"] *){padding-right:1.25rem}}.s-search-product-title{margin-bottom:0.375rem;display:flex;flex-direction:column;align-items:baseline;justify-content:flex-start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-price{display:flex;width:100%;align-items:center;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary)}.s-search-product-regular-price{padding-left:0.75rem;padding-right:0.75rem;font-weight:500;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-not-available{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-search-action{position:absolute;height:100%}.s-search-action:where([dir="ltr"],[dir="ltr"] *){right:0px}.s-search-action:where([dir="rtl"],[dir="rtl"] *){left:0px;border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-action-oval:where([dir="ltr"],[dir="ltr"] *){border-top-right-radius:9999px;border-bottom-right-radius:9999px}.s-search-action-oval:where([dir="rtl"],[dir="rtl"] *){border-top-left-radius:9999px;border-bottom-left-radius:9999px}.s-search-input-wrapper{position:relative;display:flex;flex-grow:1;align-items:center}.s-search-modal .s-modal-wrapper{align-items:flex-start;padding:0}.s-search-modal .s-modal-spacer{display:inline}.s-search-modal .s-modal-body{padding:0;width:700px;max-width:90%;margin-top:3.2rem;border-radius:0.5rem;background:transparent;overflow:visible;position:relative !important}.s-search-modal .s-modal-close{top:50%;transform:translateY(-50%)}';export{s as salla_search}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,c as r,a}from"./p-
|
|
4
|
+
import{r as t,h as e,c as r,a}from"./p-CHZfg_a9.js";const s=class{constructor(e){t(this,e),this.isSelected=!1}async getChild(){return{selected:this.selected.bind(this),unselect:this.unselect.bind(this),name:this.name}}unselect(){this.isSelected=!1}selected(){this.isSelected=!0}render(){return e("div",{key:"f5cfa9676bc8314149cb78e103b9ef580c0d7559",class:{"s-tabs-content":!0,"s-tabs-content-selected":this.isSelected}},e("slot",{key:"1b86591377c09f1acb25cda20024b3af9c6a874d"}))}};s.style="";const o=class{constructor(e){t(this,e),this.tabSelected=r(this,"tabSelected"),this.id=Math.random().toString(36).slice(2,10),this.activeClass=void 0,this.height=void 0,this.centered=!1,this.isSelected=!1}async getChild(){return{selected:this.selected.bind(this),unselect:this.unselect.bind(this),name:this.name,id:this.id}}unselect(){this.isSelected=!1}selected(){this.isSelected=!0}onClick(){this.getChild().then((t=>{this.tabSelected.emit(t)}))}render(){return[e("div",{key:"a9548ed2a74d30e6fcf365dbe26aa5f7fdab2468",class:{"s-tabs-header-item":!0,"s-tabs-bg-normal":!0,"s-tabs-active":this.isSelected},onClick:this.onClick.bind(this)},e("slot",{key:"547edd40aab5843c6035bd3c36a34d9449dc12d3"}))]}};o.style="";const i=class{constructor(e){t(this,e),this.backgroundColor=void 0,this.vertical=!1}componentWillLoad(){this.createGroup().then((()=>{const[t]=this.tabGroup;this.selectGroup(t)}))}onSelectedTab(t){const e=this.tabGroup.find((e=>e.header.id===t.detail.id));this.selectGroup(e)}async createGroup(){const t=Array.from(this.host.querySelectorAll("salla-tab-header"));this.tabsHeader=await Promise.all(t.map((async t=>await t.getChild())));const e=Array.from(this.host.querySelectorAll("salla-tab-content"));this.tabsContent=await Promise.all(e.map((async t=>await t.getChild()))),this.tabGroup=this.tabsHeader.map((t=>{const e=this.tabsContent.find((e=>e.name===t.name));return{header:t,content:e}}))}selectGroup(t){this.tabGroup.map((t=>{t.header.unselect(),t.content.unselect()})),t.header.selected(),t.content.selected()}render(){return[e("div",{key:"e9054cb114c2bd66940b6afa98d7c7c230353a74",class:"s-tabs"},e("div",{key:"d245f64aef9b7fd77c9c51eb1d86ddfd9202e5fb",class:"s-tabs-header"},e("slot",{key:"f1b9a982cd746d637db5d514cb691f188af0cb7e",name:"header"})),e("div",{key:"0ba8441707b087a8c4d068b1a72bf10c8efb41cc",class:"s-tabs-content-wrapper"},e("slot",{key:"afcee28724a5a9ce263fcc3a38d624a631069945",name:"content"})))]}get host(){return a(this)}};i.style='/*!twlt*/.s-tabs-header{-ms-overflow-style:none;scrollbar-width:none;}.s-tabs-header::-webkit-scrollbar{display:none}.flex{display:flex}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-loyalty-program-rewards-container .s-tabs-content-wrapper{padding:0px}@media (min-width: 768px){.s-loyalty-program-rewards-container .s-tabs-content-wrapper{padding-top:1rem}}.s-loyalty-program-rewards-container .s-tabs-header{display:flex;align-items:center;justify-content:space-between;border-style:none}.s-loyalty-program-rewards-container .s-tabs-header div{order:1}.s-loyalty-program-rewards-container .s-tabs-header-item{position:relative;margin:0px;display:flex;width:max-content;align-items:center;justify-content:center;gap:0.5rem;border-radius:0.5rem;background-color:transparent;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container .s-tabs-bg-normal{background-color:transparent;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container-cart .s-tabs-bg-normal{background-color:transparent;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container-cart .s-tabs-header-item{display:flex;width:max-content;align-items:center;justify-content:center;gap:0.5rem;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem}.s-loyalty-program-rewards-container-cart .s-tabs-content-wrapper{padding:0px}.s-loyalty-program-rewards-container-cart .s-tabs-header{overflow-x:auto;border-bottom-width:1px;border-color:var(--color-primary-light);padding-left:1.25rem;padding-right:1.25rem}@media (min-width: 640px){.s-loyalty-program-rewards-container-cart .s-tabs-header{margin-left:1.25rem;margin-right:1.25rem;padding-left:0px;padding-right:0px}}.s-loyalty-program-rewards-container .s-tabs-active{background-color:var(--color-primary-light);--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-loyalty-program-rewards-container-cart .s-tabs-active{background-color:var(--color-primary-light);--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-loyalty-program-reward-details .s-tabs-header{margin-top:0.5rem;margin-bottom:0.5rem;margin-left:1rem;margin-right:1rem;display:flex}.s-loyalty-program-reward-details .s-tabs-header>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-loyalty-program-reward-details .s-tabs-header{border-style:none}@media (min-width: 768px){.s-loyalty-program-reward-details .s-tabs-header{margin-left:3rem;margin-right:3rem}}.s-loyalty-program-reward-details .s-tabs-header:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-loyalty-program-reward-details .s-tabs-header-item{display:flex;width:max-content;align-items:center}.s-loyalty-program-reward-details .s-tabs-header-item>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-loyalty-program-reward-details .s-tabs-header-item{border-radius:9999px;padding-top:0.25rem;padding-bottom:0.25rem;padding-left:1rem;padding-right:1rem}.s-loyalty-program-reward-details .s-tabs-header-item:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-loyalty-program-reward-details .s-tabs-bg-normal{background-color:transparent;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-loyalty-program-reward-details .s-tabs-active{background-color:var(--color-primary-light);font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-loyalty-program-reward-details .s-tabs-header-item span{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-loyalty-program-tabs-hider .s-tabs-header{border-style:none}.s-product-size-guide-wrapper .s-tabs-content{max-height:60vh;overflow:auto}@media (min-width: 768px){.s-product-size-guide-wrapper .s-tabs-content{max-height:70vh}}.s-tabs-bg-normal{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.s-tabs-header{display:flex;cursor:pointer;align-content:center;justify-content:flex-start}.s-tabs-header>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-tabs-header{overflow-x:auto;border-bottom-width:2px;border-color:var(--color-primary)}@media (min-width: 768px){.s-tabs-header{overflow-x:hidden}}.s-tabs-header:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-tabs-header *{pointer-events:auto !important}.s-tabs-header-item{border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-top:0.5rem;padding-bottom:0.5rem;padding-left:0.75rem;padding-right:0.75rem;font-size:0.875rem;line-height:1.25rem}@media (min-width: 768px){.s-tabs-header-item{padding-left:1.75rem;padding-right:1.75rem}}.s-tabs-content{display:none}.s-tabs-content-wrapper{padding-top:0.75rem}.s-tabs-content-selected{display:block}.s-tabs-active{background-color:var(--color-primary);--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}';export{s as salla_tab_content,o as salla_tab_header,i as salla_tabs}
|