File manager - Edit - /home/premiey/www/wp-content/plugins/ameliabooking/public/js/chunks/amelia-booking-notifications-973e604c7001c8d15aa4.js
Back
wpJsonpAmeliaBookingPlugin([8],{1077:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(729),i=n.n(o),a=n(981),r=n.n(a),s=n(1087),l=n.n(s),c=n(696),u=n(771),d=(n.n(u),n(700)),p=n(701),f=n(697),h=n(1111),m=n.n(h),g=n(338),v=n(0),y=(n.n(v),n(736)),b=n.n(y),_=n(1114),w=n.n(_),x=n(741),k=n.n(x);e.default={mixins:[c.a,d.a,p.a,f.a,g.a],data:function(){return{fetched:!1,notifications:[],whatsAppTemplates:[],notificationTab:"email",options:{entities:{customFields:[]},settings:{general:{usedLanguages:[]}},fetched:!1},languagesData:null,manageLanguages:!1}},created:function(){this.setActiveTab(),this.getEntities(),this.inlineSVG()},mounted:function(){this.inlineSVG()},methods:{getPageUrl:function(){return location.href.substring(0,location.href.lastIndexOf("?")).substring(0,location.href.substring(0,location.href.lastIndexOf("?")).lastIndexOf("/"))+"/"},getEntities:function(){var t=this;this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({types:["settings"],getAllEvents:!0})}).then(function(e){t.options.entities=e.data.data;var n=[];if(t.options.entities.events)for(var o=function(e){var o=t.options.entities.events[e];if("approved"!==o.status)return"continue";if(n.find(function(t){return(t.id===o.parentId||t.parentId===o.parentId)&&null!==o.parentId}))return"continue";var i=n.find(function(t){return t.name===o.name&&t.id!==o.id});i?(o.displayName=o.name+" ("+t.getFrontedFormattedDate(o.periods[0].periodStart)+")",i.displayName=i.name+" ("+t.getFrontedFormattedDate(i.periods[0].periodStart)+")",n.push(o)):n.push(o)},i=0;i<t.options.entities.events.length;i++)o(i);t.options.entities.events=n,t.options.fetched=!0,t.options.settings.general.usedLanguages=e.data.data.settings.general.usedLanguages,t.languagesData=e.data.data.settings.languages,t.getNotifications()}).catch(function(e){console.log(e.message),t.fetched=!0,t.options.fetched=!0})},getNotifications:function(){var t=this;this.fetched=!1,this.$http.get(this.$root.getAjaxUrl+"/notifications").then(function(e){t.notifications=e.data.data.notifications,e.data.data.whatsAppTemplates&&(t.whatsAppTemplates=e.data.data.whatsAppTemplates),t.fetched=!0}).catch(function(e){console.log(e.message),t.fetched=!0})},setActiveTab:function(){var t=this.getUrlQueryParams(window.location.href);"notificationTab"in t&&"sms"===t.notificationTab&&(this.notificationTab="sms")},saveDialogManageLanguages:function(t){var e=this;this.manageLanguages=!1,this.options.settings.general.usedLanguages=t,this.usedLanguages=t,this.$http.post(this.$root.getAjaxUrl+"/settings",{usedLanguages:this.usedLanguages}).then(function(){e.notify(e.$root.labels.success,e.$root.labels.settings_saved,"success")}).catch(function(t){console.log(t)})}},computed:{needHelpPage:function(){return"email"===this.notificationTab?"https://wpamelia.com/notifications/":"https://wpamelia.com/sms-notifications/"}},components:{WhatsAppNotifications:w.a,PageHeader:i.a,CustomizeNotifications:r.a,SmsNotifications:l.a,quillEditor:u.quillEditor,DialogManageLanguages:m.a,DialogNewCustomize:b.a,AmSurvey:k.a}}},1078:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(701),i=n(711),a=n.n(i),r=n(771),s=(n.n(r),n(700)),l=n(780),c=n(696),u=n(1079),d=n.n(u),p=n(982),f=n.n(p),h=n(709),m=n.n(h),g=n(865),v=n(803),y=n.n(v),b=n(702),_=n(1082),w=n.n(_),x=n(747),k=n(699),P=n(1085);e.default={mixins:[l.a,o.a,s.a,c.a,g.a,b.a,x.a,k.a,P.a],props:{categories:{default:function(){return[]},type:Array},customFields:{default:function(){return[]},type:Array},coupons:{default:function(){return[]},type:Array},events:{default:function(){return[]},type:Array},notifications:{default:function(){return[]},type:Array},type:{default:"email",type:String},user:{default:function(){},type:Object},passedUsedLanguages:{default:function(){return[]},type:Array},languagesData:{default:function(){},type:Object},templates:{default:function(){return[]},type:Array}},data:function(){var t=this,e=function(e,n,o){""===n||n.startsWith("+")?o():o(new Error(t.$root.labels.enter_valid_phone_warning))};return{whatsAppPlaceholders:{header:[],body:[]},whatsAppPhRules:{header:{},body:{}},notificationContentText:"",showDelete:!1,newNotification:{},notificationName:"",notificationEnabled:!0,amountTime:1,intervalTime:"hours",createNewContent:!1,notificationType:"triggered",notificationTrigger:"approved",notificationEntity:"appointment",notificationTimed:"before",onTime:"00:00",services:[],selectedServices:[],selectedEvents:[],sendOnlyMe:!1,showActiveClass:!0,duplicateOptions:[{label:this.$root.labels.to_employee,value:"employee"},{label:this.$root.labels.to_customer,value:"customer"}],dialogPlaceholders:!1,dialogCombinedPlaceholder:!1,combinedPlaceholderName:"",combinedPlaceholderEntity:"",fetchedDelete:!0,fetchedUpdate:!0,form:new a.a,notification:{},entity:"appointment",sendTo:"customer",rules:{recipientEmail:[{required:!0,message:this.$root.labels.enter_recipient_email_warning,trigger:"submit"},{type:"email",message:this.$root.labels.enter_valid_email_warning,trigger:"submit"}],recipientPhone:[{required:!0,message:this.$root.labels.enter_recipient_phone_warning,trigger:"submit"},{validator:e,trigger:"submit"}],recipientWhatsApp:[{required:!0,message:this.$root.labels.enter_recipient_phone_warning,trigger:"submit"},{validator:e,trigger:"submit"}],notificationTemplate:[{required:!0,message:this.$root.labels.select_email_template_warning,trigger:"submit"}],notificationCustomName:[{validator:function(e,n,o){t.createNewContent&&!t.notificationName?o(new Error(t.$root.labels.enter_name_warning)):o()},trigger:"submit"}]},testNotification:{recipientEmail:"",recipientPhone:"",recipientWhatsApp:"",notificationTemplate:0,language:null,type:null},testNotificationLoading:!1,testNotificationModal:!1,userTypeTab:"customer",selectedLanguage:null,usedLanguages:[],intervalTimes:[{label:this.$root.labels.minutes,value:"minutes"},{label:this.$root.labels.hours,value:"hours"},{label:this.$root.labels.days,value:"days"},{label:this.$root.labels.weeks,value:"weeks"},{label:this.$root.labels.months,value:"months"}]}},created:function(){a.a.defaults.axios=this.$http},mounted:function(){this.notifications=this.notifications.sort(this.sortNotifications),this.entity="appointment","whatsapp"===this.type&&this.setPlaceholders(this.getExcludedPlaceholders(this.notification,!1,!1,!0)),this.getNotification(null),this.usedLanguages=this.passedUsedLanguages,this.services=this.getServicesFromCategories(this.categories)},methods:{changeLanguage:function(){this.textMode=!1,this.testNotification.language=this.selectedLanguage},deleteNotification:function(){var t=this;this.showDelete=!1,this.fetchedDelete=!1,this.form.post(this.$root.getAjaxUrl+"/notifications/delete/"+this.notification.id).then(function(e){t.fetchedDelete=!0;var n=t.notifications.map(function(t){return t.id}).indexOf(t.notification.id);if(n>-1){t.notifications.splice(n,1);var o=t.notifications.find(function(e){return e.sendTo===t.notification.sendTo&&e.entity===t.notification.entity&&e.type===t.notification.type}).id;t.getNotification(o)}t.notify(t.$root.labels.success,t.$root.labels.notification_deleted,"success")}).catch(function(){t.fetchedDelete=!0,t.notify(t.$root.labels.error,t.$root.labels.notification_not_deleted,"error")})},duplicateNotification:function(t){this.notification.customName&&(this.notification=this.getNotificationEntity(),"employee"===t?(this.notification.name=this.notification.name.replace("customer","provider"),this.notification.sendTo="provider"):"customer"===t&&(this.notification.name=this.notification.name.replace("provider","customer"),this.notification.sendTo="customer"),this.notification.customName=this.$root.labels.duplicate_of+this.notification.customName,this.callInsert(this.notification))},manageLanguages:function(){this.$emit("manageLanguages")},openDialogCombinedPlaceholders:function(t){var e=t;this.combinedPlaceholderName=e,this.combinedPlaceholderEntity=e.includes("group")?"group":this.entity,this.selectedLanguage&&(this.$root.settings.appointments.translations[e]||(this.$root.settings.appointments.translations[e]={}),this.selectedLanguage in this.$root.settings.appointments.translations[e]||(this.$root.settings.appointments.translations[e][this.selectedLanguage]=this.$root.settings.appointments[e])),this.dialogCombinedPlaceholder=!0},getExcludedPlaceholders:function(t,e,n,o){var i={};switch(this.userTypeTab){case"provider":i={employeePlaceholders:[],customerPlaceholders:["%customer_panel_url%"],appointmentPlaceholders:["%zoom_join_url%","%appointment_cancel_url%","%reservation_name%","%reservation_description%"],eventPlaceholders:["%zoom_join_url_date%","%zoom_join_url_date_time%","%event_cancel_url%"],paymentPlaceholders:["%payment_link_woocommerce%","%payment_link_stripe%","%payment_link_paypal%","%payment_link_mollie%","%payment_link_razorpay%"]};break;case"customer":i={customerPlaceholders:[],employeePlaceholders:["%employee_panel_url%","%employee_password%"],appointmentPlaceholders:["%zoom_host_url%","%booked_customer%","%reservation_name%","%reservation_description%","%group_appointment_details%"],eventPlaceholders:["%zoom_host_url_date%","%zoom_host_url_date_time%","%group_event_details%"],paymentPlaceholders:[]}}if(i.appointmentPlaceholders.push("%reservation_name%"),i.appointmentPlaceholders.push("%reservation_description%"),i.eventPlaceholders.push("%reservation_name%"),i.eventPlaceholders.push("%reservation_description%"),t&&t.name&&!t.name.includes("reschedule")&&"whatsapp"!==t.type&&(i.appointmentPlaceholders.push("%initial_appointment_date%"),i.appointmentPlaceholders.push("%initial_appointment_date_time%"),i.appointmentPlaceholders.push("%initial_appointment_start_time%"),i.appointmentPlaceholders.push("%initial_appointment_end_time%"),i.eventPlaceholders.push("%initial_event_start_date%"),i.eventPlaceholders.push("%initial_event_start_date_time%"),i.eventPlaceholders.push("%initial_event_start_time%"),i.eventPlaceholders.push("%initial_event_end_date%"),i.eventPlaceholders.push("%initial_event_end_date_time%"),i.eventPlaceholders.push("%initial_event_end_time%")),t&&t.name&&(t.name.includes("canceled")||t.name.includes("rejected"))&&"whatsapp"!==t.type&&(i.paymentPlaceholders.push("%payment_link_woocommerce%"),i.paymentPlaceholders.push("%payment_link_stripe%"),i.paymentPlaceholders.push("%payment_link_mollie%"),i.paymentPlaceholders.push("%payment_link_paypal%"),i.paymentPlaceholders.push("%payment_link_razorpay%")),t&&"whatsapp"!==t.type)switch(t.entity){case"event":i.paymentPlaceholders.push("%appointment_deposit_payment%"),i.paymentPlaceholders.push("%package_deposit_payment%");break;case"appointment":["customer_package_purchased","customer_package_canceled","provider_package_purchased","provider_package_canceled"].includes(t.name)?(i.paymentPlaceholders.push("%appointment_deposit_payment%"),i.paymentPlaceholders.push("%event_deposit_payment%")):(i.paymentPlaceholders.push("%event_deposit_payment%"),i.paymentPlaceholders.push("%package_deposit_payment%"))}return n&&(i.employeePlaceholders.push("%employee_panel_url%"),i.employeePlaceholders.push("%employee_password%"),i.appointmentPlaceholders.push("%booked_customer%"),i.appointmentPlaceholders.push("%coupon_used%"),i.appointmentPlaceholders.push("%number_of_persons%"),"package"===this.combinedPlaceholderEntity&&(i.paymentPlaceholders=["%payment_link_woocommerce%","%payment_link_stripe%","%payment_link_paypal%","%payment_link_mollie%","%payment_link_razorpay%"])),(n||t&&!o&&-1===["customer_appointment_approved","customer_appointment_pending","provider_appointment_approved","provider_appointment_pending"].indexOf(t.name))&&(i.appointmentPlaceholders.push("%recurring_appointments_details%"),i.appointmentPlaceholders.push("%package_appointments_details%")),t&&-1!==["provider_appointment_updated","customer_appointment_updated"].indexOf(t.name)&&(i.appointmentPlaceholders.push("%recurring_appointments_details%"),i.appointmentPlaceholders.push("%package_appointments_details%")),n&&t&&-1!==["customer_package_purchased","provider_package_purchased","customer_package_canceled","provider_package_canceled"].indexOf(t.name)&&(i.appointmentPlaceholders.push("%appointment_price%"),i.appointmentPlaceholders.push("%time_zone%")),"sms"===this.type&&(i.paymentPlaceholders=i.paymentPlaceholders.concat(["%payment_link_woocommerce%","%payment_link_stripe%","%payment_link_paypal%","%payment_link_mollie%","%payment_link_razorpay%"])),i},getDialogPlaceholderNames:function(t){if("group"===this.combinedPlaceholderEntity){if("appointment"===this.entity)return["appointmentPlaceholders","extrasPlaceholders","customFieldsPlaceholders","customerPlaceholders"];if("event"===this.entity)return["eventPlaceholders","customFieldsPlaceholders","customerPlaceholders"]}var e=["employeePlaceholders","categoryPlaceholders","locationPlaceholders","appointmentPlaceholders","customFieldsPlaceholders","extrasPlaceholders"],n=["employeePlaceholders","categoryPlaceholders","locationPlaceholders","appointmentPlaceholders","customFieldsPlaceholders"];switch(t.name){case"provider_appointment_approved":case"provider_appointment_pending":return e;case"customer_appointment_approved":case"customer_appointment_pending":return e.concat(["paymentPlaceholders"]);case"customer_package_purchased":case"customer_package_canceled":return n.concat(["paymentPlaceholders"]);case"provider_package_purchased":case"provider_package_canceled":return n}},getInlinePlaceholdersNames:function(t){var e=["customerPlaceholders","companyPlaceholders","paymentPlaceholders"];if(-1!==["customer_birthday_greeting","customer_account_recovery"].indexOf(t.name))return e;if(-1!==["provider_panel_access","provider_panel_recovery"].indexOf(t.name))return["employeePlaceholders","companyPlaceholders"];switch(this.entity){case"package":return e.concat(["packagePlaceholders","couponsPlaceholders"]);case"event":return"customer"===this.userTypeTab&&(e=e.concat(["couponsPlaceholders"])),e.concat(["eventPlaceholders","customFieldsPlaceholders","employeePlaceholders","locationPlaceholders"]);case"appointment":return"customer"===this.userTypeTab&&(e=e.concat(["couponsPlaceholders"])),e.concat(["appointmentPlaceholders","customFieldsPlaceholders","employeePlaceholders","locationPlaceholders","extrasPlaceholders","categoryPlaceholders"])}return e},getSortedInlinePlaceholders:function(){return this.getInlinePlaceholdersNames(this.notification).sort(function(t,e){return t.toLowerCase()>e.toLowerCase()?1:-1})},isNotificationVisible:function(t){return!!("customer_package_purchased"!==t.name&&"provider_package_purchased"!==t.name&&"customer_package_canceled"!==t.name&&"provider_package_canceled"!==t.name||this.$root.licence.isPro||this.$root.licence.isDeveloper)},onChangeUserTypeTab:function(t){var e=this;this.inlineSVG(),this.showActiveClass&&(this.entity="appointment",this.notification.type!==t.name&&(this.notification=this.notifications.find(function(n){return n.type===e.type&&n.sendTo===t.name&&n.entity===e.entity}),this.sendTo=this.notification.sendTo,this.notification.customName?(this.setCustomNotificationFields(),this.createNewContent=!0):this.createNewContent=!1,"whatsapp"===this.type&&(this.setPlaceholders(this.getExcludedPlaceholders(this.notification,!1,!1,!0)),this.updatePlaceholders()),this.focusOnName()))},getNotification:function(t){var e=this;this.$refs.notification.clearValidate(),this.createNewContent=!1,this.showActiveClass=!0,this.notification=null===t?this.notifications.find(function(t){return t.type===e.type&&t.entity===e.entity&&t.sendTo===e.sendTo}):this.notifications.find(function(e){return e.id===t}),this.notification.customName&&(this.createNewContent=!0,this.setCustomNotificationFields()),this.entity=this.notification.entity,this.testNotification.type=this.notification.entity,this.testNotification.notificationTemplate=this.notification.id,"customer_package_purchased"!==this.notification.name&&"provider_package_purchased"!==this.notification.name&&"customer_package_canceled"!==this.notification.name&&"provider_package_canceled"!==this.notification.name||(this.entity="package",this.testNotification.type="package"),this.notificationContentText=this.process(this.notificationContent.replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")),"whatsapp"===this.type&&this.updatePlaceholders(),this.focusOnName()},createNotification:function(){var t=this;this.$refs.notification.clearValidate(),this.$refs.notification.validate(function(e){var n="whatsapp"!==t.type||t.validateForm();if(!e||!n)return!1;var o=t.getNotificationEntity();t.callInsert(o)})},callInsert:function(t){var e=this;this.fetchedUpdate=!1,this.form.post(this.$root.getAjaxUrl+"/notifications",t).then(function(n){n.data.update&&(e.notification.content=n.data.notification.content),e.fetchedUpdate=!0,t.id=n.data.id,e.notifications.unshift(t),e.getNotification(t.id),e.notify(e.$root.labels.success,e.$root.labels.notification_saved,"success")}).catch(function(){e.fetchedUpdate=!0,e.notify(e.$root.labels.error,e.$root.labels.notification_not_saved,"error")})},updateNotification:function(){var t=this;this.$refs.notification.clearValidate(),this.$refs.notification.validate(function(e){var n="whatsapp"!==t.type||t.validateForm();if(!e||!n)return!1;if(t.fetchedUpdate=!1,t.notification.customName){var o=t.notification.id;t.notification=t.getNotificationEntity(),t.notification.id=o}"whatsapp"===t.type&&(t.notification.subject=t.whatsAppPlaceholders.header.map(function(t){return t.value}).join(" "),t.notification.content=t.whatsAppPlaceholders.body.map(function(t){return t.value}).join(" ")),t.form.post(t.$root.getAjaxUrl+"/notifications/"+t.notification.id,t.notification).then(function(e){e.data.update&&(t.notification.content=e.data.notification.content),t.notification=e.data.notification,t.setCustomNotificationFields();var n=t.notifications.map(function(t){return t.id}).indexOf(t.notification.id);-1!==n&&(t.notifications[n]=t.notification),t.fetchedUpdate=!0,t.notify(t.$root.labels.success,t.$root.labels.notification_saved,"success")}).catch(function(e){console.log(e),t.fetchedUpdate=!0,t.notify(t.$root.labels.error,t.$root.labels.notification_not_saved,"error")})})},changeNotificationStatus:function(t){var e=this;this.fetchedUpdate=!1,this.form.post(this.$root.getAjaxUrl+"/notifications/status/"+t.id,t).then(function(){e.fetchedUpdate=!0,e.notify(e.$root.labels.success,e.$root.labels.notification_saved,"success")}).catch(function(){e.fetchedUpdate=!0,e.notify(e.$root.labels.error,e.$root.labels.notification_not_saved,"error")})},showDialogPlaceholders:function(){this.dialogPlaceholders=!0},openTestNotificationModal:function(){this.testNotificationModal=!0},sendTestNotification:function(){"sms"===this.type?this.sendTestSMS():this.sendTest()},sendTest:function(){var t=this;this.$refs.testNotification.validate(function(e){if(!e)return!1;t.testNotificationLoading=!0,t.form.post(t.$root.getAjaxUrl+"/notifications/"+t.type+"/test",t.testNotification).then(function(){t.onSendTestNotificationSuccess()}).catch(function(){t.onSendTestNotificationError()})})},sendTestSMS:function(){var t=this;this.$refs.testNotification.validate(function(e){if(!e)return!1;t.testNotificationLoading=!0,t.sendAmeliaSmsApiRequest("testNotification",t.onSendTestNotificationSuccess,t.onSendTestNotificationError)})},onSendTestNotificationSuccess:function(){this.clearValidation(),this.testNotificationModal=!1,this.testNotificationLoading=!1,this.testNotification=this.resetTestNotificationOnInitialState(),this.notify(this.$root.labels.success,this.$root.labels["test_"+this.type+"_success"],"success")},onSendTestNotificationError:function(){this.testNotificationLoading=!1,this.notify(this.$root.labels.error,this.$root.labels["test_"+this.type+"_error"],"error")},phoneFormatted:function(t){this.clearValidation(),this.testNotification.recipientPhone=t},phoneWhatsAppFormatted:function(t){this.clearValidation(),this.testNotification.recipientWhatsApp=t},clearValidation:function(){void 0!==this.$refs.testNotification&&this.$refs.testNotification.clearValidate()},resetTestNotificationOnInitialState:function(){return{recipientEmail:"",recipientPhone:"",recipientWhatsApp:"",notificationTemplate:this.notification.id,language:this.selectedLanguage,type:this.entity}},isDisabled:function(t,e){return e.status=e.name!==t+"_appointment_approved"&&e.name!==t+"_appointment_pending"&&e.name!==t+"_event_approved"?"disabled":e.status,!!this.$root.isLite&&(e.name!==t+"_appointment_approved"&&e.name!==t+"_appointment_pending"&&e.name!==t+"_event_approved")},customerNotifications:function(t){var e=this;if("customer_other_notifications"===t)return this.notifications.filter(function(t){return t.type===e.type&&"customer"===t.sendTo&&-1!==["customer_birthday_greeting","customer_account_recovery"].indexOf(t.name)});var n=this.notifications.filter(function(n){return"customer"===n.sendTo&&n.type===e.type&&n.entity===t&&-1===["customer_birthday_greeting","customer_account_recovery"].indexOf(n.name)}),o=n.find(function(e){return e.name==="customer_"+t+"_updated"&&!e.customName}),i=n.indexOf(o);if(o&&-1!==i){n.splice(i,1);var a=n.find(function(t){return t.name.includes("rescheduled")&&!t.customName}),r=n.indexOf(a);n.splice(r,0,o)}return n},employeeNotifications:function(t){var e=this;if("provider_other_notifications"!==t||"email"!==this.type&&"whatsapp"!==this.type){var n=this.notifications.filter(function(n){return"provider"===n.sendTo&&n.type===e.type&&n.entity===t&&-1===["provider_panel_access","provider_panel_recovery"].indexOf(n.name)}),o=n.find(function(e){return e.name==="provider_"+t+"_updated"&&!e.customName}),i=n.indexOf(o);if(o&&-1!==i){n.splice(i,1);var a=n.find(function(t){return t.name.includes("rescheduled")&&!t.customName}),r=n.indexOf(a);n.splice(r,0,o)}return n}return this.notifications.filter(function(t){return t.type===e.type&&"provider"===t.sendTo&&-1!==["provider_panel_access","provider_panel_recovery"].indexOf(t.name)})},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"}},watch:{passedUsedLanguages:function(){this.usedLanguages=this.passedUsedLanguages}},computed:{notificationTime:{get:function(){return null!==this.notification.time?this.$moment(this.notification.time,"HH:mm:ss").format("HH:mm"):null},set:function(t){this.notification.time=this.$moment(t,"HH:mm").format("HH:mm:ss")}},notificationSubject:{get:function(){if(this.selectedLanguage&&this.notification.translations){var t=JSON.parse(this.notification.translations);if(t.subject&&t.subject[this.selectedLanguage])return t.subject[this.selectedLanguage]}return this.notification.subject},set:function(t){if(this.selectedLanguage){this.notification.translations=this.notification.translations?this.notification.translations:"{}";var e=JSON.parse(this.notification.translations);e.subject||(e.subject={}),e.subject[this.selectedLanguage]=t,this.notification.translations=JSON.stringify(e)}else this.notification.subject=t}},notificationContent:{get:function(){if(this.selectedLanguage&&this.notification.translations){var t=JSON.parse(this.notification.translations);if(t.content&&t.content[this.selectedLanguage])return t.content[this.selectedLanguage]}return this.notification.content},set:function(t){if(this.selectedLanguage){this.notification.translations=this.notification.translations?this.notification.translations:"{}";var e=JSON.parse(this.notification.translations);e.content||(e.content={}),e.content[this.selectedLanguage]=t,this.notification.translations=JSON.stringify(e)}else this.notification.content=t}},notificationTimeBased:function(){return null!==this.notification.time||null!==this.notification.timeBefore||null!==this.notification.timeAfter},disabledSendTestNotification:function(){return"email"===this.type&&!this.$root.settings.notifications.senderEmail||"sms"===this.type&&void 0!==this.user&&!this.user.balance}},components:{WhatsAppPlaceholders:w.a,quillEditor:r.quillEditor,DialogPlaceholders:d.a,DialogCombinedPlaceholder:f.a,PhoneInput:m.a,InlinePlaceholders:y.a}}},1079:function(t,e,n){var o=n(335)(n(1080),n(1081),!1,null,null,null);t.exports=o.exports},1080:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(696),i=n(699),a=n(747);e.default={mixins:[a.a,o.a,i.a],props:{excludedPlaceholders:{default:function(){return[]}},entity:{default:"appointment",type:String},customFields:{default:[]},categories:{default:[]},coupons:{default:[]},type:{default:"email",type:String},userTypeTab:null},data:function(){return{}},mounted:function(){this.inlineSVG(),this.setPlaceholders(this.excludedPlaceholders);var t=[];switch(this.entity){case"event":t=this.getEventPlaceholders();break;case"package":t=this.getPackagePlaceholders();break;case"appointment":t=this.getAppointmentPlaceholders()}this.placeholders=this.placeholders.concat(t)},methods:{},computed:{sortedPlaceholders:function(){return this.placeholders.sort(function(t,e){return t.value>e.value?1:e.value>t.value?-1:0})}}}},1081: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[t.type+"_placeholders"]))])]),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("div",{staticClass:"am-email-codes"},[n("div",{staticClass:"am-email-code"},t._l(t.sortedPlaceholders,function(e){return n("el-tooltip",{key:e.code,attrs:{effect:"dark",content:e.label,placement:"left"}},[n("p",{class:{"am-lite-container-disabled":t.isDisabledInLite(e.value)},on:{click:function(n){t.copyCodeText("parse"in e?t.getParsedCodeLabel(e):e.value)}}},[n("i",{staticClass:"el-icon-information"}),t._v(" "),n("span",[t._v(t._s(e.value))]),t._v(" "),n("span",{staticClass:"am-copy-code"},[t._v(t._s(t.$root.labels.copy))]),t._v(" "),n("span",{staticClass:"am-copied-code"},[t._v(t._s(t.$root.labels.copied))])])])}),1)])])])},staticRenderFns:[]}},1082:function(t,e,n){var o=n(335)(n(1083),n(1084),!1,null,null,null);t.exports=o.exports},1083:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(747);e.default={mixins:[o.a],props:{whatsappPlaceholders:{default:function(){return[]},type:Array},allPlaceholders:{default:function(){return[]},type:Array},allPlaceholderTypes:{default:function(){return{}},type:Object},name:{default:""},rules:{default:function(){return{}},type:Object},notification:{default:function(){return{}},type:Object}},methods:{changeType:function(t){this.whatsappPlaceholders[t].value=this.allPlaceholderTypes[this.whatsappPlaceholders[t].type][0].value,void 0!==this.$refs.whatsappPlaceholders&&this.$refs.whatsappPlaceholders.clearValidate()},isMultipleRowsPh:function(t){return["%number_of_persons%","%coupon_used%","%booked_customer%","%employee_name_email_phone%","%event_period_date%","%event_period_date_time%"].includes(t)||t.includes("coupon")},getPlaceholders:function(t){if(!t.type)return this.allPlaceholderTypes[t.type];var e=JSON.parse(JSON.stringify(this.allPlaceholderTypes[t.type]));return this.notification.name&&(this.notification.name.includes("rejected")||this.notification.name.includes("canceled"))&&(e=e.filter(function(t){return!t.value.includes("payment_link")})),"appointment"===this.notification.entity?e=["customer_package_purchased","customer_package_canceled","provider_package_purchased","provider_package_canceled"].includes(this.notification.name)?e.filter(function(t){return!t.value.includes("event_deposit")&&!t.value.includes("appointment_deposit")}):e.filter(function(t){return!t.value.includes("event_deposit")&&!t.value.includes("package_deposit")}):"event"===this.notification.entity&&(e=e.filter(function(t){return!t.value.includes("appointment_deposit")&&!t.value.includes("package_deposit")})),this.notification.name&&this.notification.name.includes("updated")&&(e=e.filter(function(t){return!t.value.includes("recurring_appointment")})),this.notification.name&&this.notification.name.includes("rescheduled")?e:e.filter(function(t){return!t.value.includes("initial")})}}}},1084:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-whatsapp-placeholders"},[n("el-alert",{staticClass:"am-whatsapp-placeholders-notice-warn",attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels["whatsapp_notice_"+t.name],closable:!1}}),t._v(" "),n("el-form",{ref:"whatsappPlaceholders",attrs:{model:{whatsappPlaceholders:t.whatsappPlaceholders},rules:t.rules},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},t._l(t.whatsappPlaceholders,function(e,o){return n("div",{key:o},[n("el-row",[n("p",{domProps:{innerHTML:t._s(t.$root.labels.placeholder+" {{"+(o+1)+"}}:")}})]),t._v(" "),n("el-row",{staticStyle:{gap:"30px"},attrs:{type:"flex"}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{prop:"whatsappPlaceholders."+o+".type"}},[n("el-select",{attrs:{placeholder:t.$root.labels.choose_type,filterable:""},on:{change:function(e){return t.changeType(o)}},model:{value:e.type,callback:function(n){t.$set(e,"type",n)},expression:"placeholder.type"}},t._l(t.allPlaceholders,function(e){return n("el-option",{key:e,attrs:{label:t.$root.labels[e],value:e}})}),1)],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{prop:"whatsappPlaceholders."+o+".value"}},[n("el-select",{attrs:{placeholder:t.$root.labels.choose_ph,filterable:""},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"placeholder.value"}},t._l(t.getPlaceholders(e),function(e){return n("el-option",{key:e.value,attrs:{label:t.$root.labels[e],value:e.value}})}),1)],1)],1)],1),t._v(" "),n("el-row",[t.isMultipleRowsPh(e.value)?n("el-col",{staticClass:"am-whatsapp-placeholders-notice-info"},[n("el-alert",{attrs:{type:"info","show-icon":"",title:"",description:t.$root.labels.whatsapp_notice_ph,closable:!1}})],1):t._e()],1)],1)}),0)],1)},staticRenderFns:[]}},1085:function(t,e,n){"use strict";e.a={data:function(){return{}},methods:{findMatches:function(t){var e=t.match(/{{(.*?)}}/g),n=[];if(e)for(var o=0;o<e.length;o++)n.push({type:"",value:""});return n},findPlaceholderType:function(t){var e=this,n="";return Object.keys(this.groupedPlaceholders).forEach(function(o){if(e.groupedPlaceholders[o].find(function(e){return e.value===t}))return n=o,!1}),n},updatePlaceholders:function(){var t=this;this.whatsAppPhRules={header:{},body:{}};var e=this.findTemplate();[{name:"header",field:"subject"},{name:"body",field:"content"}].forEach(function(n){var o=t.getWhatsAppComponent(n.name,e);if(t.whatsAppPlaceholders[n.name]=o?t.findMatches(o):[],null!==t.notification[n.field]){var i=t.notification[n.field].split(" ");t.whatsAppPlaceholders[n.name].forEach(function(e,o){e.type=o<i.length?t.findPlaceholderType(i[o]):"",e.value=o<i.length?i[o]:"",t.whatsAppPhRules[n.name]["whatsappPlaceholders."+o+".type"]=[{required:!0,message:t.$root.labels.whatsapp_select_ph,trigger:"submit"}],t.whatsAppPhRules[n.name]["whatsappPlaceholders."+o+".value"]=[{required:!0,message:t.$root.labels.whatsapp_select_ph,trigger:"submit"}]})}}),this.$nextTick(function(){t.$refs.whatsAppHeader&&t.$refs.whatsAppHeader.$refs.whatsappPlaceholders&&t.$refs.whatsAppHeader.$refs.whatsappPlaceholders.clearValidate(),t.$refs.whatsAppBody&&t.$refs.whatsAppBody.$refs.whatsappPlaceholders&&t.$refs.whatsAppBody.$refs.whatsappPlaceholders.clearValidate()})},validateForm:function(){var t=!0;return this.$refs.whatsAppHeader&&this.$refs.whatsAppHeader.$refs.whatsappPlaceholders&&this.$refs.whatsAppHeader.$refs.whatsappPlaceholders.validate(function(e){return t=e}),this.$refs.whatsAppBody&&this.$refs.whatsAppBody.$refs.whatsappPlaceholders&&this.$refs.whatsAppBody.$refs.whatsappPlaceholders.validate(function(e){return t=t?e:t}),t},getWhatsAppComponent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"body",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e||this.findTemplate();if(n&&n.components){var o=n.components.find(function(e){return e.type===t.toUpperCase()&&("header"!==t||"TEXT"===e.format)});return o?o.text:null}return null},findTemplate:function(){var t=this;return this.templates.find(function(e){return e.name===t.notification.whatsAppTemplate})},getStatusColor:function(t){switch(t.status){case"APPROVED":return"#5FCE19";case"PENDING":return"#FFA700";case"REJECTED":return"#ff1563"}}}}},1086:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-row",{staticClass:"am-customize-notifications"},[n("el-col",{attrs:{md:8}},[n("div",{staticClass:"am-section am-gray-section"},[n("el-tabs",{attrs:{"active-name":t.notification.sendTo},on:{"tab-click":t.onChangeUserTypeTab},model:{value:t.userTypeTab,callback:function(e){t.userTypeTab=e},expression:"userTypeTab"}},[n("el-tab-pane",{attrs:{label:t.$root.labels.to_customer,name:"customer"}},t._l(["appointment","event","customer_other_notifications"],function(e){return n("div",{staticClass:"am-email-notification-buttons"},[n("div",{staticClass:"am-email-notification-labels"},[t._v("\n "+t._s(t.$root.labels[e])+" "+t._s(t.$root.labels.notifications)+"\n ")]),t._v(" "),n("div",{staticClass:"am-button-checkbox"},["customer_other_notifications"!==e?n("el-button",{staticClass:"am-active-create",staticStyle:{position:"relative"},attrs:{size:"large",disabled:t.$root.isLite},on:{click:function(n){return t.createNew(e,!0)}}},[n("img",{staticStyle:{position:"absolute",left:"16px"},attrs:{src:t.$root.getUrl+"public/img/am-plus.svg"}}),t._v("\n "+t._s(t.$root.labels.create_notification)+"\n ")]):t._e()],1),t._v(" "),t._l(t.customerNotifications(e),function(e,o){return t.isNotificationVisible(e)?n("div",{staticClass:"am-button-checkbox"},[n("el-button",{key:o,class:{"am-active":e.id===t.notification.id&&t.showActiveClass,"text-margin":e.customName&&(e.time||e.timeBefore||e.timeAfter)},attrs:{size:"large",disabled:t.isDisabled("customer",e)},on:{click:function(n){return t.getNotification(e.id)}}},[t._v("\n "+t._s(e.customName?e.customName:t.$root.labels[e.name])+"\n ")]),t._v(" "),n("el-checkbox",{attrs:{disabled:t.isDisabled("customer",e),"true-label":"enabled","false-label":"disabled"},on:{change:function(n){return t.changeNotificationStatus(e)}},model:{value:e.status,callback:function(n){t.$set(e,"status",n)},expression:"item.status"}}),t._v(" "),e.customName?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$root.labels.edit_notification,placement:"top"}},[n("span",{staticClass:"am-cron-icon",class:{active:e.id===t.notification.id&&t.showActiveClass,right:e.time||e.timeBefore||e.timeAfter}},[n("img",{staticClass:"svg-amelia",attrs:{src:t.$root.getUrl+"public/img/am-edit-notification.svg"}})])]):t._e(),t._v(" "),e.time||e.timeBefore||e.timeAfter?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$root.labels.requires_scheduling_setup,placement:"top"}},[n("span",{staticClass:"am-cron-icon",class:{active:e.id===t.notification.id&&t.showActiveClass}},[n("img",{staticClass:"svg-amelia",attrs:{src:t.$root.getUrl+"public/img/cron-job.svg"}})])]):t._e()],1):t._e()})],2)}),0),t._v(" "),n("el-tab-pane",{attrs:{label:t.$root.labels.to_employee,name:"provider"}},t._l(["appointment","event","provider_other_notifications"],function(e){return n("div",{staticClass:"am-email-notification-buttons"},[n("div",{staticClass:"am-email-notification-labels"},[t._v("\n "+t._s(t.$root.labels[e])+" "+t._s(t.$root.labels.notifications)+"\n ")]),t._v(" "),n("div",{staticClass:"am-button-checkbox"},["provider_other_notifications"!==e?n("el-button",{staticClass:"am-active-create",staticStyle:{position:"relative"},attrs:{size:"large",disabled:t.$root.isLite},on:{click:function(n){return t.createNew(e,!1)}}},[n("img",{staticStyle:{position:"absolute",left:"16px"},attrs:{src:t.$root.getUrl+"public/img/am-plus.svg"}}),t._v("\n "+t._s(t.$root.labels.create_notification)+"\n ")]):t._e()],1),t._v(" "),t._l(t.employeeNotifications(e),function(e,o){return t.isNotificationVisible(e)?n("div",{staticClass:"am-button-checkbox"},[n("el-button",{key:o,class:{"am-active":e.id===t.notification.id&&t.showActiveClass,"text-margin":e.customName&&(e.time||e.timeBefore||e.timeAfter)},attrs:{size:"large",disabled:t.isDisabled("provider",e)},on:{click:function(n){return t.getNotification(e.id)}}},[t._v("\n "+t._s(e.customName?e.customName:t.$root.labels[e.name])+"\n ")]),t._v(" "),n("el-checkbox",{attrs:{disabled:t.isDisabled("provider",e),"true-label":"enabled","false-label":"disabled"},on:{change:function(n){return t.changeNotificationStatus(e)}},model:{value:e.status,callback:function(n){t.$set(e,"status",n)},expression:"item.status"}}),t._v(" "),e.customName?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$root.labels.edit_notification,placement:"top"}},[n("span",{staticClass:"am-cron-icon",class:{active:e.id===t.notification.id&&t.showActiveClass,right:e.time||e.timeBefore||e.timeAfter}},[n("img",{staticClass:"svg-amelia",attrs:{src:t.$root.getUrl+"public/img/am-edit-notification.svg"}})])]):t._e(),t._v(" "),e.time||e.timeBefore||e.timeAfter?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$root.labels.requires_scheduling_setup,placement:"top"}},[n("span",{staticClass:"am-cron-icon",class:{active:e.id===t.notification.id}},[n("img",{staticClass:"svg-amelia",attrs:{src:t.$root.getUrl+"public/img/cron-job.svg"}})])]):t._e()],1):t._e()})],2)}),0)],1)],1)]),t._v(" "),n("el-col",{attrs:{md:16}},[n("div",{staticClass:"am-section am-email-form-settings"},[n("transition",{attrs:{name:"fadeIn"}},[n("el-form",{ref:"notification",attrs:{model:t.notification,rules:t.rules},on:{submit:function(e){return e.preventDefault(),t.createNotification(e)}}},[t.createNewContent?n("BlockLite"):t._e(),t._v(" "),t.createNewContent?n("div",{class:{"am-lite-disabled":t.$root.isLite}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{lg:12,md:12,sm:12,xs:24}},[n("div",[t.showActiveClass?n("h2",[t._v(t._s(this.notification.customName))]):n("h2",[t._v(t._s(t.$root.labels.create_notification))])])]),t._v(" "),n("el-col",{staticStyle:{display:"flex","justify-content":"flex-end"},attrs:{lg:12,md:12,sm:12,xs:24}},[t.showActiveClass?t._e():n("el-button",{attrs:{size:"small"},on:{click:function(e){return t.getNotification(null)}}},[t._v("\n "+t._s(t.$root.labels.discard)+"\n ")]),t._v(" "),t.showActiveClass?n("el-select",{staticClass:"duplicate",attrs:{value:t.$root.labels.duplicate},on:{change:function(e){return t.duplicateNotification(e)}}},t._l(t.duplicateOptions,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1):t._e(),t._v(" "),t.showActiveClass?n("div",[n("el-button",{staticStyle:{position:"relative"},attrs:{size:"small",loading:!t.fetchedDelete},on:{click:function(e){t.showDelete=!t.showDelete}}},[n("img",{staticStyle:{"vertical-align":"text-bottom"},attrs:{src:t.$root.getUrl+"public/img/am-trashcan-red.svg"}}),t._v(" "),n("span",{staticClass:"red"},[t._v(t._s(t.$root.labels.delete))])]),t._v(" "),t.showDelete?n("div",{staticClass:"deleteModal"},[n("p",{domProps:{innerHTML:t._s(t.$root.labels.delete_message)}}),t._v(" "),n("div",{staticStyle:{display:"flex","justify-content":"flex-end"}},[n("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDelete=!1}}},[t._v(t._s(t.$root.labels.cancel))]),t._v(" "),n("el-button",{attrs:{size:"small",type:"danger"},on:{click:t.deleteNotification}},[t._v(t._s(t.$root.labels.delete))])],1)]):t._e()],1):t._e()],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{md:12,lg:12,sm:24}},[n("p",{staticStyle:{margin:"0"}},[t._v(t._s(t.$root.labels.name))]),t._v(" "),n("el-form-item",{attrs:{prop:"notificationCustomName"}},[n("el-input",{ref:"notificationName",model:{value:t.notificationName,callback:function(e){t.notificationName=e},expression:"notificationName"}})],1)],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{md:10,lg:12}},[n("el-switch",{model:{value:t.notificationEnabled,callback:function(e){t.notificationEnabled=e},expression:"notificationEnabled"}}),t._v(" "),n("p",{staticStyle:{display:"inline-block",margin:"0","margin-left":"10px"}},[t._v("\n "+t._s(t.$root.labels.notification_enabled)+"\n ")])],1)],1),t._v(" "),n("hr",{staticStyle:{"margin-top":"16px","margin-bottom":"16px"}}),t._v(" "),n("el-row",[n("el-col",[n("p",[t._v(t._s(t.$root.labels.notification_type))]),t._v(" "),n("el-radio",{attrs:{label:"triggered"},model:{value:t.notificationType,callback:function(e){t.notificationType=e},expression:"notificationType"}},[t._v(t._s(t.$root.labels.notification_triggered))]),t._v(" "),n("el-radio",{attrs:{label:"scheduled"},model:{value:t.notificationType,callback:function(e){t.notificationType=e},expression:"notificationType"}},[t._v(t._s(t.$root.labels.notification_scheduled))])],1)],1),t._v(" "),"triggered"===t.notificationType&&"appointment"===t.notificationEntity?n("el-row",[n("el-col",[n("p",[t._v(t._s(t.$root.labels.notification_appointment_status))]),t._v(" "),n("el-radio",{attrs:{label:"approved"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.approved))]),t._v(" "),n("el-radio",{attrs:{label:"pending"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.pending))]),t._v(" "),n("el-radio",{attrs:{label:"canceled"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.canceled))]),t._v(" "),n("el-radio",{attrs:{label:"rejected"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.rejected))]),t._v(" "),n("el-radio",{attrs:{label:"rescheduled"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.rescheduled))]),t._v(" "),n("el-radio",{attrs:{label:"updated"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.details_changed))])],1)],1):t._e(),t._v(" "),"triggered"===t.notificationType&&"event"===t.notificationEntity?n("el-row",[n("el-col",[n("p",[t._v(t._s(t.$root.labels.notification_event_action))]),t._v(" "),n("el-radio",{attrs:{label:"approved"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.booked))]),t._v(" "),n("el-radio",{attrs:{label:"rejected"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.canceled_by_admin))]),t._v(" "),n("el-radio",{attrs:{label:"canceled"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.canceled_by_attendee))]),t._v(" "),n("el-radio",{attrs:{label:"rescheduled"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.rescheduled))]),t._v(" "),n("el-radio",{attrs:{label:"updated"},model:{value:t.notificationTrigger,callback:function(e){t.notificationTrigger=e},expression:"notificationTrigger"}},[t._v(t._s(t.$root.labels.details_changed))])],1)],1):t._e(),t._v(" "),"appointment"===t.notificationEntity?n("el-row",[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[t._v(t._s(t.$root.labels.services))]),t._v(" "),n("el-select",{attrs:{placeholder:t.$root.labels.all_services,multiple:"",filterable:"","collapse-tags":""},model:{value:t.selectedServices,callback:function(e){t.selectedServices=e},expression:"selectedServices"}},t._l(t.services,function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)],1):t._e(),t._v(" "),"event"===t.notificationEntity?n("el-row",[n("el-col",{attrs:{lg:12,md:12,sm:24}},[n("p",[t._v(t._s(t.$root.labels.events))]),t._v(" "),n("el-select",{attrs:{placeholder:t.$root.labels.all_events,multiple:"",filterable:"","collapse-tags":""},model:{value:t.selectedEvents,callback:function(e){t.selectedEvents=e},expression:"selectedEvents"}},t._l(t.events,function(t){return n("el-option",{key:t.id,attrs:{label:t.displayName?t.displayName:t.name,value:t.id}})}),1)],1)],1):t._e(),t._v(" "),"scheduled"!==t.notificationType||"sameDay"!==t.notificationTimed?n("el-row",[n("el-col",{attrs:{md:10,lg:12}},[n("el-switch",{model:{value:t.sendOnlyMe,callback:function(e){t.sendOnlyMe=e},expression:"sendOnlyMe"}}),t._v(" "),n("p",{staticStyle:{display:"inline-block",margin:"0","margin-left":"10px"}},[t._v("\n "+t._s(t.$root.labels.send_only_this)+"\n ")]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},["appointment"===t.entity?n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.send_only_this_tooltip)},slot:"content"}):t._e(),t._v(" "),"event"===t.entity?n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.send_only_this_tooltip_event)},slot:"content"}):t._e(),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):t._e(),t._v(" "),n("hr",{staticStyle:{"margin-top":"16px","margin-bottom":"16px"}}),t._v(" "),"scheduled"===t.notificationType?n("div",[n("el-row",[n("el-col",[n("p",[t._v(t._s(t.$root.labels.schedule))]),t._v(" "),n("el-radio",{attrs:{label:"before"},model:{value:t.notificationTimed,callback:function(e){t.notificationTimed=e},expression:"notificationTimed"}},[t._v(t._s(t.$root.labels.before))]),t._v(" "),n("el-radio",{attrs:{label:"after"},model:{value:t.notificationTimed,callback:function(e){t.notificationTimed=e},expression:"notificationTimed"}},[t._v(t._s(t.$root.labels.after))]),t._v(" "),n("el-radio",{attrs:{label:"sameDay"},model:{value:t.notificationTimed,callback:function(e){t.notificationTimed=e},expression:"notificationTimed"}},[t._v(t._s(t.$root.labels.same_day))])],1)],1),t._v(" "),n("el-row",[n("el-col",["sameDay"!==t.notificationTimed?n("p",[t._v(t._s(t.$root.labels.choose_when))]):n("p",[t._v(t._s(t.$root.labels.time))])])],1),t._v(" "),"sameDay"!==t.notificationTimed?n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:6,md:6,sm:24}},[n("el-input-number",{attrs:{min:1,placeholder:t.$root.labels.enter_number},model:{value:t.amountTime,callback:function(e){t.amountTime=e},expression:"amountTime"}})],1),t._v(" "),n("el-col",{attrs:{lg:6,md:6,sm:24}},[n("el-select",{attrs:{"value-key":"id"},model:{value:t.intervalTime,callback:function(e){t.intervalTime=e},expression:"intervalTime"}},t._l(t.intervalTimes,function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1)],1):n("el-row",[n("el-col",{attrs:{lg:8,md:8,sm:24}},[n("el-form-item",[n("el-time-select",{attrs:{"picker-options":t.getTimeSelectOptionsWithLimits(null,null)},model:{value:t.onTime,callback:function(e){t.onTime=e},expression:"onTime"}})],1)],1)],1),t._v(" "),n("hr",{staticStyle:{"margin-top":"16px","margin-bottom":"16px"}})],1):t._e()],1):t._e(),t._v(" "),n("el-row",{class:{"am-lite-disabled":t.$root.isLite&&t.createNewContent},attrs:{gutter:16}},[t.createNewContent?t._e():n("el-col",{attrs:{span:12}},[n("div",[n("h2",[t._v(t._s(t.$root.labels[t.notification.name]))]),t._v(" "),t.notificationTimeBased?n("h3",[t._v("\n "+t._s(t.$root.labels.notification_scheduled)+"\n ")]):t._e(),t._v(" "),t.notification.customName?n("h3",[t._v(t._s(t.$root.labels[t.notification.name]))]):t._e()])]),t._v(" "),n("el-col",{attrs:{span:t.createNewContent?24:12}},[n("div",{staticClass:"align-right"},[n("p",{staticClass:"am-blue-link",on:{click:t.showDialogPlaceholders}},[t._v("\n "+t._s(t.$root.labels["show_"+t.type+"_codes"])+"\n ")])]),t._v(" "),"customer"===t.notification.sendTo&&"whatsapp"!==t.type?n("div",{staticClass:"align-right"},[n("el-popover",t._b({ref:"languagesPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[n("PopLite")],1),t._v(" "),n("el-select",{directives:[{name:"popover",rawName:"v-popover:languagesPop",arg:"languagesPop"}],staticClass:"select-languages",attrs:{placeholder:t.$root.labels.language,clearable:"",filterable:"",disabled:t.$root.isLite},on:{change:t.changeLanguage},model:{value:t.selectedLanguage,callback:function(e){t.selectedLanguage=e},expression:"selectedLanguage"}},[n("li",{staticClass:"el-select-dropdown__item",on:{click:t.manageLanguages}},[n("span",[n("img",{staticClass:"option-languages-flag",attrs:{src:t.$root.getUrl+"public/img/translate.svg"}}),t._v("\n "+t._s(t.$root.labels.manage_languages)+"\n ")])]),t._v(" "),t.usedLanguages.length>0?n("hr"):t._e(),t._v(" "),n("template",{slot:"prefix"},[n("img",{staticClass:"select-languages-flag",attrs:{src:t.getLanguageFlag(t.selectedLanguage)}})]),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(" "),"whatsapp"===t.type?n("div",{staticClass:"am-whatsapp-settings-button"},[n("el-button",{attrs:{size:"small"},on:{click:function(e){return t.$emit("openSettings")}}},[n("img",{staticStyle:{"vertical-align":"text-bottom"},attrs:{src:t.$root.getUrl+"public/img/am-settings-slider.svg"}}),t._v(" "),n("span",[t._v(t._s(t.$root.labels.whatsapp_settings))])])],1):t._e()])],1),t._v(" "),n("el-row",{class:{"am-lite-disabled":t.$root.isLite&&t.createNewContent},attrs:{gutter:16}},["email"===t.type?n("el-col",{attrs:{span:t.notificationTimeBased&&!t.createNewContent?18:24}},[n("el-form-item",{attrs:{label:t.$root.labels.subject+":"}},[n("el-input",{attrs:{type:"text"},model:{value:t.notificationSubject,callback:function(e){t.notificationSubject=e},expression:"notificationSubject"}})],1)],1):t._e(),t._v(" "),"whatsapp"===t.type?n("el-col",{attrs:{span:t.notificationTimeBased&&!t.createNewContent?18:24}},[n("el-form-item",[n("div",{staticStyle:{"line-height":"40px"}},[t._v("\n "+t._s(t.$root.labels.whatsapp_template_name+":")+"\n ")]),t._v(" "),n("el-select",{attrs:{placeholder:t.$root.labels.whatsapp_choose_template},on:{change:function(e){return t.updatePlaceholders()}},model:{value:t.notification.whatsAppTemplate,callback:function(e){t.$set(t.notification,"whatsAppTemplate",e)},expression:"notification.whatsAppTemplate"}},t._l(t.templates,function(e){return n("el-option",{key:e.id,attrs:{value:e.name,label:e.name}},[n("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[n("span",[t._v(t._s(e.name))]),t._v(" "),e.status?n("span",{style:{color:t.getStatusColor(e)}},[t._v(t._s(e.status?e.status.charAt(0)+e.status.slice(1).toLowerCase():""))]):t._e()])])}),1)],1)],1):t._e(),t._v(" "),t.notificationTime&&!t.createNewContent?n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:t.$root.labels.scheduled_for+":"}},[n("el-time-select",{attrs:{"picker-options":t.timeSelectOptions,clearable:!1},model:{value:t.notificationTime,callback:function(e){t.notificationTime=e},expression:"notificationTime"}})],1)],1):t._e(),t._v(" "),t.notification.timeBefore&&!t.createNewContent?n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:t.$root.labels.scheduled_before+":"}},[n("el-select",{model:{value:t.notification.timeBefore,callback:function(e){t.$set(t.notification,"timeBefore",e)},expression:"notification.timeBefore"}},t._l(t.getPossibleDurationsInSeconds(t.notification.timeBefore,86400),function(e){return n("el-option",{key:e,attrs:{label:t.secondsToNiceDuration(e),value:e}})}),1)],1)],1):t._e(),t._v(" "),t.notification.timeAfter&&!t.createNewContent?n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:("appointment"===t.notification.entity?t.$root.labels.scheduled_after_appointment:t.$root.labels.scheduled_after_event)+":"}},[n("el-select",{model:{value:t.notification.timeAfter,callback:function(e){t.$set(t.notification,"timeAfter",e)},expression:"notification.timeAfter"}},t._l(t.getPossibleDurationsInSeconds(t.notification.timeAfter,86400),function(e){return n("el-option",{key:e,attrs:{label:t.secondsToNiceDuration(e),value:e}})}),1)],1)],1):t._e()],1),t._v(" "),"whatsapp"===t.type&&t.getWhatsAppComponent("header")?n("div",[n("el-row",[n("el-form-item",{attrs:{label:t.$root.labels.whatsapp_header+":"}},[n("el-input",{attrs:{value:t.getWhatsAppComponent("header"),placeholder:"",disabled:!0}})],1)],1),t._v(" "),n("WhatsAppPlaceholders",{ref:"whatsAppHeader",staticClass:"am-whatsapp-ph-header",attrs:{"whatsapp-placeholders":t.whatsAppPlaceholders.header,rules:t.whatsAppPhRules.header,name:"header","all-placeholders":t.getSortedInlinePlaceholders(),categories:t.categories,coupons:t.coupons,"custom-fields":t.customFields,events:t.events,userTypeTab:t.userTypeTab,"all-placeholder-types":t.groupedPlaceholders,notification:t.notification}})],1):t._e(),t._v(" "),n("el-form-item",{class:{"am-lite-disabled":t.$root.isLite&&t.createNewContent}},[n("el-row",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"flex",align:"middle",gutter:24}},[n("el-col",{staticStyle:{"padding-bottom":"5px"},attrs:{span:12}},[t._v("\n "+t._s(t.$root.labels.message_colon)+"\n ")]),t._v(" "),"email"===t.type?n("el-col",{staticClass:"align-right",attrs:{span:12}},[n("el-button-group",[n("el-button",{attrs:{size:"mini",type:t.textMode?"default":"primary"},on:{click:function(e){return t.textModeChanged("notificationContent","notificationContentText",null)}}},[t._v("\n "+t._s(t.$root.labels.text_mode)+"\n ")]),t._v(" "),n("el-button",{attrs:{size:"mini",type:t.textMode?"primary":"default"},on:{click:function(e){return t.textModeChanged("notificationContent","notificationContentText",null)}}},[t._v("\n "+t._s(t.$root.labels.html_mode)+"\n ")])],1)],1):t._e()],1),t._v(" "),"email"!==t.type||t.textMode?t._e():n("quill-editor",{ref:"notificationContent",attrs:{options:t.editorOptions},on:{change:t.parseQuillEditorContent},model:{value:t.notificationContent,callback:function(e){t.notificationContent=e},expression:"notificationContent"}}),t._v(" "),"email"===t.type&&t.textMode?n("el-input",{attrs:{type:"textarea",rows:7,placeholder:""},on:{input:function(e){return t.changedContentText("notificationContent","notificationContentText",null)}},model:{value:t.notificationContentText,callback:function(e){t.notificationContentText=e},expression:"notificationContentText"}}):t._e(),t._v(" "),"sms"===t.type?n("el-input",{ref:"notificationContent",attrs:{type:"textarea",rows:7,placeholder:""},model:{value:t.notificationContent,callback:function(e){t.notificationContent=e},expression:"notificationContent"}}):t._e(),t._v(" "),"whatsapp"===t.type?n("el-input",{ref:"notificationContent",attrs:{type:"textarea",rows:7,disabled:!0,value:t.getWhatsAppComponent("body")}}):t._e(),t._v(" "),"whatsapp"===t.type?n("WhatsAppPlaceholders",{ref:"whatsAppBody",attrs:{"whatsapp-placeholders":t.whatsAppPlaceholders.body,notification:t.notification,rules:t.whatsAppPhRules.body,"all-placeholders":t.getSortedInlinePlaceholders(),name:"body",categories:t.categories,coupons:t.coupons,"custom-fields":t.customFields,events:t.events,userTypeTab:t.userTypeTab,"all-placeholder-types":t.groupedPlaceholders}}):t._e()],1),t._v(" "),"whatsapp"!==t.type?n("el-form-item",{class:{"am-lite-disabled":t.$root.isLite&&t.createNewContent}},[t._v("\n "+t._s(t.$root.labels.insert_email_placeholders)+":\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.insert_email_placeholders_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})]),t._v(" "),n("inline-placeholders",{attrs:{placeholdersNames:t.getInlinePlaceholdersNames(t.notification),excludedPlaceholders:t.getExcludedPlaceholders(t.notification,!1,!1,!0),customFields:t.customFields,categories:t.categories,coupons:t.coupons,userTypeTab:t.userTypeTab}})],1):t._e(),t._v(" "),"customer_package_purchased"===t.notification.name||"provider_package_purchased"===t.notification.name||"customer_package_canceled"===t.notification.name||"provider_package_canceled"===t.notification.name?n("el-row",{staticClass:"am-customize-notifications-combined"},[n("el-col",{attrs:{span:16}},[n("div",{staticClass:"am-customize-notifications-combined-tooltip"},[n("strong",[t._v(t._s(t.$root.labels.package_placeholder_label))]),t._v("\n %package_appointments_details%\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.ph_package_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)]),t._v(" "),n("el-col",{staticClass:"am-align-right",attrs:{span:8}},[n("p",{staticClass:"am-blue-link",on:{click:function(e){t.openDialogCombinedPlaceholders("packagePlaceholders"+("customer"===t.userTypeTab?"Customer":""))}}},[t._v("\n "+t._s(t.$root.labels.configure_placeholder_here)+"\n ")])])],1):t._e(),t._v(" "),"appointment"!==t.entity||(t.notification.customName||"customer_appointment_approved"!==t.notification.name&&"provider_appointment_approved"!==t.notification.name&&"customer_appointment_pending"!==t.notification.name&&"provider_appointment_pending"!==t.notification.name)&&(!t.notification.customName||"triggered"!==t.notificationType||"approved"!==t.notificationTrigger&&"pending"!==t.notificationTrigger)?t._e():n("el-row",{staticClass:"am-customize-notifications-combined",class:{"am-lite-disabled":t.$root.isLite&&t.createNewContent}},[n("el-col",{attrs:{span:16}},[n("div",{staticClass:"am-customize-notifications-combined-tooltip",style:{opacity:t.$root.isLite?.5:1}},[n("strong",[t._v(t._s(t.$root.labels.ph_recurring_appointments_details))]),t._v("\n %recurring_appointments_details%\n "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.ph_recurring_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)]),t._v(" "),n("el-col",{staticClass:"am-align-right",attrs:{span:8}},[n("el-popover",t._b({ref:"recurringPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[n("PopLite")],1),t._v(" "),n("p",{directives:[{name:"popover",rawName:"v-popover:recurringPop",arg:"recurringPop"}],staticClass:"am-blue-link",style:{opacity:t.$root.isLite?.5:1},on:{click:function(e){!t.$root.isLite&&t.openDialogCombinedPlaceholders()}}},[t._v("\n "+t._s(t.$root.labels.configure_placeholder_here)+"\n ")])],1)],1),t._v(" "),t.showActiveClass&&t.notificationTimeBased||!t.showActiveClass&&"scheduled"===t.notificationType?n("el-alert",{staticClass:"am-alert",attrs:{title:t.$root.labels.cron_instruction+":",type:"info",description:"*/15 * * * * "+t.$root.getAjaxUrl+"/notifications/scheduled/send","show-icon":"",closable:!1}}):t._e(),t._v(" "),n("hr"),t._v(" "),n("el-row",{staticClass:"am-email-form-settings__cancel-save",class:{"am-lite-disabled":t.$root.isLite&&t.createNewContent},attrs:{gutter:16}},[n("el-col",{attrs:{span:12}},[n("div",[n("el-button",{attrs:{size:"small"},on:{click:t.openTestNotificationModal}},[t._v("\n "+t._s(t.$root.labels["send_test_"+t.type])+"\n ")])],1)]),t._v(" "),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"align-right"},[t.showActiveClass?n("el-button",{attrs:{loading:!t.fetchedUpdate,size:"small",type:"primary"},on:{click:function(e){return t.updateNotification()}}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")]):n("el-button",{attrs:{loading:!t.fetchedUpdate,size:"small",type:"primary"},on:{click:function(e){return t.createNotification()}}},[t._v("\n "+t._s(t.$root.labels.create)+"\n ")])],1)])],1)],1)],1)],1)])],1),t._v(" "),n("transition",{attrs:{name:"slide"}},[t.dialogPlaceholders?n("el-dialog",{staticClass:"am-side-dialog am-dialog-email-codes",attrs:{visible:t.dialogPlaceholders,"show-close":!1},on:{"update:visible":function(e){t.dialogPlaceholders=e}}},[n("dialog-placeholders",{attrs:{entity:t.entity,type:t.type,notification:t.notification,excludedPlaceholders:t.getExcludedPlaceholders(t.notification,!0,!1,!1),customFields:t.customFields,categories:t.categories,coupons:t.coupons,userTypeTab:t.userTypeTab},on:{closeDialogPlaceholders:function(e){t.dialogPlaceholders=!1}}})],1):t._e()],1),t._v(" "),n("transition",{attrs:{name:"slide"}},[t.dialogCombinedPlaceholder?n("el-dialog",{staticClass:"am-side-dialog am-dialog-email-codes",attrs:{visible:t.dialogCombinedPlaceholder,"show-close":!1},on:{"update:visible":function(e){t.dialogCombinedPlaceholder=e}}},[n("dialog-combined-placeholder",{attrs:{appointmentsSettings:t.$root.settings.appointments,name:t.combinedPlaceholderName,nameHtml:t.combinedPlaceholderName+"Html",customFields:t.customFields,userTypeTab:t.userTypeTab,entity:t.combinedPlaceholderEntity,type:t.type,categories:t.categories,coupons:t.coupons,notification:t.notification,placeholdersNames:t.getDialogPlaceholderNames(t.notification),excludedPlaceholders:t.getExcludedPlaceholders(t.notification,!1,!0,!1),selectedLanguage:t.selectedLanguage,selectedLanguageHtml:t.selectedLanguage+"Html",languagesData:t.languagesData},on:{closeDialogCombinedPlaceholder:function(e){t.dialogCombinedPlaceholder=!1}}})],1):t._e()],1),t._v(" "),n("el-dialog",{staticClass:"am-pop-modal",attrs:{title:t.$root.labels["send_test_"+t.type],visible:t.testNotificationModal},on:{"update:visible":function(e){t.testNotificationModal=e}}},[""===t.$root.settings.notifications.senderEmail&&"email"===t.type?n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.test_email_warning,closable:!1}}):t._e(),t._v(" "),"sms"!==t.type||"sms"!==t.type||t.user.balance?t._e():n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.test_sms_warning,closable:!1}}),t._v(" "),t.testNotificationModal?n("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.testNotificationLoading,expression:"testNotificationLoading"}],ref:"testNotification",attrs:{model:t.testNotification,rules:t.rules,"label-position":"top"},on:{submit:function(e){return e.preventDefault(),t.sendTestNotification(e)}}},["email"===t.type?n("el-form-item",{attrs:{label:t.$root.labels.recipient_email,prop:"recipientEmail"}},[n("el-input",{attrs:{placeholder:t.$root.labels.email_placeholder,"auto-complete":"off"},on:{input:function(e){return t.clearValidation()}},model:{value:t.testNotification.recipientEmail,callback:function(e){t.$set(t.testNotification,"recipientEmail",e)},expression:"testNotification.recipientEmail"}})],1):t._e(),t._v(" "),"sms"===t.type?n("el-form-item",{attrs:{label:t.$root.labels.recipient_phone,prop:"recipientPhone"}},[n("phone-input",{attrs:{savedPhone:t.testNotification.recipientPhone},on:{phoneFormatted:t.phoneFormatted}})],1):t._e(),t._v(" "),"whatsapp"===t.type?n("el-form-item",{attrs:{label:t.$root.labels.recipient_phone,prop:"recipientWhatsApp"}},[n("phone-input",{attrs:{savedPhone:t.testNotification.recipientWhatsApp},on:{phoneFormatted:t.phoneWhatsAppFormatted}})],1):t._e(),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.notification_template,prop:"notificationTemplate"}},[n("el-select",{model:{value:t.testNotification.notificationTemplate,callback:function(e){t.$set(t.testNotification,"notificationTemplate",e)},expression:"testNotification.notificationTemplate"}},t._l(t.notifications.filter(function(e){return e.type===t.type}),function(e){return n("el-option",{key:e.id,attrs:{label:e.customName?e.customName:"provider"===e.sendTo?t.$root.labels.employee+" "+t.$root.labels[e.name]:t.$root.labels.customer+" "+t.$root.labels[e.name],value:e.id,disabled:t.$root.isLite&&!("customer_appointment_approved"===e.name||"provider_appointment_approved"===e.name||"customer_appointment_pending"===e.name||"provider_appointment_pending"===e.name||"customer_event_approved"===e.name||"provider_event_approved"===e.name)}})}),1)],1)],1):t._e(),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"small"},on:{click:function(e){t.testNotificationModal=!1}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),n("el-button",{attrs:{size:"small",type:"primary",loading:t.testNotificationLoading,disabled:t.disabledSendTestNotification},on:{click:t.sendTestNotification}},[t._v("\n "+t._s(t.$root.labels.send)+"\n ")])],1)],1)],1)},staticRenderFns:[]}},1087:function(t,e,n){var o=n(335)(n(1088),n(1110),!1,null,null,null);t.exports=o.exports},1088:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1089),i=n.n(o),a=n(1092),r=n.n(a);e.default={props:{categories:{default:function(){return[]},type:Array},customFields:{default:function(){return[]},type:Array},coupons:{default:function(){return[]},type:Array},events:{default:function(){return[]},type:Array},notifications:{default:function(){return[]},type:Array},passedUsedLanguages:{default:function(){return[]},type:Array},languagesData:{default:function(){},type:Object}},methods:{manageLanguages:function(){this.$emit("manageLanguages")}},components:{Authorization:i.a,Dashboard:r.a}}},1089:function(t,e,n){var o=n(335)(n(1090),n(1091),!1,null,null,null);t.exports=o.exports},1090:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(865),i=n(700),a=n(697);e.default={mixins:[o.a,i.a,a.a],data:function(){var t=this;return{activeAuthForm:"signIn",forgotPassword:{email:""},errors:{email:"",password:"",newPassword:"",newPasswordReType:""},resetPassword:{email:"",newPassword:"",newPasswordReType:"",token:""},rulesAuth:{email:[{required:!0,message:this.$root.labels.enter_email_warning,trigger:"submit"},{type:"email",message:this.$root.labels.enter_valid_email_warning,trigger:"submit"}],password:[{required:!0,message:this.$root.labels.enter_password_warning,trigger:"submit"}]},rulesForgotPassword:{email:[{required:!0,message:this.$root.labels.enter_email_warning,trigger:"submit"},{type:"email",message:this.$root.labels.enter_valid_email_warning,trigger:"submit"}]},rulesResetPassword:{newPassword:[{required:!0,message:this.$root.labels.new_password_requred,trigger:"submit"}],newPasswordReType:[{required:!0,message:this.$root.labels.re_type_requred,trigger:"submit"},{validator:function(e,n,o){n!==t.resetPassword.newPassword&&o(new Error(t.$root.labels.passwords_do_not_match)),o()},trigger:"submit"}]},loadingAuth:!1,loadingForgotPassword:!1,loadingResetPassword:!1,signIn:{email:"",password:""},signUp:{email:"",password:""}}},mounted:function(){var t=this.getUrlQueryParams(window.location.href);"token"in t&&"email"in t&&(this.activeAuthForm="resetPassword",this.resetPassword.email=t.email,this.resetPassword.token=t.token)},methods:{goToSignUp:function(){this.activeAuthForm="signUp",this.signIn=this.resetAuthOnInitialState(),this.$refs[this.activeAuthForm].clearValidate()},goToSignIn:function(){this.activeAuthForm="signIn",this.signUp=this.resetAuthOnInitialState(),this.forgotPassword.email="",this.$refs[this.activeAuthForm].clearValidate()},goToForgotPassword:function(){this.activeAuthForm="forgotPassword",this.signIn=this.resetAuthOnInitialState(),this.$refs[this.activeAuthForm].clearValidate()},clearValidation:function(){void 0!==this.$refs[this.activeAuthForm]&&(this.$refs[this.activeAuthForm].clearValidate(),this.errors=this.resetErrorsOnInitialState())},resetAuthOnInitialState:function(){return{email:"",password:""}},resetErrorsOnInitialState:function(){return{email:"",password:"",newPassword:"",newPasswordReType:""}},onAuthorize:function(t){var e=this;this.clearValidation(),this.$refs[this.activeAuthForm].validate(function(n){if(!n)return!1;e.loadingAuth=!0,e.sendAmeliaSmsApiRequest(t,e.onAuthorizeSuccess,e.onAuthorizeError)})},onAuthorizeSuccess:function(){this.loadingAuth=!1,this.$root.settings.notifications.smsSignedIn=!0},onAuthorizeError:function(t){var e=this;this.loadingAuth=!1,Object.keys(t.errors).forEach(function(n){e.errors[n]=e.$root.labels[t.errors[n][0]]})},onForgotPassword:function(){var t=this;this.errors=this.resetErrorsOnInitialState(),this.$refs[this.activeAuthForm].validate(function(e){if(!e)return!1;t.loadingForgotPassword=!0,t.sendAmeliaSmsApiRequest("forgotPassword",t.onForgotPasswordSuccess,t.onForgotPasswordError)})},onForgotPasswordSuccess:function(){this.notify(this.$root.labels.success,this.$root.labels.recovery_email_sent,"success"),this.goToSignIn(),this.loadingForgotPassword=!1},onForgotPasswordError:function(t){this.errors.email=this.$root.labels[t.message],this.loadingForgotPassword=!1},onResetPassword:function(){var t=this;this.errors=this.resetErrorsOnInitialState(),this.$refs[this.activeAuthForm].validate(function(e){if(!e)return!1;t.loadingResetPassword=!0,t.sendAmeliaSmsApiRequest("resetPassword",t.onResetPasswordSuccess,t.onResetPasswordError)})},onResetPasswordSuccess:function(){this.notify(this.$root.labels.success,this.$root.labels.password_reset_success,"success");var t=this.removeURLParameter(window.location.href,"notificationTab");t=this.removeURLParameter(t,"token"),t=this.removeURLParameter(t,"email"),history.pushState(null,null,t+"#/notifications"),this.goToSignIn(),this.loadingResetPassword=!1},onResetPasswordError:function(t){var e=this;this.loadingResetPassword=!1,void 0!==t.errors?Object.keys(t.errors).forEach(function(n){e.errors[n]=e.$root.labels[t.errors[n][0]]}):(this.notify(this.$root.labels.error,this.$root.labels[t.message],"error"),this.clearValidation())}}}},1091:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-sms-auth-wrapper"},[n("div",{staticClass:"am-sms-auth"},[n("div",{staticClass:"am-sms-logo"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/amelia-sms.svg"}}),t._v(" "+t._s(t.$root.labels.amelia_sms)+"\n ")]),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:"signIn"===t.activeAuthForm,expression:"activeAuthForm === 'signIn'"}],staticClass:"am-sms-login"},[n("h4",[t._v(t._s(t.$root.labels.sign_in))]),t._v(" "),n("el-form",{ref:"signIn",attrs:{model:t.signIn,rules:t.rulesAuth,"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$root.labels.email_colon,prop:"email",error:t.errors.email}},[n("el-input",{attrs:{autocomplete:"new-password"},on:{input:function(e){return t.clearValidation()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onAuthorize("signIn")}},model:{value:t.signIn.email,callback:function(e){t.$set(t.signIn,"email",e)},expression:"signIn.email"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.password_colon,prop:"password",error:t.errors.password}},[n("el-input",{attrs:{type:"password",autocomplete:"new-password"},on:{input:function(e){return t.clearValidation()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onAuthorize("signIn")}},model:{value:t.signIn.password,callback:function(e){t.$set(t.signIn,"password",e)},expression:"signIn.password"}}),t._v(" "),n("span",{staticClass:"am-link am-forgot-pass",on:{click:t.goToForgotPassword}},[t._v("\n "+t._s(t.$root.labels.forgot_password)+"\n ")])],1),t._v(" "),n("el-button",{attrs:{loading:t.loadingAuth,size:"large",type:"primary"},on:{click:function(e){return t.onAuthorize("signIn")}}},[t._v("\n "+t._s(t.$root.labels.sign_in)+"\n ")]),t._v(" "),n("p",[t._v("\n "+t._s(t.$root.labels.dont_have_an_account)+"\n "),n("span",{staticClass:"am-link",on:{click:t.goToSignUp}},[t._v(t._s(t.$root.labels.sign_up))])])],1)],1)]),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:"signUp"===t.activeAuthForm,expression:"activeAuthForm === 'signUp'"}],staticClass:"am-sms-signup"},[n("h4",[t._v(t._s(t.$root.labels.sign_up))]),t._v(" "),n("el-form",{ref:"signUp",attrs:{model:t.signUp,rules:t.rulesAuth,"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$root.labels.email_colon,prop:"email",error:t.errors.email}},[n("el-input",{attrs:{autocomplete:"new-password"},on:{input:function(e){return t.clearValidation()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onAuthorize("signUp")}},model:{value:t.signUp.email,callback:function(e){t.$set(t.signUp,"email",e)},expression:"signUp.email"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.password_colon,prop:"password",error:t.errors.password}},[n("el-input",{attrs:{type:"password",autocomplete:"new-password"},on:{input:function(e){return t.clearValidation()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onAuthorize("signUp")}},model:{value:t.signUp.password,callback:function(e){t.$set(t.signUp,"password",e)},expression:"signUp.password"}})],1),t._v(" "),n("el-button",{attrs:{loading:t.loadingAuth,size:"large",type:"primary"},on:{click:function(e){return t.onAuthorize("signUp")}}},[t._v("\n "+t._s(t.$root.labels.sign_up)+"\n ")]),t._v(" "),n("p",[t._v("\n "+t._s(t.$root.labels.already_have_an_account)+" "),n("span",{staticClass:"am-link",on:{click:t.goToSignIn}},[t._v(t._s(t.$root.labels.sign_in))])])],1)],1)]),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:"forgotPassword"===t.activeAuthForm,expression:"activeAuthForm === 'forgotPassword'"}],staticClass:"am-sms-signup"},[n("h4",[t._v(t._s(t.$root.labels.forgot_password))]),t._v(" "),n("el-form",{ref:"forgotPassword",attrs:{model:t.forgotPassword,rules:t.rulesForgotPassword,"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$root.labels.email_colon,prop:"email",error:t.errors.email}},[n("el-input",{on:{input:function(e){return t.clearValidation()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onForgotPassword(e)}},model:{value:t.forgotPassword.email,callback:function(e){t.$set(t.forgotPassword,"email",e)},expression:"forgotPassword.email"}})],1),t._v(" "),n("el-button",{attrs:{size:"large",type:"primary",loading:t.loadingForgotPassword},on:{click:t.onForgotPassword}},[t._v("\n "+t._s(t.$root.labels.send_recovery_email)+"\n ")]),t._v(" "),n("p",[n("span",{staticClass:"am-link",on:{click:t.goToSignIn}},[t._v(t._s(t.$root.labels.sign_in))])])],1)],1)]),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:"resetPassword"===t.activeAuthForm,expression:"activeAuthForm === 'resetPassword'"}],staticClass:"am-sms-signup"},[n("h4",[t._v(t._s(t.$root.labels.reset_password))]),t._v(" "),n("el-form",{ref:"resetPassword",attrs:{model:t.resetPassword,rules:t.rulesResetPassword,"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$root.labels.new_password_colon,prop:"newPassword",error:t.errors.newPassword}},[n("el-input",{attrs:{type:"password",autocomplete:"new-password"},on:{input:function(e){return t.clearValidation()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onResetPassword(e)}},model:{value:t.resetPassword.newPassword,callback:function(e){t.$set(t.resetPassword,"newPassword",e)},expression:"resetPassword.newPassword"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.retype_new_password_colon,prop:"newPasswordReType",error:t.errors.newPasswordReType}},[n("el-input",{attrs:{type:"password",autocomplete:"new-password"},on:{input:function(e){return t.clearValidation()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.onResetPassword(e)}},model:{value:t.resetPassword.newPasswordReType,callback:function(e){t.$set(t.resetPassword,"newPasswordReType",e)},expression:"resetPassword.newPasswordReType"}})],1),t._v(" "),n("el-button",{attrs:{loading:t.loadingResetPassword,size:"large",type:"primary"},on:{click:t.onResetPassword}},[t._v("\n "+t._s(t.$root.labels.reset_password)+"\n ")])],1)],1)])],1)])},staticRenderFns:[]}},1092:function(t,e,n){var o=n(335)(n(1093),n(1109),!1,null,null,null);t.exports=o.exports},1093:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1094),i=n.n(o),a=n(1097),r=n.n(a),s=n(981),l=n.n(s),c=n(1100),u=n.n(c),d=n(1103),p=n.n(d),f=n(1106),h=n.n(f),m=n(771),g=(n.n(m),n(701)),v=n(865),y=n(697),b=n(700),_=n(998);e.default={mixins:[g.a,v.a,y.a,b.a,_.a],props:{categories:{default:function(){return[]},type:Array},customFields:{default:function(){return[]},type:Array},coupons:{default:function(){return[]},type:Array},events:{default:function(){return[]},type:Array},notifications:{default:function(){return[]},type:Array},passedUsedLanguages:{default:function(){return[]},type:Array},languagesData:{default:function(){},type:Object}},data:function(){return{dialogRechargeBalance:!1,fetched:!1,fetchedUserInfo:!1,navigationActive:"history",notificationsSettings:{},paymentComplete:{amount:null,payerId:null,paymentId:null},user:{balance:0,email:""}}},mounted:function(){var t=this.getUrlQueryParams(window.location.href);if(this.getSettings(),"notificationTab"in t&&"token"in t){var e=this.removeURLParameter(window.location.href,"notificationTab");e=this.removeURLParameter(e,"token"),e=this.removeURLParameter(e,"email"),history.pushState(null,null,e+"#/notifications")}this.getUserInfo()},methods:{getPageUrl:function(){return location.href.substring(0,location.href.lastIndexOf("?")).substring(0,location.href.substring(0,location.href.lastIndexOf("?")).lastIndexOf("/"))+"/"},getSettings:function(){var t=this;this.$http.get(this.$root.getAjaxUrl+"/settings").then(function(e){t.notificationsSettings=e.data.data.settings.notifications}).catch(function(e){console.log(e.message),t.fetched=!0})},getUserInfo:function(){this.sendAmeliaSmsApiRequest("getUserInfo",this.onGetUserInfoSuccess,this.onGetUserInfoError)},onGetUserInfoSuccess:function(t){this.user=t.user,this.user.balance=this.getFormattedMessagePrice(this.user.balance),this.fetchedUserInfo=!0},onGetUserInfoError:function(){this.$root.settings.notifications.smsSignedIn=!1},logout:function(){var t=this;this.fetched=!1,this.notificationsSettings.smsSignedIn=!1,this.notificationsSettings.smsApiToken="",this.$http.post(this.$root.getAjaxUrl+"/settings",{notifications:this.notificationsSettings}).then(function(){t.$root.settings.notifications.smsSignedIn=!1}).catch(function(){t.$root.settings.notifications.smsSignedIn=!1})},increaseBalance:function(t){this.user.balance=this.getFormattedMessagePrice(parseFloat(this.user.balance.replace(",","."))+parseInt(t)),this.dialogRechargeBalance=!1},manageLanguages:function(){this.$emit("manageLanguages")}},components:{History:r.a,CustomizeNotifications:l.a,Pricing:u.a,Payments:p.a,UserProfile:h.a,DialogRechargeBalance:i.a,quillEditor:m.quillEditor}}},1094:function(t,e,n){var o=n(335)(n(1095),n(1096),!1,null,null,null);t.exports=o.exports},1095:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(696),i=n(948),a=n.n(i),r=n(865),s=n(700);e.default={mixins:[o.a,r.a,s.a],props:{user:{default:function(){},type:Object}},data:function(){return{customAmountEnabled:!1,minAmount:10,paymentCheckout:{amount:10}}},mounted:function(){Paddle.Setup({vendor:parseInt(this.$root.smsPaddleSettings.vendorId)}),this.inlineSVG()},methods:{closeDialog:function(){this.$emit("closeDialogRechargeBalance")},changeAmount:function(t){this.customAmountEnabled=!1,this.paymentCheckout.amount=t},onCheckoutClick:function(){var t=null;switch(this.paymentCheckout.amount){case 20:t=parseInt(this.$root.smsPaddleSettings.product20);break;case 50:t=parseInt(this.$root.smsPaddleSettings.product50);break;case 100:t=parseInt(this.$root.smsPaddleSettings.product100);break;case 200:t=parseInt(this.$root.smsPaddleSettings.product200);break;case 500:t=parseInt(this.$root.smsPaddleSettings.product500);break;default:t=parseInt(this.$root.smsPaddleSettings.product10)}var e=this;Paddle.Checkout.open({product:t,email:this.user.email,allowQuantity:!1,passthrough:JSON.stringify({email:this.user.email}),successCallback:function(t){e.$emit("recharged",e.paymentCheckout.amount),e.notify(e.$root.labels.success,e.$root.labels.balance_recharged,"success")}})}},components:{ElButton:a.a}}},1096: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.recharge_balance))])]),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("div",{staticClass:"am-sms-money"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-sms-money-card",class:[10===t.paymentCheckout.amount&&!1===t.customAmountEnabled?"active":""],on:{click:function(e){return t.changeAmount(10)}}},[t._v("\n $10\n ")])]),t._v(" "),n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-sms-money-card",class:[20===t.paymentCheckout.amount&&!1===t.customAmountEnabled?"active":""],on:{click:function(e){return t.changeAmount(20)}}},[t._v("\n $20\n ")])]),t._v(" "),n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-sms-money-card",class:[50===t.paymentCheckout.amount&&!1===t.customAmountEnabled?"active":""],on:{click:function(e){return t.changeAmount(50)}}},[t._v("\n $50\n ")])])],1),t._v(" "),n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-sms-money-card",class:[100===t.paymentCheckout.amount&&!1===t.customAmountEnabled?"active":""],on:{click:function(e){return t.changeAmount(100)}}},[t._v("\n $100\n ")])]),t._v(" "),n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-sms-money-card",class:[200===t.paymentCheckout.amount&&!1===t.customAmountEnabled?"active":""],on:{click:function(e){return t.changeAmount(200)}}},[t._v("\n $200\n ")])]),t._v(" "),n("el-col",{attrs:{sm:8}},[n("div",{staticClass:"am-sms-money-card",class:[500===t.paymentCheckout.amount&&!1===t.customAmountEnabled?"active":""],on:{click:function(e){return t.changeAmount(500)}}},[t._v("\n $500\n ")])])],1),t._v(" "),n("div",{staticClass:"am-sms-money-recharge"},[n("span",{staticClass:"am-sms-money-total-price"},[t._v("\n "+t._s(t.$root.labels.sms_vat_apply)+"\n ")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onCheckoutClick}},[t._v("\n "+t._s(t.$root.labels.recharge)+"\n ")])],1)],1)])])},staticRenderFns:[]}},1097:function(t,e,n){var o=n(335)(n(1098),n(1099),!1,null,null,null);t.exports=o.exports},1098:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=n.n(o),a=n(711),r=n.n(a),s=n(338),l=n(791),c=n.n(l),u=n(865),d=n(998),p=n(696);e.default={mixins:[s.a,u.a,d.a,p.a],props:{fetchedDashboard:{type:Boolean,default:!1}},data:function(){return{fetched:!1,form:new r.a,notifications:[],options:{countFiltered:0},params:{dates:this.getDatePickerNegativeInitRange(),page:1},refreshSMSHistory:{logId:null,historyId:null}}},created:function(){r.a.defaults.axios=this.$http},mounted:function(){this.getHistory()},methods:{filterData:function(){this.params.page=1,this.getHistory()},getHistory:function(){var t=this;this.fetched=!1;var e=JSON.parse(JSON.stringify(this.params)),n=[];e.dates&&(e.dates.start&&n.push(i()(e.dates.start).format("YYYY-MM-DD")),e.dates.end&&n.push(i()(e.dates.end).format("YYYY-MM-DD")),e.dates=n),Object.keys(e).forEach(function(t){return!e[t]&&0!==e[t]&&delete e[t]}),this.$http.get(this.$root.getAjaxUrl+"/notifications/sms/history",{params:this.getAppropriateUrlParams(e)}).then(function(e){t.notifications=e.data.data.notifications,t.options.countFiltered=e.data.data.countFiltered,t.fetched=!0,t.$emit("fetchedHistory")}).catch(function(e){console.log(e.message),t.fetched=!0})},refreshHistoryRow:function(t){this.refreshSMSHistory.logId=t.logId,this.refreshSMSHistory.historyId=t.id,t.status="loading",this.sendAmeliaSmsApiRequest("refreshSMSHistory",this.onRefreshHistoryRowSuccess,this.onRefreshHistoryRowError)},onRefreshHistoryRowSuccess:function(t){var e=this;this.form.post(this.$root.getAjaxUrl+"/notifications/sms/history/"+this.refreshSMSHistory.historyId,t.message).then(function(){var n=e.notifications.find(function(t){return t.id===e.refreshSMSHistory.historyId});n.status=t.message.status,n.price=t.message.price,e.refreshSMSHistory={logId:null,historyId:null}}).catch(function(){e.refreshSMSHistory={logId:null,historyId:null}})},onRefreshHistoryRowError:function(t){console.log("error"),console.log(t)}},components:{PaginationBlock:c.a}}},1099: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.fetchedDashboard,expression:"fetchedDashboard"}],staticClass:"am-sms-history"},[n("h2",[t._v(t._s(t.$root.labels.sms_history))]),t._v(" "),n("v-date-picker",{attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:t.vCalendarFormats},on:{input:t.filterData},model:{value:t.params.dates,callback:function(e){t.$set(t.params,"dates",e)},expression:"params.dates"}}),t._v(" "),t.fetched?t._e():n("div",{staticClass:"am-spinner am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),t.fetched&&t.notifications.length>0?n("div",{staticClass:"am-sms-history-list"},[n("div",{staticClass:"am-sms-history-list-head"},[n("el-row",[n("el-col",{attrs:{lg:3}},[n("p",[t._v(t._s(t.$root.labels.date_colon))])]),t._v(" "),n("el-col",{attrs:{lg:2}},[n("p",[t._v(t._s(t.$root.labels.time_colon))])]),t._v(" "),n("el-col",{attrs:{lg:4}},[n("p",[t._v(t._s(t.$root.labels.phone_colon))])]),t._v(" "),n("el-col",{attrs:{lg:4}},[n("p",[t._v(t._s(t.$root.labels.user_colon))])]),t._v(" "),n("el-col",{attrs:{lg:2}},[n("p",[t._v(t._s(t.$root.labels.cost_colon))])]),t._v(" "),n("el-col",{attrs:{lg:3}},[n("p",[t._v(t._s(t.$root.labels.segments_colon))])]),t._v(" "),n("el-col",{attrs:{lg:3}},[n("p",[t._v(t._s(t.$root.labels.status_colon))])]),t._v(" "),n("el-col",{attrs:{lg:3}},[n("p",[t._v(t._s(t.$root.labels.text_colon))])])],1)],1),t._v(" "),n("div",{staticClass:"am-sms-history-list-body"},[n("el-collapse",t._l(t.notifications,function(e){return n("el-collapse-item",{key:e.id,staticClass:"am-sms-message",class:{"am-sms-message-failed":"failed"===e.status,"am-sms-message-queued":["queued","loading"].includes(e.status)||["delivered","undelivered","sent"].includes(e.status)&&!e.price},attrs:{name:e.id}},[n("template",{slot:"title"},[n("el-row",{staticClass:"am-sms-history-data",attrs:{gutter:10}},[n("el-col",{attrs:{lg:3,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.date_colon))]),t._v(" "),n("span",[t._v(t._s(t.getFrontedFormattedDate(e.dateTime)))])]),t._v(" "),n("el-col",{attrs:{lg:2,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.time_colon))]),t._v(" "),n("span",[t._v(t._s(t.getFrontedFormattedTimeFromDateTimeString(e.dateTime)))])]),t._v(" "),n("el-col",{attrs:{lg:4,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.phone_colon))]),t._v(" "),n("span",{staticClass:"am-three-dots"},[t._v(t._s(e.phone))])]),t._v(" "),n("el-col",{attrs:{lg:4,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.user_colon))]),t._v(" "),n("span",{staticClass:"am-three-dots"},[t._v(t._s(e.userFullName))])]),t._v(" "),n("el-col",{attrs:{lg:2,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.cost_colon))]),t._v(" "),n("span",[t._v(t._s(e.price?"$"+t.getFormattedMessagePrice(e.price,!1):"-"))]),t._v(" "),["delivered","undelivered","sent"].includes(e.status)&&!e.price&&null===t.refreshSMSHistory.logId?n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.refresh)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-refresh am-tooltip-icon",on:{click:[function(t){t.stopPropagation()},function(n){return t.refreshHistoryRow(e)}]}})]):t._e()],1),t._v(" "),n("el-col",{attrs:{lg:3,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.segments_colon))]),t._v(" "),n("span",[t._v(t._s(e.segments))])]),t._v(" "),n("el-col",{attrs:{lg:3,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.status_colon))]),t._v(" "),n("span",[t._v(t._s(t.$root.labels[e.status]))]),t._v(" "),"queued"===e.status&&null===t.refreshSMSHistory.logId?n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.refresh)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-refresh am-tooltip-icon",on:{click:[function(t){t.stopPropagation()},function(n){return t.refreshHistoryRow(e)}]}})]):t._e()],1),t._v(" "),n("el-col",{attrs:{lg:3,md:8}},[n("p",{staticClass:"am-col-title"},[t._v(" ")]),t._v(" "),n("span",{staticClass:"am-link"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/sms-message.svg"}}),t._v(" "+t._s(t.documentWidth>t.xLargeMax||t.documentWidth<t.largeMin?t.$root.labels.view_message:t.$root.labels.view)+"\n ")])])],1)],1),t._v(" "),n("div",{staticClass:"am-sms-message-text"},[n("el-input",{attrs:{type:"textarea",rows:7,placeholder:""},model:{value:e.text,callback:function(n){t.$set(e,"text",n)},expression:"notification.text"}})],1)],2)}),1)],1),t._v(" "),n("pagination-block",{attrs:{params:t.params,count:t.options.countFiltered,label:t.$root.labels.messages_lower,visible:t.fetched&&0!==t.notifications.length},on:{change:t.getHistory}})],1):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&0===t.notifications.length,expression:"fetched && notifications.length === 0"}],staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.no_results))])])],1)},staticRenderFns:[]}},1100:function(t,e,n){var o=n(335)(n(1101),n(1102),!1,null,null,null);t.exports=o.exports},1101:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(714),i=n(865),a=n(700);e.default={mixins:[i.a,o.a,a.a],data:function(){return{carriers:[],error:!1,getCountryPriceList:{selectedCountry:"us"},fetched:!0}},mounted:function(){this.changeCountry()},methods:{changeCountry:function(){this.error=!1,this.fetched=!1,this.sendAmeliaSmsApiRequest("getCountryPriceList",this.onGetCountryPriceListSuccess,this.onGetCountryPriceListError)},onGetCountryPriceListSuccess:function(t){this.carriers=t.carriers,this.fetched=!0},onGetCountryPriceListError:function(){this.notify(this.$root.labels.error,this.$root.labels.pricing_error,"error"),this.error=!0,this.fetched=!0}}}},1102:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-sms-pricelist"},[n("div",{staticClass:"am-segment-tooltip-box-mobile"},[n("h2",[t._v(t._s(t.$root.labels.pricing))]),t._v(" "),n("el-tooltip",{attrs:{placement:"top","popper-class":"am-tooltip-popper"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.segment_tooltip_mobile)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),n("p",[t._v(t._s(t.$root.labels.view_pricing_for))]),t._v(" "),n("el-form",[n("el-form-item",[n("el-select",{class:"am-selected-flag am-selected-flag-"+t.getCountryPriceList.selectedCountry,attrs:{placeholder:"",disabled:!1===t.fetched},on:{change:t.changeCountry},model:{value:t.getCountryPriceList.selectedCountry,callback:function(e){t.$set(t.getCountryPriceList,"selectedCountry",e)},expression:"getCountryPriceList.selectedCountry"}},t._l(t.countries,function(e){return n("el-option",{key:e.id,attrs:{label:e.nicename,value:e.iso}},[n("span",{class:"am-flag am-flag-"+e.iso}),t._v(" "),n("span",{staticStyle:{float:"left"}},[t._v(t._s(e.nicename))])])}),1)],1)],1),t._v(" "),t.fetched&&!1===t.error?n("div",{staticClass:"am-sms-country-pricelist"},[n("div",{staticClass:"am-sms-country-pricelist-head"},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{lg:12}},[n("p",[t._v(t._s(t.$root.labels.carrier))])]),t._v(" "),n("el-col",{staticClass:"am-segment-tooltip-box",attrs:{lg:12}},[n("p",[t._v(t._s(t.$root.labels.price)+" / "+t._s(t.$root.labels.segment_colon))]),t._v(" "),n("el-tooltip",{attrs:{placement:"top","popper-class":"am-tooltip-popper"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.segment_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1)],1),t._v(" "),n("div",{staticClass:"am-sms-country-pricelist-body"},t._l(t.carriers,function(e){return n("div",{staticClass:"am-sms-country-price"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{lg:12}},[n("span",[t._v(t._s(e.carrier))])]),t._v(" "),n("el-col",{attrs:{lg:12}},[n("span",[t._v("$"+t._s(t.getFormattedMessagePrice(e.price)))])])],1)],1)}),0)]):t._e(),t._v(" "),t.fetched?t._e():n("div",{staticClass:"am-spinner am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===t.error&&!0===t.fetched,expression:"error === true && fetched === true"}],staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.no_results))])])],1)},staticRenderFns:[]}},1103:function(t,e,n){var o=n(335)(n(1104),n(1105),!1,null,null,null);t.exports=o.exports},1104:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=n.n(o),a=n(338),r=n(865),s=n(791),l=n.n(s),c=n(700);e.default={mixins:[a.a,r.a,c.a],data:function(){return{date:null,fetched:!1,getPaymentHistory:{itemsPerPage:this.$root.settings.general.itemsPerPage,page:null,startDate:null,endDate:null},options:{countFiltered:0},params:{dates:{start:null,end:null},page:1},payments:[]}},mounted:function(){this.getPayments()},methods:{filterData:function(){this.params.page=1,this.getPayments()},getPayments:function(){this.fetched=!1,this.getPaymentHistory.page=this.params.page,this.params.dates&&(this.params.dates.start&&(this.getPaymentHistory.startDate=i()(this.params.dates.start).format("YYYY-MM-DD")),this.params.dates.end&&(this.getPaymentHistory.endDate=i()(this.params.dates.end).format("YYYY-MM-DD"))),this.sendAmeliaSmsApiRequest("getPaymentHistory",this.onGetPaymentHistorySuccess,this.onGetPaymentHistoryError)},onGetPaymentHistorySuccess:function(t){this.payments=t.payments,this.options.countFiltered=t.countFiltered,this.fetched=!0},onGetPaymentHistoryError:function(){this.notify(this.$root.labels.error,this.$root.labels.payment_history_error,"error"),this.fetched=!0},isOrderPaddle:function(t){return/^\d+$/.test(t)}},components:{PaginationBlock:l.a}}},1105:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-sms-purchase-log"},[n("h2",[t._v(t._s(t.$root.labels.payment_history))]),t._v(" "),n("v-date-picker",{attrs:{"is-double-paned":!1,mode:"range","popover-visibility":"focus","popover-direction":"bottom","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:t.vCalendarFormats},on:{input:t.filterData},model:{value:t.params.dates,callback:function(e){t.$set(t.params,"dates",e)},expression:"params.dates"}}),t._v(" "),t.fetched?t._e():n("div",{staticClass:"am-spinner am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),t.fetched&&t.payments.length>0?n("div",{staticClass:"am-sms-purchase-log-list"},[n("div",{staticClass:"am-sms-purchase-log-list-head"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{lg:4}},[n("p",[t._v(t._s(t.$root.labels.date_colon))])]),t._v(" "),n("el-col",{attrs:{lg:4}},[n("p",[t._v(t._s(t.$root.labels.time_colon))])]),t._v(" "),n("el-col",{attrs:{lg:4}},[n("p",[t._v(t._s(t.$root.labels.type_colon))])]),t._v(" "),n("el-col",{attrs:{lg:6}},[n("p",[t._v(t._s(t.$root.labels.payment_id_colon))])]),t._v(" "),n("el-col",{attrs:{lg:3}},[n("p",[t._v(t._s(t.$root.labels.amount_colon))])]),t._v(" "),n("el-col",{attrs:{lg:3}},[n("p",[t._v(t._s(t.$root.labels.status_colon))])])],1)],1),t._v(" "),n("div",{staticClass:"am-sms-purchase-log-list-body"},t._l(t.payments,function(e){return n("div",{staticClass:"am-sms-purchase-log-item"},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{lg:4,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.date_colon))]),t._v(" "),n("span",[t._v(t._s(t.getFrontedFormattedDate(e.created_at)))])]),t._v(" "),n("el-col",{attrs:{lg:4,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.time_colon))]),t._v(" "),n("span",[t._v(t._s(t.getFrontedFormattedTimeFromDateTimeString(e.created_at)))])]),t._v(" "),n("el-col",{attrs:{lg:4,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.type_colon))]),t._v(" "),t.isOrderPaddle(e.payment_id)?t._e():n("span",[n("img",{attrs:{src:t.$root.getUrl+"public/img/payments/payPal.svg"}}),t._v(t._s(t.$root.labels.payPal)+"\n ")]),t._v(" "),t.isOrderPaddle(e.payment_id)?n("span",[n("img",{attrs:{src:t.$root.getUrl+"public/img/payments/paddle.png"}}),t._v(t._s(t.$root.labels.paddle)+"\n ")]):t._e()]),t._v(" "),n("el-col",{attrs:{lg:6,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.payment_id_colon))]),t._v(" "),n("el-tooltip",{staticClass:"item",attrs:{content:e.payment_id,placement:"top"}},[n("span",[t._v(t._s(e.payment_id))])])],1),t._v(" "),n("el-col",{attrs:{lg:3,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.amount_colon))]),t._v(" "),n("span",[t._v("$"+t._s(t.getFormattedMessagePrice(e.amount)))])]),t._v(" "),n("el-col",{attrs:{lg:3,md:8,sm:12,xs:12}},[n("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.status_colon))]),t._v(" "),n("span",[t._v(t._s(t.$root.labels[e.status]))])])],1)],1)}),0),t._v(" "),n("pagination-block",{attrs:{params:t.params,count:t.options.countFiltered,label:t.$root.labels.payments_lower,visible:t.fetched&&0!==t.payments.length},on:{change:t.getPayments}})],1):t._e(),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&0===t.payments.length,expression:"fetched && payments.length === 0"}],staticClass:"am-empty-state am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),n("p",[t._v(t._s(t.$root.labels.no_results))])])],1)},staticRenderFns:[]}},1106:function(t,e,n){var o=n(335)(n(1107),n(1108),!1,null,null,null);t.exports=o.exports},1107:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(700),i=n(865);e.default={mixins:[o.a,i.a],props:{user:{type:Object,default:function(){}},notificationsSettings:{type:Object,default:function(){}}},mounted:function(){this.senderId.value=this.notificationsSettings.smsAlphaSenderId},data:function(){var t=this;return{changePassword:{currentPassword:"",newPassword:"",newPasswordReType:""},changeSenderIdActive:!1,errors:{currentPassword:"",newPassword:"",newPasswordReType:""},loadingChangePassword:!1,loadingSenderId:!1,rulesChangePassword:{currentPassword:[{required:!0,message:this.$root.labels.current_password_requred,trigger:"submit"}],newPassword:[{required:!0,message:this.$root.labels.new_password_requred,trigger:"submit"}],newPasswordReType:[{required:!0,message:this.$root.labels.re_type_requred,trigger:"submit"},{validator:function(e,n,o){n!==t.changePassword.newPassword&&o(new Error(t.$root.labels.passwords_do_not_match)),o()},trigger:"submit"}]},rulesSenderId:{value:[{required:!0,message:this.$root.labels.sender_id_required,trigger:"submit"},{validator:function(e,n,o){/^[A-z0-9 ]+$/.test(n)||o(new Error(t.$root.labels.sender_id_invalid_characters_error)),/[a-zA-Z]/.test(n)||o(new Error(t.$root.labels.sender_id_letter_error)),n.length>11&&o(new Error(t.$root.labels.sender_id_length_error)),o()},trigger:"submit"}]},senderId:{value:"",valueTemporary:""}}},methods:{logout:function(){this.$emit("logout")},changeSenderId:function(){this.changeSenderIdActive=!0,this.senderId.valueTemporary=this.senderId.value},cancelChangeSenderId:function(){this.clearValidation(),this.changeSenderIdActive=!1,this.senderId.value=this.senderId.valueTemporary},saveSenderId:function(){var t=this;this.$refs.senderId.validate(function(e){if(!e)return!1;var n=Object.assign({},t.notificationsSettings);n.smsAlphaSenderId=t.senderId.value,t.loadingSenderId=!0,t.$http.post(t.$root.getAjaxUrl+"/settings",{notifications:n}).then(function(){t.clearValidation(),t.loadingSenderId=t.changeSenderIdActive=!1,t.notify(t.$root.labels.success,t.$root.labels.sender_id_saved,"success")}).catch(function(e){t.clearValidation(),t.loadingSenderId=t.changeSenderIdActive=!1,t.notify(t.$root.labels.error,e.message,"error")})})},onChangePassword:function(){var t=this;this.errors=this.resetChangePasswordOnInitialState(),this.$refs.changePassword.validate(function(e){if(!e)return!1;t.loadingChangePassword=!0,t.sendAmeliaSmsApiRequest("changePassword",t.onChangePasswordSuccess,t.onChangePasswordError)})},onChangePasswordSuccess:function(){this.clearValidation(),this.changePassword=this.resetChangePasswordOnInitialState(),this.loadingChangePassword=!1,this.notify(this.$root.labels.success,this.$root.labels.password_has_been_changed,"success")},onChangePasswordError:function(t){var e=this;this.loadingChangePassword=!1,Object.keys(t.errors).forEach(function(n){e.errors[n]=e.$root.labels[t.errors[n][0]]})},clearValidation:function(){void 0!==this.$refs.senderId&&this.$refs.senderId.clearValidate(),void 0!==this.$refs.changePassword&&this.$refs.changePassword.clearValidate()},resetChangePasswordOnInitialState:function(){return{currentPassword:"",newPassword:"",newPasswordReType:""}}}}},1108:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-sms-user"},[n("h2",[t._v(t._s(t.$root.labels.user_profile))]),t._v(" "),n("div",{staticClass:"am-sms-user-info"},[n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{md:12}},[n("p",[t._v("User:")]),t._v(" "),n("p",{staticClass:"am-strong"},[t._v(t._s(t.user.email))]),t._v(" "),n("span",{staticClass:"am-link",on:{click:t.logout}},[t._v(t._s(t.$root.labels.logout))])]),t._v(" "),n("el-col",{attrs:{md:12}},[n("p",[t._v(t._s(t.$root.labels.sender_id_colon))]),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},[n("p",{directives:[{name:"show",rawName:"v-show",value:!t.changeSenderIdActive,expression:"!changeSenderIdActive"}],staticClass:"am-strong"},[t._v(t._s(t.senderId.value))])]),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.changeSenderIdActive,expression:"changeSenderIdActive"}],staticClass:"am-sms-change-sender-id"},[n("el-row",{attrs:{gutter:16}},[n("el-form",{ref:"senderId",attrs:{model:t.senderId,rules:t.rulesSenderId},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[n("el-col",{attrs:{lg:12}},[n("el-form-item",{attrs:{prop:"value"}},[n("el-input",{attrs:{size:"small"},on:{input:function(e){return t.clearValidation()}},model:{value:t.senderId.value,callback:function(e){t.$set(t.senderId,"value",e)},expression:"senderId.value"}})],1)],1),t._v(" "),n("el-col",{attrs:{lg:12}},[n("el-button",{attrs:{type:"",size:"small"},on:{click:t.cancelChangeSenderId}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"small",loading:t.loadingSenderId},on:{click:t.saveSenderId}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")])],1)],1)],1)],1)]),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.changeSenderIdActive,expression:"!changeSenderIdActive"}],staticClass:"am-link",on:{click:t.changeSenderId}},[t._v("\n "+t._s(t.$root.labels.change_alpha_sender_id)+"\n ")])],1)],1)],1),t._v(" "),n("h2",[t._v(t._s(t.$root.labels.security))]),t._v(" "),n("div",{staticClass:"am-sms-user-security"},[n("el-form",{ref:"changePassword",attrs:{model:t.changePassword,rules:t.rulesChangePassword},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{lg:6,md:12}},[n("el-form-item",{attrs:{label:t.$root.labels.current_password_colon,prop:"currentPassword",error:t.errors.currentPassword}},[n("el-input",{attrs:{type:"password",size:"small"},on:{input:t.clearValidation},model:{value:t.changePassword.currentPassword,callback:function(e){t.$set(t.changePassword,"currentPassword",e)},expression:"changePassword.currentPassword"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.new_password_colon,prop:"newPassword",error:t.errors.newPassword}},[n("el-input",{attrs:{type:"password",size:"small"},on:{input:t.clearValidation},model:{value:t.changePassword.newPassword,callback:function(e){t.$set(t.changePassword,"newPassword",e)},expression:"changePassword.newPassword"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.retype_new_password_colon,prop:"newPasswordReType",error:t.errors.newPasswordReType}},[n("el-input",{attrs:{type:"password",size:"small"},on:{input:t.clearValidation},model:{value:t.changePassword.newPasswordReType,callback:function(e){t.$set(t.changePassword,"newPasswordReType",e)},expression:"changePassword.newPasswordReType"}})],1),t._v(" "),n("el-button",{staticClass:"am-change-password",attrs:{loading:t.loadingChangePassword,size:"small",type:"primary"},on:{click:t.onChangePassword}},[t._v("\n "+t._s(t.$root.labels.change_password)+"\n ")])],1)],1)],1)],1)])},staticRenderFns:[]}},1109:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-sms-dashboard"},[t.fetched&&t.fetchedUserInfo?t._e():n("div",{staticClass:"am-spinner am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.fetched&&t.fetchedUserInfo,expression:"fetched && fetchedUserInfo"}]},[n("div",{staticClass:"am-sms-dashboard-header"},[n("div",{staticClass:"am-sms-logo"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/amelia-sms.svg"}}),t._v(" "+t._s(t.$root.labels.amelia_sms)+"\n ")]),t._v(" "),n("div",{staticClass:"am-sms-loggedin-user"},[n("div",[n("span",[t._v(t._s(t.$root.labels.user_colon))]),t._v(" "),n("p",{staticClass:"am-sms-user-email"},[t._v(t._s(t.user.email))])]),t._v(" "),n("el-button",{attrs:{type:"default",size:"small"},on:{click:function(e){t.navigationActive="user"}}},[t._v("\n "+t._s(t.$root.labels.view_profile)+"\n ")])],1),t._v(" "),n("div",{staticClass:"am-sms-balance"},[n("img",{directives:[{name:"show",rawName:"v-show",value:t.documentWidth>t.largeMax,expression:"documentWidth > largeMax"}],attrs:{src:t.$root.getUrl+"public/img/sms-balance.svg"}}),t._v(" "),n("div",[n("span",[t._v(t._s(t.$root.labels.balance_colon))]),t._v(" "),n("p",{staticClass:"am-sms-user-email"},[t._v("$"+t._s(t.user.balance))])]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.dialogRechargeBalance=!0}}},[t._v("\n "+t._s(t.$root.labels.recharge_balance)+"\n ")])],1)]),t._v(" "),n("div",{staticClass:"am-sms-dashboard-body"},[n("div",{staticClass:"am-sms-dashboard-nav"},[n("div",{staticClass:"am-sms-dashboard-nav-item",class:["history"===t.navigationActive?"active":""],on:{click:function(e){t.navigationActive="history"}}},[t._v("\n "+t._s(t.$root.labels.sms_history)+"\n ")]),t._v(" "),n("div",{staticClass:"am-sms-dashboard-nav-item",class:["customize"===t.navigationActive?"active":""],on:{click:function(e){t.navigationActive="customize"}}},[t._v("\n "+t._s(t.$root.labels.customize_sms)+"\n ")]),t._v(" "),n("div",{staticClass:"am-sms-dashboard-nav-item",class:["pricing"===t.navigationActive?"active":""],on:{click:function(e){t.navigationActive="pricing"}}},[t._v("\n "+t._s(t.$root.labels.pricing)+"\n ")]),t._v(" "),n("div",{staticClass:"am-sms-dashboard-nav-item",class:["payments"===t.navigationActive?"active":""],on:{click:function(e){t.navigationActive="payments"}}},[t._v("\n "+t._s(t.$root.labels.payment_history)+"\n ")]),t._v(" "),n("div",{staticClass:"am-sms-dashboard-nav-item",class:["user"===t.navigationActive?"active":""],on:{click:function(e){t.navigationActive="user"}}},[t._v("\n "+t._s(t.$root.labels.user_profile)+"\n ")])]),t._v(" "),n("div",{staticClass:"am-sms-dashboard-content",class:{"am-no-padding":"customize"===t.navigationActive,"am-no-min-height":"customize"===t.navigationActive}},[n("transition",{attrs:{name:"fadeIn"}},["history"===t.navigationActive?n("history",{attrs:{fetchedDashboard:t.fetched},on:{fetchedHistory:function(e){t.fetched=!0}}}):t._e()],1),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},["customize"===t.navigationActive?n("customize-notifications",{attrs:{notifications:t.notifications,categories:t.categories,customFields:t.customFields,coupons:t.coupons,events:t.events,user:t.user,type:"sms",pageUrl:t.getPageUrl(),languagesData:t.languagesData,"passed-used-languages":t.passedUsedLanguages},on:{manageLanguages:function(e){return t.manageLanguages()}}}):t._e()],1),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},["pricing"===t.navigationActive?n("pricing"):t._e()],1),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},["payments"===t.navigationActive?n("payments"):t._e()],1),t._v(" "),n("transition",{attrs:{name:"fadeIn"}},["user"===t.navigationActive?n("user-profile",{attrs:{user:t.user,notificationsSettings:t.notificationsSettings},on:{logout:t.logout}}):t._e()],1)],1)])]),t._v(" "),n("transition",{attrs:{name:"slide"}},[t.dialogRechargeBalance?n("el-dialog",{staticClass:"am-side-dialog am-dialog-sms-money",attrs:{visible:t.dialogRechargeBalance,"show-close":!1},on:{"update:visible":function(e){t.dialogRechargeBalance=e}}},[n("dialog-recharge-balance",{attrs:{user:t.user},on:{recharged:t.increaseBalance,closeDialogRechargeBalance:function(e){t.dialogRechargeBalance=!1}}})],1):t._e()],1)],1)},staticRenderFns:[]}},1110:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-body",attrs:{id:"am-sms-notifications"}},[!1===t.$root.settings.notifications.smsSignedIn?n("authorization"):n("dashboard",{attrs:{notifications:t.notifications,categories:t.categories,customFields:t.customFields,coupons:t.coupons,events:t.events,"passed-used-languages":t.passedUsedLanguages,"languages-data":t.languagesData},on:{manageLanguages:t.manageLanguages}})],1)},staticRenderFns:[]}},1111:function(t,e,n){var o=n(335)(n(1112),n(1113),!1,null,null,null);t.exports=o.exports},1112:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{passedUsedLanguages:{default:function(){return[]},type:Array},languagesData:{default:function(){},type:Object}},data:function(){return{usedLanguages:[]}},mounted:function(){this.usedLanguages=Array.from(this.passedUsedLanguages)},methods:{closeDialog:function(){this.$emit("closeDialogManageLanguages")},saveDialog:function(){this.$emit("saveDialogManageLanguages",this.usedLanguages)},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"},addLanguage:function(){this.usedLanguages.push("")},deleteLanguage:function(t){this.usedLanguages.splice(t,1)}}}},1113: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.manage_languages))])]),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("div",{staticClass:"languages-list"},[t._l(t.usedLanguages,function(e,o){return n("el-row",{key:o,attrs:{gutter:28}},[n("el-col",{staticStyle:{"padding-right":"0"},attrs:{xs:18,sm:20}},[n("el-select",{staticClass:"select-languages",attrs:{placeholder:t.$root.labels.language,clearable:"",filterable:""},model:{value:t.usedLanguages[o],callback:function(e){t.$set(t.usedLanguages,o,e)},expression:"usedLanguages[index]"}},[n("template",{slot:"prefix"},[n("img",{staticClass:"select-languages-flag",attrs:{src:t.getLanguageFlag(e)}})]),t._v(" "),t._l(Object.keys(t.languagesData),function(e,o){return n("el-option",{key:o,attrs:{label:t.getLanguageLabel(e),value:e,disabled:-1!==t.usedLanguages.indexOf(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._v(" "),n("el-col",{staticStyle:{"padding-left":"35px"},attrs:{xs:6,sm:4}},[n("span",{staticClass:"am-languages-delete",on:{click:function(e){return t.deleteLanguage(o)}}},[n("img",{staticClass:"svg-amelia",attrs:{width:"16px",src:t.$root.getUrl+"public/img/delete.svg"}})])])],1)}),t._v(" "),n("el-row",{staticStyle:{"margin-bottom":"40px"}},[n("div",{on:{click:t.addLanguage}},[n("img",{staticClass:"am-add-language-svg",attrs:{src:t.$root.getUrl+"public/img/plus-circle.svg"}}),t._v(" "),n("div",{staticClass:"am-add-language"},[t._v(t._s(t.$root.labels.add_language))])])])],2)]),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:{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)])])},staticRenderFns:[]}},1114:function(t,e,n){var o=n(335)(n(1115),n(1116),!1,null,null,null);t.exports=o.exports},1115:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(981),i=n.n(o),a=n(700),r=n(747),s=n(699),l=n(803),c=n.n(l);e.default={mixins:[a.a,r.a,s.a],props:{categories:{default:function(){return[]},type:Array},customFields:{default:function(){return[]},type:Array},coupons:{default:function(){return[]},type:Array},events:{default:function(){return[]},type:Array},notifications:{default:function(){return[]},type:Array},templates:{default:function(){return[]},type:Array},passedUsedLanguages:{default:function(){return[]},type:Array},languagesData:{default:function(){},type:Object}},data:function(){return{notificationsSettings:null,settingsSaving:!1,settingsLoading:!0,openSettings:!1,whatsAppSettings:{phoneId:"",accessToken:"",businessId:"",whatsAppLanguage:"",enabled:!1,autoReplyEnabled:!1,autoReplyToken:"",autoReplyMsg:""},rules:{phoneId:[{required:!0,message:this.$root.labels.whatsapp_enter_phone_id,trigger:"submit"}],accessToken:[{required:!0,message:this.$root.labels.whatsapp_enter_access_token,trigger:"submit"}],businessId:[{required:!0,message:this.$root.labels.whatsapp_enter_business_id,trigger:"submit"}],whatsAppLanguage:[{required:!0,message:this.$root.labels.whatsapp_choose_language,trigger:"submit"}]}}},mounted:function(){var t=this;this.openSettings=!this.$root.settings.notifications.whatsAppEnabled,this.settingsLoading=!0,this.$http.get(this.$root.getAjaxUrl+"/settings").then(function(e){t.notificationsSettings=e.data.data.settings.notifications,t.whatsAppSettings.phoneId=t.notificationsSettings.whatsAppPhoneID,t.whatsAppSettings.accessToken=t.notificationsSettings.whatsAppAccessToken,t.whatsAppSettings.businessId=t.notificationsSettings.whatsAppBusinessID,t.whatsAppSettings.enabled=t.notificationsSettings.whatsAppEnabled,t.whatsAppSettings.whatsAppLanguage=t.notificationsSettings.whatsAppLanguage?t.notificationsSettings.whatsAppLanguage:t.$root.settings.wordpress.locale,t.whatsAppSettings.autoReplyMsg=t.notificationsSettings.whatsAppReplyMsg,t.whatsAppSettings.autoReplyToken=t.notificationsSettings.whatsAppReplyToken,t.whatsAppSettings.autoReplyEnabled=t.notificationsSettings.whatsAppReplyEnabled,t.whatsAppSettings.enabled&&t.whatsAppSettings.phoneId&&t.whatsAppSettings.accessToken&&t.whatsAppSettings.businessId||(t.openSettings=!0),t.settingsLoading=!1}).catch(function(e){console.log(e.message),t.settingsLoading=!1})},methods:{saveWhatsAppSettings:function(){var t=this;this.$refs.whatsAppSettings.validate(function(e,n){e&&(t.settingsSaving=!0,t.notificationsSettings.whatsAppPhoneID=t.whatsAppSettings.phoneId,t.notificationsSettings.whatsAppAccessToken=t.whatsAppSettings.accessToken,t.notificationsSettings.whatsAppBusinessID=t.whatsAppSettings.businessId,t.notificationsSettings.whatsAppLanguage=t.whatsAppSettings.whatsAppLanguage,t.notificationsSettings.whatsAppEnabled=t.whatsAppSettings.enabled,t.notificationsSettings.whatsAppReplyToken=t.whatsAppSettings.autoReplyToken,t.notificationsSettings.whatsAppReplyEnabled=t.whatsAppSettings.autoReplyEnabled,t.notificationsSettings.whatsAppReplyMsg=t.whatsAppSettings.autoReplyMsg,t.$http.post(t.$root.getAjaxUrl+"/settings",{notifications:t.notificationsSettings}).then(function(e){t.$root.settings.notifications=Object.assign(t.$root.settings.notifications,e.data.data.settings.notifications),t.notify(t.$root.labels.success,t.$root.labels.settings_saved,"success"),t.notificationsSettings.whatsAppEnabled&&t.$emit("getNotifications"),t.openSettings=!t.notificationsSettings.whatsAppEnabled}).catch(function(t){console.log(t)}).finally(function(){t.settingsSaving=!1}))})},clearValidation:function(){void 0!==this.$refs.whatsAppSettings&&this.$refs.whatsAppSettings.clearValidate()},manageLanguages:function(){this.$emit("manageLanguages")},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"}},components:{CustomizeNotifications:i.a,InlinePlaceholders:c.a}}},1116:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-body",attrs:{id:"am-whatsapp-notifications"}},[n("div",{staticClass:"am-whatsapp-feature"},[t._v("\n WhatsApp feature is available only with Pro and Dev licenses\n ")]),t._v(" "),t.openSettings?n("div",[t.settingsLoading?n("div",{staticClass:"am-spinner am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]):n("el-form",{ref:"whatsAppSettings",staticClass:"am-whatsapp-settings",attrs:{model:t.whatsAppSettings,rules:t.rules},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[n("el-row",[n("h1",{staticStyle:{cursor:"pointer",display:"inline-block"},on:{click:function(e){t.openSettings=!1}}},[n("img",{attrs:{src:t.$root.getUrl+"public/img/arrow-back.svg"}}),t._v(" "+t._s(t.$root.labels.whatsapp_settings)+"\n ")])]),t._v(" "),n("el-row",{attrs:{gutter:35}},[n("el-col",{attrs:{span:10}},[n("el-row",[n("el-form-item",{attrs:{prop:"enabled"}},[n("el-col",{attrs:{span:21}},[n("p",[t._v(t._s(t.$root.labels.whatsapp_enabled+":"))])]),t._v(" "),n("el-col",{staticStyle:{"text-align":"right"},attrs:{span:3}},[n("el-switch",{attrs:{type:"text"},on:{input:t.clearValidation},model:{value:t.whatsAppSettings.enabled,callback:function(e){t.$set(t.whatsAppSettings,"enabled",e)},expression:"whatsAppSettings.enabled"}})],1)],1)],1),t._v(" "),n("el-row",[n("el-form-item",{attrs:{prop:"phoneId"}},[n("p",[t._v(t._s(t.$root.labels.whatsapp_phone_id+":"))]),t._v(" "),n("el-input",{attrs:{type:"text"},on:{input:t.clearValidation},model:{value:t.whatsAppSettings.phoneId,callback:function(e){t.$set(t.whatsAppSettings,"phoneId",e)},expression:"whatsAppSettings.phoneId"}})],1)],1),t._v(" "),n("el-row",[n("el-form-item",{attrs:{prop:"accessToken"}},[n("p",[t._v(t._s(t.$root.labels.whatsapp_access_token+":"))]),t._v(" "),n("el-input",{attrs:{type:"text"},on:{input:t.clearValidation},model:{value:t.whatsAppSettings.accessToken,callback:function(e){t.$set(t.whatsAppSettings,"accessToken",e)},expression:"whatsAppSettings.accessToken"}})],1)],1),t._v(" "),n("el-row",[n("el-form-item",{attrs:{prop:"businessId"}},[n("p",[t._v(t._s(t.$root.labels.whatsapp_business_id+":"))]),t._v(" "),n("el-input",{attrs:{type:"text"},on:{input:t.clearValidation},model:{value:t.whatsAppSettings.businessId,callback:function(e){t.$set(t.whatsAppSettings,"businessId",e)},expression:"whatsAppSettings.businessId"}})],1)],1),t._v(" "),n("el-row",[n("el-form-item",{attrs:{prop:"whatsAppLanguage"}},[n("p",{staticStyle:{display:"inline-block"}},[t._v(t._s(t.$root.labels.whatsapp_default_language+":"))]),t._v(" "),n("el-tooltip",{attrs:{placement:"right"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.whatsapp_default_language_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})]),t._v(" "),n("el-select",{staticClass:"select-languages",attrs:{placeholder:t.$root.labels.language,filterable:""},on:{change:t.clearValidation},model:{value:t.whatsAppSettings.whatsAppLanguage,callback:function(e){t.$set(t.whatsAppSettings,"whatsAppLanguage",e)},expression:"whatsAppSettings.whatsAppLanguage"}},[n("li",{staticClass:"el-select-dropdown__item",on:{click:t.manageLanguages}},[n("span",[n("img",{staticClass:"option-languages-flag",attrs:{src:t.$root.getUrl+"public/img/translate.svg"}}),t._v("\n "+t._s(t.$root.labels.manage_languages)+"\n ")])]),t._v(" "),t.passedUsedLanguages.length>0?n("hr"):t._e(),t._v(" "),n("template",{slot:"prefix"},[n("img",{staticClass:"select-languages-flag",attrs:{src:t.getLanguageFlag(t.whatsAppSettings.whatsAppLanguage)}})]),t._v(" "),t._l(t.passedUsedLanguages,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)],1)],1),t._v(" "),n("el-col",{staticClass:"am-whatsapp-settings-auto-reply",attrs:{span:14}},[n("el-row",[n("el-col",{attrs:{span:21}},[n("p",[t._v(t._s(t.$root.labels.whatsapp_auto_reply_enable))])]),t._v(" "),n("el-col",{staticStyle:{"text-align":"right"},attrs:{span:3}},[n("el-switch",{model:{value:t.whatsAppSettings.autoReplyEnabled,callback:function(e){t.$set(t.whatsAppSettings,"autoReplyEnabled",e)},expression:"whatsAppSettings.autoReplyEnabled"}})],1)],1),t._v(" "),n("el-row",[n("el-form-item",[n("p",{staticStyle:{display:"inline-block"}},[t._v(t._s(t.$root.labels.whatsapp_auto_reply_token+":"))]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.whatsapp_auto_reply_token_tt)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})]),t._v(" "),n("el-input",{attrs:{type:"text"},on:{input:t.clearValidation},model:{value:t.whatsAppSettings.autoReplyToken,callback:function(e){t.$set(t.whatsAppSettings,"autoReplyToken",e)},expression:"whatsAppSettings.autoReplyToken"}})],1)],1),t._v(" "),n("el-row",[n("el-form-item",[n("p",{staticStyle:{display:"inline-block"}},[t._v(t._s(t.$root.labels.whatsapp_auto_reply_msg+":"))]),t._v(" "),n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.whatsapp_auto_reply_msg_tt)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})]),t._v(" "),n("el-input",{attrs:{type:"textarea",rows:6},model:{value:t.whatsAppSettings.autoReplyMsg,callback:function(e){t.$set(t.whatsAppSettings,"autoReplyMsg",e)},expression:"whatsAppSettings.autoReplyMsg"}})],1)],1),t._v(" "),n("el-row",[n("el-form-item",{staticStyle:{"margin-bottom":"-68px"}},[n("inline-placeholders",{attrs:{placeholdersNames:["customerPlaceholders","companyPlaceholders"],excludedPlaceholders:[],customFields:t.customFields,categories:t.categories,coupons:t.coupons,userTypeTab:"customer","no-html":!0}})],1)],1),t._v(" "),n("el-row",{staticStyle:{"margin-right":"14px"}},[n("el-alert",{staticClass:"am-alert",attrs:{title:t.$root.labels.whatsapp_webhook_url_callback+":",type:"info",description:t.$root.getAjaxUrl+"__notifications__whatsapp__webhook","show-icon":"",closable:!1}})],1),t._v(" "),n("el-row",[n("el-col",[n("el-alert",{attrs:{title:"",type:"warning",description:t.$root.labels.whatsapp_auto_reply_notice,"show-icon":"",closable:!1}})],1)],1)],1)],1),t._v(" "),n("el-row",{staticClass:"am-whatsapp-settings-buttons"},[n("el-button",{attrs:{size:"medium"},on:{click:function(e){t.openSettings=!1}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),n("el-button",{attrs:{size:"medium",type:"primary",loading:t.settingsSaving},on:{click:t.saveWhatsAppSettings}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")])],1)],1)],1):t.settingsLoading?t._e():n("customize-notifications",{attrs:{notifications:t.notifications,categories:t.categories,customFields:t.customFields,coupons:t.coupons,events:t.events,type:"whatsapp",templates:t.templates},on:{openSettings:function(e){t.openSettings=!0}}})],1)},staticRenderFns:[]}},1117:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"am-wrap",attrs:{id:"am-notifications"}},[n("div",{staticClass:"am-body",attrs:{id:"am-email-notifications"}},[n("page-header"),t._v(" "),t.fetched?t._e():n("div",{staticClass:"am-spinner am-section"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),n("div",{staticClass:"am-notifications am-section"},[t.fetched?n("el-tabs",{on:{"tab-click":function(e){return t.inlineSVG()}},model:{value:t.notificationTab,callback:function(e){t.notificationTab=e},expression:"notificationTab"}},[n("el-tab-pane",{attrs:{label:t.$root.labels.email_notifications,name:"email"}},[n("customize-notifications",{attrs:{notifications:t.notifications,customFields:t.options.entities.customFields,categories:t.options.entities.categories,coupons:t.options.entities.coupons,events:t.options.entities.events,type:"email",pageUrl:t.getPageUrl(),languagesData:t.languagesData,"passed-used-languages":t.options.settings.general.usedLanguages},on:{manageLanguages:function(e){t.manageLanguages=!0}}})],1),t._v(" "),n("el-tab-pane",{attrs:{label:t.$root.labels.sms_notifications,name:"sms"}},["sms"===t.notificationTab?n("sms-notifications",{attrs:{notifications:t.notifications,categories:t.options.entities.categories,customFields:t.options.entities.customFields,coupons:t.options.entities.coupons,events:t.options.entities.events,languagesData:t.languagesData,"passed-used-languages":t.options.settings.general.usedLanguages},on:{manageLanguages:function(e){t.manageLanguages=!0}}}):t._e()],1),t._v(" "),t.$root.licence.isPro||t.$root.licence.isDeveloper?n("el-tab-pane",{attrs:{label:t.$root.labels.whatsapp_notifications,name:"whatsapp"}},[n("BlockLite"),t._v(" "),"whatsapp"===t.notificationTab?n("whats-app-notifications",{class:{"am-lite-container-disabled":t.$root.isLite},attrs:{notifications:t.notifications,categories:t.options.entities.categories,customFields:t.options.entities.customFields,coupons:t.options.entities.coupons,events:t.options.entities.events,languagesData:t.languagesData,"passed-used-languages":t.options.settings.general.usedLanguages.includes(t.$root.settings.wordpress.locale)?t.options.settings.general.usedLanguages:t.options.settings.general.usedLanguages.concat([t.$root.settings.wordpress.locale]),templates:t.whatsAppTemplates},on:{manageLanguages:function(e){t.manageLanguages=!0},getNotifications:t.getNotifications}}):t._e()],1):t._e()],1):t._e()],1),t._v(" "),n("el-col",{attrs:{md:6}},[n("a",{staticClass:"am-help-button",attrs:{href:t.needHelpPage,target:"_blank"}},[n("i",{staticClass:"el-icon-question"}),t._v(" "+t._s(t.$root.labels.need_help)+"?\n ")])]),t._v(" "),n("transition",{attrs:{name:"slide"}},[t.manageLanguages?n("el-dialog",{staticClass:"am-side-dialog am-dialog-email-codes",attrs:{"close-on-click-modal":!1,visible:t.manageLanguages,"show-close":!1},on:{"update:visible":function(e){t.manageLanguages=e}}},[n("dialog-manage-languages",{attrs:{"passed-used-languages":t.options.settings.general.usedLanguages,"languages-data":t.languagesData},on:{closeDialogManageLanguages:function(e){t.manageLanguages=!1},saveDialogManageLanguages:t.saveDialogManageLanguages}})],1):t._e()],1),t._v(" "),n("dialog-new-customize"),t._v(" "),n("DialogLite")],1)])},staticRenderFns:[]}},681:function(t,e,n){var o=n(335)(n(1077),n(1117),!1,null,null,null);t.exports=o.exports},696: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:{getAppropriateUrlParams:function(t){if(!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(703);t.init({svgSelector:"img.svg-amelia",initClass:"js-inlinesvg"})},inlineSVGCabinet:function(){setTimeout(function(){n(703).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];return this.usedColors.push(this.colors[i]),this.colors.splice(i,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),n?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":location.protocol+"//via.placeholder.com/120/"+a+"/fff?text="+o},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,"")}}}},697: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()}}}},698:function(t,e,n){"use strict";var o=n(716),i=n(344),a=Object.prototype.toString;function r(t){return"[object Array]"===a.call(t)}function s(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||r(t)||(t=[t]),r(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:r,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:s,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 s(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*$/,"")}}},699: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(),r=this.getPriceSuffix(),s=parseInt(t=Math.abs(+t||0).toFixed(n))+"",l=s.length>3?s.length%3:0;return(e?a:"")+(l?s.substr(0,l)+o:"")+s.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+o)+(n?i+Math.abs(t-s).toFixed(n).slice(2):"")+(e?r:"")}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(!0),suffix:this.getPriceSuffix(!0),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},700:function(t,e,n){"use strict";e.a={methods:{notify:function(t,e,n,o){var i=this;void 0===o&&(o=""),setTimeout(function(){i.$notify({customClass:o,title:t,message:e,type:n,offset:50})},700)}}}},701: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}},getStringTimeInSeconds:function(t){return i()(t,"HH:mm").diff(i()().startOf("day"),"seconds")}}}},702:function(t,e,n){"use strict";var o=n(722),i=n(715),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(this.getServiceById(e),n):null},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=[],r=null!==e.categoryId?t.categories.find(function(t){return t.id===e.categoryId}):null,s=r?r.serviceList.map(function(t){return t.id}):[];if(null!==e.categoryId&&0===s.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 r=parseInt(t);if(null!==e.employeeId&&e.employeeId!==r||null!==e.locationId&&!n.isEmployeeLocation(r,e.locationId)||null!==e.serviceId&&!n.isEmployeeService(r,e.serviceId)||null!==e.categoryId&&0===s.filter(function(t){return n.isEmployeeService(r,t)}).length||null!==e.categoryId&&null!==e.locationId&&0===s.filter(function(t){return n.isEmployeeServiceLocation(r,t,e.locationId)}).length||null!==e.serviceId&&null!==e.locationId&&!n.isEmployeeServiceLocation(r,e.serviceId,e.locationId))return"continue";for(var l in-1===i.indexOf(r)&&i.push(r),n.options.entitiesRelations[r])if(n.options.entitiesRelations[r].hasOwnProperty(l)){var c=parseInt(l);null!==e.serviceId&&e.serviceId!==c||null!==e.categoryId&&-1===s.indexOf(c)||null!==e.locationId&&!n.isEmployeeServiceLocation(r,c,e.locationId)||(-1===o.indexOf(c)&&o.push(c),n.options.entitiesRelations[r][c].length&&n.options.entitiesRelations[r][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:!1,durations:[]}:"object"!==a(t.customPricing)&&(t.customPricing=this.getArrayCustomPricing(t.customPricing)),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}),r=this.options.entities.locations.map(function(t){return t.id}),s=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!==s.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!==r.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)})}}},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:[],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,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:[]},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({types:e.types})};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)},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.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?n:this.getFilteredEntities(n.map(function(t){return t.id}),"employees","providerId")},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")},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")}}}},703:function(t,e,n){(function(n){var o,i,a,r;r=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},r=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,r=new XMLHttpRequest;r.open("GET",i,!0),r.onload=function(){if(r.status>=200&&r.status<400){var n=(new DOMParser).parseFromString(r.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"),s=document.createTextNode(a.longdesc.value);i.appendChild(s),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.")},r.onerror=function(){console.error("There was an error connecting to the origin server.")},r.send()})};return n.init=function(t,n){o&&(e=a(i,t||{}),r(n||function(){}),document.documentElement.className+=" "+e.initClass)},n}(r),void 0===(a="function"==typeof o?o.apply(e,i):o)||(t.exports=a)}).call(e,n(39))},704:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=(r=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),a=o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"});return[n].concat(a).concat([i]).join("\n")}var r;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(o[a]=!0)}for(i=0;i<t.length;i++){var r=t[i];"number"==typeof r[0]&&o[r[0]]||(n&&!r[2]?r[2]=n:n&&(r[2]="("+r[2]+") and ("+n+")"),e.push(r))}},e}},705:function(t,e,n){var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i=n(713),a={},r=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,c=!1,u=function(){},d=null,p="data-vue-ssr-id",f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t){for(var e=0;e<t.length;e++){var n=t[e],o=a[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(g(n.parts[i]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{var r=[];for(i=0;i<n.parts.length;i++)r.push(g(n.parts[i]));a[n.id]={id:n.id,refs:1,parts:r}}}}function m(){var t=document.createElement("style");return t.type="text/css",r.appendChild(t),t}function g(t){var e,n,o=document.querySelector("style["+p+'~="'+t.id+'"]');if(o){if(c)return u;o.parentNode.removeChild(o)}if(f){var i=l++;o=s||(s=m()),e=b.bind(null,o,i,!1),n=b.bind(null,o,i,!0)}else o=m(),e=function(t,e){var n=e.css,o=e.media,i=e.sourceMap;o&&t.setAttribute("media",o);d.ssrId&&t.setAttribute(p,e.id);i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,o),n=function(){o.parentNode.removeChild(o)};return e(t),function(o){if(o){if(o.css===t.css&&o.media===t.media&&o.sourceMap===t.sourceMap)return;e(t=o)}else n()}}t.exports=function(t,e,n,o){c=n,d=o||{};var r=i(t,e);return h(r),function(e){for(var n=[],o=0;o<r.length;o++){var s=r[o];(l=a[s.id]).refs--,n.push(l)}e?h(r=i(t,e)):r=[];for(o=0;o<n.length;o++){var l;if(0===(l=n[o]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete a[l.id]}}}};var v,y=(v=[],function(t,e){return v[t]=e,v.filter(Boolean).join("\n")});function b(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var a=document.createTextNode(i),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(a,r[e]):t.appendChild(a)}}},708:function(t,e,n){"use strict";(function(e){var o=n(698),i=n(752),a={"Content-Type":"application/x-www-form-urlencoded"};function r(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,l={adapter:("undefined"!=typeof XMLHttpRequest?s=n(717):void 0!==e&&(s=n(717)),s),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)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)?(r(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))},709:function(t,e,n){var o=n(335)(n(723),n(724),!1,null,null,null);t.exports=o.exports},711: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=s(n(749)),a=s(n(767)),r=s(n(768));function s(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,r.default)(i),"post"!==e&&(i.append("_method",e.toUpperCase()),e="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(a,r){t.defaults.axios[e](n,i,o.config()).then(function(t){a(t.data)}).catch(function(t){o.handleError(t),r(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},713:function(t,e){t.exports=function(t,e){for(var n=[],o={},i=0;i<e.length;i++){var a=e[i],r=a[0],s={id:t+":"+i,css:a[1],media:a[2],sourceMap:a[3]};o[r]?o[r].parts.push(s):n.push(o[r]={id:r,parts:[s]})}return n}},714: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"}]}}}},715: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={methods:{getArrayCustomPricing:function(t){var e=null;if(void 0===t||null===t||""===t)e={enabled:!1,durations:{}};else if("object"===(void 0===t?"undefined":o(t))){if(Array.isArray(t.durations))return t;e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(t);var n=[];return Object.keys(e.durations).forEach(function(t){n.push({duration:parseInt(t),price:e.durations[t].price,rules:e.durations[t].rules})}),{enabled:e.enabled,durations:n}},getJsonCustomPricing:function(t){var e={};return t&&t.durations.filter(function(t){return t.duration}).length>0?(t.durations.forEach(function(t){e[t.duration]={price:t.price,rules:t.rules}}),JSON.stringify({enabled:t.enabled,durations:e})):JSON.stringify({enabled:!1,durations:{}})}}}},716: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)}}},717:function(t,e,n){"use strict";var o=n(698),i=n(753),a=n(755),r=n(756),s=n(757),l=n(718),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(758);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||s(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?r(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 y=n(759),b=(t.withCredentials||s(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;b&&(p[t.xsrfHeaderName]=b)}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)})}},718:function(t,e,n){"use strict";var o=n(754);t.exports=function(t,e,n,i,a){var r=new Error(t);return o(r,e,n,i,a)}},719:function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},720: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},722: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],r="",s=0;s<i.length;s++)if(i[s]===a){r=n[o[s]];break}return r},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:{}}},723:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(714);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&&"auto"!==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:{}}},724: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:[]}},729:function(t,e,n){var o=n(335)(n(734),n(735),!1,null,null,null);t.exports=o.exports},734:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(338);e.default={mixins:[o.a],props:["oldCustomize","appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","packagesTotal","resourcesTotal","servicesTotal","categoriesTotal","financeTotal","addNewCouponBtnDisplay","addNewCustomFieldBtnDisplay","locations","categories","bookableType","params","fetched"],methods:{showMainCustomize:function(){this.$emit("showMainCustomize",null)},showDialogCustomer:function(){this.$emit("newCustomerBtnClicked",null)},showDialogAppointment:function(){this.$emit("newAppointmentBtnClicked",null)},showDialogEvent:function(){this.$emit("newEventBtnClicked",null)},showDialogEmployee:function(){this.$emit("newEmployeeBtnClicked")},showDialogLocation:function(){this.$emit("newLocationBtnClicked")},showDialogService:function(){this.$emit("newServiceBtnClicked")},showDialogPackage:function(){this.$emit("newPackageBtnClicked")},showDialogPackageBooking:function(){this.$emit("newPackageBookingBtnClicked")},showDialogResource:function(){this.$emit("newResourceBtnClicked")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(t){this.$emit("selectAllInCategory",t)},changeFilter:function(){this.$emit("changeFilter")}}}},735: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(" "),t.$root.isLite||"wpamelia-employees"!==t.$router.currentRoute.name||!0!==t.$root.settings.capabilities.canWrite||!0!==t.$root.settings.capabilities.canWriteOthers?t._e():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._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(" "),n("el-popover",t._b({ref:"addLocationPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[n("PopLite")],1),t._v(" "),n("div",{directives:[{name:"popover",rawName:"v-popover:addLocationPop",arg:"addLocationPop"}]},["wpamelia-locations"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite?n("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":t.$root.isLite},attrs:{type:"primary",disabled:t.$root.isLite},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()],1),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(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"popover",rawName:"v-popover:addPackagePop",arg:"addPackagePop"}]},[n("el-popover",t._b({ref:"addPackagePop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[n("PopLite")],1),t._v(" "),"wpamelia-services"===t.$router.currentRoute.name&&t.packagesTotal>=0&&!0===t.$root.settings.capabilities.canWrite&&"packages"===t.bookableType?n("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":t.$root.isLite},attrs:{type:"primary"},on:{click:t.showDialogPackage}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_package))])]):t._e()],1)]),t._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"popover",rawName:"v-popover:addResourcePop",arg:"addResourcePop"}]},[n("el-popover",t._b({ref:"addResourcePop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[n("PopLite")],1),t._v(" "),"wpamelia-services"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite&&"resources"===t.bookableType?n("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":t.$root.isLite},attrs:{type:"primary"},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()],1)]),t._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"popover",rawName:"v-popover:addCouponPop",arg:"addCouponPop"}]},[n("el-popover",t._b({ref:"addCouponPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[n("PopLite")],1),t._v(" "),"wpamelia-finance"===t.$router.currentRoute.name&&t.addNewCouponBtnDisplay&&!0===t.$root.settings.capabilities.canWrite?n("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":t.$root.isLite},attrs:{type:"primary"},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()],1)]),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:[]}},736:function(t,e,n){var o=n(335)(n(739),n(740),!1,function(t){n(737)},null,null);t.exports=o.exports},737:function(t,e,n){var o=n(738);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n(705)("735f6488",o,!0,{})},738:function(t,e,n){(t.exports=n(704)(!1)).push([t.i,".am-dialog-new-customize__content-img{margin-bottom:12px}.am-dialog-new-customize__content-img img{display:inline-block;width:100%;border-radius:6px}.am-dialog-new-customize__content-heading{font-family:Amelia Roboto,sans-serif;font-size:15px;font-weight:400;line-height:1.6;color:#1a2c37;word-break:break-word;margin:0 0 16px}.am-dialog-new-customize__content-list{margin-bottom:20px}.am-dialog-new-customize__content-list__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:0 0 16px}.am-dialog-new-customize__content-list__item span{font-size:15px;font-weight:600;color:#1a2c37;margin:0 0 0 12px}.am-dialog-new-customize__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.am-dialog-new-customize__footer .el-button.el-button--primary{width:100%;border-radius:8px;margin-bottom:8px}.am-dialog-new-customize__footer .el-button.el-button--primary span{font-family:Amelia Roboto,sans-serif;font-size:14px;font-weight:500}.am-dialog-new-customize__footer .el-button.el-button--secondary{max-width:100px;border-radius:8px;border:none;background-color:#fff;margin:0}.am-dialog-new-customize__footer .el-button.el-button--secondary span{font-family:Amelia Roboto,sans-serif;font-size:14px;font-weight:500;color:#1a2c37}.am-dialog-new-customize .el-dialog{max-width:500px;width:100%;background-color:#fff;border-radius:8px;padding:24px;-webkit-box-sizing:border-box;box-sizing:border-box}.am-dialog-new-customize .el-dialog__body,.am-dialog-new-customize .el-dialog__footer,.am-dialog-new-customize .el-dialog__header{padding:0}.am-dialog-new-customize .el-dialog__header h1{font-family:Amelia Roboto,sans-serif;font-size:28px;font-weight:700;line-height:1.2857;color:#1a2c37;margin:0 0 16px}",""])},739:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"DialogNewCustomize",props:{customizePage:{type:Boolean,default:!1}},data:function(){return{dialogNewCustomize:!0}},created:function(){this.dialogNewCustomize=this.$root.settings.activation.showAmeliaPromoCustomizePopup},methods:{goToCustomize:function(){this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaPromoCustomizePopup:!1}}).then(function(t){window.location.href="admin.php?page=wpamelia-customize-new¤t=elf"}).catch(function(t){})},closeDialog:function(){var t=this;this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaPromoCustomizePopup:!1}}).then(function(e){t.dialogNewCustomize=!1}).catch(function(e){t.dialogNewCustomize=!1})}}}},740:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return!t.dialogNewCustomize||"admin"!==t.$root.settings.role&&"manager"!==t.$root.settings.role?t._e():n("el-dialog",{staticClass:"am-dialog-new-customize",attrs:{"show-close":!1,"close-on-click-modal":!1,"append-to-body":!0,visible:t.dialogNewCustomize},on:{"update:visible":function(e){t.dialogNewCustomize=e}},scopedSlots:t._u([{key:"title",fn:function(){return[n("h1",[t._v("\n "+t._s(t.$root.labels.customize_dialog_heading)+"\n ")])]},proxy:!0},{key:"default",fn:function(){return[n("div",{staticClass:"am-dialog-new-customize__content"},[n("div",{staticClass:"am-dialog-new-customize__content-img"},[n("img",{attrs:{src:t.$root.getUrl+"v3/src/assets/img/admin/customize/amelia-event-list-2-0.png",alt:t.$root.labels.customize_dialog_heading}})]),t._v(" "),n("div",{staticClass:"am-dialog-new-customize__content-heading",domProps:{innerHTML:t._s(t.$root.labels.customize_dialog_sub_heading)}}),t._v(" "),n("div",{staticClass:"am-dialog-new-customize__content-description"})])]},proxy:!0},{key:"footer",fn:function(){return[n("div",{staticClass:"am-dialog-new-customize__footer"},[n("el-button",{attrs:{type:"primary"},on:{click:t.goToCustomize}},[t.customizePage?t._e():[t._v("\n "+t._s(t.$root.labels.customize_dialog_go_to)+"\n ")],t._v(" "),t.customizePage?[t._v("\n "+t._s(t.$root.labels.customize_dialog_check)+"\n ")]:t._e()],2),t._v(" "),n("el-button",{attrs:{type:"secondary"},on:{click:t.closeDialog}},[t._v("\n "+t._s(t.$root.labels.customize_dialog_close)+"\n ")])],1)]},proxy:!0}],null,!1,3727916322)})},staticRenderFns:[]}},741:function(t,e,n){var o=n(335)(n(744),n(745),!1,function(t){n(742)},null,null);t.exports=o.exports},742:function(t,e,n){var o=n(743);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n(705)("279425cc",o,!0,{})},743:function(t,e,n){(t.exports=n(704)(!1)).push([t.i,".am-survey__btn{cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;bottom:32px;right:104px;width:56px;height:56px;border-radius:50%;background:#1a2c37;background:linear-gradient(330deg,#1a2c37,#1a2c37 47%,#60addd 54%,#1a2c37 61%,#1a2c37);background-size:300%;-webkit-animation:am-survey-animation 4s infinite;animation:am-survey-animation 4s infinite;z-index:1000;-webkit-box-shadow:0 8px 8px 0 rgba(0,0,0,.24),0 0 8px 0 rgba(0,0,0,.12);box-shadow:0 8px 8px 0 rgba(0,0,0,.24),0 0 8px 0 rgba(0,0,0,.12)}.am-survey__btn:hover{-webkit-animation:unset;animation:unset;background:#1a2c37}.am-survey__dialog .el-dialog{max-width:484px;width:100%;border-radius:8px}.am-survey__dialog .el-dialog__header{padding:20px 24px 24px}.am-survey__dialog .el-dialog__body{padding:0 24px 24px}.am-survey__dialog-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.am-survey__dialog-header__text{font-size:18px;font-weight:600;line-height:1.55556;color:#1a2c37}.am-survey__dialog-header__btn{font-size:15px;font-weight:500;line-height:1.6;color:#808a90;cursor:pointer}.am-survey__dialog-img{width:100%;margin-bottom:16px}.am-survey__dialog-img img{width:100%}.am-survey__dialog-text div{font-size:18px;font-weight:500;line-height:1.55556;color:#1a2c37;margin-bottom:4px}.am-survey__dialog-text span{display:block;font-size:15px;font-weight:500;line-height:1.6;color:#1a2c37;word-break:break-word}@-webkit-keyframes am-survey-animation{0%{-webkit-transform:scale(1);transform:scale(1);background-position:100% 0}15%{-webkit-transform:scale(1.05);transform:scale(1.05)}20%{background-position:-20% 0}30%{-webkit-transform:scale(1);transform:scale(1)}to{background-position:-20% 0}}@keyframes am-survey-animation{0%{-webkit-transform:scale(1);transform:scale(1);background-position:100% 0}15%{-webkit-transform:scale(1.05);transform:scale(1.05)}20%{background-position:-20% 0}30%{-webkit-transform:scale(1);transform:scale(1)}to{background-position:-20% 0}}",""])},744:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"AmSurvey",data:function(){return{dialogSurvey:!1,surveyVisibility:!0}},created:function(){this.surveyVisibility=this.$root.settings.activation.showAmeliaSurvey},methods:{closeForever:function(){var t=this;this.dialogSurvey=!1,this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaSurvey:!1}}).then(function(e){t.surveyVisibility=!1}).catch(function(t){})},maybeLater:function(){this.dialogSurvey=!1},goToSurvey:function(){this.dialogSurvey=!1,window.open("https://www.surveymonkey.com/r/VJQDLVX","_blank")},openSurvey:function(){this.dialogSurvey=!0}}}},745:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.surveyVisibility&&"admin"===t.$root.settings.role?n("div",{staticClass:"am-survey__wrapper"},[n("el-dialog",{staticClass:"am-survey__dialog",attrs:{"show-close":!1,"close-on-click-modal":!1,"append-to-body":!0,visible:t.dialogSurvey},on:{"update:visible":function(e){t.dialogSurvey=e}},scopedSlots:t._u([{key:"title",fn:function(){return[n("div",{staticClass:"am-survey__dialog-header"},[n("span",{staticClass:"am-survey__dialog-header__text"},[t._v("\n "+t._s(t.$root.labels.survey_heading)+"\n ")]),t._v(" "),n("span",{staticClass:"am-survey__dialog-header__btn",on:{click:t.closeForever}},[t._v("\n "+t._s(t.$root.labels.survey_close)+"\n ")])])]},proxy:!0},{key:"default",fn:function(){return[n("div",{staticClass:"am-survey__dialog-content"},[n("div",{staticClass:"am-survey__dialog-img"},[n("img",{attrs:{src:t.$root.getUrl+"public/img/survey/am-survey.png",alt:t.$root.labels.survey_heading}})]),t._v(" "),n("div",{staticClass:"am-survey__dialog-text",domProps:{innerHTML:t._s(t.$root.labels.survey_content)}})])]},proxy:!0},{key:"footer",fn:function(){return[n("div",{staticClass:"am-survey__dialog-footer"},[n("el-button",{attrs:{type:"secondary"},on:{click:t.maybeLater}},[t._v("\n "+t._s(t.$root.labels.survey_maybe)+"\n ")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.goToSurvey}},[t._v("\n "+t._s(t.$root.labels.survey_sure)+"\n ")])],1)]},proxy:!0}],null,!1,3092811696)}),t._v(" "),n("div",{staticClass:"am-survey__btn",on:{click:t.openSurvey}},[n("img",{attrs:{src:t.$root.getUrl+"public/img/survey/am-clipboard.svg"}})])],1):t._e()},staticRenderFns:[]}},747:function(t,e,n){"use strict";var o=n(700),i=n(338);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}],customerPlaceholders:[{value:"%customer_email%",label:this.$root.labels.ph_customer_email},{value:"%customer_first_name%",label:this.$root.labels.ph_customer_first_name},{value:"%customer_full_name%",label:this.$root.labels.ph_customer_full_name},{value:"%customer_last_name%",label:this.$root.labels.ph_customer_last_name},{value:"%customer_note%",label:this.$root.labels.ph_customer_note},{value:"%customer_phone%",label:this.$root.labels.ph_customer_phone},{value:"%customer_panel_url%",label:this.$root.labels.ph_customer_cabinet_url,parse:"link"}],packagePlaceholders:[{value:"%package_appointments_details%",label:this.$root.labels.ph_package_appointments_details},{value:"%package_description%",label:this.$root.labels.ph_package_description},{value:"%package_duration%",label:this.$root.labels.ph_package_duration},{value:"%package_name%",label:this.$root.labels.ph_package_name},{value:"%package_price%",label:this.$root.labels.ph_package_price},{value:"%time_zone%",label:this.$root.labels.ph_time_zone},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used}],employeePlaceholders:[{value:"%employee_email%",label:this.$root.labels.ph_employee_email},{value:"%employee_first_name%",label:this.$root.labels.ph_employee_first_name},{value:"%employee_full_name%",label:this.$root.labels.ph_employee_full_name},{value:"%employee_last_name%",label:this.$root.labels.ph_employee_last_name},{value:"%employee_note%",label:this.$root.labels.ph_employee_note},{value:"%employee_description%",label:this.$root.labels.ph_employee_description},{value:"%employee_phone%",label:this.$root.labels.ph_employee_phone},{value:"%employee_panel_url%",label:this.$root.labels.ph_employee_cabinet_url,parse:"link"},{value:"%employee_password%",label:this.$root.labels.ph_employee_password}],paymentPlaceholders:[{value:"%payment_type%",label:this.$root.labels.ph_payment_type},{value:"%appointment_deposit_payment%",label:this.$root.labels.ph_appointment_deposit_payment},{value:"%event_deposit_payment%",label:this.$root.labels.ph_event_deposit_payment},{value:"%package_deposit_payment%",label:this.$root.labels.ph_package_deposit_payment},{value:"%payment_link_woocommerce%",label:this.$root.labels.ph_payment_link_woocommerce},{value:"%payment_link_mollie%",label:this.$root.labels.ph_payment_link_mollie},{value:"%payment_link_paypal%",label:this.$root.labels.ph_payment_link_paypal},{value:"%payment_link_stripe%",label:this.$root.labels.ph_payment_link_stripe},{value:"%payment_link_razorpay%",label:this.$root.labels.ph_payment_link_razorpay}],categoryPlaceholders:[{value:"%category_name%",label:this.$root.labels.ph_category_name},{value:"%service_description%",label:this.$root.labels.ph_service_description},{value:"%service_duration%",label:this.$root.labels.ph_service_duration},{value:"%service_name%",label:this.$root.labels.ph_service_name},{value:"%service_price%",label:this.$root.labels.ph_service_price}],locationPlaceholders:[{value:"%location_address%",label:this.$root.labels.ph_location_address},{value:"%location_description%",label:this.$root.labels.ph_location_description},{value:"%location_name%",label:this.$root.labels.ph_location_name},{value:"%location_phone%",label:this.$root.labels.ph_location_phone}],appointmentPlaceholders:[{value:"%appointment_id%",label:this.$root.labels.ph_appointment_id},{value:"%appointment_cancel_url%",label:this.$root.labels.ph_appointment_cancel_url,parse:"link"},{value:"%appointment_date%",label:this.$root.labels.ph_appointment_date},{value:"%appointment_date_time%",label:this.$root.labels.ph_appointment_date_time},{value:"%appointment_start_time%",label:this.$root.labels.ph_appointment_start_time},{value:"%appointment_end_time%",label:this.$root.labels.ph_appointment_end_time},{value:"%initial_appointment_date%",label:this.$root.labels.ph_initial_appointment_date},{value:"%initial_appointment_date_time%",label:this.$root.labels.ph_initial_appointment_date_time},{value:"%initial_appointment_start_time%",label:this.$root.labels.ph_initial_appointment_start_time},{value:"%initial_appointment_end_time%",label:this.$root.labels.ph_initial_appointment_end_time},{value:"%appointment_duration%",label:this.$root.labels.ph_appointment_duration},{value:"%appointment_notes%",label:this.$root.labels.ph_appointment_notes},{value:"%appointment_price%",label:this.$root.labels.ph_appointment_price},{value:"%appointment_status%",label:this.$root.labels.ph_appointment_status},{value:"%booked_customer%",label:this.$root.labels.ph_booked_customer},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used},{value:"%number_of_persons%",label:this.$root.labels.ph_booking_number_of_persons},{value:"%recurring_appointments_details%",label:this.$root.labels.ph_recurring_appointments_details},{value:"%group_appointment_details%",label:this.$root.labels.ph_group_appointment_details},{value:"%zoom_host_url%",label:this.$root.labels.ph_zoom_host_url},{value:"%zoom_join_url%",label:this.$root.labels.ph_zoom_join_url},{value:"%google_meet_url%",label:this.$root.labels.ph_google_meet_url},{value:"%lesson_space_url%",label:this.$root.labels.ph_lesson_space_url},{value:"%reservation_name%",label:this.$root.labels.ph_reservation_name},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description},{value:"%time_zone%",label:this.$root.labels.ph_time_zone}],eventPlaceholders:[{value:"%attendee_code%",label:this.$root.labels.ph_attendee_code},{value:"%coupon_used%",label:this.$root.labels.ph_coupon_used},{value:"%event_cancel_url%",label:this.$root.labels.ph_event_cancel_url,parse:"link"},{value:"%event_description%",label:this.$root.labels.ph_event_description},{value:"%event_location%",label:this.$root.labels.ph_event_location},{value:"%event_end_date%",label:this.$root.labels.ph_event_end_date},{value:"%event_end_date_time%",label:this.$root.labels.ph_event_end_date_time},{value:"%event_end_time%",label:this.$root.labels.ph_event_end_time},{value:"%group_event_details%",label:this.$root.labels.ph_group_event_details},{value:"%event_tickets%",label:this.$root.labels.ph_event_tickets},{value:"%event_name%",label:this.$root.labels.ph_event_name},{value:"%event_period_date%",label:this.$root.labels.ph_event_period_date},{value:"%event_period_date_time%",label:this.$root.labels.ph_event_period_date_time},{value:"%event_price%",label:this.$root.labels.ph_event_price},{value:"%booking_price%",label:this.$root.labels.ph_booking_price},{value:"%event_start_date%",label:this.$root.labels.ph_event_start_date},{value:"%event_start_date_time%",label:this.$root.labels.ph_event_start_date_time},{value:"%event_start_time%",label:this.$root.labels.ph_event_start_time},{value:"%initial_event_start_date%",label:this.$root.labels.ph_initial_event_start_date},{value:"%initial_event_start_date_time%",label:this.$root.labels.ph_initial_event_start_date_time},{value:"%initial_event_start_time%",label:this.$root.labels.ph_initial_event_start_time},{value:"%initial_event_end_date%",label:this.$root.labels.ph_initial_event_end_date},{value:"%initial_event_end_date_time%",label:this.$root.labels.ph_initial_event_end_date_time},{value:"%initial_event_end_time%",label:this.$root.labels.ph_initial_event_end_time},{value:"%employee_name_email_phone%",label:this.$root.labels.ph_employee_name_email_phone},{value:"%number_of_persons%",label:this.$root.labels.ph_booking_number_of_persons},{value:"%lesson_space_url_date%",label:this.$root.labels.ph_lesson_space_url_date},{value:"%lesson_space_url_date_time%",label:this.$root.labels.ph_lesson_space_url_date_time},{value:"%google_meet_url_date%",label:this.$root.labels.ph_google_meet_url_date},{value:"%google_meet_url_date_time%",label:this.$root.labels.ph_google_meet_url_date_date},{value:"%zoom_host_url_date%",label:this.$root.labels.ph_zoom_host_url_date},{value:"%zoom_host_url_date_time%",label:this.$root.labels.ph_zoom_host_url_date_date},{value:"%zoom_join_url_date%",label:this.$root.labels.ph_zoom_join_url_date},{value:"%zoom_join_url_date_time%",label:this.$root.labels.ph_zoom_join_url_date_date},{value:"%reservation_name%",label:this.$root.labels.ph_reservation_name},{value:"%reservation_description%",label:this.$root.labels.ph_reservation_description},{value:"%time_zone%",label:this.$root.labels.ph_time_zone}],customFieldsPlaceholders:[],extrasPlaceholders:[],couponsPlaceholders:[]},placeholders:[],linksForParsing:{"%customer_panel_url%":'<a href="%customer_panel_url%">'+this.$root.labels.ph_customer_cabinet_url+"</a>","%employee_panel_url%":'<a href="%employee_panel_url%">'+this.$root.labels.ph_employee_cabinet_url+"</a>","%appointment_cancel_url%":'<a href="%appointment_cancel_url%">'+this.$root.labels.ph_appointment_cancel_url+"</a>","%event_cancel_url%":'<a href="%event_cancel_url%">'+this.$root.labels.ph_event_cancel_url+"</a>"},plainTextLinksForParsing:{"%customer_panel_url%":'<a href="%customer_panel_url%">'+this.$root.labels.ph_customer_cabinet_url+"</a>","%employee_panel_url%":'<a href="%employee_panel_url%">'+this.$root.labels.ph_employee_cabinet_url+"</a>","%appointment_cancel_url%":'<a href="%appointment_cancel_url%">'+this.$root.labels.ph_appointment_cancel_url+"</a>","%event_cancel_url%":'<a href="%event_cancel_url%">'+this.$root.labels.ph_event_cancel_url+"</a>"}}},methods:{getEventPlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.employeePlaceholders.concat(this.groupedPlaceholders.locationPlaceholders.concat(this.groupedPlaceholders.customFieldsPlaceholders.concat(this.groupedPlaceholders.eventPlaceholders.concat(this.groupedPlaceholders.couponsPlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))))))},getAppointmentPlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.employeePlaceholders.concat(this.groupedPlaceholders.locationPlaceholders.concat(this.groupedPlaceholders.customFieldsPlaceholders.concat(this.groupedPlaceholders.couponsPlaceholders.concat(this.groupedPlaceholders.appointmentPlaceholders.concat(this.groupedPlaceholders.categoryPlaceholders.concat(this.groupedPlaceholders.extrasPlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))))))))},getPackagePlaceholders:function(){return this.groupedPlaceholders.companyPlaceholders.concat(this.groupedPlaceholders.customerPlaceholders.concat(this.groupedPlaceholders.packagePlaceholders.concat(this.groupedPlaceholders.paymentPlaceholders)))},removePlaceholder:function(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})},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)},isDisabledInLite:function(t){return this.$root.isLite&&-1!==["%coupon_used%","%appointment_cancel_url%","%appointment_deposit_payment%","%event_deposit_payment%","%event_cancel_url%","%customer_panel_url%","%employee_panel_url%","%google_meet_url%","%zoom_join_url%","%zoom_host_url%","%zoom_host_url_date%","%zoom_host_url_date_time%","%zoom_join_url_date%","%zoom_join_url_date_time%","%lesson_space_url%","%lesson_space_url_date%","%lesson_space_url_date_time%","%location_name%","%location_description%","%location_address%","%location_phone%","%service_extras%","%recurring_appointments_details%"].indexOf(t)}},computed:{}}},749:function(t,e,n){t.exports=n(750)},750:function(t,e,n){"use strict";var o=n(698),i=n(716),a=n(751),r=n(708);function s(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=s(r);l.Axios=a,l.create=function(t){return s(o.merge(r,t))},l.Cancel=n(720),l.CancelToken=n(765),l.isCancel=n(719),l.all=function(t){return Promise.all(t)},l.spread=n(766),t.exports=l,t.exports.default=l},751:function(t,e,n){"use strict";var o=n(708),i=n(698),a=n(760),r=n(761),s=n(763),l=n(764);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&&!s(t.url)&&(t.url=l(t.baseURL,t.url));var e=[r,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},752:function(t,e,n){"use strict";var o=n(698);t.exports=function(t,e){o.forEach(t,function(n,o){o!==e&&o.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[o])})}},753:function(t,e,n){"use strict";var o=n(718);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)}},754: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}},755:function(t,e,n){"use strict";var o=n(698);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 r=[];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)),r.push(i(e)+"="+i(t))}))}),a=r.join("&")}return a&&(t+=(-1===t.indexOf("?")?"?":"&")+a),t}},756:function(t,e,n){"use strict";var o=n(698);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}},757:function(t,e,n){"use strict";var o=n(698);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}},758: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),r="",s=0,l=o;a.charAt(0|s)||(l="=",s%1);r+=l.charAt(63&e>>8-s%1*8)){if((n=a.charCodeAt(s+=.75))>255)throw new i;e=e<<8|n}return r}},759:function(t,e,n){"use strict";var o=n(698);t.exports=o.isStandardBrowserEnv()?{write:function(t,e,n,i,a,r){var s=[];s.push(t+"="+encodeURIComponent(e)),o.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),o.isString(i)&&s.push("path="+i),o.isString(a)&&s.push("domain="+a),!0===r&&s.push("secure"),document.cookie=s.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(){}}},760:function(t,e,n){"use strict";var o=n(698);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},761:function(t,e,n){"use strict";var o=n(698),i=n(762),a=n(719),r=n(708);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(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||r.adapter)(t).then(function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},762:function(t,e,n){"use strict";var o=n(698);t.exports=function(t,e,n){return o.forEach(n,function(n){t=n(t,e)}),t}},763:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},764:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},765:function(t,e,n){"use strict";var o=n(720);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},766:function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},767: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(12),r=(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?r.default.delete(this.errors,t):this.errors={}}},{key:"any",value:function(){return Object.keys(this.errors).length>0}}]),t}()},768: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,r,s){if(n instanceof FormData&&(s=r,r=n,n=null),(n=n||{}).indices=!o(n.indices)&&n.indices,n.nulls=!!o(n.nulls)||n.nulls,r=r||new FormData,o(e))return r;if(function(t){return null===t}(e))n.nulls&&r.append(s,"");else if(i(e))if(e.length)e.forEach(function(e,o){var i=s+"["+(n.indices?o:"")+"]";t(e,n,r,i)});else{var l=s+"[]";r.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)?r.append(s,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,r,s?s+"["+o+"]":o)}):r.append(s,e.toISOString());return r}},771: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),r=n(5)(i.a,a.a,!1,null,null,null);e.default=r.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)),r=window.Quill||i.default,s=function(t,e){e&&(a.default.props.globalOptions.default=function(){return e}),t.component(a.default.name,a.default)},l={Quill:r,quillEditor:a.default,install:s};e.default=l,e.Quill=r,e.quillEditor=a.default,e.install=s},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)),r=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 r(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,r=t.quill.getText();"<p><br></p>"===i&&(i=""),t._content=i,t.$emit("input",t._content),t.$emit("change",{html:i,text:r,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 r,s=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(r=t,s=t.default);var c,u="function"==typeof s?s.options:s;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:r,exports:s,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(797))},772:function(t,e,n){var o=n(335)(n(796),n(802),!1,null,null,null);t.exports=o.exports},780:function(t,e,n){"use strict";var o=n(747);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]}}}},791:function(t,e,n){var o=n(335)(n(793),n(794),!1,null,null,null);t.exports=o.exports},793: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}}}},794: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:[]}},796:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(771),i=(n.n(o),n(780));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(){this.entity[this.textProperty]="\x3c!-- Content --\x3e"+this.entity[this.htmlProperty].replace("\x3c!-- Content --\x3e","")},changedContentText:function(){this.entity[this.textProperty]=this.process(this.textValue.replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")),this.entity[this.htmlProperty]=this.entity[this.textProperty]},showDialogTranslate:function(){this.$emit("showDialogTranslate")},textModeChanged:function(){this.isTextMode=!this.isTextMode,this.isTextMode?this.entity[this.textProperty]=this.process(this.entity[this.htmlProperty].replace("\x3c!-- Content --\x3e","").replace(/(\r\n|\n|\r)/gm,"")):(this.entity[this.textProperty]="\x3c!-- Content --\x3e"+this.entity[this.textProperty],this.entity[this.htmlProperty]=this.entity[this.textProperty]),this.textValue=this.entity[this.textProperty]}},components:{quillEditor:o.quillEditor}}},797:function(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),r=n(45),s=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:r.default,Block:l.default,Inline:s.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 r,s={},l={},c={},u={};function d(t,e){var n;if(void 0===e&&(e=r.ANY),"string"==typeof t)n=u[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof t)t&r.LEVEL&r.BLOCK?n=u.block:t&r.LEVEL&r.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&r.LEVEL&n.scope&&e&r.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"}(r=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?s[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),r=n(20),s=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+r.length(e):e.delete?t-e.delete:t},0)},l.prototype.length=function(){return this.reduce(function(t,e){return t+r.length(e)},0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],o=r.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+=r.length(a)}return new l(n)},l.prototype.compose=function(t){for(var e=r.iterator(this.ops),n=r.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),s=n.next(i);if("number"==typeof s.retain){var c={};"number"==typeof a.retain?c.retain=i:c.insert=a.insert;var u=r.attributes.compose(a.attributes,s.attributes,"number"==typeof a.retain);u&&(c.attributes=u),o.push(c)}else"number"==typeof s.delete&&"number"==typeof a.retain&&o.push(s)}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:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")}).join("")}),a=new l,c=o(n[0],n[1],e),u=r.iterator(this.ops),d=r.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 s=u.next(n),l=d.next(n);i(s.insert,l.insert)?a.retain(n,r.attributes.diff(s.attributes,l.attributes)):a.push(l).delete(n)}e-=n}}),a.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=r.iterator(this.ops),o=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var a=n.peek(),s=r.length(a)-n.peekLength(),c="string"==typeof a.insert?a.insert.indexOf(e,s)-s:-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=r.iterator(this.ops),o=r.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()),s=n.next(a),c=o.next(a);if(s.delete)continue;c.delete?i.push(c):i.retain(a,r.attributes.transform(s.attributes,c.attributes,e))}else i.retain(r.length(n.next()));return i.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=r.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,r,s,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!==(r=e[n])&&(p&&r&&(a(r)||(s=i(r)))?(s?(s=!1,l=o&&i(o)?o:[]):l=o&&a(o)?o:{},c[n]=t(p,l,r)):void 0!==r&&(c[n]=r));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 r=i.get;return void 0!==r?r.call(o):void 0},a=d(n(3)),r=d(n(2)),s=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,s.default.Embed),o(e,[{key:"attach",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new r.default).insert(this.value(),(0,a.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=s.default.query(t,s.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=s.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=s.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,s.default.Block),o(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce(function(t,e){return 0===e.length()?t:t.insert(e.value(),v(e))},new r.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||(s.default.query(o,s.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"),r=a.shift();r.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),r):this.children.tail.insertAt(this.children.tail.length(),r),this.cache={});var s=this;a.reduce(function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length},t+r.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,s.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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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 r=g(n(2)),s=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 y=(0,h.default)("quill"),b=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 y.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 s.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;w.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]&&y.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||y.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=x(t,e,n),r=i(a,4);return t=r[0],e=r[1],n=r[3],w.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 w.call(this,function(){var o=n.getSelection(!0),i=new r.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 r,s=this,l=x(t,e,n,o,a),c=i(l,4);return t=c[0],e=c[1],r=c[2],a=c[3],w.call(this,function(){return s.editor.formatLine(t,e,r)},a,t,0)}},{key:"formatText",value:function(t,e,n,o,a){var r,s=this,l=x(t,e,n,o,a),c=i(l,4);return t=c[0],e=c[1],r=c[2],a=c[3],w.call(this,function(){return s.editor.formatText(t,e,r)},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=x(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=x(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 w.call(this,function(){return i.editor.insertEmbed(e,n,o)},a,e)}},{key:"insertText",value:function(t,e,n,o,a){var r,s=this,l=x(t,0,n,o,a),c=i(l,4);return t=c[0],r=c[2],a=c[3],w.call(this,function(){return s.editor.insertText(t,e,r)},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=x(t,e,n),r=i(a,4);return t=r[0],e=r[1],n=r[3],w.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 w.call(this,function(){t=new r.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=x(e,n,o),r=i(a,4);e=r[0],n=r[1],o=r[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 r.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 w.call(this,function(){return t=new r.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!==b.DEFAULTS.theme){if(e.theme=b.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=b.import("modules/"+e);return null==n?y.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,{},b.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 w(t,e,n,o){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new r.default;var i=null==n?null:this.getSelection(),a=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==o?i=k(i,s,e):0!==o&&(i=k(i,n,o,e)),this.setSelection(i,l.default.sources.SILENT)),s.length()>0){var c,u,d=[l.default.events.TEXT_CHANGE,s,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 s}function x(t,e,n,i,a){var r={};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))?(r=n,a=i):"string"==typeof n&&(null!=i?r[n]=i:a=n),[t,e,r,a=a||l.default.sources.API]}function k(t,e,n,o){if(null==t)return null;var a=void 0,s=void 0;if(e instanceof r.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],s=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],s=f[1]}return new d.Range(a,s-a)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.6",b.imports={delta:r.default,parchment:u.default,"core/module":c.default,"core/theme":m.default},e.expandConfig=_,e.overload=x,e.default=b},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 r=i.get;return void 0!==r?r.call(o):void 0},a=s(n(7)),r=s(n(0));function s(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,r.default.Inline),o(e,[{key:"formatAt",value:function(t,n,o,a){if(e.compare(this.statics.blotName,o)<0&&r.default.query(o,r.default.Scope.BLOT)){var s=this.isolate(t,n);a&&s.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,r.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 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,a.default.Text),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}}(),i=a(n(54));function a(t){return t&&t.__esModule?t:{default:t}}var r=(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 s=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",r.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(){r.log.apply(r,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 r=i.get;return void 0!==r?r.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}();s.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"},s.sources={API:"api",SILENT:"silent",USER:"user"},e.default=s},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),r=1;r<n;r++)a[r-1]=arguments[r];(e=console)[t].apply(e,a)}}function r(t){return o.reduce(function(e,n){return e[n]=a.bind(console,n,t),e},{})}a.level=r.level=function(t){i=t},e.default=r},function(t,e,n){var o=Array.prototype.slice,i=n(52),a=n(53),r=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(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(a(t))return!!a(e)&&(t=o.call(t),e=o.call(e),r(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],!r(t[u],e[u],n))return!1;return typeof t==typeof e}(t,e,n))};function s(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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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 r=i.get;return void 0!==r?r.call(o):void 0},r=d(n(2)),s=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 r.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var i=this.descendant(u.default,this.length()-1),r=o(i,1)[0];null!=r&&r.deleteAt(r.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!=s.default.query(o,s.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 r=this.newlineIndex(t,!0)+1,l=a-r+1,c=this.isolate(r,l),u=c.next;c.format(o,i),u instanceof e&&u.formatAt(0,t-r+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),r=a[0],s=a[1];r.insertAt(s,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(s.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=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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}}(),r=v(n(2)),s=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 y=/^[ -~]*$/,b=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 r.default)}(t)).reduce(function(t,r){var c=r.retain||r.delete||r.insert.length||1,u=r.attributes||{};if(null!=r.insert){if("string"==typeof r.insert){var f=r.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],y=m[1],b=(0,g.default)({},(0,d.bubbleFormats)(v));if(v instanceof p.default){var _=v.descendant(l.default.Leaf,y),w=i(_,1)[0];b=(0,g.default)(b,(0,d.bubbleFormats)(w))}u=s.default.attributes.diff(b,u)||{}}else if("object"===o(r.insert)){var x=Object.keys(r.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,r.insert[x])}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 r.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)),r=e;a.forEach(function(e){var a=e.length();if(e instanceof c.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+r)-s+1;e.formatAt(s,l,i,o[i])}else e.format(i,o[i]);r-=a})}}),this.scroll.optimize(),this.update((new r.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 r.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 r.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 r.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 r.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),s=a[0],l=a[1],u=0,d=new r.default;null!=s&&(u=s instanceof c.default?s.newlineIndex(l)-l+1:s.length()-l,d=s.delta().slice(l,l+u-1).insert("\n"));var p=this.getContents(t,e+u).diff((new r.default).insert(n).concat(d)),f=(new r.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(y)&&l.default.find(e[0].target)){var i=l.default.find(e[0].target),a=(0,d.bubbleFormats)(i),s=i.offset(this.scroll),c=e[0].oldValue.replace(u.default.CONTENTS,""),p=(new r.default).insert(c),f=(new r.default).insert(i.value());t=(new r.default).retain(s).concat(p.diff(f,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,a):t.push(e)},new r.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=b},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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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)),r=c(n(21)),s=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,r=n.endNode,s=n.endOffset;o.setNativeRange(i,a,r,s)}}),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),r=o(a,2),s=r[0],l=r[1];if(null==s)return null;var c=s.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(s=f[0],l=f[1],null==s)return null;var h=s.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=s.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],r=n[1],s=a.default.find(i,!0),l=s.offset(e.scroll);return 0===r?l:s instanceof a.default.Container?l+s.length():l+s.index(i,r)}),r=Math.min(Math.max.apply(Math,u(i)),this.scroll.length()-1),s=Math.min.apply(Math,[r].concat(u(i)));return new f(s,r-s)}},{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 r,s=e.scroll.leaf(t),l=o(s,2),c=l[0],u=l[1],d=c.position(u,0!==n),p=o(d,2);r=p[0],u=p[1],i.push(r,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)),r=o(a,1)[0],s=r;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,i));s=o(l,1)[0]}if(null!=r&&null!=s){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 r=(this.getNativeRange()||{}).native;if(null==r||i||t!==r.startContainer||e!==r.startOffset||n!==r.endContainer||o!==r.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 s=document.createRange();s.setStart(t,e),s.setEnd(n,o),a.removeAllRanges(),a.addRange(s)}}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,s.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,r.default)(this.lastRange),(0,r.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),r=(o=a)&&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,r.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 r=i.get;return void 0!==r?r.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}();s.blotName="break",s.tagName="BR",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)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(44),r=n(30),s=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 s.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,r){(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-=r}),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 r=null==n?s.create("text",e):s.create(e,n);this.appendChild(r)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new s.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=s.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],r=[[this,t]];return i instanceof e?r.concat(i.path(a,n)):(null!=i&&r.push([i,a]),r)},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=s.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=s.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}(r.default);function c(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.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),r=n(31),s=n(17),l=n(1),c=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new r.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}(s.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),r=n(1),s=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=r.Scope.INLINE_BLOT,e}(a.default);e.default=s},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 r(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 r(t){this.ops=t,this.index=0,this.offset=0}r.prototype.hasNext=function(){return this.peekLength()<1/0},r.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}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},r.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(r,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 r(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(r(e,m-1))},function(t){e(r(t,m-1))})});else if(a.__isArray(c))g=[];else if(a.__isRegExp(c))g=new RegExp(c.source,s(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 y=p.indexOf(c);if(-1!=y)return f[y];p.push(c),f.push(g)}for(var b in t(c,n)&&c.forEach(function(t,e){var n=r(e,m-1),o=r(t,m-1);g.set(n,o)}),t(c,o)&&c.forEach(function(t){var e=r(t,m-1);g.add(e)}),c){var _;v&&(_=Object.getOwnPropertyDescriptor(v,b)),_&&null==_.set||(g[b]=r(c[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(c);for(b=0;b<w.length;b++){var x=w[b];(!(P=Object.getOwnPropertyDescriptor(c,x))||P.enumerable||d)&&(g[x]=r(c[x],m-1),P.enumerable||Object.defineProperty(g,x,{enumerable:!1}))}}if(d){var k=Object.getOwnPropertyNames(c);for(b=0;b<k.length;b++){var P,O=k[b];(P=Object.getOwnPropertyDescriptor(c,O))&&P.enumerable||(g[O]=r(c[O],m-1),Object.defineProperty(g,O,{enumerable:!1}))}}return g}(r,c)}function r(t){return Object.prototype.toString.call(t)}function s(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=r,a.__isDate=function(t){return"object"==typeof t&&"[object Date]"===r(t)},a.__isArray=function(t){return"object"==typeof t&&"[object Array]"===r(t)},a.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===r(t)},a.__getRegExpFlags=s,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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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 r=i.get;return void 0!==r?r.call(o):void 0},r=f(n(0)),s=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,r.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),r=o(i,2),s=r[0],c=r[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&&s!==f&&c>0){if(s instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(s instanceof d.default){var h=s.newlineIndex(s.length(),!0);if(h>-1&&(s=s.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;s.moveChildren(f,g),s.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==r.default.query(n,r.default.Scope.BLOCK)){var i=r.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 s=r.default.create(n,o);this.appendChild(s)}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===r.default.Scope.INLINE_BLOT){var o=r.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 r.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(s.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=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.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(s.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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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}}(),r=m(n(21)),s=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"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=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},P),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},w),o.addBinding({key:e.keys.DELETE},{collapsed:!0},x)):(o.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),o.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},x)),o.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},k),o.addBinding({key:e.keys.DELETE},{collapsed:!1},k),o.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),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=C(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=C(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,r=(t.bindings[a]||[]).filter(function(t){return e.match(n,t)});if(0!==r.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],y=0===l.length?[g,v]:t.quill.getLeaf(l.index+l.length),b=i(y,2),_=b[0],w=b[1],x=g instanceof d.default.Text?g.value().slice(0,v):"",k=_ instanceof d.default.Text?_.value().slice(w):"",P={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:t.quill.getFormat(l),offset:f,prefix:x,suffix:k};r.some(function(e){if(null!=e.collapsed&&e.collapsed!==P.collapsed)return!1;if(null!=e.empty&&e.empty!==P.empty)return!1;if(null!=e.offset&&e.offset!==P.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==P.format[t]}))return!1}else if("object"===o(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=P.format[t]:!1===e.format[t]?null==P.format[t]:(0,s.default)(e.format[t],P.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(P.prefix))&&(!(null!=e.suffix&&!e.suffix.test(P.suffix))&&!0!==e.handler.call(t,l,P))})&&n.preventDefault()}}}})}}]),e}();function _(t,e){var n,o=t===b.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},o,/^$/),g(n,"handler",function(n){var o=n.index;t===b.keys.RIGHT&&(o+=n.length+1);var a=this.quill.getLeaf(o);return!(i(a,1)[0]instanceof d.default.Embed)||(t===b.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 w(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 r=this.quill.getLine(t.index-1),s=i(r,1)[0];if(null!=s&&s.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 x(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var o={},a=0,r=this.quill.getLine(t.index),s=i(r,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),c=i(l,1)[0];if(c){var d=s.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 k(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 P(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 O(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=d.default.query("code-block"),o=e.index,a=e.length,r=this.quill.scroll.descendant(n,o),s=i(r,2),l=s[0],c=s[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 E(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],p.default.sources.USER)}}}function C(t){if("string"==typeof t||"number"==typeof t)return C({key:t});if("object"===(void 0===t?"undefined":o(t))&&(t=(0,r.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:E("bold"),italic:E("italic"),underline:E("underline"),indent:{key:b.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:b.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:b.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":O(!0),"outdent code-block":O(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,p.default.sources.USER)}},tab:{key:b.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:b.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:b.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],r=(0,l.default)({},o.formats(),{list:"checked"}),s=(new c.default).retain(t.index).insert("\n",r).retain(o.length()-a-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.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],r=o[1],s=(new c.default).retain(t.index).insert("\n",e.format).retain(a.length()-r-1).retain(1,{header:null});this.quill.updateContents(s,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),r=a[0],s=a[1];if(s>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-s).delete(n+1).retain(r.length()-2-s).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:b.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],r=(new c.default).retain(t.index+o.length()-a-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(r,p.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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 r=i.get;return void 0!==r?r.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}}(),r=l(n(0)),s=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,r.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!==r.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 s.default?(i=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=e.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(r.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=r(n(0)),i=n(4),a=r(i);function r(t){return t&&t.__esModule?t:{default:t}}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,o.default.Container),e}();s.allowedChildren=[a.default,i.BlockEmbed,s],e.default=s},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),r=(o=a)&&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,r.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 r=i.get;return void 0!==r?r.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 r.default.Attributor.Class("color","ql-color",{scope:r.default.Scope.INLINE}),c=new s("color","color",{scope:r.default.Scope.INLINE});e.ColorAttributor=s,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 r=i.get;return void 0!==r?r.call(o):void 0},r=n(6),s=(o=r)&&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,s.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=s(n(23)),r=s(n(107));function s(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=r.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),r=v(a),s=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":r.default,"blots/block/embed":a.BlockEmbed,"blots/break":s.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(r.default,s.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 r=o.create(this.statics.scope);a.wrap(r),r.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),r=n(1),s=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),s=a.default.keys(this.domNode);e.concat(n).concat(s).forEach(function(e){var n=r.query(e,r.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=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,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}Object.defineProperty(e,"__esModule",{value:!0});var r=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=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){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 r=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=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){!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=r(n(0)),a=r(n(7));function r(t){return t&&t.__esModule?t:{default:t}}var s="\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(s),n.rightGuard=document.createTextNode(s),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 r=i.get;return void 0!==r?r.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(s).join("");if(t===this.leftGuard)if(this.prev instanceof a.default){var r=this.prev.length();this.prev.insertAt(r,o),e={startNode:this.prev.domNode,startOffset:r+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=s,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 r={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new a.default.Attributor.Attribute("align","align",r),l=new a.default.Attributor.Class("align","ql-align",r),c=new a.default.Attributor.Style("align","text-align",r);e.AlignAttribute=s,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},r=n(26);var s=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),l=new r.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});e.BackgroundClass=s,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 r={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},s=new a.default.Attributor.Attribute("direction","dir",r),l=new a.default.Attributor.Class("direction","ql-direction",r),c=new a.default.Attributor.Style("direction","direction",r);e.DirectionAttribute=s,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),r=(o=a)&&o.__esModule?o:{default:o};var s={scope:r.default.Scope.INLINE,whitelist:["serif","monospace"]},l=new r.default.Attributor.Class("font","ql-font",s),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,r.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 r=i.get;return void 0!==r?r.call(o):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}())("font","font-family",s);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 r=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=r,e.SizeStyle=s},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=s(n(0)),a=s(n(5)),r=s(n(9));function s(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,r.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)),r=f(n(8)),s=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"],y=["#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"],b=[!1,"serif","monospace"],_=["1","2","3",!1],w=["small",!1,"large","huge"],x=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 r=i.get;return void 0!==r?r.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")&&P(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")&&P(t,y,"background"===n?"#ffffff":"#000000"),new c.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?P(t,b):t.classList.contains("ql-header")?P(t,_):t.classList.contains("ql-size")&&P(t,w)),new d.default(t)});this.quill.on(r.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(t){t.update()})})}}]),e}();x.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}),r.default.sources.USER),t.quill.setSelection(o.index+1,r.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 k=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){s.default.match(e,"enter")?(t.save(),e.preventDefault()):s.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,r.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,r.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,r.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",r.default.sources.USER),this.quill.setSelection(o+2,r.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}();function P(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=k,e.default=x},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],r=t-i[1],s=this.iterator(a);(o=s())&&r<t+e;){var l=o.length();t>r?n(o,t-r,Math.min(e,r+l-t)):n(o,0,Math.min(l,t+e-r)),r+=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),r=n(1),s={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,s),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 s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==o&&null!=t.domNode.parentNode&&(null==t.domNode[r.DATA_KEY].mutations&&(t.domNode[r.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[r.DATA_KEY]&&null!=t.domNode[r.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=r.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(r.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=r.find(t,!1);s(e,!1),e instanceof a.default&&e.children.forEach(function(t){s(t,!1)})})):"attributes"===t.type&&s(e.prev)),s(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=r.find(t.target,!0);return null==e?null:null==e.domNode[r.DATA_KEY].mutations?(e.domNode[r.DATA_KEY].mutations=[t],e):(e.domNode[r.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==o&&null!=t.domNode[r.DATA_KEY]&&t.update(t.domNode[r.DATA_KEY].mutations||[],n)}),null!=this.domNode[r.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[r.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=r.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),r=n(1);var s=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]||r.query(o,r.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=r.Scope.INLINE_BLOT,e.tagName="SPAN",e}(a.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)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(18),r=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var o=r.query(e.blotName).tagName;if(n.tagName!==o)return t.formats.call(this,n)},e.prototype.format=function(n,o){null!=r.query(n,r.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!=r.query(o,r.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!=r.query(n,r.Scope.INLINE))t.prototype.insertAt.call(this,e,n,o);else{var i=this.split(e),a=r.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=r.Scope.BLOCK_BLOT,e.tagName="P",e}(a.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)});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),r=n(1),s=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=r.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=r.Scope.INLINE_BLOT,e}(a.default);e.default=s},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=s(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,r,c=t.substring(n,n+Math.floor(t.length/4)),u=-1,d="";-1!=(u=e.indexOf(c,u+1));){var p=s(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),r=e.substring(u+p))}return 2*d.length>=t.length?[o,i,a,r,d]:null}var a,r,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?(r=a[0],c=a[1],u=a[2],d=a[3]):(u=a[0],d=a[1],r=a[2],c=a[3]);var h=a[4];return[r,c,u,d,h]}(t,e);if(f){var h=f[0],m=f[1],g=f[2],v=f[3],y=f[4],b=a(h,g),_=a(m,v);return b.concat([[i,y]],_)}return function(t,e){for(var i=t.length,a=e.length,s=Math.ceil((i+a)/2),l=s,c=2*s,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,y=0,b=0;b<s;b++){for(var _=-b+m;_<=b-g;_+=2){for(var w=l+_,x=(C=_==-b||_!=b&&u[w-1]<u[w+1]?u[w+1]:u[w-1]+1)-_;C<i&&x<a&&t.charAt(C)==e.charAt(x);)C++,x++;if(u[w]=C,C>i)g+=2;else if(x>a)m+=2;else if(h){var k=l+f-_;if(k>=0&&k<c&&-1!=d[k]){var P=i-d[k];if(C>=P)return r(t,e,C,x)}}}for(var O=-b+v;O<=b-y;O+=2){for(var k=l+O,E=(P=O==-b||O!=b&&d[k-1]<d[k+1]?d[k+1]:d[k-1]+1)-O;P<i&&E<a&&t.charAt(i-P-1)==e.charAt(a-E-1);)P++,E++;if(d[k]=P,P>i)y+=2;else if(E>a)v+=2;else if(!h){var w=l+f-O;if(w>=0&&w<c&&-1!=u[w]){var C=u[w],x=l+C-w;if(C>=(P=i-P))return r(t,e,C,x)}}}}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 r=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:r++,u+=e[a][1],a++;break;case i:r+c>1?(0!==r&&0!==c&&(0!==(p=s(d,u))&&(a-r-c>0&&e[a-r-c-1][0]==i?e[a-r-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===r?e.splice(a-c,r+c,[o,d]):0===c?e.splice(a-r,r+c,[n,u]):e.splice(a-r-c,r+c,[n,u],[o,d]),a=a-r-c+(r?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,r=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 r=t[a];if(r[0]===n||r[0]===i){var s=o+r[1].length;if(e===s)return[a+1,t];if(e<s){t=t.slice();var l=e-o,c=[r[0],r[1].slice(0,l)],u=[r[0],r[1].slice(l)];return t.splice(a,1,c,u),[a+1,t]}o=s}}throw new Error("cursor_pos is out of bounds!")}(t,e),a=o[1],r=o[0],s=a[r],l=a[r+1];if(null==s)return t;if(s[0]!==i)return t;if(null!=l&&s[1]+l[1]===l[1]+s[1])return a.splice(r,2,l,s),u(a,r,2);if(null!=l&&0===l[1].indexOf(s[1])){a.splice(r,2,[l[0],s[1]],[0,s[1]]);var c=l[1].slice(s[1].length);return c.length>0&&a.splice(r+2,0,[l[0],c]),u(a,r,3)}return t}(h,c)),h=function(t){for(var e=!1,a=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},r=2;r<t.length;r+=1)t[r-2][0]===i&&((s=t[r-2][1]).charCodeAt(s.length-1)>=55296&&s.charCodeAt(s.length-1)<=56319)&&t[r-1][0]===n&&a(t[r-1][1])&&t[r][0]===o&&a(t[r][1])&&(e=!0,t[r-1][1]=t[r-2][1].slice(-1)+t[r-1][1],t[r][1]=t[r-2][1].slice(-1)+t[r][1],t[r-2][1]=t[r-2][1].slice(0,-1));var s;if(!e)return t;for(var l=[],r=0;r<t.length;r+=1)t[r][1].length>0&&l.push(t[r]);return l}(h)}function r(t,e,n,o){var i=t.substring(0,n),r=e.substring(0,o),s=t.substring(n),l=e.substring(o),c=a(i,r),u=a(s,l);return c.concat(u)}function s(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 r(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),r.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},r.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,r=i.length,s=new Array(r);a<r;a++)s[a]=i[a].fn;return s},r.prototype.emit=function(t,e,n,i,a,r){var s=o?o+t:t;if(!this._events[s])return!1;var l,c,u=this._events[s],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,r),!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},r.prototype.on=function(t,e,n){var i=new a(e,n||this),r=o?o+t:t;return this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],i]:this._events[r].push(i):(this._events[r]=i,this._eventsCount++),this},r.prototype.once=function(t,e,n){var i=new a(e,n||this,!0),r=o?o+t:t;return this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],i]:this._events[r].push(i):(this._events[r]=i,this._eventsCount++),this},r.prototype.removeListener=function(t,e,n,a){var r=o?o+t:t;if(!this._events[r])return this;if(!e)return 0==--this._eventsCount?this._events=new i:delete this._events[r],this;var s=this._events[r];if(s.fn)s.fn!==e||a&&!s.once||n&&s.context!==n||(0==--this._eventsCount?this._events=new i:delete this._events[r]);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==e||a&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[r]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new i:delete this._events[r]}return this},r.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},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=o,r.EventEmitter=r,void 0!==t&&(t.exports=r)},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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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}}(),r=b(n(3)),s=b(n(2)),l=b(n(0)),c=b(n(5)),u=b(n(10)),d=b(n(9)),p=n(36),f=n(37),h=b(n(13)),m=n(26),g=n(38),v=n(39),y=n(40);function b(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 w=(0,u.default)("quill:clipboard"),x="__ql-matcher",k=[[Node.TEXT_NODE,R],[Node.TEXT_NODE,j],["br",function(t,e){T(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,$],[Node.ELEMENT_NODE,function(t,e){var n={},o=t.style||{};o.fontStyle&&"italic"===A(t).fontStyle&&(n.italic=!0);o.fontWeight&&(A(t).fontWeight.startsWith("bold")||parseInt(A(t).fontWeight)>=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=C(e,n));parseFloat(o.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e));return e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!T(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 s.default).retain(e.length()-1).retain(1,{indent:o}))}],["b",N.bind(N,"bold")],["i",N.bind(N,"italic")],["style",function(){return new s.default}]],P=[p.AlignAttribute,g.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),O=[p.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,y.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),E=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=[],k.concat(o.options.matchers).forEach(function(t){var e=i(t,2),a=e[0],r=e[1];(n.matchVisual||r!==I)&&o.addMatcher(a,r)}),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 s.default).insert(n,_({},h.default.blotName,e[h.default.blotName]))}var o=this.prepareMatching(),a=i(o,2),r=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 s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(i,a){var r=t(a,n,o);return a.nodeType===e.ELEMENT_NODE&&(r=n.reduce(function(t,e){return e(a,t)},r),r=(a[x]||[]).reduce(function(t,e){return e(a,t)},r)),i.concat(r)},new s.default):new s.default}(this.container,r,l);return T(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new s.default).retain(c.length()-1).delete(1))),w.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 s.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 s.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),r=a[0],s=a[1];switch(r){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(r),function(t){t[x]=t[x]||[],t[x].push(s)})}}),[e,n]}}]),e}();function C(t,e,n){return"object"===(void 0===e?"undefined":o(e))?Object.keys(e).reduce(function(t,n){return C(t,n,e[n])},t):t.reduce(function(t,o){return o.attributes&&o.attributes[e]?t.push(o):t.insert(o.insert,(0,r.default)({},_({},e,n),o.attributes))},new s.default)}function A(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function T(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 S(t){if(0===t.childNodes.length)return!1;var e=A(t);return["block","list-item"].indexOf(e.display)>-1}function N(t,e,n){return C(n,t,!0)}function $(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=P[e])||n.attrName!==e&&n.keyName!==e||(a[n.attrName]=n.value(t)||void 0),null==(n=O[e])||n.attrName!==e&&n.keyName!==e||(n=O[e],a[n.attrName]=n.value(t)||void 0))}),Object.keys(a).length>0&&(e=C(e,a)),e}function L(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 s.default).insert(o,n.formats(t)))}else"function"==typeof n.formats&&(e=C(e,n.blotName,n.formats(t)));return e}function j(t,e){return T(e,"\n")||(S(t)||e.length()>0&&t.nextSibling&&S(t.nextSibling))&&e.insert("\n"),e}function I(t,e){if(S(t)&&null!=t.nextElementSibling&&!T(e,"\n\n")){var n=t.offsetHeight+parseFloat(A(t).marginTop)+parseFloat(A(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(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(!A(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&&S(t.parentNode)||null!=t.previousSibling&&S(t.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==t.nextSibling&&S(t.parentNode)||null!=t.nextSibling&&S(t.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return e.insert(n)}E.DEFAULTS={matchers:[],matchVisual:!0},e.default=E,e.matchAttributor=$,e.matchBlot=L,e.matchNewline=j,e.matchSpacing=I,e.matchText=R},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 r=i.get;return void 0!==r?r.call(o):void 0},r=n(6),s=(o=r)&&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,s.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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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)),r=u(n(0)),s=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 r=document.createElement("div");m(r,a.options.container),t.container.parentNode.insertBefore(r,t.container),a.container=r}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(s.default.events.EDITOR_CHANGE,function(t,e){t===s.default.events.SELECTION_CHANGE&&a.update(e)}),a.quill.on(s.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==r.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(r.default.query(n).prototype instanceof r.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)),s.default.sources.USER)}else e.quill.format(n,l,s.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],r=i[1];if("SELECT"===r.tagName){var s=void 0;if(null==t)s=null;else if(null==e[a])s=r.querySelector("option[selected]");else if(!Array.isArray(e[a])){var l=e[a];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),s=r.querySelector('option[value="'+l+'"]')}null==s?(r.value="",r.selectedIndex=-1):s.selected=!0}else if(null==t)r.classList.remove("ql-active");else if(r.hasAttribute("value")){var c=e[a]===r.getAttribute("value")||null!=e[a]&&e[a].toString()===r.getAttribute("value")||null==e[a]&&!r.getAttribute("value");r.classList.toggle("ql-active",c)}else r.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!=r.default.query(e,r.default.Scope.INLINE)&&t.quill.format(e,!1)})}else this.quill.removeFormat(e,s.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",s.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",t,s.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,s.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,s.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,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",t,s.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 r=i.get;return void 0!==r?r.call(o):void 0},r=n(28),s=(o=r)&&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,s.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),r=(o=a)&&o.__esModule?o:{default:o};var 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));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,r.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 r=i.get;return void 0!==r?r.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=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){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 r=i.bottom-i.top,s=t.bottom-t.top+r;this.root.style.top=n-s+"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 r,s=t[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(t){i=!0,a=t}finally{try{!o&&s.return&&s.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 r=i.get;return void 0!==r?r.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}}(),r=f(n(3)),s=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"]],y=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 b(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}();y.DEFAULTS=(0,r.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 b=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,s.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()}),this.quill.on(s.default.events.SELECTION_CHANGE,function(e,n,i){if(null!=e){if(0===e.length&&i===s.default.sources.USER){var a=t.quill.scroll.descendant(u.default,e.index),r=o(a,2),l=r[0],c=r[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}();b.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=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=I(n(29)),i=n(36),a=n(38),r=n(64),s=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)),y=I(n(69)),b=I(n(70)),_=I(n(71)),w=I(n(72)),x=I(n(73)),k=n(13),P=I(k),O=I(n(74)),E=I(n(75)),C=I(n(57)),A=I(n(41)),T=I(n(28)),S=I(n(59)),N=I(n(60)),$=I(n(61)),L=I(n(108)),j=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":r.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":f.FontClass,"formats/size":h.SizeClass,"formats/blockquote":s.default,"formats/code-block":P.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":m.default,"formats/code":k.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":x.default,"formats/list/item":c.ListItem,"modules/formula":O.default,"modules/syntax":E.default,"modules/toolbar":C.default,"themes/bubble":L.default,"themes/snow":j.default,"ui/icons":A.default,"ui/picker":T.default,"ui/icon-picker":N.default,"ui/color-picker":S.default,"ui/tooltip":$.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 r=i.get;return void 0!==r?r.call(o):void 0},r=n(0),s=(o=r)&&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,s.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:s.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 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,a.default),e}();r.blotName="blockquote",r.tagName="blockquote",e.default=r},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),r=(o=a)&&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,r.default),i(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}();s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],e.default=s},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 r=i.get;return void 0!==r?r.call(o):void 0},a=l(n(0)),r=l(n(4)),s=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,r.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,s.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 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,a.default),e}();r.blotName="italic",r.tagName=["EM","I"],e.default=r},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),r=(o=a)&&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,r.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 r=i.get;return void 0!==r?r.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}();s.blotName="script",s.tagName=["SUB","SUP"],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 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,a.default),e}();r.blotName="strike",r.tagName="S",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 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,a.default),e}();r.blotName="underline",r.tagName="U",e.default=r},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 r=i.get;return void 0!==r?r.call(o):void 0},r=n(0),s=(o=r)&&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,s.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 r=i.get;return void 0!==r?r.call(o):void 0},r=n(4),s=n(27),l=(o=s)&&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,r.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=s(n(35)),a=s(n(5)),r=s(n(9));function s(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 r=i.get;return void 0!==r?r.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,r.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)),r=l(n(9)),s=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,s.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 r=i.get;return void 0!==r?r.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,r.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 r=i.get;return void 0!==r?r.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)),r=d(n(8)),s=n(43),l=d(s),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(r.default.events.EDITOR_CHANGE,function(t,e,n,i){if(t===r.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&i===r.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 s=a[a.length-1],l=o.quill.getIndex(s),u=Math.min(s.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,s.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(r.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(798).Buffer)},798:function(t,e,n){"use strict";(function(t){var o=n(799),i=n(800),a=n(801);function r(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(r()<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=s(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=s(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?s(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=s(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=s(t,n);for(var o=0;o<n;o+=1)t[o]=255&e[o];return t}function f(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().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 B(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 B(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,r=1,s=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;r=2,s/=2,l/=2,n/=2}function c(t,e){return 1===r?t[e]:t.readUInt16BE(e*r)}if(i){var u=-1;for(a=n;a<s;a++)if(c(t,a)===c(e,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*r}else-1!==u&&(a-=a-u),u=-1}else for(n+l>s&&(n=s-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 y(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 r=0;r<o;++r){var s=parseInt(e.substr(2*r,2),16);if(isNaN(s))return r;t[n+r]=s}return r}function b(t,e,n,o){return U(B(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 w(t,e,n,o){return _(t,e,n,o)}function x(t,e,n,o){return U(F(e),t,n,o)}function k(t,e,n,o){return U(function(t,e){for(var n,o,i,a=[],r=0;r<t.length&&!((e-=2)<0);++r)n=t.charCodeAt(r),o=n>>8,i=n%256,a.push(i),a.push(o);return a}(e,t.length-n),t,n,o)}function P(t,e,n){return 0===e&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function O(t,e,n){n=Math.min(t.length,n);for(var o=[],i=e;i<n;){var a,r,s,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],r=t[i+2],128==(192&a)&&128==(192&r)&&(l=(15&c)<<12|(63&a)<<6|63&r)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],r=t[i+2],s=t[i+3],128==(192&a)&&128==(192&r)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&r)<<6|63&s)>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<=E)return String.fromCharCode.apply(String,t);var n="",o=0;for(;o<e;)n+=String.fromCharCode.apply(String,t.slice(o,o+=E));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=r(),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?s(t,e):void 0!==n?"string"==typeof o?s(t,e).fill(n,o):s(t,e).fill(n):s(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 r=t[n];if(!l.isBuffer(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(o,i),i+=r.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?O(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 T(this,e,n);case"utf8":case"utf-8":return O(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return P(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(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,r=n-e,s=Math.min(a,r),c=this.slice(o,i),u=t.slice(e,n),d=0;d<s;++d)if(c[d]!==u[d]){a=c[d],r=u[d];break}return a<r?-1:r<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 y(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(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 E=4096;function C(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 A(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 T(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+=D(t[a]);return i}function S(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 N(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 $(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 L(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 j(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 R(t,e,n,o,a){return a||I(t,0,n,4),i.write(t,e,n,o,23,4),n+4}function q(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||N(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||N(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||N(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||N(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||N(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||N(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||N(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||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||N(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||N(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||N(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||N(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||N(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||N(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)||$(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)||$(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||$(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||$(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||$(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):j(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||$(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):j(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);$(this,t,e,n,i-1,-i)}var a=0,r=1,s=0;for(this[e]=255&t;++a<n&&(r*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/r>>0)-s&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);$(this,t,e,n,i-1,-i)}var a=n-1,r=1,s=0;for(this[e+a]=255&t;--a>=0&&(r*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/r>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||$(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||$(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||$(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||$(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):j(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||$(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):j(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return R(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return q(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 r=l.isBuffer(t)?t:B(new l(t,o).toString()),s=r.length;for(a=0;a<n-e;++a)this[a+e]=r[a%s]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){var n;e=e||1/0;for(var o=t.length,i=null,a=[],r=0;r<o;++r){if((n=t.charCodeAt(r))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(r+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(39))},799: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],r=n[1],s=new a(function(t,e,n){return 3*(e+n)/4-n}(0,o,r)),l=0,u=r>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)],s[l++]=e>>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===r&&(e=i[t.charCodeAt(d)]<<2|i[t.charCodeAt(d+1)]>>4,s[l++]=255&e);1===r&&(e=i[t.charCodeAt(d)]<<10|i[t.charCodeAt(d+1)]<<4|i[t.charCodeAt(d+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],r=0,s=n-i;r<s;r+=16383)a.push(u(t,r,r+16383>s?s:r+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,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=r.length;s<l;++s)o[s]=r[s],i[r.charCodeAt(s)]=s;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,r=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),r.push(o[(a=i)>>18&63]+o[a>>12&63]+o[a>>6&63]+o[63&a]);return r.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},800:function(t,e){e.read=function(t,e,n,o,i){var a,r,s=8*i-o-1,l=(1<<s)-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+=s;u>0;a=256*a+t[e+d],d+=p,u-=8);for(r=a&(1<<-u)-1,a>>=-u,u+=o;u>0;r=256*r+t[e+d],d+=p,u-=8);if(0===a)a=1-c;else{if(a===l)return r?NaN:1/0*(f?-1:1);r+=Math.pow(2,o),a-=c}return(f?-1:1)*r*Math.pow(2,a-o)},e.write=function(t,e,n,o,i,a){var r,s,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?(s=isNaN(e)?1:0,r=u):(r=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-r))<1&&(r--,l*=2),(e+=r+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(r++,l/=2),r+d>=u?(s=0,r=u):r+d>=1?(s=(e*l-1)*Math.pow(2,i),r+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,i),r=0));i>=8;t[n+f]=255&s,f+=h,s/=256,i-=8);for(r=r<<i|s,c+=i;c>0;t[n+f]=255&r,f+=h,r/=256,c-=8);t[n+f-h]|=128*m}},801:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},802: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:12}},[t._v("\n "+t._s(t.label+":")+"\n "),t.hasQuill?n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.content_mode_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})]):t._e()],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"am-service-translate am-event-translate",staticStyle:{cursor:"pointer"},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),t._v(" "),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):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.hasQuill?n("el-tooltip",{attrs:{placement:"top"}},[n("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.content_mode_tooltip)},slot:"content"}),t._v(" "),n("i",{staticClass:"el-icon-question am-tooltip-icon"})]):t._e()],1),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(" "),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:[]}},803:function(t,e,n){var o=n(335)(n(984),n(985),!1,null,null,null);t.exports=o.exports},865:function(t,e,n){"use strict";e.a={data:function(){return{}},methods:{sendAmeliaSmsApiRequest:function(t,e,n){this.$http.post(this.$root.getAjaxUrl+"/notifications/sms",{action:t,data:void 0!==this[t]?this[t]:[]}).then(function(t){"OK"===t.data.data.status?e(t.data.data):n(t.data.data)}).catch(function(t){console.log(t)})},getFormattedMessagePrice:function(t){return[1,3].includes(this.$root.settings.payments.priceSeparator)?Math.round(1e5*t)/1e5:(Math.round(1e5*t)/1e5).toString().replace(".",",")},createNew:function(t,e){this.createNewContent=!0,this.notificationName=null,this.amountTime=1,this.intervalTime="hours",this.notificationType="triggered",this.notificationTrigger="approved",this.notificationTimed="before",this.onTime="00:00",this.notificationEnabled=!0,this.selectedServices=[],this.selectedEvents=[],this.showActiveClass=!1,this.notificationEntity=t,this.sendOnlyMe=!1,this.entity=t;var n="";"email"===this.type?n=e?this.$root.labels.default_content_customer:this.$root.labels.default_content_employee:"sms"===this.type&&(n=e?this.$root.labels.default_content_customer_sms:this.$root.labels.default_content_employee_sms);var o="whatsapp"!==this.type?"event"===t?"%event_name%":"%service_name%":"";this.notification={id:-1,entity:this.entity,sendTo:e?"customer":"provider",type:this.type,content:n,subject:o,whatsAppTemplate:""},"whatsapp"===this.type&&this.updatePlaceholders(),this.selectedLanguage=null,this.focusOnName()},setCustomNotificationFields:function(){var t=this;if(this.notificationName=this.notification.customName,this.notificationEnabled="enabled"===this.notification.status,this.notificationType=this.notification.name.includes("_scheduled")?"scheduled":"triggered",this.notificationTrigger="triggered"===this.notificationType?this.notification.name.split("_")[2]:"approved",this.notificationTimed=this.notification.timeBefore?"before":this.notification.timeAfter?"after":this.notification.time?"sameDay":"before",this.onTime=this.notification.time,null===this.onTime&&(this.onTime="00:00"),this.intervalTime="scheduled"===this.notificationType?this.notification.name.split("_")[3]:"hours",this.amountTime=this.fromSeconds("before"===this.notificationTimed?this.notification.timeBefore:"after"===this.notificationTimed?this.notification.timeAfter:0),0===this.amountTime&&(this.amountTime=1),this.notificationEntity=this.notification.entity,this.sendOnlyMe=this.notification.sendOnlyMe,this.selectedServices="appointment"===this.notificationEntity?this.notification.entityIds:[],this.selectedEvents="event"===this.notificationEntity?this.notification.entityIds:[],this.selectedEvents&&this.selectedEvents.forEach(function(e,n){if(!t.events.find(function(t){return t.id===e})){var o=t.events.find(function(t){return t.parentId===e});t.selectedEvents[n]=o?o.id:t.$root.labels.past_event}}),this.selectedLanguage&&this.notification.translations){var e=JSON.parse(this.notification.translations);e.subject&&e.subject[this.selectedLanguage]&&(this.notificationSubject=e.subject[this.selectedLanguage]),e.content&&e.content[this.selectedLanguage]&&(this.notificationContent=e.content[this.selectedLanguage])}else this.notificationSubject=this.notification.subject,this.notificationContent=this.notification.content},getSeconds:function(){switch(this.intervalTime){case"minutes":return 60*this.amountTime;case"hours":return 3600*this.amountTime;case"days":return 86400*this.amountTime;case"weeks":return 604800*this.amountTime;case"months":return 2629746*this.amountTime}},fromSeconds:function(t){switch(this.intervalTime){case"minutes":return Math.round(t/60);case"hours":return Math.round(t/3600);case"days":return Math.round(t/86400);case"weeks":return Math.round(t/604800);case"months":return Math.round(t/2629746)}},getNotificationEntity:function(){var t="scheduled"===this.notificationType?"scheduled":this.notificationTrigger,e=this.getSeconds(),n="scheduled"===this.notificationType&&"sameDay"!==this.notificationTimed?"_"+this.intervalTime:"";return"whatsapp"===this.type&&(this.notification.subject=this.whatsAppPlaceholders.header.map(function(t){return t.value}).join(" "),this.notification.content=this.whatsAppPlaceholders.body.map(function(t){return t.value}).join(" ")),{name:this.notification.sendTo+"_"+this.notificationEntity+"_"+t+n,customName:this.notificationName,sendOnlyMe:this.sendOnlyMe,status:this.notificationEnabled?"enabled":"disabled",type:this.notification.type,time:"scheduled"===this.notificationType&&"sameDay"===this.notificationTimed?this.onTime:null,timeBefore:"scheduled"===this.notificationType&&"before"===this.notificationTimed?e:null,timeAfter:"scheduled"===this.notificationType&&"after"===this.notificationTimed?e:null,entityIds:"appointment"===this.notificationEntity?this.selectedServices:this.selectedEvents,sendTo:this.notification.sendTo,entity:this.notificationEntity,translations:this.notification.translations,subject:this.notification.subject,content:this.notification.content,whatsAppTemplate:this.notification.whatsAppTemplate}},focusOnName:function(){var t=this;this.$nextTick(function(){if(t.$refs.notificationName)t.$refs.notificationName.focus();else if(t.$refs.notificationContent){if(t.$refs.notificationContent.quill)t.$refs.notificationContent.quill.focus();else t.$refs.notificationContent.focus()}})}}}},948:function(t,e,n){var o=n(335)(n(949),n(950),!1,null,null,null);t.exports=o.exports},949:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ElButton",inject:{elForm:{default:""},elFormItem:{default:""}},props:{type:{type:String,default:"default"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},buttonSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},buttonDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},methods:{handleClick:function(t){this.$emit("click",t)}}}},950:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"el-button",class:[t.type?"el-button--"+t.type:"",t.buttonSize?"el-button--"+t.buttonSize:"",{"is-disabled":t.buttonDisabled,"is-loading":t.loading,"is-plain":t.plain,"is-round":t.round,"is-circle":t.circle}],attrs:{disabled:t.buttonDisabled||t.loading,autofocus:t.autofocus,type:t.nativeType},on:{click:t.handleClick}},[t.loading?n("i",{staticClass:"el-icon-loading"}):t._e(),t._v(" "),t.icon&&!t.loading?n("i",{class:t.icon}):t._e(),t._v(" "),t.$slots.default?n("span",[t._t("default")],2):t._e()])},staticRenderFns:[]}},981:function(t,e,n){var o=n(335)(n(1078),n(1086),!1,null,null,null);t.exports=o.exports},982:function(t,e,n){var o=n(335)(n(983),n(986),!1,null,null,null);t.exports=o.exports},983:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(747),i=n(700),a=n(780),r=n(699),s=n(803),l=n.n(s),c=n(771),u=(n.n(c),n(772)),d=n.n(u);e.default={mixins:[o.a,a.a,r.a,i.a],props:{selectedLanguage:null,selectedLanguageHtml:null,languagesData:{default:function(){},type:Object},excludedPlaceholders:{default:function(){return[]}},placeholdersNames:{default:function(){return[]}},categories:{default:function(){return[]}},coupons:{default:function(){return[]}},entity:{default:"appointment",type:String},type:{default:"email",type:String},customFields:{default:[]},appointmentsSettings:null,userTypeTab:null,name:null,nameHtml:null},data:function(){return{loadingButton:!1}},mounted:function(){this.removePlaceholder("appointmentPlaceholders","%recurring_appointments_details%"),this.removePlaceholder("appointmentPlaceholders","%package_appointments_details%"),this.removePlaceholder("appointmentPlaceholders","%group_appointment_details%"),this.removePlaceholder("appointmentPlaceholders","%group_event_details%"),this.appointmentsSettings[this.name+"Html"]=this.appointmentsSettings[this.name],this.selectedLanguage&&(this.appointmentsSettings.translations[this.name+"Html"]=this.appointmentsSettings.translations[this.name])},methods:{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"},saveSettings:function(){var t=this;delete this.appointmentsSettings[this.name+"Html"],this.selectedLanguage&&delete this.appointmentsSettings.translations[this.name+"Html"],this.loadingButton=!0;var e=this.name+("sms"===this.type?"Sms":"");this.selectedLanguage&&Object.keys(this.appointmentsSettings.translations[e]).forEach(function(n){t.appointmentsSettings.translations[e][n].trim||delete t.appointmentsSettings.translations[e][n]}),this.$http.post(this.$root.getAjaxUrl+"/settings",{appointments:this.appointmentsSettings}).then(function(e){t.loadingButton=!1,t.$root.settings.appointments=e.data.data.settings.appointments,t.$emit("closeDialogCombinedPlaceholder",e.data.data.settings.appointments),t.notify(t.$root.labels.success,t.$root.labels.settings_saved,"success")}).catch(function(e){t.loadingButton=!1,t.notify(t.$root.labels.error,e.message,"error")})},closeDialog:function(){this.$emit("closeDialogCombinedPlaceholder")}},computed:{},components:{quillEditor:c.quillEditor,ContentBlock:d.a,InlinePlaceholders:l.a}}},984:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(747),i=n(699);e.default={mixins:[o.a,i.a],props:{placeholdersNames:{default:function(){return[]}},excludedPlaceholders:{default:function(){return[]}},categories:{default:function(){return[]}},coupons:{default:function(){return[]}},customFields:{default:function(){return[]}},userTypeTab:null,noHtml:!1},data:function(){return{}},mounted:function(){this.setPlaceholders(this.excludedPlaceholders)},methods:{},computed:{},watch:{excludedPlaceholders:function(){this.setPlaceholders(this.excludedPlaceholders)}}}},985:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-row",{staticClass:"am-notifications-placeholders"},[n("el-col",{attrs:{sm:24}},[n("div",{staticClass:"am-placeholder-wrapper"},t._l(t.placeholdersNames,function(e,o){return e in t.groupedPlaceholders&&t.groupedPlaceholders[e].length?n("el-dropdown",{key:o,staticClass:"am-placeholder-wrapper__dropdown"},[n("el-button",{staticClass:"am-placeholder-wrapper__button",attrs:{size:"small"}},[t._v("\n "+t._s(t.$root.labels[e])),n("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),n("el-dropdown-menu",{class:{"amelia-dropdown":t.groupedPlaceholders[e].length>20},attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.groupedPlaceholders[e],function(o,i){return e in t.excludedPlaceholders&&-1!==t.excludedPlaceholders[e].indexOf(o.value)?t._e():n("el-dropdown-item",{key:i,attrs:{disabled:t.isDisabledInLite(o.value)}},[n("el-tooltip",{key:o.code,attrs:{effect:"dark",content:o.label,placement:"left"}},[n("p",{on:{click:function(e){t.copyCodeText("parse"in o&&!t.noHtml?t.getParsedCodeLabel(o):o.value)}}},[t._v("\n "+t._s(o.value)+"\n ")])])],1)}),1)],1):t._e()}),1)])],1)],1)},staticRenderFns:[]}},986: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.configure_placeholder))])]),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(" "),"customer"===t.userTypeTab&&t.selectedLanguage?n("div",{staticClass:"align-right"},[n("img",{staticClass:"option-languages-flag",attrs:{src:t.getLanguageFlag(t.selectedLanguage)}})]):t._e(),t._v(" "),"package"===t.entity?n("div",[n("p",[n("strong",[t._v(t._s(t.$root.labels.ph_package_details_setup))])])]):t._e(),t._v(" "),"appointment"===t.entity?n("div",[n("p",[n("strong",[t._v(t._s(t.$root.labels.ph_recurring_details_setup))])])]):t._e(),t._v(" "),"group"===t.entity?n("div",["groupAppointmentPlaceholder"===t.name?n("p",[n("strong",[t._v(t._s(t.$root.labels.ph_group_appointment_setup))])]):t._e(),t._v(" "),"groupEventPlaceholder"===t.name?n("p",[n("strong",[t._v(t._s(t.$root.labels.ph_group_event_setup))])]):t._e()]):t._e(),t._v(" "),t.selectedLanguage?n("div",["email"===t.type?n("content-block",{attrs:{label:t.$root.labels.message_colon.replace(":",""),entity:t.appointmentsSettings.translations[t.name],textProperty:t.selectedLanguage,htmlProperty:t.selectedLanguage+"Html",hasTranslation:!1,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{changeQuillContent:t.parseQuillEditorContent}}):t._e(),t._v(" "),"sms"===t.type||"whatsapp"===t.type?n("el-input",{attrs:{type:"textarea",rows:7,placeholder:""},model:{value:t.appointmentsSettings.translations[t.name+"Sms"][t.selectedLanguage],callback:function(e){t.$set(t.appointmentsSettings.translations[t.name+"Sms"],t.selectedLanguage,e)},expression:"appointmentsSettings['translations'][name + 'Sms'][selectedLanguage]"}}):t._e()],1):n("div",["email"===t.type?n("content-block",{attrs:{label:t.$root.labels.message_colon.replace(":",""),entity:t.appointmentsSettings,textProperty:t.name,htmlProperty:t.nameHtml,hasTranslation:!1,hasQuill:!0,textModeProp:!0,allowImage:!1},on:{changeQuillContent:t.parseQuillEditorContent}}):t._e(),t._v(" "),"sms"===t.type||"whatsapp"===t.type?n("el-input",{attrs:{type:"textarea",rows:7,placeholder:""},model:{value:t.appointmentsSettings[t.name+"Sms"],callback:function(e){t.$set(t.appointmentsSettings,t.name+"Sms",e)},expression:"appointmentsSettings[name + 'Sms']"}}):t._e()],1),t._v(" "),n("inline-placeholders",{attrs:{placeholdersNames:t.placeholdersNames,excludedPlaceholders:t.excludedPlaceholders,categories:t.categories,customFields:t.customFields,userTypeTab:t.userTypeTab}}),t._v(" "),"package"===t.entity?n("div",[n("p",[t._v(t._s(t.$root.labels.use_placeholder)+" %package_appointments_details%")])]):t._e(),t._v(" "),"appointment"===t.entity?n("div",[n("p",[t._v(t._s(t.$root.labels.use_placeholder)+" %recurring_appointments_details%")]),t._v(" "),n("el-alert",{attrs:{type:"warning","show-icon":"",title:"",description:t.$root.labels.recurring_ph_warning,closable:!1}})],1):t._e(),t._v(" "),"group"===t.entity?n("div",["groupAppointmentPlaceholder"===t.name?n("p",[t._v(t._s(t.$root.labels.use_placeholder)+" %group_appointment_details%")]):t._e(),t._v(" "),"groupEventPlaceholder"===t.name?n("p",[t._v(t._s(t.$root.labels.use_placeholder)+" %group_event_details%")]):t._e()]):t._e(),t._v(" "),"whatsapp"===t.type?n("el-alert",{staticStyle:{"margin-top":"20px"},attrs:{type:"info","show-icon":"",title:"",description:t.$root.labels.whatsapp_notice_ph,closable:!1}}):t._e()],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:{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",loading:t.loadingButton},on:{click:t.saveSettings}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},998:function(t,e,n){"use strict";e.a={data:function(){return{xSmallMax:479,xSmallMin:481,smallMax:767,smallMin:768,mediumMax:991,mediumMin:992,largeMax:1199,largeMin:1200,xLargeMax:1600,xLargeMin:1601}},computed:{documentWidth:function(){return document.body.clientWidth}}}}});
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings