@salla.sa/twilight-components 2.14.526 → 2.14.527
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-dCwl_WGS.js → filepond-b0w4ucsY.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-JE47euyP.js → filepond-plugin-file-poster-DcK1l1GY.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CFbzBG_a.js → filepond-plugin-file-validate-size-CkPhV0MZ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-B95BRuZd.js → filepond-plugin-file-validate-type-FezmfZnb.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-QbQgAOte.js → filepond-plugin-image-edit-SjJnSovO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C3KRxOCO.js → filepond-plugin-image-exif-orientation-BadaWudo.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Bg5kON16.js → filepond-plugin-image-preview-OycIHnPl.js} +1 -1
- package/dist/cjs/{functions-DI3Yp4Of.js → functions-B5JSRkNf.js} +1 -1
- package/dist/cjs/{index-CL2v3rWe.js → index-C8azAHop.js} +2 -2
- package/dist/cjs/{intlTelInput-BhGMuXpz.js → intlTelInput-DCVpeeHH.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- 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-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +5 -4
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
- 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_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down_2.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 +1 -1
- 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.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- 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-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- 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.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.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-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-card_2.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-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.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 +1 -1
- 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 +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/{tracked-promise-BE9q9nKy.js → tracked-promise-C_iMjRSx.js} +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-DOFw7Ga1.js → vanilla-picker-BlVuhlOr.js} +1 -1
- package/dist/collection/components/salla-basket-gap/salla-basket-gap.js +4 -3
- package/dist/components/index.js +2 -2
- package/dist/components/salla-basket-gap.js +4 -3
- package/dist/esm/{filepond-CTe79mlR.js → filepond-BRxfxd7t.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-FpMbRCuf.js → filepond-plugin-file-poster-5YXrzIG7.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-B_GPzKYu.js → filepond-plugin-file-validate-size-Cf8HW8zg.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-CgBrFV7x.js → filepond-plugin-file-validate-type-CYKPeh3k.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DElBchkY.js → filepond-plugin-image-edit-B3vxnYdF.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BhZHvn_5.js → filepond-plugin-image-exif-orientation-BbzOlsEM.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-D2oaWqOt.js → filepond-plugin-image-preview-BWeaWqAq.js} +1 -1
- package/dist/esm/{functions-DzuTSHQl.js → functions-Bni-nvUA.js} +1 -1
- package/dist/esm/{index-LKlIr4DH.js → index-MrxrxOqi.js} +2 -2
- package/dist/esm/{intlTelInput-Dv1YqwOl.js → intlTelInput-DpfK9QTH.js} +1 -1
- package/dist/esm/loader.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-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +5 -4
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
- 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_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down_2.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- 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.entry.js +2 -2
- package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- 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-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- 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.entry.js +1 -1
- package/dist/esm/salla-notifications.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-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-card_2.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-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.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 +1 -1
- 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 +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/{tracked-promise-yYcxeJzZ.js → tracked-promise-r8GfVNie.js} +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-BAPOtEmC.js → vanilla-picker-odqYYCwx.js} +1 -1
- package/dist/twilight/{p-4cc9583f.entry.js → p-012f1725.entry.js} +1 -1
- package/dist/twilight/{p-cffe12a3.entry.js → p-01f19c8e.entry.js} +1 -1
- package/dist/twilight/{p-961941f2.entry.js → p-045bbe40.entry.js} +1 -1
- package/dist/twilight/{p-233039ec.entry.js → p-06089393.entry.js} +1 -1
- package/dist/twilight/{p-797a7c1e.entry.js → p-08514188.entry.js} +1 -1
- package/dist/twilight/{p-288e4fd6.entry.js → p-08bbb599.entry.js} +1 -1
- package/dist/twilight/{p-44bf6cdf.entry.js → p-0ab0dcc6.entry.js} +1 -1
- package/dist/twilight/{p-eed700e7.entry.js → p-0d1cc718.entry.js} +1 -1
- package/dist/twilight/{p-3a46d113.entry.js → p-112dfb27.entry.js} +1 -1
- package/dist/twilight/{p-f418df90.entry.js → p-14fe0051.entry.js} +1 -1
- package/dist/twilight/{p-c1036ebd.entry.js → p-1acb62f7.entry.js} +1 -1
- package/dist/twilight/{p-b5c106ac.entry.js → p-1b999b89.entry.js} +1 -1
- package/dist/twilight/{p-067f052b.entry.js → p-1f049143.entry.js} +1 -1
- package/dist/twilight/{p-5c5f4f73.entry.js → p-1f0fab6c.entry.js} +1 -1
- package/dist/twilight/{p-a435c54c.entry.js → p-1f2d4f6d.entry.js} +1 -1
- package/dist/twilight/{p-d477d0ab.entry.js → p-20ae6a3d.entry.js} +1 -1
- package/dist/twilight/{p-ef4a0ae4.entry.js → p-258f5ec9.entry.js} +1 -1
- package/dist/twilight/{p-1b5189f0.entry.js → p-27437b3c.entry.js} +1 -1
- package/dist/twilight/{p-9a9d4676.entry.js → p-29c02546.entry.js} +1 -1
- package/dist/twilight/{p-59dbe5f1.entry.js → p-30d348b3.entry.js} +1 -1
- package/dist/twilight/{p-71344ddc.entry.js → p-30d8f802.entry.js} +1 -1
- package/dist/twilight/{p-761165fd.entry.js → p-31eab38b.entry.js} +1 -1
- package/dist/twilight/{p-8bb53ed2.entry.js → p-3983347e.entry.js} +1 -1
- package/dist/twilight/{p-de14bb3d.entry.js → p-39e0472d.entry.js} +1 -1
- package/dist/twilight/{p-6204462a.entry.js → p-3b68796d.entry.js} +1 -1
- package/dist/twilight/{p-72e4ef6a.entry.js → p-402227e5.entry.js} +1 -1
- package/dist/twilight/{p-fd33515c.entry.js → p-48143622.entry.js} +1 -1
- package/dist/twilight/{p-60a7b50b.entry.js → p-491a8688.entry.js} +1 -1
- package/dist/twilight/{p-8a3cb52e.entry.js → p-4a71bc5b.entry.js} +1 -1
- package/dist/twilight/{p-6bbc3c94.entry.js → p-52d2c526.entry.js} +1 -1
- package/dist/twilight/{p-2e9fcab1.entry.js → p-58641d12.entry.js} +1 -1
- package/dist/twilight/{p-3f6fac09.entry.js → p-5b20bc08.entry.js} +1 -1
- package/dist/twilight/{p-f4733e21.entry.js → p-61b090d1.entry.js} +1 -1
- package/dist/twilight/{p-61cd30d3.entry.js → p-644d9658.entry.js} +1 -1
- package/dist/twilight/{p-beaf3f78.entry.js → p-67269624.entry.js} +1 -1
- package/dist/twilight/{p-97f12f7b.entry.js → p-67d0ce1c.entry.js} +1 -1
- package/dist/twilight/{p-9445f844.entry.js → p-6d0825be.entry.js} +1 -1
- package/dist/twilight/{p-4e213aab.entry.js → p-70da8cf5.entry.js} +1 -1
- package/dist/twilight/{p-50365a49.entry.js → p-714be207.entry.js} +1 -1
- package/dist/twilight/{p-e6ae56e1.entry.js → p-7206a775.entry.js} +1 -1
- package/dist/twilight/{p-b76720e1.entry.js → p-72094246.entry.js} +1 -1
- package/dist/twilight/{p-879de784.entry.js → p-7524a81a.entry.js} +1 -1
- package/dist/twilight/{p-166343b3.entry.js → p-7a32a312.entry.js} +1 -1
- package/dist/twilight/{p-9bd015e5.entry.js → p-7f923cb2.entry.js} +1 -1
- package/dist/twilight/{p-c7c2dad0.entry.js → p-8105ed54.entry.js} +1 -1
- package/dist/twilight/{p-c06229a1.entry.js → p-82c51ac3.entry.js} +1 -1
- package/dist/twilight/{p-1e799c60.entry.js → p-88013de3.entry.js} +1 -1
- package/dist/twilight/{p-b1b11ebb.entry.js → p-8bc4dc7e.entry.js} +1 -1
- package/dist/twilight/{p-630e769f.entry.js → p-8cd7ff9e.entry.js} +1 -1
- package/dist/twilight/{p-2766a17f.entry.js → p-8e0ddbe8.entry.js} +1 -1
- package/dist/twilight/{p-5555817c.entry.js → p-90836db4.entry.js} +1 -1
- package/dist/twilight/{p-4d46bd3d.entry.js → p-93af5955.entry.js} +1 -1
- package/dist/twilight/{p-e407d576.entry.js → p-9573a650.entry.js} +1 -1
- package/dist/twilight/{p-584817e5.entry.js → p-968e2822.entry.js} +1 -1
- package/dist/twilight/{p-882128d2.entry.js → p-9b2515ab.entry.js} +1 -1
- package/dist/twilight/{p-89ff463e.entry.js → p-9b768009.entry.js} +1 -1
- package/dist/twilight/{p-fe40bb32.entry.js → p-9be5a903.entry.js} +1 -1
- package/dist/twilight/{p-253afd49.entry.js → p-9df6fb80.entry.js} +1 -1
- package/dist/twilight/{p-j2CozAo8.js → p-BGtF1_Bf.js} +1 -1
- package/dist/twilight/{p-DmcP-9uS.js → p-BZYlNbpW.js} +1 -1
- package/dist/twilight/{p-BGqFcZFD.js → p-C34Ycrkk.js} +1 -1
- package/dist/twilight/{p-DkALFehO.js → p-C_BV2ex7.js} +1 -1
- package/dist/twilight/{p-BVtJp-gU.js → p-C_lEyosA.js} +1 -1
- package/dist/twilight/{p-By36wPtc.js → p-CcPplbOM.js} +1 -1
- package/dist/twilight/{p-HiDU1qAC.js → p-ChCYUlik.js} +1 -1
- package/dist/twilight/{p-BOmRCp86.js → p-Cr5HDKQ9.js} +1 -1
- package/dist/twilight/{p-CnIis-ob.js → p-DBIOj_I_.js} +1 -1
- package/dist/twilight/{p-Bdz016Fy.js → p-DffCiPZo.js} +1 -1
- package/dist/twilight/{p-BJ2QKyWM.js → p-J94Exn76.js} +1 -1
- package/dist/twilight/{p-LKlIr4DH.js → p-MrxrxOqi.js} +1 -1
- package/dist/twilight/{p-2f6e46b0.entry.js → p-a433dd94.entry.js} +1 -1
- package/dist/twilight/{p-10c3a012.entry.js → p-a8fe909f.entry.js} +1 -1
- package/dist/twilight/{p-bb242f20.entry.js → p-a9b36fde.entry.js} +1 -1
- package/dist/twilight/{p-c19412a4.entry.js → p-ab087e8d.entry.js} +1 -1
- package/dist/twilight/{p-b063d0f3.entry.js → p-ab18ee85.entry.js} +1 -1
- package/dist/twilight/{p-8993c586.entry.js → p-ab844de4.entry.js} +1 -1
- package/dist/twilight/{p-466fa362.entry.js → p-ac0ec991.entry.js} +1 -1
- package/dist/twilight/{p-eea93ac7.entry.js → p-ac8da0ee.entry.js} +1 -1
- package/dist/twilight/{p-96fff354.entry.js → p-ade37269.entry.js} +1 -1
- package/dist/twilight/{p-500f0db8.entry.js → p-b22b92fb.entry.js} +1 -1
- package/dist/twilight/{p-d81ee10d.entry.js → p-b28588ba.entry.js} +1 -1
- package/dist/twilight/{p-f5154b22.entry.js → p-b33582fd.entry.js} +1 -1
- package/dist/twilight/{p-dfea079f.entry.js → p-b6f4b3ec.entry.js} +1 -1
- package/dist/twilight/{p-c06ab3be.entry.js → p-bb7bd408.entry.js} +1 -1
- package/dist/twilight/{p-146706fc.entry.js → p-c41cb3fa.entry.js} +1 -1
- package/dist/twilight/{p-85819cea.entry.js → p-c45528db.entry.js} +1 -1
- package/dist/twilight/{p-7edb518f.entry.js → p-cac22061.entry.js} +1 -1
- package/dist/twilight/p-cadadc88.entry.js +4 -0
- package/dist/twilight/{p-cf3b863c.entry.js → p-d0696872.entry.js} +1 -1
- package/dist/twilight/{p-1227aa55.entry.js → p-d4d595c1.entry.js} +1 -1
- package/dist/twilight/{p-b46bd39f.entry.js → p-d5b9d505.entry.js} +1 -1
- package/dist/twilight/{p-06c4a0cd.entry.js → p-d76ad30b.entry.js} +1 -1
- package/dist/twilight/{p-4c36ba4c.entry.js → p-d7957d69.entry.js} +1 -1
- package/dist/twilight/{p-2ea5c336.entry.js → p-d9f1cd81.entry.js} +1 -1
- package/dist/twilight/{p-326a584d.entry.js → p-dd41634a.entry.js} +1 -1
- package/dist/twilight/{p-ebaa623e.entry.js → p-e43f07fc.entry.js} +1 -1
- package/dist/twilight/{p-b6ce3117.entry.js → p-ea3264f8.entry.js} +1 -1
- package/dist/twilight/{p-3a9c2e9d.entry.js → p-ea7e2466.entry.js} +1 -1
- package/dist/twilight/p-ec08c0b1.entry.js +4 -0
- package/dist/twilight/{p-0559d448.entry.js → p-ecf01eb1.entry.js} +1 -1
- package/dist/twilight/{p-cf95b06d.entry.js → p-ef7b606e.entry.js} +1 -1
- package/dist/twilight/{p-8f7579e4.entry.js → p-f3aba096.entry.js} +1 -1
- package/dist/twilight/{p-31a1bd9c.entry.js → p-f67ed203.entry.js} +1 -1
- package/dist/twilight/{p-385e1853.entry.js → p-f81029b5.entry.js} +1 -1
- package/dist/twilight/{p-99228024.entry.js → p-fa2ff605.entry.js} +1 -1
- package/dist/twilight/{p-2c14546d.entry.js → p-faf1ca68.entry.js} +1 -1
- package/dist/twilight/{p-172a034d.entry.js → p-fee87019.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-65d86157.entry.js +0 -4
- package/dist/twilight/p-ec1730a3.entry.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as i}from"./p-
|
|
4
|
+
import{d as i}from"./p-MrxrxOqi.js";function n(i,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(t){if("default"!==t&&!(t in i)){var e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:function(){return n[t]}})}}))})),Object.freeze(i)}var t,e,o,E={exports:{}},r=t?E.exports:(t=1,E.exports=(e=function(i){return/^image/.test(i.type)},o=function(i){var n=i.addFilter,t=i.utils,o=t.Type,E=t.createRoute,r=t.createItemAPI,l=void 0===r?function(i){return i}:r,_=i.views.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(i,n){var t=n.item,o=n.query;return new Promise((function(i){var n=t.file;i(!(o("GET_ALLOW_IMAGE_EDIT")&&o("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(i,n){var t=n.query,o=n.dispatch;return new Promise((function(n,E){if(i.origin>1)n(i);else{var r=i.file;if(t("GET_ALLOW_IMAGE_EDIT")&&t("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(r)){var l=function(i,n,t){return function(e){a.shift(),e?n(i):t(i),o("KICK"),_()}},_=function(){if(a.length){var i=a[0],n=i.item;o("EDIT_ITEM",{id:n.id,handleEditorResponse:l(n,i.resolve,i.reject)})}};u({item:i,resolve:n,reject:E}),1===a.length&&_()}else n(i);else n(i)}}))})),n("DID_CREATE_ITEM",(function(i,n){var t=n.dispatch;i.extend("edit",(function(){t("EDIT_ITEM",{id:i.id})}))}));var a=[],u=function(i){return a.push(i),i};return n("CREATE_VIEW",(function(i){var n=i.is,t=i.view,o=i.query;if(o("GET_ALLOW_IMAGE_EDIT")){var r=o("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!r||n("file")&&r){var a=o("GET_IMAGE_EDIT_EDITOR");if(a){a.filepondCallbackBridge||(a.outputData=!0,a.outputFile=!1,a.filepondCallbackBridge={onconfirm:a.onconfirm||function(){},oncancel:a.oncancel||function(){}});t.registerDestroyer((function(i){var n=i.root;n.ref.buttonEditItem&&n.ref.buttonEditItem.off("click",n.ref.handleEdit),n.ref.editButton&&n.ref.editButton.removeEventListener("click",n.ref.handleEdit)}));var u={EDIT_ITEM:function(i){var n=i.root,t=i.props.id,e=i.action.handleEditorResponse;a.cropAspectRatio=n.query("GET_IMAGE_CROP_ASPECT_RATIO")||a.cropAspectRatio,a.outputCanvasBackgroundColor=n.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||a.outputCanvasBackgroundColor;var o=n.query("GET_ITEM",t);if(o){var E=o.file,r=o.getMetadata("crop"),_=o.getMetadata("resize"),u=o.getMetadata("filter")||null,f=o.getMetadata("filters")||null,I=o.getMetadata("colors")||null,c=o.getMetadata("markup")||null,T={crop:r||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},size:_?{upscale:_.upscale,mode:_.mode,width:_.size.width,height:_.size.height}:null,filter:f?f.id||f.matrix:n.query("GET_ALLOW_IMAGE_FILTER")&&n.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!I?u:null,color:I,markup:c};a.onconfirm=function(i){var n=i.data,t=n.crop,E=n.size,r=n.filter,_=n.color,u=n.colorMatrix,f=n.markup,I={};if(t&&(I.crop=t),E){var c=(o.getMetadata("resize")||{}).size,T={width:E.width,height:E.height};T.width&&T.height||!c||(T.width=c.width,T.height=c.height),(T.width||T.height)&&(I.resize={upscale:E.upscale,mode:E.mode,size:T})}f&&(I.markup=f),I.colors=_,I.filters=r,I.filter=u,o.setMetadata(I),a.filepondCallbackBridge.onconfirm(n,l(o)),e&&(a.onclose=function(){e(!0),a.onclose=null})},a.oncancel=function(){a.filepondCallbackBridge.oncancel(l(o)),e&&(a.onclose=function(){e(!1),a.onclose=null})},a.open(E,T)}},DID_LOAD_ITEM:function(i){var n=i.root,E=i.props;if(o("GET_IMAGE_EDIT_ALLOW_EDIT")){var l=E.id,a=o("GET_ITEM",l);if(a&&e(a.file))if(n.ref.handleEdit=function(i){i.stopPropagation(),n.dispatch("EDIT_ITEM",{id:l})},r){var u=t.createChildView(_,{label:"edit",icon:o("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});u.element.classList.add("filepond--action-edit-item"),u.element.dataset.align=o("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),u.on("click",n.ref.handleEdit),n.ref.buttonEditItem=t.appendChildView(u)}else{var f=t.element.querySelector(".filepond--file-info-main"),I=document.createElement("button");I.className="filepond--action-edit-item-alt",I.innerHTML=o("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",I.addEventListener("click",n.ref.handleEdit),f.appendChild(I),n.ref.editButton=I}}}};r&&(u.DID_IMAGE_PREVIEW_SHOW=function(i){var n=i.root;n.ref.buttonEditItem&&(n.ref.buttonEditItem.opacity=1)}),t.registerWriter(E(u))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:o})),o)),l=n({__proto__:null,default:i(r)},[r]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginImageEdit 1.6.3
|
|
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
|
-
import{f as t}from"./p-
|
|
4
|
+
import{f as t}from"./p-MrxrxOqi.js";function r(r,s={}){return s=Object.assign({initialData:void 0,initialStatus:"idle"},s),(i,e)=>{const o=Object.assign((function(...s){const i=r=>{Object.assign(this[e],r),t(this)};return i({status:"pending",error:void 0}),r.call(this,...s).then((t=>(i({status:"success",data:t,error:void 0}),t)),(t=>(i({status:"error",error:t}),Promise.reject(t))))}),{status:s.initialStatus,data:s.initialData,error:void 0});Object.defineProperty(i,e,{value:o})}}export{r as T}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as t}from"./p-LKlIr4DH.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},K=t=>t.replace(/\D/g,""),q=(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=q(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=K(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=K(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;#K;#q;#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.#K=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.#K.normalise(t)}#tt(t){this.#E.telInput.value=this.#K.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.#q=t,this.#G=i})):(l=Promise.resolve(void 0),this.#q=()=>{},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=q(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.#K.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.#q():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.#K.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.#K.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.#K.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=q(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=K(s);if(o){const t=K(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.#K.normalise(t):this.#Z(),s=this.#z?.dialCode;let e;const n=K(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.#q()):this.#q?.()}#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.#K.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=K(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.#K.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-MrxrxOqi.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",O="aria-hidden",S="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",[O]:"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",[O]:"true"},s),this.#d.innerHTML=`\n <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${O}="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`,[S]:"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" ${O}="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}`,[O]:"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",[O]:"true"},i).innerHTML=`\n <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${O}="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.#O(),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="")}#O(){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.#O()?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{#S;constructor(t){t&&this.#T(t)}#T(t){/[\u0660-\u0669]/.test(t)?this.#S="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.#S="persian":this.#S="ascii"}denormalise(t){if(!this.#S||"ascii"===this.#S)return t;const i="arabic-indic"===this.#S?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.#S)return t;const i="arabic-indic"===this.#S?1632:1776,s="arabic-indic"===this.#S?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(s,(t=>String.fromCharCode(t.charCodeAt(0)-i+48)))}isAscii(){return!this.#S||"ascii"===this.#S}},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.#Ot()),!this.#n.countrySearch&&v.HIDDEN_SEARCH_CHAR.test(t.key)&&(t.stopPropagation(),s&&clearTimeout(s),i+=t.key.toLowerCase(),this.#St(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})}#St(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)}}#Ot(){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}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as e}from"./p-LKlIr4DH.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-MrxrxOqi.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
|