@salla.sa/twilight-components 2.11.48 → 2.11.50

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.
Files changed (76) hide show
  1. package/dist/cjs/index-1d2b3370.js +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/salla-add-product-button.cjs.entry.js +4 -13
  4. package/dist/cjs/salla-button_36.cjs.entry.js +94 -27
  5. package/dist/cjs/salla-comment-form.cjs.entry.js +43 -0
  6. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-product-options.cjs.entry.js +64 -16
  8. package/dist/cjs/twilight.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +1 -0
  10. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +4 -13
  11. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +26 -3
  12. package/dist/collection/components/salla-count-down/salla-count-down.css +0 -0
  13. package/dist/collection/components/salla-count-down/salla-count-down.js +253 -0
  14. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  15. package/dist/collection/components/salla-gifting/salla-gifting.js +8 -1
  16. package/dist/collection/components/salla-installment/salla-installment.css +4 -0
  17. package/dist/collection/components/salla-login-modal/salla-login-modal.js +4 -3
  18. package/dist/collection/components/salla-modal/salla-modal.js +10 -0
  19. package/dist/collection/components/salla-product-options/salla-product-options.js +86 -20
  20. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  21. package/dist/components/index.d.ts +1 -0
  22. package/dist/components/index.js +1 -0
  23. package/dist/components/salla-add-product-button.js +4 -13
  24. package/dist/components/salla-cart-summary.js +4 -1
  25. package/dist/components/salla-count-down.d.ts +11 -0
  26. package/dist/components/salla-count-down.js +122 -0
  27. package/dist/components/salla-gifting.js +8 -1
  28. package/dist/components/salla-installment.js +1 -1
  29. package/dist/components/salla-login-modal.js +4 -3
  30. package/dist/components/salla-modal2.js +10 -0
  31. package/dist/components/salla-product-options.js +67 -16
  32. package/dist/components/salla-scopes.js +1 -1
  33. package/dist/esm/index-f1d446ac.js +4 -0
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/salla-add-product-button.entry.js +4 -13
  36. package/dist/esm/salla-button_36.entry.js +94 -27
  37. package/dist/esm/salla-comment-form.entry.js +39 -0
  38. package/dist/esm/salla-installment.entry.js +1 -1
  39. package/dist/esm/salla-product-options.entry.js +64 -16
  40. package/dist/esm/twilight.js +1 -1
  41. package/dist/esm-es5/index-f1d446ac.js +1 -1
  42. package/dist/esm-es5/loader.js +1 -1
  43. package/dist/esm-es5/salla-add-product-button.entry.js +2 -2
  44. package/dist/esm-es5/salla-button_36.entry.js +3 -3
  45. package/dist/esm-es5/salla-comment-form.entry.js +4 -0
  46. package/dist/esm-es5/salla-installment.entry.js +1 -1
  47. package/dist/esm-es5/salla-product-options.entry.js +2 -2
  48. package/dist/esm-es5/twilight.js +1 -1
  49. package/dist/twilight/{p-a6821ab8.system.entry.js → p-295d0d13.entry.js} +1 -1
  50. package/dist/twilight/p-4192bf33.system.entry.js +4 -0
  51. package/dist/twilight/p-7d966812.entry.js +4 -0
  52. package/dist/twilight/p-9fda3312.system.js +1 -1
  53. package/dist/twilight/p-b540cfc6.system.entry.js +4 -0
  54. package/dist/twilight/p-c537eb89.system.entry.js +53 -0
  55. package/dist/twilight/p-cdb6aa9e.entry.js +4 -0
  56. package/dist/twilight/p-d9579b04.system.entry.js +4 -0
  57. package/dist/twilight/p-e0a12040.entry.js +4 -0
  58. package/dist/twilight/p-fb2533e0.entry.js +36 -0
  59. package/dist/twilight/p-fb863c38.system.entry.js +4 -0
  60. package/dist/twilight/twilight.esm.js +1 -1
  61. package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +0 -1
  62. package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +5 -0
  63. package/dist/types/components/salla-count-down/salla-count-down.d.ts +53 -0
  64. package/dist/types/components/salla-gifting/salla-gifting.d.ts +1 -0
  65. package/dist/types/components/salla-modal/salla-modal.d.ts +1 -0
  66. package/dist/types/components/salla-product-options/interfaces.d.ts +4 -0
  67. package/dist/types/components/salla-product-options/salla-product-options.d.ts +14 -1
  68. package/dist/types/components.d.ts +85 -0
  69. package/package.json +3 -3
  70. package/dist/twilight/p-14fd987d.system.entry.js +0 -53
  71. package/dist/twilight/p-3c98b71d.entry.js +0 -4
  72. package/dist/twilight/p-7e9e675f.entry.js +0 -4
  73. package/dist/twilight/p-85c55961.system.entry.js +0 -4
  74. package/dist/twilight/p-984370cd.entry.js +0 -4
  75. package/dist/twilight/p-d2c63efe.entry.js +0 -36
  76. package/dist/twilight/p-e22d9712.system.entry.js +0 -4
@@ -1916,6 +1916,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1916
1916
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1917
1917
  /* webpackMode: "lazy" */
1918
1918
  './salla-add-product-button.cjs.entry.js')); }).then(processMod, consoleError);
1919
+ case 'salla-comment-form.cjs':
1920
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1921
+ /* webpackMode: "lazy" */
1922
+ './salla-comment-form.cjs.entry.js')); }).then(processMod, consoleError);
1919
1923
  case 'salla-installment.cjs':
1920
1924
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1921
1925
  /* webpackMode: "lazy" */
@@ -34,7 +34,7 @@ const defineCustomElements = (win, options) => {
34
34
  if (typeof window === 'undefined') return Promise.resolve();
35
35
  return patchEsm().then(() => {
36
36
  appGlobals.globalScripts();
37
- return index.bootstrapLazy(JSON.parse("[[\"salla-button_36.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"getSelectedOptionsData\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-add-product-button.cjs\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select.cjs\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
37
+ return index.bootstrapLazy(JSON.parse("[[\"salla-button_36.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"showCartLabel\":[4,\"show-cart-label\"],\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"cartLabel\":[32],\"animateToCart\":[64]}],[0,\"salla-count-down\",{\"date\":[1],\"boxed\":[4],\"size\":[1],\"color\":[1],\"labeled\":[4],\"endText\":[1,\"end-text\"],\"digits\":[1],\"daysLabel\":[32],\"hoursLabel\":[32],\"minutesLabel\":[32],\"secondsLabel\":[32],\"endLabel\":[32],\"invalidDate\":[32],\"offerEnded\":[32],\"countInterval\":[32],\"endCountDown\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-add-product-button.cjs\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32]}]]],[\"salla-comment-form.cjs\",[[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select.cjs\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
38
38
  });
39
39
  };
40
40
 
@@ -81,16 +81,6 @@ const SallaAddProductButton = class {
81
81
  }
82
82
  return this.hostAttributes;
83
83
  }
84
- pushSelectedOption(data) {
85
- const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);
86
- if (index > -1) {
87
- this.selectedOptions[index] = Object.assign(Object.assign({}, data.detail), { option_id: data.option.id });
88
- }
89
- else {
90
- this.selectedOptions.push(Object.assign(Object.assign({}, data.detail), { option_id: data.option.id }));
91
- }
92
- this.hasOutOfStockOption = this.selectedOptions.some(option => option.is_out);
93
- }
94
84
  componentWillLoad() {
95
85
  this.hasLabel = !!this.host.innerHTML.replace('<!---->', '').trim();
96
86
  }
@@ -106,17 +96,18 @@ const SallaAddProductButton = class {
106
96
  if ((this.productStatus === 'out-and-notify' && this.channels) || this.hasOutOfStockOption) {
107
97
  return index.h(index.Host, null, index.h("salla-product-availability", Object.assign({}, this.getBtnAttributes())));
108
98
  }
109
- return index.h(index.Host, null, index.h("salla-button", Object.assign({ color: this.productStatus === 'sale' ? 'primary' : 'light', fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale' }, this.getBtnAttributes(), { "loader-position": "center", type: "button" }), index.h("slot", null)));
99
+ return index.h(index.Host, null, index.h("salla-button", Object.assign({ color: this.productStatus === 'sale' ? 'primary' : 'light', type: "button", fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale' }, this.getBtnAttributes(), { "loader-position": "center" }), index.h("slot", null)));
110
100
  }
111
101
  componentDidLoad() {
112
102
  if (!this.notifyOptionsAvailability) {
113
103
  return;
114
104
  }
115
- salla.event.on('product-options::change', data => {
105
+ salla.event.on('product-options::change', async (data) => {
106
+ var _a;
116
107
  if (!['thumbnail', 'color', 'single-option'].includes(data.option.type)) {
117
108
  return;
118
109
  }
119
- this.pushSelectedOption(data);
110
+ this.hasOutOfStockOption = await ((_a = document.querySelector(`salla-product-options[product-id="${this.productId}"]`)) === null || _a === void 0 ? void 0 : _a.hasOutOfStockOption());
120
111
  this.hasLabel = false;
121
112
  if (!this.subscribedOptions || this.subscribedOptions === 'null') {
122
113
  return;
@@ -1444,6 +1444,7 @@ const SallaCartSummary = class {
1444
1444
  index.registerInstance(this, hostRef);
1445
1445
  this.cartSummaryCount = salla.storage.get('cart.summary.count') || 0;
1446
1446
  this.cartSummaryTotal = salla.storage.get('cart.summary.total') || 0;
1447
+ this.cartLabel = salla.config.get('user.language_code') === 'ar' ? 'السلة' : 'Cart';
1447
1448
  salla.cart.event.onUpdated((response) => {
1448
1449
  this.cartSummaryCount = response.count || 0;
1449
1450
  this.cartSummaryTotal = response.total || 0;
@@ -1499,7 +1500,7 @@ const SallaCartSummary = class {
1499
1500
  }, '-=1700');
1500
1501
  }
1501
1502
  render() {
1502
- return (index.h(index.Host, null, index.h("a", { class: "s-cart-summary-wrapper", href: salla.url.get('cart') }, index.h("div", { id: "s-cart-icon" }, index.h("slot", { name: "icon" }, index.h("i", { class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), index.h("span", { class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), index.h("b", { class: "s-cart-summary-total" }, salla.money(this.cartSummaryTotal)))));
1503
+ return (index.h(index.Host, null, index.h("a", { class: "s-cart-summary-wrapper", href: salla.url.get('cart') }, index.h("div", { id: "s-cart-icon" }, index.h("slot", { name: "icon" }, index.h("i", { class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), index.h("span", { class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), index.h("p", { class: "s-cart-summary-content" }, this.showCartLabel && index.h("span", { class: "s-cart-summary-label" }, this.cartLabel), index.h("b", { class: "s-cart-summary-total" }, salla.money(this.cartSummaryTotal))))));
1503
1504
  }
1504
1505
  get host() { return index.getElement(this); }
1505
1506
  };
@@ -2667,38 +2668,86 @@ const SallaColorPicker = class {
2667
2668
  };
2668
2669
  SallaColorPicker.style = sallaColorPickerCss;
2669
2670
 
2670
- const sallaCommentFormCss = ":host{display:block}";
2671
+ const sallaCountDownCss = "";
2671
2672
 
2672
- const SallaCommentForm = class {
2673
+ const SallaCountDown = class {
2673
2674
  constructor(hostRef) {
2674
2675
  index.registerInstance(this, hostRef);
2675
- this.placeholder = salla.lang.get('blocks.comments.placeholder');
2676
- this.submitText = salla.lang.get('blocks.comments.submit');
2676
+ /**
2677
+ * The size of the count down
2678
+ * */
2679
+ this.size = 'md';
2680
+ /**
2681
+ * The color of the count down
2682
+ * */
2683
+ this.color = 'dark';
2684
+ /**
2685
+ * The digits lang to show in the count down
2686
+ * */
2687
+ this.digits = 'auto';
2688
+ this.daysLabel = '';
2689
+ this.hoursLabel = '';
2690
+ this.minutesLabel = '';
2691
+ this.secondsLabel = '';
2692
+ this.endLabel = '';
2693
+ this.invalidDate = '';
2694
+ this.offerEnded = false;
2677
2695
  salla.lang.onLoaded(() => {
2678
- this.placeholder = salla.lang.get('blocks.comments.placeholder');
2679
- this.submitText = salla.lang.get('blocks.comments.submit');
2680
- });
2681
- salla.onReady(() => {
2682
- this.canComment = salla.config.get('user.can_comment');
2683
- this.itemId = salla.config.get('page.id');
2684
- this.type = salla.url.is_page('page-single') ? 'page' : 'product';
2696
+ this.daysLabel = salla.lang.get('pages.checkout.day');
2697
+ this.hoursLabel = salla.lang.get('pages.checkout.hour');
2698
+ this.minutesLabel = salla.lang.get('pages.checkout.minute');
2699
+ this.invalidDate = salla.lang.get('blocks.buy_as_gift.incorrect_date');
2700
+ this.secondsLabel = salla.lang.get('pages.checkout.second');
2701
+ this.endLabel = salla.lang.get('pages.checkout.offer_ended');
2685
2702
  });
2686
2703
  }
2687
- submit() {
2688
- if (!this.commentForm.reportValidity()) {
2689
- salla.log('CommentForm:: validation error!');
2704
+ /**
2705
+ * End the count down
2706
+ * */
2707
+ async endCountDown() {
2708
+ clearInterval(this.countInterval);
2709
+ this.offerEnded = true;
2710
+ this.daysEl.innerHTML = this.number(0);
2711
+ this.hoursEl.innerHTML = this.number(0);
2712
+ this.minutesEl.innerHTML = this.number(0);
2713
+ this.secondsEl.innerHTML = this.number(0);
2714
+ }
2715
+ isValidDate(date) {
2716
+ return !isNaN(Date.parse(date));
2717
+ }
2718
+ number(digit) {
2719
+ return salla.helpers.number(digit, this.digits === 'en');
2720
+ }
2721
+ startCountDown() {
2722
+ let countDownDate = new Date(this.date);
2723
+ countDownDate.setHours(23, 59, 59, 999);
2724
+ let countDownTime = countDownDate.getTime();
2725
+ this.countInterval = setInterval(() => {
2726
+ let now = new Date().getTime();
2727
+ let distance = countDownTime - now;
2728
+ this.daysEl.innerHTML = this.number(Math.floor(distance / (1000 * 60 * 60 * 24)));
2729
+ this.hoursEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));
2730
+ this.minutesEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));
2731
+ this.secondsEl.innerHTML = this.number(Math.floor((distance % (1000 * 60)) / 1000));
2732
+ if (distance < 0) {
2733
+ this.endCountDown();
2734
+ }
2735
+ }, 1000);
2736
+ }
2737
+ componentDidLoad() {
2738
+ if (!this.date) {
2690
2739
  return;
2691
2740
  }
2692
- this.submitBtn.load()
2693
- .then(() => salla.comment.add({ id: this.itemId, comment: this.commentField.value, type: this.type }))
2694
- .finally(() => this.submitBtn.stop);
2741
+ this.startCountDown();
2695
2742
  }
2696
2743
  render() {
2697
- return (index.h(index.Host, null, !!this.canComment ? index.h("form", { ref: frm => this.commentForm = frm }, index.h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
2698
- index.h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', index.h("div", { class: "s-comment-form-content" }, index.h("textarea", { cols: 30, rows: 5, minlength: "4", maxlength: "500", ref: field => this.commentField = field, placeholder: this.placeholder, class: "s-comment-form-input", required: true }), index.h("br", null), index.h("div", { class: "s-comment-form-action" }, index.h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
2744
+ if (!this.isValidDate(this.date)) {
2745
+ return index.h("div", null, this.invalidDate);
2746
+ }
2747
+ return (index.h(index.Host, { class: "s-count-down-wrapper" }, index.h("ul", { class: `s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}` }, index.h("li", { class: "s-count-down-item" }, index.h("div", { class: "s-count-down-item-value", ref: el => this.secondsEl = el }, this.number(0)), this.labeled && index.h("div", { class: "s-count-down-item-label" }, this.secondsLabel)), index.h("li", { class: "s-count-down-item" }, index.h("div", { class: "s-count-down-item-value", ref: el => this.minutesEl = el }, this.number(0)), this.labeled && index.h("div", { class: "s-count-down-item-label" }, this.minutesLabel)), index.h("li", { class: "s-count-down-item" }, index.h("div", { class: "s-count-down-item-value", ref: el => this.hoursEl = el }, this.number(0)), this.labeled && index.h("div", { class: "s-count-down-item-label" }, this.hoursLabel)), index.h("li", { class: "s-count-down-item" }, index.h("div", { class: "s-count-down-item-value", ref: el => this.daysEl = el }, this.number(0)), this.labeled && index.h("div", { class: "s-count-down-item-label" }, this.daysLabel))), this.offerEnded && index.h("div", { class: "s-count-down-end-text" }, this.endText || this.endLabel)));
2699
2748
  }
2700
2749
  };
2701
- SallaCommentForm.style = sallaCommentFormCss;
2750
+ SallaCountDown.style = sallaCountDownCss;
2702
2751
 
2703
2752
  var HOOKS = [
2704
2753
  "onChange",
@@ -20990,6 +21039,13 @@ const SallaGifting = class {
20990
21039
  this.currentLang = salla.lang.locale;
20991
21040
  });
20992
21041
  }
21042
+ componentDidLoad() {
21043
+ salla.event.product.onPriceUpdated(() => {
21044
+ const quantityInput = document.querySelector('.s-quantity-input-input');
21045
+ // @ts-ignore
21046
+ this.quantity = quantityInput.value;
21047
+ });
21048
+ }
20993
21049
  /**
20994
21050
  * Show / Open the gifting modal window
20995
21051
  */
@@ -21226,7 +21282,7 @@ const SallaGifting = class {
21226
21282
  let payload = {
21227
21283
  text: this.selectedText,
21228
21284
  sender_name: this.senderName,
21229
- quantity: 1,
21285
+ quantity: this.quantity,
21230
21286
  deliver_at: this.showCalendar ? this.deliveryDate : null,
21231
21287
  image_url: (_a = this.uploadedImage) !== null && _a !== void 0 ? _a : this.selectedImage,
21232
21288
  receiver: {
@@ -21773,9 +21829,10 @@ const SallaLoginModal = class {
21773
21829
  if ([this.mobileTab, this.emailTab].includes(tab)) {
21774
21830
  this.regType = tab === this.mobileTab ? 'phone' : 'email';
21775
21831
  }
21776
- // this.loginTelInput.focus();
21777
- // tab.querySelector('input')?.focus();
21778
- // setTimeout(() =>this.loginTelInput.focus(), 100);
21832
+ const input = tab.querySelector('input[type="tel"], input[type="email"]');
21833
+ input && setTimeout(() => {
21834
+ input.focus();
21835
+ }, 100);
21779
21836
  (_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(this.currentTabName === 'registration' ? salla.lang.get('common.titles.registration') : this.title);
21780
21837
  return this;
21781
21838
  }
@@ -22859,6 +22916,7 @@ const SallaModal = class {
22859
22916
  */
22860
22917
  async open() {
22861
22918
  this.host.setAttribute('visible', '');
22919
+ this.handleAutoFocus();
22862
22920
  return this.host;
22863
22921
  }
22864
22922
  /**
@@ -22890,6 +22948,15 @@ const SallaModal = class {
22890
22948
  this.isLoading = false;
22891
22949
  return this.host;
22892
22950
  }
22951
+ handleAutoFocus() {
22952
+ const firstFocusableElement = this.host.querySelector('input, textarea, select');
22953
+ if (!firstFocusableElement) {
22954
+ return;
22955
+ }
22956
+ setTimeout(() => {
22957
+ firstFocusableElement.focus();
22958
+ }, 100);
22959
+ }
22893
22960
  toggleModal(isOpen) {
22894
22961
  const body = this.host.querySelector('.s-modal-body');
22895
22962
  Helper$1.toggleElementClassIf(body, 's-modal-entering', 's-modal-leaving', () => isOpen)
@@ -24055,7 +24122,7 @@ const SallaScopees = class {
24055
24122
  :
24056
24123
  [index.h("salla-list-tile", { class: ((_a = this.originalScopesList) === null || _a === void 0 ? void 0 : _a.length) ? "s-scopes-header block" : "s-hidden" }, index.h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), index.h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), index.h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), index.h("div", { class: "s-scopes-wrap" }, !!((_b = this.originalScopesList) === null || _b === void 0 ? void 0 : _b.length) && index.h("h4", { class: "s-scopes-title" }, this.getFormTitle()), ((_c = this.originalScopesList) === null || _c === void 0 ? void 0 : _c.length) > this.searchDisplayLimit ?
24057
24124
  index.h("div", { class: "s-scopes-search-wrapper" }, index.h("div", { class: "s-scopes-search-icon", innerHTML: Search }), index.h("input", { type: "text", class: "s-scopes-search-input", onInput: e => this.handleSearchFieldTyping(e), enterkeyhint: "search", placeholder: salla.lang.get('blocks.scope.searching_for_a_branch') }))
24058
- : "", this.hasError || ((_d = this.scopes) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
24125
+ : "", this.hasError || ((_d = this.originalScopesList) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
24059
24126
  this.placeholderContent()
24060
24127
  : this.mode === ModeType.DEFAULT ? this.defaultContent() : this.availabilityContent())])));
24061
24128
  }
@@ -26835,7 +26902,7 @@ SallaVerify.style = sallaVerifyCss;
26835
26902
  exports.salla_button = SallaButton;
26836
26903
  exports.salla_cart_summary = SallaCartSummary;
26837
26904
  exports.salla_color_picker = SallaColorPicker;
26838
- exports.salla_comment_form = SallaCommentForm;
26905
+ exports.salla_count_down = SallaCountDown;
26839
26906
  exports.salla_datetime_picker = SallaDatetimePicker;
26840
26907
  exports.salla_file_upload = SallaFileUpload;
26841
26908
  exports.salla_gifting = SallaGifting;
@@ -0,0 +1,43 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ Object.defineProperty(exports, '__esModule', { value: true });
7
+
8
+ const index = require('./index-1d2b3370.js');
9
+
10
+ const sallaCommentFormCss = ":host{display:block}";
11
+
12
+ const SallaCommentForm = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.placeholder = salla.lang.get('blocks.comments.placeholder');
16
+ this.submitText = salla.lang.get('blocks.comments.submit');
17
+ salla.lang.onLoaded(() => {
18
+ this.placeholder = salla.lang.get('blocks.comments.placeholder');
19
+ this.submitText = salla.lang.get('blocks.comments.submit');
20
+ });
21
+ salla.onReady(() => {
22
+ this.canComment = salla.config.get('user.can_comment');
23
+ this.itemId = salla.config.get('page.id');
24
+ this.type = salla.url.is_page('page-single') ? 'page' : 'product';
25
+ });
26
+ }
27
+ submit() {
28
+ if (!this.commentForm.reportValidity()) {
29
+ salla.log('CommentForm:: validation error!');
30
+ return;
31
+ }
32
+ this.submitBtn.load()
33
+ .then(() => salla.comment.add({ id: this.itemId, comment: this.commentField.value, type: this.type }))
34
+ .finally(() => this.submitBtn.stop);
35
+ }
36
+ render() {
37
+ return (index.h(index.Host, null, !!this.canComment ? index.h("form", { ref: frm => this.commentForm = frm }, index.h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
38
+ index.h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', index.h("div", { class: "s-comment-form-content" }, index.h("textarea", { cols: 30, rows: 5, minlength: "4", maxlength: "500", ref: field => this.commentField = field, placeholder: this.placeholder, class: "s-comment-form-input", required: true }), index.h("br", null), index.h("div", { class: "s-comment-form-action" }, index.h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
39
+ }
40
+ };
41
+ SallaCommentForm.style = sallaCommentFormCss;
42
+
43
+ exports.salla_comment_form = SallaCommentForm;
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-1d2b3370.js');
9
9
 
10
- const sallaInstallmentCss = "#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";
10
+ const sallaInstallmentCss = "salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D;box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";
11
11
 
12
12
  const SallaInstallment = class {
13
13
  constructor(hostRef) {
@@ -62,37 +62,46 @@ const SallaProductOptions = class {
62
62
  exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
63
63
  txt: 'text/plain',
64
64
  };
65
- this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
65
+ this.outOfStockText = '';
66
66
  this.donationAmount = salla.lang.get('pages.products.donation_amount');
67
67
  this.selectedOptions = [];
68
+ this.outSkus = [];
68
69
  /**
69
70
  * The id of the product to which the options are going to be fetched for.
70
71
  */
71
72
  this.productId = salla.config.get('page.id');
72
- this.canDisabled = !salla.config.get('store.settings.products.notify_options_availability');
73
+ this.canDisabled = salla.config.get('store.settings.products.notify_options_availability');
73
74
  salla.lang.onLoaded(() => {
74
75
  this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
75
76
  this.donationAmount = salla.lang.get('pages.products.donation_amount');
76
77
  });
77
78
  if (this.options) {
78
79
  try {
79
- this.optionsData = JSON.parse(this.options);
80
+ this.setOptionsData(JSON.parse(this.options));
80
81
  return;
81
82
  }
82
83
  catch (e) {
83
84
  salla.log('Bad json passed via options prop');
84
85
  }
85
86
  }
86
- if (Array.isArray(this.optionsData)) {
87
+ if (!Array.isArray(this.optionsData)) {
87
88
  salla.log('Options is not an array[] ---> ', this.optionsData);
88
- this.optionsData = [];
89
+ this.setOptionsData([]);
89
90
  }
90
91
  if (this.productId && !salla.url.is_page('cart')) {
91
- salla.api.product.getDetails(this.productId, ['options']).then((resp) => {
92
- this.optionsData = resp.data.options;
93
- });
92
+ salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));
94
93
  }
95
94
  }
95
+ setOptionsData(optionsData) {
96
+ var _a, _b;
97
+ this.optionsData = optionsData;
98
+ let that = this;
99
+ (_b = (_a = this.optionsData[0]) === null || _a === void 0 ? void 0 : _a.details) === null || _b === void 0 ? void 0 : _b.forEach(function (detail) {
100
+ Object.entries(detail.skus_availability || {})
101
+ .filter(sku => !sku[1])
102
+ .map(sku => that.outSkus.push(Number(sku[0])));
103
+ });
104
+ }
96
105
  /**
97
106
  * Get the id's of the selected options.
98
107
  * */
@@ -104,6 +113,12 @@ const SallaProductOptions = class {
104
113
  });
105
114
  return selectedOptions;
106
115
  }
116
+ /**
117
+ * Return true if there is any out of stock options are selected and vise versa.
118
+ * */
119
+ async hasOutOfStockOption() {
120
+ return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus.length && this.selectedSkus.every(sku => this.outSkus.includes(sku)));
121
+ }
107
122
  /**
108
123
  * Get selected options.
109
124
  * */
@@ -126,10 +141,19 @@ const SallaProductOptions = class {
126
141
  }
127
142
  const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);
128
143
  index > -1 ? this.selectedOptions[index] = Object.assign(Object.assign({}, data.detail), { option_id: data.option.id }) : this.selectedOptions.push(Object.assign(Object.assign({}, data.detail), { option_id: data.option.id }));
144
+ this.setSelectedSkus();
129
145
  this.handleRequiredMultipleOptions(option);
130
146
  this.changed.emit(data);
131
147
  salla.event.emit('product-options::change', data);
132
148
  }
149
+ /**
150
+ * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;
151
+ */
152
+ setSelectedSkus() {
153
+ this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))
154
+ .reduce((p, c) => p.filter(e => c.includes(e)))
155
+ .map(sku => Number(sku));
156
+ }
133
157
  handleRequiredMultipleOptions(option) {
134
158
  if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {
135
159
  return;
@@ -181,7 +205,7 @@ const SallaProductOptions = class {
181
205
  donationOption(option, product) {
182
206
  return index.h("div", { class: "s-product-options-donation-wrapper" }, option.donation ?
183
207
  index.h("div", { class: "s-product-options-donation-progress" }, index.h("salla-progress-bar", { donation: option.donation }))
184
- : '', index.h("div", { class: "s-product-options-donation-input-group" }, index.h("input", { type: "text", id: "donating-amount", name: "donating_amount", class: "s-form-control", value: option.value, placeholder: option.placeholder, onInput: e => salla.helpers.inputDigitsOnly(e.target), onBlur: e => this.changedHandler(e, option) }), index.h("span", { class: "s-product-options-donation-amount-currency" }, salla.config.currency(salla.config.get('user.currency_code')).symbol)));
208
+ : '', index.h("div", { class: "s-product-options-donation-input-group" }, index.h("input", { type: "text", id: "donating-amount", name: "donating_amount", class: "s-form-control", value: option.value, required: true, placeholder: option.placeholder, onInput: e => salla.helpers.inputDigitsOnly(e.target), onBlur: e => this.changedHandler(e, option) }), index.h("span", { class: "s-product-options-donation-amount-currency" }, salla.config.currency(salla.config.get('user.currency_code')).symbol)));
185
209
  }
186
210
  fileUploader(option, additions = null) {
187
211
  return index.h("salla-file-upload", Object.assign({}, (additions || {}), { "payload-name": "file", value: option.value, "instant-upload": true, name: `options[${option.id}]`, required: option.required, height: "120px", url: salla.cart.api.getUploadImageEndpoint(), "form-data": { cart_item_id: this.productId, product_id: this.productId }, class: { "s-product-options-image-input": true, required: option.required } }), index.h("div", { class: "s-product-options-filepond-placeholder" }, index.h("span", { class: "s-product-options-filepond-placeholder-icon", innerHTML: additions.accept && additions.accept.split(',').every(type => type.includes('image'))
@@ -233,7 +257,7 @@ const SallaProductOptions = class {
233
257
  //@ts-ignore
234
258
  dateOption(option) {
235
259
  //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23
236
- return index.h("div", { class: "s-product-options-date-element" }, index.h("salla-datetime-picker", { value: option.value, placeholder: option.name, required: option.required, name: `options[${option.id}]`, onPicked: e => this.changedHandler(e, option) }));
260
+ return index.h("div", { class: "s-product-options-date-element" }, index.h("salla-datetime-picker", { value: option.value, placeholder: option.name, required: option.required, minDate: new Date(), name: `options[${option.id}]`, onPicked: e => this.changedHandler(e, option) }));
237
261
  }
238
262
  //@ts-ignore
239
263
  datetimeOption(option) {
@@ -243,30 +267,54 @@ const SallaProductOptions = class {
243
267
  /**
244
268
  * ============= Advanced options =============
245
269
  */
246
- getOptionDetailName(detail, outOfStock = true) {
270
+ // <<<<<<< HEAD
271
+ getOptionDetailName(detail, outOfStock = true, optionType) {
272
+ if (optionType && optionType == DisplayType.COLOR) {
273
+ return detail.name
274
+ + ((outOfStock && this.isOptionDetailOut(detail)) ? ` <br/> <p> ${this.outOfStockText} </p>` : '')
275
+ + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price)}) </p>` : '');
276
+ }
247
277
  return detail.name
248
- + ((outOfStock && detail.is_out) ? ` - ${this.outOfStockText}` : '')
278
+ + ((outOfStock && this.isOptionDetailOut(detail)) ? ` - ${this.outOfStockText}` : '')
249
279
  + (detail.additional_price ? ` (${salla.money(detail.additional_price)})` : '');
250
280
  }
281
+ isOptionDetailOut(detail) {
282
+ var _a;
283
+ if (detail.is_out || !detail.skus_availability || !((_a = this.selectedSkus) === null || _a === void 0 ? void 0 : _a.length)) {
284
+ return detail.is_out;
285
+ }
286
+ let isDetailSelected = this.selectedOptions.filter(option => option.id == detail.id).length;
287
+ //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet
288
+ if (isDetailSelected && this.selectedOptions.length == 1) {
289
+ return false;
290
+ }
291
+ //if current details has sku in the possible outSkus it's out for sure
292
+ if (isDetailSelected) {
293
+ //here we will get the possible outSkus for current selected options
294
+ let outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));
295
+ return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)));
296
+ }
297
+ return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id);
298
+ }
251
299
  singleOption(option) {
252
300
  return index.h("div", null, index.h("select", { name: `options[${option.id}]`, required: option.required, class: "s-form-control", onChange: e => this.changedHandler(e, option) }, index.h("option", { value: "" }, option.placeholder), option === null || option === void 0 ? void 0 :
253
301
  option.details.map((detail) => {
254
- return index.h("option", { value: detail.id, disabled: this.canDisabled && detail.is_out, selected: detail.is_selected }, this.getOptionDetailName(detail));
302
+ return index.h("option", { value: detail.id, disabled: this.canDisabled && this.isOptionDetailOut(detail), selected: detail.is_selected }, this.getOptionDetailName(detail));
255
303
  })));
256
304
  }
257
305
  multipleOptions(option) {
258
306
  return index.h("div", { class: { "s-product-options-multiple-options-wrapper": true, 'required': option.required } }, option === null || option === void 0 ? void 0 : option.details.map((detail) => {
259
- return index.h("div", null, index.h("input", { type: "checkbox", value: detail.id, disabled: detail.is_out, checked: detail.is_selected, required: option.required, name: `options[${option.id}][]`, id: `field-${option.id}-${detail.id}`, onChange: (e) => this.changedHandler(e, option), "aria-describedby": `options[${option.id}]-description` }), index.h("label", { htmlFor: `field-${option.id}-${detail.id}` }, this.getOptionDetailName(detail)));
307
+ return index.h("div", null, index.h("input", { type: "checkbox", value: detail.id, disabled: this.isOptionDetailOut(detail), checked: detail.is_selected, required: option.required, name: `options[${option.id}][]`, id: `field-${option.id}-${detail.id}`, onChange: (e) => this.changedHandler(e, option), "aria-describedby": `options[${option.id}]-description` }), index.h("label", { htmlFor: `field-${option.id}-${detail.id}` }, this.getOptionDetailName(detail)));
260
308
  }));
261
309
  }
262
310
  //@ts-ignore
263
311
  colorOption(option) {
264
- return index.h("fieldset", { class: "s-product-options-colors-wrapper" }, option === null || option === void 0 ? void 0 : option.details.map((detail) => index.h("div", null, index.h("input", { type: "radio", value: detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, disabled: this.canDisabled && detail.is_out, id: `color-${this.productId}-${option.id}-${detail.id}`, onChange: e => this.changedHandler(e, option) }), index.h("label", { htmlFor: `color-${this.productId}-${option.id}-${detail.id}` }, index.h("span", { style: { "background-color": detail.color } }), index.h("p", null, this.getOptionDetailName(detail))))));
312
+ return index.h("fieldset", { class: "s-product-options-colors-wrapper" }, option === null || option === void 0 ? void 0 : option.details.map((detail) => index.h("div", { class: "s-product-options-colors-item" }, index.h("input", { type: "radio", value: detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, disabled: this.canDisabled && this.isOptionDetailOut(detail), id: `color-${this.productId}-${option.id}-${detail.id}`, onChange: e => this.changedHandler(e, option) }), index.h("label", { htmlFor: `color-${this.productId}-${option.id}-${detail.id}` }, index.h("span", { style: { "background-color": detail.color } }), index.h("div", { innerHTML: this.getOptionDetailName(detail, true, option.type) })))));
265
313
  }
266
314
  //@ts-ignore
267
315
  thumbnailOption(option) {
268
316
  return index.h("div", { class: "s-product-options-thumbnails-wrapper" }, option.details.map((detail) => {
269
- return index.h("div", null, index.h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, "data-img-id": detail.option_value, disabled: this.canDisabled && detail.is_out, id: `option_${this.productId}-${option.id}_${detail.id}`, onChange: (e) => this.changedHandler(e, option) }), index.h("label", { htmlFor: `option_${this.productId}-${option.id}_${detail.id}`, "data-img-id": detail.option_value, class: "go-to-slide" }, index.h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), index.h("span", { innerHTML: CheckCircleIcon, class: "s-product-options-thumbnails-icon" }), detail.is_out ?
317
+ return index.h("div", null, index.h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, "data-img-id": detail.option_value, disabled: this.canDisabled && this.isOptionDetailOut(detail), id: `option_${this.productId}-${option.id}_${detail.id}`, onChange: (e) => this.changedHandler(e, option) }), index.h("label", { htmlFor: `option_${this.productId}-${option.id}_${detail.id}`, "data-img-id": detail.option_value, class: "go-to-slide" }, index.h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), index.h("span", { innerHTML: CheckCircleIcon, class: "s-product-options-thumbnails-icon" }), this.isOptionDetailOut(detail) ?
270
318
  [
271
319
  index.h("small", { class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText),
272
320
  this.canDisabled ? index.h("div", { class: "s-product-options-thumbnails-badge-overlay" }) : '',