@salla.sa/twilight-components 3.0.12 → 3.0.13
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/{Helper-BrrJMIu-.js → Helper-B4hqJex0.js} +1 -1
- package/dist/cjs/{filepond-BKRafQ1x.js → filepond-CCHI2eWd.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-C25z7WOd.js → filepond-plugin-file-poster-Cxy_UUyG.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-2MQdgdwP.js → filepond-plugin-file-validate-size-DHqTQezv.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DD-c_iSB.js → filepond-plugin-file-validate-type-ClS1AOS9.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Dq6FjmNP.js → filepond-plugin-image-edit-gVfj9y0a.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BRAMyVJB.js → filepond-plugin-image-exif-orientation-CdzP8Z0F.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CH8YOizI.js → filepond-plugin-image-preview-BMhxufTW.js} +1 -1
- package/dist/cjs/{index-C51JXzxx.js → index-BXM76OOA.js} +2 -2
- package/dist/cjs/{intlTelInput-B8pv5SRI.js → intlTelInput-CliyU8rX.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 +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
- 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-applied-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.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_9.cjs.entry.js +2 -2
- 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.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 +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-free-shipping-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-free-shipping-tag.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.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 +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
- 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-items.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-payment.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-rewards.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 +2 -2
- 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.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 +2 -2
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
- package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +26 -4
- package/dist/cjs/salla-skeleton.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-thank-you-header.cjs.entry.js +1 -1
- package/dist/cjs/salla-thank-you-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.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/salla-wishlist-summary.cjs.entry.js +2 -2
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-DZOpTkJY.js → vanilla-picker-DJWJlJWt.js} +1 -1
- package/dist/collection/components/salla-search/salla-search.js +18 -3
- package/dist/collection/components/salla-search/utils.js +7 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-search.js +24 -2
- package/dist/docs.json +1 -1
- package/dist/esm/{Helper-HKFR9hkU.js → Helper-MUNhpqNu.js} +1 -1
- package/dist/esm/{filepond-BWuSCgOP.js → filepond-CaVNllXE.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Jmeh5F_E.js → filepond-plugin-file-poster-Bt25FJXy.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DyAHTsNy.js → filepond-plugin-file-validate-size-CdFPtpOe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DRlCCAEY.js → filepond-plugin-file-validate-type-DVpxfIMn.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-Bk6ZqXoD.js → filepond-plugin-image-edit-Bvu4SI2C.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CNF8NRE-.js → filepond-plugin-image-exif-orientation-DSrLViJn.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-yiP7Y36X.js → filepond-plugin-image-preview-Bg5CyutP.js} +1 -1
- package/dist/esm/{index-D-liptKs.js → index-BTn4Le7F.js} +2 -2
- package/dist/esm/{intlTelInput-C8kHZShn.js → intlTelInput-DYVDhkJ2.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 +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +2 -2
- 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-applied-filters.entry.js +2 -2
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +11 -11
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.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_9.entry.js +2 -2
- 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.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 +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-free-shipping-banner.entry.js +1 -1
- package/dist/esm/salla-free-shipping-tag.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.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 +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +2 -2
- 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-items.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-payment.entry.js +1 -1
- package/dist/esm/salla-order-rewards.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 +2 -2
- 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.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +2 -2
- package/dist/esm/salla-products-slider.entry.js +2 -2
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
- package/dist/esm/salla-rating-modal.entry.js +2 -2
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +26 -4
- package/dist/esm/salla-skeleton.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-thank-you-header.entry.js +1 -1
- package/dist/esm/salla-thank-you-page.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.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/salla-wishlist-summary.entry.js +2 -2
- package/dist/esm/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-Bha2vjiQ.js → vanilla-picker-DyEU8qdF.js} +1 -1
- package/dist/twilight/{p-6c52df83.entry.js → p-03307069.entry.js} +1 -1
- package/dist/twilight/{p-d432b93e.entry.js → p-050278af.entry.js} +1 -1
- package/dist/twilight/{p-1ebfa091.entry.js → p-06656664.entry.js} +1 -1
- package/dist/twilight/{p-6ab094ec.entry.js → p-0feb3e5a.entry.js} +1 -1
- package/dist/twilight/{p-5ac272d9.entry.js → p-13264cfc.entry.js} +1 -1
- package/dist/twilight/{p-ebae6a64.entry.js → p-1db91cc0.entry.js} +1 -1
- package/dist/twilight/{p-f699b552.entry.js → p-207ea284.entry.js} +1 -1
- package/dist/twilight/{p-002390c1.entry.js → p-25629cd3.entry.js} +1 -1
- package/dist/twilight/{p-a3b51809.entry.js → p-26770bed.entry.js} +1 -1
- package/dist/twilight/{p-7cfbbb15.entry.js → p-291f093f.entry.js} +1 -1
- package/dist/twilight/{p-6c98a821.entry.js → p-2bdb8616.entry.js} +1 -1
- package/dist/twilight/{p-145268f5.entry.js → p-2e39072f.entry.js} +1 -1
- package/dist/twilight/{p-895b0823.entry.js → p-2f2d3734.entry.js} +1 -1
- package/dist/twilight/p-2ff6e97c.entry.js +4 -0
- package/dist/twilight/{p-a0c03e80.entry.js → p-3018bb56.entry.js} +1 -1
- package/dist/twilight/{p-14dbaceb.entry.js → p-30eb53b2.entry.js} +1 -1
- package/dist/twilight/{p-eaf4c0d6.entry.js → p-327332a6.entry.js} +1 -1
- package/dist/twilight/{p-41576ab1.entry.js → p-3360016d.entry.js} +1 -1
- package/dist/twilight/{p-64c32fc4.entry.js → p-350d64be.entry.js} +1 -1
- package/dist/twilight/{p-c2dda915.entry.js → p-3659131a.entry.js} +1 -1
- package/dist/twilight/{p-ed1aef14.entry.js → p-39133b72.entry.js} +1 -1
- package/dist/twilight/{p-3054378d.entry.js → p-3beb4e9e.entry.js} +1 -1
- package/dist/twilight/{p-e246382d.entry.js → p-3c171699.entry.js} +1 -1
- package/dist/twilight/{p-091626df.entry.js → p-3d15565a.entry.js} +1 -1
- package/dist/twilight/{p-55044cf9.entry.js → p-3d6ca1aa.entry.js} +1 -1
- package/dist/twilight/{p-24d9e3ae.entry.js → p-3fb4f2c5.entry.js} +1 -1
- package/dist/twilight/{p-feac9436.entry.js → p-40137793.entry.js} +1 -1
- package/dist/twilight/{p-07cbb834.entry.js → p-4158c6c8.entry.js} +1 -1
- package/dist/twilight/{p-a0bc4046.entry.js → p-45758d30.entry.js} +1 -1
- package/dist/twilight/{p-3d247b63.entry.js → p-4b0393b0.entry.js} +1 -1
- package/dist/twilight/{p-066a1f35.entry.js → p-4dd27438.entry.js} +1 -1
- package/dist/twilight/{p-92c7020c.entry.js → p-4f7a5995.entry.js} +1 -1
- package/dist/twilight/{p-b66c6151.entry.js → p-54ca3223.entry.js} +1 -1
- package/dist/twilight/{p-34cdfecc.entry.js → p-5880158e.entry.js} +1 -1
- package/dist/twilight/{p-b1fe81b2.entry.js → p-5ce8177f.entry.js} +1 -1
- package/dist/twilight/{p-72d5bb83.entry.js → p-5e76904b.entry.js} +1 -1
- package/dist/twilight/{p-c1c87179.entry.js → p-5f57d799.entry.js} +1 -1
- package/dist/twilight/{p-9a849197.entry.js → p-61daece5.entry.js} +1 -1
- package/dist/twilight/{p-68f19a87.entry.js → p-637b8d57.entry.js} +1 -1
- package/dist/twilight/{p-4484244a.entry.js → p-638cf188.entry.js} +1 -1
- package/dist/twilight/{p-c999fa43.entry.js → p-6492ad5a.entry.js} +1 -1
- package/dist/twilight/{p-4992eb62.entry.js → p-6a0d0804.entry.js} +1 -1
- package/dist/twilight/{p-38b47bdd.entry.js → p-6b9b02eb.entry.js} +1 -1
- package/dist/twilight/{p-66c556be.entry.js → p-6bb8da7d.entry.js} +1 -1
- package/dist/twilight/{p-76880d2d.entry.js → p-70a20d58.entry.js} +1 -1
- package/dist/twilight/{p-61e369cc.entry.js → p-71d315b9.entry.js} +1 -1
- package/dist/twilight/{p-08db53a3.entry.js → p-77572d07.entry.js} +1 -1
- package/dist/twilight/{p-a6fac0ed.entry.js → p-78067cbf.entry.js} +1 -1
- package/dist/twilight/{p-f17443c6.entry.js → p-78eb6163.entry.js} +1 -1
- package/dist/twilight/{p-00b3677a.entry.js → p-7c0208da.entry.js} +1 -1
- package/dist/twilight/{p-4dfe2b5a.entry.js → p-7c080411.entry.js} +1 -1
- package/dist/twilight/{p-96b1321c.entry.js → p-7d652b20.entry.js} +1 -1
- package/dist/twilight/{p-da43f413.entry.js → p-7f4fdbed.entry.js} +1 -1
- package/dist/twilight/{p-a477338e.entry.js → p-7f668549.entry.js} +1 -1
- package/dist/twilight/{p-36be16d5.entry.js → p-83e1c025.entry.js} +1 -1
- package/dist/twilight/{p-05f73b01.entry.js → p-8428d792.entry.js} +1 -1
- package/dist/twilight/{p-8fdbb8b0.entry.js → p-8cfbf521.entry.js} +1 -1
- package/dist/twilight/{p-2f54090e.entry.js → p-9093b323.entry.js} +1 -1
- package/dist/twilight/{p-a7d38b65.entry.js → p-957f8be8.entry.js} +1 -1
- package/dist/twilight/{p-3ecf5876.entry.js → p-96227523.entry.js} +1 -1
- package/dist/twilight/{p-164017ef.entry.js → p-973d0c0e.entry.js} +1 -1
- package/dist/twilight/{p-49fbb20a.entry.js → p-98ea4013.entry.js} +1 -1
- package/dist/twilight/{p-0bd10136.entry.js → p-9ab3141f.entry.js} +1 -1
- package/dist/twilight/{p-59f6c234.entry.js → p-9e6a4173.entry.js} +1 -1
- package/dist/twilight/{p-e2d4b469.entry.js → p-9fddfa26.entry.js} +1 -1
- package/dist/twilight/{p-CEg8igsL.js → p-BMtfLONi.js} +1 -1
- package/dist/twilight/{p-X4SZKWK_.js → p-BQeLrs6C.js} +1 -1
- package/dist/twilight/{p-D-liptKs.js → p-BTn4Le7F.js} +1 -1
- package/dist/twilight/{p-jW-Il9be.js → p-C9qFIl1-.js} +1 -1
- package/dist/twilight/{p-Cr7B1EBq.js → p-CMy0p85X.js} +1 -1
- package/dist/twilight/{p-DX4uCvPd.js → p-DLsRmP3H.js} +1 -1
- package/dist/twilight/{p-DJNlIURb.js → p-DiNerIgN.js} +1 -1
- package/dist/twilight/{p-Bw3Uhhqz.js → p-DkGOhV_Z.js} +1 -1
- package/dist/twilight/{p-CSoBlLkO.js → p-FcLKUXIi.js} +1 -1
- package/dist/twilight/{p-BaSXnr76.js → p-WDcRdcLz.js} +1 -1
- package/dist/twilight/{p-2bfca6bb.entry.js → p-a08629f9.entry.js} +1 -1
- package/dist/twilight/{p-7da71e61.entry.js → p-a15af7a7.entry.js} +1 -1
- package/dist/twilight/{p-19104c8f.entry.js → p-a5c27985.entry.js} +1 -1
- package/dist/twilight/{p-c28c5459.entry.js → p-aa130c1a.entry.js} +1 -1
- package/dist/twilight/{p-c60fa4f3.entry.js → p-b2465771.entry.js} +1 -1
- package/dist/twilight/{p-4053f320.entry.js → p-b4470a27.entry.js} +1 -1
- package/dist/twilight/{p-a9e22858.entry.js → p-b8421eca.entry.js} +1 -1
- package/dist/twilight/{p-155ea894.entry.js → p-b99623b1.entry.js} +1 -1
- package/dist/twilight/{p-8d1a85f2.entry.js → p-c073b9f7.entry.js} +1 -1
- package/dist/twilight/{p-1c73b015.entry.js → p-c08c6d4e.entry.js} +1 -1
- package/dist/twilight/{p-ee16b8d6.entry.js → p-c1646ef4.entry.js} +1 -1
- package/dist/twilight/{p-0d8a7766.entry.js → p-c3bc0c92.entry.js} +1 -1
- package/dist/twilight/{p-4ea47864.entry.js → p-c844df77.entry.js} +1 -1
- package/dist/twilight/{p-7946367e.entry.js → p-c86e2798.entry.js} +1 -1
- package/dist/twilight/{p-ade305e5.entry.js → p-cc6339ed.entry.js} +1 -1
- package/dist/twilight/{p-ec091524.entry.js → p-cdc056e9.entry.js} +1 -1
- package/dist/twilight/{p-f55b3dbb.entry.js → p-ce752017.entry.js} +1 -1
- package/dist/twilight/{p-14c29941.entry.js → p-d15ad844.entry.js} +1 -1
- package/dist/twilight/{p-24c1bf3c.entry.js → p-d4e3dd77.entry.js} +1 -1
- package/dist/twilight/{p-88cb1bf8.entry.js → p-d6c99f15.entry.js} +1 -1
- package/dist/twilight/{p-e47587e7.entry.js → p-dc31cb2d.entry.js} +1 -1
- package/dist/twilight/{p-74950745.entry.js → p-dd463809.entry.js} +1 -1
- package/dist/twilight/{p-66eb497a.entry.js → p-dfb649af.entry.js} +1 -1
- package/dist/twilight/{p-a75fb562.entry.js → p-e0ceea14.entry.js} +1 -1
- package/dist/twilight/{p-1f2be974.entry.js → p-e1708a21.entry.js} +1 -1
- package/dist/twilight/{p-a746d125.entry.js → p-e2d2cce4.entry.js} +1 -1
- package/dist/twilight/{p-c34d28e8.entry.js → p-e447d8f2.entry.js} +1 -1
- package/dist/twilight/{p-3d242cc1.entry.js → p-e652db66.entry.js} +1 -1
- package/dist/twilight/{p-c8ee99c4.entry.js → p-e98d9fae.entry.js} +1 -1
- package/dist/twilight/{p-96a13f39.entry.js → p-e9ae59fd.entry.js} +1 -1
- package/dist/twilight/{p-9d60e39e.entry.js → p-eae40389.entry.js} +1 -1
- package/dist/twilight/{p-1273e69e.entry.js → p-ee8749f3.entry.js} +1 -1
- package/dist/twilight/{p-908865d8.entry.js → p-f2502e8a.entry.js} +1 -1
- package/dist/twilight/{p-627fcdf8.entry.js → p-f4066f38.entry.js} +1 -1
- package/dist/twilight/{p-88f84be5.entry.js → p-f4185664.entry.js} +1 -1
- package/dist/twilight/{p-f58b72e3.entry.js → p-f80d2f36.entry.js} +1 -1
- package/dist/twilight/{p-aa8cf04d.entry.js → p-ffa28556.entry.js} +1 -1
- package/dist/twilight/p-k0G34gr-.js +9 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-search/salla-search.d.ts +1 -0
- package/dist/types/components/salla-search/utils.d.ts +1 -0
- package/package.json +5 -5
- package/dist/twilight/p-08b96a03.entry.js +0 -4
- package/dist/twilight/p-BEXYbhiv.js +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import"./p-D-liptKs.js";var e,t;!function(e){e.VALUES="values",e.VARIANTS="variants",e.MINIMUM="minimum",e.RANGE="range"}(e||(e={})),function(e){e.VALUES="values",e.VARIANT="variants",e.RANGE="range"}(t||(t={})),"undefined"!=typeof salla&&salla.event.setMaxListeners(100);var a=new class{constructor(){this.plans={0:"basic",25:"plus",50:"pro",100:"special"}}setIncludes(e){return this.includes=e,this}toggleElementClassIf(e,t,a,r){t=Array.isArray(t)?t:t.split(" "),a=Array.isArray(a)?a:a.split(" ");let s=r(e);return e?.classList.remove(...s?a:t),e?.classList.add(...s?t:a),this}toggleClassIf(e,t,a,r){return document.querySelectorAll(e).forEach((e=>this.toggleElementClassIf(e,t,a,r))),this}isValidEmail(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}filterEmojies(e){return e.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g,"")}debounce(e,...t){return this.debounce_||(this.debounce_=salla.helpers.debounce(((e,...t)=>e(...t)),500)),this.debounce_(e,...t)}getProductsSource(e){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","customer.wishlist":"wishlist","landing-page":"landing-page","product.index.tag":"tags","product.index.sales":"sales","components.most_sales_products":"sales"}[e||salla.config.get("page.slug")]||e||"latest"}getApiSource(e){return{recently:"selected"}[e]||e}getPageTitleForSource(e){return(e={brands:"common.titles.brands",latest:"blocks.home.latest_products",offers:"common.titles.discounts",reorder:"common.titles.products",sales:"common.titles.most_sales"}[e])?salla.lang.get(e):""}getProductsSourceValue(e,t){const a=this.getProductsSource(e);let r=null;if(t)try{r="string"==typeof t?JSON.parse(t):t}catch(e){console.error("Failed to parse JSON string in sourceValue:",e)}if(!["search","json","offers","latest","sales","related"].includes(a)){if(Array.isArray(r)&&r.length)return r;if(Array.isArray(r)&&!r.length)return"";if("number"==typeof r)return[r];if(!t&&["categories","tags","brands"].includes(e))return[salla.config.get("page.id")]}return r||t?r||t:"search"===a?"undefined"!=typeof window&&new URLSearchParams(window.location.search).get("q")||"":salla.config.get("page.id")}extractFiltersFromUrl(e){let t={};return e.forEach(((e,a)=>{const r=a.match(/^filters\[(.*?)\](\[(.*?)\])?$/u);if(r){const a=r[1],s=r[3];""===s||/^\d+$/.test(s)?(t[a]=Array.isArray(t[a])?t[a]:[],t[a].push(e)):s?(t[a]=t[a]||{},t[a][s]=e):t[a]=e}else{const r=a.match(/^(.*?)$/u);r&&(t[r[1]]=e)}})),t}resolveFilterLabels(t){return t.map((t=>{const a={...t};if(a.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[a.key]||a.label,"rating"==a.key){a.type=e.VALUES;const{max:r,min:s}=t.values;a.values=[5,4,3,2,1].filter((e=>e>=s||e<=r))}return a}))}async injectExtraFieldsToResponse(e){if(!e||!this.includes)return e;const t=e.data.map((e=>e.id));try{const{data:a}=await this.fetchImagesAndOptions(t);if(this.injectOptionsAndImages(e.data,a),!this.includes.includes("metadata"))return e;const r=await salla.api.metadata.fetchValues("product",t);return e.data.forEach((e=>{e.metadata=r.data.find((t=>parseInt(t.entity_id)===parseInt((e.id||"").toString())))})),e}catch(e){throw console.error("Error in injectExtraFieldsToResponse:",e),e}}fetchImagesAndOptions(e){return this.productsIncludes().length?salla.api.product.fetchOptions(e,{with:this.productsIncludes()}):Promise.resolve({data:[]})}injectOptionsAndImages(e,t){return t.length?e.map((e=>(this.includes.filter((e=>"metadata"!==e)).forEach((a=>{const r=t.find((t=>parseInt((t.id||"").toString())===parseInt((e.id||"").toString())));e[a]=r?r[a]:null})),e))):null}productsIncludes(){return this.includes?.filter((e=>"metadata"!=e))}saveSource(e,t){if(t)try{sessionStorage.setItem(e,t)}catch(e){salla.logger.warn("Error saving source to session storage")}}saveProductSource(e){this.saveSource("s-viewed-source",e)}saveProductPosition(e){if(null!=e&&""!==e)try{sessionStorage.setItem("s-viewed-position",String(e))}catch(e){salla.logger.warn("Error saving position to session storage")}}saveRequestId(e){if(e)try{sessionStorage.setItem("s-request-id",e)}catch(e){salla.logger.warn("Error saving request id to session storage")}}saveAddToCartSource(e){this.saveSource("s-add-to-cart-source",e)}parseJson(e){if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(e){salla.logger.error("Failed to parse includes as JSON:",e)}return null}getProductSchemaMarkupScript(e){const t=document.createElement("script");return t.type="application/ld+json",t.text=JSON.stringify({"@context":"http://schema.org","@type":"Product",name:e?.name,image:e?.image?.url||e?.thumbnail,description:e?.description,brand:{"@type":"Brand",logo:e?.brand?.logo},offers:{"@type":"Offer",price:e?.price}}),t}createProductSchema(e,t){let a={productID:`${e.id}`,"@type":"Product",name:e.name,url:e.url,image:e.image.url||e.image,description:e.description||e.subtitle||e.name,...e.sku&&e.sku.length>0&&{sku:e.sku},offers:{"@type":"Offer",url:e.url,priceCurrency:e.currency,price:e.price,itemCondition:"NewCondition",availability:e.is_available?"InStock":"OutOfStock",priceValidUntil:e.discount_ends||new Date((new Date).setDate((new Date).getDate()+7)).toISOString().split("T")[0],priceSpecification:{"@type":"PriceSpecification",price:e.regular_price,priceCurrency:e.currency,valueAddedTaxIncluded:e.is_taxable},seller:{"@type":"Organization",name:salla.config.get("store.name")},shippingDetails:{"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:"0",currency:e.currency||"SAR"},deliveryTime:{"@type":"ShippingDeliveryTime",businessDays:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]},cutoffTime:"14:00"}},hasMerchantReturnPolicy:{"@type":"MerchantReturnPolicy",returnPolicyCategory:"https://schema.org/MerchantReturnFiniteReturnWindow",merchantReturnDays:30,returnMethod:"https://schema.org/ReturnByMail",returnFees:"https://schema.org/FreeReturn"}}};return e.rating?.stars&&(a.aggregateRating={"@type":"AggregateRating",ratingValue:e.rating.stars,reviewCount:e.rating.count}),{"@type":"ListItem",position:t,item:a}}generateProductSchema(e){const t="salla-product-schema-script";if(document.getElementById(t))return void salla.logger.warn(`already added schema-script with id (${t})!`);const a=document.createElement("script");a.type="application/ld+json",a.id=t;const r={"@context":"https://schema.org","@type":"ItemList",name:salla.config.get("page.title"),itemListElement:e.map(((e,t)=>this.createProductSchema(e,t+1)))};a.textContent=JSON.stringify(r),document.head.appendChild(a)}formatDateFromString(e,t,a="en"){const r={en:"Invalid Date",ar:"تاريخ غير صالح"};if(!e||"string"!=typeof e||""===e.trim())return r[a];let s;if(/^\d+$/.test(e)){const t=parseInt(e);s=new Date(t>1e12?t:1e3*t)}else s=new Date(e);return isNaN(s.getTime())?r[a]:`${{en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]}[a][s.getDay()]} ${t(s.getDate(),"en"===a)} ${{en:["January","February","March","April","May","June","July","August","September","October","November","December"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]}[a][s.getMonth()]} ${t(s.getFullYear(),"en"===a)}`}copyToClipboard(e){var t=e.target.innerText;navigator.clipboard.writeText(t).then((()=>{console.log("Text copied to clipboard: "+t)})).catch((e=>{console.error("Unable to copy text to clipboard",e)}))}animateItems(e){if(!e?.length)return;const t=Array.from(e);t.forEach((e=>e.classList.remove("s-animate-fade-in-up"))),t[0].getBoundingClientRect(),t.forEach(((e,t)=>{e.style.animationDelay=100*t+"ms",e.classList.add("s-animate-fade-in-up")})),setTimeout((()=>t.forEach((e=>e.classList.add("animated")))),1200+100*(t.length-1))}createReviewObject(e){return{"@type":"Review",author:{"@type":"Person",name:e.name},reviewBody:e.content,reviewRating:{"@type":"Rating",bestRating:"5",ratingValue:e.stars,worstRating:"1"}}}generateReviewSchema(e){const t=document.createElement("script");t.type="application/ld+json";const a={"@context":"http://schema.org/","@type":"Store",name:salla.config.get("store.name"),url:salla.config.get("store.url"),address:"الرياض",review:e.map((e=>this.createReviewObject(e))),aggregateRating:{"@type":"AggregateRating",ratingValue:e.reduce(((e,t)=>e+t.stars),0)/e.length,reviewCount:e.length}};t.textContent=JSON.stringify(a),document.head.appendChild(t)}availabilityChannels(){let e=salla.config.get("store.settings.product.availability_notify");if(!e)return"";let t=[];return e.email&&t.push("email"),(e.sms||e.mobile||e.whatsapp)&&t.push("sms"),t.join(",")}syncWishlistIcons(e,t){e?.querySelectorAll(t).forEach((e=>{const t=e.product?.id,a="number"==typeof t?t:Number(t);if(Number.isNaN(a))return;const r=salla.wishlist.api.has(a);e.querySelectorAll(".s-product-card-wishlist-btn, .btn--wishlist").forEach((e=>{e.classList.toggle("s-product-card-wishlist-added",r),e.classList.toggle("wishlist-added",r)}))}))}getPlanName(){const e=Number(salla.config.get("store.ray"));return e in this.plans?this.plans[e]:void 0}escapeHtml(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}};export{e as F,a as H}
|
|
4
|
+
import"./p-BTn4Le7F.js";var e,t;!function(e){e.VALUES="values",e.VARIANTS="variants",e.MINIMUM="minimum",e.RANGE="range"}(e||(e={})),function(e){e.VALUES="values",e.VARIANT="variants",e.RANGE="range"}(t||(t={})),"undefined"!=typeof salla&&salla.event.setMaxListeners(100);var a=new class{constructor(){this.plans={0:"basic",25:"plus",50:"pro",100:"special"}}setIncludes(e){return this.includes=e,this}toggleElementClassIf(e,t,a,r){t=Array.isArray(t)?t:t.split(" "),a=Array.isArray(a)?a:a.split(" ");let s=r(e);return e?.classList.remove(...s?a:t),e?.classList.add(...s?t:a),this}toggleClassIf(e,t,a,r){return document.querySelectorAll(e).forEach((e=>this.toggleElementClassIf(e,t,a,r))),this}isValidEmail(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}filterEmojies(e){return e.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g,"")}debounce(e,...t){return this.debounce_||(this.debounce_=salla.helpers.debounce(((e,...t)=>e(...t)),500)),this.debounce_(e,...t)}getProductsSource(e){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","customer.wishlist":"wishlist","landing-page":"landing-page","product.index.tag":"tags","product.index.sales":"sales","components.most_sales_products":"sales"}[e||salla.config.get("page.slug")]||e||"latest"}getApiSource(e){return{recently:"selected"}[e]||e}getPageTitleForSource(e){return(e={brands:"common.titles.brands",latest:"blocks.home.latest_products",offers:"common.titles.discounts",reorder:"common.titles.products",sales:"common.titles.most_sales"}[e])?salla.lang.get(e):""}getProductsSourceValue(e,t){const a=this.getProductsSource(e);let r=null;if(t)try{r="string"==typeof t?JSON.parse(t):t}catch(e){console.error("Failed to parse JSON string in sourceValue:",e)}if(!["search","json","offers","latest","sales","related"].includes(a)){if(Array.isArray(r)&&r.length)return r;if(Array.isArray(r)&&!r.length)return"";if("number"==typeof r)return[r];if(!t&&["categories","tags","brands"].includes(e))return[salla.config.get("page.id")]}return r||t?r||t:"search"===a?"undefined"!=typeof window&&new URLSearchParams(window.location.search).get("q")||"":salla.config.get("page.id")}extractFiltersFromUrl(e){let t={};return e.forEach(((e,a)=>{const r=a.match(/^filters\[(.*?)\](\[(.*?)\])?$/u);if(r){const a=r[1],s=r[3];""===s||/^\d+$/.test(s)?(t[a]=Array.isArray(t[a])?t[a]:[],t[a].push(e)):s?(t[a]=t[a]||{},t[a][s]=e):t[a]=e}else{const r=a.match(/^(.*?)$/u);r&&(t[r[1]]=e)}})),t}resolveFilterLabels(t){return t.map((t=>{const a={...t};if(a.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[a.key]||a.label,"rating"==a.key){a.type=e.VALUES;const{max:r,min:s}=t.values;a.values=[5,4,3,2,1].filter((e=>e>=s||e<=r))}return a}))}async injectExtraFieldsToResponse(e){if(!e||!this.includes)return e;const t=e.data.map((e=>e.id));try{const{data:a}=await this.fetchImagesAndOptions(t);if(this.injectOptionsAndImages(e.data,a),!this.includes.includes("metadata"))return e;const r=await salla.api.metadata.fetchValues("product",t);return e.data.forEach((e=>{e.metadata=r.data.find((t=>parseInt(t.entity_id)===parseInt((e.id||"").toString())))})),e}catch(e){throw console.error("Error in injectExtraFieldsToResponse:",e),e}}fetchImagesAndOptions(e){return this.productsIncludes().length?salla.api.product.fetchOptions(e,{with:this.productsIncludes()}):Promise.resolve({data:[]})}injectOptionsAndImages(e,t){return t.length?e.map((e=>(this.includes.filter((e=>"metadata"!==e)).forEach((a=>{const r=t.find((t=>parseInt((t.id||"").toString())===parseInt((e.id||"").toString())));e[a]=r?r[a]:null})),e))):null}productsIncludes(){return this.includes?.filter((e=>"metadata"!=e))}saveSource(e,t){if(t)try{sessionStorage.setItem(e,t)}catch(e){salla.logger.warn("Error saving source to session storage")}}saveProductSource(e){this.saveSource("s-viewed-source",e)}saveProductPosition(e){if(null!=e&&""!==e)try{sessionStorage.setItem("s-viewed-position",String(e))}catch(e){salla.logger.warn("Error saving position to session storage")}}saveRequestId(e){if(e)try{sessionStorage.setItem("s-request-id",e)}catch(e){salla.logger.warn("Error saving request id to session storage")}}saveAddToCartSource(e){this.saveSource("s-add-to-cart-source",e)}parseJson(e){if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(e){salla.logger.error("Failed to parse includes as JSON:",e)}return null}getProductSchemaMarkupScript(e){const t=document.createElement("script");return t.type="application/ld+json",t.text=JSON.stringify({"@context":"http://schema.org","@type":"Product",name:e?.name,image:e?.image?.url||e?.thumbnail,description:e?.description,brand:{"@type":"Brand",logo:e?.brand?.logo},offers:{"@type":"Offer",price:e?.price}}),t}createProductSchema(e,t){let a={productID:`${e.id}`,"@type":"Product",name:e.name,url:e.url,image:e.image.url||e.image,description:e.description||e.subtitle||e.name,...e.sku&&e.sku.length>0&&{sku:e.sku},offers:{"@type":"Offer",url:e.url,priceCurrency:e.currency,price:e.price,itemCondition:"NewCondition",availability:e.is_available?"InStock":"OutOfStock",priceValidUntil:e.discount_ends||new Date((new Date).setDate((new Date).getDate()+7)).toISOString().split("T")[0],priceSpecification:{"@type":"PriceSpecification",price:e.regular_price,priceCurrency:e.currency,valueAddedTaxIncluded:e.is_taxable},seller:{"@type":"Organization",name:salla.config.get("store.name")},shippingDetails:{"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:"0",currency:e.currency||"SAR"},deliveryTime:{"@type":"ShippingDeliveryTime",businessDays:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]},cutoffTime:"14:00"}},hasMerchantReturnPolicy:{"@type":"MerchantReturnPolicy",returnPolicyCategory:"https://schema.org/MerchantReturnFiniteReturnWindow",merchantReturnDays:30,returnMethod:"https://schema.org/ReturnByMail",returnFees:"https://schema.org/FreeReturn"}}};return e.rating?.stars&&(a.aggregateRating={"@type":"AggregateRating",ratingValue:e.rating.stars,reviewCount:e.rating.count}),{"@type":"ListItem",position:t,item:a}}generateProductSchema(e){const t="salla-product-schema-script";if(document.getElementById(t))return void salla.logger.warn(`already added schema-script with id (${t})!`);const a=document.createElement("script");a.type="application/ld+json",a.id=t;const r={"@context":"https://schema.org","@type":"ItemList",name:salla.config.get("page.title"),itemListElement:e.map(((e,t)=>this.createProductSchema(e,t+1)))};a.textContent=JSON.stringify(r),document.head.appendChild(a)}formatDateFromString(e,t,a="en"){const r={en:"Invalid Date",ar:"تاريخ غير صالح"};if(!e||"string"!=typeof e||""===e.trim())return r[a];let s;if(/^\d+$/.test(e)){const t=parseInt(e);s=new Date(t>1e12?t:1e3*t)}else s=new Date(e);return isNaN(s.getTime())?r[a]:`${{en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]}[a][s.getDay()]} ${t(s.getDate(),"en"===a)} ${{en:["January","February","March","April","May","June","July","August","September","October","November","December"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]}[a][s.getMonth()]} ${t(s.getFullYear(),"en"===a)}`}copyToClipboard(e){var t=e.target.innerText;navigator.clipboard.writeText(t).then((()=>{console.log("Text copied to clipboard: "+t)})).catch((e=>{console.error("Unable to copy text to clipboard",e)}))}animateItems(e){if(!e?.length)return;const t=Array.from(e);t.forEach((e=>e.classList.remove("s-animate-fade-in-up"))),t[0].getBoundingClientRect(),t.forEach(((e,t)=>{e.style.animationDelay=100*t+"ms",e.classList.add("s-animate-fade-in-up")})),setTimeout((()=>t.forEach((e=>e.classList.add("animated")))),1200+100*(t.length-1))}createReviewObject(e){return{"@type":"Review",author:{"@type":"Person",name:e.name},reviewBody:e.content,reviewRating:{"@type":"Rating",bestRating:"5",ratingValue:e.stars,worstRating:"1"}}}generateReviewSchema(e){const t=document.createElement("script");t.type="application/ld+json";const a={"@context":"http://schema.org/","@type":"Store",name:salla.config.get("store.name"),url:salla.config.get("store.url"),address:"الرياض",review:e.map((e=>this.createReviewObject(e))),aggregateRating:{"@type":"AggregateRating",ratingValue:e.reduce(((e,t)=>e+t.stars),0)/e.length,reviewCount:e.length}};t.textContent=JSON.stringify(a),document.head.appendChild(t)}availabilityChannels(){let e=salla.config.get("store.settings.product.availability_notify");if(!e)return"";let t=[];return e.email&&t.push("email"),(e.sms||e.mobile||e.whatsapp)&&t.push("sms"),t.join(",")}syncWishlistIcons(e,t){e?.querySelectorAll(t).forEach((e=>{const t=e.product?.id,a="number"==typeof t?t:Number(t);if(Number.isNaN(a))return;const r=salla.wishlist.api.has(a);e.querySelectorAll(".s-product-card-wishlist-btn, .btn--wishlist").forEach((e=>{e.classList.toggle("s-product-card-wishlist-added",r),e.classList.toggle("wishlist-added",r)}))}))}getPlanName(){const e=Number(salla.config.get("store.ray"));return e in this.plans?this.plans[e]:void 0}escapeHtml(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}};export{e as F,a as H}
|
|
@@ -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-BTn4Le7F.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,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as A}from"./p-
|
|
4
|
+
import{d as A}from"./p-BTn4Le7F.js";function n(A,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(A)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var A=65496,n=65505,e=1165519206,r=18761,i=274,t=65280,o=function(A,n){return A.getUint16(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},a=function(A,n){return A.getUint32(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},u="undefined"!=typeof window&&void 0!==window.document,f=void 0,d=u?new Image:{};d.onload=function(){return f=d.naturalWidth>d.naturalHeight},d.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";var c=function(u){var d=u.utils,c=d.Type,v=d.isFile;return(0,u.addFilter)("DID_LOAD_ITEM",(function(u,d){var c=d.query;return new Promise((function(d){var w=u.file;if(!(v(w)&&function(A){return/^image\/jpeg/.test(A.type)}(w)&&c("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&f))return d(u);(function(u){return new Promise((function(f){var d=new FileReader;d.onload=function(u){var d=new DataView(u.target.result);if(o(d,0)===A){for(var c=d.byteLength,v=2;v<c;){var w=o(d,v);if(v+=2,w===n){if(a(d,v+=2)!==e)break;var g=o(d,v+=6)===r;v+=a(d,v+4,g);var l=o(d,v,g);v+=2;for(var p=0;p<l;p++)if(o(d,v+12*p,g)===i)return void f(o(d,v+12*p+8,g))}else{if((w&t)!==t)break;v+=o(d,v)}}f(-1)}else f(-1)},d.readAsArrayBuffer(u.slice(0,65536))}))})(w).then((function(A){u.setMetadata("exif",{orientation:A}),d(u)}))}))})),{options:{allowImageExifOrientation:[!0,c.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:c})),c}()),r.exports),t=n({__proto__:null,default:A(i)},[i]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginImageExifOrientation 1.0.11
|
|
7
7
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|