webpackJsonp([2],{661:function(t,e,n){var o=n(325)(n(840),n(875),!1,null,null,null);t.exports=o.exports},673:function(t,e,n){"use strict";var o=n(680),r=n(331),i=Object.prototype.toString;function a(t){return"[object Array]"===i.call(t)}function s(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===i.call(t)}function c(t,e){if(null!==t&&void 0!==t)if("object"==typeof t||a(t)||(t=[t]),a(t))for(var n=0,o=t.length;n0?e+"d ":"")+(n>0?n+"h ":"")+(o>0?o+"m ":"")}},computed:{momentTimeFormat:function(){var t=this;return"G \\h i \\m\\i\\n"===this.$root.settings.wordpress.timeFormat?"HH:mm":this.$root.settings.wordpress.timeFormat.replace(this.formatEx,function(e){return t.formatPHPtoMomentMap[e]})},momentDateFormat:function(){var t=this;return this.$root.settings.wordpress.dateFormat.replace(this.formatEx,function(e){return t.formatPHPtoMomentMap[e]})},vCalendarFormats:function(){return{input:[this.momentDateFormat,"YYYY-MM-DD","YYYY/MM/DD"]}},timePickerFormat:function(){return"HH:mm"}}}},675: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:{inlineSVG:function(){var t=n(685);t.init({svgSelector:"img.svg",initClass:"js-inlinesvg"})},imageFromText:function(t){var e=this.getNameInitials(t),n=Math.floor(Math.random()*this.colors.length),o=this.colors[n];return this.usedColors.push(this.colors[n]),this.colors.splice(n,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),location.protocol+"//via.placeholder.com/120/"+o+"/fff?text="+e},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))},getNameInitials:function(t){return t.split(" ").map(function(t){return t.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},676:function(t,e,n){"use strict";e.a={methods:{notify:function(t,e,n){var o=this;setTimeout(function(){o.$notify({title:t,message:e,type:n,offset:50})},700)}}}},677:function(t,e,n){"use strict";(function(e){var o=n(673),r=n(697),i={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,l={adapter:("undefined"!=typeof XMLHttpRequest?s=n(681):void 0!==e&&(s=n(681)),s),transformRequest:[function(t,e){return r(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)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)?(a(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(i)}),t.exports=l}).call(e,n(136))},679:function(t,e,n){"use strict";var o=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return e=e.toLowerCase(),this.hasFiles(r)&&(r=(0,a.default)(r),"post"!==e&&(r.append("_method",e.toUpperCase()),e="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(i,a){t.defaults.axios[e](n,r,o.config()).then(function(t){i(t.data)}).catch(function(t){o.handleError(t),a(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:r.default},t.exports=l},680:function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),o=0;on;n++){r(arguments[n])}return t},a=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 r=t.src||t.getAttribute("data-src"),i=t.attributes,a=new XMLHttpRequest;a.open("GET",r,!0),a.onload=function(){if(a.status>=200&&a.status<400){var n=(new DOMParser).parseFromString(a.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(i).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"),i.longdesc){var r=document.createElementNS("http://www.w3.org/2000/svg","desc"),s=document.createTextNode(i.longdesc.value);r.appendChild(s),n.insertBefore(r,n.firstChild)}if(i.alt){n.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(i.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.")},a.onerror=function(){console.error("There was an error connecting to the origin server.")},a.send()})};return n.init=function(t,n){o&&(e=i(r,t||{}),a(n||function(){}),document.documentElement.className+=" "+e.initClass)},n}(a),void 0===(i="function"==typeof o?o.apply(e,r):o)||(t.exports=i)}).call(e,n(39))},686:function(t,e,n){"use strict";e.a={data:function(){return{}},methods:{scrollView:function(t){jQuery(window).width()<=600&&document.getElementById(t).scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},getUrlQueryParams:function(t){var e=[],n={};return(t.indexOf("#")?t.substring(0,t.indexOf("#")).split("?")[1]:t.split("?")[1]).split("&").forEach(function(t){e=t.split("="),n[e[0]]=decodeURIComponent(e[1]).replace(/\+/g," ")}),n},removeURLParameter:function(t,e){var n=t.split("?");if(n.length>=2){for(var o=encodeURIComponent(e)+"=",r=n[1].split(/[&;]/g),i=r.length;i-- >0;)-1!==r[i].lastIndexOf(o,0)&&r.splice(i,1);return t=n[0]+(r.length>0?"?"+r.join("&"):"")}return t},capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}}},687:function(t,e,n){var o,r;o={expires:"1d",path:"; path=/"},r={install:function(t){t.prototype.$cookies=this,t.cookies=this},config:function(t,e){t&&(o.expires=t),e&&(o.path="; path="+e)},get:function(t){var e=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(e&&"{"===e.substring(0,1)&&"}"===e.substring(e.length-1,e.length))try{e=JSON.parse(e)}catch(t){return e}return e},set:function(t,e,n,r,i,a){if(!t)throw new Error("cookie name is not find in first argument");if(/^(?:expires|max\-age|path|domain|secure)$/i.test(t))throw new Error("cookie key name illegality ,Cannot be set to ['expires','max-age','path','domain','secure']\t","current key name: "+t);e&&e.constructor===Object&&(e=JSON.stringify(e));var s="";if((n=void 0===n?o.expires:n)&&0!=n)switch(n.constructor){case Number:s=n===1/0||-1===n?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:if(/^(?:\d{1,}(y|m|d|h|min|s))$/i.test(n)){var l=n.replace(/^(\d{1,})(?:y|m|d|h|min|s)$/i,"$1");switch(n.replace(/^(?:\d{1,})(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":s="; max-age="+2592e3*+l;break;case"d":s="; max-age="+86400*+l;break;case"h":s="; max-age="+3600*+l;break;case"min":s="; max-age="+60*+l;break;case"s":s="; max-age="+l;break;case"y":s="; max-age="+31104e3*+l;break;default:new Error("unknown exception of 'set operation'")}}else s="; expires="+n;break;case Date:s="; expires="+n.toUTCString()}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+s+(i?"; domain="+i:"")+(r?"; path="+r:o.path)+(a?"; secure":""),this},remove:function(t,e,n){return!(!t||!this.isKey(t))&&(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(e?"; path="+e:o.path),this)},isKey:function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),e=0;e1&&void 0!==arguments[1]?arguments[1]:84600,n=[],o=this.getTimeSlotLength();o<=e;o+=this.getTimeSlotLength())n.push(o);return t&&-1===n.indexOf(t)&&(n.push(t),n.sort(function(t,e){return t-e})),n},getTimeSelectOptionsWithLimits:function(t,e){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:t,maxTime:e}},getStringTimeInSeconds:function(t){return r()(t,"HH:mm").diff(r()().startOf("day"),"seconds")}}}},690:function(t,e,n){var o=n(325)(n(691),n(692),!1,null,null,null);t.exports=o.exports},691:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(674);e.default={mixins:[o.a],props:["appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","servicesTotal","categoriesTotal","financeTotal","addNewCouponBtnDisplay","addNewCustomFieldBtnDisplay","locations","categories","params","fetched"],data:function(){return{}},methods:{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")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(t){this.$emit("selectAllInCategory",t)},changeFilter:function(){this.$emit("changeFilter")}},components:{}}},692: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.$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?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.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?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: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-customize"===t.$router.currentRoute.name&&t.addNewCustomFieldBtnDisplay&&!0===t.$root.settings.capabilities.canWrite?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-popover",t._b({ref:"filterEmployeePop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[n("PopLite")],1),t._v(" "),n("el-form-item",{attrs:{label:t.$root.labels.services+":"}},[n("el-select",{directives:[{name:"popover",rawName:"v-popover:filterEmployeePop",arg:"filterEmployeePop"}],attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.all_services,"collapse-tags":"",loading:!t.fetched,disabled:t.$root.isLite},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:{placeholder:t.$root.labels.all_locations,clearable:"",multiple:"","collapse-tags":"",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()],1)],1)],1)},staticRenderFns:[]}},694:function(t,e,n){t.exports=n(695)},695:function(t,e,n){"use strict";var o=n(673),r=n(680),i=n(696),a=n(677);function s(t){var e=new i(t),n=r(i.prototype.request,e);return o.extend(n,i.prototype,e),o.extend(n,e),n}var l=s(a);l.Axios=i,l.create=function(t){return s(o.merge(a,t))},l.Cancel=n(684),l.CancelToken=n(710),l.isCancel=n(683),l.all=function(t){return Promise.all(t)},l.spread=n(711),t.exports=l,t.exports.default=l},696:function(t,e,n){"use strict";var o=n(677),r=n(673),i=n(705),a=n(706),s=n(708),l=n(709);function c(t){this.defaults=t,this.interceptors={request:new i,response:new i}}c.prototype.request=function(t){"string"==typeof t&&(t=r.merge({url:arguments[0]},arguments[1])),(t=r.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=[a,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},r.forEach(["delete","get","head","options"],function(t){c.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}}),r.forEach(["post","put","patch"],function(t){c.prototype[t]=function(e,n,o){return this.request(r.merge(o||{},{method:t,url:e,data:n}))}}),t.exports=c},697:function(t,e,n){"use strict";var o=n(673);t.exports=function(t,e){o.forEach(t,function(n,o){o!==e&&o.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[o])})}},698:function(t,e,n){"use strict";var o=n(682);t.exports=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(o("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},699:function(t,e,n){"use strict";t.exports=function(t,e,n,o,r){return t.config=e,n&&(t.code=n),t.request=o,t.response=r,t}},700:function(t,e,n){"use strict";var o=n(673);function r(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 i;if(n)i=n(e);else if(o.isURLSearchParams(e))i=e.toString();else{var a=[];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)),a.push(r(e)+"="+r(t))}))}),i=a.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},701:function(t,e,n){"use strict";var o=n(673);t.exports=function(t){var e,n,r,i={};return t?(o.forEach(t.split("\n"),function(t){r=t.indexOf(":"),e=o.trim(t.substr(0,r)).toLowerCase(),n=o.trim(t.substr(r+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i}},702:function(t,e,n){"use strict";var o=n(673);t.exports=o.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(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=r(window.location.href),function(e){var n=o.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},703:function(t,e,n){"use strict";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(){this.message="String contains an invalid character"}r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,i=String(t),a="",s=0,l=o;i.charAt(0|s)||(l="=",s%1);a+=l.charAt(63&e>>8-s%1*8)){if((n=i.charCodeAt(s+=.75))>255)throw new r;e=e<<8|n}return a}},704:function(t,e,n){"use strict";var o=n(673);t.exports=o.isStandardBrowserEnv()?{write:function(t,e,n,r,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),o.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),o.isString(r)&&s.push("path="+r),o.isString(i)&&s.push("domain="+i),!0===a&&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(){}}},705:function(t,e,n){"use strict";var o=n(673);function r(){this.handlers=[]}r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){o.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},706:function(t,e,n){"use strict";var o=n(673),r=n(707),i=n(683),a=n(677);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=r(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||a.adapter)(t).then(function(e){return s(t),e.data=r(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(s(t),e&&e.response&&(e.response.data=r(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},707:function(t,e,n){"use strict";var o=n(673);t.exports=function(t,e,n){return o.forEach(n,function(n){t=n(t,e)}),t}},708:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},709:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},710:function(t,e,n){"use strict";var o=n(684);function r(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))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},711:function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},712:function(t,e,n){"use strict";var o,r=function(){function t(t,e){for(var n=0;n0}}]),t}()},713:function(t,e,n){"use strict";function o(t){return void 0===t}function r(t){return Array.isArray(t)}function i(t){return t&&"number"==typeof t.size&&"string"==typeof t.type&&"function"==typeof t.slice}t.exports=function t(e,n,a,s){if(n instanceof FormData&&(s=a,a=n,n=null),(n=n||{}).indices=!o(n.indices)&&n.indices,n.nulls=!!o(n.nulls)||n.nulls,a=a||new FormData,o(e))return a;if(function(t){return null===t}(e))n.nulls&&a.append(s,"");else if(r(e))if(e.length)e.forEach(function(e,o){var r=s+"["+(n.indices?o:"")+"]";t(e,n,a,r)});else{var l=s+"[]";a.append(l,"")}else!function(t){return t instanceof Date}(e)?!function(t){return t===Object(t)}(e)||function(t){return i(t)&&("object"==typeof t.lastModifiedDate||"number"==typeof t.lastModified)&&"string"==typeof t.name}(e)||i(e)?a.append(s,e):Object.keys(e).forEach(function(o){var i=e[o];if(r(i))for(;o.length>2&&o.lastIndexOf("[]")===o.length-2;)o=o.substring(0,o.length-2);t(i,n,a,s?s+"["+o+"]":o)}):a.append(s,e.toISOString());return a}},714:function(t,e,n){var o=n(325)(n(718),n(719),!1,null,null,null);t.exports=o.exports},715: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: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: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:"044 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: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: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:1,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"}]}}}},718:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(715);e.default={mixins:[o.a],template:"#phone-input",props:{savedPhone:{default:"",type:String},disabled:{default:!1,type:Boolean}},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)},changeCountry:function(){""!==this.value&&""!==this.input&&(this.input=""),this.formatPhoneNumber()},formatPhoneNumber:function(){var t=this;if(""!==this.value){var e=this.countries.find(function(e){return e.iso===t.value});this.format=!0===this.disabled?"":e.format}if(""!==this.input){if(this.input.startsWith("+")){var n=parseInt(this.input.slice(1)),o=this.countries.filter(function(t){return t.phonecode===n});if(o.length){var r=null;1===n?r=o.find(function(t){return 229===t.id}):44===n?r=o.find(function(t){return 228===t.id}):7===n&&(r=o.find(function(t){return 176===t.id})),void 0!==r&&null!==r||(r=o[0]),this.value=r.iso}this.phone=this.input}else this.phone=void 0!==e?!0===this.input.startsWith("0")?"+"+e.phonecode+this.input.slice(1).replace(/\D/g,""):"+"+e.phonecode+this.input.replace(/\D/g,""):this.input;this.$emit("phoneFormatted",this.phone)}else this.phone=this.input,this.$emit("phoneFormatted",this.phone)},fillInputWithSavedPhone:function(){for(var t=this,e=null,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:{}}},719: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,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:"",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:[]}},724:function(t,e,n){var o=n(325)(n(726),n(727),!1,null,null,null);t.exports=o.exports},726: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}}}},727: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:[]}},731: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(".",",")}}}},777:function(t,e,n){var o;o=function(t){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.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),r=n.n(o),i=n(6),a=n(5)(r.a,i.a,!1,null,null,null);e.default=a.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 r=o(n(0)),i=o(n(1)),a=window.Quill||r.default,s=function(t,e){e&&(i.default.props.globalOptions.default=function(){return e}),t.component(i.default.name,i.default)},l={Quill:a,quillEditor:i.default,install:s};e.default=l,e.Quill=a,e.quillEditor=i.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 r=o(n(0)),i=o(n(3)),a=window.Quill||r.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

"===r&&(r=""),t._content=r,t.$emit("input",t._content),t.$emit("change",{html:r,text:a,quill:i})}),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,r,i){var a,s=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(a=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),r&&(u._scopeId=r),i?(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(i)},u._ssrRegister=c):o&&(c=o),c){var f=u.functional,d=f?u.render:u.beforeCreate;f?(u._injectStyles=c,u.render=function(t,e){return c.call(e),d(t,e)}):u.beforeCreate=d?[].concat(d,c):[c]}return{esModule:a,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(842))},778:function(t,e,n){var o=n(325)(n(779),n(780),!1,null,null,null);t.exports=o.exports},779: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)}}}},780: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:[]}},790:function(t,e,n){var o=n(325)(n(841),n(850),!1,null,null,null);t.exports=o.exports},791: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}}}},840:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(690),r=n.n(o),i=n(790),a=n.n(i),s=n(851),l=n.n(s),c=n(675),u=n(777),f=(n.n(u),n(676)),d=n(688),h=n(686);e.default={mixins:[c.a,f.a,d.a,h.a],data:function(){return{fetched:!1,notifications:[],notificationTab:"email",options:{entities:{customFields:[]},fetched:!1}}},created:function(){this.setActiveTab(),this.getEntities(),this.inlineSVG()},mounted:function(){this.inlineSVG()},methods:{getEntities:function(){var t=this;this.$http.get(this.$root.getAjaxUrl+"/entities",{params:{types:[]}}).then(function(e){t.options.entities=e.data.data,t.options.fetched=!0,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,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")}},computed:{needHelpPage:function(){return"email"===this.notificationTab?"https://wpamelia.com/notifications/":"https://wpamelia.com/sms-notifications/"}},components:{PageHeader:r.a,CustomizeNotifications:a.a,SmsNotifications:l.a,quillEditor:u.quillEditor}}},841:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(688),r=n(679),i=n.n(r),a=n(777),s=(n.n(a),n(676)),l=n(675),c=n(847),u=n.n(c),f=n(714),d=n.n(f),h=n(731);e.default={mixins:[o.a,s.a,l.a,h.a],props:{categories:{default:function(){return[]},type:Array},customFields:{default:function(){return[]},type:Array},notifications:{default:function(){return[]},type:Array},type:{default:"email",type:String},user:{default:function(){},type:Object}},data:function(){var t=this;return{dialogPlaceholders:!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"]]}},fetchedUpdate:!0,form:new i.a,notification:{},entity:"appointment",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:function(e,n,o){""===n||n.startsWith("+")?o():o(new Error(t.$root.labels.enter_valid_phone_warning))},trigger:"submit"}],notificationTemplate:[{required:!0,message:this.$root.labels.select_email_template_warning,trigger:"submit"}]},testNotification:{recipientEmail:"",recipientPhone:"",notificationTemplate:"customer_appointment_approved",type:null},testNotificationLoading:!1,testNotificationModal:!1,userTypeTab:"customer"}},mounted:function(){this.getNotification(null)},methods:{onChangeUserTypeTab:function(t){var e=this;this.inlineSVG(),this.notification.type!==t.name&&(this.notification=this.notifications.find(function(n){return n.type===e.type&&n.sendTo===t.name}))},getNotification:function(t){var e=this;this.notification=null===t?this.notifications.find(function(t){return t.type===e.type}):this.notifications.find(function(e){return e.id===t}),this.entity=this.notification.entity,this.testNotification.type=this.notification.entity,this.testNotification.notificationTemplate=this.notification.name},updateNotification:function(){var t=this;this.fetchedUpdate=!1,this.form.post(this.$root.getAjaxUrl+"/notifications/"+this.notification.id,this.notification).then(function(){t.fetchedUpdate=!0,t.notify(t.$root.labels.success,t.$root.labels.notification_saved,"success")}).catch(function(){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}).catch(function(){e.fetchedUpdate=!0})},showDialogPlaceholders:function(){this.dialogPlaceholders=!0},openTestNotificationModal:function(){this.testNotificationModal=!0},sendTestNotification:function(){"email"===this.type?this.sendTestEmail():this.sendTestSMS()},sendTestEmail:function(){var t=this;this.$refs.testNotification.validate(function(e){if(!e)return!1;t.testNotificationLoading=!0,t.form.post(t.$root.getAjaxUrl+"/notifications/email/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},clearValidation:function(){void 0!==this.$refs.testNotification&&this.$refs.testNotification.clearValidate()},resetTestNotificationOnInitialState:function(){return{recipientEmail:"",recipientPhone:"",notificationTemplate:this.notification.name,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;return this.notifications.filter(function(n){return"customer"===n.sendTo&&n.type===e.type&&n.entity===t})},employeeNotifications:function(t){var e=this;return this.notifications.filter(function(n){return"provider"===n.sendTo&&n.type===e.type&&n.entity===t})}},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")}},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:{quillEditor:a.quillEditor,DialogPlaceholders:u.a,PhoneInput:d.a}}},842: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 r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.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),r=n(18),i=n(19),a=n(45),s=n(46),l=n(47),c=n(48),u=n(49),f=n(12),d=n(32),h=n(33),p=n(31),m=n(1),v={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:u.default,Attributor:{Attribute:f.default,Class:d.default,Style:h.default,Store:p.default}};e.default=v},function(t,e,n){"use strict";var o,r=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 i=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 r(e,t),e}(Error);e.ParchmentError=i;var a,s={},l={},c={},u={};function f(t,e){var n;if(void 0===e&&(e=a.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&a.LEVEL&a.BLOCK?n=u.block:t&a.LEVEL&a.INLINE&&(n=u.inline);else if(t instanceof HTMLElement){var o=(t.getAttribute("class")||"").split(/\s+/);for(var r in o)if(n=l[o[r]])break;n=n||c[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.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"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new i("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=f,e.register=function t(){for(var e=[],n=0;n1)return e.map(function(e){return t(e)});var o=e[0];if("string"!=typeof o.blotName&&"string"!=typeof o.attrName)throw new i("Invalid definition");if("abstract"===o.blotName)throw new i("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),r=n(11),i=n(3),a=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=i(!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(r(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+a.length(e):e.delete?t-e.delete:t},0)},l.prototype.length=function(){return this.reduce(function(t,e){return t+a.length(e)},0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],o=a.iterator(this.ops),r=0;r0&&(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("")}),i=new l,c=o(n[0],n[1],e),u=a.iterator(this.ops),f=a.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(f.peekLength(),e),i.push(f.next(n));break;case o.DELETE:n=Math.min(e,u.peekLength()),u.next(n),i.delete(n);break;case o.EQUAL:n=Math.min(u.peekLength(),f.peekLength(),e);var s=u.next(n),l=f.next(n);r(s.insert,l.insert)?i.retain(n,a.attributes.diff(s.attributes,l.attributes)):i.push(l).delete(n)}e-=n}}),i.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),o=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),s=a.length(i)-n.peekLength(),c="string"==typeof i.insert?i.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||{},r))return;r+=1,o=new l}}o.length()>0&&t(o,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),o=a.iterator(t.ops),r=new l;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===o.peekType())if("insert"===o.peekType())r.push(o.next());else{var i=Math.min(n.peekLength(),o.peekLength()),s=n.next(i),c=o.next(i);if(s.delete)continue;c.delete?r.push(c):r.retain(i,a.attributes.transform(s.attributes,c.attributes,e))}else r.retain(a.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),o=0;n.hasNext()&&o<=t;){var r=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(o0&&(t1&&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 i=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},i}}]),e}();function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,i.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:y(t.parent,e))}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[c.default,s.default.Embed,u.default],e.bubbleFormats=y,e.BlockEmbed=m,e.default=v},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},r=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,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n1&&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 g.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=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 d.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,r=o&&0===o.length?o.index:void 0;w.call(n,function(){return n.editor.update(null,e,r)},t)});var i=this.clipboard.convert("
"+r+"


");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.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]&&g.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 r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach(function(o){n.register(o,t[o],e)})}else null==this.imports[t]||o||g.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()}}]),i(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,i=O(t,e,n),a=r(i,4);return t=a[0],e=a[1],n=a[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),r=new a.default;if(null==o)return r;if(u.default.query(t,u.default.Scope.BLOCK))r=n.editor.formatLine(o.index,o.length,y({},t,e));else{if(0===o.length)return n.selection.format(t,e),r;r=n.editor.formatText(o.index,o.length,y({},t,e))}return n.setSelection(o,l.default.sources.SILENT),r},o)}},{key:"formatLine",value:function(t,e,n,o,i){var a,s=this,l=O(t,e,n,o,i),c=r(l,4);return t=c[0],e=c[1],a=c[2],i=c[3],w.call(this,function(){return s.editor.formatLine(t,e,a)},i,t,0)}},{key:"formatText",value:function(t,e,n,o,i){var a,s=this,l=O(t,e,n,o,i),c=r(l,4);return t=c[0],e=c[1],a=c[2],i=c[3],w.call(this,function(){return s.editor.formatText(t,e,a)},i,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=O(t,e),o=r(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=O(t,e),o=r(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 r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,function(){return r.editor.insertEmbed(e,n,o)},i,e)}},{key:"insertText",value:function(t,e,n,o,i){var a,s=this,l=O(t,0,n,o,i),c=r(l,4);return t=c[0],a=c[2],i=c[3],w.call(this,function(){return s.editor.insertText(t,e,a)},i,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,i=O(t,e,n),a=r(i,4);return t=a[0],e=a[1],n=a[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 a.default(t);var n=e.getLength(),o=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),i=r.ops[r.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),o.compose(r)},n)}},{key:"setSelection",value:function(e,n,o){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=O(e,n,o),a=r(i,4);e=a[0],n=a[1],o=a[3],this.selection.setRange(new f.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 a.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 a.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();function _(t,e){if((e=(0,h.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,h.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?g.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,h.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 a.default;var r=null==n?null:this.getSelection(),i=this.editor.delta,s=t();if(null!=r&&(!0===n&&(n=r.index),null==o?r=x(r,s,e):0!==o&&(r=x(r,n,o,e)),this.setSelection(r,l.default.sources.SILENT)),s.length()>0){var c,u,f=[l.default.events.TEXT_CHANGE,s,i,e];if((c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(f)),e!==l.default.sources.SILENT)(u=this.emitter).emit.apply(u,f)}return s}function O(t,e,n,r,i){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":o(n))?(a=n,i=r):"string"==typeof n&&(null!=r?a[n]=r:i=n),[t,e,a,i=i||l.default.sources.API]}function x(t,e,n,o){if(null==t)return null;var i=void 0,s=void 0;if(e instanceof a.default){var c=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,o!==l.default.sources.USER)}),u=r(c,2);i=u[0],s=u[1]}else{var d=[t.index,t.index+t.length].map(function(t){return t=0?t+n:Math.max(e,t+n)}),h=r(d,2);i=h[0],s=h[1]}return new f.Range(i,s-i)}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:a.default,parchment:u.default,"core/module":c.default,"core/theme":m.default},e.expandConfig=_,e.overload=O,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;n0){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),r=e.order.indexOf(n);return o>=0||r>=0?o-r:t===n?0:t1?e-1:0),o=1;o1&&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"],r="warn";function i(t){if(o.indexOf(t)<=o.indexOf(r)){for(var e,n=arguments.length,i=Array(n>1?n-1:0),a=1;a=0;c--)if(f[c]!=d[c])return!1;for(c=f.length-1;c>=0;c--)if(u=f[c],!a(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),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|r: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=r},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,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,l=i-a+1,c=this.isolate(a,l),u=c.next;c.format(o,r),u instanceof e&&u.formatAt(0,t-a+n-l,o,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(u.default,t),i=o(r,2),a=i[0],s=i[1];a.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")),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&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){i(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=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}();v.blotName="code-block",v.tagName="PRE",v.TAB=" ",e.Code=m,e.default=v},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},r=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,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}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=i&&!h.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,h);var p=e.scroll.line(t),m=r(p,2),y=m[0],g=m[1],b=(0,v.default)({},(0,f.bubbleFormats)(y));if(y instanceof d.default){var _=y.descendant(l.default.Leaf,g),w=r(_,1)[0];b=(0,v.default)(b,(0,f.bubbleFormats)(w))}u=s.default.attributes.diff(b,u)||{}}else if("object"===o(a.insert)){var O=Object.keys(a.insert)[0];if(null==O)return t;e.scroll.insertAt(t,O,a.insert[O])}i+=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 a.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(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var i=n.scroll.lines(t,Math.max(e,1)),a=e;i.forEach(function(e){var i=e.length();if(e instanceof c.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,r,o[r])}else e.format(r,o[r]);a-=i})}}),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.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(r){n.scroll.formatAt(t,e,r,o[r])}),this.update((new a.default).retain(t).retain(e,(0,p.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 a.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=r(t,1)[0];e instanceof d.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 i=[n,o].map(function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,f.bubbleFormats)(n),e)}return e});return v.default.apply(v.default,i)}},{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 a.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(r){n.scroll.formatAt(t,e.length,r,o[r])}),this.update((new a.default).retain(t).insert(e,(0,p.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===d.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof h.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),o=this.scroll.line(t+e),i=r(o,2),s=i[0],l=i[1],u=0,f=new a.default;null!=s&&(u=s instanceof c.default?s.newlineIndex(l)-l+1:s.length()-l,f=s.delta().slice(l,l+u-1).insert("\n"));var d=this.getContents(t,e+u).diff((new a.default).insert(n).concat(f)),h=(new a.default).retain(t).concat(d);return this.applyDelta(h)}},{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(g)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),i=(0,f.bubbleFormats)(r),s=r.offset(this.scroll),c=e[0].oldValue.replace(u.default.CONTENTS,""),d=(new a.default).insert(c),h=(new a.default).insert(r.value());t=(new a.default).retain(s).concat(d.diff(h,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)},new a.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,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var o=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new h(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,r=n.startNode,i=n.startOffset,a=n.endNode,s=n.endOffset;o.setNativeRange(r,i,a,s)}}),this.update(l.default.sources.SILENT)}return r(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&&!i.default.query(t,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=i.default.find(n.start.node,!1);if(null==o)return;if(o instanceof i.default.Leaf){var r=o.split(n.start.offset);o.parent.insertBefore(this.cursor,r)}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 r=void 0,i=this.scroll.leaf(t),a=o(i,2),s=a[0],l=a[1];if(null==s)return null;var c=s.position(l,!0),u=o(c,2);r=u[0],l=u[1];var f=document.createRange();if(e>0){f.setStart(r,l);var d=this.scroll.leaf(t+e),h=o(d,2);if(s=h[0],l=h[1],null==s)return null;var p=s.position(l,!0),m=o(p,2);return r=m[0],l=m[1],f.setEnd(r,l),f.getBoundingClientRect()}var v="left",y=void 0;return r instanceof Text?(l0&&(v="right")),{bottom:y.top+y.height,height:y.height,left:y[v],right:y[v],top:y.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 d.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 r=n.map(function(t){var n=o(t,2),r=n[0],a=n[1],s=i.default.find(r,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof i.default.Container?l+s.length():l+s.index(r,a)}),a=Math.min(Math.max.apply(Math,u(r)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(u(r)));return new h(s,a-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],r=[],i=this.scroll.length();return n.forEach(function(t,n){t=Math.min(i-1,t);var a,s=e.scroll.leaf(t),l=o(s,2),c=l[0],u=l[1],f=c.position(u,0!==n),d=o(f,2);a=d[0],u=d[1],r.push(a,u)}),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,r)),a=o(i,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));s=o(l,1)[0]}if(null!=a&&null!=s){var c=t.getBoundingClientRect();n.topc.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,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",t,e,n,o),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||o!==a.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),i.removeAllRanges(),i.addRange(s)}}else i.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),d.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(),r=o(n,2),i=r[0],c=r[1];if(this.lastRange=i,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 f,d=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];if((u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT)(f=this.emitter).emit.apply(f,d)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,r=function(){function t(t,e){for(var n=0;n0&&(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=a.Scope.INLINE_BLOT,e}(i.default);e.default=s},function(t,e,n){var o=n(11),r=n(3),i={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var o=r(!0,{},e);for(var i in n||(o=Object.keys(o).reduce(function(t,e){return null!=o[e]&&(t[e]=o[e]),t},{})),t)void 0!==t[i]&&void 0===e[i]&&(o[i]=t[i]);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,r){return o(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),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 a(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 a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,o=i.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 r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},a.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=i},function(t,n){var o=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,o,r;try{n=Map}catch(t){n=function(){}}try{o=Set}catch(t){o=function(){}}try{r=Promise}catch(t){r=function(){}}function i(a,l,c,u,f){"object"==typeof l&&(c=l.depth,u=l.prototype,f=l.includeNonEnumerable,l=l.circular);var d=[],h=[],p=void 0!==e;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function a(c,m){if(null===c)return null;if(0===m)return c;var v,y;if("object"!=typeof c)return c;if(t(c,n))v=new n;else if(t(c,o))v=new o;else if(t(c,r))v=new r(function(t,e){c.then(function(e){t(a(e,m-1))},function(t){e(a(t,m-1))})});else if(i.__isArray(c))v=[];else if(i.__isRegExp(c))v=new RegExp(c.source,s(c)),c.lastIndex&&(v.lastIndex=c.lastIndex);else if(i.__isDate(c))v=new Date(c.getTime());else{if(p&&e.isBuffer(c))return v=new e(c.length),c.copy(v),v;t(c,Error)?v=Object.create(c):void 0===u?(y=Object.getPrototypeOf(c),v=Object.create(y)):(v=Object.create(u),y=u)}if(l){var g=d.indexOf(c);if(-1!=g)return h[g];d.push(c),h.push(v)}for(var b in t(c,n)&&c.forEach(function(t,e){var n=a(e,m-1),o=a(t,m-1);v.set(n,o)}),t(c,o)&&c.forEach(function(t){var e=a(t,m-1);v.add(e)}),c){var _;y&&(_=Object.getOwnPropertyDescriptor(y,b)),_&&null==_.set||(v[b]=a(c[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(c);for(b=0;b0){if(s instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(s instanceof f.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===h)return void this.optimize()}else if(h instanceof f.default){var m=h.newlineIndex(0);m>-1&&h.split(m+1)}var v=h.children.head instanceof u.default?null:h.children.head;s.moveChildren(h,v),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,r){(null==this.whitelist||this.whitelist[o])&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,o,r),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==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,o)}else{var s=a.default.create(n,o);this.appendChild(s)}else i(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===a.default.Scope.INLINE_BLOT){var o=a.default.create(this.statics.defaultChild);o.appendChild(t),t=o}i(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(p,t)}},{key:"lines",value:function(){return function t(e,n,o){var r=[],i=o;return e.children.forEachAt(n,o,function(e,n,o){p(e)?r.push(e):e instanceof a.default.Container&&(r=r.concat(t(e,n,i))),i-=o}),r}(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&&(i(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 i(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),i(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,d.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},r=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,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A(t);if(null==o||null==o.key)return y.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 i=n.which||n.keyCode,a=(t.bindings[i]||[]).filter(function(t){return e.match(n,t)});if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var c=t.quill.getLine(l.index),u=r(c,2),d=u[0],h=u[1],p=t.quill.getLeaf(l.index),m=r(p,2),v=m[0],y=m[1],g=0===l.length?[v,y]:t.quill.getLeaf(l.index+l.length),b=r(g,2),_=b[0],w=b[1],O=v instanceof f.default.Text?v.value().slice(0,y):"",x=_ instanceof f.default.Text?_.value().slice(w):"",k={collapsed:0===l.length,empty:0===l.length&&d.length()<=1,format:t.quill.getFormat(l),offset:h,prefix:O,suffix:x};a.some(function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==k.format[t]}))return!1}else if("object"===o(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=k.format[t]:!1===e.format[t]?null==k.format[t]:(0,s.default)(e.format[t],k.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix))&&(!(null!=e.suffix&&!e.suffix.test(k.suffix))&&!0!==e.handler.call(t,l,k))})&&n.preventDefault()}}}})}}]),e}();function _(t,e){var n,o=t===b.keys.LEFT?"prefix":"suffix";return v(n={key:t,shiftKey:e,altKey:null},o,/^$/),v(n,"handler",function(n){var o=n.index;t===b.keys.RIGHT&&(o+=n.length+1);var i=this.quill.getLeaf(o);return!(r(i,1)[0]instanceof f.default.Embed)||(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.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=r(n,1)[0],i={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=r(a,1)[0];if(null!=s&&s.length()>1){var l=o.formats(),c=this.quill.getFormat(t.index-1,1);i=u.default.attributes.diff(l,c)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,d.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-f,f,i,d.default.sources.USER),this.quill.focus()}}function O(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var o={},i=0,a=this.quill.getLine(t.index),s=r(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),c=r(l,1)[0];if(c){var f=s.formats(),h=this.quill.getFormat(t.index,1);o=u.default.attributes.diff(f,h)||{},i=c.length()}}this.quill.deleteText(t.index,n,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index+i-1,n,o,d.default.sources.USER)}}function x(t){var e=this.quill.getLines(t),n={};if(e.length>1){var o=e[0].formats(),r=e[e.length-1].formats();n=u.default.attributes.diff(r,o)||{}}this.quill.deleteText(t,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,d.default.sources.USER),this.quill.setSelection(t.index,d.default.sources.SILENT),this.quill.focus()}function k(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 f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",o,d.default.sources.USER),this.quill.setSelection(t.index+1,d.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],d.default.sources.USER))})}function E(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),o=e.index,i=e.length,a=this.quill.scroll.descendant(n,o),s=r(a,2),l=s[0],c=s[1];if(null!=l){var u=this.quill.getIndex(l),h=l.newlineIndex(c,!0)+1,p=l.newlineIndex(u+c+i),m=l.domNode.textContent.slice(h,p).split("\n");c=0,m.forEach(function(e,r){t?(l.insertAt(h+c,n.TAB),c+=n.TAB.length,0===r?o+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(h+c,n.TAB.length),c-=n.TAB.length,0===r?o-=n.TAB.length:i-=n.TAB.length),c+=e.length+1}),this.quill.update(d.default.sources.USER),this.quill.setSelection(o,i,d.default.sources.SILENT)}}}}function P(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],d.default.sources.USER)}}}function A(t){if("string"==typeof t||"number"==typeof t)return A({key:t});if("object"===(void 0===t?"undefined":o(t))&&(t=(0,a.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[g]=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:P("bold"),italic:P("italic"),underline:P("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",d.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",d.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",d.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":E(!0),"outdent code-block":E(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,d.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,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,d.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,d.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,d.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=r(e,2),o=n[0],i=n[1],a=(0,l.default)({},o.formats(),{list:"checked"}),s=(new c.default).retain(t.index).insert("\n",a).retain(o.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.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=r(n,2),i=o[0],a=o[1],s=(new c.default).retain(t.index).insert("\n",e.format).retain(i.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.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),i=r(o,2),a=i[0],s=i[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," ",d.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(u,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,d.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=r(e,2),o=n[0],i=n[1],a=(new c.default).retain(t.index+o.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,d.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=g},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,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=function(){function t(t,e){for(var n=0;n-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},r=function(){function t(t,e){for(var n=0;n1&&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 r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}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=y(n(0)),r=y(n(5)),i=n(4),a=y(i),s=y(n(16)),l=y(n(25)),c=y(n(24)),u=y(n(35)),f=y(n(6)),d=y(n(22)),h=y(n(7)),p=y(n(55)),m=y(n(42)),v=y(n(23));function y(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":a.default,"blots/block/embed":i.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":f.default,"blots/scroll":d.default,"blots/text":h.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":v.default}),o.default.register(a.default,s.default,c.default,f.default,d.default,h.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=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,r){var i=this.isolate(t,e);if(null!=o.query(n,o.Scope.BLOT)&&r)i.wrap(n,r);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var a=o.create(this.statics.scope);i.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?o.create("text",e):o.create(e,n),i=this.split(t);this.parent.insertBefore(r,i)},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=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),r=n(32),i=n(33),a=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=r.default.keys(this.domNode),s=i.default.keys(this.domNode);e.concat(n).concat(s).forEach(function(e){var n=a.query(e,a.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,r=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 i(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(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){i(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var o,r=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 i(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 a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(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[i(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[i(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;no&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.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!=r.default.query(t,r.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;n0&&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,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,a.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,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",a.default.sources.USER),this.quill.setSelection(o+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}();function k(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var o=document.createElement("option");e===n?o.setAttribute("selected","selected"):o.setAttribute("value",e),t.appendChild(o)})}e.BaseTooltip=x,e.default=O},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;e1&&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 r=n.length();if(ta?n(o,t-a,Math.min(e,a+l-t)):n(o,0,Math.min(l,t+e-a)),a+=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,r=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 i=n(17),a=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 r(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,r){this.update(),t.prototype.formatAt.call(this,e,n,o,r)},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 r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==o&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof i.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=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=a.find(t,!1);s(e,!1),e instanceof i.default&&e.children.forEach(function(t){s(t,!1)})})):"attributes"===t.type&&s(e.prev)),s(e))}),this.children.forEach(l),r=(c=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var o=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map(function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==o&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)}),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=l},function(t,e,n){"use strict";var o,r=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 i=n(18),a=n(1);var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,o){var r=this;n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):(this.children.forEach(function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,o,r){null!=this.formats()[o]||a.query(o,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},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 r=this.next;r instanceof e&&r.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,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=s},function(t,e,n){"use strict";var o,r=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 i=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var o=a.query(e.blotName).tagName;if(n.tagName!==o)return t.formats.call(this,n)},e.prototype.format=function(n,o){null!=a.query(n,a.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,r){null!=a.query(o,a.Scope.BLOCK)?this.format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.insertAt=function(e,n,o){if(null==o||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,o);else{var r=this.split(e),i=a.create(n,o);r.parent.insertBefore(i,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=s},function(t,e,n){"use strict";var o,r=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 i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(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,r){0===e&&n===this.length()?this.format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var o,r=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 i=n(19),a=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 r(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=a.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=a.Scope.INLINE_BLOT,e}(i.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 r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.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,r=arguments[1],i=0;ie.length?t:e,f=t.length>e.length?e:t,d=u.indexOf(f);if(-1!=d)return c=[[o,u.substring(0,d)],[r,f],[o,u.substring(d+f.length)]],t.length>e.length&&(c[0][0]=c[2][0]=n),c;if(1==f.length)return[[n,t],[o,e]];var h=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=t.length?[o,r,i,a,f]:null}var i,a,c,u,f,d=r(n,o,Math.ceil(n.length/4)),h=r(n,o,Math.ceil(n.length/2));if(!d&&!h)return null;i=h?d&&d[4].length>h[4].length?d:h:d;t.length>e.length?(a=i[0],c=i[1],u=i[2],f=i[3]):(u=i[0],f=i[1],a=i[2],c=i[3]);var p=i[4];return[a,c,u,f,p]}(t,e);if(h){var p=h[0],m=h[1],v=h[2],y=h[3],g=h[4],b=i(p,v),_=i(m,y);return b.concat([[r,g]],_)}return function(t,e){for(var r=t.length,i=e.length,s=Math.ceil((r+i)/2),l=s,c=2*s,u=new Array(c),f=new Array(c),d=0;dr)v+=2;else if(O>i)m+=2;else if(p){var x=l+h-_;if(x>=0&&x=k)return a(t,e,A,O)}}}for(var E=-b+y;E<=b-g;E+=2){for(var x=l+E,P=(k=E==-b||E!=b&&f[x-1]r)g+=2;else if(P>i)y+=2;else if(!p){var w=l+h-E;if(w>=0&&w=(k=r-k))return a(t,e,A,O)}}}}return[[n,t],[o,e]]}(t,e)}(t=t.substring(0,t.length-f),e=e.substring(0,e.length-f));return d&&p.unshift([r,d]),h&&p.push([r,h]),function t(e){e.push([r,""]);var i=0;var a=0;var c=0;var u="";var f="";var d;for(;i1?(0!==a&&0!==c&&(0!==(d=s(f,u))&&(i-a-c>0&&e[i-a-c-1][0]==r?e[i-a-c-1][1]+=f.substring(0,d):(e.splice(0,0,[r,f.substring(0,d)]),i++),f=f.substring(d),u=u.substring(d)),0!==(d=l(f,u))&&(e[i][1]=f.substring(f.length-d)+e[i][1],f=f.substring(0,f.length-d),u=u.substring(0,u.length-d))),0===a?e.splice(i-c,a+c,[o,f]):0===c?e.splice(i-a,a+c,[n,u]):e.splice(i-a-c,a+c,[n,u],[o,f]),i=i-a-c+(a?1:0)+(c?1:0)+1):0!==i&&e[i-1][0]==r?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,c=0,a=0,u="",f=""}""===e[e.length-1][1]&&e.pop();var h=!1;i=1;for(;i0&&i.splice(a+2,0,[l[0],c]),u(i,a,3)}return t}(p,c)),p=function(t){for(var e=!1,i=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},a=2;a=55296&&s.charCodeAt(s.length-1)<=56319)&&t[a-1][0]===n&&i(t[a-1][1])&&t[a][0]===o&&i(t[a][1])&&(e=!0,t[a-1][1]=t[a-2][1].slice(-1)+t[a-1][1],t[a][1]=t[a-2][1].slice(-1)+t[a][1],t[a-2][1]=t[a-2][1].slice(0,-1));var s;if(!e)return t;for(var l=[],a=0;a0&&l.push(t[a]);return l}(p)}function a(t,e,n,o){var r=t.substring(0,n),a=e.substring(0,o),s=t.substring(n),l=e.substring(o),c=i(r,a),u=i(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),r=o,i=0;n=0&&o>=e-1;o--)if(o+1=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=A(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||!S(e,"\n"))return e;var o=-1,r=t.parentNode;for(;!r.classList.contains("ql-clipboard");)"list"===(l.default.query(r)||{}).blotName&&(o+=1),r=r.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}]],k=[d.AlignAttribute,v.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),E=[d.AlignStyle,h.BackgroundStyle,m.ColorStyle,v.DirectionStyle,y.FontStyle,g.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),P=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.root.addEventListener("paste",o.onPaste.bind(o)),o.container=o.quill.addContainer("ql-clipboard"),o.container.setAttribute("contenteditable",!0),o.container.setAttribute("tabindex",-1),o.matchers=[],x.concat(o.options.matchers).forEach(function(t){var e=r(t,2),i=e[0],a=e[1];(n.matchVisual||a!==R)&&o.addMatcher(i,a)}),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,f.default),i(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 +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},p.default.blotName,e[p.default.blotName]))}var o=this.prepareMatching(),i=r(o,2),a=i[0],l=i[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(r,i){var a=t(i,n,o);return i.nodeType===e.ELEMENT_NODE&&(a=n.reduce(function(t,e){return e(i,t)},a),a=(i[O]||[]).reduce(function(t,e){return e(i,t)},a)),r.concat(a)},new s.default):new s.default}(this.container,a,l);return S(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),r=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=r,e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(o){var i=r(o,2),a=i[0],s=i[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),function(t){t[O]=t[O]||[],t[O].push(s)})}}),[e,n]}}]),e}();function A(t,e,n){return"object"===(void 0===e?"undefined":o(e))?Object.keys(e).reduce(function(t,n){return A(t,n,e[n])},t):t.reduce(function(t,o){return o.attributes&&o.attributes[e]?t.push(o):t.insert(o.insert,(0,a.default)({},_({},e,n),o.attributes))},new s.default)}function C(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function S(t,e){for(var n="",o=t.ops.length-1;o>=0&&n.length-1}function N(t,e,n){return A(n,t,!0)}function j(t,e){var n=l.default.Attributor.Attribute.keys(t),o=l.default.Attributor.Class.keys(t),r=l.default.Attributor.Style.keys(t),i={};return n.concat(o).concat(r).forEach(function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null==(n=k[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(n=E[e],i[n.attrName]=n.value(t)||void 0))}),Object.keys(i).length>0&&(e=A(e,i)),e}function q(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var o={},r=n.value(t);null!=r&&(o[n.blotName]=r,e=(new s.default).insert(o,n.formats(t)))}else"function"==typeof n.formats&&(e=A(e,n.blotName,n.formats(t)));return e}function L(t,e){return S(e,"\n")||(T(t)||e.length()>0&&t.nextSibling&&T(t.nextSibling))&&e.insert("\n"),e}function R(t,e){if(T(t)&&null!=t.nextElementSibling&&!S(e,"\n\n")){var n=t.offsetHeight+parseFloat(C(t).marginTop)+parseFloat(C(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function M(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(!C(t.parentNode).whiteSpace.startsWith("pre")){var o=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==t.previousSibling&&T(t.parentNode)||null!=t.previousSibling&&T(t.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==t.nextSibling&&T(t.parentNode)||null!=t.nextSibling&&T(t.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return e.insert(n)}P.DEFAULTS={matchers:[],matchVisual:!0},e.default=P,e.matchAttributor=j,e.matchBlot=q,e.matchNewline=L,e.matchSpacing=R,e.matchText=M},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,r=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,r=function(){function t(t,e){for(var n=0;no.right&&(i=o.right-r.right,this.root.style.left=e+i+"px"),r.lefto.bottom){var a=r.bottom-r.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=r},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,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function t(e,n,o){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=R(n(29)),r=n(36),i=n(38),a=n(64),s=R(n(65)),l=R(n(66)),c=n(67),u=R(c),f=n(37),d=n(26),h=n(39),p=n(40),m=R(n(56)),v=R(n(68)),y=R(n(27)),g=R(n(69)),b=R(n(70)),_=R(n(71)),w=R(n(72)),O=R(n(73)),x=n(13),k=R(x),E=R(n(74)),P=R(n(75)),A=R(n(57)),C=R(n(41)),S=R(n(28)),T=R(n(59)),N=R(n(60)),j=R(n(61)),q=R(n(108)),L=R(n(62));function R(t){return t&&t.__esModule?t:{default:t}}o.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),o.default.register({"formats/align":r.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":k.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":m.default,"formats/code":x.Code,"formats/italic":v.default,"formats/link":y.default,"formats/script":g.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":O.default,"formats/list/item":c.ListItem,"modules/formula":E.default,"modules/syntax":P.default,"modules/toolbar":A.default,"themes/bubble":q.default,"themes/snow":L.default,"ui/icons":C.default,"ui/picker":S.default,"ui/icon-picker":N.default,"ui/color-picker":T.default,"ui/tooltip":j.default},!0),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var o,r=function(){function t(t,e){for(var n=0;n0&&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 d)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var o=null==n?this.length():n.offset(this),i=this.split(o);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){r(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=i.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}();h.blotName="list",h.scope=i.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[d],e.ListItem=d,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,r=n(56),i=(o=r)&&o.__esModule?o:{default:o};var a=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,i.default),e}();a.blotName="italic",a.tagName=["EM","I"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,r=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(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,r=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(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;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}();d.className="ql-syntax";var h=new r.default.Attributor.Class("token","hljs",{scope:r.default.Scope.INLINE}),p=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 r=null;return o.quill.on(i.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(r),r=setTimeout(function(){o.highlight(),r=null},o.options.interval)}),o.highlight(),o}return f(e,a.default),o(e,null,[{key:"register",value:function(){i.default.register(h,!0),i.default.register(d,!0)}}]),o(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(i.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(i.default.sources.SILENT),null!=e&&this.quill.setSelection(e,i.default.sources.SILENT)}}}]),e}();p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=d,e.CodeToken=h,e.default=p},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},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 r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n0&&r===a.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var i=o.quill.getLines(e.index,e.length);if(1===i.length)o.position(o.quill.getBounds(e));else{var s=i[i.length-1],l=o.quill.getIndex(s),u=Math.min(s.length()-1,e.index+e.length-l),f=o.quill.getBounds(new c.Range(l,u));o.position(f)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()}),o}return p(e,s.BaseTooltip),r(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(a.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),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}();y.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=y,e.default=v},function(t,e,n){t.exports=n(63)}]).default},t.exports=n()}).call(e,n(843).Buffer)},843:function(t,e,n){"use strict";(function(t){var o=n(844),r=n(845),i=n(846);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(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 v(t,e,n,o,r){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=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=l.from(e,o)),l.isBuffer(e))return 0===e.length?-1:y(t,e,n,o,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,o,r);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,o,r){var i,a=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;a=2,s/=2,l/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(r){var u=-1;for(i=n;is&&(n=s-l),i=n;i>=0;i--){for(var f=!0,d=0;dr&&(o=r):o=r;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");o>i/2&&(o=i/2);for(var a=0;a>8,r=n%256,i.push(r),i.push(o);return i}(e,t.length-n),t,n,o)}function k(t,e,n){return 0===e&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var o=[],r=e;r239?4:c>223?3:c>191?2:1;if(r+f<=n)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=t[r+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=t[r+1],a=t[r+2],128==(192&i)&&128==(192&a)&&(l=(15&c)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=t[r+1],a=t[r+2],s=t[r+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|1023&u),o.push(u),r+=f}return function(t){var e=t.length;if(e<=P)return String.fromCharCode.apply(String,t);var n="",o=0;for(;othis.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 S(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(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+=" ... ")),""},l.prototype.compare=function(t,e,n,o,r){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===r&&(r=this.length),e<0||n>t.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&e>=n)return 0;if(o>=r)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,r>>>=0,this===t)return 0;for(var i=r-o,a=n-e,s=Math.min(i,a),c=this.slice(o,r),u=t.slice(e,n),f=0;fr)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var i=!1;;)switch(o){case"hex":return g(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 O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function A(t,e,n){var o="";n=Math.min(t.length,n);for(var r=e;ro)&&(n=o);for(var r="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,n,o,r,i){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function q(t,e,n,o){e<0&&(e=65535+e+1);for(var r=0,i=Math.min(t.length-n,2);r>>8*(o?r:1-r)}function L(t,e,n,o){e<0&&(e=4294967295+e+1);for(var r=0,i=Math.min(t.length-n,4);r>>8*(o?r:3-r)&255}function R(t,e,n,o,r,i){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,o,i){return i||R(t,0,n,4),r.write(t,e,n,o,23,4),n+4}function $(t,e,n,o,i){return i||R(t,0,n,8),r.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),e0&&(r*=256);)o+=this[t+--e]*r;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],r=1,i=0;++i=(r*=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,r=1,i=this[t+--o];o>0&&(r*=256);)i+=this[t+--o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},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),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||j(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+r]=t/i&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||j(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||j(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):q(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):q(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var i=0,a=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||j(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||j(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):q(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):q(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return $(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return $(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=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=0;--r)t[r+e]=this[r+n];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===o){(e-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.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;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function F(t){return o.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,n,o){for(var r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}}).call(e,n(39))},844: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],a=n[1],s=new i(function(t,e,n){return 3*(e+n)/4-n}(0,o,a)),l=0,u=a>0?o-4:o,f=0;f>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===a&&(e=r[t.charCodeAt(f)]<<2|r[t.charCodeAt(f+1)]>>4,s[l++]=255&e);1===a&&(e=r[t.charCodeAt(f)]<<10|r[t.charCodeAt(f+1)]<<4|r[t.charCodeAt(f+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,r=n%3,i=[],a=0,s=n-r;as?s:a+16383));1===r?(e=t[n-1],i.push(o[e>>2]+o[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(o[e>>10]+o[e>>4&63]+o[e<<2&63]+"="));return i.join("")};for(var o=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)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 r,i,a=[],s=e;s>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},845:function(t,e){e.read=function(t,e,n,o,r){var i,a,s=8*r-o-1,l=(1<>1,u=-7,f=n?r-1:0,d=n?-1:1,h=t[e+f];for(f+=d,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+t[e+f],f+=d,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=o;u>0;a=256*a+t[e+f],f+=d,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,o),i-=c}return(h?-1:1)*a*Math.pow(2,i-o)},e.write=function(t,e,n,o,r,i){var a,s,l,c=8*i-r-1,u=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,p=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,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(e*l-1)*Math.pow(2,r),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,r),a=0));r>=8;t[n+h]=255&s,h+=p,s/=256,r-=8);for(a=a<0;t[n+h]=255&a,h+=p,a/=256,c-=8);t[n+h-p]|=128*m}},846:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},847:function(t,e,n){var o=n(325)(n(848),n(849),!1,null,null,null);t.exports=o.exports},848:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(675);e.default={mixins:[o.a],props:{entity:{default:"appointment",type:String},customFields:{default:[]},categories:{default:[]},type:{default:"email",type:String}},data:function(){return{commonPlaceholders:[{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:"%customer_email%",label:this.$root.labels.ph_customer_email},{value:"%customer_first_name%",label:this.$root.labels.ph_customer_first_name},{value:"%customer_last_name%",label:this.$root.labels.ph_customer_last_name},{value:"%customer_full_name%",label:this.$root.labels.ph_customer_full_name},{value:"%customer_phone%",label:this.$root.labels.ph_customer_phone}],appointmentPlaceholders:[{value:"%employee_email%",label:this.$root.labels.ph_employee_email},{value:"%employee_first_name%",label:this.$root.labels.ph_employee_first_name},{value:"%employee_last_name%",label:this.$root.labels.ph_employee_last_name},{value:"%employee_full_name%",label:this.$root.labels.ph_employee_full_name},{value:"%employee_phone%",label:this.$root.labels.ph_employee_phone},{value:"%location_address%",label:this.$root.labels.ph_location_address},{value:"%location_name%",label:this.$root.labels.ph_location_name},{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:"%appointment_notes%",label:this.$root.labels.ph_appointment_notes},{value:"%appointment_price%",label:this.$root.labels.ph_appointment_price},{value:"%appointment_cancel_url%",label:this.$root.labels.ph_appointment_cancel_url},{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}],eventPlaceholders:[{value:"%attendee_code%",label:this.$root.labels.ph_attendee_code},{value:"%event_name%",label:this.$root.labels.ph_event_name},{value:"%event_price%",label:this.$root.labels.ph_event_price},{value:"%event_cancel_url%",label:this.$root.labels.ph_event_cancel_url},{value:"%event_description%",label:this.$root.labels.ph_event_description},{value:"%event_location%",label:this.$root.labels.ph_event_location},{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_start_date%",label:this.$root.labels.ph_event_start_date},{value:"%event_end_date%",label:this.$root.labels.ph_event_end_date},{value:"%event_start_date_time%",label:this.$root.labels.ph_event_start_date_time},{value:"%event_end_date_time%",label:this.$root.labels.ph_event_end_date_time},{value:"%employee_email%",label:this.$root.labels.ph_employee_email},{value:"%employee_first_name%",label:this.$root.labels.ph_employee_first_name},{value:"%employee_last_name%",label:this.$root.labels.ph_employee_last_name},{value:"%employee_full_name%",label:this.$root.labels.ph_employee_full_name},{value:"%employee_phone%",label:this.$root.labels.ph_employee_phone},{value:"%employee_name_email_phone%",label:this.$root.labels.ph_employee_name_email_phone}],customFieldsPlaceholders:[],extrasPlaceholders:[],placeholders:[]}},mounted:function(){switch(this.inlineSVG(),this.addExtrasPlaceholders(),this.addCustomFieldsPlaceholders(),this.entity){case"event":this.placeholders=this.commonPlaceholders.concat(this.eventPlaceholders);break;default:this.placeholders=this.commonPlaceholders.concat(this.customFieldsPlaceholders.concat(this.extrasPlaceholders.concat(this.appointmentPlaceholders)))}},methods:{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)},addCustomFieldsPlaceholders:function(){for(var t=0;te.value?1:e.value>t.value?-1:0})}}}},849: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":"%appointment_cancel_url%"===e.value&&t.$root.isLite},on:{click:function(n){return t.copyCodeText(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:[]}},850: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",{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"],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(" "),t._l(t.customerNotifications(e),function(e,o){return n("div",{staticClass:"am-button-checkbox"},[n("el-button",{key:o,class:{"am-active":e.id===t.notification.id,"am-lite-disabled":t.isDisabled("customer",e)},attrs:{size:"large",disabled:t.isDisabled("customer",e)},on:{click:function(n){return t.getNotification(e.id)}}},[t._v("\n "+t._s(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.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",attrs:{src:t.$root.getUrl+"public/img/cron-job.svg"}})])]):t._e()],1)})],2)}),0),t._v(" "),n("el-tab-pane",{attrs:{label:t.$root.labels.to_employee,name:"provider"}},t._l(["appointment","event"],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(" "),t._l(t.employeeNotifications(e),function(e,o){return n("div",{staticClass:"am-button-checkbox"},[n("el-button",{key:o,class:{"am-active":e.id===t.notification.id,"am-lite-disabled":t.isDisabled("provider",e)},attrs:{size:"large",disabled:t.isDisabled("provider",e)},on:{click:function(n){return t.getNotification(e.id)}}},[t._v("\n "+t._s(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.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",attrs:{src:t.$root.getUrl+"public/img/cron-job.svg"}})])]):t._e()],1)})],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}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{span:12}},[n("div",[n("h2",[t._v(t._s(t.$root.labels[t.notification.name]))])])]),t._v(" "),n("el-col",{attrs:{span: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 ")])])])],1),t._v(" "),n("el-row",{attrs:{gutter:16}},["email"===t.type?n("el-col",{attrs:{span:t.notificationTimeBased?18:24}},[n("el-form-item",{attrs:{label:t.$root.labels.subject+":"}},[n("el-input",{attrs:{type:"text"},model:{value:t.notification.subject,callback:function(e){t.$set(t.notification,"subject",e)},expression:"notification.subject"}})],1)],1):t._e(),t._v(" "),t.notificationTime?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?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?n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:t.$root.labels.scheduled_after+":"}},[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(" "),n("el-form-item",{attrs:{label:t.$root.labels.message_colon}},["email"===t.type?n("quill-editor",{attrs:{options:t.editorOptions},model:{value:t.notification.content,callback:function(e){t.$set(t.notification,"content",e)},expression:"notification.content"}}):t._e(),t._v(" "),"sms"===t.type?n("el-input",{attrs:{type:"textarea",rows:7,placeholder:""},model:{value:t.notification.content,callback:function(e){t.$set(t.notification,"content",e)},expression:"notification.content"}}):t._e()],1),t._v(" "),!0===t.notificationTimeBased?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("el-row",{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"},[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 ")])],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,customFields:t.customFields,categories:t.categories},on:{closeDialogPlaceholders:function(e){t.dialogPlaceholders=!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(" "),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:"provider"===e.sendTo?t.$root.labels.employee+" "+t.$root.labels[e.name]:t.$root.labels.customer+" "+t.$root.labels[e.name],value: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:[]}},851:function(t,e,n){var o=n(325)(n(852),n(874),!1,null,null,null);t.exports=o.exports},852:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(853),r=n.n(o),i=n(856),a=n.n(i);e.default={props:{customFields:{default:function(){return[]},type:Array},notifications:{default:function(){return[]},type:Array}},components:{Authorization:r.a,Dashboard:a.a}}},853:function(t,e,n){var o=n(325)(n(854),n(855),!1,null,null,null);t.exports=o.exports},854:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(731),r=n(676),i=n(686);e.default={mixins:[o.a,r.a,i.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())}}}},855: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:[]}},856:function(t,e,n){var o=n(325)(n(857),n(873),!1,null,null,null);t.exports=o.exports},857:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(858),r=n.n(o),i=n(861),a=n.n(i),s=n(790),l=n.n(s),c=n(864),u=n.n(c),f=n(867),d=n.n(f),h=n(870),p=n.n(h),m=n(777),v=(n.n(m),n(688)),y=n(731),g=n(686),b=n(676),_=n(791);e.default={mixins:[v.a,y.a,g.a,b.a,_.a],props:{customFields:{default:function(){return[]},type:Array},notifications:{default:function(){return[]},type:Array}},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(),"payPalCheckoutSuccess"in t)this.completePayment();else{if("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:{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})},completePayment:function(){var t=this.getUrlQueryParams(window.location.href);"true"===t.payPalCheckoutSuccess?(this.fetched=!1,this.paymentComplete.payerId=t.PayerID,this.paymentComplete.paymentId=t.paymentId,this.paymentComplete.amount=t.amount,this.sendAmeliaSmsApiRequest("paymentComplete",this.onPaymentCompleteSuccess,this.onPaymentSuccessError)):(this.fetched=!0,this.getUserInfo(),this.notify(this.$root.labels.error,this.$root.labels.cant_recharge_balance,"error"))},onPaymentCompleteSuccess:function(){var t=this.removeURLParameter(window.location.href,"payPalCheckoutSuccess");t=this.removeURLParameter(t,"notificationTab"),t=this.removeURLParameter(t,"amount"),t=this.removeURLParameter(t,"paymentId"),t=this.removeURLParameter(t,"token"),t=this.removeURLParameter(t,"PayerID"),history.pushState(null,null,t+"#/notifications"),this.getUserInfo(),this.notify(this.$root.labels.success,this.$root.labels.balance_recharged,"success")},onPaymentSuccessError:function(){}},components:{History:a.a,CustomizeNotifications:l.a,Pricing:u.a,Payments:d.a,UserProfile:p.a,DialogRechargeBalance:r.a,quillEditor:m.quillEditor}}},858:function(t,e,n){var o=n(325)(n(859),n(860),!1,null,null,null);t.exports=o.exports},859:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(675),r=n(778),i=n.n(r),a=n(731),s=n(676);e.default={mixins:[o.a,a.a,s.a],data:function(){return{customAmountEnabled:!1,minAmount:10,paymentCheckout:{amount:10},paymentCheckoutLoading:!1}},mounted:function(){this.inlineSVG()},methods:{closeDialog:function(){this.$emit("closeDialogRechargeBalance")},changeAmount:function(t){this.customAmountEnabled=!1,this.paymentCheckout.amount=t},onCheckoutClick:function(){this.paymentCheckoutLoading=!0,this.sendAmeliaSmsApiRequest("paymentCheckout",this.onCheckoutSuccess,this.onCheckoutError)},onCheckoutSuccess:function(t){window.location.href=t.redirectUrl},onCheckoutError:function(){this.notify(this.$root.labels.error,this.$root.labels.cant_checkout,"error"),this.paymentCheckoutLoading=!1}},components:{ElButton:i.a}}},860: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("div",[n("el-checkbox",{model:{value:t.customAmountEnabled,callback:function(e){t.customAmountEnabled=e},expression:"customAmountEnabled"}},[t._v(t._s(t.$root.labels.recharge_custom_amount))]),t._v(" "),n("transition",{attrs:{name:"fade"}},[t.customAmountEnabled?n("div",{staticClass:"am-sms-custom-amount"},[n("el-input-number",{attrs:{min:t.minAmount},model:{value:t.paymentCheckout.amount,callback:function(e){t.$set(t.paymentCheckout,"amount",e)},expression:"paymentCheckout.amount"}})],1):t._e()])],1),t._v(" "),n("span",{staticClass:"am-sms-money-total-price"},[t._v("\n "+t._s(t.$root.labels.total_price_colon)+" $"+t._s(t.getFormattedMessagePrice(t.paymentCheckout.amount+.029*t.paymentCheckout.amount+.3))+" ("+t._s(t.$root.labels.pay_pal_fee)+" 2.9% + $0.30)\n ")]),t._v(" "),n("el-button",{attrs:{type:"primary",loading:t.paymentCheckoutLoading},on:{click:t.onCheckoutClick}},[t._v("\n "+t._s(t.$root.labels.recharge)+"\n ")])],1)])])},staticRenderFns:[]}},861:function(t,e,n){var o=n(325)(n(862),n(863),!1,null,null,null);t.exports=o.exports},862:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n.n(o),i=n(679),a=n.n(i),s=n(674),l=n(724),c=n.n(l),u=n(731),f=n(791);e.default={mixins:[s.a,u.a,f.a],props:{fetchedDashboard:{type:Boolean,default:!1}},data:function(){return{fetched:!1,form:new a.a,notifications:[],options:{countFiltered:0},params:{dates:this.getDatePickerNegativeInitRange(),page:1},refreshSMSHistory:{logId:null,historyId:null}}},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(r()(e.dates.start).format("YYYY-MM-DD")),e.dates.end&&n.push(r()(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: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}}},863: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.documentWidth0?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(" "),n("span",[n("img",{attrs:{src:t.$root.getUrl+"public/img/payments/payPal.svg"}}),t._v(t._s(t.$root.labels.payPal))])]),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:[]}},870:function(t,e,n){var o=n(325)(n(871),n(872),!1,null,null,null);t.exports=o.exports},871:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(676),r=n(731);e.default={mixins:[o.a,r.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:""}}}}},872: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:[]}},873: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,customFields:t.customFields,user:t.user,type:"sms"}}):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",{on:{closeDialogRechargeBalance:function(e){t.dialogRechargeBalance=!1}}})],1):t._e()],1)],1)},staticRenderFns:[]}},874:function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"am-body",attrs:{id:"am-sms-notifications"}},[!1===this.$root.settings.notifications.smsSignedIn?e("authorization"):e("dashboard",{attrs:{notifications:this.notifications,customFields:this.customFields}})],1)},staticRenderFns:[]}},875: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,type:"email"}})],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,customFields:t.options.entities.customFields}}):t._e()],1)],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 ")])])],1)])},staticRenderFns:[]}}});