FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
ameliabooking
/
public
/
js
/
chunks
Edit File: amelia-booking-events-0d421e0e1e2bdd88e543.js
wpJsonpAmeliaBookingPlugin([10],{1072:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(792),i=n(700),a=n(336),s=n(1073),r=n.n(s),l=n(891),c=n.n(l),u=n(942),d=n.n(u),p=n(945),f=n.n(p),h=n(737),m=n.n(h),g=n(660),v=n(659),b=n(680),y=n.n(b),_=n(655),k=n(654),w=n(0),x=n.n(w),C=n(658),E=n(693),S=n.n(E),T=n(796),O=n.n(T),P=n(673),$=n(802),A=n.n($),D=n(828),N=n.n(D),L=n(334),I=n.n(L),j=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};e.default={mixins:[v.a,k.a,a.a,g.a,C.a,_.a,o.a,i.a,P.a],data:function(){return{paymentLinksEnabled:null,customersNoShowCount:[],singleDatesViewActive:!0,groupDatesViewActive:!1,paginationParams:{page:1,show:this.$root.settings.general.itemsPerPageBackEnd},totalPeriodEvents:0,exportAction:"",exportParams:{fields:[{label:this.$root.labels.first_name,value:"firstName",checked:!0},{label:this.$root.labels.last_name,value:"lastName",checked:!0},{label:this.$root.labels.email,value:"email",checked:!0},{label:this.$root.labels.phone,value:"phone",checked:!0},{label:this.$root.labels.gender,value:"gender",checked:!0},{label:this.$root.labels.date_of_birth,value:"birthday",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.customer_note,value:"note",checked:!0},{label:this.$root.labels.event_book_persons,value:"persons",checked:!0},{label:this.$root.labels.event_book_status,value:"status",checked:!0},{label:this.$root.labels.event_book_tickets,value:"tickets",checked:!0},{label:this.$root.labels.coupon_code,value:"couponCode",checked:!0},{label:this.$root.labels.custom_fields,value:"customFields",checked:!0}]},dialogExport:!1,event:null,eventBookings:null,eventBooking:null,clonedEventBooking:null,eventsDay:{},eventsPeriod:[],customer:null,customerCreatedCount:0,dialogEvent:!1,dialogCustomer:!1,dialogAttendees:!1,dialogEventCustomFields:!1,fetched:!1,fetchedFiltered:!1,form:new y.a,params:{dates:this.getDatePickerInitRange(),search:"",customerId:null,locationId:null,tag:null},timer:null,count:{success:0,error:0},dialogTranslate:!1,dialogTranslateType:"name",eventTickets:null,selectedTimeZone:"",languagesData:[]}},created:function(){y.a.defaults.axios=this.$http;var t=this.getUrlQueryParams(window.location.href);this.params.dates="dateFrom"in t&&"dateTo"in t?{start:x()(t.dateFrom).toDate(),end:x()(t.dateTo).toDate()}:this.getDatePickerInitRange(),t.customerId&&(this.params.dates=null,this.params.customerId=t.customerId),this.getEventOptions(!0),this.setInitialCustomers()},mounted:function(){"groupDates"===I.a.get("ameliaEventsView")||this.$root.settings.activation.isNewInstallation?(this.singleDatesViewActive=!1,this.groupDatesViewActive=!0):(this.singleDatesViewActive=!0,this.groupDatesViewActive=!1),this.$root.settings.payments.wc&&this.$root.settings.payments.wc.enabled&&this.exportParams.fields.splice(8,0,{label:this.$root.labels.wc_order_id,value:"wcOrderId",checked:!0})},methods:{clearDateFilter:function(){this.params.dates=null,this.paginationParams.page=1,this.changeFilter()},getEventMaxCapacity:function(t){var e=0;return t.forEach(function(t){e+=t.spots}),e},canManage:function(){return"customer"!==this.$root.settings.role&&("admin"===this.$root.settings.role||"manager"===this.$root.settings.role||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)},updateAttendeesCallback:function(){this.getEvents()},duplicateEventCallback:function(t){var e=this;this.event=t,this.event.id=0,this.event.duplicated=!0,this.event.periods.forEach(function(t){t.googleCalendarEventId=null,t.googleMeetUrl=null,t.outlookCalendarEventId=null,t.microsoftTeamsUrl=null,t.appleCalendarEventId=null}),setTimeout(function(){e.dialogEvent=!0},300)},saveAttendeeCallback:function(t){"bookingStatusChanged"in t&&t.booking.persons===this.clonedEventBooking.persons||this.$http.post(this.$root.getAjaxUrl+"/bookings/success/"+t.booking.id,{type:"event",appointmentStatusChanged:t.appointmentStatusChanged,paymentId:"paymentId"in t&&t.paymentId?t.paymentId:null,customer:t.booking.customer}).then(function(t){}).catch(function(t){}),this.getEvents(),this.getEvent(t.event.id)},showDialogNewCustomer:function(){this.customer=this.getInitCustomerObject(),this.dialogCustomer=!0},saveCustomerCallback:function(t){delete t.user.birthday,this.options.entities.customers.push(t.user),this.customerCreatedCount++},saveEventCallback:function(){"provider"!==this.$root.settings.role&&this.$http.post(this.$root.getAjaxUrl+"/settings",{usedLanguages:this.options.entities.settings.general.usedLanguages}).catch(function(t){console.log(t)}),this.getEvents()},changeRange:function(){this.setDatePickerSelectedDaysCount(this.params.dates.start,this.params.dates.end),this.changeFilter()},getEventPeriods:function(t){var e=this,n=[];t.forEach(function(t){var e=x()(t.periodStart.split(" ")[0],"YYYY-MM-DD"),o=x()(t.periodEnd.split(" ")[0],"YYYY-MM-DD"),i=x()(t.periodStart.split(" ")[1],"HH:mm:ss").format("HH:mm:ss"),a=x()(t.periodEnd.split(" ")[1],"HH:mm:ss").format("HH:mm:ss");if("00:00:00"===a&&(a="24:00:00",o.subtract(1,"days")),e.diff(o,"days")<0){for(var s=[];e.isSameOrBefore(o);)s.push(e.format("YYYY-MM-DD")),e.add(1,"days");s.forEach(function(e){n.push({id:t.id,start:e+" "+i,end:e+" "+a})})}else n.push({id:t.id,start:e.format("YYYY-MM-DD")+" "+i,end:o.format("YYYY-MM-DD")+" "+a})});var o=[];return n.sort(function(t,e){return x()(t.start,"YYYY-MM-DD HH:mm:ss")-x()(e.start,"YYYY-MM-DD HH:mm:ss")}).forEach(function(t){o.push({dateOfMonth:e.handleDateTimeFormat(t.start)[0],timeStart:e.handleDateTimeFormat(t.start)[1],timeEnd:e.handleDateTimeFormat(t.end)[1]})}),o},singleDates:function(){I.a.set("ameliaEventsView","singleDates"),this.params.dates||(this.params.dates=this.getDatePickerInitRange()),this.singleDatesViewActive=!0,this.groupDatesViewActive=!1,this.getEvents()},groupDates:function(){I.a.set("ameliaEventsView","groupDates"),this.singleDatesViewActive=!1,this.groupDatesViewActive=!0,this.getEvents()},changeFilter:function(){this.params.customerId||(this.searchedCustomers=[]),this.getEvents()},getEventOptions:function(t){var e=this;this.options.fetched=!1,this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({lite:!0,types:["locations","employees","tags","custom_fields","settings","coupons"]})}).then(function(n){"customer"!==e.$root.settings.role&&(e.options.entities.settings.general.usedLanguages=n.data.data.settings.general.usedLanguages),e.options.entities.locations=n.data.data.locations,e.options.entities.employees=n.data.data.employees,e.options.entities.customFields=n.data.data.customFields,e.options.entities.customers="customers"in e.options.entities&&e.options.entities.customers.length?e.options.entities.customers:[],e.options.entities.coupons=n.data.data.coupons,e.languagesData=n.data.data.settings.languages,"provider"===e.$root.settings.role&&e.$root.settings.roles.allowWriteEvents&&(e.selectedTimeZone=e.options.entities.employees[0].timeZone?e.options.entities.employees[0].timeZone:""),e.fetched=!0,e.options.fetched=!0;var o=e;n.data.data.tags.forEach(function(t){-1===o.options.entities.tags.indexOf(t.name)&&o.options.entities.tags.push(t.name)}),t&&e.getEvents()}).catch(function(t){console.log(t.message),e.fetched=!0,e.options.fetched=!0})},getEvents:function(){var t=this;this.fetchedFiltered=!1;var e=JSON.parse(JSON.stringify(this.params)),n=[];e.dates&&(e.dates.start&&n.push(x()(e.dates.start).format("YYYY-MM-DD")),e.dates.end&&n.push(x()(e.dates.end).format("YYYY-MM-DD")),e.dates=n),this.groupDatesViewActive&&(e.group=!0,e.page=this.paginationParams.page,e.limit=this.paginationParams.show),Object.keys(e).forEach(function(t){return!e[t]&&0!==e[t]&&delete e[t]}),"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents&&(e.providers=this.options.entities.employees.map(function(t){return t.id}),e.timeZone=this.options.entities.employees[0].timeZone?this.options.entities.employees[0].timeZone:null);var o=this;this.$http.get(this.$root.getAjaxUrl+"/events",{params:this.getAppropriateUrlParams(e)}).then(function(e){var n={};t.totalPeriodEvents=e.data.data.count,e.data.data.events.forEach(function(t){t.periods.forEach(function(e){for(var i=x()(e.periodStart,"YYYY-MM-DD HH:mm:ss"),a=x()(e.periodEnd,"YYYY-MM-DD HH:mm:ss");i.isBefore(a);){var s=i.format("YYYY-MM-DD"),r=null===o.params.dates||i.isBetween(o.params.dates.start,o.params.dates.end,"days","[]");s in n||!r||(n[s]={date:s,events:[]}),t.customTickets.length&&t.customPricing&&(t.maxCapacity=t.maxCustomCapacity?t.maxCustomCapacity:o.getEventMaxCapacity(t.customTickets),t.places=t.maxCapacity,t.customTickets.forEach(function(e){t.places-=e.sold}));var l=JSON.parse(t.settings);t.waitingList=l&&l.waitingList?l.waitingList:j({},o.$root.settings.appointments.waitingListEvents,{enabled:!1}),t.full&&"approved"===t.status?t.status="full":t.upcoming&&"approved"===t.status&&(t.status="upcoming");var c=t.customLocation?t.customLocation:t.locationId?o.options.entities.locations.find(function(e){return e.id===t.locationId}).name:null;s in n&&n[s].events.push({id:t.id,name:t.name,periodStart:e.periodStart,periodEnd:e.periodEnd,bookingOpens:t.bookingOpens,bookingCloses:t.bookingCloses,location:c,recurring:t.recurring,maxCapacity:t.maxCapacity,status:t.status,places:t.places,created:t.created,opened:t.opened,closed:t.closed,checked:!1,zoomMeeting:e.zoomMeeting,translations:t.translations,customTickets:t.customTickets,organizerId:t.organizerId,waitingList:t.waitingList}),i.add(1,"days")}})});var i=Object.keys(n);i.sort(function(t,e){return t<e?-1:t>e?1:0});var a={};i.forEach(function(t){a[t]=n[t]}),t.customersNoShowCount=e.data.data.customersNoShowCount,t.eventsPeriod=e.data.data.events,t.eventsDay=a,t.fetched=!0,t.fetchedFiltered=!0}).catch(function(e){console.log(e.message),t.fetched=!0,t.fetchedFiltered=!0})},closeDialogAttendees:function(){this.dialogAttendees=!1},showDialogAttendee:function(t){this.eventBooking=t,this.clonedEventBooking=JSON.parse(JSON.stringify(t)),this.paymentLinksEnabled=!(!this.$root.settings.payments||!this.$root.settings.payments.paymentLinks)&&this.$root.settings.payments.paymentLinks.enabled;var e=this.event?this.event.settings:null;e&&e.payments&&e.payments.paymentLinks&&(this.paymentLinksEnabled=e.payments.paymentLinks.enabled),this.dialogEventCustomFields=!0},closeDialogAttendee:function(){this.dialogEventCustomFields=!1},showDialogTranslate:function(t,e){this.dialogTranslateType=t,this.eventTickets=e,this.dialogTranslate=!0},saveDialogTranslate:function(t,e,n,o,i){this.options.entities.settings.general.usedLanguages=this.options.entities.settings.general.usedLanguages.concat(e),"tickets"===n?this.eventTickets.forEach(function(t,e){t.translations=i[e].translations}):this.event.translations=t,this.dialogTranslate=!1}},computed:{filterApplied:function(){return!!this.params.search||!!this.params.locationId||!!this.params.dates||!!this.params.customerId||this.params.dates&&(!!this.params.dates.start||!!this.params.dates.end)},eventCustomerIds:function(){return this.eventBookings.map(function(t){return t.customerId})},eventBookMultipleTimes:function(){return this.event.bookMultipleTimes}},watch:{"params.search":function(){void 0!==this.params.search&&(this.fetchedFiltered=!1,clearTimeout(this.timer),this.timer=setTimeout(this.changeFilter,500))}},components:{EventListItem:r.a,DialogCustomer:O.a,PageHeader:S.a,DialogExport:A.a,DialogEvent:c.a,DialogAttendees:d.a,DialogAttendee:f.a,PaginationBlock:m.a,DialogTranslate:N.a}}},1073:function(t,e,n){var o=n(90)(n(1074),n(1075),!1,null,null,null);t.exports=o.exports},1074:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(792),i=n(700),a=n(336),s=n(660),r=n(659),l=n(655),c=n(654),u=n(658),d=n(673);e.default={mixins:[r.a,c.a,a.a,s.a,u.a,l.a,o.a,i.a,d.a],props:{evt:null,singleDatesViewActive:!0,groupDatesViewActive:!1,employees:{type:Array,required:!0}},data:function(){return{event:null,customer:null,waitingListEnabled:!1}},mounted:function(){this.waitingListEnabled=this.$root.settings.appointments.waitingListEvents.enabled},methods:{showDialogEditEvent:function(t){this.$emit("showDialogEditEvent",t)},showDialogAttendees:function(t){this.$emit("showDialogAttendees",t)},getEventOrganizerName:function(t){var e="";if(t){var n=this.employees.filter(function(e){return e.id===t});e=n.length?n[0].firstName+" "+n[0].lastName:""}return e||"/"},ticketsTooltipContent:function(t){for(var e="Tickets: ",n=0;n<t.length;n++)e+=0!==t[n].sold?t[n].name+" x "+t[n].sold+(t.length-1!==n?", ":""):"";return","===e.charAt(e.length-2)&&(e=e.slice(0,e.length-2)),"Tickets: "!==e?e:""},canManage:function(){return"customer"!==this.$root.settings.role&&("admin"===this.$root.settings.role||"manager"===this.$root.settings.role||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)}}}},1075:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-event-data"},[n("el-row",[n("el-col",{attrs:{lg:11}},[n("el-row",{staticClass:"am-events-flex-row-middle-align",attrs:{gutter:10}},[n("el-col",{attrs:{lg:6,sm:6}},[n("span",{staticClass:"am-event-checkbox"},[t.singleDatesViewActive?n("span",{staticClass:"am-event-time"},[t._v("\n "+t._s(t.handleDateTimeFormat(t.evt.periodStart)[1])+" - "+t._s(t.handleDateTimeFormat(t.evt.periodEnd)[1])+"\n ")]):t._e(),t._v(" "),t.groupDatesViewActive?n("span",{staticClass:"am-event-time"},[n("span",[t._v(t._s(t.handleDateTimeFormat(t.evt.periods[0].periodStart)[0]))]),t._v(" "),n("br"),t._v(" "),n("span",[t._v(t._s(t.handleDateTimeFormat(t.evt.periods[0].periodStart)[1]))])]):t._e()])]),t._v(" "),n("el-col",{attrs:{lg:7,sm:9}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event_name))]),t._v(" "),n("h4",[t._v("\n "+t._s(t.evt.name)+"\n "),n("span",{staticClass:"am-event-data-id"},[t._v(" ("+t._s(t.$root.labels.id)+": "+t._s(t.evt.id)+")")])])]),t._v(" "),n("el-col",{staticClass:"am-event-location",attrs:{lg:4,sm:4,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event_location))]),t._v(" "),n("p",[n("span",{staticClass:"am-semi-strong"},[t._v(t._s(t.evt.location))])])]),t._v(" "),n("el-col",{attrs:{lg:3,sm:4,xs:12}},[n("h4",[t._v(t._s(t.getEventOrganizerName(t.evt.organizerId)))])]),t._v(" "),n("el-col",{attrs:{lg:3,sm:3,xs:12}},[n("p",{staticClass:"am-col-title am-event-spots"},[t._v(t._s(t.$root.labels.booked+":"))]),t._v(" "),n("div",{staticClass:"am-event-spots",style:{display:"flex",justifyContent:"space-evenly"}},[n("span",{staticClass:"am-semi-strong"},[t._v(t._s(t.evt.maxCapacity-t.evt.places)+" / "+t._s(t.evt.maxCapacity))]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{staticStyle:{"text-align":"left"},attrs:{slot:"content"},domProps:{innerHTML:t._s(t.ticketsTooltipContent(t.evt.customTickets))},slot:"content"}),t._v(" "),""!==t.ticketsTooltipContent(t.evt.customTickets)?n("img",{attrs:{src:t.$root.getUrl+"public/img/am-package.svg"}}):t._e()])],1)]),t._v(" "),n("el-col",{attrs:{lg:4,sm:4,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event_recurring))]),t._v(" "),n("div",{staticClass:"am-event-recurring"},[t.evt.recurring?n("p",{staticClass:"am-recurring-label"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/loop.svg"}}),t._v(" "+t._s(t.$root.labels.yes)+"\n ")]):n("p",[t._v(t._s(t.$root.labels.no))])])])],1)],1),t._v(" "),n("el-col",{attrs:{lg:13}},[n("el-row",{staticClass:"am-events-flex-row-middle-align",attrs:{gutter:10}},[n("el-col",{attrs:{lg:6,sm:10,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event_booking_opens))]),t._v(" "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"Open",placement:"top",disabled:!t.evt.bookingOpens}},[n("p",{class:{"am-event-open":t.evt.opened&&"approved"===t.evt.status}},[n("span",{staticClass:"am-semi-strong"},[t._v(t._s(t.handleDateTimeFormat(t.evt.bookingOpens?t.evt.bookingOpens:t.evt.created)[0]))]),t._v("\n @ "),n("span",{staticClass:"am-semi-strong"},[t._v(" "+t._s(t.handleDateTimeFormat(t.evt.bookingOpens?t.evt.bookingOpens:t.evt.created)[1]))])])])],1),t._v(" "),n("el-col",{attrs:{lg:6,sm:10,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event_booking_closes))]),t._v(" "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"Closed",placement:"top",disabled:!t.evt.bookingCloses}},[n("p",{class:{"am-event-closed":t.evt.closed&&"approved"===t.evt.status}},[n("span",{staticClass:"am-semi-strong"},[t._v(t._s(t.handleDateTimeFormat(t.evt.bookingCloses?t.evt.bookingCloses:t.singleDatesViewActive?t.evt.periodStart:t.evt.periods[0].periodStart)[0]))]),t._v("\n @ "),n("span",{staticClass:"am-semi-strong"},[t._v(" "+t._s(t.handleDateTimeFormat(t.evt.bookingCloses?t.evt.bookingCloses:t.singleDatesViewActive?t.evt.periodStart:t.evt.periods[0].periodStart)[1]))])])])],1),t._v(" "),n("el-col",{attrs:{lg:3,sm:4,xs:24}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.status_colon))]),t._v(" "),n("span",{class:"am-customer-status "+t.getEventStatus(t.evt).class},[t._v("\n "+t._s(t.getEventStatus(t.evt).label)+"\n ")]),t._v(" "),"full"===t.evt.status&&t.waitingListEnabled&&t.evt.waitingList.enabled?n("span",{staticClass:"am-customer-status waiting-list"},[t._v("\n "+t._s(t.$root.labels.waiting_list)+"\n ")]):t._e()]),t._v(" "),t.canManage()?n("el-col",{staticClass:"am-align-right",attrs:{lg:9,sm:10,xs:24}},[n("div",{staticClass:"am-event-actions",on:{click:function(t){t.stopPropagation()}}},[t.canManage()?n("el-button",{attrs:{disabled:!t.canManage()},on:{click:function(e){return t.showDialogAttendees(t.evt.id)}}},[t._v("\n "+t._s(t.$root.labels.event_attendees)+"\n ")]):t._e(),t._v(" "),t.canManage()?n("el-button",{attrs:{disabled:!t.canManage()},on:{click:function(e){return t.showDialogEditEvent(t.evt.id)}}},[t._v("\n "+t._s(t.$root.labels.edit)+"\n ")]):t._e()],1)]):t._e(),t._v(" "),"customer"===t.$root.settings.role&&t.$root.settings.zoom.enabled&&t.evt.zoomMeeting?n("el-col",{staticClass:"am-align-right",attrs:{lg:9,sm:10,xs:24}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.zoom_join_link))]),t._v(" "),n("a",{staticClass:"am-link",staticStyle:{float:"left"},attrs:{href:t.evt.zoomMeeting.joinUrl}},[t._v("\n "+t._s(t.evt.zoomMeeting.joinUrl)+"\n ")])]):t._e()],1)],1)],1)],1)},staticRenderFns:[]}},1076:function(t,e){t.exports={render:function(){var t=this,e=this,n=e.$createElement,o=e._self._c||n;return o("div",{staticClass:"am-wrap"},[o("div",{staticClass:"am-body",attrs:{id:"am-events"}},[o("page-header",{on:{newEventBtnClicked:e.showDialogNewEvent}}),e._v(" "),o("div",{staticClass:"am-spinner am-section",staticStyle:{display:"none"}},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),o("EmptyState",{attrs:{visible:e.fetched&&0===Object.keys(e.eventsDay).length&&!e.filterApplied&&e.fetchedFiltered&&e.options.fetched,title:e.$root.labels.no_events_yet,description:e.$root.labels.click_add_events}}),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:0!==Object.keys(e.eventsDay).length||0===Object.keys(e.eventsDay).length&&e.filterApplied||!e.fetchedFiltered,expression:"(Object.keys(eventsDay).length !== 0 || (Object.keys(eventsDay).length === 0 && filterApplied) || !fetchedFiltered)"}]},[o("div",{staticClass:"am-events-filter am-section"},[o("el-form",{attrs:{method:"POST"}},[o("el-row",{attrs:{gutter:16}},[o("el-col",{staticClass:"v-calendar-column",attrs:{md:5}},[o("el-form-item",{attrs:{prop:"dates"}},[o("v-date-picker",{attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","popover-align":"left","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},on:{input:e.changeRange},model:{value:e.params.dates,callback:function(t){e.$set(e.params,"dates",t)},expression:"params.dates"}}),e._v(" "),!e.singleDatesViewActive&&e.params.dates?o("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:e.clearDateFilter}},[o("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):e._e()],1)],1),e._v(" "),o("el-col",{attrs:{md:5}},[o("div",{staticClass:"am-search"},[o("el-form-item",[o("el-input",{attrs:{placeholder:e.$root.labels.event_search_placeholder},model:{value:e.params.search,callback:function(t){e.$set(e.params,"search",t)},expression:"params.search"}})],1)],1)]),e._v(" "),o("el-col",{attrs:{md:4+(e.options.entities.locations.length>0?0:4)+(e.options.entities.tags.length>0?0:4)}},[o("el-form-item",[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.attendee,remote:"","remote-method":e.searchCustomers,loading:e.loadingCustomers},on:{change:e.changeFilter},model:{value:e.params.customerId,callback:function(t){e.$set(e.params,"customerId",t)},expression:"params.customerId"}},e._l(e.searchedCustomers.length?e.searchedCustomers:e.options.entities.customers,function(t,e){return o("el-option",{key:e,attrs:{label:t.firstName+" "+t.lastName,value:t.id}})}),1)],1)],1),e._v(" "),e.options.entities.locations.length>0?o("el-col",{attrs:{md:4}},[o("el-form-item",[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.location},on:{change:e.changeFilter},model:{value:e.params.locationId,callback:function(t){e.$set(e.params,"locationId",t)},expression:"params.locationId"}},e._l(e.options.entities.locations,function(t,e){return o("el-option",{key:e,attrs:{label:t.name,value:t.id}})}),1)],1)],1):e._e(),e._v(" "),e.options.entities.tags.length>0?o("el-col",{staticClass:"am-tag-filter",attrs:{md:4}},[o("el-form-item",[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.tag},on:{change:e.changeFilter},model:{value:e.params.tag,callback:function(t){e.$set(e.params,"tag",t)},expression:"params.tag"}},e._l(e.options.entities.tags,function(t,e){return o("el-option",{key:e,attrs:{label:t,value:t}})}),1)],1)],1):e._e(),e._v(" "),o("el-col",{staticClass:"am-grid-view-filter",attrs:{md:2}},[o("div",{staticClass:"am-filter-buttons"},[o("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$root.labels.view_list,placement:"top"}},[o("el-button",{staticClass:"am-button-icon change-view",class:{active:e.singleDatesViewActive},attrs:{title:e.$root.labels.view_list},on:{click:e.singleDates}},[o("img",{staticClass:"svg-amelia",attrs:{alt:"Table View",src:e.$root.getUrl+"public/img/list-view.svg"}})])],1),e._v(" "),o("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$root.labels.view_group,placement:"top"}},[o("el-button",{staticClass:"am-button-icon change-view",class:{active:e.groupDatesViewActive},attrs:{title:e.$root.labels.view_group},on:{click:e.groupDates}},[o("i",{staticClass:"el-icon-date"})])],1)],1)])],1)],1)],1),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:e.fetched&&0===Object.keys(e.eventsDay).length&&e.filterApplied&&e.fetchedFiltered&&e.options.fetched,expression:"fetched && Object.keys(eventsDay).length === 0 && filterApplied && fetchedFiltered && options.fetched"}],staticClass:"am-empty-state am-section",staticStyle:{display:"none"}},[o("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),o("h2",[e._v(e._s(e.$root.labels.no_results))])]),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetched||!e.fetchedFiltered||!e.options.fetched,expression:"!fetched || !fetchedFiltered || !options.fetched"}],staticClass:"am-spinner am-section"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:e.fetchedFiltered&&e.options.fetched&&0!==Object.keys(e.eventsDay).length,expression:"fetchedFiltered && options.fetched && Object.keys(eventsDay).length !== 0"}],staticClass:"am-events am-section"},[o("div",{staticClass:"am-events-list-head"},[o("el-row",{style:{width:e.singleDatesViewActive?"":"98%"}},[o("el-col",{attrs:{lg:11}},[o("el-row",{staticClass:"am-events-flex-row-middle-align",attrs:{gutter:10}},[o("el-col",{attrs:{lg:6}},[o("p")]),e._v(" "),o("el-col",{attrs:{lg:7}},[o("p",[e._v(e._s(e.$root.labels.event_name))])]),e._v(" "),o("el-col",{staticClass:"am-event-location",attrs:{lg:4}},[o("p",[e._v(e._s(e.$root.labels.event_location))])]),e._v(" "),o("el-col",{attrs:{lg:3}},[o("p",[e._v(e._s(e.$root.labels.event_organizer+":"))])]),e._v(" "),o("el-col",{attrs:{lg:3}},[o("p",{staticClass:"am-event-spots"},[e._v(e._s(e.$root.labels.booked+":"))])]),e._v(" "),o("el-col",{attrs:{lg:4}},[o("p",[e._v(e._s(e.$root.labels.event_recurring))])])],1)],1),e._v(" "),o("el-col",{attrs:{lg:13}},[o("el-row",{staticClass:"am-events-flex-row-middle-align",attrs:{gutter:10}},[o("el-col",{attrs:{lg:0,md:3}}),e._v(" "),o("el-col",{attrs:{lg:6}},[o("p",[e._v(e._s(e.$root.labels.event_booking_opens))])]),e._v(" "),o("el-col",{attrs:{lg:6}},[o("p",[e._v(e._s(e.$root.labels.event_booking_closes))])]),e._v(" "),o("el-col",{attrs:{lg:3}},[o("p",[e._v(e._s(e.$root.labels.status_colon))])]),e._v(" "),e.canManage()?o("el-col",{attrs:{lg:9}}):e._e(),e._v(" "),e.$root.settings.zoom.enabled&&"customer"===e.$root.settings.role?o("el-col",{attrs:{lg:9}},[o("p",[e._v(e._s(e.$root.labels.zoom_join_link))])]):e._e()],1)],1)],1)],1),e._v(" "),e._l(e.singleDatesViewActive?e.eventsDay:[e.eventsPeriod],function(t,n){return o("div",[e.singleDatesViewActive?o("div",{staticClass:"am-events-list-day-title"},[o("el-row",[o("el-col",{attrs:{span:24}},[o("h2",[e._v("\n "+e._s(e.handleDateTimeFormat(t.date+" 00:00:00")[0])+"\n ")])])],1)],1):e._e(),e._v(" "),o("div",{staticClass:"am-events-list"},[e._l(t.events,function(t,n){return e.singleDatesViewActive?o("div",{key:n,staticClass:"am-event"},[o("event-list-item",{attrs:{evt:t,singleDatesViewActive:e.singleDatesViewActive,groupDatesViewActive:e.groupDatesViewActive,employees:e.options.entities.employees},on:{showDialogEditEvent:function(t){e.showDialogEditEvent(t)},showDialogAttendees:function(t){e.showDialogAttendees(t)}}})],1):e._e()}),e._v(" "),e.singleDatesViewActive?e._e():o("el-collapse",e._l(e.eventsPeriod,function(t,n){return o("el-collapse-item",{key:n,staticClass:"am-event",attrs:{name:n}},[o("template",{slot:"title"},[o("event-list-item",{staticStyle:{width:"98%"},attrs:{evt:t,singleDatesViewActive:e.singleDatesViewActive,groupDatesViewActive:e.groupDatesViewActive,employees:e.options.entities.employees},on:{showDialogEditEvent:function(t){e.showDialogEditEvent(t)},showDialogAttendees:function(t){e.showDialogAttendees(t)}}})],1),e._v(" "),o("div",{staticStyle:{"border-top":"1px solid #E2E6EC",margin:"16px 0"}},e._l(e.getEventPeriods(t.periods),function(t,n){return o("div",{key:n},[o("span",[e._v("\n "+e._s(t.dateOfMonth)+"\n ")]),e._v(" "),o("span",[e._v("\n : "+e._s(t.timeStart)+" - "+e._s(t.timeEnd)+"\n ")])])}),0)],2)}),1)],2)])}),e._v(" "),e.groupDatesViewActive?o("pagination-block",{attrs:{params:e.paginationParams,show:e.paginationParams.show,count:e.totalPeriodEvents,label:e.$root.labels.events.toLowerCase(),visible:e.totalPeriodEvents>e.paginationParams.show},on:{change:e.getEvents}}):e._e()],2)]),e._v(" "),e.canManage()?o("div",{staticClass:"am-button-new",attrs:{id:"am-button-new"}},[o("el-button",{attrs:{id:"am-plus-symbol",type:"primary",icon:"el-icon-plus"},on:{click:e.showDialogNewEvent}})],1):e._e(),e._v(" "),o("transition",{attrs:{name:"slide"}},[e.dialogEvent?o("el-dialog",{staticClass:"am-side-dialog am-dialog-event",attrs:{"close-on-click-modal":!1,"show-close":!1,visible:e.dialogEvent},on:{"update:visible":function(t){e.dialogEvent=t}}},[o("dialog-event",{attrs:{event:e.event,employees:e.options.entities.employees,locations:e.options.entities.locations,tags:e.options.entities.tags,settings:e.options.entities.settings,selectedTimeZone:e.selectedTimeZone},on:{closeDialog:e.closeDialogEvent,saveCallback:e.saveEventCallback,showDialogTranslate:e.showDialogTranslate,duplicateCallback:e.duplicateEventCallback}})],1):e._e()],1),e._v(" "),o("transition",{attrs:{name:"slide"}},[e.dialogAttendees&&e.event&&e.eventBookings?o("el-dialog",{staticClass:"am-side-dialog am-dialog-event",attrs:{"close-on-click-modal":!1,"show-close":!1,visible:e.dialogAttendees},on:{"update:visible":function(t){e.dialogAttendees=t}}},[o("dialog-attendees",{attrs:{customTickets:e.event.customTickets,eventBookings:e.eventBookings,bookingCreatedCount:e.bookingCreatedCount,options:e.options,popperAppendToBody:!0,eventStatus:e.event.status,customersNoShowCount:e.customersNoShowCount,"aggregated-price":e.event.aggregatedPrice,event:e.event},on:{closeDialog:e.closeDialogAttendees,updateAttendeesCallback:e.updateAttendeesCallback,showDialogAttendee:e.showDialogAttendee,openExportAttendeesDialog:function(t){e.dialogExport=!0}}})],1):e._e()],1),e._v(" "),o("transition",{attrs:{name:"slide"}},[e.dialogEventCustomFields&&e.event&&e.eventBooking?o("el-dialog",{staticClass:"am-side-dialog am-dialog-event",attrs:{"close-on-click-modal":!1,"show-close":!1,visible:e.dialogEventCustomFields},on:{"update:visible":function(t){e.dialogEventCustomFields=t}}},[o("dialog-attendee",{attrs:{"cloned-event-booking":e.clonedEventBooking,"payment-links-enabled":e.paymentLinksEnabled,customTickets:e.event.customTickets,eventBooking:e.eventBooking,eventCustomPricing:e.event.customPricing,eventCustomerIds:e.eventCustomerIds,eventBookMultipleTimes:e.eventBookMultipleTimes,eventMaxCapacity:e.event.maxCapacity,eventId:e.event.id,options:e.options,customerCreatedCount:e.customerCreatedCount,popperAppendToBody:!0,isWaitingList:e.event.settings.waitingList.enabled},on:{closeDialog:e.closeDialogAttendee,showDialogNewCustomer:e.showDialogNewCustomer,saveCallback:e.saveAttendeeCallback}})],1):e._e()],1),e._v(" "),o("transition",{attrs:{name:"slide"}},[e.dialogCustomer?o("el-dialog",{staticClass:"am-side-dialog",attrs:{"close-on-click-modal":!1,visible:e.dialogCustomer,"show-close":!1},on:{"update:visible":function(t){e.dialogCustomer=t}}},[o("dialog-customer",{attrs:{customer:e.customer},on:{closeDialog:function(t){e.dialogCustomer=!1},saveCallback:e.saveCustomerCallback}})],1):e._e()],1),e._v(" "),e.event&&e.event.id?o("el-form",{attrs:{action:e.exportAction,method:"POST"}},[o("transition",{attrs:{name:"slide"}},[e.dialogExport?o("el-dialog",{staticClass:"am-side-dialog am-dialog-export",attrs:{"close-on-click-modal":!1,visible:e.dialogExport,"show-close":!1},on:{"update:visible":function(t){e.dialogExport=t}}},[o("dialog-export",{attrs:{data:Object.assign(e.exportParams,{id:e.event.id}),action:e.$root.getAjaxUrl+"/report/event/attendees"},on:{updateAction:function(e){t.exportAction=e},closeDialogExport:function(t){e.dialogExport=!1}}})],1):e._e()],1)],1):e._e(),e._v(" "),o("transition",{attrs:{name:"slide"}},[e.dialogTranslate?o("el-dialog",{staticClass:"am-side-dialog am-dialog-translate am-edit",attrs:{"close-on-click-modal":!1,"show-close":!0,visible:e.dialogTranslate},on:{"update:visible":function(t){e.dialogTranslate=t}}},[o("dialog-translate",{attrs:{"passed-translations":e.event.translations,name:e.event.name,"used-languages":e.options.entities.settings.general.usedLanguages,"all-languages-data":e.languagesData,type:e.dialogTranslateType,eventTickets:e.eventTickets,tab:e.eventTickets&&e.eventTickets.length?"tickets":"event"},on:{saveDialogTranslate:e.saveDialogTranslate,closeDialogTranslate:function(t){e.dialogTranslate=!1}}})],1):e._e()],1),e._v(" "),o("el-col",{attrs:{md:6}},[o("a",{staticClass:"am-help-button",attrs:{href:"https://wpamelia.com/events/",target:"_blank",rel:"nofollow"}},[o("i",{staticClass:"el-icon-question"}),e._v(" "+e._s(e.$root.labels.need_help)+"?\n ")])])],1)])},staticRenderFns:[]}},1611:function(t,e,n){var o=n(90)(n(1072),n(1076),!1,null,null,null);t.exports=o.exports},654:function(t,e,n){"use strict";e.a={data:function(){return{colors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB","31CDF3","6AB76C","FD5FA1","A697C5"],usedColors:[]}},methods:{deleteImage:function(t){t.pictureThumbPath="",t.pictureFullPath=""},getAppropriateUrlParams:function(t){if("disableUrlParams"in this.$root.settings.activation&&!this.$root.settings.activation.disableUrlParams)return t;var e=JSON.parse(JSON.stringify(t));return["categories","services","packages","employees","providers","providerIds","extras","locations","events","types","dates"].forEach(function(t){if("extras"===t&&t in e){e.extras=JSON.parse(e.extras);var n=[];e.extras.forEach(function(t){n.push(t.id+"-"+t.quantity)}),e.extras=n.length?n:null}t in e&&Array.isArray(e[t])&&e[t].length&&(e[t]=e[t].join(","))}),e},inlineSVG:function(){var t=n(662);t.init({svgSelector:"img.svg-amelia",initClass:"js-inlinesvg"})},inlineSVGCabinet:function(){setTimeout(function(){n(662).init({svgSelector:"img.svg-cabinet",initClass:"js-inlinesvg"})},100)},imageFromText:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.getNameInitials(t),i=Math.floor(Math.random()*this.colors.length),a=this.colors[i];if(this.usedColors.push(this.colors[i]),this.colors.splice(i,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),n)return e.firstName?this.$root.getUrl+"public/img/default-employee.svg":e.latitude?this.$root.getUrl+"public/img/default-location.svg":this.$root.getUrl+"public/img/default-service.svg";var s=document.createElement("canvas");s.width=100,s.height=100;var r=s.getContext("2d");return r.fillStyle=a.startsWith("#")?a:"#"+a,r.fillRect(0,0,s.width,s.height),r.font="40px Arial",r.fillStyle="#ffffff",r.textAlign="center",r.textBaseline="middle",r.fillText(o,s.width/2,s.height/2),s.toDataURL("image/png")},pictureLoad:function(t,e){if(null!==t){var n=!0===e?t.firstName+" "+t.lastName:t.name;if(void 0!==n)return t.pictureThumbPath=t.pictureThumbPath||this.imageFromText(n),t.pictureThumbPath}},imageLoadError:function(t,e){var n=!0===e?t.firstName+" "+t.lastName:t.name;void 0!==n&&(t.pictureThumbPath=this.imageFromText(n,t,!0))},getNameInitials:function(t){return t.split(" ").map(function(t){return t.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},655:function(t,e,n){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a={data:function(){return{}},methods:{replaceExistingObjectProperties:function(t,e){var n=this;Object.keys(t).forEach(function(i){null!==t[i]&&"object"===o(t[i])&&i in e?n.replaceExistingObjectProperties(t[i],e[i]):i in e&&(t[i]=e[i])})},addMissingObjectProperties:function(t,e){var n=this;Object.keys(e).forEach(function(i){var a=!1;i in t||("object"===o(e[i])?(t[i]={},a=!0):(t[i]=null,a=!0)),null===e[i]||"object"!==o(e[i])?a&&(t[i]=e[i]):n.addMissingObjectProperties(t[i],e[i])})},scrollView:function(t,e,n){"undefined"!=typeof jQuery&&(void 0!==n&&n||jQuery(window).width()<=600)&&setTimeout(function(){var n=document.getElementById(t);void 0!==n&&null!==n&&n.scrollIntoView({behavior:"smooth",block:e,inline:"end"})},200)},scrollViewInModal:function(t){this.$nextTick(function(){var e=document.getElementById(t),n=document.querySelectorAll(".am-dialog-scrollable");if(e&&n&&n.length){var o=e,i=e.offsetTop;do{i+=(o=o.offsetParent).offsetTop}while(o===n[0]);n[0].scrollTop=i}})},getUrlQueryParams:function(t){var e=t.indexOf("#")>0?t.substring(0,t.indexOf("#")).split("?")[1]:t.split("?")[1];if(e){var n=[],o={};return e.split("&").forEach(function(t){n=t.split("="),o[n[0]]=decodeURIComponent(n[1]).replace(/\+/g," ")}),o}},getUrlParams:function(t){var e={};if(-1!==t.indexOf("?")){var n=[];t.split("?")[1].split("&").forEach(function(t){n=t.split("="),e[n[0]]=decodeURIComponent(n[1]).replace(/\+/g," ")})}return e},removeURLParameter:function(t,e){var n=t.split("?");if(n.length>=2){for(var o=encodeURIComponent(e)+"=",i=n[1].split(/[&;]/g),a=i.length;a-- >0;)-1!==i[a].lastIndexOf(o,0)&&i.splice(a,1);return t=n[0]+(i.length>0?"?"+i.join("&"):"")}return t},capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},trimProperty:function(t,e){t[e]=t[e].trim()}}}},656:function(t,e,n){"use strict";var o=n(686),i=n(344),a=Object.prototype.toString;function s(t){return"[object Array]"===a.call(t)}function r(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===a.call(t)}function c(t,e){if(null!==t&&void 0!==t)if("object"==typeof t||s(t)||(t=[t]),s(t))for(var n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===a.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:r,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===a.call(t)},isFile:function(t){return"[object File]"===a.call(t)},isBlob:function(t){return"[object Blob]"===a.call(t)},isFunction:l,isStream:function(t){return r(t)&&l(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function n(n,o){"object"==typeof e[o]&&"object"==typeof n?e[o]=t(e[o],n):e[o]=n}for(var o=0,i=arguments.length;o<i;o++)c(arguments[o],n);return e},extend:function(t,e,n){return c(e,function(e,i){t[i]=n&&"function"==typeof e?o(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},657:function(t,e,n){"use strict";e.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 t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.currencies.find(function(e){return e.code===t.$root.settings.payments.currencyCode});return n&&e&&"INR"!==n.code?n.symbol_native:e&&"INR"===n.code?n.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 t=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(t):this.getCurrencySymbol(t)+" "},getPriceSuffix:function(){var t=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(t):" "+this.getCurrencySymbol(t)},getFormattedPrice:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getPriceNumberOfDecimalPlaces(),o=this.getPriceThousandSeparator(),i=this.getPriceDecimalSeparator(),a=this.getPricePrefix(),s=this.getPriceSuffix(),r=parseInt(t=Math.abs(+t||0).toFixed(n))+"",l=r.length>3?r.length%3:0;return(e?a:"")+(l?r.substr(0,l)+o:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+o)+(n?i+Math.abs(t-r).toFixed(n).slice(2):"")+(e?s:"")},getPercentage:function(t,e){return t*e/100}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(!0),suffix:this.getPriceSuffix(!0),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},658:function(t,e,n){"use strict";e.a={methods:{notify:function(t,e,n,o,i){var a=this;void 0===o&&(o=""),setTimeout(function(){var s={customClass:o,title:t,message:e,type:n,offset:50};void 0!==i&&(s.duration=i),a.$notify(s)},700)}}}},659:function(t,e,n){"use strict";var o=n(679),i=n(672),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a={mixins:[o.a,i.a],data:function(){return{}},methods:{getLocationById:function(t){return this.options.entities.locations.find(function(e){return e.id===t})||null},getCustomerById:function(t){return this.options.entities.customers.find(function(e){return e.id===t})||null},getProviderById:function(t){return this.options.entities.employees.find(function(e){return e.id===t})||null},getServiceById:function(t){return this.options.entities.services.find(function(e){return e.id===t})||null},getCategoryById:function(t){return this.options.entities.categories.find(function(e){return e.id===t})||null},getPackageById:function(t){return this.options.entities.packages.find(function(e){return e.id===t})||null},getProviderService:function(t,e){var n=this.getProviderById(t).serviceList.find(function(t){return t.id===parseInt(e)});return n?Object.assign(JSON.parse(JSON.stringify(this.getServiceById(e))),n):null},getProviderBadge:function(t,e){var n=this.$root.settings.roles.providerBadges.badges.map(function(t){return t.id}),o=null;if(!t.badgeId||!n.includes(t.badgeId))return null;switch(o=this.$root.settings.roles.providerBadges.badges.find(function(e){return e.id===t.badgeId}),e){case"":return!0;case"color":return o.color;case"content":return o.content;default:return!0}},getServiceProviders:function(t,e){var n=this;return void 0!==e&&e?this.options.entities.employees.filter(function(e){return-1!==e.serviceList.map(function(t){return t.id}).indexOf(t)}):this.options.entities.employees.filter(function(e){return-1!==e.serviceList.filter(function(t){return n.isEmployeeService(e.id,t.id)}).map(function(t){return t.id}).indexOf(t)})},getServiceLocations:function(t,e){var n=this,o=[];return this.options.entities.employees.filter(function(e){return-1!==e.serviceList.map(function(t){return t.id}).indexOf(t)}).forEach(function(t){o=n.getProviderLocations(t.id,e).map(function(t){return t.id}).concat(o)}),this.options.entities.locations.filter(function(t){return-1!==o.indexOf(t.id)})},getProviderLocations:function(t,e){var n=this,o=[this.getProviderById(t).locationId];if(t in this.options.entitiesRelations)for(var i in this.options.entitiesRelations[t])this.options.entitiesRelations[t].hasOwnProperty(i)&&(o=o.concat(this.options.entitiesRelations[t][i]));return o=o.filter(function(t,e,n){return n.indexOf(t)===e}),(void 0!==e&&e?this.options.entities.locations:this.options.entities.locations.filter(function(e){return n.isEmployeeLocation(t,e.id)})).filter(function(t){return-1!==o.indexOf(t.id)})},getLocationProviders:function(t,e){var n=this,o=[];return this.options.entities.employees.forEach(function(i){-1!==(void 0!==e&&e?n.getProviderLocations(i.id).filter(function(t){return n.isEmployeeLocation(i.id,t.id)}):n.getProviderLocations(i.id)).map(function(t){return t.id}).indexOf(t)&&o.push(i.id)}),o=o.filter(function(t,e,n){return n.indexOf(t)===e}),this.options.entities.employees.filter(function(t){return-1!==o.indexOf(t.id)})},getServicesFromCategories:function(t){var e=[];return t.map(function(t){return t.serviceList}).forEach(function(t){e=e.concat(t)}),e.sort(this.sortWithNull)},getCategoryServices:function(t){return this.options.entities.categories.find(function(e){return e.id===t}).serviceList},getCustomerInfo:function(t){var e=null;return"info"in t&&t.info?Object.assign({id:"customer"in t?t.customer.id:null},JSON.parse(t.info)):("customerId"in t?e=this.getCustomerById(t.customerId):"customer"in t&&(e=this.getCustomerById(t.customer.id)),null!==e?e:"customer"in t?t.customer:null)},isEmployeeServiceLocation:function(t,e,n){return t in this.options.entitiesRelations&&e in this.options.entitiesRelations[t]&&-1!==this.options.entitiesRelations[t][e].indexOf(n)},isEmployeeService:function(t,e){return t in this.options.entitiesRelations&&e in this.options.entitiesRelations[t]},isEmployeeLocation:function(t,e){var n=!1;if(t in this.options.entitiesRelations)for(var o in this.options.entitiesRelations[t])this.options.entitiesRelations[t].hasOwnProperty(o)&&-1!==this.options.entitiesRelations[t][o].indexOf(e)&&(n=!0);return n},getAvailableEntitiesIds:function(t,e){var n=this,o=[],i=[],a=[],s=null!==e.categoryId?t.categories.find(function(t){return t.id===e.categoryId}):null,r=s?s.serviceList.map(function(t){return t.id}):[];if(null!==e.categoryId&&0===r.length||null!==e.serviceId&&null!==e.employeeId&&!this.isEmployeeService(e.employeeId,e.serviceId)||null!==e.serviceId&&null!==e.employeeId&&null!==e.locationId&&!this.isEmployeeServiceLocation(e.employeeId,e.serviceId,e.locationId))return{services:[],locations:[],employees:[],categories:[]};var l=function(t){if(!n.options.entitiesRelations.hasOwnProperty(t))return"continue";var s=parseInt(t);if(null!==e.employeeId&&e.employeeId!==s||null!==e.locationId&&!n.isEmployeeLocation(s,e.locationId)||null!==e.serviceId&&!n.isEmployeeService(s,e.serviceId)||null!==e.categoryId&&0===r.filter(function(t){return n.isEmployeeService(s,t)}).length||null!==e.categoryId&&null!==e.locationId&&0===r.filter(function(t){return n.isEmployeeServiceLocation(s,t,e.locationId)}).length||null!==e.serviceId&&null!==e.locationId&&!n.isEmployeeServiceLocation(s,e.serviceId,e.locationId))return"continue";for(var l in-1===i.indexOf(s)&&i.push(s),n.options.entitiesRelations[s])if(n.options.entitiesRelations[s].hasOwnProperty(l)){var c=parseInt(l);null!==e.serviceId&&e.serviceId!==c||null!==e.categoryId&&-1===r.indexOf(c)||null!==e.locationId&&!n.isEmployeeServiceLocation(s,c,e.locationId)||(-1===o.indexOf(c)&&o.push(c),n.options.entitiesRelations[s][c].length&&n.options.entitiesRelations[s][c].forEach(function(t){null!==e.locationId&&e.locationId!==t||-1===a.indexOf(t)&&a.push(t)}))}};for(var c in this.options.entitiesRelations)l(c);return{services:o,locations:a,employees:i,categories:t.categories.filter(function(t){return t.serviceList.map(function(t){return t.id}).filter(function(t){return-1!==o.indexOf(t)}).length>0}).map(function(t){return t.id})}},getParsedCustomPricing:function(t){return null===t.customPricing?t.customPricing={enabled:null,durations:[],persons:[],periods:{default:[],custom:[]}}:"object"!==a(t.customPricing)&&(t.customPricing=this.getArrayCustomPricing(t)),t.customPricing},filterEntities:function(t,e){var n=this,o=this.getAvailableEntitiesIds(t,e);this.options.entities.employees=t.employees.filter(function(t){return-1!==o.employees.indexOf(t.id)&&t.serviceList.filter(function(t){return-1!==o.services.indexOf(t.id)}).length>0}),this.options.entities.employees.forEach(function(t){t.fullName=t.firstName+" "+t.lastName,t.serviceList.forEach(function(t){t.customPricing=n.getParsedCustomPricing(t)})}),this.options.entities.categories=t.categories,this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories).filter(function(t){return t.show&&-1!==o.services.indexOf(t.id)}),this.options.entities.services.forEach(function(t){t.extras.forEach(function(t){t.extraId=t.id}),t.customPricing=n.getParsedCustomPricing(t)}),this.options.entities.locations=t.locations.filter(function(t){return-1!==o.locations.indexOf(t.id)}),this.options.entities.customFields=t.customFields;var i=this.options.entities.services.map(function(t){return t.id});if("packages"in t&&(!("show"in e)||"services"!==e.show)){t.packages.forEach(function(t){"bookableIds"in t||(t.bookableIds=t.bookable.map(function(t){return t.service.id}))});var a=t.packages.filter(function(t){return"visible"===t.status}).filter(function(t){return t.bookableIds.filter(function(t){return-1!==i.indexOf(t)}).length}),s=this.options.entities.locations.map(function(t){return t.id}),r=this.options.entities.employees.map(function(t){return t.id}),l=[];if(a.forEach(function(e){var o=!1;"availableBookableInfo"in e||(e.availableBookableInfo=[]),e.bookable.forEach(function(i){var a=!1;(0===i.minimumScheduled&&i.maximumScheduled>0||i.minimumScheduled>0&&0===i.maximumScheduled||i.minimumScheduled>0&&i.maximumScheduled>0)&&(o=!0,a=!0),i.hasSlots=a;var c=i.providers.length;if(!t.locations.length||n.options.entities.locations.length){var u=i.locations.length;!c||(i.providers=i.providers.filter(function(t){return-1!==r.indexOf(t.id)&&u?i.locations.filter(function(e){return n.isEmployeeServiceLocation(t.id,i.service.id,e.id)}).length:!n.options.entities.locations.length||n.options.entities.locations.filter(function(e){return n.isEmployeeServiceLocation(t.id,i.service.id,e.id)}).length}),i.providers.length)?(u&&(i.locations=i.locations.filter(function(t){return-1!==s.indexOf(t.id)&&(c?i.providers.filter(function(e){return n.isEmployeeServiceLocation(e.id,i.service.id,t.id)}).length:n.options.entities.employees.filter(function(e){return n.isEmployeeServiceLocation(e.id,i.service.id,t.id)}).length)}),i.locations.length||l.push(e.id)),-1===e.availableBookableInfo.map(function(t){return t.serviceId}).indexOf(i.service.id)&&e.availableBookableInfo.push({serviceId:i.service.id,serviceName:n.getNameTranslated(i.service),serviceQuantity:i.quantity,providersCount:i.providers.length})):l.push(e.id)}else l.push(e.id)}),e.bookable=e.bookable.filter(function(t){return t.hasSlots}),e.hasSlots=o}),this.options.entities.packages=a.filter(function(t){return-1===l.indexOf(t.id)}),"show"in e&&"packages"===e.show){var c=[];this.options.entities.packages.forEach(function(t){t.bookable.forEach(function(t){c.push(t.service.categoryId)})}),this.options.entities.categories=this.options.entities.categories.filter(function(t){return-1!==c.indexOf(t.id)})}this.options.entities.taxes=t.taxes}},processEntities:function(t){var e=this;this.options.entitiesRelations=t.entitiesRelations,this.options.isFrontEnd?("packages"in t&&t.packages.length&&(this.responseEntities.employees=t.employees,this.responseEntities.categories=t.categories,this.responseEntities.locations=t.locations,this.responseEntities.customFields=t.customFields,this.responseEntities.services=this.getServicesFromCategories(this.responseEntities.categories),this.responseEntities.packages=t.packages?t.packages.filter(function(t){return t.available}):[],this.responseEntities.daysOff=t.settings?t.settings.daysOff:[],this.responseEntities.taxes=t.taxes?t.taxes:[],t.packages=t.packages.filter(function(t){return t.available}),this.params&&this.params.sort||(t.packages=t.packages.sort(function(t,e){return t.position-e.position}))),this.filterEntities(t,this.getShortCodeEntityIds())):(this.options.entities.employees=t.employees,this.options.entities.categories=t.categories,this.options.entities.locations=t.locations,"customers"in t&&t.customers.length&&(this.options.entities.customers=t.customers),this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories),this.options.entities.resources=t.resources,this.options.entities.packages=t.packages,this.options.entities.customFields=t.customFields,this.options.entities.coupons=t.coupons,this.options.entities.spaces=t.spaces,this.options.entities.services.forEach(function(t){t.extras.forEach(function(t){t.extraId=t.id})}),this.options.availableEntitiesIds=this.getAvailableEntitiesIds(t,{categoryId:null,serviceId:null,employeeId:null,locationId:null})),this.options.entities.employees.forEach(function(t){t.serviceList.forEach(function(t){t.customPricing=e.getParsedCustomPricing(t)})}),this.options.entities.services.forEach(function(t){t.customPricing=e.getParsedCustomPricing(t)}),"settings"in t&&(this.options.entities.settings=t.settings),this.options.entities.tags="tags"in t?t.tags:[],this.options.entities.taxes="taxes"in t?t.taxes:[]},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(t){var e=this.getServicesFromCategories(t.categories);t.employees.forEach(function(t){t.serviceList.forEach(function(t){Object.assign(t,e.find(function(e){return e.id===t.id}),{price:t.price,customPricing:t.customPricing,minCapacity:t.minCapacity,maxCapacity:t.maxCapacity})})}),"packages"in t&&t.packages.forEach(function(t){t.bookable.forEach(function(t){var n=e.find(function(e){return e.id===t.service.id});n&&(t.service=JSON.parse(JSON.stringify(n)))})})},fetchEntities:function(t,e){var n=this,o={params:this.getAppropriateUrlParams({lite:!0,types:e.types,dates:e.dates})};if(e.page?o.params.page=e.page:"isFrontEnd"in e&&e.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})),e.isPanel||"calendar"===o.params.page||this.$root.hasApiCall&&!this.entitiesLoaded())this.$http.get(this.$root.getAjaxUrl+"/entities",o).then(function(o){n.options.isFrontEnd=e.isFrontEnd,window.ameliaAppointmentEntities=o.data.data;var i=JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));n.fillCachedEntities(i),n.processEntities(i),n.$root.useTranslations&&n.translateEntities(i);t(!0)}).catch(function(e){console.log(e);t(!1)});else var i=setInterval(function(){if(n.entitiesLoaded()){clearInterval(i),n.options.isFrontEnd=e.isFrontEnd;var o="ameliaEntities"in window?JSON.parse(JSON.stringify(window.ameliaEntities)):JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));n.fillCachedEntities(o),n.processEntities(o),n.$root.useTranslations&&n.translateEntities(o);t(!0)}},1e3)},setMissingServices:function(t){var e=this,n=this.options.entities.services.map(function(t){return parseInt(t.id)});Object.keys(t).forEach(function(o){t[o].appointments.forEach(function(t){t.service&&-1===n.indexOf(parseInt(t.serviceId))&&(e.options.entities.services.push(t.service),n.push(parseInt(t.serviceId)))})})},getFilteredEntities:function(t,e,n){var o=this,i=this.appointment&&this.appointment.id&&this.appointment[n]?this.appointment[n]:null;return this.options.entities[e].forEach(function(e){e.disabled=-1===t.indexOf(e.id)}),this.options.entities[e].filter(function(t){return-1!==o.options.availableEntitiesIds[e].indexOf(t.id)||null!==i&&i===t.id})}},computed:{visibleLocations:function(){return this.options.entities.locations.filter(function(t){return"visible"===t.status})},visibleEmployees:function(){return this.options.entities.employees.filter(function(t){return"visible"===t.status})},visibleCustomers:function(){return this.options.entities.customers.filter(function(t){return"visible"===t.status})},visibleServices:function(){return this.options.entities.services.filter(function(t){return"visible"===t.status}).sort(this.sortWithNull)},employeesFiltered:function(){var t=this,e=void 0!==this.appointment&&"bookings"in this.appointment&&this.appointment.bookings.length?this.appointment.bookings[0].persons:null,n=this.$root.settings.roles.providerBadges.badges.map(function(t){return t.id});this.visibleEmployees.forEach(function(e){e.badgeId&&n.includes(e.badgeId)?e.badge=t.$root.settings.roles.providerBadges.badges.find(function(t){return t.id===e.badgeId}):e.badge=null});var o=this.visibleEmployees.filter(function(n){return n.serviceList.filter(function(o){return"visible"===o.status&&(null===e||o.maxCapacity>=e)&&(!t.appointment.serviceId||t.isEmployeeService(n.id,o.id)&&o.id===t.appointment.serviceId)&&(!t.appointment.locationId||t.isEmployeeServiceLocation(n.id,o.id,t.appointment.locationId))&&(!t.appointment.categoryId||n.serviceList.filter(function(e){return"visible"===e.status&&e.categoryId===t.appointment.categoryId}).length>0)}).length>0});return this.options.isFrontEnd?o:this.getFilteredEntities(o.map(function(t){return t.id}),"employees","providerId").sort(function(t,e){return t.disabled-e.disabled})},servicesFiltered:function(){var t=this,e=[];if(this.appointment.providerId){var n=this.employeesFiltered.find(function(e){return e.id===t.appointment.providerId});e=void 0!==n?n.serviceList.filter(function(t){return"visible"===t.status}).map(function(t){return t.id}):[]}var o=this.visibleServices.filter(function(n){return!(t.appointment.providerId&&-1===e.indexOf(n.id)||t.appointment.locationId&&!(t.employeesFiltered.filter(function(e){return t.isEmployeeServiceLocation(e.id,n.id,t.appointment.locationId)}).length>0)||t.appointment.categoryId&&n.categoryId!==t.appointment.categoryId)});return this.options.isFrontEnd?o:this.getFilteredEntities(o.map(function(t){return t.id}),"services","serviceId")},sortWithNull:function(){return function(t,e){return t.position===e.position?0:null===t.position?1:null===e.position?-1:t.position<e.position?-1:1}},sortNotifications:function(){return function(t,e){return t.customName===e.customName?0:null===t.customName?1:null===e.customName?-1:t.id>e.id?-1:1}},locationsFiltered:function(){var t=this,e=[];if(this.appointment.providerId){var n=this.employeesFiltered.find(function(e){return e.id===t.appointment.providerId});e=void 0!==n?n.serviceList.filter(function(t){return"visible"===t.status}):[]}var o=null;this.appointment.categoryId&&(o=this.categoriesFiltered.find(function(e){return e.id===t.appointment.categoryId}));var i=this.visibleLocations.filter(function(n){return(!t.appointment.providerId||e.filter(function(e){return t.isEmployeeServiceLocation(t.appointment.providerId,e.id,n.id)}).length>0)&&(!t.appointment.serviceId||t.employeesFiltered.filter(function(e){return t.isEmployeeServiceLocation(e.id,t.appointment.serviceId,n.id)}).length>0)&&(!t.appointment.categoryId||void 0!==o&&t.employeesFiltered.filter(function(e){return e.serviceList.filter(function(i){return"visible"===i.status&&i.categoryId===o.id&&t.isEmployeeServiceLocation(e.id,i.id,n.id)}).length>0}).length>0)});return this.options.isFrontEnd?i:this.getFilteredEntities(i.map(function(t){return t.id}),"locations","locationId").sort(function(t,e){return t.disabled-e.disabled})},couponsFilteredService:function(){var t=this,e=[];return this.options.entities.coupons&&(e=this.options.entities.coupons.filter(function(t){return t.serviceList.length>0}),this.appointment.serviceId)?e.filter(function(e){return e.serviceList.find(function(e){return e.id===t.appointment.serviceId})}):e},couponsFilteredEvent:function(){var t=this,e=[];return this.options.entities.coupons&&(e=this.options.entities.coupons.filter(function(t){return t.eventList.length>0}),this.eventId)?e.filter(function(e){return e.eventList.find(function(e){return e.id===t.eventId})}):e},categoriesFiltered:function(){var t=this,e=null;this.appointment.providerId&&(e=this.employeesFiltered.find(function(e){return e.id===t.appointment.providerId}));var n=null;this.appointment.serviceId&&(n=this.servicesFiltered.find(function(e){return e.id===t.appointment.serviceId}));var o=this.options.entities.categories.filter(function(o){return(!t.appointment.serviceId||void 0!==n&&n.categoryId===o.id)&&(!t.appointment.locationId||o.serviceList.filter(function(e){return"visible"===e.status&&t.employeesFiltered.filter(function(n){return t.isEmployeeServiceLocation(n.id,e.id,t.appointment.locationId)}).length>0}).length>0)&&(!t.appointment.providerId||void 0!==e&&-1!==e.serviceList.filter(function(e){return"visible"===e.status&&t.isEmployeeService(t.appointment.providerId,e.id)}).map(function(t){return t.categoryId}).indexOf(o.id))});return this.options.isFrontEnd?o:this.getFilteredEntities(o.map(function(t){return t.id}),"categories","categoryId").sort(function(t,e){return t.disabled-e.disabled})}}}},660:function(t,e,n){"use strict";var o=n(0),i=n.n(o);e.a={data:function(){return{timeSelectOptions:{start:"00:00",end:"23:59",step:this.secondsToTimeSelectStep(this.getTimeSlotLength())}}},methods:{convertDateTimeRangeDifferenceToMomentDuration:function(t,e){return i.a.duration(i()(e).diff(i()(t)))},convertSecondsToMomentDuration:function(t){return i.a.duration(t,"seconds")},momentDurationToNiceDurationWithUnit:function(t){var e=Math.floor(t.asMinutes()/60),n=t.asMinutes()%60;return(e?e+this.$root.labels.h+" ":"")+" "+(n?n+this.$root.labels.min:"")},secondsToNiceDuration:function(t){var e=Math.floor(t/3600),n=t/60%60;return(e?e+this.$root.labels.h+" ":"")+" "+(n?n+this.$root.labels.min:"")},secondsToTimeSelectStep:function(t){var e=Math.floor(t/3600),n=Math.floor(t/60)-60*e;return t<0?(e||"00")+":"+((n<9?"0"+n:n)||"00"):((e<=9?"0"+e:e)||"00")+":"+((n<=9?"0"+n:n)||"00")},getTimeSlotLength:function(){return this.$root.settings.general.timeSlotLength},getPossibleDurationsInSeconds:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:86400,n=this.getTimeSlotLength(),o=[],i=n;i<=e;i+=n)o.push(i);return t&&-1===o.indexOf(t)&&(o.push(t),o.sort(function(t,e){return t-e})),o},getTimeSelectOptionsWithLimits:function(t,e){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:t,maxTime:e}},getSecondsInStringTime:function(t){return i.a.utc(1e3*t).format("HH:mm")},getStringTimeInSeconds:function(t){return i()(t,"HH:mm").diff(i()().startOf("day"),"seconds")}}}},661:function(t,e,n){"use strict";var o=n(657);e.a={mixins:[o.a],methods:{isDurationPricingEnabled:function(t){return null!==t&&("duration"===t.enabled||!0===t.enabled)&&"durations"in t},isPersonPricingEnabled:function(t){return null!==t&&"person"===t.enabled&&"persons"in t},isPeriodPricingEnabled:function(t){return null!==t&&"period"===t.enabled&&"periods"in t&&!this.$root.licence.isLite&&!this.$root.licence.isStarter&&!this.$root.licence.isBasic},getBookingServicePrice:function(t,e,n,o,i){return this.isDurationPricingEnabled(t.customPricing)?this.getBookingDurationPrice(t,e):this.isPersonPricingEnabled(t.customPricing)?this.getBookingPersonPrice(t,n):this.isPeriodPricingEnabled(t.customPricing)&&o&&i?this.getBookingPeriodPrice(t,parseInt(o),i):t.price},getBookingDurationPrice:function(t,e){return e&&t.customPricing.durations.filter(function(t){return t.duration===e}).length?t.customPricing.durations.find(function(t){return t.duration===e}).price:t.price},getBookingPersonPrice:function(t,e){var n=t.customPricing.persons.map(function(t){return t.range}).sort(function(t,e){return e.range-t.range});if(e&&n.length){var o=n.filter(function(t){return t>=e}),i=0===o.length?n[n.length-1]:o[0];return t.customPricing.persons.find(function(t){return t.range===i}).price}return t.price},getBookingPeriodPrice:function(t,e,n){var o=n.split(" ");if(o[0]in this.pricedCalendarTimeSlots&&o[1].substr(0,5)in this.pricedCalendarTimeSlots[o[0]]){var i=this.pricedCalendarTimeSlots[o[0]][o[1].substr(0,5)].filter(function(t){return t.e===e});return i.length?i[0].p:t.price}return t.price}}}},662:function(t,e,n){(function(n){var o,i,a,s;s=void 0!==n?n:this.window||this.global,i=[],o=function(t){var e,n={},o=!!document.querySelector&&!!t.addEventListener,i={initClass:"js-inlinesvg",svgSelector:"img.svg"},a=function(){var t={},e=!1,n=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],n++);for(var i=function(n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e&&"[object Object]"===Object.prototype.toString.call(n[o])?t[o]=a(!0,t[o],n[o]):t[o]=n[o])};o>n;n++){i(arguments[n])}return t},s=function(t){var n=document.querySelectorAll(e.svgSelector),o=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}}(n.length,t);Array.prototype.forEach.call(n,function(t,n){var i=t.src||t.getAttribute("data-src"),a=t.attributes,s=new XMLHttpRequest;s.open("GET",i,!0),s.onload=function(){if(s.status>=200&&s.status<400){var n=(new DOMParser).parseFromString(s.responseText,"text/xml").getElementsByTagName("svg")[0];if(n.removeAttribute("xmlns:a"),n.removeAttribute("width"),n.removeAttribute("height"),n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("enable-background"),n.removeAttribute("xmlns:xlink"),n.removeAttribute("xml:space"),n.removeAttribute("version"),Array.prototype.slice.call(a).forEach(function(t){"src"!==t.name&&"alt"!==t.name&&n.setAttribute(t.name,t.value)}),n.classList?n.classList.add("inlined-svg"):n.className+=" inlined-svg",n.setAttribute("role","img"),a.longdesc){var i=document.createElementNS("http://www.w3.org/2000/svg","desc"),r=document.createTextNode(a.longdesc.value);i.appendChild(r),n.insertBefore(i,n.firstChild)}if(a.alt){n.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(a.alt.value);l.appendChild(c),n.insertBefore(l,n.firstChild)}t.parentNode.replaceChild(n,t),o(e.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 n.init=function(t,n){o&&(e=a(i,t||{}),s(n||function(){}),document.documentElement.className+=" "+e.initClass)},n}(s),void 0===(a="function"==typeof o?o.apply(e,i):o)||(t.exports=a)}).call(e,n(37))},663:function(t,e,n){"use strict";e.a={data:function(){return{}},methods:{isCustomFieldVisible:function(t,e,n){switch(e){case"appointment":return-1!==t.services.map(function(t){return t.id}).indexOf(n)||t.allServices;case"event":return-1!==t.events.map(function(t){return t.id}).indexOf(n)||t.allEvents}return!1},getAllowedCustomFields:function(t,e,n){var o=[];this.options.entities.customFields.forEach(function(t){"services"===e&&t.allServices||"events"===e&&t.allEvents?o.push(parseInt(t.id)):t[e].forEach(function(e){e.id===n&&o.push(parseInt(t.id))})});var i={};for(var a in t)-1!==o.indexOf(parseInt(a))&&(i[a]=t[a]);return i},setBookingCustomFields:function(){if(this.appointment&&this.appointment.bookings&&this.appointment.bookings.length)for(var t=0;t<this.appointment.bookings.length;t++)for(var e=0;e<this.options.entities.customFields.length;e++)if(null===this.appointment.bookings[t].customFields&&(this.appointment.bookings[t].customFields={}),void 0!==this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id]&&(this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id].type=this.options.entities.customFields[e].type),void 0!==this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id]&&"datepicker"===this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id].type&&this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id].value&&(this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id].value=this.$moment(this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id].value).toDate()),"content"!==this.options.entities.customFields[e].type&&void 0===this.appointment.bookings[t].customFields[this.options.entities.customFields[e].id]){var n="";"checkbox"===this.options.entities.customFields[e].type&&(n=[]),"datepicker"===this.options.entities.customFields[e].type&&(n=null),this.$set(this.appointment.bookings[t].customFields,this.options.entities.customFields[e].id,{label:this.options.entities.customFields[e].label,value:n,type:this.options.entities.customFields[e].type})}},getCustomFieldOptions:function(t){return t.map(function(t){return t.label})},getCustomFieldValue:function(t,e){return Array.isArray(t)?t.join("; "):"datepicker"!==e?t:t?this.getFrontedFormattedDate(t):null},getCustomFieldFileURL:function(t,e,n){return this.$root.getAjaxUrl+"/fields/"+t+"/"+e+"/"+n+"&source=cabinet-provider"}}}},664:function(t,e,n){"use strict";e.a={data:function(){return{screenWidth:window.innerWidth}},mounted:function(){var t=this;window.onresize=function(){t.screenWidth=window.innerWidth}}}},666:function(t,e,n){"use strict";e.a={methods:{getEntityTax:function(t,e){var n=[];"taxes"in this&&this.taxes&&this.taxes.length?n=this.taxes:"options"in this&&"entities"in this.options&&"taxes"in this.options.entities&&this.options.entities.taxes&&this.options.entities.taxes.length&&(n=this.options.entities.taxes);var o=n.find(function(n){return n[e+"List"].find(function(e){return e.id===t})});return!o||void 0===o||"status"in o&&"visible"!==o.status?null:o},getEntityTaxAmount:function(t,e){switch(t.type){case"percentage":return this.getPercentage(e,t.amount);case"fixed":return t.amount}},getAmountData:function(t,e,n){t&&!t.excluded&&(e=this.getBaseAmount(e,t));var o=n?e/100*n.discount+n.deduction:0,i=0;return t&&(i=this.getEntityTaxAmount(t,e-o)),{total:e,discount:o,tax:i}},getEventBookingPriceAmount:function(t){var e=0;return t.ticketsData&&t.ticketsData.length?t.ticketsData.forEach(function(n){e+=n.price*(t.aggregatedPrice?n.persons:1)}):e=t.price*(t.aggregatedPrice?t.persons:1),this.getAmountData(t.tax&&t.tax.length?t.tax[0]:null,e,t.coupon)},getAppointmentPriceAmount:function(t,e,n,o,i){var a=this,s=null,r=this.$root.settings.payments.taxes.excluded,l=this.$root.settings.payments.taxes.enabled;"tax"in t?(r=(s=t.tax&&t.tax.length?t.tax[0]:null)?s.excluded:r,l=null!==s):l&&(s=this.getEntityTax(t.id,"service"));var c=(t.aggregatedPrice?n:1)*t.price,u=0,d=0,p=0,f=0;if(o){u=c,d=c,l&&s&&!r&&(c=this.getBaseAmount(c,s));var h=o.discount?this.getPercentage(c,o.discount):0,m=c-h;c=m;var g=o.deduction,v=0;if(m>0&&g>0&&(c=m-(v=m>=g?g:m),g=m>=g?0:g-m),l&&s&&r)f=this.getEntityTaxAmount(s,c);else if(l&&s&&!r){c=this.getBaseAmount((t.aggregatedPrice?n:1)*t.price,s);var b=this.getEntityTaxAmount(s,c-h-v);i?u=c+b:(u=c,d=c,f=b)}p=h+v,e.forEach(function(e){var s=null,r=a.$root.settings.payments.taxes.excluded,l=a.$root.settings.payments.taxes.enabled;"tax"in e?(e.tax&&!Array.isArray(e.tax)&&(e.tax=JSON.parse(e.tax)),r=(s=e.tax&&e.tax.length?e.tax[0]:null)?s.excluded:r,l=null!==s):l&&(s=a.getEntityTax(e.extraId,"extra"));var c=null===e.aggregatedPrice?t.aggregatedPrice:e.aggregatedPrice,d=e.price*e.quantity*(c?n:1),h=d;l&&s&&!r&&(d=a.getBaseAmount(d,s));var m=o.discount?a.getPercentage(d,o.discount):0,v=d-m;d=v;var b=0;if(v>0&&g>0&&(d=v-(b=v>=g?g:v),g=v>=g?0:g-v),l&&s&&r)f+=a.getEntityTaxAmount(s,d);else if(l&&s&&!r){d=a.getBaseAmount(e.price*e.quantity*(c?n:1),s);var y=a.getEntityTaxAmount(s,d-m-b);i?h=d+y:(h=d,f+=y)}else!l||s||r||(h=e.price*e.quantity*(c?n:1));u+=h,p+=m+b})}else l&&s&&r?f=this.getEntityTaxAmount(s,c):l&&s&&!r&&!i&&(c=this.getBaseAmount((t.aggregatedPrice?n:1)*t.price,s),f=this.getEntityTaxAmount(s,c)),u=c,d=c,e.forEach(function(e){var o=null===e.aggregatedPrice?t.aggregatedPrice:e.aggregatedPrice,s=e.price*e.quantity*(o?n:1),r=null,l=a.$root.settings.payments.taxes.excluded,c=a.$root.settings.payments.taxes.enabled;"tax"in e?(e.tax&&!Array.isArray(e.tax)&&(e.tax=JSON.parse(e.tax)),l=(r=e.tax&&e.tax.length?e.tax[0]:null)?r.excluded:l,c=null!==r):c&&(r=a.getEntityTax(e.extraId,"extra")),c&&r&&l?f+=a.getEntityTaxAmount(r,s):c&&r&&!l&&!i&&(s=a.getBaseAmount(e.price*e.quantity*(o?n:1),r),f+=a.getEntityTaxAmount(r,s)),u+=s});return{total:u,totalBookable:d,discount:p,tax:f}},getBaseAmount:function(t,e){switch(e.type){case"percentage":return t/(1+e.amount/100);case"fixed":return t-e.amount}},getPercentage:function(t,e){return t*e/100},getRound:function(t){return Math.round(100*t)/100}}}},668:function(t,e,n){"use strict";var o=n(0),i=n.n(o);e.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"]},{value:"waiting",label:this.$root.labels.waiting_list}]}},methods:{isPanelActive:function(t){return!this.$root.shortcodeData.cabinet||!(this.$root.shortcodeData.cabinet.appointments||this.$root.shortcodeData.cabinet.events||this.$root.shortcodeData.cabinet.profile)||(!("appointments"!==t||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.appointments)||(!("events"!==t||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.events)||"profile"===t&&this.$root.shortcodeData.cabinet&&this.$root.shortcodeData.cabinet.profile))},changeRange:function(t){this.$store.commit("cabinet/setParams",{dates:t}),this.setDatePickerSelectedDaysCount(this.$store.state.cabinet.params.dates.start,this.$store.state.cabinet.params.dates.end),this.$emit("refreshReservations")},isBookingCancelable:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.cancelable&&!("canceled"===t.bookings[e].status||"rejected"===t.bookings[e].status||"no-show"===t.bookings[e].status)},isBookingReschedulable:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.reschedulable&&!("canceled"===t.bookings[e].status||"rejected"===t.bookings[e].status||"no-show"===t.bookings[e].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(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.payBtnLoader=e.bookings?e.bookings[0].id:e.id;var i=JSON.parse(JSON.stringify(e));i[i.type]=e;var a=JSON.parse(JSON.stringify(this.$store.state.cabinet.profile));if(a.birthday=null,i.customer=a,"package"===i.type){var s=o||Object.keys(i.payments)[0],r=i.payments[s].payments.sort(function(t,e){return t.id>e.id?1:-1});i.paymentId=r[0].id,i.packageCustomerId=s,i.packageReservations=[],i.bookable.forEach(function(t){i.packageReservations=i.packageReservations.concat(t.service.bookedAppointments.filter(function(t){return t.bookings[0].packageCustomerService.packageCustomer.id===parseInt(s)}))}),i.booking=i.packageReservations&&i.packageReservations.length>0?i.packageReservations[0].bookings[0]:null}else i.booking=e.bookings[0],i.paymentId=e.bookings[0].payments[0].id;this.$http.post(this.$root.getAjaxUrl+"/payments/link",{data:i,paymentMethod:t}).then(function(t){n.payBtnLoader=null,!t.data.data.error&&t.data.data.paymentLink?window.location.href=t.data.data.paymentLink:n.notify(n.$root.labels.error,n.$root.labels.payment_link_error,"error")}).catch(function(t){n.payBtnLoader=null,n.notify(n.$root.labels.error,t.message,"error"),console.log(t)})},paymentFromCustomerPanel:function(t,e){if("package"!==t.type&&(!t.bookings||0===t.bookings.length))return!1;var n=this.$root.settings;e&&e.payments&&e.payments.paymentLinks&&(n=JSON.parse(e));var o=n.payments.paymentLinks,a="package"===t.type?Object.values(t.purchases).filter(function(t){return"approved"===t.status}).length>0:"approved"===t.bookings[0].status||"pending"===t.bookings[0].status,s="package"===t.type?t.price:t.bookings[0].price,r=!1;switch(t.type){case"package":r=!t.expireDateString||i()(t.expireDateString,"YYYY-MM-DD HH:mm:ss").isAfter(i()());break;case"appointment":r=i()(t.bookingStart,"YYYY-MM-DD HH:mm:ss").isAfter(i()())&&t.bookings[0].payments.length>0;break;case"event":r=i()(t.periods[t.periods.length-1].periodEnd,"YYYY-MM-DD HH:mm:ss").isAfter(i()())&&t.bookings[0].payments.length>0}return this.paymentMethods(n).length&&o&&o.enabled&&a&&s>0&&r},paymentMethods:function(t){"string"==typeof t&&(t=JSON.parse(t));var e=[];return t=t.payments,this.$root.settings.payments.wc.enabled?e.push({value:"wc",label:this.$root.labels.wc}):!this.$root.settings.payments.mollie.enabled||"mollie"in t&&!t.mollie.enabled?!this.$root.settings.payments.square.enabled||"square"in t&&!t.square.enabled?(!this.$root.settings.payments.payPal.enabled||"payPal"in t&&!t.payPal.enabled||e.push({value:"payPal",label:this.$root.labels.pay_pal}),!this.$root.settings.payments.stripe.enabled||"stripe"in t&&!t.stripe.enabled||e.push({value:"stripe",label:this.$root.labels.credit_card}),!this.$root.settings.payments.razorpay.enabled||"razorpay"in t&&!t.razorpay.enabled||e.push({value:"razorpay",label:this.$root.labels.razorpay})):e.push({value:"square",label:this.$root.labels.on_line}):e.push({value:"mollie",label:this.$root.labels.on_line}),e}}}},669:function(t,e,n){"use strict";(function(e){var o=n(656),i=n(716),a={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var r,l={adapter:("undefined"!=typeof XMLHttpRequest?r=n(687):void 0!==e&&(r=n(687)),r),transformRequest:[function(t,e){return i(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t)?t:o.isArrayBufferView(t)?t.buffer:o.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){l.headers[t]={}}),o.forEach(["post","put","patch"],function(t){l.headers[t]=o.merge(a)}),t.exports=l}).call(e,n(142))},671:function(t,e,n){var o=n(90)(n(682),n(683),!1,null,null,null);t.exports=o.exports},672:function(t,e,n){"use strict";var o=n(661),i=n(0),a=n.n(i),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a={mixins:[o.a],methods:{getArrayCustomPricing:function(t){var e=t.customPricing,n=null;if(void 0===e||null===e||""===e)n={enabled:null,durations:{},persons:{},periods:{default:[],custom:[]}};else if("object"===(void 0===e?"undefined":s(e))){if(Array.isArray(e.durations))return"persons"in e||(e.persons=[]),"periods"in e||(e.periods={default:[],custom:[]}),!0===e.enabled&&(e.enabled="duration"),e;n=JSON.parse(JSON.stringify(e))}else n=JSON.parse(e);!0===n.enabled&&(n.enabled="duration"),n.persons="persons"in n?n.persons:[],n.periods="periods"in n?n.periods:{default:[],custom:[]};var o=[];Object.keys(n.persons).length&&(o.push({start:1,range:Object.keys(n.persons)[0]-1,price:t.price,rules:[]}),Object.keys(n.persons).forEach(function(e,i){o.push({start:parseInt(e),range:i!==Object.keys(n.persons).length-1?Object.keys(n.persons)[i+1]-1:t.maxCapacity,price:n.persons[e].price,rules:n.persons[e].rules})}));var i=[];return Object.keys(n.durations).forEach(function(t){i.push({duration:parseInt(t),price:n.durations[t].price,rules:n.durations[t].rules})}),n.periods.custom.forEach(function(t){t.dates.start=a()(t.dates.start).toDate(),t.dates.end=a()(t.dates.end).toDate()}),{enabled:n.enabled,durations:i,persons:o,periods:n.periods}},getJsonCustomPricing:function(t){var e={},n=t.customPricing;n&&n.durations.filter(function(t){return t.duration}).length>0&&n.durations.forEach(function(t){e[t.duration]={price:t.price,rules:t.rules}});var o={};n&&n.persons.length&&n.persons.forEach(function(t,e){0!==e&&(o[n.persons[e-1].range+1]={price:t.price,rules:t.rules})});var i=[];n.periods.default.filter(function(t){return t.days.length}).forEach(function(t){t.ranges.forEach(function(t){null===t.from&&(t.from="00:00"),null===t.to&&(t.to="24:00")}),i.push(t)});var s=[];n.periods.custom.filter(function(t){return t.dates.start&&t.dates.end}).forEach(function(t){t.ranges.forEach(function(t){null===t.from&&(t.from="00:00"),null===t.to&&(t.to="24:00")}),t.dates.start=a()(t.dates.start).format("YYYY-MM-DD"),t.dates.end=a()(t.dates.end).format("YYYY-MM-DD"),s.push(t)});var r=null;return n&&this.isDurationPricingEnabled(n)?r="duration":n&&this.isPersonPricingEnabled(n)?r="person":n&&this.isPeriodPricingEnabled(n)&&(i.length||s.length)&&(r="period"),JSON.stringify({enabled:r,durations:e,persons:o,periods:{default:i,custom:s}})}}}},673:function(t,e,n){"use strict";e.a={data:function(){return{searchCounter:0,loadingCustomers:!1,searchCustomersTimer:null,searchedCustomers:[],dialogCustomer:!1}},methods:{setCustomerFromUrl:function(t){var e=null;this.options.entities.customers.length&&(e=this.options.entities.customers.find(function(e){return e.id==t})),e&&(this.params.customerId=e.id)},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 t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};"customer"!==this.$root.settings.role&&this.searchCustomers("",function(){var n=t.options&&"entities"in t.options&&"customers"in t.options.entities?t.options.entities.customers:[],o=n.map(function(t){return parseInt(t.id)}),i=n;t.searchedCustomers.forEach(function(t){-1===o.indexOf(parseInt(t.id))&&(o.push(t.id),i.push(t))}),t.$nextTick(function(){t.options.entities.customers=Object.values(i.sort(function(t,e){return t.firstName.toLowerCase()>e.firstName.toLowerCase()?1:-1})),t.params&&t.params.customerId&&t.setCustomerFromUrl(t.params.customerId),e()})})},searchCustomers:function(t,e){var n=this;clearTimeout(this.searchCustomersTimer),this.loadingCustomers=!0,this.searchCounter++,this.searchCustomersTimer=setTimeout(function(){var o=n.searchCounter,i={search:t,page:1,limit:n.$root.settings.general.customersFilterLimit,skipCount:1};n.params&&n.params.customerId&&(i.customers=[n.params.customerId]),n.$http.get(n.$root.getAjaxUrl+"/users/customers",{params:i}).then(function(t){o>=n.searchCounter&&(n.searchedCustomers=t.data.data.users.sort(function(t,e){return t.firstName.toLowerCase()>e.firstName.toLowerCase()?1:-1})),n.loadingCustomers=!1,e()}).catch(function(t){n.loadingCustomers=!1})},500)},getNoShowClass:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(o&&"blocked"===o)return"am-customer-name am-customer-blocked";if(!this.$root.settings.roles.enableNoShowTag)return"";var i=null,a=this.searchedCustomers.map(function(t){return t.id}),s=this.options&&this.options.entities?this.options.entities.customers.map(function(t){return t.id}):[];if(n)i=n.noShowCount;else if(null!==e&&0!==e.length&&null!==t){var r=e.find(function(e){return e.id===t});i=r?r.count:0}else a.includes(t)&&this.searchedCustomers.length&&0!==t?i=this.searchedCustomers.find(function(e){return e.id===t}).noShowCount:s.includes(t)&&this.options.entities.customers&&0!==t&&(i=this.options.entities.customers.find(function(e){return e.id===t}).noShowCount);var l="";if(i)switch(l="am-customer-name",!0){case 1===i:l+=" am-no-show-gray";break;case 2===i:l+=" am-no-show-yellow";break;case i>=3:l+=" am-no-show-red"}return l},getOptionClass:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=t.customer?t.customer:t,i=this.getNoShowClass(o.id,e,o.noShowCount?o:null,n)||"";return i+=o.email?" am-drop-item-name":""}}}},674:function(t,e,n){"use strict";(function(t){var o=n(752),i=n(753),a=n(746);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return c(this,t,e,n)}function c(t,e,n,o){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,o){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(o||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===o?new Uint8Array(e):void 0===o?new Uint8Array(e,n):new Uint8Array(e,n,o);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=p(t,e);return t}(t,e,n,o):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var o=0|h(e,n),i=(t=r(t,o)).write(e,n);i!==o&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(l.isBuffer(e)){var n=0|f(e.length);return 0===(t=r(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(o=e.length)!=o?r(t,0):p(t,e);if("Buffer"===e.type&&a(e.data))return p(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(u(e),t=r(t,e<0?0:0|f(e)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|f(e.length);t=r(t,n);for(var o=0;o<n;o+=1)t[o]=255&e[o];return t}function f(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function h(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(o)return q(t).length;e=(""+e).toLowerCase(),o=!0}}function m(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function g(t,e,n,o,i){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,o)),l.isBuffer(e))return 0===e.length?-1:v(t,e,n,o,i);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,o,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,o,i){var a,s=1,r=t.length,l=e.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;s=2,r/=2,l/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var u=-1;for(a=n;a<r;a++)if(c(t,a)===c(e,-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(n+l>r&&(n=r-l),a=n;a>=0;a--){for(var d=!0,p=0;p<l;p++)if(c(t,a+p)!==c(e,p)){d=!1;break}if(d)return a}return-1}function b(t,e,n,o){n=Number(n)||0;var i=t.length-n;o?(o=Number(o))>i&&(o=i):o=i;var a=e.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(e.substr(2*s,2),16);if(isNaN(r))return s;t[n+s]=r}return s}function y(t,e,n,o){return U(q(e,t.length-n),t,n,o)}function _(t,e,n,o){return U(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,o)}function k(t,e,n,o){return _(t,e,n,o)}function w(t,e,n,o){return U(F(e),t,n,o)}function x(t,e,n,o){return U(function(t,e){for(var n,o,i,a=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),o=n>>8,i=n%256,a.push(i),a.push(o);return a}(e,t.length-n),t,n,o)}function C(t,e,n){return 0===e&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var o=[],i=e;i<n;){var a,s,r,l,c=t[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],s=t[i+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=t[i+1],s=t[i+2],r=t[i+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),i+=d}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var n="",o=0;for(;o<e;)n+=String.fromCharCode.apply(String,t.slice(o,o+=S));return n}(o)}e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,n){return c(null,t,e,n)},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(t,e,n){return function(t,e,n,o){return u(e),e<=0?r(t,e):void 0!==n?"string"==typeof o?r(t,e).fill(n,o):r(t,e).fill(n):r(t,e)}(null,t,e,n)},l.allocUnsafe=function(t){return d(null,t)},l.allocUnsafeSlow=function(t){return d(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,o=e.length,i=0,a=Math.min(n,o);i<a;++i)if(t[i]!==e[i]){n=t[i],o=e[i];break}return n<o?-1:o<n?1:0},l.isEncoding=function(t){switch(String(t).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(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var o=l.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o,i),i+=s.length}return o},l.byteLength=h,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):function(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,n,o,i){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),e<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&e>=n)return 0;if(o>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,i>>>=0,this===t)return 0;for(var a=i-o,s=n-e,r=Math.min(a,s),c=this.slice(o,i),u=t.slice(e,n),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(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},l.prototype.write=function(t,e,n,o){if(void 0===e)o="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)o=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>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,t,e,n);case"utf8":case"utf-8":return y(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return k(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);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 S=4096;function T(t,e,n){var o="";n=Math.min(t.length,n);for(var i=e;i<n;++i)o+=String.fromCharCode(127&t[i]);return o}function O(t,e,n){var o="";n=Math.min(t.length,n);for(var i=e;i<n;++i)o+=String.fromCharCode(t[i]);return o}function P(t,e,n){var o=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>o)&&(n=o);for(var i="",a=e;a<n;++a)i+=B(t[a]);return i}function $(t,e,n){for(var o=t.slice(e,n),i="",a=0;a<o.length;a+=2)i+=String.fromCharCode(o[a]+256*o[a+1]);return i}function A(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,o,i,a){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+o>t.length)throw new RangeError("Index out of range")}function N(t,e,n,o){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-n,2);i<a;++i)t[n+i]=(e&255<<8*(o?i:1-i))>>>8*(o?i:1-i)}function L(t,e,n,o){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-n,4);i<a;++i)t[n+i]=e>>>8*(o?i:3-i)&255}function I(t,e,n,o,i,a){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,o,a){return a||I(t,0,n,4),i.write(t,e,n,o,23,4),n+4}function R(t,e,n,o,a){return a||I(t,0,n,8),i.write(t,e,n,o,52,8),n+8}l.prototype.slice=function(t,e){var n,o=this.length;if(t=~~t,e=void 0===e?o:~~e,t<0?(t+=o)<0&&(t=0):t>o&&(t=o),e<0?(e+=o)<0&&(e=0):e>o&&(e=o),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=l.prototype;else{var i=e-t;n=new l(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+t]}return n},l.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var o=this[t],i=1,a=0;++a<e&&(i*=256);)o+=this[t+a]*i;return o},l.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var o=this[t+--e],i=1;e>0&&(i*=256);)o+=this[t+--e]*i;return o},l.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var o=this[t],i=1,a=0;++a<e&&(i*=256);)o+=this[t+a]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var o=e,i=1,a=this[t+--o];o>0&&(i*=256);)a+=this[t+--o]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||D(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[e]=255&t;++a<n&&(i*=256);)this[e+a]=t/i&255;return e+n},l.prototype.writeUIntBE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||D(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var a=0,s=1,r=0;for(this[e]=255&t;++a<n&&(s*=256);)t<0&&0===r&&0!==this[e+a-1]&&(r=1),this[e+a]=(t/s>>0)-r&255;return e+n},l.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var a=n-1,s=1,r=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)t<0&&0===r&&0!==this[e+a+1]&&(r=1),this[e+a]=(t/s>>0)-r&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return R(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return R(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,o){if(n||(n=0),o||0===o||(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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),t.length-e<o-n&&(o=t.length-e+n);var i,a=o-n;if(this===t&&n<e&&e<o)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},l.prototype.fill=function(t,e,n,o){if("string"==typeof t){if("string"==typeof e?(o=e,e=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}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 t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var s=l.isBuffer(t)?t:q(new l(t,o).toString()),r=s.length;for(a=0;a<n-e;++a)this[a+e]=s[a%r]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,e){var n;e=e||1/0;for(var o=t.length,i=null,a=[],s=0;s<o;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===o){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function F(t){return o.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,n,o){for(var i=0;i<o&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(e,n(37))},675:function(t,e,n){"use strict";e.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"}]}}}},677:function(t,e,n){var o=n(90)(n(691),n(692),!1,null,null,null);t.exports=o.exports},678:function(t,e,n){"use strict";var o=n(655);e.a={mixins:[o.a],data:function(){return{}},methods:{getInitEntitySettings:function(t){var e={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:{enabled:this.$root.settings.payments.wc.enabled,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},square:{enabled:this.$root.settings.payments.square.enabled},razorpay:{enabled:this.$root.settings.payments.razorpay.enabled}}};switch(t){case"service":e.general={minimumTimeRequirementPriorToCanceling:null,minimumTimeRequirementPriorToRescheduling:null,redirectUrlAfterAppointment:null},e.general.defaultAppointmentStatus=null,e.general.numberOfDaysAvailableForBooking=0,e.general.minimumTimeRequirementPriorToBooking=null,e.zoom={enabled:this.$root.settings.zoom.enabled},e.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled},e.googleMeet={enabled:this.$root.settings.googleCalendar.enabled&&this.$root.settings.googleCalendar.googleMeetEnabled},e.microsoftTeams={enabled:this.$root.settings.outlookCalendar.enabled&&this.$root.settings.outlookCalendar.microsoftTeamsEnabled};break;case"event":e.general={minimumTimeRequirementPriorToCanceling:null,redirectUrlAfterAppointment:null},e.zoom={enabled:this.$root.settings.zoom.enabled},e.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled},e.googleMeet={enabled:this.$root.settings.googleCalendar.enabled&&this.$root.settings.googleCalendar.googleMeetEnabled},e.microsoftTeams={enabled:this.$root.settings.outlookCalendar.enabled&&this.$root.settings.outlookCalendar.microsoftTeamsEnabled},e.waitingList={enabled:!1,addingMethod:this.$root.settings.appointments.waitingListEvents.addingMethod,maxCapacity:1,maxExtraPeopleEnabled:!1,maxExtraPeople:0};break;case"package":e.general={redirectUrlAfterAppointment:null}}return e},setEntitySettings:function(t,e){t.settings=null!==t.settings?JSON.parse(t.settings):this.getInitEntitySettings(e),this.addMissingObjectProperties(t.settings,this.getInitEntitySettings(e))},updateSettings:function(t){var e=this;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.square.enabled||this.$root.clonedSettings.payments.razorpay.enabled){if(!1===this.$root.clonedSettings.payments.wc.enabled&&!1===this.$root.clonedSettings.payments.mollie.enabled&&null!==t){var n=JSON.parse(t);"payments"in n||(n.payments={}),["onSite","stripe","payPal","wc","mollie","razorpay","square"].forEach(function(t){t in n.payments||(n.payments[t]=e.$root.clonedSettings.payments[t])}),n.payments.wc=this.$root.clonedSettings.payments.wc,n.payments.mollie=this.$root.clonedSettings.payments.mollie,this.$root.clonedSettings.payments.onSite||(n.payments.onSite=this.$root.clonedSettings.payments.onSite),this.$root.clonedSettings.payments.square||(n.payments.square=this.$root.clonedSettings.payments.square),this.$root.clonedSettings.payments.payPal.enabled||(n.payments.payPal=this.$root.clonedSettings.payments.payPal),this.$root.clonedSettings.payments.stripe.enabled||(n.payments.stripe=this.$root.clonedSettings.payments.stripe),this.$root.clonedSettings.payments.razorpay.enabled&&n.payments.razorpay||(n.payments.razorpay=this.$root.clonedSettings.payments.razorpay),("onSite"in n.payments?n.payments.onSite&&this.$root.clonedSettings.payments.onSite:this.$root.clonedSettings.payments.onSite)&&("payPal"in n.payments?n.payments.payPal.enabled&&this.$root.clonedSettings.payments.payPal.enabled:this.$root.clonedSettings.payments.payPal.enabled)&&("stripe"in n.payments?n.payments.stripe.enabled&&this.$root.clonedSettings.payments.stripe.enabled:this.$root.clonedSettings.payments.stripe.enabled)&&("mollie"in n.payments?n.payments.mollie.enabled&&this.$root.clonedSettings.payments.mollie.enabled:this.$root.clonedSettings.payments.mollie.enabled)&&("razorpay"in n.payments?n.payments.razorpay.enabled&&this.$root.clonedSettings.payments.razorpay.enabled:this.$root.clonedSettings.payments.razorpay.enabled)&&("square"in n.payments?n.payments.square.enabled&&this.$root.clonedSettings.payments.square.enabled:this.$root.clonedSettings.payments.square.enabled)&&(n.payments=this.$root.clonedSettings.payments),t=JSON.stringify(n)}if(!0===this.$root.clonedSettings.payments.wc.enabled&&null!==t){var o=JSON.parse(t);"payments"in o||(o.payments={}),o.payments.onSite=this.$root.clonedSettings.payments.onSite,o.payments.stripe=this.$root.clonedSettings.payments.stripe,o.payments.payPal=this.$root.clonedSettings.payments.payPal,o.payments.mollie=this.$root.clonedSettings.payments.mollie,o.payments.square=this.$root.clonedSettings.payments.square,o.payments.razorpay=this.$root.clonedSettings.payments.razorpay,t=JSON.stringify(o)}if(!0===this.$root.clonedSettings.payments.mollie.enabled&&null!==t){var i=JSON.parse(t);"payments"in i||(i.payments={}),this.$root.clonedSettings.payments.onSite||(i.payments.onSite=this.$root.clonedSettings.payments.onSite,i.payments.mollie=this.$root.clonedSettings.payments.mollie),i.payments.stripe=this.$root.clonedSettings.payments.stripe,i.payments.payPal=this.$root.clonedSettings.payments.payPal,i.payments.razorpay=this.$root.clonedSettings.payments.razorpay,t=JSON.stringify(i)}if(!0===this.$root.clonedSettings.payments.square.enabled&&null!==t){var a=JSON.parse(t);"payments"in a||(a.payments={}),this.$root.clonedSettings.payments.onSite||(a.payments.onSite=this.$root.clonedSettings.payments.onSite,a.payments.square=this.$root.clonedSettings.payments.square),a.payments.stripe=this.$root.clonedSettings.payments.stripe,a.payments.payPal=this.$root.clonedSettings.payments.payPal,a.payments.razorpay=this.$root.clonedSettings.payments.razorpay,t=JSON.stringify(a)}"oliverPos"in this.$root.shortcodeData&&this.$root.shortcodeData.oliverPos&&((t=JSON.parse(t)).payments.onSite=!0,t.payments.stripe.enabled=!1,t.payments.payPal.enabled=!1,t.payments.razorpay.enabled=!1,t=JSON.stringify(t)),this.replaceExistingObjectProperties(this.$root.settings,null!==t?JSON.parse(t):this.$root.clonedSettings)}},prepareBookableEntityPaymentsForSave:function(t){var e=this,n={};return t&&"payments"in t&&("onSite"in t.payments&&t.payments.onSite!==this.$root.settings.payments.onSite&&(n.onSite=t.payments.onSite),["stripe","payPal","razorpay","mollie","square"].forEach(function(o){o in t.payments&&t.payments[o].enabled!==e.$root.settings.payments[o].enabled&&(n[o]=t.payments[o])}),"wc"in t.payments&&(t.payments.wc.enabled!==this.$root.settings.payments.wc.enabled||"productId"in t.payments.wc&&t.payments.wc.productId!==this.$root.settings.payments.wc.productId)&&(n.wc=t.payments.wc),n.paymentLinks=t.payments.paymentLinks),t.payments=n,t},prepareServiceSettingsForSave:function(t){var e=JSON.parse(JSON.stringify(t.settings));return"general"in e&&(e.general.redirectUrlAfterAppointment||delete e.general.redirectUrlAfterAppointment,e.general.defaultAppointmentStatus||delete e.general.defaultAppointmentStatus,(e.general.minimumTimeRequirementPriorToBooking||this.$root.settings.general.minimumTimeRequirementPriorToBooking)&&""!==e.general.minimumTimeRequirementPriorToBooking||delete e.general.minimumTimeRequirementPriorToBooking,(e.general.minimumTimeRequirementPriorToCanceling||this.$root.settings.general.minimumTimeRequirementPriorToCanceling)&&""!==e.general.minimumTimeRequirementPriorToCanceling||delete e.general.minimumTimeRequirementPriorToCanceling,(e.general.minimumTimeRequirementPriorToRescheduling||this.$root.settings.general.minimumTimeRequirementPriorToRescheduling)&&""!==e.general.minimumTimeRequirementPriorToRescheduling||delete e.general.minimumTimeRequirementPriorToRescheduling,e.general.numberOfDaysAvailableForBooking||delete e.general.numberOfDaysAvailableForBooking,0===Object.keys(e.general).length&&delete e.general),0===Object.keys(e).length&&(e=null),e}},computed:{}}},679:function(t,e,n){"use strict";e.a={data:function(){return{}},methods:{checkTranslations:function(t,e){var n=""!==e?JSON.parse(t.translations)[e]:JSON.parse(t.translations);if(window.localeLanguage[0]in n)return n[window.localeLanguage[0]];for(var o=Object.keys(n),i=Object.keys(n).map(function(t){return t.length>2?t.slice(0,2):t}),a=window.localeLanguage[0].length>2?window.localeLanguage[0].slice(0,2):window.localeLanguage[0],s="",r=0;r<i.length;r++)if(i[r]===a){s=n[o[r]];break}return s},getTranslated:function(t,e){return t.translations&&JSON.parse(t.translations)[e]&&this.checkTranslations(t,e)?this.checkTranslations(t,e):t[e]},getNameTranslated:function(t){return t.translations&&JSON.parse(t.translations).name&&this.checkTranslations(t,"name")?this.checkTranslations(t,"name"):t.name},getTicketTranslated:function(t){return t.translations&&this.checkTranslations(t,"")?this.checkTranslations(t,""):t.name},getCfLabelTranslated:function(t){return t.translations&&this.checkTranslations(t,"name")?this.checkTranslations(t,"name"):t.label},getCfOptionTranslated:function(t){return t.translations&&this.checkTranslations(t,"")?this.checkTranslations(t,""):t.label},getDescriptionTranslated:function(t){return t.translations&&JSON.parse(t.translations).description&&this.checkTranslations(t,"description")?this.checkTranslations(t,"description"):t.description},translateEntities:function(t){var e=this;t.services&&t.services.length&&t.services.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t),t.extras.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t)})}),t.locations&&t.locations.length&&t.locations.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t)}),t.packages&&t.packages.length&&t.packages.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t),t.bookable.forEach(function(t){t.service.name=e.getNameTranslated(t.service),t.service.description=e.getDescriptionTranslated(t.service),"extras"in t.service&&t.service.extras.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t)})})}),t.categories&&t.categories.length&&t.categories.forEach(function(t){t.name=e.getNameTranslated(t),t.serviceList.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t),t.extras.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t)})})}),t.events&&t.events.length&&t.events.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t),t.extras.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t)})}),t.customFields&&t.customFields.length&&t.customFields.forEach(function(t){t.label=e.getCfLabelTranslated(t),t.options.forEach(function(t){t.label=e.getCfOptionTranslated(t)})}),t.employees&&t.employees.length&&t.employees.forEach(function(t){t.firstName=e.getTranslated(t,"firstName"),t.lastName=e.getTranslated(t,"lastName"),t.serviceList.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t),t.extras.forEach(function(t){t.name=e.getNameTranslated(t),t.description=e.getDescriptionTranslated(t)})})})}},computed:{}}},680:function(t,e,n){"use strict";var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=r(n(713)),a=r(n(731)),s=r(n(732));function r(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.progress=0,this.isPending=!1,this.errors=new a.default,["post","patch","put","delete"].forEach(function(t){e[t]=function(n,o){return e.submit(t,n,o)}})}return o(t,[{key:"submit",value:function(e,n){var o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.toLowerCase(),this.hasFiles(i)&&(i=(0,s.default)(i),"post"!==e&&(i.append("_method",e.toUpperCase()),e="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(a,s){t.defaults.axios[e](n,i,o.config()).then(function(t){a(t.data)}).catch(function(t){o.handleError(t),s(t)}).then(function(){return o.isPending=!1})})}},{key:"hasFiles",value:function(t){for(var e in t)if(this.fileIsPresent(t[e]))return!0;return!1}},{key:"fileIsPresent",value:function(t){return t instanceof File||t instanceof Array&&t.some(function(t){return t instanceof File})}},{key:"save",value:function(t,e){var n="post";return e.hasOwnProperty("id")&&(n="patch",t=this.urlToPatchResource(t,e)),this[n](t,e)}},{key:"urlToPatchResource",value:function(t,e){return t.replace(/\/+$/,"")+"/"+e.id}},{key:"config",value:function(){var t=this;return{onUploadProgress:function(e){t.progress=Math.round(100*e.loaded/e.total)}}}},{key:"handleError",value:function(t){if(t.response&&422===t.response.status){var e=t.response.data.hasOwnProperty("errors")?t.response.data.errors:t.response.data;this.errors.set(e)}}}]),t}();l.defaults={axios:i.default},t.exports=l},682:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(675);e.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 t=this;if(""!==this.value){var e=this.countries.find(function(e){return e.iso===t.value});this.format=!0===this.disabled?"":e.format}var n=this.input;if("ar"===window.localeLanguage[0]&&(n=n.replace(/[٠-٩]/g,function(t){return"٠١٢٣٤٥٦٧٨٩".indexOf(t)})),""!==n){if(n.startsWith("+")){var o=parseInt(n.slice(1)),i=this.countries.filter(function(t){return t.phonecode===o});if(i.length){var a=null;1===o?a=i.find(function(t){return 229===t.id}):44===o?a=i.find(function(t){return 228===t.id}):7===o&&(a=i.find(function(t){return 176===t.id})),void 0!==a&&null!==a||(a=i[0]),this.value=a.iso}this.phone=n}else this.phone=void 0!==e?!0===n.startsWith("0")&&"it"!==this.countryPhoneIso?"+"+e.phonecode+n.slice(1).replace(/\D/g,""):"+"+e.phonecode+n.replace(/\D/g,""):n;this.$emit("phoneFormatted",this.phone,this.value)}else this.phone=n,this.$emit("phoneFormatted",this.phone,this.value)},fillInputWithSavedPhone:function(){var t=this,e=null;null!==this.countryPhoneIso&&void 0===(e=this.countries.find(function(e){return e.iso===t.countryPhoneIso}))&&(e=null);for(var n=1;null===e&&n<5;)e=void 0!==(e=this.countries.find(function(e){return e.phonecode===parseInt(t.savedPhone.substr(1,n))&&1===e.priority}))?e:null,n++;if(!e)for(n=1;null===e&&n<5;)e=void 0!==(e=this.countries.find(function(e){return e.phonecode===parseInt(t.savedPhone.substr(1,n))}))?e:null,n++;null!==e&&(this.value=e.iso,this.input=this.savedPhone.replace("+"+e.phonecode,""),this.input=e.format.startsWith("0")?"0"+this.input:this.input)}},watch:{input:function(){this.formatPhoneNumber()}},components:{}}},683:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-input",{attrs:{placeholder:t.format,disabled:t.disabled,type:"tel",name:"tel",autocomplete:"tel",clearable:""},on:{clear:t.onClear},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}},[n("el-select",{class:"am-selected-flag am-selected-flag-"+t.value,attrs:{slot:"prepend",placeholder:"","popper-class":t.$root.settings.customization.forms?t.dropdownClass:"",disabled:t.disabled},on:{change:t.changeCountry},slot:"prepend",model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.countries,function(e){return n("el-option",{key:e.id,attrs:{value:e.iso,label:" "}},[n("span",{class:"am-flag am-flag-"+e.iso}),t._v(" "),n("span",{staticClass:"am-phone-input-nicename"},[t._v(t._s(e.nicename))]),t._v(" "),n("span",{staticClass:"am-phone-input-phonecode"},[t._v("+"+t._s(e.phonecode))])])}),1)],1)},staticRenderFns:[]}},684:function(t,e,n){"use strict";var o=n(666);e.a={mixins:[o.a],data:function(){return{}},methods:{getPaymentType:function(t){return t.gateway&&"onSite"!==t.gateway?"partiallyPaid"===t.status?"deposit":"online":"onsite"},longNamePayments:function(t){return["mollie","razorpay","square"].includes(t)},getPaymentData:function(t,e,n,o){var i=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s={};if(s.paymentId=t.id,e){s.bookableType="appointment";var r=this.getProviderById(e.providerId);r.fullName=r.firstName+" "+r.lastName,s.appointment=[{bookable:this.getServiceById(e.serviceId),bookingStart:e.bookingStart,providers:[r]}],e.bookings.forEach(function(e){e.payments.forEach(function(n){n.id===t.id&&(s.appointment[0].booking=e)})}),a.forEach(function(t){var e=i.getProviderById(t.providerId);e.fullName=e.firstName+" "+e.lastName,s.appointment.push({bookable:i.getServiceById(t.serviceId),bookingStart:t.bookingStart,providers:[e],booking:t.bookings[0]})})}return n&&(s.bookableType="event",s.event=[{bookable:n,bookingStart:n.periods[0].periodStart,providers:n.providers}],n.bookings.forEach(function(e){e.payments.forEach(function(n){n.id===t.id&&(s.event[0].booking=e)})})),o&&(s.bookableType="package",s.package=[{bookable:o.package,bookingStart:null,providers:[],booking:o.booking}]),s.customer={email:t.customerEmail,firstName:t.customerFirstName,lastName:t.customerLastName,id:t.customerId},s},getPaymentStatusNiceName:function(t){switch(t){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}},getPaymentClassName:function(t){var e=t.gateway;return"oliver"===t.gatewayTitle&&(e="oliver"),"am-appointment-payment am-appointment-payment-"+e},getPaymentIconName:function(t){return"onSite"!==t.gateway&&"stripe"!==t.gateway||"oliver"!==t.gatewayTitle?t.gateway+".svg":"oliver.png"},getPaymentGatewayNiceName:function(t){return"stripe"===t.gateway&&"oliver"===t.gatewayTitle?this.$root.labels.oliver_on_line:"onSite"===t.gateway&&"oliver"===t.gatewayTitle?this.$root.labels.oliver_on_site:"onSite"===t.gateway?this.$root.labels.on_site:"wc"===t.gateway?t.gatewayTitle:t.gateway?t.gateway.charAt(0).toUpperCase()+t.gateway.slice(1):void 0},getPaymentIconWidth:function(t){switch(t){case"razorpay":return"76px";case"square":return"70px";case"mollie":return"38px";default:return"16px"}},getPaymentAmountData:function(t,e){var n={bookablePriceTotal:0,extrasPriceTotal:0,tax:0,wcTax:0,discountTotal:0,paidDeposit:0,paidRemaining:0,paid:0,refunded:0,subtotal:0,total:0,due:0},o=this;return t.forEach(function(t){var i=t.booking;switch(i.tax&&!Array.isArray(i.tax)&&(i.tax=JSON.parse(i.tax)),e){case"appointment":var a=o.getAppointmentPriceAmount({price:i.price,aggregatedPrice:i.aggregatedPrice,tax:i.tax,id:null},i.extras,i.persons,i.coupon,!1);n.bookablePriceTotal+=a.totalBookable,n.extrasPriceTotal+=a.total-a.totalBookable,n.tax+=a.tax,n.discountTotal+=a.discount;break;case"event":var s=o.getEventBookingPriceAmount(i);n.bookablePriceTotal+=s.total,n.extrasPriceTotal+=0,n.tax+=s.tax,n.discountTotal+=s.discount;break;case"package":var r=null;i.payments.forEach(function(t){r=t.coupon?t.coupon:r});var l=i.price*(i.aggregatedPrice?i.persons:1),c=o.getAmountData(i.tax&&i.tax.length?i.tax[0]:null,l,r);n.bookablePriceTotal+=c.total,n.extrasPriceTotal+=0,n.tax+=c.tax,n.discountTotal+=c.discount}var u=0,d=0;i.payments.forEach(function(t){n.discountTotal+=t.wcOrderId?t.wcItemCouponValue:0,"paid"===t.status?d+=t.amount:"partiallyPaid"===t.status&&(u+=t.amount),t.wcOrderId&&t.wcItemTaxValue&&(n.wcTax+=t.wcItemTaxValue)}),n.paidDeposit+=u,n.paidRemaining+=d,n.refunded+=i.payments.filter(function(t){return"refunded"===t.status}).reduce(function(t,e){return t+e.amount},0)}),n.subTotal=n.bookablePriceTotal+n.extrasPriceTotal,n.total=n.subTotal+n.tax+n.wcTax,n.total-=n.discountTotal,n.paid=n.paidDeposit+n.paidRemaining,n.total=n.total>=0?n.total:0,n.due=n.total-n.paid>0?n.total-n.paid:0,n}}}},686:function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];return t.apply(e,n)}}},687:function(t,e,n){"use strict";var o=n(656),i=n(717),a=n(719),s=n(720),r=n(721),l=n(688),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(722);t.exports=function(t){return new Promise(function(e,u){var d=t.data,p=t.headers;o.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in f||r(t.url)||(f=new window.XDomainRequest,h="onload",m=!0,f.onprogress=function(){},f.ontimeout=function(){}),t.auth){var g=t.auth.username||"",v=t.auth.password||"";p.Authorization="Basic "+c(g+":"+v)}if(f.open(t.method.toUpperCase(),a(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f[h]=function(){if(f&&(4===f.readyState||m)&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:1223===f.status?204:f.status,statusText:1223===f.status?"No Content":f.statusText,headers:n,config:t,request:f};i(e,u,o),f=null}},f.onerror=function(){u(l("Network Error",t,null,f)),f=null},f.ontimeout=function(){u(l("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},o.isStandardBrowserEnv()){var b=n(723),y=(t.withCredentials||r(t.url))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;y&&(p[t.xsrfHeaderName]=y)}if("setRequestHeader"in f&&o.forEach(p,function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete p[e]:f.setRequestHeader(e,t)}),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){f&&(f.abort(),u(t),f=null)}),void 0===d&&(d=null),f.send(d)})}},688:function(t,e,n){"use strict";var o=n(718);t.exports=function(t,e,n,i,a){var s=new Error(t);return o(s,e,n,i,a)}},689:function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},690:function(t,e,n){"use strict";function o(t){this.message=t}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,t.exports=o},691:function(t,e,n){"use strict";Object.defineProperty(e,"__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"},i=["locality","administrative_area_level_3"],a=["locality","sublocality","postal_code","country","administrative_area_level_1","administrative_area_level_2"];e.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(t,e){this.$emit("inputChange",{newVal:t,oldVal:e},this.id)},country:function(t,e){this.autocomplete.setComponentRestrictions({country:null===this.country?[]:this.country})}},mounted:function(){var t={};this.types&&(t.types=[this.types]),this.country&&(t.componentRestrictions={country:this.country}),this.autocomplete=new google.maps.places.Autocomplete(document.getElementById(this.id),t),this.autocomplete.addListener("place_changed",this.onPlaceChanged)},methods:{onPlaceChanged:function(){var t=this.autocomplete.getPlace();t.geometry?void 0!==t.address_components&&(this.$emit("placechanged",this.formatResult(t),t,this.id),this.autocompleteText=document.getElementById(this.id).value,this.onChange()):this.$emit("no-results-found",t,this.id)},onFocus:function(){this.biasAutocompleteLocation(),this.$emit("focus")},onBlur:function(){this.$emit("blur")},onChange:function(){this.$emit("change",this.autocompleteText)},onKeyPress:function(t){this.$emit("keypress",t)},onKeyUp:function(t){this.$emit("keyup",t)},clear:function(){this.autocompleteText=""},focus:function(){this.$refs.autocomplete.focus()},blur:function(){this.$refs.autocomplete.blur()},update:function(t){this.autocompleteText=t},updateCoordinates:function(t){var e=this;(t||t.lat||t.lng)&&(this.geolocation.geocoder||(this.geolocation.geocoder=new google.maps.Geocoder),this.geolocation.geocoder.geocode({location:t},function(t,n){"OK"===n?(t=e.filterGeocodeResultTypes(t))[0]?(e.$emit("placechanged",e.formatResult(t[0]),t[0],e.id),e.update(t[0].formatted_address)):e.$emit("error","no result for provided coordinates"):e.$emit("error","error getting address from coords")}))},geolocate:function(){var t=this;this.updateGeolocation(function(e,n){t.updateCoordinates(e)})},updateGeolocation:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(navigator.geolocation){var n={};this.geolocationOptions&&Object.assign(n,this.geolocationOptions),navigator.geolocation.getCurrentPosition(function(n){var o={lat:n.coords.latitude,lng:n.coords.longitude};t.geolocation.loc=o,t.geolocation.position=n,e&&e(o,n)},function(e){t.$emit("error","Cannot get Coordinates from navigator",e)},n)}},biasAutocompleteLocation:function(){var t=this;this.enableGeolocation&&this.updateGeolocation(function(e,n){var o=new google.maps.Circle({center:e,radius:n.coords.accuracy});t.autocomplete.setBounds(o.getBounds())})},formatResult:function(t){for(var e={},n=0;n<t.address_components.length;n++){var i=t.address_components[n].types[0];if(o[i]){var a=t.address_components[n][o[i]];e[i]=a}}return e.latitude=t.geometry.location.lat(),e.longitude=t.geometry.location.lng(),e},filterGeocodeResultTypes:function(t){if(!t||!this.types)return t;var e=[],n=[this.types];n.includes("(cities)")&&(n=n.concat(i)),n.includes("(regions)")&&(n=n.concat(a));var o=!0,s=!1,r=void 0;try{for(var l,c=t[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value,d=!0,p=!1,f=void 0;try{for(var h,m=u.types[Symbol.iterator]();!(d=(h=m.next()).done);d=!0){var g=h.value;if(n.includes(g)){e.push(u);break}}}catch(t){p=!0,f=t}finally{try{!d&&m.return&&m.return()}finally{if(p)throw f}}}}catch(t){s=!0,r=t}finally{try{!o&&c.return&&c.return()}finally{if(s)throw r}}return e}}}},692:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{directives:[{name:"model",rawName:"v-model",value:t.autocompleteText,expression:"autocompleteText"}],ref:"autocomplete",class:t.classname,attrs:{type:"text",id:t.id,placeholder:t.placeholder},domProps:{value:t.autocompleteText},on:{focus:function(e){return t.onFocus()},blur:function(e){return t.onBlur()},change:t.onChange,keypress:t.onKeyPress,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.autocompleteText=e.target.value)}}})},staticRenderFns:[]}},693:function(t,e,n){var o=n(90)(n(694),n(695),!1,null,null,null);t.exports=o.exports},694:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(91),i=n(336),a=n(654);e.default={mixins:[o.a,i.a,a.a],props:["oldCustomize","appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","packagesTotal","resourcesTotal","servicesTotal","categoriesTotal","financeTotal","addNewTaxBtnDisplay","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")},showDialogTax:function(){this.$emit("newTaxBtnClicked")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(t){this.$emit("selectAllInCategory",t)},changeFilter:function(){this.$emit("changeFilter")}}}},695:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-page-header am-section"},[n("el-row",{attrs:{type:"wpamelia-calendar"===t.$router.currentRoute.name?"":"flex",align:"middle"}},[n("el-col",{attrs:{span:"wpamelia-calendar"===t.$router.currentRoute.name?6:18}},[n("div",{staticClass:"am-logo"},[n("img",{staticClass:"logo-big",attrs:{width:"92",src:t.$root.getUrl+"public/img/amelia-logo-horizontal.svg"}}),t._v(" "),n("img",{staticClass:"logo-small",attrs:{width:"28",src:t.$root.getUrl+"public/img/amelia-logo-symbol.svg"}})]),t._v(" "),n("h1",{staticClass:"am-page-title"},[t._v("\n "+t._s(t.bookableType?t.$root.labels[t.bookableType]:t.$router.currentRoute.meta.title)+"\n\n "),t._v(" "),t.appointmentsApproved>=0?n("span",{staticClass:"am-appointments-number approved"},[t._v("\n "+t._s(t.appointmentsApproved)+"\n ")]):t._e(),t._v(" "),t.appointmentsPending>=0?n("span",{staticClass:"am-appointments-number pending"},[t._v("\n "+t._s(t.appointmentsPending)+"\n ")]):t._e(),t._v(" "),t.employeesTotal>=0&&!0===t.$root.settings.capabilities.canReadOthers?n("span",[n("span",{staticClass:"total-number"},[t._v(t._s(t.employeesTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.customersTotal>=0?n("span",[n("span",{staticClass:"total-number"},[t._v(t._s(t.customersTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.locationsTotal>=0?n("span",[n("span",{staticClass:"total-number"},[t._v(t._s(t.locationsTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.servicesTotal>=0&&"services"===t.bookableType?n("span",[n("span",{staticClass:"total-number"},[t._v(t._s(t.servicesTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.packagesTotal>=0&&"packages"===t.bookableType?n("span",[n("span",{staticClass:"total-number"},[t._v(t._s(t.packagesTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.resourcesTotal>=0&&"resources"===t.bookableType?n("span",[n("span",{staticClass:"total-number"},[t._v(t._s(t.resourcesTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.financeTotal>=0?n("span",[n("span",{staticClass:"total-number"},[t._v(t._s(t.financeTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e()])]),t._v(" "),n("el-col",{staticClass:"align-right v-calendar-column",attrs:{span:"wpamelia-calendar"===t.$router.currentRoute.name?18:6}},["wpamelia-appointments"===t.$router.currentRoute.name&&(!0===t.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteAppointments)?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogAppointment}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_appointment))])]):t._e(),t._v(" "),"wpamelia-events"===t.$router.currentRoute.name&&(!0===t.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogEvent}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_event))])]):t._e(),t._v(" "),"wpamelia-employees"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite&&!0===t.$root.settings.capabilities.canWriteOthers?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogEmployee}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_employee))])]):t._e(),t._v(" "),"wpamelia-customers"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogCustomer}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_customer))])]):t._e(),t._v(" "),"wpamelia-locations"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",class:t.licenceClassDisabled(),attrs:{type:"primary",disabled:t.notInLicence()},on:{click:t.showDialogLocation}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_location))])]):t._e(),t._v(" "),"wpamelia-services"===t.$router.currentRoute.name&&t.categoriesTotal>0&&!0===t.$root.settings.capabilities.canWrite&&"services"===t.bookableType?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogService}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_service))])]):t._e(),t._v(" "),"wpamelia-services"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite&&"packages"===t.bookableType?n("el-button",{staticClass:"am-dialog-create",class:t.licenceClassDisabled("pro"),attrs:{type:"primary",disabled:t.notInLicence("pro")},on:{click:function(e){t.packagesTotal>=0?t.showDialogPackage():t.showDialogPackageBooking()}}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.packagesTotal>=0?t.$root.labels.add_package:t.$root.labels.book_package))])]):t._e(),t._v(" "),"wpamelia-services"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite&&"resources"===t.bookableType?n("el-button",{staticClass:"am-dialog-create",class:t.licenceClassDisabled("pro"),attrs:{type:"primary",disabled:t.notInLicence("pro")},on:{click:function(e){return t.showDialogResource()}}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_resource))])]):t._e(),t._v(" "),"wpamelia-finance"===t.$router.currentRoute.name&&t.addNewTaxBtnDisplay&&!0===t.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",class:t.licenceClassDisabled(),attrs:{type:"primary",disabled:t.notInLicence()},on:{click:t.showDialogTax}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_tax))])]):t._e(),t._v(" "),"wpamelia-finance"===t.$router.currentRoute.name&&t.addNewCouponBtnDisplay&&!0===t.$root.settings.capabilities.canWrite?n("el-button",{staticClass:"am-dialog-create",class:t.licenceClassDisabled("starter"),attrs:{type:"primary",disabled:t.notInLicence("starter")},on:{click:t.showDialogCoupon}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_coupon))])]):t._e(),t._v(" "),n("transition",{attrs:{name:"fade"}},["wpamelia-cf"===t.$router.currentRoute.name&&t.addNewCustomFieldBtnDisplay?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogCustomFields}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_custom_field))])]):t._e()],1),t._v(" "),"wpamelia-dashboard"===t.$router.currentRoute.name?n("div",{staticClass:"v-calendar-column"},[n("div",{staticClass:"el-form-item__content"},[n("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:t.vCalendarFormats,"is-double-paned":!0},on:{input:t.changeFilter},model:{value:t.params.dates,callback:function(e){t.$set(t.params,"dates",e)},expression:"params.dates"}})],1)]):t._e(),t._v(" "),"wpamelia-calendar"===t.$router.currentRoute.name?n("div",{staticClass:"am-calendar-header-filters"},[n("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[n("el-form-item",{attrs:{label:t.$root.labels.services+":"}},[n("el-select",{attrs:{multiple:"",filterable:"","collapse-tags":"",loading:!t.fetched,placeholder:t.$root.labels.all_services},on:{change:t.changeFilter},model:{value:t.params.services,callback:function(e){t.$set(t.params,"services",e)},expression:"params.services"}},t._l(t.categories,function(e){return n("div",{key:e.id},[n("div",{staticClass:"am-drop-parent",on:{click:function(n){return t.selectAllInCategory(e.id)}}},[n("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(t){return n("el-option",{key:t.id,staticClass:"am-drop-child",attrs:{label:t.name,value:t.id}})})],2)}),0)],1),t._v(" "),n("el-form-item",{directives:[{name:"show",rawName:"v-show",value:t.locations.length,expression:"locations.length"}],attrs:{label:t.$root.labels.locations+":"}},[n("el-select",{attrs:{multiple:"",clearable:"","collapse-tags":"",placeholder:t.$root.labels.all_locations,loading:!t.fetched},on:{change:t.changeFilter},model:{value:t.params.locations,callback:function(e){t.$set(t.params,"locations",e)},expression:"params.locations"}},t._l(t.locations,function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)],1),t._v(" "),"wpamelia-calendar"===t.$router.currentRoute.name&&("admin"===t.$root.settings.role||"manager"===t.$root.settings.role||"provider"===t.$root.settings.role&&t.$root.settings.roles.allowWriteAppointments)?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogAppointment}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_appointment))])]):t._e()],1):t._e(),t._v(" "),t.oldCustomize&&"wpamelia-customize"===t.$router.currentRoute.name?n("div",{staticClass:"am-calendar-header-filters"},[n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showMainCustomize}},[n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.go_back))])])],1):t._e()],1)],1)],1)},staticRenderFns:[]}},697:function(t,e,n){var o=n(90)(n(739),n(740),!1,null,null,null);t.exports=o.exports},698:function(t,e,n){"use strict";var o=n(0),i=n.n(o),a=n(661);e.a={mixins:[a.a],data:function(){return{recurringDates:[]}},methods:{getRecurringAppointmentsData:function(){var t=this,e=[];return this.recurringData.dates.forEach(function(n){var o=t.getProviderService(n.providerId,t.appointment.serviceId);e.push({providerId:n.providerId,locationId:n.locationId,bookingStart:i()(n.date).format("YYYY-MM-DD")+" "+n.time,price:t.getBookingServicePrice(o,t.appointment.serviceDuration,t.appointment.bookings[0].persons,n.providerId,i()(n.date).format("YYYY-MM-DD")+" "+n.time),depositData:"disabled"!==o.depositPayment?{deposit:o.deposit,depositPayment:o.depositPayment,depositPerPerson:o.depositPerPerson}:null})}),e.shift(),e},toggleRecurringActive:function(){this.appointment.serviceId&&"disabled"!==this.getServiceById(this.appointment.serviceId).recurringCycle?this.isRecurringAvailable=!0:(this.isRecurringAvailable=!1,this.activeRecurring=!1)},getDefaultRecurringSettings:function(t,e,n){var o=this.getAvailableRecurringDates(n),a="all"===e?"daily":e,s="",r=i()(t,"YYYY-MM-DD"),l=r.format("D");switch(a){case"daily":s="day";break;case"weekly":s="week";break;case"monthly":s="month"}return{selectedMonthlyWeekDayString:r.format("dddd"),monthDateRule:Math.ceil(l/7),cycle:a,maxDate:i()(t,"YYYY-MM-DD HH:mm").add(1,"days").toDate(),maxCount:1,selectedWeekDayIndex:r.isoWeekday()-1,calendarDates:o,cycleInterval:1,weekDaysSelected:[r.isoWeekday()-1],repeatIntervalLabels:this.getRepeatIntervalLabels(this.$root.labels[s],this.$root.labels[s+"s"],i()(o[o.length-1]).diff(r,"days"))}},getAvailableRecurringDates:function(t){var e=[];return this.useSortedDateStrings(Object.keys(t)).forEach(function(t){e.push(i()(t+" 00:00:00"))}),e},getRepeatIntervalLabels:function(t,e,n){for(var o=[],i=0;i<n;i++)o.push({label:0===i?t:i+1+" "+e,value:i+1});return o}}}},699:function(t,e,n){var o;o=function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=".",e(e.s=9)}([function(t,e,n){"use strict";e.a={prefix:"",suffix:"",thousands:",",decimal:".",precision:2}},function(t,e,n){"use strict";var o=n(2),i=n(5),a=n(0);e.a=function(t,e){if(e.value){var s=n.i(i.a)(a.a,e.value);if("INPUT"!==t.tagName.toLocaleUpperCase()){var r=t.getElementsByTagName("input");1!==r.length||(t=r[0])}t.oninput=function(){var e=t.value.length-t.selectionEnd;t.value=n.i(o.a)(t.value,s),e=Math.max(e,s.suffix.length),e=t.value.length-e,e=Math.max(e,s.prefix.length+1),n.i(o.b)(t,e),t.dispatchEvent(n.i(o.c)("change"))},t.onfocus=function(){n.i(o.b)(t,t.value.length-s.suffix.length)},t.oninput(),t.dispatchEvent(n.i(o.c)("input"))}}},function(t,e,n){"use strict";function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a;"number"==typeof t&&(t=t.toFixed(s(e.precision)));var n=t.indexOf("-")>=0?"-":"",o=l(r(a(t),e.precision)).split("."),i=o[0],c=o[1];return i=function(t,e){return t.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+e)}(i,e.thousands),e.prefix+n+function(t,e,n){return e?t+n+e:t}(i,c,e.decimal)+e.suffix}function i(t,e){var n=t.indexOf("-")>=0?-1:1,o=r(a(t),e);return parseFloat(o)*n}function a(t){return l(t).replace(/\D+/g,"")||"0"}function s(t){return function(t,e,n){return Math.max(t,Math.min(e,n))}(0,t,20)}function r(t,e){var n=Math.pow(10,e);return(parseFloat(t)/n).toFixed(s(e))}function l(t){return t?t.toString():""}function c(t,e){var n=function(){t.setSelectionRange(e,e)};t===document.activeElement&&(n(),setTimeout(n,1))}function u(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e}var d=n(0);n.d(e,"a",function(){return o}),n.d(e,"d",function(){return i}),n.d(e,"b",function(){return c}),n.d(e,"c",function(){return u})},function(t,e,n){"use strict";function o(t,e){e&&Object.keys(e).map(function(t){r.a[t]=e[t]}),t.directive("money",s.a),t.component("money",a.a)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),a=n.n(i),s=n(1),r=n(0);n.d(e,"Money",function(){return a.a}),n.d(e,"VMoney",function(){return s.a}),n.d(e,"options",function(){return r.a}),n.d(e,"VERSION",function(){return l});var l="0.8.1";e.default=o,"undefined"!=typeof window&&window.Vue&&window.Vue.use(o)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),a=n(2);e.default={name:"Money",props:{value:{required:!0,type:[Number,String],default:0},masked:{type:Boolean,default:!1},precision:{type:Number,default:function(){return i.a.precision}},decimal:{type:String,default:function(){return i.a.decimal}},thousands:{type:String,default:function(){return i.a.thousands}},prefix:{type:String,default:function(){return i.a.prefix}},suffix:{type:String,default:function(){return i.a.suffix}}},directives:{money:o.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(t,e){var o=n.i(a.a)(t,this.$props);o!==this.formattedValue&&(this.formattedValue=o)}}},methods:{change:function(t){this.$emit("input",this.masked?t.target.value:n.i(a.d)(t.target.value,this.precision))}}}},function(t,e,n){"use strict";e.a=function(t,e){return t=t||{},e=e||{},Object.keys(t).concat(Object.keys(e)).reduce(function(n,o){return n[o]=void 0===e[o]?t[o]:e[o],n},{})}},function(t,e,n){var o=n(7)(n(4),n(8),null,null);t.exports=o.exports},function(t,e){t.exports=function(t,e,n,o){var i,a=t=t||{},s=typeof t.default;"object"!==s&&"function"!==s||(i=t,a=t.default);var r="function"==typeof a?a.options:a;if(e&&(r.render=e.render,r.staticRenderFns=e.staticRenderFns),n&&(r._scopeId=n),o){var l=r.computed||(r.computed={});Object.keys(o).forEach(function(t){var e=o[t];l[t]=function(){return e}})}return{esModule:i,exports:a,options:r}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{directives:[{name:"money",rawName:"v-money",value:{precision:t.precision,decimal:t.decimal,thousands:t.thousands,prefix:t.prefix,suffix:t.suffix},expression:"{precision, decimal, thousands, prefix, suffix}"}],staticClass:"v-money",attrs:{type:"tel"},domProps:{value:t.formattedValue},on:{change:t.change}})},staticRenderFns:[]}},function(t,e,n){t.exports=n(3)}])},t.exports=o()},700:function(t,e,n){"use strict";var o=n(0),i=n.n(o);e.a={methods:{selectedTicketsCount:function(t){var e=0;return t.forEach(function(t){e+=t.persons}),e},entitiesLoaded:function(){return"ameliaEventEntities"in window||"ameliaEntities"in window},processEntities:function(t){this.getCurrentUser(),this.options.entities.locations=t.locations.filter(function(t){return"hidden"!==t.status}),this.options.entities.employees=t.employees.filter(function(t){return"hidden"!==t.status}),this.options.entities.customFields=t.customFields,this.options.entities.employees.forEach(function(t){t.serviceList.forEach(function(t){"name"in t||Object.assign(t,{extras:[]})})}),this.$root.useTranslations&&this.translateEntities(this.options.entities),this.setBookingCustomFields()},processCalendarEntities:function(t){this.processEntities(t),this.options.entities.tags=t.tags,this.options.entities.taxes="taxes"in t?t.taxes:[];var e=this.getPreselectedTag();if(e){var n=t.tags.find(function(t){return t.name===e});this.options.entities.tags=n?[n]:t.tags,this.eventFilterTag=n?[n.name]:[]}else this.options.entities.tags=t.tags;this.entitiesFetched=!0,this.getEvents()},processListEntities:function(t){this.processEntities(t),this.options.entities.tags=this.getPreselectedTag()?[]:t.tags,this.options.entities.taxes="taxes"in t?t.taxes:[]},getEntities:function(t){var e=this;if(this.$root.hasApiCall&&!this.entitiesLoaded())this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({lite:!0,types:["locations","tags","custom_fields","employees","taxes"]})}).then(function(e){window.ameliaEventEntities=JSON.parse(JSON.stringify(e.data.data)),t(window.ameliaEventEntities)}).catch(function(){});else var n=setInterval(function(){e.entitiesLoaded()&&(clearInterval(n),"ameliaEntities"in window?t(JSON.parse(JSON.stringify(window.ameliaEntities))):t(JSON.parse(JSON.stringify(window.ameliaEventEntities))))},1e3)},getPreselectedTag:function(){return"eventTag"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.eventTag:null},getPreselectedEmployee:function(){return"eventTag"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.employee:null},getPreselectedEventId:function(){return"eventId"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.eventId:null},getPreselectedEventRecurring:function(){return"eventRecurring"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.eventRecurring:null},getImplodedPeriods:function(t){var e=null,n=[],o=[];return t.forEach(function(i,a){var s=e&&e.periodEnd===i.periodStart;s&&n.pop(),e={periodStart:s?e.periodStart:i.periodStart,periodEnd:i.periodEnd,isConnected:s},n.push(e),(t.length===a+1||a+1 in t&&t[a+1].periodStart!==i.periodEnd)&&(o=o.concat(JSON.parse(JSON.stringify(n))),n=[])}),o},getExplodedPeriods:function(t){var e=[];return t.forEach(function(t){if(t.isConnected)e.push(t);else{var n=i()(t.periodStart.split(" ")[0],"YYYY-MM-DD"),o=i()(t.periodEnd.split(" ")[0],"YYYY-MM-DD"),a=t.periodStart.split(" ")[1],s=t.periodEnd.split(" ")[1];"00:00:00"===s&&(s="24:00:00",o.subtract(1,"days"));for(var r=[];n.isSameOrBefore(o);)r.push(n.format("YYYY-MM-DD")),n.add(1,"days");r.forEach(function(n){e.push({periodStart:n+" "+a,periodEnd:n+" "+s,zoomMeeting:t.zoomMeeting,lessonSpace:t.lessonSpace})})}}),e},getEventStatus:function(t){switch(t.status){case"rejected":case"canceled":return{label:this.$root.labels.canceled,class:"canceled"};case"full":return{label:this.$root.labels.full,class:"full"};case"upcoming":return{label:this.$root.labels.upcoming,class:"upcoming"};case"approved":if(t.closed)return{label:this.$root.labels.closed,class:"closed"};if(t.opened&&t.places>0)return{label:this.$root.labels.opened,class:"opened"}}return{label:"",class:""}},getEventAddToCalendarData:function(t,e){e||this.$http.post(this.$root.getAjaxUrl+"/bookings/success/"+t.booking.id,{type:"event",appointmentStatusChanged:t.appointmentStatusChanged,paymentId:"paymentId"in t&&t.paymentId?t.paymentId:null,packageCustomerId:null}).then(function(t){}).catch(function(t){});var n="";t.event.location?n=t.event.location.address:t.event.customLocation&&(n=t.event.customLocation);var o=[];return t.utcTime.forEach(function(t){o.push({address:n,start:i.a.utc(t.start.replace(/ /g,"T")).toDate(),end:i.a.utc(t.end.replace(/ /g,"T")).toDate()})}),{title:this.$root.useTranslations?this.getNameTranslated(t.event):t.event.name,dates:o,address:n,description:this.$root.useTranslations?this.getDescriptionTranslated(t.event):t.event.description,id:t.booking.id,status:t.booking.status,active:this.$root.settings.general.addToCalendar,color:t.color,type:t.type,bookableType:t.type,bookable:t.event,booking:t.booking,token:t.booking.token,recurringIds:[]}},getMaxTicketSelected:function(t,e,n){if(t.bringingAnyone){var o=e.spots-e.sold,i=this.selectedTicketsCount(n.filter(function(t){return t.eventTicketId!==e.id}));return t.maxCustomCapacity&&(o=t.maxCustomCapacity-this.getAllSoldTickets(t)-i),null!==t.maxExtraPeople?t.maxExtraPeople+1>i?o>t.maxExtraPeople+1-i?t.maxExtraPeople-i+1:o:0:o}return 1},setTicketsData:function(t){t.bookingToEventTickets=[];var e=[];return t.customTickets.forEach(function(t,n){e.push({id:Math.random(),customerBookingId:null,eventTicketId:t.id,persons:0,price:t.dateRangePrice?t.dateRangePrice:t.price})}),e},getAllSoldTickets:function(t){var e=0;return t.customTickets&&t.customTickets.forEach(function(t){e+=t.sold}),e},getMinTicketPrice:function(t){var e=t.customTickets.filter(function(t){return t.enabled}),n=e[0].price;return e.forEach(function(t){t.price<n&&(n=t.price),t.dateRangePrice&&t.dateRangePrice<n&&(n=t.dateRangePrice)}),n},disableTicketSelection:function(t,e,n,o){if(t.bringingAnyone)return this.getMaxTicketSelected(t,e,n)<=0;var i,a=[];return n.forEach(function(t){a.push(t.persons)}),i=-1!==a.indexOf(1)?1:0,t.maxCustomCapacity?i!==o:i!==o||e.spots===e.sold}}}},704:function(t,e,n){"use strict";var o=n(666),i=n(661);e.a={mixins:[i.a,o.a],data:function(){return{}},methods:{getAppointmentService:function(t){return this.getProviderById(t.providerId).serviceList.find(function(e){return e.id===t.serviceId})||this.getServiceById(t.serviceId)},getAppointmentPrice:function(t,e){var n=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=0;return e.filter(function(t){return null===t.packageCustomerService}).forEach(function(e){["approved","pending"].includes(e.status)&&(i+=n.getBookingPrice(e,!1,e.price,e.aggregatedPrice,t.id))}),o?this.getFormattedPrice(i>=0?i:0,!this.$root.settings.payments.hideCurrencySymbolFrontend):i>=0?i:0},getBookingPrice:function(t,e,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a={price:e?n:t.price,aggregatedPrice:o,id:e?null:i};e||(a.tax=t.tax);var s=this.getAppointmentPriceAmount(a,t.extras.filter(function(t){return!("selected"in t)||t.selected}),t.persons,t.coupon,!1);return s.discount>s.total?0:s.total-s.discount+s.tax},getPackagePrice:function(t,e){var n=t.bookings[e].packageCustomerService.packageCustomer.coupon,o=t.bookings[e].packageCustomerService.packageCustomer.price,i=o/100*(n?n.discount:0)+(n?n.deduction:0);return i>o?0:o-i}}}},705:function(t,e,n){"use strict";e.a={data:function(){return{}},methods:{updateStashEntities:function(t){this.$root.settings.activation.stash&&this.$http.post(this.$root.getAjaxUrl+"/stash",t).then(function(t){})}}}},711:function(t,e,n){"use strict";e.a={data:function(){return{}},methods:{getCurrentUser:function(){var t=this;if("ameliaUser"in window)var e=setInterval(function(){"ameliaUser"in window&&(clearInterval(e),t.setCurrentUser(JSON.parse(JSON.stringify(window.ameliaUser))))},1e3);else this.$http.get(this.$root.getAjaxUrl+"/users/current").then(function(e){window.ameliaUser=e.data.data.user?JSON.parse(JSON.stringify(e.data.data.user)):null,t.setCurrentUser(window.ameliaUser)}).catch(function(t){console.log("getCurrentUser fail")})},setCurrentUser:function(t){this.currentUser=t,this.currentUser&&this.appointment&&(this.appointment.bookings[0].customerId=this.currentUser.id,this.appointment.bookings[0].customer.id=this.currentUser.id,this.appointment.bookings[0].customer.externalId=this.currentUser.externalId,this.appointment.bookings[0].customer.email=this.currentUser.email,this.appointment.bookings[0].customer.firstName=this.currentUser.firstName,this.appointment.bookings[0].customer.lastName=this.currentUser.lastName,this.appointment.bookings[0].customer.phone=this.currentUser.phone||"",this.appointment.bookings[0].customer.countryPhoneIso=this.currentUser.countryPhoneIso,this.appointment.bookings[0].customer.translations=this.currentUser.translations,this.phonePopulated=!!this.currentUser.phone&&""!==this.currentUser.phone.trim())}}}},713:function(t,e,n){t.exports=n(714)},714:function(t,e,n){"use strict";var o=n(656),i=n(686),a=n(715),s=n(669);function r(t){var e=new a(t),n=i(a.prototype.request,e);return o.extend(n,a.prototype,e),o.extend(n,e),n}var l=r(s);l.Axios=a,l.create=function(t){return r(o.merge(s,t))},l.Cancel=n(690),l.CancelToken=n(729),l.isCancel=n(689),l.all=function(t){return Promise.all(t)},l.spread=n(730),t.exports=l,t.exports.default=l},715:function(t,e,n){"use strict";var o=n(669),i=n(656),a=n(724),s=n(725),r=n(727),l=n(728);function c(t){this.defaults=t,this.interceptors={request:new a,response:new a}}c.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),(t=i.merge(o,this.defaults,{method:"get"},t)).method=t.method.toLowerCase(),t.baseURL&&!r(t.url)&&(t.url=l(t.baseURL,t.url));var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){c.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){c.prototype[t]=function(e,n,o){return this.request(i.merge(o||{},{method:t,url:e,data:n}))}}),t.exports=c},716:function(t,e,n){"use strict";var o=n(656);t.exports=function(t,e){o.forEach(t,function(n,o){o!==e&&o.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[o])})}},717:function(t,e,n){"use strict";var o=n(688);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(o("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},718:function(t,e,n){"use strict";t.exports=function(t,e,n,o,i){return t.config=e,n&&(t.code=n),t.request=o,t.response=i,t}},719:function(t,e,n){"use strict";var o=n(656);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(o.isURLSearchParams(e))a=e.toString();else{var s=[];o.forEach(e,function(t,e){null!==t&&void 0!==t&&(o.isArray(t)&&(e+="[]"),o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))}))}),a=s.join("&")}return a&&(t+=(-1===t.indexOf("?")?"?":"&")+a),t}},720:function(t,e,n){"use strict";var o=n(656);t.exports=function(t){var e,n,i,a={};return t?(o.forEach(t.split("\n"),function(t){i=t.indexOf(":"),e=o.trim(t.substr(0,i)).toLowerCase(),n=o.trim(t.substr(i+1)),e&&(a[e]=a[e]?a[e]+", "+n:n)}),a):a}},721:function(t,e,n){"use strict";var o=n(656);t.exports=o.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var o=t;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=o.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},722:function(t,e,n){"use strict";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,a=String(t),s="",r=0,l=o;a.charAt(0|r)||(l="=",r%1);s+=l.charAt(63&e>>8-r%1*8)){if((n=a.charCodeAt(r+=.75))>255)throw new i;e=e<<8|n}return s}},723:function(t,e,n){"use strict";var o=n(656);t.exports=o.isStandardBrowserEnv()?{write:function(t,e,n,i,a,s){var r=[];r.push(t+"="+encodeURIComponent(e)),o.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),o.isString(i)&&r.push("path="+i),o.isString(a)&&r.push("domain="+a),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},724:function(t,e,n){"use strict";var o=n(656);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){o.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},725:function(t,e,n){"use strict";var o=n(656),i=n(726),a=n(689),s=n(669);function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return r(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=o.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},726:function(t,e,n){"use strict";var o=n(656);t.exports=function(t,e,n){return o.forEach(n,function(n){t=n(t,e)}),t}},727:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},728:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},729:function(t,e,n){"use strict";var o=n(690);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new o(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},730:function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},731:function(t,e,n){"use strict";var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(11),s=(o=a)&&o.__esModule?o:{default:o};t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errors={}}return i(t,[{key:"set",value:function(t){this.errors=t}},{key:"has",value:function(t){return this.errors.hasOwnProperty(t)}},{key:"get",value:function(t){if(this.has(t))return this.errors[t][0]}},{key:"getAll",value:function(t){if(this.has(t))return this.errors[t]}},{key:"clear",value:function(t){t?s.default.delete(this.errors,t):this.errors={}}},{key:"any",value:function(){return Object.keys(this.errors).length>0}}]),t}()},732:function(t,e,n){"use strict";function o(t){return void 0===t}function i(t){return Array.isArray(t)}function a(t){return t&&"number"==typeof t.size&&"string"==typeof t.type&&"function"==typeof t.slice}t.exports=function t(e,n,s,r){if(n instanceof FormData&&(r=s,s=n,n=null),(n=n||{}).indices=!o(n.indices)&&n.indices,n.nulls=!!o(n.nulls)||n.nulls,s=s||new FormData,o(e))return s;if(function(t){return null===t}(e))n.nulls&&s.append(r,"");else if(i(e))if(e.length)e.forEach(function(e,o){var i=r+"["+(n.indices?o:"")+"]";t(e,n,s,i)});else{var l=r+"[]";s.append(l,"")}else!function(t){return t instanceof Date}(e)?!function(t){return t===Object(t)}(e)||function(t){return a(t)&&("object"==typeof t.lastModifiedDate||"number"==typeof t.lastModified)&&"string"==typeof t.name}(e)||a(e)?s.append(r,e):Object.keys(e).forEach(function(o){var a=e[o];if(i(a))for(;o.length>2&&o.lastIndexOf("[]")===o.length-2;)o=o.substring(0,o.length-2);t(a,n,s,r?r+"["+o+"]":o)}):s.append(r,e.toISOString());return s}},733:function(t,e,n){var o=n(90)(n(750),n(754),!1,null,null,null);t.exports=o.exports},734:function(t,e,n){var o;o=function(t){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=2)}([function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(4),i=n.n(o),a=n(6),s=n(5)(i.a,a.a,!1,null,null,null);e.default=s.exports},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.install=e.quillEditor=e.Quill=void 0;var i=o(n(0)),a=o(n(1)),s=window.Quill||i.default,r=function(t,e){e&&(a.default.props.globalOptions.default=function(){return e}),t.component(a.default.name,a.default)},l={Quill:s,quillEditor:a.default,install:r};e.default=l,e.Quill=s,e.quillEditor=a.default,e.install=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=o(n(0)),a=o(n(3)),s=window.Quill||i.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},writable:!0,configurable:!0}),e.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 t=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(e){e?t.$emit("focus",t.quill):t.$emit("blur",t.quill)}),this.quill.on("text-change",function(e,n,o){var i=t.$refs.editor.children[0].innerHTML,a=t.quill,s=t.quill.getText();"<p><br></p>"===i&&(i=""),t._content=i,t.$emit("input",t._content),t.$emit("change",{html:i,text:s,quill:a})}),this.$emit("ready",this.quill))}},watch:{content:function(t,e){this.quill&&(t&&t!==this._content?(this._content=t,this.quill.pasteHTML(t)):t||this.quill.setText(""))},value:function(t,e){this.quill&&(t&&t!==this._content?(this._content=t,this.quill.pasteHTML(t)):t||this.quill.setText(""))},disabled:function(t,e){this.quill&&this.quill.enable(!t)}}}},function(t,e){t.exports=function(t,e,n,o,i,a){var s,r=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(s=t,r=t.default);var c,u="function"==typeof r?r.options:r;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId=i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._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(t,e){return c.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,c):[c]}return{esModule:s,exports:r,options:u}}},function(t,e,n){"use strict";var o={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"quill-editor"},[t._t("toolbar"),t._v(" "),n("div",{ref:"editor"})],2)},staticRenderFns:[]};e.a=o}])},t.exports=o(n(751))},735:function(t,e,n){"use strict";var o=n(658),i=n(336);e.a={mixins:[o.a,i.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},{value:"%company_vat_number%",label:this.$root.labels.ph_company_vat_number}],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,type:"package"},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used,type:"package"}],employeePlaceholders:[{value:"%employee_id%",label:this.$root.labels.ph_employee_id},{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_due_amount%",label:this.$root.labels.ph_payment_due_amount},{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},{value:"%payment_link_square%",label:this.$root.labels.ph_payment_link_square}],categoryPlaceholders:[{value:"%category_id%",label:this.$root.labels.ph_category_id},{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_id%",label:this.$root.labels.ph_service_id},{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_id%",label:this.$root.labels.ph_location_id},{value:"%location_name%",label:this.$root.labels.ph_location_name},{value:"%location_phone%",label:this.$root.labels.ph_location_phone},{value:"%location_latitude%",label:this.$root.labels.ph_location_latitude},{value:"%location_longitude%",label:this.$root.labels.ph_location_longitude}],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_approve_url%",label:this.$root.labels.ph_appointment_approve_url,parse:"link"},{value:"%appointment_reject_url%",label:this.$root.labels.ph_appointment_reject_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,type:"appointment"},{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:"%microsoft_teams_url%",label:this.$root.labels.ph_microsoft_teams_url},{value:"%lesson_space_url%",label:this.$root.labels.ph_lesson_space_url},{value:"%reservation_name%",label:this.$root.labels.ph_reservation_name,type:"appointment"},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description,type:"appointment"},{value:"%time_zone%",label:this.$root.labels.ph_time_zone,type:"appointment"}],eventPlaceholders:[{value:"%attendee_code%",label:this.$root.labels.ph_attendee_code},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used,type:"event"},{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_id%",label:this.$root.labels.ph_event_id},{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:"%microsoft_teams_url_date%",label:this.$root.labels.ph_microsoft_teams_url_date},{value:"%microsoft_teams_url_date_time%",label:this.$root.labels.ph_microsoft_teams_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,type:"event"},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description,type:"event"},{value:"%time_zone%",label:this.$root.labels.ph_time_zone,type:"event"}],cartPlaceholders:[{value:"%cart_appointments_details%",label:this.$root.labels.ph_cart_appointments_details}],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>","%appointment_approve_url%":'<a href="%appointment_approve_url%">'+this.$root.labels.ph_appointment_approve_url+"</a>","%appointment_reject_url%":'<a href="%appointment_reject_url%">'+this.$root.labels.ph_appointment_reject_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>","%appointment_approve_url%":'<a href="%appointment_approve_url%">'+this.$root.labels.ph_appointment_approve_url+"</a>","%appointment_reject_url%":'<a href="%appointment_reject_url%">'+this.$root.labels.ph_appointment_reject_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)))},getCartPlaceholders:function(){return this.initialGroupedPlaceholders.cartPlaceholders},removePlaceholder:function(t,e){if(t in this.groupedPlaceholders){var n=null;this.groupedPlaceholders[t].forEach(function(t,o){t.value===e&&(n=o)}),null!==n&&this.groupedPlaceholders[t].splice(n,1)}},getParsedCodeLabel:function(t){if("link"===t.parse)for(var e in this.linksForParsing)if(t.value===e)return this.linksForParsing[e];return""},closeDialog:function(){this.$emit("closeDialogPlaceholders")},copyCodeText:function(t){var e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("Copy"),document.body.removeChild(e),this.notify("",this.$root.labels.placeholder_copied,"info","no-title")},addCustomFieldsPlaceholders:function(t){this.groupedPlaceholders.customFieldsPlaceholders=[];for(var e=0;e<this.customFields.length;e++)"file"===this.customFields[e].type&&"provider"!==t||this.groupedPlaceholders.customFieldsPlaceholders.push({value:"%custom_field_"+this.customFields[e].id+"%",label:this.customFields[e].label})},addCouponsPlaceholders:function(t){if(this.groupedPlaceholders.couponsPlaceholders=[],"customer"===t)for(var e=0;e<this.coupons.length;e++)this.groupedPlaceholders.couponsPlaceholders.push({value:"%coupon_"+this.coupons[e].id+"%",label:this.coupons[e].code+" ["+this.$root.labels.discount+": "+this.coupons[e].discount+", "+this.$root.labels.deduction+": "+this.coupons[e].deduction+this.getCurrencySymbol()+", "+this.$root.labels.expiration_date+": "+(this.coupons[e].expirationDate?this.getFrontedFormattedDate(this.coupons[e].expirationDate):"/")+"]"})},addExtrasPlaceholders:function(){this.groupedPlaceholders.extrasPlaceholders=[];for(var t=0;t<this.categories.length;t++)for(var e=0;e<this.categories[t].serviceList.length;e++)for(var n=0;n<this.categories[t].serviceList[e].extras.length;n++)this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[t].serviceList[e].extras[n].id+"_name%",label:this.categories[t].serviceList[e].extras[n].name}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[t].serviceList[e].extras[n].id+"_quantity%",label:this.categories[t].serviceList[e].extras[n].name}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extra_"+this.categories[t].serviceList[e].extras[n].id+"_price%",label:this.categories[t].serviceList[e].extras[n].name});this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extras%",label:this.$root.labels.ph_extras}),this.groupedPlaceholders.extrasPlaceholders.push({value:"%service_extras_details%",label:this.$root.labels.ph_extras_details})},setPlaceholders:function(t){var e=this;this.groupedPlaceholders=JSON.parse(JSON.stringify(this.initialGroupedPlaceholders)),this.addExtrasPlaceholders(),this.addCouponsPlaceholders(this.userTypeTab),this.addCustomFieldsPlaceholders(this.userTypeTab);var n=function(n){t[n].forEach(function(t){e.removePlaceholder(n,t)})};for(var o in t)n(o)}},computed:{}}},737:function(t,e,n){var o=n(90)(n(741),n(742),!1,null,null,null);t.exports=o.exports},738:function(t,e,n){"use strict";var o=n(735);e.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(t){if(void 0!==t)for(var e=t.quill.root.getElementsByTagName("p"),n=0;n<e.length;n++)for(var o in this.linksForParsing){for(var i=e[n].getElementsByTagName("a"),a=0;a<i.length;a++)i[a].href===this.pageUrl+o&&(i[a].href=o);-1!==e[n].textContent.indexOf(this.linksForParsing[o])&&(e[n].innerHTML=e[n].innerHTML.replace(this.plainTextLinksForParsing[o],this.linksForParsing[o]))}},process:function(t){var e=document.createElement("div");return e.innerHTML=t.trim(),this.format(e,0).innerHTML},format:function(t,e){for(var n=new Array(1+e++).join(" "),o=new Array(e-1).join(" "),i=null,a=0;a<t.children.length;a++)i=document.createTextNode("\n"+n),t.insertBefore(i,t.children[a]),this.format(t.children[a],e),t.lastElementChild===t.children[a]&&(i=document.createTextNode("\n"+o),t.appendChild(i));return t},changedContentText:function(t,e,n){n?this[t][n]=this[e][n]:this[t]=this[e]},textModeChanged:function(t,e,n){this.textMode=!this.textMode,this.textMode?n?this[e][n]=this.process(this[t][n].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):this[e]=this.process(this[t].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):n?this[e][n]="\x3c!-- Content --\x3e"+this[e][n]:this[e]="\x3c!-- Content --\x3e"+this[e],n?this[t][n]=this[e][n]:this[t]=this[e]}}}},739:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(680),i=n.n(o),a=n(658),s=n(336),r=n(668),l=n(705);e.default={mixins:[a.a,s.a,r.a,l.a],props:{formName:"",urlName:null,urlSubName:{type:String,default:""},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,haveBlock:!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 i.a,allowedDelete:!0,showDeleteConfirmation:!1,showVisibilityConfirmation:!1,showDuplicateConfirmation:!1,showSaveConfirmation:!1,showAddHoursDialog:!1,confirmCalendarConflict:!1,showBlockConfirmation:!1,deleteEffectMessage:null,dialogLoading:!1}},created:function(){i.a.defaults.axios=this.$http},methods:{getButtonType:function(t){switch(t){case"status":return this.hasIcons?null:this.buttonType.status;case"remove":return this.hasIcons?null:this.buttonType.remove;case"block":case"duplicate":return this.hasIcons?null:this.buttonType.duplicate}},closeDialog:function(){this.$parent.$emit("closeDialog")},closeMessage:function(){this.showSaveConfirmation=!1,this.$emit("closeSaveConfirmation")},onSubmit:function(t){var e=this,n=this.$root;this.$parent.$refs[this.formName].validate(function(o,i){if(!o)return"appointment"===e.formName&&e.handleDialogTabChange(i,"bookings."),"service"===e.formName&&e.handleDialogTabChange(i,"duration"),e.$emit("validationFailCallback"),!1;e.calendarConflict&&e.calendarConflict.enabled?(e.handleSaveConfirmation(),t&&(e.$emit("confirmCalendarConflict"),e.confirmCalendarConflict=!0,e.handleSaveClick(t))):(e.dialogLoading=!0,e.isNew?e.addEntity(t):e.editEntity(t)),e.$root=n})},onSuccess:function(t,e,n){var o=this;this.$parent.$emit("saveCallback",n),setTimeout(function(){o.dialogLoading=!1,o.$parent.$emit("closeDialog")},300),this.notify(t,e,"success")},onError:function(t,e){this.dialogLoading=!1,this.$emit("errorCallback",e)},errorEntityMissing:function(t){return!!("data"in t.response&&"data"in t.response.data&&"object"===t.response.data.data&&"entityMissing"in t.response.data.data&&t.response.data.data.entityMissing)&&(this.dialogLoading=!1,this.notify(this.$root.labels.error,t.response.data.message,"error"),!0)},addEntity:function(t){var e=this,n=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(n=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName,this.getParsedEntity(t),n).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.save,t.data.data),e.updateStash&&e.updateStashEntities({})}).catch(function(t){if(t.response){if(e.errorEntityMissing(t))return;e.onError("",t.response.data.data)}})},editEntity:function(t){var e=this,n=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(n=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName+this.urlSubName+"/"+this.entity.id,this.getParsedEntity(t),n).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.save,t.data.data),e.updateStash&&e.updateStashEntities({})}).catch(function(t){if(t.response){if(e.errorEntityMissing(t))return;e.onError("",t.response.data.data)}})},deleteEntity:function(t){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/delete/"+this.entity.id,{status:this.status.on,applyGlobally:t}).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.remove,t.data.data),e.updateStash&&e.updateStashEntities({})}).catch(function(t){t.response&&e.onError("",t.response.data.data.message)})},showEntity:function(t){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.on,applyGlobally:t}).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.show,null),e.updateStash&&e.updateStashEntities({})}).catch(function(t){t.response&&e.onError("",t.response.data.data.message)})},hideEntity:function(t){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.off,applyGlobally:t}).then(function(){e.onSuccess(e.$root.labels.success,e.message.success.hide,null),e.updateStash&&e.updateStashEntities({})}).catch(function(t){t.response&&e.onError("",t.response.data.data.message)})},blockEntity:function(t){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:"visible"===this.entity.status?this.status.block:this.status.on,applyGlobally:t}).then(function(){e.onSuccess(e.$root.labels.success,e.message.success.block,null),e.updateStash&&e.updateStashEntities({})}).catch(function(t){t.response&&e.onError("",t.response.data.data.message)})},duplicateEntity:function(){var t=this;this.dialogLoading=!0,this.$parent.$emit("closeDialog",!0),this.$parent.$emit("duplicateCallback",this.entity),setTimeout(function(){t.showDuplicateConfirmation=!1,t.dialogLoading=!1},600)},handleSaveConfirmation:function(){this.showSaveConfirmation=!this.showSaveConfirmation,this.showVisibilityConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1,this.showBlockConfirmation=!1},handleDuplicateConfirmation:function(){this.showDuplicateConfirmation=!this.showDuplicateConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showVisibilityConfirmation=!1,this.showBlockConfirmation=!1},handleVisibilityConfirmation:function(){this.showVisibilityConfirmation=!this.showVisibilityConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1,this.showBlockConfirmation=!1},handleBlockConfirmation:function(){this.showBlockConfirmation=!this.showBlockConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1,this.showVisibilityConfirmation=!1},handleDeleteConfirmation:function(){var t=this;this.showVisibilityConfirmation=!1,this.showDuplicateConfirmation=!1,this.showSaveConfirmation=!1,this.showBlockConfirmation=!1,this.action.haveRemoveEffect?!1===this.showDeleteConfirmation&&this.$http.get(this.$root.getAjaxUrl+"/"+this.urlName+"/effect/"+this.entity.id).then(function(e){t.allowedDelete=e.data.data.valid||t.ignoreDeleteEffect,t.deleteEffectMessage=e.data.data.message,t.showDeleteConfirmation=!t.showDeleteConfirmation}).catch(function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation,t.deleteEffectMessage=""}):this.showDeleteConfirmation=!this.showDeleteConfirmation},handleSaveClick:function(){var t=this;this.getCalendarEvents&&!this.confirmCalendarConflict?this.getCalendarEvents().then(function(){t.haveSaveConfirmation&&t.haveSaveConfirmation()?t.handleSaveConfirmation():t.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}},getConfirmBlockButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.status?{yes:this.buttonText.confirm.status.block,no:this.buttonText.confirm.status.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(t,e){for(var n=Object.keys(t),o=0,i=0;i<n.length;i++)o=n[i].startsWith(e)?o+1:o;o===n.length&&this.$emit("validationTabFailCallback")},isStatusOn:function(){return this.entity.status===this.status.on},isStatusOff:function(){return this.entity.status===this.status.off},isStatusBlocked:function(){return this.entity.status===this.status.block}},computed:{},components:{}}},740:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",{directives:[{name:"show",rawName:"v-show",value:t.allowedDelete,expression:"allowedDelete"}]},[t._v("\n "+t._s(t.message.confirm.remove)+"\n ")]),t._v(" "),t.action.haveRemoveEffect&&t.deleteEffectMessage?n("el-alert",{attrs:{title:"",type:"warning",description:t.deleteEffectMessage,"show-icon":"",closable:!1}}):t._e(),t._v(" "),t.hasApplyGloballyDeletion?n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.deleteEntity(!1)}}},[t._v("\n "+t._s(t.getConfirmDeleteButtonText().no)+"\n ")]),t._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.deleteEntity(!0)}}},[t._v("\n "+t._s(t.getConfirmDeleteButtonText().yes)+"\n ")])],1):n("div",{staticClass:"align-left"},[t.allowedDelete?n("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]):t._e(),t._v(" "),t.allowedDelete?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.deleteEntity(!1)}}},[t._v("\n "+t._s(t.$root.labels.delete)+"\n ")]):t._e(),t._v(" "),t.allowedDelete?t._e():n("el-button",{staticClass:"am-dialog-action-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation}}})],1)],1)]),t._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[t.status?n("div",{directives:[{name:"show",rawName:"v-show",value:t.showVisibilityConfirmation,expression:"showVisibilityConfirmation"}],staticClass:"am-dialog-confirmation"},[t.isStatusOn()?n("h3",[t._v(t._s(t.message.confirm.hide))]):t.isStatusOff()?n("h3",[t._v(t._s(t.message.confirm.show))]):t._e(),t._v(" "),t.hasApplyGloballyVisibility?n("div",{staticClass:"align-left"},[t.isStatusOn()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.hideEntity(!1)}}},[t._v("\n "+t._s(t.getConfirmStatusButtonText().no)+"\n ")]):t._e(),t._v(" "),t.isStatusOn()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.hideEntity(!0)}}},[t._v("\n "+t._s(t.getConfirmStatusButtonText().yes)+"\n ")]):t._e(),t._v(" "),t.isStatusOff()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.showEntity(!1)}}},[t._v("\n "+t._s(t.getConfirmStatusButtonText().no)+"\n ")]):t._e(),t._v(" "),t.isStatusOff()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.showEntity(!0)}}},[t._v("\n "+t._s(t.getConfirmStatusButtonText().yes)+"\n ")]):t._e()],1):n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(e){t.showVisibilityConfirmation=!t.showVisibilityConfirmation}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),t.isStatusOn()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.hideEntity(!1)}}},[t._v("\n "+t._s(t.getConfirmStatusButtonText().yes)+"\n ")]):t._e(),t._v(" "),t.isStatusOff()?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.showEntity(!1)}}},[t._v("\n "+t._s(t.getConfirmStatusButtonText().no)+"\n ")]):t._e()],1)]):t._e()]),t._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[t.status?n("div",{directives:[{name:"show",rawName:"v-show",value:t.showBlockConfirmation,expression:"showBlockConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",[t._v(t._s(t.message.confirm.block))]),t._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(e){t.showBlockConfirmation=!t.showBlockConfirmation}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.blockEntity(!1)}}},[t._v("\n "+t._s(t.getConfirmBlockButtonText().yes)+"\n ")])],1)]):t._e()]),t._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.showDuplicateConfirmation,expression:"showDuplicateConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",[t._v(t._s(t.message.confirm.duplicate))]),t._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDuplicateConfirmation=!t.showDuplicateConfirmation}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.duplicateEntity}},[t._v("\n "+t._s(t.$root.labels.duplicate)+"\n ")])],1)])]),t._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.showSaveConfirmation,expression:"showSaveConfirmation"}],staticClass:"am-dialog-confirmation"},[t.buttonText?n("h3",{staticStyle:{display:"block"}},[t._v(t._s(t.message.confirm.save)+"\n "),t.message.confirm.saveDetails?n("span",[t._v(t._s(t.message.confirm.saveDetails))]):t._e()]):t._e(),t._v(" "),t.buttonText?n("div",{staticClass:"align-left",staticStyle:{display:"block"}},[n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.onSubmit(!1)}}},[t._v("\n "+t._s(t.getConfirmSaveButtonText().no)+"\n ")]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.onSubmit(!0)}}},[t._v("\n "+t._s(t.getConfirmSaveButtonText().yes)+"\n ")])],1):t._e(),t._v(" "),n("el-col",{attrs:{span:22}},[t.action.haveSaveWarning?n("el-alert",{staticStyle:{"word-break":"break-word"},attrs:{title:"",type:"warning",description:t.message.confirm.save,"show-icon":"",closable:!1}}):t._e()],1),t._v(" "),n("el-col",{attrs:{span:2}},[t.showSaveConfirmation?n("el-button",{staticClass:"am-dialog-action-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:function(e){return t.closeMessage()}}}):t._e()],1)],1)]),t._v(" "),t.isNew?n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{attrs:{type:""},on:{click:t.closeDialog}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),t.action.haveAdd&&t.action.haveEdit?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:t.loadSaveButton},on:{click:t.handleSaveClick}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")]):t._e()],1)],1):n("el-row",[n("el-col",{staticClass:"align-left",attrs:{sm:16}},[t.action.haveDuplicate?n("el-button",{class:{"am-button-icon":t.hasIcons,"am-dialog-create":!t.hasIcons},attrs:{type:t.getButtonType("duplicate")},on:{click:t.handleDuplicateConfirmation}},[t.hasIcons?n("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.duplicate,src:t.$root.getUrl+"public/img/copy.svg"}}):n("span",[t._v(t._s(t.getActionDuplicateButtonText()))])]):t._e(),t._v(" "),t.action.haveStatus?n("el-button",{class:{"am-button-icon":t.hasIcons,"am-dialog-create":!t.hasIcons},attrs:{type:t.getButtonType("status")},on:{click:t.handleVisibilityConfirmation}},[t.hasIcons?n("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.hide,src:t.$root.getUrl+(t.isStatusOff()?"public/img/unhide.svg":"public/img/hide.svg")}}):n("span",[t._v("\n "+t._s(t.getActionStatusButtonText())+"\n ")])]):t._e(),t._v(" "),t.action.haveRemove?n("el-button",{class:{"am-button-icon":t.hasIcons,"am-dialog-create":!t.hasIcons},attrs:{type:t.getButtonType("remove")},on:{click:t.handleDeleteConfirmation}},[t.hasIcons?n("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.delete,src:t.$root.getUrl+"public/img/delete.svg"}}):n("span",[t._v("\n "+t._s(t.getActionRemoveButtonText())+"\n ")])]):t._e(),t._v(" "),t.action.haveBlock?n("el-button",{staticClass:"am-button-block",attrs:{type:t.getButtonType("block")},on:{click:t.handleBlockConfirmation}},[n("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.block,src:t.$root.getUrl+(t.isStatusBlocked()?"public/img/unblock.svg":"public/img/block.svg")}}),t._v(" "),n("span",[t._v("\n "+t._s(t.getConfirmBlockButtonText().yes)+"\n ")])]):t._e()],1),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{sm:!1===t.action.haveRemove&&!1===t.action.haveStatus&&!1===t.action.haveDuplicate?24:8}},[t.action.haveAdd&&t.action.haveEdit?n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:t.loadSaveButton},on:{click:t.handleSaveClick}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")]):t._e()],1)],1)],1)]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.loader_message))])])])])},staticRenderFns:[]}},741:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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}}}},742:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"am-pagination am-section"},[n("el-row",[n("el-col",{attrs:{sm:8}},[n("p",[t._v(t._s(t.paginationMessage))])]),t._v(" "),n("el-col",{attrs:{sm:16}},[n("el-pagination",{attrs:{layout:"prev, pager, next","page-size":t.getItemsPerPage,total:t.count,"current-page":t.params.page},on:{"update:currentPage":function(e){return t.$set(t.params,"page",e)},"update:current-page":function(e){return t.$set(t.params,"page",e)},"current-change":t.change}})],1)],1)],1)},staticRenderFns:[]}},746:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},749:function(t,e,n){var o;"undefined"!=typeof self&&self,o=function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"02f4":function(t,e,n){var o=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var a,s,r=String(i(e)),l=o(n),c=r.length;return l<0||l>=c?t?"":void 0:(a=r.charCodeAt(l))<55296||a>56319||l+1===c||(s=r.charCodeAt(l+1))<56320||s>57343?t?r.charAt(l):a:t?r.slice(l,l+2):s-56320+(a-55296<<10)+65536}}},"0390":function(t,e,n){"use strict";var o=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?o(t,e).length:1)}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0bfb":function(t,e,n){"use strict";var o=n("cb7c");t.exports=function(){var t=o(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0fc9":function(t,e,n){var o=n("3a38"),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=o(t))<0?i(t+e,0):a(t,e)}},1654:function(t,e,n){"use strict";var o=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=o(e,n),this._i+=t.length,{value:t,done:!1})})},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,e,n){var o=n("63b6");o(o.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var o=n("f772");t.exports=function(t,e){if(!o(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!o(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(t,e,n){var o=n("f772"),i=n("e53d").document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},"20fd":function(t,e,n){"use strict";var o=n("d9f6"),i=n("aebd");t.exports=function(t,e,n){e in t?o.f(t,e,i(0,n)):t[e]=n}},"214f":function(t,e,n){"use strict";n("b0c5");var o=n("2aba"),i=n("32e9"),a=n("79e5"),s=n("be13"),r=n("2b4c"),l=n("520a"),c=r("species"),u=!a(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=r(t),f=!a(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),h=f?!a(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!e}):void 0;if(!f||!h||"replace"===t&&!u||"split"===t&&!d){var m=/./[p],g=n(s,p,""[t],function(t,e,n,o,i){return e.exec===l?f&&!i?{done:!0,value:m.call(e,n,o)}:{done:!0,value:t.call(n,e,o)}:{done:!1}}),v=g[0],b=g[1];o(String.prototype,t,v),i(RegExp.prototype,p,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},"230e":function(t,e,n){var o=n("d3f4"),i=n("7726").document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},"23c6":function(t,e,n){var o=n("2d95"),i=n("2b4c")("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?o(e):"Object"==(s=o(e))&&"function"==typeof e.callee?"Arguments":s}},"241e":function(t,e,n){var o=n("25eb");t.exports=function(t){return Object(o(t))}},"25eb":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"2aba":function(t,e,n){var o=n("7726"),i=n("32e9"),a=n("69a8"),s=n("ca5a")("src"),r=n("fa5b"),l="toString",c=(""+r).split(l);n("8378").inspectSource=function(t){return r.call(t)},(t.exports=function(t,e,n,r){var l="function"==typeof n;l&&(a(n,"name")||i(n,"name",e)),t[e]!==n&&(l&&(a(n,s)||i(n,s,t[e]?""+t[e]:c.join(String(e)))),t===o?t[e]=n:r?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,l,function(){return"function"==typeof this&&this[s]||r.call(this)})},"2b4c":function(t,e,n){var o=n("5537")("wks"),i=n("ca5a"),a=n("7726").Symbol,s="function"==typeof a;(t.exports=function(t){return o[t]||(o[t]=s&&a[t]||(s?a:i)("Symbol."+t))}).store=o},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var o=n("5ca1"),i=n("d2c8"),a="includes";o(o.P+o.F*n("5147")(a),"String",{includes:function(t){return!!~i(this,t,a).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(t,e,n){"use strict";var o=n("b8e3"),i=n("63b6"),a=n("9138"),s=n("35e8"),r=n("481b"),l=n("8f60"),c=n("45f2"),u=n("53e2"),d=n("5168")("iterator"),p=!([].keys&&"next"in[].keys()),f="keys",h="values",m=function(){return this};t.exports=function(t,e,n,g,v,b,y){l(n,e,g);var _,k,w,x=function(t){if(!p&&t in T)return T[t];switch(t){case f:case h:return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",E=v==h,S=!1,T=t.prototype,O=T[d]||T["@@iterator"]||v&&T[v],P=O||x(v),$=v?E?x("entries"):P:void 0,A="Array"==e&&T.entries||O;if(A&&((w=u(A.call(new t)))!==Object.prototype&&w.next&&(c(w,C,!0),o||"function"==typeof w[d]||s(w,d,m))),E&&O&&O.name!==h&&(S=!0,P=function(){return O.call(this)}),o&&!y||!p&&!S&&T[d]||s(T,d,P),r[e]=P,r[C]=m,v)if(_={values:E?P:x(h),keys:b?P:x(f),entries:$},y)for(k in _)k in T||a(T,k,_[k]);else i(i.P+i.F*(p||S),e,_);return _}},"32a6":function(t,e,n){var o=n("241e"),i=n("c3a1");n("ce7e")("keys",function(){return function(t){return i(o(t))}})},"32e9":function(t,e,n){var o=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"32fc":function(t,e,n){var o=n("e53d").document;t.exports=o&&o.documentElement},"335c":function(t,e,n){var o=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},"355d":function(t,e){e.f={}.propertyIsEnumerable},"35e8":function(t,e,n){var o=n("d9f6"),i=n("aebd");t.exports=n("8e60")?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"36c3":function(t,e,n){var o=n("335c"),i=n("25eb");t.exports=function(t){return o(i(t))}},3702:function(t,e,n){var o=n("481b"),i=n("5168")("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},"3a38":function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},"40c3":function(t,e,n){var o=n("6b4c"),i=n("5168")("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?o(e):"Object"==(s=o(e))&&"function"==typeof e.callee?"Arguments":s}},4588:function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},"45f2":function(t,e,n){var o=n("d9f6").f,i=n("07e3"),a=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&o(t,a,{configurable:!0,value:e})}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"469f":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("7d7b")},"481b":function(t,e){t.exports={}},"4aa6":function(t,e,n){t.exports=n("dc62")},"4bf8":function(t,e,n){var o=n("be13");t.exports=function(t){return Object(o(t))}},"4ee1":function(t,e,n){var o=n("5168")("iterator"),i=!1;try{var a=[7][o]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var a=[7],s=a[o]();s.next=function(){return{done:n=!0}},a[o]=function(){return s},t(a)}catch(t){}return n}},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5147:function(t,e,n){var o=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[o]=!1,!"/./"[t](e)}catch(t){}}return!0}},5168:function(t,e,n){var o=n("dbdb")("wks"),i=n("62a0"),a=n("e53d").Symbol,s="function"==typeof a;(t.exports=function(t){return o[t]||(o[t]=s&&a[t]||(s?a:i)("Symbol."+t))}).store=o},5176:function(t,e,n){t.exports=n("51b6")},"51b6":function(t,e,n){n("a3c3"),t.exports=n("584a").Object.assign},"520a":function(t,e,n){"use strict";var o=n("0bfb"),i=RegExp.prototype.exec,a=String.prototype.replace,s=i,r="lastIndex",l=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t[r]||0!==e[r]}(),c=void 0!==/()??/.exec("")[1];(l||c)&&(s=function(t){var e,n,s,u,d=this;return c&&(n=new RegExp("^"+d.source+"$(?!\\s)",o.call(d))),l&&(e=d[r]),s=i.call(d,t),l&&s&&(d[r]=d.global?s.index+s[0].length:e),c&&s&&s.length>1&&a.call(s[0],n,function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(s[u]=void 0)}),s}),t.exports=s},"53e2":function(t,e,n){var o=n("07e3"),i=n("241e"),a=n("5559")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),o(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},"549b":function(t,e,n){"use strict";var o=n("d864"),i=n("63b6"),a=n("241e"),s=n("b0dc"),r=n("3702"),l=n("b447"),c=n("20fd"),u=n("7cd6");i(i.S+i.F*!n("4ee1")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,d,p=a(t),f="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,g=void 0!==m,v=0,b=u(p);if(g&&(m=o(m,h>2?arguments[2]:void 0,2)),void 0==b||f==Array&&r(b))for(n=new f(e=l(p.length));e>v;v++)c(n,v,g?m(p[v],v):p[v]);else for(d=b.call(p),n=new f;!(i=d.next()).done;v++)c(n,v,g?s(d,m,[i.value,v],!0):i.value);return n.length=v,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},5537:function(t,e,n){var o=n("8378"),i=n("7726"),a="__core-js_shared__",s=i[a]||(i[a]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,e,n){var o=n("dbdb")("keys"),i=n("62a0");t.exports=function(t){return o[t]||(o[t]=i(t))}},"584a":function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(t,e,n){var o=n("36c3"),i=n("b447"),a=n("0fc9");t.exports=function(t){return function(e,n,s){var r,l=o(e),c=i(l.length),u=a(s,c);if(t&&n!=n){for(;c>u;)if((r=l[u++])!=r)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},"5ca1":function(t,e,n){var o=n("7726"),i=n("8378"),a=n("32e9"),s=n("2aba"),r=n("9b43"),l="prototype",c=function(t,e,n){var u,d,p,f,h=t&c.F,m=t&c.G,g=t&c.S,v=t&c.P,b=t&c.B,y=m?o:g?o[e]||(o[e]={}):(o[e]||{})[l],_=m?i:i[e]||(i[e]={}),k=_[l]||(_[l]={});for(u in m&&(n=e),n)p=((d=!h&&y&&void 0!==y[u])?y:n)[u],f=b&&d?r(p,o):v&&"function"==typeof p?r(Function.call,p):p,y&&s(y,u,p,t&c.U),_[u]!=p&&a(_,u,f),v&&k[u]!=p&&(k[u]=p)};o.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},"5d73":function(t,e,n){t.exports=n("469f")},"5f1b":function(t,e,n){"use strict";var o=n("23c6"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var a=n.call(t,e);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==o(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"626a":function(t,e,n){var o=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},"62a0":function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},"63b6":function(t,e,n){var o=n("e53d"),i=n("584a"),a=n("d864"),s=n("35e8"),r=n("07e3"),l="prototype",c=function(t,e,n){var u,d,p,f=t&c.F,h=t&c.G,m=t&c.S,g=t&c.P,v=t&c.B,b=t&c.W,y=h?i:i[e]||(i[e]={}),_=y[l],k=h?o:m?o[e]:(o[e]||{})[l];for(u in h&&(n=e),n)(d=!f&&k&&void 0!==k[u])&&r(y,u)||(p=d?k[u]:n[u],y[u]=h&&"function"!=typeof k[u]?n[u]:v&&d?a(p,o):b&&k[u]==p?function(t){var e=function(e,n,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return t.apply(this,arguments)};return e[l]=t[l],e}(p):g&&"function"==typeof p?a(Function.call,p):p,g&&((y.virtual||(y.virtual={}))[u]=p,t&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,t.exports=c},6762:function(t,e,n){"use strict";var o=n("5ca1"),i=n("c366")(!0);o(o.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var o=n("626a"),i=n("be13");t.exports=function(t){return o(i(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var o=n("d3f4");t.exports=function(t,e){if(!o(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!o(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6c1c":function(t,e,n){n("c367");for(var o=n("e53d"),i=n("35e8"),a=n("481b"),s=n("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]&&i(d,s,c),a[c]=a.Array}},"71c1":function(t,e,n){var o=n("3a38"),i=n("25eb");t.exports=function(t){return function(e,n){var a,s,r=String(i(e)),l=o(n),c=r.length;return l<0||l>=c?t?"":void 0:(a=r.charCodeAt(l))<55296||a>56319||l+1===c||(s=r.charCodeAt(l+1))<56320||s>57343?t?r.charAt(l):a:t?r.slice(l,l+2):s-56320+(a-55296<<10)+65536}}},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(t,e,n){t.exports=n("d2d5")},"77f1":function(t,e,n){var o=n("4588"),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=o(t))<0?i(t+e,0):a(t,e)}},"794b":function(t,e,n){t.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"7cd6":function(t,e,n){var o=n("40c3"),i=n("5168")("iterator"),a=n("481b");t.exports=n("584a").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||a[o(t)]}},"7d7b":function(t,e,n){var o=n("e4ae"),i=n("7cd6");t.exports=n("584a").getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return o(e.call(t))}},"7e90":function(t,e,n){var o=n("d9f6"),i=n("e4ae"),a=n("c3a1");t.exports=n("8e60")?Object.defineProperties:function(t,e){i(t);for(var n,s=a(e),r=s.length,l=0;r>l;)o.f(t,n=s[l++],e[n]);return t}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(t,e){t.exports=function(){}},"86cc":function(t,e,n){var o=n("cb7c"),i=n("c69a"),a=n("6a99"),s=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8aae":function(t,e,n){n("32a6"),t.exports=n("584a").Object.keys},"8e60":function(t,e,n){t.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(t,e,n){"use strict";var o=n("a159"),i=n("aebd"),a=n("45f2"),s={};n("35e8")(s,n("5168")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=o(s,{next:i(1,n)}),a(t,e+" Iterator")}},9003:function(t,e,n){var o=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==o(t)}},9138:function(t,e,n){t.exports=n("35e8")},9306:function(t,e,n){"use strict";var o=n("c3a1"),i=n("9aa9"),a=n("355d"),s=n("241e"),r=n("335c"),l=Object.assign;t.exports=!l||n("294c")(function(){var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=o})?function(t,e){for(var n=s(t),l=arguments.length,c=1,u=i.f,d=a.f;l>c;)for(var p,f=r(arguments[c++]),h=u?o(f).concat(u(f)):o(f),m=h.length,g=0;m>g;)d.call(f,p=h[g++])&&(n[p]=f[p]);return n}:l},9427:function(t,e,n){var o=n("63b6");o(o.S,"Object",{create:n("a159")})},"95d5":function(t,e,n){var o=n("40c3"),i=n("5168")("iterator"),a=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||a.hasOwnProperty(o(e))}},"9aa9":function(t,e){e.f=Object.getOwnPropertySymbols},"9b43":function(t,e,n){var o=n("d8e8");t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,i){return t.call(e,n,o,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var o=n("2b4c")("unscopables"),i=Array.prototype;void 0==i[o]&&n("32e9")(i,o,{}),t.exports=function(t){i[o][t]=!0}},"9def":function(t,e,n){var o=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(o(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(t,e,n){var o=n("e4ae"),i=n("7e90"),a=n("1691"),s=n("5559")("IE_PROTO"),r=function(){},l="prototype",c=function(){var t,e=n("1ec9")("iframe"),o=a.length;for(e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;o--;)delete c[l][a[o]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(r[l]=o(t),n=new r,r[l]=null,n[s]=t):n=c(),void 0===e?n:i(n,e)}},a352:function(e,n){e.exports=t},a3c3:function(t,e,n){var o=n("63b6");o(o.S+o.F,"Object",{assign:n("9306")})},a481:function(t,e,n){"use strict";var o=n("cb7c"),i=n("4bf8"),a=n("9def"),s=n("4588"),r=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,d=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,f=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,m){return[function(o,i){var a=t(this),s=void 0==o?void 0:o[e];return void 0!==s?s.call(o,a,i):n.call(String(a),o,i)},function(t,e){var i=m(n,t,this,e);if(i.done)return i.value;var d=o(t),p=String(this),f="function"==typeof e;f||(e=String(e));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="",w=0,x=0;x<y.length;x++){_=y[x];for(var C=String(_[0]),E=c(u(s(_.index),p.length),0),S=[],T=1;T<_.length;T++)S.push(h(_[T]));var O=_.groups;if(f){var P=[C].concat(S,E,p);void 0!==O&&P.push(O);var $=String(e.apply(void 0,P))}else $=g(C,p,E,S,O,e);E>=w&&(k+=p.slice(w,E)+$,w=E+C.length)}return k+p.slice(w)}];function g(t,e,o,a,s,r){var l=o+t.length,c=a.length,u=f;return void 0!==s&&(s=i(s),u=p),n.call(r,u,function(n,i){var r;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,o);case"'":return e.slice(l);case"<":r=s[i.slice(1,-1)];break;default:var u=+i;if(0===u)return n;if(u>c){var p=d(u/10);return 0===p?n:p<=c?void 0===a[p-1]?i.charAt(1):a[p-1]+i.charAt(1):n}r=a[u-1]}return void 0===r?"":r})}})},a4bb:function(t,e,n){t.exports=n("8aae")},a745:function(t,e,n){t.exports=n("f410")},aae3:function(t,e,n){var o=n("d3f4"),i=n("2d95"),a=n("2b4c")("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},aebd:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},b0c5:function(t,e,n){"use strict";var o=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},b0dc:function(t,e,n){var o=n("e4ae");t.exports=function(t,e,n,i){try{return i?e(o(n)[0],n[1]):e(n)}catch(e){var a=t.return;throw void 0!==a&&o(a.call(t)),e}}},b447:function(t,e,n){var o=n("3a38"),i=Math.min;t.exports=function(t){return t>0?i(o(t),9007199254740991):0}},b8e3:function(t,e){t.exports=!0},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var o=n("6821"),i=n("9def"),a=n("77f1");t.exports=function(t){return function(e,n,s){var r,l=o(e),c=i(l.length),u=a(s,c);if(t&&n!=n){for(;c>u;)if((r=l[u++])!=r)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},c367:function(t,e,n){"use strict";var o=n("8436"),i=n("50ed"),a=n("481b"),s=n("36c3");t.exports=n("30f1")(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},c3a1:function(t,e,n){var o=n("e6f3"),i=n("1691");t.exports=Object.keys||function(t){return o(t,i)}},c649:function(t,e,n){"use strict";(function(t){n.d(e,"c",function(){return c}),n.d(e,"a",function(){return r}),n.d(e,"b",function(){return a}),n.d(e,"d",function(){return l}),n("a481");var o=n("4aa6"),i=n.n(o);var a="undefined"!=typeof window?window.console:t.console;var s=/-(\w)/g,r=function(t){var e=i()(null);return function(n){return e[n]||(e[n]=t(n))}}(function(t){return t.replace(s,function(t,e){return e?e.toUpperCase():""})});function l(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function c(t,e,n){var o=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,o)}}).call(this,n("c8ba"))},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},c8bb:function(t,e,n){t.exports=n("54a1")},ca5a:function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},cb7c:function(t,e,n){var o=n("d3f4");t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},ce7e:function(t,e,n){var o=n("63b6"),i=n("584a"),a=n("294c");t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),o(o.S+o.F*a(function(){n(1)}),"Object",s)}},d2c8:function(t,e,n){var o=n("aae3"),i=n("be13");t.exports=function(t,e,n){if(o(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},d2d5:function(t,e,n){n("1654"),n("549b"),t.exports=n("584a").Array.from},d3f4:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},d864:function(t,e,n){var o=n("79aa");t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,i){return t.call(e,n,o,i)}}return function(){return t.apply(e,arguments)}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9f6:function(t,e,n){var o=n("e4ae"),i=n("794b"),a=n("1bc3"),s=Object.defineProperty;e.f=n("8e60")?Object.defineProperty:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},dbdb:function(t,e,n){var o=n("584a"),i=n("e53d"),a="__core-js_shared__",s=i[a]||(i[a]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dc62:function(t,e,n){n("9427");var o=n("584a").Object;t.exports=function(t,e){return o.create(t,e)}},e4ae:function(t,e,n){var o=n("f772");t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e6f3:function(t,e,n){var o=n("07e3"),i=n("36c3"),a=n("5b4e")(!1),s=n("5559")("IE_PROTO");t.exports=function(t,e){var n,r=i(t),l=0,c=[];for(n in r)n!=s&&o(r,n)&&c.push(n);for(;e.length>l;)o(r,n=e[l++])&&(~a(c,n)||c.push(n));return c}},f410:function(t,e,n){n("1af6"),t.exports=n("584a").Array.isArray},f559:function(t,e,n){"use strict";var o=n("5ca1"),i=n("9def"),a=n("d2c8"),s="startsWith",r=""[s];o(o.P+o.F*n("5147")(s),"String",{startsWith:function(t){var e=a(this,t,s),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),o=String(t);return r?r.call(e,o,n):e.slice(n,n+o.length)===o}})},f772:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fb15:function(t,e,n){"use strict";var o;n.r(e),"undefined"!=typeof window&&(o=window.document.currentScript)&&(o=o.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=o[1]);var i=n("5176"),a=n.n(i),s=(n("f559"),n("a4bb")),r=n.n(s),l=(n("6762"),n("2fdb"),n("a745")),c=n.n(l);var u=n("5d73"),d=n.n(u);function p(t,e){return function(t){if(c()(t))return t}(t)||function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=d()(t);!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{o||null==r.return||r.return()}finally{if(i)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var f=n("774e"),h=n.n(f),m=n("c8bb"),g=n.n(m);function v(t){return function(t){if(c()(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(g()(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return h()(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var b=n("a352"),y=n.n(b),_=n("c649");function k(t,e){var n=this;this.$nextTick(function(){return n.$emit(t.toLowerCase(),e)})}function w(t,e){var n=null,o=function(t,e){n=function(t,e,n){return void 0===n?t:((t=t||{})[e]=n,t)}(n,t,e)};if(o("attrs",r()(t).filter(function(t){return"id"===t||t.startsWith("data-")}).reduce(function(e,n){return e[n]=t[n],e},{})),!e)return n;var i=e.on,s=e.props,l=e.attrs;return o("on",i),o("props",s),a()(n.attrs,l),n}var x=["Start","Add","Remove","Update","End"],C=["Choose","Sort","Filter","Clone"],E=["Move"].concat(x,C).map(function(t){return"on"+t}),S=null,T={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(t){return t}},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(t){var e=this.$slots.default;this.transitionMode=function(t){if(!t||1!==t.length)return!1;var e=p(t,1)[0].componentOptions;return!!e&&["transition-group","TransitionGroup"].includes(e.tag)}(e);var n=function(t,e){var n=e.header,o=e.footer,i=0,a=0;return n&&(i=n.length,t=t?[].concat(v(n),v(t)):v(n)),o&&(a=o.length,t=t?[].concat(v(t),v(o)):v(o)),{children:t,headerOffset:i,footerOffset:a}}(e,this.$slots),o=n.children,i=n.headerOffset,a=n.footerOffset;this.headerOffset=i,this.footerOffset=a;var s=w(this.$attrs,this.componentData);return t(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 t=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 e={};x.forEach(function(n){e["on"+n]=function(t){var e=this;return function(n){null!==e.realList&&e["onDrag"+t](n),k.call(e,t,n)}}.call(t,n)}),C.forEach(function(n){e["on"+n]=k.bind(t,n)});var n=r()(this.$attrs).reduce(function(e,n){return e[Object(_.a)(n)]=t.$attrs[n],e},{}),o=a()({},this.options,n,e,{onMove:function(e,n){return t.onDragMove(e,n)}});!("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(t){this.updateOptions(t)},deep:!0},$attrs:{handler:function(t){this.updateOptions(t)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getTag:function(){return this.tag||this.element},updateOptions:function(t){for(var e in t){var n=Object(_.a)(e);-1===E.indexOf(n)&&this._sortable.option(n,t[e])}},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 t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){var t=this;this.$nextTick(function(){t.visibleIndexes=function(t,e,n,o){if(!t)return[];var i=t.map(function(t){return t.elm}),a=e.length-o,s=v(e).map(function(t,e){return e>=a?i.length:i.indexOf(t)});return n?s.filter(function(t){return-1!==t}):s}(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode,t.footerOffset)})},getUnderlyingVm:function(t){var e=function(t,e){return t.map(function(t){return t.elm}).indexOf(e)}(this.getChildrenNodes()||[],t);return-1===e?null:{index:e,element:this.realList[e]}},getUnderlyingPotencialDraggableComponent:function(t){var e=t.__vue__;return e&&e.$options&&"transition-group"===e.$options._componentTag?e.$parent:e},emitChanges:function(t){var e=this;this.$nextTick(function(){e.$emit("change",t)})},alterList:function(t){if(this.list)t(this.list);else{var e=v(this.value);t(e),this.$emit("input",e)}},spliceList:function(){var t=arguments;this.alterList(function(e){return e.splice.apply(e,v(t))})},updatePosition:function(t,e){this.alterList(function(n){return n.splice(e,0,n.splice(t,1)[0])})},getRelatedContextFromMoveEvent:function(t){var e=t.to,n=t.related,o=this.getUnderlyingPotencialDraggableComponent(e);if(!o)return{component:o};var i=o.realList,s={list:i,component:o};if(e!==n&&i&&o.getUnderlyingVm){var r=o.getUnderlyingVm(n);if(r)return a()(r,s)}return s},getVmIndex:function(t){var e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){this.getChildrenNodes()[t].data=null;var e=this.getComponent();e.children=[],e.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),S=t.item},onDragAdd:function(t){var e=t.item._underlying_vm_;if(void 0!==e){Object(_.d)(t.item);var n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();var o={element:e,newIndex:n};this.emitChanges({added:o})}},onDragRemove:function(t){if(Object(_.c)(this.rootContainer,t.item,t.oldIndex),"clone"!==t.pullMode){var e=this.context.index;this.spliceList(e,1);var n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})}else Object(_.d)(t.clone)},onDragUpdate:function(t){Object(_.d)(t.item),Object(_.c)(t.from,t.item,t.oldIndex);var e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);var o={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:o})},updateProperty:function(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=v(e.to.children).filter(function(t){return"none"!==t.style.display}),o=n.indexOf(e.related),i=t.component.getVmIndex(o);return-1!==n.indexOf(S)||!e.willInsertAfter?i:i+1},onDragMove:function(t,e){var n=this.move;if(!n||!this.realList)return!0;var o=this.getRelatedContextFromMoveEvent(t),i=this.context,s=this.computeFutureIndex(o,t);return a()(i,{futureIndex:s}),n(a()({},t,{relatedContext:o,draggedContext:i}),e)},onDragEnd:function(){this.computeIndexes(),S=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",T);var O=T;e.default=O}}).default},t.exports=o(n(805))},750:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(734),i=(n.n(o),n(738));e.default={mixins:[i.a],props:{textModeProp:null,allowImage:!1,hasTranslation:!0,hasQuill:!0,label:"",entity:null,textProperty:"",htmlProperty:""},data:function(){return{textValue:"",isTextMode:!1}},mounted:function(){var t=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(){t.isTextMode=t.textModeProp,t.textValue=t.entity[t.textProperty],t.entity[t.htmlProperty]=t.entity[t.textProperty],t.entity[t.textProperty].startsWith("\x3c!-- Content --\x3e")&&(t.isTextMode=!1),t.isTextMode&&(t.entity[t.textProperty]=t.entity[t.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(t){this.entity[this.textProperty]="\x3c!-- Content --\x3e"+this.entity[this.htmlProperty].replace("\x3c!-- Content --\x3e",""),this.$emit("changeQuillContent",t)},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}}},751:function(t,e,n){(function(e){var n;"undefined"!=typeof self&&self,n=function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),i=n(18),a=n(19),s=n(45),r=n(46),l=n(47),c=n(48),u=n(49),d=n(12),p=n(32),f=n(33),h=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:i.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:f.default,Store:h.default}};e.default=g},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=a;var s,r={},l={},c={},u={};function d(t,e){var n;if(void 0===e&&(e=s.ANY),"string"==typeof t)n=u[t]||r[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof t)t&s.LEVEL&s.BLOCK?n=u.block:t&s.LEVEL&s.INLINE&&(n=u.inline);else if(t instanceof HTMLElement){var o=(t.getAttribute("class")||"").split(/\s+/);for(var i in o)if(n=l[o[i]])break;n=n||c[t.tagName]}return null==n?null:e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(s=e.Scope||(e.Scope={})),e.create=function(t,e){var n=d(t);if(null==n)throw new a("Unable to create "+t+" blot");var o=n;return new o(t instanceof Node||t.nodeType===Node.TEXT_NODE?t:o.create(e),e)},e.find=function t(n,o){return void 0===o&&(o=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:o?t(n.parentNode,o):null},e.query=d,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map(function(e){return t(e)});var o=e[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(t){return t.toUpperCase()}):o.tagName=o.tagName.toUpperCase(),(Array.isArray(o.tagName)?o.tagName:[o.tagName]).forEach(function(t){null!=c[t]&&null!=o.className||(c[t]=o)})));return o}},function(t,e,n){var o=n(51),i=n(11),a=n(3),s=n(20),r=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=a(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(o){(t(o)?e:n).push(o)}),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce(function(t,e){return e.insert?t+s.length(e):e.delete?t-e.delete:t},0)},l.prototype.length=function(){return this.reduce(function(t,e){return t+s.length(e)},0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],o=s.iterator(this.ops),i=0;i<e&&o.hasNext();){var a;i<t?a=o.next(t-i):(a=o.next(e-i),n.push(a)),i+=s.length(a)}return new l(n)},l.prototype.compose=function(t){for(var e=s.iterator(this.ops),n=s.iterator(t.ops),o=new l;e.hasNext()||n.hasNext();)if("insert"===n.peekType())o.push(n.next());else if("delete"===e.peekType())o.push(e.next());else{var i=Math.min(e.peekLength(),n.peekLength()),a=e.next(i),r=n.next(i);if("number"==typeof r.retain){var c={};"number"==typeof a.retain?c.retain=i: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(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:r;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")}).join("")}),a=new l,c=o(n[0],n[1],e),u=s.iterator(this.ops),d=s.iterator(t.ops);return c.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case o.INSERT:n=Math.min(d.peekLength(),e),a.push(d.next(n));break;case o.DELETE:n=Math.min(e,u.peekLength()),u.next(n),a.delete(n);break;case o.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),e);var r=u.next(n),l=d.next(n);i(r.insert,l.insert)?a.retain(n,s.attributes.diff(r.attributes,l.attributes)):a.push(l).delete(n)}e-=n}}),a.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=s.iterator(this.ops),o=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var a=n.peek(),r=s.length(a)-n.peekLength(),c="string"==typeof a.insert?a.insert.indexOf(e,r)-r:-1;if(c<0)o.push(n.next());else if(c>0)o.push(n.next(c));else{if(!1===t(o,n.next(1).attributes||{},i))return;i+=1,o=new l}}o.length()>0&&t(o,{},i)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=s.iterator(this.ops),o=s.iterator(t.ops),i=new l;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===o.peekType())if("insert"===o.peekType())i.push(o.next());else{var a=Math.min(n.peekLength(),o.peekLength()),r=n.next(a),c=o.next(a);if(r.delete)continue;c.delete?i.push(c):i.retain(a,s.attributes.transform(r.attributes,c.attributes,e))}else i.retain(s.length(n.next()));return i.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=s.iterator(this.ops),o=0;n.hasNext()&&o<=t;){var i=n.peekLength(),a=n.peekType();n.next(),"delete"!==a?("insert"===a&&(o<t||!e)&&(t+=i),o+=i):t-=Math.min(i,t-o)}return t},t.exports=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===o.call(t)},a=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,i=n.call(t,"constructor"),a=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!i&&!a)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,n,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!=(e=arguments[u]))for(n in e)o=c[n],c!==(s=e[n])&&(p&&s&&(a(s)||(r=i(s)))?(r?(r=!1,l=o&&i(o)?o:[]):l=o&&a(o)?o:{},c[n]=t(p,l,s)):void 0!==s&&(c[n]=s));return c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},a=d(n(3)),s=d(n(2)),r=d(n(0)),l=d(n(16)),c=d(n(6)),u=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return p(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,r.default.Embed),o(e,[{key:"attach",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.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(t,e){var n=r.default.query(t,r.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,o){this.format(n,o)}},{key:"insertAt",value:function(t,n,o){if("string"==typeof n&&n.endsWith("\n")){var a=r.default.create(g.blotName);this.parent.insertBefore(a,0===t?this:this.next),a.insertAt(0,n.slice(0,-1))}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o)}}]),e}();m.scope=r.default.Scope.BLOCK_BLOT;var g=function(t){function e(t){p(this,e);var n=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return h(e,r.default.Block),o(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(r.default.Leaf).reduce(function(t,e){return 0===e.length()?t:t.insert(e.value(),v(e))},new s.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,o,a){n<=0||(r.default.query(o,r.default.Scope.BLOCK)?t+n===this.length()&&this.format(o,a):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),o,a),this.cache={})}},{key:"insertAt",value:function(t,n,o){if(null!=o)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o);if(0!==n.length){var a=n.split("\n"),s=a.shift();s.length>0&&(t<this.length()-1||null==this.children.tail?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});var r=this;a.reduce(function(t,e){return(r=r.split(t,!0)).insertAt(0,e),e.length},t+s.length)}}},{key:"insertBefore",value:function(t,n){var o=this.children.head;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),o instanceof l.default&&o.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var o=this.clone();return 0===t?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var a=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},a}}]),e}();function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,a.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:v(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[c.default,r.default.Embed,u.default],e.bubbleFormats=v,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();n(50);var s=g(n(2)),r=g(n(14)),l=g(n(8)),c=g(n(9)),u=g(n(0)),d=n(15),p=g(d),f=g(n(3)),h=g(n(10)),m=g(n(34));function g(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=(0,h.default)("quill"),y=function(){function t(e){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=_(e,o),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=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(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(t,e){var o=n.selection.lastRange,i=o&&0===o.length?o.index:void 0;k.call(n,function(){return n.editor.update(null,e,i)},t)});var a=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<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(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),h.default.level(t)}},{key:"find",value:function(t){return t.__quill||u.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&b.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach(function(o){n.register(o,t[o],e)})}else null==this.imports[t]||o||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?u.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),a(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var o=this,a=w(t,e,n),s=i(a,4);return t=s[0],e=s[1],n=s[3],k.call(this,function(){return o.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return k.call(this,function(){var o=n.getSelection(!0),i=new s.default;if(null==o)return i;if(u.default.query(t,u.default.Scope.BLOCK))i=n.editor.formatLine(o.index,o.length,v({},t,e));else{if(0===o.length)return n.selection.format(t,e),i;i=n.editor.formatText(o.index,o.length,v({},t,e))}return n.setSelection(o,l.default.sources.SILENT),i},o)}},{key:"formatLine",value:function(t,e,n,o,a){var s,r=this,l=w(t,e,n,o,a),c=i(l,4);return t=c[0],e=c[1],s=c[2],a=c[3],k.call(this,function(){return r.editor.formatLine(t,e,s)},a,t,0)}},{key:"formatText",value:function(t,e,n,o,a){var s,r=this,l=w(t,e,n,o,a),c=i(l,4);return t=c[0],e=c[1],s=c[2],a=c[3],k.call(this,function(){return r.editor.formatText(t,e,s)},a,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var o=this.container.getBoundingClientRect();return{bottom:n.bottom-o.top,height:n.height,left:n.left-o.left,right:n.right-o.left,top:n.top-o.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),o=i(n,2);return t=o[0],e=o[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),o=i(n,2);return t=o[0],e=o[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,o){var i=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return k.call(this,function(){return i.editor.insertEmbed(e,n,o)},a,e)}},{key:"insertText",value:function(t,e,n,o,a){var s,r=this,l=w(t,0,n,o,a),c=i(l,4);return t=c[0],s=c[2],a=c[3],k.call(this,function(){return r.editor.insertText(t,e,s)},a,t,e.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(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var o=this,a=w(t,e,n),s=i(a,4);return t=s[0],e=s[1],n=s[3],k.call(this,function(){return o.editor.removeFormat(t,e)},n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,function(){t=new s.default(t);var n=e.getLength(),o=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),a=i.ops[i.ops.length-1];return null!=a&&"string"==typeof a.insert&&"\n"===a.insert[a.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),o.compose(i)},n)}},{key:"setSelection",value:function(e,n,o){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var a=w(e,n,o),s=i(a,4);e=s[0],n=s[1],o=s[3],this.selection.setRange(new d.Range(e,n),o),o!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new s.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,function(){return t=new s.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();function _(t,e){if((e=(0,f.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==y.DEFAULTS.theme){if(e.theme=y.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,f.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){!0===t.modules[e]&&(t.modules[e]={})})});var o=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce(function(t,e){var n=y.import("modules/"+e);return null==n?b.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,f.default)(!0,{},y.DEFAULTS,{modules:o},n,e),["bounds","container","scrollingContainer"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e.modules=Object.keys(e.modules).reduce(function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t},{}),e}function k(t,e,n,o){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new s.default;var i=null==n?null:this.getSelection(),a=this.editor.delta,r=t();if(null!=i&&(!0===n&&(n=i.index),null==o?i=x(i,r,e):0!==o&&(i=x(i,n,o,e)),this.setSelection(i,l.default.sources.SILENT)),r.length()>0){var c,u,d=[l.default.events.TEXT_CHANGE,r,a,e];if((c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),e!==l.default.sources.SILENT)(u=this.emitter).emit.apply(u,d)}return r}function w(t,e,n,i,a){var s={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(a=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(a=i,i=n,n=e,e=0),"object"===(void 0===n?"undefined":o(n))?(s=n,a=i):"string"==typeof n&&(null!=i?s[n]=i:a=n),[t,e,s,a=a||l.default.sources.API]}function x(t,e,n,o){if(null==t)return null;var a=void 0,r=void 0;if(e instanceof s.default){var c=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,o!==l.default.sources.USER)}),u=i(c,2);a=u[0],r=u[1]}else{var p=[t.index,t.index+t.length].map(function(t){return t<e||t===e&&o===l.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)}),f=i(p,2);a=f[0],r=f[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":m.default},e.expandConfig=_,e.overload=w,e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},a=r(n(7)),s=r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Inline),o(e,[{key:"formatAt",value:function(t,n,o,a){if(e.compare(this.statics.blotName,o)<0&&s.default.query(o,s.default.Scope.BLOT)){var r=this.isolate(t,n);a&&r.wrap(o,a)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,o,a)}},{key:"optimize",value:function(t){if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var o=e.order.indexOf(t),i=e.order.indexOf(n);return o>=0||i>=0?o-i:t===n?0:t<n?-1:1}}]),e}();l.allowedChildren=[l,s.default.Embed,a.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(0),a=(o=i)&&o.__esModule?o:{default:o};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Text),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=a(n(54));function a(t){return t&&t.__esModule?t:{default:t}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(t){document.addEventListener(t,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)})})});var r=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",s.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),o(e,[{key:"emit",value:function(){s.log.apply(s,arguments),function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];(this.listeners[t.type]||[]).forEach(function(e){var o=e.node,i=e.handler;(t.target===o||o.contains(t.target))&&i.apply(void 0,[t].concat(n))})}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}();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"},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};o.DEFAULTS={},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=["error","warn","log","info"],i="warn";function a(t){if(o.indexOf(t)<=o.indexOf(i)){for(var e,n=arguments.length,a=Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];(e=console)[t].apply(e,a)}}function s(t){return o.reduce(function(e,n){return e[n]=a.bind(console,n,t),e},{})}a.level=s.level=function(t){i=t},e.default=s},function(t,e,n){var o=Array.prototype.slice,i=n(52),a=n(53),s=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var c,u;if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(a(t))return!!a(e)&&(t=o.call(t),e=o.call(e),s(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(c=0;c<t.length;c++)if(t[c]!==e[c])return!1;return!0}try{var d=i(t),p=i(e)}catch(t){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(t[u],e[u],n))return!1;return typeof t==typeof e}(t,e,n))};function r(t){return null===t||void 0===t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|i:this.scope=o.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=o.query(t,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=d(n(2)),r=d(n(0)),l=d(n(4)),c=d(n(6)),u=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return p(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,c.default),e}();m.blotName="code",m.tagName="CODE";var g=function(t){function e(){return p(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,l.default),i(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce(function(e,n){return e.insert(n).insert("\n",t.formats())},new s.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var i=this.descendant(u.default,this.length()-1),s=o(i,1)[0];null!=s&&s.deleteAt(s.length()-1,1),a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,o,i){if(0!==n&&null!=r.default.query(o,r.default.Scope.BLOCK)&&(o!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var a=this.newlineIndex(t);if(!(a<0||a>=t+n)){var s=this.newlineIndex(t,!0)+1,l=a-s+1,c=this.isolate(s,l),u=c.next;c.format(o,i),u instanceof e&&u.formatAt(0,t-s+n-l,o,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(u.default,t),a=o(i,2),s=a[0],r=a[1];s.insertAt(r,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(r.default.create("text","\n")),a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=r.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof r.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}();g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=v(n(2)),r=v(n(20)),l=v(n(0)),c=v(n(13)),u=v(n(24)),d=n(4),p=v(d),f=v(n(16)),h=v(n(21)),m=v(n(11)),g=v(n(3));function v(t){return t&&t.__esModule?t:{default:t}}var b=/^[ -~]*$/,y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return a(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var a=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce(function(t,e){if(1===e.insert){var n=(0,h.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,h.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var o=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(o,e.attributes)}return t.push(e)},new s.default)}(t)).reduce(function(t,s){var c=s.retain||s.delete||s.insert.length||1,u=s.attributes||{};if(null!=s.insert){if("string"==typeof s.insert){var f=s.insert;f.endsWith("\n")&&n&&(n=!1,f=f.slice(0,-1)),t>=a&&!f.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,f);var h=e.scroll.line(t),m=i(h,2),v=m[0],b=m[1],y=(0,g.default)({},(0,d.bubbleFormats)(v));if(v instanceof p.default){var _=v.descendant(l.default.Leaf,b),k=i(_,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 w=Object.keys(s.insert)[0];if(null==w)return t;e.scroll.insertAt(t,w,s.insert[w])}a+=c}return Object.keys(u).forEach(function(n){e.scroll.formatAt(t,c,n,u[n])}),t+c},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new s.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var a=n.scroll.lines(t,Math.max(e,1)),s=e;a.forEach(function(e){var a=e.length();if(e instanceof c.default){var r=t-e.offset(n.scroll),l=e.newlineIndex(r+s)-r+1;e.formatAt(r,l,i,o[i])}else e.format(i,o[i]);s-=a})}}),this.scroll.optimize(),this.update((new s.default).retain(t).retain(e,(0,h.default)(o)))}},{key:"formatText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach(function(i){n.scroll.formatAt(t,e,i,o[i])}),this.update((new s.default).retain(t).retain(e,(0,h.default)(o)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new s.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===e?this.scroll.path(t).forEach(function(t){var e=i(t,1)[0];e instanceof p.default?n.push(e):e instanceof l.default.Leaf&&o.push(e)}):(n=this.scroll.lines(t,e),o=this.scroll.descendants(l.default.Leaf,t,e));var a=[n,o].map(function(t){if(0===t.length)return{};for(var e=(0,d.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,d.bubbleFormats)(n),e)}return e});return g.default.apply(g.default,a)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new s.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(o).forEach(function(i){n.scroll.formatAt(t,e.length,i,o[i])}),this.update((new s.default).retain(t).insert(e,(0,h.default)(o)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===p.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof f.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),o=this.scroll.line(t+e),a=i(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(t,e+u).diff((new s.default).insert(n).concat(d)),f=(new s.default).retain(t).concat(p);return this.applyDelta(f)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(b)&&l.default.find(e[0].target)){var i=l.default.find(e[0].target),a=(0,d.bubbleFormats)(i),r=i.offset(this.scroll),c=e[0].oldValue.replace(u.default.CONTENTS,""),p=(new s.default).insert(c),f=(new s.default).insert(i.value());t=(new s.default).retain(r).concat(p.diff(f,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,a):t.push(e)},new s.default),this.delta=o.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(o.compose(t),this.delta)||(t=o.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce(function(n,o){return null==t[o]?n:(e[o]===t[o]?n[o]=e[o]:Array.isArray(e[o])?e[o].indexOf(t[o])<0&&(n[o]=e[o].concat([t[o]])):n[o]=[e[o],t[o]],n)},{})}e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=c(n(0)),s=c(n(21)),r=c(n(11)),l=c(n(8));function c(t){return t&&t.__esModule?t:{default:t}}function u(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var p=(0,c(n(10)).default)("quill:selection"),f=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,t),this.index=e,this.length=n},h=function(){function t(e,n){var o=this;d(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=a.default.create("cursor",this),this.lastRange=this.savedRange=new f(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(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&o.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(o.hasFocus()){var t=o.getNativeRange();null!=t&&t.start.node!==o.cursor.textNode&&o.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{o.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(t,e){if(e.range){var n=e.range,i=n.startNode,a=n.startOffset,s=n.endNode,r=n.endOffset;o.setNativeRange(i,a,s,r)}}),this.update(l.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",function(){t.composing=!0}),this.root.addEventListener("compositionend",function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout(function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,function(){t.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){t.mouseDown=!1,t.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!a.default.query(t,a.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=a.default.find(n.start.node,!1);if(null==o)return;if(o instanceof a.default.Leaf){var i=o.split(n.start.offset);o.parent.insertBefore(this.cursor,i)}else o.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,a=this.scroll.leaf(t),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);i=u[0],l=u[1];var d=document.createRange();if(e>0){d.setStart(i,l);var p=this.scroll.leaf(t+e),f=o(p,2);if(r=f[0],l=f[1],null==r)return null;var h=r.position(l,!0),m=o(h,2);return i=m[0],l=m[1],d.setEnd(i,l),d.getBoundingClientRect()}var g="left",v=void 0;return i instanceof Text?(l<i.data.length?(d.setStart(i,l),d.setEnd(i,l+1)):(d.setStart(i,l-1),d.setEnd(i,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 t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map(function(t){var n=o(t,2),i=n[0],s=n[1],r=a.default.find(i,!0),l=r.offset(e.scroll);return 0===s?l:r instanceof a.default.Container?l+r.length():l+r.index(i,s)}),s=Math.min(Math.max.apply(Math,u(i)),this.scroll.length()-1),r=Math.min.apply(Math,[s].concat(u(i)));return new f(r,s-r)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],a=this.scroll.length();return n.forEach(function(t,n){t=Math.min(a-1,t);var s,r=e.scroll.leaf(t),l=o(r,2),c=l[0],u=l[1],d=c.position(u,0!==n),p=o(d,2);s=p[0],u=p[1],i.push(s,u)}),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,a=this.scroll.line(Math.min(e.index,i)),s=o(a,1)[0],r=s;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,i));r=o(l,1)[0]}if(null!=s&&null!=r){var c=t.getBoundingClientRect();n.top<c.top?t.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(t.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",t,e,n,o),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var a=document.getSelection();if(null!=a)if(null!=t){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||i||t!==s.startContainer||e!==s.startOffset||n!==s.endContainer||o!==s.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var r=document.createRange();r.setStart(t,e),r.setEnd(n,o),a.removeAllRanges(),a.addRange(r)}}else a.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),p.info("setRange",t),null!=t){var o=this.rangeToNative(t);this.setNativeRange.apply(this,u(o).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),i=o(n,2),a=i[0],c=i[1];if(this.lastRange=a,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,r.default)(e,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)(e),t];if((u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(p)),t!==l.default.sources.SILENT)(d=this.emitter).emit.apply(d,p)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(0),s=(o=a)&&o.__esModule?o:{default:o};var r=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Embed),i(e,[{key:"insertInto",value:function(t,n){0===t.children.length?function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}();r.blotName="break",r.tagName="BR",e.default=r},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(44),s=n(30),r=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach(function(t){t.attach()})},e.prototype.build=function(){var t=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(e){try{var n=c(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof r.ParchmentError)return;throw t}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var o=this.children.find(n),i=o[0],a=o[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,a]:i instanceof e?i.descendant(t,a):[null,-1]},e.prototype.descendants=function(t,n,o){void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE);var i=[],a=o;return this.children.forEachAt(n,o,function(n,o,s){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,o,a))),a-=s}),i},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,o){this.children.forEachAt(t,e,function(t,e,i){t.formatAt(e,i,n,o)})},e.prototype.insertAt=function(t,e,n){var o=this.children.find(t),i=o[0],a=o[1];if(i)i.insertAt(a,e,n);else{var s=null==n?r.create("text",e):r.create(e,n);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new r.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=r.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var o=this.children.find(t,n),i=o[0],a=o[1],s=[[this,t]];return i instanceof e?s.concat(i.path(a,n)):(null!=i&&s.push([i,a]),s)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,o,i){t=t.split(o,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,o=[],i=[];t.forEach(function(t){t.target===n.domNode&&"childList"===t.type&&(o.push.apply(o,t.addedNodes),i.push.apply(i,t.removedNodes))}),i.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=r.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}}),o.filter(function(t){return t.parentNode==n.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var e=null;null!=t.nextSibling&&(e=r.find(t.nextSibling));var o=c(t);o.next==e&&null!=o.next||(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,e||void 0))})},e}(s.default);function c(t){var e=r.find(t);if(null==e)try{e=r.create(t)}catch(n){e=r.create(r.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(12),s=n(31),r=n(17),l=n(1),c=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new s.default(n.domNode),n}return i(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=l.query(t);n instanceof a.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var o=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(o),o},e.prototype.update=function(e,n){var o=this;t.prototype.update.call(this,e,n),e.some(function(t){return t.target===o.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,o){var i=t.prototype.wrap.call(this,n,o);return i instanceof e&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},e}(r.default);e.default=c},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(30),s=n(1),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=s.Scope.INLINE_BLOT,e}(a.default);e.default=r},function(t,e,n){var o=n(11),i=n(3),a={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var o=i(!0,{},e);for(var a in n||(o=Object.keys(o).reduce(function(t,e){return null!=o[e]&&(t[e]=o[e]),t},{})),t)void 0!==t[a]&&void 0===e[a]&&(o[a]=t[a]);return Object.keys(o).length>0?o:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,i){return o(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var o=Object.keys(e).reduce(function(n,o){return void 0===t[o]&&(n[o]=e[o]),n},{});return Object.keys(o).length>0?o:void 0}}},iterator:function(t){return new s(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function s(t){this.ops=t,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,o=a.length(e);if(t>=o-n?(t=o-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}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"},t.exports=a},function(t,n){var o=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,o,i;try{n=Map}catch(t){n=function(){}}try{o=Set}catch(t){o=function(){}}try{i=Promise}catch(t){i=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=[],f=[],h=void 0!==e;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function s(c,m){if(null===c)return null;if(0===m)return c;var g,v;if("object"!=typeof c)return c;if(t(c,n))g=new n;else if(t(c,o))g=new o;else if(t(c,i))g=new i(function(t,e){c.then(function(e){t(s(e,m-1))},function(t){e(s(t,m-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(h&&e.isBuffer(c))return g=new e(c.length),c.copy(g),g;t(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 f[b];p.push(c),f.push(g)}for(var y in t(c,n)&&c.forEach(function(t,e){var n=s(e,m-1),o=s(t,m-1);g.set(n,o)}),t(c,o)&&c.forEach(function(t){var e=s(t,m-1);g.add(e)}),c){var _;v&&(_=Object.getOwnPropertyDescriptor(v,y)),_&&null==_.set||(g[y]=s(c[y],m-1))}if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(c);for(y=0;y<k.length;y++){var w=k[y];(!(C=Object.getOwnPropertyDescriptor(c,w))||C.enumerable||d)&&(g[w]=s(c[w],m-1),C.enumerable||Object.defineProperty(g,w,{enumerable:!1}))}}if(d){var x=Object.getOwnPropertyNames(c);for(y=0;y<x.length;y++){var C,E=x[y];(C=Object.getOwnPropertyDescriptor(c,E))&&C.enumerable||(g[E]=s(c[E],m-1),Object.defineProperty(g,E,{enumerable:!1}))}}return g}(s,c)}function s(t){return Object.prototype.toString.call(t)}function r(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return a.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},a.__objToStr=s,a.__isDate=function(t){return"object"==typeof t&&"[object Date]"===s(t)},a.__isArray=function(t){return"object"==typeof t&&"[object Array]"===s(t)},a.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===s(t)},a.__getRegExpFlags=r,a}();"object"==typeof t&&t.exports&&(t.exports=o)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=f(n(0)),r=f(n(8)),l=n(4),c=f(l),u=f(n(16)),d=f(n(13)),p=f(n(25));function f(t){return t&&t.__esModule?t:{default:t}}function h(t){return t instanceof c.default||t instanceof l.BlockEmbed}var m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.emitter=n.emitter,Array.isArray(n.whitelist)&&(o.whitelist=n.whitelist.reduce(function(t,e){return t[e]=!0,t},{})),o.domNode.addEventListener("DOMNodeInserted",function(){}),o.optimize(),o.enable(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Scroll),i(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var i=this.line(t),s=o(i,2),r=s[0],c=s[1],p=this.line(t+n),f=o(p,1)[0];if(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=f&&r!==f&&c>0){if(r instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(r instanceof d.default){var h=r.newlineIndex(r.length(),!0);if(h>-1&&(r=r.split(h+1))===f)return void this.optimize()}else if(f instanceof d.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof u.default?null:f.children.head;r.moveChildren(f,g),r.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,o,i){(null==this.whitelist||this.whitelist[o])&&(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,o,i),this.optimize())}},{key:"insertAt",value:function(t,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==o||null==s.default.query(n,s.default.Scope.BLOCK)){var i=s.default.create(this.statics.defaultChild);this.appendChild(i),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,o)}else{var r=s.default.create(n,o);this.appendChild(r)}else a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===s.default.Scope.INLINE_BLOT){var o=s.default.create(this.statics.defaultChild);o.appendChild(t),t=o}a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(h,t)}},{key:"lines",value:function(){return function t(e,n,o){var i=[],a=o;return e.children.forEachAt(n,o,function(e,n,o){h(e)?i.push(e):e instanceof s.default.Container&&(i=i.concat(t(e,n,a))),a-=o}),i}(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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(r.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=r.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(r.default.events.SCROLL_BEFORE_UPDATE,n,t),a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(r.default.events.SCROLL_UPDATE,n,t)}}}]),e}();m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[c.default,l.BlockEmbed,p.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=m(n(21)),r=m(n(11)),l=m(n(3)),c=m(n(2)),u=m(n(20)),d=m(n(0)),p=m(n(5)),f=m(n(10)),h=m(n(9));function m(t){return t&&t.__esModule?t:{default:t}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=(0,f.default)("quill:keyboard"),b=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",y=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.bindings={},Object.keys(o.options.bindings).forEach(function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&o.options.bindings[e]&&o.addBinding(o.options.bindings[e])}),o.addBinding({key:e.keys.ENTER,shiftKey:null},C),o.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(o.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},k),o.addBinding({key:e.keys.DELETE},{collapsed:!0},w)):(o.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},k),o.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},w)),o.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},x),o.addBinding({key:e.keys.DELETE},{collapsed:!1},x),o.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},k),o.listen(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,h.default),a(e,null,[{key:"match",value:function(t,e){return e=T(e),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!e[n]!==t[n]&&null!==e[n]})&&e.key===(t.which||t.keyCode)}}]),a(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=T(t);if(null==o||null==o.key)return v.warn("Attempted to add invalid keyboard binding",o);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),o=(0,l.default)(o,e,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var a=n.which||n.keyCode,s=(t.bindings[a]||[]).filter(function(t){return e.match(n,t)});if(0!==s.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var c=t.quill.getLine(l.index),u=i(c,2),p=u[0],f=u[1],h=t.quill.getLeaf(l.index),m=i(h,2),g=m[0],v=m[1],b=0===l.length?[g,v]:t.quill.getLeaf(l.index+l.length),y=i(b,2),_=y[0],k=y[1],w=g instanceof d.default.Text?g.value().slice(0,v):"",x=_ instanceof d.default.Text?_.value().slice(k):"",C={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:t.quill.getFormat(l),offset:f,prefix:w,suffix:x};s.some(function(e){if(null!=e.collapsed&&e.collapsed!==C.collapsed)return!1;if(null!=e.empty&&e.empty!==C.empty)return!1;if(null!=e.offset&&e.offset!==C.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==C.format[t]}))return!1}else if("object"===o(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=C.format[t]:!1===e.format[t]?null==C.format[t]:(0,r.default)(e.format[t],C.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(C.prefix))&&(!(null!=e.suffix&&!e.suffix.test(C.suffix))&&!0!==e.handler.call(t,l,C))})&&n.preventDefault()}}}})}}]),e}();function _(t,e){var n,o=t===y.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},o,/^$/),g(n,"handler",function(n){var o=n.index;t===y.keys.RIGHT&&(o+=n.length+1);var a=this.quill.getLeaf(o);return!(i(a,1)[0]instanceof d.default.Embed)||(t===y.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),!1)}),n}function k(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),o=i(n,1)[0],a={};if(0===e.offset){var s=this.quill.getLine(t.index-1),r=i(s,1)[0];if(null!=r&&r.length()>1){var l=o.formats(),c=this.quill.getFormat(t.index-1,1);a=u.default.attributes.diff(l,c)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-d,d,p.default.sources.USER),Object.keys(a).length>0&&this.quill.formatLine(t.index-d,d,a,p.default.sources.USER),this.quill.focus()}}function w(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var o={},a=0,s=this.quill.getLine(t.index),r=i(s,1)[0];if(e.offset>=r.length()-1){var l=this.quill.getLine(t.index+1),c=i(l,1)[0];if(c){var d=r.formats(),f=this.quill.getFormat(t.index,1);o=u.default.attributes.diff(d,f)||{},a=c.length()}}this.quill.deleteText(t.index,n,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index+a-1,n,o,p.default.sources.USER)}}function x(t){var e=this.quill.getLines(t),n={};if(e.length>1){var o=e[0].formats(),i=e[e.length-1].formats();n=u.default.attributes.diff(i,o)||{}}this.quill.deleteText(t,p.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,p.default.sources.USER),this.quill.setSelection(t.index,p.default.sources.SILENT),this.quill.focus()}function C(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var o=Object.keys(e.format).reduce(function(t,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",o,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach(function(t){null==o[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],p.default.sources.USER))})}function E(t){return{key:y.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=d.default.query("code-block"),o=e.index,a=e.length,s=this.quill.scroll.descendant(n,o),r=i(s,2),l=r[0],c=r[1];if(null!=l){var u=this.quill.getIndex(l),f=l.newlineIndex(c,!0)+1,h=l.newlineIndex(u+c+a),m=l.domNode.textContent.slice(f,h).split("\n");c=0,m.forEach(function(e,i){t?(l.insertAt(f+c,n.TAB),c+=n.TAB.length,0===i?o+=n.TAB.length:a+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(f+c,n.TAB.length),c-=n.TAB.length,0===i?o-=n.TAB.length:a-=n.TAB.length),c+=e.length+1}),this.quill.update(p.default.sources.USER),this.quill.setSelection(o,a,p.default.sources.SILENT)}}}}function S(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],p.default.sources.USER)}}}function T(t){if("string"==typeof t||"number"==typeof t)return T({key:t});if("object"===(void 0===t?"undefined":o(t))&&(t=(0,s.default)(t,!1)),"string"==typeof t.key)if(null!=y.keys[t.key.toUpperCase()])t.key=y.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[b]=t.shortKey,delete t.shortKey),t}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:S("bold"),italic:S("italic"),underline:S("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.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(t,e){if(e.collapsed&&0!==e.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(t,e){null!=e.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":E(!0),"outdent code-block":E(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,p.default.sources.USER)}},tab:{key:y.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new c.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,p.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,p.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),o=n[0],a=n[1],s=(0,l.default)({},o.formats(),{list:"checked"}),r=(new c.default).retain(t.index).insert("\n",s).retain(o.length()-a-1).retain(1,{list:"unchecked"});this.quill.updateContents(r,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),o=i(n,2),a=o[0],s=o[1],r=(new c.default).retain(t.index).insert("\n",e.format).retain(a.length()-s-1).retain(1,{header:null});this.quill.updateContents(r,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,o=this.quill.getLine(t.index),a=i(o,2),s=a[0],r=a[1];if(r>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",p.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(t.index-r).delete(n+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(t.index-n,p.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),o=n[0],a=n[1],s=(new c.default).retain(t.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)}},e.default=y,e.SHORTKEY=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=l(n(0)),r=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.selection=n,o.textNode=document.createTextNode(e.CONTENTS),o.domNode.appendChild(o.textNode),o._length=0,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Embed),a(e,null,[{key:"value",value:function(){}}]),a(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);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=e.CONTENTS.length,o.optimize(),o.formatAt(a,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),i=void 0,a=void 0,l=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var c=[t,n.start.offset,n.end.offset];i=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!==e.CONTENTS){var u=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof r.default?(i=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=e.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(s.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=a){var d=[a,l].map(function(t){return Math.max(0,Math.min(i.data.length,t-1))}),p=o(d,2);return a=p[0],l=p[1],{startNode:i,startOffset:a,endNode:i,endOffset:l}}}}},{key:"update",value:function(t,e){var n=this;if(t.some(function(t){return"characterData"===t.type&&t.target===n.textNode})){var o=this.restore();o&&(e.range=o)}}},{key:"value",value:function(){return""}}]),e}();c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=s(n(0)),i=n(4),a=s(i);function s(t){return t&&t.__esModule?t:{default:t}}var r=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default.Container),e}();r.allowedChildren=[a.default,i.BlockEmbed,r],e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(0),s=(o=a)&&o.__esModule?o:{default:o};var r=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Attributor.Style),i(e,[{key:"value",value:function(t){var n=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(t){return("00"+parseInt(t).toString(16)).slice(-2)}).join("")):n}}]),e}(),l=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),c=new r("color","color",{scope:s.default.Scope.INLINE});e.ColorAttributor=r,e.ColorClass=l,e.ColorStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=n(6),r=(o=s)&&o.__esModule?o:{default:o};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return c(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}();function c(t,e){var n=document.createElement("a");n.href=t;var o=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(o)>-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=l,e.sanitize=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=r(n(23)),s=r(n(107));function r(t){return t&&t.__esModule?t:{default:t}}var l=0;function c(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var u=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,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(){n.togglePicker()}),this.label.addEventListener("keydown",function(t){switch(t.keyCode){case a.default.keys.ENTER:n.togglePicker();break;case a.default.keys.ESCAPE:n.escape(),t.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return i(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",function(){e.selectItem(n,!0)}),n.addEventListener("keydown",function(t){switch(t.keyCode){case a.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case a.default.keys.ESCAPE:e.escape(),t.preventDefault()}}),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=s.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach(function(n){var o=t.buildItem(n);e.appendChild(o),!0===n.selected&&t.selectItem(o)}),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach(function(e){t.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout(function(){return t.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(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=v(n(0)),i=v(n(5)),a=n(4),s=v(a),r=v(n(16)),l=v(n(25)),c=v(n(24)),u=v(n(35)),d=v(n(6)),p=v(n(22)),f=v(n(7)),h=v(n(55)),m=v(n(42)),g=v(n(23));function v(t){return t&&t.__esModule?t:{default:t}}i.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":f.default,"modules/clipboard":h.default,"modules/history":m.default,"modules/keyboard":g.default}),o.default.register(s.default,r.default,c.default,d.default,p.default,f.default),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=function(){function t(t){this.domNode=t,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return o.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var a=this.isolate(t,e);if(null!=o.query(n,o.Scope.BLOT)&&i)a.wrap(n,i);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var s=o.create(this.statics.scope);a.wrap(s),s.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?o.create("text",e):o.create(e,n),a=this.split(t);this.parent.insertBefore(i,a)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?o.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?o.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),i=n(32),a=n(33),s=n(1),r=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=o.default.keys(this.domNode),n=i.default.keys(this.domNode),r=a.default.keys(this.domNode);e.concat(n).concat(r).forEach(function(e){var n=s.query(e,s.Scope.ATTRIBUTE);n instanceof o.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var o=e.attributes[n].value(e.domNode);t.format(n,o)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=r},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function a(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){a(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(a(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function a(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[a(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[a(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[a(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return o(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach(function(e){null==t.modules[e]&&t.addModule(e)})}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();i.DEFAULTS={modules:{}},i.themes={default:i},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var r="\ufeff",l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(t){n.contentNode.appendChild(t)}),n.leftGuard=document.createTextNode(r),n.rightGuard=document.createTextNode(r),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.Embed),o(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,o=t.data.split(r).join("");if(t===this.leftGuard)if(this.prev instanceof a.default){var s=this.prev.length();this.prev.insertAt(s,o),e={startNode:this.prev.domNode,startOffset:s+o.length}}else n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this),e={startNode:n,startOffset:o.length};else t===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,o),e={startNode:this.next.domNode,startOffset:o.length}):(n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this.next),e={startNode:n,startOffset:o.length}));return t.data=r,e}},{key:"update",value:function(t,e){var n=this;t.forEach(function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var o=n.restore(t.target);o&&(e.range=o)}})}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var o,i=n(0),a=(o=i)&&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);e.AlignAttribute=r,e.AlignClass=l,e.AlignStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var o,i=n(0),a=(o=i)&&o.__esModule?o:{default:o},s=n(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});e.BackgroundClass=r,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var o,i=n(0),a=(o=i)&&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);e.DirectionAttribute=r,e.DirectionClass=l,e.DirectionStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(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(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Attributor.Style),i(e,[{key:"value",value:function(t){return function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}())("font","font-family",r);e.FontStyle=c,e.FontClass=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var o,i=n(0),a=(o=i)&&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"]});e.SizeClass=s,e.SizeStyle=r},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=r(n(0)),a=r(n(5)),s=r(n(9));function r(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.lastRecorded=0,o.ignoreChange=!1,o.clear(),o.quill.on(a.default.events.EDITOR_CHANGE,function(t,e,n,i){t!==a.default.events.TEXT_CHANGE||o.ignoreChange||(o.options.userOnly&&i!==a.default.sources.USER?o.transform(e):o.record(e,n))}),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(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),o(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],a.default.sources.USER),this.ignoreChange=!1;var o=c(n[t]);this.quill.setSelection(o)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=o;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}();function c(t){var e=t.reduce(function(t,e){return t+=e.delete||0},0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some(function(t){return null!=i.default.query(t,i.default.Scope.BLOCK)}))}(t)&&(n-=1),n}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=l,e.getLastChangeIndex=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=f(n(3)),a=f(n(2)),s=f(n(8)),r=f(n(23)),l=f(n(34)),c=f(n(59)),u=f(n(60)),d=f(n(28)),p=f(n(61));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}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"],w=function(t){function e(t,n){h(this,e);var o=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==o.tooltip||o.tooltip.root.contains(n.target)||document.activeElement===o.tooltip.textbox||o.quill.hasFocus()||o.tooltip.hide(),null!=o.pickers&&o.pickers.forEach(function(t){t.container.contains(n.target)||t.close()})}),o}return g(e,l.default),o(e,[{key:"addModule",value:function(t){var n=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach(function(t){(t.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var o=t.value||"";null!=o&&e[n][o]&&(t.innerHTML=e[n][o])}})})}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map(function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&C(t,v),new u.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&C(t,b,"background"===n?"#ffffff":"#000000"),new c.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?C(t,y):t.classList.contains("ql-header")?C(t,_):t.classList.contains("ql-size")&&C(t,k)),new d.default(t)});this.quill.on(s.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(t){t.update()})})}}]),e}();w.DEFAULTS=(0,i.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var o=t.quill.getSelection(!0);t.quill.updateContents((new a.default).retain(o.index).delete(o.length).insert({image:n.target.result}),s.default.sources.USER),t.quill.setSelection(o.index+1,s.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}}),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var x=function(t){function e(t,n){h(this,e);var o=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.textbox=o.root.querySelector('input[type="text"]'),o.listen(),o}return g(e,p.default),o(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",function(e){r.default.match(e,"enter")?(t.save(),e.preventDefault()):r.default.match(e,"escape")&&(t.cancel(),e.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==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-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,s.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var o=n.index+n.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),t,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()}}]),e}();function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var o=document.createElement("option");e===n?o.setAttribute("selected","selected"):o.setAttribute("value",e),t.appendChild(o)})}e.BaseTooltip=x,e.default=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,o=this.iterator();n=o();){var i=n.length();if(t<i||e&&t===i&&(null==n.next||0!==n.next.length()))return[n,t];t-=i}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var o,i=this.find(t),a=i[0],s=t-i[1],r=this.iterator(a);(o=r())&&s<t+e;){var l=o.length();t>s?n(o,t-s,Math.min(e,s+l-t)):n(o,0,Math.min(l,t+e-s)),s+=l}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,o=this.iterator();n=o();)e=t(e,n);return e},t}();e.default=o},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(17),s=n(1),r={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,r),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,o,i){this.update(),t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.insertAt=function(e,n,o){this.update(),t.prototype.insertAt.call(this,e,n,o)},e.prototype.optimize=function(e,n){var o=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var r=function(t,e){void 0===e&&(e=!0),null!=t&&t!==o&&null!=t.domNode.parentNode&&(null==t.domNode[s.DATA_KEY].mutations&&(t.domNode[s.DATA_KEY].mutations=[]),e&&r(t.parent))},l=function(t){null!=t.domNode[s.DATA_KEY]&&null!=t.domNode[s.DATA_KEY].mutations&&(t instanceof a.default&&t.children.forEach(l),t.optimize(n))},c=e,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(t){var e=s.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(r(s.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=s.find(t,!1);r(e,!1),e instanceof a.default&&e.children.forEach(function(t){r(t,!1)})})):"attributes"===t.type&&r(e.prev)),r(e))}),this.children.forEach(l),i=(c=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,n){var o=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map(function(t){var e=s.find(t.target,!0);return null==e?null:null==e.domNode[s.DATA_KEY].mutations?(e.domNode[s.DATA_KEY].mutations=[t],e):(e.domNode[s.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==o&&null!=t.domNode[s.DATA_KEY]&&t.update(t.domNode[s.DATA_KEY].mutations||[],n)}),null!=this.domNode[s.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="DIV",e}(a.default);e.default=l},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(18),s=n(1);var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,o){var i=this;n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):(this.children.forEach(function(t){t instanceof a.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,o,i){null!=this.formats()[o]||s.query(o,s.Scope.ATTRIBUTE)?this.isolate(e,n).format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(o,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=s.Scope.INLINE_BLOT,e.tagName="SPAN",e}(a.default);e.default=r},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(18),s=n(1),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var o=s.query(e.blotName).tagName;if(n.tagName!==o)return t.formats.call(this,n)},e.prototype.format=function(n,o){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,o,i){null!=s.query(o,s.Scope.BLOCK)?this.format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.insertAt=function(e,n,o){if(null==o||null!=s.query(n,s.Scope.INLINE))t.prototype.insertAt.call(this,e,n,o);else{var i=this.split(e),a=s.create(n,o);i.parent.insertBefore(a,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="P",e}(a.default);e.default=r},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,o,i){0===e&&n===this.length()?this.format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=a},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(19),s=n(1),r=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,o){null==o?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,o)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=s.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some(function(t){return"characterData"===t.type&&t.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=s.Scope.INLINE_BLOT,e}(a.default);e.default=r},function(t,e,n){"use strict";var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var o=n.indexOf(t,e);return-1!==o&&o===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),o=n.length>>>0,i=arguments[1],a=0;a<o;a++)if(e=n[a],t.call(i,e,a,n))return e}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,e){var n=-1,o=1,i=0;function a(t,e,c){if(t==e)return t?[[i,t]]:[];(c<0||t.length<c)&&(c=null);var d=r(t,e),p=t.substring(0,d);d=l(t=t.substring(d),e=e.substring(d));var f=t.substring(t.length-d),h=function(t,e){var c;if(!t)return[[o,e]];if(!e)return[[n,t]];var u=t.length>e.length?t:e,d=t.length>e.length?e:t,p=u.indexOf(d);if(-1!=p)return c=[[o,u.substring(0,p)],[i,d],[o,u.substring(p+d.length)]],t.length>e.length&&(c[0][0]=c[2][0]=n),c;if(1==d.length)return[[n,t],[o,e]];var f=function(t,e){var n=t.length>e.length?t:e,o=t.length>e.length?e:t;if(n.length<4||2*o.length<n.length)return null;function i(t,e,n){for(var o,i,a,s,c=t.substring(n,n+Math.floor(t.length/4)),u=-1,d="";-1!=(u=e.indexOf(c,u+1));){var p=r(t.substring(n),e.substring(u)),f=l(t.substring(0,n),e.substring(0,u));d.length<f+p&&(d=e.substring(u-f,u)+e.substring(u,u+p),o=t.substring(0,n-f),i=t.substring(n+p),a=e.substring(0,u-f),s=e.substring(u+p))}return 2*d.length>=t.length?[o,i,a,s,d]:null}var a,s,c,u,d,p=i(n,o,Math.ceil(n.length/4)),f=i(n,o,Math.ceil(n.length/2));if(!p&&!f)return null;a=f?p&&p[4].length>f[4].length?p:f:p;t.length>e.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 h=a[4];return[s,c,u,d,h]}(t,e);if(f){var h=f[0],m=f[1],g=f[2],v=f[3],b=f[4],y=a(h,g),_=a(m,v);return y.concat([[i,b]],_)}return function(t,e){for(var i=t.length,a=e.length,r=Math.ceil((i+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 f=i-a,h=f%2!=0,m=0,g=0,v=0,b=0,y=0;y<r;y++){for(var _=-y+m;_<=y-g;_+=2){for(var k=l+_,w=(T=_==-y||_!=y&&u[k-1]<u[k+1]?u[k+1]:u[k-1]+1)-_;T<i&&w<a&&t.charAt(T)==e.charAt(w);)T++,w++;if(u[k]=T,T>i)g+=2;else if(w>a)m+=2;else if(h){var x=l+f-_;if(x>=0&&x<c&&-1!=d[x]){var C=i-d[x];if(T>=C)return s(t,e,T,w)}}}for(var E=-y+v;E<=y-b;E+=2){for(var x=l+E,S=(C=E==-y||E!=y&&d[x-1]<d[x+1]?d[x+1]:d[x-1]+1)-E;C<i&&S<a&&t.charAt(i-C-1)==e.charAt(a-S-1);)C++,S++;if(d[x]=C,C>i)b+=2;else if(S>a)v+=2;else if(!h){var k=l+f-E;if(k>=0&&k<c&&-1!=u[k]){var T=u[k],w=l+T-k;if(T>=(C=i-C))return s(t,e,T,w)}}}}return[[n,t],[o,e]]}(t,e)}(t=t.substring(0,t.length-d),e=e.substring(0,e.length-d));return p&&h.unshift([i,p]),f&&h.push([i,f]),function t(e){e.push([i,""]);var a=0;var s=0;var c=0;var u="";var d="";var p;for(;a<e.length;)switch(e[a][0]){case o:c++,d+=e[a][1],a++;break;case n:s++,u+=e[a][1],a++;break;case i:s+c>1?(0!==s&&0!==c&&(0!==(p=r(d,u))&&(a-s-c>0&&e[a-s-c-1][0]==i?e[a-s-c-1][1]+=d.substring(0,p):(e.splice(0,0,[i,d.substring(0,p)]),a++),d=d.substring(p),u=u.substring(p)),0!==(p=l(d,u))&&(e[a][1]=d.substring(d.length-p)+e[a][1],d=d.substring(0,d.length-p),u=u.substring(0,u.length-p))),0===s?e.splice(a-c,s+c,[o,d]):0===c?e.splice(a-s,s+c,[n,u]):e.splice(a-s-c,s+c,[n,u],[o,d]),a=a-s-c+(s?1:0)+(c?1:0)+1):0!==a&&e[a-1][0]==i?(e[a-1][1]+=e[a][1],e.splice(a,1)):a++,c=0,s=0,u="",d=""}""===e[e.length-1][1]&&e.pop();var f=!1;a=1;for(;a<e.length-1;)e[a-1][0]==i&&e[a+1][0]==i&&(e[a][1].substring(e[a][1].length-e[a-1][1].length)==e[a-1][1]?(e[a][1]=e[a-1][1]+e[a][1].substring(0,e[a][1].length-e[a-1][1].length),e[a+1][1]=e[a-1][1]+e[a+1][1],e.splice(a-1,1),f=!0):e[a][1].substring(0,e[a+1][1].length)==e[a+1][1]&&(e[a-1][1]+=e[a+1][1],e[a][1]=e[a][1].substring(e[a+1][1].length)+e[a+1][1],e.splice(a+1,1),f=!0)),a++;f&&t(e)}(h),null!=c&&(h=function(t,e){var o=function(t,e){if(0===e)return[i,t];for(var o=0,a=0;a<t.length;a++){var s=t[a];if(s[0]===n||s[0]===i){var r=o+s[1].length;if(e===r)return[a+1,t];if(e<r){t=t.slice();var l=e-o,c=[s[0],s[1].slice(0,l)],u=[s[0],s[1].slice(l)];return t.splice(a,1,c,u),[a+1,t]}o=r}}throw new Error("cursor_pos is out of bounds!")}(t,e),a=o[1],s=o[0],r=a[s],l=a[s+1];if(null==r)return t;if(r[0]!==i)return t;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 t}(h,c)),h=function(t){for(var e=!1,a=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},s=2;s<t.length;s+=1)t[s-2][0]===i&&((r=t[s-2][1]).charCodeAt(r.length-1)>=55296&&r.charCodeAt(r.length-1)<=56319)&&t[s-1][0]===n&&a(t[s-1][1])&&t[s][0]===o&&a(t[s][1])&&(e=!0,t[s-1][1]=t[s-2][1].slice(-1)+t[s-1][1],t[s][1]=t[s-2][1].slice(-1)+t[s][1],t[s-2][1]=t[s-2][1].slice(0,-1));var r;if(!e)return t;for(var l=[],s=0;s<t.length;s+=1)t[s][1].length>0&&l.push(t[s]);return l}(h)}function s(t,e,n,o){var i=t.substring(0,n),s=e.substring(0,o),r=t.substring(n),l=e.substring(o),c=a(i,s),u=a(r,l);return c.concat(u)}function r(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,o=Math.min(t.length,e.length),i=o,a=0;n<i;)t.substring(a,i)==e.substring(a,i)?a=n=i:o=i,i=Math.floor((o-n)/2+n);return i}function l(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,o=Math.min(t.length,e.length),i=o,a=0;n<i;)t.substring(t.length-i,t.length-a)==e.substring(e.length-i,e.length-a)?a=n=i:o=i,i=Math.floor((o-n)/2+n);return i}var c=a;function u(t,e,n){for(var o=e+n-1;o>=0&&o>=e-1;o--)if(o+1<t.length){var i=t[o],a=t[o+1];i[0]===a[1]&&t.splice(o,2,[i[0],i[1]+a[1]])}return t}c.INSERT=o,c.DELETE=n,c.EQUAL=i,t.exports=c},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function o(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function i(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?o:i).supported=o,e.unsupported=i},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,o="~";function i(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),s.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t,e){var n=o?o+t:t,i=this._events[n];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var a=0,s=i.length,r=new Array(s);a<s;a++)r[a]=i[a].fn;return r},s.prototype.emit=function(t,e,n,i,a,s){var r=o?o+t:t;if(!this._events[r])return!1;var l,c,u=this._events[r],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,i),!0;case 5:return u.fn.call(u.context,e,n,i,a),!0;case 6:return u.fn.call(u.context,e,n,i,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,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(t,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,e);break;case 3:u[c].fn.call(u[c].context,e,n);break;case 4:u[c].fn.call(u[c].context,e,n,i);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(t,e,n){var i=new a(e,n||this),s=o?o+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],i]:this._events[s].push(i):(this._events[s]=i,this._eventsCount++),this},s.prototype.once=function(t,e,n){var i=new a(e,n||this,!0),s=o?o+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],i]:this._events[s].push(i):(this._events[s]=i,this._eventsCount++),this},s.prototype.removeListener=function(t,e,n,a){var s=o?o+t:t;if(!this._events[s])return this;if(!e)return 0==--this._eventsCount?this._events=new i:delete this._events[s],this;var r=this._events[s];if(r.fn)r.fn!==e||a&&!r.once||n&&r.context!==n||(0==--this._eventsCount?this._events=new i:delete this._events[s]);else{for(var l=0,c=[],u=r.length;l<u;l++)(r[l].fn!==e||a&&!r[l].once||n&&r[l].context!==n)&&c.push(r[l]);c.length?this._events[s]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new i:delete this._events[s]}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new i:delete this._events[e])):(this._events=new i,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!==t&&(t.exports=s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=y(n(3)),r=y(n(2)),l=y(n(0)),c=y(n(5)),u=y(n(10)),d=y(n(9)),p=n(36),f=n(37),h=y(n(13)),m=n(26),g=n(38),v=n(39),b=n(40);function y(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var k=(0,u.default)("quill:clipboard"),w="__ql-matcher",x=[[Node.TEXT_NODE,j],[Node.TEXT_NODE,L],["br",function(t,e){P(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,function(t,e){var n={},o=t.style||{};o.fontStyle&&"italic"===O(t).fontStyle&&(n.italic=!0);o.fontWeight&&(O(t).fontWeight.startsWith("bold")||parseInt(O(t).fontWeight)>=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=T(e,n));parseFloat(o.textIndent||0)>0&&(e=(new r.default).insert("\t").concat(e));return e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!P(e,"\n"))return e;var o=-1,i=t.parentNode;for(;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(o+=1),i=i.parentNode;return o<=0?e:e.compose((new r.default).retain(e.length()-1).retain(1,{indent:o}))}],["b",A.bind(A,"bold")],["i",A.bind(A,"italic")],["style",function(){return new r.default}]],C=[p.AlignAttribute,g.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),E=[p.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,b.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),S=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));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=[],x.concat(o.options.matchers).forEach(function(t){var e=i(t,2),a=e[0],s=e[1];(n.matchVisual||s!==I)&&o.addMatcher(a,s)}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,d.default),a(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new r.default).insert(n,_({},h.default.blotName,e[h.default.blotName]))}var o=this.prepareMatching(),a=i(o,2),s=a[0],l=a[1],c=function t(e,n,o){return e.nodeType===e.TEXT_NODE?o.reduce(function(t,n){return n(e,t)},new r.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(i,a){var s=t(a,n,o);return a.nodeType===e.ELEMENT_NODE&&(s=n.reduce(function(t,e){return e(a,t)},s),s=(a[w]||[]).reduce(function(t,e){return e(a,t)},s)),i.concat(s)},new r.default):new r.default}(this.container,s,l);return P(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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,c.default.sources.SILENT);else{var o=this.convert(e);this.quill.updateContents((new r.default).retain(t).concat(o),n),this.quill.setSelection(t+o.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new r.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout(function(){o=o.concat(e.convert()).delete(n.length),e.quill.updateContents(o,c.default.sources.USER),e.quill.setSelection(o.length()-n.length,c.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(o){var a=i(o,2),s=a[0],r=a[1];switch(s){case Node.TEXT_NODE:n.push(r);break;case Node.ELEMENT_NODE:e.push(r);break;default:[].forEach.call(t.container.querySelectorAll(s),function(t){t[w]=t[w]||[],t[w].push(r)})}}),[e,n]}}]),e}();function T(t,e,n){return"object"===(void 0===e?"undefined":o(e))?Object.keys(e).reduce(function(t,n){return T(t,n,e[n])},t):t.reduce(function(t,o){return o.attributes&&o.attributes[e]?t.push(o):t.insert(o.insert,(0,s.default)({},_({},e,n),o.attributes))},new r.default)}function O(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function P(t,e){for(var n="",o=t.ops.length-1;o>=0&&n.length<e.length;--o){var i=t.ops[o];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*e.length)===e}function $(t){if(0===t.childNodes.length)return!1;var e=O(t);return["block","list-item"].indexOf(e.display)>-1}function A(t,e,n){return T(n,t,!0)}function D(t,e){var n=l.default.Attributor.Attribute.keys(t),o=l.default.Attributor.Class.keys(t),i=l.default.Attributor.Style.keys(t),a={};return n.concat(o).concat(i).forEach(function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(a[n.attrName]=n.value(t),a[n.attrName])||(null==(n=C[e])||n.attrName!==e&&n.keyName!==e||(a[n.attrName]=n.value(t)||void 0),null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(n=E[e],a[n.attrName]=n.value(t)||void 0))}),Object.keys(a).length>0&&(e=T(e,a)),e}function N(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var o={},i=n.value(t);null!=i&&(o[n.blotName]=i,e=(new r.default).insert(o,n.formats(t)))}else"function"==typeof n.formats&&(e=T(e,n.blotName,n.formats(t)));return e}function L(t,e){return P(e,"\n")||($(t)||e.length()>0&&t.nextSibling&&$(t.nextSibling))&&e.insert("\n"),e}function I(t,e){if($(t)&&null!=t.nextElementSibling&&!P(e,"\n\n")){var n=t.offsetHeight+parseFloat(O(t).marginTop)+parseFloat(O(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function j(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!O(t.parentNode).whiteSpace.startsWith("pre")){var o=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==t.previousSibling&&$(t.parentNode)||null!=t.previousSibling&&$(t.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==t.nextSibling&&$(t.parentNode)||null!=t.nextSibling&&$(t.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return e.insert(n)}S.DEFAULTS={matchers:[],matchVisual:!0},e.default=S,e.matchAttributor=D,e.matchBlot=N,e.matchNewline=L,e.matchSpacing=I,e.matchText=j},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=n(6),r=(o=s)&&o.__esModule?o:{default:o};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,[{key:"optimize",value:function(t){a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}();l.blotName="bold",l.tagName=["STRONG","B"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=u(n(2)),s=u(n(0)),r=u(n(5)),l=u(n(10)),c=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var p=(0,l.default)("quill:toolbar"),f=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i,a=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(a.options.container)){var s=document.createElement("div");m(s,a.options.container),t.container.parentNode.insertBefore(s,t.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(t){a.addHandler(t,a.options.handlers[t])}),[].forEach.call(a.container.querySelectorAll("button, select"),function(t){a.attach(t)}),a.quill.on(r.default.events.EDITOR_CHANGE,function(t,e){t===r.default.events.SELECTION_CHANGE&&a.update(e)}),a.quill.on(r.default.events.SCROLL_OPTIMIZE,function(){var t=a.quill.selection.getRange(),e=o(t,1)[0];a.update(e)}),a):(i=p.error("Container required for toolbar",a.options),d(a,i))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,c.default),i(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,function(t){return 0===t.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void p.warn("ignoring attaching to disabled format",n,t);if(null==s.default.query(n))return void p.warn("ignoring attaching to nonexistent format",n,t)}var i="SELECT"===t.tagName?"change":"click";t.addEventListener(i,function(i){var l=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var c=t.options[t.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),i.preventDefault();e.quill.focus();var u=e.quill.selection.getRange(),d=o(u,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,l);else if(s.default.query(n).prototype instanceof s.default.Embed){if(!(l=prompt("Enter "+n)))return;e.quill.updateContents((new a.default).retain(d.index).delete(d.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,l)),r.default.sources.USER)}else e.quill.format(n,l,r.default.sources.USER);e.update(d)}),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach(function(n){var i=o(n,2),a=i[0],s=i[1];if("SELECT"===s.tagName){var r=void 0;if(null==t)r=null;else if(null==e[a])r=s.querySelector("option[selected]");else if(!Array.isArray(e[a])){var l=e[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==t)s.classList.remove("ql-active");else if(s.hasAttribute("value")){var c=e[a]===s.getAttribute("value")||null!=e[a]&&e[a].toString()===s.getAttribute("value")||null==e[a]&&!s.getAttribute("value");s.classList.toggle("ql-active",c)}else s.classList.toggle("ql-active",null!=e[a])})}}]),e}();function h(t,e,n){var o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("ql-"+e),null!=n&&(o.value=n),t.appendChild(o)}function m(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)h(n,t);else{var e=Object.keys(t)[0],o=t[e];Array.isArray(o)?function(t,e,n){var o=document.createElement("select");o.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),o.appendChild(e)}),t.appendChild(o)}(n,e,o):h(n,e,o)}}),t.appendChild(n)})}f.DEFAULTS={},f.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(e){null!=s.default.query(e,s.default.Scope.INLINE)&&t.quill.format(e,!1)})}else this.quill.removeFormat(e,r.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",r.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,r.default.sources.USER),this.quill.format("direction",t,r.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),o=parseInt(n.indent||0);if("+1"===t||"-1"===t){var i="+1"===t?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",o+i,r.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,r.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,r.default.sources.USER):this.quill.format("list","unchecked",r.default.sources.USER):this.quill.format("list",t,r.default.sources.USER)}}},e.default=f,e.addControls=m},function(t,e){t.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(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=n(28),r=(o=s)&&o.__esModule?o:{default:o};var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.label.innerHTML=n,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(t){t.classList.add("ql-primary")}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,[{key:"buildItem",value:function(t){var n=a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var o=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";o&&("line"===o.tagName?o.style.stroke=i:o.style.fill=i)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(28),s=(o=a)&&o.__esModule?o:{default:o};var r=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),function(t){t.innerHTML=n[t.getAttribute("data-value")||""]}),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),i(e,[{key:"selectItem",value:function(t,n){(function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var i=function(){function t(e,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.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(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var o=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),a=0;if(i.right>o.right&&(a=o.right-i.right,this.root.style.left=e+a+"px"),i.left<o.left&&(a=o.left-i.left,this.root.style.left=e+a+"px"),i.bottom>o.bottom){var s=i.bottom-i.top,r=t.bottom-t.top+s;this.root.style.top=n-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")}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=f(n(3)),r=f(n(8)),l=n(43),c=f(l),u=f(n(27)),d=n(15),p=f(n(41));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],b=function(t){function e(t,n){h(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var o=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.container.classList.add("ql-snow"),o}return g(e,c.default),a(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),p.default),this.tooltip=new y(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(e,n){t.handlers.link.call(t,!n.format.link)})}}]),e}();b.DEFAULTS=(0,s.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(t){function e(t,n){h(this,e);var o=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.preview=o.root.querySelector("a.ql-preview"),o}return g(e,l.BaseTooltip),a(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,r.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()}),this.quill.on(r.default.events.SELECTION_CHANGE,function(e,n,i){if(null!=e){if(0===e.length&&i===r.default.sources.USER){var a=t.quill.scroll.descendant(u.default,e.index),s=o(a,2),l=s[0],c=s[1];if(null!=l){t.linkRange=new d.Range(e.index-c,l.length());var p=u.default.formats(l.domNode);return t.preview.textContent=p,t.preview.setAttribute("href",p),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}})}},{key:"show",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}();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(""),e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=I(n(29)),i=n(36),a=n(38),s=n(64),r=I(n(65)),l=I(n(66)),c=n(67),u=I(c),d=n(37),p=n(26),f=n(39),h=n(40),m=I(n(56)),g=I(n(68)),v=I(n(27)),b=I(n(69)),y=I(n(70)),_=I(n(71)),k=I(n(72)),w=I(n(73)),x=n(13),C=I(x),E=I(n(74)),S=I(n(75)),T=I(n(57)),O=I(n(41)),P=I(n(28)),$=I(n(59)),A=I(n(60)),D=I(n(61)),N=I(n(108)),L=I(n(62));function I(t){return t&&t.__esModule?t:{default:t}}o.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":h.SizeStyle},!0),o.default.register({"formats/align":i.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":f.FontClass,"formats/size":h.SizeClass,"formats/blockquote":r.default,"formats/code-block":C.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":m.default,"formats/code":x.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":w.default,"formats/list/item":c.ListItem,"modules/formula":E.default,"modules/syntax":S.default,"modules/toolbar":T.default,"themes/bubble":N.default,"themes/snow":L.default,"ui/icons":O.default,"ui/picker":P.default,"ui/icon-picker":A.default,"ui/color-picker":$.default,"ui/tooltip":D.default},!0),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=n(0),r=(o=s)&&o.__esModule?o:{default:o};var l=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default.Attributor.Class),i(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var o=this.value(t)||0;n="+1"===n?o+1:o-1}return 0===n?(this.remove(t),!0):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}())("indent","ql-indent",{scope:r.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(4),a=(o=i)&&o.__esModule?o:{default:o};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),e}();s.blotName="blockquote",s.tagName="blockquote",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(4),s=(o=a)&&o.__esModule?o:{default:o};var r=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),i(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}();r.blotName="header",r.tagName=["H1","H2","H3","H4","H5","H6"],e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},a=l(n(0)),s=l(n(4)),r=l(n(25));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var p=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,s.default),o(e,[{key:"format",value:function(t,n){t!==f.blotName||n?i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(a.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:i(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}();p.blotName="list-item",p.tagName="LI";var f=function(t){function e(t){c(this,e);var n=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),o=function(e){if(e.target.parentNode===t){var o=n.statics.formats(t),i=a.default.find(e.target);"checked"===o?i.format("list","unchecked"):"unchecked"===o&&i.format("list","checked")}};return t.addEventListener("touchstart",o),t.addEventListener("mousedown",o),n}return d(e,r.default),o(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",o=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||o.setAttribute("data-checked","checked"===t),o}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),o(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof p)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var o=null==n?this.length():n.offset(this),a=this.split(o);a.parent.insertBefore(t,a)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=a.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}();f.blotName="list",f.scope=a.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[p],e.ListItem=p,e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(56),a=(o=i)&&o.__esModule?o:{default:o};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),e}();s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(6),s=(o=a)&&o.__esModule?o:{default:o};var r=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),i(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}();r.blotName="script",r.tagName=["SUB","SUP"],e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(6),a=(o=i)&&o.__esModule?o:{default:o};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),e}();s.blotName="strike",s.tagName="S",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(6),a=(o=i)&&o.__esModule?o:{default:o};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),e}();s.blotName="underline",s.tagName="U",e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=n(0),r=(o=s)&&o.__esModule?o:{default:o},l=n(27);var c=["alt","height","width"],u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default.Embed),i(e,[{key:"format",value:function(t,n){c.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return c.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();u.blotName="image",u.tagName="IMG",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},s=n(4),r=n(27),l=(o=r)&&o.__esModule?o:{default:o};var c=["height","width"],u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.BlockEmbed),i(e,[{key:"format",value:function(t,n){c.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return c.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();u.blotName="video",u.className="ql-video",u.tagName="IFRAME",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=r(n(35)),a=r(n(5)),s=r(n(9));function r(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var d=function(t){function e(){return l(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,i.default),o(e,null,[{key:"create",value:function(t){var n=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}();d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var p=function(t){function e(){l(this,e);var t=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return u(e,s.default),o(e,null,[{key:"register",value:function(){a.default.register(d,!0)}}]),e}();e.FormulaBlot=d,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=l(n(0)),a=l(n(5)),s=l(n(9)),r=l(n(13));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var p=function(t){function e(){return c(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,r.default),o(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}();p.className="ql-syntax";var f=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(t){function e(t,n){c(this,e);var o=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof o.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return o.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){o.highlight(),i=null},o.options.interval)}),o.highlight(),o}return d(e,s.default),o(e,null,[{key:"register",value:function(){a.default.register(f,!0),a.default.register(p,!0)}}]),o(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}();h.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=p,e.CodeToken=f,e.default=h},function(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e){t.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(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var o=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(o):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=d(n(3)),s=d(n(8)),r=n(43),l=d(r),c=n(15),u=d(n(41));function d(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(t){function e(t,n){p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var o=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.container.classList.add("ql-bubble"),o}return h(e,l.default),i(e,[{key:"extendToolbar",value:function(t){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),u.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),u.default)}}]),e}();g.DEFAULTS=(0,a.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(t){function e(t,n){p(this,e);var o=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.on(s.default.events.EDITOR_CHANGE,function(t,e,n,i){if(t===s.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&i===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(e.index,e.length);if(1===a.length)o.position(o.quill.getBounds(e));else{var r=a[a.length-1],l=o.quill.getIndex(r),u=Math.min(r.length()-1,e.index+e.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 h(e,r.BaseTooltip),i(e,[{key:"listen",value:function(){var t=this;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}();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(""),e.BubbleTooltip=v,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=n()}).call(e,n(674).Buffer)},752:function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],o=e[1];return 3*(n+o)/4-o},e.toByteArray=function(t){for(var e,n=c(t),o=n[0],s=n[1],r=new a(function(t,e,n){return 3*(e+n)/4-n}(0,o,s)),l=0,u=s>0?o-4:o,d=0;d<u;d+=4)e=i[t.charCodeAt(d)]<<18|i[t.charCodeAt(d+1)]<<12|i[t.charCodeAt(d+2)]<<6|i[t.charCodeAt(d+3)],r[l++]=e>>16&255,r[l++]=e>>8&255,r[l++]=255&e;2===s&&(e=i[t.charCodeAt(d)]<<2|i[t.charCodeAt(d+1)]>>4,r[l++]=255&e);1===s&&(e=i[t.charCodeAt(d)]<<10|i[t.charCodeAt(d+1)]<<4|i[t.charCodeAt(d+2)]>>2,r[l++]=e>>8&255,r[l++]=255&e);return r},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],s=0,r=n-i;s<r;s+=16383)a.push(u(t,s,s+16383>r?r:s+16383));1===i?(e=t[n-1],a.push(o[e>>2]+o[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(o[e>>10]+o[e>>4&63]+o[e<<2&63]+"="));return a.join("")};for(var o=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,l=s.length;r<l;++r)o[r]=s[r],i[s.charCodeAt(r)]=r;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,n){for(var i,a,s=[],r=e;r<n;r+=3)i=(t[r]<<16&16711680)+(t[r+1]<<8&65280)+(255&t[r+2]),s.push(o[(a=i)>>18&63]+o[a>>12&63]+o[a>>6&63]+o[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},753:function(t,e){e.read=function(t,e,n,o,i){var a,s,r=8*i-o-1,l=(1<<r)-1,c=l>>1,u=-7,d=n?i-1:0,p=n?-1:1,f=t[e+d];for(d+=p,a=f&(1<<-u)-1,f>>=-u,u+=r;u>0;a=256*a+t[e+d],d+=p,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=o;u>0;s=256*s+t[e+d],d+=p,u-=8);if(0===a)a=1-c;else{if(a===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,o),a-=c}return(f?-1:1)*s*Math.pow(2,a-o)},e.write=function(t,e,n,o,i,a){var s,r,l,c=8*a-i-1,u=(1<<c)-1,d=u>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=o?0:a-1,h=o?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(r=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=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=(e*l-1)*Math.pow(2,i),s+=d):(r=e*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;t[n+f]=255&r,f+=h,r/=256,i-=8);for(s=s<<i|r,c+=i;c>0;t[n+f]=255&s,f+=h,s/=256,c-=8);t[n+f-h]|=128*m}},754:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{"margin-bottom":"30px"}},[t.hasTranslation?n("div",[n("el-row",{staticStyle:{"margin-bottom":"5px"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:24}},[t._v("\n "+t._s(t.label+":")+"\n ")])],1),t._v(" "),n("el-row",{attrs:{type:"flex",align:"middle"}},[n("el-col",{attrs:{span:12}},[n("el-button-group",{staticStyle:{"margin-bottom":"5px"}},[n("el-button",{attrs:{size:"mini",type:t.isTextMode?"default":"primary"},on:{click:t.textModeChanged}},[t._v(t._s(t.$root.labels.text_mode))]),t._v(" "),n("el-button",{attrs:{size:"mini",type:t.isTextMode?"primary":"default"},on:{click:t.textModeChanged}},[t._v(t._s(t.$root.labels.html_mode))])],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"am-service-translate am-event-translate",staticStyle:{cursor:"pointer","line-height":"inherit"},on:{click:t.showDialogTranslate}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:t.$root.getUrl+"public/img/translate.svg"}}),t._v("\n "+t._s(t.$root.labels.translate)+"\n ")])])],1)],1):n("div",{staticStyle:{"margin-bottom":"5px"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:12}},[t._v("\n "+t._s(t.label+":")+"\n ")]),t._v(" "),t.hasQuill?n("el-col",{staticClass:"align-right",attrs:{span:12}},[n("el-button-group",[n("el-button",{attrs:{size:"mini",type:t.isTextMode?"default":"primary"},on:{click:t.textModeChanged}},[t._v(t._s(t.$root.labels.text_mode))]),t._v(" "),n("el-button",{attrs:{size:"mini",type:t.isTextMode?"primary":"default"},on:{click:t.textModeChanged}},[t._v(t._s(t.$root.labels.html_mode))])],1)],1):t._e()],1)],1),t._v(" "),n("el-row",[n("el-col",[n("el-alert",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.content_mode_tooltip,closable:!1}})],1)],1),t._v(" "),t.isTextMode?n("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:t.changedContentText},model:{value:t.textValue,callback:function(e){t.textValue=e},expression:"textValue"}}):n("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"],t.allowImage?["link","image"]:["link"]]}}},on:{change:t.changedContentQuill,ready:t.readyQuill},model:{value:t.entity[t.htmlProperty],callback:function(e){t.$set(t.entity,t.htmlProperty,e)},expression:"entity[htmlProperty]"}})],1)},staticRenderFns:[]}},791:function(t,e,n){var o=n(90)(n(794),n(795),!1,null,null,null);t.exports=o.exports},792:function(t,e,n){"use strict";var o=n(668),i=n(0),a=n.n(i),s=n(678),r=n(336);e.a={mixins:[s.a,o.a,r.a],data:function(){return{event:null,bookingCreatedCount:0,attributes:[{highlight:{backgroundColor:"#ddd"},dates:[]}],selectedRecurringDate:null,recurringDates:null,updateStatusDisabled:!1,recurringPeriods:[{label:this.$root.labels.recurring_type_weekly,value:"weekly"},{label:this.$root.labels.recurring_type_monthly,value:"monthly"},{label:this.$root.labels.recurring_type_yearly,value:"yearly"}],colors:["#1788FB","#4BBEC6","#FBC22D","#FA3C52","#D696B8","#689BCA","#26CC2B","#FD7E35","#E38587","#774DFB"],options:{fetched:!1,entities:{settings:{payments:{wc:null},general:{usedLanguages:[]}},employees:[],locations:[],tags:[]}},searchCounter:0,loadingEvents:!1,searchEventsTimer:null,searchedEvents:[],searchEventsQuery:""}},methods:{showDialogEditEvent:function(t){this.dialogEvent=!0,this.event=null,this.getEvent(t)},closeDialogEvent:function(){this.dialogEvent=!1},getInitEventObject:function(){return{id:0,parentId:null,name:"",periods:[{id:null,eventId:null,range:null,startTime:null,endTime:null,bookings:[]}],bookingStartsNow:!0,bookingStartsDate:null,bookingStartsTime:null,bookingEndsAfter:!0,bookingEndsDate:null,bookingEndsTime:null,bookingOpensRec:"same",bookingClosesRec:"same",ticketRangeRec:"calculate",isRecurring:!1,recurring:{cycle:null,order:null,until:null,cycleInterval:null},bringingAnyone:!0,bookMultipleTimes:!0,maxCapacity:null,maxCustomCapacity:null,maxExtraPeople:null,price:0,locationId:null,customLocation:null,providers:this.getInitEventProviders(),tags:[],description:null,gallery:[],colorType:2,selectedColor:"#1788FB",customColor:"#1788FB",show:!0,places:0,addToCalendarData:null,showAddToCalendar:!1,showEventDetails:!1,showEventBooking:!1,translations:null,canceling:!1,deleting:!1,bookable:!0,deposit:0,depositPayment:"disabled",depositPerPerson:1,customTickets:[],settings:this.getInitEntitySettings("event"),closeAfterMin:null,closeAfterMinBookings:!1,aggregatedPrice:!0}},showDialogNewEvent:function(){this.event=this.getInitEventObject(),this.dialogEvent=!0},getEvent:function(t){var e=this,n=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,n=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType,timeZone:o}})),void 0===this.$store&&"provider"===this.$root.settings.role&&1===this.options.entities.employees.length&&this.options.entities.employees[0].timeZone&&(n=Object.assign({params:{timeZone:this.options.entities.employees[0].timeZone}})),this.$http.get(this.$root.getAjaxUrl+"/events/"+t,n).then(function(t){var n=Object.assign(e.getInitEventObject(),t.data.data.event),i=[],s=e;t.data.data.event.periods.forEach(function(t){"UTC"===o&&(t.periodStart=s.getConvertedUtcToLocalDateTime(t.periodStart),t.periodEnd=s.getConvertedUtcToLocalDateTime(t.periodEnd));var e=a()(t.periodStart,"YYYY-MM-DD HH:mm:ss"),n=a()(t.periodEnd,"YYYY-MM-DD HH:mm:ss"),r=t.periodStart.split(" ")[1].substring(0,5),l=t.periodEnd.split(" ")[1].substring(0,5);"00:00"===l&&(n.subtract(1,"days"),l="24:00"),i.push({id:t.id?t.id:null,eventId:t.eventId?t.eventId:null,range:{start:e.toDate(),end:n.toDate()},startTime:r,endTime:l,bookings:t.bookings,zoomMeeting:t.zoomMeeting,lessonSpace:t.lessonSpace,googleCalendarEventId:t.googleCalendarEventId,googleMeetUrl:t.googleMeetUrl,outlookCalendarEventId:t.outlookCalendarEventId,microsoftTeamsUrl:t.microsoftTeamsUrl,appleCalendarEventId:t.appleCalendarEventId})}),n.periods=i;var r=[];n.tags.forEach(function(t){r.push(t.name)}),n.tags=r,null===n.recurring?n.recurring={cycle:null,until:null,order:null}:(n.isRecurring=!0,n.recurring.cycleInterval=null===t.data.data.event.recurring.cycleInterval?1:t.data.data.event.recurring.cycleInterval,n.recurring.until=t.data.data.event.recurring.until?a()(t.data.data.event.recurring.until).toDate():null),n.bookingStartsNow=null===t.data.data.event.bookingOpens,n.bookingStartsDate=t.data.data.event.bookingOpens?a()(t.data.data.event.bookingOpens).toDate():null,n.bookingStartsTime=t.data.data.event.bookingOpens?t.data.data.event.bookingOpens.split(" ")[1].substring(0,5):null,n.bookingEndsAfter=null===t.data.data.event.bookingCloses,n.bookingEndsDate=t.data.data.event.bookingCloses?a()(t.data.data.event.bookingCloses).toDate():null,n.bookingEndsTime=t.data.data.event.bookingCloses?t.data.data.event.bookingCloses.split(" ")[1].substring(0,5):null,n.zoomUserId=t.data.data.event.zoomUserId,n.organizerId=t.data.data.event.organizerId,n.closeAfterMin=t.data.data.event.closeAfterMin,n.closeAfterMinBookings=t.data.data.event.closeAfterMinBookings,n.aggregatedPrice=t.data.data.event.aggregatedPrice;var l=n.bookings;l.forEach(function(t){if(t.info){var e=JSON.parse(t.info);t.customer.firstName=e.firstName,t.customer.lastName=e.lastName,t.customer.phone=e.phone}else{var n=s.getCustomerById(t.customerId);t.customer.firstName=n?n.firstName:s.$root.labels.customer+" "+t.customerId,t.customer.lastName=n?n.lastName:"",t.customer.phone=n?n.phone:""}t.show=!0,t.removing=!1,t.checked=!1,"[]"!==t.customFields&&null!==t.customFields||(t.customFields="{}"),t.payments=t.payments.sort(function(t,e){return new Date(t.dateTime)-new Date(e.dateTime)}),t.customFields=JSON.parse(t.customFields)});var c=!1;e.colors.forEach(function(t){t===n.color&&(n.colorType=1,n.selectedColor=t,n.customColor=t,c=!0)}),c||(n.colorType=2,n.selectedColor=null,n.customColor=n.color),n.gallery=n.gallery.sort(function(t,e){return t.position>e.position?1:-1}),e.eventBookings=l,e.setEntitySettings(n,"event"),null===n.deposit&&(n.deposit=0),e.event=n,e.bookingCreatedCount++}).catch(function(t){console.log(t.message)})},getInitEventProviders:function(){return"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents?this.options.entities.employees:[]},handleDateTimeFormat:function(t){return[this.getFrontedFormattedDate(t.split(" ")[0]),this.getFrontedFormattedTime(t.split(" ")[1])]},showDialogAttendees:function(t){this.eventBookings=null,this.dialogAttendees=!0,this.getEvent(t)},searchEvents:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t||o.length<this.$root.settings.general.eventsFilterLimit)return this.loadingEvents=!0,this.searchedEvents=o,void setTimeout(function(){e.loadingEvents=!1},500);this.searchEventsQuery=t,clearTimeout(this.searchEventsTimer),this.loadingEvents=!0,this.searchCounter++,this.searchEventsTimer=setTimeout(function(){var o=e.searchCounter;e.$http.get(e.$root.getAjaxUrl+"/events",{params:{search:t,page:1,limit:e.$root.settings.general.eventsFilterLimit,skipCount:1,dates:[a()().format("YYYY-MM-DD")]}}).then(function(t){o>=e.searchCounter&&(e.searchedEvents=n?e.groupRecurringEvents(t.data.data.events):t.data.data.events),e.loadingEvents=!1}).catch(function(t){e.loadingEvents=!1})},500)},getNotRetrievedEvents:function(t,e,n){var o=t.map(function(t){return t.id}),i=[];return e.forEach(function(t){i=i.concat(t[n].filter(function(t){return-1===o.indexOf(t.id)}))}),i},groupRecurringEvents:function(t){var e=this,n=[];if(t)for(var o=function(o){var i=t[o];if("approved"!==i.status)return"continue";if(n.find(function(t){return(t.id===i.parentId||t.parentId===i.parentId)&&null!==i.parentId}))return"continue";var a=n.find(function(t){return t.name===i.name&&t.id!==i.id});a?(i.displayName=i.name+" ("+e.getFrontedFormattedDateTime(i.periods[0].periodStart)+")",a.displayName=a.name+" ("+e.getFrontedFormattedDateTime(a.periods[0].periodStart)+")",n.push(i)):n.push(i)},i=0;i<t.length;i++)o(i);return n}},watch:{}}},794:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(663),i=n(336),a=n(664),s=n(677),r=n.n(s),l=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(o=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default={mixins:[o.a,i.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(t,e,n){this.appointment.bookings[n].customFields[e].value=t},googleMapsLoaded:function(){return window.google&&this.$root.settings.general.gMapApiKey},clearValidation:function(){this.$emit("clearValidation")},setAddressCustomFields:function(){var t=this;this.appointment.bookings.forEach(function(e,n){var o=!0,i=!1,a=void 0;try{for(var s,r=Object.entries(e.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!==t.$refs["amelia-cf-address-"+n+"-"+d]&&t.$refs["amelia-cf-address-"+n+"-"+d].length>0&&t.$refs["amelia-cf-address-"+n+"-"+d][0].update(p.value)}}catch(t){i=!0,a=t}finally{try{!o&&r.return&&r.return()}finally{if(i)throw a}}})}},watch:{"appointment.bookings":function(){var t=this;this.$nextTick(function(){t.setAddressCustomFields()})}},components:{VueGoogleAutocomplete:r.a}}},795:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-dialog-table am-custom-fields-container"},t._l(t.appointment.bookings,function(e,o){return n("div",{staticClass:"am-customer-extras"},[n("el-row",{staticClass:"am-customer-extras-data"},[t.showCustomerInfo?n("el-col",[n("h3",[t._v(t._s(e.customer.firstName)+" "+t._s(e.customer.lastName))]),t._v(" "),n("span",[t._v(t._s(e.customer.email))])]):t._e()],1),t._v(" "),n("div",{staticClass:"am-custom-fields"},t._l(t.customFields,function(e){return t.isCustomFieldVisible(e,t.entityType,t.entityId)&&"content"!==e.type&&("file"!==e.type||"file"===e.type&&t.appointment.bookings[o].customFields[e.id].value&&t.appointment.bookings[o].customFields[e.id].value.length>0)?n("el-form-item",{key:e.id,attrs:{prop:!0===e.required&&"content"!==e.type&&"file"!==e.type?"bookings."+o+".customFields."+e.id+".value":null,label:"content"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&e.label?e.label+":":""}},["checkbox"!==e.type&&"radio"!==e.type||!e.label?t._e():n("span",{class:"checkbox"!==e.type&&"radio"!==e.type||!e.required?"":"am-custom-required-as-html",domProps:{innerHTML:t._s(e.label?"<label class='el-form-item__label'>"+e.label+"</label>:":"")}},[t._v("\n >\n ")]),t._v(" "),"text"===e.type?n("el-input",{attrs:{placeholder:""},on:{input:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[o].customFields[e.id].value,callback:function(n){t.$set(t.appointment.bookings[o].customFields[e.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):t._e(),t._v(" "),"address"===e.type?n("div",{staticClass:"el-input",style:{marginBottom:t.$root.settings.general.gMapApiKey?"":0}},[t.googleMapsLoaded()?n("vue-google-autocomplete",{ref:"amelia-cf-address-"+o+"-"+e.id,refInFor:!0,attrs:{id:"address-autocomplete-"+o+"-"+e.id,classname:"el-input__inner",placeholder:"",types:""},on:{change:function(n){return t.setAddressCF(n,e.id,o)}}}):n("el-input",{attrs:{placeholder:""},model:{value:t.appointment.bookings[o].customFields[e.id].value,callback:function(n){t.$set(t.appointment.bookings[o].customFields[e.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}})],1):"text-area"===e.type?n("el-input",{staticClass:"am-front-texarea",attrs:{rows:3,placeholder:"",type:"textarea"},on:{input:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[o].customFields[e.id].value,callback:function(n){t.$set(t.appointment.bookings[o].customFields[e.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):"select"===e.type?n("el-select",{attrs:{placeholder:"",clearable:"","popper-class":"am-dropdown-cabinet"},on:{change:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[o].customFields[e.id].value,callback:function(n){t.$set(t.appointment.bookings[o].customFields[e.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(t,e){return n("el-option",{key:e,attrs:{value:t,label:t}})}),1):"checkbox"===e.type?n("el-checkbox-group",{on:{change:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[o].customFields[e.id].value,callback:function(n){t.$set(t.appointment.bookings[o].customFields[e.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(t,e){return n("el-checkbox",{key:e,attrs:{label:t}})}),1):"radio"===e.type?n("el-radio-group",{model:{value:t.appointment.bookings[o].customFields[e.id].value,callback:function(n){t.$set(t.appointment.bookings[o].customFields[e.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(e,o){return n("el-radio",{key:o,attrs:{label:e},on:{change:function(e){return t.clearValidation()}}})}),1):"file"===e.type&&!1===t.hideAttachmentCustomField?t._l(t.appointment.bookings[o].customFields[e.id].value,function(i,a){return n("div",{staticStyle:{margin:"15px",clear:"left"}},[n("a",{key:a,attrs:{href:t.$root.useUploadsAmeliaPath?t.$root.getAjaxUrl+"/fields/"+e.id+"/"+t.appointment.bookings[o].id+"/"+a+(t.isCabinet?"&source=cabinet-provider":""):t.$root.getUploadsAmeliaUrl+t.appointment.bookings[o].id+"_"+i.fileName,target:"_blank"}},[t._v("\n "+t._s(i.name)+"\n ")])])}):"datepicker"===e.type?n("div",[n("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"bottom","popover-align":t.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:t.vCalendarFormats},model:{value:t.appointment.bookings[o].customFields[e.id].value,callback:function(n){t.$set(t.appointment.bookings[o].customFields[e.id],"value",n)},expression:"appointment.bookings[key].customFields[customField.id].value"}})],1):t._e()],2):t._e()}),1)],1)}),0)},staticRenderFns:[]}},796:function(t,e,n){var o=n(90)(n(797),n(801),!1,null,null,null);t.exports=o.exports},797:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(697),i=n.n(o),a=n(671),s=n.n(a),r=n(654),l=n(336),c=n(658),u=n(663),d=n(655),p=n(798),f=n.n(p);e.default={mixins:[r.a,l.a,c.a,d.a,u.a],props:{customer:null},data:function(){return{customerTabs:"details",customerCustomFields:null,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),this.usedLanguages.includes(this.customer.language)||(this.customer.language=this.$root.settings.wordpress.locale),this.getLanguagesData()},mounted:function(){this.inlineSVG()},methods:{showCustomerActivity:function(t){var e=new URL(window.location.href.replaceAll("customers",t));e.searchParams.set("customerId",this.customer.id),window.location.href=e},getLanguagesData:function(){var t=this;this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({types:["settings","custom_fields"]})}).then(function(e){t.languagesData=e.data.data.settings.languages,t.customerCustomFields=e.data.data.customFields.filter(function(t){return"customer"===t.saveType})}).catch(function(t){console.log(t.message)})},getLanguageLabel:function(t){return this.languagesData[t]?this.languagesData[t].name:""},getLanguageFlag:function(t){return t&&this.languagesData[t]&&this.languagesData[t].country_code?this.$root.getUrl+"public/img/flags/"+this.languagesData[t].country_code+".png":this.$root.getUrl+"public/img/grey.svg"},errorCallback:function(t){var e=this;e.errors.email="",setTimeout(function(){e.errors.email=t},200)},getParsedEntity:function(){var t=JSON.parse(JSON.stringify(this.customer));return t.birthday&&(t.birthday=this.getDatabaseFormattedDate(this.$moment(t.birthday).format("YYYY-MM-DD"))),0===t.externalId||t.externalId||(t.externalId=-1),t.language?t.translations=JSON.stringify({defaultLanguage:t.language}):t.translations=null,t.customFields&&(t.customFields=JSON.stringify(this.customer.customFields)),t},closeDialog:function(){this.$emit("closeDialog")},getWPUsers:function(t){var e=this;this.$http.get(this.$root.getAjaxUrl+"/users/wp-users",{params:{id:t,role:"customer"}}).then(function(t){e.formOptions.wpUsers=t.data.data.users,e.formOptions.wpUsers.unshift({value:0,label:e.$root.labels.create_new}),-1===e.formOptions.wpUsers.map(function(t){return t.value}).indexOf(e.customer.externalId)&&(e.customer.externalId=""),e.dialogLoading=!1})},phoneFormatted:function(t,e){this.clearValidation(),this.customer.phone=t,this.customer.countryPhoneIso=e},clearValidation:function(){void 0!==this.$refs.customer&&this.$refs.customer.clearValidate()},selectCreateNewWPUser:function(){this.customer.externalId=0,this.$refs.wpUser.blur()}},components:{CustomerCustomFields:f.a,PhoneInput:s.a,DialogActions:i.a}}},798:function(t,e,n){var o=n(90)(n(799),n(800),!1,null,null,null);t.exports=o.exports},799:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(663),i=n(336),a=n(664),s=n(677),r=n.n(s);e.default={mixins:[o.a,i.a,a.a],props:{entityId:null,entityType:null,customer:{default:function(){}},customFields:{default:function(){return[]}},hideAttachmentCustomField:{required:!1,default:!1,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1}},created:function(){for(var t in this.setInitCustomerCustomFields(),this.customer.customFields)"datepicker"===this.customer.customFields[t].type&&this.customer.customFields[t].value&&(this.customer.customFields[t].value=this.$moment(this.customer.customFields[t].value).toDate())},methods:{setAddressCF:function(t,e){this.customer.customFields[e].value=t},googleMapsLoaded:function(){return window.google&&this.$root.settings.general.gMapApiKey},clearValidation:function(){this.$emit("clearValidation")},setInitCustomerCustomFields:function(){var t=this.customer.customFields?this.customer.customFields:{};this.customFields.forEach(function(e){void 0===t[e.id]&&(t[e.id]={value:"checkbox"===e.type||"attachment"===e.type||"radio"===e.type?[]:"",type:e.type,label:e.label})}),this.customer.customFields=t}},components:{VueGoogleAutocomplete:r.a}}},800:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-dialog-table am-custom-fields-container"},[n("div",{staticClass:"am-customer-extras"},[n("div",{staticClass:"am-custom-fields"},t._l(t.customFields,function(e,o){return"content"!==e.type?n("el-form-item",{key:e.id,attrs:{label:"content"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&e.label?e.label+":":""}},["checkbox"!==e.type&&"radio"!==e.type||!e.label?t._e():n("span",{domProps:{innerHTML:t._s(e.label?"<label class='el-form-item__label'>"+e.label+"</label>:":"")}},[t._v("\n >\n ")]),t._v(" "),"text"===e.type?n("el-input",{attrs:{placeholder:""},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.customFields[e.id].value,callback:function(n){t.$set(t.customer.customFields[e.id],"value",n)},expression:"customer.customFields[customField.id].value"}}):t._e(),t._v(" "),"address"===e.type?n("div",{staticClass:"el-input",style:{marginBottom:t.$root.settings.general.gMapApiKey?"":0}},[t.googleMapsLoaded()?n("vue-google-autocomplete",{attrs:{id:"address-autocomplete-"+o+"-"+e.id,classname:"el-input__inner",value:t.customer.customFields[e.id].value,placeholder:"",types:""},on:{input:function(n){t.customer.customFields[e.id].value=n},change:function(n){return t.setAddressCF(n,e.id)}}}):n("el-input",{attrs:{placeholder:""},model:{value:t.customer.customFields[e.id].value,callback:function(n){t.$set(t.customer.customFields[e.id],"value",n)},expression:"customer.customFields[customField.id].value"}})],1):"text-area"===e.type?n("el-input",{staticClass:"am-front-texarea",attrs:{rows:3,placeholder:"",type:"textarea"},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.customFields[e.id].value,callback:function(n){t.$set(t.customer.customFields[e.id],"value",n)},expression:"customer.customFields[customField.id].value"}}):"select"===e.type?n("el-select",{attrs:{placeholder:"",clearable:"","popper-class":"am-dropdown-cabinet"},on:{change:function(e){return t.clearValidation()}},model:{value:t.customer.customFields[e.id].value,callback:function(n){t.$set(t.customer.customFields[e.id],"value",n)},expression:"customer.customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(t,e){return n("el-option",{key:e,attrs:{value:t,label:t}})}),1):"checkbox"===e.type?n("el-checkbox-group",{attrs:{"aria-required":"false"},on:{change:function(e){return t.clearValidation()}},model:{value:t.customer.customFields[e.id].value,callback:function(n){t.$set(t.customer.customFields[e.id],"value",n)},expression:"customer.customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(t,e){return n("el-checkbox",{key:e,attrs:{label:t}})}),1):"radio"===e.type?n("el-radio-group",{model:{value:t.customer.customFields[e.id].value,callback:function(n){t.$set(t.customer.customFields[e.id],"value",n)},expression:"customer.customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(e,o){return n("el-radio",{key:o,attrs:{label:e},on:{change:function(e){return t.clearValidation()}}})}),1):"file"===e.type&&!1===t.hideAttachmentCustomField?t._l(t.customer.customFields[e.id].value,function(o,i){return n("div",{staticStyle:{margin:"15px",clear:"left"}},[n("a",{key:i,attrs:{href:t.$root.useUploadsAmeliaPath?t.$root.getAjaxUrl+"/fields/"+e.id+"/"+t.customer.id+"/"+i+(t.isCabinet?"&source=cabinet-provider":""):t.$root.getUploadsAmeliaUrl+t.customer.id+"_"+o.fileName,target:"_blank"}},[t._v("\n "+t._s(o.name)+"\n ")])])}):"datepicker"===e.type?n("div",[n("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"bottom","popover-align":t.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:t.vCalendarFormats},model:{value:t.customer.customFields[e.id].value,callback:function(n){t.$set(t.customer.customFields[e.id],"value",n)},expression:"customer.customFields[customField.id].value"}})],1):t._e()],2):t._e()}),1)])])},staticRenderFns:[]}},801:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.loader_message))])])]),t._v(" "),t.dialogLoading?t._e():n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==t.customer.id}},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[0!==t.customer.id?n("h2",[t._v(t._s(t.$root.labels.edit_customer))]):n("h2",[t._v(t._s(t.$root.labels.new_customer))])]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("span"),t._v(" "),n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1),t._v(" "),n("el-form",{ref:"customer",attrs:{model:t.customer,rules:t.rules,"label-position":"top"},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[n("el-tabs",{model:{value:t.customerTabs,callback:function(e){t.customerTabs=e},expression:"customerTabs"}},[n("el-tab-pane",{attrs:{label:t.$root.labels.details,name:"details"}},[n("el-form-item",{attrs:{label:t.$root.labels.first_name+":",prop:"firstName"}},[n("el-input",{attrs:{"auto-complete":"off"},on:{input:function(e){return t.clearValidation()},change:function(e){return t.trimProperty(t.customer,"firstName")}},model:{value:t.customer.firstName,callback:function(e){t.$set(t.customer,"firstName",e)},expression:"customer.firstName"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.last_name+":",prop:"lastName"}},[n("el-input",{attrs:{"auto-complete":"off"},on:{input:function(e){return t.clearValidation()},change:function(e){return t.trimProperty(t.customer,"lastName")}},model:{value:t.customer.lastName,callback:function(e){t.$set(t.customer,"lastName",e)},expression:"customer.lastName"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.email+":",prop:"email",error:t.errors.email}},[n("el-input",{attrs:{"auto-complete":"off",placeholder:t.$root.labels.email_placeholder},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.email,callback:function(e){t.$set(t.customer,"email",e)},expression:"customer.email"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.wp_user)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.wp_user_customer_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{ref:"wpUser",attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.select_wp_user},on:{change:function(e){return t.clearValidation()}},model:{value:t.customer.externalId,callback:function(e){t.$set(t.customer,"externalId",e)},expression:"customer.externalId"}},[n("div",{staticClass:"am-drop"},[t.customer&&t.customer.email?n("div",{staticClass:"am-drop-create-item",on:{click:t.selectCreateNewWPUser}},[t._v("\n "+t._s(t.$root.labels.create_new)+"\n ")]):t._e(),t._v(" "),t._l(t.formOptions.wpUsers,function(t){return n("el-option",{key:t.value,class:{hidden:0===t.value},attrs:{label:t.label,value:t.value}})})],2)])],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.phone+":"}},[n("phone-input",{attrs:{countryPhoneIso:t.customer.countryPhoneIso,savedPhone:t.customer.phone},on:{phoneFormatted:t.phoneFormatted}})],1),t._v(" "),1!==t.usedLanguages.length||t.usedLanguages[0]!==t.$root.settings.wordpress.locale?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.notification_language)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{style:{maxWidth:"312px"},attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.wp_customer_lang_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{staticClass:"select-languages",attrs:{placeholder:t.$root.labels.language,clearable:"",filterable:""},model:{value:t.customer.language,callback:function(e){t.$set(t.customer,"language",e)},expression:"customer.language"}},[n("template",{slot:"prefix"},[n("img",{staticClass:"select-languages-flag",attrs:{src:t.getLanguageFlag(t.customer.language)}})]),t._v(" "),t._l(t.usedLanguages,function(e,o){return n("el-option",{key:o,attrs:{label:t.getLanguageLabel(e),value:e}},[n("span",[n("img",{staticClass:"option-languages-flag",attrs:{src:t.getLanguageFlag(e)}}),t._v("\n "+t._s(t.getLanguageLabel(e))+"\n ")])])})],2)],1):t._e(),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.gender+":"}},[n("el-select",{attrs:{placeholder:"",clearable:""},on:{change:function(e){return t.clearValidation()}},model:{value:t.customer.gender,callback:function(e){t.$set(t.customer,"gender",e)},expression:"customer.gender"}},t._l(t.formOptions.genders,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.date_of_birth+":"}},[n("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:t.$root.labels.select_date_of_birth},"is-expanded":!1,formats:t.vCalendarFormats},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.birthday,callback:function(e){t.$set(t.customer,"birthday",e)},expression:"customer.birthday"}}),t._v(" "),t.customer.birthday?n("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:function(e){t.customer.birthday=null}}},[n("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):t._e()],1),t._v(" "),t.customer.countAppointmentBookings>0||t.customer.countEventBookings>0?n("div",{staticClass:"am-customer-activity"},[n("span",{staticClass:"am-customer-activity-title"},[t._v(t._s(t.$root.labels.customer_activity+":"))]),t._v(" "),n("div",{staticClass:"align-left"},[t.customer.countAppointmentBookings>0?n("div",{staticClass:"am-customer-activity-box"},[n("span",[t._v(t._s(t.$root.labels.appointments)+": "+t._s(t.customer.countAppointmentBookings))]),t._v(" "),n("el-button",{attrs:{size:"small"},on:{click:function(e){return t.showCustomerActivity("appointments")}}},[t._v("\n "+t._s(t.$root.labels.view_appointments)+"\n ")])],1):t._e(),t._v(" "),t.customer.countEventBookings>0?n("div",{staticClass:"am-customer-activity-box"},[n("span",[t._v(t._s(t.$root.labels.events_booked)+": "+t._s(t.customer.countEventBookings))]),t._v(" "),n("el-button",{attrs:{size:"small"},on:{click:function(e){return t.showCustomerActivity("events")}}},[t._v("\n "+t._s(t.$root.labels.view_events)+"\n ")])],1):t._e()])]):t._e(),t._v(" "),n("div",{staticClass:"am-divider"}),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.note_internal+":"}},[n("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.note,callback:function(e){t.$set(t.customer,"note",e)},expression:"customer.note"}})],1)],1),t._v(" "),t.customerCustomFields&&t.customerCustomFields.length?n("el-tab-pane",{attrs:{label:t.$root.labels.custom_fields,name:"customFields"}},[n("customer-custom-fields",{attrs:{customer:t.customer,customFields:t.customerCustomFields,entityType:"customer"},on:{clearValidation:t.clearValidation}})],1):t._e()],1)],1)],1),t._v(" "),t.dialogLoading?t._e():n("dialog-actions",{attrs:{formName:"customer",urlName:"users/customers",isNew:0===t.customer.id,entity:t.customer,getParsedEntity:t.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden",block:"blocked"},buttonText:{confirm:{status:{yes:"visible"===t.customer.status?t.$root.labels.visibility_hide:t.$root.labels.visibility_show,no:t.$root.labels.no,block:"visible"===t.customer.status?t.$root.labels.block:t.$root.labels.unblock}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===t.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!1,haveBlock:!t.$root.licence.isLite},message:{success:{save:t.$root.labels.customer_saved,remove:t.$root.labels.customer_deleted,show:"",hide:"",block:"visible"===this.customer.status?t.$root.labels.customer_blocked:t.$root.labels.customer_unblocked},confirm:{remove:t.$root.labels.confirm_delete_customer,show:"",hide:"",duplicate:"",block:"visible"===this.customer.status?t.$root.labels.confirm_block_customer:t.$root.labels.confirm_unblock_customer}}},on:{errorCallback:t.errorCallback}})],1)},staticRenderFns:[]}},802:function(t,e,n){var o=n(90)(n(803),n(804),!1,null,null,null);t.exports=o.exports},803:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(91),i=n(654),a=n(336);e.default={mixins:[o.a,i.a,a.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(){this.inlineSVG()},mounted:function(){this.hasSeparateBookingOption=this.action===this.$root.getAjaxUrl+"/report/appointments"||this.action===this.$root.getAjaxUrl+"/report/event/attendees",this.separateBookings=this.action===this.$root.getAjaxUrl+"/report/event/attendees",this.$emit("updateAction",this.getAction()),this.inlineSVG()},methods:{changeFields:function(){this.$emit("updateAction",this.getAction())},closeDialog:function(){this.$emit("closeDialogExport")},getAction:function(){var t=this,e=this.$root.settings.activation.disableUrlParams?{}:[],n=function(n){if(t.data.hasOwnProperty(n))if(t.data[n]instanceof Array||t.data[n]instanceof Object){var o=Object.keys(t.data[n]).map(function(e){return t.data[n][e]});for(var i in o)if(""!==o[i]){var a="";""!==(a=o[i]instanceof Date?o[i]instanceof Date?t.getDatabaseFormattedDate(o[i]):o[i]:o[i]instanceof Object&&!0===o[i].checked?o[i].value:o[i])&&(t.$root.settings.activation.disableUrlParams?(n in e||(e[n]=[]),e[n].push(encodeURIComponent(a))):e.push(n+"["+i+"]="+encodeURIComponent(a)))}}else""!==t.data[n]&&(t.$root.settings.activation.disableUrlParams?(n in e||(e[n]=[]),e[n].push(encodeURIComponent(t.data[n]))):e.push(n+"="+encodeURIComponent(t.data[n])))};for(var o in this.data)n(o);if(this.$root.settings.activation.disableUrlParams){var i=[];for(var o in e)i.push(o+"="+e[o].join(","));e=i}return this.action+"&"+e.join("&")+"&delimiter="+this.delimiter+(this.hasSeparateBookingOption?"&separate="+this.separateBookings:"")+"&wpAmeliaNonce="+window.wpAmeliaNonce}},components:{}}},804:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"am-dialog-scrollable"},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:14}},[n("h2",[t._v(t._s(t.$root.labels.export))])]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:10}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1),t._v(" "),n("LicenceBlockHeader",{attrs:{licence:"starter"}}),t._v(" "),n("el-form",{class:t.licenceClassDisabled("starter"),attrs:{"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$root.labels.csv_delimiter+":"}},[n("el-select",{attrs:{placeholder:t.$root.labels.csv_delimiter},on:{change:t.changeFields},model:{value:t.delimiter,callback:function(e){t.delimiter=e},expression:"delimiter"}},t._l(t.delimiters,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),t.hasSeparateBookingOption?n("el-form-item",{attrs:{label:t.$root.labels["select_rows_settings"+(t.action===t.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")]+":"}},[n("el-select",{attrs:{placeholder:t.$root.labels.exported_same_row},on:{change:t.changeFields},model:{value:t.separateBookings,callback:function(e){t.separateBookings=e},expression:"separateBookings"}},[n("el-option",{attrs:{label:this.$root.labels["exported_same_row"+(t.action===t.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!1}}),t._v(" "),n("el-option",{attrs:{label:this.$root.labels["exported_separate_rows"+(t.action===t.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!0}})],1)],1):t._e(),t._v(" "),t._l(t.data.fields,function(e){return[n("el-checkbox",{attrs:{checked:"",label:e.label,border:""},on:{change:t.changeFields},model:{value:e.checked,callback:function(n){t.$set(e,"checked",n)},expression:"field.checked"}})]})],2)],1),t._v(" "),n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{attrs:{disabled:t.notInLicence("starter"),type:""},on:{click:t.closeDialog}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{disabled:t.notInLicence("starter"),type:"primary","native-type":"submit"},on:{click:t.closeDialog}},[t._v("\n "+t._s(t.$root.labels.export)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},805:function(t,e,n){var o,i;!function(a){"use strict";void 0===(i="function"==typeof(o=a)?o.call(e,n,e,t):o)||(t.exports=i)}(function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,n,o,i,a,s,r,l,c,u,d,p,f,h,m,g,v,b,y,_,k,w,x,C,E,S,T,O=[],P=!1,$=!1,A=!1,D=[],N=!1,L=!1,I=[],j=/\s+/g,R="Sortable"+(new Date).getTime(),M=window,B=M.document,q=M.parseInt,F=M.setTimeout,U=M.jQuery||M.Zepto,z=M.Polymer,Y={capture:!1,passive:!1},H=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),V=!!navigator.userAgent.match(/Edge/i),W=!!navigator.userAgent.match(/firefox/i),K=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),G=!!navigator.userAgent.match(/iP(ad|od|hone)/i),J=V||H?"cssFloat":"float",Z="draggable"in B.createElement("div"),X=function(){if(H)return!1;var t=B.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),Q=!1,tt=!1,et=Math.abs,nt=Math.min,ot=Math.max,it=[],at=function(t,e){var n=xt(t),o=q(n.width)-q(n.paddingLeft)-q(n.paddingRight)-q(n.borderLeftWidth)-q(n.borderRightWidth),i=$t(t,0,e),a=$t(t,1,e),s=i&&xt(i),r=a&&xt(a),l=s&&q(s.marginLeft)+q(s.marginRight)+Ft(i).width,c=r&&q(r.marginLeft)+q(r.marginRight)+Ft(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&"none"!==s.float){var u="left"===s.float?"left":"right";return!a||"both"!==r.clear&&r.clear!==u?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===n[J]||a&&"none"===n[J]&&l+c>o)?"vertical":"horizontal"},st=function(t,e){if(!t||!t.getBoundingClientRect)return rt();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=xt(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n||!n.getBoundingClientRect||n===B.body)return rt();if(o||e)return n;o=!0}}}while(n=n.parentNode);return rt()},rt=function(){return H?B.documentElement:B.scrollingElement},lt=function(t,e,n){t.scrollLeft+=e,t.scrollTop+=n},ct=jt(function(t,e,n,o){if(e.scroll){var i=n?n[R]:window,a=e.scrollSensitivity,s=e.scrollSpeed,u=t.clientX,d=t.clientY,p=rt(),f=!1;l!==n&&(ut(),r=e.scroll,c=e.scrollFn,!0===r&&(r=st(n,!0),l=r));var h=0,m=r;do{var g,v,b,y,k,w,x,C,E,S=m,T=Ft(S),$=T.top,A=T.bottom,D=T.left,N=T.right,L=T.width,I=T.height;if(g=S.scrollWidth,v=S.scrollHeight,b=xt(S),C=S.scrollLeft,E=S.scrollTop,S===p?(w=L<g&&("auto"===b.overflowX||"scroll"===b.overflowX||"visible"===b.overflowX),x=I<v&&("auto"===b.overflowY||"scroll"===b.overflowY||"visible"===b.overflowY)):(w=L<g&&("auto"===b.overflowX||"scroll"===b.overflowX),x=I<v&&("auto"===b.overflowY||"scroll"===b.overflowY)),y=w&&(et(N-u)<=a&&C+L<g)-(et(D-u)<=a&&!!C),k=x&&(et(A-d)<=a&&E+I<v)-(et($-d)<=a&&!!E),!O[h])for(var j=0;j<=h;j++)O[j]||(O[j]={});O[h].vx==y&&O[h].vy==k&&O[h].el===S||(O[h].el=S,O[h].vx=y,O[h].vy=k,clearInterval(O[h].pid),!S||0==y&&0==k||(f=!0,O[h].pid=setInterval(function(){o&&0===this.layer&&(vt.active._emulateDragOver(!0),vt.active._onTouchMove(_,!0));var e=O[this.layer].vy?O[this.layer].vy*s:0,n=O[this.layer].vx?O[this.layer].vx*s:0;"function"==typeof c&&"continue"!==c.call(i,n,e,t,_,O[this.layer].el)||lt(O[this.layer].el,n,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&m!==p&&(m=st(m,!1)));P=f}},30),ut=function(){O.forEach(function(t){clearInterval(t.pid)}),O=[]},dt=function(t){function e(t,n){return function(o,i,a,s){var r=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||r))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,a,s),n)(o,i,a,s);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==typeof o||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},pt=function(e){t&&t.parentNode&&t.parentNode[R]&&t.parentNode[R]._computeIsAligned(e)},ft=function(){!X&&n&&xt(n,"display","none")},ht=function(){!X&&n&&xt(n,"display","")};B.addEventListener("click",function(t){if(A)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),A=!1,!1},!0);var mt,gt=function(e){if(t){var n=function(t,e){for(var n=0;n<D.length;n++)if(!At(D[n])){var o=Ft(D[n]),i=D[n][R].options.emptyInsertThreshold,a=t>=o.left-i&&t<=o.right+i,s=e>=o.top-i&&e<=o.bottom+i;if(i&&a&&s)return D[n]}}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(n){var o={};for(var i in e)o[i]=e[i];o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[R]._onDragOver(o)}}};function vt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=Rt({},e),t[R]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return at(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.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!==vt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in n)!(o in e)&&(e[o]=n[o]);for(var i in dt(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Z,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?_t(t,"pointerdown",this._onTapStart):(_t(t,"mousedown",this._onTapStart),_t(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(_t(t,"dragover",this),_t(t,"dragenter",this)),D.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[])}function bt(t,e,n,o){if(t){n=n||B;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&It(t,e):It(t,e))||o&&t===n)return t;if(t===n)break}while(t=yt(t))}return null}function yt(t){return t.host&&t!==B&&t.host.nodeType?t.host:t.parentNode}function _t(t,e,n){t.addEventListener(e,n,!H&&Y)}function kt(t,e,n){t.removeEventListener(e,n,!H&&Y)}function wt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(j," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(j," ")}}function xt(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return B.defaultView&&B.defaultView.getComputedStyle?n=B.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Ct(t){var e="";do{var n=xt(t,"transform");n&&"none"!==n&&(e=n+" "+e)}while(t=t.parentNode);return window.DOMMatrix?new DOMMatrix(e):window.WebKitCSSMatrix?new WebKitCSSMatrix(e):window.CSSMatrix?new CSSMatrix(e):void 0}function Et(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,a=o.length;if(n)for(;i<a;i++)n(o[i],i);return o}return[]}function St(t,e,n,i,a,s,r,l,c,u,d){var p,f=(t=t||e[R]).options,h="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||H||V?(p=B.createEvent("Event")).initEvent(n,!0,!0):p=new CustomEvent(n,{bubbles:!0,cancelable:!0}),p.to=a||e,p.from=s||e,p.item=i||e,p.clone=o,p.oldIndex=r,p.newIndex=l,p.oldDraggableIndex=c,p.newDraggableIndex=u,p.originalEvent=d,p.pullMode=m?m.lastPutMode:void 0,e&&e.dispatchEvent(p),f[h]&&f[h].call(t,p)}function Tt(t,e,n,o,i,a,s,r){var l,c,u=t[R],d=u.options.onMove;return!window.CustomEvent||H||V?(l=B.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=a||Ft(e),l.willInsertAfter=r,l.originalEvent=s,t.dispatchEvent(l),d&&(c=d.call(u,l,s)),c}function Ot(t){t.draggable=!1}function Pt(){Q=!1}function $t(e,o,i){for(var a=0,s=0,r=e.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==n&&r[s]!==t&&bt(r[s],i.draggable,e,!1)){if(a===o)return r[s];a++}s++}return null}function At(t){for(var e=t.lastElementChild;e&&(e===n||"none"===xt(e,"display"));)e=e.previousElementSibling;return e||null}function Dt(e){return Lt(t)<Lt(e)?1:-1}function Nt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Lt(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t&&(t=t.previousElementSibling);)"TEMPLATE"===t.nodeName.toUpperCase()||t===o||e&&!It(t,e)||n++;return n}function It(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function jt(t,e){return function(){if(!mt){var n=arguments,o=this;mt=F(function(){1===n.length?t.call(o,n[0]):t.apply(o,n),mt=void 0},e)}}}function Rt(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Mt(t){return z&&z.dom?z.dom(t).cloneNode(!0):U?U(t).clone(!0)[0]:t.cloneNode(!0)}function Bt(t){return F(t,0)}function qt(t){return clearTimeout(t)}function Ft(t,e,n,o){if(t.getBoundingClientRect||t===M){var i,a,s,r,l,c,u;if(t!==M&&t!==rt()?(a=(i=t.getBoundingClientRect()).top,s=i.left,r=i.bottom,l=i.right,c=i.height,u=i.width):(a=0,s=0,r=window.innerHeight,l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),o&&t!==M&&(n=n||t.parentNode,!H))do{if(n&&n.getBoundingClientRect&&"none"!==xt(n,"transform")){var d=n.getBoundingClientRect();a-=d.top+q(xt(n,"border-top-width")),s-=d.left+q(xt(n,"border-left-width")),r=a+i.height,l=s+i.width;break}}while(n=n.parentNode);if(e&&t!==M){var p=Ct(n||t),f=p&&p.a,h=p&&p.d;p&&(r=(a/=h)+(c/=h),l=(s/=f)+(u/=f))}return{top:a,left:s,bottom:r,right:l,width:u,height:c}}}function Ut(t,e){for(var n=st(t,!0),o=Ft(t)[e];n;){var i=Ft(n)[e];if(!("top"===e||"left"===e?o>=i:o<=i))return n;if(n===rt())break;n=st(n,!1)}return!1}function zt(t){var e=0,n=0,o=rt();if(t)do{var i=Ct(t),a=i.a,s=i.d;e+=t.scrollLeft*a,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,n]}return vt.prototype={constructor:vt,_computeIsAligned:function(e){var o;if(n&&!X?(ft(),o=B.elementFromPoint(e.clientX,e.clientY),ht()):o=e.target,o=bt(o,this.options.draggable,this.el,!1),!tt&&t&&t.parentNode===this.el){for(var i,a,s,r,l,c,u,d,p=this.el.children,f=0;f<p.length;f++)bt(p[f],this.options.draggable,this.el,!1)&&p[f]!==o&&(p[f].sortableMouseAligned=(i=e.clientX,a=e.clientY,s=p[f],r=this._getDirection(e,null),this.options,void 0,void 0,void 0,void 0,l=Ft(s),c="vertical"===r?l.left:l.top,u="vertical"===r?l.right:l.bottom,c<(d="vertical"===r?i:a)&&d<u));bt(o,this.options.draggable,this.el,!0)||(w=null),tt=!0,F(function(){tt=!1},30)}},_getDirection:function(e,n){return"function"==typeof this.options.direction?this.options.direction.call(this,e,n,t):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n,o,i=this,a=this.el,r=this.options,l=r.preventOnFilter,c=e.type,u=e.touches&&e.touches[0],d=(u||e).target,p=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||d,f=r.filter;if(function(t){it.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&it.push(o)}}(a),!t&&!(/mousedown|pointerdown/.test(c)&&0!==e.button||r.disabled||p.isContentEditable||(d=bt(d,r.draggable,a,!1),s===d))){if(n=Lt(d),o=Lt(d,r.draggable),"function"==typeof f){if(f.call(this,e,d,this))return St(i,p,"filter",d,a,a,n,void 0,o),void(l&&e.cancelable&&e.preventDefault())}else if(f&&(f=f.split(",").some(function(t){if(t=bt(p,t.trim(),a,!1))return St(i,t,"filter",d,a,a,n,void 0,o),!0})))return void(l&&e.cancelable&&e.preventDefault());r.handle&&!bt(p,r.handle,a,!1)||this._prepareDragStart(e,u,d,n,o)}}},_handleAutoScroll:function(e,n){if(t&&this.options.scroll){var o=e.clientX,i=e.clientY,a=B.elementFromPoint(o,i),s=this;if(n||V||H||K){ct(e,s.options,a,n);var r=st(a,!0);!P||g&&o===v&&i===b||(g&&clearInterval(g),g=setInterval(function(){if(t){var a=st(B.elementFromPoint(o,i),!0);a!==r&&(r=a,ut(),ct(e,s.options,r,n))}},10),v=o,b=i)}else{if(!s.options.bubbleScroll||st(a,!0)===rt())return void ut();ct(e,s.options,st(a,!1),!1)}}},_prepareDragStart:function(n,o,r,l,c){var d,f=this,m=f.el,g=f.options,v=m.ownerDocument;r&&!t&&r.parentNode===m&&(i=m,e=(t=r).parentNode,a=t.nextSibling,s=r,h=g.group,u=l,p=c,y={target:t,clientX:(o||n).clientX,clientY:(o||n).clientY},this._lastX=(o||n).clientX,this._lastY=(o||n).clientY,t.style["will-change"]="all",t.style.transition="",t.style.transform="",d=function(){f._disableDelayedDragEvents(),!W&&f.nativeDraggable&&(t.draggable=!0),f._triggerDragStart(n,o),St(f,i,"choose",t,i,i,u,void 0,p),wt(t,g.chosenClass,!0)},g.ignore.split(",").forEach(function(e){Et(t,e.trim(),Ot)}),_t(v,"dragover",gt),_t(v,"mousemove",gt),_t(v,"touchmove",gt),_t(v,"mouseup",f._onDrop),_t(v,"touchend",f._onDrop),_t(v,"touchcancel",f._onDrop),W&&this.nativeDraggable&&(this.options.touchStartThreshold=4,t.draggable=!0),!g.delay||g.delayOnTouchOnly&&!o||this.nativeDraggable&&(V||H)?d():(_t(v,"mouseup",f._disableDelayedDrag),_t(v,"touchend",f._disableDelayedDrag),_t(v,"touchcancel",f._disableDelayedDrag),_t(v,"mousemove",f._delayedDragTouchMoveHandler),_t(v,"touchmove",f._delayedDragTouchMoveHandler),g.supportPointer&&_t(v,"pointermove",f._delayedDragTouchMoveHandler),f._dragStartTimer=F(d,g.delay)))},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;ot(et(e.clientX-this._lastX),et(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){t&&Ot(t),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;kt(t,"mouseup",this._disableDelayedDrag),kt(t,"touchend",this._disableDelayedDrag),kt(t,"touchcancel",this._disableDelayedDrag),kt(t,"mousemove",this._delayedDragTouchMoveHandler),kt(t,"touchmove",this._delayedDragTouchMoveHandler),kt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||("touch"==e.pointerType?e:null),!this.nativeDraggable||n?this.options.supportPointer?_t(B,"pointermove",this._onTouchMove):_t(B,n?"touchmove":"mousemove",this._onTouchMove):(_t(t,"dragend",this),_t(i,"dragstart",this._onDragStart));try{B.selection?Bt(function(){B.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(e,n){if($=!1,i&&t){this.nativeDraggable&&(_t(B,"dragover",this._handleAutoScroll),_t(B,"dragover",pt));var o=this.options;!e&&wt(t,o.dragClass,!1),wt(t,o.ghostClass,!0),xt(t,"transform",""),vt.active=this,e&&this._appendGhost(),St(this,i,"start",t,i,i,u,void 0,p,void 0,n)}else this._nulling()},_emulateDragOver:function(e){if(_){if(this._lastX===_.clientX&&this._lastY===_.clientY&&!e)return;this._lastX=_.clientX,this._lastY=_.clientY,ft();for(var n=B.elementFromPoint(_.clientX,_.clientY),o=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(_.clientX,_.clientY))!==o;)o=n;if(o)do{if(o[R])if(o[R]._onDragOver({clientX:_.clientX,clientY:_.clientY,target:n,rootEl:o})&&!this.options.dragoverBubble)break;n=o}while(o=o.parentNode);t.parentNode[R]._computeIsAligned(_),ht()}},_onTouchMove:function(t,e){if(y){var o=this.options,i=o.fallbackTolerance,a=o.fallbackOffset,s=t.touches?t.touches[0]:t,r=n&&Ct(n),l=n&&r&&r.a,c=n&&r&&r.d,u=G&&S&&zt(S),d=(s.clientX-y.clientX+a.x)/(l||1)+(u?u[0]-I[0]:0)/(l||1),p=(s.clientY-y.clientY+a.y)/(c||1)+(u?u[1]-I[1]:0)/(c||1),f=t.touches?"translate3d("+d+"px,"+p+"px,0)":"translate("+d+"px,"+p+"px)";if(!vt.active&&!$){if(i&&nt(et(s.clientX-this._lastX),et(s.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}!e&&this._handleAutoScroll(s,!0),k=!0,_=s,xt(n,"webkitTransform",f),xt(n,"mozTransform",f),xt(n,"msTransform",f),xt(n,"transform",f),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!n){var e=this.options.fallbackOnBody?B.body:i,o=Ft(t,!0,e,!G),a=(xt(t),this.options);if(G){for(S=e;"static"===xt(S,"position")&&"none"===xt(S,"transform")&&S!==B;)S=S.parentNode;if(S!==B){var s=Ft(S,!0);o.top-=s.top,o.left-=s.left}S!==B.body&&S!==B.documentElement?(S===B&&(S=rt()),o.top+=S.scrollTop,o.left+=S.scrollLeft):S=rt(),I=zt(S)}wt(n=t.cloneNode(!0),a.ghostClass,!1),wt(n,a.fallbackClass,!0),wt(n,a.dragClass,!0),xt(n,"box-sizing","border-box"),xt(n,"margin",0),xt(n,"top",o.top),xt(n,"left",o.left),xt(n,"width",o.width),xt(n,"height",o.height),xt(n,"opacity","0.8"),xt(n,"position",G?"absolute":"fixed"),xt(n,"zIndex","100000"),xt(n,"pointerEvents","none"),e.appendChild(n)}},_onDragStart:function(e,n){var a=this,s=e.dataTransfer,r=a.options;(o=Mt(t)).draggable=!1,o.style["will-change"]="",this._hideClone(),wt(o,a.options.chosenClass,!1),a._cloneId=Bt(function(){a.options.removeCloneOnHide||i.insertBefore(o,t),St(a,i,"clone",t)}),!n&&wt(t,r.dragClass,!0),n?(A=!0,a._loopId=setInterval(a._emulateDragOver,50)):(kt(B,"mouseup",a._onDrop),kt(B,"touchend",a._onDrop),kt(B,"touchcancel",a._onDrop),s&&(s.effectAllowed="move",r.setData&&r.setData.call(a,s,t)),_t(B,"drop",a),xt(t,"transform","translateZ(0)")),$=!0,a._dragStartId=Bt(a._dragStarted.bind(a,n,e)),_t(B,"selectstart",a),K&&xt(B.body,"user-select","none")},_onDragOver:function(n){var o,s,r,l=this.el,c=n.target,d=this.options,f=d.group,g=vt.active,v=h===f,b=d.sort,y=this;if(!Q){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),k=!0,c=bt(c,d.draggable,l,!0),t.contains(n.target)||c.animated)return Y(!1);if(c!==t&&(A=!1),g&&!d.disabled&&(v?b||(r=!i.contains(t)):m===this||(this.lastPutMode=h.checkPull(this,g,t,n))&&f.checkPut(this,g,t,n))){var _=this._getDirection(n,c);if(o=Ft(t),r)return this._hideClone(),e=i,a?i.insertBefore(t,a):i.appendChild(t),Y(!0);var S=At(l);if(!S||function(t,e,n){var o=Ft(At(n)),i="vertical"===e?t.clientY:t.clientX,a="vertical"===e?t.clientX:t.clientY,s="vertical"===e?o.bottom:o.right,r="vertical"===e?o.left:o.top,l="vertical"===e?o.right:o.bottom;return"vertical"===e?a>l+10||a<=l&&i>s&&a>=r:i>s&&a>r||i<=s&&a>l+10}(n,_,l)&&!S.animated){if(S&&l===n.target&&(c=S),c&&(s=Ft(c)),v?g._hideClone():g._showClone(this),!1!==Tt(i,l,t,o,c,s,n,!!c))return l.appendChild(t),e=l,T=null,H(),Y(!0)}else if(c&&c!==t&&c.parentNode===l){var O,P=0,$=c.sortableMouseAligned,D=t.parentNode!==l,I="vertical"===_?"top":"left",j=Ut(c,"top")||Ut(t,"top"),M=j?j.scrollTop:void 0;if(w!==c&&(C=null,O=Ft(c)[I],N=!1),function(e,n,o){var i=e===t&&T||Ft(e),a=n===t&&T||Ft(n),s="vertical"===o?i.left:i.top,r="vertical"===o?i.right:i.bottom,l="vertical"===o?i.width:i.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}(t,c,_)&&$||D||j||d.invertSwap||"insert"===C||"swap"===C?("swap"!==C&&(L=d.invertSwap||D),P=function(e,n,o,i,a,s,r){var l=Ft(n),c="vertical"===o?e.clientY:e.clientX,u="vertical"===o?l.height:l.width,d="vertical"===o?l.top:l.left,p="vertical"===o?l.bottom:l.right,f=Ft(t),h=!1;if(!s)if(r&&E<u*i)if(!N&&(1===x?c>d+u*a/2:c<p-u*a/2)&&(N=!0),N)h=!0;else{"vertical"===o?f.top:f.left,"vertical"===o?f.bottom:f.right;if(1===x?c<d+E:c>p-E)return-1*x}else if(c>d+u*(1-i)/2&&c<p-u*(1-i)/2)return Dt(n);if((h=h||s)&&(c<d+u*a/2||c>p-u*a/2))return c>d+u/2?1:-1;return 0}(n,c,_,d.swapThreshold,null==d.invertedSwapThreshold?d.swapThreshold:d.invertedSwapThreshold,L,w===c),C="swap"):(P=Dt(c),C="insert"),0===P)return Y(!1);T=null,w=c,x=P,s=Ft(c);var q=c.nextElementSibling,U=!1,z=Tt(i,l,t,o,c,s,n,U=1===P);if(!1!==z)return 1!==z&&-1!==z||(U=1===z),Q=!0,F(Pt,30),v?g._hideClone():g._showClone(this),U&&!q?l.appendChild(t):c.parentNode.insertBefore(t,U?q:c),j&<(j,0,M-j.scrollTop),e=t.parentNode,void 0===O||L||(E=et(O-Ft(c)[I])),H(),Y(!0)}if(l.contains(t))return Y(!1)}return!1}function Y(e){return e&&(v?g._hideClone():g._showClone(y),g&&(wt(t,m?m.options.ghostClass:g.options.ghostClass,!1),wt(t,d.ghostClass,!0)),m!==y&&y!==vt.active?m=y:y===vt.active&&(m=null),o&&y._animate(o,t),c&&s&&y._animate(s,c)),(c===t&&!t.animated||c===l&&!c.animated)&&(w=null),d.dragoverBubble||n.rootEl||c===B||(y._handleAutoScroll(n),t.parentNode[R]._computeIsAligned(n),!e&>(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),!0}function H(){St(y,i,"change",c,l,i,u,Lt(t),p,Lt(t,d.draggable),n)}},_animate:function(e,n){var o=this.options.animation;if(o){var i=Ft(n);if(n===t&&(T=i),1===e.nodeType&&(e=Ft(e)),e.left+e.width/2!==i.left+i.width/2||e.top+e.height/2!==i.top+i.height/2){var a=Ct(this.el),s=a&&a.a,r=a&&a.d;xt(n,"transition","none"),xt(n,"transform","translate3d("+(e.left-i.left)/(s||1)+"px,"+(e.top-i.top)/(r||1)+"px,0)"),this._repaint(n),xt(n,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),xt(n,"transform","translate3d(0,0,0)")}"number"==typeof n.animated&&clearTimeout(n.animated),n.animated=F(function(){xt(n,"transition",""),xt(n,"transform",""),n.animated=!1},o)}},_repaint:function(t){return t.offsetWidth},_offMoveEvents:function(){kt(B,"touchmove",this._onTouchMove),kt(B,"pointermove",this._onTouchMove),kt(B,"dragover",gt),kt(B,"mousemove",gt),kt(B,"touchmove",gt)},_offUpEvents:function(){var t=this.el.ownerDocument;kt(t,"mouseup",this._onDrop),kt(t,"touchend",this._onDrop),kt(t,"pointerup",this._onDrop),kt(t,"touchcancel",this._onDrop),kt(B,"selectstart",this)},_onDrop:function(s){var r=this.el,l=this.options;$=!1,P=!1,L=!1,N=!1,clearInterval(this._loopId),clearInterval(g),ut(),clearTimeout(mt),mt=void 0,clearTimeout(this._dragStartTimer),qt(this._cloneId),qt(this._dragStartId),kt(B,"mousemove",this._onTouchMove),this.nativeDraggable&&(kt(B,"drop",this),kt(r,"dragstart",this._onDragStart),kt(B,"dragover",this._handleAutoScroll),kt(B,"dragover",pt)),K&&xt(B.body,"user-select",""),this._offMoveEvents(),this._offUpEvents(),s&&(k&&(s.cancelable&&s.preventDefault(),!l.dropBubble&&s.stopPropagation()),n&&n.parentNode&&n.parentNode.removeChild(n),(i===e||m&&"clone"!==m.lastPutMode)&&o&&o.parentNode&&o.parentNode.removeChild(o),t&&(this.nativeDraggable&&kt(t,"dragend",this),Ot(t),t.style["will-change"]="",wt(t,m?m.options.ghostClass:this.options.ghostClass,!1),wt(t,this.options.chosenClass,!1),St(this,i,"unchoose",t,e,i,u,null,p,null,s),i!==e?(d=Lt(t),f=Lt(t,l.draggable),d>=0&&(St(null,e,"add",t,e,i,u,d,p,f,s),St(this,i,"remove",t,e,i,u,d,p,f,s),St(null,e,"sort",t,e,i,u,d,p,f,s),St(this,i,"sort",t,e,i,u,d,p,f,s)),m&&m.save()):t.nextSibling!==a&&(d=Lt(t),f=Lt(t,l.draggable),d>=0&&(St(this,i,"update",t,e,i,u,d,p,f,s),St(this,i,"sort",t,e,i,u,d,p,f,s))),vt.active&&(null!=d&&-1!==d||(d=u,f=p),St(this,i,"end",t,e,i,u,d,p,f,s),this.save()))),this._nulling()},_nulling:function(){i=t=e=n=a=o=s=r=l=O.length=g=v=b=y=_=k=d=u=w=x=T=m=h=vt.active=null,it.forEach(function(t){t.checked=!0}),it.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":t&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,a=this.options;o<i;o++)bt(t=n[o],a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||Nt(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach(function(t,o){var i=n.children[o];bt(i,this.options.draggable,n,!1)&&(e[t]=i)},this),t.forEach(function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))})},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return bt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];n[t]=e,"group"===t&&dt(n)},destroy:function(){var t=this.el;t[R]=null,kt(t,"mousedown",this._onTapStart),kt(t,"touchstart",this._onTapStart),kt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(kt(t,"dragover",this),kt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),D.splice(D.indexOf(this.el),1),this.el=t=null},_hideClone:function(){o.cloneHidden||(xt(o,"display","none"),o.cloneHidden=!0,o.parentNode&&this.options.removeCloneOnHide&&o.parentNode.removeChild(o))},_showClone:function(e){"clone"===e.lastPutMode?o.cloneHidden&&(i.contains(t)&&!this.options.group.revertClone?i.insertBefore(o,t):a?i.insertBefore(o,a):i.appendChild(o),this.options.group.revertClone&&this._animate(t,o),xt(o,"display",""),o.cloneHidden=!1):this._hideClone()}},_t(B,"touchmove",function(t){(vt.active||$)&&t.cancelable&&t.preventDefault()}),vt.utils={on:_t,off:kt,css:xt,find:Et,is:function(t,e){return!!bt(t,e,t,!1)},extend:Rt,throttle:jt,closest:bt,toggleClass:wt,clone:Mt,index:Lt,nextTick:Bt,cancelNextTick:qt,detectDirection:at,getChild:$t},vt.create=function(t,e){return new vt(t,e)},vt.version="1.9.0",vt})},806:function(t,e,n){var o=n(90)(n(826),n(827),!1,null,null,null);t.exports=o.exports},826:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={template:"#picture-upload",props:{deleteIconVisibility:!1,editedEntity:null,entityName:"",multiple:!1},data:function(){return{pictureFullPath:"",pictureThumbPath:""}},mounted:function(){},methods:{removeImage:function(t){t.stopPropagation(),this.pictureFullPath="",this.pictureThumbPath="",this.$emit("deleteImage")},openMediaModal:function(){var t,e=this;t?t.open():((t=wp.media({title:"Select or Upload Profile Picture",button:{text:"Select picture"},multiple:this.multiple,library:{type:"image"}})).on("select",function(){var n=null;t.state().get("selection").forEach(function(t){n=t.toJSON(),e.pictureFullPath=n.url,e.pictureThumbPath=n.sizes.thumbnail?n.sizes.thumbnail.url:n.url,e.$emit("pictureSelected",e.pictureFullPath,e.pictureThumbPath)})}),t.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"}}}},827:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-profile-photo",on:{click:t.openMediaModal}},[t.deleteIconVisibility?n("i",{staticClass:"el-icon-delete",on:{click:function(e){return t.removeImage(e)}}}):t._e(),t._v(" "),n("i",{class:{"el-icon-plus":"gallery"===t.entityName,"el-icon-picture":"gallery"!==t.entityName}}),t._v(" "),"gallery"===t.entityName?n("span",[t._v(t._s(t.$root.labels.add_image))]):t._e(),t._v(" "),"gallery"!==t.entityName?n("img",{attrs:{src:t.getPictureSrc,alt:""}}):t._e()])},staticRenderFns:[]}},828:function(t,e,n){var o=n(90)(n(881),n(882),!1,null,null,null);t.exports=o.exports},874:function(t,e,n){var o=n(90)(n(878),n(879),!1,null,null,null);t.exports=o.exports},878:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(91);e.default={props:{zoomSettings:null,lessonSpaceSettings:null,googleMeetSettings:null,microsoftTeamsSettings:null,paymentsSettings:null,generalSettings:null,settings:null,providers:null},mixins:[o.a],data:function(){var t=this;return{products:[],searchCounter:0,loadingProducts:!1,integrationsSettingsCollapse:null,paymentsSettingsCollapse:null,generalSettingsCollapse:null,rules:{redirectURLAfter:[{validator:function(e,n,o){t.clearValidation();var i=t.$refs.settings.model.redirectUrlAfterAppointment;""===i||/^((http|https):\/\/)/.test(i)?o():o(new Error(t.$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 t=document.getElementsByClassName("am-number-of-days"),e=0;e<t.length;e++)t[e].getElementsByClassName("el-input__inner")[0].value=""},computed:{isZoomProvidersConnected:function(){return null!==this.providers&&(!this.providers.map(function(t){return t.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 t=this;this.$root.settings.payments.wc.enabled&&(this.$root.settings.payments.wc.enabled&&this.paymentsSettings.wc.productId&&0===this.$root.wcProducts.filter(function(e){return e.id===t.paymentsSettings.wc.productId}).length&&this.fetchProducts({id:this.paymentsSettings.wc.productId},function(e){e.length&&t.products.push(e[0])}),this.products=this.$root.wcProducts)},selectedProduct:function(t){if(0===this.$root.wcProducts.filter(function(e){return e.id===t}).length){var e=this.products.find(function(e){return e.id===t});e&&this.$root.wcProducts.push(e)}},fetchProducts:function(t,e){var n=this;clearTimeout(this.searchProductsTimer),this.loadingProducts=!0,this.searchCounter++,this.searchProductsTimer=setTimeout(function(){var o=n.searchCounter;n.$http.get(n.$root.getAjaxUrl+"/payment/wc/products",{params:t}).then(function(t){o>=n.searchCounter&&e(t.data.data.products.sort(function(t,e){return t.name.toLowerCase()>e.name.toLowerCase()?1:-1})),n.loadingProducts=!1}).catch(function(t){n.loadingProducts=!1})},500)},searchProducts:function(t){var e=this;t?this.fetchProducts({name:t},function(t){e.products=t}):this.products=this.$root.wcProducts},clearValidation:function(){}}}},879:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-entity-settings"},[null!==t.generalSettings?n("el-collapse",{class:t.licenceClass(),model:{value:t.generalSettingsCollapse,callback:function(e){t.generalSettingsCollapse=e},expression:"generalSettingsCollapse"}},[n("el-collapse-item",{staticClass:"am-setting-box",attrs:{disabled:t.notInLicence(),name:"generalSettings"}},[n("template",{slot:"title"},[n("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:t.$root.getUrl+"public/img/setting.svg"}}),t._v(" "+t._s(t.$root.labels.general)+"\n ")]),t._v(" "),null!==t.generalSettings&&"defaultAppointmentStatus"in t.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.default_appointment_status)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.default_appointment_status)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{attrs:{clearable:"",placeholder:t.options.defaultAppointmentStatus.find(function(e){return e.value===t.$root.settings.general.defaultAppointmentStatus}).label,"popper-class":"am-dropdown-cabinet"},model:{value:t.generalSettings.defaultAppointmentStatus,callback:function(e){t.$set(t.generalSettings,"defaultAppointmentStatus",e)},expression:"generalSettings.defaultAppointmentStatus"}},t._l(t.options.defaultAppointmentStatus,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1):t._e(),t._v(" "),null!==t.generalSettings&&"minimumTimeRequirementPriorToBooking"in t.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.minimum_time_before_booking)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.minimum_time_before_booking_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{attrs:{clearable:"","collapse-tags":"",placeholder:"Select",placeholder:t.options.minimumTime.find(function(e){return e.value===t.$root.settings.general.minimumTimeRequirementPriorToBooking}).label,"popper-class":"am-dropdown-cabinet"},model:{value:t.generalSettings.minimumTimeRequirementPriorToBooking,callback:function(e){t.$set(t.generalSettings,"minimumTimeRequirementPriorToBooking",e)},expression:"generalSettings.minimumTimeRequirementPriorToBooking"}},t._l(t.options.minimumTime,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1):t._e(),t._v(" "),null!==t.generalSettings&&"minimumTimeRequirementPriorToCanceling"in t.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.minimum_time_before_canceling)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.minimum_time_before_canceling_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{attrs:{clearable:"",placeholder:t.options.minimumTime.find(function(e){return e.value===t.$root.settings.general.minimumTimeRequirementPriorToCanceling}).label,"popper-class":"am-dropdown-cabinet"},model:{value:t.generalSettings.minimumTimeRequirementPriorToCanceling,callback:function(e){t.$set(t.generalSettings,"minimumTimeRequirementPriorToCanceling",e)},expression:"generalSettings.minimumTimeRequirementPriorToCanceling"}},t._l(t.options.minimumTime,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1):t._e(),t._v(" "),null!==t.generalSettings&&"minimumTimeRequirementPriorToRescheduling"in t.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.minimum_time_before_rescheduling)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.minimum_time_before_rescheduling_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{attrs:{clearable:"",placeholder:t.options.minimumTime.find(function(e){return e.value===t.$root.settings.general.minimumTimeRequirementPriorToRescheduling}).label,"popper-class":"am-dropdown-cabinet"},model:{value:t.generalSettings.minimumTimeRequirementPriorToRescheduling,callback:function(e){t.$set(t.generalSettings,"minimumTimeRequirementPriorToRescheduling",e)},expression:"generalSettings.minimumTimeRequirementPriorToRescheduling"}},t._l(t.options.minimumTime,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1):t._e(),t._v(" "),null!==t.generalSettings&&"numberOfDaysAvailableForBooking"in t.generalSettings?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.period_available_for_booking)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.period_available_for_booking_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-input-number",{staticClass:"am-number-of-days",attrs:{min:0,placeholder:t.$root.settings.general.numberOfDaysAvailableForBooking.toString()},model:{value:t.generalSettings.numberOfDaysAvailableForBooking,callback:function(e){t.$set(t.generalSettings,"numberOfDaysAvailableForBooking",e)},expression:"generalSettings.numberOfDaysAvailableForBooking"}})],1):t._e(),t._v(" "),null!==t.generalSettings&&"redirectUrlAfterAppointment"in t.generalSettings?n("el-form-item",{attrs:{label:"placeholder",prop:"redirectURLAfter",error:t.errors.redirectURLAfter}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.redirect_url_after_appointment)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.licence.isPro||t.$root.licence.isDeveloper?t.$root.labels.redirect_url_after_app_or_package_tt:t.$root.labels.redirect_url_after_appointment_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-input",{attrs:{"auto-complete":"off",placeholder:t.$root.settings.general.redirectUrlAfterAppointment.toString()},on:{input:function(e){return t.clearValidation()}},model:{value:t.generalSettings.redirectUrlAfterAppointment,callback:function(e){t.$set(t.generalSettings,"redirectUrlAfterAppointment",e)},expression:"generalSettings.redirectUrlAfterAppointment"}})],1):t._e()],2),t._v(" "),n("LicenceBlock")],1):t._e(),t._v(" "),null!==t.paymentsSettings?n("el-collapse",{staticClass:"am-entity-settings-payments",class:t.licenceClass("starter"),model:{value:t.paymentsSettingsCollapse,callback:function(e){t.paymentsSettingsCollapse=e},expression:"paymentsSettingsCollapse"}},[n("el-collapse-item",{staticClass:"am-setting-box",attrs:{disabled:t.notInLicence("starter"),name:"paymentsSettings"}},[n("template",{slot:"title"},[n("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:t.$root.getUrl+"public/img/credit-card.svg"}}),t._v(" "+t._s(t.$root.labels.payments)+"\n ")]),t._v(" "),!t.notInLicence("basic")||t.licenceVisible()?n("div",{staticClass:"am-setting-box am-switch-box",class:t.licenceClass("basic")},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("span",[t._v(t._s(t.$root.labels.payment_links_enable))]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.payment_links_enable_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{disabled:t.notInLicence()},model:{value:t.paymentsSettings.paymentLinks.enabled,callback:function(e){t.$set(t.paymentsSettings.paymentLinks,"enabled",e)},expression:"paymentsSettings.paymentLinks.enabled"}})],1)],1),t._v(" "),t.paymentsSettings.paymentLinks.enabled?n("el-row",{staticStyle:{"margin-top":"16px"}},[n("el-col",[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{staticStyle:{"font-size":"13px"},attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.payment_links_redirect)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.payment_links_redirect_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-input",{attrs:{placeholder:t.$root.settings.payments.paymentLinks.redirectUrl?t.$root.settings.payments.paymentLinks.redirectUrl:t.$root.getSiteUrl,"auto-complete":"off"},model:{value:t.paymentsSettings.paymentLinks.redirectUrl,callback:function(e){t.$set(t.paymentsSettings.paymentLinks,"redirectUrl",e)},expression:"paymentsSettings.paymentLinks.redirectUrl"}})],1)],1)],1):t._e(),t._v(" "),t.isDefaultStatusPending()?n("el-row",{staticStyle:{"font-size":"14px","margin-bottom":"16px !important"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("span",[t._v(t._s(t.$root.labels.payment_links_change_status))]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.payment_links_change_status_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{model:{value:t.paymentsSettings.paymentLinks.changeBookingStatus,callback:function(e){t.$set(t.paymentsSettings.paymentLinks,"changeBookingStatus",e)},expression:"paymentsSettings.paymentLinks.changeBookingStatus"}})],1)],1):t._e(),t._v(" "),t.paymentsSettings.paymentLinks.enabled&&"provider"!==t.$root.settings.role?n("el-alert",{staticStyle:{"margin-bottom":"5px"},attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.payment_links_warning,closable:!1}}):t._e(),t._v(" "),n("LicenceBlock")],1):t._e(),t._v(" "),t.$root.settings.payments.onSite?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[t._v("\n "+t._s(t.$root.labels.on_site)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.paymentsSettings.onSite,callback:function(e){t.$set(t.paymentsSettings,"onSite",e)},expression:"paymentsSettings.onSite"}})],1)],1)],1):t._e(),t._v(" "),t.$root.settings.payments.wc.enabled?n("el-col",{attrs:{span:24}},[t.$root.settings.payments.onSite?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[t._v("\n "+t._s(t.$root.labels.wc_service)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.paymentsSettings.wc.enabled,callback:function(e){t.$set(t.paymentsSettings.wc,"enabled",e)},expression:"paymentsSettings.wc.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.paymentsSettings.wc.enabled?n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.wc_product)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.wc_product_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{attrs:{filterable:"",remote:"",placeholder:"","popper-class":"am-dropdown-cabinet",loading:t.loadingProducts,"remote-method":t.searchProducts},on:{change:t.selectedProduct},model:{value:t.paymentsSettings.wc.productId,callback:function(e){t.$set(t.paymentsSettings.wc,"productId",e)},expression:"paymentsSettings.wc.productId"}},t._l(t.products,function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1):t._e()],1):t._e(),t._v(" "),t.$root.settings.payments.payPal.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:t.$root.getUrl+"public/img/payments/paypal-light.svg"}})]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.paymentsSettings.payPal.enabled,callback:function(e){t.$set(t.paymentsSettings.payPal,"enabled",e)},expression:"paymentsSettings.payPal.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.$root.settings.payments.stripe.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"40px",src:t.$root.getUrl+"public/img/payments/stripe.svg"}})]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.paymentsSettings.stripe.enabled,callback:function(e){t.$set(t.paymentsSettings.stripe,"enabled",e)},expression:"paymentsSettings.stripe.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.$root.settings.payments.mollie.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:t.$root.getUrl+"public/img/payments/mollie.svg"}})]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.paymentsSettings.mollie.enabled,callback:function(e){t.$set(t.paymentsSettings.mollie,"enabled",e)},expression:"paymentsSettings.mollie.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.$root.settings.payments.square.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:t.$root.getUrl+"public/img/payments/square.svg"}})]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.paymentsSettings.square.enabled,callback:function(e){t.$set(t.paymentsSettings.square,"enabled",e)},expression:"paymentsSettings.square.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.$root.settings.payments.razorpay.enabled?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"svg-amelia",attrs:{width:"60px",src:t.$root.getUrl+"public/img/payments/razorpay.svg"}})]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.paymentsSettings.razorpay.enabled,callback:function(e){t.$set(t.paymentsSettings.razorpay,"enabled",e)},expression:"paymentsSettings.razorpay.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.paymentsSettings.wc.enabled&&(t.$root.settings.payments.wc.enabled||!t.paymentsSettings.wc.enabled)||t.paymentsSettings.onSite&&(t.$root.settings.payments.onSite||!t.paymentsSettings.onSite)||t.paymentsSettings.payPal.enabled&&(t.$root.settings.payments.payPal.enabled||!t.paymentsSettings.payPal.enabled)||t.paymentsSettings.stripe.enabled&&(t.$root.settings.payments.stripe.enabled||!t.paymentsSettings.stripe.enabled)||t.paymentsSettings.mollie.enabled&&(t.$root.settings.payments.mollie.enabled||!t.paymentsSettings.mollie.enabled)||t.paymentsSettings.square.enabled&&(t.$root.settings.payments.square.enabled||!t.paymentsSettings.square.enabled)||t.paymentsSettings.razorpay.enabled&&(t.$root.settings.payments.razorpay.enabled||!t.paymentsSettings.razorpay.enabled)?t._e():n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.payment_warning,closable:!1}})],2),t._v(" "),n("LicenceBlock",{attrs:{licence:"starter"}})],1):t._e(),t._v(" "),t.zoomSettings||t.lessonSpaceSettings||t.googleMeetSettings||t.microsoftTeamsSettings?n("el-collapse",{class:t.licenceClass(),model:{value:t.integrationsSettingsCollapse,callback:function(e){t.integrationsSettingsCollapse=e},expression:"integrationsSettingsCollapse"}},[n("el-collapse-item",{staticClass:"am-setting-box",attrs:{disabled:t.notInLicence(),name:"integrationsSettings"}},[n("template",{slot:"title"},[n("img",{staticClass:"svg-amelia",staticStyle:{"margin-right":"10px"},attrs:{src:t.$root.getUrl+"public/img/web-hook.svg"}}),t._v(" "+t._s(t.$root.labels.integrations_settings)+"\n ")]),t._v(" "),t.zoomSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[t._v("\n "+t._s(t.$root.labels.zoom)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.zoomSettings.enabled,callback:function(e){t.$set(t.zoomSettings,"enabled",e)},expression:"zoomSettings.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.zoomSettings&&t.zoomSettings.enabled&&!t.isZoomProvidersConnected?n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.zoom_warning,closable:!1}}):t._e(),t._v(" "),t.googleMeetSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[t._v("\n "+t._s(t.$root.labels.enable_google_meet)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.googleMeetSettings.enabled,callback:function(e){t.$set(t.googleMeetSettings,"enabled",e)},expression:"googleMeetSettings.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.microsoftTeamsSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[t._v("\n "+t._s(t.$root.labels.enable_microsoft_teams)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.microsoftTeamsSettings.enabled,callback:function(e){t.$set(t.microsoftTeamsSettings,"enabled",e)},expression:"microsoftTeamsSettings.enabled"}})],1)],1)],1):t._e(),t._v(" "),t.lessonSpaceSettings?n("div",{staticClass:"am-setting-box am-switch-box"},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:16}},[t._v("\n "+t._s(t.$root.labels.lesson_space)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.lessonSpaceSettings.enabled,callback:function(e){t.$set(t.lessonSpaceSettings,"enabled",e)},expression:"lessonSpaceSettings.enabled"}})],1)],1)],1):t._e()],2),t._v(" "),n("LicenceBlock")],1):t._e()],1)},staticRenderFns:[]}},880:function(t,e,n){"use strict";e.a={data:function(){return{count:{success:0,error:0}}},methods:{deleteEntities:function(t,e,n,o){var i=this;t.forEach(function(a){i.$http.post(i.$root.getAjaxUrl+"/"+i.name+"/delete/"+a).then(function(){i.deleteEntityResult(t,!0,e),n(a)}).catch(function(){i.deleteEntityResult(t,!1,e),o(a)})})},deleteEntityResult:function(t,e,n){t.pop(),e?this.count.success++:this.count.error++,0===t.length&&(this.count.success&&this.notify(this.$root.labels.success,this.count.success+" "+(this.count.success>1?this.successMessage.multiple:this.successMessage.single),"success"),this.count.error&&this.notify(this.$root.labels.error,this.count.error+" "+(this.count.error>1?this.errorMessage.multiple:this.errorMessage.single),"error"),this.count.success=0,this.count.error=0,n())}}}},881:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(91),i=n(654),a=n(733),s=n.n(a);e.default={mixins:[o.a,i.a],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},employeeBadges:{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:[],badges:[]}},mounted:function(){var t=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(e){return!Object.keys(t.oldTranslations).includes(e)}):this.usedLanguages).forEach(function(e){t.oldTranslations[e]=""}),_.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&&"badges"!==this.type||(this.languageWidth=24);var e=JSON.parse(JSON.stringify(this.cfOptions));e.forEach(function(e){e.translations?e.translations=JSON.parse(e.translations):e.translations={},t.usedLanguages.forEach(function(t){e.translations[t]||(e.translations[t]="")})}),this.options=e;var n=JSON.parse(JSON.stringify(this.eventTickets));if(n.forEach(function(e){e.translations?e.translations=JSON.parse(e.translations):e.translations={},t.usedLanguages.forEach(function(t){e.translations[t]||(e.translations[t]="")})}),this.tickets=n,"badges"===this.type){var o=JSON.parse(JSON.stringify(this.employeeBadges));o.forEach(function(e){e.translations?e.translations=JSON.parse(e.translations):e.translations={},t.usedLanguages.forEach(function(t){e.translations[t]||(e.translations[t]="")})}),this.badges=o}this.allLanguagesKeys=Object.keys(this.allLanguagesData)},computed:{dialogStyle:function(){return"cf"!==this.tab&&"tickets"!==this.tab&&"category"!==this.tab&&"roles"!==this.tab&&"badges"!==this.tab?"margin-bottom: 0":""}},methods:{saveDialog:function(){var t=this;this.newTranslations.forEach(function(e){e.lan&&(t.usedLanguages.includes(e.lan)||t.newLanguages.push(e.lan),t.oldTranslations[e.lan]=e.value)}),this.translations[this.type]=this.oldTranslations,this.options.forEach(function(t){t.edited=!0,t.translations=JSON.stringify(t.translations)}),this.tickets.forEach(function(t){t.edited=!0,t.translations=JSON.stringify(t.translations)}),"badges"===this.type?this.badges.forEach(function(t){t.translations=JSON.stringify(t.translations)}):this.badges=null,this.$emit("saveDialogTranslate",JSON.stringify(this.translations),this.newLanguages,this.tab,this.options,this.tickets,this.badges)},closeDialog:function(){this.$emit("closeDialogTranslate")},addLanguage:function(){this.newTranslations.push({lan:"",value:""})},getLanguageLabel:function(t,e){return!e||"name"!==this.type&&"firstName"!==this.type&&"lastName"!==this.type||"cf"===this.tab||"tickets"===this.tab||"badges"===this.tab?this.allLanguagesData[t].name:this.allLanguagesData[t].name.substring(0,21)},getLanguageFlag:function(t){return t&&this.allLanguagesData[t]&&this.allLanguagesData[t].country_code?this.$root.getUrl+"public/img/flags/"+this.allLanguagesData[t].country_code+".png":this.$root.getUrl+"public/img/grey.svg"},goBack:function(){"cf"===this.tab||"tickets"===this.tab||"category"===this.tab||"badges"===this.type?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:"badges"===this.type?this.$root.labels.translate+" "+this.$root.labels.employee_badge:this.$root.labels.translate+" "+this.name}},components:{ContentBlock:s.a}}},882:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-dialog-translate"},[n("div",{staticClass:"am-dialog-scrollable",style:t.dialogStyle},[n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:16}},[n("img",{staticClass:"am-dialog-translate-svg-back",attrs:{src:t.$root.getUrl+"public/img/arrow-back.svg"},on:{click:t.goBack}}),t._v(" "),n("h2",[t._v(t._s(t.getHeaderTitle()))])]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:8}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1),t._v(" "),n("LicenceBlockHeader"),t._v(" "),t._l(t.oldTranslations,function(e,o){return n("div",{key:o,class:t.licenceClassDisabled()},[t.usedLanguages&&-1!==t.usedLanguages.indexOf(o)?n("el-row",{attrs:{gutter:28,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:t.languageWidth,sm:t.languageWidth}},[n("div",{staticClass:"used-language"},[n("img",{staticClass:"am-dialog-translate-flag",attrs:{src:t.getLanguageFlag(o)}}),t._v("\n "+t._s(t.getLanguageLabel(o,!0))+"\n ")])]),t._v(" "),"name"!==t.type&&"firstName"!==t.type&&"lastName"!==t.type||"cf"===t.tab||"tickets"===t.tab?t._e():n("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:8,sm:14}},[n("el-input",{attrs:{type:"text",placeholder:t.$root.labels.translation},model:{value:t.oldTranslations[o],callback:function(e){t.$set(t.oldTranslations,o,e)},expression:"oldTranslations[key]"}})],1)],1):t._e(),t._v(" "),"description"===t.type&&t.usedLanguages&&-1!==t.usedLanguages.indexOf(o)?n("el-row",{staticClass:"am-dialog-translate-description",staticStyle:{"margin-bottom":"8px"},attrs:{gutter:24,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:24}},[n("content-block",{attrs:{label:t.$root.labels.description,entity:t.oldTranslations,property:o,textProperty:o,htmlProperty:o+"Html",hasTranslation:!1,hasQuill:t.hasQuill,textModeProp:!0,allowImage:!1}})],1)],1):t._e(),t._v(" "),"url"===t.type&&t.usedLanguages&&-1!==t.usedLanguages.indexOf(o)?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:24}},[n("el-input",{attrs:{value:e,placeholder:"https://test.site.com/customer-panel/"},model:{value:t.oldTranslations[o],callback:function(e){t.$set(t.oldTranslations,o,e)},expression:"oldTranslations[key]"}})],1)],1):t._e(),t._v(" "),"cf"===t.tab&&t.usedLanguages&&-1!==t.usedLanguages.indexOf(o)?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:26,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[t._v(" "+t._s(t.$root.labels.label_name)+" ")])]),t._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(t.name))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{value:e,type:"text",placeholder:" "},model:{value:t.oldTranslations[o],callback:function(e){t.$set(t.oldTranslations,o,e)},expression:"oldTranslations[key]"}})],1)],1):t._e(),t._v(" "),t._l(t.options,function(e,i){return t.cfOptions.length&&t.usedLanguages&&-1!==t.usedLanguages.indexOf(o)?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[t._v(" #"+t._s(i))])]),t._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(e.label))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:e.translations[o],callback:function(n){t.$set(e.translations,o,n)},expression:"option['translations'][key]"}})],1)],1)],1):t._e()}),t._v(" "),t._l(t.tickets,function(e){return t.eventTickets.length&&t.usedLanguages&&-1!==t.usedLanguages.indexOf(o)?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(e.name))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:19}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:e.translations[o],callback:function(n){t.$set(e.translations,o,n)},expression:"item['translations'][key]"}})],1)],1)],1):t._e()}),t._v(" "),t._l(t.badges,function(e){return t.badges.length&&t.usedLanguages&&-1!==t.usedLanguages.indexOf(o)?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(e.content))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:16}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:e.translations[o],callback:function(n){t.$set(e.translations,o,n)},expression:"item['translations'][key]"}})],1)],1)],1):t._e()})],2)}),t._v(" "),t._l(t.newTranslations,function(e,o){return n("div",{key:o,class:t.licenceClassDisabled()},[n("el-row",{staticStyle:{"margin-right":"-15px"},attrs:{gutter:28,type:"flex"}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:t.languageWidth}},[n("el-select",{attrs:{placeholder:t.$root.labels.language,clearable:"",filterable:""},model:{value:t.newTranslations[o].lan,callback:function(e){t.$set(t.newTranslations[o],"lan",e)},expression:"newTranslations[index].lan"}},[n("template",{slot:"prefix"},[n("img",{staticClass:"am-dialog-translate-flag-selected",attrs:{src:t.getLanguageFlag(t.newTranslations[o].lan)}})]),t._v(" "),t._l(t.allLanguagesKeys,function(e,o){return n("el-option",{key:o,attrs:{label:t.getLanguageLabel(e,!1),value:e,disabled:e in t.oldTranslations||e===t.$root.locale}},[n("span",[n("img",{staticClass:"am-dialog-translate-flag",attrs:{src:t.getLanguageFlag(e)}}),t._v("\n "+t._s(t.getLanguageLabel(e,!1))+"\n ")])])})],2)],1),t._v(" "),"name"!==t.type&&"firstName"!==t.type&&"lastName"!==t.type||"cf"===t.tab||"tickets"===t.tab?t._e():n("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:14,sm:18}},[n("el-input",{attrs:{type:"text",name:e.name,placeholder:t.$root.labels.translation},model:{value:t.newTranslations[o].value,callback:function(e){t.$set(t.newTranslations[o],"value",e)},expression:"newTranslations[index].value"}})],1)],1),t._v(" "),"description"===t.type?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:24}},[n("el-input",{attrs:{value:e,type:"textarea",autosize:{minRows:4,maxRows:6}},model:{value:t.newTranslations[o].value,callback:function(e){t.$set(t.newTranslations[o],"value",e)},expression:"newTranslations[index].value"}})],1)],1):t._e(),t._v(" "),"url"===t.type?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:24}},[n("el-input",{attrs:{value:e,placeholder:"https://test.site.com/customer-panel/"},model:{value:t.newTranslations[o].value,callback:function(e){t.$set(t.newTranslations[o],"value",e)},expression:"newTranslations[index].value"}})],1)],1):t._e(),t._v(" "),"cf"===t.tab?n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:20,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[t._v(" "+t._s(t.$root.labels.label_name)+" ")])]),t._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(t.name))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{type:"text",name:e.name},model:{value:t.newTranslations[o].value,callback:function(e){t.$set(t.newTranslations[o],"value",e)},expression:"newTranslations[index].value"}})],1)],1):t._e(),t._v(" "),t._l(t.options,function(e,i){return t.cfOptions.length?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf"},[t._v(" #"+t._s(i))])]),t._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(e.label))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:14}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:e.translations[t.newTranslations[o].lan],callback:function(n){t.$set(e.translations,t.newTranslations[o].lan,n)},expression:"option['translations'][newTranslations[index].lan]"}})],1)],1)],1):t._e()}),t._v(" "),t._l(t.tickets,function(e){return t.eventTickets.length?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(e.name))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:19}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:e.translations[t.newTranslations[o].lan],callback:function(n){t.$set(e.translations,t.newTranslations[o].lan,n)},expression:"item['translations'][newTranslations[index].lan]"}})],1)],1)],1):t._e()}),t._v(" "),t._l(t.badges,function(e){return t.badges.length?n("div",[n("el-row",{staticClass:"am-dialog-translate-description",attrs:{gutter:24,type:"flex"}},[n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-dialog-translate-cf-label"},[n("i",[t._v(t._s(e.content))])])]),t._v(" "),n("el-col",{staticStyle:{"padding-right":"0"},attrs:{sm:16}},[n("el-input",{attrs:{type:"text",placeholder:" "},model:{value:e.translations[t.newTranslations[o].lan],callback:function(n){t.$set(e.translations,t.newTranslations[o].lan,n)},expression:"item['translations'][newTranslations[index].lan]"}})],1)],1)],1):t._e()})],2)}),t._v(" "),"provider"!==t.$root.settings.role?n("div",{class:t.licenceClassDisabled()},[n("img",{staticClass:"am-dialog-translate-svg-plus",attrs:{src:t.$root.getUrl+"public/img/plus-circle.svg"},on:{click:t.addLanguage}}),t._v(" "),n("div",{staticClass:"add-language",on:{click:t.addLanguage}},[t._v(t._s(t.$root.labels.add_language))])]):t._e()],2),t._v(" "),"category"===t.tab||"cf"===t.tab||"tickets"===t.tab||"roles"===t.tab||"badges"===t.type?n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("el-row",[n("el-col",{staticClass:"align-right",attrs:{sm:24}},[n("el-button",{attrs:{type:""},on:{click:t.closeDialog}},[t._v(t._s(t.$root.labels.cancel))]),t._v(" "),n("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.saveDialog}},[t._v(t._s(t.$root.labels.save))])],1)],1)],1)]):t._e()])},staticRenderFns:[]}},891:function(t,e,n){var o=n(90)(n(892),n(896),!1,null,null,null);t.exports=o.exports},892:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(91),i=n(668),a=n(336),s=n(338),r=n.n(s),l=n(337),c=n.n(l),u=n(697),d=n.n(u),p=n(660),f=n(874),h=n.n(f),m=n(893),g=n.n(m),v=n(654),b=n(658),y=n(657),_=n(664),k=n(655),w=n(678),x=n(698),C=n(711),E=n(699),S=(n.n(E),n(0)),T=n.n(S),O=n(733),P=n.n(O);function $(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}e.default={mixins:[o.a,i.a,a.a,p.a,v.a,b.a,y.a,_.a,k.a,w.a,x.a,C.a],props:{selectedTimeZone:"",event:null,employees:null,locations:null,tags:null,settings:null,isCabinet:{required:!1,default:!1,type:Boolean},showHeader:{required:!1,default:!0,type:Boolean},showGallery:{required:!1,default:!0,type:Boolean}},data:function(){var t=this;return{maxExtraPeopleEnabled:!1,closeAfterMin:!1,currentUser:null,customPrice:0,calendarConflict:{enabled:!1},checkCalendarEvents:!1,customPricingEnabled:!1,customPricingByDateRangeEnabled:!1,customTickets:[],maxCustomCapacity:!1,maxCustomCapacityNum:1,soldTicketsIds:[],customTicketsDateRange:[],customTicketsDateRangesDisabledDates:[],customTicketsDateRangesSelected:[],monthDate:null,monthlyOnRepeat:"first",monthlyOnDay:"monday",monthlyRepeat:"each",weekDays:[{label:this.$root.labels.weekday_monday,value:"monday"},{label:this.$root.labels.weekday_tuesday,value:"tuesday"},{label:this.$root.labels.weekday_wednesday,value:"wednesday"},{label:this.$root.labels.weekday_thursday,value:"thursday"},{label:this.$root.labels.weekday_friday,value:"friday"},{label:this.$root.labels.weekday_saturday,value:"saturday"},{label:this.$root.labels.weekday_sunday,value:"sunday"}],activeColor:"white",depositEnabled:!1,depositPayment:"fixed",depositOptions:[{value:"fixed",label:this.$root.labels.amount_fixed},{value:"percentage",label:this.$root.labels.amount_percentage}],originRecurring:null,originPeriods:null,colors:["#1788FB","#4BBEC6","#FBC22D","#FA3C52","#D696B8","#689BCA","#26CC2B","#FD7E35","#E38587","#774DFB"],monthlyWeekDayRepeat:[{label:this.$root.labels.recurring_date_first,value:"first"},{label:this.$root.labels.recurring_date_second,value:"second"},{label:this.$root.labels.recurring_date_third,value:"third"},{label:this.$root.labels.recurring_date_fourth,value:"fourth"},{label:this.$root.labels.recurring_date_fifth,value:"fifth"},{label:this.$root.labels.recurring_date_last,value:"last"}],recurringPeriods:[{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"},{label:this.$root.labels.recurring_type_yearly,value:"yearly"}],zoomUsers:[],dialogLoading:!0,executeUpdate:!0,mounted:!1,rules:{name:[{required:!0,message:this.$root.labels.enter_name_warning,trigger:"submit"}],price:[{validator:function(e,n,o){n<0?o(new Error(t.$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(e,n,o){n<=0?(t.defaultEventTab="pricing",o(new Error(t.$root.labels.enter_positive_price_warning))):o()},trigger:"submit"}],range:[{required:!0,message:this.$root.labels.select_date_warning,trigger:"submit"}],startTime:[{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}],endTime:[{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}],bookingStartsDate:[{validator:function(e,n,o){t.event.bookingStartsNow||n?o():o(new Error(t.$root.labels.select_date_warning))},trigger:"submit"}],bookingStartsTime:[{validator:function(e,n,o){t.event.bookingStartsNow||n?o():o(new Error(t.$root.labels.select_time_warning))},trigger:"submit"}],bookingEndsDate:[{validator:function(e,n,o){t.event.bookingEndsAfter||n?o():o(new Error(t.$root.labels.select_date_warning))},trigger:"submit"}],bookingEndsTime:[{validator:function(e,n,o){t.event.bookingEndsAfter||n?o():o(new Error(t.$root.labels.select_time_warning))},trigger:"submit"}],recurringUntilDate:[{validator:function(e,n,o){t.event.recurring.until||n?o():o(new Error(t.$root.labels.select_date_warning))},trigger:"submit"}],recurringCycle:[{validator:function(e,n,o){t.event.recurring.cycle||n?o():o(new Error(t.$root.labels.select_cycle_warning))},trigger:"submit"}],recurringInterval:[{validator:function(e,n,o){t.event.recurring.cycleInterval||n?o():o(new Error(t.$root.labels.select_interval_warning))},trigger:"submit"}]},defaultEventTab:"details"}},methods:{hasPassed:function(){return this.event&&0!==this.event.id&&T()(this.event.periods[this.event.periods.length-1].range.end,"YYYY-MM-DD HH:mm:ss").isBefore(T()())},changeRecurringCycle:function(t){null!==this.event.recurring.cycleInterval&&void 0!==this.event.recurring.cycleInterval||(this.event.recurring.cycleInterval=1)},changeMaxExtraPeople:function(){this.maxExtraPeopleEnabled&&null===this.event.maxExtraPeople&&(this.event.maxExtraPeople=this.event.minCapacity-1)},createEventPeriods:function(){var t=this,e=[];return this.event.periods.forEach(function(n,o){var i=t.getDateString(n.range.start)+" "+n.startTime+":00",a=t.getDateString(n.range.end)+" "+n.endTime+":00";"UTC"===t.selectedTimeZone&&(i=T()(i,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm"),a=T()(a,"YYYY-MM-DD HH:mm").utc().format("YYYY-MM-DD HH:mm")),void 0!==t.originPeriods[o]&&(n.id=t.originPeriods[o].id,n.eventId=t.originPeriods[o].eventId),e.push({id:n.id,eventId:t.event.id?t.event.id:null,periodStart:i,periodEnd:a,googleCalendarEventId:n.googleCalendarEventId,googleMeetUrl:n.googleMeetUrl,outlookCalendarEventId:n.outlookCalendarEventId,microsoftTeamsUrl:n.microsoftTeamsUrl,appleCalendarEventId:n.appleCalendarEventId})}),e},assignOrganizer:function(t){this.event.organizerId=t?this.currentUser.id:null,this.$forceUpdate()},confirmCalendarConflict:function(){this.$set(this.calendarConflict,"enabled",!1)},getTicketsSpots:function(){var t=0;return this.customTickets&&this.customTickets.forEach(function(e){t+=e.spots}),t},getMaxCapacity:function(){return this.maxCustomCapacity?this.maxCustomCapacityNum:this.customPricingEnabled?this.getTicketsSpots():this.event.maxCapacity},isTicketDisabled:function(t){var e=!1;return this.customTickets.filter(function(t){return t.enabled}).length<=1&&this.customTickets.forEach(function(n,o){t===o&&n.enabled&&(e=!0)}),e},customTicketNameChanged:function(t,e){if(this.customTicketsDateRange.length)for(var n=0;n<this.customTicketsDateRange.length;n++)this.customTicketsDateRange[n].tickets.map(function(n,o){n.name=o!==e?n.name:t})},switchTicketing:function(t){this.customPricingEnabled=t,t&&(this.setDisabledTicketRangeDates(null,!1),0===this.event.customTickets.length&&0===this.customTickets.length&&this.addCustomTicket())},ticketIsBooked:function(t){return!this.soldTicketsIds.includes(t)},deleteCustomTicket:function(t){if(this.customTickets=this.customTickets.filter(function(e,n){return n!==t}),this.customTicketsDateRange.length){for(var e=0;e<this.customTicketsDateRange.length;e++)this.customTicketsDateRange[e].tickets=this.customTicketsDateRange[e].tickets.filter(function(e,n){return n!==t}),this.customTicketsDateRange[e].tickets.length||(this.customTicketsDateRange=this.customTicketsDateRange.splice(e-1,1));this.customTickets.length||(this.customTicketsDateRange=[]);var n=!1;this.customTickets.filter(function(t){return t.enabled}).length<=1&&this.customTickets.forEach(function(t,e){t.enabled&&(n=!0)}),n||(this.customTickets[this.customTickets.length-1].enabled=!0)}},getStartTicketRangeDate:function(t,e){var n=this.event.bookingStartsDate?T()(this.event.bookingStartsDate):T()();if(e)return T()(n).format("YYYY-MM-DD").split("-");switch(t){case"date":return T()(n).toDate();case"moment":return T()(n);case"string":return T()(n).format("YYYY-MM-DD")}},getEndTicketRangeDate:function(t,e){var n=this.event.bookingEndsDate?T()(this.event.bookingEndsDate):T()(this.event.periods[0].range.start,"YYYY-MM-DD");if(e)return T()(n).format("YYYY-MM-DD").split("-");switch(t){case"date":return T()(n).toDate();case"moment":return T()(n);case"string":return T()(n).format("YYYY-MM-DD")}},getPeriodDates:function(t,e,n){for(var o=[];t.isSameOrBefore(e);){switch(n){case"date":o.push(T()(t).toDate());break;case"moment":o.push(T()(t));break;case"string":o.push(T()(t).format("YYYY-MM-DD"))}t.add(1,"days")}return o},clearRange:function(t){this.customTicketsDateRange[t].range=null,this.setDisabledTicketRangeDates(null,!1)},setDisabledTicketRangeDates:function(t,e){var n=this,o=[];this.customTicketsDateRange.forEach(function(e,i){if(e.range&&(null===t||t!==i)){var a=T()(e.range.start),s=T()(e.range.end);o=o.concat(n.getPeriodDates(a,s,"date"))}}),e?o.length&&this.customTicketsDateRange.length>=t&&this.customTicketsDateRange[t].range&&setTimeout(function(){n.customTicketsDateRangesSelected=o},200):this.customTicketsDateRangesSelected=o},deleteCustomTicketDateRange:function(t){this.customTicketsDateRange.splice(t,1),this.setDisabledTicketRangeDates(null,!1)},addCustomTicketDateRange:function(){for(var t=[],e=0;e<this.customTickets.length;e++)t.push({id:this.customTickets[e].id,name:this.customTickets[e].name,price:this.customTickets[e].price,enabled:this.customTickets[e].enabled});this.customTicketsDateRange.push({range:null,tickets:t}),this.setDisabledTicketRangeDates(null,!1)},addCustomTicket:function(){var t={id:0,enabled:!0,name:"",spots:1,waitingListSpots:0,price:0};this.customTickets.push(t),this.customTicketsDateRange.forEach(function(e){e.tickets.push(JSON.parse(JSON.stringify(t)))})},getCalendarEvents:function(){var t=this;return new Promise(function(e,n){if(t.event.organizerId&&t.event.periods&&t.event.name){var o=t.employees.find(function(e){return e.id===t.event.organizerId});if(o&&(o.googleCalendar||o.outlookCalendar)){var i=t.event.providers.concat(o);t.checkCalendarEvents=!0;var a=null;t.isCabinet&&(a=Object.assign(t.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+t.$store.state.cabinet.cabinetType}})),t.$http.post(t.$root.getAjaxUrl+"/events/calendar",{providers:i,periods:t.createEventPeriods(),eventIds:[t.event.id,t.event.parentId],recurring:t.event.recurring},a).then(function(n){t.$set(t.calendarConflict,"enabled",!1),e(n)}).catch(function(n){t.$set(t.calendarConflict,"enabled",!0),e(n)}).finally(function(){t.checkCalendarEvents=!1})}else e(!0)}else e(!0)})},getMaxEndPeriod:function(){var t=this.event.periods.map(function(t){return t.range&&t.range.end}).filter(function(t){return t instanceof Date&&!isNaN(t)});return t.length>0?new Date(Math.max.apply(Math,$(t))):null},calculateMinDate:function(){if(this.event&&this.event.periods&&this.event.periods[0]&&this.event.periods[0].range){var t=this.event.periods[0].range.start;return new Date(t.getFullYear(),t.getMonth(),1)}},calculateMaxDate:function(){if(this.event&&this.event.periods&&this.event.periods[0]&&this.event.periods[0].range){var t=this.event.periods[0].range.start;return new Date(t.getFullYear(),t.getMonth()+1,0)}},depositEnabledChanged:function(){this.depositEnabled?this.event.depositPayment=this.depositPayment:this.event.depositPayment="disabled"},getTicketsMaxPrice:function(t){return t.length?Math.max.apply(Math,$(t.map(function(t){return t.price}))):0},depositChanged:function(){this.customPricingEnabled&&this.event.deposit>this.getTicketsMaxPrice(this.customTickets)&&"fixed"===this.depositPayment&&(this.event.deposit=this.getTicketsMaxPrice(this.customTickets)),!this.customPricingEnabled&&this.event.deposit>this.event.price&&"fixed"===this.depositPayment&&(this.event.deposit=this.event.price)},priceChanged:function(){this.customPricingEnabled&&this.event.deposit>this.getTicketsMaxPrice(this.customTickets)&&"fixed"===this.depositPayment&&(this.event.deposit=this.getTicketsMaxPrice(this.customTickets)),!this.customPricingEnabled&&this.event.deposit>this.event.price&&"fixed"===this.depositPayment&&(this.event.deposit=this.event.price)},canManage:function(){return"admin"===this.$root.settings.role||"manager"===this.$root.settings.role},galleryUpdated:function(t){this.event.gallery=t},validationFailCallback:function(){"disabled"!==this.event.depositPayment&&this.event.deposit<=0?this.defaultEventTab="pricing":this.defaultEventTab="details"},tagsChanged:function(t){var e=t[t.length-1];-1===this.tags.indexOf(e)&&this.tags.push(e)},haveSaveConfirmation:function(){return 0!==this.event.id&&this.originRecurring.until||this.calendarConflict.enabled},changeBookingStartsDate:function(){null===this.event.bookingStartsTime&&(this.event.bookingStartsTime="00:00")},changeBookingEndsDate:function(){null===this.event.bookingEndsTime&&(this.event.bookingEndsTime="00:00")},mergeTicketsWithSameDateRange:function(t){for(var e=t,n=0;n<e.length;n++)for(var o=n+1;o<e.length;o++)JSON.stringify(e[n].range)===JSON.stringify(e[o].range)&&(e[n].tickets.push(e[o].tickets[0]),e.splice(o,1),o--);return e},instantiateDialog:function(){var t=this;null!==this.event&&!0===this.executeUpdate&&(this.maxCustomCapacity=null!==this.event.maxCustomCapacity,this.maxCustomCapacityNum=this.maxCustomCapacity?this.event.maxCustomCapacity:1,this.maxExtraPeopleEnabled=null!==this.event.maxExtraPeople,this.event.notifyParticipants=!!this.event.notifyParticipants,this.event.customTickets&&this.event.customTickets.forEach(function(e){var n=JSON.parse(e.dateRanges);t.customTickets.push({id:e.id,enabled:e.enabled,name:e.name,spots:e.spots,waitingListSpots:e.waitingListSpots,price:e.price,translations:e.translations?e.translations:""}),n.length&&n.forEach(function(n){t.customTicketsDateRange.push({tickets:[{id:e.id,name:e.name,price:n.price,enabled:e.enabled}],range:{start:T()(n.startDate).toDate(),end:T()(n.endDate).toDate()}})}),t.setDisabledTicketRangeDates(null,!1)}),this.event.customPricing&&(this.customPricingEnabled=!0),this.customTickets.length&&this.event.bookings.forEach(function(e){e.ticketsData.forEach(function(e){-1===t.soldTicketsIds.indexOf(e.eventTicketId)&&t.soldTicketsIds.push(e.eventTicketId)})}),this.customTicketsDateRange.length&&(this.customTicketsDateRange=this.mergeTicketsWithSameDateRange(this.customTicketsDateRange),this.customPricingByDateRangeEnabled=!0),this.originPeriods=JSON.parse(JSON.stringify(this.event.periods)),this.originRecurring=JSON.parse(JSON.stringify(this.event.recurring)),this.event.recurring&&"monthly"===this.event.recurring.cycle&&this.event.recurring.monthlyRepeat&&(this.monthlyRepeat=this.event.recurring.monthlyRepeat),this.event.recurring&&"monthly"===this.event.recurring.cycle&&this.event.recurring.monthlyOnRepeat&&(this.monthlyOnRepeat=this.event.recurring.monthlyOnRepeat),this.event.recurring&&"monthly"===this.event.recurring.cycle&&this.event.recurring.monthlyOnDay&&(this.monthlyOnDay=this.event.recurring.monthlyOnDay),this.event.recurring&&"monthly"===this.event.recurring.cycle&&"each"===this.event.recurring.monthlyRepeat&&(this.event.recurring.monthDate?this.event.recurring.monthDate=T()(this.event.recurring.monthDate).toDate():this.event.recurring.monthDate=T()(this.event.periods[0].range.start).toDate()),this.event.periods[0].range&&T()(this.event.periods[0].range.start).format("YYYY-MM-DD HH:mm:ss")===this.event.bookingCloses&&(this.event.bookingEndsAfter=!0),this.closeAfterMin=null!==this.event.closeAfterMin,"disabled"===this.event.depositPayment?this.depositEnabled=!1:(this.depositEnabled=!0,this.depositPayment=this.event.depositPayment),null!==this.event.description&&this.event.description.startsWith("\x3c!-- Content --\x3e")&&(this.event.descriptionHtml=this.event.description),this.mounted=!0,this.executeUpdate=!1,this.dialogLoading=!1,this.isCabinet&&(this.activeColor="transparent"))},getZoomUsers:function(){var t=this,e=null;this.isCabinet&&(e=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.get(this.$root.getAjaxUrl+"/zoom/users",e).then(function(e){"data"in e.data&&"users"in e.data.data&&(t.zoomUsers=e.data.data.users)}).catch(function(e){t.notify(t.$root.labels.error,e.message,"error")})},clearValidation:function(){void 0!==this.$refs.event&&this.$refs.event.clearValidate()},getParsedEntity:function(t){var e=this,n=this.createEventPeriods();!this.originRecurring.until&&this.event.isRecurring&&(t=!0);var o=[];this.event.tags.forEach(function(t){o.push({name:t})});var i=this.prepareBookableEntityPaymentsForSave(JSON.parse(JSON.stringify(this.event.settings)));this.depositEnabled?this.event.depositPayment=this.depositPayment:this.event.depositPayment="disabled";for(var a=this.monthDate?this.monthDate:this.event.recurring.monthDate?this.event.recurring.monthDate:null,s=this.customTickets.map(function(t){return{id:t.id%1!=0?null:t.id,name:t.name,price:t.price,spots:t.spots,waitingListSpots:t.waitingListSpots,enabled:t.enabled,dateRanges:[],translations:t.translations}}),r=function(t){for(var n=0;n<e.customTicketsDateRange.length;n++)if(e.customTicketsDateRange[n].tickets.map(function(t){return t.name}).includes(s[t].name)){var o=e.customTicketsDateRange[n].tickets.filter(function(e){return e.name===s[t].name});e.customTicketsDateRange[n].range&&e.customTicketsDateRange[n].range.end&&e.customTicketsDateRange[n].range.start&&s[t].dateRanges.push({enabled:o[0].enabled,endDate:T()(e.customTicketsDateRange[n].range.end).format("YYYY-MM-DD"),startDate:T()(e.customTicketsDateRange[n].range.start).format("YYYY-MM-DD"),price:o[0].price})}},l=0;l<s.length;l++)r(l);s.forEach(function(t){t.dateRanges=JSON.stringify(t.dateRanges)});var c=JSON.parse(JSON.stringify(this.event.providers));if(this.currentUser&&"provider"===this.currentUser.type)if(this.event.organizerId===this.currentUser.id){var u=c.map(function(t){return t.id}).indexOf(this.event.organizerId);u>-1&&c.splice(u,1)}else if(!c.find(function(t){return t.id===e.currentUser.id})){var d=this.employees.find(function(t){return t.id===e.currentUser.id});c.push(d)}return{id:this.event.id,parentId:this.event.parentId,name:this.event.name,periods:n,utc:"UTC"===this.selectedTimeZone,timeZone:"UTC"===this.selectedTimeZone?null:this.selectedTimeZone,bookingOpens:this.event.bookingStartsNow?null:this.getDateString(this.event.bookingStartsDate)+" "+this.event.bookingStartsTime+":00",bookingCloses:this.event.bookingEndsAfter?null:this.getDateString(this.event.bookingEndsDate)+" "+this.event.bookingEndsTime+":00",bookingOpensRec:this.event.bookingOpensRec,bookingClosesRec:this.event.bookingClosesRec,recurring:this.event.isRecurring&&this.event.recurring?{monthlyRepeat:this.monthlyRepeat,monthDate:"each"===this.monthlyRepeat&&a?this.getDateString(a)+" "+this.getTimeString(n[0].periodStart)+":00":null,monthlyOnRepeat:"on"===this.monthlyRepeat?this.monthlyOnRepeat:null,monthlyOnDay:"on"===this.monthlyRepeat?this.monthlyOnDay:null,cycleInterval:this.event.recurring.cycleInterval,cycle:this.event.recurring.cycle,order:this.event.recurring.order,until:this.event.recurring.until?this.getDateString(this.event.recurring.until)+" "+this.getTimeString(this.event.recurring.until)+":00":null}:null,bringingAnyone:this.event.bringingAnyone,bookMultipleTimes:this.event.bookMultipleTimes,maxCapacity:this.event.maxCapacity,maxCustomCapacity:this.maxCustomCapacity?this.maxCustomCapacityNum:null,maxExtraPeople:this.maxExtraPeopleEnabled?this.event.maxExtraPeople:null,price:this.event.price,tags:o,providers:c,description:this.event.description,gallery:this.event.gallery,color:1===this.event.colorType?this.event.selectedColor:this.event.customColor,show:this.event.show,locationId:null!==this.event.locationId?this.event.locationId:null,customLocation:null===this.event.locationId?this.event.customLocation:null,applyGlobally:t,settings:JSON.stringify(i),zoomUserId:this.event.zoomUserId,translations:this.event.translations,deposit:this.event.deposit,depositPayment:this.event.depositPayment,depositPerPerson:this.event.depositPerPerson,fullPayment:this.event.fullPayment,customPricing:this.customPricingEnabled,organizerId:this.event.organizerId,closeAfterMin:this.closeAfterMin?this.event.closeAfterMin:null,closeAfterMinBookings:this.event.closeAfterMinBookings,customTickets:s,notifyParticipants:this.event.notifyParticipants,aggregatedPrice:this.event.aggregatedPrice}},errorCallback:function(t){var e=this;setTimeout(function(){"message"in t&&e.notify(e.$root.labels.error,t.message,"error")},200)},closeDialog:function(){this.$emit("closeDialog")},addEventDate:function(){this.event.periods.push({id:null,eventId:null,range:{start:new Date,end:new Date},startTime:null,endTime:null,bookings:[]})},deleteEventDate:function(t){this.event.periods.splice(t,1)},changeEventColor:function(t){this.event.colorType=1,Array.from(t.target.parentNode.children).forEach(function(t){t.className.includes("color-active")&&t.classList.remove("color-active")}),t.target.className=t.target.className+" color-active",this.event.selectedColor=t.target.getAttribute("data-color")},showDialogTranslate:function(t,e){this.$emit("showDialogTranslate",t,void 0!==e?e:[])},getCycleLabels:function(){var t="";switch(this.event.recurring.cycle){case"daily":t="day";break;case"weekly":t="week";break;case"monthly":t="month";break;case"yearly":t="year"}return this.event.recurring.cycleInterval&&t?this.event.recurring.cycleInterval>1?this.$root.labels[t+"s"].toLowerCase():this.$root.labels[t].toLowerCase():""}},mounted:function(){this.isCabinet?this.currentUser=this.$store.state.cabinet.clonedProfile:this.getCurrentUser(),this.instantiateDialog(),!this.$root.settings.zoom.enabled||this.$root.licence.isLite||this.$root.licence.isStarter||this.getZoomUsers()},updated:function(){this.instantiateDialog()},components:{LicenceBlock:r.a,LicenceBlockHeader:c.a,EntitySettings:h.a,DialogActions:d.a,ContentBlock:P.a,Money:E.Money,Gallery:g.a},computed:{monthDateComp:{get:function(){return this.event.recurring.monthDate?this.event.recurring.monthDate:(this.monthDate||this.event&&this.event.periods&&this.event.periods[0]&&this.event.periods[0].range&&(this.monthDate=this.event.periods[0].range.start),this.monthDate)},set:function(t){this.monthDate=t}}}}},893:function(t,e,n){var o=n(90)(n(894),n(895),!1,null,null,null);t.exports=o.exports},894:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(654),i=n(749),a=n.n(i),s=n(806),r=n.n(s);e.default={mixins:[o.a],props:{label:null,gallery:null},data:function(){return{clonedGallery:null,draggableOptions:{animation:150,group:"people",handle:".am-drag-handle"}}},mounted:function(){this.clonedGallery=JSON.parse(JSON.stringify(this.gallery))},methods:{galleryPictureSelected:function(t,e){this.clonedGallery.push({id:0,pictureFullPath:t,pictureThumbPath:e,position:this.clonedGallery.length+1}),this.$emit("galleryUpdated",this.clonedGallery)},deleteGalleryImage:function(t){this.clonedGallery.splice(t,1);for(var e=0;e<this.clonedGallery.length;e++)this.clonedGallery[e].position=e+1;this.$emit("galleryUpdated",this.clonedGallery)},dropGalleryImage:function(t){if(t.newIndex!==t.oldIndex){var e=this;this.clonedGallery.forEach(function(t){t.position=e.clonedGallery.indexOf(t)+1})}this.$emit("galleryUpdated",this.clonedGallery)}},components:{PictureUpload:r.a,Draggable:a.a}}},895:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-gallery-images"},[n("div",{staticClass:"am-event-section-title"},[t._v(t._s(t.label))]),t._v(" "),n("el-row",{attrs:{gutter:24}},[n("draggable",{attrs:{options:t.draggableOptions},on:{end:t.dropGalleryImage},model:{value:t.clonedGallery,callback:function(e){t.clonedGallery=e},expression:"clonedGallery"}},t._l(t.clonedGallery,function(e,o){return n("el-col",{key:o,attrs:{sm:12}},[n("div",{staticClass:"am-gallery-image-wrapper"},[n("div",{staticClass:"am-gallery-image",style:{"background-image":"url("+e.pictureFullPath+")"}},[n("i",{staticClass:"el-icon-delete",on:{click:function(e){return t.deleteGalleryImage(o)}}})]),t._v(" "),n("div",{staticClass:"am-gallery-image-title"},[n("span",{staticClass:"am-drag-handle"},[n("img",{staticClass:"svg-amelia",attrs:{width:"20px",src:t.$root.getUrl+"public/img/burger-menu.svg"}})]),t._v(" "),n("span",[t._v(t._s(e.pictureFullPath.substring(e.pictureFullPath.lastIndexOf("/")+1)))])])])])}),1),t._v(" "),n("el-col",{attrs:{sm:12}},[n("div",{staticClass:"am-gallery-image-add"},[n("div",[n("picture-upload",{attrs:{multiple:!0,"edited-entity":null,"entity-name":"gallery"},on:{pictureSelected:t.galleryPictureSelected}})],1)])])],1)],1)},staticRenderFns:[]}},896:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-dialog-event-inner"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.loader_message))])])]),t._v(" "),t.event&&!t.dialogLoading?n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==t.event.id}},[t.showHeader?n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[t.event&&0!==t.event.id?n("h2",[t._v(t._s(t.$root.labels.edit_event))]):n("h2",[t._v(t._s(t.$root.labels.new_event))])]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1):t._e(),t._v(" "),t.mounted?n("el-form",{ref:"event",attrs:{model:t.event,"label-position":"top"}},[n("el-tabs",{model:{value:t.defaultEventTab,callback:function(e){t.defaultEventTab=e},expression:"defaultEventTab"}},[n("el-tab-pane",{attrs:{label:t.$root.labels.event_details,name:"details"}},[n("el-form-item",{attrs:{prop:"name",rules:t.rules.name},on:{input:function(e){return t.clearValidation()}}},[t._v("\n "+t._s(t.$root.labels.event_name)+"\n "),t.isCabinet?t._e():n("div",{staticClass:"am-event-translate",on:{click:function(e){return t.showDialogTranslate("name")}}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:t.$root.getUrl+"public/img/translate.svg"}}),t._v("\n "+t._s(t.$root.labels.translate)+"\n ")]),t._v(" "),n("el-input",{staticStyle:{"margin-top":"5px !important"},attrs:{placeholder:t.$root.labels.enter_event_name},on:{change:function(e){return t.trimProperty(t.event,"name")}},model:{value:t.event.name,callback:function(e){t.$set(t.event,"name",e)},expression:"event.name"}})],1),t._v(" "),n("div",{staticClass:"am-event-dates am-section-grey"},[t._l(t.event.periods,function(e,o){return n("div",{key:o,staticClass:"am-event-date"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:6}},[n("p",[t._v(t._s(t.$root.labels.event_period_dates))])]),t._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{sm:16}},[n("el-form-item",{attrs:{prop:"periods."+o+".range",rules:t.rules.range}},[n("v-date-picker",{staticStyle:{"margin-bottom":"16px"},attrs:{mode:"range","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom","popover-align":t.screenWidth<768?"center":"right","show-day-popover":!1,attributes:[{dates:{start:t.getNowDate()},eventDateIndex:o}],"is-expanded":!1,"is-required":!1,"is-read-only":!0,"is-double-paned":!1,"tint-color":t.isCabinet?t.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:t.vCalendarFormats,"available-dates":{start:t.getNowDate()}},on:{input:function(e){return t.setDisabledTicketRangeDates(null,!1)}},model:{value:e.range,callback:function(n){t.$set(e,"range",n)},expression:"period.range"}})],1)],1)],1),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:6}},[n("p",[t._v(t._s(t.$root.labels.event_period_time))])]),t._v(" "),n("el-col",{staticClass:"am-event-period-start",attrs:{sm:8}},[n("el-form-item",{attrs:{prop:"periods."+o+".startTime",rules:t.rules.startTime}},[n("el-time-select",{attrs:{"picker-options":t.getTimeSelectOptionsWithLimits(null,e.endTime),"popper-class":"am-dropdown-cabinet",size:"large"},model:{value:e.startTime,callback:function(n){t.$set(e,"startTime",n)},expression:"period.startTime"}})],1)],1),t._v(" "),n("el-col",{attrs:{sm:8}},[n("el-form-item",{attrs:{prop:"periods."+o+".endTime",rules:t.rules.endTime}},[n("el-time-select",{attrs:{"picker-options":t.getTimeSelectOptionsWithLimits(e.startTime,null),"popper-class":"am-dropdown-cabinet",size:"large"},model:{value:e.endTime,callback:function(n){t.$set(e,"endTime",n)},expression:"period.endTime"}})],1)],1)],1),t._v(" "),t.$root.settings.zoom.enabled&&e.zoomMeeting&&!t.$root.licence.isLite&&!t.$root.licence.isStarter?n("el-row",{attrs:{gutter:10}},["customer"!==t.$root.settings.role?n("el-col",{attrs:{sm:12}},[n("p",[t._v(t._s(t.$root.labels.zoom_start_link))])]):t._e(),t._v(" "),"customer"!==t.$root.settings.role?n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:e.zoomMeeting.startUrl}},[t._v(t._s(t.$root.labels.zoom_click_to_start))])])]):t._e(),t._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[t._v(t._s(t.$root.labels.zoom_join_link))])]),t._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:e.zoomMeeting.joinUrl}},[t._v(t._s(t.$root.labels.zoom_click_to_join))])])])],1):t._e(),t._v(" "),t.$root.settings.googleCalendar.googleMeetEnabled&&e.googleMeetUrl&&!t.$root.licence.isLite&&!t.$root.licence.isStarter?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:12}},[n("p",[t._v(t._s(t.$root.labels.google_meet_link))])]),t._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:e.googleMeetUrl}},[t._v(t._s(t.$root.labels.google_meet_join))])])])],1):t._e(),t._v(" "),t.$root.settings.outlookCalendar.microsoftTeamsEnabled&&e.microsoftTeamsUrl&&!t.$root.licence.isLite&&!t.$root.licence.isStarter?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:12}},[n("p",[t._v(t._s(t.$root.labels.microsoft_teams_link))])]),t._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:e.microsoftTeamsUrl}},[t._v(t._s(t.$root.labels.microsoft_teams_join))])])])],1):t._e(),t._v(" "),t.$root.settings.lessonSpace.enabled&&e.lessonSpace?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:12}},[n("p",[t._v(t._s(t.$root.labels.lesson_space_link))])]),t._v(" "),n("el-col",{attrs:{sm:12}},[n("p",[n("a",{staticClass:"am-link",attrs:{href:e.lessonSpace}},[t._v(t._s(t.$root.labels.lesson_space_join))])])])],1):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.event.periods.length>1&&0===e.bookings.length,expression:"event.periods.length > 1 && period.bookings.length === 0"}],staticClass:"am-delete-element disabled",on:{click:function(e){return t.deleteEventDate(o)}}},[n("i",{staticClass:"el-icon-minus"})])],1)}),t._v(" "),n("div",{staticClass:"am-add-event-date"},[n("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.addEventDate()}}},[t._v(t._s(t.$root.labels.add_date))])],1)],2),t._v(" "),t.isCabinet&&t.notInLicence()?t._e():n("div",{staticClass:"am-section-grey",class:t.licenceClass()},[n("el-checkbox",{attrs:{disabled:t.notInLicence()},on:{change:t.changeRecurringCycle},model:{value:t.event.isRecurring,callback:function(e){t.$set(t.event,"isRecurring",e)},expression:"event.isRecurring"}},[t._v("\n "+t._s(t.$root.labels.event_recurring_enabled)+"\n ")]),t._v(" "),t.event.isRecurring?n("div",{staticClass:"am-recurring-event"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[n("p",[t._v(t._s(t.$root.labels.event_recurring_period))])]),t._v(" "),n("el-col",{attrs:{lg:14,md:14,sm:24}},[n("el-form-item",{attrs:{prop:"recurringCycle",rules:t.rules.recurringCycle}},[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:t.$root.labels.select_repeat_period,"popper-class":"am-dropdown-cabinet",disabled:!(0===t.event.id||0!==t.event.id&&null===t.originRecurring.cycle)},model:{value:t.event.recurring.cycle,callback:function(e){t.$set(t.event.recurring,"cycle",e)},expression:"event.recurring.cycle"}},t._l(t.recurringPeriods,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1)],1)],1),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[n("p",[t._v(t._s(t.$root.labels.recurring_every))])]),t._v(" "),n("el-col",{attrs:{lg:14,md:14,sm:24}},[n("el-form-item",{attrs:{prop:"recurringInterval",rules:t.rules.recurringInterval}},[n("div",{staticClass:"am-recurring-event-interval"},[n("el-input-number",{staticStyle:{width:"150px"},attrs:{min:1,disabled:0!==t.event.id&&null!==t.originRecurring.cycle},model:{value:t.event.recurring.cycleInterval,callback:function(e){t.$set(t.event.recurring,"cycleInterval",e)},expression:"event.recurring.cycleInterval"}}),t._v(" "),n("span",{staticStyle:{"margin-left":"16px"}},[t._v(t._s(t.getCycleLabels()))])],1)])],1)],1),t._v(" "),0===t.event.id&&"monthly"===t.event.recurring.cycle||0!==t.event.id&&"each"===t.originRecurring.monthlyRepeat&&"monthly"===t.originRecurring.cycle?n("el-row",{attrs:{gutter:10}},[n("el-col",{staticClass:"text-center",attrs:{lg:10,md:10,sm:24}},[0===t.event.id||0!==t.event.id&&null===t.originRecurring.cycle?n("el-radio",{attrs:{label:"each"},model:{value:t.monthlyRepeat,callback:function(e){t.monthlyRepeat=e},expression:"monthlyRepeat"}},[t._v("\n "+t._s(t.$root.labels.recurring_each)+"\n ")]):n("p",[t._v("\n "+t._s(t.$root.labels.recurring_each)+"\n ")])],1),t._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{lg:14,md:14,sm:24}},[n("el-form-item",["each"===t.monthlyRepeat&&(0===t.event.id||0!==t.event.id&&null===t.originRecurring.cycle)?n("v-date-picker",{attrs:{mode:"single","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":t.screenWidth<768?"bottom":"top","popover-align":(t.screenWidth,"center"),"tint-color":t.isCabinet?t.$root.settings.customization.primaryColor:"#1A84EE","is-expanded":!1,"is-required":!1,"is-double-paned":!1,"show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},formats:t.vCalendarFormats,"min-date":t.calculateMinDate(),"max-date":t.calculateMaxDate()},model:{value:t.monthDateComp,callback:function(e){t.monthDateComp=e},expression:"monthDateComp"}}):n("el-input",{attrs:{disabled:!0,value:t.event.recurring&&t.event.recurring.monthDate?t.getFrontedFormattedDate(t.getDatabaseFormattedDate(t.event.recurring.monthDate)):""}})],1)],1)],1):t._e(),t._v(" "),0===t.event.id&&"monthly"===t.event.recurring.cycle||0!==t.event.id&&"on"===t.originRecurring.monthlyRepeat&&"monthly"===t.originRecurring.cycle?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[0===t.event.id||0!==t.event.id&&null===t.originRecurring.cycle?n("el-radio",{attrs:{label:"on"},model:{value:t.monthlyRepeat,callback:function(e){t.monthlyRepeat=e},expression:"monthlyRepeat"}},[t._v("\n "+t._s(t.$root.labels.recurring_on)+"\n ")]):n("p",[t._v(t._s(t.$root.labels.recurring_on))])],1),t._v(" "),n("el-col",{staticClass:"text-center",attrs:{lg:14,md:14,sm:24}},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-form-item",[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:t.monthlyWeekDayRepeat[0].label,"popper-class":"am-dropdown-cabinet",disabled:"each"===t.monthlyRepeat||!(0===t.event.id||0!==t.event.id&&null===t.originRecurring.cycle)},model:{value:t.monthlyOnRepeat,callback:function(e){t.monthlyOnRepeat=e},expression:"monthlyOnRepeat"}},t._l(t.monthlyWeekDayRepeat,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1)],1),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-form-item",[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:t.weekDays[0].label,"popper-class":"am-dropdown-cabinet",disabled:"each"===t.monthlyRepeat||!(0===t.event.id||0!==t.event.id&&null===t.originRecurring.cycle)},model:{value:t.monthlyOnDay,callback:function(e){t.monthlyOnDay=e},expression:"monthlyOnDay"}},t._l(t.weekDays,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1)],1)],1)],1)],1):t._e(),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:10,md:10,sm:24}},[n("p",[t._v(t._s(t.$root.labels.event_recurring_until))])]),t._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{lg:14,md:14,sm:24}},[n("el-form-item",{attrs:{prop:"recurringUntilDate",rules:t.rules.recurringUntilDate}},[n("v-date-picker",{attrs:{mode:"single","input-class":"el-input__inner","popover-visibility":"focus","is-expanded":!1,"is-required":!1,"is-double-paned":!1,"show-day-popover":!1,"popover-direction":t.screenWidth<768?"bottom":"top","popover-align":(t.screenWidth,"center"),"tint-color":t.isCabinet?t.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:t.vCalendarFormats,"available-dates":{start:0===t.event.id?t.getNowDate():t.originRecurring.until}},on:{dayclick:t.changeBookingEndsDate},model:{value:t.event.recurring.until,callback:function(e){t.$set(t.event.recurring,"until",e)},expression:"event.recurring.until"}})],1)],1)],1)],1):t._e(),t._v(" "),n("LicenceBlock")],1),t._v(" "),n("div",{staticClass:"am-section-grey"},[n("el-checkbox",{model:{value:t.event.bookingStartsNow,callback:function(e){t.$set(t.event,"bookingStartsNow",e)},expression:"event.bookingStartsNow"}},[t._v(t._s(t.$root.labels.event_booking_opens_now))]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.event.bookingStartsNow,expression:"!event.bookingStartsNow"}],staticClass:"am-booking-starts"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:24}},[n("label",{staticClass:"el-form-item__label"},[t._v(t._s(t.$root.labels.event_booking_opens_on))])]),t._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{sm:15}},[n("el-form-item",{attrs:{prop:"bookingStartsDate",rules:t.rules.bookingStartsDate}},[n("v-date-picker",{attrs:{"is-double-paned":!1,mode:"single","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom","popover-align":t.screenWidth<768?"center":"left","is-expanded":!1,"is-required":!1,"show-day-popover":!1,"tint-color":t.isCabinet?t.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:t.vCalendarFormats,"available-dates":{start:t.getNowDate(),end:t.getMaxEndPeriod()}},on:{dayclick:t.changeBookingStartsDate},model:{value:t.event.bookingStartsDate,callback:function(e){t.$set(t.event,"bookingStartsDate",e)},expression:"event.bookingStartsDate"}})],1)],1),t._v(" "),n("el-col",{attrs:{sm:9}},[n("el-form-item",{attrs:{prop:"bookingStartsTime",rules:t.rules.bookingStartsTime}},[n("el-time-select",{attrs:{size:"large","popper-class":"am-dropdown-cabinet","picker-options":t.getTimeSelectOptionsWithLimits(null,null)},model:{value:t.event.bookingStartsTime,callback:function(e){t.$set(t.event,"bookingStartsTime",e)},expression:"event.bookingStartsTime"}})],1)],1)],1)],1),t._v(" "),t.event.isRecurring?n("div",[n("el-checkbox",{attrs:{"true-label":"same","false-label":"calculate"},model:{value:t.event.bookingOpensRec,callback:function(e){t.$set(t.event,"bookingOpensRec",e)},expression:"event.bookingOpensRec"}},[t._v("\n "+t._s(t.$root.labels.apply_to_all)+"\n ")]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.event_booking_opens_apply)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1):t._e()],1),t._v(" "),n("div",{staticClass:"am-section-grey"},[n("el-checkbox",{model:{value:t.event.bookingEndsAfter,callback:function(e){t.$set(t.event,"bookingEndsAfter",e)},expression:"event.bookingEndsAfter"}},[t._v(t._s(t.$root.labels.event_booking_closes_after))]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.event.bookingEndsAfter,expression:"!event.bookingEndsAfter"}],staticClass:"am-booking-ends"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{sm:24}},[n("label",{staticClass:"el-form-item__label"},[t._v(t._s(t.$root.labels.event_booking_closes_on))])]),t._v(" "),n("el-col",{staticClass:"v-calendar-column",attrs:{sm:15}},[n("el-form-item",{attrs:{prop:"bookingEndsDate",rules:t.rules.bookingEndsDate}},[n("v-date-picker",{attrs:{mode:"single","input-class":"el-input__inner","popover-visibility":"focus","popover-direction":"bottom","popover-align":t.screenWidth<768?"center":"left","is-double-paned":!1,"is-required":!1,"is-expanded":!1,"show-day-popover":!1,"tint-color":t.isCabinet?t.$root.settings.customization.primaryColor:"#1A84EE","input-props":{class:"el-input__inner",readOnly:"readonly"},formats:t.vCalendarFormats,"available-dates":{start:t.getNowDate(),end:t.getMaxEndPeriod()}},on:{dayclick:t.changeBookingEndsDate},model:{value:t.event.bookingEndsDate,callback:function(e){t.$set(t.event,"bookingEndsDate",e)},expression:"event.bookingEndsDate"}})],1)],1),t._v(" "),n("el-col",{attrs:{sm:9}},[n("el-form-item",{attrs:{prop:"bookingEndsTime",rules:t.rules.bookingEndsTime}},[n("el-time-select",{attrs:{"popper-class":"am-dropdown-cabinet","picker-options":t.getTimeSelectOptionsWithLimits(null,null),size:"large"},model:{value:t.event.bookingEndsTime,callback:function(e){t.$set(t.event,"bookingEndsTime",e)},expression:"event.bookingEndsTime"}})],1)],1)],1)],1),t._v(" "),t.event.isRecurring?n("div",[n("el-checkbox",{attrs:{"true-label":"same","false-label":"calculate"},model:{value:t.event.bookingClosesRec,callback:function(e){t.$set(t.event,"bookingClosesRec",e)},expression:"event.bookingClosesRec"}},[t._v("\n "+t._s(t.$root.labels.apply_to_all)+"\n ")]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.event_booking_closes_apply)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1):t._e()],1),t._v(" "),n("div",{staticClass:"am-border-bottom"},[t.locations.length?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[t._v(t._s(t.$root.labels.event_select_address))])]),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{placeholder:t.$root.labels.select,"popper-class":"am-dropdown-cabinet",clearable:!0,filterable:!0,value:null},model:{value:t.event.locationId,callback:function(e){t.$set(t.event,"locationId",e)},expression:"event.locationId"}},[n("el-option",{key:null,attrs:{label:this.$root.labels.event_custom_address,value:null}}),t._v(" "),t._l(t.locations,function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})],2)],1)],1):t._e(),t._v(" "),n("el-row",{directives:[{name:"show",rawName:"v-show",value:!t.event.locationId,expression:"!event.locationId"}],attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[t._v(t._s(t.$root.labels.event_custom_address))])]),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-input",{attrs:{placeholder:t.$root.labels.enter_address},model:{value:t.event.customLocation,callback:function(e){t.$set(t.event,"customLocation",e)},expression:"event.customLocation"}})],1)],1)],1),t._v(" "),n("div",{staticClass:"am-border-bottom"},[!t.$root.settings.zoom.enabled||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[t._v(t._s(t.$root.labels.zoom_user))])]),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{clearable:"",filterable:"",placeholder:t.$root.labels.zoom_user_placeholder,"popper-class":"am-dropdown-cabinet"},on:{change:function(e){return t.clearValidation()}},model:{value:t.event.zoomUserId,callback:function(e){t.$set(t.event,"zoomUserId",e)},expression:"event.zoomUserId"}},t._l(t.zoomUsers,function(t,e){return n("el-option",{key:e,attrs:{label:t.first_name+" "+t.last_name+" ("+t.email+")",value:t.id}})}),1)],1)],1),t._v(" "),!t.canManage()||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("span",{staticStyle:{"line-height":"40px"}},[t._v("\n "+t._s(t.$root.labels.event_organizer)+"\n ")]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.event_organizer_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{"value-key":"id",clearable:"",placeholder:t.$root.labels.select,"popper-class":"am-dropdown-cabinet"},model:{value:t.event.organizerId,callback:function(e){t.$set(t.event,"organizerId",e)},expression:"event.organizerId"}},t._l(t.employees,function(t){return n("el-option",{key:t.id,attrs:{label:t.firstName+" "+t.lastName,value:t.id}})}),1)],1)],1),t._v(" "),!t.currentUser||"provider"!==t.currentUser.type||t.$root.licence.isLite||t.$root.licence.isStarter?t._e():n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("span",{staticStyle:{"line-height":"40px"}},[t._v("\n "+t._s(t.$root.labels.event_organizer)+"\n ")]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.event_organizer_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-checkbox",{staticStyle:{"line-height":"40px"},attrs:{value:t.event.organizerId===t.currentUser.id,disabled:0!==t.event.id&&t.event.organizerId&&t.event.organizerId!==t.currentUser.id},on:{change:function(e){return t.assignOrganizer(e)}}})],1)],1),t._v(" "),t.canManage()?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[t._v(t._s(t.$root.labels.event_staff))])]),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{multiple:"","value-key":"id",placeholder:t.$root.labels.select,"popper-class":"am-dropdown-cabinet"},model:{value:t.event.providers,callback:function(e){t.$set(t.event,"providers",e)},expression:"event.providers"}},t._l(t.employees,function(t){return n("el-option",{key:t.id,attrs:{label:t.firstName+" "+t.lastName,value:t}})}),1)],1)],1):t._e(),t._v(" "),t.isCabinet&&t.notInLicence("starter")?t._e():n("div",{class:t.licenceClass("starter"),style:{marginLeft:t.notInLicence("starter")?"":"0px;",marginRight:t.notInLicence("starter")?"":"0px;"}},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[t._v(t._s(t.$root.labels.event_tags))])]),t._v(" "),n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("el-select",{attrs:{disabled:t.notInLicence("starter"),multiple:"",filterable:"","allow-create":"","default-first-option":"",placeholder:t.$root.labels.event_tags_select_or_create,"popper-class":"am-dropdown-cabinet","no-data-text":t.$root.labels.event_tags_create,"collapse-tags":""},on:{change:t.tagsChanged},model:{value:t.event.tags,callback:function(e){t.$set(t.event,"tags",e)},expression:"event.tags"}},t._l(t.tags,function(e,o){return e?n("el-option",{key:o,attrs:{label:e,value:e}}):t._e()}),1)],1)],1),t._v(" "),n("LicenceBlock",{attrs:{licence:"starter"}})],1)],1),t._v(" "),"customer"!==this.$root.settings.role&&0!==t.event.id?n("el-form-item",{staticStyle:{"margin-top":"20px"}},[n("el-checkbox",{on:{change:function(e){return t.clearValidation()}},model:{value:t.event.notifyParticipants,callback:function(e){t.$set(t.event,"notifyParticipants",e)},expression:"event.notifyParticipants"}},[t._v("\n "+t._s(t.$root.labels.notify_attendees)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.notify_attendees_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):t._e(),t._v(" "),n("content-block",{staticStyle:{"margin-top":"20px"},attrs:{label:t.$root.labels.description,entity:t.event,textProperty:"description",htmlProperty:"descriptionHtml",hasTranslation:!t.isCabinet,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{showDialogTranslate:function(e){return t.showDialogTranslate("description")}}})],1),t._v(" "),n("el-tab-pane",{attrs:{label:t.$root.labels.pricing,name:"pricing"}},[0!==t.event.id&&t.event.bookings.length&&!t.$root.licence.isLite?n("el-row",{style:{wordBreak:"break-word"}},[n("div",{staticClass:"am-setting"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.custom_pricing_adjustment,closable:!1}})],1)]):t._e(),t._v(" "),n("div",{staticClass:"am-pricing"},[n("el-row",{style:{padding:0},attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.price)+":\n ")]),t._v(" "),n("div",{staticClass:"el-input",class:{"is-disabled":t.customPricingEnabled},style:{marginBottom:"0px"}},[t.customPricingEnabled?n("money",t._b({staticClass:"el-input el-input__inner",on:{input:t.priceChanged},model:{value:t.customPrice,callback:function(e){t.customPrice=e},expression:"customPrice"}},"money",t.moneyComponentData,!1)):n("money",t._b({staticClass:"el-input el-input__inner",on:{input:t.priceChanged},model:{value:t.event.price,callback:function(e){t.$set(t.event,"price",e)},expression:"event.price"}},"money",t.moneyComponentData,!1))],1)])],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.event_max_capacity)+":\n ")]),t._v(" "),n("el-input-number",{attrs:{min:1,disabled:t.customPricingEnabled},model:{value:t.event.maxCapacity,callback:function(e){t.$set(t.event,"maxCapacity",e)},expression:"event.maxCapacity"}})],1)],1)],1),t._v(" "),t.event.maxCapacity>1||t.getTicketsSpots()>1||t.maxCustomCapacityNum>1?n("div",[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:24,md:24,sm:24}},[n("el-checkbox",{model:{value:t.event.bringingAnyone,callback:function(e){t.$set(t.event,"bringingAnyone",e)},expression:"event.bringingAnyone"}},[t._v(t._s(t.$root.labels.event_bringing_anyone))])],1)],1),t._v(" "),t.event.bringingAnyone?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:24,md:24,sm:24}},[n("el-checkbox",{model:{value:t.event.aggregatedPrice,callback:function(e){t.$set(t.event,"aggregatedPrice",e)},expression:"event.aggregatedPrice"}},[t._v(t._s(t.$root.labels.event_aggregated_price))])],1)],1):t._e(),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:24,md:24,sm:24}},[n("el-checkbox",{model:{value:t.event.bookMultipleTimes,callback:function(e){t.$set(t.event,"bookMultipleTimes",e)},expression:"event.bookMultipleTimes"}},[t._v(t._s(t.$root.labels.event_book_more_than_once))])],1)],1)],1):t._e(),t._v(" "),n("div",[t.isCabinet&&t.notInLicence()?t._e():n("div",{staticClass:"am-setting-box am-switch-box",class:t.licenceClass(),staticStyle:{"margin-top":"20px"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[t._v("\n "+t._s(t.$root.labels.deposit_enabled)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{disabled:t.notInLicence(),"active-text":"","inactive-text":""},on:{change:t.depositEnabledChanged},model:{value:t.depositEnabled,callback:function(e){t.depositEnabled=e},expression:"depositEnabled"}})],1)],1),t._v(" "),t.depositEnabled?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.deposit_payment)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.deposit_payment_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-select",{attrs:{placeholder:"","popper-class":"am-dropdown-cabinet"},on:{change:function(e){return t.depositChanged()}},model:{value:t.depositPayment,callback:function(e){t.depositPayment=e},expression:"depositPayment"}},t._l(t.depositOptions,function(t,e){return n("el-option",{key:e,attrs:{label:t.label,value:t.value}})}),1)],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{prop:"deposit",rules:t.rules.deposit}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.deposit_amount+("fixed"===t.depositPayment?" ("+t.getCurrencySymbol()+")":"")+("percentage"===t.depositPayment?" (%)":"")+":")+"\n ")]),t._v(" "),"fixed"===t.depositPayment?n("div",{staticClass:"el-input"},[n("money",t._b({staticClass:"el-input__inner",on:{input:t.depositChanged},model:{value:t.event.deposit,callback:function(e){t.$set(t.event,"deposit",e)},expression:"event.deposit"}},"money",t.moneyComponentData,!1))],1):t._e(),t._v(" "),"percentage"===t.depositPayment?n("el-input-number",{attrs:{min:0,max:100},on:{input:function(e){return t.depositChanged()}},model:{value:t.event.deposit,callback:function(e){t.$set(t.event,"deposit",e)},expression:"event.deposit"}}):t._e()],1)],1)],1):t._e(),t._v(" "),(t.event.maxCapacity>1||t.getTicketsSpots()>1||t.maxCustomCapacityNum>1)&&"fixed"===t.depositPayment&&t.depositEnabled&&t.event.aggregatedPrice?n("el-row",[n("el-col",[n("el-checkbox",{model:{value:t.event.depositPerPerson,callback:function(e){t.$set(t.event,"depositPerPerson",e)},expression:"event.depositPerPerson"}},[t._v("\n "+t._s(t.$root.labels.deposit_per_person)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.deposit_by_the_number_of_people)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):t._e(),t._v(" "),t.depositEnabled?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",{attrs:{span:24}},[n("el-checkbox",{model:{value:t.event.fullPayment,callback:function(e){t.$set(t.event,"fullPayment",e)},expression:"event.fullPayment"}},[t._v("\n "+t._s(t.$root.labels.allow_total_event_amount)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.allow_customers_to_pay_total)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):t._e(),t._v(" "),n("LicenceBlock")],1)]),t._v(" "),t.isCabinet&&t.notInLicence()?t._e():n("div",{staticClass:"am-setting-box am-switch-box",class:t.licenceClass(),style:{marginTop:"24px",overflow:"visible",cursor:0!==t.event.id&&t.event.bookings.length?"not-allowed":"auto"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[t._v("\n "+t._s(t.$root.labels.custom_pricing_enabled)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{style:0!==t.event.id&&t.event.bookings.length&&{cursor:"not-allowed",pointerEvents:"none"},attrs:{disabled:t.notInLicence(),"active-text":"","inactive-text":""},on:{change:t.switchTicketing},model:{value:t.customPricingEnabled,callback:function(e){t.customPricingEnabled=e},expression:"customPricingEnabled"}})],1)],1),t._v(" "),t.customPricingEnabled?n("el-form-item",[n("el-row",{style:{flexWrap:"wrap"}},[n("el-col",{staticClass:"am-event-ticket-row",style:{marginBottom:"12px"}},[n("el-row",{style:{borderBottom:"1px solid #E2E6EC",padding:"12px",marginBottom:"8px",wordBreak:"break-word"},attrs:{type:"flex",gutter:24}},[n("el-col",{attrs:{span:2}}),t._v(" "),n("el-col",{attrs:{span:7}},[n("div",[t._v("\n "+t._s(t.$root.labels.name)+"\n "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$root.labels.translate,placement:"top"}},[t.isCabinet?t._e():n("span",{staticClass:"am-event-translate-ticket",on:{click:function(e){return t.showDialogTranslate("name",t.customTickets)}}},[n("img",{staticClass:"am-dialog-translate-svg",attrs:{width:"16px",src:t.$root.getUrl+"public/img/translate.svg"}})])])],1)]),t._v(" "),n("el-col",{attrs:{span:6}},[t._v(t._s(t.$root.labels.price))]),t._v(" "),n("el-col",{attrs:{span:7}},[t._v(t._s(t.$root.labels.event_spots))])],1),t._v(" "),t._l(t.customTickets,function(e,o){return n("el-row",{key:o,staticClass:"am-section-grey",style:{padding:"12px",background:"#F9FAFB",marginBottom:"12px"},attrs:{type:"flex",align:"middle",gutter:24},model:{value:t.customTickets[o],callback:function(e){t.$set(t.customTickets,o,e)},expression:"customTickets[index]"}},[n("el-col",{attrs:{span:2}},[n("el-checkbox",{style:{marginBottom:"0px"},attrs:{disabled:t.isTicketDisabled(o)},model:{value:e.enabled,callback:function(n){t.$set(e,"enabled",n)},expression:"ticket.enabled"}})],1),t._v(" "),n("el-col",{attrs:{span:7}},[n("el-input",{style:{marginBottom:"0px"},attrs:{size:"small"},on:{input:function(e){return t.customTicketNameChanged(e,o)}},model:{value:e.name,callback:function(n){t.$set(e,"name",n)},expression:"ticket.name"}})],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("money",t._b({staticClass:"el-input el-input__inner",style:{marginBottom:"0px",padding:"0 6px",textAlign:"center",height:"auto"},on:{input:t.priceChanged},model:{value:e.price,callback:function(n){t.$set(e,"price",n)},expression:"ticket.price"}},"money",t.moneyComponentData,!1))],1),t._v(" "),n("el-col",{attrs:{span:7}},[n("el-input-number",{style:{marginBottom:"0px",textAlign:"center"},attrs:{size:"small",min:1,disabled:t.maxCustomCapacity},on:{change:function(t){e.spots=e.spots<=0?1:e.spots}},model:{value:e.spots,callback:function(n){t.$set(e,"spots",n)},expression:"ticket.spots"}})],1),t._v(" "),t.customTickets.length>1?n("el-col",{style:{display:"flex",justifyContent:"center"},attrs:{span:2}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.ticketIsBooked(e.id),expression:"ticketIsBooked(ticket.id)"}],staticClass:"am-delete-element",on:{click:function(e){return t.deleteCustomTicket(o)}}},[n("i",{staticClass:"el-icon-minus"})])]):t._e()],1)}),t._v(" "),n("el-row",{style:{padding:"12px 0"}},[n("el-col",[n("div",{staticClass:"am-add-element",on:{click:t.addCustomTicket}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",[t._v("\n "+t._s(t.$root.labels.add_ticket_category)+"\n ")])])])],1),t._v(" "),t.customTickets.length?n("el-row",{staticStyle:{padding:"12px 0"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:13}},[n("el-checkbox",{model:{value:t.maxCustomCapacity,callback:function(e){t.maxCustomCapacity=e},expression:"maxCustomCapacity"}},[t._v("\n "+t._s(t.$root.labels.event_max_capacity)+":\n ")])],1),t._v(" "),n("el-col",{attrs:{span:11}},[n("el-input-number",{staticStyle:{"text-align":"center"},attrs:{min:1,disabled:!t.maxCustomCapacity,size:"small"},model:{value:t.maxCustomCapacityNum,callback:function(e){t.maxCustomCapacityNum=e},expression:"maxCustomCapacityNum"}})],1)],1):t._e(),t._v(" "),t.maxCustomCapacity?t._e():n("el-row",{style:{borderBottom:t.customTickets.length?"1px solid #E2E6EC":"",marginBottom:"12px",wordBreak:"break-word"}},[n("div",{staticClass:"am-setting"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.custom_pricing_warning,closable:!1}})],1)])],2)],1),t._v(" "),t.customTickets.length?n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[t._v("\n "+t._s(t.$root.labels.pricing_by_date_enabled)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":"",disabled:!t.event.periods[0].range},model:{value:t.customPricingByDateRangeEnabled,callback:function(e){t.customPricingByDateRangeEnabled=e},expression:"customPricingByDateRangeEnabled"}})],1)],1):t._e(),t._v(" "),t.event.periods[0].range?t._e():n("el-row",{style:{borderBottom:t.customTickets.length?"1px solid #E2E6EC":"",marginBottom:"12px",marginTop:"12px",wordBreak:"break-word"}},[n("div",{staticClass:"am-setting"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.custom_pricing_date_warning,closable:!1}})],1)]),t._v(" "),t.customPricingByDateRangeEnabled?n("el-row",{staticStyle:{"margin-bottom":"50px"}},[t._l(t.customTicketsDateRange,function(e,o){return n("el-col",{key:o,staticClass:"am-section-grey",style:{background:"#F9FAFB",padding:"8px 12px",marginTop:0===o?"10px":"12px",overflow:"visible"}},[n("el-row",{style:{minHeight:"50px",borderBottom:"1px solid #E2E6EC",display:"flex",alignItems:"baseline",padding:"8px 0"}},[n("el-col",{style:{marginBottom:0,fontWeight:500},attrs:{span:5}},[t._v(t._s(t.$root.labels.event_date_range))]),t._v(" "),n("el-col",{staticClass:"v-calendar-column",staticStyle:{overflow:"visible"},attrs:{span:17}},[n("el-form-item",[n("v-date-picker",{staticStyle:{"margin-bottom":"0"},attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","popover-align":t.screenWidth<768?"center":"right","tint-color":t.isCabinet?t.$root.settings.customization.primaryColor:"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},"is-expanded":!1,"is-required":!1,"is-read-only":!0,"input-class":"el-input__inner",formats:t.vCalendarFormats,"min-date":t.getStartTicketRangeDate("date",!1),"max-date":t.getEndTicketRangeDate("date",!1),"disabled-dates":t.customTicketsDateRangesSelected},on:{input:function(e){return t.setDisabledTicketRangeDates(null,!1)}},model:{value:t.customTicketsDateRange[o].range,callback:function(e){t.$set(t.customTicketsDateRange[o],"range",e)},expression:"customTicketsDateRange[i].range"}}),t._v(" "),n("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:function(e){return t.clearRange(o)}}},[n("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})])],1)],1),t._v(" "),n("el-col",{attrs:{span:2}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.ticketIsBooked(e.id),expression:"ticketIsBooked(ticket.id)"}],staticClass:"am-delete-element",staticStyle:{"margin-left":"10px"},on:{click:function(e){return t.deleteCustomTicketDateRange(o)}}},[n("i",{staticClass:"el-icon-minus"})])])],1),t._v(" "),t._l(t.customTicketsDateRange[o].tickets,function(e,i){return n("el-row",{key:o+""+i,style:{minHeight:"50px",borderBottom:i<t.customTicketsDateRange[o].tickets.length-1?"1px solid #E2E6EC":"",display:"flex",alignItems:"center",padding:"8px 0"}},[n("el-col",{attrs:{span:5}},[t._v(t._s(e.name))]),t._v(" "),n("el-col",{attrs:{span:12}}),t._v(" "),n("el-col",{attrs:{span:5}},[n("money",t._b({staticClass:"el-input el-input__inner",style:{marginBottom:"0px",padding:"0 6px"},model:{value:t.customTicketsDateRange[o].tickets[i].price,callback:function(e){t.$set(t.customTicketsDateRange[o].tickets[i],"price",e)},expression:"customTicketsDateRange[i].tickets[index].price"}},"money",t.moneyComponentData,!1),[t._v("\n >\n ")])],1),t._v(" "),n("el-col",{attrs:{span:2}})],1)})],2)}),t._v(" "),n("el-col",{style:{marginTop:"18px"},attrs:{span:24}},[n("div",{staticClass:"am-add-element",on:{click:t.addCustomTicketDateRange}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",[t._v("\n "+t._s(t.$root.labels.event_add_date_range)+"\n ")])])]),t._v(" "),n("el-col",{style:{marginTop:"14px",wordBreak:"break-word"},attrs:{span:24}},[n("div",{staticClass:"am-tickets-warning"},[n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.event_date_range_warning,closable:!1}})],1)])],2):t._e()],1):t._e(),t._v(" "),n("LicenceBlock")],1),t._v(" "),t.event.maxCapacity>1||t.getTicketsSpots()>1||t.maxCustomCapacityNum>1?n("div",[n("div",{staticClass:"am-setting-box am-switch-box am-event-close-after",staticStyle:{"margin-top":"20px"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[t._v("\n "+t._s(t.$root.labels.event_close_after_min)+"\n ")]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{model:{value:t.closeAfterMin,callback:function(e){t.closeAfterMin=e},expression:"closeAfterMin"}})],1)],1),t._v(" "),t.closeAfterMin?n("el-row",{staticStyle:{"margin-top":"16px"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",[n("el-radio",{attrs:{label:!1},on:{change:function(e){return t.clearValidation()}},model:{value:t.event.closeAfterMinBookings,callback:function(e){t.$set(t.event,"closeAfterMinBookings",e)},expression:"event.closeAfterMinBookings"}},[t._v("\n "+t._s(t.$root.labels.event_close_min_total)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.event_close_min_total_tt)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):t._e(),t._v(" "),t.closeAfterMin?n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",[n("el-radio",{attrs:{label:!0},on:{change:function(e){return t.clearValidation()}},model:{value:t.event.closeAfterMinBookings,callback:function(e){t.$set(t.event,"closeAfterMinBookings",e)},expression:"event.closeAfterMinBookings"}},[t._v("\n "+t._s(t.$root.labels.event_close_min_bookings)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.event_close_min_bookings_tt)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1):t._e(),t._v(" "),t.closeAfterMin?n("el-row",{staticClass:"am-service-deposit",attrs:{gutter:24}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:t.$root.labels.event_close_minimum+":"}},[n("el-input-number",{attrs:{min:1,max:t.getMaxCapacity(t.event)},on:{input:function(e){return t.clearValidation()}},model:{value:t.event.closeAfterMin,callback:function(e){t.$set(t.event,"closeAfterMin",e)},expression:"event.closeAfterMin"}})],1)],1)],1):t._e()],1)]):t._e(),t._v(" "),t.event.maxCapacity>1||t.getTicketsSpots()>1||t.maxCustomCapacityNum>1?n("div",[n("div",{staticClass:"am-setting-box am-switch-box am-event-close-after",staticStyle:{"margin-top":"20px"}},[n("el-row",{attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:19}},[t._v("\n "+t._s(t.$root.labels.limit_extra_people)+"\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.limit_extra_people_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:5}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:t.changeMaxExtraPeople},model:{value:t.maxExtraPeopleEnabled,callback:function(e){t.maxExtraPeopleEnabled=e},expression:"maxExtraPeopleEnabled"}})],1)],1),t._v(" "),t.maxExtraPeopleEnabled?n("el-row",{attrs:{type:"flex"}},[n("el-col",[n("el-form-item",{attrs:{label:"placeholder"}},[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.limit_extra_people_set)+":\n ")]),t._v(" "),n("el-input-number",{attrs:{min:0,max:t.getMaxCapacity()-1},on:{input:function(e){return t.clearValidation()}},model:{value:t.event.maxExtraPeople,callback:function(e){t.$set(t.event,"maxExtraPeople",e)},expression:"event.maxExtraPeople"}})],1)],1)],1):t._e()],1)]):t._e()],1)],1),t._v(" "),!t.notInLicence("starter")||t.licenceVisible()?n("el-tab-pane",{attrs:{label:t.$root.labels.customize,name:"customize"}},[n("LicenceBlockHeader",{attrs:{licence:"starter"}}),t._v(" "),t.showGallery?n("gallery",{class:t.licenceClassDisabled("starter"),attrs:{gallery:t.event.gallery,label:t.$root.labels.event_gallery},on:{galleryUpdated:t.galleryUpdated}}):t._e(),t._v(" "),n("div",{staticClass:"am-event-colors",class:t.licenceClassDisabled("starter")},[n("div",{staticClass:"am-event-section-title"},[t._v("\n "+t._s(t.$root.labels.event_colors)+"\n ")]),t._v(" "),n("div",{staticClass:"am-event-color-selection"},[n("div",[n("el-radio",{attrs:{label:1,value:"1"},model:{value:t.event.colorType,callback:function(e){t.$set(t.event,"colorType",e)},expression:"event.colorType"}},[t._v(t._s(t.$root.labels.event_colors_preset))]),t._v(" "),n("div",{staticClass:"am-event-swatches am-event-swatches-first"},t._l(t.colors,function(e){return n("span",{key:e,class:{"color-active":e===t.event.selectedColor},style:"background-color: "+e,attrs:{"data-color":e},on:{click:t.changeEventColor}})}),0)],1),t._v(" "),n("div",[n("el-radio",{attrs:{label:2,value:"2"},model:{value:t.event.colorType,callback:function(e){t.$set(t.event,"colorType",e)},expression:"event.colorType"}},[t._v(t._s(t.$root.labels.event_colors_custom))]),t._v(" "),n("el-input",{staticClass:"am-event-custom-color",attrs:{disabled:1===t.event.colorType||t.notInLicence("starter"),placeholder:"000000"},model:{value:t.event.customColor,callback:function(e){t.$set(t.event,"customColor",e)},expression:"event.customColor"}}),t._v(" "),n("div",{staticClass:"am-event-swatches"},[n("span",{style:"background-color: "+t.event.customColor,attrs:{"data-color":t.event.customColor}})])],1)])]),t._v(" "),n("div",{class:t.licenceClassDisabled("starter")},[n("el-checkbox",{attrs:{disabled:t.notInLicence("starter")},model:{value:t.event.show,callback:function(e){t.$set(t.event,"show",e)},expression:"event.show"}},[t._v("\n "+t._s(t.$root.labels.event_show_on_site)+"\n ")])],1)],1):t._e(),t._v(" "),(t.notInLicence("pro")?t.licenceVisible():t.$root.settings.appointments.waitingListEvents.enabled)?n("el-tab-pane",{attrs:{label:t.$root.labels.waiting_list,name:"waitingList"}},[n("LicenceBlockHeader",{attrs:{licence:"pro"}}),t._v(" "),n("div",{staticClass:"am-setting-box am-switch-box",class:t.licenceClassDisabled("pro")},[n("el-row",{staticStyle:{display:"flex"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{attrs:{span:20}},[n("span",{staticStyle:{"line-height":"1"}},[t._v(t._s(t.$root.labels.events_show_waiting_list_booking_full))])]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:4}},[n("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.event.settings.waitingList.enabled,callback:function(e){t.$set(t.event.settings.waitingList,"enabled",e)},expression:"event.settings.waitingList.enabled"}})],1)],1),t._v(" "),t.event.settings.waitingList.enabled?n("el-row",{staticStyle:{"margin-top":"24px"},attrs:{align:"middle",gutter:24}},[n("el-col",{staticStyle:{"margin-top":"24px"},attrs:{span:24}},[t._v("\n "+t._s(t.$root.labels.maximum_capacity)+":\n ")]),t._v(" "),n("el-col",{staticStyle:{"margin-top":"8px"},attrs:{span:24}},[n("el-input-number",{attrs:{min:1,"auto-complete":"off",disabled:t.customPricingEnabled&&!t.maxCustomCapacity},model:{value:t.event.settings.waitingList.maxCapacity,callback:function(e){t.$set(t.event.settings.waitingList,"maxCapacity",e)},expression:"event.settings.waitingList.maxCapacity"}})],1),t._v(" "),(t.isCabinet?!t.notInLicence():t.customPricingEnabled)?n("div",{class:t.licenceClass(),style:{padding:"12px",display:"flex",flexDirection:"column"}},[t.customPricingEnabled?n("el-form-item",[n("el-row",{style:{flexWrap:"wrap"}},[n("el-col",{staticClass:"am-event-ticket-row",style:{marginBottom:"12px"}},[n("el-row",{style:{borderBottom:"1px solid #E2E6EC",padding:"12px",marginBottom:"8px",wordBreak:"break-word"},attrs:{type:"flex",gutter:24}},[n("el-col",{attrs:{span:7}},[n("div",[t._v("\n "+t._s(t.$root.labels.name)+"\n ")])]),t._v(" "),n("el-col",{attrs:{span:10}}),t._v(" "),n("el-col",{attrs:{span:7}},[t._v(t._s(t.$root.labels.event_spots))])],1),t._v(" "),t._l(t.customTickets,function(e,o){return n("el-row",{key:o,staticClass:"am-section-grey",style:{padding:"12px",background:"#F9FAFB",marginBottom:"12px"},attrs:{type:"flex",align:"middle",gutter:24},model:{value:t.customTickets[o],callback:function(e){t.$set(t.customTickets,o,e)},expression:"customTickets[index]"}},[n("el-col",{attrs:{span:7}},[n("el-input",{style:{marginBottom:"0px"},attrs:{disabled:!0,size:"small"},model:{value:e.name,callback:function(n){t.$set(e,"name",n)},expression:"ticket.name"}})],1),t._v(" "),n("el-col",{attrs:{span:10}}),t._v(" "),n("el-col",{attrs:{span:7}},[n("el-input-number",{style:{marginBottom:"0px",textAlign:"center"},attrs:{size:"small",min:0,disabled:!e.enabled||t.maxCustomCapacity},model:{value:e.waitingListSpots,callback:function(n){t.$set(e,"waitingListSpots",n)},expression:"ticket.waitingListSpots"}})],1)],1)})],2)],1)],1):t._e()],1):t._e(),t._v(" "),n("div",{staticClass:"am-waiting-list-limit-per-ticket-box"},[n("el-col",{attrs:{span:15}},[n("el-checkbox",{model:{value:t.event.settings.waitingList.maxExtraPeopleEnabled,callback:function(e){t.$set(t.event.settings.waitingList,"maxExtraPeopleEnabled",e)},expression:"event.settings.waitingList.maxExtraPeopleEnabled"}},[t._v("\n "+t._s(t.$root.labels.limit_extra_people)+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:9}},[n("el-input-number",{attrs:{disabled:!t.event.settings.waitingList.maxExtraPeopleEnabled,min:0,size:"small","auto-complete":"off"},model:{value:t.event.settings.waitingList.maxExtraPeople,callback:function(e){t.$set(t.event.settings.waitingList,"maxExtraPeople",e)},expression:"event.settings.waitingList.maxExtraPeople"}})],1)],1)],1):t._e()],1)],1):t._e(),t._v(" "),n("el-tab-pane",{attrs:{label:t.$root.labels.settings,name:"settings"}},[n("entity-settings",{attrs:{settings:t.settings,paymentsSettings:t.event.settings.payments,generalSettings:t.event.settings.general,lessonSpaceSettings:t.event.settings.lessonSpace,"google-meet-settings":t.event.settings.googleMeet,"microsoft-teams-settings":t.event.settings.microsoftTeams}})],1)],1)],1):t._e()],1):t._e(),t._v(" "),t.event&&!t.dialogLoading&&"customer"!==this.$root.settings.role?n("dialog-actions",{attrs:{formName:"event",urlName:"events",isNew:0===t.event.id,entity:t.event,getParsedEntity:t.getParsedEntity,haveSaveConfirmation:t.haveSaveConfirmation,getCalendarEvents:t.getCalendarEvents,loadSaveButton:t.checkCalendarEvents,calendarConflict:t.calendarConflict,hasIcons:!1,updateStash:!0,hasApplyGloballyVisibility:t.originRecurring.until,hasApplyGloballyDeletion:t.originRecurring.until&&("rejected"===t.event.status||t.hasPassed()),status:{on:"approved",off:"rejected"},buttonType:{status:"approved"===t.event.status?"danger":"primary",remove:"danger",duplicate:"primary"},buttonText:{action:{remove:t.$root.labels.event_delete,status:"approved"===t.event.status?t.$root.labels.event_cancel:t.$root.labels.event_open,duplicate:t.$root.labels.event_duplicate},confirm:{save:t.calendarConflict.enabled?{yes:t.$root.labels.confirm,no:t.$root.labels.cancel}:t.originRecurring.until?{yes:t.$root.labels.update_following,no:t.$root.labels.save_single}:null,status:t.originRecurring.until?{yes:"rejected"===t.event.status?t.$root.labels.open_following:t.$root.labels.cancel_following,no:t.$root.labels.save_single}:"rejected"===t.event.status?{yes:t.$root.labels.open,no:t.$root.labels.open}:null,remove:t.originRecurring.until?{yes:t.$root.labels.delete_following,no:t.$root.labels.save_single}:null}},action:{haveAdd:!0,haveEdit:!0,haveStatus:t.canManage()&&!t.hasPassed(),haveRemove:!0===t.$root.settings.capabilities.canDelete&&("rejected"===t.event.status||t.hasPassed()),haveRemoveEffect:"rejected"!==t.event.status&&!t.hasPassed(),haveDuplicate:"approved"===t.event.status},message:{success:{save:t.$root.labels.event_saved,remove:t.$root.labels.event_deleted,show:t.$root.labels.event_opened,hide:t.$root.labels.event_canceled},confirm:{save:t.calendarConflict.enabled?t.$root.labels.confirm_save_conflict:t.originRecurring.until?t.$root.labels.confirm_save_following:null,saveDetails:!t.calendarConflict.enabled&&t.customPricingEnabled?t.$root.labels.confirm_save_following_2:null,remove:t.originRecurring.until?t.$root.labels.confirm_delete_following:t.$root.labels.confirm_delete,show:t.originRecurring.until?t.$root.labels.confirm_open_following:t.$root.labels.confirm_open,hide:t.originRecurring.until?t.$root.labels.confirm_cancel_following:t.$root.labels.confirm_cancel,duplicate:t.$root.labels.confirm_duplicate_event}}},on:{validationFailCallback:t.validationFailCallback,errorCallback:t.errorCallback,confirmCalendarConflict:t.confirmCalendarConflict}}):t._e()],1)},staticRenderFns:[]}},942:function(t,e,n){var o=n(90)(n(943),n(944),!1,null,null,null);t.exports=o.exports},943:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(336),i=n(880),a=n(659),s=n(654),r=n(658),l=n(684),c=n(673);e.default={mixins:[s.a,o.a,a.a,l.a,r.a,i.a,c.a],props:{event:null,eventStatus:null,customTickets:null,options:null,eventBookings:null,aggregatedPrice:!0,bookingCreatedCount:0,newBooking:null,showHeader:{required:!1,default:!0,type:Boolean},showExport:{required:!1,default:!0,type:Boolean},writeEvents:{type:Boolean,default:!0,required:!1},popperAppendToBody:{type:Boolean,default:!0,required:!1},customersNoShowCount:{type:Array,default:function(){return[]},required:!1}},data:function(){return{dialogExport:!1,bookings:[],name:"events/bookings",successMessage:{single:this.$root.labels.event_attendee_deleted,multiple:this.$root.labels.event_attendees_deleted},errorMessage:{single:this.$root.labels.event_attendee_not_deleted,multiple:this.$root.labels.event_attendees_not_deleted},search:"",hasResult:!0,dialogLoading:!0,showDeleteConfirmation:!1,statuses:[{value:"approved",label:this.$root.labels.approved},{value:"rejected",label:this.$root.labels.rejected},{value:"no-show",label:this.$root.labels["no-show"]}],activeTab:"Approved"}},methods:{getBookingStatus:function(t){return"rejected"===this.eventStatus||"canceled"===this.eventStatus?"canceled":"rejected"===t.status?"canceled":t.status},getInitAttendeeObject:function(){return{id:0,customer:null,status:"approved",persons:1,added:!1,info:null,aggregatedPrice:this.aggregatedPrice,customFields:{}}},addAttendee:function(){this.$emit("showDialogAttendee",this.getInitAttendeeObject())},hasCapacity:function(t){var e=0;if(this.event.customPricing&&!this.event.maxCustomCapacity){var n=!0,o={};return this.event.customTickets.forEach(function(t){o[t.id]=t.spots}),this.event.bookings.forEach(function(t){"approved"===t.status&&t.ticketsData.forEach(function(t){o[t.eventTicketId]-=t.persons})}),t.ticketsData.forEach(function(t){o[t.eventTicketId]<t.persons&&(n=!1)}),n}return this.event.maxCustomCapacity?(this.event.bookings.forEach(function(t){"approved"===t.status&&t.ticketsData.forEach(function(t){e+=t.persons})}),this.event.maxCustomCapacity>e):(this.event.bookings.forEach(function(t){"approved"===t.status&&(e+=t.persons)}),this.event.maxCapacity>e)},updateBookingStatus:function(t,e){var n=this,o=!1,i=!1;"waiting"===t.status&&"approved"===e&&(o=!this.hasCapacity(t),i=!0),this.$http.post(this.$root.getAjaxUrl+"/events/bookings/"+t.id,{status:e,bookings:[{status:e}],createPaymentLinks:i}).then(function(){o&&n.notify(n.$root.labels.warning,n.$root.labels.waiting_list_capacity_warning,"warning"),n.notify(n.$root.labels.success,n.$root.labels.event_status_changed+n.$root.labels[e].toLowerCase(),"success");var i=t.status;if(t.status=e,"no-show"===e||"no-show"===i){var a=n.options.entities.customers.map(function(t){return t.id});if(a.includes(t.customer.id)){var s=a.indexOf(t.customer.id),r=n.options.entities.customers[s].noShowCount;n.options.entities.customers[s].noShowCount=r+("no-show"===e?1:-1)}}n.$emit("updateAttendeesCallback")}).catch(function(t){n.notify(n.$root.labels.error,t.message,"error")})},getCustomer:function(t){return t.info?JSON.parse(t.info):t.customer},getTicketsSoldString:function(t){var e=this.customTickets.filter(function(e){return e.id===t.eventTicketId})[0].name;return t.persons+" x "+e},instantiateDialog:function(){this.eventBookings&&(this.bookings=this.eventBookings,this.bookings.tickets=[],this.dialogLoading=!1),this.$root.settings.appointments.waitingListEvents.enabled&&this.event.settings.waitingList.enabled&&this.statuses.push({value:"waiting",label:this.$root.labels.waiting_list})},closeDialog:function(){this.$emit("closeDialog")},removeAttendee:function(t){var e=this,n=[];this.bookings[t].removing=!0,this.deleteEntities([this.bookings[t].id],function(){setTimeout(function(){for(var t=e.bookings.length-1;t>=0;t--)-1!==n.indexOf(e.bookings[t].id)&&e.bookings.splice(t,1);e.$emit("updateAttendeesCallback"),0===e.bookings.length&&e.$emit("closeDialog")},500)},function(t){n.push(t)},function(t){})},editAttendee:function(t){this.$emit("showDialogAttendee",this.bookings[t])},removeAttendees:function(){var t=this,e=[];t.dialogLoading=!0,t.showDeleteConfirmation=!1,this.deleteEntities(t.bookings.filter(function(t){return t.checked}).map(function(t){return t.id}),function(){setTimeout(function(){for(var n=t.bookings.length-1;n>=0;n--)-1!==e.indexOf(t.bookings[n].id)&&t.bookings.splice(n,1);t.dialogLoading=!1,t.$emit("updateAttendeesCallback"),0===t.bookings.length&&t.$emit("closeDialog")},500)},function(t){e.push(t)},function(t){})},searchAttendees:function(){var t=this;this.bookings.forEach(function(e){e.show=e.customer.firstName.toLowerCase().startsWith(t.search.toLowerCase())||e.customer.lastName.toLowerCase().startsWith(t.search.toLowerCase())||(e.customer.firstName+" "+e.customer.lastName).toLowerCase().startsWith(t.search.toLowerCase())||(e.customer.lastName+" "+e.customer.firstName).toLowerCase().startsWith(t.search.toLowerCase())||null!==e.customer.email&&e.customer.email.toLowerCase().startsWith(t.search.toLowerCase())||null!==e.customer.phone&&e.customer.phone.toLowerCase().startsWith(t.search.toLowerCase())||null!==e.token&&e.token.toLowerCase().substring(0,5).startsWith(t.search.toLowerCase())||e.customer.firstName.split(" ").map(function(e){return e.toLowerCase().startsWith(t.search.toLowerCase())}).includes(!0)||e.customer.lastName.split(" ").map(function(e){return e.toLowerCase().startsWith(t.search.toLowerCase())}).includes(!0)}),this.hasResult=this.bookings.filter(function(t){return!0===t.show}).length>0,this.hasResult&&(this.activeTab="waiting"===this.bookings.filter(function(t){return!0===t.show})[0].status?"WaitingList":"Approved")},openExportAttendeesDialog:function(){this.$emit("openExportAttendeesDialog")}},mounted:function(){this.instantiateDialog()},watch:{bookingCreatedCount:function(){this.bookings=this.eventBookings,this.bookings.sort(function(t,e){return(t.customer.firstName+" "+t.customer.lastName).localeCompare(e.customer.firstName+" "+e.customer.lastName)}),this.hasResult=!0,this.search=""}}}},944:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-dialog-attendees-inner"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.loader_message))])])]),t._v(" "),t.bookings&&!t.dialogLoading?n("div",{staticClass:"am-dialog-scrollable"},[t.showHeader?n("div",{staticClass:"am-dialog-header",staticStyle:{"border-bottom":"none"}},[n("el-row",[n("el-col",{attrs:{span:18}},[n("h2",[t._v(t._s(t.$root.labels.event_attendees))])]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1):t._e(),t._v(" "),t.writeEvents?n("el-button",{staticClass:"am-dialog-create",staticStyle:{width:"100%"},attrs:{size:"large",type:"primary"},on:{click:t.addAttendee}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.event_add_attendee))])]):t._e(),t._v(" "),n("div",{staticClass:"am-search"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:t.showExport?20:24}},[n("el-input",{attrs:{placeholder:t.$root.labels.event_attendees_search},on:{input:function(e){return t.searchAttendees()}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),t.showExport?n("el-col",{attrs:{lg:4}},[n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.export_tooltip_attendees)},slot:"content"}),t._v(" "),n("el-button",{staticClass:"button-export am-button-icon",on:{click:t.openExportAttendeesDialog}},[n("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.export,src:t.$root.getUrl+"public/img/export.svg"}})])],1)],1):t._e()],1)],1),t._v(" "),n("el-tabs",{model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[n("el-tab-pane",{attrs:{label:t.$root.labels.event_attendees,name:"Approved"}},[n("div",{staticClass:"am-attendees"},[n("el-collapse",t._l(t.bookings,function(e,o){return n("el-collapse-item",{directives:[{name:"show",rawName:"v-show",value:e.show&&"waiting"!==e.status,expression:"booking.show && booking.status !== 'waiting'"}],key:o,staticClass:"am-attendee",attrs:{name:e.id}},[n("template",{slot:"title"},[n("div",{staticClass:"am-attendee-data",staticStyle:{width:"100%"}},[n("el-row",{attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?n("el-col",{attrs:{sm:2}},[n("span",{staticClass:"am-attendee-checkbox",on:{click:function(t){t.stopPropagation()}}},[!0===t.$root.settings.capabilities.canDelete?n("el-checkbox",{model:{value:e.checked,callback:function(n){t.$set(e,"checked",n)},expression:"booking.checked"}}):t._e()],1)]):t._e(),t._v(" "),n("el-col",{attrs:{sm:!0===t.$root.settings.capabilities.canDelete?17:19}},[n("div",{staticClass:"am-attendee-name"},[n("h3",{class:t.showExport?t.getNoShowClass(0!==e.customerId?e.customerId:e.customer.id,t.customersNoShowCount,null,e.customer.status):""},[t._v("\n "+t._s((null!==(t.user=t.getCustomer(e))?t.user.firstName+" "+t.user.lastName:"")+(e.token?" ("+e.token.substring(0,5)+")":""))+"\n "),e.persons>1?n("span",{staticClass:"am-attendees-plus"},[t._v("+"+t._s(e.persons-1))]):t._e()]),t._v(" "),n("a",{staticClass:"am-attendee-email",attrs:{href:"mailto:"+e.customer.email}},[t._v(t._s(e.customer.email))]),t._v(" "),n("a",{staticClass:"am-attendee-phone",attrs:{href:"tel:"+(null!==(t.user=t.getCustomer(e))?t.user.phone:"")}},[t._v(t._s(null!==(t.user=t.getCustomer(e))?t.user.phone:""))]),t._v(" "),t._l(e.ticketsData,function(e){return t.customTickets.length?n("span",{staticClass:"am-attendees-plus",style:{marginLeft:0}},[t._v("\n "+t._s(t.getTicketsSoldString(e))+"\n ")]):t._e()})],2)]),t._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-appointment-status small"},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.getBookingStatus(e)}),t._v(" "),n("el-select",{attrs:{value:e.status,"popper-append-to-body":t.popperAppendToBody,disabled:!t.writeEvents},on:{change:function(n){return t.updateBookingStatus(e,n)}}},t._l(t.statuses,function(t){return n("el-option",{key:t.value,staticClass:"am-appointment-dialog-status-option",attrs:{value:t.value}},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+("rejected"===t.value?"canceled":t.value)})])}),1)],1)])],1)],1)]),t._v(" "),n("div",{staticClass:"am-attendee-collapse"},[e.payments.length?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[t._v(t._s(t.$root.labels.payment))])]),t._v(" "),n("el-col",{attrs:{span:18}},t._l(e.payments,function(e){return n("p",[n("span",{staticStyle:{display:"flex","align-items":"center"}},[n("img",{staticClass:"svg-amelia",style:{width:t.getPaymentIconWidth(e.gateway)},attrs:{src:t.$root.getUrl+"public/img/payments/"+e.gateway+".svg"}}),t._v("\n "+t._s(t.getPaymentGatewayNiceName(e.gateway))+"\n "),n("span",{staticClass:"am-semi-strong am-payment-status",staticStyle:{"padding-left":"15px"}},[n("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+e.status}),t._v("\n "+t._s(t.getPaymentStatusNiceName(e.status))+"\n ")])])])}),0)],1):t._e(),t._v(" "),e.payments.filter(function(t){return t.wcOrderId}).length>0?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[t._v(t._s(t.$root.labels.wc_order)+":")])]),t._v(" "),n("el-col",{attrs:{span:18}},t._l(e.payments,function(e){return n("p",{key:e.id},[n("a",{attrs:{href:e.wcOrderUrl,target:"_blank"}},[t._v("\n #"+t._s(e.wcOrderId)+"\n ")])])}),0)],1):t._e(),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("div",{},[t.writeEvents?n("el-button",{attrs:{loading:e.removing},on:{click:function(e){return t.removeAttendee(o)}}},[t._v("\n "+t._s(t.$root.labels.event_attendee_remove)+"\n ")]):t._e()],1)]),t._v(" "),n("el-col",{attrs:{span:12}},[n("div",{},[t.writeEvents?n("el-button",{on:{click:function(e){return t.editAttendee(o)}}},[t._v("\n "+t._s(t.$root.labels.event_edit_attendee)+"\n ")]):t._e()],1)])],1)],1)],2)}),1)],1),t._v(" "),0===t.bookings.filter(function(t){return"waiting"!==t.status}).length?n("div",{staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),n("h2",[t._v(t._s(t.$root.labels.no_attendees_yet))])]):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.hasResult&&t.bookings.filter(function(t){return"waiting"!==t.status}).length>0,expression:"!hasResult && bookings.filter(b => b.status !== 'waiting').length > 0"}],staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),n("h2",[t._v(t._s(t.$root.labels.no_results))])])]),t._v(" "),t.event.settings.waitingList.enabled&&t.$root.settings.appointments.waitingListEvents.enabled?n("el-tab-pane",{attrs:{label:t.$root.labels.waiting_list,name:"WaitingList"}},[n("div",{staticClass:"am-attendees"},[n("el-collapse",t._l(t.bookings,function(e,o){return n("el-collapse-item",{directives:[{name:"show",rawName:"v-show",value:e.show&&"waiting"===e.status,expression:"booking.show && booking.status === 'waiting'"}],key:o,staticClass:"am-attendee",attrs:{name:e.id}},[n("template",{slot:"title"},[n("div",{staticClass:"am-attendee-data",staticStyle:{width:"100%"}},[n("el-row",{attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?n("el-col",{attrs:{sm:2}},[n("span",{staticClass:"am-attendee-checkbox",on:{click:function(t){t.stopPropagation()}}},[!0===t.$root.settings.capabilities.canDelete?n("el-checkbox",{model:{value:e.checked,callback:function(n){t.$set(e,"checked",n)},expression:"booking.checked"}}):t._e()],1)]):t._e(),t._v(" "),n("el-col",{attrs:{sm:!0===t.$root.settings.capabilities.canDelete?17:19}},[n("div",{staticClass:"am-attendee-name"},[n("h3",[t._v("\n "+t._s((null!==(t.user=t.getCustomer(e))?t.user.firstName+" "+t.user.lastName:"")+(e.token?" ("+e.token.substring(0,5)+")":""))+"\n "),e.persons>1?n("span",{staticClass:"am-attendees-plus"},[t._v("+"+t._s(e.persons-1))]):t._e()]),t._v(" "),n("a",{staticClass:"am-attendee-email",attrs:{href:"mailto:"+e.customer.email}},[t._v(t._s(e.customer.email))]),t._v(" "),n("a",{staticClass:"am-attendee-phone",attrs:{href:"tel:"+(null!==(t.user=t.getCustomer(e))?t.user.phone:"")}},[t._v(t._s(null!==(t.user=t.getCustomer(e))?t.user.phone:""))]),t._v(" "),t._l(e.ticketsData,function(e){return t.customTickets.length?n("span",{staticClass:"am-attendees-plus",style:{marginLeft:0}},[t._v("\n "+t._s(t.getTicketsSoldString(e))+"\n ")]):t._e()})],2)]),t._v(" "),n("el-col",{attrs:{sm:5}},[n("div",{staticClass:"am-appointment-status small"},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.getBookingStatus(e)}),t._v(" "),n("el-select",{attrs:{value:e.status,"popper-append-to-body":t.popperAppendToBody,disabled:!t.writeEvents},on:{change:function(n){return t.updateBookingStatus(e,n)}}},t._l(t.statuses,function(t){return n("el-option",{directives:[{name:"show",rawName:"v-show",value:"no-show"!==t.value,expression:"item.value !== 'no-show'"}],key:t.value,staticClass:"am-appointment-dialog-status-option",attrs:{value:t.value}},[n("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+("rejected"===t.value?"canceled":t.value)})])}),1)],1)])],1)],1)]),t._v(" "),n("div",{staticClass:"am-attendee-collapse"},[e.payments.length?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[t._v(t._s(t.$root.labels.payment))])]),t._v(" "),n("el-col",{attrs:{span:18}},t._l(e.payments,function(e){return n("p",[n("img",{staticClass:"svg-amelia",style:{width:t.getPaymentIconWidth(e.gateway)},attrs:{src:t.$root.getUrl+"public/img/payments/"+e.gateway+".svg"}}),t._v("\n "+t._s(t.getPaymentGatewayNiceName(e.gateway))+"\n ")])}),0)],1):t._e(),t._v(" "),e.payments.filter(function(t){return t.wcOrderId}).length>0?n("el-row",{staticClass:"am-attendee-collapse-payments",attrs:{gutter:10}},[n("el-col",{attrs:{span:6}},[n("span",[t._v(t._s(t.$root.labels.wc_order)+":")])]),t._v(" "),n("el-col",{attrs:{span:18}},t._l(e.payments,function(e){return n("p",{key:e.id},[n("a",{attrs:{href:e.wcOrderUrl,target:"_blank"}},[t._v("\n #"+t._s(e.wcOrderId)+"\n ")])])}),0)],1):t._e(),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("div",{},[t.writeEvents?n("el-button",{attrs:{loading:e.removing},on:{click:function(e){return t.removeAttendee(o)}}},[t._v("\n "+t._s(t.$root.labels.event_attendee_remove)+"\n ")]):t._e()],1)]),t._v(" "),n("el-col",{attrs:{span:12}},[n("div",{},[t.writeEvents?n("el-button",{on:{click:function(e){return t.editAttendee(o)}}},[t._v("\n "+t._s(t.$root.labels.event_edit_attendee)+"\n ")]):t._e()],1)])],1)],1)],2)}),1)],1),t._v(" "),0===t.bookings.filter(function(t){return"waiting"===t.status}).length?n("div",{staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),n("h2",[t._v(t._s(t.$root.labels.waiting_list_empty))])]):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.hasResult&&t.bookings.filter(function(t){return"waiting"===t.status}).length>0,expression:"!hasResult && bookings.filter(b => b.status === 'waiting').length > 0"}],staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),n("h2",[t._v(t._s(t.$root.labels.no_results))])])]):t._e()],1)],1):t._e(),t._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.dialogLoading&&t.bookings.length>0&&t.bookings.filter(function(t){return t.checked}).length>0,expression:"!dialogLoading && bookings.length > 0 && bookings.filter(booking => booking.checked).length > 0"}]},[n("div",{staticClass:"am-dialog-footer"},[n("div",{staticClass:"am-dialog-footer-actions"},[n("el-row",[n("el-col",{staticClass:"align-left",attrs:{sm:12}},[n("el-button",{staticClass:"am-button-icon",on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation}}},[n("img",{staticClass:"svg-amelia",attrs:{alt:t.$root.labels.delete,src:t.$root.getUrl+"public/img/delete.svg"}})])],1)],1)],1)])])]),t._v(" "),n("transition",{attrs:{name:"slide-vertical"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.dialogLoading&&t.showDeleteConfirmation,expression:"!dialogLoading && showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[n("h3",[t._v(t._s(t.bookings.filter(function(t){return t.checked}).length>1?t.$root.labels.confirm_delete_attendees:t.$root.labels.confirm_delete_attendee))]),t._v(" "),n("div",{staticClass:"align-left"},[n("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),t.writeEvents?n("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.removeAttendees}},[t._v("\n "+t._s(t.$root.labels.delete)+"\n ")]):t._e()],1)])])],1)},staticRenderFns:[]}},945:function(t,e,n){var o=n(90)(n(946),n(947),!1,null,null,null);t.exports=o.exports},946:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(697),i=n.n(o),a=n(654),s=n(336),r=n(658),l=n(659),c=n(704),u=n(657),d=n(791),p=n.n(d),f=n(663),h=n(673),m=n(700);e.default={mixins:[l.a,a.a,s.a,r.a,u.a,f.a,c.a,h.a,m.a],props:{clonedEventBooking:null,paymentLinksEnabled:null,customTickets:null,eventBooking:null,eventCustomPricing:null,eventId:null,eventMaxCapacity:null,eventCustomerIds:null,eventBookMultipleTimes:{required:!1,default:!0,type:Boolean},options:null,customerCreatedCount:0,showHeader:{required:!1,default:!0,type:Boolean},isCabinet:{type:Boolean,default:!1,required:!1},popperAppendToBody:{type:Boolean,default:!0,required:!1},writeEvents:{type:Boolean,default:!0,required:!1},isWaitingList:{type:Boolean,default:!0,required:!1}},data:function(){var t=this;return{ticketsData:null,showCoupon:!1,customers:[],appointment:null,dialogLoading:!0,executeUpdate:!0,mounted:!1,statusMessage:"",rules:{bookings:[{required:!0,message:this.$root.labels.select_single_customer_warning,trigger:"submit",type:"array"},{validator:function(e,n,o){t.eventBooking.customerId?o():o(new Error(t.$root.labels.select_single_customer_warning))},trigger:"submit"}]},statuses:[{value:"approved",label:this.$root.labels.approved},{value:"waiting",label:this.$root.labels.waiting_list}]}},mounted:function(){var t=this;if(this.appointment={bookings:[this.eventBooking]},(this.eventCustomPricing&&this.customTickets||this.eventBooking.id&&this.eventBooking.ticketsData&&this.eventBooking.ticketsData.length)&&(this.createTicketsBooking(this.customTickets),this.eventBooking.id))for(var e=function(e){var n=t.eventBooking.ticketsData.find(function(n){return t.ticketsData[e].eventTicketId===n.eventTicketId});void 0!==n&&(t.ticketsData[e].id=n.id,t.ticketsData[e].persons=n.persons,t.ticketsData[e].eventTicketId=n.eventTicketId,t.ticketsData[e].price=n.price,t.ticketsData[e].customerBookingId=n.customerBookingId)},n=0;n<this.ticketsData.length;n++)e(n);this.instantiateDialog(),this.setBookingCustomFields(),this.addCustomFieldsValidationRules(),this.$nextTick(function(){t.$refs.customerSelect.$el.children[0].children[0].removeAttribute("readonly")})},updated:function(){this.instantiateDialog()},methods:{dropDownVisible:function(t){var e=this;t||setTimeout(function(){e.$refs.customerSelect&&e.$refs.customerSelect.$el.children[0].children[0].removeAttribute("readonly")},200)},haveSaveConfirmation:function(){if(0!==this.eventBooking.id&&this.paymentLinksEnabled){if(this.eventCustomPricing)return this.clonedEventBooking.ticketsData.reduce(function(t,e){return t+e.price*e.persons},0)<this.ticketsData.reduce(function(t,e){return t+e.price*e.persons},0);var t=this.eventBooking.persons*this.eventBooking.price;return this.clonedEventBooking.persons*this.clonedEventBooking.price<t}return!1},changeTicketsCount:function(t){if(0===this.selectedTicketsCount(this.ticketsData))for(var e=0;e<this.ticketsData.length;e++)if(e!==t){this.ticketsData[e].persons=1;break}},selectedTicketsCount:function(t){var e=0;return t.forEach(function(t){e+=t.persons}),e},createTicketsBooking:function(t){var e=this,n=[];t.forEach(function(t,o){n.push({id:0,eventTicketId:t.id,persons:0!==o||e.eventBooking.id?0:1,customerBookingId:null,price:t.dateRangePrice?t.dateRangePrice:t.price})}),this.ticketsData=n},getTicketName:function(t){return this.customTickets.filter(function(e){return e.id===t.eventTicketId})[0].name},customersFetched:function(){this.customers=this.searchedCustomers},searchExistingCustomers:function(t){t?this.searchCustomers(t,this.customersFetched):this.customers=this.options.entities.customers},showDialogNewCustomer:function(){this.$emit("showDialogNewCustomer")},instantiateDialog:function(){var t=this;null!==this.eventBooking&&!0===this.executeUpdate&&(this.mounted=!0,this.executeUpdate=!1,this.dialogLoading=!1,0!==parseInt(this.eventBooking.id)?this.customers=this.options.entities.customers:(this.showCoupon=!0,this.eventBookMultipleTimes?this.customers=this.options.entities.customers:this.customers=this.options.entities.customers.filter(function(e){return-1===t.eventCustomerIds.indexOf(e.id)})))},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(t){var e=this;for(var n in this.eventBooking.customFields)"datepicker"===this.eventBooking.customFields[n].type&&this.eventBooking.customFields[n].value&&(this.eventBooking.customFields[n].value=this.getStringFromDate(this.eventBooking.customFields[n].value));var o=this.showCoupon?this.eventBooking.coupon:this.eventBooking.coupon?this.eventBooking.coupon.id:null,i=this.options.entities.coupons?this.options.entities.coupons.find(function(t){return t.id===o}):null,a=this.isWaitingList?this.eventBooking.status:"approved";return{type:"event",eventId:this.eventId,bookings:[{customFields:this.getAllowedCustomFields(this.eventBooking.customFields,"events",this.eventId),persons:this.eventBooking.persons,customerId:this.eventBooking.customerId,customer:this.customers.find(function(t){return t.id===e.eventBooking.customerId}),coupon:i,deposit:0,ticketsData:this.ticketsData,status:a}],couponCode:i?i.code:null,validateCoupon:!1,locale:"",timeZone:"",payment:{gateway:"onSite"},isBackendOrCabinet:!0,createPaymentLinks:t}},clearValidation:function(){void 0!==this.$refs.eventBooking&&this.$refs.eventBooking.clearValidate()},errorCallback:function(t){var e=this;setTimeout(function(){"message"in t?e.notify(e.$root.labels.error,t.message,"error"):"timeSlotUnavailable"in t&&!0===t.timeSlotUnavailable?e.notify(e.$root.labels.error,e.$root.labels.maximum_capacity_reached,"error"):t.data&&"timeSlotUnavailable"in t.data&&!0===t.data.timeSlotUnavailable?e.notify(e.$root.labels.error,e.$root.labels.maximum_capacity_reached,"error"):"customerAlreadyBooked"in t&&!0===t.customerAlreadyBooked?e.notify(e.$root.labels.error,e.$root.labels.customer_already_booked_ev,"error"):"couponUnknown"in t&&!0===t.couponUnknown&&e.notify(e.$root.labels.error,e.$root.labels.coupon_unknown,"error")},200)},addCustomFieldsValidationRules:function(){for(var t=0;t<this.options.entities.customFields.length;t++)this.isCustomFieldVisible(this.options.entities.customFields[t],"event",this.eventId)&&(void 0===this.rules.bookings[0]&&this.$set(this.rules.bookings,0,{type:"array"}),void 0===this.rules.bookings[0].customFields&&this.$set(this.rules.bookings[0],"customFields",{}),this.rules.bookings[0].customFields[this.options.entities.customFields[t].id]={value:[{required:!0,message:this.$root.labels.required_field,trigger:"submit"}]})},showCustomFieldsTab:function(){var t=Array.prototype.concat.apply([],this.options.entities.customFields.map(function(t){return t.events.map(function(t){return t.id})}));return this.options.entities.customFields.length>0&&null!==this.booking&&this.eventId&&t.includes(this.eventId)},validationTabFailCallback:function(){}},watch:{customerCreatedCount:function(){this.customers=this.options.entities.customers,this.eventBooking.customerId=this.customers[this.customers.length-1].id,this.customers.sort(function(t,e){return(t.firstName+" "+t.lastName).localeCompare(e.firstName+" "+e.lastName)})}},components:{DialogCustomFields:p.a,DialogActions:i.a}}},947:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-dialog-attendees-inner"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.loader_message))])])]),t._v(" "),t.eventBooking&&!t.dialogLoading?n("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==t.eventBooking.id},staticStyle:{"overflow-x":"hidden"}},[t.showHeader?n("div",{staticClass:"am-dialog-header"},[n("el-row",[n("el-col",{attrs:{span:18}},[t.eventBooking.customer?n("h2",[t._v(t._s(t.$root.labels.event_edit_attendee))]):t._e(),t._v(" "),t.eventBooking.customer?t._e():n("h2",[t._v(t._s(t.$root.labels.event_add_attendee))])]),t._v(" "),n("el-col",{staticClass:"align-right",attrs:{span:6}},[n("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1):t._e(),t._v(" "),t.mounted?n("el-form",{ref:"appointment",attrs:{model:{bookings:[t.eventBooking]},rules:t.rules,"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$root.labels.customer+":",prop:"bookings"}},[n("el-select",{ref:"customerSelect",attrs:{remote:"",filterable:"",clearable:"","remote-method":t.searchExistingCustomers,disabled:!1!==t.eventBooking.added,placeholder:t.$root.labels.customer,"popper-class":"am-dropdown-cabinet",loading:t.loadingCustomers},on:{clear:t.searchExistingCustomers,"visible-change":t.dropDownVisible},model:{value:t.eventBooking.customerId,callback:function(e){t.$set(t.eventBooking,"customerId",e)},expression:"eventBooking.customerId"}},[n("div",{staticClass:"am-drop"},[this.$root.settings.additionalCapabilities.canWriteCustomers?n("div",{staticClass:"am-drop-create-item",on:{click:t.showDialogNewCustomer}},[t._v("\n "+t._s(t.$root.labels.create_new)+"\n ")]):t._e(),t._v(" "),t._l(t.customers,function(e){return n("el-option",{key:e.id,staticClass:"am-has-option-meta",attrs:{label:e.firstName+" "+e.lastName,value:e.id}},[n("span",{class:t.getOptionClass(e,null,e.status)},[t._v(t._s(e.firstName)+" "+t._s(e.lastName))]),t._v(" "),e.email?n("span",{staticClass:"am-drop-item-meta"},[t._v(t._s(e.email))]):t._e()])}),t._v(" "),t._l([{customer:{id:0,firstName:"",lastName:"",email:"",info:JSON.stringify({firstName:"",lastName:"",email:"",phone:""})}}],function(e){return 0===t.customers.length?n("el-option",{key:e.customer.id,staticClass:"am-has-option-meta",style:{display:"none"},attrs:{label:e.firstName+" "+e.lastName,value:e}}):t._e()})],2)])],1),t._v(" "),(t.eventBooking.id?t.eventBooking.ticketsData&&t.eventBooking.ticketsData.length:t.eventCustomPricing)?t._e():n("el-form-item",{attrs:{label:t.$root.labels.event_book_persons+":"}},[n("el-input-number",{attrs:{min:1},model:{value:t.eventBooking.persons,callback:function(e){t.$set(t.eventBooking,"persons",e)},expression:"eventBooking.persons"}})],1),t._v(" "),(t.eventBooking.id?t.eventBooking.ticketsData&&t.eventBooking.ticketsData.length:t.eventCustomPricing)?n("el-form-item",{attrs:{label:t.$root.labels.event_book_tickets+":"}},[n("div",{staticClass:"am-ticket-box",style:{flexWrap:"wrap"}},t._l(t.ticketsData,function(e,o){return n("div",{key:o,staticClass:"am-ticket"},[n("el-row",[n("el-col",{staticClass:"am-ticket-info",attrs:{sm:16,lg:16}},[n("span",{staticClass:"am-ticket-name",style:{fontWeight:500}},[t._v("\n "+t._s(t.getTicketName(e))+"\n ")])]),t._v(" "),n("el-col",{staticClass:"am-ticket-number-of-people",attrs:{sm:8,lg:8}},[n("el-input-number",{style:{maxHeight:"32px",lineHeight:"32px",overflow:"hidden"},attrs:{size:"mini",min:0,type:"number"},on:{change:function(e){return t.changeTicketsCount(o)}},model:{value:e.persons,callback:function(n){t.$set(e,"persons",n)},expression:"booking.persons"}})],1)],1)],1)}),0)]):t._e(),t._v(" "),t.isWaitingList&&0===t.eventBooking.id?n("el-form-item",{attrs:{label:t.$root.labels.status+":"}},[n("el-select",{attrs:{"popper-append-to-body":t.popperAppendToBody,disabled:!t.writeEvents},model:{value:t.eventBooking.status,callback:function(e){t.$set(t.eventBooking,"status",e)},expression:"eventBooking.status"}},t._l(t.statuses,function(e){return n("el-option",{key:e.value,staticClass:"am-appointment-dialog-status-option",attrs:{value:e.value,label:e.label}},[n("span",{class:"am-appointment-status-symbol-wl-status am-appointment-status-symbol am-appointment-status-symbol-"+("rejected"===e.value?"canceled":e.value)},[t._v("\n "+t._s(e.label)+"\n ")])])}),1)],1):t._e(),t._v(" "),t.couponsFilteredEvent.length>0&&t.showCoupon&&("admin"===t.$root.settings.role||"manager"===t.$root.settings.role)?n("el-form-item",{attrs:{label:t.$root.labels.coupon}},[n("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.select_coupon,"popper-class":"am-dropdown-cabinet",disabled:"customer"===t.$root.settings.role},model:{value:t.eventBooking.coupon,callback:function(e){t.$set(t.eventBooking,"coupon",e)},expression:"eventBooking.coupon"}},t._l(t.couponsFilteredEvent,function(e){return n("el-option",{key:e.id,attrs:{disabled:e.disabled,label:e.code+(t.couponExpired(e.expirationDate)?" - "+t.$root.labels.expired:""),value:e.id}})}),1),t._v(" "),n("img",{staticClass:"svg-amelia is-spinner",attrs:{src:t.$root.getUrl+"public/img/oval-spinner.svg"}})],1):t._e(),t._v(" "),n("dialog-custom-fields",{attrs:{entityType:"event",appointment:{bookings:[t.eventBooking]},entityId:t.eventId,customFields:t.options.entities.customFields,"is-cabinet":t.isCabinet,showCustomerInfo:!1},on:{clearValidation:t.clearValidation}})],1):t._e()],1):t._e(),t._v(" "),t.eventBooking&&!t.dialogLoading?n("dialog-actions",{attrs:{formName:"appointment",urlName:0!==t.eventBooking.id?"events/bookings":"bookings",isNew:0===t.eventBooking.id,entity:t.eventBooking,getParsedEntity:t.getParsedEntity,hasIcons:!0,haveSaveConfirmation:t.haveSaveConfirmation,buttonText:{confirm:{save:{yes:t.$root.labels.yes,no:t.$root.labels.no}}},status:{on:"visible",off:"hidden"},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!1,haveRemoveEffect:!1,haveDuplicate:!1},message:{success:{save:t.$root.labels.event_attendee_saved,remove:"",show:"",hide:""},confirm:{remove:"",show:"",hide:"",duplicate:"",save:t.$root.labels.price_changed_message}}},on:{errorCallback:t.errorCallback,validationTabFailCallback:t.validationTabFailCallback}}):t._e(),t._v(" "),n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[n("div",{staticClass:"am-dialog-loader-content"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.loader_message))])])])])],1)},staticRenderFns:[]}}});
Save
Back