@salla.sa/twilight-components 2.14.138 → 2.14.139

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.
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sallaBookingFieldCss","SallaBookingField","exports","class_1","hostRef","_this","this","salla","lang","get","onLoaded","setTranslations","Salla","event","on","data","handleBookingOpen","prototype","setNestedAsync","key","value","Promise","resolve","helpers","setNested","messages","_c","sent","bookNowLabel","editLabel","bookedLabel","selectDate","openBookingModal","afterReload","detail","productId","config","isGuest","setAfterReloadEvent","dispatch","booking","add","then","resp","redirect","to","Error","url","id","catch","error","logger","response","bookingUrl","addParamToUrl","iframeReady","setTimeout","modal","setTitle","open","payload","storage","set","emitAfterReloadEvent","eventDetails","customEvent","CustomEvent","window","dispatchEvent","remove","componentWillLoad","option","details","length","reservations","componentDidLoad","addEventListener","handleMessageEvent","bind","reservationsInput","e","invalidInput","emit","setCustomValidity","reportValidity","source","action","type","message","localStorage","getItem","console","log","concat","_a","fields","reservation","notify","errorList","Object","values","flat","map","join","Number","schedule","time","timeSlot","date","day","from_timestamp","from","to_timestamp","filter","item","success","_b","close","location","reload","iframe","height","bookingModal","h","class","ref","width","position","noPadding","src","frameborder","renderReservationDate","innerHTML","Calendar","renderReservationTime","TimeIcon","render","Host","required","money","price","size","loaderPosition","fill","onClick","BookingTime","index","name","JSON","stringify","SallaConditionalFields","class_2","hideAllOptions","optionId","host","querySelectorAll","forEach","field","classList","dataset","disableInputs","input","setAttribute","removeAttribute","tagName","toLowerCase","includes","getAttribute","hasOwnProperty","checked","changeHandler","target","replace","isMultiple","isRadio","isEqual","showWhen","trim","isSelected","selectedValues","Array","toString","showTheInput","closestProductOption","closest","optionRequired","checkboxes","document","isAnyChecked","some","checkbox","componentDidRender","optionName","querySelector"],"sources":["src/components/salla-booking-field/salla-booking-field.scss?tag=salla-booking-field","src/components/salla-booking-field/salla-booking-field.tsx","src/components/salla-conditional-fields/salla-conditional-fields.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h, Element, State, Event, EventEmitter } from '@stencil/core';\nimport { Option, Reservation } from './interfaces';\nimport BookingTime from '../../assets/svg/calendar-time.svg';\nimport Calendar from '../../assets/svg/calendar.svg';\nimport TimeIcon from '../../assets/svg/time.svg';\n\n@Component({\n tag: 'salla-booking-field',\n styleUrl: 'salla-booking-field.scss',\n})\nexport class SallaBookingField {\n /**\n * The booking option configuration\n */\n @Prop() option: Option;\n /**\n * The ID of the product for which the booking is being made\n */\n @Prop() productId: number;\n @Element() host: HTMLElement;\n @State() bookNowLabel: string = salla.lang.get('pages.cart.book_an_appointment', 'حجز موعد');\n @State() editLabel: string = salla.lang.get('pages.cart.edit_an_appointment', 'تعديل الموعد');\n @State() bookedLabel: string = salla.lang.get('pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n @State() selectDate: string = salla.lang.get('pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n @State() bookingUrl: string = '';\n @State() iframeReady: boolean = false;\n @State() reservations: Reservation[] = [];\n @State() reservationsInput: HTMLInputElement;\n\n /**\n * Event emitted when the input is invalid.\n */\n @Event() invalidInput: EventEmitter<any>;\n\n private modal: HTMLSallaModalElement;\n private iframe: HTMLIFrameElement;\n\n constructor() {\n // Load translations\n salla.lang.onLoaded(() => this.setTranslations());\n // Register event listeners\n Salla.event.on('booking::open', (data) => this.handleBookingOpen(data));\n }\n\n private async setTranslations() {\n const setNestedAsync = (lang, key, value) => {\n return new Promise((resolve) => {\n salla.helpers.setNested(salla.lang.messages[lang], key, value);\n resolve(true);\n });\n };\n\n await setNestedAsync('ar.trans', 'pages.cart.book_an_appointment', 'حجز موعد');\n await setNestedAsync('en.trans', 'pages.cart.book_an_appointment', 'Book an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.edit_an_appointment', 'تعديل الموعد');\n await setNestedAsync('en.trans', 'pages.cart.edit_an_appointment', 'Edit an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n await setNestedAsync('en.trans', 'pages.cart.booked_successfully', 'Booked Successfully');\n await setNestedAsync('ar.trans', 'pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n await setNestedAsync('en.trans', 'pages.cart.select_appointment_date', 'Select appointment date');\n\n this.bookNowLabel = salla.lang.get('pages.cart.book_an_appointment');\n this.editLabel = salla.lang.get('pages.cart.edit_an_appointment');\n this.bookedLabel = salla.lang.get('pages.cart.booked_successfully');\n this.selectDate = salla.lang.get('pages.cart.select_appointment_date');\n }\n\n private openBookingModal(event: any, afterReload = false) {\n if (afterReload && (!event.detail || typeof event.detail !== 'number' || event.detail !== this.productId)) {\n return;\n }\n if (salla.config.isGuest()) {\n this.setAfterReloadEvent('booking::open-after-reload', this.productId);\n salla.event.dispatch('login::open');\n return;\n }\n salla.booking.add(this.productId, false)\n .then((resp) => {\n if (resp.data.redirect.to !== 'booking') {\n throw new Error('Unexpected redirect!');\n }\n salla.event.dispatch('booking::open', { url: resp.data.redirect.url, id: this.productId });\n })\n .catch((error) => {\n salla.error(salla.lang.get('common.errors.error_occurred'));\n salla.logger.error(error.response || error);\n });\n }\n\n private handleBookingOpen(data) {\n if (data.id !== this.productId) return;\n this.bookingUrl = salla.url.addParamToUrl('product_id', data.id, data.url);\n this.iframeReady = true;\n setTimeout(() => {\n this.modal.setTitle(this.selectDate);\n this.modal.open();\n }, 100);\n }\n\n private setAfterReloadEvent(event, payload) {\n salla.storage.set('afterReloadEvent', { event, payload });\n }\n\n private emitAfterReloadEvent() {\n const eventDetails = salla.storage.get('afterReloadEvent');\n if (eventDetails && eventDetails.event) {\n const customEvent = new CustomEvent(eventDetails.event, {\n detail: eventDetails.payload\n });\n window.dispatchEvent(customEvent)\n salla.storage.remove('afterReloadEvent');\n }\n }\n\n componentWillLoad() {\n if (this.option && this.option.details.length) {\n this.reservations = this.option.details;\n }\n }\n\n componentDidLoad() {\n window.addEventListener('booking::open-after-reload', (event) => this.openBookingModal(event, true));\n this.emitAfterReloadEvent();\n window.addEventListener('message', this.handleMessageEvent.bind(this));\n this.reservationsInput.addEventListener('invalid', e => this.invalidInput.emit(e));\n this.reservationsInput.addEventListener('input', () => {\n this.reservationsInput.setCustomValidity('');\n this.reservationsInput.reportValidity();\n });\n }\n\n private handleMessageEvent(event) {\n if (event.data.source !== 'booking') return;\n const action = event.data.type;\n const value = event.data.message;\n if (localStorage.getItem('debug')) console.log(`Received an action:${action}`, event.data);\n\n if (action === 'error') {\n if (value.fields?.reservation) {\n salla.notify.error(value.fields.reservation[0]);\n return;\n }\n const errorList = Object.values(value.fields || [value.message]).flat().map(error => `<li>${error}</li>`).join('');\n salla.notify.error(`<ul>${errorList}</ul>`);\n }\n\n if (action === 'success') {\n if (Number(value.productId) !== Number(this.productId)) return;\n this.reservations = value.data.reservations.map(schedule => {\n if (schedule.time && schedule.time.length > 0) {\n const timeSlot = schedule.time[0];\n return {\n date: schedule.date,\n day: schedule.day,\n from_timestamp: timeSlot.from,\n to_timestamp: timeSlot.to,\n };\n }\n return null;\n }).filter(item => item !== null);\n\n salla.notify.success(this.bookedLabel);\n this.modal?.close();\n setTimeout(() => window.location.reload());\n }\n\n if (action === 'height') {\n this.iframe.height = value?.height + 'px';\n }\n }\n\n private bookingModal() {\n return (\n <salla-modal class=\"s-booking-field-modal\" ref={modal => (this.modal = modal)} width=\"md\" position=\"middle\" noPadding>\n <iframe ref={iframe => (this.iframe = iframe)} src={this.bookingUrl} frameborder=\"0\"></iframe>\n </salla-modal>\n );\n }\n\n renderReservationDate(reservation: Reservation) {\n return (\n <span class={reservation.from_timestamp ? 's-booking-field-reservations-has-time' : ''}>\n <i class=\"s-booking-field-reservations-icon\" innerHTML={Calendar}></i>\n {reservation.date}\n </span>\n );\n }\n\n renderReservationTime(reservation: Reservation) {\n if (!reservation.from_timestamp) return '';\n return (\n <span class=\"s-booking-field-reservations-time\">\n <i class=\"s-booking-field-reservations-icon\" innerHTML={TimeIcon}></i>\n <span>\n {reservation.from_timestamp} - {reservation.to_timestamp}\n </span>\n </span>\n );\n }\n\n render() {\n return (\n <Host>\n <div class=\"s-booking-field-main\">\n {this.option.required || this.reservations.length > 0 ? <div class=\"s-booking-field-price\">\n <span>{salla.money(this.option.price)}</span>\n </div> : ''}\n <salla-button class=\"s-booking-field-book-now\" size=\"small\" loaderPosition=\"center\" fill=\"outline\" onClick={event => this.openBookingModal(event, false)}>\n <span class=\"s-booking-field-book-now-content\">\n <span innerHTML={BookingTime}></span>\n {this.reservations.length ? this.editLabel : this.bookNowLabel}\n </span>\n </salla-button>\n </div>\n {this.reservations.length > 0 && (\n <div class=\"s-booking-field-reservations\">\n {this.reservations.map((reservation, index) => (\n <div key={index} class=\"s-booking-field-reservations-item\">\n {this.renderReservationDate(reservation)}\n {this.renderReservationTime(reservation)}\n </div>\n ))}\n </div>\n )}\n <input\n class=\"s-hidden\"\n name={this.option.name}\n required={this.option.required}\n value={JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations)}\n ref={reservations => this.reservationsInput = reservations}\n />\n {this.iframeReady && this.bookingModal()}\n </Host>\n );\n }\n}\n","import { Component, Element, Host, Listen, h } from '@stencil/core';\n\n/**\n * its to easy to use, currenlty its support select & checkbox input as trigger for show/hide the dom\n * the dom you can put it like this data-show-when=\"{name of the field} {= or !=} {value of the field}\"\n */\n@Component({\n tag: 'salla-conditional-fields'\n})\nexport class SallaConditionalFields {\n\n @Element() host: HTMLElement;\n\n private hideAllOptions(optionId) {\n this.host.querySelectorAll(`[data-show-when^=\"options[${optionId}\"]`).forEach((field: HTMLElement) => {\n field.classList.add('hidden');\n this.hideAllOptions(field.dataset.optionId);\n this.disableInputs(field);\n });\n }\n\n private disableInputs(field) {\n field.querySelectorAll('[name]').forEach((input) => {\n\n input.setAttribute('disabled', '');\n input.removeAttribute('required');\n if (input?.tagName?.toLowerCase() === 'select') {\n input.value = ''\n }\n if (['checkbox'].includes(input.getAttribute('type')) && input.hasOwnProperty('checked')) {\n // @ts-ignore\n input.checked = false;\n }\n });\n }\n \n @Listen('change')\n changeHandler(event) {\n salla.event.emit('salla-onditional-fields::change', event);\n salla.log('Received the change event: ', event);\n\n if (!event.target || !['SELECT'].includes(event.target.tagName) && !['checkbox', 'radio'].includes(event.target.getAttribute('type'))) {\n salla.log('Ignore the change because is not a supported input: ' + (event?.target?.tagName || 'N/A'));\n return;\n }\n\n let optionId = event.target.name.replace('[]', '');\n let isMultiple = event.target.getAttribute('type') === 'checkbox';\n let isRadio = event.target.getAttribute('type') === 'radio';\n\n salla.log('Trying to find all elements with condition:', `[data-show-when^=\"${optionId}\"]`);\n\n this.host.querySelectorAll(`[data-show-when^=\"${optionId}\"]`)\n .forEach((field: HTMLElement) => {\n let isEqual = !field?.dataset.showWhen.includes('!=');\n let value = field?.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$3').trim();\n let isSelected;\n if (isMultiple) {\n let selectedValues = Array.from(this.host.querySelectorAll(`input[name=\"${event.target.name}\"]:checked`), e => (e as HTMLInputElement)?.value);\n isSelected = selectedValues.includes(value.toString());\n } else if (isRadio) {\n // Handle radio inputs.\n isSelected = event.target.checked && event.target.value === value;\n } else {\n isSelected = value === event.target.value;\n }\n\n salla.log('The input is ', isMultiple ? 'Multiple' : isRadio ? 'Radio' : 'Single', ' value:', isSelected);\n\n let showTheInput = (isEqual && isSelected) || (!isEqual && !isSelected);\n if (showTheInput) {\n field.classList.remove('hidden');\n field.querySelectorAll('[name]').forEach((input) => {\n input.removeAttribute('disabled');\n\n const closestProductOption = (input as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n if (closestProductOption.dataset.optionRequired === 'true') {\n input.setAttribute('required', '');\n }\n\n if (input.getAttribute('type') === 'checkbox') {\n const checkboxes = Array.from(document.querySelectorAll(`input[type=\"checkbox\"][name=\"${input.getAttribute('name')}\"]`)) as HTMLInputElement[];\n const isAnyChecked = checkboxes.some((checkbox) => checkbox.checked);\n if (isAnyChecked) {\n checkboxes.forEach((checkbox) => {\n checkbox.removeAttribute('required');\n });\n }\n }\n });\n } else {\n this.hideAllOptions(field.dataset.optionId);\n field.classList.add('hidden');\n this.disableInputs(field);\n }\n });\n } \n\n componentDidRender() {\n this.host.querySelectorAll(`[data-show-when]`).forEach((field) => {\n // @ts-ignore\n let optionName = field?.dataset?.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$1').trim();\n if (!optionName) {\n return;\n }\n\n this.changeHandler({\n target: this.host.querySelector('[name^=\"' + optionName + '\"]')\n })\n });\n }\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":";;;+tFAAA,IAAMA,EAAuB,uB,ICUhBC,EAAiBC,EAAA,iCA2B5B,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,K,sHAjBgCC,MAAMC,KAAKC,IAAI,iCAAkC,Y,eACpDF,MAAMC,KAAKC,IAAI,iCAAkC,gB,iBAC/CF,MAAMC,KAAKC,IAAI,iCAAkC,0B,gBAClDF,MAAMC,KAAKC,IAAI,qCAAsC,oB,gBACrD,G,iBACE,M,kBACO,G,iCAarCF,MAAMC,KAAKE,UAAS,WAAM,OAAAL,EAAKM,iBAAL,IAE1BC,MAAMC,MAAMC,GAAG,iBAAiB,SAACC,GAAS,OAAAV,EAAKW,kBAAkBD,EAAvB,G,CAG9BZ,EAAAc,UAAAN,gBAAN,W,kHACAO,EAAiB,SAACV,EAAMW,EAAKC,GACjC,OAAO,IAAIC,SAAQ,SAACC,GAClBf,MAAMgB,QAAQC,UAAUjB,MAAMC,KAAKiB,SAASjB,GAAOW,EAAKC,GACxDE,EAAQ,K,KAIZ,SAAMJ,EAAe,WAAY,iCAAkC,a,OAAnEQ,EAAAC,OACA,SAAMT,EAAe,WAAY,iCAAkC,wB,OAAnEQ,EAAAC,OACA,SAAMT,EAAe,WAAY,iCAAkC,iB,OAAnEQ,EAAAC,OACA,SAAMT,EAAe,WAAY,iCAAkC,wB,OAAnEQ,EAAAC,OACA,SAAMT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AQ,CAC1DxB,EAAMC,aAAa,WAAY,G,CAGjC,GAAID,EAAMM,aAAa,UAAY,WAAY,CAC7C,IAAMmB,EAAaN,MAAMrE,KAAK4E,SAAShC,iBAAiB,gCAAA9D,OAAgCoE,EAAMM,aAAa,QAAO,QAClH,IAAMqB,EAAeF,EAAWG,MAAK,SAACC,GAAa,OAAAA,EAASrB,OAAT,IACnD,GAAImB,EAAc,CAChBF,EAAW9B,SAAQ,SAACkC,GAClBA,EAAS3B,gBAAgB,W,aAK5B,CACL9J,EAAKmJ,eAAeK,EAAME,QAAQN,UAClCI,EAAMC,UAAUrH,IAAI,UACpBpC,EAAK2J,cAAcH,E,MAK3BN,EAAAtI,UAAA8K,mBAAA,eAAA1L,EAAAC,KACEA,KAAKoJ,KAAKC,iBAAiB,oBAAoBC,SAAQ,SAACC,G,MAEtD,IAAImC,GAAalG,EAAA+D,IAAK,MAALA,SAAK,SAALA,EAAOE,WAAO,MAAAjE,SAAA,SAAAA,EAAEkF,SAASJ,QAAQ,mBAAoB,MAAMK,OAC5E,IAAKe,EAAY,CACf,M,CAGF3L,EAAKqK,cAAc,CACjBC,OAAQtK,EAAKqJ,KAAKuC,cAAc,WAAaD,EAAa,O,KAKhEzC,EAAAtI,UAAAuH,OAAA,WACE,OACEb,EAACc,EAAI,KACHd,EAAA,a,yHA1G2B,G"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{p as e,b as t}from"./p-bdd00808.js";export{s as setNonce}from"./p-bdd00808.js";import{g as a}from"./p-8d802e70.js";import"./p-f84bae34.js";const l=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};l().then((e=>{a();return t(JSON.parse('[["p-b3e47f50",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"showOffer":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"multipleBankOfferTitleText":[32],"multipleBankOfferTitleDescription":[32],"buy_quantity_text":[32]}]]],["p-3c2d05e3",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-8f6d1ef8",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"hideOutLabel":[1,"hide-out-label"],"uniqueKey":[1,"unique-key"],"config":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"disableCardValue":[32],"availableDigitalCardValues":[32],"setOptionsData":[64],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-afe8a34e",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-5c9e0408",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["p-0e255b9b",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-0b229465",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-cb7adf40",[[0,"salla-reviews",{"displayAllLink":[516,"display-all-link"],"source":[513],"sourceValue":[513,"source-value"],"limit":[514],"type":[1],"sort":[1],"hideCustomerInfo":[4,"hide-customer-info"],"reviews":[32],"isRTL":[32],"showReviews":[32],"testimonialText":[32],"displayAllLinkText":[32]}]]],["p-1fec829f",[[0,"salla-wallet",{"transactionsArray":[32],"balance":[32],"isLoading":[32],"nextPageUrl":[32]}]]],["p-3534e881",[[0,"salla-conditional-offer",{"offer":[32],"products":[32],"isLoading":[32],"canRender":[32]}]]],["p-ccd57aa2",[[0,"salla-orders",{"params":[16],"loadMoreText":[1,"load-more-text"],"orderNumberText":[32],"totalOrderText":[32],"orderDateText":[32],"orderStatusText":[32],"noOrderText":[32],"load_more_text_trans":[32],"languageCode":[32],"orders":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"nextPage":[32],"showPlaceholder":[32]}]]],["p-57de180e",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-2c451eb4",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-dabb0e14",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-0b205b04",[[0,"salla-cart-item-offers",{"quantity":[2],"offers":[1],"itemId":[2,"item-id"],"productPrice":[2,"product-price"],"internalQuantity":[32],"internalOffers":[32],"internalProductPrice":[32],"showAll":[32],"freeLabel":[32],"receivedOffer":[32],"discountAmountLabel":[32],"showMoreOffers":[32]}]]],["p-c1fc356b",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-a85d28af",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"country":[1],"tabbyIsActive":[32],"spotiiIsActive":[32],"tamaraIsActive":[32],"mispayActive":[32],"emkanIsActive":[32],"madfuActive":[32],"rajehiIsActive":[32],"installment_sheria_text":[32]}]]],["p-511cee71",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-66e9be2f",[[0,"salla-metadata",{"entity":[1],"entityId":[8,"entity-id"],"specs":[32],"download":[32]}]]],["p-6b82ee90",[[0,"salla-payments",{"exclude":[1040]}]]],["p-240ecc00",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-9239b56b",[[0,"salla-notification-item",{"notification":[16]}]]],["p-916f5bba",[[4,"salla-tooltip",{"text":[1],"targetId":[1,"target-id"],"show":[32]},[[9,"mouseover","handleMouseOver"],[9,"mouseout","handleMouseOut"]]]]],["p-a3c95fbd",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"physicalProducts":[4,"physical-products"],"vertical":[4],"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],"receiverCountryFieldLabel":[32],"ksa":[32],"selectCity":[32],"selectCityInfo":[32],"receiverCityFieldLabel":[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],"hostId":[32],"receiverCity":[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]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"blockTitle":[1,"block-title"],"hideTitle":[4,"hide-title"],"type":[1],"showFormAvatar":[4,"show-form-avatar"],"hideBought":[4,"hide-bought"],"sort":[1],"testimonials":[4],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"mostHelpfulLabel":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32],"showRatingSummary":[32],"allowLikes":[32],"reload":[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]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"showContactWidget":[32],"errorMessage":[32],"dragAndDropFilesLabel":[32],"contactSubjectLabel":[32],"editReviewLabel":[32],"allowedImagesTypesLabel":[32],"addImagesLabel":[32],"editImagesLabel":[32],"threeImagesMax":[32],"areYouSureLabel":[32],"confirmDeletionLabel":[32],"cancelLabel":[32],"confirmDeleteBtn":[32],"updatedSuccessfullyLabel":[32],"deletedSuccessfullyLabel":[32],"allowAttachImages":[32],"allowContactSupport":[32],"contactUsLabel":[32],"images":[32],"productImages":[32],"editItemImages":[32],"contact_body":[32],"editMode":[32],"defaultMode":[32],"deleteMode":[32],"shouldOpenDeleteModal":[32],"editType":[32],"editFeedbackId":[32],"deleteFeedbackId":[32],"editItem":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[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-user-profile",{"customFields":[1,"custom-fields"],"minAge":[2,"min-age"],"userData":[32],"isEditable":[32],"userDefinedFields":[32],"disableAction":[32],"isLoading":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32]}],[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",{"deactivateAccount":[32],"promotionalMsgs":[32],"hideMyName":[32],"hideMyNameDesc":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32],"canHideName":[32],"isHiddenName":[32],"isNotifiable":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[0,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"storeId":[1032,"store-id"],"api":[1],"headers":[1025],"withoutReload":[1028,"without-reload"],"messages":[32],"isClosable":[32],"iframeLoaded":[32],"scrolling":[32],"direction":[32],"canRenderIframe":[32],"open":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"limit":[2],"menus":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[0,"salla-breadcrumb",{"breadcrumbs":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"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],"wallet":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[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]}],[0,"salla-reviews-summary",{"itemId":[2,"item-id"],"canRender":[32],"data":[32],"basedOnLabel":[32]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"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-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"rowCards":[516,"row-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"switchToNormalBehavior":[32],"parsedFilters":[32],"filtersSnapshot":[32],"setFilters":[64],"reload":[64]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-comment-item",{"comment":[16],"hideBought":[16],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32],"allowLikes":[32],"allowAttachImages":[32],"helpfulLabel":[32],"likesCount":[32],"likedComments":[32]}],[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"]]],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32],"isApplePayActive":[32],"buyNowText":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[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],"disabled":[4]}],[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]}],[0,"salla-file-upload",{"value":[1544],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"type":[1],"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"],"allowImagePreview":[4,"allow-image-preview"],"imagePreviewHeight":[2,"image-preview-height"],"filePosterHeight":[2,"file-poster-height"],"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"],"max_images_count":[32],"max_count_hint":[32],"uploadedFiles":[32],"isListScrollerListenerAdded":[32],"showMaxCountHint":[32],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025],"hideUnits":[4,"hide-units"]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2],"withLabel":[4,"with-label"],"editable":[4],"translationsLoaded":[32],"labels":[32],"reviewLabel":[32],"selectedStar":[32]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"disabled":[4],"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-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"],"gridThumbs":[516,"grid-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],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"sliderInstance":[64],"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],"updateSize":[64],"sliderInit":[64],"thumbsSliderInstance":[64],"thumbsSliderInit":[64],"thumbsSliderUpdate":[64],"thumbsSliderUpdateSlides":[64],"getThumbsUpdateSize":[64],"thumbsSlideTo":[64],"getThumbsSlides":[64]}],[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"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-22a4c0a3",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-4f5aa38b",[[0,"salla-booking-field",{"option":[16],"productId":[2,"product-id"],"bookNowLabel":[32],"editLabel":[32],"bookedLabel":[32],"selectDate":[32],"bookingUrl":[32],"iframeReady":[32],"reservations":[32],"reservationsInput":[32]}],[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-8fb53758",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"isMin":[32],"isRTL":[32],"reset":[64]}]]]]'),e)}));
4
+ import{p as e,b as t}from"./p-bdd00808.js";export{s as setNonce}from"./p-bdd00808.js";import{g as a}from"./p-8d802e70.js";import"./p-f84bae34.js";const l=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};l().then((e=>{a();return t(JSON.parse('[["p-b3e47f50",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"showOffer":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"multipleBankOfferTitleText":[32],"multipleBankOfferTitleDescription":[32],"buy_quantity_text":[32]}]]],["p-3c2d05e3",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-8f6d1ef8",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"hideOutLabel":[1,"hide-out-label"],"uniqueKey":[1,"unique-key"],"config":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"disableCardValue":[32],"availableDigitalCardValues":[32],"setOptionsData":[64],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-afe8a34e",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-5c9e0408",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["p-0e255b9b",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-0b229465",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-cb7adf40",[[0,"salla-reviews",{"displayAllLink":[516,"display-all-link"],"source":[513],"sourceValue":[513,"source-value"],"limit":[514],"type":[1],"sort":[1],"hideCustomerInfo":[4,"hide-customer-info"],"reviews":[32],"isRTL":[32],"showReviews":[32],"testimonialText":[32],"displayAllLinkText":[32]}]]],["p-1fec829f",[[0,"salla-wallet",{"transactionsArray":[32],"balance":[32],"isLoading":[32],"nextPageUrl":[32]}]]],["p-3534e881",[[0,"salla-conditional-offer",{"offer":[32],"products":[32],"isLoading":[32],"canRender":[32]}]]],["p-ccd57aa2",[[0,"salla-orders",{"params":[16],"loadMoreText":[1,"load-more-text"],"orderNumberText":[32],"totalOrderText":[32],"orderDateText":[32],"orderStatusText":[32],"noOrderText":[32],"load_more_text_trans":[32],"languageCode":[32],"orders":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"nextPage":[32],"showPlaceholder":[32]}]]],["p-57de180e",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-2c451eb4",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-dabb0e14",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-0b205b04",[[0,"salla-cart-item-offers",{"quantity":[2],"offers":[1],"itemId":[2,"item-id"],"productPrice":[2,"product-price"],"internalQuantity":[32],"internalOffers":[32],"internalProductPrice":[32],"showAll":[32],"freeLabel":[32],"receivedOffer":[32],"discountAmountLabel":[32],"showMoreOffers":[32]}]]],["p-c1fc356b",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-a85d28af",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"country":[1],"tabbyIsActive":[32],"spotiiIsActive":[32],"tamaraIsActive":[32],"mispayActive":[32],"emkanIsActive":[32],"madfuActive":[32],"rajehiIsActive":[32],"installment_sheria_text":[32]}]]],["p-511cee71",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-66e9be2f",[[0,"salla-metadata",{"entity":[1],"entityId":[8,"entity-id"],"specs":[32],"download":[32]}]]],["p-6b82ee90",[[0,"salla-payments",{"exclude":[1040]}]]],["p-240ecc00",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-9239b56b",[[0,"salla-notification-item",{"notification":[16]}]]],["p-916f5bba",[[4,"salla-tooltip",{"text":[1],"targetId":[1,"target-id"],"show":[32]},[[9,"mouseover","handleMouseOver"],[9,"mouseout","handleMouseOut"]]]]],["p-a3c95fbd",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"physicalProducts":[4,"physical-products"],"vertical":[4],"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],"receiverCountryFieldLabel":[32],"ksa":[32],"selectCity":[32],"selectCityInfo":[32],"receiverCityFieldLabel":[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],"hostId":[32],"receiverCity":[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]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"blockTitle":[1,"block-title"],"hideTitle":[4,"hide-title"],"type":[1],"showFormAvatar":[4,"show-form-avatar"],"hideBought":[4,"hide-bought"],"sort":[1],"testimonials":[4],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"mostHelpfulLabel":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32],"showRatingSummary":[32],"allowLikes":[32],"reload":[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]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"showContactWidget":[32],"errorMessage":[32],"dragAndDropFilesLabel":[32],"contactSubjectLabel":[32],"editReviewLabel":[32],"allowedImagesTypesLabel":[32],"addImagesLabel":[32],"editImagesLabel":[32],"threeImagesMax":[32],"areYouSureLabel":[32],"confirmDeletionLabel":[32],"cancelLabel":[32],"confirmDeleteBtn":[32],"updatedSuccessfullyLabel":[32],"deletedSuccessfullyLabel":[32],"allowAttachImages":[32],"allowContactSupport":[32],"contactUsLabel":[32],"images":[32],"productImages":[32],"editItemImages":[32],"contact_body":[32],"editMode":[32],"defaultMode":[32],"deleteMode":[32],"shouldOpenDeleteModal":[32],"editType":[32],"editFeedbackId":[32],"deleteFeedbackId":[32],"editItem":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[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-user-profile",{"customFields":[1,"custom-fields"],"minAge":[2,"min-age"],"userData":[32],"isEditable":[32],"userDefinedFields":[32],"disableAction":[32],"isLoading":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32]}],[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",{"deactivateAccount":[32],"promotionalMsgs":[32],"hideMyName":[32],"hideMyNameDesc":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32],"canHideName":[32],"isHiddenName":[32],"isNotifiable":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[0,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"storeId":[1032,"store-id"],"api":[1],"headers":[1025],"withoutReload":[1028,"without-reload"],"messages":[32],"isClosable":[32],"iframeLoaded":[32],"scrolling":[32],"direction":[32],"canRenderIframe":[32],"open":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"limit":[2],"menus":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[0,"salla-breadcrumb",{"breadcrumbs":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"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],"wallet":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[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]}],[0,"salla-reviews-summary",{"itemId":[2,"item-id"],"canRender":[32],"data":[32],"basedOnLabel":[32]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"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-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"rowCards":[516,"row-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"switchToNormalBehavior":[32],"parsedFilters":[32],"filtersSnapshot":[32],"setFilters":[64],"reload":[64]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-comment-item",{"comment":[16],"hideBought":[16],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32],"allowLikes":[32],"allowAttachImages":[32],"helpfulLabel":[32],"likesCount":[32],"likedComments":[32]}],[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"]]],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32],"isApplePayActive":[32],"buyNowText":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[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],"disabled":[4]}],[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]}],[0,"salla-file-upload",{"value":[1544],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"type":[1],"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"],"allowImagePreview":[4,"allow-image-preview"],"imagePreviewHeight":[2,"image-preview-height"],"filePosterHeight":[2,"file-poster-height"],"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"],"max_images_count":[32],"max_count_hint":[32],"uploadedFiles":[32],"isListScrollerListenerAdded":[32],"showMaxCountHint":[32],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025],"hideUnits":[4,"hide-units"]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2],"withLabel":[4,"with-label"],"editable":[4],"translationsLoaded":[32],"labels":[32],"reviewLabel":[32],"selectedStar":[32]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"disabled":[4],"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-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"],"gridThumbs":[516,"grid-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],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"sliderInstance":[64],"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],"updateSize":[64],"sliderInit":[64],"thumbsSliderInstance":[64],"thumbsSliderInit":[64],"thumbsSliderUpdate":[64],"thumbsSliderUpdateSlides":[64],"getThumbsUpdateSize":[64],"thumbsSlideTo":[64],"getThumbsSlides":[64]}],[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"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-22a4c0a3",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-c25a3647",[[0,"salla-booking-field",{"option":[16],"productId":[2,"product-id"],"bookNowLabel":[32],"editLabel":[32],"bookedLabel":[32],"selectDate":[32],"bookingUrl":[32],"iframeReady":[32],"reservations":[32],"reservationsInput":[32]}],[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-8fb53758",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"isMin":[32],"isRTL":[32],"reset":[64]}]]]]'),e)}));
5
5
  //# sourceMappingURL=twilight.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "2.14.138",
3
+ "version": "2.14.139",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -79,9 +79,9 @@
79
79
  "typescript": "^5.2.2"
80
80
  },
81
81
  "dependencies": {
82
- "@salla.sa/applepay": "2.14.138",
83
- "@salla.sa/twilight": "2.14.138",
84
- "@salla.sa/twilight-tailwind-theme": "2.14.138",
82
+ "@salla.sa/applepay": "2.14.139",
83
+ "@salla.sa/twilight": "2.14.139",
84
+ "@salla.sa/twilight-tailwind-theme": "2.14.139",
85
85
  "@types/node": "^20.4.8",
86
86
  "animejs": "^3.2.1",
87
87
  "filepond": "^4.30.4",
@@ -99,5 +99,5 @@
99
99
  "vanilla-lazyload": "^17.8.3",
100
100
  "vanilla-picker": "^2.12.1"
101
101
  },
102
- "gitHead": "4761157ac2adc1be2d3f01a3dff1d023bca66903"
102
+ "gitHead": "6211a99ba84d1fc34878fa339b11dc5ede5298ff"
103
103
  }
@@ -1 +0,0 @@
1
- {"version":3,"names":["sallaBookingFieldCss","SallaBookingField","exports","class_1","hostRef","_this","this","salla","lang","get","onLoaded","setTranslations","Salla","event","on","data","handleBookingOpen","prototype","setNestedAsync","key","value","Promise","resolve","helpers","setNested","messages","_c","sent","bookNowLabel","editLabel","bookedLabel","selectDate","openBookingModal","afterReload","detail","productId","config","isGuest","setAfterReloadEvent","dispatch","booking","add","then","resp","redirect","to","Error","url","id","catch","error","logger","response","bookingUrl","addParamToUrl","iframeReady","setTimeout","modal","setTitle","open","payload","storage","set","emitAfterReloadEvent","eventDetails","customEvent","CustomEvent","window","dispatchEvent","remove","componentWillLoad","option","details","length","reservations","componentDidLoad","addEventListener","handleMessageEvent","bind","reservationsInput","e","invalidInput","emit","setCustomValidity","reportValidity","source","action","type","message","localStorage","getItem","console","log","concat","_a","fields","reservation","notify","errorList","Object","values","flat","map","join","Number","schedule","time","timeSlot","date","day","from_timestamp","from","to_timestamp","filter","item","success","_b","close","location","reload","iframe","height","bookingModal","h","class","ref","width","position","noPadding","src","frameborder","renderReservationDate","innerHTML","Calendar","renderReservationTime","TimeIcon","render","Host","required","money","price","size","loaderPosition","fill","onClick","BookingTime","index","name","JSON","stringify","SallaConditionalFields","class_2","hideAllOptions","optionId","host","querySelectorAll","forEach","field","classList","dataset","disableInputs","input","setAttribute","removeAttribute","tagName","toLowerCase","includes","getAttribute","hasOwnProperty","checked","changeHandler","target","replace","isMultiple","isRadio","isEqual","showWhen","trim","isSelected","selectedValues","Array","toString","showTheInput","closestProductOption","closest","optionRequired","checkboxes","document","isAnyChecked","some","checkbox","componentDidRender","optionName","querySelector"],"sources":["src/components/salla-booking-field/salla-booking-field.scss?tag=salla-booking-field","src/components/salla-booking-field/salla-booking-field.tsx","src/components/salla-conditional-fields/salla-conditional-fields.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h, Element, State, Event, EventEmitter } from '@stencil/core';\nimport { Option, Reservation } from './interfaces';\nimport BookingTime from '../../assets/svg/calendar-time.svg';\nimport Calendar from '../../assets/svg/calendar.svg';\nimport TimeIcon from '../../assets/svg/time.svg';\n\n@Component({\n tag: 'salla-booking-field',\n styleUrl: 'salla-booking-field.scss',\n})\nexport class SallaBookingField {\n /**\n * The booking option configuration\n */\n @Prop() option: Option;\n /**\n * The ID of the product for which the booking is being made\n */\n @Prop() productId: number;\n @Element() host: HTMLElement;\n @State() bookNowLabel: string = salla.lang.get('pages.cart.book_an_appointment', 'حجز موعد');\n @State() editLabel: string = salla.lang.get('pages.cart.edit_an_appointment', 'تعديل الموعد');\n @State() bookedLabel: string = salla.lang.get('pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n @State() selectDate: string = salla.lang.get('pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n @State() bookingUrl: string = '';\n @State() iframeReady: boolean = false;\n @State() reservations: Reservation[] = [];\n @State() reservationsInput: HTMLInputElement;\n\n /**\n * Event emitted when the input is invalid.\n */\n @Event() invalidInput: EventEmitter<any>;\n\n private modal: HTMLSallaModalElement;\n private iframe: HTMLIFrameElement;\n\n constructor() {\n // Load translations\n salla.lang.onLoaded(() => this.setTranslations());\n // Register event listeners\n Salla.event.on('booking::open', (data) => this.handleBookingOpen(data));\n }\n\n private async setTranslations() {\n const setNestedAsync = (lang, key, value) => {\n return new Promise((resolve) => {\n salla.helpers.setNested(salla.lang.messages[lang], key, value);\n resolve(true);\n });\n };\n\n await setNestedAsync('ar.trans', 'pages.cart.book_an_appointment', 'حجز موعد');\n await setNestedAsync('en.trans', 'pages.cart.book_an_appointment', 'Book an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.edit_an_appointment', 'تعديل الموعد');\n await setNestedAsync('en.trans', 'pages.cart.edit_an_appointment', 'Edit an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n await setNestedAsync('en.trans', 'pages.cart.booked_successfully', 'Booked Successfully');\n await setNestedAsync('ar.trans', 'pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n await setNestedAsync('en.trans', 'pages.cart.select_appointment_date', 'Select appointment date');\n\n this.bookNowLabel = salla.lang.get('pages.cart.book_an_appointment');\n this.editLabel = salla.lang.get('pages.cart.edit_an_appointment');\n this.bookedLabel = salla.lang.get('pages.cart.booked_successfully');\n this.selectDate = salla.lang.get('pages.cart.select_appointment_date');\n }\n\n private openBookingModal(event: any, afterReload = false) {\n if (afterReload && (!event.detail || typeof event.detail !== 'number' || event.detail !== this.productId)) {\n return;\n }\n if (salla.config.isGuest()) {\n this.setAfterReloadEvent('booking::open-after-reload', this.productId);\n salla.event.dispatch('login::open');\n return;\n }\n salla.booking.add(this.productId, false)\n .then((resp) => {\n if (resp.data.redirect.to !== 'booking') {\n throw new Error('Unexpected redirect!');\n }\n salla.event.dispatch('booking::open', { url: resp.data.redirect.url, id: this.productId });\n })\n .catch((error) => {\n salla.error(salla.lang.get('common.errors.error_occurred'));\n salla.logger.error(error.response || error);\n });\n }\n\n private handleBookingOpen(data) {\n if (data.id !== this.productId) return;\n this.bookingUrl = salla.url.addParamToUrl('product_id', data.id, data.url);\n this.iframeReady = true;\n setTimeout(() => {\n this.modal.setTitle(this.selectDate);\n this.modal.open();\n }, 100);\n }\n\n private setAfterReloadEvent(event, payload) {\n salla.storage.set('afterReloadEvent', { event, payload });\n }\n\n private emitAfterReloadEvent() {\n const eventDetails = salla.storage.get('afterReloadEvent');\n if (eventDetails && eventDetails.event) {\n const customEvent = new CustomEvent(eventDetails.event, {\n detail: eventDetails.payload\n });\n window.dispatchEvent(customEvent)\n salla.storage.remove('afterReloadEvent');\n }\n }\n\n componentWillLoad() {\n if (this.option && this.option.details.length) {\n this.reservations = this.option.details;\n }\n }\n\n componentDidLoad() {\n window.addEventListener('booking::open-after-reload', (event) => this.openBookingModal(event, true));\n this.emitAfterReloadEvent();\n window.addEventListener('message', this.handleMessageEvent.bind(this));\n this.reservationsInput.addEventListener('invalid', e => this.invalidInput.emit(e));\n this.reservationsInput.addEventListener('input', () => {\n this.reservationsInput.setCustomValidity('');\n this.reservationsInput.reportValidity();\n });\n }\n\n private handleMessageEvent(event) {\n if (event.data.source !== 'booking') return;\n const action = event.data.type;\n const value = event.data.message;\n if (localStorage.getItem('debug')) console.log(`Received an action:${action}`, event.data);\n\n if (action === 'error') {\n if (value.fields?.reservation) {\n salla.notify.error(value.fields.reservation[0]);\n return;\n }\n const errorList = Object.values(value.fields).flat().map(error => `<li>${error}</li>`).join('');\n salla.notify.error(`<ul>${errorList}</ul>`);\n }\n\n if (action === 'success') {\n if (Number(value.productId) !== Number(this.productId)) return;\n this.reservations = value.data.reservations.map(schedule => {\n if (schedule.time && schedule.time.length > 0) {\n const timeSlot = schedule.time[0];\n return {\n date: schedule.date,\n day: schedule.day,\n from_timestamp: timeSlot.from,\n to_timestamp: timeSlot.to,\n };\n }\n return null;\n }).filter(item => item !== null);\n\n salla.notify.success(this.bookedLabel);\n this.modal?.close();\n setTimeout(() => window.location.reload());\n }\n\n if (action === 'height') {\n this.iframe.height = value?.height + 'px';\n }\n }\n\n private bookingModal() {\n return (\n <salla-modal class=\"s-booking-field-modal\" ref={modal => (this.modal = modal)} width=\"md\" position=\"middle\" noPadding>\n <iframe ref={iframe => (this.iframe = iframe)} src={this.bookingUrl} frameborder=\"0\"></iframe>\n </salla-modal>\n );\n }\n\n renderReservationDate(reservation: Reservation) {\n return (\n <span class={reservation.from_timestamp ? 's-booking-field-reservations-has-time' : ''}>\n <i class=\"s-booking-field-reservations-icon\" innerHTML={Calendar}></i>\n {reservation.date}\n </span>\n );\n }\n\n renderReservationTime(reservation: Reservation) {\n if (!reservation.from_timestamp) return '';\n return (\n <span class=\"s-booking-field-reservations-time\">\n <i class=\"s-booking-field-reservations-icon\" innerHTML={TimeIcon}></i>\n <span>\n {reservation.from_timestamp} - {reservation.to_timestamp}\n </span>\n </span>\n );\n }\n\n render() {\n return (\n <Host>\n <div class=\"s-booking-field-main\">\n {this.option.required || this.reservations.length > 0 ? <div class=\"s-booking-field-price\">\n <span>{salla.money(this.option.price)}</span>\n </div> : ''}\n <salla-button class=\"s-booking-field-book-now\" size=\"small\" loaderPosition=\"center\" fill=\"outline\" onClick={event => this.openBookingModal(event, false)}>\n <span class=\"s-booking-field-book-now-content\">\n <span innerHTML={BookingTime}></span>\n {this.reservations.length ? this.editLabel : this.bookNowLabel}\n </span>\n </salla-button>\n </div>\n {this.reservations.length > 0 && (\n <div class=\"s-booking-field-reservations\">\n {this.reservations.map((reservation, index) => (\n <div key={index} class=\"s-booking-field-reservations-item\">\n {this.renderReservationDate(reservation)}\n {this.renderReservationTime(reservation)}\n </div>\n ))}\n </div>\n )}\n <input \n class=\"s-hidden\" \n name={this.option.name} \n required={this.option.required} \n value={JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations)}\n ref={reservations => this.reservationsInput = reservations} \n />\n {this.iframeReady && this.bookingModal()}\n </Host>\n );\n }\n}\n","import { Component, Element, Host, Listen, h } from '@stencil/core';\n\n/**\n * its to easy to use, currenlty its support select & checkbox input as trigger for show/hide the dom\n * the dom you can put it like this data-show-when=\"{name of the field} {= or !=} {value of the field}\"\n */\n@Component({\n tag: 'salla-conditional-fields'\n})\nexport class SallaConditionalFields {\n\n @Element() host: HTMLElement;\n\n private hideAllOptions(optionId) {\n this.host.querySelectorAll(`[data-show-when^=\"options[${optionId}\"]`).forEach((field: HTMLElement) => {\n field.classList.add('hidden');\n this.hideAllOptions(field.dataset.optionId);\n this.disableInputs(field);\n });\n }\n\n private disableInputs(field) {\n field.querySelectorAll('[name]').forEach((input) => {\n\n input.setAttribute('disabled', '');\n input.removeAttribute('required');\n if (input?.tagName?.toLowerCase() === 'select') {\n input.value = ''\n }\n if (['checkbox'].includes(input.getAttribute('type')) && input.hasOwnProperty('checked')) {\n // @ts-ignore\n input.checked = false;\n }\n });\n }\n \n @Listen('change')\n changeHandler(event) {\n salla.event.emit('salla-onditional-fields::change', event);\n salla.log('Received the change event: ', event);\n\n if (!event.target || !['SELECT'].includes(event.target.tagName) && !['checkbox', 'radio'].includes(event.target.getAttribute('type'))) {\n salla.log('Ignore the change because is not a supported input: ' + (event?.target?.tagName || 'N/A'));\n return;\n }\n\n let optionId = event.target.name.replace('[]', '');\n let isMultiple = event.target.getAttribute('type') === 'checkbox';\n let isRadio = event.target.getAttribute('type') === 'radio';\n\n salla.log('Trying to find all elements with condition:', `[data-show-when^=\"${optionId}\"]`);\n\n this.host.querySelectorAll(`[data-show-when^=\"${optionId}\"]`)\n .forEach((field: HTMLElement) => {\n let isEqual = !field?.dataset.showWhen.includes('!=');\n let value = field?.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$3').trim();\n let isSelected;\n if (isMultiple) {\n let selectedValues = Array.from(this.host.querySelectorAll(`input[name=\"${event.target.name}\"]:checked`), e => (e as HTMLInputElement)?.value);\n isSelected = selectedValues.includes(value.toString());\n } else if (isRadio) {\n // Handle radio inputs.\n isSelected = event.target.checked && event.target.value === value;\n } else {\n isSelected = value === event.target.value;\n }\n\n salla.log('The input is ', isMultiple ? 'Multiple' : isRadio ? 'Radio' : 'Single', ' value:', isSelected);\n\n let showTheInput = (isEqual && isSelected) || (!isEqual && !isSelected);\n if (showTheInput) {\n field.classList.remove('hidden');\n field.querySelectorAll('[name]').forEach((input) => {\n input.removeAttribute('disabled');\n\n const closestProductOption = (input as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n if (closestProductOption.dataset.optionRequired === 'true') {\n input.setAttribute('required', '');\n }\n\n if (input.getAttribute('type') === 'checkbox') {\n const checkboxes = Array.from(document.querySelectorAll(`input[type=\"checkbox\"][name=\"${input.getAttribute('name')}\"]`)) as HTMLInputElement[];\n const isAnyChecked = checkboxes.some((checkbox) => checkbox.checked);\n if (isAnyChecked) {\n checkboxes.forEach((checkbox) => {\n checkbox.removeAttribute('required');\n });\n }\n }\n });\n } else {\n this.hideAllOptions(field.dataset.optionId);\n field.classList.add('hidden');\n this.disableInputs(field);\n }\n });\n } \n\n componentDidRender() {\n this.host.querySelectorAll(`[data-show-when]`).forEach((field) => {\n // @ts-ignore\n let optionName = field?.dataset?.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$1').trim();\n if (!optionName) {\n return;\n }\n\n this.changeHandler({\n target: this.host.querySelector('[name^=\"' + optionName + '\"]')\n })\n });\n }\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":";;;+tFAAA,IAAMA,EAAuB,uB,ICUhBC,EAAiBC,EAAA,iCA2B5B,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,K,sHAjBgCC,MAAMC,KAAKC,IAAI,iCAAkC,Y,eACpDF,MAAMC,KAAKC,IAAI,iCAAkC,gB,iBAC/CF,MAAMC,KAAKC,IAAI,iCAAkC,0B,gBAClDF,MAAMC,KAAKC,IAAI,qCAAsC,oB,gBACrD,G,iBACE,M,kBACO,G,iCAarCF,MAAMC,KAAKE,UAAS,WAAM,OAAAL,EAAKM,iBAAL,IAE1BC,MAAMC,MAAMC,GAAG,iBAAiB,SAACC,GAAS,OAAAV,EAAKW,kBAAkBD,EAAvB,G,CAG9BZ,EAAAc,UAAAN,gBAAN,W,kHACAO,EAAiB,SAACV,EAAMW,EAAKC,GACjC,OAAO,IAAIC,SAAQ,SAACC,GAClBf,MAAMgB,QAAQC,UAAUjB,MAAMC,KA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,GAE9F,IAAII,EAAgBP,GAAWG,IAAiBH,IAAYG,EAC5D,GAAII,EAAc,CAChBzB,EAAMC,UAAUzF,OAAO,UACvBwF,EAAMF,iBAAiB,UAAUC,SAAQ,SAACK,GACxCA,EAAME,gBAAgB,YAEtB,IAAMoB,EAAwBtB,EAA2BuB,QAAQ,6BACjE,GAAID,EAAqBxB,QAAQ0B,iBAAmB,OAAQ,CAC1DxB,EAAMC,aAAa,WAAY,G,CAGjC,GAAID,EAAMM,aAAa,UAAY,WAAY,CAC7C,IAAMmB,EAAaN,MAAMrE,KAAK4E,SAAShC,iBAAiB,gCAAA9D,OAAgCoE,EAAMM,aAAa,QAAO,QAClH,IAAMqB,EAAeF,EAAWG,MAAK,SAACC,GAAa,OAAAA,EAASrB,OAAT,IACnD,GAAImB,EAAc,CAChBF,EAAW9B,SAAQ,SAACkC,GAClBA,EAAS3B,gBAAgB,W,aAK5B,CACL9J,EAAKmJ,eAAeK,EAAME,QAAQN,UAClCI,EAAMC,UAAUrH,IAAI,UACpBpC,EAAK2J,cAAcH,E,MAK3BN,EAAAtI,UAAA8K,mBAAA,eAAA1L,EAAAC,KACEA,KAAKoJ,KAAKC,iBAAiB,oBAAoBC,SAAQ,SAACC,G,MAEtD,IAAImC,GAAalG,EAAA+D,IAAK,MAALA,SAAK,SAALA,EAAOE,WAAO,MAAAjE,SAAA,SAAAA,EAAEkF,SAASJ,QAAQ,mBAAoB,MAAMK,OAC5E,IAAKe,EAAY,CACf,M,CAGF3L,EAAKqK,cAAc,CACjBC,OAAQtK,EAAKqJ,KAAKuC,cAAc,WAAaD,EAAa,O,KAKhEzC,EAAAtI,UAAAuH,OAAA,WACE,OACEb,EAACc,EAAI,KACHd,EAAA,a,yHA1G2B,G"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sallaBookingFieldCss","SallaBookingField","constructor","hostRef","salla","lang","get","onLoaded","this","setTranslations","Salla","event","on","data","handleBookingOpen","setNestedAsync","key","value","Promise","resolve","helpers","setNested","messages","bookNowLabel","editLabel","bookedLabel","selectDate","openBookingModal","afterReload","detail","productId","config","isGuest","setAfterReloadEvent","dispatch","booking","add","then","resp","redirect","to","Error","url","id","catch","error","logger","response","bookingUrl","addParamToUrl","iframeReady","setTimeout","modal","setTitle","open","payload","storage","set","emitAfterReloadEvent","eventDetails","customEvent","CustomEvent","window","dispatchEvent","remove","componentWillLoad","option","details","length","reservations","componentDidLoad","addEventListener","handleMessageEvent","bind","reservationsInput","e","invalidInput","emit","setCustomValidity","reportValidity","source","action","type","message","localStorage","getItem","console","log","_a","fields","reservation","notify","errorList","Object","values","flat","map","join","Number","schedule","time","timeSlot","date","day","from_timestamp","from","to_timestamp","filter","item","success","_b","close","location","reload","iframe","height","bookingModal","h","class","ref","width","position","noPadding","src","frameborder","renderReservationDate","innerHTML","Calendar","renderReservationTime","TimeIcon","render","Host","required","money","price","size","loaderPosition","fill","onClick","BookingTime","index","name","JSON","stringify","SallaConditionalFields","hideAllOptions","optionId","host","querySelectorAll","forEach","field","classList","dataset","disableInputs","input","setAttribute","removeAttribute","tagName","toLowerCase","includes","getAttribute","hasOwnProperty","checked","changeHandler","target","replace","isMultiple","isRadio","isEqual","showWhen","trim","isSelected","selectedValues","Array","toString","showTheInput","closestProductOption","closest","optionRequired","checkboxes","document","isAnyChecked","some","checkbox","componentDidRender","optionName","querySelector"],"sources":["src/components/salla-booking-field/salla-booking-field.scss?tag=salla-booking-field","src/components/salla-booking-field/salla-booking-field.tsx","src/components/salla-conditional-fields/salla-conditional-fields.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h, Element, State, Event, EventEmitter } from '@stencil/core';\nimport { Option, Reservation } from './interfaces';\nimport BookingTime from '../../assets/svg/calendar-time.svg';\nimport Calendar from '../../assets/svg/calendar.svg';\nimport TimeIcon from '../../assets/svg/time.svg';\n\n@Component({\n tag: 'salla-booking-field',\n styleUrl: 'salla-booking-field.scss',\n})\nexport class SallaBookingField {\n /**\n * The booking option configuration\n */\n @Prop() option: Option;\n /**\n * The ID of the product for which the booking is being made\n */\n @Prop() productId: number;\n @Element() host: HTMLElement;\n @State() bookNowLabel: string = salla.lang.get('pages.cart.book_an_appointment', 'حجز موعد');\n @State() editLabel: string = salla.lang.get('pages.cart.edit_an_appointment', 'تعديل الموعد');\n @State() bookedLabel: string = salla.lang.get('pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n @State() selectDate: string = salla.lang.get('pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n @State() bookingUrl: string = '';\n @State() iframeReady: boolean = false;\n @State() reservations: Reservation[] = [];\n @State() reservationsInput: HTMLInputElement;\n\n /**\n * Event emitted when the input is invalid.\n */\n @Event() invalidInput: EventEmitter<any>;\n\n private modal: HTMLSallaModalElement;\n private iframe: HTMLIFrameElement;\n\n constructor() {\n // Load translations\n salla.lang.onLoaded(() => this.setTranslations());\n // Register event listeners\n Salla.event.on('booking::open', (data) => this.handleBookingOpen(data));\n }\n\n private async setTranslations() {\n const setNestedAsync = (lang, key, value) => {\n return new Promise((resolve) => {\n salla.helpers.setNested(salla.lang.messages[lang], key, value);\n resolve(true);\n });\n };\n\n await setNestedAsync('ar.trans', 'pages.cart.book_an_appointment', 'حجز موعد');\n await setNestedAsync('en.trans', 'pages.cart.book_an_appointment', 'Book an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.edit_an_appointment', 'تعديل الموعد');\n await setNestedAsync('en.trans', 'pages.cart.edit_an_appointment', 'Edit an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n await setNestedAsync('en.trans', 'pages.cart.booked_successfully', 'Booked Successfully');\n await setNestedAsync('ar.trans', 'pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n await setNestedAsync('en.trans', 'pages.cart.select_appointment_date', 'Select appointment date');\n\n this.bookNowLabel = salla.lang.get('pages.cart.book_an_appointment');\n this.editLabel = salla.lang.get('pages.cart.edit_an_appointment');\n this.bookedLabel = salla.lang.get('pages.cart.booked_successfully');\n this.selectDate = salla.lang.get('pages.cart.select_appointment_date');\n }\n\n private openBookingModal(event: any, afterReload = false) {\n if (afterReload && (!event.detail || typeof event.detail !== 'number' || event.detail !== this.productId)) {\n return;\n }\n if (salla.config.isGuest()) {\n this.setAfterReloadEvent('booking::open-after-reload', this.productId);\n salla.event.dispatch('login::open');\n return;\n }\n salla.booking.add(this.productId, false)\n .then((resp) => {\n if (resp.data.redirect.to !== 'booking') {\n throw new Error('Unexpected redirect!');\n }\n salla.event.dispatch('booking::open', { url: resp.data.redirect.url, id: this.productId });\n })\n .catch((error) => {\n salla.error(salla.lang.get('common.errors.error_occurred'));\n salla.logger.error(error.response || error);\n });\n }\n\n private handleBookingOpen(data) {\n if (data.id !== this.productId) return;\n this.bookingUrl = salla.url.addParamToUrl('product_id', data.id, data.url);\n this.iframeReady = true;\n setTimeout(() => {\n this.modal.setTitle(this.selectDate);\n this.modal.open();\n }, 100);\n }\n\n private setAfterReloadEvent(event, payload) {\n salla.storage.set('afterReloadEvent', { event, payload });\n }\n\n private emitAfterReloadEvent() {\n const eventDetails = salla.storage.get('afterReloadEvent');\n if (eventDetails && eventDetails.event) {\n const customEvent = new CustomEvent(eventDetails.event, {\n detail: eventDetails.payload\n });\n window.dispatchEvent(customEvent)\n salla.storage.remove('afterReloadEvent');\n }\n }\n\n componentWillLoad() {\n if (this.option && this.option.details.length) {\n this.reservations = this.option.details;\n }\n }\n\n componentDidLoad() {\n window.addEventListener('booking::open-after-reload', (event) => this.openBookingModal(event, true));\n this.emitAfterReloadEvent();\n window.addEventListener('message', this.handleMessageEvent.bind(this));\n this.reservationsInput.addEventListener('invalid', e => this.invalidInput.emit(e));\n this.reservationsInput.addEventListener('input', () => {\n this.reservationsInput.setCustomValidity('');\n this.reservationsInput.reportValidity();\n });\n }\n\n private handleMessageEvent(event) {\n if (event.data.source !== 'booking') return;\n const action = event.data.type;\n const value = event.data.message;\n if (localStorage.getItem('debug')) console.log(`Received an action:${action}`, event.data);\n\n if (action === 'error') {\n if (value.fields?.reservation) {\n salla.notify.error(value.fields.reservation[0]);\n return;\n }\n const errorList = Object.values(value.fields).flat().map(error => `<li>${error}</li>`).join('');\n salla.notify.error(`<ul>${errorList}</ul>`);\n }\n\n if (action === 'success') {\n if (Number(value.productId) !== Number(this.productId)) return;\n this.reservations = value.data.reservations.map(schedule => {\n if (schedule.time && schedule.time.length > 0) {\n const timeSlot = schedule.time[0];\n return {\n date: schedule.date,\n day: schedule.day,\n from_timestamp: timeSlot.from,\n to_timestamp: timeSlot.to,\n };\n }\n return null;\n }).filter(item => item !== null);\n\n salla.notify.success(this.bookedLabel);\n this.modal?.close();\n setTimeout(() => window.location.reload());\n }\n\n if (action === 'height') {\n this.iframe.height = value?.height + 'px';\n }\n }\n\n private bookingModal() {\n return (\n <salla-modal class=\"s-booking-field-modal\" ref={modal => (this.modal = modal)} width=\"md\" position=\"middle\" noPadding>\n <iframe ref={iframe => (this.iframe = iframe)} src={this.bookingUrl} frameborder=\"0\"></iframe>\n </salla-modal>\n );\n }\n\n renderReservationDate(reservation: Reservation) {\n return (\n <span class={reservation.from_timestamp ? 's-booking-field-reservations-has-time' : ''}>\n <i class=\"s-booking-field-reservations-icon\" innerHTML={Calendar}></i>\n {reservation.date}\n </span>\n );\n }\n\n renderReservationTime(reservation: Reservation) {\n if (!reservation.from_timestamp) return '';\n return (\n <span class=\"s-booking-field-reservations-time\">\n <i class=\"s-booking-field-reservations-icon\" innerHTML={TimeIcon}></i>\n <span>\n {reservation.from_timestamp} - {reservation.to_timestamp}\n </span>\n </span>\n );\n }\n\n render() {\n return (\n <Host>\n <div class=\"s-booking-field-main\">\n {this.option.required || this.reservations.length > 0 ? <div class=\"s-booking-field-price\">\n <span>{salla.money(this.option.price)}</span>\n </div> : ''}\n <salla-button class=\"s-booking-field-book-now\" size=\"small\" loaderPosition=\"center\" fill=\"outline\" onClick={event => this.openBookingModal(event, false)}>\n <span class=\"s-booking-field-book-now-content\">\n <span innerHTML={BookingTime}></span>\n {this.reservations.length ? this.editLabel : this.bookNowLabel}\n </span>\n </salla-button>\n </div>\n {this.reservations.length > 0 && (\n <div class=\"s-booking-field-reservations\">\n {this.reservations.map((reservation, index) => (\n <div key={index} class=\"s-booking-field-reservations-item\">\n {this.renderReservationDate(reservation)}\n {this.renderReservationTime(reservation)}\n </div>\n ))}\n </div>\n )}\n <input \n class=\"s-hidden\" \n name={this.option.name} \n required={this.option.required} \n value={JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations)}\n ref={reservations => this.reservationsInput = reservations} \n />\n {this.iframeReady && this.bookingModal()}\n </Host>\n );\n }\n}\n","import { Component, Element, Host, Listen, h } from '@stencil/core';\n\n/**\n * its to easy to use, currenlty its support select & checkbox input as trigger for show/hide the dom\n * the dom you can put it like this data-show-when=\"{name of the field} {= or !=} {value of the field}\"\n */\n@Component({\n tag: 'salla-conditional-fields'\n})\nexport class SallaConditionalFields {\n\n @Element() host: HTMLElement;\n\n private hideAllOptions(optionId) {\n this.host.querySelectorAll(`[data-show-when^=\"options[${optionId}\"]`).forEach((field: HTMLElement) => {\n field.classList.add('hidden');\n this.hideAllOptions(field.dataset.optionId);\n this.disableInputs(field);\n });\n }\n\n private disableInputs(field) {\n field.querySelectorAll('[name]').forEach((input) => {\n\n input.setAttribute('disabled', '');\n input.removeAttribute('required');\n if (input?.tagName?.toLowerCase() === 'select') {\n input.value = ''\n }\n if (['checkbox'].includes(input.getAttribute('type')) && input.hasOwnProperty('checked')) {\n // @ts-ignore\n input.checked = false;\n }\n });\n }\n \n @Listen('change')\n changeHandler(event) {\n salla.event.emit('salla-onditional-fields::change', event);\n salla.log('Received the change event: ', event);\n\n if (!event.target || !['SELECT'].includes(event.target.tagName) && !['checkbox', 'radio'].includes(event.target.getAttribute('type'))) {\n salla.log('Ignore the change because is not a supported input: ' + (event?.target?.tagName || 'N/A'));\n return;\n }\n\n let optionId = event.target.name.replace('[]', '');\n let isMultiple = event.target.getAttribute('type') === 'checkbox';\n let isRadio = event.target.getAttribute('type') === 'radio';\n\n salla.log('Trying to find all elements with condition:', `[data-show-when^=\"${optionId}\"]`);\n\n this.host.querySelectorAll(`[data-show-when^=\"${optionId}\"]`)\n .forEach((field: HTMLElement) => {\n let isEqual = !field?.dataset.showWhen.includes('!=');\n let value = field?.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$3').trim();\n let isSelected;\n if (isMultiple) {\n let selectedValues = Array.from(this.host.querySelectorAll(`input[name=\"${event.target.name}\"]:checked`), e => (e as HTMLInputElement)?.value);\n isSelected = selectedValues.includes(value.toString());\n } else if (isRadio) {\n // Handle radio inputs.\n isSelected = event.target.checked && event.target.value === value;\n } else {\n isSelected = value === event.target.value;\n }\n\n salla.log('The input is ', isMultiple ? 'Multiple' : isRadio ? 'Radio' : 'Single', ' value:', isSelected);\n\n let showTheInput = (isEqual && isSelected) || (!isEqual && !isSelected);\n if (showTheInput) {\n field.classList.remove('hidden');\n field.querySelectorAll('[name]').forEach((input) => {\n input.removeAttribute('disabled');\n\n const closestProductOption = (input as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n if (closestProductOption.dataset.optionRequired === 'true') {\n input.setAttribute('required', '');\n }\n\n if (input.getAttribute('type') === 'checkbox') {\n const checkboxes = Array.from(document.querySelectorAll(`input[type=\"checkbox\"][name=\"${input.getAttribute('name')}\"]`)) as HTMLInputElement[];\n const isAnyChecked = checkboxes.some((checkbox) => checkbox.checked);\n if (isAnyChecked) {\n checkboxes.forEach((checkbox) => {\n checkbox.removeAttribute('required');\n });\n }\n }\n });\n } else {\n this.hideAllOptions(field.dataset.optionId);\n field.classList.add('hidden');\n this.disableInputs(field);\n }\n });\n } \n\n componentDidRender() {\n this.host.querySelectorAll(`[data-show-when]`).forEach((field) => {\n // @ts-ignore\n let optionName = field?.dataset?.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$1').trim();\n if (!optionName) {\n return;\n }\n\n this.changeHandler({\n target: this.host.querySelector('[name^=\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