File manager - Edit - /home/premiey/www/wp-content/plugins/ameliabooking/public/js/chunks/amelia-booking-services-e5210b21b75aaacd2dfe.js
Back
wpJsonpAmeliaBookingPlugin([5],{1047:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(711),n=i.n(o),a=i(1048),s=i.n(a),r=i(1051),l=i.n(r),c=i(729),u=i.n(c),d=i(795),p=i.n(d),m=i(805),f=i(770),h=i(696),g=i(338),v=i(701),b=i(699),y=i(700),_=i(816),k=i.n(_),x=i(746),C=i(715),w=i(791),S=i.n(w),P=i(1054),$=i.n(P),T=i(736),E=i.n(T),O=i(1063),D=i.n(O),A=i(741),N=i.n(A),I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default={mixins:[m.a,h.a,g.a,v.a,b.a,C.a,y.a,f.a,x.a],data:function(){return{toaster:!1,showConfirmDelete:!1,loadDeleteResourcesBtn:!1,countDeletedResources:{success:0,error:0},countTotal:0,countFiltered:0,paginationParams:{page:1,show:this.$root.settings.general.servicesPerPage},typeTab:"services",package:null,packages:[],dialogPackage:!1,dialogPackageBooking:!1,resources:[],resource:null,allResourcesChecked:!1,activeCategory:{},categories:[],categoryToDeleteId:null,count:0,dialogService:!1,dialogResource:!1,searchResource:"",deleteConfirmation:!1,draggableOptions:{handle:".am-drag-handle",animation:150},editedCategoryId:0,editedCategoryName:"",editedCategoryOldName:"",fetched:!1,fetchedFiltered:!1,fetchedResources:!1,timer:null,form:new n.a,futureAppointments:{},loadingAddCategory:!1,loadingDeleteCategory:!1,options:{employees:[],settings:{payments:{wc:[]},general:{usedLanguages:[]}}},service:null,services:[],sortingServices:this.$root.settings.general.sortingServices,sortingPackages:this.$root.settings.general.sortingPackages,sortingSelection:[{sortName:this.$root.labels.services_sorting_name_asc,sortValue:"nameAsc"},{sortName:this.$root.labels.services_sorting_name_desc,sortValue:"nameDesc"},{sortName:this.$root.labels.services_sorting_price_asc,sortValue:"priceAsc"},{sortName:this.$root.labels.services_sorting_price_desc,sortValue:"priceDesc"},{sortName:this.$root.labels.services_sorting_custom,sortValue:"custom"}],svgLoaded:!1,dialogTranslate:!1,dialogTranslateExtra:!1,dialogTranslateCategory:!1,dialogTranslateType:"name",dialogTranslateTab:"service",dialogTranslateData:{},dialogTranslateName:"",extrasTranslateIndex:0,languagesData:[],newExtraTranslations:null,showPurchasedPackages:!1,purchasedPackage:null,showAllServices:!1,showAllEmployees:!1,showAllLocations:!1}},created:function(){n.a.defaults.axios=this.$http,this.getOptions(),this.getServices()},mounted:function(){},updated:function(){this.svgLoaded&&this.inlineSVG(),this.svgLoaded=!0},methods:{hasLocations:function(){return"locations"in this.options&&this.options.locations.length},showNewEntityDialog:function(){switch(this.typeTab){case"services":this.showDialogNewService();break;case"packages":this.showPurchasedPackages?this.showDialogNewPackageBooking():this.showDialogNewPackage();break;case"resources":this.showDialogNewResource()}},handleCheckAllResources:function(){var e=this;this.resources.forEach(function(t){t.checked=e.allResourcesChecked}),this.toaster=this.allResourcesChecked},handleCheckResource:function(){this.toaster=this.countCheckedResources()>0},countCheckedResources:function(){return this.resources.filter(function(e){return e.checked}).length},deleteCheckedResources:function(){var e=this;this.loadDeleteResourcesBtn=!0;var t=[];this.resources.forEach(function(e){e.checked&&t.push(e.id)}),this.resources.forEach(function(i){i.checked&&e.$http.post(e.$root.getAjaxUrl+"/resources/delete/"+i.id).then(function(){e.deleteResourcesCallback(t,!0)}).catch(function(){e.deleteResourcesCallback(t,!1)})})},deleteResourcesCallback:function(e,t){e.pop(),t?this.countDeletedResources.success++:this.countDeletedResources.error++,0===e.length&&(this.countDeletedResources.success&&this.notify(this.$root.labels.success,this.countDeletedResources.success+" "+(this.countDeletedResources.success>1?this.$root.labels.resources_deleted:this.$root.labels.resource_deleted),"success"),this.countDeletedResources.error&&this.notify(this.$root.labels.error,this.countDeletedResources.error+" "+(this.countDeletedResources.error>1?this.$root.labels.resources_not_deleted:this.$root.labels.resource_not_deleted),"error"),this.countDeletedResources.success=0,this.countDeletedResources.error=0,this.getResources(),this.resources.forEach(function(e){e.checked=!1}),this.allResourcesChecked=!1,this.toaster=!1,this.loadDeleteResourcesBtn=!1,this.showConfirmDelete=!1)},changeServiceSorting:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.fetchedFiltered=!1,this.updateServicesPositions(e,!0,!0)},changePackagesSorting:function(){},updateServicesPositions:function(e,t,i){var o=this,n=[];this.services.forEach(function(e){var t=e.settings?JSON.parse(JSON.stringify(e.settings)):null;t&&t.payments&&t.payments.wc.productId===o.$root.settings.payments.wc.productId&&delete t.payments.wc,n.push(Object.assign(JSON.parse(JSON.stringify(e)),{settings:t?JSON.stringify(t):null}))}),this.$http.post(this.$root.getAjaxUrl+"/services/positions",{services:n,sorting:this.sortingServices}).then(function(){e&&o.notify(o.$root.labels.success,o.$root.labels.services_positions_saved,"success"),t&&o.updateStashEntities({}),i&&o.getServices()}).catch(function(){o.notify(o.$root.labels.error,o.$root.labels.services_positions_saved_fail,"error")})},updatePackagesPositions:function(){},getServices:function(){var e=this;this.fetchedFiltered=!1,this.$http.get(this.$root.getAjaxUrl+"/services",{params:{page:this.paginationParams.page,categoryId:this.activeCategory?this.activeCategory.id:null}}).then(function(t){e.services=t.data.data.services,e.countTotal=t.data.data.countTotal,e.countFiltered=t.data.data.countFiltered,e.services.forEach(function(t){t.visible=!0,e.setEntitySettings(t,"service"),t.customPricing=e.getArrayCustomPricing(t.customPricing)}),e.dialogService=!1,e.fetchedFiltered=!0}).catch(function(t){console.log(t.message),e.dialogService=!1,e.fetchedFiltered=!0})},getOptions:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({types:["employees","categories","packages","locations","settings","resources"]})}).then(function(o){e.options.settings.general.usedLanguages=[],e.options.locations=[],e.resources=o.data.data.resources,e.options.entitiesRelations=o.data.data.entitiesRelations,e.packages=[],e.setInitialEmployee(o.data.data.employees),e.languagesData=o.data.data.settings.languages,e.categories=o.data.data.categories,e.categories.sort(function(e,t){return e.position>t.position?1:-1}),e.setupResources(),e.parseOptions(o),e.packages.forEach(function(t){e.setEntitySettings(t,"package")}),e.fetched=!0,e.fetchedResources=!0,t&&(e.options.settings.general.usedLanguages=t),!0===i&&e.changePackagesSorting(!1)}).catch(function(t){console.log(t.message),e.fetched=!0,e.fetchedResources=!0})},parseOptions:function(e){this.options.employees=e.data.data.employees.slice(0,1),this.categories=e.data.data.categories,this.categories.forEach(function(e){e.serviceList.forEach(function(e){e.extras=[]})})},addCategory:function(){var e=this;this.loadingAddCategory=!0;var t={status:"visible",name:this.$root.labels.new_category,position:this.categories.length+1};this.form.post(this.$root.getAjaxUrl+"/categories",t).then(function(t){e.categories.push(t.data.category),e.editedCategoryId=t.data.category.id,e.editedCategoryName=t.data.category.name,e.loadingAddCategory=!1;var i=e;window.setTimeout(function(){i.$refs.input[i.categories.indexOf(t.data.category)].focus()},0),e.updateStashEntities({})}).catch(function(t){e.notify(e.$root.labels.error,e.$root.labels.category_add_fail,"error"),e.loadingAddCategory=!1})},updateCategory:function(e){var t=this;this.form.post(this.$root.getAjaxUrl+"/categories/"+e.id,e).then(function(){t.notify(t.$root.labels.success,t.$root.labels.category_saved,"success"),t.updateStashEntities({})}).catch(function(){e.name=t.editedCategoryOldName,t.notify(t.$root.labels.error,t.$root.labels.category_saved_fail,"error")})},updateCategoriesPositions:function(e){var t=this;this.$http.post(this.$root.getAjaxUrl+"/categories/positions",{categories:this.categories}).then(function(){e&&t.notify(t.$root.labels.success,t.$root.labels.categories_positions_saved,"success"),t.updateStashEntities({})}).catch(function(){t.notify(t.$root.labels.error,t.$root.labels.categories_positions_saved_fail,"error")})},editCategoryName:function(e,t){if(this.hideDeleteCategoryDialog(),""===t.currentTarget.className){this.editedCategoryId=e.id,this.editedCategoryName=e.name;var i=this;window.setTimeout(function(){i.$refs.input[i.categories.indexOf(e)].focus()},0)}else{if(this.editedCategoryName=this.editedCategoryName.trim(),""===this.editedCategoryName)return;this.editedCategoryOldName=e.name,e.name!==this.editedCategoryName&&(e.name=this.editedCategoryName,this.updateCategory(e)),this.editedCategoryId=this.editedCategoryName=null}},dropCategory:function(e){if(e.newIndex!==e.oldIndex){var t=this;this.categories.forEach(function(e){e.position=t.categories.indexOf(e)+1}),this.updateCategoriesPositions(!0)}},dropService:function(e){e.newIndex!==e.oldIndex&&(this.sortingServices="custom",this.updateServicesPositions(!0,!0,!1))},dropPackage:function(){},duplicateCategory:function(e){var t=this,i=JSON.parse(JSON.stringify(e));delete i.id,i.position=this.categories.length+1,this.svgLoaded=!1,i.serviceList.forEach(function(e){delete e.id,e.extras.forEach(function(e){delete e.id}),"object"===I(e.settings)&&null!==e.settings?e.settings=JSON.stringify(e.settings):e.settings=null}),this.form.post(this.$root.getAjaxUrl+"/categories",i).then(function(e){t.categories.push(e.data.category),t.services=t.services.concat(e.data.category.serviceList),t.activeCategory=t.categories[t.categories.length-1],t.filterServices(t.activeCategory),t.notify(t.$root.labels.success,t.$root.labels.category_duplicated,"success"),t.updateStashEntities({})}).catch(function(e){t.notify(t.$root.labels.error,t.$root.labels.category_add_fail,"error")})},handleCategoryDeleteConfirmation:function(e){this.categoryToDeleteId=e.id,this.deleteConfirmation=!0,this.editedCategoryId=null,this.editedCategoryName=""},hideDeleteCategoryDialog:function(){this.categoryToDeleteId=null,this.deleteConfirmation=!1},getService:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/services/"+e).then(function(e){var i=e.data.data.service;null===i.timeBefore&&(i.timeBefore=""),null===i.timeAfter&&(i.timeAfter=""),t.setEntitySettings(i,"service"),t.futureAppointments={},t.futureAppointments[i.id]=e.data.data.futureAppointmentsProvidersIds,i.customPricing=t.getArrayCustomPricing(i.customPricing),i.extras.sort(function(e,t){return e.position>t.position?1:-1}),t.service=i}).catch(function(e){console.log(e.message)})},deleteCategory:function(e){var t=this;this.loadingDeleteCategory=!0,this.$http.post(this.$root.getAjaxUrl+"/categories/delete/"+this.categoryToDeleteId).then(function(){var i=t.categories.indexOf(e);t.categories.splice(i,1),t.services=t.services.filter(function(e){return e.categoryId!==t.categoryToDeleteId}),t.activeCategory.id===t.categoryToDeleteId&&(t.activeCategory={});for(var o=0;o<t.categories.length;o++)t.categories[o].position=o+1;t.updateCategoriesPositions(!1),t.loadingDeleteCategory=!1,t.notify(t.$root.labels.success,t.$root.labels.category_deleted,"success")}).catch(function(){t.loadingDeleteCategory=!1,t.notify(t.$root.labels.error,t.$root.labels.categories_delete_fail,"error")})},filterServices:function(e){this.activeCategory=e,this.paginationParams.page=1,this.getServices()},showDialogNewService:function(){this.service=this.getInitServiceObject(),this.dialogService=!0},showDialogNewPackage:function(){},showDialogNewPackageBooking:function(){this.dialogPackageBooking=!0},showDialogNewResource:function(){},showDialogEditResource:function(e){this.resource=e,this.dialogResource=!0},showDialogEditService:function(e){var t=this;this.service=null,setTimeout(function(){t.getService(e)},500),this.dialogService=!0},purchasedPackages:function(e){this.purchasedPackage=e,this.showPurchasedPackages=!0},showDialogEditPackage:function(){},duplicateServiceCallback:function(e){var t=this;this.service=e,this.service.id=0,this.service.duplicated=!0,setTimeout(function(){t.dialogService=!0},300)},duplicateResourceCallback:function(e){var t=this;this.resource=e,this.resource.id=0,this.resource.duplicated=!0,setTimeout(function(){t.dialogResource=!0},300)},duplicatePackageCallback:function(){},bgColor:function(e){return{"background-color":e}},saveServiceCallback:function(){this.$http.post(this.$root.getAjaxUrl+"/settings",{usedLanguages:this.options.settings.general.usedLanguages}).catch(function(e){console.log(e)}),"custom"!==this.sortingServices||this.service&&!this.service.position?this.updateServicesPositions(!1,!1,!0):this.getServices(),this.getOptions()},saveResourceCallback:function(){this.getResources()},getResources:function(){var e=this;this.fetchedResources=!1,this.$http.get(this.$root.getAjaxUrl+"/resources",{params:{search:this.searchResource}}).then(function(t){e.resources=t.data.data.resources,e.setupResources(),e.fetchedResources=!0}).catch(function(t){console.log(t.message),e.fetchedResources=!0})},setupResources:function(){var e=this,t=this.categories.map(function(e){return e.serviceList}).flat();this.resources.forEach(function(i){var o=i.entities?Object.values(i.entities):[];i.locations=o.filter(function(e){return"location"===e.entityType}),i.employees=o.filter(function(e){return"employee"===e.entityType}),i.employees.forEach(function(t){t.employee=e.options.employees.find(function(e){return e.id===t.entityId})}),i.locations.forEach(function(t){t.location=e.options.locations.find(function(e){return e.id===t.entityId})}),i.services=o.filter(function(e){return"service"===e.entityType}),i.services.forEach(function(e){e.service=t.find(function(t){return t.id===e.entityId})}),i.locations=i.locations.map(function(e){return e.location}),i.services=i.services.map(function(e){return e.service}),i.employees=i.employees.map(function(e){return e.employee})})},savePackageCallback:function(){},getInitPackageObject:function(){},getInitServiceObject:function(){return{id:0,categoryId:"",color:"#1788FB",description:"",duration:"",providers:[],extras:[],maxCapacity:1,minCapacity:1,name:"",pictureFullPath:"",pictureThumbPath:"",price:0,customPricing:{enabled:!1,durations:[]},status:"visible",timeAfter:"",timeBefore:"",bringingAnyone:!0,show:!0,applyGlobally:!1,gallery:[],aggregatedPrice:!0,settings:this.getInitEntitySettings("service"),recurringCycle:"disabled",recurringSub:"future",recurringPayment:0,position:0,deposit:0,depositPayment:"disabled",depositPerPerson:1,fullPayment:!1,translations:null,minSelectedExtras:null,mandatoryExtra:!1,maxExtraPeople:null,limitPerCustomer:{enabled:!1,numberOfApp:1,timeFrame:"day",period:1,from:"bookingDate"}}},getInitResourceObject:function(){return{id:0,name:"",quantity:1,services:[],locations:[],employees:[],status:"visible",shared:null}},showDialogTranslate:function(e,t,i){switch(this.dialogTranslateTab=t,this.dialogTranslateType=e,t){case"service":this.dialogTranslateData=this.service.translations,this.dialogTranslateName=this.service.name,this.dialogTranslate=!0;break;case"extra":this.extrasTranslateIndex=i,this.dialogTranslateData=this.service.extras[i]?this.service.extras[i].translations:this.newExtraTranslations,this.dialogTranslateName=this.service.extras[i]?this.service.extras[i].name:null,this.dialogTranslate=!0;break;case"category":this.dialogTranslateName=this.activeCategory.name,this.dialogTranslate=!0;break;case"package":this.dialogTranslateData=this.package.translations,this.dialogTranslateName=this.package.name,this.dialogTranslate=!0}},showDialogTranslateCategory:function(e){this.activeCategory=e,this.dialogTranslateType="name",this.dialogTranslateTab="category",this.dialogTranslateName=this.activeCategory.name,this.dialogTranslateData=this.activeCategory.translations,this.dialogTranslate=!0},saveDialogTranslate:function(e,t,i){switch(this.options.settings.general.usedLanguages=this.options.settings.general.usedLanguages.concat(t),this.dialogTranslate=!1,i){case"service":this.service.translations=e;break;case"extra":if(this.service.extras[this.extrasTranslateIndex])this.service.extras[this.extrasTranslateIndex].translations=e;else if(this.newExtraTranslations){var o=JSON.parse(this.newExtraTranslations);JSON.parse(e).name&&(o.name=JSON.parse(e).name),JSON.parse(e).description&&(o.description=JSON.parse(e).description),this.newExtraTranslations=JSON.stringify(o)}else this.newExtraTranslations=e;break;case"category":this.activeCategory.translations=e,this.updateCategory(this.activeCategory),this.$http.post(this.$root.getAjaxUrl+"/settings",{usedLanguages:this.options.settings.general.usedLanguages}).catch(function(e){console.log(e)});break;case"package":this.package.translations=e}},closeDialogTranslate:function(){this.dialogTranslate=!1},closePurchasedPackage:function(){this.showPurchasedPackages=!1},extraSaved:function(e,t){this.newExtraTranslations=null,this.service.extras[t]=e},filterResources:function(){this.fetchedResources=!1,this.getResources()}},watch:{searchResource:function(){void 0!==this.searchResource&&(this.fetchedResources=!0,clearTimeout(this.timer),this.timer=setTimeout(this.filterResources,300))}},components:{DialogResource:D.a,PageHeader:u.a,Draggable:p.a,PaginationBlock:S.a,DialogPackage:l.a,DialogService:s.a,DialogTranslate:k.a,Packages:$.a,DialogNewCustomize:E.a,AmSurvey:N.a}}},1048:function(e,t,i){var o=i(335)(i(1049),i(1050),!1,null,null,null);e.exports=o.exports},1049:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(696),n=i(338),a=i(701),s=i(699),r=i(697),l=i(770),c=i(715),u=i(812),d=i.n(u),p=i(711),m=i.n(p),f=i(795),h=i.n(f),g=i(769),v=(i.n(g),i(700)),b=i(721),y=i.n(b),_=i(943),k=i.n(_),x=i(816),C=i.n(x),w=i(772),S=i.n(w),P=i(975),$=i.n(P);t.default={mixins:[o.a,n.a,a.a,s.a,c.a,v.a,r.a,l.a],props:{categories:null,passedService:null,employees:null,settings:null,futureAppointments:null,newExtraTranslations:null},data:function(){var e=this,t=function(t,i,o){i<0?o(new Error(e.$root.labels.enter_non_negative_price_warning)):o()};return{durations:[],depositEnabled:!1,mandatoryExtraEnabled:!1,depositPayment:"fixed",depositOptions:[{value:"fixed",label:this.$root.labels.fixed_amount},{value:"percentage",label:this.$root.labels.percentage}],executeUpdate:!0,dialogLoading:!0,appointmentsEmployees:[],colorPopover:!1,draggableOptions:{animation:150,group:"people",handle:".am-drag-handle"},editedExtra:null,editedExtraOld:null,extraEditDialog:!1,extraToDelete:null,extraToDeleteLoading:!1,form:new m.a,rulesExtra:{name:[{required:!0,message:this.$root.labels.enter_extra_name_warning,trigger:"submit"}],price:[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.enter_extra_price_warning,trigger:"submit",type:"number"}]},rulesService:{name:[{required:!0,message:this.$root.labels.enter_name_warning,trigger:"submit"}],categoryId:[{required:!0,message:this.$root.labels.select_service_category_warning,trigger:"submit",type:"number"}],duration:[{required:!0,message:this.$root.labels.select_service_duration_warning,trigger:"submit",type:"number"}],price:[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.enter_service_price_warning,trigger:"submit",type:"number"}],deposit:[{validator:function(t,i,o){i<=0?o(new Error(e.$root.labels.enter_positive_price_warning)):o()},trigger:"submit"}],providers:[{required:!this.$root.isLite,message:this.$root.labels.select_service_employee_warning,trigger:"submit"}]},recurringCycles:[{label:this.$root.labels.disabled,value:"disabled"},{label:this.$root.labels.all,value:"all"},{label:this.$root.labels.recurring_type_daily,value:"daily"},{label:this.$root.labels.recurring_type_weekly,value:"weekly"},{label:this.$root.labels.recurring_type_monthly,value:"monthly"}],recurringSubs:[{label:this.$root.labels.disabled,value:"disabled"},{label:this.$root.labels.service_recurring_sub_future,value:"future"},{label:this.$root.labels.service_recurring_sub_past,value:"past"},{label:this.$root.labels.service_recurring_sub_both,value:"both"}],recurringPayments:[{label:this.$root.labels.service_recurring_payment_none,value:0},{label:this.$root.labels.service_recurring_payment_all,value:999}],limitPerCustomerTimeFrames:[{label:this.$root.labels.hour,value:"hour"},{label:this.$root.labels.day,value:"day"},{label:this.$root.labels.week,value:"week"},{label:this.$root.labels.month,value:"month"},{label:this.$root.labels.year,value:"year"}],limitPerCustomerFrom:[{label:this.$root.labels.limit_app_date_booked,value:"dateBooked"},{label:this.$root.labels.limit_app_booking_date,value:"bookingDate"}],service:null,serviceColors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB"],serviceTabs:"service_details",style:"",maxExtraPeopleEnabled:!1}},created:function(){m.a.defaults.axios=this.$http,this.instantiateDialog()},updated:function(){if(this.instantiateDialog(),this.service&&(!this.service.limitPerCustomer||!this.service.limitPerCustomer.period)){var e=document.getElementById("am-limit-service-period");e&&(e.getElementsByClassName("el-input__inner")[0].value="")}if(this.service&&(!this.service.limitPerCustomer||!this.service.limitPerCustomer.numberOfApp)){var t=document.getElementById("am-limit-service-number");t&&(t.getElementsByClassName("el-input__inner")[0].value="")}},methods:{changeMaxExtraPeople:function(){this.maxExtraPeopleEnabled&&null===this.service.maxExtraPeople&&(this.service.maxExtraPeople=this.service.minCapacity-1)},minSelectedExtrasChanged:function(){this.service.minSelectedExtras>this.service.extras.length&&(this.service.minSelectedExtras=this.service.extras.length)},depositAvailable:function(){return parseFloat(this.service.price)>0||!!this.service.customPricing.enabled&&this.service.customPricing.durations.filter(function(e){return e.price})},depositEnabledChanged:function(){this.depositEnabled?this.service.depositPayment=this.depositPayment:this.service.depositPayment="disabled"},getMaxPrice:function(){var e=this.service.price;return this.service.customPricing.enabled&&this.service.customPricing.durations.forEach(function(t){t.price>e&&(e=t.price)}),e},depositChanged:function(){var e=this.getMaxPrice();this.service.deposit>e&&"fixed"===this.depositPayment&&(this.service.deposit=e)},priceChanged:function(){var e=this.getMaxPrice();this.service.deposit>e&&"fixed"===this.depositPayment&&(this.service.deposit=e)},isDurationSelected:function(e){return this.service.customPricing.durations.map(function(e){return e.duration}).includes(e)},instantiateDialog:function(){if(null!==this.passedService&&!0===this.executeUpdate){this.service=JSON.parse(JSON.stringify(this.passedService)),this.maxExtraPeopleEnabled=null!==this.service.maxExtraPeople,this.service.description.startsWith("\x3c!-- Content --\x3e")&&(this.service.descriptionHtml=this.service.description),"disabled"===this.service.depositPayment?this.depositEnabled=!1:(this.depositEnabled=!0,this.depositPayment=this.service.depositPayment),!0!==this.service.duplicated&&this.$set(this.service,"providers",this.selectedVisibleEmployees),null===this.service.limitPerCustomer?this.service.limitPerCustomer={enabled:this.$root.settings.roles.limitPerCustomerService.enabled,numberOfApp:null,period:null,timeFrame:null,from:null}:0!==this.service.id&&(this.service.limitPerCustomer=JSON.parse(this.service.limitPerCustomer));for(var e=0;e<this.service.extras.length;e++)null===this.service.extras[e].duration&&(this.service.extras[e].duration="");this.service.id in this.futureAppointments&&(this.appointmentsEmployees=this.futureAppointments[this.service.id]),this.service.extras.sort(function(e,t){return e.position>t.position?1:-1}),this.dialogLoading=!1,this.executeUpdate=!1}},validationFailCallback:function(){},galleryUpdated:function(e){this.service.gallery=e},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(e){return this.service.maxExtraPeople=null,this.service.minCapacity=1,this.service.maxCapacity=1,this.service.timeAfter="",this.service.timeBefore="",this.service.providers=this.service.id?this.service.providers.map(function(e){return e.id}):this.employees.map(function(e){return e.id}),this.service.applyGlobally=e,this.service.settings.payments=null,this.service.settings.general=null,this.service.settings.zoom=null,this.service.depositPayment="disabled",Object.assign(JSON.parse(JSON.stringify(this.service)),{settings:null,customPricing:null,limitPerCustomer:null})},haveSaveConfirmation:function(){var e=this,t=!1;return this.service.customPricing.durations=this.service.customPricing.durations.filter(function(e){return e.duration}),this.service.customPricing.durations.forEach(function(i){e.passedService.customPricing.durations.forEach(function(e){i.duration===e.duration&&i.price!==e.price&&(t=!0)})}),this.service.id&&(this.passedService.price!==this.service.price||this.passedService.minCapacity!==this.service.minCapacity||this.passedService.maxCapacity!==this.service.maxCapacity||t)},bgColor:function(e){return{"background-color":e}},servicePictureSelected:function(e,t){this.service.pictureFullPath=e,this.service.pictureThumbPath=t},galleryPictureSelected:function(e,t){this.clearValidation(),this.service.gallery.push({id:0,pictureFullPath:e,pictureThumbPath:t,position:this.service.gallery.length+1})},deleteGalleryImage:function(e){this.service.gallery.splice(e,1);for(var t=0;t<this.service.gallery.length;t++)this.service.gallery[t].position=t+1},dropGalleryImage:function(e){if(e.newIndex!==e.oldIndex){var t=this;this.service.gallery.forEach(function(e){e.position=t.service.gallery.indexOf(e)+1})}},changeServiceColor:function(e){Array.from(e.target.parentNode.children).forEach(function(e){e.className.includes("color-active")&&e.classList.remove("color-active")}),e.target.className=e.target.className+" color-active",this.service.color=e.target.getAttribute("data-color")},checkCapacityLimits:function(){this.clearValidation(),this.service.minCapacity>this.service.maxCapacity&&(this.service.maxCapacity=this.service.minCapacity),this.maxExtraPeopleEnabled&&this.service.maxExtraPeople<this.service.minCapacity-1&&(this.service.maxExtraPeople=this.service.minCapacity-1)},showEditExtraDialog:function(){},cancelExtra:function(){},addExtra:function(){},saveExtra:function(){},showDeleteExtraDialog:function(){},handleExtraForm:function(){},hideDeleteExtraDialog:function(){},deleteExtra:function(){},dropExtra:function(){},clearValidation:function(){void 0!==this.$refs.service&&this.$refs.service.clearValidate()},changeEmployees:function(){var e=this.service.providers.map(function(e){return e.id}),t=this.appointmentsEmployees.filter(function(t){return!e.includes(t)});if(t.length){var i=this,o=[];t.forEach(function(e){o.push(i.visibleEmployees.filter(function(t){return t.id===e})[0]),i.notify(i.$root.labels.error,i.$root.labels.service_provider_remove_fail,"error")}),this.service.providers=this.service.providers.concat(o).sort(function(e,t){return(e.firstName+" "+e.lastName).localeCompare(t.firstName+" "+t.lastName)})}},showDialogTranslate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;switch(e){case"serviceName":this.$emit("showDialogTranslate","name","service");break;case"serviceDescription":this.$emit("showDialogTranslate","description","service");break;case"extraName":this.$emit("showDialogTranslate","name","extra",t);break;case"extraDescription":this.$emit("showDialogTranslate","description","extra",t)}},validationTabFailCallback:function(){this.serviceTabs="pricing"}},computed:{visibleCategories:function(){return this.categories.filter(function(e){return"visible"===e.status})},visibleEmployees:function(){var e=this;return this.employees.filter(function(t){return"visible"===t.status||"hidden"===t.status&&-1!==t.serviceList.map(function(e){return e.id}).indexOf(e.service.id)})},selectedVisibleEmployees:function(){var e=this;return this.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e.service.id)})}},watch:{"service.price":function(){this.clearValidation()},"passedService.translations":function(){this.service&&(this.service.translations=this.passedService.translations)}},components:{DialogTranslate:C.a,PictureUpload:d.a,Draggable:h.a,Money:g.Money,EntitySettings:k.a,ContentBlock:S.a,DialogActions:y.a,CustomDuration:$.a}}},1050:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{directives:[{name:"show",rawName:"v-show",value:null===e.passedService||e.dialogLoading,expression:"passedService === null || dialogLoading"}],staticClass:"am-dialog-loader"},[i("div",{staticClass:"am-dialog-loader-content"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),i("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),null===e.passedService||e.dialogLoading?e._e():i("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.service.id}},[i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:18}},[0!==e.service.id?i("h2",[e._v(e._s(e.$root.labels.edit_service))]):i("h2",[e._v(e._s(e.$root.labels.new_service))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:6}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),i("el-form",{ref:"service",attrs:{model:e.service,rules:e.rulesService,"label-position":"top"}},[i("el-tabs",{model:{value:e.serviceTabs,callback:function(t){e.serviceTabs=t},expression:"serviceTabs"}},[i("el-tab-pane",{attrs:{label:e.$root.labels.details,name:"service_details"}},[i("div",{staticClass:"am-service-profile"},[i("picture-upload",{attrs:{"edited-entity":this.service,"entity-name":"service"},on:{pictureSelected:e.servicePictureSelected}}),e._v(" "),i("el-popover",{ref:"color-popover",attrs:{placement:"bottom",width:"160",trigger:"click","popper-class":"am-color-popover"},model:{value:e.colorPopover,callback:function(t){e.colorPopover=t},expression:"colorPopover"}},[e._l(e.serviceColors,function(t){return i("span",{key:t,staticClass:"am-service-color",class:{"color-active":"#"+t===e.service.color},style:"background-color:#"+t,attrs:{"data-color":"#"+t},on:{click:e.changeServiceColor}})}),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.hex+":"}},[i("el-input",{attrs:{"auto-complete":"off"},model:{value:e.service.color,callback:function(t){e.$set(e.service,"color",t)},expression:"service.color"}})],1),e._v(" "),i("div",{staticClass:"align-right"},[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.colorPopover=!1}}},[e._v(e._s(e.$root.labels.ok))])],1)],2),e._v(" "),i("span",{directives:[{name:"popover",rawName:"v-popover:color-popover",arg:"color-popover"}],staticClass:"am-service-color",style:e.bgColor(e.service.color)}),e._v(" "),i("h2",[e._v(e._s(e.service.name))])],1),e._v(" "),i("el-form-item",{attrs:{prop:"name"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.name+":")+"\n "),i("div",{staticClass:"am-service-translate",on:{click:function(t){return e.showDialogTranslate("serviceName")}}},[i("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])]),e._v(" "),i("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.service,"name")}},model:{value:e.service.name,callback:function(t){e.$set(e.service,"name",t)},expression:"service.name"}})],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.category+":",prop:"categoryId"}},[i("el-select",{attrs:{placeholder:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.categoryId,callback:function(t){e.$set(e.service,"categoryId",t)},expression:"service.categoryId"}},e._l(e.visibleCategories,function(e){return i("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-popover",e._b({ref:"showOnFrontPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-row",{directives:[{name:"popover",rawName:"v-popover:showOnFrontPop",arg:"showOnFrontPop"}],attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{class:{"am-lite-disabled":e.$root.isLite},attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.service_show_on_site)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_show_on_site_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":"",disabled:e.$root.isLite},model:{value:e.service.show,callback:function(t){e.$set(e.service,"show",t)},expression:"service.show"}})],1)],1)],1),e._v(" "),i("el-row",[i("el-popover",e._b({ref:"recurringPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-form-item",{directives:[{name:"popover",rawName:"v-popover:recurringPop",arg:"recurringPop"}],attrs:{label:"placeholder",label:e.$root.labels.service_recurring_cycle+":"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_recurring_cycle)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_recurring_cycle_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{disabled:e.$root.isLite},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.recurringCycle,callback:function(t){e.$set(e.service,"recurringCycle",t)},expression:"service.recurringCycle"}},e._l(e.recurringCycles,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),"disabled"===e.service.recurringCycle||e.$root.isLite?e._e():i("el-row",[i("el-form-item",{attrs:{label:"placeholder",label:e.$root.labels.service_recurring_sub+":"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_recurring_sub)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_recurring_sub_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{on:{change:function(t){return e.clearValidation()}},model:{value:e.service.recurringSub,callback:function(t){e.$set(e.service,"recurringSub",t)},expression:"service.recurringSub"}},e._l(e.recurringSubs,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),"disabled"===e.service.recurringCycle||e.$root.isLite?e._e():i("el-row",[i("el-form-item",{attrs:{label:"placeholder",label:e.$root.labels.service_recurring_payment+":"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_recurring_payment)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_recurring_payment_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{on:{change:function(t){return e.clearValidation()}},model:{value:e.service.recurringPayment,callback:function(t){e.$set(e.service,"recurringPayment",t)},expression:"service.recurringPayment"}},e._l(e.recurringPayments,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),e.$root.isLite?e._e():i("el-form-item",{attrs:{label:e.$root.labels.employees+":",prop:"providers",id:"providersElement"}},[i("el-select",{attrs:{"value-key":"id",placeholder:"",multiple:"","collapse-tags":""},on:{change:e.changeEmployees},model:{value:e.service.providers,callback:function(t){e.$set(e.service,"providers",t)},expression:"service.providers"}},e._l(e.visibleEmployees,function(e){return i("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e}})}),1)],1),e._v(" "),i("content-block",{attrs:{label:e.$root.labels.description,entity:e.service,textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!0,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{showDialogTranslate:function(t){return e.showDialogTranslate("serviceDescription")}}}),e._v(" "),i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-popover",e._b({ref:"limitPerCustomerPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-row",{directives:[{name:"popover",rawName:"v-popover:limitPerCustomerPop",arg:"limitPerCustomerPop"}],attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{class:{"am-lite-disabled":e.$root.isLite},attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.limit_app_per_customer)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.limit_app_per_customer_tt)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{disabled:e.$root.isLite},model:{value:e.service.limitPerCustomer.enabled,callback:function(t){e.$set(e.service.limitPerCustomer,"enabled",t)},expression:"service.limitPerCustomer.enabled"}})],1)],1),e._v(" "),e.service.limitPerCustomer.enabled?i("el-row",{attrs:{gutter:24}},[i("el-col",[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.number_of_appointments)+":\n ")]),e._v(" "),i("el-input-number",{attrs:{min:0,id:"am-limit-service-number",placeholder:e.$root.settings.roles.limitPerCustomerService.numberOfApp.toString()},model:{value:e.service.limitPerCustomer.numberOfApp,callback:function(t){e.$set(e.service.limitPerCustomer,"numberOfApp",t)},expression:"service.limitPerCustomer.numberOfApp"}})],1)],1)],1):e._e(),e._v(" "),e.service.limitPerCustomer.enabled?i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.time_frame)+":\n ")]),e._v(" "),i("el-select",{attrs:{clearable:"",placeholder:e.limitPerCustomerTimeFrames.find(function(t){return t.value===e.$root.settings.roles.limitPerCustomerService.timeFrame}).label},model:{value:e.service.limitPerCustomer.timeFrame,callback:function(t){e.$set(e.service.limitPerCustomer,"timeFrame",t)},expression:"service.limitPerCustomer.timeFrame"}},e._l(e.limitPerCustomerTimeFrames,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.period)+":\n ")]),e._v(" "),i("el-input-number",{attrs:{min:0,id:"am-limit-service-period",placeholder:e.$root.settings.roles.limitPerCustomerService.period.toString()},model:{value:e.service.limitPerCustomer.period,callback:function(t){e.$set(e.service.limitPerCustomer,"period",t)},expression:"service.limitPerCustomer.period"}})],1)],1)],1):e._e(),e._v(" "),e.service.limitPerCustomer.enabled?i("el-row",{staticStyle:{"margin-top":"10px",display:"flex","align-items":"baseline"},attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[e._v("\n "+e._s(e.$root.labels.limit_app_per_customer_from)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.limit_app_per_customer_from_tt)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-select",{attrs:{placeholder:e.limitPerCustomerFrom.find(function(t){return t.value===e.$root.settings.roles.limitPerCustomerService.from}).label,clearable:""},model:{value:e.service.limitPerCustomer.from,callback:function(t){e.$set(e.service.limitPerCustomer,"from",t)},expression:"service.limitPerCustomer.from"}},e._l(e.limitPerCustomerFrom,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1):e._e()],1)],1),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.duration_and_pricing,name:"pricing"}},[i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.duration+":",prop:"duration"}},[i("el-select",{attrs:{placeholder:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.duration,callback:function(t){e.$set(e.service,"duration",t)},expression:"service.duration"}},e._l(e.getPossibleDurationsInSeconds(e.service.duration),function(t){return i("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),disabled:e.isDurationSelected(t),value:t}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.price+":",prop:"price"}},[i("div",{staticClass:"el-input"},[i("money",e._b({staticClass:"el-input__inner",on:{input:e.priceChanged},model:{value:e.service.price,callback:function(t){e.$set(e.service,"price",t)},expression:"service.price"}},"money",e.moneyComponentData,!1))],1)])],1)],1),e._v(" "),i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-popover",e._b({ref:"bufferTimeBeforePop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-form-item",{directives:[{name:"popover",rawName:"v-popover:bufferTimeBeforePop",arg:"bufferTimeBeforePop"}],attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_buffer_time_before)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_buffer_time_before_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{placeholder:"",clearable:"",disabled:e.$root.isLite},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.timeBefore,callback:function(t){e.$set(e.service,"timeBefore",t)},expression:"service.timeBefore"}},e._l(e.getPossibleDurationsInSeconds(e.service.timeBefore),function(t){return i("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-popover",e._b({ref:"bufferTimeAfterPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-form-item",{directives:[{name:"popover",rawName:"v-popover:bufferTimeAfterPop",arg:"bufferTimeAfterPop"}],attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.service_buffer_time_after)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.service_buffer_time_after_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{placeholder:"",clearable:"",disabled:e.$root.isLite},on:{change:function(t){return e.clearValidation()}},model:{value:e.service.timeAfter,callback:function(t){e.$set(e.service,"timeAfter",t)},expression:"service.timeAfter"}},e._l(e.getPossibleDurationsInSeconds(e.service.timeAfter),function(t){return i("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1)],1)],1),e._v(" "),i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-popover",e._b({ref:"minimumCapacityPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-form-item",{directives:[{name:"popover",rawName:"v-popover:minimumCapacityPop",arg:"minimumCapacityPop"}],attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_capacity)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_capacity_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input-number",{attrs:{min:1,disabled:e.$root.isLite},on:{input:function(t){return e.checkCapacityLimits()}},model:{value:e.service.minCapacity,callback:function(t){e.$set(e.service,"minCapacity",t)},expression:"service.minCapacity"}})],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-popover",e._b({ref:"maximumCapacityPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-form-item",{directives:[{name:"popover",rawName:"v-popover:maximumCapacityPop",arg:"maximumCapacityPop"}],attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.maximum_capacity)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.maximum_capacity_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input-number",{attrs:{min:e.service.minCapacity,disabled:e.$root.isLite},on:{input:function(t){return e.clearValidation()}},model:{value:e.service.maxCapacity,callback:function(t){e.$set(e.service,"maxCapacity",t)},expression:"service.maxCapacity"}})],1)],1)],1),e._v(" "),e.service.maxCapacity>1?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.limit_extra_people)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.limit_extra_people_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:e.changeMaxExtraPeople},model:{value:e.maxExtraPeopleEnabled,callback:function(t){e.maxExtraPeopleEnabled=t},expression:"maxExtraPeopleEnabled"}})],1)],1),e._v(" "),e.maxExtraPeopleEnabled?i("el-row",{staticStyle:{"margin-top":"10px"}},[i("el-col",[i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.limit_extra_people_set)+":\n ")]),e._v(" "),i("el-input-number",{attrs:{min:e.service.minCapacity-1,max:e.service.maxCapacity-1},on:{input:function(t){return e.clearValidation()}},model:{value:e.service.maxExtraPeople,callback:function(t){e.$set(e.service,"maxExtraPeople",t)},expression:"service.maxExtraPeople"}})],1)],1)],1):e._e()],1):e._e(),e._v(" "),e.service.maxCapacity>1&&!e.$root.isLite?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.bringing_anyone)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.bringing_anyone_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.service.bringingAnyone,callback:function(t){e.$set(e.service,"bringingAnyone",t)},expression:"service.bringingAnyone"}})],1)],1)],1):e._e(),e._v(" "),e.service.maxCapacity>1&&e.service.bringingAnyone&&!e.$root.isLite?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.aggregated_price)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.aggregated_price_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.service.aggregatedPrice,callback:function(t){e.$set(e.service,"aggregatedPrice",t)},expression:"service.aggregatedPrice"}})],1)],1)],1):e._e(),e._v(" "),e.service.duration?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-popover",e._b({ref:"customDurationPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-row",{directives:[{name:"popover",rawName:"v-popover:customDurationPop",arg:"customDurationPop"}],attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{class:{"am-lite-disabled":e.$root.isLite},attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.custom_duration_pricing_enabled)+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{directives:[{name:"popover",rawName:"v-popover:customDurationPop",arg:"customDurationPop"}],attrs:{"active-text":"","inactive-text":"",disabled:e.$root.isLite},model:{value:e.service.customPricing.enabled,callback:function(t){e.$set(e.service.customPricing,"enabled",t)},expression:"service.customPricing.enabled"}})],1)],1),e._v(" "),e.service.customPricing.enabled?i("custom-duration",{attrs:{service:e.service,enabledDelete:!0,enabledAdd:!0,enabledDuration:!0}}):e._e()],1):e._e(),e._v(" "),e.depositAvailable()?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-popover",e._b({ref:"depositPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-row",{directives:[{name:"popover",rawName:"v-popover:depositPop",arg:"depositPop"}],attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{class:{"am-lite-disabled":e.$root.isLite},attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.deposit_enabled)+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":"",disabled:e.$root.isLite},on:{change:e.depositEnabledChanged},model:{value:e.depositEnabled,callback:function(t){e.depositEnabled=t},expression:"depositEnabled"}})],1)],1),e._v(" "),e.depositEnabled?i("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.deposit_payment)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.deposit_payment_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{placeholder:""},on:{change:function(t){return e.depositChanged()}},model:{value:e.depositPayment,callback:function(t){e.depositPayment=t},expression:"depositPayment"}},e._l(e.depositOptions,function(e,t){return i("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.deposit_amount+("fixed"===e.depositPayment?" ("+e.getCurrencySymbol()+")":"")+("percentage"===e.depositPayment?" (%)":"")+":"}},["fixed"===e.depositPayment?i("div",{staticClass:"el-input"},[i("money",e._b({staticClass:"el-input__inner",on:{input:e.depositChanged},model:{value:e.service.deposit,callback:function(t){e.$set(e.service,"deposit",t)},expression:"service.deposit"}},"money",e.moneyComponentData,!1))],1):e._e(),e._v(" "),"percentage"===e.depositPayment?i("el-input-number",{attrs:{min:0,max:100},on:{input:function(t){return e.depositChanged()}},model:{value:e.service.deposit,callback:function(t){e.$set(e.service,"deposit",t)},expression:"service.deposit"}}):e._e()],1)],1)],1):e._e(),e._v(" "),e.depositEnabled&&e.service.aggregatedPrice&&e.service.maxCapacity>1&&"fixed"===e.depositPayment?i("el-row",{attrs:{gutter:24}},[i("el-col",[i("el-checkbox",{model:{value:e.service.depositPerPerson,callback:function(t){e.$set(e.service,"depositPerPerson",t)},expression:"service.depositPerPerson"}},[e._v("\n "+e._s(e.$root.labels.deposit_per_person)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.deposit_by_the_number_of_people)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):e._e(),e._v(" "),e.depositEnabled?i("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[i("el-col",[i("el-checkbox",{model:{value:e.service.fullPayment,callback:function(t){e.$set(e.service,"fullPayment",t)},expression:"service.fullPayment"}},[e._v("\n "+e._s(e.$root.labels.allow_total_amount)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.allow_customers_to_pay_total)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("hr")],1)],1):e._e(),e._v(" "),e.depositEnabled?i("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[i("el-col",{style:{display:"flex"},attrs:{span:24}},[i("i",{staticClass:"el-icon-warning-outline",style:{marginRight:"8px"}}),e._v(" "),i("label",[e._v("\n "+e._s(0===e.service.extras.length?e.$root.labels.deposit_info:"fixed"===e.depositPayment?e.$root.labels.deposit_info_fixed:e.$root.labels.deposit_info_percentage)+"\n ")])])],1):e._e()],1):e._e()],1),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.gallery,name:"gallery"}},[i("div",{staticClass:"am-gallery-images"},[i("el-row",{attrs:{gutter:24}},[i("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropGalleryImage},model:{value:e.service.gallery,callback:function(t){e.$set(e.service,"gallery",t)},expression:"service.gallery"}},e._l(e.service.gallery,function(t,o){return i("el-col",{key:o,attrs:{sm:12}},[i("div",{staticClass:"am-gallery-image-wrapper"},[i("div",{staticClass:"am-gallery-image",style:{"background-image":"url("+t.pictureFullPath+")"}},[i("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteGalleryImage(o)}}})]),e._v(" "),i("div",{staticClass:"am-gallery-image-title"},[i("span",{staticClass:"am-drag-handle"},[i("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),i("span",[e._v(e._s(t.pictureFullPath.substring(t.pictureFullPath.lastIndexOf("/")+1)))])])])])}),1),e._v(" "),i("el-col",{attrs:{sm:12}},[i("div",{staticClass:"am-gallery-image-add"},[i("div",[i("picture-upload",{attrs:{multiple:!0,"edited-entity":null,"entity-name":"gallery"},on:{pictureSelected:e.galleryPictureSelected}})],1)])])],1)],1)]),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.extras,name:"extras"}},[i("BlockLite"),e._v(" "),e.service.extras.length>0?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.mandatory_extra_enable)+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.service.mandatoryExtra,callback:function(t){e.$set(e.service,"mandatoryExtra",t)},expression:"service.mandatoryExtra"}})],1)],1),e._v(" "),e.service.mandatoryExtra?i("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[i("el-col",{attrs:{span:24}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.min_required_extras)+":\n ")]),e._v(" "),i("el-input-number",{attrs:{min:1,max:e.service.extras.length},on:{input:function(t){return e.minSelectedExtrasChanged()}},model:{value:e.service.minSelectedExtras,callback:function(t){e.$set(e.service,"minSelectedExtras",t)},expression:"service.minSelectedExtras"}})],1)],1)],1):e._e()],1):e._e(),e._v(" "),i("div",{staticClass:"am-extra-list"},[i("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{size:"large",type:"primary",disabled:e.$root.isLite},on:{click:e.addExtra}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_extra))])]),e._v(" "),i("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropExtra},model:{value:e.service.extras,callback:function(t){e.$set(e.service,"extras",t)},expression:"service.extras"}},[i("transition-group",{attrs:{name:"list-complete"}},e._l(e.service.extras,function(t,o){return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.extraToDeleteLoading&&o===e.service.extras.indexOf(e.extraToDelete),expression:"extraToDeleteLoading && index === service.extras.indexOf(extraToDelete)"}],key:o+1,staticClass:"am-extra-item",attrs:{id:"extra"+o}},[i("el-row",{attrs:{type:"flex",align:"top"}},[i("el-col",{attrs:{span:2}},[i("span",{staticClass:"am-drag-handle"},[i("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})])]),e._v(" "),i("el-col",{attrs:{span:22}},[i("el-row",{attrs:{type:"flex",align:"middle"}},[i("el-col",{attrs:{span:18}},[i("h3",[e._v(e._s(t.name))])]),e._v(" "),i("el-col",{directives:[{name:"show",rawName:"v-show",value:o!==e.service.extras.indexOf(e.editedExtra)||null!==e.editedExtraOld,expression:"index !== service.extras.indexOf(editedExtra) || editedExtraOld !== null"}],staticClass:"extra-item-actions align-right",attrs:{span:6}},[i("span",{on:{click:function(i){return e.showEditExtraDialog(t)}}},[i("img",{staticClass:"svg-amelia edit",attrs:{width:"16px",src:e.$root.getUrl+"public/img/edit.svg"}})]),e._v(" "),!0===e.$root.settings.capabilities.canDelete?i("span",{on:{click:function(i){return e.showDeleteExtraDialog(t)}}},[i("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e()])],1),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!(null!==e.editedExtra&&o===e.service.extras.indexOf(e.editedExtra)||null!==e.extraToDelete&&o===e.service.extras.indexOf(e.extraToDelete)),expression:"(editedExtra === null || index !== service.extras.indexOf(editedExtra)) && (extraToDelete === null || index !== service.extras.indexOf(extraToDelete))"}],staticClass:"am-extra-item-data"},[i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{sm:7}},[i("span",{staticClass:"data-title"},[e._v(e._s(e.$root.labels.duration)+":")]),e._v(" "),i("span",{staticClass:"data-value"},[e._v("\n "+e._s(t.duration?e.secondsToNiceDuration(t.duration):"/")+"\n ")])]),e._v(" "),i("el-col",{attrs:{sm:7}},[i("span",{staticClass:"data-title"},[e._v(e._s(e.$root.labels.price)+":")]),e._v(" "),i("span",{staticClass:"data-value"},[e._v(e._s(e.getFormattedPrice(t.price)))])]),e._v(" "),i("el-col",{attrs:{sm:10}},[i("span",{staticClass:"data-title"},[e._v(e._s(e.$root.labels.maximum_quantity)+":")]),e._v(" "),i("span",{staticClass:"data-value"},[e._v(e._s(t.maxQuantity))])])],1)],1)],1)],1),e._v(" "),i("el-collapse-transition",[i("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.extraToDelete&&o===e.service.extras.indexOf(e.extraToDelete),expression:"extraToDelete !== null && index === service.extras.indexOf(extraToDelete)"}],staticClass:"am-confirmation"},[i("p",[e._v(e._s(e.$root.labels.delete_extra_confirmation)+"?")]),e._v(" "),i("div",{staticClass:"align-right"},[i("el-button",{attrs:{size:"small"},on:{click:function(t){return e.hideDeleteExtraDialog()}}},[e._v(e._s(e.$root.labels.cancel))]),e._v(" "),i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(i){return e.deleteExtra(t)}}},[e._v(e._s(e.$root.labels.delete)+"\n ")])],1)])]),e._v(" "),i("el-collapse-transition",[i("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.extraEditDialog&&o===e.service.extras.indexOf(e.editedExtra),expression:"extraEditDialog === true && index === service.extras.indexOf(editedExtra)"}]},[i("el-form",{ref:"extra",refInFor:!0,attrs:{model:t,rules:e.rulesExtra,"label-position":"top"}},[i("el-form-item",{attrs:{prop:"name"}},[i("label",{staticClass:"am-service-name-label",attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.name+":")+"\n "),i("div",{staticClass:"am-service-translate",on:{click:function(t){return e.showDialogTranslate("extraName",o)}}},[i("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])]),e._v(" "),i("el-input",{attrs:{"auto-complete":"off"},model:{value:t.name,callback:function(i){e.$set(t,"name",i)},expression:"extra.name"}})],1),e._v(" "),i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{sm:8,xs:12}},[i("el-form-item",{attrs:{label:e.$root.labels.duration+":"}},[i("el-select",{attrs:{clearable:"",placeholder:""},model:{value:t.duration,callback:function(i){e.$set(t,"duration",i)},expression:"extra.duration"}},e._l(e.getPossibleDurationsInSeconds(t.duration),function(t){return i("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{sm:8,xs:12}},[i("el-form-item",{attrs:{label:e.$root.labels.price+":",prop:"price"}},[i("div",{staticClass:"el-input"},[i("money",e._b({staticClass:"el-input__inner",model:{value:t.price,callback:function(i){e.$set(t,"price",i)},expression:"extra.price"}},"money",e.moneyComponentData,!1))],1)])],1),e._v(" "),i("el-col",{attrs:{sm:8,xs:24}},[i("el-form-item",{attrs:{label:e.$root.labels.maximum_quantity+":"}},[i("el-input-number",{attrs:{min:1},model:{value:t.maxQuantity,callback:function(i){e.$set(t,"maxQuantity",i)},expression:"extra.maxQuantity"}})],1)],1)],1),e._v(" "),e.service.maxCapacity>1&&null!==t.aggregatedPrice&&e.service.bringingAnyone?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.aggregated_price)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.aggregated_price_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.aggregatedPrice,callback:function(i){e.$set(t,"aggregatedPrice",i)},expression:"extra.aggregatedPrice"}})],1)],1)],1):e._e(),e._v(" "),i("content-block",{attrs:{label:e.$root.labels.description,entity:e.service.extras[o],textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!0,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{showDialogTranslate:function(t){return e.showDialogTranslate("extraDescription",o)}}}),e._v(" "),i("div",{staticClass:"align-right"},[i("el-button",{attrs:{size:"small"},on:{click:function(i){return e.cancelExtra(t)}}},[e._v(e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(i){return e.saveExtra(t)}}},[e._v(e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)])],1)}),0)],1)],1)],1),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.settings,name:"settings"}},[i("BlockLite"),e._v(" "),i("entity-settings",{attrs:{settings:e.settings,paymentsSettings:e.service.settings.payments,generalSettings:e.service.settings.general,zoomSettings:e.service.settings.zoom,lessonSpaceSettings:e.service.settings.lessonSpace,providers:e.service.providers}})],1)],1)],1)],1),e._v(" "),e.dialogLoading?e._e():i("dialog-actions",{attrs:{formName:"service",urlName:"services",isNew:0===e.service.id,entity:e.service,getParsedEntity:e.getParsedEntity,haveSaveConfirmation:e.haveSaveConfirmation,hasIcons:!0,updateStash:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{save:{yes:e.$root.labels.update_for_all,no:e.$root.labels.no},status:{yes:"visible"===e.service.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.visibility_show}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!0,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!0},message:{success:{save:e.$root.labels.service_saved,remove:e.$root.labels.service_deleted,show:e.$root.labels.service_visible,hide:e.$root.labels.service_hidden},confirm:{save:e.$root.labels.confirm_global_change_service,remove:e.$root.labels.confirm_delete_service,show:e.$root.labels.confirm_show_service,hide:e.$root.labels.confirm_hide_service,duplicate:e.$root.labels.confirm_duplicate_service}}},on:{validationTabFailCallback:e.validationTabFailCallback,validationFailCallback:e.validationFailCallback}})],1)},staticRenderFns:[]}},1051:function(e,t,i){var o=i(335)(i(1052),i(1053),!1,null,null,null);e.exports=o.exports},1052:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(696),n=i(338),a=i(701),s=i(699),r=i(697),l=i(770),c=i(702),u=i(812),d=i.n(u),p=i(711),m=i.n(p),f=i(795),h=i.n(f),g=i(769),v=(i.n(g),i(0)),b=i.n(v),y=i(700),_=i(721),k=i.n(_),x=i(943),C=i.n(x),w=i(772),S=i.n(w);t.default={mixins:[o.a,n.a,a.a,s.a,y.a,r.a,l.a,c.a],props:{categories:null,passedPackage:null,options:null,settings:null,futureAppointments:null},data:function(){var e=this;return{depositEnabled:!1,depositPayment:"fixed",depositOptions:[{value:"fixed",label:this.$root.labels.fixed_amount},{value:"percentage",label:this.$root.labels.percentage}],durationOptions:[{label:this.$root.labels.unlimited,value:"unlimited"},{label:this.$root.labels.days,value:"day"},{label:this.$root.labels.weeks,value:"week"},{label:this.$root.labels.months,value:"month"},{label:this.$root.labels.date_specific,value:"date"}],limitPerCustomerTimeFrames:[{label:this.$root.labels.hour,value:"hour"},{label:this.$root.labels.day,value:"day"},{label:this.$root.labels.week,value:"week"},{label:this.$root.labels.month,value:"month"},{label:this.$root.labels.year,value:"year"}],customPrice:0,colorPopover:!1,draggableOptions:{animation:150,group:"people",handle:".am-drag-handle"},form:new m.a,rulesPackage:{name:[{required:!0,message:this.$root.labels.enter_name_warning,trigger:"submit"}],price:[{validator:function(t,i,o){i<0?o(new Error(e.$root.labels.enter_non_negative_price_warning)):o()},trigger:"submit"},{required:!0,message:this.$root.labels.enter_service_price_warning,trigger:"submit",type:"number"}],deposit:[{validator:function(t,i,o){i<=0?o(new Error(e.$root.labels.enter_positive_price_warning)):o()},trigger:"submit"}],bookable:[{required:!0,message:this.$root.labels.select_package_service_warning,trigger:"submit"}]},package:{},packageColors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB"],packageTabs:"details",style:""}},mounted:function(){this.package.calculatedPrice||(this.customPrice=this.package.price),null!==this.package.endDate?(this.package.durationType="date",this.package.endDate=b()(this.package.endDate).toDate()):null===this.package.durationType&&(this.package.durationType="unlimited"),"disabled"===this.package.depositPayment?this.depositEnabled=!1:(this.depositEnabled=!0,this.depositPayment=this.package.depositPayment),this.calculatePrice()},created:function(){var e=this;m.a.defaults.axios=this.$http,this.package=JSON.parse(JSON.stringify(this.passedPackage)),this.package.description.startsWith("\x3c!-- Content --\x3e")&&(this.package.descriptionHtml=this.package.description),this.package.bookable.forEach(function(t){var i={providerArray:[],locationArray:[]},o=e.getProvidersForService(t,!0),n=e.getLocationsForService(t,!0);t.providers.forEach(function(e){i.providerArray.push(o.filter(function(t){return t.id===e.id})[0])}),t.locations.forEach(function(e){i.locationArray.push(n.filter(function(t){return t.id===e.id})[0])}),t.providers=i.providerArray,t.locations=i.locationArray}),null===this.package.limitPerCustomer?this.package.limitPerCustomer={enabled:this.$root.settings.roles.limitPerCustomerPackage.enabled,numberOfApp:null,period:null,timeFrame:null}:0!==this.package.id&&(this.package.limitPerCustomer=JSON.parse(this.package.limitPerCustomer))},updated:function(){if(this.package&&(!this.package.limitPerCustomer||!this.package.limitPerCustomer.period)){var e=document.getElementById("am-limit-package-period");e&&(e.getElementsByClassName("el-input__inner")[0].value="")}if(this.package&&(!this.package.limitPerCustomer||!this.package.limitPerCustomer.numberOfApp)){var t=document.getElementById("am-limit-package-number");t&&(t.getElementsByClassName("el-input__inner")[0].value="")}},methods:{depositEnabledChanged:function(){this.depositEnabled?this.package.depositPayment=this.depositPayment:this.package.depositPayment="disabled"},depositChanged:function(){var e=this,t=0;this.package.calculatedPrice?this.package.bookable.forEach(function(e){t+=e.service.price*e.quantity}):(t=this.package.price,t-=t/100*this.package.discount),this.package.deposit>=t&&"fixed"===this.depositPayment&&setTimeout(function(){e.package.deposit=t},200)},getLocationsForService:function(e){var t=this.getServiceLocations(e.service.id,!0),i=t.map(function(e){return e.id});return e.locations.forEach(function(e){-1===i.indexOf(e.id)&&t.push(e)}),t},getProvidersForService:function(e){var t=this.getServiceProviders(e.service.id,!0),i=t.map(function(e){return e.id});return e.providers.forEach(function(e){-1===i.indexOf(e.id)&&t.push(e)}),t},removeBookable:function(e){this.package.bookable.splice(e,1)},getPackageServicePrice:function(e,t){var i=null,o=null;return this.options.entities.employees.forEach(function(t){t.serviceList.forEach(function(t){e.id===t.id&&((null===i||t.price<i)&&(i=t.price),(null===o||t.price>o)&&(o=t.price))})}),o!==i?this.getFormattedPrice(e.price*t):this.getFormattedPrice(i*t)},changedServices:function(){this.calculatePrice()},getOtherBookableMinCapacity:function(e){var t=0;return this.package.bookable.forEach(function(i){i.service.id!==e.service.id&&(t+=i.minimumScheduled)}),t},changedSharedCapacity:function(){this.package.sharedCapacity&&(this.package.calculatedPrice=!1)},changePackageQuantity:function(){var e=this;this.package.bookable.forEach(function(t){e.package.quantity<t.minimumScheduled&&(t.minimumScheduled=e.package.quantity),e.package.quantity<t.maximumScheduled&&(t.maximumScheduled=e.package.quantity),e.depositChanged()})},changeBookableQuantity:function(e){e.quantity<e.minimumScheduled&&(e.minimumScheduled=e.quantity),e.quantity<e.maximumScheduled&&(e.maximumScheduled=e.quantity),this.calculatePrice()},changeMinimum:function(e){e.minimumScheduled>=e.maximumScheduled&&(e.maximumScheduled=e.minimumScheduled)},calculatePrice:function(){if(this.package.calculatedPrice){var e=0;this.package.bookable.forEach(function(t){e+=t.service.price*t.quantity}),this.package.price=e}else 0!==this.package.id&&(this.package.price=this.customPrice);this.depositChanged()},validationFailCallback:function(){this.package.name?0===this.package.bookable.length&&(this.packageTabs="services",this.scrollViewInModal("servicesElement")):this.packageTabs="details"},galleryUpdated:function(e){this.package.gallery=e},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(e){switch(this.package.durationType){case"unlimited":this.package.endDate=null,this.package.durationCount=null;break;case"day":case"week":case"month":this.package.endDate=null}var t=this.prepareEntitySettingsForSave(this.package),i=this.package.endDate?b()(this.package.endDate).format("YYYY-MM-DD"):null,o=this.package.durationType,n=this.package.durationCount;"date"!==this.package.durationType&&"unlimited"!==this.package.durationType||(o=null,n=null),this.depositEnabled?this.package.depositPayment=this.depositPayment:this.package.depositPayment="disabled";var a=Object.assign(JSON.parse(JSON.stringify(this.package)),{endDate:i,durationType:o,durationCount:n,settings:t?JSON.stringify(t):null});return a.limitPerCustomer=JSON.stringify(this.package.limitPerCustomer),a.bookable.forEach(function(e){e.providers.forEach(function(e){e.serviceList=[],e.weekDayList=[],e.specialDayList=[],e.dayOffList=[]})}),a},bgColor:function(e){return{"background-color":e}},packagePictureSelected:function(e,t){this.package.pictureFullPath=e,this.package.pictureThumbPath=t},galleryPictureSelected:function(e,t){this.clearValidation(),this.package.gallery.push({id:0,pictureFullPath:e,pictureThumbPath:t,position:this.package.gallery.length+1})},deleteGalleryImage:function(e){this.package.gallery.splice(e,1);for(var t=0;t<this.package.gallery.length;t++)this.package.gallery[t].position=t+1},dropGalleryImage:function(e){if(e.newIndex!==e.oldIndex){var t=this;this.package.gallery.forEach(function(e){e.position=t.package.gallery.indexOf(e)+1})}},changePackageColor:function(e){Array.from(e.target.parentNode.children).forEach(function(e){e.className.includes("color-active")&&e.classList.remove("color-active")}),e.target.className=e.target.className+" color-active",this.package.color=e.target.getAttribute("data-color")},clearValidation:function(){void 0!==this.$refs.package&&this.$refs.package.clearValidate()},showDialogTranslate:function(e){this.$emit("showDialogTranslate",e,"package")}},computed:{},watch:{"passedPackage.translations":function(){this.package.translations=this.passedPackage.translations},"package.price":function(){this.depositChanged()},"package.deposit":function(){this.depositChanged()},"package.discount":function(){this.depositChanged()}},components:{PictureUpload:d.a,Draggable:h.a,Money:g.Money,EntitySettings:C.a,ContentBlock:S.a,DialogActions:k.a}}},1053:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.package.id}},[i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:18}},[0!==e.package.id?i("h2",[e._v(e._s(e.$root.labels.edit_package))]):i("h2",[e._v(e._s(e.$root.labels.new_package))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:6}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),i("el-form",{ref:"package",attrs:{model:e.package,rules:e.rulesPackage,"label-position":"top"}},[i("el-tabs",{model:{value:e.packageTabs,callback:function(t){e.packageTabs=t},expression:"packageTabs"}},[i("el-tab-pane",{attrs:{label:e.$root.labels.package_details,name:"details"}},[i("div",{staticClass:"am-service-profile"},[i("picture-upload",{attrs:{"edited-entity":e.package,"entity-name":"package"},on:{pictureSelected:e.packagePictureSelected}}),e._v(" "),i("el-popover",{ref:"color-popover",attrs:{placement:"bottom",width:"160",trigger:"click","popper-class":"am-color-popover"},model:{value:e.colorPopover,callback:function(t){e.colorPopover=t},expression:"colorPopover"}},[e._l(e.packageColors,function(t){return i("span",{key:t,staticClass:"am-service-color",class:{"color-active":"#"+t===e.package.color},style:"background-color:#"+t,attrs:{"data-color":"#"+t},on:{click:e.changePackageColor}})}),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.hex+":"}},[i("el-input",{attrs:{"auto-complete":"off"},model:{value:e.package.color,callback:function(t){e.$set(e.package,"color",t)},expression:"package.color"}})],1),e._v(" "),i("div",{staticClass:"align-right"},[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.colorPopover=!1}}},[e._v(e._s(e.$root.labels.ok))])],1)],2),e._v(" "),i("span",{directives:[{name:"popover",rawName:"v-popover:color-popover",arg:"color-popover"}],staticClass:"am-service-color",style:e.bgColor(e.package.color)}),e._v(" "),i("h2",[e._v(e._s(e.package.name))])],1),e._v(" "),i("el-form-item",{attrs:{prop:"name"}},[i("label",{staticClass:"am-service-name-label",attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.name+":")+"\n "),i("div",{staticClass:"am-service-translate",on:{click:function(t){return e.showDialogTranslate("name")}}},[i("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])]),e._v(" "),i("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()}},model:{value:e.package.name,callback:function(t){e.$set(e.package,"name",t)},expression:"package.name"}})],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.duration+":"}},[i("el-select",{attrs:{placeholder:""},model:{value:e.package.durationType,callback:function(t){e.$set(e.package,"durationType",t)},expression:"package.durationType"}},e._l(e.durationOptions,function(e,t){return i("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),"day"===e.package.durationType||"week"===e.package.durationType||"month"===e.package.durationType?i("el-form-item",{attrs:{label:e.$root.labels[e.package.durationType+"s"]+":"}},[i("el-input-number",{attrs:{min:1,"auto-complete":"off"},on:{input:function(t){return e.clearValidation()}},model:{value:e.package.durationCount,callback:function(t){e.$set(e.package,"durationCount",t)},expression:"package.durationCount"}})],1):e._e(),e._v(" "),"date"===e.package.durationType?i("el-form-item",{attrs:{label:e.$root.labels.date_specific+":"}},[i("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"input-class":"el-input__inner",formats:e.vCalendarFormats},on:{input:function(t){return e.clearValidation()}},model:{value:e.package.endDate,callback:function(t){e.$set(e.package,"endDate",t)},expression:"package.endDate"}})],1):e._e(),e._v(" "),i("content-block",{attrs:{label:e.$root.labels.description,entity:e.package,textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!0,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{showDialogTranslate:function(t){return e.showDialogTranslate("description")}}}),e._v(" "),i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.limit_package_per_customer)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.limit_package_per_customer_tt)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{model:{value:e.package.limitPerCustomer.enabled,callback:function(t){e.$set(e.package.limitPerCustomer,"enabled",t)},expression:"package.limitPerCustomer.enabled"}})],1)],1),e._v(" "),e.package.limitPerCustomer.enabled?i("el-row",{attrs:{gutter:24}},[i("el-col",[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.number_of_packages)+":\n ")]),e._v(" "),i("el-input-number",{attrs:{id:"am-limit-package-number",min:0,placeholder:e.$root.settings.roles.limitPerCustomerPackage.numberOfApp.toString()},model:{value:e.package.limitPerCustomer.numberOfApp,callback:function(t){e.$set(e.package.limitPerCustomer,"numberOfApp",t)},expression:"package.limitPerCustomer.numberOfApp"}})],1)],1)],1):e._e(),e._v(" "),e.package.limitPerCustomer.enabled?i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.time_frame)+":\n ")]),e._v(" "),i("el-select",{attrs:{placeholder:e.limitPerCustomerTimeFrames.find(function(t){return t.value===e.$root.settings.roles.limitPerCustomerPackage.timeFrame}).label,clearable:""},model:{value:e.package.limitPerCustomer.timeFrame,callback:function(t){e.$set(e.package.limitPerCustomer,"timeFrame",t)},expression:"package.limitPerCustomer.timeFrame"}},e._l(e.limitPerCustomerTimeFrames,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.period)+":\n ")]),e._v(" "),i("el-input-number",{attrs:{id:"am-limit-package-period",min:0,placeholder:e.$root.settings.roles.limitPerCustomerPackage.period.toString()},model:{value:e.package.limitPerCustomer.period,callback:function(t){e.$set(e.package.limitPerCustomer,"period",t)},expression:"package.limitPerCustomer.period"}})],1)],1)],1):e._e()],1)],1),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.services,name:"services"}},[i("el-form-item",{attrs:{prop:"bookable"}},[i("el-select",{attrs:{"value-key":"service.id",multiple:"",filterable:"",placeholder:e.$root.labels.services,"collapse-tags":""},on:{input:function(t){return e.clearValidation()},change:e.changedServices},model:{value:e.package.bookable,callback:function(t){e.$set(e.package,"bookable",t)},expression:"package.bookable"}},e._l(e.categories,function(t){return i("div",{key:t.id},[i("div",{staticClass:"am-drop-parent"},[i("span",[e._v(e._s(t.name))])]),e._v(" "),e._l(t.serviceList,function(e){return i("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:{service:e,providers:[],locations:[],quantity:1,minimumScheduled:0,maximumScheduled:1,allowProviderSelection:!0}}})})],2)}),0)],1),e._v(" "),e.package.bookable.length>1?i("div",{staticClass:"am-package-service"},[i("div",{staticClass:"am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:20}},[e._v("\n "+e._s(e.$root.labels.shared_capacity)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.shared_capacity_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:4}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:e.changedSharedCapacity},model:{value:e.package.sharedCapacity,callback:function(t){e.$set(e.package,"sharedCapacity",t)},expression:"package.sharedCapacity"}})],1)],1),e._v(" "),e.package.sharedCapacity?i("el-row",{staticStyle:{"margin-top":"20px"},attrs:{type:"flex",gutter:8}},[i("el-col",{staticClass:"am-package-service__booking-range",attrs:{sm:24}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.schedule_package_total)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.schedule_package_sum_total_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input-number",{attrs:{min:1},on:{change:function(t){return e.changePackageQuantity()}},model:{value:e.package.quantity,callback:function(t){e.$set(e.package,"quantity",t)},expression:"package.quantity"}})],1)],1)],1):e._e()],1)]):e._e(),e._v(" "),e._l(e.package.bookable,function(t,o){return i("div",{key:t.service.id,staticClass:"am-package-service"},[i("el-row",[i("el-col",{attrs:{span:24}},[i("div",{staticClass:"am-package-service-heading"},[i("div",{staticClass:"am-package-service-heading-inner"},[i("div",{staticClass:"am-package-service-photo"},[i("img",{attrs:{src:e.pictureLoad(t.service,!1)},on:{error:function(i){return e.imageLoadError(t.service,!1)}}}),e._v(" "),i("span",{style:e.bgColor(t.service.color)})]),e._v(" "),i("div",{staticClass:"am-package-service-text"},[i("p",{staticClass:"am-strong"},[e._v(e._s(t.service.name))]),e._v(" "),i("p",[e._v(e._s(e.$root.labels.price)+": "+e._s(e.getPackageServicePrice(t.service,t.quantity)))])])]),e._v(" "),i("el-button",{staticClass:"am-button-icon",attrs:{type:"remove"},on:{click:function(t){return e.removeBookable(o)}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})])],1)])],1),e._v(" "),i("el-row",{attrs:{type:"flex",gutter:8}},[e.package.sharedCapacity?e._e():i("el-col",{staticClass:"am-package-service__booking-range",attrs:{sm:24}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.schedule_package_total)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.schedule_package_total_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input-number",{attrs:{min:1},on:{change:function(i){return e.changeBookableQuantity(t)}},model:{value:t.quantity,callback:function(i){e.$set(t,"quantity",i)},expression:"bookable.quantity"}})],1)],1),e._v(" "),i("el-col",{staticClass:"am-package-service__booking-range am-package-service__booking-range-custom",attrs:{sm:24}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.schedule_package_minimum)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.schedule_package_minimum_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input-number",{attrs:{min:0,max:e.package.sharedCapacity?e.package.quantity-e.getOtherBookableMinCapacity(t):t.quantity},on:{change:function(i){return e.changeMinimum(t)}},model:{value:t.minimumScheduled,callback:function(i){e.$set(t,"minimumScheduled",i)},expression:"bookable.minimumScheduled"}})],1),e._v(" "),i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.schedule_package_maximum)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.schedule_package_maximum_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input-number",{attrs:{min:t.minimumScheduled,max:e.package.sharedCapacity?e.package.quantity:t.quantity},model:{value:t.maximumScheduled,callback:function(i){e.$set(t,"maximumScheduled",i)},expression:"bookable.maximumScheduled"}})],1)],1)],1),e._v(" "),0===t.providers.length&&e.getProvidersForService(t).length>1||t.providers.length>1?i("el-row",{staticStyle:{padding:"12px"},attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:20}},[e._v("\n "+e._s(e.$root.labels.package_choose_employees)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.package_choose_employees_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:4}},[i("el-switch",{model:{value:t.allowProviderSelection,callback:function(i){e.$set(t,"allowProviderSelection",i)},expression:"bookable.allowProviderSelection"}})],1)],1):e._e(),e._v(" "),e.getProvidersForService(t).length>1?i("el-row",[i("el-col",{attrs:{xs:24}},[i("el-collapse",[i("el-collapse-item",{attrs:{name:t.service.id}},[i("template",{slot:"title"},[e._v("\n "+e._s(e.$root.labels.employees+" ("+t.providers.length+")")+"\n ")]),e._v(" "),i("el-form-item",[i("el-checkbox-group",{model:{value:t.providers,callback:function(i){e.$set(t,"providers",i)},expression:"bookable.providers"}},e._l(e.getProvidersForService(t),function(t){return i("el-checkbox",{key:t.id,staticClass:"am-package-service__checkbox",attrs:{label:t}},[i("div",{staticClass:"am-package-service__checkbox-text"},[i("div",{staticClass:"am-package-service-photo"},[i("img",{attrs:{src:e.pictureLoad(t,!0)},on:{error:function(i){return e.imageLoadError(t,!0)}}})]),e._v(" "),i("span",[e._v("\n "+e._s(t.firstName+" "+t.lastName)+"\n ")])])])}),1)],1)],2)],1)],1)],1):e._e(),e._v(" "),e.getLocationsForService(t).length>1?i("el-row",[i("el-col",{attrs:{xs:24}},[i("el-collapse",[i("el-collapse-item",{attrs:{name:t.service.id}},[i("template",{slot:"title"},[e._v("\n "+e._s(e.$root.labels.locations+" ("+t.locations.length+")")+"\n ")]),e._v(" "),i("el-form-item",[i("el-checkbox-group",{model:{value:t.locations,callback:function(i){e.$set(t,"locations",i)},expression:"bookable.locations"}},e._l(e.getLocationsForService(t),function(t){return i("el-checkbox",{key:t.id,staticClass:"am-package-service__checkbox",attrs:{label:t}},[i("div",{staticClass:"am-package-service__checkbox-text"},[i("div",{staticClass:"am-package-service-photo"},[i("img",{attrs:{src:e.pictureLoad(t,!1)},on:{error:function(i){return e.imageLoadError(t,!1)}}})]),e._v(" "),i("span",[e._v("\n "+e._s(t.name)+"\n ")])])])}),1)],1)],2)],1)],1)],1):e._e()],1)})],2),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.price,name:"price"}},[e.package.sharedCapacity?e._e():i("el-form-item",[i("el-select",{on:{change:e.calculatePrice},model:{value:e.package.calculatedPrice,callback:function(t){e.$set(e.package,"calculatedPrice",t)},expression:"package.calculatedPrice"}},[i("el-option",{key:"0",attrs:{label:e.$root.labels.package_price_custom,value:!1}}),e._v(" "),i("el-option",{key:"1",attrs:{label:e.$root.labels.package_price_calculated,value:!0}})],1)],1),e._v(" "),e.package.calculatedPrice&&e.package.bookable.length?i("el-row",{staticClass:"am-package-price"},[i("el-col",{attrs:{span:12}},e._l(e.package.bookable,function(t){return i("p",{key:t.service.id},[e._v("\n "+e._s(t.service.name)+"\n ")])}),0),e._v(" "),i("el-col",{attrs:{span:12}},e._l(e.package.bookable,function(t){return i("p",{key:t.service.id,staticClass:"am-semi-strong am-align-right"},[e._v("\n "+e._s(e.getFormattedPrice(t.service.price)+" x "+t.quantity)+"\n ")])}),0)],1):e._e(),e._v(" "),e.package.calculatedPrice&&e.package.bookable.length?i("el-row",{staticClass:"am-package-price-total"},[i("el-col",{attrs:{span:12}},[i("p",[e._v("\n "+e._s(e.$root.labels.package_price_calculated_text)+"\n ")])]),e._v(" "),i("el-col",{attrs:{span:12}},[i("p",{staticClass:"am-semi-strong am-align-right"},[e._v("\n "+e._s(e.getFormattedPrice(e.package.price))+"\n ")])])],1):e._e(),e._v(" "),!e.package.calculatedPrice&&e.package.bookable.length?i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.price+":"}},[i("div",{staticClass:"el-input"},[i("money",e._b({staticClass:"el-input__inner",model:{value:e.package.price,callback:function(t){e.$set(e.package,"price",t)},expression:"package.price"}},"money",e.moneyComponentData,!1))],1)])],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.discount+":"}},[i("el-input-number",{attrs:{min:0,max:100},on:{input:function(t){return e.clearValidation()}},model:{value:e.package.discount,callback:function(t){e.$set(e.package,"discount",t)},expression:"package.discount"}})],1)],1)],1):e._e(),e._v(" "),i("div",{staticClass:"am-package-price-calculated"},[!e.package.calculatedPrice&&e.package.bookable.length?i("p",[e._v("\n "+e._s(e.$root.labels.package_price_calculated_text)+": "+e._s(e.getFormattedPrice(e.package.calculatedPrice?e.package.price:e.package.price-e.package.price/100*e.package.discount))+"\n ")]):e._e()]),e._v(" "),i("el-popover",e._b({ref:"depositPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),parseFloat(e.package.price)>0?i("div",{directives:[{name:"popover",rawName:"v-popover:depositPop",arg:"depositPop"}],staticClass:"am-setting-box am-switch-box",class:{"am-lite-disabled":e.$root.isLite}},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.deposit_enabled)+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:5}},[i("el-switch",{attrs:{"active-text":"","inactive-text":"",disabled:e.$root.isLite},on:{change:e.depositEnabledChanged},model:{value:e.depositEnabled,callback:function(t){e.depositEnabled=t},expression:"depositEnabled"}})],1)],1),e._v(" "),e.depositEnabled?i("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-form-item",[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.deposit_payment)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.deposit_payment_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{placeholder:""},on:{change:function(t){return e.depositChanged()}},model:{value:e.depositPayment,callback:function(t){e.depositPayment=t},expression:"depositPayment"}},e._l(e.depositOptions,function(e,t){return i("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.deposit_amount+("fixed"===e.depositPayment?" ("+e.getCurrencySymbol()+")":"")+("percentage"===e.depositPayment?" (%)":"")+":",prop:"deposit"}},["fixed"===e.depositPayment?i("div",{staticClass:"el-input"},[i("money",e._b({staticClass:"el-input__inner",on:{input:e.depositChanged},model:{value:e.package.deposit,callback:function(t){e.$set(e.package,"deposit",t)},expression:"package.deposit"}},"money",e.moneyComponentData,!1))],1):e._e(),e._v(" "),"percentage"===e.depositPayment?i("el-input-number",{attrs:{min:0,max:100},on:{input:function(t){return e.depositChanged()}},model:{value:e.package.deposit,callback:function(t){e.$set(e.package,"deposit",t)},expression:"package.deposit"}}):e._e()],1)],1)],1):e._e(),e._v(" "),e.depositEnabled?i("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[i("el-col",[i("el-checkbox",{model:{value:e.package.fullPayment,callback:function(t){e.$set(e.package,"fullPayment",t)},expression:"package.fullPayment"}},[e._v(e._s(e.$root.labels.allow_total_amount))]),e._v(" "),i("hr")],1)],1):e._e(),e._v(" "),e.depositEnabled?i("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[i("el-col",{attrs:{span:24}},[i("i",{staticClass:"el-icon-warning-outline"}),e._v(" "),i("label",[e._v(e._s(e.$root.labels.deposit_info))])])],1):e._e()],1):e._e()],1),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.gallery,name:"gallery"}},[i("div",{staticClass:"am-gallery-images"},[i("el-row",{attrs:{gutter:24}},[i("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropGalleryImage},model:{value:e.package.gallery,callback:function(t){e.$set(e.package,"gallery",t)},expression:"package.gallery"}},e._l(e.package.gallery,function(t,o){return i("el-col",{key:o,attrs:{sm:12}},[i("div",{staticClass:"am-gallery-image-wrapper"},[i("div",{staticClass:"am-gallery-image",style:{"background-image":"url("+t.pictureFullPath+")"}},[i("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteGalleryImage(o)}}})]),e._v(" "),i("div",{staticClass:"am-gallery-image-title"},[i("span",{staticClass:"am-drag-handle"},[i("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),i("span",[e._v(e._s(t.pictureFullPath.substring(t.pictureFullPath.lastIndexOf("/")+1)))])])])])}),1),e._v(" "),i("el-col",{attrs:{sm:12}},[i("div",{staticClass:"am-gallery-image-add"},[i("div",[i("picture-upload",{attrs:{multiple:!0,"edited-entity":null,"entity-name":"gallery"},on:{pictureSelected:e.galleryPictureSelected}})],1)])])],1)],1)]),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.settings,name:"settings"}},[i("entity-settings",{attrs:{settings:e.settings,generalSettings:null,paymentsSettings:e.package.settings.payments}})],1)],1)],1)],1),e._v(" "),i("dialog-actions",{attrs:{formName:"package",urlName:"packages",isNew:0===e.package.id,entity:e.package,getParsedEntity:e.getParsedEntity,hasIcons:!0,updateStash:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{status:{yes:"visible"===e.package.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.visibility_show}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!0,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!0},message:{success:{save:e.$root.labels.package_saved,remove:e.$root.labels.package_deleted,show:e.$root.labels.package_visible,hide:e.$root.labels.package_hidden},confirm:{remove:e.$root.labels.confirm_delete_package,show:e.$root.labels.confirm_show_package,hide:e.$root.labels.confirm_hide_package,duplicate:e.$root.labels.confirm_duplicate_package}}},on:{validationFailCallback:e.validationFailCallback}})],1)},staticRenderFns:[]}},1054:function(e,t,i){var o=i(335)(i(1055),i(1062),!1,null,null,null);e.exports=o.exports},1055:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(1056),n=i.n(o),a=i(867),s=i(775),r=i(748),l=i(338),c=i(868),u=i.n(c),d=i(1059),p=i.n(d),m=i(806),f=i.n(m),h=i(809),g=i.n(h),v=i(820),b=i.n(v),y=i(701),k=i(702),x=i(711),C=i.n(x),w=i(697),S=i(696),P=i(0),$=i.n(P),T=i(700),E=i(729),O=i.n(E),D=i(725),A=i(699),N=i(707),I=i(791),L=i.n(I),F=i(792);t.default={mixins:[N.a,D.a,k.a,a.a,S.a,l.a,y.a,T.a,r.a,A.a,w.a,s.a,F.a],props:["purchasedPackage","dialogPackageBooking"],data:function(){return{customersLoading:!1,changedRange:!1,packageServices:[],showDeleteButton:!0,appointment:null,customer:null,deleteLoading:!1,dialogAppointment:!1,dialogPayment:!1,dialogExport:!1,fetched:!1,fetchedFiltered:!1,filterFields:!0,form:new C.a,params:{dates:this.getDatePickerInitRange(),providers:[],search:"",status:"",services:[],customerId:""},selectedPaymentModalData:{paymentId:null,bookingStart:null,bookings:null,service:null,providers:null,customer:null},showDeleteConfirmation:!1,timer:null,toaster:!1,updateBookingStatusId:0,updateBookingStatusLoading:!1,appointmentsDeleteCount:{success:0,error:0},packageCustomersDeleteCount:{success:0,error:0},packageCustomers:[],newUser:null}},created:function(){C.a.defaults.axios=this.$http;var e=this.getUrlQueryParams(window.location.href);this.params.dates="dateFrom"in e&&"dateTo"in e?{start:$()(e.dateFrom).toDate(),end:$()(e.dateTo).toDate()}:this.getDatePickerInitRange(),e.status&&(this.params.status=e.status),e.bookingId&&(this.params.bookingId=e.bookingId),this.getAppointmentOptions(!0,!0)},mounted:function(){this.$root.settings.payments.wc&&this.$root.settings.payments.wc.enabled&&this.exportParams.fields.push({label:this.$root.labels.wc_order_id,value:"wcOrderId",checked:!0})},updated:function(){this.fetched&&this.inlineSVG()},methods:{getPackageDiscountedPrice:function(e){var t,i=e.price,o=[];return this.options.entities.coupons.length&&e.couponId&&(o=this.options.entities.coupons.filter(function(t){return t.id===e.couponId})),t=o.length?i*o[0].discount/100-o[0].deduction:0,i-Math.abs(t)<0?0:i-t},saveCustomerCallback:function(e){this.options.entities.customers.push(e.user),this.newUser=e.user,this.customerCreatedCount++},getAvailableServicesForPurchase:function(e){var t=e.appointments[0].packageCustomerId,i=[];return e.data.forEach(function(e){e.bookings.filter(function(e){return e.count>0&&e.packageCustomerId===t}).length&&i.push(e.serviceId)}),this.purchasedPackage.bookable.map(function(e){return e.service}).filter(function(e){return-1!==i.indexOf(e.id)})},showDialogNewPackageAppointment:function(e){this.packageServices=this.getAvailableServicesForPurchase(e),this.showDialogNewAppointment({customerId:e.appointments[0].booking.packageCustomerService.packageCustomer.customerId,id:e.appointments[0].packageCustomerId})},showDialogEditPackageAppointment:function(e,t){this.packageServices=this.getAvailableServicesForPurchase(t),this.showDialogEditAppointment(e)},getPurchasedPackageProviders:function(e){return _.uniq(e.map(function(e){return e.provider?e.provider.id:0})).filter(function(e){return 0!==e})},goBack:function(){this.$emit("closePurchasedPackages")},switchShowDeleteConfirmation:function(e){this.showDeleteConfirmation=e,this.showDeleteButton=!e},confirmationText:function(){var e=this,t=this.checkedAppointmentsCount()<2?this.$root.labels.confirm_delete_appointment:this.$root.labels.confirm_delete_appointment_plural;return Object.keys(this.packageCustomers).forEach(function(i){e.packageCustomers[i].checked&&(t=e.$root.labels.confirm_delete_package_purchase)}),t},checkedAppointmentsCount:function(){var e=this,t=0;return Object.keys(this.packageCustomers).forEach(function(i){t+=e.packageCustomers[i].appointments.filter(function(e){return e.checked}).length}),t},deleteSelected:function(){var e=this;this.deleteLoading=!0;var t=[],i=[];Object.keys(this.packageCustomers).forEach(function(o){e.packageCustomers[o].appointments.forEach(function(i){i.checked&&!e.packageCustomers[o].checked&&t.push(i.id)}),e.packageCustomers[o].checked&&i.push(o)}),Object.keys(this.packageCustomers).forEach(function(o){e.packageCustomers[o].appointments.forEach(function(n){n.checked&&!e.packageCustomers[o].checked&&e.form.post(e.$root.getAjaxUrl+"/bookings/delete/"+n.booking.id).then(function(){e.deleteSelectedCallback(t,i,"appointment",!0)}).catch(function(){e.deleteSelectedCallback(t,i,"appointment",!1)})})}),Object.keys(this.packageCustomers).forEach(function(o){e.packageCustomers[o].checked&&e.form.post(e.$root.getAjaxUrl+"/packages/customers/delete/"+o).then(function(){e.deleteSelectedCallback(t,i,"packageCustomer",!0)}).catch(function(){e.deleteSelectedCallback(t,i,"packageCustomer",!1)})})},deleteSelectedCallback:function(e,t,i,o){"appointment"===i&&(e.pop(),o?this.appointmentsDeleteCount.success++:this.appointmentsDeleteCount.error++),"packageCustomer"===i&&(t.pop(),o?this.packageCustomersDeleteCount.success++:this.packageCustomersDeleteCount.error++),0===e.length&&0===t.length&&(this.appointmentsDeleteCount.success&&this.notify(this.$root.labels.success,this.appointmentsDeleteCount.success+" "+(this.appointmentsDeleteCount.success>1?this.$root.labels.appointments_deleted:this.$root.labels.appointment_deleted),"success"),this.appointmentsDeleteCount.error&&this.notify(this.$root.labels.error,this.appointmentsDeleteCount.error+" "+(this.appointmentsDeleteCount.error>1?this.$root.labels.appointments_not_deleted:this.$root.labels.appointment_not_deleted),"error"),this.packageCustomersDeleteCount.success&&this.notify(this.$root.labels.success,this.packageCustomersDeleteCount.success+" "+(this.packageCustomersDeleteCount.success>1?this.$root.labels.package_customers_deleted:this.$root.labels.package_customer_deleted),"success"),this.packageCustomersDeleteCount.error&&this.notify(this.$root.labels.error,this.packageCustomersDeleteCount.error+" "+(this.packageCustomersDeleteCount.error>1?this.$root.labels.package_customers_not_deleted:this.$root.labels.package_customer_not_deleted),"error"),this.appointmentsDeleteCount.success=0,this.appointmentsDeleteCount.error=0,this.packageCustomersDeleteCount.success=0,this.packageCustomersDeleteCount.error=0,this.getAppointmentOptions(!0),this.toaster=!1,this.deleteLoading=!1,this.showDeleteConfirmation=!1,this.showDeleteButton=!0)},packageBookingCallback:function(){this.$emit("savePackageBookingCallback"),this.getAppointments()},getAppointmentOptions:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.options.fetched=!1,this.customersLoading=!0,this.fetchEntities(function(o){o&&e&&(t.customersLoading=!1,t.getAppointments(i)),t.fetched=!0,t.options.fetched=!0},{types:["locations","employees","categories","custom_fields","packages","coupons","customers"],page:"appointments",isFrontEnd:!1,isPanel:!1})},getAppointments:function(){var e=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.fetchedFiltered=!1;var t=JSON.parse(JSON.stringify(this.params)),i=[];t.dates&&(t.dates.start&&i.push($()(t.dates.start).format("YYYY-MM-DD")),t.dates.end&&i.push($()(t.dates.end).format("YYYY-MM-DD")),t.dates=i),t.packageId=this.purchasedPackage.id,Object.keys(t).forEach(function(e){return!t[e]&&0!==t[e]&&delete t[e]}),this.$http.get(this.$root.getAjaxUrl+"/appointments",{params:t}).then(function(t){e.toaster=!1;var i=e.options.entities.customers.map(function(e){return parseInt(e.id)}),o=e.options.entities.customers,n={};e.useSortedDateStrings(Object.keys(t.data.data.appointments)).forEach(function(e){t.data.data.appointments[e].appointments.forEach(function(e){e.checked=!1,e.bookings.forEach(function(t){-1===i.indexOf(parseInt(t.customer.id))&&(i.push(t.customer.id),o.push(t.customer));var a=parseInt(t.packageCustomerService.packageCustomer.id);a in n||(n[a]={status:t.packageCustomerService.packageCustomer.status,checked:!1,updating:!1,appointments:[],count:0,total:0,data:[]});var s={status:"canceled"===t.status||"rejected"===t.status?t.status:e.status,packageCustomerId:a,canceled:!1,checked:!1,bookingStarts:e.bookingStart,bookingEnd:e.bookingEnd,provider:e.provider,service:e.service,id:e.id,booking:t};n[a].appointments.push(s)})})});var a=e.groupBy(t.data.data.emptyPackageBookings,"packageCustomer");if(a){var s=function(t){var i=parseInt(t);if(a.hasOwnProperty(i)){t in n||(n[i]={status:a[t][0].packageCustomer.status,checked:!1,updating:!1,appointments:[],count:0,total:0,data:[]});var o={status:null,packageCustomerId:i,canceled:!1,checked:!1,bookingStarts:null,provider:null,service:null,id:null,booking:{customer:e.options.entities.customers.find(function(e){return e.id===a[t][0].packageCustomer.customerId}),packageCustomerService:a[t][0],id:i,payments:a[t][0].packageCustomer.payments}};n[i].appointments.push(o)}};for(var r in a)s(r)}t.data.data.availablePackageBookings.forEach(function(e){e.packages.forEach(function(e){e.services.forEach(function(e){e.bookings.forEach(function(t){t.packageCustomerId in n&&(t.sharedCapacity?0===n[t.packageCustomerId].total&&(n[t.packageCustomerId].count=t.total-n[t.packageCustomerId].appointments.filter(function(e){return e.id&&"canceled"!==e.status}).length,n[t.packageCustomerId].total=t.total):(n[t.packageCustomerId].count+=t.count,n[t.packageCustomerId].total+=t.total),n[t.packageCustomerId].data.push(e))})})})}),e.options.entities.customers=Object.values(o.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),e.packageCustomers=0===Object.keys(n).length?[]:n,e.changedRange=!1,e.fetched=!0,e.fetchedFiltered=!0}).catch(function(t){console.log(t.message),e.fetched=!0,e.fetchedFiltered=!0})},changeRange:function(){this.setDatePickerSelectedDaysCount(this.params.dates.start,this.params.dates.end),this.changedRange=!0,this.changeFilter()},changeFilter:function(){this.params.customerId||(this.searchedCustomers=[]),this.getAppointments()},handleResize:function(){this.filterFields=window.innerWidth>=992},handleCheckPackageAppointments:function(e){var t=this;this.packageCustomers[e].checked&&this.packageCustomers[e].appointments.filter(function(e){return null!==e.id}).forEach(function(i){i.checked=t.packageCustomers[e].checked}),Object.keys(this.packageCustomers).forEach(function(i){i!==e&&(t.packageCustomers[i].checked=!1,t.packageCustomers[i].appointments.filter(function(e){return null!==e.id}).forEach(function(e){e.checked=!1}))}),this.handleToaster(e)},handleToaster:function(e){var t=this,i=!1,o=!1;Object.keys(this.packageCustomers).forEach(function(n){e!==n&&t.packageCustomers[n].appointments.filter(function(e){return null!==e.id}).forEach(function(e){e.checked=!1}),t.packageCustomers[n].appointments.filter(function(e){return null!==e.id}).forEach(function(e){e.checked&&(i=!0)}),0!==t.packageCustomers[n].appointments.filter(function(e){return null!==e.id}).length&&t.packageCustomers[n].appointments.filter(function(e){return e.checked&&null!==e.id}).length<t.packageCustomers[n].appointments.filter(function(e){return null!==e.id}).length&&(t.packageCustomers[n].checked=!1),t.packageCustomers[n].checked&&(o=!0)}),this.toaster=i||o},showDialogNewCustomer:function(){this.customer=this.getInitCustomerObject(),this.dialogCustomer=!0},closePackageBooking:function(){this.$emit("closePackageBooking")},openRecurringAppointment:function(e){var t=this;this.dialogAppointment=!1,setTimeout(function(){t.showDialogEditAppointment(e)},200)},getPackagePaymentStatus:function(e){var t=e[0].booking.payments,i=this.getPackageDiscountedPrice(e[0].booking.packageCustomerService.packageCustomer);return i+=t.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).reduce(function(e,t){return e+t.wcItemTaxValue},0),t.filter(function(e){return"pending"!==e.status}).reduce(function(e,t){return e+t.amount},0)>=i?"paid":t.filter(function(e){return"partiallyPaid"===e.status}).length>0?"partiallyPaid":"pending"},updatePackageAppointmentStatusCallback:function(e,t){this.updateAppointmentStatus(e,e.status,!1,function(i){"canceled"===e.status||"rejected"===e.status?t.count++:t.count--})},updatePackageCustomerStatus:function(e,t){var i=this;this.packageCustomers[e].updating=!0,this.form.post(this.$root.getAjaxUrl+"/packages/customers/"+e,{status:t}).then(function(o){i.packageCustomers[e].updating=!1,i.packageCustomers[e].status=t,i.notify(i.$root.labels.success,o.message,"success")}).catch(function(t){i.packageCustomers[e].updating=!1,t.response&&i.notify(i.$root.labels.error,t.response.data.message,"error")})},groupBy:function(e,t){return e.reduce(function(e,i){return(e[i[t].id]=e[i[t].id]||[]).push(i),e},{})}},computed:{filterApplied:function(){return!!(this.params.services.length||this.params.providers.length||this.params.customerId||this.params.dates.start||this.params.dates.end||this.params.status)}},watch:{},components:{PaginationBlock:L.a,PageHeader:O.a,DialogExport:g.a,DialogAppointment:u.a,DialogPackageBooking:p.a,DialogCustomer:f.a,DialogPayment:b.a,PackagesListCollapsed:n.a}}},1056:function(e,t,i){var o=i(335)(i(1057),i(1058),!1,null,null,null);e.exports=o.exports},1057:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(702),n=i(699),a=i(338),s=i(696),r=i(792);t.default={mixins:[o.a,n.a,a.a,s.a,r.a],props:["packageCustomer","packageCustomerId","options","purchasedPackage"],data:function(){return{statuses:[{value:"approved",label:this.$root.labels.approved},{value:"pending",label:this.$root.labels.pending},{value:"canceled",label:this.$root.labels.canceled},{value:"rejected",label:this.$root.labels.rejected}],noShowStatus:[{value:"no-show",label:this.$root.labels["no-show"]}]}},methods:{handleCheckPackageAppointment:function(){this.$emit("handleCheckPackageAppointment",this.packageCustomerId)},showDialogNewCustomer:function(){this.customer=this.getInitCustomerObject(),this.dialogCustomer=!0},showDialogEditPackageAppointment:function(e,t){this.$emit("showDialogEditPackageAppointment",e,t)},updatePackageAppointmentStatus:function(e,t){this.$emit("updatePackageAppointmentStatus",e,t)},showDialogNewPackageAppointment:function(e){this.$emit("showDialogNewPackageAppointment",e)}}}},1058:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticClass:"am-appointment-details"},[i("el-row",[e.packagePurchaseHasAppointments(e.packageCustomer)?i("div",{staticClass:"am-appointments-list-head",staticStyle:{padding:"0"}},[i("p",[e._v(e._s(e.$root.labels.appointments)+":")])]):e._e(),e._v(" "),e._l(e.packageCustomer.appointments,function(t,o){return t.id?i("el-row",{key:o,staticClass:"has-divider",staticStyle:{"line-height":"initial"}},[i("el-col",{attrs:{lg:12}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:2,md:2}},[i("p",[!0===e.$root.settings.capabilities.canDelete?i("el-checkbox",{on:{change:e.handleCheckPackageAppointment},model:{value:t.checked,callback:function(i){e.$set(t,"checked",i)},expression:"appointment.checked"}}):e._e()],1)]),e._v(" "),i("el-col",{attrs:{lg:8,md:8,sm:8}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.date)+":")]),e._v(" "),i("h4",[e._v(e._s(e.getFrontedFormattedDate(t.bookingStarts.split(" ")[0])))])]),e._v(" "),i("el-col",{attrs:{lg:5,md:5,sm:5}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.time)+":")]),e._v(" "),i("h4",[e._v(e._s(e.getFrontedFormattedTime(t.bookingStarts.split(" ")[1])))])]),e._v(" "),i("el-col",{attrs:{lg:15,md:15,sm:15}},[i("div",{staticClass:"am-appointment-package-wrap"},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.service)+":")]),e._v(" "),i("h4",[e._v(e._s(t.service.name))])])])],1)],1),e._v(" "),i("el-col",{attrs:{lg:12}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:2,md:2}}),e._v(" "),i("el-col",{attrs:{lg:9,md:9,sm:9}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.employee)+":")]),e._v(" "),i("div",{staticClass:"am-assigned"},[i("img",{attrs:{src:e.pictureLoad(e.getProviderById(t.provider.id),!0)},on:{error:function(i){e.imageLoadError(e.getProviderById(t.provider.id),!0)}}}),e._v(" "),i("h4",[e._v("\n "+e._s(t.provider.firstName+" "+t.provider.lastName)+"\n ")])])]),e._v(" "),i("el-col",{staticStyle:{display:"flex",margin:"auto"},attrs:{lg:9,md:9,sm:9}},[i("div",{staticClass:"am-appointment-status",on:{click:function(e){e.stopPropagation()}}},[i("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.status}),e._v(" "),i("el-select",{attrs:{placeholder:e.$root.labels.status,disabled:e.packageCustomer.updating},on:{change:function(i){return e.updatePackageAppointmentStatus(t,e.packageCustomer)}},model:{value:t.status,callback:function(i){e.$set(t,"status",i)},expression:"appointment.status"}},e._l(e.statuses.concat(e.getDateTime(t.bookingEnd)<e.getNowDate()?e.noShowStatus:[]),function(t){return i("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[i("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.value},[e._v(e._s(t.label))])])}),1)],1),e._v(" "),i("div",{staticClass:"am-edit-btn",staticStyle:{"margin-left":"8px"}},[i("el-button",{staticClass:"am-button-icon",staticStyle:{margin:"0"},on:{click:function(i){return e.showDialogEditPackageAppointment(t.id,e.packageCustomer)}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})])],1)])],1)],1)],1):e._e()})],2),e._v(" "),i("el-row",{staticClass:"am-appointments-flex-row-middle-align",staticStyle:{"margin-top":"16px","margin-bottom":"16px"}},[i("el-col",{attrs:{lg:12,sm:12}},[i("h3",[e._v("\n "+e._s(e.packageCustomer.count)+" "+e._s(e.$root.labels.package_appointment_left)+"\n ")])]),e._v(" "),i("el-col",{staticStyle:{"text-align":"end"},attrs:{lg:12,sm:12}},[e.packageCustomer.count>0?i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.showDialogNewPackageAppointment(e.packageCustomer)}}},[i("img",{staticStyle:{"vertical-align":"middle","margin-right":"8px"},attrs:{src:e.$root.getUrl+"public/img/am-plus.svg"}}),e._v("\n "+e._s(e.$root.labels.package_book_appointment)+"\n ")]):e._e()],1)],1)],1)])},staticRenderFns:[]}},1059:function(e,t,i){var o=i(335)(i(1060),i(1061),!1,null,null,null);e.exports=o.exports},1060:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(710),n=i(775),a=i(338),s=i(721),r=i.n(s),l=i(702),c=i(697),u=i(696),d=i(700),p=i(699),m=i(712),f=i(748),h=i(792),g=i(0);i.n(g);t.default={mixins:[f.a,l.a,u.a,a.a,d.a,p.a,n.a,c.a,m.a,o.a,h.a],props:{passedPackage:null,options:null,customerCreatedCount:0,showHeader:{required:!1,default:!0,type:Boolean},newUser:null},data:function(){return{packageBooking:null,notifyParticipants:!0,filteredCustomers:[],customers:[],rules:{customers:[{required:!0,message:this.$root.labels.select_a_customer_warning,trigger:"submit"}]},mounted:!1,dialogLoading:!0,statusMessage:"",loadingTimeSlots:!1,payment:{amount:0,gateway:"onSite"}}},mounted:function(){this.setInitialCustomers(),this.filteredCustomers=JSON.parse(JSON.stringify(this.options.entities.customers)),this.packageBooking={customers:[]},this.instantiateDialog()},methods:{searchExistingCustomers:function(e){var t=this;e?this.searchCustomers(e,this.setFilteredCustomers):setTimeout(function(){clearTimeout(t.searchCustomersTimer),t.setFilteredCustomers(!1)},500)},setFilteredCustomers:function(e){this.filteredCustomers=this.searchedCustomers,void 0===e||e||(this.filteredCustomers=this.options.entities.customers)},editPayment:function(e){this.$emit("editPayment",e)},instantiateDialog:function(){this.dialogLoading=!1,this.mounted=!0},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(){var e=[];return this.passedPackage.bookable.forEach(function(t){e.push({serviceId:t.service.id,providerId:t.providerId?t.providerId:null,locationId:t.locationId?t.locationId:null})}),{packageId:this.passedPackage.id,customerId:this.packageBooking.customers.id,rules:e,notify:this.notifyParticipants}},showDialogNewCustomer:function(){this.$emit("showDialogNewCustomer")},clearValidation:function(){void 0!==this.$refs.packageBooking&&this.$refs.packageBooking.clearValidate()},errorCallback:function(e){var t=this;setTimeout(function(){"timeSlotUnavailable"in e&&!0===e.timeSlotUnavailable&&(t.notify(t.$root.labels.error,t.$root.labels.time_slot_unavailable,"error"),t.getTimeSlots(t.updateCalendar)),"packageBookingUnavailable"in e&&!0===e.packageBookingUnavailable&&(t.notify(t.$root.labels.error,t.$root.labels.package_booking_unavailable,"error"),t.getTimeSlots(t.updateCalendar))},200)}},computed:{showCustomer:function(){return"customer"!==this.$root.settings.role}},watch:{customerCreatedCount:function(){this.newUser&&(this.filteredCustomers.push(this.newUser),this.packageBooking.customers=this.newUser,this.clearValidation())}},components:{DialogActions:r.a}}},1061:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[i("div",{staticClass:"am-dialog-loader-content"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),i("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():i("div",{staticClass:"am-dialog-scrollable"},[e.showHeader?i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:18}},[i("h2",[e._v(e._s(e.$root.labels.new_package_booking))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:6}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1):e._e(),e._v(" "),e.mounted?i("el-form",{ref:"packageBooking",attrs:{model:e.packageBooking,rules:e.rules,"label-position":"top"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[e.showCustomer?i("el-form-item",{attrs:{label:e.$root.labels.customer+":",prop:"customers"}},[i("el-select",{staticClass:"no-tags",attrs:{remote:"",filterable:"","collapse-tags":"","value-key":"id",loading:e.loadingCustomers,placeholder:e.$root.labels.select_customer,"popper-class":"am-dropdown-cabinet","remote-method":e.searchExistingCustomers},on:{change:function(t){return e.clearValidation()}},model:{value:e.packageBooking.customers,callback:function(t){e.$set(e.packageBooking,"customers",t)},expression:"packageBooking.customers"}},[i("div",{staticClass:"am-drop"},[this.$root.settings.additionalCapabilities.canWriteCustomers?i("div",{staticClass:"am-drop-create-item",on:{click:e.showDialogNewCustomer}},[e._v("\n "+e._s(e.$root.labels.create_new)+"\n ")]):e._e(),e._v(" "),e._l(e.filteredCustomers,function(t){return i("el-option",{key:t.id,staticClass:"am-has-option-meta",attrs:{label:t.firstName.trim()||t.lastName.trim()?t.firstName+" "+t.lastName:e.$root.labels.customer+" "+t.id,value:t}},[i("span",{class:{"am-drop-item-name":t.email}},[e._v("\n "+e._s(t.firstName.trim()||t.lastName.trim()?"":e.$root.labels.customer+" "+t.id)+" "+e._s(t.firstName+" "+t.lastName)+"\n ")]),e._v(" "),t.email?i("span",{staticClass:"am-drop-item-meta"},[e._v("\n "+e._s(t.email)+"\n ")]):e._e()])}),e._v(" "),e._l([{customer:{id:0,firstName:"",lastName:"",email:"",info:JSON.stringify({firstName:"",lastName:"",email:"",phone:""})}}],function(t){return 0===e.filteredCustomers.length?i("el-option",{key:t.id,staticClass:"am-has-option-meta",style:{display:"none"},attrs:{label:t.firstName.trim()||t.lastName.trim()?t.firstName+" "+t.lastName:e.$root.labels.customer+" "+t.id,value:t}}):e._e()})],2)])],1):e._e(),e._v(" "),"customer"!==this.$root.settings.role?i("el-form-item",[i("el-checkbox",{on:{change:function(t){return e.clearValidation()}},model:{value:e.notifyParticipants,callback:function(t){e.notifyParticipants=t},expression:"notifyParticipants"}},[e._v("\n "+e._s(e.$root.labels.notify_customer)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.notify_customers_package_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):e._e()],1):e._e()],1),e._v(" "),e.dialogLoading||"customer"===this.$root.settings.role?e._e():i("dialog-actions",{attrs:{formName:"packageBooking",urlName:"packages/customers",isNew:!0,entity:e.passedPackage,getParsedEntity:e.getParsedEntity,haveSaveConfirmation:!1,hasIcons:!0,action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:!1,haveSaveWarning:!1},message:{success:{save:e.$root.labels.package_booking_saved,remove:"",show:"",hide:""},confirm:{remove:"",show:"",hide:"",duplicate:"",save:""}}},on:{errorCallback:e.errorCallback}})],1)},staticRenderFns:[]}},1062:function(e,t){e.exports={render:function(){var e=this,t=this,i=t.$createElement,o=t._self._c||i;return o("div",{staticClass:"am-wrap"},[o("div",{staticClass:"am-body",attrs:{id:"am-appointments"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetched||!t.options.fetched,expression:"!fetched || !options.fetched"}],staticClass:"am-spinner am-section"},[o("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),t.fetched&&0===t.packageCustomers.length&&!t.filterApplied&&t.fetchedFiltered&&t.options.fetched?o("div",{staticClass:"am-empty-state am-section"},[o("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),o("h2",[t._v(t._s(t.$root.labels.no_appointments_yet))]),t._v(" "),o("p",[t._v(t._s(t.$root.labels.click_add_appointments))])]):t._e(),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&t.options.fetched&&(0!==t.packageCustomers.length||0===t.packageCustomers.length&&t.filterApplied||!t.fetchedFiltered),expression:"fetched && options.fetched && (packageCustomers.length !== 0 || (packageCustomers.length === 0 && filterApplied) || !fetchedFiltered)"}]},[o("div",{staticClass:"am-appointments-filter am-section"},[o("div",{staticStyle:{"margin-bottom":"16px"}},[o("h1",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:t.goBack}},[o("img",{attrs:{src:t.$root.getUrl+"public/img/arrow-back.svg"}}),t._v(" "+t._s(t.purchasedPackage.name))])]),t._v(" "),o("el-form",{staticClass:"demo-form-inline",attrs:{model:t.params,action:t.exportAction,method:"POST"}},[o("transition",{attrs:{name:"fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:t.filterFields,expression:"filterFields"}],staticClass:"am-filter-fields"},[o("el-row",{attrs:{gutter:16}},[o("el-col",{staticClass:"v-calendar-column",attrs:{sm:24,md:12,lg:12}},[o("el-form-item",{attrs:{prop:"dates"}},[o("v-date-picker",{attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:t.vCalendarFormats},on:{input:t.changeRange},model:{value:t.params.dates,callback:function(e){t.$set(t.params,"dates",e)},expression:"params.dates"}})],1)],1),t._v(" "),o("el-col",{attrs:{sm:24,md:12,lg:12}},[o("el-form-item",[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.customer,remote:"","remote-method":t.searchCustomers,loading:t.customersLoading},on:{change:t.changeFilter},model:{value:t.params.customerId,callback:function(e){t.$set(t.params,"customerId",e)},expression:"params.customerId"}},t._l(t.searchedCustomers.length?t.searchedCustomers:t.options.entities.customers,function(e,i){return o("el-option",{key:i,attrs:{label:e.firstName.trim()||e.lastName.trim()?e.firstName+" "+e.lastName:t.$root.labels.customer+" "+e.id,value:e.id}})}),1)],1)],1)],1)],1)]),t._v(" "),o("transition",{attrs:{name:"slide"}},[t.dialogExport?o("el-dialog",{staticClass:"am-side-dialog am-dialog-export",attrs:{"close-on-click-modal":!1,visible:t.dialogExport,"show-close":!1},on:{"update:visible":function(e){t.dialogExport=e}}},[o("dialog-export",{attrs:{data:Object.assign(t.params,t.exportParams),action:t.$root.getAjaxUrl+"/report/appointments"},on:{updateAction:function(t){e.exportAction=t},closeDialogExport:function(e){t.dialogExport=!1}}})],1):t._e()],1)],1)],1),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&0===Object.keys(t.packageCustomers).length&&t.filterApplied&&t.fetchedFiltered&&t.options.fetched,expression:"fetched && Object.keys(packageCustomers).length === 0 && filterApplied && fetchedFiltered && options.fetched"}],staticClass:"am-empty-state am-section"},[o("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),o("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:!t.fetchedFiltered,expression:"!fetchedFiltered"}],staticClass:"am-spinner am-section"},[o("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.fetchedFiltered&&t.options.fetched&&0!==Object.keys(t.packageCustomers).length,expression:"fetchedFiltered && options.fetched && Object.keys(packageCustomers).length !== 0"}],staticClass:"am-appointments am-section"},[o("div",{staticClass:"am-appointments-list-head"},[o("el-row",[o("el-col",{attrs:{lg:12}},[o("el-row",{attrs:{gutter:10,type:"flex",justify:"space-around",align:"middle"}},[o("el-col",{attrs:{lg:2,sm:2}}),t._v(" "),o("el-col",{attrs:{lg:8,md:8,sm:12}},[o("p",[t._v(t._s(t.$root.labels.customer)+":")])]),t._v(" "),o("el-col",{attrs:{lg:7,md:7,sm:12}},[o("p",[t._v(t._s(t.$root.labels.appointments)+":")])]),t._v(" "),o("el-col",{attrs:{lg:7,md:7,sm:12}},[o("p",[t._v(t._s(t.$root.labels.package_date_purchased)+":")])])],1)],1),t._v(" "),o("el-col",{attrs:{lg:12}},[o("el-row",{attrs:{gutter:10,type:"flex",justify:"space-around",align:"middle"}},[o("el-col",{attrs:{lg:6,md:6}},[o("p",[t._v(t._s(t.$root.labels.employees)+":")])]),t._v(" "),o("el-col",{attrs:{lg:5,sm:5}},[o("p",[t._v(t._s(t.$root.labels.price)+":")])]),t._v(" "),o("el-col",{attrs:{lg:6,md:7}},[o("p",[t._v(t._s(t.$root.labels.package_payment_status)+":")])]),t._v(" "),o("el-col",{attrs:{lg:7,sm:3,xs:8}})],1)],1)],1)],1),t._v(" "),o("div",[o("div",{staticClass:"am-appointments-list"},[o("el-collapse",t._l(t.packageCustomers,function(e,i){return o("el-collapse-item",{key:i,staticClass:"am-appointment",attrs:{name:i}},[o("template",{slot:"title"},[o("div",{staticClass:"am-appointment-data"},[o("el-row",[o("el-col",{attrs:{lg:12}},[o("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:15}},[o("el-col",{attrs:{lg:2,sm:2}},[o("span",{staticClass:"am-appointment-checkbox",on:{click:function(e){e.stopPropagation()}}},[!0===t.$root.settings.capabilities.canDelete?o("el-checkbox",{attrs:{value:e.checked,label:e.checked},on:{change:function(e){return t.handleCheckPackageAppointments(i)}},model:{value:e.checked,callback:function(i){t.$set(e,"checked",i)},expression:"packageCustomer.checked"}}):t._e()],1)]),t._v(" "),o("el-col",{attrs:{lg:8,sm:8,xs:24}},[o("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.customer)+":")]),t._v(" "),[o("h3",[o("span",[t._v("\n "+t._s(null!==(t.user=t.getCustomerInfo(e.appointments[0].booking))?t.user.firstName.trim()||t.user.lastName.trim()?t.user.firstName+" "+t.user.lastName:t.$root.labels.customer+" "+t.user.id:"")+"\n ")])]),t._v(" "),o("span",[t._v(t._s(e.appointments[0].booking.customer.email))])]],2),t._v(" "),o("el-col",{attrs:{lg:7,sm:7}},[o("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.appointments)+":")]),t._v(" "),o("h3",[t._v(t._s(e.total)+" "+t._s(t.$root.labels.package_total))]),t._v(" "),o("span",[t._v(" "+t._s(e.count)+" "+t._s(t.$root.labels.package_to_be_booked))])]),t._v(" "),o("el-col",{attrs:{lg:7,sm:7,xs:12}},[o("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.package_date_purchased)+":")]),t._v(" "),o("h3",[t._v(t._s(t.getFrontedFormattedDateFromDateTimeString(e.appointments[0].booking.packageCustomerService.packageCustomer.purchased)))]),t._v(" "),o("span",[t._v(t._s(t.getFrontedFormattedTimeFromDateTimeString(e.appointments[0].booking.packageCustomerService.packageCustomer.purchased)))])])],1)],1),t._v(" "),o("el-col",{attrs:{lg:12}},[o("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:15}},[o("el-col",{attrs:{lg:0,md:2,sm:2}}),t._v(" "),o("el-col",{attrs:{lg:6,sm:6}},[o("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.employees)+":")]),t._v(" "),o("div",{staticClass:"am-category-services-thumbs"},t._l(t.getPurchasedPackageProviders(e.appointments),function(e,i){return i<3?o("img",{key:e,attrs:{src:t.pictureLoad(t.getProviderById(e),!0)},on:{error:function(i){t.imageLoadError(t.getProviderById(e),!0)}}}):t._e()}),0)]),t._v(" "),o("el-col",{staticClass:"am-appointment-payment",attrs:{lg:5,sm:5,xs:13}},[o("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.price)+":")]),t._v(" "),o("h3",[t._v(t._s(t.getFormattedPrice(t.getPackageDiscountedPrice(e.appointments[0].booking.packageCustomerService.packageCustomer))))])]),t._v(" "),o("el-col",{staticClass:"am-finance-payment-status",attrs:{lg:6,sm:6,xs:16}},[o("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.package_payment_status)+":")]),t._v(" "),o("div",{staticClass:"am-payment-status"},[o("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.getPackagePaymentStatus(e.appointments)}),t._v(" "),o("h3",[t._v("\n "+t._s(t.getPaymentStatusNiceName(t.getPackagePaymentStatus(e.appointments)))+"\n ")])])]),t._v(" "),o("el-col",{attrs:{lg:7,sm:3,xs:8}},[o("div",{on:{click:function(e){e.stopPropagation()}}},["canceled"!==e.status?o("el-button",{attrs:{type:"danger",plain:"",loading:e.updating},on:{click:function(e){return t.updatePackageCustomerStatus(i,"canceled")}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]):o("el-button",{attrs:{type:"primary",plain:"",loading:e.updating},on:{click:function(e){return t.updatePackageCustomerStatus(i,"approved")}}},[t._v("\n "+t._s(t.$root.labels.open)+"\n ")])],1)])],1)],1)],1)],1)]),t._v(" "),o("packages-list-collapsed",{attrs:{packageCustomer:e,packageCustomerId:i,options:t.options,purchasedPackage:t.purchasedPackage},on:{showDialogEditPackageAppointment:t.showDialogEditPackageAppointment,updatePackageAppointmentStatus:t.updatePackageAppointmentStatusCallback,showDialogNewPackageAppointment:t.showDialogNewPackageAppointment,handleCheckPackageAppointment:t.handleToaster}})],2)}),1)],1)])]),t._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[t.toaster?o("div",{staticClass:"am-bottom-popover"},[o("transition",{attrs:{name:"fade"}},[o("el-button",{directives:[{name:"show",rawName:"v-show",value:t.showDeleteButton,expression:"showDeleteButton"}],staticClass:"am-button-icon",on:{click:function(e){return t.switchShowDeleteConfirmation(!0)}}},[o("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.delete,src:t.$root.getUrl+"public/img/delete.svg"}})])],1),t._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:t.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-bottom-popover-confirmation"},[o("el-row",{attrs:{type:"flex",justify:"start",align:"middle"}},[o("h3",[t._v(t._s(t.confirmationText()))]),t._v(" "),o("div",{staticClass:"align-left"},[o("el-button",{attrs:{size:"small"},on:{click:function(e){return t.switchShowDeleteConfirmation(!1)}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),o("el-button",{attrs:{size:"small",type:"primary",loading:t.deleteLoading},on:{click:t.deleteSelected}},[t._v("\n "+t._s(t.$root.labels.delete)+"\n ")])],1)])],1)])],1):t._e()])],1),t._v(" "),o("transition",{attrs:{name:"slide"}},[t.dialogAppointment?o("el-dialog",{staticClass:"am-side-dialog",attrs:{"close-on-click-modal":!1,visible:t.dialogAppointment,"show-close":!1},on:{"update:visible":function(e){t.dialogAppointment=e}}},[o("dialog-appointment",{attrs:{appointment:t.appointment,recurringAppointments:t.recurringAppointments,savedAppointment:t.savedAppointment,bookings:t.bookings,options:t.options,customerCreatedCount:t.customerCreatedCount,packageServices:t.packageServices},on:{sortBookings:t.sortBookings,saveCallback:t.saveAppointmentCallback,duplicateCallback:t.duplicateAppointmentCallback,closeDialog:t.closeDialogAppointment,showDialogNewCustomer:function(e){return t.showDialogNewCustomer()},editPayment:t.editPayment,openRecurringAppointment:t.openRecurringAppointment}})],1):t._e()],1),t._v(" "),o("transition",{attrs:{name:"slide"}},[t.dialogPackageBooking?o("el-dialog",{staticClass:"am-side-dialog",attrs:{"close-on-click-modal":!1,visible:t.dialogPackageBooking,"show-close":!1},on:{"update:visible":function(e){t.dialogPackageBooking=e}}},[o("dialog-package-booking",{attrs:{options:t.options,"passed-package":t.purchasedPackage,customerCreatedCount:t.customerCreatedCount,"new-user":t.newUser},on:{saveCallback:t.packageBookingCallback,closeDialog:t.closePackageBooking,showDialogNewCustomer:function(e){return t.showDialogNewCustomer()},editPayment:t.editPayment}})],1):t._e()],1),t._v(" "),o("transition",{attrs:{name:"slide"}},[t.dialogCustomer?o("el-dialog",{staticClass:"am-side-dialog",attrs:{"close-on-click-modal":!1,visible:t.dialogCustomer,"show-close":!1},on:{"update:visible":function(e){t.dialogCustomer=e}}},[o("dialog-customer",{attrs:{customer:t.customer},on:{closeDialog:function(e){t.dialogCustomer=!1},saveCallback:t.saveCustomerCallback}})],1):t._e()],1),t._v(" "),o("transition",{attrs:{name:"slide"}},[t.dialogPayment?o("el-dialog",{staticClass:"am-side-dialog am-dialog-coupon",attrs:{"close-on-click-modal":!1,visible:t.dialogPayment,"show-close":!1},on:{"update:visible":function(e){t.dialogPayment=e}}},[o("dialog-payment",{attrs:{modalData:t.selectedPaymentModalData,bookingFetched:!0},on:{closeDialogPayment:function(e){t.dialogPayment=!1},updatePaymentCallback:t.updatePaymentCallback}})],1):t._e()],1)],1)])},staticRenderFns:[]}},1063:function(e,t,i){var o=i(335)(i(1064),i(1065),!1,null,null,null);e.exports=o.exports},1064:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(721),n=i.n(o),a=i(696),s=i(700),r=i(697);t.default={mixins:[a.a,s.a,r.a],props:{passedResource:null,categories:{type:Array,default:function(){return[]}},services:{type:Array,default:function(){return[]}},locations:{type:Array,default:function(){return[]}},employees:{type:Array,default:function(){return[]}},entitiesRelations:{type:Object,default:function(){return{}}},settings:{type:Object,default:function(){return{}}}},data:function(){return{resource:null,rules:{name:[{required:!0,message:this.$root.labels.resource_name_required,trigger:"submit"}]},sharedResource:!this.passedResource.shared,nonSharedEntityTypes:[{label:"Disabled",value:"disabled"},{label:"Service",value:"service"},{label:"Location",value:"location"}],selectedEntities:{services:[],locations:[],employees:[]},allEntitiesSelected:{services:!1,locations:!1,employees:!1}}},created:function(){this.resource=JSON.parse(JSON.stringify(this.passedResource))},mounted:function(){var e=this;["services","locations","employees"].forEach(function(t){e.selectedEntities[t]=e.resource[t],0!==e.resource.id&&0===e.resource[t].length&&(e.selectedEntities[t]=e[t],e.allEntitiesSelected[t]=!0)})},methods:{selectAllEntities:function(e){this.allEntitiesSelected[e]=!this.allEntitiesSelected[e],this.selectedEntities[e]=this.allEntitiesSelected[e]?this[e]:[]},selectEntity:function(e){this.allEntitiesSelected[e]=!1},changeResourceSharing:function(){this.sharedResource?this.resource.shared=null:this.resource.shared=this.resource.shared?this.resource.shared:"service"},selectAllInCategory:function(e){var t=e.serviceList.map(function(e){return e.id}),i=this.selectedEntities.services.map(function(e){return e.id});i=_.isEqual(_.intersection(t,i),t)?_.difference(i,t):_.uniq(i.concat(t)),this.selectedEntities.services=this.services.filter(function(e){return i.includes(e.id)})},filteredCategories:function(){var e=this,t=[];return this.categories.forEach(function(i){e.filteredServices(i).length>0&&t.push(i)}),t},filteredServices:function(){var e=this;return this.services.filter(function(t){return(!e.selectedEntities.employees.length||e.selectedEntities.employees.filter(function(i){return i.id in e.entitiesRelations&&t.id in e.entitiesRelations[i.id]}).length>0)&&(!e.selectedEntities.locations.length||e.filteredEmployees().filter(function(i){return i.id in e.entitiesRelations&&t.id in e.entitiesRelations[i.id]&&e.selectedEntities.locations.some(function(o){return-1!==e.entitiesRelations[i.id][t.id].indexOf(o.id)})}).length>0)})},filteredEmployees:function(){var e=this;return this.employees.filter(function(t){return t.serviceList.filter(function(i){return"visible"===i.status&&(!e.selectedEntities.services.length||t.id in e.entitiesRelations&&i.id in e.entitiesRelations[t.id]&&-1!==e.selectedEntities.services.map(function(e){return e.id}).indexOf(i.id))&&(!e.selectedEntities.locations.length||t.id in e.entitiesRelations&&i.id in e.entitiesRelations[t.id]&&e.selectedEntities.locations.some(function(o){return-1!==e.entitiesRelations[t.id][i.id].indexOf(o.id)}))}).length>0})},filteredLocations:function(){var e=this;return this.locations.filter(function(t){return(!e.selectedEntities.employees.length||e.selectedEntities.employees.filter(function(i){return i.serviceList.filter(function(o){return i.id in e.entitiesRelations&&o.id in e.entitiesRelations[i.id]&&-1!==e.entitiesRelations[i.id][o.id].indexOf(t.id)}).length>0}).length>0)&&(!e.selectedEntities.services.length||e.filteredEmployees().filter(function(i){return i.id in e.entitiesRelations&&i.serviceList.filter(function(o){return o.id in e.entitiesRelations[i.id]&&-1!==e.entitiesRelations[i.id][o.id].indexOf(t.id)&&-1!==e.selectedEntities.services.map(function(e){return e.id}).indexOf(o.id)}).length>0}).length>0)})},getParsedEntity:function(){var e=this.allEntitiesSelected.services?[]:this.selectedEntities.services.map(function(e){return{entityId:e.id,entityType:"service"}}),t=this.allEntitiesSelected.locations?[]:this.selectedEntities.locations.map(function(e){return{entityId:e.id,entityType:"location"}}),i=this.allEntitiesSelected.employees?[]:this.selectedEntities.employees.map(function(e){return{entityId:e.id,entityType:"employee"}});return{name:this.resource.name,quantity:this.resource.quantity,shared:this.sharedResource?null:this.resource.shared,status:this.resource.status,entities:e.concat(t).concat(i)}},closeDialog:function(){this.$emit("closeDialog")},clearValidation:function(){void 0!==this.$refs.resource&&this.$refs.resource.clearValidate()}},components:{DialogActions:n.a}}},1065:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.resource.id}},[i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:16}},[0!=e.resource.id?i("h2",[e._v(e._s(e.$root.labels.edit_resource))]):i("h2",[e._v(e._s(e.$root.labels.new_resource))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),i("el-form",{ref:"resource",attrs:{model:e.resource,rules:e.rules,"label-position":"top"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[i("el-form-item",{attrs:{prop:"name"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.name)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.resource_name_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input",{attrs:{placeholder:e.$root.labels.resource_name_ph},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.resource,"name")}},model:{value:e.resource.name,callback:function(t){e.$set(e.resource,"name",t)},expression:"resource.name"}})],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.resource_quantity+":"}},[i("el-input-number",{attrs:{min:1,"auto-complete":"off"},on:{input:function(t){return e.clearValidation()}},model:{value:e.resource.quantity,callback:function(t){e.$set(e.resource,"quantity",t)},expression:"resource.quantity"}})],1),e._v(" "),i("el-form-item",[i("el-radio",{staticStyle:{"margin-bottom":"10px"},attrs:{label:!0},on:{change:function(t){return e.changeResourceSharing()}},model:{value:e.sharedResource,callback:function(t){e.sharedResource=t},expression:"sharedResource"}},[e._v("\n "+e._s(e.$root.labels.resource_shared)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.resource_shared_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-radio",{staticStyle:{"margin-bottom":"10px"},attrs:{label:!1},on:{change:function(t){return e.changeResourceSharing()}},model:{value:e.sharedResource,callback:function(t){e.sharedResource=t},expression:"sharedResource"}},[e._v("\n "+e._s(e.locations.length?e.$root.labels.resource_separate1:e.$root.labels.resource_separate2)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.locations.length?e.$root.labels.resource_separate_tooltip1:e.$root.labels.resource_separate_tooltip2)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1),e._v(" "),e.locations.length?i("el-form-item",{staticStyle:{"margin-left":"27px"}},[i("el-radio",{staticStyle:{"margin-bottom":"10px"},attrs:{label:"service",disabled:e.sharedResource},model:{value:e.resource.shared,callback:function(t){e.$set(e.resource,"shared",t)},expression:"resource.shared"}},[e._v("\n "+e._s(e.$root.labels.service)+"\n ")]),e._v(" "),i("el-radio",{staticStyle:{"margin-bottom":"10px"},attrs:{label:"location",disabled:e.sharedResource},model:{value:e.resource.shared,callback:function(t){e.$set(e.resource,"shared",t)},expression:"resource.shared"}},[e._v("\n "+e._s(e.$root.labels.location)+"\n ")])],1):e._e(),e._v(" "),i("hr"),e._v(" "),i("label",[e._v("\n "+e._s(e.$root.labels.resource_included_in)+"\n ")]),e._v(" "),e.services.length?i("el-form-item",{attrs:{label:e.$root.labels.services+":"}},[i("el-select",{attrs:{placeholder:e.$root.labels.all_services,multiple:"",filterable:"","value-key":"id",clearable:"","collapse-tags":""},on:{change:function(t){return e.selectEntity("services")}},model:{value:e.selectedEntities.services,callback:function(t){e.$set(e.selectedEntities,"services",t)},expression:"selectedEntities.services"}},[i("div",{staticClass:"am-drop-parent",class:{"am-resource-all-selected":e.allEntitiesSelected.services},on:{click:function(t){return e.selectAllEntities("services")}}},[i("span",[e._v(e._s(e.$root.labels.all_services))])]),e._v(" "),e._l(e.categories,function(t){return i("div",{key:t.id},[i("div",{staticClass:"am-drop-parent",on:{click:function(i){return e.selectAllInCategory(t)}}},[i("span",[e._v(e._s(t.name))])]),e._v(" "),e._l(t.serviceList,function(e){return i("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e}})})],2)})],2)],1):e._e(),e._v(" "),e.locations.length?i("el-form-item",{attrs:{label:e.$root.labels.locations+":"}},[i("el-select",{attrs:{placeholder:e.$root.labels.all_locations,multiple:"",filterable:"","value-key":"id",clearable:"","collapse-tags":""},on:{change:function(t){return e.selectEntity("locations")}},model:{value:e.selectedEntities.locations,callback:function(t){e.$set(e.selectedEntities,"locations",t)},expression:"selectedEntities.locations"}},[i("div",{staticClass:"am-drop-parent",class:{"am-resource-all-selected":e.allEntitiesSelected.locations},on:{click:function(t){return e.selectAllEntities("locations")}}},[i("span",[e._v(e._s(e.$root.labels.all_locations))])]),e._v(" "),e._l(e.locations,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e}})})],2)],1):e._e(),e._v(" "),e.employees.length?i("el-form-item",{attrs:{label:e.$root.labels.employees+":"}},[i("el-select",{attrs:{placeholder:e.$root.labels.all_employees,multiple:"",filterable:"",clearable:"","value-key":"id","collapse-tags":""},on:{change:function(t){return e.selectEntity("employees")}},model:{value:e.selectedEntities.employees,callback:function(t){e.$set(e.selectedEntities,"employees",t)},expression:"selectedEntities.employees"}},[i("div",{staticClass:"am-drop-parent",class:{"am-resource-all-selected":e.allEntitiesSelected.employees},on:{click:function(t){return e.selectAllEntities("employees")}}},[i("span",[e._v(e._s(e.$root.labels.all_employees))])]),e._v(" "),e._l(e.employees,function(e){return i("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e}})})],2)],1):e._e()],1)],1),e._v(" "),i("dialog-actions",{attrs:{formName:"resource",urlName:"resources",isNew:0===e.resource.id,entity:e.resource,getParsedEntity:e.getParsedEntity,hasIcons:!0,updateStash:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{status:{yes:"visible"===e.resource.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.no}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!0,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:!0},message:{success:{save:e.$root.labels.resource_saved,remove:e.$root.labels.resource_deleted,show:e.$root.labels.resource_visible,hide:e.$root.labels.resource_hidden},confirm:{remove:e.$root.labels.confirm_delete_resource,show:e.$root.labels.confirm_show_resource,hide:e.$root.labels.confirm_hide_resource,duplicate:e.$root.labels.confirm_duplicate_resource}}}})],1)},staticRenderFns:[]}},1066:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-wrap"},[i("div",{staticClass:"am-body",attrs:{id:"am-services"}},[i("page-header",{attrs:{bookableType:e.typeTab,servicesTotal:e.countTotal,categoriesTotal:e.categories.length,packagesTotal:e.showPurchasedPackages?-1:e.packages.length,resourcesTotal:e.resources?e.resources.length:0},on:{newServiceBtnClicked:function(t){return e.showDialogNewService()},newPackageBtnClicked:function(t){return e.showDialogNewPackage()},newPackageBookingBtnClicked:function(t){return e.showDialogNewPackageBooking()},newResourceBtnClicked:function(t){return e.showDialogNewResource()}}}),e._v(" "),e.showPurchasedPackages?e._e():i("div",{staticClass:"am-section"},[e.$root.licence.isPro||e.$root.licence.isDeveloper?i("el-tabs",{model:{value:e.typeTab,callback:function(t){e.typeTab=t},expression:"typeTab"}},[i("el-tab-pane",{key:0,attrs:{label:e.$root.labels.services,name:"services"}}),e._v(" "),i("el-tab-pane",{key:1,attrs:{label:e.$root.labels.packages,name:"packages"}}),e._v(" "),i("el-tab-pane",{key:2,attrs:{label:e.$root.labels.resources,name:"resources"}})],1):e._e(),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:"services"===e.typeTab||!e.$root.licence.isPro&&!e.$root.licence.isDeveloper,expression:"typeTab === 'services' || (!$root.licence.isPro && !$root.licence.isDeveloper)"}],key:0,staticClass:"am-services-categories"},[i("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetched,expression:"!fetched"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),e.fetched?i("el-row",{staticClass:"am-flexed am-side-bar-category"},[i("el-col",{attrs:{md:8}},[i("div",{staticClass:"am-categories-column am-section"},[i("h2",[e._v(e._s(e.$root.labels.categories))]),e._v(" "),i("div",{staticClass:"am-category-item",class:{active:0===Object.keys(e.activeCategory).length},on:{click:function(t){return e.filterServices({})}}},[i("h3",[i("span",{staticClass:"am-category-title"},[e._v("\n "+e._s(e.$root.labels.all_services)+"\n ")])])]),e._v(" "),i("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropCategory},model:{value:e.categories,callback:function(t){e.categories=t},expression:"categories"}},[i("transition-group",{attrs:{name:"list-complete"}},e._l(e.categories,function(t){return i("div",{key:t.id,staticClass:"am-category-item",class:{active:e.activeCategory.id===t.id},on:{click:function(i){return e.filterServices(t)}}},[i("h3",{staticClass:"am-three-dots"},[i("span",{staticClass:"am-drag-handle"},[i("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.editedCategoryName,expression:"editedCategoryName"}],ref:"input",refInFor:!0,staticClass:"am-category-title",class:{hidden:e.editedCategoryId!==t.id},style:{border:""===this.editedCategoryName?"3px solid red":""},domProps:{value:e.editedCategoryName},on:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.editCategoryName(t,i)},input:function(t){t.target.composing||(e.editedCategoryName=t.target.value)}}}),e._v(" "),i("span",{staticClass:"am-category-title",class:{hidden:e.editedCategoryId===t.id},model:{value:t.name,callback:function(i){e.$set(t,"name",i)},expression:"category.name"}},[e._v("\n "+e._s(t.name)+"\n "),i("span",{staticClass:"am-category-title-id"},[e._v(" ("+e._s(e.$root.labels.id)+": "+e._s(t.id)+")")])])]),e._v(" "),i("div",{staticClass:"am-category-item-footer"},[i("el-row",{staticStyle:{"flex-wrap":"wrap"},attrs:{type:"flex",align:"middle"}},[i("el-col",{attrs:{md:12,sm:12}},[i("span",{staticClass:"service-count"},[e._v(" "+e._s(t.serviceList.length)+" "+e._s(1===t.serviceList.length?e.$root.labels.service:e.$root.labels.services))])]),e._v(" "),i("el-col",{staticClass:"align-right category-actions",attrs:{md:12,sm:12}},[i("span",{class:{active:e.editedCategoryId===t.id},on:{click:function(i){return e.showDialogTranslateCategory(t)}}},[i("img",{staticClass:"svg-amelia edit gray",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}})]),e._v(" "),i("span",{class:{active:e.editedCategoryId===t.id},on:{click:function(i){return e.editCategoryName(t,i)}}},[i("img",{staticClass:"svg-amelia edit",attrs:{width:"16px",src:e.$root.getUrl+"public/img/edit.svg"}}),e._v(" "),i("i",{staticClass:"el-icon-success done"})]),e._v(" "),i("span",{on:{click:function(i){return e.duplicateCategory(t)}}},[i("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/copy.svg"}})]),e._v(" "),!0===e.$root.settings.capabilities.canDelete?i("span",{on:{click:function(i){return e.handleCategoryDeleteConfirmation(t)}}},[i("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e()])],1),e._v(" "),i("el-collapse-transition",[i("div",{directives:[{name:"show",rawName:"v-show",value:e.deleteConfirmation&&e.categoryToDeleteId===t.id,expression:"deleteConfirmation && categoryToDeleteId === category.id"}],staticClass:"am-confirmation"},[i("p",[e._v(e._s(e.$root.labels.delete_category_confirmation)+"?")]),e._v(" "),i("el-alert",{attrs:{title:"",type:"warning",description:"",closable:!1}}),e._v(" "),i("div",{staticClass:"align-right"},[i("el-button",{attrs:{size:"small"},on:{click:function(t){return e.hideDeleteCategoryDialog()}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),i("el-button",{attrs:{size:"small",type:"primary",loading:e.loadingDeleteCategory},on:{click:function(i){return e.deleteCategory(t)}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)],1)])],1)])}),0)],1),e._v(" "),i("el-button",{staticClass:"am-dialog-create",attrs:{size:"large",type:"primary",loading:e.loadingAddCategory},on:{click:e.addCategory}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_category))])])],1)]),e._v(" "),i("el-col",{attrs:{md:16}},[i("div",{staticClass:"am-services-column am-section"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:12}},[i("h2",{directives:[{name:"show",rawName:"v-show",value:0===Object.keys(e.activeCategory).length,expression:"Object.keys(activeCategory).length === 0"}]},[e._v("\n "+e._s(e.$root.labels.all_services)+"\n ")]),e._v(" "),i("h2",{directives:[{name:"show",rawName:"v-show",value:0!==Object.keys(e.activeCategory).length,expression:"Object.keys(activeCategory).length !== 0"}]},[e._v("\n "+e._s(e.activeCategory.name)+"\n\n ")])]),e._v(" "),i("el-col",{staticClass:"am-align-right",attrs:{md:12}},[i("span",{staticClass:"am-sort-services-label"},[e._v(e._s(e.$root.labels.services_sorting))]),e._v(" "),i("el-select",{staticClass:"am-sort-services",attrs:{clearable:"",placeholder:"Sort Services"},on:{change:e.changeServiceSorting},model:{value:e.sortingServices,callback:function(t){e.sortingServices=t},expression:"sortingServices"}},e._l(e.sortingSelection,function(e){return i("el-option",{key:e.sortValue,attrs:{label:e.sortName,value:e.sortValue}})}),1)],1)],1),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&0===e.categories.length,expression:"fetched && categories.length === 0"}],staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),i("h2",[e._v(e._s(e.$root.labels.no_categories_yet))]),e._v(" "),i("p",[e._v(e._s(e.$root.labels.click_add_category))])]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&e.fetchedFiltered&&0!==e.categories.length&&0===e.services.filter(function(e){return e.visible}).length,expression:"fetched && fetchedFiltered && categories.length !== 0 && services.filter(item => item.visible).length === 0"}],staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),i("h2",[e._v(e._s(e.$root.labels.no_services_yet))]),e._v(" "),i("p",[e._v(e._s(e.$root.labels.click_add_service))])]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&!e.fetchedFiltered,expression:"fetched && !fetchedFiltered"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedFiltered&&e.fetched&&0!==e.categories.length,expression:"fetchedFiltered && fetched && categories.length !== 0"}],staticClass:"am-services-grid"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:24}},[i("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropService},model:{value:e.services,callback:function(t){e.services=t},expression:"services"}},e._l(e.services,function(t,o){return i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"service.visible"}],staticClass:"am-service-card",class:{"am-hidden-entity":"hidden"===t.status},on:{click:function(i){return e.showDialogEditService(t.id)}}},[i("span",{staticClass:"am-drag-handle"},[i("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),i("div",{staticClass:"am-service-photo"},[i("img",{attrs:{src:e.pictureLoad(t,!1)},on:{error:function(i){return e.imageLoadError(t,!1)}}}),e._v(" "),i("span",{staticClass:"am-service-color",style:e.bgColor(t.color)})]),e._v(" "),i("div",{staticClass:"am-service-data"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:12}},[i("h4",[e._v("\n "+e._s(t.name)+"\n "),i("span",{staticClass:"am-service-data-id"},[e._v(" ("+e._s(e.$root.labels.id)+": "+e._s(t.id)+")")])])]),e._v(" "),i("el-col",{attrs:{md:6}},[i("p",[e._v(e._s(e.$root.labels.duration)+": "+e._s(e.secondsToNiceDuration(t.duration)))])]),e._v(" "),i("el-col",{attrs:{md:6}},[i("p",[e._v(e._s(e.$root.labels.price)+": "+e._s(e.getFormattedPrice(t.price)))])])],1)],1)])}),0)],1)],1)],1),e._v(" "),i("pagination-block",{attrs:{params:e.paginationParams,show:e.paginationParams.show,count:e.countFiltered,label:e.$root.labels.services.toLowerCase(),visible:e.fetched&&e.fetchedFiltered&&0!==e.services.length&&e.countTotal>e.paginationParams.show},on:{change:e.getServices}})],1)])],1):e._e()],1),e._v(" "),e.$root.licence.isPro||e.$root.licence.isDeveloper?i("div",{directives:[{name:"show",rawName:"v-show",value:"packages"===e.typeTab,expression:"typeTab === 'packages'"}],key:1,staticClass:"am-services-categories am-packages-feature"},[i("BlockLite",{attrs:{message:"This feature is available only in Pro and Developer licenses."}}),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetched,expression:"!fetched"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),e.fetched?i("el-row",{staticClass:"am-flexed"},[i("el-col",{attrs:{md:24}},[i("div",{staticClass:"am-services-column am-section"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:12}},[i("h2"),e._v(" "),i("h2")]),e._v(" "),i("el-col",{staticClass:"am-align-right",attrs:{md:12}},[i("span",{staticClass:"am-sort-services-label"},[e._v(e._s(e.$root.labels.packages_sorting))]),e._v(" "),i("el-select",{staticClass:"am-sort-services",attrs:{clearable:"",placeholder:"Sort Packages"},on:{change:e.changePackagesSorting},model:{value:e.sortingPackages,callback:function(t){e.sortingPackages=t},expression:"sortingPackages"}},e._l(e.sortingSelection,function(e){return i("el-option",{key:e.sortValue,attrs:{label:e.sortName,value:e.sortValue}})}),1)],1)],1),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&0===e.packages.length,expression:"fetched && packages.length === 0"}],staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),i("h2",[e._v(e._s(e.$root.labels.no_packages_yet))]),e._v(" "),i("p",[e._v(e._s(e.$root.labels.click_add_package))])]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&0!==e.packages.length,expression:"fetched && packages.length !== 0"}],staticClass:"am-services-grid"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:24}},[i("draggable",{attrs:{options:e.draggableOptions},on:{end:e.dropPackage},model:{value:e.packages,callback:function(t){e.packages=t},expression:"packages"}},e._l(e.packages,function(t,o){return i("div",{staticClass:"am-service-card",class:{"am-hidden-entity":"hidden"===t.status},on:{click:function(t){return e.showDialogEditPackage(o)}}},[i("span",{staticClass:"am-drag-handle"},[i("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:e.$root.getUrl+"public/img/burger-menu.svg"}})]),e._v(" "),i("div",{staticClass:"am-service-photo"},[i("img",{attrs:{src:e.pictureLoad(t,!1)},on:{error:function(i){return e.imageLoadError(t,!1)}}}),e._v(" "),i("span",{staticClass:"am-service-color",style:e.bgColor(t.color)})]),e._v(" "),i("div",{staticClass:"am-service-data"},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",staticStyle:{"margin-bottom":"0"},attrs:{gutter:10}},[i("el-col",{staticStyle:{margin:"auto"},attrs:{lg:7,md:7}},[i("span",{staticStyle:{"font-size":"16px","line-height":"1.5","font-weight":"500",color:"#354052"}},[e._v("\n "+e._s(t.name)+"\n "),i("span",{staticClass:"am-service-data-id"},[e._v(" ("+e._s(e.$root.labels.id)+": "+e._s(t.id)+")")])])]),e._v(" "),i("el-col",{staticStyle:{margin:"auto",display:"flex"},attrs:{lg:3,md:3}},[i("p",[e._v(e._s(e.$root.labels.services)+": "+e._s(t.bookable.length))])]),e._v(" "),i("el-col",{staticStyle:{margin:"auto",display:"flex"},attrs:{lg:4,md:4}},[i("p",[e._v(e._s(e.$root.labels.price)+": "+e._s(e.getFormattedPrice(t.calculatedPrice?t.price:t.price-t.price/100*t.discount)))])]),e._v(" "),i("el-col",{staticClass:"align-right",staticStyle:{margin:"auto"},attrs:{lg:10,md:10,sm:12}},[i("div",{on:{click:function(e){e.stopPropagation()}}},[i("el-button",{on:{click:function(i){return e.purchasedPackages(t)}}},[e._v(e._s(e.$root.labels.purchased_packages))]),e._v(" "),i("el-button",{on:{click:function(t){return e.showDialogEditPackage(o)}}},[e._v(e._s(e.$root.labels.edit))])],1)])],1)],1)])}),0)],1)],1)],1)],1)])],1):e._e()],1):e._e(),e._v(" "),e.$root.licence.isPro||e.$root.licence.isDeveloper?i("div",{directives:[{name:"show",rawName:"v-show",value:"resources"===e.typeTab,expression:"typeTab === 'resources'"}],key:2,staticClass:"am-services-categories am-resources-feature"},[i("BlockLite",{attrs:{message:"This feature is available only in Pro and Developer licenses."}}),e._v(" "),i("el-row",{staticClass:"am-flexed"},[i("el-col",{attrs:{md:24}},[i("div",{staticClass:"am-resource-section am-services-column"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:24}},[i("el-popover",e._b({ref:"filterSearchPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("div",{directives:[{name:"popover",rawName:"v-popover:filterSearchPop",arg:"filterSearchPop"}],staticClass:"am-search"},[i("el-input",{attrs:{placeholder:e.$root.labels.resource_search_placeholder,name:"search",disabled:e.$root.licence.isLite},model:{value:e.searchResource,callback:function(t){e.searchResource=t},expression:"searchResource"}})],1)],1)],1),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetchedResources,expression:"!fetchedResources"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedResources&&0===e.resources.length&&!e.searchResource,expression:"fetchedResources && resources.length === 0 && !searchResource"}],staticClass:"am-empty-state am-section",staticStyle:{position:"relative"}},[i("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),i("h2",[e._v(e._s(e.$root.labels.no_resources_yet))]),e._v(" "),i("p",[e._v(e._s(e.$root.labels.click_add_resource))])]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedResources&&0===e.resources.length&&!!e.searchResource,expression:"fetchedResources && resources.length === 0 && !!searchResource"}],staticClass:"am-empty-state am-section",staticStyle:{position:"relative"}},[i("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),i("h2",[e._v(e._s(e.$root.labels.no_results))])]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedResources&&0!==e.resources.length,expression:"fetchedResources && resources.length !== 0"}],staticClass:"am-services-grid"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:24}},[i("div",{staticClass:"am-resources"},[i("div",{staticClass:"am-resources-header",staticStyle:{"border-bottom":"1px solid #E2E6EC"}},[i("el-row",{attrs:{gutter:10,align:"middle"}},[i("el-col",{attrs:{lg:1,md:1}},[i("p",[!0===e.$root.settings.capabilities.canDelete?i("el-checkbox",{on:{change:e.handleCheckAllResources},model:{value:e.allResourcesChecked,callback:function(t){e.allResourcesChecked=t},expression:"allResourcesChecked"}}):e._e()],1)]),e._v(" "),i("el-col",{attrs:{lg:3,md:3}},[i("p",[e._v(e._s(e.$root.labels.resource)+":")])]),e._v(" "),i("el-col",{attrs:{lg:2,md:2}},[i("p",[e._v(e._s(e.$root.labels.resource_quantity)+":")])]),e._v(" "),i("el-col",{attrs:{lg:e.hasLocations()?5:7,md:e.hasLocations()?5:7}},[i("p",[e._v(e._s(e.$root.labels.services)+":")])]),e._v(" "),e.hasLocations()?i("el-col",{attrs:{lg:5,md:5}},[i("p",[e._v(e._s(e.$root.labels.locations)+":")])]):e._e(),e._v(" "),i("el-col",{attrs:{lg:e.hasLocations()?4:7,md:e.hasLocations()?4:7}},[i("p",[e._v(e._s(e.$root.labels.employees)+":")])]),e._v(" "),i("el-col",{attrs:{lg:2,md:2}},[i("p",[e._v(e._s(e.$root.labels.type)+":")])]),e._v(" "),i("el-col",{attrs:{lg:2,md:2}},[i("p")])],1)],1),e._v(" "),i("div",[i("div",{staticClass:"am-resources-list"},[i("el-collapse",e._l(e.resources,function(t){return i("el-collapse-item",{key:t.id,staticClass:"am-resource",class:{"am-hidden-entity":"hidden"===t.status},attrs:{name:t.id}},[i("template",{slot:"title"},[i("div",{staticClass:"am-resource-data"},[i("el-row",{attrs:{gutter:10,align:"middle"}},[i("el-col",{staticStyle:{"margin-top":"4px"},attrs:{lg:1,sm:1}},[i("span",{staticClass:"am-resource-checkbox"},[!0===e.$root.settings.capabilities.canDelete?i("el-checkbox",{attrs:{value:t.id,label:t.id},on:{change:e.handleCheckResource},model:{value:t.checked,callback:function(i){e.$set(t,"checked",i)},expression:"res.checked"}}):e._e()],1)]),e._v(" "),i("el-col",{attrs:{lg:3,sm:3}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.resource)+":")]),e._v(" "),i("p",[e._v(e._s(t.name))])]),e._v(" "),i("el-col",{attrs:{lg:2,sm:2}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.resource_quantity)+":")]),e._v(" "),i("p",[e._v(e._s(t.quantity))])]),e._v(" "),i("el-col",{staticClass:"am-resource-entities",attrs:{lg:e.hasLocations()?5:7,sm:e.hasLocations()?5:7}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.services)+":")]),e._v(" "),i("div",[t.services&&t.services.length?i("p",[e._v("\n "+e._s(t.services[0]?t.services[0].name:"")+"\n "),t.services.length>1?i("span",{staticClass:"am-resource-entities-plus"},[e._v("\n +"+e._s(t.services.length-1)+"\n ")]):e._e()]):i("p",[e._v(e._s(e.$root.labels.all_services))])])]),e._v(" "),e.hasLocations()?i("el-col",{staticClass:"am-resource-entities",attrs:{lg:5,sm:5}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.locations)+":")]),e._v(" "),i("div",[t.locations&&t.locations.length?i("p",[e._v("\n "+e._s(t.locations[0]?t.locations[0].name:"")+"\n "),t.locations.length>1?i("span",{staticClass:"am-resource-entities-plus"},[e._v("\n +"+e._s(t.locations.length-1)+"\n ")]):e._e()]):i("p",[e._v(e._s(e.$root.labels.all_locations))])])]):e._e(),e._v(" "),i("el-col",{staticClass:"am-resource-entities",attrs:{lg:e.hasLocations()?4:7,sm:e.hasLocations()?4:7}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.employees)+":")]),e._v(" "),t.employees&&t.employees.length>1?i("div",{staticClass:"am-assigned am-multiple-employees"},[e._l(t.employees,function(t,o){return o<=4?i("img",{key:t.id,attrs:{src:e.pictureLoad(t,!0)},on:{error:function(i){return e.imageLoadError(t,!0)}}}):e._e()}),e._v(" "),t.employees.length-5>0?i("span",{staticClass:"am-resource-entities-plus",staticStyle:{"margin-left":"0"}},[e._v(" +"+e._s(t.employees.length-5))]):e._e()],2):t.employees&&1===t.employees.length?i("div",{staticClass:"am-assigned"},[i("img",{attrs:{src:e.pictureLoad(t.employees[0],!0)},on:{error:function(i){return e.imageLoadError(t.employees[0],!0)}}}),e._v(" "),i("p",[e._v("\n "+e._s(t.employees[0].firstName+" "+t.employees[0].lastName)+"\n ")])]):i("p",[e._v(e._s(e.$root.labels.all_employees))])]),e._v(" "),i("el-col",{staticClass:"am-resource-entities",attrs:{lg:2,md:2}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.type)+":")]),e._v(" "),t.shared?i("p",{staticStyle:{"margin-bottom":"0","margin-top":"8px"}},[e._v("\n "+e._s(e.$root.labels.unique)+"\n ")]):e._e(),e._v(" "),t.shared?i("span",[e._v("("+e._s(e.$root.labels[t.shared])+")")]):i("p",[e._v("\n "+e._s(e.$root.labels.shared)+"\n ")])]),e._v(" "),i("el-col",{attrs:{lg:2,sm:2}},[i("div",{staticClass:"am-edit-btn",on:{click:function(e){e.stopPropagation()}}},[i("el-button",{staticClass:"am-button-icon",staticStyle:{"margin-top":"0","margin-right":"15px"},on:{click:function(i){return e.showDialogEditResource(t)}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})])],1)])],1)],1)]),e._v(" "),[i("div",[i("el-row",[i("el-col",{attrs:{lg:6,md:6}},[i("h3")]),e._v(" "),i("el-col",{staticClass:"am-resource-entity-wrap",attrs:{lg:5,md:5}},[i("p",[e._v(e._s(e.$root.labels.services)+":")]),e._v(" "),i("div",{staticClass:"am-resource-entity-list"},[t.services.length>0?i("div",[e._l(e.showAllServices?t.services:t.services.slice(0,3),function(t){return i("p",[e._v("\n "+e._s(t.name)+"\n ")])}),e._v(" "),t.services.length>3&&!e.showAllServices?i("p",{staticClass:"am-link",on:{click:function(t){e.showAllServices=!e.showAllServices}}},[e._v("\n "+e._s(e.$root.labels.resource_view_more)+"\n ")]):e._e(),e._v(" "),t.services.length>3&&e.showAllServices?i("p",{staticClass:"am-link",on:{click:function(t){e.showAllServices=!e.showAllServices}}},[e._v("\n "+e._s(e.$root.labels.resource_view_less)+"\n ")]):e._e()],2):i("p",[e._v("\n "+e._s(e.$root.labels.all_services)+"\n ")])])]),e._v(" "),i("el-col",{staticClass:"am-resource-entity-wrap",attrs:{lg:5,md:5}},[i("p",[e._v(e._s(e.$root.labels.locations)+":")]),e._v(" "),i("div",{staticClass:"am-resource-entity-list"},[t.locations.length>0?i("div",[e._l(e.showAllLocations?t.locations:t.locations.slice(0,3),function(t){return i("p",[e._v("\n "+e._s(t.name)+"\n ")])}),e._v(" "),t.locations.length>3&&!e.showAllLocations?i("p",{staticClass:"am-link",on:{click:function(t){e.showAllLocations=!e.showAllLocations}}},[e._v("\n "+e._s(e.$root.labels.resource_view_more)+"\n ")]):e._e(),e._v(" "),t.locations.length>3&&e.showAllLocations?i("p",{staticClass:"am-link",on:{click:function(t){e.showAllLocations=!e.showAllLocations}}},[e._v("\n "+e._s(e.$root.labels.resource_view_less)+"\n ")]):e._e()],2):i("p",[e._v("\n "+e._s(e.$root.labels.all_locations)+"\n ")])])]),e._v(" "),i("el-col",{staticClass:"am-resource-entity-wrap",attrs:{lg:5,md:5}},[i("p",[e._v(e._s(e.$root.labels.employees)+":")]),e._v(" "),i("div",{staticClass:"am-resource-entity-list"},[t.employees.length>0?i("div",[e._l(e.showAllEmployees?t.employees:t.employees.slice(0,3),function(t){return i("div",{staticClass:"am-assigned"},[i("img",{attrs:{src:e.pictureLoad(t,!0)},on:{error:function(i){return e.imageLoadError(t,!0)}}}),e._v(" "),i("p",[e._v("\n "+e._s(t.firstName+" "+t.lastName)+"\n ")])])}),e._v(" "),t.employees.length>3&&!e.showAllEmployees?i("p",{staticClass:"am-link",on:{click:function(t){e.showAllEmployees=!e.showAllEmployees}}},[e._v("\n "+e._s(e.$root.labels.resource_view_more)+"\n ")]):e._e(),e._v(" "),t.employees.length>3&&e.showAllEmployees?i("p",{staticClass:"am-link",on:{click:function(t){e.showAllEmployees=!e.showAllEmployees}}},[e._v("\n "+e._s(e.$root.labels.resource_view_less)+"\n ")]):e._e()],2):i("p",[e._v("\n "+e._s(e.$root.labels.all_employees)+"\n ")])])]),e._v(" "),i("el-col",{attrs:{lg:2,sm:2}},[i("h4")])],1)],1)]],2)}),1)],1)])])])],1),e._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[e.toaster?i("div",{staticClass:"am-bottom-popover"},[i("transition",{attrs:{name:"fade"}},[i("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.showConfirmDelete,expression:"!showConfirmDelete"}],staticClass:"am-button-icon",on:{click:function(t){e.showConfirmDelete=!0}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})])],1),e._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.showConfirmDelete,expression:"showConfirmDelete"}],staticClass:"am-bottom-popover-confirmation"},[i("el-row",{attrs:{type:"flex",justify:"start",align:"middle"}},[i("h3",[e._v(e._s(e.$root.labels["confirm_delete_resource"+(e.countCheckedResources()>1?"_plural":"")]))]),e._v(" "),i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small"},on:{click:function(t){e.toaster=!1}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),i("el-button",{attrs:{size:"small",type:"primary",loading:e.loadDeleteResourcesBtn},on:{click:e.deleteCheckedResources}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)])],1)])],1):e._e()])],1)],1)])],1)],1):e._e()],1),e._v(" "),e.showPurchasedPackages?i("packages",{attrs:{"purchased-package":e.purchasedPackage,"dialog-package-booking":e.dialogPackageBooking},on:{closePurchasedPackages:e.closePurchasedPackage,closePackageBooking:function(t){e.dialogPackageBooking=!1},savePackageBookingCallback:e.getOptions}}):e._e(),e._v(" "),e.categories.length>0&&!0===e.$root.settings.capabilities.canWrite?i("div",{staticClass:"am-button-new",attrs:{id:"am-button-new"}},[i("el-button",{attrs:{id:"am-plus-symbol",type:"primary",icon:"el-icon-plus"},on:{click:function(t){return e.showNewEntityDialog()}}})],1):e._e(),e._v(" "),i("transition",{attrs:{name:"slide"}},[e.dialogService?i("el-dialog",{staticClass:"am-side-dialog am-dialog-service",attrs:{"close-on-click-modal":!1,visible:e.dialogService,"show-close":!1},on:{"update:visible":function(t){e.dialogService=t}}},[i("dialog-service",{attrs:{categories:e.categories,passedService:e.service,employees:e.options.employees,settings:e.options.settings,futureAppointments:e.futureAppointments,newExtraTranslations:e.newExtraTranslations},on:{saveCallback:e.saveServiceCallback,duplicateCallback:e.duplicateServiceCallback,closeDialog:function(t){e.dialogService=!1},showDialogTranslate:e.showDialogTranslate,extraSaved:e.extraSaved}})],1):e._e()],1),e._v(" "),i("transition",{attrs:{name:"slide"}},[e.dialogTranslate?i("el-dialog",{staticClass:"am-side-dialog am-dialog-translate am-edit",attrs:{"close-on-click-modal":!1,"show-close":!0,visible:e.dialogTranslate,service:e.service},on:{"update:visible":function(t){e.dialogTranslate=t}}},[i("dialog-translate",{attrs:{"passed-translations":e.dialogTranslateData,name:e.dialogTranslateName,allLanguagesData:e.languagesData,"used-languages":e.options.settings.general.usedLanguages,type:e.dialogTranslateType,tab:e.dialogTranslateTab},on:{saveDialogTranslate:e.saveDialogTranslate,closeDialogTranslate:function(t){e.dialogTranslate=!1}}})],1):e._e()],1),e._v(" "),i("transition",{attrs:{name:"slide"}},[e.dialogPackage?i("el-dialog",{staticClass:"am-side-dialog am-dialog-service",attrs:{"close-on-click-modal":!1,visible:e.dialogPackage,"show-close":!1},on:{"update:visible":function(t){e.dialogPackage=t}}},[i("dialog-package",{attrs:{categories:e.categories,passedPackage:e.package,options:{entitiesRelations:e.options.entitiesRelations,entities:{employees:e.options.employees,locations:e.options.locations}},settings:e.options.settings},on:{saveCallback:e.savePackageCallback,duplicateCallback:e.duplicatePackageCallback,closeDialog:function(t){e.dialogPackage=!1},showDialogTranslate:e.showDialogTranslate}})],1):e._e()],1),e._v(" "),i("transition",{attrs:{name:"slide"}},[e.dialogResource?i("el-dialog",{staticClass:"am-side-dialog am-dialog-service",attrs:{"close-on-click-modal":!1,visible:e.dialogResource,"show-close":!1},on:{"update:visible":function(t){e.dialogResource=t}}},[i("dialog-resource",{attrs:{services:e.services,categories:e.categories,employees:e.options.employees,locations:e.options.locations,settings:e.options.settings,passedResource:e.resource,"entities-relations":e.options.entitiesRelations},on:{saveCallback:e.saveResourceCallback,duplicateCallback:e.duplicateResourceCallback,closeDialog:function(t){e.dialogResource=!1}}})],1):e._e()],1),e._v(" "),i("el-col",{attrs:{md:6}},[i("a",{staticClass:"am-help-button",attrs:{href:"https://wpamelia.com/services-and-categories/",target:"_blank"}},[i("i",{staticClass:"el-icon-question"}),e._v(" "+e._s(e.$root.labels.need_help)+"?\n ")])]),e._v(" "),i("dialog-new-customize"),e._v(" "),i("DialogLite")],1)])},staticRenderFns:[]}},678:function(e,t,i){var o=i(335)(i(1047),i(1066),!1,null,null,null);e.exports=o.exports},696:function(e,t,i){"use strict";t.a={data:function(){return{colors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB","31CDF3","6AB76C","FD5FA1","A697C5"],usedColors:[]}},methods:{getAppropriateUrlParams:function(e){if(!this.$root.settings.activation.disableUrlParams)return e;var t=JSON.parse(JSON.stringify(e));return["categories","services","packages","employees","providers","providerIds","extras","locations","events","types","dates"].forEach(function(e){if("extras"===e&&e in t){t.extras=JSON.parse(t.extras);var i=[];t.extras.forEach(function(e){i.push(e.id+"-"+e.quantity)}),t.extras=i.length?i:null}e in t&&Array.isArray(t[e])&&t[e].length&&(t[e]=t[e].join(","))}),t},inlineSVG:function(){var e=i(703);e.init({svgSelector:"img.svg-amelia",initClass:"js-inlinesvg"})},inlineSVGCabinet:function(){setTimeout(function(){i(703).init({svgSelector:"img.svg-cabinet",initClass:"js-inlinesvg"})},100)},imageFromText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.getNameInitials(e),n=Math.floor(Math.random()*this.colors.length),a=this.colors[n];return this.usedColors.push(this.colors[n]),this.colors.splice(n,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),i?t.firstName?this.$root.getUrl+"public/img/default-employee.svg":t.latitude?this.$root.getUrl+"public/img/default-location.svg":this.$root.getUrl+"public/img/default-service.svg":location.protocol+"//via.placeholder.com/120/"+a+"/fff?text="+o},pictureLoad:function(e,t){if(null!==e){var i=!0===t?e.firstName+" "+e.lastName:e.name;if(void 0!==i)return e.pictureThumbPath=e.pictureThumbPath||this.imageFromText(i),e.pictureThumbPath}},imageLoadError:function(e,t){var i=!0===t?e.firstName+" "+e.lastName:e.name;void 0!==i&&(e.pictureThumbPath=this.imageFromText(i,e,!0))},getNameInitials:function(e){return e.split(" ").map(function(e){return e.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},697:function(e,t,i){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={data:function(){return{}},methods:{replaceExistingObjectProperties:function(e,t){var i=this;Object.keys(e).forEach(function(n){null!==e[n]&&"object"===o(e[n])&&n in t?i.replaceExistingObjectProperties(e[n],t[n]):n in t&&(e[n]=t[n])})},addMissingObjectProperties:function(e,t){var i=this;Object.keys(t).forEach(function(n){var a=!1;n in e||("object"===o(t[n])?(e[n]={},a=!0):(e[n]=null,a=!0)),null===t[n]||"object"!==o(t[n])?a&&(e[n]=t[n]):i.addMissingObjectProperties(e[n],t[n])})},scrollView:function(e,t,i){"undefined"!=typeof jQuery&&(void 0!==i&&i||jQuery(window).width()<=600)&&setTimeout(function(){var i=document.getElementById(e);void 0!==i&&null!==i&&i.scrollIntoView({behavior:"smooth",block:t,inline:"end"})},200)},scrollViewInModal:function(e){this.$nextTick(function(){var t=document.getElementById(e),i=document.querySelectorAll(".am-dialog-scrollable");if(t&&i&&i.length){var o=t,n=t.offsetTop;do{n+=(o=o.offsetParent).offsetTop}while(o===i[0]);i[0].scrollTop=n}})},getUrlQueryParams:function(e){var t=e.indexOf("#")>0?e.substring(0,e.indexOf("#")).split("?")[1]:e.split("?")[1];if(t){var i=[],o={};return t.split("&").forEach(function(e){i=e.split("="),o[i[0]]=decodeURIComponent(i[1]).replace(/\+/g," ")}),o}},getUrlParams:function(e){var t={};if(-1!==e.indexOf("?")){var i=[];e.split("?")[1].split("&").forEach(function(e){i=e.split("="),t[i[0]]=decodeURIComponent(i[1]).replace(/\+/g," ")})}return t},removeURLParameter:function(e,t){var i=e.split("?");if(i.length>=2){for(var o=encodeURIComponent(t)+"=",n=i[1].split(/[&;]/g),a=n.length;a-- >0;)-1!==n[a].lastIndexOf(o,0)&&n.splice(a,1);return e=i[0]+(n.length>0?"?"+n.join("&"):"")}return e},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},trimProperty:function(e,t){e[t]=e[t].trim()}}}},698:function(e,t,i){"use strict";var o=i(716),n=i(344),a=Object.prototype.toString;function s(e){return"[object Array]"===a.call(e)}function r(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||s(e)||(e=[e]),s(e))for(var i=0,o=e.length;i<o;i++)t.call(null,e[i],i,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:n,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:r,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:l,isStream:function(e){return r(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function i(i,o){"object"==typeof t[o]&&"object"==typeof i?t[o]=e(t[o],i):t[o]=i}for(var o=0,n=arguments.length;o<n;o++)c(arguments[o],i);return t},extend:function(e,t,i){return c(t,function(t,n){e[n]=i&&"function"==typeof t?o(t,i):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},699:function(e,t,i){"use strict";t.a={data:function(){return{currencies:[{symbol:"$",name:"US Dollar",symbol_native:"$",code:"USD",iso:"us"},{symbol:"€",name:"Euro",symbol_native:"€",code:"EUR",iso:"eu"},{symbol:"£",name:"British Pound Sterling",symbol_native:"£",code:"GBP",iso:"gb"},{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",code:"CAD",iso:"ca"},{symbol:"FCFP",name:"CFP Franc",symbol_native:"FCFP",code:"XPF",iso:"fr"},{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",code:"CHF",iso:"ch"},{symbol:"RUB",name:"Russian Ruble",symbol_native:"руб.",code:"RUB",iso:"ru"},{symbol:"¥",name:"Japanese Yen",symbol_native:"¥",code:"JPY",iso:"jp"},{symbol:"Af",name:"Afghan Afghani",symbol_native:"؋",code:"AFN",iso:"af"},{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",code:"ALL",iso:"al"},{symbol:"DA",name:"Algerian Dinar",symbol_native:"د.ج.",code:"DZD",iso:"dz"},{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",code:"ARS",iso:"ar"},{symbol:"AMD",name:"Armenian Dram",symbol_native:"դր.",code:"AMD",iso:"am"},{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",code:"AUD",iso:"au"},{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"ман.",code:"AZN",iso:"az"},{symbol:"BD",name:"Bahraini Dinar",symbol_native:"د.ب.",code:"BHD",iso:"bh"},{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"৳",code:"BDT",iso:"bd"},{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",code:"BYR",iso:"by"},{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",code:"BZD",iso:"bz"},{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",code:"BOB",iso:"bo"},{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",code:"BAM",iso:"ba"},{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",code:"BWP",iso:"bw"},{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",code:"BRL",iso:"br"},{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",code:"BND",iso:"bn"},{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"лв.",code:"BGN",iso:"bg"},{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",code:"BIF",iso:"bi"},{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",code:"XOF",iso:"auto"},{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",code:"XAF",iso:"auto"},{symbol:"KHR",name:"Cambodian Riel",symbol_native:"៛",code:"KHR",iso:"kh"},{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",code:"CVE",iso:"cv"},{symbol:"CLP",name:"Chilean Peso",symbol_native:"$",code:"CLP",iso:"cl"},{symbol:"CN¥",name:"Chinese Yuan",symbol_native:"CN¥",code:"CNY",iso:"cn"},{symbol:"COP",name:"Colombian Peso",symbol_native:"$",code:"COP",iso:"co"},{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",code:"KMF",iso:"km"},{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",code:"CDF",iso:"cd"},{symbol:"₡",name:"Costa Rican Colón",symbol_native:"₡",code:"CRC",iso:"cr"},{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",code:"HRK",iso:"hr"},{symbol:"Kč",name:"Czech Republic Koruna",symbol_native:"Kč",code:"CZK",iso:"cz"},{symbol:"Dkk",name:"Danish Krone",symbol_native:"kr",code:"DKK",iso:"dk"},{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",code:"DJF",iso:"dj"},{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",code:"DOP",iso:"do"},{symbol:"EGP",name:"Egyptian Pound",symbol_native:"ج.م.",code:"EGP",iso:"eg"},{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",code:"ERN",iso:"er"},{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",code:"EEK",iso:"ee"},{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",code:"ETB",iso:"et"},{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",code:"GEL",iso:"ge"},{symbol:"GH₵",name:"Ghanaian Cedi",symbol_native:"GH₵",code:"GHS",iso:"gh"},{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",code:"GTQ",iso:"gt"},{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",code:"GNF",iso:"gn"},{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",code:"HNL",iso:"hn"},{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",code:"HKD",iso:"hk"},{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",code:"HUF",iso:"hu"},{symbol:"kr",name:"Icelandic Króna",symbol_native:"kr",code:"ISK",iso:"is"},{symbol:"INR",name:"Indian Rupee",symbol_native:"টকা",code:"INR",iso:"in"},{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",code:"IDR",iso:"id"},{symbol:"IRR",name:"Iranian Rial",symbol_native:"﷼",code:"IRR",iso:"ir"},{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"د.ع.",code:"IQD",iso:"iq"},{symbol:"₪",name:"Israeli New Sheqel",symbol_native:"₪",code:"ILS",iso:"il"},{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",code:"JMD",iso:"jm"},{symbol:"JD",name:"Jordanian Dinar",symbol_native:"د.أ.",code:"JOD",iso:"jo"},{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"тңг.",code:"KZT",iso:"kz"},{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",code:"KES",iso:"ke"},{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"د.ك.",code:"KWD",iso:"kw"},{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",code:"LVL",iso:"lv"},{symbol:"LB£",name:"Lebanese Pound",symbol_native:"ل.ل.",code:"LBP",iso:"lb"},{symbol:"LD",name:"Libyan Dinar",symbol_native:"د.ل.",code:"LYD",iso:"ly"},{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",code:"LTL",iso:"lt"},{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",code:"MOP",iso:"mo"},{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",code:"MKD",iso:"mk"},{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",code:"MGA",iso:"mg"},{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",code:"MYR",iso:"my"},{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",code:"MUR",iso:"mu"},{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",code:"MXN",iso:"mx"},{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",code:"MDL",iso:"md"},{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"د.م.",code:"MAD",iso:"ma"},{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",code:"MZN",iso:"mz"},{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",code:"MMK",iso:"mm"},{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",code:"NAD",iso:"na"},{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"नेरू",code:"NPR",iso:"np"},{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",code:"TWD",iso:"tw"},{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",code:"NZD",iso:"nz"},{symbol:"C$",name:"Nicaraguan Córdoba",symbol_native:"C$",code:"NIO",iso:"ni"},{symbol:"₦",name:"Nigerian Naira",symbol_native:"₦",code:"NGN",iso:"ng"},{symbol:"kr",name:"Norwegian Krone",symbol_native:"kr",code:"NOK",iso:"no"},{symbol:"OMR",name:"Omani Rial",symbol_native:"ر.ع.",code:"OMR",iso:"om"},{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"₨",code:"PKR",iso:"pk"},{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",code:"PAB",iso:"pa"},{symbol:"₲",name:"Paraguayan Guarani",symbol_native:"₲",code:"PYG",iso:"py"},{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",code:"PEN",iso:"pe"},{symbol:"₱",name:"Philippine Peso",symbol_native:"₱",code:"PHP",iso:"ph"},{symbol:"zł",name:"Polish Zloty",symbol_native:"zł",code:"PLN",iso:"pl"},{symbol:"QR",name:"Qatari Rial",symbol_native:"ر.ق.",code:"QAR",iso:"qa"},{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",code:"RON",iso:"ro"},{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",code:"RWF",iso:"rw"},{symbol:"SR",name:"Saudi Riyal",symbol_native:"ر.س.",code:"SAR",iso:"sa"},{symbol:"rsd.",name:"Serbian Dinar",symbol_native:"дин.",code:"RSD",iso:"rs"},{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",code:"SGD",iso:"sg"},{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",code:"SOS",iso:"so"},{symbol:"R",name:"South African Rand",symbol_native:"R",code:"ZAR",iso:"za"},{symbol:"₩",name:"South Korean Won",symbol_native:"₩",code:"KRW",iso:"kr"},{symbol:"₭",name:"Lao kip",symbol_native:"₭",code:"LAK",iso:"la"},{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",code:"LKR",iso:"lk"},{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",code:"SDG",iso:"sd"},{symbol:"kr",name:"Swedish Krona",symbol_native:"kr",code:"SEK",iso:"se"},{symbol:"SY£",name:"Syrian Pound",symbol_native:"ل.س.",code:"SYP",iso:"sy"},{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",code:"TZS",iso:"tz"},{symbol:"฿",name:"Thai Baht",symbol_native:"฿",code:"THB",iso:"th"},{symbol:"T$",name:"Tongan Paʻanga",symbol_native:"T$",code:"TOP",iso:"to"},{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",code:"TTD",iso:"tt"},{symbol:"DT",name:"Tunisian Dinar",symbol_native:"د.ت.",code:"TND",iso:"tn"},{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",code:"TRY",iso:"tr"},{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",code:"UGX",iso:"ug"},{symbol:"₴",name:"Ukrainian Hryvnia",symbol_native:"₴",code:"UAH",iso:"ua"},{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"د.إ.",code:"AED",iso:"ae"},{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",code:"UYU",iso:"uy"},{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",code:"UZS",iso:"uz"},{symbol:"Bs.S.",name:"Venezuelan Bolívar",symbol_native:"Bs.S.",code:"VES",iso:"ve"},{symbol:"₫",name:"Vietnamese Dong",symbol_native:"₫",code:"VND",iso:"vn"},{symbol:"YR",name:"Yemeni Rial",symbol_native:"ر.ي.",code:"YER",iso:"ye"},{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",code:"ZMK",iso:"zm"}],thousandSeparatorMap:{1:",",2:".",3:" ",4:" "},decimalSeparatorMap:{1:".",2:",",3:".",4:","}}},methods:{getCurrencySymbol:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.currencies.find(function(t){return t.code===e.$root.settings.payments.currencyCode});return i&&t&&"INR"!==i.code?i.symbol_native:t&&"INR"===i.code?i.code:this.$root.settings.payments.currency},getPriceThousandSeparator:function(){return this.thousandSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceDecimalSeparator:function(){return this.decimalSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceNumberOfDecimalPlaces:function(){return this.$root.settings.payments.priceNumberOfDecimals},getPricePrefix:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"after"===this.$root.settings.payments.priceSymbolPosition||"afterWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"before"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol(e):this.getCurrencySymbol(e)+" "},getPriceSuffix:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"before"===this.$root.settings.payments.priceSymbolPosition||"beforeWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"after"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol(e):" "+this.getCurrencySymbol(e)},getFormattedPrice:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.getPriceNumberOfDecimalPlaces(),o=this.getPriceThousandSeparator(),n=this.getPriceDecimalSeparator(),a=this.getPricePrefix(),s=this.getPriceSuffix(),r=parseInt(e=Math.abs(+e||0).toFixed(i))+"",l=r.length>3?r.length%3:0;return(t?a:"")+(l?r.substr(0,l)+o:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+o)+(i?n+Math.abs(e-r).toFixed(i).slice(2):"")+(t?s:"")}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(!0),suffix:this.getPriceSuffix(!0),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},700:function(e,t,i){"use strict";t.a={methods:{notify:function(e,t,i,o){var n=this;void 0===o&&(o=""),setTimeout(function(){n.$notify({customClass:o,title:e,message:t,type:i,offset:50})},700)}}}},701:function(e,t,i){"use strict";var o=i(0),n=i.n(o);t.a={data:function(){return{timeSelectOptions:{start:"00:00",end:"23:59",step:this.secondsToTimeSelectStep(this.getTimeSlotLength())}}},methods:{convertDateTimeRangeDifferenceToMomentDuration:function(e,t){return n.a.duration(n()(t).diff(n()(e)))},convertSecondsToMomentDuration:function(e){return n.a.duration(e,"seconds")},momentDurationToNiceDurationWithUnit:function(e){var t=Math.floor(e.asMinutes()/60),i=e.asMinutes()%60;return(t?t+this.$root.labels.h+" ":"")+" "+(i?i+this.$root.labels.min:"")},secondsToNiceDuration:function(e){var t=Math.floor(e/3600),i=e/60%60;return(t?t+this.$root.labels.h+" ":"")+" "+(i?i+this.$root.labels.min:"")},secondsToTimeSelectStep:function(e){var t=Math.floor(e/3600),i=Math.floor(e/60)-60*t;return e<0?(t||"00")+":"+((i<9?"0"+i:i)||"00"):((t<=9?"0"+t:t)||"00")+":"+((i<=9?"0"+i:i)||"00")},getTimeSlotLength:function(){return this.$root.settings.general.timeSlotLength},getPossibleDurationsInSeconds:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:86400,i=this.getTimeSlotLength(),o=[],n=i;n<=t;n+=i)o.push(n);return e&&-1===o.indexOf(e)&&(o.push(e),o.sort(function(e,t){return e-t})),o},getTimeSelectOptionsWithLimits:function(e,t){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:e,maxTime:t}},getStringTimeInSeconds:function(e){return n()(e,"HH:mm").diff(n()().startOf("day"),"seconds")}}}},702:function(e,t,i){"use strict";var o=i(722),n=i(715),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={mixins:[o.a,n.a],data:function(){return{}},methods:{getLocationById:function(e){return this.options.entities.locations.find(function(t){return t.id===e})||null},getCustomerById:function(e){return this.options.entities.customers.find(function(t){return t.id===e})||null},getProviderById:function(e){return this.options.entities.employees.find(function(t){return t.id===e})||null},getServiceById:function(e){return this.options.entities.services.find(function(t){return t.id===e})||null},getCategoryById:function(e){return this.options.entities.categories.find(function(t){return t.id===e})||null},getPackageById:function(e){return this.options.entities.packages.find(function(t){return t.id===e})||null},getProviderService:function(e,t){var i=this.getProviderById(e).serviceList.find(function(e){return e.id===parseInt(t)});return i?Object.assign(this.getServiceById(t),i):null},getServiceProviders:function(e,t){var i=this;return void 0!==t&&t?this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)}):this.options.entities.employees.filter(function(t){return-1!==t.serviceList.filter(function(e){return i.isEmployeeService(t.id,e.id)}).map(function(e){return e.id}).indexOf(e)})},getServiceLocations:function(e,t){var i=this,o=[];return this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)}).forEach(function(e){o=i.getProviderLocations(e.id,t).map(function(e){return e.id}).concat(o)}),this.options.entities.locations.filter(function(e){return-1!==o.indexOf(e.id)})},getProviderLocations:function(e,t){var i=this,o=[this.getProviderById(e).locationId];if(e in this.options.entitiesRelations)for(var n in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(n)&&(o=o.concat(this.options.entitiesRelations[e][n]));return o=o.filter(function(e,t,i){return i.indexOf(e)===t}),(void 0!==t&&t?this.options.entities.locations:this.options.entities.locations.filter(function(t){return i.isEmployeeLocation(e,t.id)})).filter(function(e){return-1!==o.indexOf(e.id)})},getLocationProviders:function(e,t){var i=this,o=[];return this.options.entities.employees.forEach(function(n){-1!==(void 0!==t&&t?i.getProviderLocations(n.id).filter(function(e){return i.isEmployeeLocation(n.id,e.id)}):i.getProviderLocations(n.id)).map(function(e){return e.id}).indexOf(e)&&o.push(n.id)}),o=o.filter(function(e,t,i){return i.indexOf(e)===t}),this.options.entities.employees.filter(function(e){return-1!==o.indexOf(e.id)})},getServicesFromCategories:function(e){var t=[];return e.map(function(e){return e.serviceList}).forEach(function(e){t=t.concat(e)}),t.sort(this.sortWithNull)},getCategoryServices:function(e){return this.options.entities.categories.find(function(t){return t.id===e}).serviceList},getCustomerInfo:function(e){return"info"in e&&e.info?Object.assign({id:"customer"in e?e.customer.id:null},JSON.parse(e.info)):"customerId"in e?this.getCustomerById(e.customerId):"customer"in e?this.getCustomerById(e.customer.id):null},isEmployeeServiceLocation:function(e,t,i){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]&&-1!==this.options.entitiesRelations[e][t].indexOf(i)},isEmployeeService:function(e,t){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]},isEmployeeLocation:function(e,t){var i=!1;if(e in this.options.entitiesRelations)for(var o in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(o)&&-1!==this.options.entitiesRelations[e][o].indexOf(t)&&(i=!0);return i},getAvailableEntitiesIds:function(e,t){var i=this,o=[],n=[],a=[],s=null!==t.categoryId?e.categories.find(function(e){return e.id===t.categoryId}):null,r=s?s.serviceList.map(function(e){return e.id}):[];if(null!==t.categoryId&&0===r.length||null!==t.serviceId&&null!==t.employeeId&&!this.isEmployeeService(t.employeeId,t.serviceId)||null!==t.serviceId&&null!==t.employeeId&&null!==t.locationId&&!this.isEmployeeServiceLocation(t.employeeId,t.serviceId,t.locationId))return{services:[],locations:[],employees:[],categories:[]};var l=function(e){if(!i.options.entitiesRelations.hasOwnProperty(e))return"continue";var s=parseInt(e);if(null!==t.employeeId&&t.employeeId!==s||null!==t.locationId&&!i.isEmployeeLocation(s,t.locationId)||null!==t.serviceId&&!i.isEmployeeService(s,t.serviceId)||null!==t.categoryId&&0===r.filter(function(e){return i.isEmployeeService(s,e)}).length||null!==t.categoryId&&null!==t.locationId&&0===r.filter(function(e){return i.isEmployeeServiceLocation(s,e,t.locationId)}).length||null!==t.serviceId&&null!==t.locationId&&!i.isEmployeeServiceLocation(s,t.serviceId,t.locationId))return"continue";for(var l in-1===n.indexOf(s)&&n.push(s),i.options.entitiesRelations[s])if(i.options.entitiesRelations[s].hasOwnProperty(l)){var c=parseInt(l);null!==t.serviceId&&t.serviceId!==c||null!==t.categoryId&&-1===r.indexOf(c)||null!==t.locationId&&!i.isEmployeeServiceLocation(s,c,t.locationId)||(-1===o.indexOf(c)&&o.push(c),i.options.entitiesRelations[s][c].length&&i.options.entitiesRelations[s][c].forEach(function(e){null!==t.locationId&&t.locationId!==e||-1===a.indexOf(e)&&a.push(e)}))}};for(var c in this.options.entitiesRelations)l(c);return{services:o,locations:a,employees:n,categories:e.categories.filter(function(e){return e.serviceList.map(function(e){return e.id}).filter(function(e){return-1!==o.indexOf(e)}).length>0}).map(function(e){return e.id})}},getParsedCustomPricing:function(e){return null===e.customPricing?e.customPricing={enabled:!1,durations:[]}:"object"!==a(e.customPricing)&&(e.customPricing=this.getArrayCustomPricing(e.customPricing)),e.customPricing},filterEntities:function(e,t){var i=this,o=this.getAvailableEntitiesIds(e,t);this.options.entities.employees=e.employees.filter(function(e){return-1!==o.employees.indexOf(e.id)&&e.serviceList.filter(function(e){return-1!==o.services.indexOf(e.id)}).length>0}),this.options.entities.employees.forEach(function(e){e.fullName=e.firstName+" "+e.lastName,e.serviceList.forEach(function(e){e.customPricing=i.getParsedCustomPricing(e)})}),this.options.entities.categories=e.categories,this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories).filter(function(e){return e.show&&-1!==o.services.indexOf(e.id)}),this.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id}),e.customPricing=i.getParsedCustomPricing(e)}),this.options.entities.locations=e.locations.filter(function(e){return-1!==o.locations.indexOf(e.id)}),this.options.entities.customFields=e.customFields;var n=this.options.entities.services.map(function(e){return e.id});if("packages"in e&&(!("show"in t)||"services"!==t.show)){e.packages.forEach(function(e){"bookableIds"in e||(e.bookableIds=e.bookable.map(function(e){return e.service.id}))});var a=e.packages.filter(function(e){return"visible"===e.status}).filter(function(e){return e.bookableIds.filter(function(e){return-1!==n.indexOf(e)}).length}),s=this.options.entities.locations.map(function(e){return e.id}),r=this.options.entities.employees.map(function(e){return e.id}),l=[];if(a.forEach(function(t){var o=!1;"availableBookableInfo"in t||(t.availableBookableInfo=[]),t.bookable.forEach(function(n){var a=!1;(0===n.minimumScheduled&&n.maximumScheduled>0||n.minimumScheduled>0&&0===n.maximumScheduled||n.minimumScheduled>0&&n.maximumScheduled>0)&&(o=!0,a=!0),n.hasSlots=a;var c=n.providers.length;if(!e.locations.length||i.options.entities.locations.length){var u=n.locations.length;!c||(n.providers=n.providers.filter(function(e){return-1!==r.indexOf(e.id)&&u?n.locations.filter(function(t){return i.isEmployeeServiceLocation(e.id,n.service.id,t.id)}).length:!i.options.entities.locations.length||i.options.entities.locations.filter(function(t){return i.isEmployeeServiceLocation(e.id,n.service.id,t.id)}).length}),n.providers.length)?(u&&(n.locations=n.locations.filter(function(e){return-1!==s.indexOf(e.id)&&(c?n.providers.filter(function(t){return i.isEmployeeServiceLocation(t.id,n.service.id,e.id)}).length:i.options.entities.employees.filter(function(t){return i.isEmployeeServiceLocation(t.id,n.service.id,e.id)}).length)}),n.locations.length||l.push(t.id)),-1===t.availableBookableInfo.map(function(e){return e.serviceId}).indexOf(n.service.id)&&t.availableBookableInfo.push({serviceId:n.service.id,serviceName:i.getNameTranslated(n.service),serviceQuantity:n.quantity,providersCount:n.providers.length})):l.push(t.id)}else l.push(t.id)}),t.bookable=t.bookable.filter(function(e){return e.hasSlots}),t.hasSlots=o}),this.options.entities.packages=a.filter(function(e){return-1===l.indexOf(e.id)}),"show"in t&&"packages"===t.show){var c=[];this.options.entities.packages.forEach(function(e){e.bookable.forEach(function(e){c.push(e.service.categoryId)})}),this.options.entities.categories=this.options.entities.categories.filter(function(e){return-1!==c.indexOf(e.id)})}}},processEntities:function(e){var t=this;this.options.entitiesRelations=e.entitiesRelations,this.options.isFrontEnd?("packages"in e&&e.packages.length&&(this.responseEntities.employees=e.employees,this.responseEntities.categories=e.categories,this.responseEntities.locations=e.locations,this.responseEntities.customFields=e.customFields,this.responseEntities.services=this.getServicesFromCategories(this.responseEntities.categories),this.responseEntities.packages=e.packages?e.packages.filter(function(e){return e.available}):[],this.responseEntities.daysOff=e.settings?e.settings.daysOff:[],e.packages=e.packages.filter(function(e){return e.available}),this.params&&this.params.sort||(e.packages=e.packages.sort(function(e,t){return e.position-t.position}))),this.filterEntities(e,this.getShortCodeEntityIds())):(this.options.entities.employees=e.employees,this.options.entities.categories=e.categories,this.options.entities.locations=e.locations,this.options.entities.customers=e.customers,this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories),this.options.entities.packages=e.packages,this.options.entities.customFields=e.customFields,this.options.entities.coupons=e.coupons,this.options.entities.spaces=e.spaces,this.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id})}),this.options.availableEntitiesIds=this.getAvailableEntitiesIds(e,{categoryId:null,serviceId:null,employeeId:null,locationId:null})),this.options.entities.employees.forEach(function(e){e.serviceList.forEach(function(e){e.customPricing=t.getParsedCustomPricing(e)})}),this.options.entities.services.forEach(function(e){e.customPricing=t.getParsedCustomPricing(e)}),"settings"in e&&(this.options.entities.settings=e.settings),this.options.entities.tags="tags"in e?e.tags:[]},getShortCodeEntityIds:function(){return this.$root.shortcodeData.booking?{categoryId:"category"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.category:null,serviceId:"service"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.service:null,employeeId:"employee"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.employee:null,locationId:"location"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.location:null,show:"show"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.show:null}:{categoryId:null,serviceId:null,employeeId:null,locationId:null,show:null}},entitiesLoaded:function(){return"ameliaAppointmentEntities"in window||"ameliaEntities"in window},fillCachedEntities:function(e){var t=this.getServicesFromCategories(e.categories);e.employees.forEach(function(e){e.serviceList.forEach(function(e){Object.assign(e,t.find(function(t){return t.id===e.id}),{price:e.price,customPricing:e.customPricing,minCapacity:e.minCapacity,maxCapacity:e.maxCapacity})})}),"packages"in e&&e.packages.forEach(function(e){e.bookable.forEach(function(e){var i=t.find(function(t){return t.id===e.service.id});i&&(e.service=JSON.parse(JSON.stringify(i)))})})},fetchEntities:function(e,t){var i=this,o={params:this.getAppropriateUrlParams({types:t.types})};if(t.page?o.params.page=t.page:"isFrontEnd"in t&&t.isFrontEnd&&(o.params.page="booking"),void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(o=Object.assign(o,this.getAuthorizationHeaderObject()),Object.assign(o.params,{source:"cabinet-"+this.$store.state.cabinet.cabinetType})),t.isPanel||"calendar"===o.params.page||this.$root.hasApiCall&&!this.entitiesLoaded())this.$http.get(this.$root.getAjaxUrl+"/entities",o).then(function(o){i.options.isFrontEnd=t.isFrontEnd,window.ameliaAppointmentEntities=o.data.data;var n=JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));i.fillCachedEntities(n),i.processEntities(n),i.$root.useTranslations&&i.translateEntities(n);e(!0)}).catch(function(t){console.log(t);e(!1)});else var n=setInterval(function(){if(i.entitiesLoaded()){clearInterval(n),i.options.isFrontEnd=t.isFrontEnd;var o="ameliaEntities"in window?JSON.parse(JSON.stringify(window.ameliaEntities)):JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));i.fillCachedEntities(o),i.processEntities(o),i.$root.useTranslations&&i.translateEntities(o);e(!0)}},1e3)},getFilteredEntities:function(e,t,i){var o=this,n=this.appointment&&this.appointment.id&&this.appointment[i]?this.appointment[i]:null;return this.options.entities[t].forEach(function(t){t.disabled=-1===e.indexOf(t.id)}),this.options.entities[t].filter(function(e){return-1!==o.options.availableEntitiesIds[t].indexOf(e.id)||null!==n&&n===e.id})}},computed:{visibleLocations:function(){return this.options.entities.locations.filter(function(e){return"visible"===e.status})},visibleEmployees:function(){return this.options.entities.employees.filter(function(e){return"visible"===e.status})},visibleCustomers:function(){return this.options.entities.customers.filter(function(e){return"visible"===e.status})},visibleServices:function(){return this.options.entities.services.filter(function(e){return"visible"===e.status}).sort(this.sortWithNull)},employeesFiltered:function(){var e=this,t=void 0!==this.appointment&&"bookings"in this.appointment&&this.appointment.bookings.length?this.appointment.bookings[0].persons:null,i=this.visibleEmployees.filter(function(i){return i.serviceList.filter(function(o){return"visible"===o.status&&(null===t||o.maxCapacity>=t)&&(!e.appointment.serviceId||e.isEmployeeService(i.id,o.id)&&o.id===e.appointment.serviceId)&&(!e.appointment.locationId||e.isEmployeeServiceLocation(i.id,o.id,e.appointment.locationId))&&(!e.appointment.categoryId||i.serviceList.filter(function(t){return"visible"===t.status&&t.categoryId===e.appointment.categoryId}).length>0)}).length>0});return this.options.isFrontEnd?i:this.getFilteredEntities(i.map(function(e){return e.id}),"employees","providerId")},servicesFiltered:function(){var e=this,t=[];if(this.appointment.providerId){var i=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==i?i.serviceList.filter(function(e){return"visible"===e.status}).map(function(e){return e.id}):[]}var o=this.visibleServices.filter(function(i){return!(e.appointment.providerId&&-1===t.indexOf(i.id)||e.appointment.locationId&&!(e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,i.id,e.appointment.locationId)}).length>0)||e.appointment.categoryId&&i.categoryId!==e.appointment.categoryId)});return this.options.isFrontEnd?o:this.getFilteredEntities(o.map(function(e){return e.id}),"services","serviceId")},sortWithNull:function(){return function(e,t){return e.position===t.position?0:null===e.position?1:null===t.position?-1:e.position<t.position?-1:1}},sortNotifications:function(){return function(e,t){return e.customName===t.customName?0:null===e.customName?1:null===t.customName?-1:e.id>t.id?-1:1}},locationsFiltered:function(){var e=this,t=[];if(this.appointment.providerId){var i=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==i?i.serviceList.filter(function(e){return"visible"===e.status}):[]}var o=null;this.appointment.categoryId&&(o=this.categoriesFiltered.find(function(t){return t.id===e.appointment.categoryId}));var n=this.visibleLocations.filter(function(i){return(!e.appointment.providerId||t.filter(function(t){return e.isEmployeeServiceLocation(e.appointment.providerId,t.id,i.id)}).length>0)&&(!e.appointment.serviceId||e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,e.appointment.serviceId,i.id)}).length>0)&&(!e.appointment.categoryId||void 0!==o&&e.employeesFiltered.filter(function(t){return t.serviceList.filter(function(n){return"visible"===n.status&&n.categoryId===o.id&&e.isEmployeeServiceLocation(t.id,n.id,i.id)}).length>0}).length>0)});return this.options.isFrontEnd?n:this.getFilteredEntities(n.map(function(e){return e.id}),"locations","locationId")},couponsFilteredService:function(){var e=this,t=[];return this.options.entities.coupons&&(t=this.options.entities.coupons.filter(function(e){return e.serviceList.length>0}),this.appointment.serviceId)?t.filter(function(t){return t.serviceList.find(function(t){return t.id===e.appointment.serviceId})}):t},couponsFilteredEvent:function(){var e=this,t=[];return this.options.entities.coupons&&(t=this.options.entities.coupons.filter(function(e){return e.eventList.length>0}),this.eventId)?t.filter(function(t){return t.eventList.find(function(t){return t.id===e.eventId})}):t},categoriesFiltered:function(){var e=this,t=null;this.appointment.providerId&&(t=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId}));var i=null;this.appointment.serviceId&&(i=this.servicesFiltered.find(function(t){return t.id===e.appointment.serviceId}));var o=this.options.entities.categories.filter(function(o){return(!e.appointment.serviceId||void 0!==i&&i.categoryId===o.id)&&(!e.appointment.locationId||o.serviceList.filter(function(t){return"visible"===t.status&&e.employeesFiltered.filter(function(i){return e.isEmployeeServiceLocation(i.id,t.id,e.appointment.locationId)}).length>0}).length>0)&&(!e.appointment.providerId||void 0!==t&&-1!==t.serviceList.filter(function(t){return"visible"===t.status&&e.isEmployeeService(e.appointment.providerId,t.id)}).map(function(e){return e.categoryId}).indexOf(o.id))});return this.options.isFrontEnd?o:this.getFilteredEntities(o.map(function(e){return e.id}),"categories","categoryId")}}}},703:function(e,t,i){(function(i){var o,n,a,s;s=void 0!==i?i:this.window||this.global,n=[],o=function(e){var t,i={},o=!!document.querySelector&&!!e.addEventListener,n={initClass:"js-inlinesvg",svgSelector:"img.svg"},a=function(){var e={},t=!1,i=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],i++);for(var n=function(i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t&&"[object Object]"===Object.prototype.toString.call(i[o])?e[o]=a(!0,e[o],i[o]):e[o]=i[o])};o>i;i++){n(arguments[i])}return e},s=function(e){var i=document.querySelectorAll(t.svgSelector),o=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}}(i.length,e);Array.prototype.forEach.call(i,function(e,i){var n=e.src||e.getAttribute("data-src"),a=e.attributes,s=new XMLHttpRequest;s.open("GET",n,!0),s.onload=function(){if(s.status>=200&&s.status<400){var i=(new DOMParser).parseFromString(s.responseText,"text/xml").getElementsByTagName("svg")[0];if(i.removeAttribute("xmlns:a"),i.removeAttribute("width"),i.removeAttribute("height"),i.removeAttribute("x"),i.removeAttribute("y"),i.removeAttribute("enable-background"),i.removeAttribute("xmlns:xlink"),i.removeAttribute("xml:space"),i.removeAttribute("version"),Array.prototype.slice.call(a).forEach(function(e){"src"!==e.name&&"alt"!==e.name&&i.setAttribute(e.name,e.value)}),i.classList?i.classList.add("inlined-svg"):i.className+=" inlined-svg",i.setAttribute("role","img"),a.longdesc){var n=document.createElementNS("http://www.w3.org/2000/svg","desc"),r=document.createTextNode(a.longdesc.value);n.appendChild(r),i.insertBefore(n,i.firstChild)}if(a.alt){i.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(a.alt.value);l.appendChild(c),i.insertBefore(l,i.firstChild)}e.parentNode.replaceChild(i,e),o(t.svgSelector)}else console.error("There was an error retrieving the source of the SVG.")},s.onerror=function(){console.error("There was an error connecting to the origin server.")},s.send()})};return i.init=function(e,i){o&&(t=a(n,e||{}),s(i||function(){}),document.documentElement.className+=" "+t.initClass)},i}(s),void 0===(a="function"==typeof o?o.apply(t,n):o)||(e.exports=a)}).call(t,i(39))},704:function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=function(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var n=(s=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),a=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[i].concat(a).concat([n]).join("\n")}var s;return[i].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},n=0;n<this.length;n++){var a=this[n][0];"number"==typeof a&&(o[a]=!0)}for(n=0;n<e.length;n++){var s=e[n];"number"==typeof s[0]&&o[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}},705:function(e,t,i){var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var n=i(713),a={},s=o&&(document.head||document.getElementsByTagName("head")[0]),r=null,l=0,c=!1,u=function(){},d=null,p="data-vue-ssr-id",m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e){for(var t=0;t<e.length;t++){var i=e[t],o=a[i.id];if(o){o.refs++;for(var n=0;n<o.parts.length;n++)o.parts[n](i.parts[n]);for(;n<i.parts.length;n++)o.parts.push(g(i.parts[n]));o.parts.length>i.parts.length&&(o.parts.length=i.parts.length)}else{var s=[];for(n=0;n<i.parts.length;n++)s.push(g(i.parts[n]));a[i.id]={id:i.id,refs:1,parts:s}}}}function h(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function g(e){var t,i,o=document.querySelector("style["+p+'~="'+e.id+'"]');if(o){if(c)return u;o.parentNode.removeChild(o)}if(m){var n=l++;o=r||(r=h()),t=y.bind(null,o,n,!1),i=y.bind(null,o,n,!0)}else o=h(),t=function(e,t){var i=t.css,o=t.media,n=t.sourceMap;o&&e.setAttribute("media",o);d.ssrId&&e.setAttribute(p,t.id);n&&(i+="\n/*# sourceURL="+n.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");if(e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}.bind(null,o),i=function(){o.parentNode.removeChild(o)};return t(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;t(e=o)}else i()}}e.exports=function(e,t,i,o){c=i,d=o||{};var s=n(e,t);return f(s),function(t){for(var i=[],o=0;o<s.length;o++){var r=s[o];(l=a[r.id]).refs--,i.push(l)}t?f(s=n(e,t)):s=[];for(o=0;o<i.length;o++){var l;if(0===(l=i[o]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete a[l.id]}}}};var v,b=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function y(e,t,i,o){var n=i?"":o.css;if(e.styleSheet)e.styleSheet.cssText=b(t,n);else{var a=document.createTextNode(n),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(a,s[t]):e.appendChild(a)}}},707:function(e,t,i){"use strict";t.a={data:function(){return{}},methods:{isCustomFieldVisible:function(e,t,i){switch(t){case"appointment":return-1!==e.services.map(function(e){return e.id}).indexOf(i)||e.allServices;case"event":return-1!==e.events.map(function(e){return e.id}).indexOf(i)||e.allEvents}return!1},getAllowedCustomFields:function(e,t,i){var o=[];this.options.entities.customFields.forEach(function(e){"services"===t&&e.allServices||"events"===t&&e.allEvents?o.push(parseInt(e.id)):e[t].forEach(function(t){t.id===i&&o.push(parseInt(e.id))})});var n={};for(var a in e)-1!==o.indexOf(parseInt(a))&&(n[a]=e[a]);return n},setBookingCustomFields:function(){if(this.appointment&&this.appointment.bookings&&this.appointment.bookings.length)for(var e=0;e<this.appointment.bookings.length;e++)for(var t=0;t<this.options.entities.customFields.length;t++)if(null===this.appointment.bookings[e].customFields&&(this.appointment.bookings[e].customFields={}),void 0!==this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id]&&(this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].type=this.options.entities.customFields[t].type),void 0!==this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id]&&"datepicker"===this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].type&&this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].value&&(this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].value=this.$moment(this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id].value).toDate()),"content"!==this.options.entities.customFields[t].type&&void 0===this.appointment.bookings[e].customFields[this.options.entities.customFields[t].id]){var i="";"checkbox"===this.options.entities.customFields[t].type&&(i=[]),"datepicker"===this.options.entities.customFields[t].type&&(i=null),this.$set(this.appointment.bookings[e].customFields,this.options.entities.customFields[t].id,{label:this.options.entities.customFields[t].label,value:i,type:this.options.entities.customFields[t].type})}},getCustomFieldOptions:function(e){return e.map(function(e){return e.label})},getCustomFieldValue:function(e,t){return Array.isArray(e)?e.join("; "):"datepicker"!==t?e:e?this.getFrontedFormattedDate(e):null},getCustomFieldFileURL:function(e,t,i){return this.$root.getAjaxUrl+"/fields/"+e+"/"+t+"/"+i+"&source=cabinet-provider"}}}},708:function(e,t,i){"use strict";(function(t){var o=i(698),n=i(752),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var r,l={adapter:("undefined"!=typeof XMLHttpRequest?r=i(717):void 0!==t&&(r=i(717)),r),transformRequest:[function(e,t){return n(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){l.headers[e]={}}),o.forEach(["post","put","patch"],function(e){l.headers[e]=o.merge(a)}),e.exports=l}).call(t,i(142))},709:function(e,t,i){var o=i(335)(i(723),i(724),!1,null,null,null);e.exports=o.exports},710:function(e,t,i){"use strict";t.a={data:function(){return{defaultFormsData:{stepByStepForm:{selectServiceForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{serviceHeadingFormField:{labels:{please_select_service:{value:"",translations:{x:""}},book_appointment:{value:"",translations:{x:""}}},visibility:!0}},itemsDraggable:{serviceFormField:{labels:{service:{value:"",translations:{x:""}}}},servicePackageFormField:{labels:{package_available:{value:"",translations:{x:""}},package_discount_text:{value:"",translations:{x:""}}},visibility:!0},locationFormField:{labels:{locations:{value:"",translations:{x:""}}},visibility:!0,required:!1},employeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},visibility:!0,required:!1,anyEmployeeVisible:!0},bringingFormField:{labels:{bringing_anyone_with_you:{value:"",translations:{x:""}},number_of_additional_persons:{value:"",translations:{x:""}}}},addExtraFormField:{labels:{add_extra:{value:"",translations:{x:""}},extra_colon:{value:"",translations:{x:""}},qty_colon:{value:"",translations:{x:""}},duration_colon:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}}},visibility:!0}}},calendarDateTimeForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135},itemsStatic:{timeZoneFormField:{visibility:!1},calendarHeadingFormField:{labels:{pick_date_and_time:{value:"",translations:{x:""}}},visibility:!0},calendarAppointmentFormField:{endDateVisibility:!0},recurringSwitchFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0}}},recurringSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringSetupHeadingFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},recurringSettingsFormField:{labels:{recurring_repeat:{value:"",translations:{x:""}},recurring_every:{value:"",translations:{x:""}},recurring_on:{value:"",translations:{x:""}},recurring_until:{value:"",translations:{x:""}},recurring_times:{value:"",translations:{x:""}}}}}},recurringDatesForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringDatesHeadingFormField:{labels:{recurring_appointments:{value:"",translations:{x:""}},recurring_edit:{value:"",translations:{x:""}}},visibility:!0},recurringInfoFormField:{labels:{date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}}}}}},selectPackageForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{packageHeadingFormField:{labels:{please_select_package:{value:"",translations:{x:""}}},visibility:!0},packageFormField:{labels:{package_colon:{value:"",translations:{x:""}}}}}},packageInfoForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},itemsStatic:{packageInfoFormField:{labels:{package_discount_text:{value:"",translations:{x:""}},employee:{value:"",translations:{x:""}},employees:{value:"",translations:{x:""}}}}}},packageSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0.1)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{packageEmployeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},anyEmployeeVisible:!0},packageLocationFormField:{labels:{location:{value:"",translations:{x:""}}}},packageRulesFormField:{labels:{package_min_book:{value:"",translations:{x:""}},package_min_book_plural:{value:"",translations:{x:""}}}},packageCalendarFormField:{labels:{no_selected_slot_requirements:{value:"",translations:{x:""}}},endDateVisibility:!0,timeZoneVisibility:!0}}},packageListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},itemsStatic:{packageListFormField:{labels:{package_list_overview:{value:"",translations:{x:""}},appointments:{value:"",translations:{x:""}},appointment:{value:"",translations:{x:""}},date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}},employee:{value:"",translations:{x:""}},location:{value:"",translations:{x:""}}}}}},confirmBookingForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{confirmServiceHeadingFormField:{visibility:!0},confirmHeadingDataFormField:{labels:{employee:{value:"",translations:{x:""}},date_colon:{value:"",translations:{x:""}},time_colon:{value:"",translations:{x:""}},location_colon:{value:"",translations:{x:""}}},visibility:!0},recurringStringFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},extras_costs_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}},catalogForm:{catalogListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{categories:{value:"",translations:{x:""},visibility:!0},services_lower:{value:"",translations:{x:""},visibility:!0}},parts:{service_images_thumbs:{visibility:!0}}},categoryListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{back:{value:"",translations:{x:""}},view_more:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}},services:{value:"",translations:{x:""}},package:{value:"",translations:{x:""}},package_discount_text:{value:"",translations:{x:""}}},parts:{service_badge:{visibility:!0},service_price:{visibility:!0},service_employees_list:{visibility:!0},package_badge:{visibility:!0},package_price:{visibility:!0},package_services_list:{visibility:!0}}},categoryServiceForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{capacity_colon:{value:"",translations:{x:""}},duration_colon:{value:"",translations:{x:""}},description:{value:"",translations:{x:""}},service_info:{value:"",translations:{x:""}},category_colon:{value:"",translations:{x:""}},extras:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}},maximum_quantity_colon:{value:"",translations:{x:""}},description_colon:{value:"",translations:{x:""}},employees:{value:"",translations:{x:""}}},parts:{capacity_colon:{visibility:!0},duration_colon:{visibility:!0},description:{visibility:!0},service_info:{visibility:!0},extras:{visibility:!0},employees:{visibility:!0}}},categoryPackageForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},parts:{package_rules_description:{visibility:!0},selected_services:{visibility:!0}}},selectServiceForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{serviceHeadingFormField:{labels:{book_appointment:{value:"",translations:{x:""}}},visibility:!0}},itemsDraggable:{locationFormField:{labels:{locations:{value:"",translations:{x:""}}},visibility:!0,required:!1},employeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},visibility:!0,required:!1,anyEmployeeVisible:!0},bringingFormField:{labels:{bringing_anyone_with_you:{value:"",translations:{x:""}},number_of_additional_persons:{value:"",translations:{x:""}}}},addExtraFormField:{labels:{add_extra:{value:"",translations:{x:""}},extra_colon:{value:"",translations:{x:""}},qty_colon:{value:"",translations:{x:""}},duration_colon:{value:"",translations:{x:""}},price_colon:{value:"",translations:{x:""}}},visibility:!0}}},calendarDateTimeForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135},itemsStatic:{timeZoneFormField:{visibility:!1},calendarHeadingFormField:{labels:{pick_date_and_time:{value:"",translations:{x:""}}},visibility:!0},calendarAppointmentFormField:{endDateVisibility:!0},recurringSwitchFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0}}},recurringSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringSetupHeadingFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},recurringSettingsFormField:{labels:{recurring_repeat:{value:"",translations:{x:""}},recurring_every:{value:"",translations:{x:""}},recurring_on:{value:"",translations:{x:""}},recurring_until:{value:"",translations:{x:""}},recurring_times:{value:"",translations:{x:""}}}}}},recurringDatesForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringDatesHeadingFormField:{labels:{recurring_appointments:{value:"",translations:{x:""}},recurring_edit:{value:"",translations:{x:""}}},visibility:!0},recurringInfoFormField:{labels:{date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}}}}}},packageSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0.1)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{packageEmployeeFormField:{labels:{employee:{value:"",translations:{x:""}},any_employee:{value:"",translations:{x:""}}},anyEmployeeVisible:!0},packageLocationFormField:{labels:{location:{value:"",translations:{x:""}}}},packageRulesFormField:{labels:{package_min_book:{value:"",translations:{x:""}},package_min_book_plural:{value:"",translations:{x:""}}}},packageCalendarFormField:{labels:{no_selected_slot_requirements:{value:"",translations:{x:""}}},endDateVisibility:!0,timeZoneVisibility:!0}}},packageListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},itemsStatic:{packageListFormField:{labels:{appointments:{value:"",translations:{x:""}},appointment:{value:"",translations:{x:""}},date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}},employee:{value:"",translations:{x:""}},location:{value:"",translations:{x:""}}}}}},confirmBookingForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{confirmServiceHeadingFormField:{visibility:!0},confirmHeadingDataFormField:{labels:{employee:{value:"",translations:{x:""}},date_colon:{value:"",translations:{x:""}},time_colon:{value:"",translations:{x:""}},location_colon:{value:"",translations:{x:""}}},visibility:!0},recurringStringFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},extras_costs_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{appointment:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}},package:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052",formImageColor:"#1A84EE"},itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}},eventListForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},eventFilterForm:{itemsStatic:{eventFilterFormField:{labels:{event_type:{value:"",translations:{x:""}},event_location:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0}}}}},eventDetailsForm:{itemsStatic:{eventDetailsFormField:{labels:{open:{value:"",translations:{x:""}},closed:{value:"",translations:{x:""}},canceled:{value:"",translations:{x:""}},full:{value:"",translations:{x:""}},upcoming:{value:"",translations:{x:""}},event_capacity:{value:"",translations:{x:""},visibility:!0},location:{visibility:!0},event_date:{visibility:!0},time_zone:{visibility:!1},event_free:{value:"",translations:{x:""}},event_price:{visibility:!0},event_about:{value:"",translations:{x:""}},event_book:{value:"",translations:{x:""},visibility:!0},event_book_persons:{value:"",translations:{x:""}},ev_spot:{value:"",translations:{x:""}},ev_spots:{value:"",translations:{x:""}},ev_no_spots:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0}},showSingleEvent:!0}}},confirmBookingForm:{event:{itemsStatic:{paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{event:{itemsStatic:{congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}},eventCalendarForm:{selectEventCalendarForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#f2f3f5",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},labels:{event_today:{value:"",translations:{x:""}},event_filters:{value:"",translations:{x:""}},event_location:{value:"",translations:{x:""}},event_type:{value:"",translations:{x:""}},event_status:{value:"",translations:{x:""}},event_employee:{value:"",translations:{x:""}},event_spot:{value:"",translations:{x:""}},event_spots_left:{value:"",translations:{x:""}},event_no_spots:{value:"",translations:{x:""}},event_day:{value:"",translations:{x:""}},event_upcoming_events:{value:"",translations:{x:""}},event_free:{value:"",translations:{x:""}},event_upcoming_empty:{value:"",translations:{x:""}},event:{value:"",translations:{x:""}},events:{value:"",translations:{x:""}},open:{value:"",translations:{x:""}},full:{value:"",translations:{x:""}},upcoming:{value:"",translations:{x:""}},closed:{value:"",translations:{x:""}},canceled:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0},upcoming_events_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0},event_price_block:{visibility:!0},event_day_block:{visibility:!0}}},infoEventCalendarForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052"},labels:{event_book_now:{value:"",translations:{x:""}},event_show_less:{value:"",translations:{x:""}},event_schedule:{value:"",translations:{x:""}},event_hosted_by:{value:"",translations:{x:""}}},parts:{event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0},event_price_block:{visibility:!0}}},inviteEventCalendarForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052"},labels:{event_book_event:{value:"",translations:{x:""}},event_many_people:{value:"",translations:{x:""}},event_book_persons:{value:"",translations:{x:""}},ev_spot:{value:"",translations:{x:""}},ev_spots:{value:"",translations:{x:""}},ev_no_spots:{value:"",translations:{x:""}}},parts:{ev_spots_number:{visibility:!0},event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0}}},confirmBookingForm:{event:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{dialogEventCalendarHeadingFormField:{labels:{event_book_event:{value:"",translations:{x:""}}},parts:{event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0}}},paymentTypeFormField:{labels:{payment_type_colon:{value:"",translations:{x:""}},payment_type_deposit_only:{value:"",translations:{x:""}},payment_type_full_amount:{value:"",translations:{x:""}}}},paymentMethodFormField:{labels:{payment_method_colon:{value:"",translations:{x:""}},payment_btn_on_site:{value:"",translations:{x:""}},payment_btn_stripe:{value:"",translations:{x:""}},payment_btn_mollie:{value:"",translations:{x:""}}},switchPaymentMethodView:"Buttons",switchPaymentMethodViewOptions:[{id:1,name:this.$root.labels.buttons},{id:2,name:this.$root.labels.select}]},stripeCardFormField:{labels:{credit_or_debit_card_colon:{value:"",translations:{x:""}}}},priceFormFiled:{labels:{total_number_of_persons:{value:"",translations:{x:""}},base_price_colon:{value:"",translations:{x:""}},subtotal_colon:{value:"",translations:{x:""}},discount_amount_colon:{value:"",translations:{x:""}},deposit:{value:"",translations:{x:""}},recurring_costs_colon:{value:"",translations:{x:""}},pay_now:{value:"",translations:{x:""}},pay_later:{value:"",translations:{x:""}},total_cost_colon:{value:"",translations:{x:""}}}}},itemsDraggable:{firstNameFormField:{labels:{first_name_colon:{value:"",translations:{x:""}}}},lastNameFormField:{labels:{last_name_colon:{value:"",translations:{x:""}}},visibility:!0,required:!0},emailFormField:{labels:{email_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredEmailField},phoneFormField:{labels:{phone_colon:{value:"",translations:{x:""}}},visibility:!0,required:this.$root.settings.general.requiredPhoneNumberField}}}},congratulationsForm:{event:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{dialogEventCalendarHeadingFormField:{labels:{event_book_event:{value:"",translations:{x:""}}},parts:{event_range_block:{visibility:!0},event_capacity_block:{visibility:!0},event_location_block:{visibility:!0}}},congratulationsHeadingFormField:{labels:{congratulations:{value:"",translations:{x:""}}},visibility:!0},congratulationsImageFormField:{visibility:!0},congratulationsMessagesFormField:{labels:{booking_completed_approved:{value:"",translations:{x:""}},booking_completed_pending:{value:"",translations:{x:""}}},visibility:!0},addToCalendarFormField:{addToCalendarVisibility:!0}}}}}}}},methods:{getTranslatedForms:function(e){var t=this,i=this.$root.settings.customization.forms&&this.$root.settings.customization.forms.hasOwnProperty(e)?this.$root.settings.customization.forms:this.defaultFormsData,o=window.localeLanguage[0];return Object.keys(i[e]).forEach(function(n){"labels"in i[e][n]?t.getTranslatedLabels(i[e][n],o):"confirmBookingForm"!==n&&"globalSettings"!==n&&"congratulationsForm"!==n?i[e][n]=t.getTranslatedFormScreen(i[e][n],e,n,o):"confirmBookingForm"!==n&&"congratulationsForm"!==n||Object.keys(i[e][n]).forEach(function(a){i[e][n][a]=t.getTranslatedFormScreen(i[e][n][a],e,n,o)})}),i},getTranslatedFormScreen:function(e,t,i,o){var n=this;return["itemsDraggable","itemsStatic"].forEach(function(t){t in e&&Object.keys(e[t]).forEach(function(i){n.getTranslatedLabels(e[t][i],o)})}),e},getTranslatedLabels:function(e,t){if("labels"in e){var i=window.wpAmeliaSettings.general.usedLanguages,o=i.includes(t);Object.keys(e.labels).forEach(function(n){if("translations"in e.labels[n]&&t in e.labels[n].translations&&o)e.labels[n].value=e.labels[n].translations[t];else if(e.labels[n].translations)for(var a=i.map(function(e){return e.length>2?e.slice(0,2):e}),s=t.length>2?t.slice(0,2):t,r=a.includes(s),l=Object.keys(e.labels[n].translations),c=Object.keys(e.labels[n].translations).map(function(e){return e.length>2?e.slice(0,2):e}),u=0;u<c.length;u++)if(c[u]===s&&r){e.labels[n].value=e.labels[n].translations[l[u]];break}})}}}}},711:function(e,t,i){"use strict";var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=r(i(749)),a=r(i(767)),s=r(i(768));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.progress=0,this.isPending=!1,this.errors=new a.default,["post","patch","put","delete"].forEach(function(e){t[e]=function(i,o){return t.submit(e,i,o)}})}return o(e,[{key:"submit",value:function(t,i){var o=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.toLowerCase(),this.hasFiles(n)&&(n=(0,s.default)(n),"post"!==t&&(n.append("_method",t.toUpperCase()),t="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(a,s){e.defaults.axios[t](i,n,o.config()).then(function(e){a(e.data)}).catch(function(e){o.handleError(e),s(e)}).then(function(){return o.isPending=!1})})}},{key:"hasFiles",value:function(e){for(var t in e)if(this.fileIsPresent(e[t]))return!0;return!1}},{key:"fileIsPresent",value:function(e){return e instanceof File||e instanceof Array&&e.some(function(e){return e instanceof File})}},{key:"save",value:function(e,t){var i="post";return t.hasOwnProperty("id")&&(i="patch",e=this.urlToPatchResource(e,t)),this[i](e,t)}},{key:"urlToPatchResource",value:function(e,t){return e.replace(/\/+$/,"")+"/"+t.id}},{key:"config",value:function(){var e=this;return{onUploadProgress:function(t){e.progress=Math.round(100*t.loaded/t.total)}}}},{key:"handleError",value:function(e){if(e.response&&422===e.response.status){var t=e.response.data.hasOwnProperty("errors")?e.response.data.errors:e.response.data;this.errors.set(t)}}}]),e}();l.defaults={axios:n.default},e.exports=l},712:function(e,t,i){"use strict";t.a={data:function(){return{screenWidth:window.innerWidth}},mounted:function(){var e=this;window.onresize=function(){e.screenWidth=window.innerWidth}}}},713:function(e,t){e.exports=function(e,t){for(var i=[],o={},n=0;n<t.length;n++){var a=t[n],s=a[0],r={id:e+":"+n,css:a[1],media:a[2],sourceMap:a[3]};o[s]?o[s].parts.push(r):i.push(o[s]={id:s,parts:[r]})}return i}},714:function(e,t,i){"use strict";t.a={data:function(){return{countries:[{id:1,iso:"af",nicename:"Afghanistan",phonecode:93,format:"070 123 4567"},{id:2,iso:"al",nicename:"Albania",phonecode:355,format:"066 123 4567"},{id:3,iso:"dz",nicename:"Algeria",phonecode:213,format:"0551 23 45 67"},{id:4,iso:"as",nicename:"American Samoa",phonecode:1,format:"(684) 733 1234"},{id:5,iso:"ad",nicename:"Andorra",phonecode:376,format:"312 345"},{id:6,iso:"ao",nicename:"Angola",phonecode:244,format:"923 123 456"},{id:7,iso:"ai",nicename:"Anguilla",phonecode:1,format:"(264) 235 1234"},{id:8,iso:"ag",nicename:"Antigua and Barbuda",phonecode:1,format:"(268) 464 1234"},{id:9,iso:"ar",nicename:"Argentina",phonecode:54,format:"9 (11) 1234 567"},{id:10,iso:"am",nicename:"Armenia",phonecode:374,format:"077 123 456"},{id:11,iso:"aw",nicename:"Aruba",phonecode:297,format:"560 1234"},{id:12,iso:"au",nicename:"Australia",phonecode:61,format:"0412 345 678"},{id:13,iso:"at",nicename:"Austria",phonecode:43,format:"0664 123456"},{id:14,iso:"az",nicename:"Azerbaijan",phonecode:994,format:"040 123 45 67"},{id:15,iso:"bs",nicename:"Bahamas",phonecode:1,format:"(242) 359 1234"},{id:16,iso:"bh",nicename:"Bahrain",phonecode:973,format:"3600 1234"},{id:17,iso:"bd",nicename:"Bangladesh",phonecode:880,format:"018 1234 5678"},{id:18,iso:"bb",nicename:"Barbados",phonecode:1,format:"(246) 250 1234"},{id:19,iso:"by",nicename:"Belarus",phonecode:375,format:"029 491 1911"},{id:20,iso:"be",nicename:"Belgium",phonecode:32,format:"0470 123 456"},{id:21,iso:"bz",nicename:"Belize",phonecode:501,format:"622 1234"},{id:22,iso:"bj",nicename:"Benin",phonecode:229,format:"90 123 456"},{id:23,iso:"bm",nicename:"Bermuda",phonecode:1,format:"(441) 370 1234"},{id:24,iso:"bt",nicename:"Bhutan",phonecode:975,format:"17 123 456"},{id:25,iso:"bo",nicename:"Bolivia",phonecode:591,format:"7 123 4567"},{id:26,iso:"ba",nicename:"Bosnia and Herzegovina",phonecode:387,format:"061 123 456"},{id:27,iso:"bw",nicename:"Botswana",phonecode:267,format:"71 123 456"},{id:28,iso:"br",nicename:"Brazil",phonecode:55,format:"(11) 9 1234 5678"},{id:29,iso:"vg",nicename:"British Virgin Islands",phonecode:1,format:"(284) 300 1234"},{id:30,iso:"bn",nicename:"Brunei",phonecode:673,format:"712 3456"},{id:31,iso:"bg",nicename:"Bulgaria",phonecode:359,format:"087 123 4567"},{id:32,iso:"bf",nicename:"Burkina Faso",phonecode:226,format:"70 12 34 56"},{id:33,iso:"bi",nicename:"Burundi",phonecode:257,format:"79 56 12 34"},{id:34,iso:"kh",nicename:"Cambodia",phonecode:855,format:"091 234 567"},{id:35,iso:"cm",nicename:"Cameroon",phonecode:237,format:"6 71 23 45 67"},{id:36,iso:"ca",nicename:"Canada",phonecode:1,format:"(204) 123 4567"},{id:37,iso:"cv",nicename:"Cape Verde",phonecode:238,format:"991 12 34"},{id:38,iso:"ky",nicename:"Cayman Islands",phonecode:1,format:"(345) 323 1234"},{id:39,iso:"cf",nicename:"Central African Republic",phonecode:236,format:"70 01 23 45"},{id:40,iso:"td",nicename:"Chad",phonecode:235,format:"63 01 23 45"},{id:41,iso:"cl",nicename:"Chile",phonecode:56,format:"09 6123 4567"},{id:42,iso:"cn",nicename:"China",phonecode:86,format:"131 2345 6789"},{id:43,iso:"co",nicename:"Colombia",phonecode:57,format:"321 1234567"},{id:44,iso:"km",nicename:"Comoros",phonecode:269,format:"321 23 45"},{id:45,iso:"cd",nicename:"Congo (DRC)",phonecode:243,format:"0991 234 567"},{id:46,iso:"cg",nicename:"Congo (Republic)",phonecode:242,format:"06 123 4567"},{id:47,iso:"ck",nicename:"Cook Islands",phonecode:682,format:"71 234"},{id:48,iso:"cr",nicename:"Costa Rica",phonecode:506,format:"8312 3456"},{id:49,iso:"ci",nicename:"Cote D'Ivoire",phonecode:225,format:"01 23 45 67"},{id:50,iso:"hr",nicename:"Croatia",phonecode:385,format:"091 234 5678"},{id:51,iso:"cu",nicename:"Cuba",phonecode:53,format:"05 1234567"},{id:57,iso:"cy",nicename:"Cyprus",phonecode:357,format:"96 123456"},{id:58,iso:"cz",nicename:"Czech Republic",phonecode:420,format:"601 123 456"},{id:59,iso:"dk",nicename:"Denmark",phonecode:45,format:"20 12 34 56"},{id:60,iso:"dj",nicename:"Djibouti",phonecode:253,format:"77 83 10 01"},{id:61,iso:"dm",nicename:"Dominica",phonecode:1,format:"(767) 225 1234"},{id:62,iso:"do",nicename:"Dominican Republic",phonecode:1,format:"(809) 234 5678"},{id:63,iso:"ec",nicename:"Ecuador",phonecode:593,format:"099 123 4567"},{id:64,iso:"eg",nicename:"Egypt",phonecode:20,format:"0100 123 4567"},{id:65,iso:"sv",nicename:"El Salvador",phonecode:503,format:"7012 3456"},{id:66,iso:"gq",nicename:"Equatorial Guinea",phonecode:240,format:"222 123 456"},{id:67,iso:"er",nicename:"Eritrea",phonecode:291,format:"07 123 456"},{id:68,iso:"ee",nicename:"Estonia",phonecode:372,format:"5123 4567"},{id:69,iso:"et",nicename:"Ethiopia",phonecode:251,format:"091 123 4567"},{id:70,iso:"fk",nicename:"Falkland Islands (Malvinas)",phonecode:500,format:"51234"},{id:71,iso:"fo",nicename:"Faroe Islands",phonecode:298,format:"211234"},{id:72,iso:"fj",nicename:"Fiji",phonecode:679,format:"701 2345"},{id:73,iso:"fi",nicename:"Finland",phonecode:358,format:"041 2345678"},{id:74,iso:"fr",nicename:"France",phonecode:33,format:"06 12 34 56 78"},{id:75,iso:"gf",nicename:"French Guiana",phonecode:594,format:"0694 20 12 34"},{id:76,iso:"pf",nicename:"French Polynesia",phonecode:689,format:"87 12 34 56"},{id:77,iso:"ga",nicename:"Gabon",phonecode:241,format:"06 03 12 34"},{id:78,iso:"gm",nicename:"Gambia",phonecode:220,format:"301 2345"},{id:79,iso:"ge",nicename:"Georgia",phonecode:995,format:"555 12 34 56"},{id:80,iso:"de",nicename:"Germany",phonecode:49,format:"01512 3456789"},{id:81,iso:"gh",nicename:"Ghana",phonecode:233,format:"023 123 4567"},{id:82,iso:"gi",nicename:"Gibraltar",phonecode:350,format:"57123456"},{id:83,iso:"gr",nicename:"Greece",phonecode:30,format:"691 234 5678"},{id:84,iso:"gl",nicename:"Greenland",phonecode:299,format:"22 12 34"},{id:85,iso:"gp",nicename:"Guadeloupe",phonecode:590,format:"690 123 456"},{id:87,iso:"gu",nicename:"Guam",phonecode:1,format:"(671) 300 1234"},{id:88,iso:"gt",nicename:"Guatemala",phonecode:502,format:"5123 4567"},{id:89,iso:"gg",nicename:"Guernsey",phonecode:44,format:"07781 123456"},{id:90,iso:"gn",nicename:"Guinea",phonecode:224,format:"601 12 34 56"},{id:91,iso:"gw",nicename:"Guinea-Bissau",phonecode:245,format:"955 012 345"},{id:92,iso:"gy",nicename:"Guyana",phonecode:592,format:"609 1234"},{id:93,iso:"ht",nicename:"Haiti",phonecode:509,format:"34 10 1234"},{id:94,iso:"hn",nicename:"Honduras",phonecode:504,format:"9123 4567"},{id:95,iso:"hk",nicename:"Hong Kong",phonecode:852,format:"5123 4567"},{id:96,iso:"hu",nicename:"Hungary",phonecode:36,format:"(20) 123 4567"},{id:97,iso:"is",nicename:"Iceland",phonecode:354,format:"611 1234"},{id:98,iso:"in",nicename:"India",phonecode:91,format:"099876 54321"},{id:99,iso:"id",nicename:"Indonesia",phonecode:62,format:"0812 345 678"},{id:100,iso:"ir",nicename:"Iran",phonecode:98,format:"0912 345 6789"},{id:101,iso:"iq",nicename:"Iraq",phonecode:964,format:"0791 234 5678"},{id:102,iso:"ie",nicename:"Ireland",phonecode:353,format:"085 012 3456"},{id:103,iso:"im",nicename:"Isle of Man",phonecode:44,format:"07924 123456"},{id:104,iso:"il",nicename:"Israel",phonecode:972,format:"050 123 4567"},{id:105,iso:"it",nicename:"Italy",phonecode:39,format:"312 345 6789"},{id:106,iso:"jm",nicename:"Jamaica",phonecode:1,format:"(876) 210 1234"},{id:107,iso:"jp",nicename:"Japan",phonecode:81,format:"090 1234 5678"},{id:108,iso:"je",nicename:"Jersey",phonecode:44,format:"07797 123456"},{id:109,iso:"jo",nicename:"Jordan",phonecode:962,format:"07 9012 3456"},{id:110,iso:"kz",nicename:"Kazakhstan",phonecode:7,format:"(771) 123 4567"},{id:111,iso:"ke",nicename:"Kenya",phonecode:254,format:"0712 123456"},{id:112,iso:"ki",nicename:"Kiribati",phonecode:686,format:"72012345"},{id:241,iso:"xk",nicename:"Kosovo",phonecode:383,format:"044 1234567"},{id:113,iso:"kw",nicename:"Kuwait",phonecode:965,format:"500 12345"},{id:114,iso:"kg",nicename:"Kyrgyzstan",phonecode:996,format:"0700 123 456"},{id:115,iso:"la",nicename:"Laos",phonecode:856,format:"020 23 123 456"},{id:116,iso:"lv",nicename:"Latvia",phonecode:371,format:"21 234 567"},{id:117,iso:"lb",nicename:"Lebanon",phonecode:961,format:"71 123 456"},{id:118,iso:"ls",nicename:"Lesotho",phonecode:266,format:"5012 3456"},{id:119,iso:"lr",nicename:"Liberia",phonecode:231,format:"077 012 3456"},{id:120,iso:"ly",nicename:"Libya",phonecode:218,format:"091 2345678"},{id:121,iso:"li",nicename:"Liechtenstein",phonecode:423,format:"660 234 567"},{id:122,iso:"lt",nicename:"Lithuania",phonecode:370,format:"612 345 67"},{id:123,iso:"lu",nicename:"Luxembourg",phonecode:352,format:"628 123 456"},{id:124,iso:"mo",nicename:"Macao",phonecode:853,format:"6612 3456"},{id:125,iso:"mk",nicename:"Macedonia (FYROM)",phonecode:389,format:"072 345 678"},{id:126,iso:"mg",nicename:"Madagascar",phonecode:261,format:"032 12 345 67"},{id:127,iso:"mw",nicename:"Malawi",phonecode:265,format:"0991 23 45 67"},{id:128,iso:"my",nicename:"Malaysia",phonecode:60,format:"012 345 6789"},{id:129,iso:"mv",nicename:"Maldives",phonecode:960,format:"771 2345"},{id:130,iso:"ml",nicename:"Mali",phonecode:223,format:"65 01 23 45"},{id:131,iso:"mt",nicename:"Malta",phonecode:356,format:"9696 1234"},{id:132,iso:"mh",nicename:"Marshall Islands",phonecode:692,format:"235 1234"},{id:133,iso:"mq",nicename:"Martinique",phonecode:596,format:"0696 20 12 34"},{id:134,iso:"mr",nicename:"Mauritania",phonecode:222,format:"22 12 34 56"},{id:135,iso:"mu",nicename:"Mauritius",phonecode:230,format:"5251 2345"},{id:136,iso:"yt",nicename:"Mayotte",phonecode:269,format:"0639 12 34 56"},{id:137,iso:"mx",nicename:"Mexico",phonecode:52,format:"222 123 4567"},{id:138,iso:"fm",nicename:"Micronesia",phonecode:691,format:"350 1234"},{id:139,iso:"md",nicename:"Moldova",phonecode:373,format:"0621 12 345"},{id:140,iso:"mc",nicename:"Monaco",phonecode:377,format:"06 12 34 56 78"},{id:141,iso:"mn",nicename:"Mongolia",phonecode:976,format:"8812 3456"},{id:142,iso:"me",nicename:"Montenegro",phonecode:382,format:"067 622 901"},{id:143,iso:"ms",nicename:"Montserrat",phonecode:1,format:"(664) 492 3456"},{id:144,iso:"ma",nicename:"Morocco",phonecode:212,format:"0650 123456"},{id:145,iso:"mz",nicename:"Mozambique",phonecode:258,format:"82 123 4567"},{id:146,iso:"mm",nicename:"Myanmar",phonecode:95,format:"09 212 3456"},{id:147,iso:"na",nicename:"Namibia",phonecode:264,format:"081 123 4567"},{id:149,iso:"np",nicename:"Nepal",phonecode:977,format:"984 1234567"},{id:150,iso:"nl",nicename:"Netherlands",phonecode:31,format:"06 12345678"},{id:151,iso:"nc",nicename:"New Caledonia",phonecode:687,format:"75 12 34"},{id:152,iso:"nz",nicename:"New Zealand",phonecode:64,format:"021 123 4567"},{id:153,iso:"ni",nicename:"Nicaragua",phonecode:505,format:"8123 4567"},{id:154,iso:"ne",nicename:"Niger",phonecode:227,format:"93 12 34 56"},{id:155,iso:"ng",nicename:"Nigeria",phonecode:234,format:"0802 123 4567"},{id:156,iso:"nu",nicename:"Niue",phonecode:683,format:"1234"},{id:157,iso:"nf",nicename:"Norfolk Island",phonecode:672,format:"3 81234"},{id:160,iso:"no",nicename:"Norway",phonecode:47,format:"406 12 345"},{id:161,iso:"om",nicename:"Oman",phonecode:968,format:"9212 3456"},{id:162,iso:"pk",nicename:"Pakistan",phonecode:92,format:"0301 2345678"},{id:163,iso:"pw",nicename:"Palau",phonecode:680,format:"620 1234"},{id:164,iso:"ps",nicename:"Palestine",phonecode:970,format:"0599 123 456"},{id:165,iso:"pa",nicename:"Panama",phonecode:507,format:"6001 2345"},{id:166,iso:"pg",nicename:"Papua New Guinea",phonecode:675,format:"681 2345"},{id:167,iso:"py",nicename:"Paraguay",phonecode:595,format:"0961 456789"},{id:168,iso:"pe",nicename:"Peru",phonecode:51,format:"912 345 678"},{id:169,iso:"ph",nicename:"Philippines",phonecode:63,format:"0905 123 4567"},{id:170,iso:"pl",nicename:"Poland",phonecode:48,format:"512 345 678"},{id:171,iso:"pt",nicename:"Portugal",phonecode:351,format:"912 345 678"},{id:172,iso:"pr",nicename:"Puerto Rico",phonecode:1,format:"(787) 234 5678"},{id:173,iso:"qa",nicename:"Qatar",phonecode:974,format:"3312 3456"},{id:174,iso:"re",nicename:"Réunion",phonecode:262,format:"639 123456"},{id:175,iso:"ro",nicename:"Romania",phonecode:40,format:"0712 345 678"},{id:176,iso:"ru",nicename:"Russia",phonecode:7,format:"(912) 123 4567",priority:1},{id:177,iso:"rw",nicename:"Rwanda",phonecode:250,format:"0720 123 456"},{id:180,iso:"kn",nicename:"Saint Kitts and Nevis",phonecode:1,format:"(869) 765 2917"},{id:181,iso:"lc",nicename:"Saint Lucia",phonecode:1,format:"(758) 284 5678"},{id:184,iso:"vc",nicename:"Saint Vincent and the Grenadines",phonecode:1,format:"(784) 430 1234"},{id:185,iso:"ws",nicename:"Samoa",phonecode:684,format:"601234"},{id:186,iso:"sm",nicename:"San Marino",phonecode:378,format:"66 66 12 12"},{id:187,iso:"st",nicename:"Sao Tome and Principe",phonecode:239,format:"981 2345"},{id:188,iso:"sa",nicename:"Saudi Arabia",phonecode:966,format:"051 234 5678"},{id:189,iso:"sn",nicename:"Senegal",phonecode:221,format:"70 123 45 67"},{id:190,iso:"rs",nicename:"Serbia",phonecode:381,format:"060 1234567"},{id:191,iso:"sc",nicename:"Seychelles",phonecode:248,format:"2 510 123"},{id:192,iso:"sl",nicename:"Sierra Leone",phonecode:232,format:"(025) 123456"},{id:193,iso:"sg",nicename:"Singapore",phonecode:65,format:"8123 4567"},{id:195,iso:"sk",nicename:"Slovakia",phonecode:421,format:"0912 123 456"},{id:196,iso:"si",nicename:"Slovenia",phonecode:386,format:"031 234 567"},{id:197,iso:"sb",nicename:"Solomon Islands",phonecode:677,format:"74 21234"},{id:198,iso:"so",nicename:"Somalia",phonecode:252,format:"7 1123456"},{id:199,iso:"za",nicename:"South Africa",phonecode:27,format:"071 123 4567"},{id:200,iso:"kr",nicename:"South Korea",phonecode:82,format:"010 1234 567"},{id:201,iso:"ss",nicename:"South Sudan",phonecode:211,format:"0977 123 456"},{id:202,iso:"es",nicename:"Spain",phonecode:34,format:"612 34 56 78"},{id:203,iso:"lk",nicename:"Sri Lanka",phonecode:94,format:"071 234 5678"},{id:204,iso:"sd",nicename:"Sudan",phonecode:249,format:"091 123 1234"},{id:205,iso:"sr",nicename:"Suriname",phonecode:597,format:"741 2345"},{id:207,iso:"sz",nicename:"Swaziland",phonecode:268,format:"7612 3456"},{id:208,iso:"se",nicename:"Sweden",phonecode:46,format:"070 123 45 67"},{id:209,iso:"ch",nicename:"Switzerland",phonecode:41,format:"078 123 45 67"},{id:210,iso:"sy",nicename:"Syria",phonecode:963,format:"0944 567 890"},{id:211,iso:"tw",nicename:"Taiwan",phonecode:886,format:"0912 345 678"},{id:212,iso:"tj",nicename:"Tajikistan",phonecode:992,format:"917 123 456"},{id:213,iso:"tz",nicename:"Tanzania",phonecode:255,format:"740 123 456"},{id:214,iso:"th",nicename:"Thailand",phonecode:66,format:"081 234 5678"},{id:215,iso:"tl",nicename:"Timor-Leste",phonecode:670,format:"7721 2345"},{id:216,iso:"tg",nicename:"Togo",phonecode:228,format:"90 11 23 45"},{id:218,iso:"to",nicename:"Tonga",phonecode:676,format:"771 5123"},{id:219,iso:"tt",nicename:"Trinidad and Tobago",phonecode:868,format:"(868) 291 1234"},{id:220,iso:"tn",nicename:"Tunisia",phonecode:216,format:"20 123 456"},{id:221,iso:"tr",nicename:"Turkey",phonecode:90,format:"0501 234 56 78"},{id:222,iso:"tm",nicename:"Turkmenistan",phonecode:7370,format:"8 66 123456"},{id:223,iso:"tc",nicename:"Turks and Caicos Islands",phonecode:1,format:"(649) 231 1234"},{id:224,iso:"tv",nicename:"Tuvalu",phonecode:688,format:"901234"},{id:225,iso:"ug",nicename:"Uganda",phonecode:256,format:"0712 345678"},{id:226,iso:"ua",nicename:"Ukraine",phonecode:380,format:"039 123 4567"},{id:227,iso:"ae",nicename:"United Arab Emirates",phonecode:971,format:"050 123 4567"},{id:228,iso:"gb",nicename:"United Kingdom",phonecode:44,format:"07400 123456",priority:1},{id:229,iso:"us",nicename:"United States",phonecode:1,format:"(201) 555 0123",priority:1},{id:230,iso:"uy",nicename:"Uruguay",phonecode:598,format:"094 231 234"},{id:231,iso:"uz",nicename:"Uzbekistan",phonecode:998,format:"8 91 234 56 78"},{id:232,iso:"vu",nicename:"Vanuatu",phonecode:678,format:"591 2345"},{id:234,iso:"ve",nicename:"Venezuela",phonecode:58,format:"0412 1234567"},{id:235,iso:"vn",nicename:"Vietnam",phonecode:84,format:"091 234 56 78"},{id:236,iso:"vi",nicename:"Virgin Islands, U.S.",phonecode:1,format:"(340) 642 1234"},{id:237,iso:"ye",nicename:"Yemen",phonecode:967,format:"0712 345 678"},{id:238,iso:"zm",nicename:"Zambia",phonecode:260,format:"095 5123456"},{id:239,iso:"zw",nicename:"Zimbabwe",phonecode:263,format:"071 123 4567"},{id:240,iso:"ax",nicename:"Åland Islands",phonecode:358,format:"041 2345678"}]}}}},715:function(e,t,i){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={methods:{getArrayCustomPricing:function(e){var t=null;if(void 0===e||null===e||""===e)t={enabled:!1,durations:{}};else if("object"===(void 0===e?"undefined":o(e))){if(Array.isArray(e.durations))return e;t=JSON.parse(JSON.stringify(e))}else t=JSON.parse(e);var i=[];return Object.keys(t.durations).forEach(function(e){i.push({duration:parseInt(e),price:t.durations[e].price,rules:t.durations[e].rules})}),{enabled:t.enabled,durations:i}},getJsonCustomPricing:function(e){var t={};return e&&e.durations.filter(function(e){return e.duration}).length>0?(e.durations.forEach(function(e){t[e.duration]={price:e.price,rules:e.rules}}),JSON.stringify({enabled:e.enabled,durations:t})):JSON.stringify({enabled:!1,durations:{}})}}}},716:function(e,t,i){"use strict";e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return e.apply(t,i)}}},717:function(e,t,i){"use strict";var o=i(698),n=i(753),a=i(755),s=i(756),r=i(757),l=i(718),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||i(758);e.exports=function(e){return new Promise(function(t,u){var d=e.data,p=e.headers;o.isFormData(d)&&delete p["Content-Type"];var m=new XMLHttpRequest,f="onreadystatechange",h=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in m||r(e.url)||(m=new window.XDomainRequest,f="onload",h=!0,m.onprogress=function(){},m.ontimeout=function(){}),e.auth){var g=e.auth.username||"",v=e.auth.password||"";p.Authorization="Basic "+c(g+":"+v)}if(m.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),m.timeout=e.timeout,m[f]=function(){if(m&&(4===m.readyState||h)&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in m?s(m.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?m.response:m.responseText,status:1223===m.status?204:m.status,statusText:1223===m.status?"No Content":m.statusText,headers:i,config:e,request:m};n(t,u,o),m=null}},m.onerror=function(){u(l("Network Error",e,null,m)),m=null},m.ontimeout=function(){u(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",m)),m=null},o.isStandardBrowserEnv()){var b=i(759),y=(e.withCredentials||r(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in m&&o.forEach(p,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:m.setRequestHeader(t,e)}),e.withCredentials&&(m.withCredentials=!0),e.responseType)try{m.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&m.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){m&&(m.abort(),u(e),m=null)}),void 0===d&&(d=null),m.send(d)})}},718:function(e,t,i){"use strict";var o=i(754);e.exports=function(e,t,i,n,a){var s=new Error(e);return o(s,t,i,n,a)}},719:function(e,t,i){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},720:function(e,t,i){"use strict";function o(e){this.message=e}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,e.exports=o},721:function(e,t,i){var o=i(335)(i(776),i(777),!1,null,null,null);e.exports=o.exports},722:function(e,t,i){"use strict";t.a={data:function(){return{}},methods:{checkTranslations:function(e,t){var i=""!==t?JSON.parse(e.translations)[t]:JSON.parse(e.translations);if(window.localeLanguage[0]in i)return i[window.localeLanguage[0]];for(var o=Object.keys(i),n=Object.keys(i).map(function(e){return e.length>2?e.slice(0,2):e}),a=window.localeLanguage[0].length>2?window.localeLanguage[0].slice(0,2):window.localeLanguage[0],s="",r=0;r<n.length;r++)if(n[r]===a){s=i[o[r]];break}return s},getTranslated:function(e,t){return e.translations&&JSON.parse(e.translations)[t]&&this.checkTranslations(e,t)?this.checkTranslations(e,t):e[t]},getNameTranslated:function(e){return e.translations&&JSON.parse(e.translations).name&&this.checkTranslations(e,"name")?this.checkTranslations(e,"name"):e.name},getTicketTranslated:function(e){return e.translations&&this.checkTranslations(e,"")?this.checkTranslations(e,""):e.name},getCfLabelTranslated:function(e){return e.translations&&this.checkTranslations(e,"name")?this.checkTranslations(e,"name"):e.label},getCfOptionTranslated:function(e){return e.translations&&this.checkTranslations(e,"")?this.checkTranslations(e,""):e.label},getDescriptionTranslated:function(e){return e.translations&&JSON.parse(e.translations).description&&this.checkTranslations(e,"description")?this.checkTranslations(e,"description"):e.description},translateEntities:function(e){var t=this;e.services&&e.services.length&&e.services.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})}),e.locations&&e.locations.length&&e.locations.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)}),e.packages&&e.packages.length&&e.packages.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.bookable.forEach(function(e){e.service.name=t.getNameTranslated(e.service),e.service.description=t.getDescriptionTranslated(e.service),"extras"in e.service&&e.service.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})}),e.categories&&e.categories.length&&e.categories.forEach(function(e){e.name=t.getNameTranslated(e),e.serviceList.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})}),e.events&&e.events.length&&e.events.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})}),e.customFields&&e.customFields.length&&e.customFields.forEach(function(e){e.label=t.getCfLabelTranslated(e),e.options.forEach(function(e){e.label=t.getCfOptionTranslated(e)})}),e.employees&&e.employees.length&&e.employees.forEach(function(e){e.firstName=t.getTranslated(e,"firstName"),e.lastName=t.getTranslated(e,"lastName"),e.serviceList.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})})}},computed:{}}},723:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(714);t.default={mixins:[o.a],template:"#phone-input",props:{savedPhone:{default:"",type:String},disabled:{default:!1,type:Boolean},countryPhoneIso:null,dropdownClass:{type:String,default:""}},data:function(){return{input:"",phone:"",value:this.$root.settings.general.phoneDefaultCountryCode,format:""}},mounted:function(){""!==this.value?this.savedPhone?this.fillInputWithSavedPhone():this.formatPhoneNumber():this.savedPhone&&this.fillInputWithSavedPhone()},methods:{onClear:function(){this.value="",this.phone="",this.$emit("phoneFormatted",this.phone,this.value)},changeCountry:function(){""!==this.value&&""!==this.input&&(this.input=""),this.formatPhoneNumber()},formatPhoneNumber:function(){var e=this;if(""!==this.value&&"auto"!==this.value){var t=this.countries.find(function(t){return t.iso===e.value});this.format=!0===this.disabled?"":t.format}var i=this.input;if("ar"===window.localeLanguage[0]&&(i=i.replace(/[٠-٩]/g,function(e){return"٠١٢٣٤٥٦٧٨٩".indexOf(e)})),""!==i){if(i.startsWith("+")){var o=parseInt(i.slice(1)),n=this.countries.filter(function(e){return e.phonecode===o});if(n.length){var a=null;1===o?a=n.find(function(e){return 229===e.id}):44===o?a=n.find(function(e){return 228===e.id}):7===o&&(a=n.find(function(e){return 176===e.id})),void 0!==a&&null!==a||(a=n[0]),this.value=a.iso}this.phone=i}else this.phone=void 0!==t?!0===i.startsWith("0")&&"it"!==this.countryPhoneIso?"+"+t.phonecode+i.slice(1).replace(/\D/g,""):"+"+t.phonecode+i.replace(/\D/g,""):i;this.$emit("phoneFormatted",this.phone,this.value)}else this.phone=i,this.$emit("phoneFormatted",this.phone,this.value)},fillInputWithSavedPhone:function(){var e=this,t=null;null!==this.countryPhoneIso&&void 0===(t=this.countries.find(function(t){return t.iso===e.countryPhoneIso}))&&(t=null);for(var i=1;null===t&&i<5;)t=void 0!==(t=this.countries.find(function(t){return t.phonecode===parseInt(e.savedPhone.substr(1,i))&&1===t.priority}))?t:null,i++;if(!t)for(i=1;null===t&&i<5;)t=void 0!==(t=this.countries.find(function(t){return t.phonecode===parseInt(e.savedPhone.substr(1,i))}))?t:null,i++;null!==t&&(this.value=t.iso,this.input=this.savedPhone.replace("+"+t.phonecode,""),this.input=t.format.startsWith("0")?"0"+this.input:this.input)}},watch:{input:function(){this.formatPhoneNumber()}},components:{}}},724:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-input",{attrs:{placeholder:e.format,disabled:e.disabled,type:"tel",name:"tel",autocomplete:"tel",clearable:""},on:{clear:e.onClear},model:{value:e.input,callback:function(t){e.input=t},expression:"input"}},[i("el-select",{class:"am-selected-flag am-selected-flag-"+e.value,attrs:{slot:"prepend",placeholder:"","popper-class":e.$root.settings.customization.forms?e.dropdownClass:"",disabled:e.disabled},on:{change:e.changeCountry},slot:"prepend",model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},e._l(e.countries,function(t){return i("el-option",{key:t.id,attrs:{value:t.iso,label:" "}},[i("span",{class:"am-flag am-flag-"+t.iso}),e._v(" "),i("span",{staticClass:"am-phone-input-nicename"},[e._v(e._s(t.nicename))]),e._v(" "),i("span",{staticClass:"am-phone-input-phonecode"},[e._v("+"+e._s(t.phonecode))])])}),1)],1)},staticRenderFns:[]}},725:function(e,t,i){"use strict";t.a={data:function(){return{}},methods:{getPaymentType:function(e){return e.gateway&&"onSite"!==e.gateway?"partiallyPaid"===e.status?"deposit":"online":"onsite"},getPaymentData:function(e,t,i,o){var n={};if(n.paymentId=e,t){n.bookableType="appointment",n.bookings=t.bookings,n.bookingStart=t.bookingStart,n.bookableName=this.getServiceById(t.serviceId).name,n.bookable=this.getServiceById(t.serviceId);var a=this.getProviderById(t.providerId);a.fullName=a.firstName+" "+a.lastName,n.providers=[a],t.bookings.forEach(function(t,i){t.payments.forEach(function(o){o.id===e&&(n.customer=t.customer,n.bookingIndex=i)})})}return i&&(n.bookableType="event",n.bookings=i.bookings,n.bookingStart=i.periods[0].periodStart,n.bookableName=i.name,n.providers=i.providers,n.bookable=i,i.bookings.forEach(function(t,i){t.payments.forEach(function(o){o.id===e&&(n.customer=t.customer,n.bookingIndex=i)})})),o&&(n.bookableType="package",n.bookings=[],n.bookingStart=null,n.bookableName=o.name,n.providers=[],n.bookable=o,n.bookings=[],n.bookingIndex=0),n},getPaymentStatusNiceName:function(e){switch(e){case"paid":return this.$root.labels.paid;case"pending":return this.$root.labels.pending;case"partiallyPaid":return this.$root.labels.partially_paid;case"refunded":return this.$root.labels.refunded}},getPaymentGatewayNiceName:function(e){return"onSite"===e.gateway?this.$root.labels.on_site:"wc"===e.gateway?e.gatewayTitle:e.gateway?e.gateway.charAt(0).toUpperCase()+e.gateway.slice(1):void 0},getPaymentIconWidth:function(e){return"razorpay"===e?"76px":"mollie"===e?"38px":"16px"}}}},726:function(e,t,i){"use strict";var o=i(0);i.n(o);t.a={data:function(){return{recurringDates:[]}},methods:{getRecurringAppointmentsData:function(){return[]},toggleRecurringActive:function(){},setCycleScreen:function(){},getDefaultRecurringSettings:function(){return{}},getAvailableRecurringDates:function(){return[]},getRepeatIntervalLabels:function(){return[]}}}},727:function(e,t,i){"use strict";var o=i(0),n=i.n(o);t.a={data:function(){return{payBtnLoader:null,timeZone:"",statusesCabinet:[{value:"approved",label:this.$root.labels.approved},{value:"pending",label:this.$root.labels.pending},{value:"canceled",label:this.$root.labels.canceled},{value:"rejected",label:this.$root.labels.rejected},{value:"no-show",label:this.$root.labels["no-show"]}]}},methods:{isPanelActive:function(e){return!this.$root.shortcodeData.cabinet||!(this.$root.shortcodeData.cabinet.appointments||this.$root.shortcodeData.cabinet.events||this.$root.shortcodeData.cabinet.profile)||(!("appointments"!==e||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.appointments)||(!("events"!==e||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.events)||"profile"===e&&this.$root.shortcodeData.cabinet&&this.$root.shortcodeData.cabinet.profile))},changeRange:function(e){this.$store.commit("cabinet/setParams",{dates:e}),this.setDatePickerSelectedDaysCount(this.$store.state.cabinet.params.dates.start,this.$store.state.cabinet.params.dates.end),this.$emit("refreshReservations")},isBookingCancelable:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.cancelable&&!("canceled"===e.bookings[t].status||"rejected"===e.bookings[t].status||"no-show"===e.bookings[t].status)},isBookingReschedulable:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.reschedulable&&!("canceled"===e.bookings[t].status||"rejected"===e.bookings[t].status||"no-show"===e.bookings[t].status)},disableAuthorizationHeader:function(){return"ameliaBooking"in window&&"cabinet"in window.ameliaBooking&&"disableAuthorizationHeader"in window.ameliaBooking.cabinet&&window.ameliaBooking.cabinet.disableAuthorizationHeader},getAuthorizationHeaderObject:function(){return this.$store.state.cabinet.ameliaToken&&!this.disableAuthorizationHeader()?{headers:{Authorization:"Bearer "+this.$store.state.cabinet.ameliaToken}}:{}},getPaymentLink:function(e,t){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.payBtnLoader=t.bookings?t.bookings[0].id:t.id;var n=JSON.parse(JSON.stringify(t));n[n.type]=t;var a=JSON.parse(JSON.stringify(this.$store.state.cabinet.profile));if(a.birthday=null,n.customer=a,"package"===n.type){var s=o||Object.keys(n.payments)[0],r=n.payments[s].payments.sort(function(e,t){return e.id>t.id?1:-1});n.paymentId=r[0].id,n.packageCustomerId=s,n.packageReservations=[],n.bookable.forEach(function(e){n.packageReservations=n.packageReservations.concat(e.service.bookedAppointments.filter(function(e){return e.bookings[0].packageCustomerService.packageCustomer.id===parseInt(s)}))}),n.booking=n.packageReservations&&n.packageReservations.length>0?n.packageReservations[0].bookings[0]:null}else n.booking=t.bookings[0],n.paymentId=t.bookings[0].payments[0].id;this.$http.post(this.$root.getAjaxUrl+"/payments/link",{data:n,paymentMethod:e}).then(function(e){i.payBtnLoader=null,!e.data.data.error&&e.data.data.paymentLink?window.open(e.data.data.paymentLink,"_blank"):i.notify(i.$root.labels.error,i.$root.labels.payment_link_error,"error")}).catch(function(e){i.payBtnLoader=null,i.notify(i.$root.labels.error,e.message,"error"),console.log(e)})},paymentFromCustomerPanel:function(e,t){if("package"!==e.type&&(!e.bookings||0===e.bookings.length))return!1;var i=JSON.parse(t),o=i.payments.paymentLinks?i.payments.paymentLinks:this.$root.settings.payments.paymentLinks,a="package"===e.type?Object.values(e.purchases).filter(function(e){return"approved"===e.status}).length>0:"approved"===e.bookings[0].status||"pending"===e.bookings[0].status,s="package"===e.type?e.price:e.bookings[0].price,r=!1;switch(e.type){case"package":r=!e.expireDateString||n()(e.expireDateString,"YYYY-MM-DD HH:mm:ss").isAfter(n()());break;case"appointment":r=n()(e.bookingStart,"YYYY-MM-DD HH:mm:ss").isAfter(n()())&&e.bookings[0].payments.length>0;break;case"event":r=n()(e.periods[e.periods.length-1].periodEnd,"YYYY-MM-DD HH:mm:ss").isAfter(n()())&&e.bookings[0].payments.length>0}return this.paymentMethods(i).length&&i&&o&&o.enabled&&a&&s>0&&r},paymentMethods:function(e){"string"==typeof e&&(e=JSON.parse(e));var t=[];return e=e.payments,this.$root.settings.payments.wc.enabled?t.push({value:"wc",label:this.$root.labels.wc}):this.$root.settings.payments.mollie.enabled&&e.mollie.enabled?t.push({value:"mollie",label:this.$root.labels.on_line}):(this.$root.settings.payments.payPal.enabled&&e.payPal.enabled&&t.push({value:"payPal",label:this.$root.labels.pay_pal}),this.$root.settings.payments.stripe.enabled&&e.stripe.enabled&&t.push({value:"stripe",label:this.$root.labels.credit_card}),this.$root.settings.payments.razorpay.enabled&&e.razorpay.enabled&&t.push({value:"razorpay",label:this.$root.labels.razorpay})),t}}}},729:function(e,t,i){var o=i(335)(i(734),i(735),!1,null,null,null);e.exports=o.exports},730:function(e,t,i){var o=i(335)(i(731),i(732),!1,null,null,null);e.exports=o.exports},731:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={street_number:"short_name",route:"long_name",locality:"long_name",administrative_area_level_1:"short_name",administrative_area_level_2:"county",country:"long_name",postal_code:"short_name"},n=["locality","administrative_area_level_3"],a=["locality","sublocality","postal_code","country","administrative_area_level_1","administrative_area_level_2"];t.default={name:"VueGoogleAutocomplete",props:{id:{type:String,required:!0},classname:String,placeholder:{type:String,default:"Start typing"},types:{type:String,default:"address"},country:{type:[String,Array],default:null},enableGeolocation:{type:Boolean,default:!1},geolocationOptions:{type:Object,default:null}},data:function(){return{autocomplete:null,autocompleteText:"",geolocation:{geocoder:null,loc:null,position:null}}},watch:{autocompleteText:function(e,t){this.$emit("inputChange",{newVal:e,oldVal:t},this.id)},country:function(e,t){this.autocomplete.setComponentRestrictions({country:null===this.country?[]:this.country})}},mounted:function(){var e={};this.types&&(e.types=[this.types]),this.country&&(e.componentRestrictions={country:this.country}),this.autocomplete=new google.maps.places.Autocomplete(document.getElementById(this.id),e),this.autocomplete.addListener("place_changed",this.onPlaceChanged)},methods:{onPlaceChanged:function(){var e=this.autocomplete.getPlace();e.geometry?void 0!==e.address_components&&(this.$emit("placechanged",this.formatResult(e),e,this.id),this.autocompleteText=document.getElementById(this.id).value,this.onChange()):this.$emit("no-results-found",e,this.id)},onFocus:function(){this.biasAutocompleteLocation(),this.$emit("focus")},onBlur:function(){this.$emit("blur")},onChange:function(){this.$emit("change",this.autocompleteText)},onKeyPress:function(e){this.$emit("keypress",e)},onKeyUp:function(e){this.$emit("keyup",e)},clear:function(){this.autocompleteText=""},focus:function(){this.$refs.autocomplete.focus()},blur:function(){this.$refs.autocomplete.blur()},update:function(e){this.autocompleteText=e},updateCoordinates:function(e){var t=this;(e||e.lat||e.lng)&&(this.geolocation.geocoder||(this.geolocation.geocoder=new google.maps.Geocoder),this.geolocation.geocoder.geocode({location:e},function(e,i){"OK"===i?(e=t.filterGeocodeResultTypes(e))[0]?(t.$emit("placechanged",t.formatResult(e[0]),e[0],t.id),t.update(e[0].formatted_address)):t.$emit("error","no result for provided coordinates"):t.$emit("error","error getting address from coords")}))},geolocate:function(){var e=this;this.updateGeolocation(function(t,i){e.updateCoordinates(t)})},updateGeolocation:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(navigator.geolocation){var i={};this.geolocationOptions&&Object.assign(i,this.geolocationOptions),navigator.geolocation.getCurrentPosition(function(i){var o={lat:i.coords.latitude,lng:i.coords.longitude};e.geolocation.loc=o,e.geolocation.position=i,t&&t(o,i)},function(t){e.$emit("error","Cannot get Coordinates from navigator",t)},i)}},biasAutocompleteLocation:function(){var e=this;this.enableGeolocation&&this.updateGeolocation(function(t,i){var o=new google.maps.Circle({center:t,radius:i.coords.accuracy});e.autocomplete.setBounds(o.getBounds())})},formatResult:function(e){for(var t={},i=0;i<e.address_components.length;i++){var n=e.address_components[i].types[0];if(o[n]){var a=e.address_components[i][o[n]];t[n]=a}}return t.latitude=e.geometry.location.lat(),t.longitude=e.geometry.location.lng(),t},filterGeocodeResultTypes:function(e){if(!e||!this.types)return e;var t=[],i=[this.types];i.includes("(cities)")&&(i=i.concat(n)),i.includes("(regions)")&&(i=i.concat(a));var o=!0,s=!1,r=void 0;try{for(var l,c=e[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value,d=!0,p=!1,m=void 0;try{for(var f,h=u.types[Symbol.iterator]();!(d=(f=h.next()).done);d=!0){var g=f.value;if(i.includes(g)){t.push(u);break}}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}}}catch(e){s=!0,r=e}finally{try{!o&&c.return&&c.return()}finally{if(s)throw r}}return t}}}},732:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"model",rawName:"v-model",value:e.autocompleteText,expression:"autocompleteText"}],ref:"autocomplete",class:e.classname,attrs:{type:"text",id:e.id,placeholder:e.placeholder},domProps:{value:e.autocompleteText},on:{focus:function(t){return e.onFocus()},blur:function(t){return e.onBlur()},change:e.onChange,keypress:e.onKeyPress,keyup:e.onKeyUp,input:function(t){t.target.composing||(e.autocompleteText=t.target.value)}}})},staticRenderFns:[]}},733:function(e,t,i){"use strict";var o=i(701);t.a={data:function(){return{}},mixins:[o.a],methods:{setPreferredEntitiesData:function(e){var t=this,i=this.getAllEntitiesIds(e,0),o=this.getAllEntitiesIds(e,1),n=1===i.length,a=1===o.length;e.forEach(function(e){if(e.date&&e.time)if(!o.length&&n)e.providerId=i[0],e.locationId=null;else if(o.length||n)if(a&&n)e.providerId=i[0],e.locationId=o[0];else if(!a&&n)e.providerId=i[0],e.locationId=t.getPreferredEntityId(e.slots,e.occupied,e.time,e.providerId,o,1);else if(a&&!n)e.locationId=o[0],e.providerId=t.getPreferredEntityId(e.slots,e.occupied,e.time,e.locationId,i,0);else{for(var s=0;s<o.length;s++)for(var r=0;r<i.length;r++){if(t.isPreferredLocationAndEmployee(e.slots,e.occupied,e.time,o[s],i[r]))return e.providerId=i[r],void(e.locationId=o[s])}for(var l=0;l<o.length;l++)for(var c=0;c<i.length;c++)for(var u=0;u<e.slots[e.time].length;u++)if(e.slots[e.time][u][0]===i[c]&&e.slots[e.time][u][1]===o[l])return e.providerId=i[c],void(e.locationId=o[l])}else{e.locationId=null;for(var d=0;d<i.length;d++)for(var p=0;p<e.slots[e.time].length;p++)if(e.slots[e.time][p][0]===i[d]){e.providerId=i[d];break}}})},getAllEntitiesIds:function(e,t){for(var i={},o=0;o<e.length;o++)e[o].date&&e[o].time&&e[o].slots[e[o].time].forEach(function(e){e[t]&&(e[t]in i||(i[e[t]]=0),i[e[t]]++)});var n=[];return Object.keys(i).forEach(function(e){n.push({id:parseInt(e),quantity:i[e]})}),n.sort(function(e,t){return t.quantity-e.quantity}),n.map(function(e){return e.id})},getPreferredEntityId:function(e,t,i,o,n,a){var s=this,r=a?0:1,l={};Object.keys(t).forEach(function(e){t[e].forEach(function(t){t[r]===o&&(l[s.getStringTimeInSeconds(e)]=t[a])})}),Object.keys(e).forEach(function(t){e[t].forEach(function(e){e.length>=3&&e[r]===o&&(l[s.getStringTimeInSeconds(t)]=e[a])})});var c=[];if(e[i].forEach(function(e){e[r]===o&&c.push(e[a])}),Object.keys(l).length){var u=this.getStringTimeInSeconds(i),d=Object.keys(l).reduce(function(e,t){return Math.abs(t-u)<Math.abs(e-u)?t:e});if(-1!==c.indexOf(l[d]))return l[d]}for(var p=0;p<n.length;p++)for(var m=0;m<e[i].length;m++)if(e[i][m][r]===o&&n[p]===e[i][m][a])return e[i][m][a];return null},isPreferredLocationAndEmployee:function(e,t,i,o,n){var a=this,s=!1;if(e[i].forEach(function(e){e[0]===n&&e[1]===o&&(s=!0)}),!s)return!1;var r={onLocation:{},offLocation:{}};if(Object.keys(t).forEach(function(e){t[e].forEach(function(t){t[0]===n&&t[1]===o?r.onLocation[a.getStringTimeInSeconds(e)]=t[1]:t[0]===n&&(r.offLocation[a.getStringTimeInSeconds(e)]=t[1])})}),Object.keys(e).forEach(function(t){e[t].forEach(function(e){e.length>=3&&e[0]===n&&e[1]===o?r.onLocation[a.getStringTimeInSeconds(t)]=e[1]:e.length>=3&&e[0]===n&&(r.offLocation[a.getStringTimeInSeconds(t)]=e[1])})}),!Object.keys(r.onLocation).length&&!Object.keys(r.offLocation).length||Object.keys(r.onLocation).length&&!Object.keys(r.offLocation).length)return!0;var l=this.getStringTimeInSeconds(i);r=Object.assign(r.onLocation,r.offLocation);var c=Object.keys(r).reduce(function(e,t){return Math.abs(t-l)<Math.abs(e-l)?t:e});return o===r[c]}}}},734:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(338);t.default={mixins:[o.a],props:["oldCustomize","appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","packagesTotal","resourcesTotal","servicesTotal","categoriesTotal","financeTotal","addNewCouponBtnDisplay","addNewCustomFieldBtnDisplay","locations","categories","bookableType","params","fetched"],methods:{showMainCustomize:function(){this.$emit("showMainCustomize",null)},showDialogCustomer:function(){this.$emit("newCustomerBtnClicked",null)},showDialogAppointment:function(){this.$emit("newAppointmentBtnClicked",null)},showDialogEvent:function(){this.$emit("newEventBtnClicked",null)},showDialogEmployee:function(){this.$emit("newEmployeeBtnClicked")},showDialogLocation:function(){this.$emit("newLocationBtnClicked")},showDialogService:function(){this.$emit("newServiceBtnClicked")},showDialogPackage:function(){this.$emit("newPackageBtnClicked")},showDialogPackageBooking:function(){this.$emit("newPackageBookingBtnClicked")},showDialogResource:function(){this.$emit("newResourceBtnClicked")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(e){this.$emit("selectAllInCategory",e)},changeFilter:function(){this.$emit("changeFilter")}}}},735:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-page-header am-section"},[i("el-row",{attrs:{type:"wpamelia-calendar"===e.$router.currentRoute.name?"":"flex",align:"middle"}},[i("el-col",{attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?6:18}},[i("div",{staticClass:"am-logo"},[i("img",{staticClass:"logo-big",attrs:{width:"92",src:e.$root.getUrl+"public/img/amelia-logo-horizontal.svg"}}),e._v(" "),i("img",{staticClass:"logo-small",attrs:{width:"28",src:e.$root.getUrl+"public/img/amelia-logo-symbol.svg"}})]),e._v(" "),i("h1",{staticClass:"am-page-title"},[e._v("\n "+e._s(e.bookableType?e.$root.labels[e.bookableType]:e.$router.currentRoute.meta.title)+"\n\n "),e._v(" "),e.appointmentsApproved>=0?i("span",{staticClass:"am-appointments-number approved"},[e._v("\n "+e._s(e.appointmentsApproved)+"\n ")]):e._e(),e._v(" "),e.appointmentsPending>=0?i("span",{staticClass:"am-appointments-number pending"},[e._v("\n "+e._s(e.appointmentsPending)+"\n ")]):e._e(),e._v(" "),e.employeesTotal>=0&&!0===e.$root.settings.capabilities.canReadOthers?i("span",[i("span",{staticClass:"total-number"},[e._v(e._s(e.employeesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.customersTotal>=0?i("span",[i("span",{staticClass:"total-number"},[e._v(e._s(e.customersTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.locationsTotal>=0?i("span",[i("span",{staticClass:"total-number"},[e._v(e._s(e.locationsTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.servicesTotal>=0&&"services"===e.bookableType?i("span",[i("span",{staticClass:"total-number"},[e._v(e._s(e.servicesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.packagesTotal>=0&&"packages"===e.bookableType?i("span",[i("span",{staticClass:"total-number"},[e._v(e._s(e.packagesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.resourcesTotal>=0&&"resources"===e.bookableType?i("span",[i("span",{staticClass:"total-number"},[e._v(e._s(e.resourcesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.financeTotal>=0?i("span",[i("span",{staticClass:"total-number"},[e._v(e._s(e.financeTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e()])]),e._v(" "),i("el-col",{staticClass:"align-right v-calendar-column",attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?18:6}},["wpamelia-appointments"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteAppointments)?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e(),e._v(" "),"wpamelia-events"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEvent}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_event))])]):e._e(),e._v(" "),e.$root.isLite||"wpamelia-employees"!==e.$router.currentRoute.name||!0!==e.$root.settings.capabilities.canWrite||!0!==e.$root.settings.capabilities.canWriteOthers?e._e():i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEmployee}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_employee))])]),e._v(" "),"wpamelia-customers"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomer}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_customer))])]):e._e(),e._v(" "),i("el-popover",e._b({ref:"addLocationPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("div",{directives:[{name:"popover",rawName:"v-popover:addLocationPop",arg:"addLocationPop"}]},["wpamelia-locations"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?i("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary",disabled:e.$root.isLite},on:{click:e.showDialogLocation}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_location))])]):e._e()],1),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&e.categoriesTotal>0&&!0===e.$root.settings.capabilities.canWrite&&"services"===e.bookableType?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogService}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_service))])]):e._e(),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"popover",rawName:"v-popover:addPackagePop",arg:"addPackagePop"}]},[i("el-popover",e._b({ref:"addPackagePop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&e.packagesTotal>=0&&!0===e.$root.settings.capabilities.canWrite&&"packages"===e.bookableType?i("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary"},on:{click:e.showDialogPackage}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_package))])]):e._e()],1)]),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"popover",rawName:"v-popover:addResourcePop",arg:"addResourcePop"}]},[i("el-popover",e._b({ref:"addResourcePop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&"resources"===e.bookableType?i("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary"},on:{click:function(t){return e.showDialogResource()}}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_resource))])]):e._e()],1)]),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"popover",rawName:"v-popover:addCouponPop",arg:"addCouponPop"}]},[i("el-popover",e._b({ref:"addCouponPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),"wpamelia-finance"===e.$router.currentRoute.name&&e.addNewCouponBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?i("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary"},on:{click:e.showDialogCoupon}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_coupon))])]):e._e()],1)]),e._v(" "),i("transition",{attrs:{name:"fade"}},["wpamelia-cf"===e.$router.currentRoute.name&&e.addNewCustomFieldBtnDisplay?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomFields}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_custom_field))])]):e._e()],1),e._v(" "),"wpamelia-dashboard"===e.$router.currentRoute.name?i("div",{staticClass:"v-calendar-column"},[i("div",{staticClass:"el-form-item__content"},[i("v-date-picker",{attrs:{mode:"range","popover-visibility":"focus","popover-direction":"bottom","popover-align":"right","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:e.vCalendarFormats,"is-double-paned":!0},on:{input:e.changeFilter},model:{value:e.params.dates,callback:function(t){e.$set(e.params,"dates",t)},expression:"params.dates"}})],1)]):e._e(),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name?i("div",{staticClass:"am-calendar-header-filters"},[i("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[i("el-form-item",{attrs:{label:e.$root.labels.services+":"}},[i("el-select",{attrs:{multiple:"",filterable:"","collapse-tags":"",loading:!e.fetched,placeholder:e.$root.labels.all_services},on:{change:e.changeFilter},model:{value:e.params.services,callback:function(t){e.$set(e.params,"services",t)},expression:"params.services"}},e._l(e.categories,function(t){return i("div",{key:t.id},[i("div",{staticClass:"am-drop-parent",on:{click:function(i){return e.selectAllInCategory(t.id)}}},[i("span",[e._v(e._s(t.name))])]),e._v(" "),e._l(t.serviceList,function(e){return i("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1),e._v(" "),i("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.locations.length,expression:"locations.length"}],attrs:{label:e.$root.labels.locations+":"}},[i("el-select",{attrs:{multiple:"",clearable:"","collapse-tags":"",placeholder:e.$root.labels.all_locations,loading:!e.fetched},on:{change:e.changeFilter},model:{value:e.params.locations,callback:function(t){e.$set(e.params,"locations",t)},expression:"params.locations"}},e._l(e.locations,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name&&("admin"===e.$root.settings.role||"manager"===e.$root.settings.role||"provider"===e.$root.settings.role&&e.$root.settings.roles.allowWriteAppointments)?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[i("i",{staticClass:"el-icon-plus"}),e._v(" "),i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e()],1):e._e(),e._v(" "),e.oldCustomize&&"wpamelia-customize"===e.$router.currentRoute.name?i("div",{staticClass:"am-calendar-header-filters"},[i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showMainCustomize}},[i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.go_back))])])],1):e._e()],1)],1)],1)},staticRenderFns:[]}},736:function(e,t,i){var o=i(335)(i(739),i(740),!1,function(e){i(737)},null,null);e.exports=o.exports},737:function(e,t,i){var o=i(738);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);i(705)("12c8ac4e",o,!0,{})},738:function(e,t,i){(e.exports=i(704)(!1)).push([e.i,".am-dialog-new-customize__content-img{margin-bottom:12px}.am-dialog-new-customize__content-img img{display:inline-block;width:100%;border-radius:6px}.am-dialog-new-customize__content-heading{font-family:Amelia Roboto,sans-serif;font-size:15px;font-weight:400;line-height:1.6;color:#1a2c37;word-break:break-word;margin:0 0 16px}.am-dialog-new-customize__content-list{margin-bottom:20px}.am-dialog-new-customize__content-list__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:0 0 16px}.am-dialog-new-customize__content-list__item span{font-size:15px;font-weight:600;color:#1a2c37;margin:0 0 0 12px}.am-dialog-new-customize__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.am-dialog-new-customize__footer .el-button.el-button--primary{width:100%;border-radius:8px;margin-bottom:8px}.am-dialog-new-customize__footer .el-button.el-button--primary span{font-family:Amelia Roboto,sans-serif;font-size:14px;font-weight:500}.am-dialog-new-customize__footer .el-button.el-button--secondary{max-width:100px;border-radius:8px;border:none;background-color:#fff;margin:0}.am-dialog-new-customize__footer .el-button.el-button--secondary span{font-family:Amelia Roboto,sans-serif;font-size:14px;font-weight:500;color:#1a2c37}.am-dialog-new-customize .el-dialog{max-width:500px;width:100%;background-color:#fff;border-radius:8px;padding:24px;-webkit-box-sizing:border-box;box-sizing:border-box}.am-dialog-new-customize .el-dialog__body,.am-dialog-new-customize .el-dialog__footer,.am-dialog-new-customize .el-dialog__header{padding:0}.am-dialog-new-customize .el-dialog__header h1{font-family:Amelia Roboto,sans-serif;font-size:28px;font-weight:700;line-height:1.2857;color:#1a2c37;margin:0 0 16px}",""])},739:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"DialogNewCustomize",props:{customizePage:{type:Boolean,default:!1}},data:function(){return{dialogNewCustomize:!0}},created:function(){this.dialogNewCustomize=this.$root.settings.activation.showAmeliaPromoCustomizePopup},methods:{goToCustomize:function(){this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaPromoCustomizePopup:!1}}).then(function(e){window.location.href="admin.php?page=wpamelia-customize-new¤t=cbf"}).catch(function(e){})},closeDialog:function(){var e=this;this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaPromoCustomizePopup:!1}}).then(function(t){e.dialogNewCustomize=!1}).catch(function(t){e.dialogNewCustomize=!1})}}}},740:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return!e.dialogNewCustomize||"admin"!==e.$root.settings.role&&"manager"!==e.$root.settings.role?e._e():i("el-dialog",{staticClass:"am-dialog-new-customize",attrs:{"show-close":!1,"close-on-click-modal":!1,"append-to-body":!0,visible:e.dialogNewCustomize},on:{"update:visible":function(t){e.dialogNewCustomize=t}},scopedSlots:e._u([{key:"title",fn:function(){return[i("h1",[e._v("\n "+e._s(e.$root.labels.customize_dialog_heading)+"\n ")])]},proxy:!0},{key:"default",fn:function(){return[i("div",{staticClass:"am-dialog-new-customize__content"},[i("div",{staticClass:"am-dialog-new-customize__content-img"},[i("img",{attrs:{src:e.$root.getUrl+"v3/src/assets/img/admin/customize/amelia-cat-2-0.png",alt:e.$root.labels.customize_dialog_heading}})]),e._v(" "),i("div",{staticClass:"am-dialog-new-customize__content-heading",domProps:{innerHTML:e._s(e.$root.labels.customize_dialog_sub_heading)}}),e._v(" "),i("div",{staticClass:"am-dialog-new-customize__content-description"})])]},proxy:!0},{key:"footer",fn:function(){return[i("div",{staticClass:"am-dialog-new-customize__footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.goToCustomize}},[e.customizePage?e._e():[e._v("\n "+e._s(e.$root.labels.customize_dialog_go_to)+"\n ")],e._v(" "),e.customizePage?[e._v("\n "+e._s(e.$root.labels.customize_dialog_check)+"\n ")]:e._e()],2),e._v(" "),i("el-button",{attrs:{type:"secondary"},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.customize_dialog_close)+"\n ")])],1)]},proxy:!0}],null,!1,1990058167)})},staticRenderFns:[]}},741:function(e,t,i){var o=i(335)(i(744),i(745),!1,function(e){i(742)},null,null);e.exports=o.exports},742:function(e,t,i){var o=i(743);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);i(705)("279425cc",o,!0,{})},743:function(e,t,i){(e.exports=i(704)(!1)).push([e.i,".am-survey__btn{cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;bottom:32px;right:104px;width:56px;height:56px;border-radius:50%;background:#1a2c37;background:linear-gradient(330deg,#1a2c37,#1a2c37 47%,#60addd 54%,#1a2c37 61%,#1a2c37);background-size:300%;-webkit-animation:am-survey-animation 4s infinite;animation:am-survey-animation 4s infinite;z-index:1000;-webkit-box-shadow:0 8px 8px 0 rgba(0,0,0,.24),0 0 8px 0 rgba(0,0,0,.12);box-shadow:0 8px 8px 0 rgba(0,0,0,.24),0 0 8px 0 rgba(0,0,0,.12)}.am-survey__btn:hover{-webkit-animation:unset;animation:unset;background:#1a2c37}.am-survey__dialog .el-dialog{max-width:484px;width:100%;border-radius:8px}.am-survey__dialog .el-dialog__header{padding:20px 24px 24px}.am-survey__dialog .el-dialog__body{padding:0 24px 24px}.am-survey__dialog-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.am-survey__dialog-header__text{font-size:18px;font-weight:600;line-height:1.55556;color:#1a2c37}.am-survey__dialog-header__btn{font-size:15px;font-weight:500;line-height:1.6;color:#808a90;cursor:pointer}.am-survey__dialog-img{width:100%;margin-bottom:16px}.am-survey__dialog-img img{width:100%}.am-survey__dialog-text div{font-size:18px;font-weight:500;line-height:1.55556;color:#1a2c37;margin-bottom:4px}.am-survey__dialog-text span{display:block;font-size:15px;font-weight:500;line-height:1.6;color:#1a2c37;word-break:break-word}@-webkit-keyframes am-survey-animation{0%{-webkit-transform:scale(1);transform:scale(1);background-position:100% 0}15%{-webkit-transform:scale(1.05);transform:scale(1.05)}20%{background-position:-20% 0}30%{-webkit-transform:scale(1);transform:scale(1)}to{background-position:-20% 0}}@keyframes am-survey-animation{0%{-webkit-transform:scale(1);transform:scale(1);background-position:100% 0}15%{-webkit-transform:scale(1.05);transform:scale(1.05)}20%{background-position:-20% 0}30%{-webkit-transform:scale(1);transform:scale(1)}to{background-position:-20% 0}}",""])},744:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"AmSurvey",data:function(){return{dialogSurvey:!1,surveyVisibility:!0}},created:function(){this.surveyVisibility=this.$root.settings.activation.showAmeliaSurvey},methods:{closeForever:function(){var e=this;this.dialogSurvey=!1,this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaSurvey:!1}}).then(function(t){e.surveyVisibility=!1}).catch(function(e){})},maybeLater:function(){this.dialogSurvey=!1},goToSurvey:function(){this.dialogSurvey=!1,window.open("https://www.surveymonkey.com/r/VJQDLVX","_blank")},openSurvey:function(){this.dialogSurvey=!0}}}},745:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.surveyVisibility&&"admin"===e.$root.settings.role?i("div",{staticClass:"am-survey__wrapper"},[i("el-dialog",{staticClass:"am-survey__dialog",attrs:{"show-close":!1,"close-on-click-modal":!1,"append-to-body":!0,visible:e.dialogSurvey},on:{"update:visible":function(t){e.dialogSurvey=t}},scopedSlots:e._u([{key:"title",fn:function(){return[i("div",{staticClass:"am-survey__dialog-header"},[i("span",{staticClass:"am-survey__dialog-header__text"},[e._v("\n "+e._s(e.$root.labels.survey_heading)+"\n ")]),e._v(" "),i("span",{staticClass:"am-survey__dialog-header__btn",on:{click:e.closeForever}},[e._v("\n "+e._s(e.$root.labels.survey_close)+"\n ")])])]},proxy:!0},{key:"default",fn:function(){return[i("div",{staticClass:"am-survey__dialog-content"},[i("div",{staticClass:"am-survey__dialog-img"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/survey/am-survey.png",alt:e.$root.labels.survey_heading}})]),e._v(" "),i("div",{staticClass:"am-survey__dialog-text",domProps:{innerHTML:e._s(e.$root.labels.survey_content)}})])]},proxy:!0},{key:"footer",fn:function(){return[i("div",{staticClass:"am-survey__dialog-footer"},[i("el-button",{attrs:{type:"secondary"},on:{click:e.maybeLater}},[e._v("\n "+e._s(e.$root.labels.survey_maybe)+"\n ")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.goToSurvey}},[e._v("\n "+e._s(e.$root.labels.survey_sure)+"\n ")])],1)]},proxy:!0}],null,!1,3092811696)}),e._v(" "),i("div",{staticClass:"am-survey__btn",on:{click:e.openSurvey}},[i("img",{attrs:{src:e.$root.getUrl+"public/img/survey/am-clipboard.svg"}})])],1):e._e()},staticRenderFns:[]}},746:function(e,t,i){"use strict";t.a={data:function(){return{}},methods:{updateStashEntities:function(e){this.$root.settings.activation.stash&&this.$http.post(this.$root.getAjaxUrl+"/stash",e).then(function(e){})}}}},747:function(e,t,i){"use strict";var o=i(700),n=i(338);t.a={mixins:[o.a,n.a],data:function(){return{groupedPlaceholders:{},initialGroupedPlaceholders:{companyPlaceholders:[{value:"%company_address%",label:this.$root.labels.ph_company_address},{value:"%company_name%",label:this.$root.labels.ph_company_name},{value:"%company_phone%",label:this.$root.labels.ph_company_phone},{value:"%company_website%",label:this.$root.labels.ph_company_website},{value:"%company_email%",label:this.$root.labels.ph_company_email}],customerPlaceholders:[{value:"%customer_email%",label:this.$root.labels.ph_customer_email},{value:"%customer_first_name%",label:this.$root.labels.ph_customer_first_name},{value:"%customer_full_name%",label:this.$root.labels.ph_customer_full_name},{value:"%customer_last_name%",label:this.$root.labels.ph_customer_last_name},{value:"%customer_note%",label:this.$root.labels.ph_customer_note},{value:"%customer_phone%",label:this.$root.labels.ph_customer_phone},{value:"%customer_panel_url%",label:this.$root.labels.ph_customer_cabinet_url,parse:"link"}],packagePlaceholders:[{value:"%package_appointments_details%",label:this.$root.labels.ph_package_appointments_details},{value:"%package_description%",label:this.$root.labels.ph_package_description},{value:"%package_duration%",label:this.$root.labels.ph_package_duration},{value:"%package_name%",label:this.$root.labels.ph_package_name},{value:"%package_price%",label:this.$root.labels.ph_package_price},{value:"%time_zone%",label:this.$root.labels.ph_time_zone},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used}],employeePlaceholders:[{value:"%employee_email%",label:this.$root.labels.ph_employee_email},{value:"%employee_first_name%",label:this.$root.labels.ph_employee_first_name},{value:"%employee_full_name%",label:this.$root.labels.ph_employee_full_name},{value:"%employee_last_name%",label:this.$root.labels.ph_employee_last_name},{value:"%employee_note%",label:this.$root.labels.ph_employee_note},{value:"%employee_description%",label:this.$root.labels.ph_employee_description},{value:"%employee_phone%",label:this.$root.labels.ph_employee_phone},{value:"%employee_panel_url%",label:this.$root.labels.ph_employee_cabinet_url,parse:"link"},{value:"%employee_password%",label:this.$root.labels.ph_employee_password}],paymentPlaceholders:[{value:"%payment_type%",label:this.$root.labels.ph_payment_type},{value:"%appointment_deposit_payment%",label:this.$root.labels.ph_appointment_deposit_payment},{value:"%event_deposit_payment%",label:this.$root.labels.ph_event_deposit_payment},{value:"%package_deposit_payment%",label:this.$root.labels.ph_package_deposit_payment},{value:"%payment_link_woocommerce%",label:this.$root.labels.ph_payment_link_woocommerce},{value:"%payment_link_mollie%",label:this.$root.labels.ph_payment_link_mollie},{value:"%payment_link_paypal%",label:this.$root.labels.ph_payment_link_paypal},{value:"%payment_link_stripe%",label:this.$root.labels.ph_payment_link_stripe},{value:"%payment_link_razorpay%",label:this.$root.labels.ph_payment_link_razorpay}],categoryPlaceholders:[{value:"%category_name%",label:this.$root.labels.ph_category_name},{value:"%service_description%",label:this.$root.labels.ph_service_description},{value:"%service_duration%",label:this.$root.labels.ph_service_duration},{value:"%service_name%",label:this.$root.labels.ph_service_name},{value:"%service_price%",label:this.$root.labels.ph_service_price}],locationPlaceholders:[{value:"%location_address%",label:this.$root.labels.ph_location_address},{value:"%location_description%",label:this.$root.labels.ph_location_description},{value:"%location_name%",label:this.$root.labels.ph_location_name},{value:"%location_phone%",label:this.$root.labels.ph_location_phone}],appointmentPlaceholders:[{value:"%appointment_id%",label:this.$root.labels.ph_appointment_id},{value:"%appointment_cancel_url%",label:this.$root.labels.ph_appointment_cancel_url,parse:"link"},{value:"%appointment_date%",label:this.$root.labels.ph_appointment_date},{value:"%appointment_date_time%",label:this.$root.labels.ph_appointment_date_time},{value:"%appointment_start_time%",label:this.$root.labels.ph_appointment_start_time},{value:"%appointment_end_time%",label:this.$root.labels.ph_appointment_end_time},{value:"%initial_appointment_date%",label:this.$root.labels.ph_initial_appointment_date},{value:"%initial_appointment_date_time%",label:this.$root.labels.ph_initial_appointment_date_time},{value:"%initial_appointment_start_time%",label:this.$root.labels.ph_initial_appointment_start_time},{value:"%initial_appointment_end_time%",label:this.$root.labels.ph_initial_appointment_end_time},{value:"%appointment_duration%",label:this.$root.labels.ph_appointment_duration},{value:"%appointment_notes%",label:this.$root.labels.ph_appointment_notes},{value:"%appointment_price%",label:this.$root.labels.ph_appointment_price},{value:"%appointment_status%",label:this.$root.labels.ph_appointment_status},{value:"%booked_customer%",label:this.$root.labels.ph_booked_customer},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used},{value:"%number_of_persons%",label:this.$root.labels.ph_booking_number_of_persons},{value:"%recurring_appointments_details%",label:this.$root.labels.ph_recurring_appointments_details},{value:"%group_appointment_details%",label:this.$root.labels.ph_group_appointment_details},{value:"%zoom_host_url%",label:this.$root.labels.ph_zoom_host_url},{value:"%zoom_join_url%",label:this.$root.labels.ph_zoom_join_url},{value:"%google_meet_url%",label:this.$root.labels.ph_google_meet_url},{value:"%lesson_space_url%",label:this.$root.labels.ph_lesson_space_url},{value:"%reservation_name%",label:this.$root.labels.ph_reservation_name},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description},{value:"%time_zone%",label:this.$root.labels.ph_time_zone}],eventPlaceholders:[{value:"%attendee_code%",label:this.$root.labels.ph_attendee_code},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used},{value:"%event_cancel_url%",label:this.$root.labels.ph_event_cancel_url,parse:"link"},{value:"%event_description%",label:this.$root.labels.ph_event_description},{value:"%event_location%",label:this.$root.labels.ph_event_location},{value:"%event_end_date%",label:this.$root.labels.ph_event_end_date},{value:"%event_end_date_time%",label:this.$root.labels.ph_event_end_date_time},{value:"%event_end_time%",label:this.$root.labels.ph_event_end_time},{value:"%group_event_details%",label:this.$root.labels.ph_group_event_details},{value:"%event_tickets%",label:this.$root.labels.ph_event_tickets},{value:"%event_name%",label:this.$root.labels.ph_event_name},{value:"%event_period_date%",label:this.$root.labels.ph_event_period_date},{value:"%event_period_date_time%",label:this.$root.labels.ph_event_period_date_time},{value:"%event_price%",label:this.$root.labels.ph_event_price},{value:"%booking_price%",label:this.$root.labels.ph_booking_price},{value:"%event_start_date%",label:this.$root.labels.ph_event_start_date},{value:"%event_start_date_time%",label:this.$root.labels.ph_event_start_date_time},{value:"%event_start_time%",label:this.$root.labels.ph_event_start_time},{value:"%initial_event_start_date%",label:this.$root.labels.ph_initial_event_start_date},{value:"%initial_event_start_date_time%",label:this.$root.labels.ph_initial_event_start_date_time},{value:"%initial_event_start_time%",label:this.$root.labels.ph_initial_event_start_time},{value:"%initial_event_end_date%",label:this.$root.labels.ph_initial_event_end_date},{value:"%initial_event_end_date_time%",label:this.$root.labels.ph_initial_event_end_date_time},{value:"%initial_event_end_time%",label:this.$root.labels.ph_initial_event_end_time},{value:"%employee_name_email_phone%",label:this.$root.labels.ph_employee_name_email_phone},{value:"%number_of_persons%",label:this.$root.labels.ph_booking_number_of_persons},{value:"%lesson_space_url_date%",label:this.$root.labels.ph_lesson_space_url_date},{value:"%lesson_space_url_date_time%",label:this.$root.labels.ph_lesson_space_url_date_time},{value:"%google_meet_url_date%",label:this.$root.labels.ph_google_meet_url_date},{value:"%google_meet_url_date_time%",label:this.$root.labels.ph_google_meet_url_date_date},{value:"%zoom_host_url_date%",label:this.$root.labels.ph_zoom_host_url_date},{value:"%zoom_host_url_date_time%",label:this.$root.labels.ph_zoom_host_url_date_date},{value:"%zoom_join_url_date%",label:this.$root.labels.ph_zoom_join_url_date},{value:"%zoom_join_url_date_time%",label:this.$root.labels.ph_zoom_join_url_date_date},{value:"%reservation_name%",label:this.$root.labels.ph_reservation_name},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description},{value:"%time_zone%",label:this.$root.labels.ph_time_zone}],customFieldsPlaceholders:[],extrasPlaceholders:[],couponsPlaceholders:[]},placeholders:[],linksForParsing:{"%customer_panel_url%":'<a href="%customer_panel_url%">'+this.$root.labels.ph_customer_cabinet_url+"</a>","%employee_panel_url%":'<a href="%employee_panel_url%">'+this.$root.labels.ph_employee_cabinet_url+"</a>","%appointment_cancel_url%":'<a href="%appointment_cancel_url%">'+this.$root.labels.ph_appointment_cancel_url+"</a>","%event_cancel_url%":'<a href="%event_cancel_url%">'+this.$root.labels.ph_event_cancel_url+"</a>"},plainTextLinksForParsing:{"%customer_panel_url%":'<a href="%customer_panel_url%">'+this.$root.labels.ph_customer_cabinet_url+"</a>","%employee_panel_url%":'<a href="%employee_panel_url%">'+this.$root.labels.ph_employee_cabinet_url+"</a>","%appointment_cancel_url%":'<a href="%appointment_cancel_url%">'+this.$root.labels.ph_appointment_cancel_url+"</a>","%event_cancel_url%":'<a href="%event_cancel_url%">'+this.$root.labels.ph_event_cancel_url+"</a>"}}},methods:{getEventPlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.employeePlaceholders.concat(this.groupedPlaceholders.locationPlaceholders.concat(this.groupedPlaceholders.customFieldsPlaceholders.concat(this.groupedPlaceholders.eventPlaceholders.concat(this.groupedPlaceholders.couponsPlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))))))},getAppointmentPlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.employeePlaceholders.concat(this.groupedPlaceholders.locationPlaceholders.concat(this.groupedPlaceholders.customFieldsPlaceholders.concat(this.groupedPlaceholders.couponsPlaceholders.concat(this.groupedPlaceholders.appointmentPlaceholders.concat(this.groupedPlaceholders.categoryPlaceholders.concat(this.groupedPlaceholders.extrasPlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))))))))},getPackagePlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.packagePlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))},removePlaceholder:function(e,t){if(e in this.groupedPlaceholders){var i=null;this.groupedPlaceholders[e].forEach(function(e,o){e.value===t&&(i=o)}),null!==i&&this.groupedPlaceholders[e].splice(i,1)}},getParsedCodeLabel:function(e){if("link"===e.parse)for(var t in this.linksForParsing)if(e.value===t)return this.linksForParsing[t];return""},closeDialog:function(){this.$emit("closeDialogPlaceholders")},copyCodeText:function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),document.body.removeChild(t),this.notify("",this.$root.labels.placeholder_copied,"info","no-title")},addCustomFieldsPlaceholders:function(e){this.groupedPlaceholders.customFieldsPlaceholders=[];for(var t=0;t<this.customFields.length;t++)"file"===this.customFields[t].type&&"provider"!==e||this.groupedPlaceholders.customFieldsPlaceholders.push({value:"%custom_field_"+this.customFields[t].id+"%",label:this.customFields[t].label})},addCouponsPlaceholders:function(e){if(this.groupedPlaceholders.couponsPlaceholders=[],"customer"===e)for(var t=0;t<this.coupons.length;t++)this.groupedPlaceholders.couponsPlaceholders.push({value:"%coupon_"+this.coupons[t].id+"%",label:this.coupons[t].code+" ["+this.$root.labels.discount+": "+this.coupons[t].discount+", "+this.$root.labels.deduction+": "+this.coupons[t].deduction+this.getCurrencySymbol()+", "+this.$root.labels.expiration_date+": "+(this.coupons[t].expirationDate?this.getFrontedFormattedDate(this.coupons[t].expirationDate):"/")+"]"})},addExtrasPlaceholders:function(){this.groupedPlaceholders.extrasPlaceholders=[];for(var e=0;e<this.categories.length;e++)for(var t=0;t<this.categories[e].serviceList.length;t++)for(var i=0;i<this.categories[e].serviceList[t].extras.length;i++)this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[e].serviceList[t].extras[i].id+"_name%",label:this.categories[e].serviceList[t].extras[i].name}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[e].serviceList[t].extras[i].id+"_quantity%",label:this.categories[e].serviceList[t].extras[i].name}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[e].serviceList[t].extras[i].id+"_price%",label:this.categories[e].serviceList[t].extras[i].name});this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extras%",label:this.$root.labels.ph_extras})},setPlaceholders:function(e){var t=this;this.groupedPlaceholders=JSON.parse(JSON.stringify(this.initialGroupedPlaceholders)),this.addExtrasPlaceholders(),this.addCouponsPlaceholders(this.userTypeTab),this.addCustomFieldsPlaceholders(this.userTypeTab);var i=function(i){e[i].forEach(function(e){t.removePlaceholder(i,e)})};for(var o in e)i(o)},isDisabledInLite:function(e){return this.$root.isLite&&-1!==["%coupon_used%","%appointment_cancel_url%","%appointment_deposit_payment%","%event_deposit_payment%","%event_cancel_url%","%customer_panel_url%","%employee_panel_url%","%google_meet_url%","%zoom_join_url%","%zoom_host_url%","%zoom_host_url_date%","%zoom_host_url_date_time%","%zoom_join_url_date%","%zoom_join_url_date_time%","%lesson_space_url%","%lesson_space_url_date%","%lesson_space_url_date_time%","%location_name%","%location_description%","%location_address%","%location_phone%","%service_extras%","%recurring_appointments_details%"].indexOf(e)}},computed:{}}},748:function(e,t,i){"use strict";t.a={data:function(){return{searchCounter:0,loadingCustomers:!1,searchCustomersTimer:null,searchedCustomers:[],dialogCustomer:!1}},methods:{getInitCustomerObject:function(){return{id:0,firstName:"",lastName:"",externalId:"",phone:"",countryPhoneIso:null,email:"",gender:"",birthday:null,note:"",status:"visible",type:"customer",countPendingAppointments:0}},setInitialCustomers:function(){var e=this;"customer"!==this.$root.settings.role&&this.searchCustomers("",function(){var t=e.options.entities.customers.map(function(e){return parseInt(e.id)}),i=e.options.entities.customers;e.searchedCustomers.forEach(function(e){-1===t.indexOf(parseInt(e.id))&&(t.push(e.id),i.push(e))}),e.options.entities.customers=Object.values(i.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1}))})},searchCustomers:function(e,t){var i=this;clearTimeout(this.searchCustomersTimer),this.loadingCustomers=!0,this.searchCounter++,this.searchCustomersTimer=setTimeout(function(){var o=i.searchCounter;i.$http.get(i.$root.getAjaxUrl+"/users/customers",{params:{search:e,page:1,limit:i.$root.settings.general.customersFilterLimit,skipCount:1}}).then(function(e){o>=i.searchCounter&&(i.searchedCustomers=e.data.data.users.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),i.loadingCustomers=!1,t()}).catch(function(e){i.loadingCustomers=!1})},500)}}}},749:function(e,t,i){e.exports=i(750)},750:function(e,t,i){"use strict";var o=i(698),n=i(716),a=i(751),s=i(708);function r(e){var t=new a(e),i=n(a.prototype.request,t);return o.extend(i,a.prototype,t),o.extend(i,t),i}var l=r(s);l.Axios=a,l.create=function(e){return r(o.merge(s,e))},l.Cancel=i(720),l.CancelToken=i(765),l.isCancel=i(719),l.all=function(e){return Promise.all(e)},l.spread=i(766),e.exports=l,e.exports.default=l},751:function(e,t,i){"use strict";var o=i(708),n=i(698),a=i(760),s=i(761),r=i(763),l=i(764);function c(e){this.defaults=e,this.interceptors={request:new a,response:new a}}c.prototype.request=function(e){"string"==typeof e&&(e=n.merge({url:arguments[0]},arguments[1])),(e=n.merge(o,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!r(e.url)&&(e.url=l(e.baseURL,e.url));var t=[s,void 0],i=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)i=i.then(t.shift(),t.shift());return i},n.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,i){return this.request(n.merge(i||{},{method:e,url:t}))}}),n.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,i,o){return this.request(n.merge(o||{},{method:e,url:t,data:i}))}}),e.exports=c},752:function(e,t,i){"use strict";var o=i(698);e.exports=function(e,t){o.forEach(e,function(i,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[o])})}},753:function(e,t,i){"use strict";var o=i(718);e.exports=function(e,t,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(o("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},754:function(e,t,i){"use strict";e.exports=function(e,t,i,o,n){return e.config=t,i&&(e.code=i),e.request=o,e.response=n,e}},755:function(e,t,i){"use strict";var o=i(698);function n(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var a;if(i)a=i(t);else if(o.isURLSearchParams(t))a=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&void 0!==e&&(o.isArray(e)&&(t+="[]"),o.isArray(e)||(e=[e]),o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(n(t)+"="+n(e))}))}),a=s.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},756:function(e,t,i){"use strict";var o=i(698);e.exports=function(e){var t,i,n,a={};return e?(o.forEach(e.split("\n"),function(e){n=e.indexOf(":"),t=o.trim(e.substr(0,n)).toLowerCase(),i=o.trim(e.substr(n+1)),t&&(a[t]=a[t]?a[t]+", "+i:i)}),a):a}},757:function(e,t,i){"use strict";var o=i(698);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(e){var o=e;return t&&(i.setAttribute("href",o),o=i.href),i.setAttribute("href",o),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=n(window.location.href),function(t){var i=o.isString(t)?n(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return!0}},758:function(e,t,i){"use strict";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function n(){this.message="String contains an invalid character"}n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,i,a=String(e),s="",r=0,l=o;a.charAt(0|r)||(l="=",r%1);s+=l.charAt(63&t>>8-r%1*8)){if((i=a.charCodeAt(r+=.75))>255)throw new n;t=t<<8|i}return s}},759:function(e,t,i){"use strict";var o=i(698);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,i,n,a,s){var r=[];r.push(e+"="+encodeURIComponent(t)),o.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),o.isString(n)&&r.push("path="+n),o.isString(a)&&r.push("domain="+a),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},760:function(e,t,i){"use strict";var o=i(698);function n(){this.handlers=[]}n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=n},761:function(e,t,i){"use strict";var o=i(698),n=i(762),a=i(719),s=i(708);function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=n(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=n(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=n(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},762:function(e,t,i){"use strict";var o=i(698);e.exports=function(e,t,i){return o.forEach(i,function(i){e=i(e,t)}),e}},763:function(e,t,i){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},764:function(e,t,i){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},765:function(e,t,i){"use strict";var o=i(720);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var i=this;e(function(e){i.reason||(i.reason=new o(e),t(i.reason))})}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n(function(t){e=t}),cancel:e}},e.exports=n},766:function(e,t,i){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},767:function(e,t,i){"use strict";var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=i(12),s=(o=a)&&o.__esModule?o:{default:o};e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors={}}return n(e,[{key:"set",value:function(e){this.errors=e}},{key:"has",value:function(e){return this.errors.hasOwnProperty(e)}},{key:"get",value:function(e){if(this.has(e))return this.errors[e][0]}},{key:"getAll",value:function(e){if(this.has(e))return this.errors[e]}},{key:"clear",value:function(e){e?s.default.delete(this.errors,e):this.errors={}}},{key:"any",value:function(){return Object.keys(this.errors).length>0}}]),e}()},768:function(e,t,i){"use strict";function o(e){return void 0===e}function n(e){return Array.isArray(e)}function a(e){return e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice}e.exports=function e(t,i,s,r){if(i instanceof FormData&&(r=s,s=i,i=null),(i=i||{}).indices=!o(i.indices)&&i.indices,i.nulls=!!o(i.nulls)||i.nulls,s=s||new FormData,o(t))return s;if(function(e){return null===e}(t))i.nulls&&s.append(r,"");else if(n(t))if(t.length)t.forEach(function(t,o){var n=r+"["+(i.indices?o:"")+"]";e(t,i,s,n)});else{var l=r+"[]";s.append(l,"")}else!function(e){return e instanceof Date}(t)?!function(e){return e===Object(e)}(t)||function(e){return a(e)&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified)&&"string"==typeof e.name}(t)||a(t)?s.append(r,t):Object.keys(t).forEach(function(o){var a=t[o];if(n(a))for(;o.length>2&&o.lastIndexOf("[]")===o.length-2;)o=o.substring(0,o.length-2);e(a,i,s,r?r+"["+o+"]":o)}):s.append(r,t.toISOString());return s}},769:function(e,t,i){var o;o=function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,o){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=".",t(t.s=9)}([function(e,t,i){"use strict";t.a={prefix:"",suffix:"",thousands:",",decimal:".",precision:2}},function(e,t,i){"use strict";var o=i(2),n=i(5),a=i(0);t.a=function(e,t){if(t.value){var s=i.i(n.a)(a.a,t.value);if("INPUT"!==e.tagName.toLocaleUpperCase()){var r=e.getElementsByTagName("input");1!==r.length||(e=r[0])}e.oninput=function(){var t=e.value.length-e.selectionEnd;e.value=i.i(o.a)(e.value,s),t=Math.max(t,s.suffix.length),t=e.value.length-t,t=Math.max(t,s.prefix.length+1),i.i(o.b)(e,t),e.dispatchEvent(i.i(o.c)("change"))},e.onfocus=function(){i.i(o.b)(e,e.value.length-s.suffix.length)},e.oninput(),e.dispatchEvent(i.i(o.c)("input"))}}},function(e,t,i){"use strict";function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a;"number"==typeof e&&(e=e.toFixed(s(t.precision)));var i=e.indexOf("-")>=0?"-":"",o=l(r(a(e),t.precision)).split("."),n=o[0],c=o[1];return n=function(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+t)}(n,t.thousands),t.prefix+i+function(e,t,i){return t?e+i+t:e}(n,c,t.decimal)+t.suffix}function n(e,t){var i=e.indexOf("-")>=0?-1:1,o=r(a(e),t);return parseFloat(o)*i}function a(e){return l(e).replace(/\D+/g,"")||"0"}function s(e){return function(e,t,i){return Math.max(e,Math.min(t,i))}(0,e,20)}function r(e,t){var i=Math.pow(10,t);return(parseFloat(e)/i).toFixed(s(t))}function l(e){return e?e.toString():""}function c(e,t){var i=function(){e.setSelectionRange(t,t)};e===document.activeElement&&(i(),setTimeout(i,1))}function u(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var d=i(0);i.d(t,"a",function(){return o}),i.d(t,"d",function(){return n}),i.d(t,"b",function(){return c}),i.d(t,"c",function(){return u})},function(e,t,i){"use strict";function o(e,t){t&&Object.keys(t).map(function(e){r.a[e]=t[e]}),e.directive("money",s.a),e.component("money",a.a)}Object.defineProperty(t,"__esModule",{value:!0});var n=i(6),a=i.n(n),s=i(1),r=i(0);i.d(t,"Money",function(){return a.a}),i.d(t,"VMoney",function(){return s.a}),i.d(t,"options",function(){return r.a}),i.d(t,"VERSION",function(){return l});var l="0.8.1";t.default=o,"undefined"!=typeof window&&window.Vue&&window.Vue.use(o)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),n=i(0),a=i(2);t.default={name:"Money",props:{value:{required:!0,type:[Number,String],default:0},masked:{type:Boolean,default:!1},precision:{type:Number,default:function(){return n.a.precision}},decimal:{type:String,default:function(){return n.a.decimal}},thousands:{type:String,default:function(){return n.a.thousands}},prefix:{type:String,default:function(){return n.a.prefix}},suffix:{type:String,default:function(){return n.a.suffix}}},directives:{money:o.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(e,t){var o=i.i(a.a)(e,this.$props);o!==this.formattedValue&&(this.formattedValue=o)}}},methods:{change:function(e){this.$emit("input",this.masked?e.target.value:i.i(a.d)(e.target.value,this.precision))}}}},function(e,t,i){"use strict";t.a=function(e,t){return e=e||{},t=t||{},Object.keys(e).concat(Object.keys(t)).reduce(function(i,o){return i[o]=void 0===t[o]?e[o]:t[o],i},{})}},function(e,t,i){var o=i(7)(i(4),i(8),null,null);e.exports=o.exports},function(e,t){e.exports=function(e,t,i,o){var n,a=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(n=e,a=e.default);var r="function"==typeof a?a.options:a;if(t&&(r.render=t.render,r.staticRenderFns=t.staticRenderFns),i&&(r._scopeId=i),o){var l=r.computed||(r.computed={});Object.keys(o).forEach(function(e){var t=o[e];l[e]=function(){return t}})}return{esModule:n,exports:a,options:r}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"money",rawName:"v-money",value:{precision:e.precision,decimal:e.decimal,thousands:e.thousands,prefix:e.prefix,suffix:e.suffix},expression:"{precision, decimal, thousands, prefix, suffix}"}],staticClass:"v-money",attrs:{type:"tel"},domProps:{value:e.formattedValue},on:{change:e.change}})},staticRenderFns:[]}},function(e,t,i){e.exports=i(3)}])},e.exports=o()},770:function(e,t,i){"use strict";var o=i(697);t.a={mixins:[o.a],data:function(){return{}},methods:{getSettingsSchedule:function(){var e=[];return this.$root.settings.weekSchedule.forEach(function(t,i){var o=[];t.breaks.forEach(function(e){o.push({id:null,startTime:e.time[0]+":00",endTime:e.time[1]+":00"})});var n=[];null!==t.time[0]&&null!==t.time[1]&&("periods"in t?t.periods.forEach(function(e){n.push({id:null,startTime:e.time[0]+":00",endTime:e.time[1]+":00",serviceIds:[],periodServiceList:[],savedPeriodServiceList:[]})}):n.push({id:null,startTime:t.time[0]+":00",endTime:t.time[1]+":00",serviceIds:[],periodServiceList:[],savedPeriodServiceList:[]})),t.time[0]&&t.time[1]&&e.push({dayIndex:i+1,id:null,startTime:t.time[0]+":00",endTime:t.time[1]+":00",periodList:n,timeOutList:o})}),e},getInitEntitySettings:function(e){var t={payments:{paymentLinks:{enabled:this.$root.settings.payments.paymentLinks.enabled,changeBookingStatus:this.$root.settings.payments.paymentLinks.changeBookingStatus,redirectUrl:null},onSite:this.$root.settings.payments.onSite,wc:{productId:this.$root.settings.payments.wc.productId},payPal:{enabled:this.$root.settings.payments.payPal.enabled},stripe:{enabled:this.$root.settings.payments.stripe.enabled},mollie:{enabled:this.$root.settings.payments.mollie.enabled},razorpay:{enabled:this.$root.settings.payments.razorpay.enabled}}};switch(e){case"service":t.general={minimumTimeRequirementPriorToCanceling:null,minimumTimeRequirementPriorToRescheduling:null,redirectUrlAfterAppointment:null},t.general.defaultAppointmentStatus=null,t.general.numberOfDaysAvailableForBooking=0,t.general.minimumTimeRequirementPriorToBooking=null,t.zoom={enabled:this.$root.settings.zoom.enabled},t.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled};break;case"event":t.general={minimumTimeRequirementPriorToCanceling:null,redirectUrlAfterAppointment:null},t.zoom={enabled:this.$root.settings.zoom.enabled},t.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled}}return t},setEntitySettings:function(e,t){e.settings=null!==e.settings?JSON.parse(e.settings):this.getInitEntitySettings(t),this.addMissingObjectProperties(e.settings,this.getInitEntitySettings(t))},updateSettings:function(e){if(!this.$root.clonedSettings.payments.onSite||this.$root.clonedSettings.payments.stripe.enabled||this.$root.clonedSettings.payments.payPal.enabled||this.$root.clonedSettings.payments.wc.enabled||this.$root.clonedSettings.payments.mollie.enabled||this.$root.clonedSettings.payments.razorpay.enabled){if(!1===this.$root.clonedSettings.payments.wc.enabled&&!1===this.$root.clonedSettings.payments.mollie.enabled&&null!==e){var t=JSON.parse(e);t.payments.wc=this.$root.clonedSettings.payments.wc,t.payments.mollie=this.$root.clonedSettings.payments.mollie,this.$root.clonedSettings.payments.onSite||(t.payments.onSite=this.$root.clonedSettings.payments.onSite),this.$root.clonedSettings.payments.payPal.enabled||(t.payments.payPal=this.$root.clonedSettings.payments.payPal),this.$root.clonedSettings.payments.stripe.enabled||(t.payments.stripe=this.$root.clonedSettings.payments.stripe),this.$root.clonedSettings.payments.razorpay.enabled&&t.payments.razorpay||(t.payments.razorpay=this.$root.clonedSettings.payments.razorpay),t.payments.onSite||t.payments.payPal.enabled||t.payments.stripe.enabled||t.payments.mollie.enabled||t.payments.razorpay.enabled||(t.payments=this.$root.clonedSettings.payments),e=JSON.stringify(t)}if(!0===this.$root.clonedSettings.payments.wc.enabled&&null!==e){var i=JSON.parse(e);"payments"in i||(i.payments={}),i.payments.onSite=this.$root.clonedSettings.payments.onSite,i.payments.stripe=this.$root.clonedSettings.payments.stripe,i.payments.payPal=this.$root.clonedSettings.payments.payPal,i.payments.mollie=this.$root.clonedSettings.payments.mollie,i.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(i)}if(!0===this.$root.clonedSettings.payments.mollie.enabled&&null!==e){var o=JSON.parse(e);"payments"in o||(o.payments={}),this.$root.clonedSettings.payments.onSite||(o.payments.onSite=this.$root.clonedSettings.payments.onSite,o.payments.mollie=this.$root.clonedSettings.payments.mollie),o.payments.stripe=this.$root.clonedSettings.payments.stripe,o.payments.payPal=this.$root.clonedSettings.payments.payPal,o.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(o)}this.replaceExistingObjectProperties(this.$root.settings,null!==e?JSON.parse(e):this.$root.clonedSettings)}},prepareEntitySettingsForSave:function(e){var t=JSON.parse(JSON.stringify(e.settings));return t.payments.wc.productId===this.$root.settings.payments.wc.productId&&delete t.payments.wc,"general"in t&&(t.general.redirectUrlAfterAppointment||delete t.general.redirectUrlAfterAppointment,t.general.defaultAppointmentStatus||delete t.general.defaultAppointmentStatus,(t.general.minimumTimeRequirementPriorToBooking||this.$root.settings.general.minimumTimeRequirementPriorToBooking)&&""!==t.general.minimumTimeRequirementPriorToBooking||delete t.general.minimumTimeRequirementPriorToBooking,(t.general.minimumTimeRequirementPriorToCanceling||this.$root.settings.general.minimumTimeRequirementPriorToCanceling)&&""!==t.general.minimumTimeRequirementPriorToCanceling||delete t.general.minimumTimeRequirementPriorToCanceling,(t.general.minimumTimeRequirementPriorToRescheduling||this.$root.settings.general.minimumTimeRequirementPriorToRescheduling)&&""!==t.general.minimumTimeRequirementPriorToRescheduling||delete t.general.minimumTimeRequirementPriorToRescheduling,t.general.numberOfDaysAvailableForBooking||delete t.general.numberOfDaysAvailableForBooking,0===Object.keys(t.general).length&&delete t.general),0===Object.keys(t).length&&(t=null),t}},computed:{}}},771:function(e,t,i){var o;o=function(e){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,o){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=2)}([function(t,i){t.exports=e},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(4),n=i.n(o),a=i(6),s=i(5)(n.a,a.a,!1,null,null,null);t.default=s.exports},function(e,t,i){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.quillEditor=t.Quill=void 0;var n=o(i(0)),a=o(i(1)),s=window.Quill||n.default,r=function(e,t){t&&(a.default.props.globalOptions.default=function(){return t}),e.component(a.default.name,a.default)},l={Quill:s,quillEditor:a.default,install:r};t.default=l,t.Quill=s,t.quillEditor=a.default,t.install=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={theme:"snow",boundary:document.body,modules:{toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["link","image","video"]]},placeholder:"Insert text here ...",readOnly:!1}},function(e,t,i){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=o(i(0)),a=o(i(3)),s=window.Quill||n.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),o=1;o<arguments.length;o++){var n=arguments[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])}return i},writable:!0,configurable:!0}),t.default={name:"quill-editor",data:function(){return{_options:{},_content:"",defaultOptions:a.default}},props:{content:String,value:String,disabled:{type:Boolean,default:!1},options:{type:Object,required:!1,default:function(){return{}}},globalOptions:{type:Object,required:!1,default:function(){return{}}}},mounted:function(){this.initialize()},beforeDestroy:function(){this.quill=null,delete this.quill},methods:{initialize:function(){var e=this;this.$el&&(this._options=Object.assign({},this.defaultOptions,this.globalOptions,this.options),this.quill=new s(this.$refs.editor,this._options),this.quill.enable(!1),(this.value||this.content)&&this.quill.pasteHTML(this.value||this.content),this.disabled||this.quill.enable(!0),this.quill.on("selection-change",function(t){t?e.$emit("focus",e.quill):e.$emit("blur",e.quill)}),this.quill.on("text-change",function(t,i,o){var n=e.$refs.editor.children[0].innerHTML,a=e.quill,s=e.quill.getText();"<p><br></p>"===n&&(n=""),e._content=n,e.$emit("input",e._content),e.$emit("change",{html:n,text:s,quill:a})}),this.$emit("ready",this.quill))}},watch:{content:function(e,t){this.quill&&(e&&e!==this._content?(this._content=e,this.quill.pasteHTML(e)):e||this.quill.setText(""))},value:function(e,t){this.quill&&(e&&e!==this._content?(this._content=e,this.quill.pasteHTML(e)):e||this.quill.setText(""))},disabled:function(e,t){this.quill&&this.quill.enable(!e)}}}},function(e,t){e.exports=function(e,t,i,o,n,a){var s,r=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(s=e,r=e.default);var c,u="function"==typeof r?r.options:r;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),n&&(u._scopeId=n),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=o),c){var d=u.functional,p=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(e,t){return c.call(t),p(e,t)}):u.beforeCreate=p?[].concat(p,c):[c]}return{esModule:s,exports:r,options:u}}},function(e,t,i){"use strict";var o={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"quill-editor"},[e._t("toolbar"),e._v(" "),i("div",{ref:"editor"})],2)},staticRenderFns:[]};t.a=o}])},e.exports=o(i(797))},772:function(e,t,i){var o=i(335)(i(796),i(802),!1,null,null,null);e.exports=o.exports},775:function(e,t,i){"use strict";t.a={data:function(){return{}},methods:{getAppointmentService:function(e){return this.getProviderById(e.providerId).serviceList.find(function(t){return t.id===e.serviceId})||this.getServiceById(e.serviceId)},getBookingServicePrice:function(e,t){return e.customPricing.enabled&&t.duration&&e.customPricing.durations.filter(function(e){return e.duration===t.duration}).length?e.customPricing.durations.find(function(e){return e.duration===t.duration}).price:e.price},getAppointmentPrice:function(e,t,i,o){var n=0,a=this,s=parseInt(e)!==parseInt(t.id);return i.forEach(function(e){var i=(null===e.duration?t.duration:e.duration)!==t.duration,r=a.getBookingServicePrice(t,e);e.payments.length>0?["approved","pending"].includes(e.status)&&(n+=a.getBookingPrice(e,s,s||i?r:e.price,e.aggregatedPrice)):o||(n+=a.getBookingPrice(e,!0,r,t.aggregatedPrice))}),this.getFormattedPrice(n>=0?n:0,!this.$root.settings.payments.hideCurrencySymbolFrontend)},getBookingPrice:function(e,t,i,o){var n=0;e.extras.forEach(function(t){if(void 0===t.selected||!0===t.selected){var i=null===t.aggregatedPrice?o:t.aggregatedPrice;n+=t.price*t.quantity*(i?e.persons:1)}});var a=(t?i:e.price)*(o?e.persons:1)+n,s=a/100*(e.coupon?e.coupon.discount:0)+(e.coupon?e.coupon.deduction:0);return s>a?0:a-s},getPackagePrice:function(e){var t=e.bookings[0].packageCustomerService.packageCustomer.coupon,i=e.bookings[0].packageCustomerService.packageCustomer.price,o=i/100*(t?t.discount:0)+(t?t.deduction:0);return o>i?0:i-o}}}},776:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(711),n=i.n(o),a=i(700),s=i(338),r=i(727),l=i(746);t.default={mixins:[a.a,s.a,r.a,l.a],props:{formName:"",urlName:null,isNew:null,entity:null,getParsedEntity:null,updateStash:!1,haveSaveConfirmation:null,hasApplyGloballyVisibility:!1,hasApplyGloballyDeletion:!1,loadSaveButton:!1,calendarConflict:{enable:!1},getCalendarEvents:null,hasIcons:!0,status:null,buttonType:{status:"primary",remove:"danger"},action:{haveAdd:!1,haveEdit:!1,haveStatus:!1,haveRemove:!1,haveRemoveEffect:!1,ignoreDeleteEffect:!1,haveDuplicate:!1,haveSaveWarning:!1},message:{success:{save:null,remove:null,show:null,hide:null},confirm:{remove:null,show:null,hide:null,duplicate:null,save:null,saveDetails:null}},buttonText:null},data:function(){return{form:new n.a,allowedDelete:!0,showDeleteConfirmation:!1,showVisibilityConfirmation:!1,showDuplicateConfirmation:!1,showSaveConfirmation:!1,showAddHoursDialog:!1,confirmCalendarConflict:!1,deleteEffectMessage:null,dialogLoading:!1}},created:function(){n.a.defaults.axios=this.$http},methods:{getButtonType:function(e){switch(e){case"status":return this.hasIcons?null:this.buttonType.status;case"remove":return this.hasIcons?null:this.buttonType.remove;case"duplicate":return this.hasIcons?null:this.buttonType.duplicate}},closeDialog:function(){this.$parent.$emit("closeDialog")},onSubmit:function(e){var t=this,i=this.$root;this.$parent.$refs[this.formName].validate(function(o,n){if(!o)return"appointment"===t.formName&&t.handleDialogTabChange(n,"bookings."),"service"===t.formName&&t.handleDialogTabChange(n,"duration"),t.$emit("validationFailCallback"),!1;t.calendarConflict&&t.calendarConflict.enabled?(t.handleSaveConfirmation(),e&&(t.$emit("confirmCalendarConflict"),t.confirmCalendarConflict=!0,t.handleSaveClick(e))):(t.dialogLoading=!0,t.isNew?t.addEntity(e):t.editEntity(e)),t.$root=i})},onSuccess:function(e,t,i){var o=this;this.$parent.$emit("saveCallback",i),setTimeout(function(){o.dialogLoading=!1,o.$parent.$emit("closeDialog")},300),this.notify(e,t,"success")},onError:function(e,t){this.dialogLoading=!1,this.$emit("errorCallback",t)},addEntity:function(e){var t=this,i=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(i=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName,this.getParsedEntity(e),i).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data)})},editEntity:function(e){var t=this,i=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(i=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName+"/"+this.entity.id,this.getParsedEntity(e),i).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data)})},deleteEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/delete/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.remove,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},showEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.show,null),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},hideEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.off,applyGlobally:e}).then(function(){t.onSuccess(t.$root.labels.success,t.message.success.hide,null),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},duplicateEntity:function(){var e=this;this.dialogLoading=!0,this.$parent.$emit("closeDialog",!0),this.$parent.$emit("duplicateCallback",this.entity),setTimeout(function(){e.showDuplicateConfirmation=!1,e.dialogLoading=!1},600)},handleSaveConfirmation:function(){this.showSaveConfirmation=!this.showSaveConfirmation,this.showVisibilityConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1},handleDuplicateConfirmation:function(){this.showDuplicateConfirmation=!this.showDuplicateConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showVisibilityConfirmation=!1},handleVisibilityConfirmation:function(){this.showVisibilityConfirmation=!this.showVisibilityConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1},handleDeleteConfirmation:function(){var e=this;this.showVisibilityConfirmation=!1,this.showDuplicateConfirmation=!1,this.showSaveConfirmation=!1,this.action.haveRemoveEffect?!1===this.showDeleteConfirmation&&this.$http.get(this.$root.getAjaxUrl+"/"+this.urlName+"/effect/"+this.entity.id).then(function(t){e.allowedDelete=t.data.data.valid||e.ignoreDeleteEffect,e.deleteEffectMessage=t.data.data.message,e.showDeleteConfirmation=!e.showDeleteConfirmation}).catch(function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.deleteEffectMessage=""}):this.showDeleteConfirmation=!this.showDeleteConfirmation},handleSaveClick:function(){var e=this;this.getCalendarEvents&&!this.confirmCalendarConflict?this.getCalendarEvents().then(function(){e.haveSaveConfirmation&&e.haveSaveConfirmation()?e.handleSaveConfirmation():e.onSubmit(!1)}):this.haveSaveConfirmation&&this.haveSaveConfirmation()?this.handleSaveConfirmation():this.onSubmit(!1)},getConfirmSaveButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.save?{yes:this.buttonText.confirm.save.yes,no:this.buttonText.confirm.save.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmDeleteButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.remove?{yes:this.buttonText.confirm.remove.yes,no:this.buttonText.confirm.remove.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.status?{yes:this.buttonText.confirm.status.yes,no:this.buttonText.confirm.status.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getActionStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.status:""},getActionRemoveButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.remove:""},getActionDuplicateButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.duplicate:""},handleDialogTabChange:function(e,t){for(var i=Object.keys(e),o=0,n=0;n<i.length;n++)o=i[n].startsWith(t)?o+1:o;o===i.length&&this.$emit("validationTabFailCallback")},isStatusOn:function(){return this.entity.status===this.status.on},isStatusOff:function(){return this.entity.status===this.status.off}},computed:{},components:{}}},777:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticClass:"am-dialog-footer"},[i("div",{staticClass:"am-dialog-footer-actions"},[i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[i("h3",{directives:[{name:"show",rawName:"v-show",value:e.allowedDelete,expression:"allowedDelete"}]},[e._v("\n "+e._s(e.message.confirm.remove)+"\n ")]),e._v(" "),e.action.haveRemoveEffect&&e.deleteEffectMessage?i("el-alert",{attrs:{title:"",type:"warning",description:e.deleteEffectMessage,"show-icon":"",closable:!1}}):e._e(),e._v(" "),e.hasApplyGloballyDeletion?i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmDeleteButtonText().no)+"\n ")]),e._v(" "),i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmDeleteButtonText().yes)+"\n ")])],1):i("div",{staticClass:"align-left"},[e.allowedDelete?i("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]):e._e(),e._v(" "),e.allowedDelete?i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!1)}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")]):e._e(),e._v(" "),e.allowedDelete?e._e():i("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.close)+"\n ")])],1)],1)]),e._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[e.status?i("div",{directives:[{name:"show",rawName:"v-show",value:e.showVisibilityConfirmation,expression:"showVisibilityConfirmation"}],staticClass:"am-dialog-confirmation"},[e.isStatusOn()?i("h3",[e._v(e._s(e.message.confirm.hide))]):e.isStatusOff()?i("h3",[e._v(e._s(e.message.confirm.show))]):e._e(),e._v(" "),e.hasApplyGloballyVisibility?i("div",{staticClass:"align-left"},[e.isStatusOn()?i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().no)+"\n ")]):e._e(),e._v(" "),e.isStatusOn()?i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().no)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e()],1):i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small"},on:{click:function(t){e.showVisibilityConfirmation=!e.showVisibilityConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),e.isStatusOn()?i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e()],1)]):e._e()]),e._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.showDuplicateConfirmation,expression:"showDuplicateConfirmation"}],staticClass:"am-dialog-confirmation"},[i("h3",[e._v(e._s(e.message.confirm.duplicate))]),e._v(" "),i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDuplicateConfirmation=!e.showDuplicateConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),i("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.duplicateEntity}},[e._v("\n "+e._s(e.$root.labels.duplicate)+"\n ")])],1)])]),e._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.showSaveConfirmation,expression:"showSaveConfirmation"}],staticClass:"am-dialog-confirmation"},[e.buttonText?i("h3",[e._v(e._s(e.message.confirm.save)+"\n "),e.message.confirm.saveDetails?i("span",[e._v(e._s(e.message.confirm.saveDetails))]):e._e()]):e._e(),e._v(" "),e.buttonText?i("div",{staticClass:"align-left"},[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.onSubmit(!1)}}},[e._v("\n "+e._s(e.getConfirmSaveButtonText().no)+"\n ")]),e._v(" "),i("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.onSubmit(!0)}}},[e._v("\n "+e._s(e.getConfirmSaveButtonText().yes)+"\n ")])],1):e._e(),e._v(" "),e.action.haveSaveWarning?i("el-alert",{staticStyle:{"word-break":"break-word"},attrs:{title:"",type:"warning",description:e.message.confirm.save,"show-icon":"",closable:!1}}):e._e()],1)]),e._v(" "),e.isNew?i("el-row",[i("el-col",{staticClass:"align-right",attrs:{sm:24}},[i("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),e.action.haveAdd&&e.action.haveEdit?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.loadSaveButton},on:{click:e.handleSaveClick}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")]):e._e()],1)],1):i("el-row",[i("el-col",{staticClass:"align-left",attrs:{sm:16}},[e.action.haveDuplicate?i("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("duplicate")},on:{click:e.handleDuplicateConfirmation}},[e.hasIcons?i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.duplicate,src:e.$root.getUrl+"public/img/copy.svg"}}):i("span",[e._v(e._s(e.getActionDuplicateButtonText()))])]):e._e(),e._v(" "),e.action.haveStatus?i("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("status")},on:{click:e.handleVisibilityConfirmation}},[e.hasIcons?i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.hide,src:e.$root.getUrl+(e.isStatusOff()?"public/img/unhide.svg":"public/img/hide.svg")}}):i("span",[e._v("\n "+e._s(e.getActionStatusButtonText())+"\n ")])]):e._e(),e._v(" "),e.action.haveRemove?i("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("remove")},on:{click:e.handleDeleteConfirmation}},[e.hasIcons?i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}}):i("span",[e._v("\n "+e._s(e.getActionRemoveButtonText())+"\n ")])]):e._e()],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{sm:!1===e.action.haveRemove&&!1===e.action.haveStatus&&!1===e.action.haveDuplicate?24:8}},[e.action.haveAdd&&e.action.haveEdit?i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.loadSaveButton},on:{click:e.handleSaveClick}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")]):e._e()],1)],1)],1)]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[i("div",{staticClass:"am-dialog-loader-content"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),i("p",[e._v(e._s(e.$root.labels.loader_message))])])])])},staticRenderFns:[]}},780:function(e,t,i){"use strict";var o=i(747);t.a={mixins:[o.a],data:function(){return{textMode:!1,editorOptions:{modules:{toolbar:[["bold","italic","underline","strike"],["blockquote"],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{font:[]}],[{color:[]},{background:[]}],[{align:[]}],["clean"],["link","image"]]}},pageUrl:""}},methods:{parseQuillEditorContent:function(e){if(void 0!==e)for(var t=e.quill.root.getElementsByTagName("p"),i=0;i<t.length;i++)for(var o in this.linksForParsing){for(var n=t[i].getElementsByTagName("a"),a=0;a<n.length;a++)n[a].href===this.pageUrl+o&&(n[a].href=o);-1!==t[i].textContent.indexOf(this.linksForParsing[o])&&(t[i].innerHTML=t[i].innerHTML.replace(this.plainTextLinksForParsing[o],this.linksForParsing[o]))}},process:function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),this.format(t,0).innerHTML},format:function(e,t){for(var i=new Array(1+t++).join(" "),o=new Array(t-1).join(" "),n=null,a=0;a<e.children.length;a++)n=document.createTextNode("\n"+i),e.insertBefore(n,e.children[a]),this.format(e.children[a],t),e.lastElementChild===e.children[a]&&(n=document.createTextNode("\n"+o),e.appendChild(n));return e},changedContentText:function(e,t,i){i?this[e][i]=this[t][i]:this[e]=this[t]},textModeChanged:function(e,t,i){this.textMode=!this.textMode,this.textMode?i?this[t][i]=this.process(this[e][i].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):this[t]=this.process(this[e].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):i?this[t][i]="\x3c!-- Content --\x3e"+this[t][i]:this[t]="\x3c!-- Content --\x3e"+this[t],i?this[e][i]=this[t][i]:this[e]=this[t]}}}},782:function(e,t,i){var o=i(335)(i(783),i(784),!1,null,null,null);e.exports=o.exports},783:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(338),n=i(701),a=i(697),s=i(0),r=i.n(s);t.default={name:"recurringDatesForm",mixins:[o.a,n.a,a.a],props:{recurringData:null,availableDates:null,calendarTimeSlots:null,isFrontend:!0,selectedExtras:null,service:null,formType:{type:String},formsData:{type:Object,default:function(){}}},data:function(){return{currentlyEditingItemIndex:null,recalculatedAvailableDates:null,disabledWeekdays:null,loading:!1,formName:this.$options.name,labelRecurringAppointments:this.formsData[this.$options.name].itemsStatic.recurringDatesHeadingFormField.labels.recurring_appointments.value,labelRecurringEdit:this.formsData[this.$options.name].itemsStatic.recurringDatesHeadingFormField.labels.recurring_edit.value,headingVisibility:this.formsData[this.$options.name].itemsStatic.recurringDatesHeadingFormField.visibility,labelDate:this.formsData[this.$options.name].itemsStatic.recurringInfoFormField.labels.date.value,labelTime:this.formsData[this.$options.name].itemsStatic.recurringInfoFormField.labels.time.value}},mounted:function(){this.scrollView("am-recurring-dates","start"),this.isFrontend||(this.recurringData.datesCallback=this.setAvailableDates),this.setAvailableDates()},methods:{getRowClass:function(){return""},getAppointmentDate:function(e){return this.getFrontedFormattedDate(r()(e).format("YYYY-MM-DD"))},getAppointmentTime:function(e){return this.getFrontedFormattedTime(e)},cancelRecurringDates:function(){},getRequiredDuration:function(){},confirmRecurringDates:function(){},setAvailableDates:function(){},changedDate:function(){},editDate:function(){},cancelEditDate:function(){},confirmEditDate:function(){},deleteDate:function(){},confirmDeleteDate:function(){},cancelDeleteDate:function(){}},watch:{"recurringData.pagination.page":function(){var e=this;this.loading=!0,setTimeout(function(){var t=(e.recurringData.pagination.page-1)*e.recurringData.pagination.show;e.recurringData.pageRecurringDates=e.recurringData.dates.slice(t,t+e.recurringData.pagination.show),e.loading=!1},500)}},computed:{substitutesCount:function(){return this.recurringData.dates.filter(function(e){return e.isSubstituteDate||e.isSubstituteTime}).length}}}},784:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-recurring-dates",class:e.$root.settings.customization.forms?"am-form-"+e.formType+"-"+e.formName:"",attrs:{id:"am-recurring-dates"}},[e.substitutesCount>0?i("div",{staticClass:"am-recurring-dates-header"},[e.isFrontend?i("p",[e._v(e._s(e.$root.labels.recurring_sub_message1))]):e._e(),e._v(" "),i("p",[e._v(e._s(e.$root.labels.recurring_sub_message2)+e._s(e.substitutesCount))])]):i("div",{staticClass:"am-recurring-dates-header"},[e.headingVisibility?[e.isFrontend?i("p",{staticClass:"am-recurring-dates-header-first"},[e._v(e._s(e.labelRecurringAppointments||e.$root.labels.recurring_appointments))]):e._e(),e._v(" "),e.isFrontend?i("p",{staticClass:"am-recurring-dates-header-second"},[e._v(e._s(e.labelRecurringEdit||e.$root.labels.recurring_edit))]):e._e()]:e._e()],2),e._v(" "),i("div",{staticClass:"am-recurring-dates-row-header hide-on-mobile"},[i("el-row",[i("el-col",{attrs:{lg:3,sm:3}},[i("span",{staticStyle:{visibility:"hidden"}},[e._v("#")])]),e._v(" "),i("el-col",{staticClass:"am-recurring-dates-row-header-date",attrs:{lg:10,sm:10}},[i("span",[e._v(e._s(e.labelDate||e.$root.labels.date))])]),e._v(" "),i("el-col",{staticClass:"am-recurring-dates-row-header-time",attrs:{lg:7,sm:7}},[i("span",[e._v(e._s(e.labelTime||e.$root.labels.time))])]),e._v(" "),i("el-col",{attrs:{lg:4,sm:4}},[i("span")])],1)],1),e._v(" "),i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"am-recurring-dates-rows",style:{opacity:e.loading?.5:1}},e._l(e.recurringData.pageRecurringDates,function(t,o){return void 0!==t?i("el-row",{key:o,staticClass:"am-recurring-flex-row-middle-align",class:e.getRowClass(t)},[i("el-col",{staticClass:"am-recurring-row-item am-recurring-row-order",class:[{"is-editing":t.isEditing,"is-deleting":t.isDeleting},e.$root.settings.customization.forms?"am-block-"+e.formType+"-"+e.formName:""],attrs:{lg:t.isDeleting?18:3,sm:t.isDeleting?18:3}},[t.isDeleting?e._e():i("span",{class:e.isFrontend?"hide-on-mobile":""},[e._v(e._s(o+1+e.recurringData.pagination.show*(e.recurringData.pagination.page-1)))]),e._v(" "),e.isFrontend&&!t.isDeleting?i("span",{staticClass:"am-col-title am-col-title-date"},[e._v(e._s(e.labelDate||e.$root.labels.date)+" / "+e._s(e.labelTime||e.$root.labels.time))]):e._e(),t.isSubstituteDate||t.isSubstituteTime?i("i",{staticClass:"el-icon-warning-outline"}):e._e(),e._v(" "),t.isDeleting?i("span",{staticClass:"am-recurring-row-delete-message"},[e._v(e._s(e.$root.labels.recurring_confirm_delete))]):e._e()]),e._v(" "),i("el-col",{staticClass:"am-recurring-row-item am-recurring-row-item-date v-calendar-column",class:[{"is-editing":t.isEditing,"is-substitute":t.isSubstituteDate},e.$root.settings.customization.forms?"am-calendar-"+e.formType+"-"+e.formName:""],attrs:{lg:t.isDeleting?1:10,sm:t.isDeleting?1:10}},[i("v-date-picker",{style:{visibility:t.isDeleting?"hidden":"visible"},attrs:{mode:"single","popover-visibility":"focus","popover-direction":e.isFrontend?"bottom":"top","popover-align":"center","tint-color":e.$root.settings.customization.primaryColor,"input-class":"el-input__inner","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"available-dates":e.recalculatedAvailableDates,"is-expanded":!1,"is-required":!1,"disabled-dates":e.disabledWeekdays,disabled:!1,formats:e.vCalendarFormats},on:{input:function(i){return e.changedDate(t)}},model:{value:t.date,callback:function(i){e.$set(t,"date",i)},expression:"item.date"}})],1),e._v(" "),i("el-col",{staticClass:"am-recurring-row-item am-recurring-row-item-time",class:[{"is-editing":t.isEditing,"is-substitute":t.isSubstituteTime},e.$root.settings.customization.forms?"am-select-"+e.formType+"-"+e.formName:""],attrs:{lg:t.isDeleting?1:7,sm:t.isDeleting?1:7}},[i("div",[i("el-select",{class:null===t.time?"am-recurring-row-item-time":"",style:{visibility:t.isDeleting?"hidden":"visible"},attrs:{"value-key":"time",filterable:"","popper-class":e.$root.settings.customization.forms?"am-dropdown-"+e.formType+"-"+e.formName:""},model:{value:t.time,callback:function(i){e.$set(t,"time",i)},expression:"item.time"}},e._l(Object.keys(t.slots).sort(),function(t){return i("el-option",{key:t,attrs:{label:e.getFrontedFormattedTime(t+":00"),value:t}})}),1)],1)]),e._v(" "),i("el-col",{staticClass:"am-recurring-row-action",class:t.isEditing?"is-editing":"",attrs:{lg:(t.isDeleting,4),sm:(t.isDeleting,4)}},[t.isEditing||t.isDeleting||!(e.recurringData.pagination.page>1||1===e.recurringData.pagination.page&&o>0)?e.recurringData.pagination.page>1||1===e.recurringData.pagination.page&&o>0?i("div",[i("div",{staticClass:"am-edit-element",class:e.$root.settings.customization.forms?"am-block-"+e.formType+"-"+e.formName:"",on:{click:function(i){t.isDeleting?e.confirmDeleteDate(t,o):e.confirmEditDate(t)}}},[i("i",{staticClass:"el-icon-check"})]),e._v(" "),i("div",{staticClass:"am-delete-element",class:e.$root.settings.customization.forms?"am-block-"+e.formType+"-"+e.formName:"",on:{click:function(i){t.isDeleting?e.cancelDeleteDate(t):e.cancelEditDate(t)}}},[i("i",{staticClass:"el-icon-close"})])]):e._e():i("div",[e.isFrontend?i("div",{staticClass:"am-edit-element",class:e.$root.settings.customization.forms?"am-block-"+e.formType+"-"+e.formName:"",on:{click:function(i){return e.editDate(t)}}},[i("i",{staticClass:"el-icon-edit"})]):e._e(),e._v(" "),i("div",{staticClass:"am-edit-element",class:e.$root.settings.customization.forms?"am-block-"+e.formType+"-"+e.formName:"",style:{visibility:1===e.recurringData.dates.length?"hidden":"visible"},on:{click:function(i){e.isFrontend?e.deleteDate(t):e.confirmDeleteDate(t,o)}}},[i("i",{staticClass:"el-icon-delete"})])])])],1):e._e()}),1),e._v(" "),i("div",{staticClass:"am-pagination am-section",class:[e.recurringData.pagination.count>e.recurringData.pagination.show?"":"am-pagination-hidden",e.$root.settings.customization.forms?"am-block-"+e.formType+"-"+e.formName:""]},[i("div",[i("p",[e._v(e._s(e.$root.labels.showing)+" "+e._s(e.recurringData.pageRecurringDates.length)+" "+e._s(e.$root.labels.out_of)+" "+e._s(e.recurringData.dates.length)+" "+e._s(e.$root.labels.recurring_appointments))])]),e._v(" "),i("el-pagination",{attrs:{"page-size":e.recurringData.pagination.show,total:e.recurringData.pagination.count,layout:"prev, pager, next","current-page":e.recurringData.pagination.page},on:{"update:currentPage":function(t){return e.$set(e.recurringData.pagination,"page",t)},"update:current-page":function(t){return e.$set(e.recurringData.pagination,"page",t)}}})],1),e._v(" "),e.isFrontend?i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("div",{staticClass:"el-button el-button--default",on:{click:function(t){return e.cancelRecurringDates()}}},[i("span",[e._v(e._s(e.$root.labels.cancel))])]),e._v(" "),i("div",{staticClass:"el-button el-button--primary",on:{click:function(t){return e.confirmRecurringDates()}}},[i("span",[e._v(e._s(e.$root.labels.continue))])])]):e._e()])},staticRenderFns:[]}},785:function(e,t,i){var o=i(335)(i(786),i(790),!1,null,null,null);e.exports=o.exports},786:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(0),n=i.n(o),a=i(338),s=i(697),r=i(726),l=i(787),c=i.n(l),u=i(733);t.default={name:"recurringSetupForm",components:{recurringSetupHeadingFormField:c.a},mixins:[u.a,a.a,r.a,s.a],props:{containerId:null,initialRecurringData:null,recurringData:null,availableDates:null,disabledWeekdays:null,calendarTimeSlots:null,occupiedTimeSlots:null,service:null,isFrontend:!0,calendarPosition:"bottom",formType:{type:String},formsData:{type:Object,default:function(){}}},data:function(){return{formName:this.$options.name,monthlyWeekDayRepeat:[{label:this.$root.labels.recurring_date_specific,value:0},{label:this.$root.labels.recurring_date_first,value:1},{label:this.$root.labels.recurring_date_second,value:2},{label:this.$root.labels.recurring_date_third,value:3},{label:this.$root.labels.recurring_date_fourth,value:4},{label:this.$root.labels.recurring_date_last,value:5}],cycles:[{label:this.$root.labels.recurring_type_daily,value:"daily"},{label:this.$root.labels.recurring_type_weekly,value:"weekly"},{label:this.$root.labels.recurring_type_monthly,value:"monthly"}],weekDays:[],recurring:{maxDate:null},labelRepeat:this.formsData.recurringSetupForm.itemsStatic.recurringSettingsFormField.labels.recurring_repeat.value,labelEvery:this.formsData.recurringSetupForm.itemsStatic.recurringSettingsFormField.labels.recurring_every.value,labelOn:this.formsData.recurringSetupForm.itemsStatic.recurringSettingsFormField.labels.recurring_on.value,labelUntil:this.formsData.recurringSetupForm.itemsStatic.recurringSettingsFormField.labels.recurring_until.value,labelTimes:this.formsData.recurringSetupForm.itemsStatic.recurringSettingsFormField.labels.recurring_times.value}},created:function(){this.weekDays=[];for(var e=0;e<7;e++)this.weekDays.push({label:n()().isoWeekday(e+1).format("dd"),enabled:!0})},mounted:function(){this.scrollView("am-recurring-setup","start"),this.recurring.maxDate=this.initialRecurringData.calendarDates[this.initialRecurringData.calendarDates.length-1],0===this.initialRecurringData.weekDaysSelected.length&&this.initialRecurringData.weekDaysSelected.push(this.initialRecurringData.selectedWeekDayIndex),this.isFrontend||(this.recurringData.setupCallback=this.setRecurringValues),this.setRecurringValues("count")},methods:{setRecurringValues:function(){},getFromDateFormatted:function(){return this.getFrontedFormattedDate(n()(this.recurringData.startDate,"YYYY-MM-DD HH:mm:ss").format("YYYY-MM-DD"))},getFromTimeFormatted:function(){return this.getFrontedFormattedTime(n()(this.recurringData.startDate,"YYYY-MM-DD HH:mm:ss").format("HH:mm"))},confirmRecurringSetup:function(){},cancelRecurringSetup:function(){}},computed:{maxUntil:function(){return n()(this.initialRecurringData.calendarDates[this.initialRecurringData.calendarDates.length-1]).toDate()},minFrom:function(){return n()(this.recurringData.startDate,"YYYY-MM-DD").add(1,"days").toDate()},selectedRecurringInterval:function(){var e=this;return this.initialRecurringData.repeatIntervalLabels.find(function(t){return t.value===e.initialRecurringData.cycleInterval})}}}},787:function(e,t,i){var o=i(335)(i(788),i(789),!1,null,null,null);e.exports=o.exports},788:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"recurringSetupHeadingFormField",props:{classIdentifier:{type:String,default:""},formField:{type:Object,default:function(){}}},data:function(){return{formHeading:this.formField.labels.recurring_active.value}}}},789:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{class:e.$root.settings.customization.forms?"am-block-"+e.classIdentifier:""},[e.formField.visibility?i("p",{staticClass:"am-recurring-setup-title"},[e._v("\n "+e._s(e.formHeading?e.formHeading:e.$root.labels.recurring_active)+"\n ")]):e._e()])},staticRenderFns:[]}},790:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-recurring-setup am-mobile-collapsed am-select-date",class:e.$root.settings.customization.forms?"am-form-"+e.formType+"-"+e.formName:"",attrs:{id:"am-recurring-setup"}},[e.isFrontend?i("recurring-setup-heading-form-field",{attrs:{"class-identifier":e.formType+"-"+e.formName,formField:e.formsData[e.formName].itemsStatic.recurringSetupHeadingFormField}}):e._e(),e._v(" "),i("el-form",{ref:"recurring",attrs:{model:e.recurring,"label-position":"top"}},[i("div",[i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{sm:12}},[i("el-form-item",{class:e.$root.settings.customization.forms?"am-select-"+e.formType+"-"+e.formName:"",attrs:{label:e.labelRepeat||e.$root.labels.recurring_repeat}},[i("el-select",{class:"all"!==e.service.recurringCycle?"am-recurring-setup-all-cycle":"",attrs:{"popper-class":e.$root.settings.customization.forms?"am-dropdown-"+e.formType+"-"+e.formName:"",disabled:"all"!==e.service.recurringCycle},on:{change:function(t){return e.setRecurringValues("count")}},model:{value:e.initialRecurringData.cycle,callback:function(t){e.$set(e.initialRecurringData,"cycle",t)},expression:"initialRecurringData.cycle"}},e._l(e.cycles,function(e,t){return i("el-option",{key:t,attrs:{value:e.value,label:e.label}})}),1)],1)],1),e._v(" "),i("el-col",{attrs:{sm:12}},[i("el-form-item",{class:e.$root.settings.customization.forms?"am-select-"+e.formType+"-"+e.formName:"",attrs:{label:e.labelEvery||e.$root.labels.recurring_every}},[i("el-select",{attrs:{"popper-class":e.$root.settings.customization.forms?"am-dropdown-"+e.formType+"-"+e.formName:""},on:{change:function(t){return e.setRecurringValues("count")}},model:{value:e.initialRecurringData.cycleInterval,callback:function(t){e.$set(e.initialRecurringData,"cycleInterval",t)},expression:"initialRecurringData.cycleInterval"}},e._l(e.initialRecurringData.repeatIntervalLabels,function(e,t){return i("el-option",{key:t,attrs:{value:e.value,label:e.label}})}),1)],1)],1)],1),e._v(" "),"weekly"===e.initialRecurringData.cycle?i("el-row",{staticClass:"am-recurring-setup-weekly",attrs:{gutter:24}},[i("el-col",{attrs:{sm:24}},[i("el-form-item",{class:e.$root.settings.customization.forms?"am-checkbox-btn-"+e.formType+"-"+e.formName:"",attrs:{label:e.labelOn||e.$root.labels.recurring_on}},[i("el-checkbox-group",{attrs:{border:!0,size:"small"},on:{change:function(t){return e.setRecurringValues("date")}},model:{value:e.initialRecurringData.weekDaysSelected,callback:function(t){e.$set(e.initialRecurringData,"weekDaysSelected",t)},expression:"initialRecurringData.weekDaysSelected"}},e._l(e.weekDays,function(t,o){return i("el-checkbox-button",{key:o,attrs:{label:o,disabled:!t.enabled}},[e._v("\n "+e._s(t.label)+"\n ")])}),1)],1)],1)],1):e._e(),e._v(" "),"monthly"===e.initialRecurringData.cycle?i("el-row",{attrs:{gutter:24}},[i("el-col",{attrs:{sm:24}},[i("el-form-item",{class:e.$root.settings.customization.forms?"am-select-"+e.formType+"-"+e.formName:"",attrs:{label:e.labelOn||e.$root.labels.recurring_on}},[i("el-select",{attrs:{"popper-class":e.$root.settings.customization.forms?"am-dropdown-"+e.formType+"-"+e.formName:""},on:{change:function(t){return e.setRecurringValues("date")}},model:{value:e.initialRecurringData.monthDateRule,callback:function(t){e.$set(e.initialRecurringData,"monthDateRule",t)},expression:"initialRecurringData.monthDateRule"}},e._l(e.monthlyWeekDayRepeat,function(t,o){return i("el-option",{key:o,attrs:{value:t.value,label:t.label+(0!==o?" "+e.initialRecurringData.selectedMonthlyWeekDayString:"")}})}),1)],1)],1)],1):e._e(),e._v(" "),i("el-row",{style:{opacity:null!==e.initialRecurringData.cycle?1:.2,"pointer-events":null!==e.initialRecurringData.cycle?"all":"none"},attrs:{gutter:24}},[i("el-col",{staticClass:"v-calendar-column",attrs:{sm:12}},[i("el-form-item",{class:e.$root.settings.customization.forms?"am-calendar-"+e.formType+"-"+e.formName:"",attrs:{label:e.labelUntil||e.$root.labels.recurring_until}},[i("v-date-picker",{attrs:{"is-double-paned":!1,mode:"single","popover-visibility":"focus","popover-direction":"bottom","popover-align":"center","tint-color":e.$root.settings.customization.primaryColor,"input-class":"el-input__inner","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"is-expanded":!1,"is-required":!0,formats:e.vCalendarFormats,"available-dates":{start:e.minFrom,end:e.maxUntil},disabled:null===e.initialRecurringData.cycle},on:{input:function(t){return e.setRecurringValues("date")}},model:{value:e.initialRecurringData.maxDate,callback:function(t){e.$set(e.initialRecurringData,"maxDate",t)},expression:"initialRecurringData.maxDate"}})],1)],1),e._v(" "),i("el-col",{staticClass:"am-recurring-setup-times",attrs:{sm:12}},[i("el-form-item",{class:e.$root.settings.customization.forms?"am-input-number-"+e.formType+"-"+e.formName:"",attrs:{label:e.labelTimes||e.$root.labels.recurring_times}},[i("el-input-number",{attrs:{min:1,disabled:0===e.initialRecurringData.cycle},on:{change:function(t){return e.setRecurringValues("count")}},model:{value:e.initialRecurringData.maxCount,callback:function(t){e.$set(e.initialRecurringData,"maxCount",t)},expression:"initialRecurringData.maxCount"}})],1)],1)],1),e._v(" "),e.isFrontend&&e.selectedRecurringInterval?i("div",{staticClass:"am-recurring-setup-description",class:e.$root.settings.customization.forms?"am-block-"+e.formType+"-"+e.formName:""},[i("span",[e._v(e._s(e.recurringData.recurringString))]),e._v(" "),i("br"),e._v(" "),i("span",[e._v(e._s(e.$root.labels.recurring_from_text+" "+e.getFromDateFormatted()+" "+e.$root.labels.at+" "+e.getFromTimeFormatted()))])]):e._e(),e._v(" "),e.isFrontend?i("div",{staticClass:"am-button-wrapper"},[i("transition",{attrs:{name:"fade"}},[i("el-button",{on:{click:function(t){return e.cancelRecurringSetup()}}},[e._v("\n "+e._s(e.$root.labels.back)+"\n ")])],1),e._v(" "),i("transition",{attrs:{name:"fade"}},[i("el-button",{staticClass:"am-recurring-continue",attrs:{id:"am-recurring-continue-button",disabled:!e.initialRecurringData.maxDate||0===e.recurringData.dates.length},on:{click:e.confirmRecurringSetup}},[e._v("\n "+e._s(e.$root.labels.continue)+"\n ")])],1)],1):e._e()],1)])],1)},staticRenderFns:[]}},791:function(e,t,i){var o=i(335)(i(793),i(794),!1,null,null,null);e.exports=o.exports},792:function(e,t,i){"use strict";var o=i(0),n=i.n(o),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a={mixins:[],data:function(){return{selectedPackageId:null,packageSlotsFetched:0,packageServiceSelected:0,selectedPackage:null,activePackage:!1,packageListShown:!1,packageCreated:!1,disableFetchPackageSlots:!1}},methods:{getPackagePrice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;if(t)for(var o in e.purchases)if(e.purchases[o].packageCustomerId===parseInt(t)){i=e.purchases[o].coupon;break}var n=e.calculatedPrice?e.price:e.price-e.price/100*e.discount,a=i?n*i.discount/100-i.deduction:0;return n-Math.abs(a)},packageSlotsFetchedCallback:function(){this.packageSlotsFetched++,this.passedPackage&&(this.fetched=!0)},getAvailablePackages:function(){var e=this;return this.options.entities.packages.filter(function(t){return t.availableBookableInfo.filter(function(t){return t.serviceId===e.appointment.serviceId}).length>0}).sort(function(e,t){return e.position-t.position})},initPackage:function(e){this.selectedPackage=e,this.selectedPackage.bookable.forEach(function(e){e.bookings=[],e.bookings.push({cleared:!1,date:null,time:null,providerId:null,locationId:null,slots:[]}),e.calendarData={slotsIndexStarted:0,clonedSlotsData:null,slotsData:null,disabledWeekdays:null,availableDates:null,availableTimeSlots:[],selectedWeekIndex:0}})},selectPackage:function(e){var t=document.getElementById(this.id);this.activePicker=!1,t.classList.remove("am-active-picker"),this.activeRecurringDates=!1,this.activeRecurringSetup=!1,this.activeRecurring=!1,this.calendarVisible=!1,this.packageCalendarActive=!0,this.initPackage(e),this.getCurrentUser(),this.activePackage=!0},closePackage:function(){var e=this;this.selectedPackage=null,this.activePackage=!1,this.packageCreated=!1,this.packageCalendarActive=!1,null===this.selectedPackageId&&this.updateSettings(this.getServiceById(this.appointment.serviceId).settings);var t=document.getElementById(this.id);this.fetchedSlots||t.classList.remove("am-active-picker"),setTimeout(function(){e.times=document.getElementById(e.calendarId)},200)},getPackageAppointmentsData:function(){var e=[],t=[];return this.selectedPackage&&this.selectedPackage.bookable.forEach(function(i){i.bookings.forEach(function(t){t.date&&t.time&&e.push({bookingStart:n()(t.date).format("YYYY-MM-DD")+" "+t.time,serviceId:i.service.id,providerId:t.providerId,locationId:t.locationId})}),t.push({serviceId:i.service.id,providerId:i.providerId?i.providerId:null,locationId:i.locationId?i.locationId:null})}),{id:this.selectedPackage?this.selectedPackage.id:null,data:e,rules:t}},packageListShow:function(){this.loading=!1,this.activePackage=!1,this.packageListShown=!0;var e=document.getElementById(this.id);e.classList.toggle("am-active-package-list",!0),e.classList.toggle("am-active-picker",!1),e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},packageSlotsSelectedCallback:function(){this.appointment.bookings[0].extras=[],this.updateSettings(this.getPackageById(this.selectedPackage.id).settings);var e=document.getElementById(this.id);this.loading=!1,this.packageCreated=!1,this.packageListShown=!1,this.activeConfirm=!0,this.packageCreated=!0,e.classList.remove("am-active-package-list"),e.classList.toggle("am-active-confirm",this.activeConfirm)},bookingPackageDataCompiler:function(e){var t=this,i=[];return e.forEach(function(e){e.date&&e.time&&i.push({date:e.date,time:e.time,provider:t.getProviderById(e.providerId)||t.responseEntities.employees.filter(function(t){return t.id===e.providerId})[0],location:e.locationId?t.getLocationById(e.locationId):null})}),i},getBookablePackageData:function(){var e=this,t=[],i=this.options.entities.locations.length>0;return this.selectedPackage.bookable.forEach(function(o){var n=e.bookingPackageDataCompiler(o.bookings),a=i?{appointment:1,date:7,time:4,employee:6,location:6}:{appointment:1,date:9,time:6,employee:8,location:0};t.push({serviceName:o.service.name,serviceQuantity:o.quantity,serviceAppointment:n,serviceDuration:o.service.duration,service:o.service,spanLengths:a,hasLocations:i,singleEmployee:null,singleLocation:null})}),{name:this.selectedPackage.name,color:this.selectedPackage.color,discount:this.selectedPackage.discount,description:this.selectedPackage.description,price:this.getPackagePrice(this.selectedPackage),pictureThumbPath:this.selectedPackage.pictureThumbPath,durationCount:this.selectedPackage.durationCount,durationType:this.selectedPackage.durationType,endDate:this.selectedPackage.endDate,bookings:t,translations:this.selectedPackage.translations}},parsePackageAppointments:function(e,t,i){var o=this,a=e.find(function(e){return e.customerId===o.state.profile.id});void 0!==a&&a||(a={packages:[]}),this.packagesAppointments=this.parseAppointments(t,i),this.packagesAvailability=a?a.packages:[];var s=this.calculateServicesOccupancy(),r=[];a.packages.forEach(function(e){var t=o.getPackageById(e.packageId),i=t.bookable.map(function(e){return e.service.id});e.services.forEach(function(e){if(-1===i.indexOf(e.serviceId)){var n={providers:[],locations:[]};e.bookings.forEach(function(e){e.providerId&&n.providers.push(e.providerId),e.locationId&&n.locations.push(e.locationId)}),n.service=o.getServiceById(e.serviceId),t.bookable.push(n)}})}),this.options.entities.packages.forEach(function(e){a.packages.forEach(function(t){if(e.id===t.packageId){var i=null;e.bookable.forEach(function(a){a.appointmentServiceIds=[],t.services.forEach(function(t){var r={};t.bookings.forEach(function(e){t.serviceId in r||(r[t.serviceId]=0),r[t.serviceId]+=e.total,(null===i||n()(e.end).isBefore(n()(i)))&&(i=e.end),e.locationId&&-1===a.locations.map(function(e){return e.id}).indexOf(e.locationId)&&a.locations.push(o.getLocationById(e.locationId)),a.appointmentServiceIds.push(e.id)}),a.service.id===t.serviceId&&(a.service.appointmentsAvailable=o.getAvailableServicePackageAppointmentsCount(s,e.id,a.service.id),a.service.total=o.getTotalServicePackageAppointmentsCount(s,e.id,a.service.id))});var r=[];Object.values(o.packagesAppointments).forEach(function(e){e.appointments.forEach(function(e){e.bookings.forEach(function(t){-1!==a.appointmentServiceIds.indexOf(t.packageCustomerService.id)&&e.serviceId===a.service.id&&r.push(e)})})}),r.sort(function(e,t){return t.id-e.id}),a.service.bookedAppointments=r});var a=!1;for(var l in s[e.id])if(null!==s[e.id][l].quantity){a=!0;break}e.totalAvailableAppointments=o.getTotalAvailablePackageAppointmentsCount(s,e.id),e.appointmentsSharable=a,e.expireDateString=i,r.push(e)}})}),r.forEach(function(e){"purchases"in e||(e.purchases={}),"payments"in e||(e.payments={}),o.packagesAvailability.find(function(t){return t.packageId===e.id}).services.forEach(function(t){t.bookings.forEach(function(i){if(i.id in e.purchases||(e.purchases[i.id]=i),i.packageCustomerId in e.payments||(e.payments[i.packageCustomerId]={payments:i.payments,packagePurchased:i.purchased}),"canceled"===i.status){e.totalAvailableAppointments=e.totalAvailableAppointments-i.count;var o=e.bookable.find(function(e){return e.service.id===t.serviceId});o&&void 0!==o&&(o.service.appointmentsAvailable=o.service.appointmentsAvailable-i.count,o.service.total=o.service.total-i.total)}})})}),this.packagesData=r},calculateServicesOccupancy:function(){var e={};this.packagesAvailability.forEach(function(t){t.packageId in e||(e[t.packageId]={}),t.services.forEach(function(i){i.bookings.forEach(function(i){i.packageCustomerId in e[t.packageId]||(e[t.packageId][i.packageCustomerId]={quantity:i.sharedCapacity?i.total:null,total:i.sharedCapacity?i.total:null,shared:i.sharedCapacity,services:{},ids:{}}),i.serviceId in e[t.packageId][i.packageCustomerId].services||(e[t.packageId][i.packageCustomerId].services[i.serviceId]={}),i.id in e[t.packageId][i.packageCustomerId].services[i.serviceId]||(e[t.packageId][i.packageCustomerId].services[i.serviceId][i.id]={quantity:i.sharedCapacity?null:i.total,total:i.sharedCapacity?null:i.total}),e[t.packageId][i.packageCustomerId].ids[i.id]=!0})})});var t={};for(var i in this.packagesAppointments)this.packagesAppointments[i].appointments.filter(function(e){return"canceled"!==e.status}).forEach(function(e){e.bookings.forEach(function(i){"canceled"!==i.status&&(i.packageCustomerService.id in t||(t[i.packageCustomerService.id]={serviceId:e.serviceId,quantity:0}),t[i.packageCustomerService.id].quantity++)})});for(var o in e)for(var n in e[o]){for(var a in e[o][n].ids)a in t&&(null!==e[o][n].quantity?e[o][n].quantity-=t[a].quantity:e[o][n].services[t[a].serviceId][a].quantity-=t[a].quantity);delete e[o][n].shared,delete e[o][n].ids}return e},getTotalAvailablePackageAppointmentsCount:function(e,t){var i=0;for(var o in e[t]){var n=e[t][o];if(null!==n.quantity)i+=n.quantity;else for(var a in n.services)for(var s in n.services[a])i+=n.services[a][s].quantity}return i},getTotalServicePackageAppointmentsCount:function(e,t,i){var o=0;for(var n in e[t]){var a=e[t][n];if(null!==a.total)o+=a.total;else for(var s in a.services[i])o+=a.services[i][s].total}return o},getAvailableServicePackageAppointmentsCount:function(e,t,i){var o=0;for(var n in e[t]){var a=e[t][n];if(null!==a.quantity)o+=a.quantity;else for(var s in a.services[i])o+=a.services[i][s].quantity}return o},packagePurchaseHasAppointments:function(e){return e.appointments.filter(function(e){return null!==e.id}).length>0},parseAppointments:function(e,t){var i=this;if(0===Object.keys(e).length)return{};for(var o in e)e.hasOwnProperty(o)&&e[o].appointments.forEach(function(e){var o={};e.bookings.forEach(function(e){e.customerId in o||(o[e.customerId]=[]),o[e.customerId][e.id]=e.status});var n={};for(var a in o)for(var s in o[a])a in n&&"approved"!==o[a][s]&&"pending"!==o[a][s]||(n[a]=s);e.bookings.forEach(function(o){o.customerId in n&&parseInt(o.id)!==parseInt(n[o.customerId])||(""===t&&(e.bookingStart=i.getConvertedUtcToLocalDateTime(e.bookingStart),e.bookingEnd=i.getConvertedUtcToLocalDateTime(e.bookingEnd)),e.loadingTimeSlots=!1,i.state&&"customer"===i.state.cabinetType&&(e.bookings=[o]))})});if(""===t){var n=function(){var t={};for(var i in e)e.hasOwnProperty(i)&&e[i].appointments.forEach(function(e){var i=e.bookingStart.split(" ")[0];i in t?t[i].appointments.push(e):t[i]={appointments:[e],date:i}});return{v:t}}();if("object"===(void 0===n?"undefined":a(n)))return n.v}return e}}}},793:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={mixins:[],props:{params:null,visible:!1,label:"",count:0,show:null},data:function(){return{currentPage:null}},methods:{change:function(){this.$emit("change")}},computed:{paginationMessage:function(){return this.$root.labels.showing+" "+(this.params.page*this.getItemsPerPage-this.getItemsPerPage+1)+" "+this.$root.labels.to+" "+(this.params.page*this.getItemsPerPage>this.count?this.count:this.params.page*this.getItemsPerPage)+" "+this.$root.labels.of+" "+this.count+" "+this.label},getItemsPerPage:function(){return void 0===this.show||null===this.show?this.$root.settings.general.itemsPerPage:this.show}}}},794:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"am-pagination am-section"},[i("el-row",[i("el-col",{attrs:{sm:8}},[i("p",[e._v(e._s(e.paginationMessage))])]),e._v(" "),i("el-col",{attrs:{sm:16}},[i("el-pagination",{attrs:{layout:"prev, pager, next","page-size":e.getItemsPerPage,total:e.count,"current-page":e.params.page},on:{"update:currentPage":function(t){return e.$set(e.params,"page",t)},"update:current-page":function(t){return e.$set(e.params,"page",t)},"current-change":e.change}})],1)],1)],1)},staticRenderFns:[]}},795:function(e,t,i){var o;"undefined"!=typeof self&&self,o=function(e){return function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({"02f4":function(e,t,i){var o=i("4588"),n=i("be13");e.exports=function(e){return function(t,i){var a,s,r=String(n(t)),l=o(i),c=r.length;return l<0||l>=c?e?"":void 0:(a=r.charCodeAt(l))<55296||a>56319||l+1===c||(s=r.charCodeAt(l+1))<56320||s>57343?e?r.charAt(l):a:e?r.slice(l,l+2):s-56320+(a-55296<<10)+65536}}},"0390":function(e,t,i){"use strict";var o=i("02f4")(!0);e.exports=function(e,t,i){return t+(i?o(e,t).length:1)}},"07e3":function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},"0bfb":function(e,t,i){"use strict";var o=i("cb7c");e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0fc9":function(e,t,i){var o=i("3a38"),n=Math.max,a=Math.min;e.exports=function(e,t){return(e=o(e))<0?n(e+t,0):a(e,t)}},1654:function(e,t,i){"use strict";var o=i("71c1")(!0);i("30f1")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,i=this._i;return i>=t.length?{value:void 0,done:!0}:(e=o(t,i),this._i+=e.length,{value:e,done:!1})})},1691:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(e,t,i){var o=i("63b6");o(o.S,"Array",{isArray:i("9003")})},"1bc3":function(e,t,i){var o=i("f772");e.exports=function(e,t){if(!o(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!o(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!o(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!o(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(e,t,i){var o=i("f772"),n=i("e53d").document,a=o(n)&&o(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},"20fd":function(e,t,i){"use strict";var o=i("d9f6"),n=i("aebd");e.exports=function(e,t,i){t in e?o.f(e,t,n(0,i)):e[t]=i}},"214f":function(e,t,i){"use strict";i("b0c5");var o=i("2aba"),n=i("32e9"),a=i("79e5"),s=i("be13"),r=i("2b4c"),l=i("520a"),c=r("species"),u=!a(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2===i.length&&"a"===i[0]&&"b"===i[1]}();e.exports=function(e,t,i){var p=r(e),m=!a(function(){var t={};return t[p]=function(){return 7},7!=""[e](t)}),f=m?!a(function(){var t=!1,i=/a/;return i.exec=function(){return t=!0,null},"split"===e&&(i.constructor={},i.constructor[c]=function(){return i}),i[p](""),!t}):void 0;if(!m||!f||"replace"===e&&!u||"split"===e&&!d){var h=/./[p],g=i(s,p,""[e],function(e,t,i,o,n){return t.exec===l?m&&!n?{done:!0,value:h.call(t,i,o)}:{done:!0,value:e.call(i,t,o)}:{done:!1}}),v=g[0],b=g[1];o(String.prototype,e,v),n(RegExp.prototype,p,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},"230e":function(e,t,i){var o=i("d3f4"),n=i("7726").document,a=o(n)&&o(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},"23c6":function(e,t,i){var o=i("2d95"),n=i("2b4c")("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,i,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),n))?i:a?o(t):"Object"==(s=o(t))&&"function"==typeof t.callee?"Arguments":s}},"241e":function(e,t,i){var o=i("25eb");e.exports=function(e){return Object(o(e))}},"25eb":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"294c":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"2aba":function(e,t,i){var o=i("7726"),n=i("32e9"),a=i("69a8"),s=i("ca5a")("src"),r=i("fa5b"),l="toString",c=(""+r).split(l);i("8378").inspectSource=function(e){return r.call(e)},(e.exports=function(e,t,i,r){var l="function"==typeof i;l&&(a(i,"name")||n(i,"name",t)),e[t]!==i&&(l&&(a(i,s)||n(i,s,e[t]?""+e[t]:c.join(String(t)))),e===o?e[t]=i:r?e[t]?e[t]=i:n(e,t,i):(delete e[t],n(e,t,i)))})(Function.prototype,l,function(){return"function"==typeof this&&this[s]||r.call(this)})},"2b4c":function(e,t,i){var o=i("5537")("wks"),n=i("ca5a"),a=i("7726").Symbol,s="function"==typeof a;(e.exports=function(e){return o[e]||(o[e]=s&&a[e]||(s?a:n)("Symbol."+e))}).store=o},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},"2fdb":function(e,t,i){"use strict";var o=i("5ca1"),n=i("d2c8"),a="includes";o(o.P+o.F*i("5147")(a),"String",{includes:function(e){return!!~n(this,e,a).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(e,t,i){"use strict";var o=i("b8e3"),n=i("63b6"),a=i("9138"),s=i("35e8"),r=i("481b"),l=i("8f60"),c=i("45f2"),u=i("53e2"),d=i("5168")("iterator"),p=!([].keys&&"next"in[].keys()),m="keys",f="values",h=function(){return this};e.exports=function(e,t,i,g,v,b,y){l(i,t,g);var _,k,x,C=function(e){if(!p&&e in $)return $[e];switch(e){case m:case f:return function(){return new i(this,e)}}return function(){return new i(this,e)}},w=t+" Iterator",S=v==f,P=!1,$=e.prototype,T=$[d]||$["@@iterator"]||v&&$[v],E=T||C(v),O=v?S?C("entries"):E:void 0,D="Array"==t&&$.entries||T;if(D&&((x=u(D.call(new e)))!==Object.prototype&&x.next&&(c(x,w,!0),o||"function"==typeof x[d]||s(x,d,h))),S&&T&&T.name!==f&&(P=!0,E=function(){return T.call(this)}),o&&!y||!p&&!P&&$[d]||s($,d,E),r[t]=E,r[w]=h,v)if(_={values:S?E:C(f),keys:b?E:C(m),entries:O},y)for(k in _)k in $||a($,k,_[k]);else n(n.P+n.F*(p||P),t,_);return _}},"32a6":function(e,t,i){var o=i("241e"),n=i("c3a1");i("ce7e")("keys",function(){return function(e){return n(o(e))}})},"32e9":function(e,t,i){var o=i("86cc"),n=i("4630");e.exports=i("9e1e")?function(e,t,i){return o.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}},"32fc":function(e,t,i){var o=i("e53d").document;e.exports=o&&o.documentElement},"335c":function(e,t,i){var o=i("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,i){var o=i("d9f6"),n=i("aebd");e.exports=i("8e60")?function(e,t,i){return o.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}},"36c3":function(e,t,i){var o=i("335c"),n=i("25eb");e.exports=function(e){return o(n(e))}},3702:function(e,t,i){var o=i("481b"),n=i("5168")("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[n]===e)}},"3a38":function(e,t){var i=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:i)(e)}},"40c3":function(e,t,i){var o=i("6b4c"),n=i("5168")("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,i,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),n))?i:a?o(t):"Object"==(s=o(t))&&"function"==typeof t.callee?"Arguments":s}},4588:function(e,t){var i=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:i)(e)}},"45f2":function(e,t,i){var o=i("d9f6").f,n=i("07e3"),a=i("5168")("toStringTag");e.exports=function(e,t,i){e&&!n(e=i?e:e.prototype,a)&&o(e,a,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"469f":function(e,t,i){i("6c1c"),i("1654"),e.exports=i("7d7b")},"481b":function(e,t){e.exports={}},"4aa6":function(e,t,i){e.exports=i("dc62")},"4bf8":function(e,t,i){var o=i("be13");e.exports=function(e){return Object(o(e))}},"4ee1":function(e,t,i){var o=i("5168")("iterator"),n=!1;try{var a=[7][o]();a.return=function(){n=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!n)return!1;var i=!1;try{var a=[7],s=a[o]();s.next=function(){return{done:i=!0}},a[o]=function(){return s},e(a)}catch(e){}return i}},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,i){var o=i("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[o]=!1,!"/./"[e](t)}catch(e){}}return!0}},5168:function(e,t,i){var o=i("dbdb")("wks"),n=i("62a0"),a=i("e53d").Symbol,s="function"==typeof a;(e.exports=function(e){return o[e]||(o[e]=s&&a[e]||(s?a:n)("Symbol."+e))}).store=o},5176:function(e,t,i){e.exports=i("51b6")},"51b6":function(e,t,i){i("a3c3"),e.exports=i("584a").Object.assign},"520a":function(e,t,i){"use strict";var o=i("0bfb"),n=RegExp.prototype.exec,a=String.prototype.replace,s=n,r="lastIndex",l=function(){var e=/a/,t=/b*/g;return n.call(e,"a"),n.call(t,"a"),0!==e[r]||0!==t[r]}(),c=void 0!==/()??/.exec("")[1];(l||c)&&(s=function(e){var t,i,s,u,d=this;return c&&(i=new RegExp("^"+d.source+"$(?!\\s)",o.call(d))),l&&(t=d[r]),s=n.call(d,e),l&&s&&(d[r]=d.global?s.index+s[0].length:t),c&&s&&s.length>1&&a.call(s[0],i,function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(s[u]=void 0)}),s}),e.exports=s},"53e2":function(e,t,i){var o=i("07e3"),n=i("241e"),a=i("5559")("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=n(e),o(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},"549b":function(e,t,i){"use strict";var o=i("d864"),n=i("63b6"),a=i("241e"),s=i("b0dc"),r=i("3702"),l=i("b447"),c=i("20fd"),u=i("7cd6");n(n.S+n.F*!i("4ee1")(function(e){Array.from(e)}),"Array",{from:function(e){var t,i,n,d,p=a(e),m="function"==typeof this?this:Array,f=arguments.length,h=f>1?arguments[1]:void 0,g=void 0!==h,v=0,b=u(p);if(g&&(h=o(h,f>2?arguments[2]:void 0,2)),void 0==b||m==Array&&r(b))for(i=new m(t=l(p.length));t>v;v++)c(i,v,g?h(p[v],v):p[v]);else for(d=b.call(p),i=new m;!(n=d.next()).done;v++)c(i,v,g?s(d,h,[n.value,v],!0):n.value);return i.length=v,i}})},"54a1":function(e,t,i){i("6c1c"),i("1654"),e.exports=i("95d5")},5537:function(e,t,i){var o=i("8378"),n=i("7726"),a="__core-js_shared__",s=n[a]||(n[a]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:i("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,i){var o=i("dbdb")("keys"),n=i("62a0");e.exports=function(e){return o[e]||(o[e]=n(e))}},"584a":function(e,t){var i=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=i)},"5b4e":function(e,t,i){var o=i("36c3"),n=i("b447"),a=i("0fc9");e.exports=function(e){return function(t,i,s){var r,l=o(t),c=n(l.length),u=a(s,c);if(e&&i!=i){for(;c>u;)if((r=l[u++])!=r)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}}},"5ca1":function(e,t,i){var o=i("7726"),n=i("8378"),a=i("32e9"),s=i("2aba"),r=i("9b43"),l="prototype",c=function(e,t,i){var u,d,p,m,f=e&c.F,h=e&c.G,g=e&c.S,v=e&c.P,b=e&c.B,y=h?o:g?o[t]||(o[t]={}):(o[t]||{})[l],_=h?n:n[t]||(n[t]={}),k=_[l]||(_[l]={});for(u in h&&(i=t),i)p=((d=!f&&y&&void 0!==y[u])?y:i)[u],m=b&&d?r(p,o):v&&"function"==typeof p?r(Function.call,p):p,y&&s(y,u,p,e&c.U),_[u]!=p&&a(_,u,m),v&&k[u]!=p&&(k[u]=p)};o.core=n,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"5d73":function(e,t,i){e.exports=i("469f")},"5f1b":function(e,t,i){"use strict";var o=i("23c6"),n=RegExp.prototype.exec;e.exports=function(e,t){var i=e.exec;if("function"==typeof i){var a=i.call(e,t);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==o(e))throw new TypeError("RegExp#exec called on incompatible receiver");return n.call(e,t)}},"626a":function(e,t,i){var o=i("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},"62a0":function(e,t){var i=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+o).toString(36))}},"63b6":function(e,t,i){var o=i("e53d"),n=i("584a"),a=i("d864"),s=i("35e8"),r=i("07e3"),l="prototype",c=function(e,t,i){var u,d,p,m=e&c.F,f=e&c.G,h=e&c.S,g=e&c.P,v=e&c.B,b=e&c.W,y=f?n:n[t]||(n[t]={}),_=y[l],k=f?o:h?o[t]:(o[t]||{})[l];for(u in f&&(i=t),i)(d=!m&&k&&void 0!==k[u])&&r(y,u)||(p=d?k[u]:i[u],y[u]=f&&"function"!=typeof k[u]?i[u]:v&&d?a(p,o):b&&k[u]==p?function(e){var t=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,i)}return new e(t,i,o)}return e.apply(this,arguments)};return t[l]=e[l],t}(p):g&&"function"==typeof p?a(Function.call,p):p,g&&((y.virtual||(y.virtual={}))[u]=p,e&c.R&&_&&!_[u]&&s(_,u,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},6762:function(e,t,i){"use strict";var o=i("5ca1"),n=i("c366")(!0);o(o.P,"Array",{includes:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")("includes")},6821:function(e,t,i){var o=i("626a"),n=i("be13");e.exports=function(e){return o(n(e))}},"69a8":function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},"6a99":function(e,t,i){var o=i("d3f4");e.exports=function(e,t){if(!o(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!o(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!o(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!o(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},"6c1c":function(e,t,i){i("c367");for(var o=i("e53d"),n=i("35e8"),a=i("481b"),s=i("5168")("toStringTag"),r="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<r.length;l++){var c=r[l],u=o[c],d=u&&u.prototype;d&&!d[s]&&n(d,s,c),a[c]=a.Array}},"71c1":function(e,t,i){var o=i("3a38"),n=i("25eb");e.exports=function(e){return function(t,i){var a,s,r=String(n(t)),l=o(i),c=r.length;return l<0||l>=c?e?"":void 0:(a=r.charCodeAt(l))<55296||a>56319||l+1===c||(s=r.charCodeAt(l+1))<56320||s>57343?e?r.charAt(l):a:e?r.slice(l,l+2):s-56320+(a-55296<<10)+65536}}},7726:function(e,t){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},"774e":function(e,t,i){e.exports=i("d2d5")},"77f1":function(e,t,i){var o=i("4588"),n=Math.max,a=Math.min;e.exports=function(e,t){return(e=o(e))<0?n(e+t,0):a(e,t)}},"794b":function(e,t,i){e.exports=!i("8e60")&&!i("294c")(function(){return 7!=Object.defineProperty(i("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7cd6":function(e,t,i){var o=i("40c3"),n=i("5168")("iterator"),a=i("481b");e.exports=i("584a").getIteratorMethod=function(e){if(void 0!=e)return e[n]||e["@@iterator"]||a[o(e)]}},"7d7b":function(e,t,i){var o=i("e4ae"),n=i("7cd6");e.exports=i("584a").getIterator=function(e){var t=n(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return o(t.call(e))}},"7e90":function(e,t,i){var o=i("d9f6"),n=i("e4ae"),a=i("c3a1");e.exports=i("8e60")?Object.defineProperties:function(e,t){n(e);for(var i,s=a(t),r=s.length,l=0;r>l;)o.f(e,i=s[l++],t[i]);return e}},8378:function(e,t){var i=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=i)},8436:function(e,t){e.exports=function(){}},"86cc":function(e,t,i){var o=i("cb7c"),n=i("c69a"),a=i("6a99"),s=Object.defineProperty;t.f=i("9e1e")?Object.defineProperty:function(e,t,i){if(o(e),t=a(t,!0),o(i),n)try{return s(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},"8aae":function(e,t,i){i("32a6"),e.exports=i("584a").Object.keys},"8e60":function(e,t,i){e.exports=!i("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(e,t,i){"use strict";var o=i("a159"),n=i("aebd"),a=i("45f2"),s={};i("35e8")(s,i("5168")("iterator"),function(){return this}),e.exports=function(e,t,i){e.prototype=o(s,{next:n(1,i)}),a(e,t+" Iterator")}},9003:function(e,t,i){var o=i("6b4c");e.exports=Array.isArray||function(e){return"Array"==o(e)}},9138:function(e,t,i){e.exports=i("35e8")},9306:function(e,t,i){"use strict";var o=i("c3a1"),n=i("9aa9"),a=i("355d"),s=i("241e"),r=i("335c"),l=Object.assign;e.exports=!l||i("294c")(function(){var e={},t={},i=Symbol(),o="abcdefghijklmnopqrst";return e[i]=7,o.split("").forEach(function(e){t[e]=e}),7!=l({},e)[i]||Object.keys(l({},t)).join("")!=o})?function(e,t){for(var i=s(e),l=arguments.length,c=1,u=n.f,d=a.f;l>c;)for(var p,m=r(arguments[c++]),f=u?o(m).concat(u(m)):o(m),h=f.length,g=0;h>g;)d.call(m,p=f[g++])&&(i[p]=m[p]);return i}:l},9427:function(e,t,i){var o=i("63b6");o(o.S,"Object",{create:i("a159")})},"95d5":function(e,t,i){var o=i("40c3"),n=i("5168")("iterator"),a=i("481b");e.exports=i("584a").isIterable=function(e){var t=Object(e);return void 0!==t[n]||"@@iterator"in t||a.hasOwnProperty(o(t))}},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,i){var o=i("d8e8");e.exports=function(e,t,i){if(o(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,o){return e.call(t,i,o)};case 3:return function(i,o,n){return e.call(t,i,o,n)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,i){var o=i("2b4c")("unscopables"),n=Array.prototype;void 0==n[o]&&i("32e9")(n,o,{}),e.exports=function(e){n[o][e]=!0}},"9def":function(e,t,i){var o=i("4588"),n=Math.min;e.exports=function(e){return e>0?n(o(e),9007199254740991):0}},"9e1e":function(e,t,i){e.exports=!i("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(e,t,i){var o=i("e4ae"),n=i("7e90"),a=i("1691"),s=i("5559")("IE_PROTO"),r=function(){},l="prototype",c=function(){var e,t=i("1ec9")("iframe"),o=a.length;for(t.style.display="none",i("32fc").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;o--;)delete c[l][a[o]];return c()};e.exports=Object.create||function(e,t){var i;return null!==e?(r[l]=o(e),i=new r,r[l]=null,i[s]=e):i=c(),void 0===t?i:n(i,t)}},a352:function(t,i){t.exports=e},a3c3:function(e,t,i){var o=i("63b6");o(o.S+o.F,"Object",{assign:i("9306")})},a481:function(e,t,i){"use strict";var o=i("cb7c"),n=i("4bf8"),a=i("9def"),s=i("4588"),r=i("0390"),l=i("5f1b"),c=Math.max,u=Math.min,d=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};i("214f")("replace",2,function(e,t,i,h){return[function(o,n){var a=e(this),s=void 0==o?void 0:o[t];return void 0!==s?s.call(o,a,n):i.call(String(a),o,n)},function(e,t){var n=h(i,e,this,t);if(n.done)return n.value;var d=o(e),p=String(this),m="function"==typeof t;m||(t=String(t));var v=d.global;if(v){var b=d.unicode;d.lastIndex=0}for(var y=[];;){var _=l(d,p);if(null===_)break;if(y.push(_),!v)break;""===String(_[0])&&(d.lastIndex=r(p,a(d.lastIndex),b))}for(var k="",x=0,C=0;C<y.length;C++){_=y[C];for(var w=String(_[0]),S=c(u(s(_.index),p.length),0),P=[],$=1;$<_.length;$++)P.push(f(_[$]));var T=_.groups;if(m){var E=[w].concat(P,S,p);void 0!==T&&E.push(T);var O=String(t.apply(void 0,E))}else O=g(w,p,S,P,T,t);S>=x&&(k+=p.slice(x,S)+O,x=S+w.length)}return k+p.slice(x)}];function g(e,t,o,a,s,r){var l=o+e.length,c=a.length,u=m;return void 0!==s&&(s=n(s),u=p),i.call(r,u,function(i,n){var r;switch(n.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,o);case"'":return t.slice(l);case"<":r=s[n.slice(1,-1)];break;default:var u=+n;if(0===u)return i;if(u>c){var p=d(u/10);return 0===p?i:p<=c?void 0===a[p-1]?n.charAt(1):a[p-1]+n.charAt(1):i}r=a[u-1]}return void 0===r?"":r})}})},a4bb:function(e,t,i){e.exports=i("8aae")},a745:function(e,t,i){e.exports=i("f410")},aae3:function(e,t,i){var o=i("d3f4"),n=i("2d95"),a=i("2b4c")("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==n(e))}},aebd:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},b0c5:function(e,t,i){"use strict";var o=i("520a");i("5ca1")({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},b0dc:function(e,t,i){var o=i("e4ae");e.exports=function(e,t,i,n){try{return n?t(o(i)[0],i[1]):t(i)}catch(t){var a=e.return;throw void 0!==a&&o(a.call(e)),t}}},b447:function(e,t,i){var o=i("3a38"),n=Math.min;e.exports=function(e){return e>0?n(o(e),9007199254740991):0}},b8e3:function(e,t){e.exports=!0},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},c366:function(e,t,i){var o=i("6821"),n=i("9def"),a=i("77f1");e.exports=function(e){return function(t,i,s){var r,l=o(t),c=n(l.length),u=a(s,c);if(e&&i!=i){for(;c>u;)if((r=l[u++])!=r)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}}},c367:function(e,t,i){"use strict";var o=i("8436"),n=i("50ed"),a=i("481b"),s=i("36c3");e.exports=i("30f1")(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,n(1)):n(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])},"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},c3a1:function(e,t,i){var o=i("e6f3"),n=i("1691");e.exports=Object.keys||function(e){return o(e,n)}},c649:function(e,t,i){"use strict";(function(e){i.d(t,"c",function(){return c}),i.d(t,"a",function(){return r}),i.d(t,"b",function(){return a}),i.d(t,"d",function(){return l}),i("a481");var o=i("4aa6"),n=i.n(o);var a="undefined"!=typeof window?window.console:e.console;var s=/-(\w)/g,r=function(e){var t=n()(null);return function(i){return t[i]||(t[i]=e(i))}}(function(e){return e.replace(s,function(e,t){return t?t.toUpperCase():""})});function l(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function c(e,t,i){var o=0===i?e.children[0]:e.children[i-1].nextSibling;e.insertBefore(t,o)}}).call(this,i("c8ba"))},c69a:function(e,t,i){e.exports=!i("9e1e")&&!i("79e5")(function(){return 7!=Object.defineProperty(i("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},c8bb:function(e,t,i){e.exports=i("54a1")},ca5a:function(e,t){var i=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+o).toString(36))}},cb7c:function(e,t,i){var o=i("d3f4");e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},ce7e:function(e,t,i){var o=i("63b6"),n=i("584a"),a=i("294c");e.exports=function(e,t){var i=(n.Object||{})[e]||Object[e],s={};s[e]=t(i),o(o.S+o.F*a(function(){i(1)}),"Object",s)}},d2c8:function(e,t,i){var o=i("aae3"),n=i("be13");e.exports=function(e,t,i){if(o(t))throw TypeError("String#"+i+" doesn't accept regex!");return String(n(e))}},d2d5:function(e,t,i){i("1654"),i("549b"),e.exports=i("584a").Array.from},d3f4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},d864:function(e,t,i){var o=i("79aa");e.exports=function(e,t,i){if(o(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,o){return e.call(t,i,o)};case 3:return function(i,o,n){return e.call(t,i,o,n)}}return function(){return e.apply(t,arguments)}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},d9f6:function(e,t,i){var o=i("e4ae"),n=i("794b"),a=i("1bc3"),s=Object.defineProperty;t.f=i("8e60")?Object.defineProperty:function(e,t,i){if(o(e),t=a(t,!0),o(i),n)try{return s(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},dbdb:function(e,t,i){var o=i("584a"),n=i("e53d"),a="__core-js_shared__",s=n[a]||(n[a]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:i("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dc62:function(e,t,i){i("9427");var o=i("584a").Object;e.exports=function(e,t){return o.create(e,t)}},e4ae:function(e,t,i){var o=i("f772");e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},e53d:function(e,t){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},e6f3:function(e,t,i){var o=i("07e3"),n=i("36c3"),a=i("5b4e")(!1),s=i("5559")("IE_PROTO");e.exports=function(e,t){var i,r=n(e),l=0,c=[];for(i in r)i!=s&&o(r,i)&&c.push(i);for(;t.length>l;)o(r,i=t[l++])&&(~a(c,i)||c.push(i));return c}},f410:function(e,t,i){i("1af6"),e.exports=i("584a").Array.isArray},f559:function(e,t,i){"use strict";var o=i("5ca1"),n=i("9def"),a=i("d2c8"),s="startsWith",r=""[s];o(o.P+o.F*i("5147")(s),"String",{startsWith:function(e){var t=a(this,e,s),i=n(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return r?r.call(t,o,i):t.slice(i,i+o.length)===o}})},f772:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},fa5b:function(e,t,i){e.exports=i("5537")("native-function-to-string",Function.toString)},fb15:function(e,t,i){"use strict";var o;i.r(t),"undefined"!=typeof window&&(o=window.document.currentScript)&&(o=o.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(i.p=o[1]);var n=i("5176"),a=i.n(n),s=(i("f559"),i("a4bb")),r=i.n(s),l=(i("6762"),i("2fdb"),i("a745")),c=i.n(l);var u=i("5d73"),d=i.n(u);function p(e,t){return function(e){if(c()(e))return e}(e)||function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=d()(e);!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(n)throw a}}return i}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var m=i("774e"),f=i.n(m),h=i("c8bb"),g=i.n(h);function v(e){return function(e){if(c()(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}(e)||function(e){if(g()(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return f()(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var b=i("a352"),y=i.n(b),_=i("c649");function k(e,t){var i=this;this.$nextTick(function(){return i.$emit(e.toLowerCase(),t)})}function x(e,t){var i=null,o=function(e,t){i=function(e,t,i){return void 0===i?e:((e=e||{})[t]=i,e)}(i,e,t)};if(o("attrs",r()(e).filter(function(e){return"id"===e||e.startsWith("data-")}).reduce(function(t,i){return t[i]=e[i],t},{})),!t)return i;var n=t.on,s=t.props,l=t.attrs;return o("on",n),o("props",s),a()(i.attrs,l),i}var C=["Start","Add","Remove","Update","End"],w=["Choose","Sort","Filter","Clone"],S=["Move"].concat(C,w).map(function(e){return"on"+e}),P=null,$={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(e){return e}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1,init:!1}},render:function(e){var t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;var t=p(e,1)[0].componentOptions;return!!t&&["transition-group","TransitionGroup"].includes(t.tag)}(t);var i=function(e,t){var i=t.header,o=t.footer,n=0,a=0;return i&&(n=i.length,e=e?[].concat(v(i),v(e)):v(i)),o&&(a=o.length,e=e?[].concat(v(e),v(o)):v(o)),{children:e,headerOffset:n,footerOffset:a}}(t,this.$slots),o=i.children,n=i.headerOffset,a=i.footerOffset;this.headerOffset=n,this.footerOffset=a;var s=x(this.$attrs,this.componentData);return e(this.getTag(),s,o)},created:function(){null!==this.list&&null!==this.value&&_.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&_.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&_.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var e=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var t={};C.forEach(function(i){t["on"+i]=function(e){var t=this;return function(i){null!==t.realList&&t["onDrag"+e](i),k.call(t,e,i)}}.call(e,i)}),w.forEach(function(i){t["on"+i]=k.bind(e,i)});var i=r()(this.$attrs).reduce(function(t,i){return t[Object(_.a)(i)]=e.$attrs[i],t},{}),o=a()({},this.options,i,t,{onMove:function(t,i){return e.onDragMove(t,i)}});!("draggable"in o)&&(o.draggable=">*"),this._sortable=new y.a(this.rootContainer,o),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(e){this.updateOptions(e)},deep:!0},$attrs:{handler:function(e){this.updateOptions(e)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getTag:function(){return this.tag||this.element},updateOptions:function(e){for(var t in e){var i=Object(_.a)(t);-1===S.indexOf(i)&&this._sortable.option(i,e[t])}},getChildrenNodes:function(){if(this.init||(this.noneFunctionalComponentMode=this.noneFunctionalComponentMode&&1===this.$children.length,this.init=!0),this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes:function(){var e=this;this.$nextTick(function(){e.visibleIndexes=function(e,t,i,o){if(!e)return[];var n=e.map(function(e){return e.elm}),a=t.length-o,s=v(t).map(function(e,t){return t>=a?n.length:n.indexOf(e)});return i?s.filter(function(e){return-1!==e}):s}(e.getChildrenNodes(),e.rootContainer.children,e.transitionMode,e.footerOffset)})},getUnderlyingVm:function(e){var t=function(e,t){return e.map(function(e){return e.elm}).indexOf(t)}(this.getChildrenNodes()||[],e);return-1===t?null:{index:t,element:this.realList[t]}},getUnderlyingPotencialDraggableComponent:function(e){var t=e.__vue__;return t&&t.$options&&"transition-group"===t.$options._componentTag?t.$parent:t},emitChanges:function(e){var t=this;this.$nextTick(function(){t.$emit("change",e)})},alterList:function(e){if(this.list)e(this.list);else{var t=v(this.value);e(t),this.$emit("input",t)}},spliceList:function(){var e=arguments;this.alterList(function(t){return t.splice.apply(t,v(e))})},updatePosition:function(e,t){this.alterList(function(i){return i.splice(t,0,i.splice(e,1)[0])})},getRelatedContextFromMoveEvent:function(e){var t=e.to,i=e.related,o=this.getUnderlyingPotencialDraggableComponent(t);if(!o)return{component:o};var n=o.realList,s={list:n,component:o};if(t!==i&&n&&o.getUnderlyingVm){var r=o.getUnderlyingVm(i);if(r)return a()(r,s)}return s},getVmIndex:function(e){var t=this.visibleIndexes,i=t.length;return e>i-1?i:t[e]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(e){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[e].data=null;var t=this.getComponent();t.children=[],t.kept=void 0}},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),P=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){Object(_.d)(e.item);var i=this.getVmIndex(e.newIndex);this.spliceList(i,0,t),this.computeIndexes();var o={element:t,newIndex:i};this.emitChanges({added:o})}},onDragRemove:function(e){if(Object(_.c)(this.rootContainer,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context.index;this.spliceList(t,1);var i={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:i})}else Object(_.d)(e.clone)},onDragUpdate:function(e){Object(_.d)(e.item),Object(_.c)(e.from,e.item,e.oldIndex);var t=this.context.index,i=this.getVmIndex(e.newIndex);this.updatePosition(t,i);var o={element:this.context.element,oldIndex:t,newIndex:i};this.emitChanges({moved:o})},updateProperty:function(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex:function(e,t){if(!e.element)return 0;var i=v(t.to.children).filter(function(e){return"none"!==e.style.display}),o=i.indexOf(t.related),n=e.component.getVmIndex(o);return-1!==i.indexOf(P)||!t.willInsertAfter?n:n+1},onDragMove:function(e,t){var i=this.move;if(!i||!this.realList)return!0;var o=this.getRelatedContextFromMoveEvent(e),n=this.context,s=this.computeFutureIndex(o,e);return a()(n,{futureIndex:s}),i(a()({},e,{relatedContext:o,draggedContext:n}),t)},onDragEnd:function(){this.computeIndexes(),P=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",$);var T=$;t.default=T}}).default},e.exports=o(i(823))},796:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(771),n=(i.n(o),i(780));t.default={mixins:[n.a],props:{textModeProp:null,allowImage:!1,hasTranslation:!0,hasQuill:!0,label:"",entity:null,textProperty:"",htmlProperty:""},data:function(){return{textValue:"",isTextMode:!1}},mounted:function(){var e=this;this.textProperty in this.entity&&null!==this.entity[this.textProperty]||(this.entity[this.textProperty]=""),this.htmlProperty in this.entity&&null!==this.entity[this.htmlProperty]||(this.entity[this.htmlProperty]=""),this.$nextTick(function(){e.isTextMode=e.textModeProp,e.textValue=e.entity[e.textProperty],e.entity[e.htmlProperty]=e.entity[e.textProperty],e.entity[e.textProperty].startsWith("\x3c!-- Content --\x3e")&&(e.isTextMode=!1),e.isTextMode&&(e.entity[e.textProperty]=e.entity[e.textProperty].replace("\x3c!-- Content --\x3e",""))})},methods:{readyQuill:function(){this.textProperty in this.entity&&this.entity[this.textProperty]&&(this.entity[this.textProperty]=this.entity[this.textProperty].replace("<p><br></p><ul>","<ul>"),this.entity[this.textProperty]=this.entity[this.textProperty].replace("<p><br></p><ol>","<ol>"))},changedContentQuill:function(){this.entity[this.textProperty]="\x3c!-- Content --\x3e"+this.entity[this.htmlProperty].replace("\x3c!-- Content --\x3e","")},changedContentText:function(){this.entity[this.textProperty]=this.process(this.textValue.replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")),this.entity[this.htmlProperty]=this.entity[this.textProperty]},showDialogTranslate:function(){this.$emit("showDialogTranslate")},textModeChanged:function(){this.isTextMode=!this.isTextMode,this.isTextMode?this.entity[this.textProperty]=this.process(this.entity[this.htmlProperty].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):(this.entity[this.textProperty]="\x3c!-- Content --\x3e"+this.entity[this.textProperty],this.entity[this.htmlProperty]=this.entity[this.textProperty]),this.textValue=this.entity[this.textProperty]}},components:{quillEditor:o.quillEditor}}},797:function(e,t,i){(function(t){var i;"undefined"!=typeof self&&self,i=function(){return function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=109)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(17),n=i(18),a=i(19),s=i(45),r=i(46),l=i(47),c=i(48),u=i(49),d=i(12),p=i(32),m=i(33),f=i(31),h=i(1),g={Scope:h.Scope,create:h.create,find:h.find,query:h.query,register:h.register,Container:o.default,Format:n.default,Leaf:a.default,Embed:c.default,Scroll:s.default,Block:l.default,Inline:r.default,Text:u.default,Attributor:{Attribute:d.default,Class:p.default,Style:m.default,Store:f.default}};t.default=g},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var i=this;return t="[Parchment] "+t,(i=e.call(this,t)||this).message=t,i.name=i.constructor.name,i}return n(t,e),t}(Error);t.ParchmentError=a;var s,r={},l={},c={},u={};function d(e,t){var i;if(void 0===t&&(t=s.ANY),"string"==typeof e)i=u[e]||r[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)i=u.text;else if("number"==typeof e)e&s.LEVEL&s.BLOCK?i=u.block:e&s.LEVEL&s.INLINE&&(i=u.inline);else if(e instanceof HTMLElement){var o=(e.getAttribute("class")||"").split(/\s+/);for(var n in o)if(i=l[o[n]])break;i=i||c[e.tagName]}return null==i?null:t&s.LEVEL&i.scope&&t&s.TYPE&i.scope?i:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(s=t.Scope||(t.Scope={})),t.create=function(e,t){var i=d(e);if(null==i)throw new a("Unable to create "+e+" blot");var o=i;return new o(e instanceof Node||e.nodeType===Node.TEXT_NODE?e:o.create(t),t)},t.find=function e(i,o){return void 0===o&&(o=!1),null==i?null:null!=i[t.DATA_KEY]?i[t.DATA_KEY].blot:o?e(i.parentNode,o):null},t.query=d,t.register=function e(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(t.length>1)return t.map(function(t){return e(t)});var o=t[0];if("string"!=typeof o.blotName&&"string"!=typeof o.attrName)throw new a("Invalid definition");if("abstract"===o.blotName)throw new a("Cannot register abstract class");u[o.blotName||o.attrName]=o,"string"==typeof o.keyName?r[o.keyName]=o:(null!=o.className&&(l[o.className]=o),null!=o.tagName&&(Array.isArray(o.tagName)?o.tagName=o.tagName.map(function(e){return e.toUpperCase()}):o.tagName=o.tagName.toUpperCase(),(Array.isArray(o.tagName)?o.tagName:[o.tagName]).forEach(function(e){null!=c[e]&&null!=o.className||(c[e]=o)})));return o}},function(e,t,i){var o=i(51),n=i(11),a=i(3),s=i(20),r=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var i={};return 0===e.length?this:(i.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(i.attributes=t),this.push(i))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var i={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(i.attributes=t),this.push(i)},l.prototype.push=function(e){var t=this.ops.length,i=this.ops[t-1];if(e=a(!0,{},e),"object"==typeof i){if("number"==typeof e.delete&&"number"==typeof i.delete)return this.ops[t-1]={delete:i.delete+e.delete},this;if("number"==typeof i.delete&&null!=e.insert&&(t-=1,"object"!=typeof(i=this.ops[t-1])))return this.ops.unshift(e),this;if(n(e.attributes,i.attributes)){if("string"==typeof e.insert&&"string"==typeof i.insert)return this.ops[t-1]={insert:i.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof i.retain)return this.ops[t-1]={retain:i.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],i=[];return this.forEach(function(o){(e(o)?t:i).push(o)}),[t,i]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+s.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+s.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var i=[],o=s.iterator(this.ops),n=0;n<t&&o.hasNext();){var a;n<e?a=o.next(e-n):(a=o.next(t-n),i.push(a)),n+=s.length(a)}return new l(i)},l.prototype.compose=function(e){for(var t=s.iterator(this.ops),i=s.iterator(e.ops),o=new l;t.hasNext()||i.hasNext();)if("insert"===i.peekType())o.push(i.next());else if("delete"===t.peekType())o.push(t.next());else{var n=Math.min(t.peekLength(),i.peekLength()),a=t.next(n),r=i.next(n);if("number"==typeof r.retain){var c={};"number"==typeof a.retain?c.retain=n:c.insert=a.insert;var u=s.attributes.compose(a.attributes,r.attributes,"number"==typeof a.retain);u&&(c.attributes=u),o.push(c)}else"number"==typeof r.delete&&"number"==typeof a.retain&&o.push(r)}return o.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var i=[this,e].map(function(t){return t.map(function(i){if(null!=i.insert)return"string"==typeof i.insert?i.insert:r;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),a=new l,c=o(i[0],i[1],t),u=s.iterator(this.ops),d=s.iterator(e.ops);return c.forEach(function(e){for(var t=e[1].length;t>0;){var i=0;switch(e[0]){case o.INSERT:i=Math.min(d.peekLength(),t),a.push(d.next(i));break;case o.DELETE:i=Math.min(t,u.peekLength()),u.next(i),a.delete(i);break;case o.EQUAL:i=Math.min(u.peekLength(),d.peekLength(),t);var r=u.next(i),l=d.next(i);n(r.insert,l.insert)?a.retain(i,s.attributes.diff(r.attributes,l.attributes)):a.push(l).delete(i)}t-=i}}),a.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var i=s.iterator(this.ops),o=new l,n=0;i.hasNext();){if("insert"!==i.peekType())return;var a=i.peek(),r=s.length(a)-i.peekLength(),c="string"==typeof a.insert?a.insert.indexOf(t,r)-r:-1;if(c<0)o.push(i.next());else if(c>0)o.push(i.next(c));else{if(!1===e(o,i.next(1).attributes||{},n))return;n+=1,o=new l}}o.length()>0&&e(o,{},n)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var i=s.iterator(this.ops),o=s.iterator(e.ops),n=new l;i.hasNext()||o.hasNext();)if("insert"!==i.peekType()||!t&&"insert"===o.peekType())if("insert"===o.peekType())n.push(o.next());else{var a=Math.min(i.peekLength(),o.peekLength()),r=i.next(a),c=o.next(a);if(r.delete)continue;c.delete?n.push(c):n.retain(a,s.attributes.transform(r.attributes,c.attributes,t))}else n.retain(s.length(i.next()));return n.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var i=s.iterator(this.ops),o=0;i.hasNext()&&o<=e;){var n=i.peekLength(),a=i.peekType();i.next(),"delete"!==a?("insert"===a&&(o<e||!t)&&(e+=n),o+=n):e-=Math.min(n,e-o)}return e},e.exports=l},function(e,t){"use strict";var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,n=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},a=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=i.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!a)return!1;for(t in e);return void 0===t||i.call(e,t)};e.exports=function e(){var t,i,o,s,r,l,c=arguments[0],u=1,d=arguments.length,p=!1;for("boolean"==typeof c&&(p=c,c=arguments[1]||{},u=2),(null==c||"object"!=typeof c&&"function"!=typeof c)&&(c={});u<d;++u)if(null!=(t=arguments[u]))for(i in t)o=c[i],c!==(s=t[i])&&(p&&s&&(a(s)||(r=n(s)))?(r?(r=!1,l=o&&n(o)?o:[]):l=o&&a(o)?o:{},c[i]=e(p,l,s)):void 0!==s&&(c[i]=s));return c}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},a=d(i(3)),s=d(i(2)),r=d(i(0)),l=d(i(16)),c=d(i(6)),u=d(i(7));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return p(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,r.default.Embed),o(t,[{key:"attach",value:function(){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new r.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new s.default).insert(this.value(),(0,a.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var i=r.default.query(e,r.default.Scope.BLOCK_ATTRIBUTE);null!=i&&this.attributes.attribute(i,t)}},{key:"formatAt",value:function(e,t,i,o){this.format(i,o)}},{key:"insertAt",value:function(e,i,o){if("string"==typeof i&&i.endsWith("\n")){var a=r.default.create(g.blotName);this.parent.insertBefore(a,0===e?this:this.next),a.insertAt(0,i.slice(0,-1))}else n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,i,o)}}]),t}();h.scope=r.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){p(this,t);var i=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i.cache={},i}return f(t,r.default.Block),o(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(r.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))},new s.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,i){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,i),this.cache={}}},{key:"formatAt",value:function(e,i,o,a){i<=0||(r.default.query(o,r.default.Scope.BLOCK)?e+i===this.length()&&this.format(o,a):n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(i,this.length()-e-1),o,a),this.cache={})}},{key:"insertAt",value:function(e,i,o){if(null!=o)return n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,i,o);if(0!==i.length){var a=i.split("\n"),s=a.shift();s.length>0&&(e<this.length()-1||null==this.children.tail?n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});var r=this;a.reduce(function(e,t){return(r=r.split(e,!0)).insertAt(0,t),t.length},e+s.length)}}},{key:"insertBefore",value:function(e,i){var o=this.children.head;n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,i),o instanceof l.default&&o.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,i){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,i),this.cache={}}},{key:"optimize",value:function(e){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i&&(0===e||e>=this.length()-1)){var o=this.clone();return 0===e?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var a=n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,i);return this.cache={},a}}]),t}();function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,a.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:v(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[c.default,r.default.Embed,u.default],t.bubbleFormats=v,t.BlockEmbed=h,t.default=g},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}();i(50);var s=g(i(2)),r=g(i(14)),l=g(i(8)),c=g(i(9)),u=g(i(0)),d=i(15),p=g(d),m=g(i(3)),f=g(i(10)),h=g(i(34));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var b=(0,f.default)("quill"),y=function(){function e(t){var i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=_(t,o),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new r.default(this.scroll),this.selection=new p.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e){e===l.default.events.TEXT_CHANGE&&i.root.classList.toggle("ql-blank",i.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(e,t){var o=i.selection.lastRange,n=o&&0===o.length?o.index:void 0;k.call(i,function(){return i.editor.update(null,t,n)},e)});var a=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+n+"<p><br></p></div>");this.setContents(a),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return a(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),f.default.level(e)}},{key:"find",value:function(e){return e.__quill||u.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&b.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var i=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var n=e.attrName||e.blotName;"string"==typeof n?this.register("formats/"+n,e,t):Object.keys(e).forEach(function(o){i.register(o,e[o],t)})}else null==this.imports[e]||o||b.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?u.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),a(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var i=e;(e=document.createElement("div")).classList.add(i)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,i){var o=this,a=x(e,t,i),s=n(a,4);return e=s[0],t=s[1],i=s[3],k.call(this,function(){return o.editor.deleteText(e,t)},i,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return k.call(this,function(){var o=i.getSelection(!0),n=new s.default;if(null==o)return n;if(u.default.query(e,u.default.Scope.BLOCK))n=i.editor.formatLine(o.index,o.length,v({},e,t));else{if(0===o.length)return i.selection.format(e,t),n;n=i.editor.formatText(o.index,o.length,v({},e,t))}return i.setSelection(o,l.default.sources.SILENT),n},o)}},{key:"formatLine",value:function(e,t,i,o,a){var s,r=this,l=x(e,t,i,o,a),c=n(l,4);return e=c[0],t=c[1],s=c[2],a=c[3],k.call(this,function(){return r.editor.formatLine(e,t,s)},a,e,0)}},{key:"formatText",value:function(e,t,i,o,a){var s,r=this,l=x(e,t,i,o,a),c=n(l,4);return e=c[0],t=c[1],s=c[2],a=c[3],k.call(this,function(){return r.editor.formatText(e,t,s)},a,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=void 0;i="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var o=this.container.getBoundingClientRect();return{bottom:i.bottom-o.top,height:i.height,left:i.left-o.left,right:i.right-o.left,top:i.top-o.top,width:i.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,i=x(e,t),o=n(i,2);return e=o[0],t=o[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,i=x(e,t),o=n(i,2);return e=o[0],t=o[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,i,o){var n=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return k.call(this,function(){return n.editor.insertEmbed(t,i,o)},a,t)}},{key:"insertText",value:function(e,t,i,o,a){var s,r=this,l=x(e,0,i,o,a),c=n(l,4);return e=c[0],s=c[2],a=c[3],k.call(this,function(){return r.editor.insertText(e,t,s)},a,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,i){this.clipboard.dangerouslyPasteHTML(e,t,i)}},{key:"removeFormat",value:function(e,t,i){var o=this,a=x(e,t,i),s=n(a,4);return e=s[0],t=s[1],i=s[3],k.call(this,function(){return o.editor.removeFormat(e,t)},i,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,function(){e=new s.default(e);var i=t.getLength(),o=t.editor.deleteText(0,i),n=t.editor.applyDelta(e),a=n.ops[n.ops.length-1];return null!=a&&"string"==typeof a.insert&&"\n"===a.insert[a.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),n.delete(1)),o.compose(n)},i)}},{key:"setSelection",value:function(t,i,o){if(null==t)this.selection.setRange(null,i||e.sources.API);else{var a=x(t,i,o),s=n(a,4);t=s[0],i=s[1],o=s[3],this.selection.setRange(new d.Range(t,i),o),o!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,i=(new s.default).insert(e);return this.setContents(i,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,function(){return e=new s.default(e),t.editor.applyDelta(e,i)},i,!0)}}]),e}();function _(e,t){if((t=(0,m.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==y.DEFAULTS.theme){if(t.theme=y.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=h.default;var i=(0,m.default)(!0,{},t.theme.DEFAULTS);[i,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var o=Object.keys(i.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var i=y.import("modules/"+t);return null==i?b.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=i.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,m.default)(!0,{},y.DEFAULTS,{modules:o},i,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,i){return t.modules[i]&&(e[i]=t.modules[i]),e},{}),t}function k(e,t,i,o){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new s.default;var n=null==i?null:this.getSelection(),a=this.editor.delta,r=e();if(null!=n&&(!0===i&&(i=n.index),null==o?n=C(n,r,t):0!==o&&(n=C(n,i,o,t)),this.setSelection(n,l.default.sources.SILENT)),r.length()>0){var c,u,d=[l.default.events.TEXT_CHANGE,r,a,t];if((c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT)(u=this.emitter).emit.apply(u,d)}return r}function x(e,t,i,n,a){var s={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(a=n,n=i,i=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(a=n,n=i,i=t,t=0),"object"===(void 0===i?"undefined":o(i))?(s=i,a=n):"string"==typeof i&&(null!=n?s[i]=n:a=i),[e,t,s,a=a||l.default.sources.API]}function C(e,t,i,o){if(null==e)return null;var a=void 0,r=void 0;if(t instanceof s.default){var c=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,o!==l.default.sources.USER)}),u=n(c,2);a=u[0],r=u[1]}else{var p=[e.index,e.index+e.length].map(function(e){return e<t||e===t&&o===l.default.sources.USER?e:i>=0?e+i:Math.max(t,e+i)}),m=n(p,2);a=m[0],r=m[1]}return new d.Range(a,r-a)}y.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},y.events=l.default.events,y.sources=l.default.sources,y.version="1.3.6",y.imports={delta:s.default,parchment:u.default,"core/module":c.default,"core/theme":h.default},t.expandConfig=_,t.overload=x,t.default=y},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},a=r(i(7)),s=r(i(0));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Inline),o(t,[{key:"formatAt",value:function(e,i,o,a){if(t.compare(this.statics.blotName,o)<0&&s.default.query(o,s.default.Scope.BLOT)){var r=this.isolate(e,i);a&&r.wrap(o,a)}else n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,i,o,a)}},{key:"optimize",value:function(e){if(n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var i=this.parent.isolate(this.offset(),this.length());this.moveChildren(i),i.wrap(this)}}}],[{key:"compare",value:function(e,i){var o=t.order.indexOf(e),n=t.order.indexOf(i);return o>=0||n>=0?o-n:e===i?0:e<i?-1:1}}]),t}();l.allowedChildren=[l,s.default.Embed,a.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=(o=n)&&o.__esModule?o:{default:o};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Text),t}();t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=a(i(54));function a(e){return e&&e.__esModule?e:{default:e}}var s=(0,a(i(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){var i;e.__quill&&e.__quill.emitter&&(i=e.__quill.emitter).handleDOM.apply(i,t)})})});var r=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",s.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default),o(t,[{key:"emit",value:function(){s.log.apply(s,arguments),function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];(this.listeners[e.type]||[]).forEach(function(t){var o=t.node,n=t.handler;(e.target===o||o.contains(e.target))&&n.apply(void 0,[e].concat(i))})}},{key:"listenDOM",value:function(e,t,i){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:i})}}]),t}();r.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},r.sources={API:"api",SILENT:"silent",USER:"user"},t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=i};o.DEFAULTS={},t.default=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=["error","warn","log","info"],n="warn";function a(e){if(o.indexOf(e)<=o.indexOf(n)){for(var t,i=arguments.length,a=Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];(t=console)[e].apply(t,a)}}function s(e){return o.reduce(function(t,i){return t[i]=a.bind(console,i,e),t},{})}a.level=s.level=function(e){n=e},t.default=s},function(e,t,i){var o=Array.prototype.slice,n=i(52),a=i(53),s=e.exports=function(e,t,i){return i||(i={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?i.strict?e===t:e==t:function(e,t,i){var c,u;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(a(e))return!!a(t)&&(e=o.call(e),t=o.call(t),s(e,t,i));if(l(e)){if(!l(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var d=n(e),p=n(t)}catch(e){return!1}if(d.length!=p.length)return!1;for(d.sort(),p.sort(),c=d.length-1;c>=0;c--)if(d[c]!=p[c])return!1;for(c=d.length-1;c>=0;c--)if(u=d[c],!s(e[u],t[u],i))return!1;return typeof e==typeof t}(e,t,i))};function r(e){return null===e||void 0===e}function l(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),n=function(){function e(e,t,i){void 0===i&&(i={}),this.attrName=e,this.keyName=t;var n=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=i.scope?this.scope=i.scope&o.Scope.LEVEL|n:this.scope=o.Scope.ATTRIBUTE,null!=i.whitelist&&(this.whitelist=i.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=o.query(e,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=d(i(2)),r=d(i(0)),l=d(i(4)),c=d(i(6)),u=d(i(7));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return p(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,c.default),t}();h.blotName="code",h.tagName="CODE";var g=function(e){function t(){return p(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return f(t,l.default),n(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,i){return t.insert(i).insert("\n",e.formats())},new s.default)}},{key:"format",value:function(e,i){if(e!==this.statics.blotName||!i){var n=this.descendant(u.default,this.length()-1),s=o(n,1)[0];null!=s&&s.deleteAt(s.length()-1,1),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,i)}}},{key:"formatAt",value:function(e,i,o,n){if(0!==i&&null!=r.default.query(o,r.default.Scope.BLOCK)&&(o!==this.statics.blotName||n!==this.statics.formats(this.domNode))){var a=this.newlineIndex(e);if(!(a<0||a>=e+i)){var s=this.newlineIndex(e,!0)+1,l=a-s+1,c=this.isolate(s,l),u=c.next;c.format(o,n),u instanceof t&&u.formatAt(0,e-s+i-l,o,n)}}}},{key:"insertAt",value:function(e,t,i){if(null==i){var n=this.descendant(u.default,e),a=o(n,2),s=a[0],r=a[1];s.insertAt(r,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(r.default.create("text","\n")),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var i=this.next;null!=i&&i.prev===this&&i.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===i.statics.formats(i.domNode)&&(i.optimize(e),i.moveChildren(this),i.remove())}},{key:"replace",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=r.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof r.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var i=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return i.setAttribute("spellcheck",!1),i}},{key:"formats",value:function(){return!0}}]),t}();g.blotName="code-block",g.tagName="PRE",g.TAB=" ",t.Code=h,t.default=g},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),s=v(i(2)),r=v(i(20)),l=v(i(0)),c=v(i(13)),u=v(i(24)),d=i(4),p=v(d),m=v(i(16)),f=v(i(21)),h=v(i(11)),g=v(i(3));function v(e){return e&&e.__esModule?e:{default:e}}var b=/^[ -~]*$/,y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return a(e,[{key:"applyDelta",value:function(e){var t=this,i=!1;this.scroll.update();var a=this.scroll.length();return this.scroll.batchStart(),(e=function(e){return e.reduce(function(e,t){if(1===t.insert){var i=(0,f.default)(t.attributes);return delete i.image,e.insert({image:t.attributes.image},i)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,f.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var o=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(o,t.attributes)}return e.push(t)},new s.default)}(e)).reduce(function(e,s){var c=s.retain||s.delete||s.insert.length||1,u=s.attributes||{};if(null!=s.insert){if("string"==typeof s.insert){var m=s.insert;m.endsWith("\n")&&i&&(i=!1,m=m.slice(0,-1)),e>=a&&!m.endsWith("\n")&&(i=!0),t.scroll.insertAt(e,m);var f=t.scroll.line(e),h=n(f,2),v=h[0],b=h[1],y=(0,g.default)({},(0,d.bubbleFormats)(v));if(v instanceof p.default){var _=v.descendant(l.default.Leaf,b),k=n(_,1)[0];y=(0,g.default)(y,(0,d.bubbleFormats)(k))}u=r.default.attributes.diff(y,u)||{}}else if("object"===o(s.insert)){var x=Object.keys(s.insert)[0];if(null==x)return e;t.scroll.insertAt(e,x,s.insert[x])}a+=c}return Object.keys(u).forEach(function(i){t.scroll.formatAt(e,c,i,u[i])}),e+c},0),e.reduce(function(e,i){return"number"==typeof i.delete?(t.scroll.deleteAt(e,i.delete),e):e+(i.retain||i.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new s.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach(function(n){if(null==i.scroll.whitelist||i.scroll.whitelist[n]){var a=i.scroll.lines(e,Math.max(t,1)),s=t;a.forEach(function(t){var a=t.length();if(t instanceof c.default){var r=e-t.offset(i.scroll),l=t.newlineIndex(r+s)-r+1;t.formatAt(r,l,n,o[n])}else t.format(n,o[n]);s-=a})}}),this.scroll.optimize(),this.update((new s.default).retain(e).retain(t,(0,f.default)(o)))}},{key:"formatText",value:function(e,t){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach(function(n){i.scroll.formatAt(e,t,n,o[n])}),this.update((new s.default).retain(e).retain(t,(0,f.default)(o)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new s.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[],o=[];0===t?this.scroll.path(e).forEach(function(e){var t=n(e,1)[0];t instanceof p.default?i.push(t):t instanceof l.default.Leaf&&o.push(t)}):(i=this.scroll.lines(e,t),o=this.scroll.descendants(l.default.Leaf,e,t));var a=[i,o].map(function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var i=e.shift();if(null==i)return t;t=_((0,d.bubbleFormats)(i),t)}return t});return g.default.apply(g.default,a)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"==typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,i){return this.scroll.insertAt(e,t,i),this.update((new s.default).retain(e).insert(function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}({},t,i)))}},{key:"insertText",value:function(e,t){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(o).forEach(function(n){i.scroll.formatAt(e,t.length,n,o[n])}),this.update((new s.default).retain(e).insert(t,(0,f.default)(o)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===p.default.blotName&&(!(e.children.length>1)&&e.children.head instanceof m.default)}},{key:"removeFormat",value:function(e,t){var i=this.getText(e,t),o=this.scroll.line(e+t),a=n(o,2),r=a[0],l=a[1],u=0,d=new s.default;null!=r&&(u=r instanceof c.default?r.newlineIndex(l)-l+1:r.length()-l,d=r.delta().slice(l,l+u-1).insert("\n"));var p=this.getContents(e,t+u).diff((new s.default).insert(i).concat(d)),m=(new s.default).retain(e).concat(p);return this.applyDelta(m)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(b)&&l.default.find(t[0].target)){var n=l.default.find(t[0].target),a=(0,d.bubbleFormats)(n),r=n.offset(this.scroll),c=t[0].oldValue.replace(u.default.CONTENTS,""),p=(new s.default).insert(c),m=(new s.default).insert(n.value());e=(new s.default).retain(r).concat(p.diff(m,i)).reduce(function(e,t){return t.insert?e.insert(t.insert,a):e.push(t)},new s.default),this.delta=o.compose(e)}else this.delta=this.getDelta(),e&&(0,h.default)(o.compose(e),this.delta)||(e=o.diff(this.delta,i));return e}}]),e}();function _(e,t){return Object.keys(t).reduce(function(i,o){return null==e[o]?i:(t[o]===e[o]?i[o]=t[o]:Array.isArray(t[o])?t[o].indexOf(e[o])<0&&(i[o]=t[o].concat([e[o]])):i[o]=[t[o],e[o]],i)},{})}t.default=y},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=c(i(0)),s=c(i(21)),r=c(i(11)),l=c(i(8));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=(0,c(i(10)).default)("quill:selection"),m=function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=i},f=function(){function e(t,i){var o=this;d(this,e),this.emitter=i,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=a.default.create("cursor",this),this.lastRange=this.savedRange=new m(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){o.mouseDown||setTimeout(o.update.bind(o,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&o.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(o.hasFocus()){var e=o.getNativeRange();null!=e&&e.start.node!==o.cursor.textNode&&o.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{o.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var i=t.range,n=i.startNode,a=i.startOffset,s=i.endNode,r=i.endOffset;o.setNativeRange(n,a,s,r)}}),this.update(l.default.sources.SILENT)}return n(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var i=this.getNativeRange();if(null!=i&&i.native.collapsed&&!a.default.query(e,a.default.Scope.BLOCK)){if(i.start.node!==this.cursor.textNode){var o=a.default.find(i.start.node,!1);if(null==o)return;if(o instanceof a.default.Leaf){var n=o.split(i.start.offset);o.parent.insertBefore(this.cursor,n)}else o.insertBefore(this.cursor,i.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.scroll.length();e=Math.min(e,i-1),t=Math.min(e+t,i-1)-e;var n=void 0,a=this.scroll.leaf(e),s=o(a,2),r=s[0],l=s[1];if(null==r)return null;var c=r.position(l,!0),u=o(c,2);n=u[0],l=u[1];var d=document.createRange();if(t>0){d.setStart(n,l);var p=this.scroll.leaf(e+t),m=o(p,2);if(r=m[0],l=m[1],null==r)return null;var f=r.position(l,!0),h=o(f,2);return n=h[0],l=h[1],d.setEnd(n,l),d.getBoundingClientRect()}var g="left",v=void 0;return n instanceof Text?(l<n.data.length?(d.setStart(n,l),d.setEnd(n,l+1)):(d.setStart(n,l-1),d.setEnd(n,l),g="right"),v=d.getBoundingClientRect()):(v=r.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var i=this.normalizeNative(t);return p.info("getNativeRange",i),i}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,i=[[e.start.node,e.start.offset]];e.native.collapsed||i.push([e.end.node,e.end.offset]);var n=i.map(function(e){var i=o(e,2),n=i[0],s=i[1],r=a.default.find(n,!0),l=r.offset(t.scroll);return 0===s?l:r instanceof a.default.Container?l+r.length():l+r.index(n,s)}),s=Math.min(Math.max.apply(Math,u(n)),this.scroll.length()-1),r=Math.min.apply(Math,[s].concat(u(n)));return new m(r,s-r)}},{key:"normalizeNative",value:function(e){if(!h(this.root,e.startContainer)||!e.collapsed&&!h(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,i=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>i)t=t.childNodes[i],i=0;else{if(t.childNodes.length!==i)break;i=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=i}),t}},{key:"rangeToNative",value:function(e){var t=this,i=e.collapsed?[e.index]:[e.index,e.index+e.length],n=[],a=this.scroll.length();return i.forEach(function(e,i){e=Math.min(a-1,e);var s,r=t.scroll.leaf(e),l=o(r,2),c=l[0],u=l[1],d=c.position(u,0!==i),p=o(d,2);s=p[0],u=p[1],n.push(s,u)}),n.length<2&&(n=n.concat(n)),n}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var i=this.getBounds(t.index,t.length);if(null!=i){var n=this.scroll.length()-1,a=this.scroll.line(Math.min(t.index,n)),s=o(a,1)[0],r=s;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,n));r=o(l,1)[0]}if(null!=s&&null!=r){var c=e.getBoundingClientRect();i.top<c.top?e.scrollTop-=c.top-i.top:i.bottom>c.bottom&&(e.scrollTop+=i.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,i,o),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=i.parentNode){var a=document.getSelection();if(null!=a)if(null!=e){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||n||e!==s.startContainer||t!==s.startOffset||i!==s.endContainer||o!==s.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==i.tagName&&(o=[].indexOf.call(i.parentNode.childNodes,i),i=i.parentNode);var r=document.createRange();r.setStart(e,t),r.setEnd(i,o),a.removeAllRanges(),a.addRange(r)}}else a.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t&&(i=t,t=!1),p.info("setRange",e),null!=e){var o=this.rangeToNative(e);this.setNativeRange.apply(this,u(o).concat([t]))}else this.setNativeRange(null);this.update(i)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,i=this.getRange(),n=o(i,2),a=n[0],c=n[1];if(this.lastRange=a,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,r.default)(t,this.lastRange)){var u;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var d,p=[l.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(t),e];if((u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(p)),e!==l.default.sources.SILENT)(d=this.emitter).emit.apply(d,p)}}}]),e}();function h(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=m,t.default=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=i(0),s=(o=a)&&o.__esModule?o:{default:o};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Embed),n(t,[{key:"insertInto",value:function(e,i){0===e.children.length?function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,i):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}();r.blotName="break",r.tagName="BR",t.default=r},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(44),s=i(30),r=i(1),l=function(e){function t(t){var i=e.call(this,t)||this;return i.build(),i}return n(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var i=c(t);e.insertBefore(i,e.children.head||void 0)}catch(e){if(e instanceof r.ParchmentError)return;throw e}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,i){e.deleteAt(t,i)})},t.prototype.descendant=function(e,i){var o=this.children.find(i),n=o[0],a=o[1];return null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e?[n,a]:n instanceof t?n.descendant(e,a):[null,-1]},t.prototype.descendants=function(e,i,o){void 0===i&&(i=0),void 0===o&&(o=Number.MAX_VALUE);var n=[],a=o;return this.children.forEachAt(i,o,function(i,o,s){(null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e)&&n.push(i),i instanceof t&&(n=n.concat(i.descendants(e,o,a))),a-=s}),n},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,i,o){this.children.forEachAt(e,t,function(e,t,n){e.formatAt(t,n,i,o)})},t.prototype.insertAt=function(e,t,i){var o=this.children.find(e),n=o[0],a=o[1];if(n)n.insertAt(a,t,i);else{var s=null==i?r.create("text",t):r.create(t,i);this.appendChild(s)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new r.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(i){e.insertBefore(i,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var i=r.create(this.statics.defaultChild);this.appendChild(i),i.optimize(t)}else this.remove()},t.prototype.path=function(e,i){void 0===i&&(i=!1);var o=this.children.find(e,i),n=o[0],a=o[1],s=[[this,e]];return n instanceof t?s.concat(n.path(a,i)):(null!=n&&s.push([n,a]),s)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(i){i instanceof t&&i.moveChildren(this),e.prototype.replace.call(this,i)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var i=this.clone();return this.parent.insertBefore(i,this.next),this.children.forEachAt(e,this.length(),function(e,o,n){e=e.split(o,t),i.appendChild(e)}),i},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var i=this,o=[],n=[];e.forEach(function(e){e.target===i.domNode&&"childList"===e.type&&(o.push.apply(o,e.addedNodes),n.push.apply(n,e.removedNodes))}),n.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=r.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==i.domNode||t.detach())}}),o.filter(function(e){return e.parentNode==i.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=r.find(e.nextSibling));var o=c(e);o.next==t&&null!=o.next||(null!=o.parent&&o.parent.removeChild(i),i.insertBefore(o,t||void 0))})},t}(s.default);function c(e){var t=r.find(e);if(null==t)try{t=r.create(e)}catch(i){t=r.create(r.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=l},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(12),s=i(31),r=i(17),l=i(1),c=function(e){function t(t){var i=e.call(this,t)||this;return i.attributes=new s.default(i.domNode),i}return n(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var i=l.query(e);i instanceof a.default?this.attributes.attribute(i,t):t&&(null==i||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,i){var o=e.prototype.replaceWith.call(this,t,i);return this.attributes.copy(o),o},t.prototype.update=function(t,i){var o=this;e.prototype.update.call(this,t,i),t.some(function(e){return e.target===o.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(i,o){var n=e.prototype.wrap.call(this,i,o);return n instanceof t&&n.statics.scope===this.statics.scope&&this.attributes.move(n),n},t}(r.default);t.default=c},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(30),s=i(1),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var i=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(i+=1),[this.parent.domNode,i]},t.prototype.value=function(){return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e;var e},t.scope=s.Scope.INLINE_BLOT,t}(a.default);t.default=r},function(e,t,i){var o=i(11),n=i(3),a={attributes:{compose:function(e,t,i){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var o=n(!0,{},t);for(var a in i||(o=Object.keys(o).reduce(function(e,t){return null!=o[t]&&(e[t]=o[t]),e},{})),e)void 0!==e[a]&&void 0===t[a]&&(o[a]=e[a]);return Object.keys(o).length>0?o:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var i=Object.keys(e).concat(Object.keys(t)).reduce(function(i,n){return o(e[n],t[n])||(i[n]=void 0===t[n]?null:t[n]),i},{});return Object.keys(i).length>0?i:void 0},transform:function(e,t,i){if("object"!=typeof e)return t;if("object"==typeof t){if(!i)return t;var o=Object.keys(t).reduce(function(i,o){return void 0===e[o]&&(i[o]=t[o]),i},{});return Object.keys(o).length>0?o:void 0}}},iterator:function(e){return new s(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function s(e){this.ops=e,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var i=this.offset,o=a.length(t);if(e>=o-i?(e=o-i,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var n={};return t.attributes&&(n.attributes=t.attributes),"number"==typeof t.retain?n.retain=e:"string"==typeof t.insert?n.insert=t.insert.substr(i,e):n.insert=t.insert,n}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},e.exports=a},function(e,i){var o=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var i,o,n;try{i=Map}catch(e){i=function(){}}try{o=Set}catch(e){o=function(){}}try{n=Promise}catch(e){n=function(){}}function a(s,l,c,u,d){"object"==typeof l&&(c=l.depth,u=l.prototype,d=l.includeNonEnumerable,l=l.circular);var p=[],m=[],f=void 0!==t;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function s(c,h){if(null===c)return null;if(0===h)return c;var g,v;if("object"!=typeof c)return c;if(e(c,i))g=new i;else if(e(c,o))g=new o;else if(e(c,n))g=new n(function(e,t){c.then(function(t){e(s(t,h-1))},function(e){t(s(e,h-1))})});else if(a.__isArray(c))g=[];else if(a.__isRegExp(c))g=new RegExp(c.source,r(c)),c.lastIndex&&(g.lastIndex=c.lastIndex);else if(a.__isDate(c))g=new Date(c.getTime());else{if(f&&t.isBuffer(c))return g=new t(c.length),c.copy(g),g;e(c,Error)?g=Object.create(c):void 0===u?(v=Object.getPrototypeOf(c),g=Object.create(v)):(g=Object.create(u),v=u)}if(l){var b=p.indexOf(c);if(-1!=b)return m[b];p.push(c),m.push(g)}for(var y in e(c,i)&&c.forEach(function(e,t){var i=s(t,h-1),o=s(e,h-1);g.set(i,o)}),e(c,o)&&c.forEach(function(e){var t=s(e,h-1);g.add(t)}),c){var _;v&&(_=Object.getOwnPropertyDescriptor(v,y)),_&&null==_.set||(g[y]=s(c[y],h-1))}if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(c);for(y=0;y<k.length;y++){var x=k[y];(!(w=Object.getOwnPropertyDescriptor(c,x))||w.enumerable||d)&&(g[x]=s(c[x],h-1),w.enumerable||Object.defineProperty(g,x,{enumerable:!1}))}}if(d){var C=Object.getOwnPropertyNames(c);for(y=0;y<C.length;y++){var w,S=C[y];(w=Object.getOwnPropertyDescriptor(c,S))&&w.enumerable||(g[S]=s(c[S],h-1),Object.defineProperty(g,S,{enumerable:!1}))}}return g}(s,c)}function s(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return a.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},a.__objToStr=s,a.__isDate=function(e){return"object"==typeof e&&"[object Date]"===s(e)},a.__isArray=function(e){return"object"==typeof e&&"[object Array]"===s(e)},a.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===s(e)},a.__getRegExpFlags=r,a}();"object"==typeof e&&e.exports&&(e.exports=o)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=m(i(0)),r=m(i(8)),l=i(4),c=m(l),u=m(i(16)),d=m(i(13)),p=m(i(25));function m(e){return e&&e.__esModule?e:{default:e}}function f(e){return e instanceof c.default||e instanceof l.BlockEmbed}var h=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.emitter=i.emitter,Array.isArray(i.whitelist)&&(o.whitelist=i.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),o.domNode.addEventListener("DOMNodeInserted",function(){}),o.optimize(),o.enable(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Scroll),n(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,i){var n=this.line(e),s=o(n,2),r=s[0],c=s[1],p=this.line(e+i),m=o(p,1)[0];if(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,i),null!=m&&r!==m&&c>0){if(r instanceof l.BlockEmbed||m instanceof l.BlockEmbed)return void this.optimize();if(r instanceof d.default){var f=r.newlineIndex(r.length(),!0);if(f>-1&&(r=r.split(f+1))===m)return void this.optimize()}else if(m instanceof d.default){var h=m.newlineIndex(0);h>-1&&m.split(h+1)}var g=m.children.head instanceof u.default?null:m.children.head;r.moveChildren(m,g),r.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,i,o,n){(null==this.whitelist||this.whitelist[o])&&(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,i,o,n),this.optimize())}},{key:"insertAt",value:function(e,i,o){if(null==o||null==this.whitelist||this.whitelist[i]){if(e>=this.length())if(null==o||null==s.default.query(i,s.default.Scope.BLOCK)){var n=s.default.create(this.statics.defaultChild);this.appendChild(n),null==o&&i.endsWith("\n")&&(i=i.slice(0,-1)),n.insertAt(0,i,o)}else{var r=s.default.create(i,o);this.appendChild(r)}else a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,i,o);this.optimize()}}},{key:"insertBefore",value:function(e,i){if(e.statics.scope===s.default.Scope.INLINE_BLOT){var o=s.default.create(this.statics.defaultChild);o.appendChild(e),e=o}a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,i)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(f,e)}},{key:"lines",value:function(){return function e(t,i,o){var n=[],a=o;return t.children.forEachAt(i,o,function(t,i,o){f(t)?n.push(t):t instanceof s.default.Container&&(n=n.concat(e(t,i,a))),a-=o}),n}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,i),e.length>0&&this.emitter.emit(r.default.events.SCROLL_OPTIMIZE,e,i))}},{key:"path",value:function(e){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var i=r.default.sources.USER;"string"==typeof e&&(i=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(r.default.events.SCROLL_BEFORE_UPDATE,i,e),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(r.default.events.SCROLL_UPDATE,i,e)}}}]),t}();h.blotName="scroll",h.className="ql-editor",h.tagName="DIV",h.defaultChild="block",h.allowedChildren=[c.default,l.BlockEmbed,p.default],t.default=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),s=h(i(21)),r=h(i(11)),l=h(i(3)),c=h(i(2)),u=h(i(20)),d=h(i(0)),p=h(i(5)),m=h(i(10)),f=h(i(9));function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var v=(0,m.default)("quill:keyboard"),b=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",y=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.bindings={},Object.keys(o.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&o.options.bindings[t]&&o.addBinding(o.options.bindings[t])}),o.addBinding({key:t.keys.ENTER,shiftKey:null},w),o.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},k),o.addBinding({key:t.keys.DELETE},{collapsed:!0},x)):(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},k),o.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},x)),o.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},C),o.addBinding({key:t.keys.DELETE},{collapsed:!1},C),o.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},k),o.listen(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,f.default),a(t,null,[{key:"match",value:function(e,t){return t=$(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(i){return!!t[i]!==e[i]&&null!==t[i]})&&t.key===(e.which||e.keyCode)}}]),a(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=$(e);if(null==o||null==o.key)return v.warn("Attempted to add invalid keyboard binding",o);"function"==typeof t&&(t={handler:t}),"function"==typeof i&&(i={handler:i}),o=(0,l.default)(o,t,i),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(i){if(!i.defaultPrevented){var a=i.which||i.keyCode,s=(e.bindings[a]||[]).filter(function(e){return t.match(i,e)});if(0!==s.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var c=e.quill.getLine(l.index),u=n(c,2),p=u[0],m=u[1],f=e.quill.getLeaf(l.index),h=n(f,2),g=h[0],v=h[1],b=0===l.length?[g,v]:e.quill.getLeaf(l.index+l.length),y=n(b,2),_=y[0],k=y[1],x=g instanceof d.default.Text?g.value().slice(0,v):"",C=_ instanceof d.default.Text?_.value().slice(k):"",w={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:e.quill.getFormat(l),offset:m,prefix:x,suffix:C};s.some(function(t){if(null!=t.collapsed&&t.collapsed!==w.collapsed)return!1;if(null!=t.empty&&t.empty!==w.empty)return!1;if(null!=t.offset&&t.offset!==w.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==w.format[e]}))return!1}else if("object"===o(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=w.format[e]:!1===t.format[e]?null==w.format[e]:(0,r.default)(t.format[e],w.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(w.prefix))&&(!(null!=t.suffix&&!t.suffix.test(w.suffix))&&!0!==t.handler.call(e,l,w))})&&i.preventDefault()}}}})}}]),t}();function _(e,t){var i,o=e===y.keys.LEFT?"prefix":"suffix";return g(i={key:e,shiftKey:t,altKey:null},o,/^$/),g(i,"handler",function(i){var o=i.index;e===y.keys.RIGHT&&(o+=i.length+1);var a=this.quill.getLeaf(o);return!(n(a,1)[0]instanceof d.default.Embed)||(e===y.keys.LEFT?t?this.quill.setSelection(i.index-1,i.length+1,p.default.sources.USER):this.quill.setSelection(i.index-1,p.default.sources.USER):t?this.quill.setSelection(i.index,i.length+1,p.default.sources.USER):this.quill.setSelection(i.index+i.length+1,p.default.sources.USER),!1)}),i}function k(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var i=this.quill.getLine(e.index),o=n(i,1)[0],a={};if(0===t.offset){var s=this.quill.getLine(e.index-1),r=n(s,1)[0];if(null!=r&&r.length()>1){var l=o.formats(),c=this.quill.getFormat(e.index-1,1);a=u.default.attributes.diff(l,c)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,p.default.sources.USER),Object.keys(a).length>0&&this.quill.formatLine(e.index-d,d,a,p.default.sources.USER),this.quill.focus()}}function x(e,t){var i=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-i)){var o={},a=0,s=this.quill.getLine(e.index),r=n(s,1)[0];if(t.offset>=r.length()-1){var l=this.quill.getLine(e.index+1),c=n(l,1)[0];if(c){var d=r.formats(),m=this.quill.getFormat(e.index,1);o=u.default.attributes.diff(d,m)||{},a=c.length()}}this.quill.deleteText(e.index,i,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index+a-1,i,o,p.default.sources.USER)}}function C(e){var t=this.quill.getLines(e),i={};if(t.length>1){var o=t[0].formats(),n=t[t.length-1].formats();i=u.default.attributes.diff(n,o)||{}}this.quill.deleteText(e,p.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index,1,i,p.default.sources.USER),this.quill.setSelection(e.index,p.default.sources.SILENT),this.quill.focus()}function w(e,t){var i=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var o=Object.keys(t.format).reduce(function(e,i){return d.default.query(i,d.default.Scope.BLOCK)&&!Array.isArray(t.format[i])&&(e[i]=t.format[i]),e},{});this.quill.insertText(e.index,"\n",o,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null==o[e]&&(Array.isArray(t.format[e])||"link"!==e&&i.quill.format(e,t.format[e],p.default.sources.USER))})}function S(e){return{key:y.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var i=d.default.query("code-block"),o=t.index,a=t.length,s=this.quill.scroll.descendant(i,o),r=n(s,2),l=r[0],c=r[1];if(null!=l){var u=this.quill.getIndex(l),m=l.newlineIndex(c,!0)+1,f=l.newlineIndex(u+c+a),h=l.domNode.textContent.slice(m,f).split("\n");c=0,h.forEach(function(t,n){e?(l.insertAt(m+c,i.TAB),c+=i.TAB.length,0===n?o+=i.TAB.length:a+=i.TAB.length):t.startsWith(i.TAB)&&(l.deleteAt(m+c,i.TAB.length),c-=i.TAB.length,0===n?o-=i.TAB.length:a-=i.TAB.length),c+=t.length+1}),this.quill.update(p.default.sources.USER),this.quill.setSelection(o,a,p.default.sources.SILENT)}}}}function P(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,i){this.quill.format(e,!i.format[e],p.default.sources.USER)}}}function $(e){if("string"==typeof e||"number"==typeof e)return $({key:e});if("object"===(void 0===e?"undefined":o(e))&&(e=(0,s.default)(e,!1)),"string"==typeof e.key)if(null!=y.keys[e.key.toUpperCase()])e.key=y.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[b]=e.shortKey,delete e.shortKey),e}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:P("bold"),italic:P("italic"),underline:P("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{key:y.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{key:y.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":S(!0),"outdent code-block":S(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:y.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new c.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,p.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,p.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),i=n(t,2),o=i[0],a=i[1],s=(0,l.default)({},o.formats(),{list:"checked"}),r=(new c.default).retain(e.index).insert("\n",s).retain(o.length()-a-1).retain(1,{list:"unchecked"});this.quill.updateContents(r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var i=this.quill.getLine(e.index),o=n(i,2),a=o[0],s=o[1],r=(new c.default).retain(e.index).insert("\n",t.format).retain(a.length()-s-1).retain(1,{header:null});this.quill.updateContents(r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var i=t.prefix.length,o=this.quill.getLine(e.index),a=n(o,2),s=a[0],r=a[1];if(r>i)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(e.index-r).delete(i+1).retain(s.length()-2-r).retain(1,{list:l});this.quill.updateContents(u,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-i,p.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),i=n(t,2),o=i[0],a=i[1],s=(new c.default).retain(e.index+o.length()-a-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,p.default.sources.USER)}},"embed left":_(y.keys.LEFT,!1),"embed left shift":_(y.keys.LEFT,!0),"embed right":_(y.keys.RIGHT,!1),"embed right shift":_(y.keys.RIGHT,!0)}},t.default=y,t.SHORTKEY=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},a=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),s=l(i(0)),r=l(i(7));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.selection=i,o.textNode=document.createTextNode(t.CONTENTS),o.domNode.appendChild(o.textNode),o._length=0,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Embed),a(t,null,[{key:"value",value:function(){}}]),a(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,i){if(0!==this._length)return n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,i);for(var o=this,a=0;null!=o&&o.statics.scope!==s.default.Scope.BLOCK_BLOT;)a+=o.offset(o.parent),o=o.parent;null!=o&&(this._length=t.CONTENTS.length,o.optimize(),o.formatAt(a,t.CONTENTS.length,e,i),this._length=0)}},{key:"index",value:function(e,i){return e===this.textNode?0:n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,i)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,i=this.selection.getNativeRange(),n=void 0,a=void 0,l=void 0;if(null!=i&&i.start.node===e&&i.end.node===e){var c=[e,i.start.offset,i.end.offset];n=c[0],a=c[1],l=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var u=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof r.default?(n=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=t.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(s.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=a){var d=[a,l].map(function(e){return Math.max(0,Math.min(n.data.length,e-1))}),p=o(d,2);return a=p[0],l=p[1],{startNode:n,startOffset:a,endNode:n,endOffset:l}}}}},{key:"update",value:function(e,t){var i=this;if(e.some(function(e){return"characterData"===e.type&&e.target===i.textNode})){var o=this.restore();o&&(t.range=o)}}},{key:"value",value:function(){return""}}]),t}();c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",t.default=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s(i(0)),n=i(4),a=s(n);function s(e){return e&&e.__esModule?e:{default:e}}var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default.Container),t}();r.allowedChildren=[a.default,n.BlockEmbed,r],t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=i(0),s=(o=a)&&o.__esModule?o:{default:o};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Attributor.Style),n(t,[{key:"value",value:function(e){var i=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return i.startsWith("rgb(")?(i=i.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+i.split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join("")):i}}]),t}(),l=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),c=new r("color","color",{scope:s.default.Scope.INLINE});t.ColorAttributor=r,t.ColorClass=l,t.ColorStyle=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=i(6),r=(o=s)&&o.__esModule?o:{default:o};var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default),n(t,[{key:"format",value:function(e,i){if(e!==this.statics.blotName||!i)return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,i);i=this.constructor.sanitize(i),this.domNode.setAttribute("href",i)}}],[{key:"create",value:function(e){var i=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),i.setAttribute("href",e),i.setAttribute("target","_blank"),i}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return c(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}();function c(e,t){var i=document.createElement("a");i.href=e;var o=i.href.slice(0,i.href.indexOf(":"));return t.indexOf(o)>-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=l,t.sanitize=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=r(i(23)),s=r(i(107));function r(e){return e&&e.__esModule?e:{default:e}}var l=0;function c(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var u=function(){function e(t){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){i.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case a.default.keys.ENTER:i.togglePicker();break;case a.default.keys.ESCAPE:i.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return n(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,i=document.createElement("span");return i.tabIndex="0",i.setAttribute("role","button"),i.classList.add("ql-picker-item"),e.hasAttribute("value")&&i.setAttribute("data-value",e.getAttribute("value")),e.textContent&&i.setAttribute("data-label",e.textContent),i.addEventListener("click",function(){t.selectItem(i,!0)}),i.addEventListener("keydown",function(e){switch(e.keyCode){case a.default.keys.ENTER:t.selectItem(i,!0),e.preventDefault();break;case a.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),i}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=s.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(i){var o=e.buildItem(i);t.appendChild(o),!0===i.selected&&e.selectItem(o)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.container.querySelector(".ql-selected");if(e!==i&&(null!=i&&i.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var n=document.createEvent("Event");n.initEvent("change",!0,!0),this.select.dispatchEvent(n)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var i=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",i)}}]),e}();t.default=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=v(i(0)),n=v(i(5)),a=i(4),s=v(a),r=v(i(16)),l=v(i(25)),c=v(i(24)),u=v(i(35)),d=v(i(6)),p=v(i(22)),m=v(i(7)),f=v(i(55)),h=v(i(42)),g=v(i(23));function v(e){return e&&e.__esModule?e:{default:e}}n.default.register({"blots/block":s.default,"blots/block/embed":a.BlockEmbed,"blots/break":r.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":d.default,"blots/scroll":p.default,"blots/text":m.default,"modules/clipboard":f.default,"modules/history":h.default,"modules/keyboard":g.default}),o.default.register(s.default,r.default,c.default,d.default,p.default,m.default),t.default=n.default},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),n=function(){function e(e){this.domNode=e,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return o.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,i,n){var a=this.isolate(e,t);if(null!=o.query(i,o.Scope.BLOT)&&n)a.wrap(i,n);else if(null!=o.query(i,o.Scope.ATTRIBUTE)){var s=o.create(this.statics.scope);a.wrap(s),s.format(i,n)}},e.prototype.insertAt=function(e,t,i){var n=null==i?o.create("text",t):o.create(t,i),a=this.split(e);this.parent.insertBefore(n,a)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var i=null;e.children.insertBefore(this,t),null!=t&&(i=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==i||e.domNode.insertBefore(this.domNode,i),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var i=this.split(e);return i.split(t),i},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var i="string"==typeof e?o.create(e,t):e;return i.replace(this),i},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var i="string"==typeof e?o.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(i,this.next),i.appendChild(this),i},e.blotName="abstract",e}();t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(12),n=i(32),a=i(33),s=i(1),r=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=o.default.keys(this.domNode),i=n.default.keys(this.domNode),r=a.default.keys(this.domNode);t.concat(i).concat(r).forEach(function(t){var i=s.query(t,s.Scope.ATTRIBUTE);i instanceof o.default&&(e.attributes[i.attrName]=i)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(i){var o=t.attributes[i].value(t.domNode);e.format(i,o)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,i){return t[i]=e.attributes[i].value(e.domNode),t},{})},e}();t.default=r},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});function a(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){a(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(a(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(i(12).default);t.default=s},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});function a(e){var t=e.split("-"),i=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+i}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[a(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[a(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[a(this.keyName)];return this.canAdd(e,t)?t:""},t}(i(12).default);t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}();var n=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=i,this.modules={}}return o(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();n.DEFAULTS={modules:{}},n.themes={default:n},t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=s(i(0)),a=s(i(7));function s(e){return e&&e.__esModule?e:{default:e}}var r="\ufeff",l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return i.contentNode=document.createElement("span"),i.contentNode.setAttribute("contenteditable",!1),[].slice.call(i.domNode.childNodes).forEach(function(e){i.contentNode.appendChild(e)}),i.leftGuard=document.createTextNode(r),i.rightGuard=document.createTextNode(r),i.domNode.appendChild(i.leftGuard),i.domNode.appendChild(i.contentNode),i.domNode.appendChild(i.rightGuard),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default.Embed),o(t,[{key:"index",value:function(e,i){return e===this.leftGuard?0:e===this.rightGuard?1:function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,i)}},{key:"restore",value:function(e){var t=void 0,i=void 0,o=e.data.split(r).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var s=this.prev.length();this.prev.insertAt(s,o),t={startNode:this.prev.domNode,startOffset:s+o.length}}else i=document.createTextNode(o),this.parent.insertBefore(n.default.create(i),this),t={startNode:i,startOffset:o.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,o),t={startNode:this.next.domNode,startOffset:o.length}):(i=document.createTextNode(o),this.parent.insertBefore(n.default.create(i),this.next),t={startNode:i,startOffset:o.length}));return e.data=r,t}},{key:"update",value:function(e,t){var i=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===i.leftGuard||e.target===i.rightGuard)){var o=i.restore(e.target);o&&(t.range=o)}})}}]),t}();t.default=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var o,n=i(0),a=(o=n)&&o.__esModule?o:{default:o};var s={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},r=new a.default.Attributor.Attribute("align","align",s),l=new a.default.Attributor.Class("align","ql-align",s),c=new a.default.Attributor.Style("align","text-align",s);t.AlignAttribute=r,t.AlignClass=l,t.AlignStyle=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var o,n=i(0),a=(o=n)&&o.__esModule?o:{default:o},s=i(26);var r=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),l=new s.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});t.BackgroundClass=r,t.BackgroundStyle=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var o,n=i(0),a=(o=n)&&o.__esModule?o:{default:o};var s={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},r=new a.default.Attributor.Attribute("direction","dir",s),l=new a.default.Attributor.Class("direction","ql-direction",s),c=new a.default.Attributor.Style("direction","direction",s);t.DirectionAttribute=r,t.DirectionClass=l,t.DirectionStyle=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=i(0),s=(o=a)&&o.__esModule?o:{default:o};var r={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},l=new s.default.Attributor.Class("font","ql-font",r),c=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default.Attributor.Style),n(t,[{key:"value",value:function(e){return function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}())("font","font-family",r);t.FontStyle=c,t.FontClass=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var o,n=i(0),a=(o=n)&&o.__esModule?o:{default:o};var s=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),r=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=s,t.SizeStyle=r},function(e,t,i){"use strict";e.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=r(i(0)),a=r(i(5)),s=r(i(9));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.lastRecorded=0,o.ignoreChange=!1,o.clear(),o.quill.on(a.default.events.EDITOR_CHANGE,function(e,t,i,n){e!==a.default.events.TEXT_CHANGE||o.ignoreChange||(o.options.userOnly&&n!==a.default.sources.USER?o.transform(t):o.record(t,i))}),o.quill.keyboard.addBinding({key:"Z",shortKey:!0},o.undo.bind(o)),o.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},o.redo.bind(o)),/Win/i.test(navigator.platform)&&o.quill.keyboard.addBinding({key:"Y",shortKey:!0},o.redo.bind(o)),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),o(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var i=this.stack[e].pop();this.stack[t].push(i),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i[e],a.default.sources.USER),this.ignoreChange=!1;var o=c(i[e]);this.quill.setSelection(o)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var i=this.quill.getContents().diff(t),o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){var n=this.stack.undo.pop();i=i.compose(n.undo),e=n.redo.compose(e)}else this.lastRecorded=o;this.stack.undo.push({redo:e,undo:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}();function c(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),i=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=n.default.query(e,n.default.Scope.BLOCK)}))}(e)&&(i-=1),i}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=l,t.getLastChangeIndex=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=m(i(3)),a=m(i(2)),s=m(i(8)),r=m(i(23)),l=m(i(34)),c=m(i(59)),u=m(i(60)),d=m(i(28)),p=m(i(61));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],y=[!1,"serif","monospace"],_=["1","2","3",!1],k=["small",!1,"large","huge"],x=function(e){function t(e,i){f(this,t);var o=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return e.emitter.listenDOM("click",document.body,function t(i){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==o.tooltip||o.tooltip.root.contains(i.target)||document.activeElement===o.tooltip.textbox||o.quill.hasFocus()||o.tooltip.hide(),null!=o.pickers&&o.pickers.forEach(function(e){e.container.contains(i.target)||e.close()})}),o}return g(t,l.default),o(t,[{key:"addModule",value:function(e){var i=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(i),i}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(i){if(i.startsWith("ql-")&&(i=i.slice("ql-".length),null!=t[i]))if("direction"===i)e.innerHTML=t[i][""]+t[i].rtl;else if("string"==typeof t[i])e.innerHTML=t[i];else{var o=e.value||"";null!=o&&t[i][o]&&(e.innerHTML=t[i][o])}})})}},{key:"buildPickers",value:function(e,t){var i=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&w(e,v),new u.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var i=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&w(e,b,"background"===i?"#ffffff":"#000000"),new c.default(e,t[i])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?w(e,y):e.classList.contains("ql-header")?w(e,_):e.classList.contains("ql-size")&&w(e,k)),new d.default(e)});this.quill.on(s.default.events.EDITOR_CHANGE,function(){i.pickers.forEach(function(e){e.update()})})}}]),t}();x.DEFAULTS=(0,n.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var i=new FileReader;i.onload=function(i){var o=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(o.index).delete(o.length).insert({image:i.target.result}),s.default.sources.USER),e.quill.setSelection(o.index+1,s.default.sources.SILENT),t.value=""},i.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var C=function(e){function t(e,i){f(this,t);var o=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.textbox=o.root.querySelector('input[type="text"]'),o.listen(),o}return g(t,p.default),o(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){r.default.match(t,"enter")?(e.save(),t.preventDefault()):r.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,s.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=function(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(t)return(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0";if(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/";return e}(e);case"formula":if(!e)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),e,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",s.default.sources.USER),this.quill.setSelection(o+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}();function w(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var o=document.createElement("option");t===i?o.setAttribute("selected","selected"):o.setAttribute("value",t),e.appendChild(o)})}t.BaseTooltip=C,t.default=x},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,i=this.iterator();t=i();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,i=this.head;null!=i;){if(i===e)return t;t+=i.length(),i=i.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var i,o=this.iterator();i=o();){var n=i.length();if(e<n||t&&e===n&&(null==i.next||0!==i.next.length()))return[i,e];e-=n}return[null,0]},e.prototype.forEach=function(e){for(var t,i=this.iterator();t=i();)e(t)},e.prototype.forEachAt=function(e,t,i){if(!(t<=0))for(var o,n=this.find(e),a=n[0],s=e-n[1],r=this.iterator(a);(o=r())&&s<e+t;){var l=o.length();e>s?i(o,e-s,Math.min(t,s+l-e)):i(o,0,Math.min(l,e+t-s)),s+=l}},e.prototype.map=function(e){return this.reduce(function(t,i){return t.push(e(i)),t},[])},e.prototype.reduce=function(e,t){for(var i,o=this.iterator();i=o();)t=e(t,i);return t},e}();t.default=o},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(17),s=i(1),r={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(e){function t(t){var i=e.call(this,t)||this;return i.scroll=i,i.observer=new MutationObserver(function(e){i.update(e)}),i.observer.observe(i.domNode,r),i.attach(),i}return n(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,i){this.update(),0===t&&i===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,i)},t.prototype.formatAt=function(t,i,o,n){this.update(),e.prototype.formatAt.call(this,t,i,o,n)},t.prototype.insertAt=function(t,i,o){this.update(),e.prototype.insertAt.call(this,t,i,o)},t.prototype.optimize=function(t,i){var o=this;void 0===t&&(t=[]),void 0===i&&(i={}),e.prototype.optimize.call(this,i);for(var n=[].slice.call(this.observer.takeRecords());n.length>0;)t.push(n.pop());for(var r=function(e,t){void 0===t&&(t=!0),null!=e&&e!==o&&null!=e.domNode.parentNode&&(null==e.domNode[s.DATA_KEY].mutations&&(e.domNode[s.DATA_KEY].mutations=[]),t&&r(e.parent))},l=function(e){null!=e.domNode[s.DATA_KEY]&&null!=e.domNode[s.DATA_KEY].mutations&&(e instanceof a.default&&e.children.forEach(l),e.optimize(i))},c=t,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(e){var t=s.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(r(s.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=s.find(e,!1);r(t,!1),t instanceof a.default&&t.children.forEach(function(e){r(e,!1)})})):"attributes"===e.type&&r(t.prev)),r(t))}),this.children.forEach(l),n=(c=[].slice.call(this.observer.takeRecords())).slice();n.length>0;)t.push(n.pop())}},t.prototype.update=function(t,i){var o=this;void 0===i&&(i={}),(t=t||this.observer.takeRecords()).map(function(e){var t=s.find(e.target,!0);return null==t?null:null==t.domNode[s.DATA_KEY].mutations?(t.domNode[s.DATA_KEY].mutations=[e],t):(t.domNode[s.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==o&&null!=e.domNode[s.DATA_KEY]&&e.update(e.domNode[s.DATA_KEY].mutations||[],i)}),null!=this.domNode[s.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,i),this.optimize(t,i)},t.blotName="scroll",t.defaultChild="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="DIV",t}(a.default);t.default=l},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(18),s=i(1);var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.formats=function(i){if(i.tagName!==t.tagName)return e.formats.call(this,i)},t.prototype.format=function(i,o){var n=this;i!==this.statics.blotName||o?e.prototype.format.call(this,i,o):(this.children.forEach(function(e){e instanceof a.default||(e=e.wrap(t.blotName,!0)),n.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,i,o,n){null!=this.formats()[o]||s.query(o,s.Scope.ATTRIBUTE)?this.isolate(t,i).format(o,n):e.prototype.formatAt.call(this,t,i,o,n)},t.prototype.optimize=function(i){e.prototype.optimize.call(this,i);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var n=this.next;n instanceof t&&n.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(e[i]!==t[i])return!1;return!0}(o,n.formats())&&(n.moveChildren(this),n.remove())},t.blotName="inline",t.scope=s.Scope.INLINE_BLOT,t.tagName="SPAN",t}(a.default);t.default=r},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(18),s=i(1),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.formats=function(i){var o=s.query(t.blotName).tagName;if(i.tagName!==o)return e.formats.call(this,i)},t.prototype.format=function(i,o){null!=s.query(i,s.Scope.BLOCK)&&(i!==this.statics.blotName||o?e.prototype.format.call(this,i,o):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,i,o,n){null!=s.query(o,s.Scope.BLOCK)?this.format(o,n):e.prototype.formatAt.call(this,t,i,o,n)},t.prototype.insertAt=function(t,i,o){if(null==o||null!=s.query(i,s.Scope.INLINE))e.prototype.insertAt.call(this,t,i,o);else{var n=this.split(t),a=s.create(i,o);n.parent.insertBefore(a,n)}},t.prototype.update=function(t,i){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,i)},t.blotName="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="P",t}(a.default);t.default=r},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.formats=function(e){},t.prototype.format=function(t,i){e.prototype.formatAt.call(this,0,this.length(),t,i)},t.prototype.formatAt=function(t,i,o,n){0===t&&i===this.length()?this.format(o,n):e.prototype.formatAt.call(this,t,i,o,n)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(i(19).default);t.default=a},function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(19),s=i(1),r=function(e){function t(t){var i=e.call(this,t)||this;return i.text=i.statics.value(i.domNode),i}return n(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,i,o){null==o?(this.text=this.text.slice(0,t)+i+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,i,o)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(i){e.prototype.optimize.call(this,i),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var i=s.create(this.domNode.splitText(e));return this.parent.insertBefore(i,this.next),this.text=this.statics.value(this.domNode),i},t.prototype.update=function(e,t){var i=this;e.some(function(e){return"characterData"===e.type&&e.target===i.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=s.Scope.INLINE_BLOT,t}(a.default);t.default=r},function(e,t,i){"use strict";var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:n.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;var o=i.indexOf(e,t);return-1!==o&&o===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,i=Object(this),o=i.length>>>0,n=arguments[1],a=0;a<o;a++)if(t=i[a],e.call(n,t,a,i))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){var i=-1,o=1,n=0;function a(e,t,c){if(e==t)return e?[[n,e]]:[];(c<0||e.length<c)&&(c=null);var d=r(e,t),p=e.substring(0,d);d=l(e=e.substring(d),t=t.substring(d));var m=e.substring(e.length-d),f=function(e,t){var c;if(!e)return[[o,t]];if(!t)return[[i,e]];var u=e.length>t.length?e:t,d=e.length>t.length?t:e,p=u.indexOf(d);if(-1!=p)return c=[[o,u.substring(0,p)],[n,d],[o,u.substring(p+d.length)]],e.length>t.length&&(c[0][0]=c[2][0]=i),c;if(1==d.length)return[[i,e],[o,t]];var m=function(e,t){var i=e.length>t.length?e:t,o=e.length>t.length?t:e;if(i.length<4||2*o.length<i.length)return null;function n(e,t,i){for(var o,n,a,s,c=e.substring(i,i+Math.floor(e.length/4)),u=-1,d="";-1!=(u=t.indexOf(c,u+1));){var p=r(e.substring(i),t.substring(u)),m=l(e.substring(0,i),t.substring(0,u));d.length<m+p&&(d=t.substring(u-m,u)+t.substring(u,u+p),o=e.substring(0,i-m),n=e.substring(i+p),a=t.substring(0,u-m),s=t.substring(u+p))}return 2*d.length>=e.length?[o,n,a,s,d]:null}var a,s,c,u,d,p=n(i,o,Math.ceil(i.length/4)),m=n(i,o,Math.ceil(i.length/2));if(!p&&!m)return null;a=m?p&&p[4].length>m[4].length?p:m:p;e.length>t.length?(s=a[0],c=a[1],u=a[2],d=a[3]):(u=a[0],d=a[1],s=a[2],c=a[3]);var f=a[4];return[s,c,u,d,f]}(e,t);if(m){var f=m[0],h=m[1],g=m[2],v=m[3],b=m[4],y=a(f,g),_=a(h,v);return y.concat([[n,b]],_)}return function(e,t){for(var n=e.length,a=t.length,r=Math.ceil((n+a)/2),l=r,c=2*r,u=new Array(c),d=new Array(c),p=0;p<c;p++)u[p]=-1,d[p]=-1;u[l+1]=0,d[l+1]=0;for(var m=n-a,f=m%2!=0,h=0,g=0,v=0,b=0,y=0;y<r;y++){for(var _=-y+h;_<=y-g;_+=2){for(var k=l+_,x=($=_==-y||_!=y&&u[k-1]<u[k+1]?u[k+1]:u[k-1]+1)-_;$<n&&x<a&&e.charAt($)==t.charAt(x);)$++,x++;if(u[k]=$,$>n)g+=2;else if(x>a)h+=2;else if(f){var C=l+m-_;if(C>=0&&C<c&&-1!=d[C]){var w=n-d[C];if($>=w)return s(e,t,$,x)}}}for(var S=-y+v;S<=y-b;S+=2){for(var C=l+S,P=(w=S==-y||S!=y&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1)-S;w<n&&P<a&&e.charAt(n-w-1)==t.charAt(a-P-1);)w++,P++;if(d[C]=w,w>n)b+=2;else if(P>a)v+=2;else if(!f){var k=l+m-S;if(k>=0&&k<c&&-1!=u[k]){var $=u[k],x=l+$-k;if($>=(w=n-w))return s(e,t,$,x)}}}}return[[i,e],[o,t]]}(e,t)}(e=e.substring(0,e.length-d),t=t.substring(0,t.length-d));return p&&f.unshift([n,p]),m&&f.push([n,m]),function e(t){t.push([n,""]);var a=0;var s=0;var c=0;var u="";var d="";var p;for(;a<t.length;)switch(t[a][0]){case o:c++,d+=t[a][1],a++;break;case i:s++,u+=t[a][1],a++;break;case n:s+c>1?(0!==s&&0!==c&&(0!==(p=r(d,u))&&(a-s-c>0&&t[a-s-c-1][0]==n?t[a-s-c-1][1]+=d.substring(0,p):(t.splice(0,0,[n,d.substring(0,p)]),a++),d=d.substring(p),u=u.substring(p)),0!==(p=l(d,u))&&(t[a][1]=d.substring(d.length-p)+t[a][1],d=d.substring(0,d.length-p),u=u.substring(0,u.length-p))),0===s?t.splice(a-c,s+c,[o,d]):0===c?t.splice(a-s,s+c,[i,u]):t.splice(a-s-c,s+c,[i,u],[o,d]),a=a-s-c+(s?1:0)+(c?1:0)+1):0!==a&&t[a-1][0]==n?(t[a-1][1]+=t[a][1],t.splice(a,1)):a++,c=0,s=0,u="",d=""}""===t[t.length-1][1]&&t.pop();var m=!1;a=1;for(;a<t.length-1;)t[a-1][0]==n&&t[a+1][0]==n&&(t[a][1].substring(t[a][1].length-t[a-1][1].length)==t[a-1][1]?(t[a][1]=t[a-1][1]+t[a][1].substring(0,t[a][1].length-t[a-1][1].length),t[a+1][1]=t[a-1][1]+t[a+1][1],t.splice(a-1,1),m=!0):t[a][1].substring(0,t[a+1][1].length)==t[a+1][1]&&(t[a-1][1]+=t[a+1][1],t[a][1]=t[a][1].substring(t[a+1][1].length)+t[a+1][1],t.splice(a+1,1),m=!0)),a++;m&&e(t)}(f),null!=c&&(f=function(e,t){var o=function(e,t){if(0===t)return[n,e];for(var o=0,a=0;a<e.length;a++){var s=e[a];if(s[0]===i||s[0]===n){var r=o+s[1].length;if(t===r)return[a+1,e];if(t<r){e=e.slice();var l=t-o,c=[s[0],s[1].slice(0,l)],u=[s[0],s[1].slice(l)];return e.splice(a,1,c,u),[a+1,e]}o=r}}throw new Error("cursor_pos is out of bounds!")}(e,t),a=o[1],s=o[0],r=a[s],l=a[s+1];if(null==r)return e;if(r[0]!==n)return e;if(null!=l&&r[1]+l[1]===l[1]+r[1])return a.splice(s,2,l,r),u(a,s,2);if(null!=l&&0===l[1].indexOf(r[1])){a.splice(s,2,[l[0],r[1]],[0,r[1]]);var c=l[1].slice(r[1].length);return c.length>0&&a.splice(s+2,0,[l[0],c]),u(a,s,3)}return e}(f,c)),f=function(e){for(var t=!1,a=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},s=2;s<e.length;s+=1)e[s-2][0]===n&&((r=e[s-2][1]).charCodeAt(r.length-1)>=55296&&r.charCodeAt(r.length-1)<=56319)&&e[s-1][0]===i&&a(e[s-1][1])&&e[s][0]===o&&a(e[s][1])&&(t=!0,e[s-1][1]=e[s-2][1].slice(-1)+e[s-1][1],e[s][1]=e[s-2][1].slice(-1)+e[s][1],e[s-2][1]=e[s-2][1].slice(0,-1));var r;if(!t)return e;for(var l=[],s=0;s<e.length;s+=1)e[s][1].length>0&&l.push(e[s]);return l}(f)}function s(e,t,i,o){var n=e.substring(0,i),s=t.substring(0,o),r=e.substring(i),l=t.substring(o),c=a(n,s),u=a(r,l);return c.concat(u)}function r(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var i=0,o=Math.min(e.length,t.length),n=o,a=0;i<n;)e.substring(a,n)==t.substring(a,n)?a=i=n:o=n,n=Math.floor((o-i)/2+i);return n}function l(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var i=0,o=Math.min(e.length,t.length),n=o,a=0;i<n;)e.substring(e.length-n,e.length-a)==t.substring(t.length-n,t.length-a)?a=i=n:o=n,n=Math.floor((o-i)/2+i);return n}var c=a;function u(e,t,i){for(var o=t+i-1;o>=0&&o>=t-1;o--)if(o+1<e.length){var n=e[o],a=e[o+1];n[0]===a[1]&&e.splice(o,2,[n[0],n[1]+a[1]])}return e}c.INSERT=o,c.DELETE=i,c.EQUAL=n,e.exports=c},function(e,t){function i(e){var t=[];for(var i in e)t.push(i);return t}(e.exports="function"==typeof Object.keys?Object.keys:i).shim=i},function(e,t){var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function o(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function n(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=i?o:n).supported=o,t.unsupported=n},function(e,t){"use strict";var i=Object.prototype.hasOwnProperty,o="~";function n(){}function a(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(o=!1)),s.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)i.call(e,t)&&n.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},s.prototype.listeners=function(e,t){var i=o?o+e:e,n=this._events[i];if(t)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var a=0,s=n.length,r=new Array(s);a<s;a++)r[a]=n[a].fn;return r},s.prototype.emit=function(e,t,i,n,a,s){var r=o?o+e:e;if(!this._events[r])return!1;var l,c,u=this._events[r],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,i),!0;case 4:return u.fn.call(u.context,t,i,n),!0;case 5:return u.fn.call(u.context,t,i,n,a),!0;case 6:return u.fn.call(u.context,t,i,n,a,s),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,m=u.length;for(c=0;c<m;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,i);break;case 4:u[c].fn.call(u[c].context,t,i,n);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,i){var n=new a(t,i||this),s=o?o+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],n]:this._events[s].push(n):(this._events[s]=n,this._eventsCount++),this},s.prototype.once=function(e,t,i){var n=new a(t,i||this,!0),s=o?o+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],n]:this._events[s].push(n):(this._events[s]=n,this._eventsCount++),this},s.prototype.removeListener=function(e,t,i,a){var s=o?o+e:e;if(!this._events[s])return this;if(!t)return 0==--this._eventsCount?this._events=new n:delete this._events[s],this;var r=this._events[s];if(r.fn)r.fn!==t||a&&!r.once||i&&r.context!==i||(0==--this._eventsCount?this._events=new n:delete this._events[s]);else{for(var l=0,c=[],u=r.length;l<u;l++)(r[l].fn!==t||a&&!r[l].once||i&&r[l].context!==i)&&c.push(r[l]);c.length?this._events[s]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new n:delete this._events[s]}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new n:delete this._events[t])):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,void 0!==e&&(e.exports=s)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),s=y(i(3)),r=y(i(2)),l=y(i(0)),c=y(i(5)),u=y(i(10)),d=y(i(9)),p=i(36),m=i(37),f=y(i(13)),h=i(26),g=i(38),v=i(39),b=i(40);function y(e){return e&&e.__esModule?e:{default:e}}function _(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var k=(0,u.default)("quill:clipboard"),x="__ql-matcher",C=[[Node.TEXT_NODE,F],[Node.TEXT_NODE,I],["br",function(e,t){E(t,"\n")||t.insert("\n");return t}],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,A],[Node.ELEMENT_NODE,function(e,t){var i={},o=e.style||{};o.fontStyle&&"italic"===T(e).fontStyle&&(i.italic=!0);o.fontWeight&&(T(e).fontWeight.startsWith("bold")||parseInt(T(e).fontWeight)>=700)&&(i.bold=!0);Object.keys(i).length>0&&(t=$(t,i));parseFloat(o.textIndent||0)>0&&(t=(new r.default).insert("\t").concat(t));return t}],["li",function(e,t){var i=l.default.query(e);if(null==i||"list-item"!==i.blotName||!E(t,"\n"))return t;var o=-1,n=e.parentNode;for(;!n.classList.contains("ql-clipboard");)"list"===(l.default.query(n)||{}).blotName&&(o+=1),n=n.parentNode;return o<=0?t:t.compose((new r.default).retain(t.length()-1).retain(1,{indent:o}))}],["b",D.bind(D,"bold")],["i",D.bind(D,"italic")],["style",function(){return new r.default}]],w=[p.AlignAttribute,g.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),S=[p.AlignStyle,m.BackgroundStyle,h.ColorStyle,g.DirectionStyle,v.FontStyle,b.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),P=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.quill.root.addEventListener("paste",o.onPaste.bind(o)),o.container=o.quill.addContainer("ql-clipboard"),o.container.setAttribute("contenteditable",!0),o.container.setAttribute("tabindex",-1),o.matchers=[],C.concat(o.options.matchers).forEach(function(e){var t=n(e,2),a=t[0],s=t[1];(i.matchVisual||s!==L)&&o.addMatcher(a,s)}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d.default),a(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[f.default.blotName]){var i=this.container.innerText;return this.container.innerHTML="",(new r.default).insert(i,_({},f.default.blotName,t[f.default.blotName]))}var o=this.prepareMatching(),a=n(o,2),s=a[0],l=a[1],c=function e(t,i,o){return t.nodeType===t.TEXT_NODE?o.reduce(function(e,i){return i(t,e)},new r.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(n,a){var s=e(a,i,o);return a.nodeType===t.ELEMENT_NODE&&(s=i.reduce(function(e,t){return t(a,e)},s),s=(a[x]||[]).reduce(function(e,t){return t(a,e)},s)),n.concat(s)},new r.default):new r.default}(this.container,s,l);return E(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new r.default).retain(c.length()-1).delete(1))),k.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,c.default.sources.SILENT);else{var o=this.convert(t);this.quill.updateContents((new r.default).retain(e).concat(o),i),this.quill.setSelection(e+o.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var i=this.quill.getSelection(),o=(new r.default).retain(i.index),n=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout(function(){o=o.concat(t.convert()).delete(i.length),t.quill.updateContents(o,c.default.sources.USER),t.quill.setSelection(o.length()-i.length,c.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=n,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],i=[];return this.matchers.forEach(function(o){var a=n(o,2),s=a[0],r=a[1];switch(s){case Node.TEXT_NODE:i.push(r);break;case Node.ELEMENT_NODE:t.push(r);break;default:[].forEach.call(e.container.querySelectorAll(s),function(e){e[x]=e[x]||[],e[x].push(r)})}}),[t,i]}}]),t}();function $(e,t,i){return"object"===(void 0===t?"undefined":o(t))?Object.keys(t).reduce(function(e,i){return $(e,i,t[i])},e):e.reduce(function(e,o){return o.attributes&&o.attributes[t]?e.push(o):e.insert(o.insert,(0,s.default)({},_({},t,i),o.attributes))},new r.default)}function T(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};return e["__ql-computed-style"]||(e["__ql-computed-style"]=window.getComputedStyle(e))}function E(e,t){for(var i="",o=e.ops.length-1;o>=0&&i.length<t.length;--o){var n=e.ops[o];if("string"!=typeof n.insert)break;i=n.insert+i}return i.slice(-1*t.length)===t}function O(e){if(0===e.childNodes.length)return!1;var t=T(e);return["block","list-item"].indexOf(t.display)>-1}function D(e,t,i){return $(i,e,!0)}function A(e,t){var i=l.default.Attributor.Attribute.keys(e),o=l.default.Attributor.Class.keys(e),n=l.default.Attributor.Style.keys(e),a={};return i.concat(o).concat(n).forEach(function(t){var i=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=i&&(a[i.attrName]=i.value(e),a[i.attrName])||(null==(i=w[t])||i.attrName!==t&&i.keyName!==t||(a[i.attrName]=i.value(e)||void 0),null==(i=S[t])||i.attrName!==t&&i.keyName!==t||(i=S[t],a[i.attrName]=i.value(e)||void 0))}),Object.keys(a).length>0&&(t=$(t,a)),t}function N(e,t){var i=l.default.query(e);if(null==i)return t;if(i.prototype instanceof l.default.Embed){var o={},n=i.value(e);null!=n&&(o[i.blotName]=n,t=(new r.default).insert(o,i.formats(e)))}else"function"==typeof i.formats&&(t=$(t,i.blotName,i.formats(e)));return t}function I(e,t){return E(t,"\n")||(O(e)||t.length()>0&&e.nextSibling&&O(e.nextSibling))&&t.insert("\n"),t}function L(e,t){if(O(e)&&null!=e.nextElementSibling&&!E(t,"\n\n")){var i=e.offsetHeight+parseFloat(T(e).marginTop)+parseFloat(T(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*i&&t.insert("\n")}return t}function F(e,t){var i=e.data;if("O:P"===e.parentNode.tagName)return t.insert(i.trim());if(0===i.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!T(e.parentNode).whiteSpace.startsWith("pre")){var o=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};i=(i=i.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==e.previousSibling&&O(e.parentNode)||null!=e.previousSibling&&O(e.previousSibling))&&(i=i.replace(/^\s+/,o.bind(o,!1))),(null==e.nextSibling&&O(e.parentNode)||null!=e.nextSibling&&O(e.nextSibling))&&(i=i.replace(/\s+$/,o.bind(o,!1)))}return t.insert(i)}P.DEFAULTS={matchers:[],matchVisual:!0},t.default=P,t.matchAttributor=A,t.matchBlot=N,t.matchNewline=I,t.matchSpacing=L,t.matchText=F},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=i(6),r=(o=s)&&o.__esModule?o:{default:o};var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default),n(t,[{key:"optimize",value:function(e){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}();l.blotName="bold",l.tagName=["STRONG","B"],t.default=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=u(i(2)),s=u(i(0)),r=u(i(5)),l=u(i(10)),c=u(i(9));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=(0,l.default)("quill:toolbar"),m=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n,a=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));if(Array.isArray(a.options.container)){var s=document.createElement("div");h(s,a.options.container),e.container.parentNode.insertBefore(s,e.container),a.container=s}else"string"==typeof a.options.container?a.container=document.querySelector(a.options.container):a.container=a.options.container;return a.container instanceof HTMLElement?(a.container.classList.add("ql-toolbar"),a.controls=[],a.handlers={},Object.keys(a.options.handlers).forEach(function(e){a.addHandler(e,a.options.handlers[e])}),[].forEach.call(a.container.querySelectorAll("button, select"),function(e){a.attach(e)}),a.quill.on(r.default.events.EDITOR_CHANGE,function(e,t){e===r.default.events.SELECTION_CHANGE&&a.update(t)}),a.quill.on(r.default.events.SCROLL_OPTIMIZE,function(){var e=a.quill.selection.getRange(),t=o(e,1)[0];a.update(t)}),a):(n=p.error("Container required for toolbar",a.options),d(a,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,c.default),n(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,i=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(i){if(i=i.slice("ql-".length),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[i]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[i])return void p.warn("ignoring attaching to disabled format",i,e);if(null==s.default.query(i))return void p.warn("ignoring attaching to nonexistent format",i,e)}var n="SELECT"===e.tagName?"change":"click";e.addEventListener(n,function(n){var l=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var c=e.options[e.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),n.preventDefault();t.quill.focus();var u=t.quill.selection.getRange(),d=o(u,1)[0];if(null!=t.handlers[i])t.handlers[i].call(t,l);else if(s.default.query(i).prototype instanceof s.default.Embed){if(!(l=prompt("Enter "+i)))return;t.quill.updateContents((new a.default).retain(d.index).delete(d.length).insert(function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}({},i,l)),r.default.sources.USER)}else t.quill.format(i,l,r.default.sources.USER);t.update(d)}),this.controls.push([i,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(i){var n=o(i,2),a=n[0],s=n[1];if("SELECT"===s.tagName){var r=void 0;if(null==e)r=null;else if(null==t[a])r=s.querySelector("option[selected]");else if(!Array.isArray(t[a])){var l=t[a];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),r=s.querySelector('option[value="'+l+'"]')}null==r?(s.value="",s.selectedIndex=-1):r.selected=!0}else if(null==e)s.classList.remove("ql-active");else if(s.hasAttribute("value")){var c=t[a]===s.getAttribute("value")||null!=t[a]&&t[a].toString()===s.getAttribute("value")||null==t[a]&&!s.getAttribute("value");s.classList.toggle("ql-active",c)}else s.classList.toggle("ql-active",null!=t[a])})}}]),t}();function f(e,t,i){var o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("ql-"+t),null!=i&&(o.value=i),e.appendChild(o)}function h(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var i=document.createElement("span");i.classList.add("ql-formats"),t.forEach(function(e){if("string"==typeof e)f(i,e);else{var t=Object.keys(e)[0],o=e[t];Array.isArray(o)?function(e,t,i){var o=document.createElement("select");o.classList.add("ql-"+t),i.forEach(function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),o.appendChild(t)}),e.appendChild(o)}(i,t,o):f(i,t,o)}}),e.appendChild(i)})}m.DEFAULTS={},m.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var i=this.quill.getFormat();Object.keys(i).forEach(function(t){null!=s.default.query(t,s.default.Scope.INLINE)&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,r.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",r.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,r.default.sources.USER),this.quill.format("direction",e,r.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),i=this.quill.getFormat(t),o=parseInt(i.indent||0);if("+1"===e||"-1"===e){var n="+1"===e?1:-1;"rtl"===i.direction&&(n*=-1),this.quill.format("indent",o+n,r.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,r.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),i=this.quill.getFormat(t);"check"===e?"checked"===i.list||"unchecked"===i.list?this.quill.format("list",!1,r.default.sources.USER):this.quill.format("list","unchecked",r.default.sources.USER):this.quill.format("list",e,r.default.sources.USER)}}},t.default=m,t.addControls=h},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=i(28),r=(o=s)&&o.__esModule?o:{default:o};var l=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.label.innerHTML=i,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default),n(t,[{key:"buildItem",value:function(e){var i=a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return i.style.backgroundColor=e.getAttribute("value")||"",i}},{key:"selectItem",value:function(e,i){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,i);var o=this.label.querySelector(".ql-color-label"),n=e&&e.getAttribute("data-value")||"";o&&("line"===o.tagName?o.style.stroke=n:o.style.fill=n)}}]),t}();t.default=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=i(28),s=(o=a)&&o.__esModule?o:{default:o};var r=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=i[e.getAttribute("data-value")||""]}),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,[{key:"selectItem",value:function(e,i){(function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,i),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}();t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}();var n=function(){function e(t,i){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=i||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){o.root.style.marginTop=-1*o.quill.root.scrollTop+"px"}),this.hide()}return o(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,i=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=i+"px",this.root.classList.remove("ql-flip");var o=this.boundsContainer.getBoundingClientRect(),n=this.root.getBoundingClientRect(),a=0;if(n.right>o.right&&(a=o.right-n.right,this.root.style.left=t+a+"px"),n.left<o.left&&(a=o.left-n.left,this.root.style.left=t+a+"px"),n.bottom>o.bottom){var s=n.bottom-n.top,r=e.bottom-e.top+s;this.root.style.top=i-r+"px",this.root.classList.add("ql-flip")}return a}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},a=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),s=m(i(3)),r=m(i(8)),l=i(43),c=m(l),u=m(i(27)),d=i(15),p=m(i(41));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],b=function(e){function t(e,i){f(this,t),null!=i.modules.toolbar&&null==i.modules.toolbar.container&&(i.modules.toolbar.container=v);var o=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.quill.container.classList.add("ql-snow"),o}return g(t,c.default),a(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),p.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,i){e.handlers.link.call(e,!i.format.link)})}}]),t}();b.DEFAULTS=(0,s.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var i=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(i)&&0!==i.indexOf("mailto:")&&(i="mailto:"+i),this.quill.theme.tooltip.edit("link",i)}else this.quill.format("link",!1)}}}}});var y=function(e){function t(e,i){f(this,t);var o=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.preview=o.root.querySelector("a.ql-preview"),o}return g(t,l.BaseTooltip),a(t,[{key:"listen",value:function(){var e=this;n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var i=e.linkRange;e.restoreFocus(),e.quill.formatText(i,"link",!1,r.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(r.default.events.SELECTION_CHANGE,function(t,i,n){if(null!=t){if(0===t.length&&n===r.default.sources.USER){var a=e.quill.scroll.descendant(u.default,t.index),s=o(a,2),l=s[0],c=s[1];if(null!=l){e.linkRange=new d.Range(t.index-c,l.length());var p=u.default.formats(l.domNode);return e.preview.textContent=p,e.preview.setAttribute("href",p),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}();y.TEMPLATE=['<a class="ql-preview" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=L(i(29)),n=i(36),a=i(38),s=i(64),r=L(i(65)),l=L(i(66)),c=i(67),u=L(c),d=i(37),p=i(26),m=i(39),f=i(40),h=L(i(56)),g=L(i(68)),v=L(i(27)),b=L(i(69)),y=L(i(70)),_=L(i(71)),k=L(i(72)),x=L(i(73)),C=i(13),w=L(C),S=L(i(74)),P=L(i(75)),$=L(i(57)),T=L(i(41)),E=L(i(28)),O=L(i(59)),D=L(i(60)),A=L(i(61)),N=L(i(108)),I=L(i(62));function L(e){return e&&e.__esModule?e:{default:e}}o.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":n.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":m.FontClass,"attributors/class/size":f.SizeClass,"attributors/style/align":n.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":m.FontStyle,"attributors/style/size":f.SizeStyle},!0),o.default.register({"formats/align":n.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":m.FontClass,"formats/size":f.SizeClass,"formats/blockquote":r.default,"formats/code-block":w.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":h.default,"formats/code":C.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":b.default,"formats/strike":y.default,"formats/underline":_.default,"formats/image":k.default,"formats/video":x.default,"formats/list/item":c.ListItem,"modules/formula":S.default,"modules/syntax":P.default,"modules/toolbar":$.default,"themes/bubble":N.default,"themes/snow":I.default,"ui/icons":T.default,"ui/picker":E.default,"ui/icon-picker":D.default,"ui/color-picker":O.default,"ui/tooltip":A.default},!0),t.default=o.default},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=i(0),r=(o=s)&&o.__esModule?o:{default:o};var l=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default.Attributor.Class),n(t,[{key:"add",value:function(e,i){if("+1"===i||"-1"===i){var o=this.value(e)||0;i="+1"===i?o+1:o-1}return 0===i?(this.remove(e),!0):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,i)}},{key:"canAdd",value:function(e,i){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,i)||a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(i))}},{key:"value",value:function(e){return parseInt(a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}())("indent","ql-indent",{scope:r.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(4),a=(o=n)&&o.__esModule?o:{default:o};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="blockquote",s.tagName="blockquote",t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=i(4),s=(o=a)&&o.__esModule?o:{default:o};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}();r.blotName="header",r.tagName=["H1","H2","H3","H4","H5","H6"],t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},a=l(i(0)),s=l(i(4)),r=l(i(25));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,s.default),o(t,[{key:"format",value:function(e,i){e!==m.blotName||i?n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,i):this.replaceWith(a.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,i){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,i),this):(this.parent.unwrap(),n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,i))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:n(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}();p.blotName="list-item",p.tagName="LI";var m=function(e){function t(e){c(this,t);var i=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=function(t){if(t.target.parentNode===e){var o=i.statics.formats(e),n=a.default.find(t.target);"checked"===o?n.format("list","unchecked"):"unchecked"===o&&n.format("list","checked")}};return e.addEventListener("touchstart",o),e.addEventListener("mousedown",o),i}return d(t,r.default),o(t,null,[{key:"create",value:function(e){var i="ordered"===e?"OL":"UL",o=n(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,i);return"checked"!==e&&"unchecked"!==e||o.setAttribute("data-checked","checked"===e),o}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),o(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,i=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e;var e,t,i}},{key:"insertBefore",value:function(e,i){if(e instanceof p)n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,i);else{var o=null==i?this.length():i.offset(this),a=this.split(o);a.parent.insertBefore(e,a)}}},{key:"optimize",value:function(e){n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var i=this.next;null!=i&&i.prev===this&&i.statics.blotName===this.statics.blotName&&i.domNode.tagName===this.domNode.tagName&&i.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(i.moveChildren(this),i.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var i=a.default.create(this.statics.defaultChild);e.moveChildren(i),this.appendChild(i)}n(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}();m.blotName="list",m.scope=a.default.Scope.BLOCK_BLOT,m.tagName=["OL","UL"],m.defaultChild="list-item",m.allowedChildren=[p],t.ListItem=p,t.default=m},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(56),a=(o=n)&&o.__esModule?o:{default:o};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="italic",s.tagName=["EM","I"],t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=i(6),s=(o=a)&&o.__esModule?o:{default:o};var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.default),n(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}();r.blotName="script",r.tagName=["SUB","SUP"],t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(6),a=(o=n)&&o.__esModule?o:{default:o};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="strike",s.tagName="S",t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(6),a=(o=n)&&o.__esModule?o:{default:o};var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default),t}();s.blotName="underline",s.tagName="U",t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=i(0),r=(o=s)&&o.__esModule?o:{default:o},l=i(27);var c=["alt","height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default.Embed),n(t,[{key:"format",value:function(e,i){c.indexOf(e)>-1?i?this.domNode.setAttribute(e,i):this.domNode.removeAttribute(e):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,i)}}],[{key:"create",value:function(e){var i=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&i.setAttribute("src",this.sanitize(e)),i}},{key:"formats",value:function(e){return c.reduce(function(t,i){return e.hasAttribute(i)&&(t[i]=e.getAttribute(i)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}();u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},s=i(4),r=i(27),l=(o=r)&&o.__esModule?o:{default:o};var c=["height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.BlockEmbed),n(t,[{key:"format",value:function(e,i){c.indexOf(e)>-1?i?this.domNode.setAttribute(e,i):this.domNode.removeAttribute(e):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,i)}}],[{key:"create",value:function(e){var i=a(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return i.setAttribute("frameborder","0"),i.setAttribute("allowfullscreen",!0),i.setAttribute("src",this.sanitize(e)),i}},{key:"formats",value:function(e){return c.reduce(function(t,i){return e.hasAttribute(i)&&(t[i]=e.getAttribute(i)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}();u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=r(i(35)),a=r(i(5)),s=r(i(9));function r(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,n.default),o(t,null,[{key:"create",value:function(e){var i=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,i,{throwOnError:!1,errorColor:"#f00"}),i.setAttribute("data-value",e)),i}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}();d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var p=function(e){function t(){l(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return u(t,s.default),o(t,null,[{key:"register",value:function(){a.default.register(d,!0)}}]),t}();t.FormulaBlot=d,t.default=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=l(i(0)),a=l(i(5)),s=l(i(9)),r=l(i(13));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,r.default),o(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}();p.className="ql-syntax";var m=new n.default.Attributor.Class("token","hljs",{scope:n.default.Scope.INLINE}),f=function(e){function t(e,i){c(this,t);var o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));if("function"!=typeof o.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var n=null;return o.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(n),n=setTimeout(function(){o.highlight(),n=null},o.options.interval)}),o.highlight(),o}return d(t,s.default),o(t,null,[{key:"register",value:function(){a.default.register(m,!0),a.default.register(p,!0)}}]),o(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}();f.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=m,t.default=f},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var o=function e(t,i,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,o)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(o):void 0},n=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),a=d(i(3)),s=d(i(8)),r=i(43),l=d(r),c=i(15),u=d(i(41));function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,i){p(this,t),null!=i.modules.toolbar&&null==i.modules.toolbar.container&&(i.modules.toolbar.container=h);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.quill.container.classList.add("ql-bubble"),o}return f(t,l.default),n(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),u.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),u.default)}}]),t}();g.DEFAULTS=(0,a.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,i){p(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));return o.quill.on(s.default.events.EDITOR_CHANGE,function(e,t,i,n){if(e===s.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&n===s.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var a=o.quill.getLines(t.index,t.length);if(1===a.length)o.position(o.quill.getBounds(t));else{var r=a[a.length-1],l=o.quill.getIndex(r),u=Math.min(r.length()-1,t.index+t.length-l),d=o.quill.getBounds(new c.Range(l,u));o.position(d)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()}),o}return f(t,r.BaseTooltip),n(t,[{key:"listen",value:function(){var e=this;o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var i=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),n=this.root.querySelector(".ql-tooltip-arrow");if(n.style.marginLeft="",0===i)return i;n.style.marginLeft=-1*i-n.offsetWidth/2+"px"}}]),t}();v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=v,t.default=g},function(e,t,i){e.exports=i(63)}]).default},e.exports=i()}).call(t,i(798).Buffer)},798:function(e,t,i){"use strict";(function(e){var o=i(799),n=i(800),a=i(801);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,i){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,i)}function c(e,t,i,o){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,o){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(o||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===o?new Uint8Array(t):void 0===o?new Uint8Array(t,i):new Uint8Array(t,i,o);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=p(e,t);return e}(e,t,i,o):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var o=0|f(t,i),n=(e=r(e,o)).write(t,i);n!==o&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if(l.isBuffer(t)){var i=0|m(t.length);return 0===(e=r(e,i)).length?e:(t.copy(e,0,0,i),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(o=t.length)!=o?r(e,0):p(e,t);if("Buffer"===t.type&&a(t.data))return p(e,t.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=r(e,t<0?0:0|m(t)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function p(e,t){var i=t.length<0?0:0|m(t.length);e=r(e,i);for(var o=0;o<i;o+=1)e[o]=255&t[o];return e}function m(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return M(e).length;default:if(o)return q(e).length;t=(""+t).toLowerCase(),o=!0}}function h(e,t,i){var o=e[t];e[t]=e[i],e[i]=o}function g(e,t,i,o,n){if(0===e.length)return-1;if("string"==typeof i?(o=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=l.from(t,o)),l.isBuffer(t))return 0===t.length?-1:v(e,t,i,o,n);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):v(e,[t],i,o,n);throw new TypeError("val must be string, number or Buffer")}function v(e,t,i,o,n){var a,s=1,r=e.length,l=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;s=2,r/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var u=-1;for(a=i;a<r;a++)if(c(e,a)===c(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*s}else-1!==u&&(a-=a-u),u=-1}else for(i+l>r&&(i=r-l),a=i;a>=0;a--){for(var d=!0,p=0;p<l;p++)if(c(e,a+p)!==c(t,p)){d=!1;break}if(d)return a}return-1}function b(e,t,i,o){i=Number(i)||0;var n=e.length-i;o?(o=Number(o))>n&&(o=n):o=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");o>a/2&&(o=a/2);for(var s=0;s<o;++s){var r=parseInt(t.substr(2*s,2),16);if(isNaN(r))return s;e[i+s]=r}return s}function y(e,t,i,o){return U(q(t,e.length-i),e,i,o)}function _(e,t,i,o){return U(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,o)}function k(e,t,i,o){return _(e,t,i,o)}function x(e,t,i,o){return U(M(t),e,i,o)}function C(e,t,i,o){return U(function(e,t){for(var i,o,n,a=[],s=0;s<e.length&&!((t-=2)<0);++s)i=e.charCodeAt(s),o=i>>8,n=i%256,a.push(n),a.push(o);return a}(t,e.length-i),e,i,o)}function w(e,t,i){return 0===t&&i===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,i))}function S(e,t,i){i=Math.min(e.length,i);for(var o=[],n=t;n<i;){var a,s,r,l,c=e[n],u=null,d=c>239?4:c>223?3:c>191?2:1;if(n+d<=i)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],s=e[n+2],128==(192&a)&&128==(192&s)&&(l=(15&c)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],s=e[n+2],r=e[n+3],128==(192&a)&&128==(192&s)&&128==(192&r)&&(l=(15&c)<<18|(63&a)<<12|(63&s)<<6|63&r)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|1023&u),o.push(u),n+=d}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);var i="",o=0;for(;o<t;)i+=String.fromCharCode.apply(String,e.slice(o,o+=P));return i}(o)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,i){return c(null,e,t,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,i){return function(e,t,i,o){return u(t),t<=0?r(e,t):void 0!==i?"string"==typeof o?r(e,t).fill(i,o):r(e,t).fill(i):r(e,t)}(null,e,t,i)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,o=t.length,n=0,a=Math.min(i,o);n<a;++n)if(e[n]!==t[n]){i=e[n],o=t[n];break}return i<o?-1:o<i?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var o=l.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var s=e[i];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o,n),n+=s.length}return o},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):function(e,t,i){var o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,i);case"utf8":case"utf-8":return S(this,t,i);case"ascii":return $(this,t,i);case"latin1":case"binary":return T(this,t,i);case"base64":return w(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,i);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,i,o,n){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===o&&(o=0),void 0===n&&(n=this.length),t<0||i>e.length||o<0||n>this.length)throw new RangeError("out of range index");if(o>=n&&t>=i)return 0;if(o>=n)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,o>>>=0,n>>>=0,this===e)return 0;for(var a=n-o,s=i-t,r=Math.min(a,s),c=this.slice(o,n),u=e.slice(t,i),d=0;d<r;++d)if(c[d]!==u[d]){a=c[d],s=u[d];break}return a<s?-1:s<a?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return g(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return g(this,e,t,i,!1)},l.prototype.write=function(e,t,i,o){if(void 0===t)o="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)o=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===o&&(o="utf8")):(o=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var a=!1;;)switch(o){case"hex":return b(this,e,t,i);case"utf8":case"utf-8":return y(this,e,t,i);case"ascii":return _(this,e,t,i);case"latin1":case"binary":return k(this,e,t,i);case"base64":return x(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function $(e,t,i){var o="";i=Math.min(e.length,i);for(var n=t;n<i;++n)o+=String.fromCharCode(127&e[n]);return o}function T(e,t,i){var o="";i=Math.min(e.length,i);for(var n=t;n<i;++n)o+=String.fromCharCode(e[n]);return o}function E(e,t,i){var o=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>o)&&(i=o);for(var n="",a=t;a<i;++a)n+=B(e[a]);return n}function O(e,t,i){for(var o=e.slice(t,i),n="",a=0;a<o.length;a+=2)n+=String.fromCharCode(o[a]+256*o[a+1]);return n}function D(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,i,o,n,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(i+o>e.length)throw new RangeError("Index out of range")}function N(e,t,i,o){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-i,2);n<a;++n)e[i+n]=(t&255<<8*(o?n:1-n))>>>8*(o?n:1-n)}function I(e,t,i,o){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-i,4);n<a;++n)e[i+n]=t>>>8*(o?n:3-n)&255}function L(e,t,i,o,n,a){if(i+o>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function F(e,t,i,o,a){return a||L(e,0,i,4),n.write(e,t,i,o,23,4),i+4}function R(e,t,i,o,a){return a||L(e,0,i,8),n.write(e,t,i,o,52,8),i+8}l.prototype.slice=function(e,t){var i,o=this.length;if(e=~~e,t=void 0===t?o:~~t,e<0?(e+=o)<0&&(e=0):e>o&&(e=o),t<0?(t+=o)<0&&(t=0):t>o&&(t=o),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=l.prototype;else{var n=t-e;i=new l(n,void 0);for(var a=0;a<n;++a)i[a]=this[a+e]}return i},l.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||D(e,t,this.length);for(var o=this[e],n=1,a=0;++a<t&&(n*=256);)o+=this[e+a]*n;return o},l.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||D(e,t,this.length);for(var o=this[e+--t],n=1;t>0&&(n*=256);)o+=this[e+--t]*n;return o},l.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||D(e,t,this.length);for(var o=this[e],n=1,a=0;++a<t&&(n*=256);)o+=this[e+a]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||D(e,t,this.length);for(var o=t,n=1,a=this[e+--o];o>0&&(n*=256);)a+=this[e+--o]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,i,o){(e=+e,t|=0,i|=0,o)||A(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a<i&&(n*=256);)this[t+a]=e/n&255;return t+i},l.prototype.writeUIntBE=function(e,t,i,o){(e=+e,t|=0,i|=0,o)||A(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},l.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,i,o){if(e=+e,t|=0,!o){var n=Math.pow(2,8*i-1);A(this,e,t,i,n-1,-n)}var a=0,s=1,r=0;for(this[t]=255&e;++a<i&&(s*=256);)e<0&&0===r&&0!==this[t+a-1]&&(r=1),this[t+a]=(e/s>>0)-r&255;return t+i},l.prototype.writeIntBE=function(e,t,i,o){if(e=+e,t|=0,!o){var n=Math.pow(2,8*i-1);A(this,e,t,i,n-1,-n)}var a=i-1,s=1,r=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===r&&0!==this[t+a+1]&&(r=1),this[t+a]=(e/s>>0)-r&255;return t+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,i){return F(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return F(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return R(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return R(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,o){if(i||(i=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<i&&(o=i),o===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-i&&(o=e.length-t+i);var n,a=o-i;if(this===e&&i<t&&t<o)for(n=a-1;n>=0;--n)e[n+t]=this[n+i];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},l.prototype.fill=function(e,t,i,o){if("string"==typeof e){if("string"==typeof t?(o=t,t=0,i=this.length):"string"==typeof i&&(o=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!l.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var s=l.isBuffer(e)?e:q(new l(e,o).toString()),r=s.length;for(a=0;a<i-t;++a)this[a+t]=s[a%r]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var i;t=t||1/0;for(var o=e.length,n=null,a=[],s=0;s<o;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===o){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function M(e){return o.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,i,o){for(var n=0;n<o&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}}).call(t,i(39))},799:function(e,t,i){"use strict";t.byteLength=function(e){var t=c(e),i=t[0],o=t[1];return 3*(i+o)/4-o},t.toByteArray=function(e){for(var t,i=c(e),o=i[0],s=i[1],r=new a(function(e,t,i){return 3*(t+i)/4-i}(0,o,s)),l=0,u=s>0?o-4:o,d=0;d<u;d+=4)t=n[e.charCodeAt(d)]<<18|n[e.charCodeAt(d+1)]<<12|n[e.charCodeAt(d+2)]<<6|n[e.charCodeAt(d+3)],r[l++]=t>>16&255,r[l++]=t>>8&255,r[l++]=255&t;2===s&&(t=n[e.charCodeAt(d)]<<2|n[e.charCodeAt(d+1)]>>4,r[l++]=255&t);1===s&&(t=n[e.charCodeAt(d)]<<10|n[e.charCodeAt(d+1)]<<4|n[e.charCodeAt(d+2)]>>2,r[l++]=t>>8&255,r[l++]=255&t);return r},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,r=i-n;s<r;s+=16383)a.push(u(e,s,s+16383>r?r:s+16383));1===n?(t=e[i-1],a.push(o[t>>2]+o[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"="));return a.join("")};for(var o=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,l=s.length;r<l;++r)o[r]=s[r],n[s.charCodeAt(r)]=r;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e,t,i){for(var n,a,s=[],r=t;r<i;r+=3)n=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),s.push(o[(a=n)>>18&63]+o[a>>12&63]+o[a>>6&63]+o[63&a]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},800:function(e,t){t.read=function(e,t,i,o,n){var a,s,r=8*n-o-1,l=(1<<r)-1,c=l>>1,u=-7,d=i?n-1:0,p=i?-1:1,m=e[t+d];for(d+=p,a=m&(1<<-u)-1,m>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=p,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=o;u>0;s=256*s+e[t+d],d+=p,u-=8);if(0===a)a=1-c;else{if(a===l)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,o),a-=c}return(m?-1:1)*s*Math.pow(2,a-o)},t.write=function(e,t,i,o,n,a){var s,r,l,c=8*a-n-1,u=(1<<c)-1,d=u>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:a-1,f=o?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(r=0,s=u):s+d>=1?(r=(t*l-1)*Math.pow(2,n),s+=d):(r=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[i+m]=255&r,m+=f,r/=256,n-=8);for(s=s<<n|r,c+=n;c>0;e[i+m]=255&s,m+=f,s/=256,c-=8);e[i+m-f]|=128*h}},801:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},802:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{"margin-bottom":"30px"}},[e.hasTranslation?i("div",[i("el-row",{staticStyle:{"margin-bottom":"5px"},attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:12}},[e._v("\n "+e._s(e.label+":")+"\n "),e.hasQuill?i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.content_mode_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})]):e._e()],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("div",{staticClass:"am-service-translate am-event-translate",staticStyle:{cursor:"pointer"},on:{click:e.showDialogTranslate}},[i("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/translate.svg"}}),e._v("\n "+e._s(e.$root.labels.translate)+"\n ")])])],1),e._v(" "),i("el-button-group",{staticStyle:{"margin-bottom":"5px"}},[i("el-button",{attrs:{size:"mini",type:e.isTextMode?"default":"primary"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.text_mode))]),e._v(" "),i("el-button",{attrs:{size:"mini",type:e.isTextMode?"primary":"default"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.html_mode))])],1)],1):i("div",{staticStyle:{"margin-bottom":"5px"}},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:12}},[e._v("\n "+e._s(e.label+":")+"\n "),e.hasQuill?i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.content_mode_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})]):e._e()],1),e._v(" "),e.hasQuill?i("el-col",{staticClass:"align-right",attrs:{span:12}},[i("el-button-group",[i("el-button",{attrs:{size:"mini",type:e.isTextMode?"default":"primary"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.text_mode))]),e._v(" "),i("el-button",{attrs:{size:"mini",type:e.isTextMode?"primary":"default"},on:{click:e.textModeChanged}},[e._v(e._s(e.$root.labels.html_mode))])],1)],1):e._e()],1)],1),e._v(" "),e.isTextMode?i("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:e.changedContentText},model:{value:e.textValue,callback:function(t){e.textValue=t},expression:"textValue"}}):i("quill-editor",{attrs:{options:{modules:{toolbar:[["bold","italic","underline","strike"],["blockquote"],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{color:[]},{background:[]}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{font:[]}],[{align:[]}],["clean"],e.allowImage?["link","image"]:["link"]]}}},on:{change:e.changedContentQuill,ready:e.readyQuill},model:{value:e.entity[e.htmlProperty],callback:function(t){e.$set(e.entity,e.htmlProperty,t)},expression:"entity[htmlProperty]"}})],1)},staticRenderFns:[]}},805:function(e,t,i){"use strict";t.a={data:function(){return{}},methods:{filterResponseData:function(){this.options.entities.employees.length&&(this.options.entities.employees[0].locationId=null,this.options.entities.employees[0].serviceList.forEach(function(e){e.maxCapacity=1,e.minCapacity=1,e.timeAfter="",e.timeBefore=""}))},setInitialEmployee:function(e){var t=this;e.length||this.$http.get(this.$root.getAjaxUrl+"/users/current").then(function(e){var i=null;(i=e.data.data.user?{email:e.data.data.user.email,firstName:e.data.data.user.firstName,lastName:e.data.data.user.lastName,phone:e.data.data.user.phone||""}:{firstName:"firstname",lastName:"lastname",email:"example@example.com"}).type="provider",i.weekDayList=t.getSettingsSchedule(),t.form.post(t.$root.getAjaxUrl+"/users/providers",i).then(function(e){t.options.employees=[e.data.user]}).catch()}).catch()}}}},806:function(e,t,i){var o=i(335)(i(807),i(808),!1,null,null,null);e.exports=o.exports},807:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(721),n=i.n(o),a=i(709),s=i.n(a),r=i(696),l=i(338),c=i(700),u=i(697);t.default={mixins:[r.a,l.a,c.a,u.a],props:{customer:null},data:function(){return{languagesData:[],usedLanguages:[],dialogLoading:!0,errors:{email:""},formOptions:{wpUsers:[],genders:[{value:"female",label:this.$root.labels.female},{value:"male",label:this.$root.labels.male}]},rules:{firstName:[{required:!0,message:this.$root.labels.enter_first_name_warning,trigger:"submit"}],lastName:[{required:!0,message:this.$root.labels.enter_last_name_warning,trigger:"submit"}],email:[{required:!1,message:this.$root.labels.enter_email_warning,trigger:"submit"},{type:"email",message:this.$root.labels.enter_valid_email_warning,trigger:"submit"}]}}},created:function(){0!==this.customer.id?(this.customer.birthday=this.customer.birthday?this.$moment(this.customer.birthday).toDate():null,this.getWPUsers(this.customer.externalId)):this.getWPUsers(0),this.usedLanguages=this.$root.settings.general.usedLanguages,this.usedLanguages.includes(this.$root.settings.wordpress.locale)||this.usedLanguages.push(this.$root.settings.wordpress.locale)},mounted:function(){this.inlineSVG(),this.getLanguagesData()},methods:{getLanguagesData:function(){var e=this;this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({types:["settings"]})}).then(function(t){e.languagesData=t.data.data.settings.languages}).catch(function(e){console.log(e.message)})},getLanguageLabel:function(e){return this.languagesData[e]?this.languagesData[e].name:""},getLanguageFlag:function(e){return e&&this.languagesData[e]&&this.languagesData[e].country_code?this.$root.getUrl+"public/img/flags/"+this.languagesData[e].country_code+".png":this.$root.getUrl+"public/img/grey.svg"},errorCallback:function(e){var t=this;t.errors.email="",setTimeout(function(){t.errors.email=e},200)},getParsedEntity:function(){var e=JSON.parse(JSON.stringify(this.customer));return e.birthday&&(e.birthday=this.getDatabaseFormattedDate(this.$moment(e.birthday).format("YYYY-MM-DD"))),0===e.externalId||e.externalId||(e.externalId=-1),e.language?e.translations=JSON.stringify({defaultLanguage:e.language}):e.translations=null,e},closeDialog:function(){this.$emit("closeDialog")},getWPUsers:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/users/wp-users",{params:{id:e,role:"customer"}}).then(function(e){t.formOptions.wpUsers=e.data.data.users,t.formOptions.wpUsers.unshift({value:0,label:t.$root.labels.create_new}),-1===t.formOptions.wpUsers.map(function(e){return e.value}).indexOf(t.customer.externalId)&&(t.customer.externalId=""),t.dialogLoading=!1})},phoneFormatted:function(e,t){this.clearValidation(),this.customer.phone=e,this.customer.countryPhoneIso=t&&"auto"!==t?t:null},clearValidation:function(){void 0!==this.$refs.customer&&this.$refs.customer.clearValidate()},selectCreateNewWPUser:function(){this.customer.externalId=0,this.$refs.wpUser.blur()}},components:{PhoneInput:s.a,DialogActions:n.a}}},808:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[i("div",{staticClass:"am-dialog-loader-content"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),i("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():i("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.customer.id}},[i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:18}},[0!==e.customer.id?i("h2",[e._v(e._s(e.$root.labels.edit_customer))]):i("h2",[e._v(e._s(e.$root.labels.new_customer))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:6}},[i("span"),e._v(" "),i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),i("el-form",{ref:"customer",attrs:{model:e.customer,rules:e.rules,"label-position":"top"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[i("el-form-item",{attrs:{label:e.$root.labels.first_name+":",prop:"firstName"}},[i("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.customer,"firstName")}},model:{value:e.customer.firstName,callback:function(t){e.$set(e.customer,"firstName",t)},expression:"customer.firstName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.last_name+":",prop:"lastName"}},[i("el-input",{attrs:{"auto-complete":"off"},on:{input:function(t){return e.clearValidation()},change:function(t){return e.trimProperty(e.customer,"lastName")}},model:{value:e.customer.lastName,callback:function(t){e.$set(e.customer,"lastName",t)},expression:"customer.lastName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.email+":",prop:"email",error:e.errors.email}},[i("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.labels.email_placeholder},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.email,callback:function(t){e.$set(e.customer,"email",t)},expression:"customer.email"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.wp_user)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.wp_user_customer_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{ref:"wpUser",attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_wp_user},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.externalId,callback:function(t){e.$set(e.customer,"externalId",t)},expression:"customer.externalId"}},[i("div",{staticClass:"am-drop"},[e.customer&&e.customer.email?i("div",{staticClass:"am-drop-create-item",on:{click:e.selectCreateNewWPUser}},[e._v("\n "+e._s(e.$root.labels.create_new)+"\n ")]):e._e(),e._v(" "),e._l(e.formOptions.wpUsers,function(e){return i("el-option",{key:e.value,class:{hidden:0===e.value},attrs:{label:e.label,value:e.value}})})],2)])],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.phone+":"}},[i("phone-input",{attrs:{countryPhoneIso:e.customer.countryPhoneIso,savedPhone:e.customer.phone},on:{phoneFormatted:e.phoneFormatted}})],1),e._v(" "),i("el-popover",e._b({ref:"notificationLanguage",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[i("PopLite")],1),e._v(" "),i("el-form-item",{directives:[{name:"popover",rawName:"v-popover:notificationLanguage",arg:"notificationLanguage"}],attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.notification_language)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{style:{maxWidth:"312px"},attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.wp_customer_lang_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{staticClass:"select-languages",attrs:{placeholder:e.$root.labels.language,clearable:"",filterable:"",disabled:e.$root.isLite},model:{value:e.$root.isLite?"":e.customer.language,callback:function(t){e.$set(e.$root.isLite?"":e.customer,"language",t)},expression:"$root.isLite ? '' : customer.language"}},[i("template",{slot:"prefix"},[i("img",{staticClass:"select-languages-flag",attrs:{src:e.getLanguageFlag(e.$root.isLite?"":e.customer.language)}})]),e._v(" "),e._l(e.usedLanguages,function(t,o){return i("el-option",{key:o,attrs:{label:e.getLanguageLabel(t),value:t}},[i("span",[i("img",{staticClass:"option-languages-flag",attrs:{src:e.getLanguageFlag(t)}}),e._v("\n "+e._s(e.getLanguageLabel(t))+"\n ")])])})],2)],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.gender+":"}},[i("el-select",{attrs:{placeholder:"",clearable:""},on:{change:function(t){return e.clearValidation()}},model:{value:e.customer.gender,callback:function(t){e.$set(e.customer,"gender",t)},expression:"customer.gender"}},e._l(e.formOptions.genders,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.date_of_birth+":"}},[i("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner",placeholder:e.$root.labels.select_date_of_birth},"is-expanded":!1,formats:e.vCalendarFormats},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.birthday,callback:function(t){e.$set(e.customer,"birthday",t)},expression:"customer.birthday"}}),e._v(" "),e.customer.birthday?i("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:function(t){e.customer.birthday=null}}},[i("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):e._e()],1),e._v(" "),i("div",{staticClass:"am-divider"}),e._v(" "),i("el-form-item",{attrs:{label:e.$root.labels.note_internal+":"}},[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.customer.note,callback:function(t){e.$set(e.customer,"note",t)},expression:"customer.note"}})],1)],1)],1),e._v(" "),e.dialogLoading?e._e():i("dialog-actions",{attrs:{formName:"customer",urlName:"users/customers",isNew:0===e.customer.id,entity:e.customer,getParsedEntity:e.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{status:{yes:"visible"===e.customer.status?e.$root.labels.visibility_hide:e.$root.labels.visibility_show,no:e.$root.labels.no}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!1},message:{success:{save:e.$root.labels.customer_saved,remove:e.$root.labels.customer_deleted,show:"",hide:""},confirm:{remove:e.$root.labels.confirm_delete_customer,show:"",hide:"",duplicate:""}}},on:{errorCallback:e.errorCallback}})],1)},staticRenderFns:[]}},809:function(e,t,i){var o=i(335)(i(810),i(811),!1,null,null,null);e.exports=o.exports},810:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(696),n=i(338);t.default={mixins:[o.a,n.a],props:{data:null,action:null},data:function(){return{delimiter:",",delimiters:[{label:this.$root.labels.csv_delimiter_comma,value:","},{label:this.$root.labels.csv_delimiter_semicolon,value:";"}],separateBookings:!1,hasSeparateBookingOption:!1}},updated:function(){},mounted:function(){},methods:{changeFields:function(){},closeDialog:function(){this.$emit("closeDialogExport")},getAction:function(){}},components:{}}},811:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticClass:"am-dialog-scrollable"},[i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:14}},[i("h2",[e._v(e._s(e.$root.labels.export))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),i("BlockLite"),e._v(" "),i("el-form",{class:{"am-lite-container-disabled":e.$root.isLite},attrs:{"label-position":"top"}},[i("el-form-item",{attrs:{label:e.$root.labels.csv_delimiter+":"}},[i("el-select",{attrs:{placeholder:e.$root.labels.csv_delimiter},on:{change:e.changeFields},model:{value:e.delimiter,callback:function(t){e.delimiter=t},expression:"delimiter"}},e._l(e.delimiters,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),e.hasSeparateBookingOption?i("el-form-item",{attrs:{label:e.$root.labels["select_rows_settings"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")]+":"}},[i("el-select",{attrs:{placeholder:e.$root.labels.exported_same_row},on:{change:e.changeFields},model:{value:e.separateBookings,callback:function(t){e.separateBookings=t},expression:"separateBookings"}},[i("el-option",{attrs:{label:this.$root.labels["exported_same_row"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!1}}),e._v(" "),i("el-option",{attrs:{label:this.$root.labels["exported_separate_rows"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!0}})],1)],1):e._e(),e._v(" "),e._l(e.data.fields,function(t){return[i("el-checkbox",{attrs:{checked:"",label:t.label,border:""},on:{change:e.changeFields},model:{value:t.checked,callback:function(i){e.$set(t,"checked",i)},expression:"field.checked"}})]})],2)],1),e._v(" "),i("div",{staticClass:"am-dialog-footer",class:{"am-lite-container-disabled":e.$root.isLite}},[i("div",{staticClass:"am-dialog-footer-actions"},[i("el-row",[i("el-col",{staticClass:"align-right",attrs:{sm:24}},[i("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary","native-type":"submit"},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.export)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},812:function(e,t,i){var o=i(335)(i(824),i(825),!1,null,null,null);e.exports=o.exports},816:function(e,t,i){var o=i(335)(i(826),i(827),!1,null,null,null);e.exports=o.exports},817:function(e,t,i){var o=i(335)(i(818),i(819),!1,null,null,null);e.exports=o.exports},818:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(707),n=i(338),a=i(712),s=i(730),r=i.n(s),l=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,a=void 0;try{for(var s,r=e[Symbol.iterator]();!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default={mixins:[o.a,n.a,a.a],props:{showCustomerInfo:!0,entityId:null,entityType:null,appointment:{default:function(){}},customFields:{default:function(){return[]}},hideAttachmentCustomField:{required:!1,default:!1,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1}},data:function(){return{}},mounted:function(){this.setAddressCustomFields()},methods:{setAddressCF:function(e,t,i){this.appointment.bookings[i].customFields[t].value=e},googleMapsLoaded:function(){return window.google&&this.$root.settings.general.gMapApiKey},clearValidation:function(){this.$emit("clearValidation")},setAddressCustomFields:function(){var e=this;this.appointment.bookings.forEach(function(t,i){var o=!0,n=!1,a=void 0;try{for(var s,r=Object.entries(t.customFields)[Symbol.iterator]();!(o=(s=r.next()).done);o=!0){var c=s.value,u=l(c,2),d=u[0],p=u[1];"address"===p.type&&void 0!==e.$refs["amelia-cf-address-"+i+"-"+d]&&e.$refs["amelia-cf-address-"+i+"-"+d].length>0&&e.$refs["amelia-cf-address-"+i+"-"+d][0].update(p.value)}}catch(e){n=!0,a=e}finally{try{!o&&r.return&&r.return()}finally{if(n)throw a}}})}},watch:{"appointment.bookings":function(){var e=this;this.$nextTick(function(){e.setAddressCustomFields()})}},components:{VueGoogleAutocomplete:r.a}}},819:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-dialog-table am-custom-fields-container"},e._l(e.appointment.bookings,function(t,o){return i("div",{staticClass:"am-customer-extras"},[i("el-row",{staticClass:"am-customer-extras-data"},[e.showCustomerInfo?i("el-col",[i("h3",[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),i("span",[e._v(e._s(t.customer.email))])]):e._e()],1),e._v(" "),i("div",{staticClass:"am-custom-fields"},e._l(e.customFields,function(t){return e.isCustomFieldVisible(t,e.entityType,e.entityId)&&"content"!==t.type&&("file"!==t.type||"file"===t.type&&e.appointment.bookings[o].customFields[t.id].value&&e.appointment.bookings[o].customFields[t.id].value.length>0)?i("el-form-item",{key:t.id,attrs:{prop:!0===t.required&&"content"!==t.type&&"file"!==t.type?"bookings."+o+".customFields."+t.id+".value":null,label:"content"!==t.type&&"checkbox"!==t.type&&"radio"!==t.type&&t.label?t.label+":":""}},["checkbox"!==t.type&&"radio"!==t.type||!t.label?e._e():i("span",{class:"checkbox"!==t.type&&"radio"!==t.type||!t.required?"":"am-custom-required-as-html",domProps:{innerHTML:e._s(t.label?"<label class='el-form-item__label'>"+t.label+"</label>:":"")}},[e._v("\n >\n ")]),e._v(" "),"text"===t.type?i("el-input",{attrs:{placeholder:""},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[o].customFields[t.id].value,callback:function(i){e.$set(e.appointment.bookings[o].customFields[t.id],"value",i)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):e._e(),e._v(" "),"address"===t.type?i("div",{staticClass:"el-input",style:{marginBottom:e.$root.settings.general.gMapApiKey?"":0}},[e.googleMapsLoaded()?i("vue-google-autocomplete",{ref:"amelia-cf-address-"+o+"-"+t.id,refInFor:!0,attrs:{id:"address-autocomplete-"+o+"-"+t.id,classname:"el-input__inner",placeholder:""},on:{change:function(i){return e.setAddressCF(i,t.id,o)}}}):i("el-input",{attrs:{placeholder:""},model:{value:e.appointment.bookings[o].customFields[t.id].value,callback:function(i){e.$set(e.appointment.bookings[o].customFields[t.id],"value",i)},expression:"appointment.bookings[key].customFields[customField.id].value"}})],1):"text-area"===t.type?i("el-input",{staticClass:"am-front-texarea",attrs:{rows:3,placeholder:"",type:"textarea"},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[o].customFields[t.id].value,callback:function(i){e.$set(e.appointment.bookings[o].customFields[t.id],"value",i)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):"select"===t.type?i("el-select",{attrs:{placeholder:"",clearable:"","popper-class":"am-dropdown-cabinet"},on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[o].customFields[t.id].value,callback:function(i){e.$set(e.appointment.bookings[o].customFields[t.id],"value",i)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return i("el-option",{key:t,attrs:{value:e,label:e}})}),1):"checkbox"===t.type?i("el-checkbox-group",{on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.bookings[o].customFields[t.id].value,callback:function(i){e.$set(e.appointment.bookings[o].customFields[t.id],"value",i)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(e,t){return i("el-checkbox",{key:t,attrs:{label:e}})}),1):"radio"===t.type?i("el-radio-group",{model:{value:e.appointment.bookings[o].customFields[t.id].value,callback:function(i){e.$set(e.appointment.bookings[o].customFields[t.id],"value",i)},expression:"appointment.bookings[key].customFields[customField.id].value"}},e._l(e.getCustomFieldOptions(t.options),function(t,o){return i("el-radio",{key:o,attrs:{label:t},on:{change:function(t){return e.clearValidation()}}})}),1):"file"===t.type&&!1===e.hideAttachmentCustomField?e._l(e.appointment.bookings[o].customFields[t.id].value,function(n,a){return i("div",{staticStyle:{margin:"15px",clear:"left"}},[i("a",{key:a,attrs:{href:e.$root.useUploadsAmeliaPath?e.$root.getAjaxUrl+"/fields/"+t.id+"/"+e.appointment.bookings[o].id+"/"+a+(e.isCabinet?"&source=cabinet-provider":""):e.$root.getUploadsAmeliaUrl+e.appointment.bookings[o].id+"_"+n.fileName,target:"_blank"}},[e._v("\n "+e._s(n.name)+"\n ")])])}):"datepicker"===t.type?i("div",[i("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"bottom","popover-align":e.screenWidth<768?"center":"left","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"is-expanded":!1,"is-required":!0,disabled:!1,formats:e.vCalendarFormats},model:{value:e.appointment.bookings[o].customFields[t.id].value,callback:function(i){e.$set(e.appointment.bookings[o].customFields[t.id],"value",i)},expression:"appointment.bookings[key].customFields[customField.id].value"}})],1):e._e()],2):e._e()}),1)],1)}),0)},staticRenderFns:[]}},820:function(e,t,i){var o=i(335)(i(821),i(822),!1,null,null,null);e.exports=o.exports},821:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(711),n=i.n(o),a=i(769),s=(i.n(a),i(338)),r=i(696),l=i(700),c=i(699),u=i(725);t.default={mixins:[r.a,s.a,l.a,c.a,u.a],props:{modalData:null,bookingFetched:!1},data:function(){return{booking:{},dialogLoading:!0,finance:{bookablePriceTotal:0,extrasPriceTotal:0,discountTotal:0,subTotal:0,due:0},form:new n.a,payment:{},paymentStatuses:[{value:"pending",label:this.$root.labels.pending},{value:"paid",label:this.$root.labels.paid},{value:"partiallyPaid",label:this.$root.labels.partially_paid}],showDeleteConfirmation:!1,showUpdatePaymentAmount:!1,payments:[]}},created:function(){n.a.defaults.axios=this.$http,this.bookingFetched&&(this.setFinance(),this.dialogLoading=!1)},updated:function(){this.$nextTick(function(){var e=this;setTimeout(function(){e.inlineSVG()},5)})},methods:{showUpdateModal:function(e){this.showUpdatePaymentAmount=!this.showUpdatePaymentAmount,this.showDeleteConfirmation=!1,this.payment=e},getTicketsData:function(){var e=this,t=[];return"bookable"in this.modalData&&this.modalData.bookable&&this.modalData.bookings.forEach(function(i){i.payments.forEach(function(o){o.id===e.modalData.paymentId&&i.ticketsData.forEach(function(i){var o=e.modalData.bookable.customTickets.find(function(e){return e.id===i.eventTicketId});o&&t.push({name:o.name,persons:i.persons})})})}),t},instantiateDialog:function(){null!==this.modalData.bookings&&(this.setFinance(),this.dialogLoading=!1)},setFinance:function(){this.payments=JSON.parse(JSON.stringify(this.modalData.bookings[this.modalData.bookingIndex].payments)),this.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)});var e=this;e.modalData.bookings.forEach(function(t){if(e.booking=t,e.finance.extrasPriceTotal=0,t.extras.forEach(function(i){e.finance.extrasPriceTotal+=i.price*i.quantity*(i.aggregatedPrice?t.persons:1)}),t.ticketsData&&t.ticketsData.length){var i=0;t.ticketsData.forEach(function(e){i+=e.price*(t.aggregatedPrice?e.persons:1)}),e.finance.bookablePriceTotal=i}else e.finance.bookablePriceTotal=t.price*(t.aggregatedPrice?t.persons:1);e.finance.subTotal=e.finance.bookablePriceTotal+e.finance.extrasPriceTotal,e.finance.discountTotal=e.finance.subTotal/100*(t.coupon?t.coupon.discount:0)+(t.coupon?t.coupon.deduction:0),e.finance.total=e.finance.subTotal;var o=0;t.payments.forEach(function(t){e.payment=t,t.packageCustomerId&&(e.finance.discountTotal=e.finance.subTotal/100*(t.coupon?t.coupon.discount:0)+(t.coupon?t.coupon.deduction:0)),e.finance.discountTotal+=t.wcOrderId?t.wcItemCouponValue:0,e.finance.total+=t.wcOrderId?t.wcItemTaxValue:0,o+=t.amount}),e.finance.total-=e.finance.discountTotal,e.finance.due=e.finance.total-o>0?e.finance.total-o:0,e.finance.total=e.finance.total>=0?e.finance.total:0})},closeDialog:function(){this.$emit("closeDialogPayment")},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(i){i.value===e&&(t=i.label)}),t},deletePayment:function(){var e=this;this.dialogLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/payments/delete/"+this.payment.id).then(function(t){e.dialogLoading=!1,t.data&&(e.$emit("updatePaymentCallback",e.payment.id),e.showDeleteConfirmation=!e.showDeleteConfirmation,e.notify(e.$root.labels.success,e.$root.labels.payment_deleted,"success"))}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})},updatePayment:function(){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/payments/"+this.payment.id,this.payment).then(function(){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount,e.setFinance(),e.notify(e.$root.labels.success,e.$root.labels.payment_saved,"success"),e.$emit("updatePaymentCallback"),e.dialogLoading=!1}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})},getPaymentGatewayNiceName:function(e){return"onSite"===e.gateway?this.$root.labels.on_site:"wc"===e.gateway?e.gatewayTitle:e.gateway?e.gateway.charAt(0).toUpperCase()+e.gateway.slice(1):void 0}},watch:{bookingFetched:function(){!0===this.bookingFetched&&this.instantiateDialog()}},components:{Money:a.Money}}},822:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[i("div",{staticClass:"am-dialog-loader-content"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),i("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():i("div",{staticClass:"am-dialog-scrollable"},[i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:18}},[i("h2",[e._v(e._s(e.$root.labels.payment_details))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:6}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),i("div",{staticClass:"am-payment-details"},[i("el-row",{staticClass:"am-payment-details-row"},[i("h4",[e._v(e._s(e.$root.labels.customer))]),e._v(" "),i("el-col",{attrs:{span:24}},[i("h3",[e._v(e._s(e.modalData.customer?e.modalData.customer.firstName+" "+e.modalData.customer.lastName:""))]),e._v(" "),i("p",[e._v(e._s(e.modalData.customer?e.modalData.customer.email:""))])])],1),e._v(" "),e._l(e.payments,function(t,o){return i("el-row",{key:t.id,staticClass:"am-payment-details-row"},[i("h4",[e._v(e._s(e.$root.labels.payment)+" #"+e._s(o+1))]),e._v(" "),e.payments.length>1?i("el-button",{staticClass:"am-button-icon",staticStyle:{position:"absolute",right:"10px",top:"10px"},on:{click:function(i){return e.showUpdateModal(t)}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]):e._e(),e._v(" "),i("el-col",{attrs:{span:12}},[i("p",[e._v(e._s(e.$root.labels.date))]),e._v(" "),i("p",[e._v(e._s(e.$root.labels.payment_method))]),e._v(" "),t.wcOrderId?i("p",[e._v(e._s(e.$root.labels.wc_order)+":")]):e._e(),e._v(" "),i("p",[e._v(e._s(e.$root.labels.status))])]),e._v(" "),i("el-col",{attrs:{span:12}},[i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDate(t.dateTime)))]),e._v(" "),i("p",{staticClass:"am-semi-strong"},[i("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway)},attrs:{src:e.$root.getUrl+"public/img/payments/"+t.gateway+".svg"}}),e._v(" "),"razorpay"!==t.gateway?i("span",[e._v(e._s(e.getPaymentGatewayNiceName(t)))]):e._e()]),e._v(" "),t.wcOrderId?i("p",[i("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])]):e._e(),e._v(" "),i("div",{staticClass:"am-payment-status"},[i("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.status}),e._v(" "),i("p",{staticClass:"am-semi-strong"},[i("span",[e._v(e._s(e.getPaymentStatusNiceName(t.status)))])])])])],1)}),e._v(" "),i("el-row",{staticClass:"am-payment-details-row"},[i("h4",[e._v(e._s(e.$root.labels[e.modalData.bookableType+"_info"]))]),e._v(" "),i("el-col",{attrs:{span:12}},[i("p",[e._v(e._s(e.$root.labels[e.modalData.bookableType]))]),e._v(" "),"package"!==e.modalData.bookableType?i("p",[e._v(e._s(e.$root.labels.date))]):e._e(),e._v(" "),e.modalData.providers.length&&"appointment"===e.modalData.bookableType?i("p",[e._v(e._s(e.$root.labels.employee))]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?i("p",[e._v(e._s(e.$root.labels.event_tickets))]):e._e()]),e._v(" "),i("el-col",{attrs:{span:12}},[i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.modalData.bookableName))]),e._v(" "),"package"!==e.modalData.bookableType?i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDateTime(e.modalData.bookingStart)))]):e._e(),e._v(" "),e.modalData.providers.length&&"appointment"===e.modalData.bookableType?i("p",{staticClass:"am-semi-strong"},[i("img",{staticClass:"am-employee-photo",attrs:{src:e.pictureLoad(e.modalData.providers[0],!0)},on:{error:function(t){return e.imageLoadError(e.modalData.providers[0].id,!0)}}}),e._v("\n "+e._s(e.modalData.providers.length?e.modalData.providers[0].fullName:"")+"\n ")]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?i("p",{staticClass:"am-semi-strong",staticStyle:{"white-space":"unset"}},e._l(e.getTicketsData(),function(t){return i("span",{staticClass:"am-attendees-plus"},[e._v("\n "+e._s(t.persons)+" x "+e._s(t.name)+"\n ")])}),0):e._e()])],1),e._v(" "),i("el-row",{staticClass:"am-payment-details-row am-payment-summary"},[i("el-col",{attrs:{span:12}},[i("p",[e._v(e._s(e.$root.labels[("appointment"===e.modalData.bookableType?"service":"event"===e.modalData.bookableType?"event":"package")+"_price"]))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?i("p",[e._v(e._s(e.$root.labels.extras))]):e._e(),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?i("p",[e._v(e._s(e.$root.labels.subtotal))]):e._e(),e._v(" "),i("p",[e._v(e._s(e.$root.labels.discount_amount))]),e._v(" "),e.payments.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).length?i("p",[e._v(e._s(e.$root.labels.tax))]):e._e(),e._v(" "),1===e.payments.length?i("p",[e._v(e._s(e.$root.labels.paid))]):e._e(),e._v(" "),e.payments.length>1?i("p",[e._v(e._s(e.$root.labels.paid_deposit))]):e._e(),e._v(" "),e.payments.length>1?i("p",[e._v(e._s(e.$root.labels.paid_remaining_amount))]):e._e(),e._v(" "),i("p",[e._v(e._s(e.$root.labels.due))]),e._v(" "),i("p",{staticClass:"am-payment-total"},[e._v(e._s(e.$root.labels.total))])]),e._v(" "),i("el-col",{attrs:{span:12}},[i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.bookablePriceTotal)))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.extrasPriceTotal)))]):e._e(),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.subTotal)))]):e._e(),e._v(" "),i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.discountTotal>e.finance.subTotal?e.finance.subTotal:e.finance.discountTotal)))]),e._v(" "),e.payment.wcOrderId&&e.payment.wcItemTaxValue?i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.reduce(function(e,t){return e+t.wcItemTaxValue},0))))]):e._e(),e._v(" "),1===e.payments.length?i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.filter(function(e){return"pending"!==e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),e.payments.length>1?i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.filter(function(e){return"partiallyPaid"===e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),e.payments.length>1?i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.filter(function(e){return"partiallyPaid"!==e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),i("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.due)+(e.payments[0].wcItemTaxValue&&e.finance.due>0?e.$root.labels.plus_tax:"")))]),e._v(" "),i("p",{staticClass:"am-semi-strong am-payment-total"},[e._v(e._s(e.getFormattedPrice(e.finance.total)+(e.payments[0].wcItemTaxValue&&e.finance.due>0?e.$root.labels.plus_tax:"")))])])],1)],2)]),e._v(" "),!0!==e.$root.settings.capabilities.canWriteOthers||e.dialogLoading?e._e():i("div",{staticClass:"am-dialog-footer"},[i("div",{staticClass:"am-dialog-footer-actions"},[i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[i("h3",[e._v(e._s(e.$root.labels.confirm_delete_payment))]),e._v(" "),i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.showDeleteConfirmation=!1}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),i("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deletePayment()}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)])]),e._v(" "),i("transition",{attrs:{name:"slide-vertical"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.showUpdatePaymentAmount,expression:"showUpdatePaymentAmount"}],staticClass:"am-dialog-confirmation"},[i("el-form",{attrs:{"label-position":"top"}},[i("h3",[e._v(e._s(e.$root.labels.enter_new_payment_amount))]),e._v(" "),i("el-row",{staticClass:"am-no-padding",attrs:{gutter:24}},[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.payment+":"}},[i("money",e._b({staticClass:"el-input__inner",model:{value:e.payment.amount,callback:function(t){e.$set(e.payment,"amount",t)},expression:"payment.amount"}},"money",e.moneyComponentData,!1))],1)],1),e._v(" "),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$root.labels.status+":"}},[i("el-select",{model:{value:e.payment.status,callback:function(t){e.$set(e.payment,"status",t)},expression:"payment.status"}},e._l(e.paymentStatuses,function(t){return i("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[i("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.value}),e._v(" "),i("span",[e._v(e._s(t.label))])])}),1)],1)],1)],1),e._v(" "),i("div",{staticClass:"align-left"},[i("el-button",{attrs:{size:"small"},on:{click:function(t){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount}}},[e._v("\n "+e._s(e.$root.labels.close)+"\n ")])],1)],1)],1)]),e._v(" "),i("el-row",[i("el-col",{staticClass:"align-left",attrs:{sm:6}},[!0===e.$root.settings.capabilities.canDelete?i("el-button",{staticClass:"am-button-icon",on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.showUpdatePaymentAmount=!1}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e(),e._v(" "),1===e.payments.length?i("el-button",{staticClass:"am-button-icon",on:{click:function(t){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount,e.showDeleteConfirmation=!1}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]):e._e()],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{sm:18}},[i("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:function(t){return e.updatePayment()}}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},823:function(e,t,i){var o,n;!function(a){"use strict";void 0===(n="function"==typeof(o=a)?o.call(t,i,t,e):o)||(e.exports=n)}(function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var e,t,i,o,n,a,s,r,l,c,u,d,p,m,f,h,g,v,b,y,_,k,x,C,w,S,P,$,T=[],E=!1,O=!1,D=!1,A=[],N=!1,I=!1,L=[],F=/\s+/g,R="Sortable"+(new Date).getTime(),j=window,B=j.document,q=j.parseInt,M=j.setTimeout,U=j.jQuery||j.Zepto,z=j.Polymer,H={capture:!1,passive:!1},V=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),Y=!!navigator.userAgent.match(/Edge/i),G=!!navigator.userAgent.match(/firefox/i),K=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),W=!!navigator.userAgent.match(/iP(ad|od|hone)/i),J=Y||V?"cssFloat":"float",Z="draggable"in B.createElement("div"),X=function(){if(V)return!1;var e=B.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),Q=!1,ee=!1,te=Math.abs,ie=Math.min,oe=Math.max,ne=[],ae=function(e,t){var i=Ce(e),o=q(i.width)-q(i.paddingLeft)-q(i.paddingRight)-q(i.borderLeftWidth)-q(i.borderRightWidth),n=Oe(e,0,t),a=Oe(e,1,t),s=n&&Ce(n),r=a&&Ce(a),l=s&&q(s.marginLeft)+q(s.marginRight)+Me(n).width,c=r&&q(r.marginLeft)+q(r.marginRight)+Me(a).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&"none"!==s.float){var u="left"===s.float?"left":"right";return!a||"both"!==r.clear&&r.clear!==u?"horizontal":"vertical"}return n&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===i[J]||a&&"none"===i[J]&&l+c>o)?"vertical":"horizontal"},se=function(e,t){if(!e||!e.getBoundingClientRect)return re();var i=e,o=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var n=Ce(i);if(i.clientWidth<i.scrollWidth&&("auto"==n.overflowX||"scroll"==n.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==n.overflowY||"scroll"==n.overflowY)){if(!i||!i.getBoundingClientRect||i===B.body)return re();if(o||t)return i;o=!0}}}while(i=i.parentNode);return re()},re=function(){return V?B.documentElement:B.scrollingElement},le=function(e,t,i){e.scrollLeft+=t,e.scrollTop+=i},ce=Fe(function(e,t,i,o){if(t.scroll){var n=i?i[R]:window,a=t.scrollSensitivity,s=t.scrollSpeed,u=e.clientX,d=e.clientY,p=re(),m=!1;l!==i&&(ue(),r=t.scroll,c=t.scrollFn,!0===r&&(r=se(i,!0),l=r));var f=0,h=r;do{var g,v,b,y,k,x,C,w,S,P=h,$=Me(P),O=$.top,D=$.bottom,A=$.left,N=$.right,I=$.width,L=$.height;if(g=P.scrollWidth,v=P.scrollHeight,b=Ce(P),w=P.scrollLeft,S=P.scrollTop,P===p?(x=I<g&&("auto"===b.overflowX||"scroll"===b.overflowX||"visible"===b.overflowX),C=L<v&&("auto"===b.overflowY||"scroll"===b.overflowY||"visible"===b.overflowY)):(x=I<g&&("auto"===b.overflowX||"scroll"===b.overflowX),C=L<v&&("auto"===b.overflowY||"scroll"===b.overflowY)),y=x&&(te(N-u)<=a&&w+I<g)-(te(A-u)<=a&&!!w),k=C&&(te(D-d)<=a&&S+L<v)-(te(O-d)<=a&&!!S),!T[f])for(var F=0;F<=f;F++)T[F]||(T[F]={});T[f].vx==y&&T[f].vy==k&&T[f].el===P||(T[f].el=P,T[f].vx=y,T[f].vy=k,clearInterval(T[f].pid),!P||0==y&&0==k||(m=!0,T[f].pid=setInterval(function(){o&&0===this.layer&&(ve.active._emulateDragOver(!0),ve.active._onTouchMove(_,!0));var t=T[this.layer].vy?T[this.layer].vy*s:0,i=T[this.layer].vx?T[this.layer].vx*s:0;"function"==typeof c&&"continue"!==c.call(n,i,t,e,_,T[this.layer].el)||le(T[this.layer].el,i,t)}.bind({layer:f}),24))),f++}while(t.bubbleScroll&&h!==p&&(h=se(h,!1)));E=m}},30),ue=function(){T.forEach(function(e){clearInterval(e.pid)}),T=[]},de=function(e){function t(e,i){return function(o,n,a,s){var r=o.options.group.name&&n.options.group.name&&o.options.group.name===n.options.group.name;if(null==e&&(i||r))return!0;if(null==e||!1===e)return!1;if(i&&"clone"===e)return e;if("function"==typeof e)return t(e(o,n,a,s),i)(o,n,a,s);var l=(i?o:n).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var i={},o=e.group;o&&"object"==typeof o||(o={name:o}),i.name=o.name,i.checkPull=t(o.pull,!0),i.checkPut=t(o.put),i.revertClone=o.revertClone,e.group=i},pe=function(t){e&&e.parentNode&&e.parentNode[R]&&e.parentNode[R]._computeIsAligned(t)},me=function(){!X&&i&&Ce(i,"display","none")},fe=function(){!X&&i&&Ce(i,"display","")};B.addEventListener("click",function(e){if(D)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),D=!1,!1},!0);var he,ge=function(t){if(e){var i=function(e,t){for(var i=0;i<A.length;i++)if(!De(A[i])){var o=Me(A[i]),n=A[i][R].options.emptyInsertThreshold,a=e>=o.left-n&&e<=o.right+n,s=t>=o.top-n&&t<=o.bottom+n;if(n&&a&&s)return A[i]}}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(i){var o={};for(var n in t)o[n]=t[n];o.target=o.rootEl=i,o.preventDefault=void 0,o.stopPropagation=void 0,i[R]._onDragOver(o)}}};function ve(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Re({},t),e[R]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ae(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:q(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==ve.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in i)!(o in t)&&(t[o]=i[o]);for(var n in de(t),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!t.forceFallback&&Z,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?_e(e,"pointerdown",this._onTapStart):(_e(e,"mousedown",this._onTapStart),_e(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(_e(e,"dragover",this),_e(e,"dragenter",this)),A.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[])}function be(e,t,i,o){if(e){i=i||B;do{if(null!=t&&(">"===t[0]?e.parentNode===i&&Le(e,t):Le(e,t))||o&&e===i)return e;if(e===i)break}while(e=ye(e))}return null}function ye(e){return e.host&&e!==B&&e.host.nodeType?e.host:e.parentNode}function _e(e,t,i){e.addEventListener(t,i,!V&&H)}function ke(e,t,i){e.removeEventListener(t,i,!V&&H)}function xe(e,t,i){if(e&&t)if(e.classList)e.classList[i?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(F," ").replace(" "+t+" "," ");e.className=(o+(i?" "+t:"")).replace(F," ")}}function Ce(e,t,i){var o=e&&e.style;if(o){if(void 0===i)return B.defaultView&&B.defaultView.getComputedStyle?i=B.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),void 0===t?i:i[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=i+("string"==typeof i?"":"px")}}function we(e){var t="";do{var i=Ce(e,"transform");i&&"none"!==i&&(t=i+" "+t)}while(e=e.parentNode);return window.DOMMatrix?new DOMMatrix(t):window.WebKitCSSMatrix?new WebKitCSSMatrix(t):window.CSSMatrix?new CSSMatrix(t):void 0}function Se(e,t,i){if(e){var o=e.getElementsByTagName(t),n=0,a=o.length;if(i)for(;n<a;n++)i(o[n],n);return o}return[]}function Pe(e,t,i,n,a,s,r,l,c,u,d){var p,m=(e=e||t[R]).options,f="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||V||Y?(p=B.createEvent("Event")).initEvent(i,!0,!0):p=new CustomEvent(i,{bubbles:!0,cancelable:!0}),p.to=a||t,p.from=s||t,p.item=n||t,p.clone=o,p.oldIndex=r,p.newIndex=l,p.oldDraggableIndex=c,p.newDraggableIndex=u,p.originalEvent=d,p.pullMode=h?h.lastPutMode:void 0,t&&t.dispatchEvent(p),m[f]&&m[f].call(e,p)}function $e(e,t,i,o,n,a,s,r){var l,c,u=e[R],d=u.options.onMove;return!window.CustomEvent||V||Y?(l=B.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=i,l.draggedRect=o,l.related=n||t,l.relatedRect=a||Me(t),l.willInsertAfter=r,l.originalEvent=s,e.dispatchEvent(l),d&&(c=d.call(u,l,s)),c}function Te(e){e.draggable=!1}function Ee(){Q=!1}function Oe(t,o,n){for(var a=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==i&&r[s]!==e&&be(r[s],n.draggable,t,!1)){if(a===o)return r[s];a++}s++}return null}function De(e){for(var t=e.lastElementChild;t&&(t===i||"none"===Ce(t,"display"));)t=t.previousElementSibling;return t||null}function Ae(t){return Ie(e)<Ie(t)?1:-1}function Ne(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,i=t.length,o=0;i--;)o+=t.charCodeAt(i);return o.toString(36)}function Ie(e,t){var i=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"===e.nodeName.toUpperCase()||e===o||t&&!Le(e,t)||i++;return i}function Le(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function Fe(e,t){return function(){if(!he){var i=arguments,o=this;he=M(function(){1===i.length?e.call(o,i[0]):e.apply(o,i),he=void 0},t)}}}function Re(e,t){if(e&&t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function je(e){return z&&z.dom?z.dom(e).cloneNode(!0):U?U(e).clone(!0)[0]:e.cloneNode(!0)}function Be(e){return M(e,0)}function qe(e){return clearTimeout(e)}function Me(e,t,i,o){if(e.getBoundingClientRect||e===j){var n,a,s,r,l,c,u;if(e!==j&&e!==re()?(a=(n=e.getBoundingClientRect()).top,s=n.left,r=n.bottom,l=n.right,c=n.height,u=n.width):(a=0,s=0,r=window.innerHeight,l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),o&&e!==j&&(i=i||e.parentNode,!V))do{if(i&&i.getBoundingClientRect&&"none"!==Ce(i,"transform")){var d=i.getBoundingClientRect();a-=d.top+q(Ce(i,"border-top-width")),s-=d.left+q(Ce(i,"border-left-width")),r=a+n.height,l=s+n.width;break}}while(i=i.parentNode);if(t&&e!==j){var p=we(i||e),m=p&&p.a,f=p&&p.d;p&&(r=(a/=f)+(c/=f),l=(s/=m)+(u/=m))}return{top:a,left:s,bottom:r,right:l,width:u,height:c}}}function Ue(e,t){for(var i=se(e,!0),o=Me(e)[t];i;){var n=Me(i)[t];if(!("top"===t||"left"===t?o>=n:o<=n))return i;if(i===re())break;i=se(i,!1)}return!1}function ze(e){var t=0,i=0,o=re();if(e)do{var n=we(e),a=n.a,s=n.d;t+=e.scrollLeft*a,i+=e.scrollTop*s}while(e!==o&&(e=e.parentNode));return[t,i]}return ve.prototype={constructor:ve,_computeIsAligned:function(t){var o;if(i&&!X?(me(),o=B.elementFromPoint(t.clientX,t.clientY),fe()):o=t.target,o=be(o,this.options.draggable,this.el,!1),!ee&&e&&e.parentNode===this.el){for(var n,a,s,r,l,c,u,d,p=this.el.children,m=0;m<p.length;m++)be(p[m],this.options.draggable,this.el,!1)&&p[m]!==o&&(p[m].sortableMouseAligned=(n=t.clientX,a=t.clientY,s=p[m],r=this._getDirection(t,null),this.options,void 0,void 0,void 0,void 0,l=Me(s),c="vertical"===r?l.left:l.top,u="vertical"===r?l.right:l.bottom,c<(d="vertical"===r?n:a)&&d<u));be(o,this.options.draggable,this.el,!0)||(x=null),ee=!0,M(function(){ee=!1},30)}},_getDirection:function(t,i){return"function"==typeof this.options.direction?this.options.direction.call(this,t,i,e):this.options.direction},_onTapStart:function(t){if(t.cancelable){var i,o,n=this,a=this.el,r=this.options,l=r.preventOnFilter,c=t.type,u=t.touches&&t.touches[0],d=(u||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||d,m=r.filter;if(function(e){ne.length=0;var t=e.getElementsByTagName("input"),i=t.length;for(;i--;){var o=t[i];o.checked&&ne.push(o)}}(a),!e&&!(/mousedown|pointerdown/.test(c)&&0!==t.button||r.disabled||p.isContentEditable||(d=be(d,r.draggable,a,!1),s===d))){if(i=Ie(d),o=Ie(d,r.draggable),"function"==typeof m){if(m.call(this,t,d,this))return Pe(n,p,"filter",d,a,a,i,void 0,o),void(l&&t.cancelable&&t.preventDefault())}else if(m&&(m=m.split(",").some(function(e){if(e=be(p,e.trim(),a,!1))return Pe(n,e,"filter",d,a,a,i,void 0,o),!0})))return void(l&&t.cancelable&&t.preventDefault());r.handle&&!be(p,r.handle,a,!1)||this._prepareDragStart(t,u,d,i,o)}}},_handleAutoScroll:function(t,i){if(e&&this.options.scroll){var o=t.clientX,n=t.clientY,a=B.elementFromPoint(o,n),s=this;if(i||Y||V||K){ce(t,s.options,a,i);var r=se(a,!0);!E||g&&o===v&&n===b||(g&&clearInterval(g),g=setInterval(function(){if(e){var a=se(B.elementFromPoint(o,n),!0);a!==r&&(r=a,ue(),ce(t,s.options,r,i))}},10),v=o,b=n)}else{if(!s.options.bubbleScroll||se(a,!0)===re())return void ue();ce(t,s.options,se(a,!1),!1)}}},_prepareDragStart:function(i,o,r,l,c){var d,m=this,h=m.el,g=m.options,v=h.ownerDocument;r&&!e&&r.parentNode===h&&(n=h,t=(e=r).parentNode,a=e.nextSibling,s=r,f=g.group,u=l,p=c,y={target:e,clientX:(o||i).clientX,clientY:(o||i).clientY},this._lastX=(o||i).clientX,this._lastY=(o||i).clientY,e.style["will-change"]="all",e.style.transition="",e.style.transform="",d=function(){m._disableDelayedDragEvents(),!G&&m.nativeDraggable&&(e.draggable=!0),m._triggerDragStart(i,o),Pe(m,n,"choose",e,n,n,u,void 0,p),xe(e,g.chosenClass,!0)},g.ignore.split(",").forEach(function(t){Se(e,t.trim(),Te)}),_e(v,"dragover",ge),_e(v,"mousemove",ge),_e(v,"touchmove",ge),_e(v,"mouseup",m._onDrop),_e(v,"touchend",m._onDrop),_e(v,"touchcancel",m._onDrop),G&&this.nativeDraggable&&(this.options.touchStartThreshold=4,e.draggable=!0),!g.delay||g.delayOnTouchOnly&&!o||this.nativeDraggable&&(Y||V)?d():(_e(v,"mouseup",m._disableDelayedDrag),_e(v,"touchend",m._disableDelayedDrag),_e(v,"touchcancel",m._disableDelayedDrag),_e(v,"mousemove",m._delayedDragTouchMoveHandler),_e(v,"touchmove",m._delayedDragTouchMoveHandler),g.supportPointer&&_e(v,"pointermove",m._delayedDragTouchMoveHandler),m._dragStartTimer=M(d,g.delay)))},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;oe(te(t.clientX-this._lastX),te(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){e&&Te(e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ke(e,"mouseup",this._disableDelayedDrag),ke(e,"touchend",this._disableDelayedDrag),ke(e,"touchcancel",this._disableDelayedDrag),ke(e,"mousemove",this._delayedDragTouchMoveHandler),ke(e,"touchmove",this._delayedDragTouchMoveHandler),ke(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,i){i=i||("touch"==t.pointerType?t:null),!this.nativeDraggable||i?this.options.supportPointer?_e(B,"pointermove",this._onTouchMove):_e(B,i?"touchmove":"mousemove",this._onTouchMove):(_e(e,"dragend",this),_e(n,"dragstart",this._onDragStart));try{B.selection?Be(function(){B.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(t,i){if(O=!1,n&&e){this.nativeDraggable&&(_e(B,"dragover",this._handleAutoScroll),_e(B,"dragover",pe));var o=this.options;!t&&xe(e,o.dragClass,!1),xe(e,o.ghostClass,!0),Ce(e,"transform",""),ve.active=this,t&&this._appendGhost(),Pe(this,n,"start",e,n,n,u,void 0,p,void 0,i)}else this._nulling()},_emulateDragOver:function(t){if(_){if(this._lastX===_.clientX&&this._lastY===_.clientY&&!t)return;this._lastX=_.clientX,this._lastY=_.clientY,me();for(var i=B.elementFromPoint(_.clientX,_.clientY),o=i;i&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(_.clientX,_.clientY))!==o;)o=i;if(o)do{if(o[R])if(o[R]._onDragOver({clientX:_.clientX,clientY:_.clientY,target:i,rootEl:o})&&!this.options.dragoverBubble)break;i=o}while(o=o.parentNode);e.parentNode[R]._computeIsAligned(_),fe()}},_onTouchMove:function(e,t){if(y){var o=this.options,n=o.fallbackTolerance,a=o.fallbackOffset,s=e.touches?e.touches[0]:e,r=i&&we(i),l=i&&r&&r.a,c=i&&r&&r.d,u=W&&P&&ze(P),d=(s.clientX-y.clientX+a.x)/(l||1)+(u?u[0]-L[0]:0)/(l||1),p=(s.clientY-y.clientY+a.y)/(c||1)+(u?u[1]-L[1]:0)/(c||1),m=e.touches?"translate3d("+d+"px,"+p+"px,0)":"translate("+d+"px,"+p+"px)";if(!ve.active&&!O){if(n&&ie(te(s.clientX-this._lastX),te(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}!t&&this._handleAutoScroll(s,!0),k=!0,_=s,Ce(i,"webkitTransform",m),Ce(i,"mozTransform",m),Ce(i,"msTransform",m),Ce(i,"transform",m),e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!i){var t=this.options.fallbackOnBody?B.body:n,o=Me(e,!0,t,!W),a=(Ce(e),this.options);if(W){for(P=t;"static"===Ce(P,"position")&&"none"===Ce(P,"transform")&&P!==B;)P=P.parentNode;if(P!==B){var s=Me(P,!0);o.top-=s.top,o.left-=s.left}P!==B.body&&P!==B.documentElement?(P===B&&(P=re()),o.top+=P.scrollTop,o.left+=P.scrollLeft):P=re(),L=ze(P)}xe(i=e.cloneNode(!0),a.ghostClass,!1),xe(i,a.fallbackClass,!0),xe(i,a.dragClass,!0),Ce(i,"box-sizing","border-box"),Ce(i,"margin",0),Ce(i,"top",o.top),Ce(i,"left",o.left),Ce(i,"width",o.width),Ce(i,"height",o.height),Ce(i,"opacity","0.8"),Ce(i,"position",W?"absolute":"fixed"),Ce(i,"zIndex","100000"),Ce(i,"pointerEvents","none"),t.appendChild(i)}},_onDragStart:function(t,i){var a=this,s=t.dataTransfer,r=a.options;(o=je(e)).draggable=!1,o.style["will-change"]="",this._hideClone(),xe(o,a.options.chosenClass,!1),a._cloneId=Be(function(){a.options.removeCloneOnHide||n.insertBefore(o,e),Pe(a,n,"clone",e)}),!i&&xe(e,r.dragClass,!0),i?(D=!0,a._loopId=setInterval(a._emulateDragOver,50)):(ke(B,"mouseup",a._onDrop),ke(B,"touchend",a._onDrop),ke(B,"touchcancel",a._onDrop),s&&(s.effectAllowed="move",r.setData&&r.setData.call(a,s,e)),_e(B,"drop",a),Ce(e,"transform","translateZ(0)")),O=!0,a._dragStartId=Be(a._dragStarted.bind(a,i,t)),_e(B,"selectstart",a),K&&Ce(B.body,"user-select","none")},_onDragOver:function(i){var o,s,r,l=this.el,c=i.target,d=this.options,m=d.group,g=ve.active,v=f===m,b=d.sort,y=this;if(!Q){if(void 0!==i.preventDefault&&i.cancelable&&i.preventDefault(),k=!0,c=be(c,d.draggable,l,!0),e.contains(i.target)||c.animated)return H(!1);if(c!==e&&(D=!1),g&&!d.disabled&&(v?b||(r=!n.contains(e)):h===this||(this.lastPutMode=f.checkPull(this,g,e,i))&&m.checkPut(this,g,e,i))){var _=this._getDirection(i,c);if(o=Me(e),r)return this._hideClone(),t=n,a?n.insertBefore(e,a):n.appendChild(e),H(!0);var P=De(l);if(!P||function(e,t,i){var o=Me(De(i)),n="vertical"===t?e.clientY:e.clientX,a="vertical"===t?e.clientX:e.clientY,s="vertical"===t?o.bottom:o.right,r="vertical"===t?o.left:o.top,l="vertical"===t?o.right:o.bottom;return"vertical"===t?a>l+10||a<=l&&n>s&&a>=r:n>s&&a>r||n<=s&&a>l+10}(i,_,l)&&!P.animated){if(P&&l===i.target&&(c=P),c&&(s=Me(c)),v?g._hideClone():g._showClone(this),!1!==$e(n,l,e,o,c,s,i,!!c))return l.appendChild(e),t=l,$=null,V(),H(!0)}else if(c&&c!==e&&c.parentNode===l){var T,E=0,O=c.sortableMouseAligned,A=e.parentNode!==l,L="vertical"===_?"top":"left",F=Ue(c,"top")||Ue(e,"top"),j=F?F.scrollTop:void 0;if(x!==c&&(w=null,T=Me(c)[L],N=!1),function(t,i,o){var n=t===e&&$||Me(t),a=i===e&&$||Me(i),s="vertical"===o?n.left:n.top,r="vertical"===o?n.right:n.bottom,l="vertical"===o?n.width:n.height,c="vertical"===o?a.left:a.top,u="vertical"===o?a.right:a.bottom,d="vertical"===o?a.width:a.height;return s===c||r===u||s+l/2===c+d/2}(e,c,_)&&O||A||F||d.invertSwap||"insert"===w||"swap"===w?("swap"!==w&&(I=d.invertSwap||A),E=function(t,i,o,n,a,s,r){var l=Me(i),c="vertical"===o?t.clientY:t.clientX,u="vertical"===o?l.height:l.width,d="vertical"===o?l.top:l.left,p="vertical"===o?l.bottom:l.right,m=Me(e),f=!1;if(!s)if(r&&S<u*n)if(!N&&(1===C?c>d+u*a/2:c<p-u*a/2)&&(N=!0),N)f=!0;else{"vertical"===o?m.top:m.left,"vertical"===o?m.bottom:m.right;if(1===C?c<d+S:c>p-S)return-1*C}else if(c>d+u*(1-n)/2&&c<p-u*(1-n)/2)return Ae(i);if((f=f||s)&&(c<d+u*a/2||c>p-u*a/2))return c>d+u/2?1:-1;return 0}(i,c,_,d.swapThreshold,null==d.invertedSwapThreshold?d.swapThreshold:d.invertedSwapThreshold,I,x===c),w="swap"):(E=Ae(c),w="insert"),0===E)return H(!1);$=null,x=c,C=E,s=Me(c);var q=c.nextElementSibling,U=!1,z=$e(n,l,e,o,c,s,i,U=1===E);if(!1!==z)return 1!==z&&-1!==z||(U=1===z),Q=!0,M(Ee,30),v?g._hideClone():g._showClone(this),U&&!q?l.appendChild(e):c.parentNode.insertBefore(e,U?q:c),F&&le(F,0,j-F.scrollTop),t=e.parentNode,void 0===T||I||(S=te(T-Me(c)[L])),V(),H(!0)}if(l.contains(e))return H(!1)}return!1}function H(t){return t&&(v?g._hideClone():g._showClone(y),g&&(xe(e,h?h.options.ghostClass:g.options.ghostClass,!1),xe(e,d.ghostClass,!0)),h!==y&&y!==ve.active?h=y:y===ve.active&&(h=null),o&&y._animate(o,e),c&&s&&y._animate(s,c)),(c===e&&!e.animated||c===l&&!c.animated)&&(x=null),d.dragoverBubble||i.rootEl||c===B||(y._handleAutoScroll(i),e.parentNode[R]._computeIsAligned(i),!t&&ge(i)),!d.dragoverBubble&&i.stopPropagation&&i.stopPropagation(),!0}function V(){Pe(y,n,"change",c,l,n,u,Ie(e),p,Ie(e,d.draggable),i)}},_animate:function(t,i){var o=this.options.animation;if(o){var n=Me(i);if(i===e&&($=n),1===t.nodeType&&(t=Me(t)),t.left+t.width/2!==n.left+n.width/2||t.top+t.height/2!==n.top+n.height/2){var a=we(this.el),s=a&&a.a,r=a&&a.d;Ce(i,"transition","none"),Ce(i,"transform","translate3d("+(t.left-n.left)/(s||1)+"px,"+(t.top-n.top)/(r||1)+"px,0)"),this._repaint(i),Ce(i,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Ce(i,"transform","translate3d(0,0,0)")}"number"==typeof i.animated&&clearTimeout(i.animated),i.animated=M(function(){Ce(i,"transition",""),Ce(i,"transform",""),i.animated=!1},o)}},_repaint:function(e){return e.offsetWidth},_offMoveEvents:function(){ke(B,"touchmove",this._onTouchMove),ke(B,"pointermove",this._onTouchMove),ke(B,"dragover",ge),ke(B,"mousemove",ge),ke(B,"touchmove",ge)},_offUpEvents:function(){var e=this.el.ownerDocument;ke(e,"mouseup",this._onDrop),ke(e,"touchend",this._onDrop),ke(e,"pointerup",this._onDrop),ke(e,"touchcancel",this._onDrop),ke(B,"selectstart",this)},_onDrop:function(s){var r=this.el,l=this.options;O=!1,E=!1,I=!1,N=!1,clearInterval(this._loopId),clearInterval(g),ue(),clearTimeout(he),he=void 0,clearTimeout(this._dragStartTimer),qe(this._cloneId),qe(this._dragStartId),ke(B,"mousemove",this._onTouchMove),this.nativeDraggable&&(ke(B,"drop",this),ke(r,"dragstart",this._onDragStart),ke(B,"dragover",this._handleAutoScroll),ke(B,"dragover",pe)),K&&Ce(B.body,"user-select",""),this._offMoveEvents(),this._offUpEvents(),s&&(k&&(s.cancelable&&s.preventDefault(),!l.dropBubble&&s.stopPropagation()),i&&i.parentNode&&i.parentNode.removeChild(i),(n===t||h&&"clone"!==h.lastPutMode)&&o&&o.parentNode&&o.parentNode.removeChild(o),e&&(this.nativeDraggable&&ke(e,"dragend",this),Te(e),e.style["will-change"]="",xe(e,h?h.options.ghostClass:this.options.ghostClass,!1),xe(e,this.options.chosenClass,!1),Pe(this,n,"unchoose",e,t,n,u,null,p,null,s),n!==t?(d=Ie(e),m=Ie(e,l.draggable),d>=0&&(Pe(null,t,"add",e,t,n,u,d,p,m,s),Pe(this,n,"remove",e,t,n,u,d,p,m,s),Pe(null,t,"sort",e,t,n,u,d,p,m,s),Pe(this,n,"sort",e,t,n,u,d,p,m,s)),h&&h.save()):e.nextSibling!==a&&(d=Ie(e),m=Ie(e,l.draggable),d>=0&&(Pe(this,n,"update",e,t,n,u,d,p,m,s),Pe(this,n,"sort",e,t,n,u,d,p,m,s))),ve.active&&(null!=d&&-1!==d||(d=u,m=p),Pe(this,n,"end",e,t,n,u,d,p,m,s),this.save()))),this._nulling()},_nulling:function(){n=e=t=i=a=o=s=r=l=T.length=g=v=b=y=_=k=d=u=x=C=$=h=f=ve.active=null,ne.forEach(function(e){e.checked=!0}),ne.length=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":e&&(this._onDragOver(t),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var e,t=[],i=this.el.children,o=0,n=i.length,a=this.options;o<n;o++)be(e=i[o],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Ne(e));return t},sort:function(e){var t={},i=this.el;this.toArray().forEach(function(e,o){var n=i.children[o];be(n,this.options.draggable,i,!1)&&(t[e]=n)},this),e.forEach(function(e){t[e]&&(i.removeChild(t[e]),i.appendChild(t[e]))})},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return be(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var i=this.options;if(void 0===t)return i[e];i[e]=t,"group"===e&&de(i)},destroy:function(){var e=this.el;e[R]=null,ke(e,"mousedown",this._onTapStart),ke(e,"touchstart",this._onTapStart),ke(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(ke(e,"dragover",this),ke(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),A.splice(A.indexOf(this.el),1),this.el=e=null},_hideClone:function(){o.cloneHidden||(Ce(o,"display","none"),o.cloneHidden=!0,o.parentNode&&this.options.removeCloneOnHide&&o.parentNode.removeChild(o))},_showClone:function(t){"clone"===t.lastPutMode?o.cloneHidden&&(n.contains(e)&&!this.options.group.revertClone?n.insertBefore(o,e):a?n.insertBefore(o,a):n.appendChild(o),this.options.group.revertClone&&this._animate(e,o),Ce(o,"display",""),o.cloneHidden=!1):this._hideClone()}},_e(B,"touchmove",function(e){(ve.active||O)&&e.cancelable&&e.preventDefault()}),ve.utils={on:_e,off:ke,css:Ce,find:Se,is:function(e,t){return!!be(e,t,e,!1)},extend:Re,throttle:Fe,closest:be,toggleClass:xe,clone:je,index:Ie,nextTick:Be,cancelNextTick:qe,detectDirection:ae,getChild:Oe},ve.create=function(e,t){return new ve(e,t)},ve.version="1.9.0",ve})},824:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={template:"#picture-upload",props:{editedEntity:null,entityName:"",multiple:!1,disabled:!1},data:function(){return{pictureFullPath:"",pictureThumbPath:""}},mounted:function(){},methods:{openMediaModal:function(){if(!this.disabled){var e,t=this;e?e.open():((e=wp.media({title:"Select or Upload Profile Picture",button:{text:"Select picture"},multiple:this.multiple,library:{type:"image"}})).on("select",function(){var i=null;e.state().get("selection").forEach(function(e){i=e.toJSON(),t.pictureFullPath=i.url,t.pictureThumbPath=i.sizes.thumbnail?i.sizes.thumbnail.url:i.url,t.$emit("pictureSelected",t.pictureFullPath,t.pictureThumbPath)})}),e.open())}}},computed:{getPictureSrc:function(){return null!==this.editedEntity&&!this.pictureThumbPath&&this.editedEntity.pictureThumbPath?this.editedEntity.pictureThumbPath:this.pictureThumbPath&&"gallery"!==this.entityName?this.pictureThumbPath:this.$root.getUrl+"public/img/default-"+this.entityName+".svg"}}}},825:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-profile-photo",on:{click:e.openMediaModal}},[i("i",{class:{"el-icon-plus":"gallery"===e.entityName,"el-icon-picture":"gallery"!==e.entityName}}),e._v(" "),"gallery"===e.entityName?i("span",[e._v(e._s(e.$root.labels.add_image))]):e._e(),e._v(" "),"gallery"!==e.entityName?i("img",{attrs:{src:e.getPictureSrc,alt:""}}):e._e()])},staticRenderFns:[]}},826:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(772),n=i.n(o);t.default={name:"DialogTranslate",props:{passedTranslations:null,name:"",allLanguagesData:null,usedLanguages:null,type:{required:!1,default:"name",type:String},tab:"",cfOptions:{required:!1,default:function(){return[]},type:Array},eventTickets:{required:!1,default:function(){return[]},type:Array},hasQuill:!0},data:function(){return{translations:null,oldTranslations:null,newTranslations:[],settings:null,newLanguages:[],languageWidth:12,options:[],tickets:[],allLanguagesKeys:[]}},mounted:function(){var e=this;this.translations=this.passedTranslations?JSON.parse(this.passedTranslations):{},this.oldTranslations=this.translations[this.type]?this.translations[this.type]:{},(this.oldTranslations?this.usedLanguages.filter(function(t){return!Object.keys(e.oldTranslations).includes(t)}):this.usedLanguages).forEach(function(t){e.oldTranslations[t]=""}),_.isEmpty(this.oldTranslations)&&this.addLanguage(),this.oldTranslations=JSON.parse(JSON.stringify(this.oldTranslations)),"description"!==this.type&&"cf"!==this.tab&&"tickets"!==this.tab&&"url"!==this.type||(this.languageWidth=24);var t=JSON.parse(JSON.stringify(this.cfOptions));t.forEach(function(t){t.translations?t.translations=JSON.parse(t.translations):t.translations={},e.usedLanguages.forEach(function(e){t.translations[e]||(t.translations[e]="")})}),this.options=t;var i=JSON.parse(JSON.stringify(this.eventTickets));i.forEach(function(t){t.translations?t.translations=JSON.parse(t.translations):t.translations={},e.usedLanguages.forEach(function(e){t.translations[e]||(t.translations[e]="")})}),this.tickets=i,this.allLanguagesKeys=Object.keys(this.allLanguagesData)},computed:{dialogStyle:function(){return"cf"!==this.tab&&"tickets"!==this.tab&&"category"!==this.tab&&"roles"!==this.tab?"margin-bottom: 0":""}},methods:{saveDialog:function(){var e=this;this.newTranslations.forEach(function(t){t.lan&&(e.usedLanguages.includes(t.lan)||e.newLanguages.push(t.lan),e.oldTranslations[t.lan]=t.value)}),this.translations[this.type]=this.oldTranslations,this.options.forEach(function(e){e.edited=!0,e.translations=JSON.stringify(e.translations)}),this.tickets.forEach(function(e){e.edited=!0,e.translations=JSON.stringify(e.translations)}),this.$emit("saveDialogTranslate",JSON.stringify(this.translations),this.newLanguages,this.tab,this.options,this.tickets)},closeDialog:function(){this.$emit("closeDialogTranslate")},addLanguage:function(){this.newTranslations.push({lan:"",value:""})},getLanguageLabel:function(e,t){return!t||"name"!==this.type&&"firstName"!==this.type&&"lastName"!==this.type||"cf"===this.tab||"tickets"===this.tab?this.allLanguagesData[e].name:this.allLanguagesData[e].name.substring(0,21)},getLanguageFlag:function(e){return e&&this.allLanguagesData[e]&&this.allLanguagesData[e].country_code?this.$root.getUrl+"public/img/flags/"+this.allLanguagesData[e].country_code+".png":this.$root.getUrl+"public/img/grey.svg"},goBack:function(){"cf"===this.tab||"tickets"===this.tab||"category"===this.tab?this.closeDialog():this.saveDialog()},getHeaderTitle:function(){return"cf"===this.tab?this.$root.labels.translate+" "+this.$root.labels.custom_field:"tickets"===this.tab?this.$root.labels.translate+" "+this.$root.labels.event_tickets:"description"===this.type?this.$root.labels.translate+" "+this.$root.labels.description:"url"===this.type?this.$root.labels.url:this.$root.labels.translate+" "+this.name}},components:{ContentBlock:n.a}}},827:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-dialog-translate"},[i("div",{staticClass:"am-dialog-scrollable",style:e.dialogStyle},[i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:16}},[i("img",{staticClass:"am-dialog-translate-svg-back",attrs:{src:e.$root.getUrl+"public/img/arrow-back.svg"},on:{click:e.goBack}}),e._v(" "),i("h2",[e._v(e._s(e.getHeaderTitle()))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),i("BlockLite"),e._v(" "),e._l(e.oldTranslations,function(t,o){return i("div",{key:o,class:{"am-lite-container-disabled":e.$root.isLite}},[e.usedLanguages&&-1!==e.usedLanguages.indexOf(o)?i("el-row",{attrs:{gutter:28,type:"flex"}},[i("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:e.languageWidth,sm:e.languageWidth}},[i("div",{staticClass:"used-language"},[i("img",{staticClass:"am-dialog-translate-flag",attrs:{src:e.getLanguageFlag(o)}}),e._v("\n "+e._s(e.getLanguageLabel(o,!0))+"\n ")])]),e._v(" "),"name"!==e.type&&"firstName"!==e.type&&"lastName"!==e.type||"cf"===e.tab||"tickets"===e.tab?e._e():i("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:8,sm:14}},[i("el-input",{attrs:{type:"text",placeholder:e.$root.labels.translation},model:{value:e.oldTranslations[o],callback:function(t){e.$set(e.oldTranslations,o,t)},expression:"oldTranslations[key]"}})],1)],1):e._e(),e._v(" "),"description"===e.type&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(o)?i("el-row",{staticClass:"am-dialog-translate-description",staticStyle:{"margin-bottom":"8px"},attrs:{gutter:24,type:"flex"}},[i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:24}},[i("content-block",{attrs:{label:e.$root.labels.description,entity:e.oldTranslations,property:o,textProperty:o,htmlProperty:o+"Html",hasTranslation:!1,hasQuill:e.hasQuill,textModeProp:!0,allowImage:!1}})],1)],1):e._e(),e._v(" "),"url"===e.type&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(o)?i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:24}},[i("el-input",{attrs:{value:t},model:{value:e.oldTranslations[o],callback:function(t){e.$set(e.oldTranslations,o,t)},expression:"oldTranslations[key]"}})],1)],1):e._e(),e._v(" "),"cf"===e.tab&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(o)?i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:26,type:"flex"}},[i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf"},[e._v(" "+e._s(e.$root.labels.label_name)+" ")])]),e._v(" "),i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf-label"},[i("i",[e._v(e._s(e.name))])])]),e._v(" "),i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[i("el-input",{attrs:{value:t,type:"text",placeholder:" "},model:{value:e.oldTranslations[o],callback:function(t){e.$set(e.oldTranslations,o,t)},expression:"oldTranslations[key]"}})],1)],1):e._e(),e._v(" "),e._l(e.options,function(t,n){return e.cfOptions.length&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(o)?i("div",[i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf"},[e._v(" #"+e._s(n))])]),e._v(" "),i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf-label"},[i("i",[e._v(e._s(t.label))])])]),e._v(" "),i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[i("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[o],callback:function(i){e.$set(t.translations,o,i)},expression:"option['translations'][key]"}})],1)],1)],1):e._e()}),e._v(" "),e._l(e.tickets,function(t){return e.eventTickets.length&&e.usedLanguages&&-1!==e.usedLanguages.indexOf(o)?i("div",[i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf-label"},[i("i",[e._v(e._s(t.name))])])]),e._v(" "),i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:19}},[i("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[o],callback:function(i){e.$set(t.translations,o,i)},expression:"item['translations'][key]"}})],1)],1)],1):e._e()})],2)}),e._v(" "),e._l(e.newTranslations,function(t,o){return i("div",{key:o,class:{"am-lite-container-disabled":e.$root.isLite}},[i("el-row",{staticStyle:{"margin-right":"-15px"},attrs:{gutter:28,type:"flex"}},[i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:e.languageWidth}},[i("el-select",{attrs:{placeholder:e.$root.labels.language,clearable:"",filterable:"",disabled:e.$root.isLite},model:{value:e.newTranslations[o].lan,callback:function(t){e.$set(e.newTranslations[o],"lan",t)},expression:"newTranslations[index].lan"}},[i("template",{slot:"prefix"},[i("img",{staticClass:"am-dialog-translate-flag-selected",attrs:{src:e.getLanguageFlag(e.newTranslations[o].lan)}})]),e._v(" "),e._l(e.allLanguagesKeys,function(t,o){return i("el-option",{key:o,attrs:{label:e.getLanguageLabel(t,!1),value:t,disabled:t in e.oldTranslations}},[i("span",[i("img",{staticClass:"am-dialog-translate-flag",attrs:{src:e.getLanguageFlag(t)}}),e._v("\n "+e._s(e.getLanguageLabel(t,!1))+"\n ")])])})],2)],1),e._v(" "),"name"!==e.type&&"firstName"!==e.type&&"lastName"!==e.type||"cf"===e.tab||"tickets"===e.tab?e._e():i("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:14,sm:18}},[i("el-input",{attrs:{type:"text",name:t.name,placeholder:e.$root.labels.translation},model:{value:e.newTranslations[o].value,callback:function(t){e.$set(e.newTranslations[o],"value",t)},expression:"newTranslations[index].value"}})],1)],1),e._v(" "),"description"===e.type?i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[i("el-col",{attrs:{sm:24}},[i("el-input",{attrs:{value:t,type:"textarea",autosize:{minRows:4,maxRows:6}},model:{value:e.newTranslations[o].value,callback:function(t){e.$set(e.newTranslations[o],"value",t)},expression:"newTranslations[index].value"}})],1)],1):e._e(),e._v(" "),"url"===e.type?i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[i("el-col",{attrs:{sm:24}},[i("el-input",{attrs:{value:t},model:{value:e.newTranslations[o].value,callback:function(t){e.$set(e.newTranslations[o],"value",t)},expression:"newTranslations[index].value"}})],1)],1):e._e(),e._v(" "),"cf"===e.tab?i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf"},[e._v(" "+e._s(e.$root.labels.label_name)+" ")])]),e._v(" "),i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf-label"},[i("i",[e._v(e._s(e.name))])])]),e._v(" "),i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[i("el-input",{attrs:{type:"text",name:t.name},model:{value:e.newTranslations[o].value,callback:function(t){e.$set(e.newTranslations[o],"value",t)},expression:"newTranslations[index].value"}})],1)],1):e._e(),e._v(" "),e._l(e.options,function(t,n){return e.cfOptions.length?i("div",[i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf"},[e._v(" #"+e._s(n))])]),e._v(" "),i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf-label"},[i("i",[e._v(e._s(t.label))])])]),e._v(" "),i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[i("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[e.newTranslations[o].lan],callback:function(i){e.$set(t.translations,e.newTranslations[o].lan,i)},expression:"option['translations'][newTranslations[index].lan]"}})],1)],1)],1):e._e()}),e._v(" "),e._l(e.tickets,function(t){return e.eventTickets.length?i("div",[i("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[i("el-col",{attrs:{sm:5}},[i("div",{staticClass:"am-dialog-translate-cf-label"},[i("i",[e._v(e._s(t.name))])])]),e._v(" "),i("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:19}},[i("el-input",{attrs:{type:"text",placeholder:" "},model:{value:t.translations[e.newTranslations[o].lan],callback:function(i){e.$set(t.translations,e.newTranslations[o].lan,i)},expression:"item['translations'][newTranslations[index].lan]"}})],1)],1)],1):e._e()})],2)}),e._v(" "),"provider"!==e.$root.settings.role?i("div",{class:{"am-lite-container-disabled":e.$root.isLite}},[i("img",{staticClass:"am-dialog-translate-svg-plus",attrs:{src:e.$root.getUrl+"public/img/plus-circle.svg"},on:{click:function(t){!e.$root.isLite&&e.addLanguage}}}),e._v(" "),i("div",{staticClass:"add-language",on:{click:function(t){!e.$root.isLite&&e.addLanguage}}},[e._v(e._s(e.$root.labels.add_language))])]):e._e()],2),e._v(" "),"category"===e.tab||"cf"===e.tab||"tickets"===e.tab||"roles"===e.tab?i("div",{staticClass:"am-dialog-footer"},[i("div",{staticClass:"am-dialog-footer-actions"},[i("el-row",[i("el-col",{staticClass:"align-right",attrs:{sm:24}},[i("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v(e._s(e.$root.labels.cancel))]),e._v(" "),i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.saveDialog}},[e._v(e._s(e.$root.labels.save))])],1)],1)],1)]):e._e()])},staticRenderFns:[]}},867:function(e,t,i){"use strict";var o=i(707),n=i(338),a=i(727),s=i(725);t.a={mixins:[o.a,a.a,n.a,s.a],data:function(){return{recurringAppointments:[],customerCreatedCount:0,appointment:null,bookings:[],duplicateEvent:!1,exportAction:"",exportParams:{fields:[{label:this.$root.labels.customers,value:"customers",checked:!0},{label:this.$root.labels.employee,value:"employee",checked:!0},{label:this.$root.labels.service,value:"service",checked:!0},{label:this.$root.labels.start_time,value:"startTime",checked:!0},{label:this.$root.labels.end_time,value:"endTime",checked:!0},{label:this.$root.labels.payment_amount,value:"paymentAmount",checked:!0},{label:this.$root.labels.payment_status,value:"paymentStatus",checked:!0},{label:this.$root.labels.payment_method,value:"paymentMethod",checked:!0},{label:this.$root.labels.price,value:"price",checked:!0},{label:this.$root.labels.note,value:"note",checked:!0},{label:this.$root.labels.status,value:"status",checked:!0},{label:this.$root.labels.custom_fields,value:"customFields",checked:!0},{label:this.$root.labels.ph_booking_number_of_persons,value:"persons",checked:!0}]},savedAppointment:null,statuses:[{value:"approved",label:this.$root.labels.approved},{value:"pending",label:this.$root.labels.pending},{value:"canceled",label:this.$root.labels.canceled},{value:"rejected",label:this.$root.labels.rejected}],noShowStatus:[{value:"no-show",label:this.$root.labels["no-show"]}],options:{fetched:!1,availableEntitiesIds:{packages:[],categories:[],employees:[],locations:[],services:[]},entities:{categories:[],customers:[],customFields:[],employees:[],locations:[],services:[]}}}},methods:{getInitAppointmentObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=[];if(e){var i=this.options.entities.customers.find(function(t){return t.id===e.customerId});t=[{id:0,customer:i,status:this.$root.settings.general.defaultAppointmentStatus,duration:null,persons:1,total:0,extras:[],payments:[],price:0,coupon:null,added:!1,visible:!0,info:JSON.stringify({firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phone}),aggregatedPrice:null,packageCustomerService:{packageCustomer:{id:e.id}},customFields:{}}]}return{id:0,bookings:t,categoryId:"",serviceId:"",providerId:"",locationId:"",selectedDate:null,selectedPeriod:"",status:this.$root.settings.general.defaultAppointmentStatus,internalNotes:"",notifyParticipants:this.$root.settings.notifications.notifyCustomers,dateTimeSlots:[],calendarTimeSlots:[],occupiedTimeSlots:[],loadedDates:{},extrasTotalPrice:0,serviceTotalPrice:0,discountTotalPrice:0,providerServiceMinCapacity:0,providerServiceMaxCapacity:0,extrasCount:0,extrasSelectedCount:0,duration:0,lessonSpace:0}},showDialogNewAppointment:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.setBookings(0),this.savedAppointment=null,this.dialogAppointment=!0,setTimeout(function(){e.appointment=e.getInitAppointmentObject(t),1===e.options.entities.employees.length&&e.$root.isLite&&(e.appointment.providerId=e.options.entities.employees[0].id),t&&e.setBookingCustomFields()},500)},showDialogEditAppointment:function(e){var t=this;this.dialogAppointment=!0,setTimeout(function(){t.getAppointment(e)},500)},saveAppointmentCallback:function(){this.getAppointmentOptions(!0)},closeDialogAppointment:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.duplicateEvent=e,this.dialogAppointment=!1},setBookings:function(e){var t=[],i=this;this.options.entities.customers.forEach(function(o){if("hidden"!==o.status){var n=0,a=[],s=[],r=null,l=0,c=null,u=1,d=null,p=null,m=JSON.stringify({firstName:o.firstName,lastName:o.lastName,email:o.email,phone:o.phone});i.appointment&&e&&i.appointment.bookings.forEach(function(e){e.customerId===o.id&&(n=e.id,a=e.extras,s=e.payments,l=e.price,c=e.duration,u=e.persons,r=e.coupon,m=e.info,d=e.aggregatedPrice,p=e.packageCustomerService)}),t.push({id:n,customer:o,status:i.$root.settings.general.defaultAppointmentStatus,duration:c,persons:u,total:0,extras:a,payments:s,price:l,coupon:r,added:!1,info:m,aggregatedPrice:d,packageCustomerService:p,customFields:{}})}}),this.bookings=t},getAppointment:function(e){var t=this,i=null,o="";void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(o=""===this.$store.state.cabinet.timeZone?"UTC":this.$store.state.cabinet.timeZone,i=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType,timeZone:o}})),this.$http.get(this.$root.getAjaxUrl+"/appointments/"+e,i).then(function(i){var n=t;t.savedAppointment=JSON.parse(JSON.stringify(i.data.data.appointment)),t.savedAppointment.categoryId=t.getServiceById(t.savedAppointment.serviceId).categoryId,t.appointment=Object.assign(t.getInitAppointmentObject(null),i.data.data.appointment),t.appointment.notifyParticipants=!!t.appointment.notifyParticipants,"UTC"===o&&t.$root.settings.general.showClientTimeZone&&(t.appointment.bookingStart=t.getConvertedUtcToLocalDateTime(t.appointment.bookingStart),t.appointment.bookingEnd=t.getConvertedUtcToLocalDateTime(t.appointment.bookingEnd),t.savedAppointment.bookingStart=t.getConvertedUtcToLocalDateTime(t.savedAppointment.bookingStart),t.savedAppointment.bookingEnd=t.getConvertedUtcToLocalDateTime(t.savedAppointment.bookingEnd)),t.appointment.bookings.forEach(function(e){var t=null;n.options.entities.services.forEach(function(e){e.id===n.appointment.serviceId&&(t=JSON.parse(JSON.stringify(e.extras))).forEach(function(e){e.quantity=1,e.selected=!1})}),e.customer=null,e.added=!1,n.options.entities.customers.forEach(function(t){if(t.id===e.customerId){e.customer=t;var i=n.getCustomerInfo(e);0!==e.id&&i&&(e.info=JSON.stringify({firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phone})),e.added=!0}}),e.extras.forEach(function(e){t.forEach(function(t){t.extraId===e.extraId&&(t.id=e.id,t.selected=!0,t.quantity=e.quantity?e.quantity:1,t.price=e.price,t.aggregatedPrice=e.aggregatedPrice)})}),t.forEach(function(e){e.selected||(e.id=0)}),e.extras=t,"[]"!==e.customFields&&null!==e.customFields||(e.customFields="{}"),e.customFields=JSON.parse(e.customFields)}),t.setBookings(e),t.recurringAppointments=i.data.data.recurring,t.appointment.lessonSpace=null!==t.appointment.lessonSpace?t.appointment.lessonSpace.split("https://www.thelessonspace.com/space/")[1]:0,i.data.data.appointment.lessonSpaceDetails&&n.options.entities.spaces&&!n.options.entities.spaces.find(function(e){return e.id===i.data.data.appointment.lessonSpaceDetails.id})&&n.options.entities.spaces.push(i.data.data.appointment.lessonSpaceDetails)}).catch(function(e){console.log(e.message)})},sortBookings:function(e){e.sort(function(e,t){return(e.customer.firstName+" "+e.customer.lastName).localeCompare(t.customer.firstName+" "+t.customer.lastName)})},duplicateAppointmentCallback:function(e){var t=this;this.appointment=e,this.appointment.id=0,this.appointment.selectedDate=null,this.appointment.selectedPeriod="",this.appointment.dateTimeSlots=[],this.appointment.calendarTimeSlots=[],setTimeout(function(){t.dialogAppointment=!0},300)},getCustomersFromGroup:function(e){var t=this,i="";return e.bookings.forEach(function(e){if(t.options.entities.customers.length){var o=t.getCustomerInfo(e);o&&(i+='<span class="am-appointment-status-symbol am-appointment-status-symbol-'+e.status+'"></span><span>'+o.firstName+" "+o.lastName+"</span><br>")}}),i},saveCustomerCallback:function(e){delete e.user.birthday,this.options.entities.customers.push(e.user);var t=this.appointment&&this.appointment.serviceId?this.getServiceById(this.appointment.serviceId):null,i={id:0,customer:e.user,customerId:e.user.id,status:this.$root.settings.general.defaultAppointmentStatus,persons:1,duration:t?t.duration:null,total:0,extras:t?t.extras:[],payments:[],coupon:null,info:JSON.stringify({firstName:e.user.firstName,lastName:e.user.lastName,email:e.user.email,phone:e.user.phone}),customFields:[],added:!0};this.bookings.push(i),this.sortBookings(this.bookings),null!==this.appointment&&(this.appointment.bookings.push(i),this.sortBookings(this.appointment.bookings)),this.setBookingCustomFields(),this.customerCreatedCount++},updateAppointmentStatus:function(e,t,i){var o=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.updateStatusDisabled=!0,this.form.post(this.$root.getAjaxUrl+"/appointments/status/"+e.id,{status:t,packageCustomerId:"packageCustomerId"in e&&e.packageCustomerId?e.packageCustomerId:null}).then(function(a){var s=[];"bookingsWithChangedStatus"in a.data&&(s=a.data.bookingsWithChangedStatus.map(function(e){return e.id})),i&&o.setTotalStatusCounts(e,t,a.data.status,s),o.notify(t===a.data.status?o.$root.labels.success:o.$root.labels.error,o.$root.labels.appointment_status_changed+o.$root.labels[a.data.status].toLowerCase(),t===a.data.status?"success":"error"),e.status=a.data.status,"packageCustomerId"in e&&e.packageCustomerId&&n&&n(),o.updateStatusDisabled=!1}).catch(function(t){"timeSlotUnavailable"in t.response.data.data&&!0===t.response.data.data.timeSlotUnavailable&&(o.notify(o.$root.labels.error,o.$root.labels.time_slot_unavailable,"error"),e.status=t.response.data.data.status),o.updateStatusDisabled=!1})},packageTooltipContent:function(e){var t=this.bookingTypeCountInPackage(e),i="";for(var o in t.regular&&(i+=t.regular+"/"+e.length+" "+this.$root.labels.bookings_regular_tooltip+"<br/>"),t.package){var n=this.getPackageById(parseInt(o));i+=t.package[o].count+"/"+e.length+" "+this.$root.labels.bookings_package_tooltip+" <strong>"+(n?n.name:"Package")+"</strong><br/>"}return i},bookingTypeCountInPackage:function(e){for(var t={regular:0,package:{}},i=0;i<e.length;i++)if(null!==e[i].packageCustomerService){var o=e[i].packageCustomerService.packageCustomer.packageId,n=e[i].packageCustomerService.packageCustomer.payment;o in t.package?(t.package[o].count++,t.package[o].payment+=n?n.ampunt:0):t.package[o]={count:1,price:n?n.amount:0}}else t.regular++;return t},getAppointmentPaymentMethods:function(e){var t=[];return e.forEach(function(e){var i=e.payments.length?e.payments[0].gateway:null;""!==i&&null!==i||(i="onSite"),-1===t.indexOf(i)&&t.push(i)}),t},getAppointmentPayment:function(e){var t=this,i=[];return e.forEach(function(e){var o=e.payments.length?e.payments[0]:null;null===o&&(o="onSite"),i.find(function(e){return t.getPaymentType(e)===t.getPaymentType(o)})||i.push(o)}),i},editPayment:function(e){if(this.selectedPaymentModalData=this.getPaymentData(e.payment.id,e.package?null:this.savedAppointment,null,e.package),this.selectedPaymentModalData.customer=this.getCustomerById(e.payment.customerId),e.package){var t=e.payment;t.coupon=e.booking.packageCustomerService.packageCustomer.couponId?e.booking.coupon:null,this.selectedPaymentModalData.bookings[0]={price:e.booking.packageCustomerService.packageCustomer.price,payments:[t],extras:[]}}this.dialogPayment=!0},updatePaymentCallback:function(e){this.appointment.bookings.forEach(function(t){t.payments.forEach(function(i,o){i.id===e&&t.payments.splice(o,1)})}),this.dialogPayment=!1}},watch:{dialogAppointment:function(){!1===this.dialogAppointment&&!1===this.duplicateEvent&&(this.appointment=null)}}}},868:function(e,t,i){var o=i(335)(i(869),i(873),!1,null,null,null);e.exports=o.exports},869:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(710),n=i(775),a=i(707),s=i(338),r=i(701),l=i(721),c=i.n(l),u=i(870),d=i.n(u),p=i(817),m=i.n(p),f=i(702),h=i(697),g=i(696),v=i(0),b=i.n(v),y=i(700),_=i(699),k=i(782),x=i.n(k),C=i(726),w=i(785),S=i.n(w),P=i(712),$=i(748);t.default={mixins:[$.a,f.a,g.a,s.a,r.a,y.a,_.a,a.a,n.a,C.a,h.a,P.a,o.a],props:{currentUser:null,packageServices:null,selectedTimeZone:"",appointment:null,recurringAppointments:null,savedAppointment:null,bookings:null,options:null,customerCreatedCount:0,showHeader:{required:!1,default:!0,type:Boolean},haveDuplicate:{required:!1,default:!0,type:Boolean},hideAttachmentCustomField:{required:!1,default:!1,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1}},data:function(){var e=this,t=function(t,i,o){i||(e.newAppointmentTabs="schedule"),o()};return{saveConfirmMessage:null,calendarNavigating:!1,slotsIndexCounter:0,startDateTime:null,endDateTime:null,monthsLoad:0,searchSpacesTimer:null,loadingSpaces:!1,spaces:[],searchSpacesCounter:0,coupon:null,showCoupon:!1,clonedBookings:null,cachedClonedBookings:[],serviceUpdated:!1,recurringDatesChanged:!1,selectedRecurringDates:[],activeRecurring:!1,enabledRecurring:!1,initialRecurringData:null,recurringData:this.getDefaultRecurringData(),isProviderService:!0,availableDates:[],categorySpinnerActive:!1,dialogLoading:!0,disabledWeekdays:{weekdays:[1,2,3,4,5,6,7]},employeeSpinnerActive:!1,filter:null,locationSpinnerActive:!1,mounted:!1,newAppointmentTabs:"schedule",serviceSpinnerActive:!1,statusMessage:"",loadingTimeSlots:!1,payment:{amount:0,gateway:"onSite"},rulesInit:{bookings:[{required:!0,message:this.$root.labels.select_customer_warning,trigger:"submit",type:"array"},{validator:function(t,i,o){e.appointment.serviceId&&e.appointment.providerId&&e.isProviderService&&e.getApprovedPersonsCount()>e.appointment.providerServiceMaxCapacity?(e.newAppointmentTabs="schedule",o(new Error(e.$root.labels.select_max_customer_count_warning+" "+e.appointment.providerServiceMaxCapacity))):o()},trigger:"submit"}],serviceId:[{required:!0,message:this.$root.labels.select_service_warning,trigger:"submit",type:"number"}],providerId:[{required:!0,message:this.$root.labels.select_employee_warning,trigger:"submit",type:"number"}],selectedDate:[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.select_date_warning,trigger:"submit",type:"date"}],"selectedPeriod.time":[{validator:t,trigger:"submit"},{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}]},rules:{},statuses:[{id:1,value:"approved",label:this.$root.labels.approved},{id:0,value:"pending",label:this.$root.labels.pending},{id:2,value:"canceled",label:this.$root.labels.canceled},{id:3,value:"rejected",label:this.$root.labels.rejected}],noShowStatus:[{id:4,value:"no-show",label:this.$root.labels["no-show"]}],renderObject:{recurringSetupForm:{globalSettings:{formTextColor:"#ffffff",formGradientColor1:"#1A84EE",formGradientColor2:"#0454A2",formGradientAngle:135,formInputColor:"rgba(0, 0, 0, 0)",formInputTextColor:"#ffffff",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringSetupHeadingFormField:{labels:{recurring_active:{value:"",translations:{x:""}}},visibility:!0},recurringSettingsFormField:{labels:{recurring_repeat:{value:"",translations:{x:""}},recurring_every:{value:"",translations:{x:""}},recurring_on:{value:"",translations:{x:""}},recurring_until:{value:"",translations:{x:""}},recurring_times:{value:"",translations:{x:""}}}}}},recurringDatesForm:{globalSettings:{formBackgroundColor:"#ffffff",formTextColor:"#354052",formInputColor:"#ffffff",formInputTextColor:"#354052",formDropdownColor:"#ffffff",formDropdownTextColor:"#354052"},itemsStatic:{recurringDatesHeadingFormField:{labels:{recurring_appointments:{value:"",translations:{x:""}},recurring_edit:{value:"",translations:{x:""}}},visibility:!0},recurringInfoFormField:{labels:{date:{value:"",translations:{x:""}},time:{value:"",translations:{x:""}}}}}}}}},mounted:function(){this.monthsLoad=1,this.startDateTime=b()().startOf("month").format("YYYY-MM-DD"),this.endDateTime=null,this.appointment&&0===this.appointment.id&&this.instantiateDialog(),this.rules=this.rulesInit},methods:{changedMonth:function(e){void 0!==e&&"key"in e&&(this.availableDates=[],this.disabledWeekdays={weekdays:[1,2,3,4,5,6,7]},this.calendarNavigating=!0,this.startDateTime=b()(e.year+"-"+e.month+"-01 00:00","YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm"),this.endDateTime=b()(e.year+"-"+e.month+"-01 00:00","YYYY-MM-DD HH:mm").add(1,"month").format("YYYY-MM-DD HH:mm"),this.getTimeSlots(this.updateCalendar))},disableStatusChange:function(){return this.isCabinet&&b()(this.appointment.bookingStart)<b()()},getAllowedServices:function(){var e=this,t=[];return this.packageServices&&0===this.packageServices.length?[this.getServiceById(this.appointment.serviceId)]:(t=this.packageServices&&this.packageServices.length?this.servicesFiltered.filter(function(t){return-1!==e.packageServices.map(function(e){return e.id}).indexOf(t.id)}):this.servicesFiltered,this.packageServices&&this.packageServices.length&&this.appointment.id&&this.appointment.serviceId&&-1===t.map(function(e){return e.id}).indexOf(this.appointment.serviceId)&&t.push(this.getServiceById(this.appointment.serviceId)),t)},filterServices:function(){var e=this;this.options.entities.services.forEach(function(e){e.disabled=!1});var t=this.options.entities.coupons?this.options.entities.coupons.find(function(t){return t.id===e.coupon}):null;t&&this.options.entities.services.forEach(function(e){t.serviceList.map(function(e){return e.id}).includes(e.id)||(e.disabled=!0)})},searchExistingSpaces:function(e){var t=this;e?this.searchSpaces(e):setTimeout(function(){clearTimeout(t.searchSpacesTimer),t.spaces=t.options.entities.spaces},500)},searchSpaces:function(e){var t=this;clearTimeout(this.searchSpacesTimer),this.loadingSpaces=!0,this.searchSpacesCounter++,this.searchSpacesTimer=setTimeout(function(){var i=t.searchSpacesCounter;t.$http.get(t.$root.getAjaxUrl+"/entities",{params:{types:["lessonSpace_spaces"],lessonSpaceSearch:e}}).then(function(e){var o=t.options.entities.spaces;i>=t.searchSpacesCounter&&(o=e.data.data.spaces),t.spaces=o,t.loadingSpaces=!1}).catch(function(e){t.loadingSpaces=!1})},500)},searchExistingCustomers:function(e){var t=this;e?this.searchCustomers(e,this.setFilteredBookings):setTimeout(function(){clearTimeout(t.searchCustomersTimer),t.setFilteredBookings(!1)},500)},setFilteredBookings:function(e){var t=this,i=[];this.appointment.bookings.forEach(function(e){i.push(e.customerId)});var o=this.searchedCustomers;void 0===e||e||(o=this.options.entities.customers,this.clonedBookings=[]);var n=this.clonedBookings.map(function(e){return e.customer}).map(function(e){return e.id});o.forEach(function(e){-1===i.indexOf(e.id)&&-1===n.indexOf(e.id)&&t.clonedBookings.push({id:0,customer:e,status:t.$root.settings.general.defaultAppointmentStatus,duration:t.appointment.serviceId?t.getServiceById(t.appointment.serviceId).duration:null,persons:1,total:0,extras:[],payments:[],price:0,coupon:null,added:!1,visible:!0,info:JSON.stringify({firstName:e.firstName,lastName:e.lastName,email:e.email,phone:e.phone}),aggregatedPrice:null,packageCustomerService:null,customFields:{}})});for(var a=o.map(function(e){return e.id}),s=this.clonedBookings.length-1;s>=0;s--)-1===a.indexOf(this.clonedBookings[s].customer.id)?this.clonedBookings[s].visible=!1:this.clonedBookings[s].visible=!0},selectedTime:function(){var e=this,t=this,i=this.getStringFromDate(this.appointment.selectedDate);i in this.appointment.calendarTimeSlots&&this.appointment.selectedPeriod.time in this.appointment.calendarTimeSlots[i]&&this.appointment.calendarTimeSlots[i][this.appointment.selectedPeriod.time].forEach(function(e){e[0]===t.appointment.providerId&&(t.appointment.locationId=e[1])}),this.selectedRecurringDates.length?this.$nextTick(function(){e.refreshRecurringData()}):this.activeRecurring&&this.enabledRecurring&&this.setRecurringData(),this.clearValidation()},updateByCustomer:function(){var e=this;this.dialogLoading=!0;var t=this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time;this.$http.post(this.$root.getAjaxUrl+"/bookings/reassign/"+this.appointment.bookings[0].id,{bookingStart:t}).then(function(t){e.$emit("saveCallback",t),setTimeout(function(){e.dialogLoading=!1,e.$emit("closeDialog")},300),e.notify(e.$root.labels.success,e.$root.labels.appointment_rescheduled,"success")}).catch(function(t){if(t.response){e.dialogLoading=!1;var i=e;setTimeout(function(){"timeSlotUnavailable"in t.response.data.data&&!0===t.response.data.data.timeSlotUnavailable&&i.notify(i.$root.labels.error,i.$root.labels.time_slot_unavailable,"error"),"rescheduleBookingUnavailable"in t.response.data.data&&!0===t.response.data.data.rescheduleBookingUnavailable&&i.notify(i.$root.labels.error,i.$root.labels.booking_reschedule_exception,"error")},200)}})},editPayment:function(e){this.$emit("editPayment",e)},instantiateDialog:function(){null!==this.appointment&&(this.clonedBookings=JSON.parse(JSON.stringify(this.bookings)),this.spaces=this.options.entities.spaces,this.clonedBookings.forEach(function(e){e.visible=!0}),this.cachedClonedBookings=JSON.parse(JSON.stringify(this.clonedBookings)),"provider"===this.$root.settings.role&&(this.currentUser?this.appointment.providerId=this.currentUser.id:this.appointment.providerId=this.options.entities.employees[0].id),0!==this.appointment.id?(this.appointment.bookings.forEach(function(e){e.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)})}),this.activeRecurring=this.recurringAppointments.length>0,this.initialRecurringData=this.getDefaultRecurringSettings(this.appointment.selectedDate,this.getServiceById(this.appointment.serviceId).recurringCycle,this.appointment.calendarTimeSlots),this.setCategory(),this.setLocation(),this.handleCustomerChange(),this.coupon=this.appointment.bookings[0].coupon?this.appointment.bookings[0].coupon.id:null,this.showCoupon=!!this.coupon,this.startDateTime=b()(this.appointment.bookingStart,"YYYY-MM-DD HH:mm:ss").startOf("month").format("YYYY-MM-DD"),this.endDateTime=b()(this.appointment.bookingStart,"YYYY-MM-DD HH:mm:ss").startOf("month").add(1,"month").format("YYYY-MM-DD"),this.getTimeSlots(function(e,t){var i=this,o=i.appointment.bookingStart.split(" "),n=o[0],a=o[1].slice(0,-3);if(n in e){if(!(a in e[n])){var s=Object.keys(e[n]);s.push(a);var r={};s.sort().forEach(function(t){r[t]=t===a?[i.appointment.providerId]:e[n][t]}),e[n]=r}}else e[n]={},e[n][a]=[[this.appointment.providerId,this.appointment.locationId]];this.appointment.selectedDate=b()(n).toDate(),this.appointment.selectedPeriod={time:a,employee:i.appointment.providerId},this.updateCalendar(e,t)}.bind(this))):""!==this.appointment.serviceId?(this.setCategory(),this.setLocation(),this.getTimeSlots(this.updateCalendar)):0===this.appointment.id&&(this.dialogLoading=!1,this.showCoupon=!0),this.mounted=!0)},setCategory:function(){var e=this;this.appointment.categoryId=this.options.entities.services.filter(function(t){return t.id===e.appointment.serviceId})[0].categoryId},setLocation:function(){var e=this;this.appointment.locationId=this.appointment.locationId?this.appointment.locationId:this.options.entities.employees.filter(function(t){return e.appointment.providerId===t.id})[0].locationId},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(e){var t=this,i=[];this.appointment.bookings.forEach(function(e){var o=[];for(var n in e.customFields)"datepicker"===e.customFields[n].type&&e.customFields[n].value&&(e.customFields[n].value=e.customFields[n].value instanceof Date?t.getStringFromDate(e.customFields[n].value):e.customFields[n].value);e.extras.forEach(function(t){t.selected&&o.push({id:t.id,customerBookingId:e.id,extraId:t.extraId,quantity:t.quantity,price:t.price})});var a={id:e.id,customerId:e.customer.id,customer:e.customer,status:e.status,duration:e.duration,persons:e.persons,extras:o,customFields:JSON.stringify(e.customFields),payments:e.payments,packageCustomerService:e.packageCustomerService,aggregatedPrice:e.aggregatedPrice};a.coupon="admin"!==t.$root.settings.role&&"manager"!==t.$root.settings.role||!t.options.entities.coupons?e.coupon:t.options.entities.coupons.find(function(e){return e.id===t.coupon}),i.push(a)}),this.activeRecurring&&this.enabledRecurring&&"dates"in this.recurringData&&this.recurringData.dates.length&&this.recurringData.dates.forEach(function(e,i){i in t.selectedRecurringDates&&(t.selectedRecurringDates[i].bookingStart=b()(e.date).format("YYYY-MM-DD")+" "+e.time)});var o=this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time;"UTC"===this.selectedTimeZone&&this.$root.settings.general.showClientTimeZone&&(o=b()(o,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm"));var n=[];if(this.savedAppointment&&"bookings"in this.savedAppointment){var a=i.map(function(e){return e.id});this.savedAppointment.bookings.forEach(function(e){-1===a.indexOf(e.id)&&n.push(e)})}return i.forEach(function(e){var i=t.getAllowedCustomFields(JSON.parse(e.customFields),"services",t.appointment.serviceId);e.customFields=JSON.stringify(i)}),{serviceId:this.appointment.serviceId,providerId:this.appointment.providerId,locationId:this.appointment.locationId,bookings:i,removedBookings:n,bookingStart:o,utc:"UTC"===this.selectedTimeZone,timeZone:"UTC"===this.selectedTimeZone?null:this.selectedTimeZone,notifyParticipants:this.appointment.notifyParticipants?1:0,internalNotes:this.appointment.internalNotes,id:this.appointment.id,payment:this.payment,recurring:this.activeRecurring&&this.enabledRecurring?this.selectedRecurringDates:[],lessonSpace:this.appointment.lessonSpace?"https://www.thelessonspace.com/space/"+this.appointment.lessonSpace:null,createPaymentLinks:e}},showDialogNewCustomer:function(){this.$emit("showDialogNewCustomer")},getPossibleCustomDurations:function(e){var t=this.getServiceById(this.appointment.serviceId),i=t.customPricing.durations.map(function(e){return e.duration});return i.push(t.duration),e.duration&&-1===i.indexOf(e.duration)&&i.push(e.duration),i.sort(function(e,t){return e-t}),i},handleBookingDurationChange:function(){var e=this.appointment.serviceId?this.getServiceById(this.appointment.serviceId):null;e&&e.customPricing&&(e.customPricing.enabled&&this.setDuration(),this.appointment.bookings.forEach(function(t){t.duration&&0!==e.customPricing.durations.filter(function(e){return e.duration===t.duration}).length||(t.duration=e.duration)}))},handleCustomerChange:function(){var e=this,t=this.appointment.duration;this.setServiceExtrasForCustomers(!1),this.handleBookingDurationChange(),this.setPrice(),this.setServiceCapacityForProvider(),this.setBookingCustomFields(),this.addCustomFieldsValidationRules(),t!==this.appointment.duration&&this.mounted&&this.getTimeSlots(this.updateCalendar),this.showCoupon=!0;var i=this.cachedClonedBookings.map(function(e){return e.customer}).map(function(e){return e.id}),o=this.clonedBookings.map(function(e){return e.customer}).map(function(e){return e.id}),n=[];i.forEach(function(e){-1===o.indexOf(e)&&n.push(e)});for(var a=this.clonedBookings.length-1;a>=0;a--)-1!==n.indexOf(this.clonedBookings[a].customer.id)&&this.clonedBookings.splice(a,1);setTimeout(function(){e.clonedBookings.forEach(function(e){e.visible=!0}),e.cachedClonedBookings=JSON.parse(JSON.stringify(e.clonedBookings))},200),this.$emit("sortBookings",this.appointment.bookings)},handleCustomerRemove:function(e){for(var t=this.appointment.duration,i=this.clonedBookings.length-1;i>=0;i--)this.clonedBookings[i].customer.id===this.appointment.bookings[e].customer.id&&this.clonedBookings.splice(i,1);this.clearValidation(),this.appointment.bookings.splice(e,1),this.setPrice(),this.setSelectedExtrasCount(),this.setDuration(),t!==this.appointment.duration&&this.mounted&&this.getTimeSlots(this.updateCalendar)},setServiceExtrasForCustomers:function(e){var t=this,i=null;t.appointment.serviceId&&(t.options.entities.services.forEach(function(e){e.id===t.appointment.serviceId&&(i=e.extras,t.appointment.extrasCount=i.length)}),t.appointment.bookings.forEach(function(t){(e||!t.id&&!t.added)&&(t.extras=JSON.parse(JSON.stringify(i)),t.extras.forEach(function(e){e.selected=!1,e.id=0,e.customerBookingId=0})),t.added=!0}),this.setSelectedExtrasCount(),this.setDuration())},handleSelected:function(){for(var e=this,t=document.querySelectorAll(".am-appointment-status-option.selected"),i=0;i<t.length;i++)t[i].addEventListener("click",function(t){e.handleGroupStatusChange()})},handleGroupStatusChange:function(){this.clearValidation();var e=this;this.appointment.bookings.forEach(function(t){t.status=e.appointment.status})},handleEmployeeChange:function(){var e=this;this.serviceSpinnerActive=!0,this.locationSpinnerActive=!0,this.categorySpinnerActive=!0,this.setServiceExtrasForCustomers(!1),this.setServiceCapacityForProvider(),this.setPrice(),this.mounted&&this.getTimeSlots(this.updateCalendar),setTimeout(function(){e.serviceSpinnerActive=!1,e.locationSpinnerActive=!1,e.categorySpinnerActive=!1},300)},handleLocationChange:function(){var e=this;this.clearValidation(),this.serviceSpinnerActive=!0,this.employeeSpinnerActive=!0,this.categorySpinnerActive=!0,this.mounted&&this.getTimeSlots(this.updateCalendar),setTimeout(function(){e.serviceSpinnerActive=!1,e.employeeSpinnerActive=!1,e.categorySpinnerActive=!1},300)},handleServiceChange:function(){var e=this;this.locationSpinnerActive=!0,this.employeeSpinnerActive=!0,this.categorySpinnerActive=!0,this.setServiceCapacityForProvider(),this.handleBookingDurationChange(),this.setPrice(),this.setServiceExtrasForCustomers(!0),this.addCustomFieldsValidationRules(),this.serviceUpdated=!0,this.mounted&&this.getTimeSlots(this.updateCalendar),setTimeout(function(){e.locationSpinnerActive=!1,e.employeeSpinnerActive=!1,e.categorySpinnerActive=!1},300)},handleCategoryChange:function(){var e=this;this.clearValidation(),this.locationSpinnerActive=!0,this.employeeSpinnerActive=!0,this.serviceSpinnerActive=!0,setTimeout(function(){e.locationSpinnerActive=!1,e.employeeSpinnerActive=!1,e.serviceSpinnerActive=!1},300)},getProviderService:function(){var e=this,t=null;return this.appointment.providerId&&this.appointment.serviceId&&this.options.entities.employees.forEach(function(i){i.id===e.appointment.providerId&&i.serviceList.forEach(function(i){i.id===e.appointment.serviceId&&(t=i)})}),this.appointment.id&&this.appointment.serviceId&&!t?(this.isProviderService=!1,this.getServiceById(this.appointment.serviceId)):t},setServiceCapacityForProvider:function(){var e=this.getProviderService(),t=this.appointment.serviceId?this.getServiceById(this.appointment.serviceId):null;this.appointment.providerServiceMaxCapacity=e?e.maxCapacity:0,this.appointment.providerServiceMaxAdditonalCapacity=t&&null!==t.maxExtraPeople&&(!e||t.maxExtraPeople<e.maxCapacity)?t.maxExtraPeople+1:e?e.maxCapacity:0,this.appointment.providerServiceMinCapacity=e?e.minCapacity:0,this.setStatusMessage()},setStatusMessage:function(){this.statusMessage=this.getApprovedPersonsCount()<this.appointment.providerServiceMinCapacity?"(minimum "+this.appointment.providerServiceMinCapacity+")":""},handleBookingChange:function(){var e=this.appointment.duration;this.handleBookingDurationChange(),this.setPrice(),this.setStatusMessage(),e!==this.appointment.duration&&this.getTimeSlots(this.updateCalendar)},getApprovedPersonsCount:function(){var e=0;return this.appointment.bookings.forEach(function(t){"approved"===t.status&&(e+=t.persons)}),e},setPrice:function(){this.clearValidation();var e=this,t=!(!this.appointment||!this.savedAppointment)&&this.appointment.serviceId!==parseInt(this.savedAppointment.serviceId);e.$nextTick(function(){if(e.appointment.serviceId&&e.appointment.providerId&&e.appointment.bookings){var i=e.getProviderService(),o=e.getServiceById(e.appointment.serviceId),n=0,a=0,s=0;e.appointment.bookings.forEach(function(r){if(["approved","pending"].includes(r.status)){var l=(null===r.duration?i.duration:r.duration)!==i.duration,c=e.getBookingServicePrice(i,r),u=0,d=r.id?r.aggregatedPrice:o.aggregatedPrice;r.extras.forEach(function(e){if(e.selected){var t=o.extras.filter(function(t){return t.id===e.extraId}),i=r.id?e.price:t.length?t[0].price:0,n=null===e.aggregatedPrice?r.id?r.aggregatedPrice:o.aggregatedPrice:e.aggregatedPrice;u+=(n?r.persons:1)*(e.quantity?e.quantity:0)*i}});var p=r.id?t||l?c:r.price:c;r.extrasTotalPrice=u,r.bookingPrice=p,r.serviceTotalPrice=p*(d?r.persons:1),r.discountTotalPrice=(r.serviceTotalPrice+r.extrasTotalPrice)/100*(r.coupon?r.coupon.discount:0)+(r.coupon?r.coupon.deduction:0),n+=r.serviceTotalPrice,a+=r.extrasTotalPrice,s+=r.discountTotalPrice}}),e.appointment.serviceTotalPrice=n,e.appointment.extrasTotalPrice=a,e.appointment.discountTotalPrice=s}})},handleExtrasSelectionChange:function(e){void 0===e.quantity&&(e.quantity=1),this.setPrice(),this.setSelectedExtrasCount(),this.setDuration(),e.duration>0&&this.mounted&&this.getTimeSlots(this.updateCalendar)},updateCalendar:function(e,t){var i=this,o=this;if(this.appointment.selectedDate){var n=this.getStringFromDate(this.appointment.selectedDate);n in this.appointment.calendarTimeSlots&&!(n in e)&&this.calendarNavigating&&(e[n]=this.appointment.calendarTimeSlots[n])}this.appointment.calendarTimeSlots=e,this.appointment.occupiedTimeSlots=t;var a=[];this.useSortedDateStrings(Object.keys(this.appointment.calendarTimeSlots)).forEach(function(e){a.push(o.getDate(e))});var s=!this.appointment.selectedDate&&!this.availableDates.length&&a.length&&!this.calendarNavigating;this.availableDates=a,s&&(this.appointment.selectedDate=this.availableDates[0],this.$nextTick(function(){i.appointment.selectedDate=null})),this.disabledWeekdays={weekdays:[]},this.disabledWeekdays=0===this.availableDates.length?{weekdays:[1,2,3,4,5,6,7]}:null,this.dateChange()},getTimeSlots:function(e){var t=this,i=this.appointment,o=[];if(i.serviceId){this.loadingTimeSlots=!0,this.appointment.bookings.forEach(function(e){e.extras.forEach(function(e){e.selected&&o.push({id:e.extraId,quantity:e.quantity})})}),this.slotsIndexCounter++;var n=this.slotsIndexCounter;this.$http.get(this.$root.getAjaxUrl+"/slots",{params:this.getAppropriateUrlParams({serviceId:i.serviceId,serviceDuration:this.getMaxBookingDuration(),locationId:i.locationId,providerIds:i.providerId?[i.providerId]:[],extras:JSON.stringify(o),excludeAppointmentId:i.id,group:"customer"===this.$root.settings.role?1:0,timeZone:this.selectedTimeZone,monthsLoad:this.monthsLoad,startDateTime:this.startDateTime,endDateTime:this.endDateTime,page:"appointments"})}).then(function(i){if(n<t.slotsIndexCounter)t.fetchedSlots=!0;else{var o="UTC"===t.selectedTimeZone&&(t.$root.settings.general.showClientTimeZone||"provider"===t.$root.settings.role&&t.isCabinet);e(o?t.getConvertedTimeSlots(i.data.data.slots):i.data.data.slots,o?t.getConvertedTimeSlots(i.data.data.occupied):i.data.data.occupied),t.dialogLoading=!1,t.loadingTimeSlots=!1}}).catch(function(e){console.log(e.message),t.loadingTimeSlots=!1})}},dateSelected:function(){this.calendarNavigating=!1,this.dateChange()},dateChange:function(){var e=this;this.clearValidation();var t=this,i=[],o=null,n=!1;this.appointment.selectedDate&&this.appointment.calendarTimeSlots&&(o=this.appointment.calendarTimeSlots[this.getStringFromDate(this.appointment.selectedDate)])?(Object.keys(o).forEach(function(e){t.appointment.selectedPeriod&&t.appointment.selectedPeriod.hasOwnProperty("time")&&t.appointment.selectedPeriod.time===e&&(n=!0),i.push({time:e,employees:o[e]})}),n||(this.appointment.selectedPeriod="")):this.calendarNavigating||(this.appointment.selectedDate=null,this.appointment.selectedPeriod=""),this.appointment.dateTimeSlots=i,this.calendarNavigating=!1,this.appointment.id||this.$nextTick(function(){e.refreshRecurringData()})},openRecurringAppointment:function(e){this.$emit("openRecurringAppointment",e)},handleTabClick:function(e){"recurring"===e.name&&(this.recurringDatesChanged=!1)},haveSaveConfirmation:function(){var e=this,t=this.activeRecurring&&this.enabledRecurring&&this.recurringDatesChanged;t&&(this.recurringDatesChanged=!1,this.newAppointmentTabs="recurring",this.saveConfirmMessage=this.$root.labels.recurring_changed_message);var i=!1,o=!(!this.$root.settings.payments||!this.$root.settings.payments.paymentLinks)&&this.$root.settings.payments.paymentLinks.enabled,n=this.getServiceById(this.appointment.serviceId),a=n&&n.settings?JSON.parse(n.settings):null;if(a&&a.payments&&a.payments.paymentLinks&&(o=a.payments.paymentLinks.enabled),o&&0!==this.appointment.id){var s=function(t){var o=e.clonedBookings.find(function(e){return e.id===t.id});if(o&&0!==o.id&&e.getBookingPrice(o,!0,o.bookingPrice?o.bookingPrice:o.price,o.aggregatedPrice)<e.getBookingPrice(t,!0,t.bookingPrice?t.bookingPrice:t.price,t.aggregatedPrice))return i=!0,e.saveConfirmMessage=e.$root.labels.price_changed_message,"break"},r=!0,l=!1,c=void 0;try{for(var u,d=this.appointment.bookings[Symbol.iterator]();!(r=(u=d.next()).done);r=!0){if("break"===s(u.value))break}}catch(e){l=!0,c=e}finally{try{!r&&d.return&&d.return()}finally{if(l)throw c}}}return t||i},getSelectedDistinctExtras:function(){var e=[],t=[];return this.appointment.bookings.forEach(function(i){i.extras.filter(function(e){return e.selected}).forEach(function(i){-1===t.indexOf(i.id)&&(e.push(i),t.push(i.id))})}),e},refreshRecurringData:function(){this.activeRecurring&&this.enabledRecurring&&this.appointment.selectedDate&&this.appointment.selectedPeriod?(this.serviceUpdated&&(this.serviceUpdated=!1,this.setRecurringData()),this.activeRecurring=!1,this.recurringData.startDate=b()(this.appointment.selectedDate).format("YYYY-MM-DD HH:mm:ss"),this.recurringData.startTime=this.appointment.selectedPeriod.time,this.initialRecurringData.calendarDates=this.getAvailableRecurringDates(this.appointment.calendarTimeSlots),this.activeRecurring=!0,null!==this.recurringData.setupCallback&&this.recurringData.setupCallback("count")):this.appointment.selectedDate||(this.recurringData=this.getDefaultRecurringData(),this.initialRecurringData=null,this.selectedRecurringDates=[])},recurringDatesDefined:function(e){var t=[];if(e.forEach(function(e){t.push({bookingStart:b()(e.date).format("YYYY-MM-DD")+" "+e.time,providerId:e.providerId,locationId:e.locationId})}),"recurring"!==this.newAppointmentTabs)if(this.recurringDatesChanged=!1,t.length!==this.selectedRecurringDates.length)this.recurringDatesChanged=!0;else for(var i=0;i<t.length;i++)if(t[i].bookingStart!==this.selectedRecurringDates[i].bookingStart){this.recurringDatesChanged=!0;break}this.selectedRecurringDates=t},setRecurringData:function(){if(this.appointment.selectedDate&&this.appointment.selectedPeriod){this.recurringData.dates=[],this.recurringData.startDate=b()(this.appointment.selectedDate).format("YYYY-MM-DD HH:mm:ss"),this.recurringData.startTime=this.appointment.selectedPeriod.time;var e=this.getServiceById(this.appointment.serviceId);this.initialRecurringData=this.getDefaultRecurringSettings(this.appointment.selectedDate,e.recurringCycle,this.appointment.calendarTimeSlots)}},setSelectedExtrasCount:function(){var e=0;this.appointment.bookings.forEach(function(t){t.extras.forEach(function(t){t.selected&&e++})}),this.appointment.extrasSelectedCount=e},getMaxBookingDuration:function(){var e=0;return this.appointment.bookings.forEach(function(t){("pending"===t.status||"approved"===t.status)&&t.duration>e&&(e=t.duration)}),e},setDuration:function(){if(this.appointment.serviceId){var e=this.getMaxBookingDuration(),t=0!==e?e:this.getServiceById(this.appointment.serviceId).duration;this.appointment.bookings.forEach(function(e){var i=0;e.extras.forEach(function(e){e.selected&&e.duration>i&&(i=e.duration)}),t+=i}),this.appointment.duration=t}},clearValidation:function(){void 0!==this.$refs.appointment&&this.$refs.appointment.clearValidate()},errorCallback:function(e){var t=this;setTimeout(function(){"timeSlotUnavailable"in e&&!0===e.timeSlotUnavailable&&(t.notify(t.$root.labels.error,t.$root.labels.time_slot_unavailable,"error"),t.getTimeSlots(t.updateCalendar)),"packageBookingUnavailable"in e&&!0===e.packageBookingUnavailable&&(t.notify(t.$root.labels.error,t.$root.labels.package_booking_unavailable,"error"),t.getTimeSlots(t.updateCalendar))},200)},addCustomFieldsValidationRules:function(){if(this.appointment.serviceId&&this.appointment.bookings.length>0){this.rules=this.rulesInit;for(var e=0;e<this.appointment.bookings.length;e++)for(var t=0;t<this.options.entities.customFields.length;t++)this.isCustomFieldVisible(this.options.entities.customFields[t],"appointment",this.appointment.serviceId)&&(void 0===this.rules.bookings[e]&&this.$set(this.rules.bookings,e,{type:"array"}),void 0===this.rules.bookings[e].customFields&&this.$set(this.rules.bookings[e],"customFields",{}),this.rules.bookings[e].customFields[this.options.entities.customFields[t].id]={value:[{required:!0,message:this.$root.labels.required_field,trigger:"submit"}]})}},showCustomFieldsTab:function(){var e=Array.prototype.concat.apply([],this.options.entities.customFields.map(function(e){return e.services.map(function(e){return e.id})}));return this.options.entities.customFields.length>0&&this.appointment.bookings.length>0&&this.appointment.serviceId&&(e.includes(this.appointment.serviceId)||this.options.entities.customFields.filter(function(e){return e.allServices}).length>0)},getDefaultRecurringData:function(){return{dates:[],startDate:null,startTime:null,pageRecurringDates:[],pagination:{show:this.$root.settings.general.itemsPerPage,page:1,count:0},recurringString:"",datesCallback:null,setupCallback:null}},enableRecurring:function(){var e=this;this.enabledRecurring&&(this.recurringDatesChanged=!1,this.monthsLoad=0,this.startDateTime=null,this.endDateTime=null,this.getTimeSlots(function(t,i){e.initialRecurringData=null,e.recurringData={dates:[],startDate:null,startTime:null,pageRecurringDates:[],pagination:{show:e.$root.settings.general.itemsPerPage,page:1,count:0},recurringString:"",datesCallback:null,setupCallback:null},e.updateCalendar(t,i),e.setRecurringData(),e.activeRecurring=!0,e.newAppointmentTabs="recurring"}))},validationTabFailCallback:function(){this.newAppointmentTabs="customFields"}},computed:{selectedCustomersMessage:function(){return""!==this.statusMessage?this.$root.labels.selected_customers+" "+this.statusMessage+":":this.$root.labels.selected_customers+":"},customersMaxLimit:function(){return this.appointment.serviceId&&this.appointment.providerId&&this.getProviderService()?this.getProviderService().maxCapacity:this.appointment.serviceId&&!this.appointment.providerId?this.getServiceById(this.appointment.serviceId).maxCapacity:0},showCustomer:function(){return"customer"!==this.$root.settings.role}},watch:{customerCreatedCount:function(){var e=this,t=this.clonedBookings.map(function(e){return e.customer.id});this.bookings.forEach(function(i){-1===t.indexOf(i.customer.id)&&(i.visible=!0,e.clonedBookings.push(i))}),this.clonedBookings.sort(function(e,t){return(e.customer.firstName+" "+e.customer.lastName).localeCompare(t.customer.firstName+" "+t.customer.lastName)}),this.addCustomFieldsValidationRules()},appointment:function(){this.instantiateDialog(),"provider"===this.$root.settings.role&&this.isCabinet&&null!==this.appointment&&null!==this.appointment.providerId&&(this.appointment.providerId=this.options.entities.employees[0].id)}},components:{DialogAppointmentPayment:d.a,DialogCustomFields:m.a,RecurringSetup:S.a,RecurringDates:x.a,DialogActions:c.a}}},870:function(e,t,i){var o=i(335)(i(871),i(872),!1,null,null,null);e.exports=o.exports},871:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(338),n=i(699),a=i(725),s=i(702);t.default={mixins:[o.a,n.a,a.a,s.a],props:{appointment:{default:function(){},type:Object},isCabinet:!1,options:null},data:function(){return{paymentStatuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending},{value:"partiallyPaid",label:this.$root.labels.partially_paid}]}},methods:{showDialogEditPayment:function(e,t){e.customerId=t.customerId;var i=t.packageCustomerService?this.getPackageById(t.packageCustomerService.packageCustomer.packageId):null;this.$emit("editPayment",{payment:e,appointment:this.appointment,booking:t,package:t.packageCustomerService?{name:i?i.name:"Package"}:null})},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(i){i.value===e&&(t=i.label)}),t},getPackageDiscount:function(e){var t=e.packageCustomerService.packageCustomer.price,i=e.coupon;return t/100*(i?i.discount:0)+(i?i.deduction:0)},getPackageDue:function(e){var t=this.getPackageTotal(e)-(e.payments.length>0?e.payments.reduce(function(e,t){return e+t.amount},0):0);return t>=0?t:0},getPackageTotal:function(e){var t=e.packageCustomerService.packageCustomer.price+this.getPackageTax(e)-this.getPackageDiscount(e);return t>=0?t:0},getPackageTax:function(e){return e.packageCustomerService.packageCustomer.payments.length>0&&e.packageCustomerService.packageCustomer.payments.filter(function(e){return e.wcItemTaxValue}).length>0?e.packageCustomerService.packageCustomer.payments.reduce(function(e,t){return e+t.wcItemTaxValue},0):0},getBookingSubtotal:function(e){return e.serviceTotalPrice+e.extrasTotalPrice},getBookingDiscount:function(e){return e.discountTotalPrice+(e.payments.length>0&&e.payments.filter(function(e){return e.wcItemCouponValue}).length>0?e.payments.reduce(function(e,t){return e+t.wcItemCouponValue},0):0)},getBookingDue:function(e){var t=this.getBookingTotal(e)-(e.payments.length>0?e.payments.reduce(function(e,t){return e+t.amount},0):0);return t>=0?t:0},getBookingTotal:function(e){var t=this.getBookingSubtotal(e)+this.getBookingTax(e)-this.getBookingDiscount(e);return t>=0?t:0},getBookingTax:function(e){return e.payments.length>0&&e.payments.filter(function(e){return e.wcItemTaxValue}).length>0?e.payments.reduce(function(e,t){return e+t.wcItemTaxValue},0):0}}}},872:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-dialog-table"},[e.appointment.bookings.length>0?i("div",e._l(e.appointment.bookings,function(t){return i("div",{staticClass:"am-customer-extras"},[i("el-row",{staticClass:"am-customer-extras-data"},[i("el-col",[i("h3",[e._v(e._s(t.customer.firstName)+" "+e._s(t.customer.lastName))]),e._v(" "),i("span",[e._v(e._s(t.customer.email))])])],1),e._v(" "),i("div",{staticClass:"am-appointment-payments-dialog"},[i("el-row",{staticClass:"am-customer-extras-payment",attrs:{gutter:10}},[i("el-col",{attrs:{span:12}},[i("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.payment))])]),e._v(" "),i("el-col",{attrs:{span:12}},[i("span",{staticClass:"am-link",on:{click:function(i){return e.showDialogEditPayment(t.payments[0],t)}}},[e._v("\n "+e._s(e.$root.labels.view_payment_details)+"\n ")])]),e._v(" "),i("el-col",{attrs:{span:12}},[i("span",[e._v(e._s(e.$root.labels.date)+":")])]),e._v(" "),i("el-col",{attrs:{span:12}},e._l(t.payments,function(t){return i("el-row",{key:t.id},[i("span",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDate(t.dateTime)))])])}),1),e._v(" "),i("el-col",{attrs:{span:12}},[i("span",[e._v(e._s(e.$root.labels.payment_method)+":")])]),e._v(" "),i("el-col",{attrs:{span:12}},e._l(t.payments,function(t,o){return i("el-row",{key:t.id},[i("span",{key:t.id,staticClass:"am-semi-strong"},[i("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway)},attrs:{src:e.$root.getUrl+"public/img/payments/"+t.gateway+".svg"}}),e._v(" "),"razorpay"!==t.gateway?i("span",[e._v(e._s(e.getPaymentGatewayNiceName(t)))]):e._e()])])}),1),e._v(" "),t.payments.find(function(e){return e.wcOrderId})&&!e.isCabinet?i("el-col",{attrs:{span:12}},[i("span",[e._v(e._s(e.$root.labels.wc_order)+":")])]):e._e(),e._v(" "),t.payments.find(function(e){return e.wcOrderId})&&!e.isCabinet?i("el-col",{attrs:{span:12}},e._l(t.payments,function(t){return i("el-row",{key:t.id},[i("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])])}),1):e._e(),e._v(" "),i("el-col",{attrs:{span:12}},[i("span",[e._v(e._s(e.$root.labels.status)+":")])]),e._v(" "),i("el-col",{attrs:{span:12}},e._l(t.payments,function(t){return i("el-row",{key:t.id},[i("span",{staticClass:"am-semi-strong am-payment-status"},[i("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.status}),e._v("\n "+e._s(e.getPaymentStatusNiceName(t.status))+"\n ")])])}),1),e._v(" "),t.packageCustomerService?i("el-col",{attrs:{span:12}},[i("span",[e._v(e._s(e.$root.labels.package)+":")])]):e._e(),e._v(" "),t.packageCustomerService?i("el-col",{staticClass:"am-payment-package-name",attrs:{span:12}},[i("img",{attrs:{src:e.$root.getUrl+"public/img/am-package.svg"}}),e._v(" "),i("span",{staticClass:"am-semi-strong"},[e._v("\n "+e._s((e.pack=e.getPackageById(t.packageCustomerService.packageCustomer.packageId))?e.pack.name:"Package")+"\n ")])]):e._e()],1),e._v(" "),t.packageCustomerService?i("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[i("div",{staticClass:"am-payment-package-deal"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/am-package-black.svg"}}),e._v(" "),i("span",[e._v(e._s(e.$root.labels.package_deal))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.package_price)+":\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.packageCustomerService.packageCustomer.price))+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.discount_amount)+":\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(e.getPackageDiscount(t)))+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[1===t.payments.length?i("span",[e._v(e._s(e.$root.labels.paid))]):e._e(),e._v(" "),t.payments.length>1?i("span",[e._v(e._s(e.$root.labels.paid_deposit))]):e._e()]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("el-row",{staticStyle:{"margin-bottom":"0"}},[1===t.payments.length?i("span",[e._v("\n "+e._s(e.getFormattedPrice(t.payments.filter(function(e){return"pending"!==e.status}).reduce(function(e,t){return e+t.amount},0)))+"\n ")]):e._e(),e._v(" "),t.payments.length>1?i("span",[e._v("\n "+e._s(e.getFormattedPrice(t.payments.filter(function(e){return"partiallyPaid"===e.status}).reduce(function(e,t){return e+t.amount},0)))+"\n ")]):e._e()])],1),e._v(" "),t.packageCustomerService.packageCustomer.payments.length>1?i("el-col",{staticClass:"align-right",attrs:{span:14}},[i("span",[e._v(e._s(e.$root.labels.paid_remaining_amount))])]):e._e(),e._v(" "),t.packageCustomerService.packageCustomer.payments.length>1?i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("el-row",{staticStyle:{"margin-bottom":"0"}},[i("span",[e._v("\n "+e._s(e.getFormattedPrice(t.packageCustomerService.packageCustomer.payments.filter(function(e){return"paid"===e.status}).reduce(function(e,t){return e+t.amount},0)))+"\n ")])])],1):e._e(),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[i("span",[e._v(e._s(e.$root.labels.due)+":")])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("span",[e._v(e._s(e.getFormattedPrice(e.getPackageDue(t))))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[i("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.total)+":")])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("span",{staticClass:"am-strong"},[e._v(e._s(e.getFormattedPrice(e.getPackageTotal(t))))])])],1):i("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.price)+":\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.serviceTotalPrice))+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.extras)+":\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.extrasTotalPrice))+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[i("span",[e._v(e._s(e.$root.labels.subtotal)+":")])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("span",[e._v(e._s(e.getFormattedPrice(e.getBookingSubtotal(t))))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.discount_amount)+":\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice((e.discount=e.getBookingDiscount(t))>(e.subtotal=e.getBookingSubtotal(t))?e.subtotal:e.discount))+"\n ")]),e._v(" "),e.getBookingTax(t)?i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.tax)+":\n ")]):e._e(),e._v(" "),e.getBookingTax(t)?i("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(e.getBookingTax(t)))+"\n ")]):e._e(),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[1===t.payments.length?i("span",[e._v(e._s(e.$root.labels.paid))]):e._e(),e._v(" "),t.payments.length>1?i("span",[e._v(e._s(e.$root.labels.paid_deposit))]):e._e()]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("el-row",{staticStyle:{"margin-bottom":"0"}},[1===t.payments.length?i("span",[e._v(e._s(e.getFormattedPrice(t.payments.filter(function(e){return"pending"!==e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),t.payments.length>1?i("span",[e._v(e._s(e.getFormattedPrice(t.payments.filter(function(e){return"partiallyPaid"===e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e()])],1),e._v(" "),t.payments.length>1?i("el-col",{staticClass:"align-right",attrs:{span:14}},[i("span",[e._v(e._s(e.$root.labels.paid_remaining_amount))])]):e._e(),e._v(" "),t.payments.length>1?i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("el-row",{staticStyle:{"margin-bottom":"0"}},[i("span",[e._v(e._s(e.getFormattedPrice(t.payments.filter(function(e){return"paid"===e.status}).reduce(function(e,t){return e+t.amount},0))))])])],1):e._e(),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[i("span",[e._v(e._s(e.$root.labels.due)+":")])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("span",[e._v(e._s(e.getFormattedPrice(e.getBookingDue(t))))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:14}},[i("span",{staticClass:"am-strong"},[e._v(e._s(e.$root.labels.total)+":")])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[i("span",{staticClass:"am-strong"},[e._v(e._s(e.getFormattedPrice(e.getBookingTotal(t))))])])],1)],1)],1)}),0):i("div",[i("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_customers))])])])},staticRenderFns:[]}},873:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-dialog-appointment"},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[i("div",{staticClass:"am-dialog-loader-content"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),i("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),null===e.appointment||e.dialogLoading?e._e():i("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.appointment.id}},[e.showHeader?i("div",{staticClass:"am-dialog-header"},[i("el-row",[i("el-col",{attrs:{span:18}},[0!==e.appointment.id?i("h2",[e._v(e._s(e.$root.labels.edit_appointment))]):i("h2",[e._v(e._s(e.$root.labels.new_appointment))])]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:6}},[i("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1):e._e(),e._v(" "),e.mounted&&null!==e.appointment?i("el-form",{ref:"appointment",attrs:{model:e.appointment,rules:e.rules,"label-position":"top"}},[i("el-tabs",{on:{"tab-click":e.handleTabClick},model:{value:e.newAppointmentTabs,callback:function(t){e.newAppointmentTabs=t},expression:"newAppointmentTabs"}},[i("el-tab-pane",{attrs:{label:e.$root.labels.schedule,name:"schedule"}},[e.showCustomer?i("el-form-item",{staticClass:"am-appointment-customer",attrs:{label:e.$root.labels.customers_singular_plural+":",prop:"bookings"}},[i("el-select",{staticClass:"no-tags",attrs:{"value-key":"customer.id",remote:"",multiple:"",filterable:"","collapse-tags":"",loading:e.loadingCustomers,"multiple-limit":e.customersMaxLimit,placeholder:e.$root.labels.select_customers,"popper-class":"am-dropdown-cabinet","remote-method":e.searchExistingCustomers,disabled:e.packageServices&&!e.appointment.id},on:{change:e.handleCustomerChange},model:{value:e.appointment.bookings,callback:function(t){e.$set(e.appointment,"bookings",t)},expression:"appointment.bookings"}},[i("div",{staticClass:"am-drop"},[this.$root.settings.additionalCapabilities.canWriteCustomers?i("div",{staticClass:"am-drop-create-item",on:{click:e.showDialogNewCustomer}},[e._v("\n "+e._s(e.$root.labels.create_new)+"\n ")]):e._e(),e._v(" "),e._l(e.clonedBookings,function(t,o){return t.visible?i("el-option",{key:o,staticClass:"am-has-option-meta",attrs:{label:null!==(e.user=e.getCustomerInfo(t))?e.user.firstName.trim()||e.user.lastName.trim()?e.user.firstName+" "+e.user.lastName:e.$root.labels.customer+" "+e.user.id:"",value:t}},[i("span",{class:{"am-drop-item-name":t.customer.email}},[e._v("\n "+e._s(t.customer.firstName.trim()||t.customer.lastName.trim()?"":e.$root.labels.customer+" "+t.customer.id)+" "+e._s(t.customer.firstName+" "+t.customer.lastName)+"\n ")]),e._v(" "),t.customer.email?i("span",{staticClass:"am-drop-item-meta"},[e._v("\n "+e._s(t.customer.email)+"\n ")]):e._e()]):e._e()}),e._v(" "),e._l([{customer:{id:0,firstName:"",lastName:"",email:"",info:JSON.stringify({firstName:"",lastName:"",email:"",phone:""})}}],function(t){return 0===e.clonedBookings.length?i("el-option",{key:t.customer.id,staticClass:"am-has-option-meta",style:{display:"none"},attrs:{label:null!==(e.user=e.getCustomerInfo(t))?e.user.firstName.trim()||e.user.lastName.trim()?e.user.firstName+" "+e.user.lastName:e.$root.labels.customer+" "+e.user.id:"",value:t}}):e._e()})],2)])],1):e._e(),e._v(" "),i("transition",{attrs:{name:"fade"}},[e.appointment.bookings.length>0&&"customer"!==this.$root.settings.role?i("div",{staticClass:"am-selected-dropdown-items"},[i("el-form-item",{attrs:{label:e.selectedCustomersMessage}}),e._v(" "),e._l(e.appointment.bookings,function(t,o){return i("div",{key:o,staticClass:"am-selected-dropdown-item"},[i("el-row",{staticClass:"am-selected-dropdown-item__inner",attrs:{align:"middle",gutter:4,justify:"left"}},[i("el-col",{attrs:{sm:10}},[i("h3",[e._v("\n "+e._s(null!==(e.user=e.getCustomerInfo(t))?e.user.firstName.trim()||e.user.lastName.trim()?e.user.firstName+" "+e.user.lastName:e.$root.labels.customer+" "+e.user.id:"")+"\n ")]),e._v(" "),t.customer.email?i("a",{staticClass:"am-customer-link",attrs:{href:"mailto:"+t.customer.email}},[e._v("\n "+e._s(t.customer.email)+"\n ")]):e._e(),e._v(" "),t.customer.phone?i("a",{staticClass:"am-customer-link",attrs:{href:"tel:"+t.customer.phone}},[e._v("\n "+e._s(t.customer.phone)+"\n ")]):e._e()]),e._v(" "),i("el-col",{staticClass:"am-align-right",attrs:{sm:14}},[i("div",{staticClass:"am-appointment-status small"},[i("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.status}),e._v(" "),i("el-select",{attrs:{disabled:e.disableStatusChange(),"popper-class":"am-dropdown-cabinet"},on:{change:e.handleBookingChange},model:{value:t.status,callback:function(i){e.$set(t,"status",i)},expression:"booking.status"}},e._l(e.statuses.concat(e.getDateTime(e.appointment.bookingEnd)<e.getNowDate()?e.noShowStatus:[]),function(e){return i("el-option",{key:e.value,staticClass:"am-appointment-dialog-status-option",attrs:{value:e.value}},[i("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+e.value})])}),1)],1),e._v(" "),i("div",{staticClass:"am-appointment-persons small"},[i("img",{staticClass:"svg-amelia",attrs:{slot:"prefix",width:"16px",src:e.$root.getUrl+"public/img/group.svg"},slot:"prefix"}),e._v(" "),i("el-select",{staticClass:"small-status",attrs:{"popper-class":"am-dropdown-cabinet","no-data-text":e.$root.labels.choose_a_group_service},on:{change:e.handleBookingChange},model:{value:t.persons,callback:function(i){e.$set(t,"persons",i)},expression:"booking.persons"}},e._l(e.appointment.providerServiceMaxAdditonalCapacity,function(e){return i("el-option",{key:e,attrs:{value:e}})}),1)],1),e._v(" "),!e.packageServices&&e.appointment.serviceId&&e.getServiceById(e.appointment.serviceId).customPricing.enabled?i("div",{staticClass:"am-appointment-duration small"},[i("img",{staticClass:"svg-amelia",attrs:{slot:"prefix",width:"16px",src:e.$root.getUrl+"public/img/duration.svg"},slot:"prefix"}),e._v(" "),i("el-select",{staticClass:"small-status",attrs:{"popper-class":"am-dropdown-cabinet","no-data-text":e.$root.labels.choose_a_group_service},on:{change:e.handleBookingChange},model:{value:t.duration,callback:function(i){e.$set(t,"duration",i)},expression:"booking.duration"}},e._l(e.getPossibleCustomDurations(t),function(t){return i("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),value:t}})}),1)],1):e._e(),e._v(" "),i("div",{staticClass:"am-appointment-remove small"},[i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.customers_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})]),e._v(" "),i("i",{staticClass:"el-icon-close remove",on:{click:function(t){return e.handleCustomerRemove(o)}}})],1)])],1)],1)}),e._v(" "),e.appointment.bookings.length>1?i("div",{staticClass:"group-status-change"},[i("el-row",{attrs:{gutter:4}},[i("el-col",{attrs:{sm:14}},[i("h3",[e._v(e._s(e.$root.labels.change_group_status))])]),e._v(" "),i("el-col",{attrs:{sm:10}},[i("el-form-item",[i("div",{staticClass:"am-appointment-status"},[i("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+e.appointment.status}),e._v(" "),i("el-select",{attrs:{disabled:e.disableStatusChange(),"popper-class":"am-dropdown-cabinet"},on:{change:e.handleGroupStatusChange,"visible-change":e.handleSelected},model:{value:e.appointment.status,callback:function(t){e.$set(e.appointment,"status",t)},expression:"appointment.status"}},e._l(e.statuses.concat(e.getDateTime(e.appointment.bookingEnd)<e.getNowDate()?e.noShowStatus:[]),function(t){return i("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[i("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.value},[e._v("\n "+e._s(t.label)+"\n ")])])}),1)],1)])],1)],1)],1):e._e()],2):e._e()]),e._v(" "),i("el-form-item",{class:{active:e.categorySpinnerActive},attrs:{label:e.$root.labels.category+":"}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_service_category,"popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role},on:{change:e.handleCategoryChange},model:{value:e.appointment.categoryId,callback:function(t){e.$set(e.appointment,"categoryId",t)},expression:"appointment.categoryId"}},e._l(e.categoriesFiltered,function(e){return i("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),i("el-form-item",{class:{active:e.serviceSpinnerActive},attrs:{prop:"serviceId",label:e.capitalizeFirstLetter(e.$root.labels.service)+":"}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_service+":","popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role},on:{change:e.handleServiceChange},model:{value:e.appointment.serviceId,callback:function(t){e.$set(e.appointment,"serviceId",t)},expression:"appointment.serviceId"}},e._l(e.getAllowedServices(),function(e){return i("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),e.locationsFiltered.length?i("el-form-item",{class:{active:e.locationSpinnerActive},attrs:{label:e.$root.labels.location+":",disabled:"customer"===e.$root.settings.role}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_location,"popper-class":"am-dropdown-cabinet"},on:{change:e.handleLocationChange},model:{value:e.appointment.locationId,callback:function(t){e.$set(e.appointment,"locationId",t)},expression:"appointment.locationId"}},e._l(e.locationsFiltered,function(e){return i("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.name,value:e.id}})}),1),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1):e._e(),e._v(" "),e.$root.isLite?e._e():i("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.$root.settings.capabilities.canReadOthers&&e.$root.settings.capabilities.canWriteOthers,expression:"$root.settings.capabilities.canReadOthers && $root.settings.capabilities.canWriteOthers"}],class:{active:e.employeeSpinnerActive},attrs:{label:e.capitalizeFirstLetter(e.$root.labels.employee)+":",prop:"providerId"}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_employee,"popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role},on:{change:e.handleEmployeeChange},model:{value:e.appointment.providerId,callback:function(t){e.$set(e.appointment,"providerId",t)},expression:"appointment.providerId"}},e._l(e.employeesFiltered,function(e){return i("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.firstName+" "+e.lastName,value:e.id}})}),1),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),i("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.$root.settings.lessonSpace.enabled&&"customer"!==e.$root.settings.role,expression:"$root.settings.lessonSpace.enabled && $root.settings.role !== 'customer'"}],attrs:{label:e.$root.labels.lesson_space+":",prop:"lessonSpaceId"}},[i("el-select",{attrs:{filterable:"",clearable:"","popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role,loading:e.loadingSpaces,remote:"","remote-method":e.searchExistingSpaces},model:{value:e.appointment.lessonSpace,callback:function(t){e.$set(e.appointment,"lessonSpace",t)},expression:"appointment.lessonSpace"}},[i("el-option",{key:0,attrs:{label:e.$root.labels.lesson_space_new_space,value:0}}),e._v(" "),e._l(e.spaces,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})],2)],1),e._v(" "),e.packageServices&&e.packageServices.length||!(e.couponsFilteredService.length>0)||!e.showCoupon||"admin"!==e.$root.settings.role&&"manager"!==e.$root.settings.role?e._e():i("el-form-item",{class:{active:e.categorySpinnerActive},attrs:{label:e.$root.labels.apply_coupon}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_coupon,"popper-class":"am-dropdown-cabinet",disabled:"customer"===e.$root.settings.role},on:{change:e.filterServices},model:{value:e.coupon,callback:function(t){e.coupon=t},expression:"coupon"}},e._l(e.couponsFilteredService,function(t){return i("el-option",{key:t.id,attrs:{disabled:t.disabled,label:t.code+(e.couponExpired(t.expirationDate)?" - "+e.$root.labels.expired:""),value:t.id}})}),1),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1),e._v(" "),i("el-row",{attrs:{gutter:20}},[i("el-col",{staticClass:"v-calendar-column",attrs:{lg:12,md:12,sm:24}},[i("el-form-item",{class:{active:e.loadingTimeSlots&&!e.calendarNavigating},style:{"pointer-events":e.loadingTimeSlots&&!e.calendarNavigating?"none":"all"},attrs:{label:e.$root.labels.date+":",prop:"selectedDate"}},[i("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","popover-align":e.screenWidth<768?"center":"left","tint-color":e.isCabinet?e.$root.settings.customization.primaryColor:"#1A84EE","is-required":!0,"is-expanded":!1,"show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"available-dates":e.availableDates,"disabled-dates":e.disabledWeekdays,disabled:!1,formats:e.vCalendarFormats,"popover-keep-visible-on-input":!0,"theme-styles":{weeks:e.loadingTimeSlots?{background:"url("+e.$root.getUrl+"public/img/oval-spinner.svg)",backgroundRepeat:"no-repeat",backgroundSize:"40%",backgroundPosition:"center",pointerEvents:"none"}:{},dayCellNotInMonth:{opacity:0,display:"none"}}},on:{"update:fromPage":e.changedMonth,input:e.dateSelected},model:{value:e.appointment.selectedDate,callback:function(t){e.$set(e.appointment,"selectedDate",t)},expression:"appointment.selectedDate"}}),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner is-spinner-right",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1),e._v(" "),i("el-col",{attrs:{lg:12,md:12,sm:24}},[i("el-form-item",{class:{active:e.loadingTimeSlots},attrs:{label:e.$root.labels.time+":",prop:"selectedPeriod.time"}},[i("el-select",{attrs:{"value-key":"time",filterable:"",placeholder:e.$root.labels.select_time,"popper-class":"am-dropdown-cabinet"},on:{change:function(t){return e.selectedTime()}},model:{value:e.appointment.selectedPeriod,callback:function(t){e.$set(e.appointment,"selectedPeriod",t)},expression:"appointment.selectedPeriod"}},e._l(e.appointment.dateTimeSlots,function(t){return i("el-option",{key:t.time,attrs:{label:e.getFrontedFormattedTime(t.time+":00"),value:t}})}),1),e._v(" "),i("img",{staticClass:"svg-amelia is-spinner",attrs:{src:e.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1)],1),e._v(" "),e.packageServices||"customer"===e.$root.settings.role||e.appointment.id||!e.appointment.serviceId||"disabled"===e.getServiceById(e.appointment.serviceId).recurringCycle?e._e():i("el-form-item",{staticClass:"am-recurring-check"},[i("el-checkbox",{attrs:{disabled:!e.appointment.selectedDate||!e.appointment.selectedPeriod},on:{change:function(t){return e.enableRecurring()}},model:{value:e.enabledRecurring,callback:function(t){e.enabledRecurring=t},expression:"enabledRecurring"}},[e._v("\n "+e._s(e.$root.labels.recurring_active)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.recurring_active_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1),e._v(" "),"customer"!==this.$root.settings.role?i("el-form-item",[i("el-checkbox",{on:{change:function(t){return e.clearValidation()}},model:{value:e.appointment.notifyParticipants,callback:function(t){e.$set(e.appointment,"notifyParticipants",t)},expression:"appointment.notifyParticipants"}},[e._v("\n "+e._s(e.$root.labels.notify_customers)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.notify_customers_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):e._e(),e._v(" "),"customer"!==this.$root.settings.role?i("div",{staticClass:"am-divider"}):e._e(),e._v(" "),"customer"!==this.$root.settings.role?i("el-form-item",{attrs:{label:e.$root.labels.note_internal+":"}},[i("el-input",{attrs:{type:"textarea",placeholder:"",autosize:{minRows:4,maxRows:6}},on:{input:function(t){return e.clearValidation()}},model:{value:e.appointment.internalNotes,callback:function(t){e.$set(e.appointment,"internalNotes",t)},expression:"appointment.internalNotes"}})],1):e._e()],1),e._v(" "),"customer"!==this.$root.settings.role?i("el-tab-pane",{attrs:{name:"extras"}},[i("BlockLite"),e._v(" "),i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$root.labels.extras)+"\n "),e.appointment.serviceId&&e.appointment.bookings.length>0&&e.appointment.extrasSelectedCount>0?i("el-badge",{staticClass:"mark",attrs:{value:e.appointment.extrasSelectedCount}}):e._e()],1),e._v(" "),i("div",{staticClass:"am-dialog-table",class:{"am-lite-container-disabled":e.$root.isLite}},[e.appointment.providerId&&e.appointment.serviceId&&e.appointment.extrasCount>0&&e.appointment.bookings.length>0?i("div",[e._l(e.appointment.bookings,function(t,o){return["approved","pending"].includes(t.status)?i("div",{key:o,staticClass:"am-customer-extras"},[i("el-row",{staticClass:"am-customer-extras-data"},[i("el-col",[i("h3",[e._v("\n "+e._s(t.customer.firstName+" "+t.customer.lastName)+"\n ")]),e._v(" "),i("span",[e._v(e._s(t.customer.email))])])],1),e._v(" "),e._l(t.extras,function(t){return i("el-row",{key:t.extraId,attrs:{gutter:10}},[i("el-col",{attrs:{sm:10,xs:24}},[i("el-row",[i("el-col",{attrs:{sm:4,xs:2}},[i("el-checkbox",{on:{change:function(i){return e.handleExtrasSelectionChange(t)}},model:{value:t.selected,callback:function(i){e.$set(t,"selected",i)},expression:"item.selected"}})],1),e._v(" "),i("el-col",{attrs:{sm:20,xs:22}},[i("span",[e._v(e._s(t.name))])])],1)],1),e._v(" "),i("el-col",{attrs:{sm:14,xs:24}},[i("el-row",[i("el-col",{staticClass:"align-right",attrs:{sm:14,xs:14}},[i("el-input-number",{attrs:{size:"small",type:"number",min:1,max:t.maxQuantity,value:t.quantity,disabled:!t.selected},on:{change:function(i){return e.handleExtrasSelectionChange(t)}},model:{value:t.quantity,callback:function(i){e.$set(t,"quantity",i)},expression:"item.quantity"}})],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{sm:10,xs:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.price))+"\n ")])],1)],1)],1)}),e._v(" "),i("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v("\n "+e._s(e.$root.labels.subtotal)+":\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:10}},[e._v("\n "+e._s(e.getFormattedPrice(t.extrasTotalPrice))+"\n ")])],1)],2):e._e()}),e._v(" "),i("div",{staticClass:"total"},[i("el-row",{attrs:{gutter:10}},[i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v(e._s(e.$root.labels.price)+":")]),e._v(" "),i("el-col",{staticClass:"align-right ",attrs:{span:10}},[e._v(e._s(e.getFormattedPrice(e.appointment.serviceTotalPrice))+"\n ")])],1),e._v(" "),i("el-row",{attrs:{gutter:10}},[i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v(e._s(e.$root.labels.extras)+":")]),e._v(" "),i("el-col",{staticClass:"align-right ",attrs:{span:10}},[e._v(e._s(e.getFormattedPrice(e.appointment.extrasTotalPrice))+"\n ")])],1),e._v(" "),i("el-row",{staticClass:"am-strong",attrs:{gutter:10}},[i("el-col",{staticClass:"align-right",attrs:{span:14}},[e._v(e._s(e.$root.labels.total)+":")]),e._v(" "),i("el-col",{staticClass:"align-right ",attrs:{span:10}},[e._v("\n "+e._s(e.getAppointmentPrice(e.savedAppointment?e.savedAppointment.serviceId:e.appointment.serviceId,e.getAppointmentService(e.appointment),e.appointment.bookings,!1))+"\n ")])],1)],1)],2):e.appointment.serviceId&&e.appointment.providerId&&0===e.appointment.extrasCount?i("div",[i("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.service_no_extras))])]):i("div",[i("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_extras_requirements))])])])],1):e._e(),e._v(" "),0!==e.appointment.id&&"customer"!==this.$root.settings.role?i("el-tab-pane",{attrs:{label:e.$root.labels.payment,name:"payment"}},[i("dialog-appointment-payment",{attrs:{appointment:e.appointment,options:e.options,"is-cabinet":e.isCabinet},on:{editPayment:e.editPayment}})],1):e._e(),e._v(" "),e.showCustomFieldsTab()&&"customer"!==this.$root.settings.role?i("el-tab-pane",{attrs:{label:e.$root.labels.custom_fields,name:"customFields"}},[i("dialog-custom-fields",{attrs:{appointment:e.appointment,entityId:e.appointment.serviceId,customFields:this.options.entities.customFields,showCustomerInfo:!0,"hide-attachment-custom-field":e.hideAttachmentCustomField,"is-cabinet":e.isCabinet,entityType:"appointment"},on:{clearValidation:e.clearValidation}})],1):e._e(),e._v(" "),e.$root.settings.zoom.enabled&&e.appointment.zoomMeeting?i("el-tab-pane",{staticClass:"am-zoom-tabpane",attrs:{label:e.$root.labels.zoom,name:"zoom"}},["customer"!==this.$root.settings.role?i("div",[e._v("\n "+e._s(e.$root.labels.zoom_start_link)+":\n "),i("a",{staticClass:"am-link",attrs:{href:e.appointment.zoomMeeting.startUrl}},[e._v("\n "+e._s(e.$root.labels.zoom_click_to_start)+"\n ")])]):e._e(),e._v(" "),i("div",[e._v("\n "+e._s(e.$root.labels.zoom_join_link)+":\n "),i("a",{staticClass:"am-link",attrs:{href:e.appointment.zoomMeeting.joinUrl}},[e._v("\n "+e._s(e.$root.labels.zoom_click_to_join)+"\n ")])])]):e._e(),e._v(" "),e.$root.settings.lessonSpace.enabled&&e.appointment.lessonSpace?i("el-tab-pane",{staticClass:"am-zoom-tabpane",attrs:{label:e.$root.labels.lesson_space,name:"lessonSpace"}},[i("div",[e._v("\n "+e._s(e.$root.labels.lesson_space_link)+":\n "),i("a",{staticClass:"am-link",attrs:{href:e.appointment.lessonSpace}},[e._v("\n "+e._s(e.$root.labels.lesson_space_join)+"\n ")])])]):e._e(),e._v(" "),e.appointment.serviceId&&"disabled"!==e.getServiceById(e.appointment.serviceId).recurringCycle&&(e.appointment.id?e.recurringAppointments.length:e.activeRecurring&&e.enabledRecurring)?i("el-tab-pane",{attrs:{label:e.$root.labels.recurring,name:"recurring"}},[e.appointment.id?i("div",{staticClass:"am-recurring-dates-edit"},e._l(e.recurringAppointments,function(t,o){return i("el-row",{key:t.id},[i("el-col",{attrs:{span:3}},[e._v("\n "+e._s(o+1)+"\n ")]),e._v(" "),i("el-col",{attrs:{span:12}},[e._v("\n "+e._s(e.getFrontedFormattedDateTime(t.bookingStart))+"\n ")]),e._v(" "),i("el-col",{attrs:{span:9}},[i("el-button",{on:{click:function(i){return e.openRecurringAppointment(t.id)}}},[e._v("\n "+e._s(e.$root.labels.edit)+"\n ")])],1)],1)}),1):e.appointment.selectedDate&&e.appointment.selectedPeriod&&e.activeRecurring&&e.enabledRecurring&&e.initialRecurringData?i("div",[i("recurring-setup",{attrs:{initialRecurringData:e.initialRecurringData,recurringData:e.recurringData,disabledWeekdays:e.disabledWeekdays,availableDates:e.availableDates,calendarTimeSlots:e.appointment.calendarTimeSlots,occupiedTimeSlots:e.appointment.occupiedTimeSlots,service:e.getServiceById(e.appointment.serviceId),isFrontend:!1,"form-type":"recurring","forms-data":e.renderObject}}),e._v(" "),i("recurring-dates",{attrs:{dialogClass:"am-recurring-dates",recurringData:e.recurringData,availableDates:e.availableDates,calendarTimeSlots:e.appointment.calendarTimeSlots,isFrontend:!1,"form-type":"recurring","forms-data":e.renderObject,service:e.getServiceById(e.appointment.serviceId),selectedExtras:e.getSelectedDistinctExtras()},on:{datesDefined:e.recurringDatesDefined}})],1):e.activeRecurring&&e.enabledRecurring?i("div",[i("p",{attrs:{align:"center"}},[e._v(e._s(e.$root.labels.no_selected_slot_requirements))])]):e._e()]):e._e()],1)],1):e._e()],1),e._v(" "),null===e.appointment||e.dialogLoading||"customer"===this.$root.settings.role?e._e():i("dialog-actions",{attrs:{formName:"appointment",urlName:"appointments",isNew:0===e.appointment.id,entity:e.appointment,getParsedEntity:e.getParsedEntity,haveSaveConfirmation:e.haveSaveConfirmation,hasIcons:!0,status:{on:"visible",off:"hidden"},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:e.haveDuplicate,haveSaveWarning:this.activeRecurring&&this.enabledRecurring},buttonText:{confirm:{save:{yes:e.$root.labels.yes,no:e.$root.labels.no}}},message:{success:{save:e.$root.labels.appointment_saved,remove:e.$root.labels.appointment_deleted,show:"",hide:""},confirm:{remove:e.$root.labels.confirm_delete_appointment,show:"",hide:"",duplicate:e.$root.labels.confirm_duplicate_appointment,save:e.saveConfirmMessage}}},on:{errorCallback:e.errorCallback,validationTabFailCallback:e.validationTabFailCallback}}),e._v(" "),i("div",["customer"===this.$root.settings.role?i("div",{staticClass:"am-dialog-footer"},[i("div",{staticClass:"am-dialog-footer-actions"},[i("el-row",[i("el-col",{staticClass:"align-right",attrs:{sm:24}},[i("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.updateByCustomer}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)]):e._e()])],1)},staticRenderFns:[]}},943:function(e,t,i){var o=i(335)(i(944),i(945),!1,null,null,null);e.exports=o.exports},944:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{zoomSettings:null,lessonSpaceSettings:null,paymentsSettings:null,generalSettings:null,settings:null,providers:null},data:function(){var e=this;return{products:[],searchCounter:0,loadingProducts:!1,integrationsSettingsCollapse:null,paymentsSettingsCollapse:null,generalSettingsCollapse:null,rules:{redirectURLAfter:[{validator:function(t,i,o){e.clearValidation();var n=e.$refs.settings.model.redirectUrlAfterAppointment;""===n||/^((http|https):\/\/)/.test(n)?o():o(new Error(e.$root.labels.enter_valid_url_warning))},trigger:"submit"}]},errors:{redirectURLAfter:""},options:{defaultAppointmentStatus:[{label:this.$root.labels.pending,value:"pending"},{label:this.$root.labels.approved,value:"approved"}],minimumTime:[{label:this.$root.labels.disabled,value:0},{label:this.$root.labels.min10,value:600},{label:this.$root.labels.min12,value:720},{label:this.$root.labels.min15,value:900},{label:this.$root.labels.min30,value:1800},{label:this.$root.labels.min45,value:2700},{label:this.$root.labels.h1,value:3600},{label:this.$root.labels.h1min30,value:5400},{label:this.$root.labels.h2,value:7200},{label:this.$root.labels.h3,value:10800},{label:this.$root.labels.h4,value:14400},{label:this.$root.labels.h6,value:21600},{label:this.$root.labels.h8,value:28800},{label:this.$root.labels.h9,value:32400},{label:this.$root.labels.h10,value:36e3},{label:this.$root.labels.h11,value:39600},{label:this.$root.labels.h12,value:43200},{label:this.$root.labels.day1,value:86400},{label:this.$root.labels.days2,value:172800},{label:this.$root.labels.days3,value:259200},{label:this.$root.labels.days4,value:345600},{label:this.$root.labels.days5,value:432e3},{label:this.$root.labels.days6,value:518400},{label:this.$root.labels.week1,value:604800},{label:this.$root.labels.weeks2,value:1209600},{label:this.$root.labels.weeks3,value:1814400},{label:this.$root.labels.weeks4,value:2419200},{label:this.$root.labels.months3,value:7884e3},{label:this.$root.labels.months6,value:15768e3}]}}},mounted:function(){if(this.setProducts(),null!==this.generalSettings&&"numberOfDaysAvailableForBooking"in this.generalSettings&&!this.generalSettings.numberOfDaysAvailableForBooking)for(var e=document.getElementsByClassName("am-number-of-days"),t=0;t<e.length;t++)e[t].getElementsByClassName("el-input__inner")[0].value=""},computed:{isZoomProvidersConnected:function(){return null!==this.providers&&(!this.providers.map(function(e){return e.zoomUserId}).includes(null)&&0!==this.providers.length)}},methods:{isDefaultStatusPending:function(){return this.paymentsSettings.paymentLinks.enabled&&this.generalSettings&&("pending"===this.generalSettings.defaultAppointmentStatus||null===this.generalSettings.defaultAppointmentStatus&&"pending"===this.$root.settings.general.defaultAppointmentStatus)},setProducts:function(){var e=this;this.$root.settings.payments.wc.enabled&&(this.$root.settings.payments.wc.enabled&&this.paymentsSettings.wc.productId&&0===this.$root.wcProducts.filter(function(t){return t.id===e.paymentsSettings.wc.productId}).length&&this.fetchProducts({id:this.paymentsSettings.wc.productId},function(t){t.length&&e.products.push(t[0])}),this.products=this.$root.wcProducts)},selectedProduct:function(e){if(0===this.$root.wcProducts.filter(function(t){return t.id===e}).length){var t=this.products.find(function(t){return t.id===e});t&&this.$root.wcProducts.push(t)}},fetchProducts:function(e,t){var i=this;clearTimeout(this.searchProductsTimer),this.loadingProducts=!0,this.searchCounter++,this.searchProductsTimer=setTimeout(function(){var o=i.searchCounter;i.$http.get(i.$root.getAjaxUrl+"/payment/wc/products",{params:e}).then(function(e){o>=i.searchCounter&&t(e.data.data.products.sort(function(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:-1})),i.loadingProducts=!1}).catch(function(e){i.loadingProducts=!1})},500)},searchProducts:function(e){var t=this;e?this.fetchProducts({name:e},function(e){t.products=e}):this.products=this.$root.wcProducts},clearValidation:function(){}}}},945:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-entity-settings",class:{"am-lite-container-disabled":e.$root.isLite,"am-entity-settings":!0}},[null!==e.generalSettings?i("el-collapse",{model:{value:e.generalSettingsCollapse,callback:function(t){e.generalSettingsCollapse=t},expression:"generalSettingsCollapse"}},[i("el-collapse-item",{staticClass:"am-setting-box",attrs:{name:"generalSettings"}},[i("template",{slot:"title"},[i("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:e.$root.getUrl+"public/img/setting.svg"}}),e._v(" "+e._s(e.$root.labels.general)+"\n ")]),e._v(" "),null!==e.generalSettings&&"defaultAppointmentStatus"in e.generalSettings?i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.default_appointment_status)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.default_appointment_status)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{clearable:"",placeholder:e.options.defaultAppointmentStatus.find(function(t){return t.value===e.$root.settings.general.defaultAppointmentStatus}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.defaultAppointmentStatus,callback:function(t){e.$set(e.generalSettings,"defaultAppointmentStatus",t)},expression:"generalSettings.defaultAppointmentStatus"}},e._l(e.options.defaultAppointmentStatus,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"minimumTimeRequirementPriorToBooking"in e.generalSettings?i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_time_before_booking)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_time_before_booking_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{clearable:"","collapse-tags":"",placeholder:"Select",placeholder:e.options.minimumTime.find(function(t){return t.value===e.$root.settings.general.minimumTimeRequirementPriorToBooking}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.minimumTimeRequirementPriorToBooking,callback:function(t){e.$set(e.generalSettings,"minimumTimeRequirementPriorToBooking",t)},expression:"generalSettings.minimumTimeRequirementPriorToBooking"}},e._l(e.options.minimumTime,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"minimumTimeRequirementPriorToCanceling"in e.generalSettings?i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_time_before_canceling)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_time_before_canceling_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{clearable:"",placeholder:e.options.minimumTime.find(function(t){return t.value===e.$root.settings.general.minimumTimeRequirementPriorToCanceling}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.minimumTimeRequirementPriorToCanceling,callback:function(t){e.$set(e.generalSettings,"minimumTimeRequirementPriorToCanceling",t)},expression:"generalSettings.minimumTimeRequirementPriorToCanceling"}},e._l(e.options.minimumTime,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"minimumTimeRequirementPriorToRescheduling"in e.generalSettings?i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.minimum_time_before_rescheduling)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.minimum_time_before_rescheduling_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{clearable:"",placeholder:e.options.minimumTime.find(function(t){return t.value===e.$root.settings.general.minimumTimeRequirementPriorToRescheduling}).label,"popper-class":"am-dropdown-cabinet"},model:{value:e.generalSettings.minimumTimeRequirementPriorToRescheduling,callback:function(t){e.$set(e.generalSettings,"minimumTimeRequirementPriorToRescheduling",t)},expression:"generalSettings.minimumTimeRequirementPriorToRescheduling"}},e._l(e.options.minimumTime,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1):e._e(),e._v(" "),null!==e.generalSettings&&"numberOfDaysAvailableForBooking"in e.generalSettings?i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.period_available_for_booking)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.period_available_for_booking_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input-number",{staticClass:"am-number-of-days",attrs:{min:0,placeholder:e.$root.settings.general.numberOfDaysAvailableForBooking.toString()},model:{value:e.generalSettings.numberOfDaysAvailableForBooking,callback:function(t){e.$set(e.generalSettings,"numberOfDaysAvailableForBooking",t)},expression:"generalSettings.numberOfDaysAvailableForBooking"}})],1):e._e(),e._v(" "),null!==e.generalSettings&&"redirectUrlAfterAppointment"in e.generalSettings?i("el-form-item",{attrs:{label:"placeholder",prop:"redirectURLAfter",error:e.errors.redirectURLAfter}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.redirect_url_after_appointment)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.redirect_url_after_appointment_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input",{attrs:{"auto-complete":"off",placeholder:e.$root.settings.general.redirectUrlAfterAppointment.toString()},on:{input:function(t){return e.clearValidation()}},model:{value:e.generalSettings.redirectUrlAfterAppointment,callback:function(t){e.$set(e.generalSettings,"redirectUrlAfterAppointment",t)},expression:"generalSettings.redirectUrlAfterAppointment"}})],1):e._e()],2)],1):e._e(),e._v(" "),null!==e.paymentsSettings?i("el-collapse",{staticClass:"am-entity-settings-payments",model:{value:e.paymentsSettingsCollapse,callback:function(t){e.paymentsSettingsCollapse=t},expression:"paymentsSettingsCollapse"}},[i("el-collapse-item",{staticClass:"am-setting-box",attrs:{name:"paymentsSettings"}},[i("template",{slot:"title"},[i("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:e.$root.getUrl+"public/img/credit-card.svg"}}),e._v(" "+e._s(e.$root.labels.payments)+"\n ")]),e._v(" "),i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[i("span",[e._v(e._s(e.$root.labels.payment_links_enable))]),e._v(" "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.payment_links_enable_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{model:{value:e.paymentsSettings.paymentLinks.enabled,callback:function(t){e.$set(e.paymentsSettings.paymentLinks,"enabled",t)},expression:"paymentsSettings.paymentLinks.enabled"}})],1)],1),e._v(" "),e.paymentsSettings.paymentLinks.enabled?i("el-row",{staticStyle:{"margin-top":"16px"}},[i("el-col",[i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{staticStyle:{"font-size":"13px"},attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.payment_links_redirect)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.payment_links_redirect_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-input",{attrs:{placeholder:e.$root.settings.payments.paymentLinks.redirectUrl?e.$root.settings.payments.paymentLinks.redirectUrl:e.$root.getSiteUrl,"auto-complete":"off"},model:{value:e.paymentsSettings.paymentLinks.redirectUrl,callback:function(t){e.$set(e.paymentsSettings.paymentLinks,"redirectUrl",t)},expression:"paymentsSettings.paymentLinks.redirectUrl"}})],1)],1)],1):e._e(),e._v(" "),e.isDefaultStatusPending()?i("el-row",{staticStyle:{"font-size":"14px","margin-bottom":"16px !important"},attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[i("span",[e._v(e._s(e.$root.labels.payment_links_change_status))]),e._v(" "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.payment_links_change_status_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{model:{value:e.paymentsSettings.paymentLinks.changeBookingStatus,callback:function(t){e.$set(e.paymentsSettings.paymentLinks,"changeBookingStatus",t)},expression:"paymentsSettings.paymentLinks.changeBookingStatus"}})],1)],1):e._e(),e._v(" "),e.paymentsSettings.paymentLinks.enabled&&"provider"!==e.$root.settings.role?i("el-alert",{staticStyle:{"margin-bottom":"5px"},attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.payment_links_warning,closable:!1}}):e._e()],1),e._v(" "),e.$root.settings.payments.onSite?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.on_site)+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.onSite,callback:function(t){e.$set(e.paymentsSettings,"onSite",t)},expression:"paymentsSettings.onSite"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.wc.enabled?i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:"placeholder"}},[i("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.wc_product)+":\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.wc_product_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-select",{attrs:{filterable:"",remote:"",placeholder:"","popper-class":"am-dropdown-cabinet",loading:e.loadingProducts,"remote-method":e.searchProducts},on:{change:e.selectedProduct},model:{value:e.paymentsSettings.wc.productId,callback:function(t){e.$set(e.paymentsSettings.wc,"productId",t)},expression:"paymentsSettings.wc.productId"}},e._l(e.products,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.payPal.enabled?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[i("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:e.$root.getUrl+"public/img/payments/paypal-light.svg"}})]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.payPal.enabled,callback:function(t){e.$set(e.paymentsSettings.payPal,"enabled",t)},expression:"paymentsSettings.payPal.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.stripe.enabled?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[i("img",{staticClass:"svg-amelia",attrs:{width:"40px",src:e.$root.getUrl+"public/img/payments/stripe.svg"}})]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.stripe.enabled,callback:function(t){e.$set(e.paymentsSettings.stripe,"enabled",t)},expression:"paymentsSettings.stripe.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.mollie.enabled?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[i("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:e.$root.getUrl+"public/img/payments/mollie.svg"}})]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.mollie.enabled,callback:function(t){e.$set(e.paymentsSettings.mollie,"enabled",t)},expression:"paymentsSettings.mollie.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.razorpay.enabled?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[i("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:e.$root.getUrl+"public/img/payments/razorpay.svg"}})]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.paymentsSettings.razorpay.enabled,callback:function(t){e.$set(e.paymentsSettings.razorpay,"enabled",t)},expression:"paymentsSettings.razorpay.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.$root.settings.payments.wc.enabled||e.paymentsSettings.onSite&&(e.$root.settings.payments.onSite||!e.paymentsSettings.onSite)||e.paymentsSettings.payPal.enabled&&(e.$root.settings.payments.payPal.enabled||!e.paymentsSettings.payPal.enabled)||e.paymentsSettings.stripe.enabled&&(e.$root.settings.payments.stripe.enabled||!e.paymentsSettings.stripe.enabled)||e.paymentsSettings.mollie.enabled&&(e.$root.settings.payments.mollie.enabled||!e.paymentsSettings.mollie.enabled)||e.paymentsSettings.razorpay.enabled&&(e.$root.settings.payments.razorpay.enabled||!e.paymentsSettings.razorpay.enabled)?e._e():i("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.payment_warning,closable:!1}})],2)],1):e._e(),e._v(" "),e.zoomSettings||e.lessonSpaceSettings?i("el-collapse",{model:{value:e.integrationsSettingsCollapse,callback:function(t){e.integrationsSettingsCollapse=t},expression:"integrationsSettingsCollapse"}},[i("el-collapse-item",{staticClass:"am-setting-box",attrs:{name:"integrationsSettings"}},[i("template",{slot:"title"},[i("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:e.$root.getUrl+"public/img/web-hook.svg"}}),e._v(" "+e._s(e.$root.labels.integrations_settings)+"\n ")]),e._v(" "),e.zoomSettings?i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.zoom)+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.zoomSettings.enabled,callback:function(t){e.$set(e.zoomSettings,"enabled",t)},expression:"zoomSettings.enabled"}})],1)],1)],1):e._e(),e._v(" "),e.zoomSettings&&e.zoomSettings.enabled&&!e.isZoomProvidersConnected?i("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:e.$root.labels.zoom_warning,closable:!1}}):e._e(),e._v(" "),i("div",{staticClass:"am-setting-box am-switch-box"},[i("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[i("el-col",{attrs:{span:16}},[e._v("\n "+e._s(e.$root.labels.lesson_space)+"\n ")]),e._v(" "),i("el-col",{staticClass:"align-right",attrs:{span:8}},[i("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:e.lessonSpaceSettings.enabled,callback:function(t){e.$set(e.lessonSpaceSettings,"enabled",t)},expression:"lessonSpaceSettings.enabled"}})],1)],1)],1)],2)],1):e._e()],1)},staticRenderFns:[]}},975:function(e,t,i){var o=i(335)(i(976),i(977),!1,null,null,null);e.exports=o.exports},976:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(699),n=i(701),a=i(769);i.n(a);t.default={mixins:[o.a,n.a],name:"CustomDuration",props:{service:{},enabledDelete:!0,enabledAdd:!0,enabledDuration:!0},data:function(){return{}},methods:{getPossibleCustomDurations:function(e){var t=this.getPossibleDurationsInSeconds(this.service.duration,86400);return e&&-1===t.indexOf(e)&&(t.push(e),t.sort(function(e,t){return e-t})),t},setCustomDurations:function(e){""===e&&this.service.customPricing.durations.push({duration:"",price:0,rules:[]})},isDurationSelected:function(e){return this.service.customPricing.durations.filter(function(t){return parseInt(t.duration)===parseInt(e)}).length>0||e===this.service.duration},addDurationBtnDisabled:function(){return this.service.customPricing.durations.filter(function(e){return!e.duration}).length>0},addDuration:function(){this.setCustomDurations("")},deleteCustomDuration:function(e){this.service.customPricing.durations.splice(e,1),this.service.customPricing.durations.length||(this.service.customPricing.enabled=!1)}},mounted:function(){this.service.customPricing.durations.length||this.addDuration(),this.service.customPricing.durations=this.service.customPricing.durations.sort(function(e,t){return!e.duration||e.duration-t.duration})},components:{Money:a.Money}}},977:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"am-service-custom-duration"},[i("div",[i("el-row",{staticClass:"zero-margin-bottom",attrs:{gutter:24}},[i("el-col",{attrs:{span:10}},[i("span",[e._v(e._s(e.$root.labels.duration+":"))])]),e._v(" "),i("el-col",{attrs:{span:10}},[i("span",[e._v(e._s(e.$root.labels.price+":"))])]),e._v(" "),i("el-col",{attrs:{span:4}})],1),e._v(" "),e._l(e.service.customPricing.durations,function(t,o){return i("el-row",{key:o,staticClass:"small-margin-bottom am-service-custom-duration-item",attrs:{gutter:24,type:"flex"}},[i("el-col",{staticStyle:{"margin-bottom":"7px"},attrs:{span:10}},[i("el-select",{attrs:{placeholder:"",disabled:!e.enabledDuration},on:{change:e.setCustomDurations},model:{value:t.duration,callback:function(i){e.$set(t,"duration",i)},expression:"item.duration"}},e._l(e.getPossibleCustomDurations(t.duration),function(t){return i("el-option",{key:t,attrs:{label:e.secondsToNiceDuration(t),disabled:e.isDurationSelected(t),value:t}})}),1)],1),e._v(" "),i("el-col",{staticStyle:{"margin-bottom":"7px"},attrs:{span:10}},[i("money",e._b({staticClass:"el-input el-input__inner",model:{value:t.price,callback:function(i){e.$set(t,"price",i)},expression:"item.price"}},"money",e.moneyComponentData,!1))],1),e._v(" "),i("el-col",{staticStyle:{"margin-bottom":"7px"},attrs:{span:4}},[e.enabledDelete?i("span",{on:{click:function(t){return e.deleteCustomDuration(o)}}},[i("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e()])],1)}),e._v(" "),e.enabledAdd?i("el-row",{attrs:{gutter:24}},[i("el-col",[i("el-button",{staticClass:"am-dialog-create",attrs:{disabled:e.addDurationBtnDisabled(),size:"large",type:"primary"},on:{click:function(t){return e.addDuration()}}},[i("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_duration))])])],1)],1):e._e()],2)])},staticRenderFns:[]}}});
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings